module Stratosphere.InspectorV2.CisScanConfiguration.ScheduleProperty (
module Exports, ScheduleProperty(..), mkScheduleProperty
) where
import qualified Data.Aeson as JSON
import qualified Stratosphere.Prelude as Prelude
import Stratosphere.Property
import {-# SOURCE #-} Stratosphere.InspectorV2.CisScanConfiguration.DailyScheduleProperty as Exports
import {-# SOURCE #-} Stratosphere.InspectorV2.CisScanConfiguration.MonthlyScheduleProperty as Exports
import {-# SOURCE #-} Stratosphere.InspectorV2.CisScanConfiguration.WeeklyScheduleProperty as Exports
import Stratosphere.ResourceProperties
data ScheduleProperty
=
ScheduleProperty {ScheduleProperty -> ()
haddock_workaround_ :: (),
ScheduleProperty -> Maybe DailyScheduleProperty
daily :: (Prelude.Maybe DailyScheduleProperty),
ScheduleProperty -> Maybe MonthlyScheduleProperty
monthly :: (Prelude.Maybe MonthlyScheduleProperty),
ScheduleProperty -> Maybe Object
oneTime :: (Prelude.Maybe JSON.Object),
ScheduleProperty -> Maybe WeeklyScheduleProperty
weekly :: (Prelude.Maybe WeeklyScheduleProperty)}
deriving stock (ScheduleProperty -> ScheduleProperty -> Bool
(ScheduleProperty -> ScheduleProperty -> Bool)
-> (ScheduleProperty -> ScheduleProperty -> Bool)
-> Eq ScheduleProperty
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: ScheduleProperty -> ScheduleProperty -> Bool
== :: ScheduleProperty -> ScheduleProperty -> Bool
$c/= :: ScheduleProperty -> ScheduleProperty -> Bool
/= :: ScheduleProperty -> ScheduleProperty -> Bool
Prelude.Eq, Int -> ScheduleProperty -> ShowS
[ScheduleProperty] -> ShowS
ScheduleProperty -> String
(Int -> ScheduleProperty -> ShowS)
-> (ScheduleProperty -> String)
-> ([ScheduleProperty] -> ShowS)
-> Show ScheduleProperty
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> ScheduleProperty -> ShowS
showsPrec :: Int -> ScheduleProperty -> ShowS
$cshow :: ScheduleProperty -> String
show :: ScheduleProperty -> String
$cshowList :: [ScheduleProperty] -> ShowS
showList :: [ScheduleProperty] -> ShowS
Prelude.Show)
mkScheduleProperty :: ScheduleProperty
mkScheduleProperty :: ScheduleProperty
mkScheduleProperty
= ScheduleProperty
{haddock_workaround_ :: ()
haddock_workaround_ = (), daily :: Maybe DailyScheduleProperty
daily = Maybe DailyScheduleProperty
forall a. Maybe a
Prelude.Nothing,
monthly :: Maybe MonthlyScheduleProperty
monthly = Maybe MonthlyScheduleProperty
forall a. Maybe a
Prelude.Nothing, oneTime :: Maybe Object
oneTime = Maybe Object
forall a. Maybe a
Prelude.Nothing,
weekly :: Maybe WeeklyScheduleProperty
weekly = Maybe WeeklyScheduleProperty
forall a. Maybe a
Prelude.Nothing}
instance ToResourceProperties ScheduleProperty where
toResourceProperties :: ScheduleProperty -> ResourceProperties
toResourceProperties ScheduleProperty {Maybe Object
Maybe MonthlyScheduleProperty
Maybe DailyScheduleProperty
Maybe WeeklyScheduleProperty
()
haddock_workaround_ :: ScheduleProperty -> ()
daily :: ScheduleProperty -> Maybe DailyScheduleProperty
monthly :: ScheduleProperty -> Maybe MonthlyScheduleProperty
oneTime :: ScheduleProperty -> Maybe Object
weekly :: ScheduleProperty -> Maybe WeeklyScheduleProperty
haddock_workaround_ :: ()
daily :: Maybe DailyScheduleProperty
monthly :: Maybe MonthlyScheduleProperty
oneTime :: Maybe Object
weekly :: Maybe WeeklyScheduleProperty
..}
= ResourceProperties
{awsType :: Text
awsType = Text
"AWS::InspectorV2::CisScanConfiguration.Schedule",
supportsTags :: Bool
supportsTags = Bool
Prelude.False,
properties :: Object
properties = [Item Object] -> Object
forall l. IsList l => [Item l] -> l
Prelude.fromList
([Maybe (Key, Value)] -> [(Key, Value)]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
[Key -> DailyScheduleProperty -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"Daily" (DailyScheduleProperty -> (Key, Value))
-> Maybe DailyScheduleProperty -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe DailyScheduleProperty
daily,
Key -> MonthlyScheduleProperty -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"Monthly" (MonthlyScheduleProperty -> (Key, Value))
-> Maybe MonthlyScheduleProperty -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe MonthlyScheduleProperty
monthly,
Key -> Object -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"OneTime" (Object -> (Key, Value)) -> Maybe Object -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Object
oneTime,
Key -> WeeklyScheduleProperty -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"Weekly" (WeeklyScheduleProperty -> (Key, Value))
-> Maybe WeeklyScheduleProperty -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe WeeklyScheduleProperty
weekly])}
instance JSON.ToJSON ScheduleProperty where
toJSON :: ScheduleProperty -> Value
toJSON ScheduleProperty {Maybe Object
Maybe MonthlyScheduleProperty
Maybe DailyScheduleProperty
Maybe WeeklyScheduleProperty
()
haddock_workaround_ :: ScheduleProperty -> ()
daily :: ScheduleProperty -> Maybe DailyScheduleProperty
monthly :: ScheduleProperty -> Maybe MonthlyScheduleProperty
oneTime :: ScheduleProperty -> Maybe Object
weekly :: ScheduleProperty -> Maybe WeeklyScheduleProperty
haddock_workaround_ :: ()
daily :: Maybe DailyScheduleProperty
monthly :: Maybe MonthlyScheduleProperty
oneTime :: Maybe Object
weekly :: Maybe WeeklyScheduleProperty
..}
= [(Key, Value)] -> Value
JSON.object
([Item [(Key, Value)]] -> [(Key, Value)]
forall l. IsList l => [Item l] -> l
Prelude.fromList
([Maybe (Key, Value)] -> [(Key, Value)]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
[Key -> DailyScheduleProperty -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"Daily" (DailyScheduleProperty -> (Key, Value))
-> Maybe DailyScheduleProperty -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe DailyScheduleProperty
daily,
Key -> MonthlyScheduleProperty -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"Monthly" (MonthlyScheduleProperty -> (Key, Value))
-> Maybe MonthlyScheduleProperty -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe MonthlyScheduleProperty
monthly,
Key -> Object -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"OneTime" (Object -> (Key, Value)) -> Maybe Object -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Object
oneTime,
Key -> WeeklyScheduleProperty -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"Weekly" (WeeklyScheduleProperty -> (Key, Value))
-> Maybe WeeklyScheduleProperty -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe WeeklyScheduleProperty
weekly]))
instance Property "Daily" ScheduleProperty where
type PropertyType "Daily" ScheduleProperty = DailyScheduleProperty
set :: PropertyType "Daily" ScheduleProperty
-> ScheduleProperty -> ScheduleProperty
set PropertyType "Daily" ScheduleProperty
newValue ScheduleProperty {Maybe Object
Maybe MonthlyScheduleProperty
Maybe DailyScheduleProperty
Maybe WeeklyScheduleProperty
()
haddock_workaround_ :: ScheduleProperty -> ()
daily :: ScheduleProperty -> Maybe DailyScheduleProperty
monthly :: ScheduleProperty -> Maybe MonthlyScheduleProperty
oneTime :: ScheduleProperty -> Maybe Object
weekly :: ScheduleProperty -> Maybe WeeklyScheduleProperty
haddock_workaround_ :: ()
daily :: Maybe DailyScheduleProperty
monthly :: Maybe MonthlyScheduleProperty
oneTime :: Maybe Object
weekly :: Maybe WeeklyScheduleProperty
..}
= ScheduleProperty {daily :: Maybe DailyScheduleProperty
daily = DailyScheduleProperty -> Maybe DailyScheduleProperty
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType "Daily" ScheduleProperty
DailyScheduleProperty
newValue, Maybe Object
Maybe MonthlyScheduleProperty
Maybe WeeklyScheduleProperty
()
haddock_workaround_ :: ()
monthly :: Maybe MonthlyScheduleProperty
oneTime :: Maybe Object
weekly :: Maybe WeeklyScheduleProperty
haddock_workaround_ :: ()
monthly :: Maybe MonthlyScheduleProperty
oneTime :: Maybe Object
weekly :: Maybe WeeklyScheduleProperty
..}
instance Property "Monthly" ScheduleProperty where
type PropertyType "Monthly" ScheduleProperty = MonthlyScheduleProperty
set :: PropertyType "Monthly" ScheduleProperty
-> ScheduleProperty -> ScheduleProperty
set PropertyType "Monthly" ScheduleProperty
newValue ScheduleProperty {Maybe Object
Maybe MonthlyScheduleProperty
Maybe DailyScheduleProperty
Maybe WeeklyScheduleProperty
()
haddock_workaround_ :: ScheduleProperty -> ()
daily :: ScheduleProperty -> Maybe DailyScheduleProperty
monthly :: ScheduleProperty -> Maybe MonthlyScheduleProperty
oneTime :: ScheduleProperty -> Maybe Object
weekly :: ScheduleProperty -> Maybe WeeklyScheduleProperty
haddock_workaround_ :: ()
daily :: Maybe DailyScheduleProperty
monthly :: Maybe MonthlyScheduleProperty
oneTime :: Maybe Object
weekly :: Maybe WeeklyScheduleProperty
..}
= ScheduleProperty {monthly :: Maybe MonthlyScheduleProperty
monthly = MonthlyScheduleProperty -> Maybe MonthlyScheduleProperty
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType "Monthly" ScheduleProperty
MonthlyScheduleProperty
newValue, Maybe Object
Maybe DailyScheduleProperty
Maybe WeeklyScheduleProperty
()
haddock_workaround_ :: ()
daily :: Maybe DailyScheduleProperty
oneTime :: Maybe Object
weekly :: Maybe WeeklyScheduleProperty
haddock_workaround_ :: ()
daily :: Maybe DailyScheduleProperty
oneTime :: Maybe Object
weekly :: Maybe WeeklyScheduleProperty
..}
instance Property "OneTime" ScheduleProperty where
type PropertyType "OneTime" ScheduleProperty = JSON.Object
set :: PropertyType "OneTime" ScheduleProperty
-> ScheduleProperty -> ScheduleProperty
set PropertyType "OneTime" ScheduleProperty
newValue ScheduleProperty {Maybe Object
Maybe MonthlyScheduleProperty
Maybe DailyScheduleProperty
Maybe WeeklyScheduleProperty
()
haddock_workaround_ :: ScheduleProperty -> ()
daily :: ScheduleProperty -> Maybe DailyScheduleProperty
monthly :: ScheduleProperty -> Maybe MonthlyScheduleProperty
oneTime :: ScheduleProperty -> Maybe Object
weekly :: ScheduleProperty -> Maybe WeeklyScheduleProperty
haddock_workaround_ :: ()
daily :: Maybe DailyScheduleProperty
monthly :: Maybe MonthlyScheduleProperty
oneTime :: Maybe Object
weekly :: Maybe WeeklyScheduleProperty
..}
= ScheduleProperty {oneTime :: Maybe Object
oneTime = Object -> Maybe Object
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure Object
PropertyType "OneTime" ScheduleProperty
newValue, Maybe MonthlyScheduleProperty
Maybe DailyScheduleProperty
Maybe WeeklyScheduleProperty
()
haddock_workaround_ :: ()
daily :: Maybe DailyScheduleProperty
monthly :: Maybe MonthlyScheduleProperty
weekly :: Maybe WeeklyScheduleProperty
haddock_workaround_ :: ()
daily :: Maybe DailyScheduleProperty
monthly :: Maybe MonthlyScheduleProperty
weekly :: Maybe WeeklyScheduleProperty
..}
instance Property "Weekly" ScheduleProperty where
type PropertyType "Weekly" ScheduleProperty = WeeklyScheduleProperty
set :: PropertyType "Weekly" ScheduleProperty
-> ScheduleProperty -> ScheduleProperty
set PropertyType "Weekly" ScheduleProperty
newValue ScheduleProperty {Maybe Object
Maybe MonthlyScheduleProperty
Maybe DailyScheduleProperty
Maybe WeeklyScheduleProperty
()
haddock_workaround_ :: ScheduleProperty -> ()
daily :: ScheduleProperty -> Maybe DailyScheduleProperty
monthly :: ScheduleProperty -> Maybe MonthlyScheduleProperty
oneTime :: ScheduleProperty -> Maybe Object
weekly :: ScheduleProperty -> Maybe WeeklyScheduleProperty
haddock_workaround_ :: ()
daily :: Maybe DailyScheduleProperty
monthly :: Maybe MonthlyScheduleProperty
oneTime :: Maybe Object
weekly :: Maybe WeeklyScheduleProperty
..}
= ScheduleProperty {weekly :: Maybe WeeklyScheduleProperty
weekly = WeeklyScheduleProperty -> Maybe WeeklyScheduleProperty
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType "Weekly" ScheduleProperty
WeeklyScheduleProperty
newValue, Maybe Object
Maybe MonthlyScheduleProperty
Maybe DailyScheduleProperty
()
haddock_workaround_ :: ()
daily :: Maybe DailyScheduleProperty
monthly :: Maybe MonthlyScheduleProperty
oneTime :: Maybe Object
haddock_workaround_ :: ()
daily :: Maybe DailyScheduleProperty
monthly :: Maybe MonthlyScheduleProperty
oneTime :: Maybe Object
..}