module Stratosphere.SSMContacts.Plan (
module Exports, Plan(..), mkPlan
) where
import qualified Data.Aeson as JSON
import qualified Stratosphere.Prelude as Prelude
import Stratosphere.Property
import {-# SOURCE #-} Stratosphere.SSMContacts.Plan.StageProperty as Exports
import Stratosphere.ResourceProperties
import Stratosphere.Value
data Plan
=
Plan {Plan -> ()
haddock_workaround_ :: (),
Plan -> Value Text
contactId :: (Value Prelude.Text),
Plan -> Maybe (ValueList Text)
rotationIds :: (Prelude.Maybe (ValueList Prelude.Text)),
Plan -> Maybe [StageProperty]
stages :: (Prelude.Maybe [StageProperty])}
deriving stock (Plan -> Plan -> Bool
(Plan -> Plan -> Bool) -> (Plan -> Plan -> Bool) -> Eq Plan
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: Plan -> Plan -> Bool
== :: Plan -> Plan -> Bool
$c/= :: Plan -> Plan -> Bool
/= :: Plan -> Plan -> Bool
Prelude.Eq, Int -> Plan -> ShowS
[Plan] -> ShowS
Plan -> String
(Int -> Plan -> ShowS)
-> (Plan -> String) -> ([Plan] -> ShowS) -> Show Plan
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> Plan -> ShowS
showsPrec :: Int -> Plan -> ShowS
$cshow :: Plan -> String
show :: Plan -> String
$cshowList :: [Plan] -> ShowS
showList :: [Plan] -> ShowS
Prelude.Show)
mkPlan :: Value Prelude.Text -> Plan
mkPlan :: Value Text -> Plan
mkPlan Value Text
contactId
= Plan
{haddock_workaround_ :: ()
haddock_workaround_ = (), contactId :: Value Text
contactId = Value Text
contactId,
rotationIds :: Maybe (ValueList Text)
rotationIds = Maybe (ValueList Text)
forall a. Maybe a
Prelude.Nothing, stages :: Maybe [StageProperty]
stages = Maybe [StageProperty]
forall a. Maybe a
Prelude.Nothing}
instance ToResourceProperties Plan where
toResourceProperties :: Plan -> ResourceProperties
toResourceProperties Plan {Maybe [StageProperty]
Maybe (ValueList Text)
()
Value Text
haddock_workaround_ :: Plan -> ()
contactId :: Plan -> Value Text
rotationIds :: Plan -> Maybe (ValueList Text)
stages :: Plan -> Maybe [StageProperty]
haddock_workaround_ :: ()
contactId :: Value Text
rotationIds :: Maybe (ValueList Text)
stages :: Maybe [StageProperty]
..}
= ResourceProperties
{awsType :: Text
awsType = Text
"AWS::SSMContacts::Plan", supportsTags :: Bool
supportsTags = Bool
Prelude.False,
properties :: Object
properties = [Item Object] -> Object
forall l. IsList l => [Item l] -> l
Prelude.fromList
([(Key, Value)] -> [(Key, Value)] -> [(Key, Value)]
forall a. Semigroup a => a -> a -> a
(Prelude.<>)
[Key
"ContactId" Key -> Value Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
JSON..= Value Text
contactId]
([Maybe (Key, Value)] -> [(Key, Value)]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
[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 -> [StageProperty] -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"Stages" ([StageProperty] -> (Key, Value))
-> Maybe [StageProperty] -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe [StageProperty]
stages]))}
instance JSON.ToJSON Plan where
toJSON :: Plan -> Value
toJSON Plan {Maybe [StageProperty]
Maybe (ValueList Text)
()
Value Text
haddock_workaround_ :: Plan -> ()
contactId :: Plan -> Value Text
rotationIds :: Plan -> Maybe (ValueList Text)
stages :: Plan -> Maybe [StageProperty]
haddock_workaround_ :: ()
contactId :: Value Text
rotationIds :: Maybe (ValueList Text)
stages :: Maybe [StageProperty]
..}
= [(Key, Value)] -> Value
JSON.object
([Item [(Key, Value)]] -> [(Key, Value)]
forall l. IsList l => [Item l] -> l
Prelude.fromList
([(Key, Value)] -> [(Key, Value)] -> [(Key, Value)]
forall a. Semigroup a => a -> a -> a
(Prelude.<>)
[Key
"ContactId" Key -> Value Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
JSON..= Value Text
contactId]
([Maybe (Key, Value)] -> [(Key, Value)]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
[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 -> [StageProperty] -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"Stages" ([StageProperty] -> (Key, Value))
-> Maybe [StageProperty] -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe [StageProperty]
stages])))
instance Property "ContactId" Plan where
type PropertyType "ContactId" Plan = Value Prelude.Text
set :: PropertyType "ContactId" Plan -> Plan -> Plan
set PropertyType "ContactId" Plan
newValue Plan {Maybe [StageProperty]
Maybe (ValueList Text)
()
Value Text
haddock_workaround_ :: Plan -> ()
contactId :: Plan -> Value Text
rotationIds :: Plan -> Maybe (ValueList Text)
stages :: Plan -> Maybe [StageProperty]
haddock_workaround_ :: ()
contactId :: Value Text
rotationIds :: Maybe (ValueList Text)
stages :: Maybe [StageProperty]
..} = Plan {contactId :: Value Text
contactId = PropertyType "ContactId" Plan
Value Text
newValue, Maybe [StageProperty]
Maybe (ValueList Text)
()
haddock_workaround_ :: ()
rotationIds :: Maybe (ValueList Text)
stages :: Maybe [StageProperty]
haddock_workaround_ :: ()
rotationIds :: Maybe (ValueList Text)
stages :: Maybe [StageProperty]
..}
instance Property "RotationIds" Plan where
type PropertyType "RotationIds" Plan = ValueList Prelude.Text
set :: PropertyType "RotationIds" Plan -> Plan -> Plan
set PropertyType "RotationIds" Plan
newValue Plan {Maybe [StageProperty]
Maybe (ValueList Text)
()
Value Text
haddock_workaround_ :: Plan -> ()
contactId :: Plan -> Value Text
rotationIds :: Plan -> Maybe (ValueList Text)
stages :: Plan -> Maybe [StageProperty]
haddock_workaround_ :: ()
contactId :: Value Text
rotationIds :: Maybe (ValueList Text)
stages :: Maybe [StageProperty]
..}
= Plan {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" Plan
ValueList Text
newValue, Maybe [StageProperty]
()
Value Text
haddock_workaround_ :: ()
contactId :: Value Text
stages :: Maybe [StageProperty]
haddock_workaround_ :: ()
contactId :: Value Text
stages :: Maybe [StageProperty]
..}
instance Property "Stages" Plan where
type PropertyType "Stages" Plan = [StageProperty]
set :: PropertyType "Stages" Plan -> Plan -> Plan
set PropertyType "Stages" Plan
newValue Plan {Maybe [StageProperty]
Maybe (ValueList Text)
()
Value Text
haddock_workaround_ :: Plan -> ()
contactId :: Plan -> Value Text
rotationIds :: Plan -> Maybe (ValueList Text)
stages :: Plan -> Maybe [StageProperty]
haddock_workaround_ :: ()
contactId :: Value Text
rotationIds :: Maybe (ValueList Text)
stages :: Maybe [StageProperty]
..} = Plan {stages :: Maybe [StageProperty]
stages = [StageProperty] -> Maybe [StageProperty]
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure [StageProperty]
PropertyType "Stages" Plan
newValue, Maybe (ValueList Text)
()
Value Text
haddock_workaround_ :: ()
contactId :: Value Text
rotationIds :: Maybe (ValueList Text)
haddock_workaround_ :: ()
contactId :: Value Text
rotationIds :: Maybe (ValueList Text)
..}