module Stratosphere.SSMContacts.Contact.StageProperty (
module Exports, StageProperty(..), mkStageProperty
) where
import qualified Data.Aeson as JSON
import qualified Stratosphere.Prelude as Prelude
import Stratosphere.Property
import {-# SOURCE #-} Stratosphere.SSMContacts.Contact.TargetsProperty as Exports
import Stratosphere.ResourceProperties
import Stratosphere.Value
data StageProperty
=
StageProperty {StageProperty -> ()
haddock_workaround_ :: (),
StageProperty -> Maybe (Value Integer)
durationInMinutes :: (Prelude.Maybe (Value Prelude.Integer)),
StageProperty -> Maybe (ValueList Text)
rotationIds :: (Prelude.Maybe (ValueList Prelude.Text)),
StageProperty -> Maybe [TargetsProperty]
targets :: (Prelude.Maybe [TargetsProperty])}
deriving stock (StageProperty -> StageProperty -> Bool
(StageProperty -> StageProperty -> Bool)
-> (StageProperty -> StageProperty -> Bool) -> Eq StageProperty
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: StageProperty -> StageProperty -> Bool
== :: StageProperty -> StageProperty -> Bool
$c/= :: StageProperty -> StageProperty -> Bool
/= :: StageProperty -> StageProperty -> Bool
Prelude.Eq, Int -> StageProperty -> ShowS
[StageProperty] -> ShowS
StageProperty -> String
(Int -> StageProperty -> ShowS)
-> (StageProperty -> String)
-> ([StageProperty] -> ShowS)
-> Show StageProperty
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> StageProperty -> ShowS
showsPrec :: Int -> StageProperty -> ShowS
$cshow :: StageProperty -> String
show :: StageProperty -> String
$cshowList :: [StageProperty] -> ShowS
showList :: [StageProperty] -> ShowS
Prelude.Show)
mkStageProperty :: StageProperty
mkStageProperty :: StageProperty
mkStageProperty
= StageProperty
{haddock_workaround_ :: ()
haddock_workaround_ = (), durationInMinutes :: Maybe (Value Integer)
durationInMinutes = Maybe (Value Integer)
forall a. Maybe a
Prelude.Nothing,
rotationIds :: Maybe (ValueList Text)
rotationIds = Maybe (ValueList Text)
forall a. Maybe a
Prelude.Nothing, targets :: Maybe [TargetsProperty]
targets = Maybe [TargetsProperty]
forall a. Maybe a
Prelude.Nothing}
instance ToResourceProperties StageProperty where
toResourceProperties :: StageProperty -> ResourceProperties
toResourceProperties StageProperty {Maybe [TargetsProperty]
Maybe (ValueList Text)
Maybe (Value Integer)
()
haddock_workaround_ :: StageProperty -> ()
durationInMinutes :: StageProperty -> Maybe (Value Integer)
rotationIds :: StageProperty -> Maybe (ValueList Text)
targets :: StageProperty -> Maybe [TargetsProperty]
haddock_workaround_ :: ()
durationInMinutes :: Maybe (Value Integer)
rotationIds :: Maybe (ValueList Text)
targets :: Maybe [TargetsProperty]
..}
= ResourceProperties
{awsType :: Text
awsType = Text
"AWS::SSMContacts::Contact.Stage",
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 -> Value Integer -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"DurationInMinutes" (Value Integer -> (Key, Value))
-> Maybe (Value Integer) -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe (Value Integer)
durationInMinutes,
Key -> ValueList Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"RotationIds" (ValueList Text -> (Key, Value))
-> Maybe (ValueList Text) -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe (ValueList Text)
rotationIds,
Key -> [TargetsProperty] -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"Targets" ([TargetsProperty] -> (Key, Value))
-> Maybe [TargetsProperty] -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe [TargetsProperty]
targets])}
instance JSON.ToJSON StageProperty where
toJSON :: StageProperty -> Value
toJSON StageProperty {Maybe [TargetsProperty]
Maybe (ValueList Text)
Maybe (Value Integer)
()
haddock_workaround_ :: StageProperty -> ()
durationInMinutes :: StageProperty -> Maybe (Value Integer)
rotationIds :: StageProperty -> Maybe (ValueList Text)
targets :: StageProperty -> Maybe [TargetsProperty]
haddock_workaround_ :: ()
durationInMinutes :: Maybe (Value Integer)
rotationIds :: Maybe (ValueList Text)
targets :: Maybe [TargetsProperty]
..}
= [(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 -> Value Integer -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"DurationInMinutes" (Value Integer -> (Key, Value))
-> Maybe (Value Integer) -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe (Value Integer)
durationInMinutes,
Key -> ValueList Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"RotationIds" (ValueList Text -> (Key, Value))
-> Maybe (ValueList Text) -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe (ValueList Text)
rotationIds,
Key -> [TargetsProperty] -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"Targets" ([TargetsProperty] -> (Key, Value))
-> Maybe [TargetsProperty] -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe [TargetsProperty]
targets]))
instance Property "DurationInMinutes" StageProperty where
type PropertyType "DurationInMinutes" StageProperty = Value Prelude.Integer
set :: PropertyType "DurationInMinutes" StageProperty
-> StageProperty -> StageProperty
set PropertyType "DurationInMinutes" StageProperty
newValue StageProperty {Maybe [TargetsProperty]
Maybe (ValueList Text)
Maybe (Value Integer)
()
haddock_workaround_ :: StageProperty -> ()
durationInMinutes :: StageProperty -> Maybe (Value Integer)
rotationIds :: StageProperty -> Maybe (ValueList Text)
targets :: StageProperty -> Maybe [TargetsProperty]
haddock_workaround_ :: ()
durationInMinutes :: Maybe (Value Integer)
rotationIds :: Maybe (ValueList Text)
targets :: Maybe [TargetsProperty]
..}
= StageProperty {durationInMinutes :: Maybe (Value Integer)
durationInMinutes = Value Integer -> Maybe (Value Integer)
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType "DurationInMinutes" StageProperty
Value Integer
newValue, Maybe [TargetsProperty]
Maybe (ValueList Text)
()
haddock_workaround_ :: ()
rotationIds :: Maybe (ValueList Text)
targets :: Maybe [TargetsProperty]
haddock_workaround_ :: ()
rotationIds :: Maybe (ValueList Text)
targets :: Maybe [TargetsProperty]
..}
instance Property "RotationIds" StageProperty where
type PropertyType "RotationIds" StageProperty = ValueList Prelude.Text
set :: PropertyType "RotationIds" StageProperty
-> StageProperty -> StageProperty
set PropertyType "RotationIds" StageProperty
newValue StageProperty {Maybe [TargetsProperty]
Maybe (ValueList Text)
Maybe (Value Integer)
()
haddock_workaround_ :: StageProperty -> ()
durationInMinutes :: StageProperty -> Maybe (Value Integer)
rotationIds :: StageProperty -> Maybe (ValueList Text)
targets :: StageProperty -> Maybe [TargetsProperty]
haddock_workaround_ :: ()
durationInMinutes :: Maybe (Value Integer)
rotationIds :: Maybe (ValueList Text)
targets :: Maybe [TargetsProperty]
..}
= StageProperty {rotationIds :: Maybe (ValueList Text)
rotationIds = ValueList Text -> Maybe (ValueList Text)
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType "RotationIds" StageProperty
ValueList Text
newValue, Maybe [TargetsProperty]
Maybe (Value Integer)
()
haddock_workaround_ :: ()
durationInMinutes :: Maybe (Value Integer)
targets :: Maybe [TargetsProperty]
haddock_workaround_ :: ()
durationInMinutes :: Maybe (Value Integer)
targets :: Maybe [TargetsProperty]
..}
instance Property "Targets" StageProperty where
type PropertyType "Targets" StageProperty = [TargetsProperty]
set :: PropertyType "Targets" StageProperty
-> StageProperty -> StageProperty
set PropertyType "Targets" StageProperty
newValue StageProperty {Maybe [TargetsProperty]
Maybe (ValueList Text)
Maybe (Value Integer)
()
haddock_workaround_ :: StageProperty -> ()
durationInMinutes :: StageProperty -> Maybe (Value Integer)
rotationIds :: StageProperty -> Maybe (ValueList Text)
targets :: StageProperty -> Maybe [TargetsProperty]
haddock_workaround_ :: ()
durationInMinutes :: Maybe (Value Integer)
rotationIds :: Maybe (ValueList Text)
targets :: Maybe [TargetsProperty]
..}
= StageProperty {targets :: Maybe [TargetsProperty]
targets = [TargetsProperty] -> Maybe [TargetsProperty]
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure [TargetsProperty]
PropertyType "Targets" StageProperty
newValue, Maybe (ValueList Text)
Maybe (Value Integer)
()
haddock_workaround_ :: ()
durationInMinutes :: Maybe (Value Integer)
rotationIds :: Maybe (ValueList Text)
haddock_workaround_ :: ()
durationInMinutes :: Maybe (Value Integer)
rotationIds :: Maybe (ValueList Text)
..}