module Stratosphere.SSMContacts.Rotation (
module Exports, Rotation(..), mkRotation
) where
import qualified Data.Aeson as JSON
import qualified Stratosphere.Prelude as Prelude
import Stratosphere.Property
import {-# SOURCE #-} Stratosphere.SSMContacts.Rotation.RecurrenceSettingsProperty as Exports
import Stratosphere.ResourceProperties
import Stratosphere.Tag
import Stratosphere.Value
data Rotation
=
Rotation {Rotation -> ()
haddock_workaround_ :: (),
Rotation -> ValueList Text
contactIds :: (ValueList Prelude.Text),
Rotation -> Value Text
name :: (Value Prelude.Text),
Rotation -> RecurrenceSettingsProperty
recurrence :: RecurrenceSettingsProperty,
Rotation -> Value Text
startTime :: (Value Prelude.Text),
Rotation -> Maybe [Tag]
tags :: (Prelude.Maybe [Tag]),
Rotation -> Value Text
timeZoneId :: (Value Prelude.Text)}
deriving stock (Rotation -> Rotation -> Bool
(Rotation -> Rotation -> Bool)
-> (Rotation -> Rotation -> Bool) -> Eq Rotation
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: Rotation -> Rotation -> Bool
== :: Rotation -> Rotation -> Bool
$c/= :: Rotation -> Rotation -> Bool
/= :: Rotation -> Rotation -> Bool
Prelude.Eq, Int -> Rotation -> ShowS
[Rotation] -> ShowS
Rotation -> String
(Int -> Rotation -> ShowS)
-> (Rotation -> String) -> ([Rotation] -> ShowS) -> Show Rotation
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> Rotation -> ShowS
showsPrec :: Int -> Rotation -> ShowS
$cshow :: Rotation -> String
show :: Rotation -> String
$cshowList :: [Rotation] -> ShowS
showList :: [Rotation] -> ShowS
Prelude.Show)
mkRotation ::
ValueList Prelude.Text
-> Value Prelude.Text
-> RecurrenceSettingsProperty
-> Value Prelude.Text -> Value Prelude.Text -> Rotation
mkRotation :: ValueList Text
-> Value Text
-> RecurrenceSettingsProperty
-> Value Text
-> Value Text
-> Rotation
mkRotation ValueList Text
contactIds Value Text
name RecurrenceSettingsProperty
recurrence Value Text
startTime Value Text
timeZoneId
= Rotation
{haddock_workaround_ :: ()
haddock_workaround_ = (), contactIds :: ValueList Text
contactIds = ValueList Text
contactIds, name :: Value Text
name = Value Text
name,
recurrence :: RecurrenceSettingsProperty
recurrence = RecurrenceSettingsProperty
recurrence, startTime :: Value Text
startTime = Value Text
startTime,
timeZoneId :: Value Text
timeZoneId = Value Text
timeZoneId, tags :: Maybe [Tag]
tags = Maybe [Tag]
forall a. Maybe a
Prelude.Nothing}
instance ToResourceProperties Rotation where
toResourceProperties :: Rotation -> ResourceProperties
toResourceProperties Rotation {Maybe [Tag]
()
ValueList Text
Value Text
RecurrenceSettingsProperty
haddock_workaround_ :: Rotation -> ()
contactIds :: Rotation -> ValueList Text
name :: Rotation -> Value Text
recurrence :: Rotation -> RecurrenceSettingsProperty
startTime :: Rotation -> Value Text
tags :: Rotation -> Maybe [Tag]
timeZoneId :: Rotation -> Value Text
haddock_workaround_ :: ()
contactIds :: ValueList Text
name :: Value Text
recurrence :: RecurrenceSettingsProperty
startTime :: Value Text
tags :: Maybe [Tag]
timeZoneId :: Value Text
..}
= ResourceProperties
{awsType :: Text
awsType = Text
"AWS::SSMContacts::Rotation",
supportsTags :: Bool
supportsTags = Bool
Prelude.True,
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
"ContactIds" 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..= ValueList Text
contactIds, Key
"Name" 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
name,
Key
"Recurrence" Key -> RecurrenceSettingsProperty -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
JSON..= RecurrenceSettingsProperty
recurrence, Key
"StartTime" 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
startTime,
Key
"TimeZoneId" 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
timeZoneId]
([Maybe (Key, Value)] -> [(Key, Value)]
forall a. [Maybe a] -> [a]
Prelude.catMaybes [Key -> [Tag] -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"Tags" ([Tag] -> (Key, Value)) -> Maybe [Tag] -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe [Tag]
tags]))}
instance JSON.ToJSON Rotation where
toJSON :: Rotation -> Value
toJSON Rotation {Maybe [Tag]
()
ValueList Text
Value Text
RecurrenceSettingsProperty
haddock_workaround_ :: Rotation -> ()
contactIds :: Rotation -> ValueList Text
name :: Rotation -> Value Text
recurrence :: Rotation -> RecurrenceSettingsProperty
startTime :: Rotation -> Value Text
tags :: Rotation -> Maybe [Tag]
timeZoneId :: Rotation -> Value Text
haddock_workaround_ :: ()
contactIds :: ValueList Text
name :: Value Text
recurrence :: RecurrenceSettingsProperty
startTime :: Value Text
tags :: Maybe [Tag]
timeZoneId :: Value Text
..}
= [(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
"ContactIds" 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..= ValueList Text
contactIds, Key
"Name" 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
name,
Key
"Recurrence" Key -> RecurrenceSettingsProperty -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
JSON..= RecurrenceSettingsProperty
recurrence, Key
"StartTime" 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
startTime,
Key
"TimeZoneId" 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
timeZoneId]
([Maybe (Key, Value)] -> [(Key, Value)]
forall a. [Maybe a] -> [a]
Prelude.catMaybes [Key -> [Tag] -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"Tags" ([Tag] -> (Key, Value)) -> Maybe [Tag] -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe [Tag]
tags])))
instance Property "ContactIds" Rotation where
type PropertyType "ContactIds" Rotation = ValueList Prelude.Text
set :: PropertyType "ContactIds" Rotation -> Rotation -> Rotation
set PropertyType "ContactIds" Rotation
newValue Rotation {Maybe [Tag]
()
ValueList Text
Value Text
RecurrenceSettingsProperty
haddock_workaround_ :: Rotation -> ()
contactIds :: Rotation -> ValueList Text
name :: Rotation -> Value Text
recurrence :: Rotation -> RecurrenceSettingsProperty
startTime :: Rotation -> Value Text
tags :: Rotation -> Maybe [Tag]
timeZoneId :: Rotation -> Value Text
haddock_workaround_ :: ()
contactIds :: ValueList Text
name :: Value Text
recurrence :: RecurrenceSettingsProperty
startTime :: Value Text
tags :: Maybe [Tag]
timeZoneId :: Value Text
..} = Rotation {contactIds :: ValueList Text
contactIds = PropertyType "ContactIds" Rotation
ValueList Text
newValue, Maybe [Tag]
()
Value Text
RecurrenceSettingsProperty
haddock_workaround_ :: ()
name :: Value Text
recurrence :: RecurrenceSettingsProperty
startTime :: Value Text
tags :: Maybe [Tag]
timeZoneId :: Value Text
haddock_workaround_ :: ()
name :: Value Text
recurrence :: RecurrenceSettingsProperty
startTime :: Value Text
tags :: Maybe [Tag]
timeZoneId :: Value Text
..}
instance Property "Name" Rotation where
type PropertyType "Name" Rotation = Value Prelude.Text
set :: PropertyType "Name" Rotation -> Rotation -> Rotation
set PropertyType "Name" Rotation
newValue Rotation {Maybe [Tag]
()
ValueList Text
Value Text
RecurrenceSettingsProperty
haddock_workaround_ :: Rotation -> ()
contactIds :: Rotation -> ValueList Text
name :: Rotation -> Value Text
recurrence :: Rotation -> RecurrenceSettingsProperty
startTime :: Rotation -> Value Text
tags :: Rotation -> Maybe [Tag]
timeZoneId :: Rotation -> Value Text
haddock_workaround_ :: ()
contactIds :: ValueList Text
name :: Value Text
recurrence :: RecurrenceSettingsProperty
startTime :: Value Text
tags :: Maybe [Tag]
timeZoneId :: Value Text
..} = Rotation {name :: Value Text
name = PropertyType "Name" Rotation
Value Text
newValue, Maybe [Tag]
()
ValueList Text
Value Text
RecurrenceSettingsProperty
haddock_workaround_ :: ()
contactIds :: ValueList Text
recurrence :: RecurrenceSettingsProperty
startTime :: Value Text
tags :: Maybe [Tag]
timeZoneId :: Value Text
haddock_workaround_ :: ()
contactIds :: ValueList Text
recurrence :: RecurrenceSettingsProperty
startTime :: Value Text
tags :: Maybe [Tag]
timeZoneId :: Value Text
..}
instance Property "Recurrence" Rotation where
type PropertyType "Recurrence" Rotation = RecurrenceSettingsProperty
set :: PropertyType "Recurrence" Rotation -> Rotation -> Rotation
set PropertyType "Recurrence" Rotation
newValue Rotation {Maybe [Tag]
()
ValueList Text
Value Text
RecurrenceSettingsProperty
haddock_workaround_ :: Rotation -> ()
contactIds :: Rotation -> ValueList Text
name :: Rotation -> Value Text
recurrence :: Rotation -> RecurrenceSettingsProperty
startTime :: Rotation -> Value Text
tags :: Rotation -> Maybe [Tag]
timeZoneId :: Rotation -> Value Text
haddock_workaround_ :: ()
contactIds :: ValueList Text
name :: Value Text
recurrence :: RecurrenceSettingsProperty
startTime :: Value Text
tags :: Maybe [Tag]
timeZoneId :: Value Text
..} = Rotation {recurrence :: RecurrenceSettingsProperty
recurrence = PropertyType "Recurrence" Rotation
RecurrenceSettingsProperty
newValue, Maybe [Tag]
()
ValueList Text
Value Text
haddock_workaround_ :: ()
contactIds :: ValueList Text
name :: Value Text
startTime :: Value Text
tags :: Maybe [Tag]
timeZoneId :: Value Text
haddock_workaround_ :: ()
contactIds :: ValueList Text
name :: Value Text
startTime :: Value Text
tags :: Maybe [Tag]
timeZoneId :: Value Text
..}
instance Property "StartTime" Rotation where
type PropertyType "StartTime" Rotation = Value Prelude.Text
set :: PropertyType "StartTime" Rotation -> Rotation -> Rotation
set PropertyType "StartTime" Rotation
newValue Rotation {Maybe [Tag]
()
ValueList Text
Value Text
RecurrenceSettingsProperty
haddock_workaround_ :: Rotation -> ()
contactIds :: Rotation -> ValueList Text
name :: Rotation -> Value Text
recurrence :: Rotation -> RecurrenceSettingsProperty
startTime :: Rotation -> Value Text
tags :: Rotation -> Maybe [Tag]
timeZoneId :: Rotation -> Value Text
haddock_workaround_ :: ()
contactIds :: ValueList Text
name :: Value Text
recurrence :: RecurrenceSettingsProperty
startTime :: Value Text
tags :: Maybe [Tag]
timeZoneId :: Value Text
..} = Rotation {startTime :: Value Text
startTime = PropertyType "StartTime" Rotation
Value Text
newValue, Maybe [Tag]
()
ValueList Text
Value Text
RecurrenceSettingsProperty
haddock_workaround_ :: ()
contactIds :: ValueList Text
name :: Value Text
recurrence :: RecurrenceSettingsProperty
tags :: Maybe [Tag]
timeZoneId :: Value Text
haddock_workaround_ :: ()
contactIds :: ValueList Text
name :: Value Text
recurrence :: RecurrenceSettingsProperty
tags :: Maybe [Tag]
timeZoneId :: Value Text
..}
instance Property "Tags" Rotation where
type PropertyType "Tags" Rotation = [Tag]
set :: PropertyType "Tags" Rotation -> Rotation -> Rotation
set PropertyType "Tags" Rotation
newValue Rotation {Maybe [Tag]
()
ValueList Text
Value Text
RecurrenceSettingsProperty
haddock_workaround_ :: Rotation -> ()
contactIds :: Rotation -> ValueList Text
name :: Rotation -> Value Text
recurrence :: Rotation -> RecurrenceSettingsProperty
startTime :: Rotation -> Value Text
tags :: Rotation -> Maybe [Tag]
timeZoneId :: Rotation -> Value Text
haddock_workaround_ :: ()
contactIds :: ValueList Text
name :: Value Text
recurrence :: RecurrenceSettingsProperty
startTime :: Value Text
tags :: Maybe [Tag]
timeZoneId :: Value Text
..}
= Rotation {tags :: Maybe [Tag]
tags = [Tag] -> Maybe [Tag]
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure [Tag]
PropertyType "Tags" Rotation
newValue, ()
ValueList Text
Value Text
RecurrenceSettingsProperty
haddock_workaround_ :: ()
contactIds :: ValueList Text
name :: Value Text
recurrence :: RecurrenceSettingsProperty
startTime :: Value Text
timeZoneId :: Value Text
haddock_workaround_ :: ()
contactIds :: ValueList Text
name :: Value Text
recurrence :: RecurrenceSettingsProperty
startTime :: Value Text
timeZoneId :: Value Text
..}
instance Property "TimeZoneId" Rotation where
type PropertyType "TimeZoneId" Rotation = Value Prelude.Text
set :: PropertyType "TimeZoneId" Rotation -> Rotation -> Rotation
set PropertyType "TimeZoneId" Rotation
newValue Rotation {Maybe [Tag]
()
ValueList Text
Value Text
RecurrenceSettingsProperty
haddock_workaround_ :: Rotation -> ()
contactIds :: Rotation -> ValueList Text
name :: Rotation -> Value Text
recurrence :: Rotation -> RecurrenceSettingsProperty
startTime :: Rotation -> Value Text
tags :: Rotation -> Maybe [Tag]
timeZoneId :: Rotation -> Value Text
haddock_workaround_ :: ()
contactIds :: ValueList Text
name :: Value Text
recurrence :: RecurrenceSettingsProperty
startTime :: Value Text
tags :: Maybe [Tag]
timeZoneId :: Value Text
..} = Rotation {timeZoneId :: Value Text
timeZoneId = PropertyType "TimeZoneId" Rotation
Value Text
newValue, Maybe [Tag]
()
ValueList Text
Value Text
RecurrenceSettingsProperty
haddock_workaround_ :: ()
contactIds :: ValueList Text
name :: Value Text
recurrence :: RecurrenceSettingsProperty
startTime :: Value Text
tags :: Maybe [Tag]
haddock_workaround_ :: ()
contactIds :: ValueList Text
name :: Value Text
recurrence :: RecurrenceSettingsProperty
startTime :: Value Text
tags :: Maybe [Tag]
..}