module Stratosphere.SSMContacts.ContactChannel (
ContactChannel(..), mkContactChannel
) where
import qualified Data.Aeson as JSON
import qualified Stratosphere.Prelude as Prelude
import Stratosphere.Property
import Stratosphere.ResourceProperties
import Stratosphere.Value
data ContactChannel
=
ContactChannel {ContactChannel -> ()
haddock_workaround_ :: (),
ContactChannel -> Value Text
channelAddress :: (Value Prelude.Text),
ContactChannel -> Value Text
channelName :: (Value Prelude.Text),
ContactChannel -> Value Text
channelType :: (Value Prelude.Text),
ContactChannel -> Value Text
contactId :: (Value Prelude.Text),
ContactChannel -> Maybe (Value Bool)
deferActivation :: (Prelude.Maybe (Value Prelude.Bool))}
deriving stock (ContactChannel -> ContactChannel -> Bool
(ContactChannel -> ContactChannel -> Bool)
-> (ContactChannel -> ContactChannel -> Bool) -> Eq ContactChannel
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: ContactChannel -> ContactChannel -> Bool
== :: ContactChannel -> ContactChannel -> Bool
$c/= :: ContactChannel -> ContactChannel -> Bool
/= :: ContactChannel -> ContactChannel -> Bool
Prelude.Eq, Int -> ContactChannel -> ShowS
[ContactChannel] -> ShowS
ContactChannel -> String
(Int -> ContactChannel -> ShowS)
-> (ContactChannel -> String)
-> ([ContactChannel] -> ShowS)
-> Show ContactChannel
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> ContactChannel -> ShowS
showsPrec :: Int -> ContactChannel -> ShowS
$cshow :: ContactChannel -> String
show :: ContactChannel -> String
$cshowList :: [ContactChannel] -> ShowS
showList :: [ContactChannel] -> ShowS
Prelude.Show)
mkContactChannel ::
Value Prelude.Text
-> Value Prelude.Text
-> Value Prelude.Text -> Value Prelude.Text -> ContactChannel
mkContactChannel :: Value Text
-> Value Text -> Value Text -> Value Text -> ContactChannel
mkContactChannel Value Text
channelAddress Value Text
channelName Value Text
channelType Value Text
contactId
= ContactChannel
{haddock_workaround_ :: ()
haddock_workaround_ = (), channelAddress :: Value Text
channelAddress = Value Text
channelAddress,
channelName :: Value Text
channelName = Value Text
channelName, channelType :: Value Text
channelType = Value Text
channelType,
contactId :: Value Text
contactId = Value Text
contactId, deferActivation :: Maybe (Value Bool)
deferActivation = Maybe (Value Bool)
forall a. Maybe a
Prelude.Nothing}
instance ToResourceProperties ContactChannel where
toResourceProperties :: ContactChannel -> ResourceProperties
toResourceProperties ContactChannel {Maybe (Value Bool)
()
Value Text
haddock_workaround_ :: ContactChannel -> ()
channelAddress :: ContactChannel -> Value Text
channelName :: ContactChannel -> Value Text
channelType :: ContactChannel -> Value Text
contactId :: ContactChannel -> Value Text
deferActivation :: ContactChannel -> Maybe (Value Bool)
haddock_workaround_ :: ()
channelAddress :: Value Text
channelName :: Value Text
channelType :: Value Text
contactId :: Value Text
deferActivation :: Maybe (Value Bool)
..}
= ResourceProperties
{awsType :: Text
awsType = Text
"AWS::SSMContacts::ContactChannel",
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
"ChannelAddress" 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
channelAddress,
Key
"ChannelName" 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
channelName,
Key
"ChannelType" 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
channelType, 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 -> Value Bool -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"DeferActivation" (Value Bool -> (Key, Value))
-> Maybe (Value Bool) -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe (Value Bool)
deferActivation]))}
instance JSON.ToJSON ContactChannel where
toJSON :: ContactChannel -> Value
toJSON ContactChannel {Maybe (Value Bool)
()
Value Text
haddock_workaround_ :: ContactChannel -> ()
channelAddress :: ContactChannel -> Value Text
channelName :: ContactChannel -> Value Text
channelType :: ContactChannel -> Value Text
contactId :: ContactChannel -> Value Text
deferActivation :: ContactChannel -> Maybe (Value Bool)
haddock_workaround_ :: ()
channelAddress :: Value Text
channelName :: Value Text
channelType :: Value Text
contactId :: Value Text
deferActivation :: Maybe (Value Bool)
..}
= [(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
"ChannelAddress" 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
channelAddress,
Key
"ChannelName" 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
channelName,
Key
"ChannelType" 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
channelType, 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 -> Value Bool -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"DeferActivation" (Value Bool -> (Key, Value))
-> Maybe (Value Bool) -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe (Value Bool)
deferActivation])))
instance Property "ChannelAddress" ContactChannel where
type PropertyType "ChannelAddress" ContactChannel = Value Prelude.Text
set :: PropertyType "ChannelAddress" ContactChannel
-> ContactChannel -> ContactChannel
set PropertyType "ChannelAddress" ContactChannel
newValue ContactChannel {Maybe (Value Bool)
()
Value Text
haddock_workaround_ :: ContactChannel -> ()
channelAddress :: ContactChannel -> Value Text
channelName :: ContactChannel -> Value Text
channelType :: ContactChannel -> Value Text
contactId :: ContactChannel -> Value Text
deferActivation :: ContactChannel -> Maybe (Value Bool)
haddock_workaround_ :: ()
channelAddress :: Value Text
channelName :: Value Text
channelType :: Value Text
contactId :: Value Text
deferActivation :: Maybe (Value Bool)
..}
= ContactChannel {channelAddress :: Value Text
channelAddress = PropertyType "ChannelAddress" ContactChannel
Value Text
newValue, Maybe (Value Bool)
()
Value Text
haddock_workaround_ :: ()
channelName :: Value Text
channelType :: Value Text
contactId :: Value Text
deferActivation :: Maybe (Value Bool)
haddock_workaround_ :: ()
channelName :: Value Text
channelType :: Value Text
contactId :: Value Text
deferActivation :: Maybe (Value Bool)
..}
instance Property "ChannelName" ContactChannel where
type PropertyType "ChannelName" ContactChannel = Value Prelude.Text
set :: PropertyType "ChannelName" ContactChannel
-> ContactChannel -> ContactChannel
set PropertyType "ChannelName" ContactChannel
newValue ContactChannel {Maybe (Value Bool)
()
Value Text
haddock_workaround_ :: ContactChannel -> ()
channelAddress :: ContactChannel -> Value Text
channelName :: ContactChannel -> Value Text
channelType :: ContactChannel -> Value Text
contactId :: ContactChannel -> Value Text
deferActivation :: ContactChannel -> Maybe (Value Bool)
haddock_workaround_ :: ()
channelAddress :: Value Text
channelName :: Value Text
channelType :: Value Text
contactId :: Value Text
deferActivation :: Maybe (Value Bool)
..}
= ContactChannel {channelName :: Value Text
channelName = PropertyType "ChannelName" ContactChannel
Value Text
newValue, Maybe (Value Bool)
()
Value Text
haddock_workaround_ :: ()
channelAddress :: Value Text
channelType :: Value Text
contactId :: Value Text
deferActivation :: Maybe (Value Bool)
haddock_workaround_ :: ()
channelAddress :: Value Text
channelType :: Value Text
contactId :: Value Text
deferActivation :: Maybe (Value Bool)
..}
instance Property "ChannelType" ContactChannel where
type PropertyType "ChannelType" ContactChannel = Value Prelude.Text
set :: PropertyType "ChannelType" ContactChannel
-> ContactChannel -> ContactChannel
set PropertyType "ChannelType" ContactChannel
newValue ContactChannel {Maybe (Value Bool)
()
Value Text
haddock_workaround_ :: ContactChannel -> ()
channelAddress :: ContactChannel -> Value Text
channelName :: ContactChannel -> Value Text
channelType :: ContactChannel -> Value Text
contactId :: ContactChannel -> Value Text
deferActivation :: ContactChannel -> Maybe (Value Bool)
haddock_workaround_ :: ()
channelAddress :: Value Text
channelName :: Value Text
channelType :: Value Text
contactId :: Value Text
deferActivation :: Maybe (Value Bool)
..}
= ContactChannel {channelType :: Value Text
channelType = PropertyType "ChannelType" ContactChannel
Value Text
newValue, Maybe (Value Bool)
()
Value Text
haddock_workaround_ :: ()
channelAddress :: Value Text
channelName :: Value Text
contactId :: Value Text
deferActivation :: Maybe (Value Bool)
haddock_workaround_ :: ()
channelAddress :: Value Text
channelName :: Value Text
contactId :: Value Text
deferActivation :: Maybe (Value Bool)
..}
instance Property "ContactId" ContactChannel where
type PropertyType "ContactId" ContactChannel = Value Prelude.Text
set :: PropertyType "ContactId" ContactChannel
-> ContactChannel -> ContactChannel
set PropertyType "ContactId" ContactChannel
newValue ContactChannel {Maybe (Value Bool)
()
Value Text
haddock_workaround_ :: ContactChannel -> ()
channelAddress :: ContactChannel -> Value Text
channelName :: ContactChannel -> Value Text
channelType :: ContactChannel -> Value Text
contactId :: ContactChannel -> Value Text
deferActivation :: ContactChannel -> Maybe (Value Bool)
haddock_workaround_ :: ()
channelAddress :: Value Text
channelName :: Value Text
channelType :: Value Text
contactId :: Value Text
deferActivation :: Maybe (Value Bool)
..}
= ContactChannel {contactId :: Value Text
contactId = PropertyType "ContactId" ContactChannel
Value Text
newValue, Maybe (Value Bool)
()
Value Text
haddock_workaround_ :: ()
channelAddress :: Value Text
channelName :: Value Text
channelType :: Value Text
deferActivation :: Maybe (Value Bool)
haddock_workaround_ :: ()
channelAddress :: Value Text
channelName :: Value Text
channelType :: Value Text
deferActivation :: Maybe (Value Bool)
..}
instance Property "DeferActivation" ContactChannel where
type PropertyType "DeferActivation" ContactChannel = Value Prelude.Bool
set :: PropertyType "DeferActivation" ContactChannel
-> ContactChannel -> ContactChannel
set PropertyType "DeferActivation" ContactChannel
newValue ContactChannel {Maybe (Value Bool)
()
Value Text
haddock_workaround_ :: ContactChannel -> ()
channelAddress :: ContactChannel -> Value Text
channelName :: ContactChannel -> Value Text
channelType :: ContactChannel -> Value Text
contactId :: ContactChannel -> Value Text
deferActivation :: ContactChannel -> Maybe (Value Bool)
haddock_workaround_ :: ()
channelAddress :: Value Text
channelName :: Value Text
channelType :: Value Text
contactId :: Value Text
deferActivation :: Maybe (Value Bool)
..}
= ContactChannel {deferActivation :: Maybe (Value Bool)
deferActivation = Value Bool -> Maybe (Value Bool)
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType "DeferActivation" ContactChannel
Value Bool
newValue, ()
Value Text
haddock_workaround_ :: ()
channelAddress :: Value Text
channelName :: Value Text
channelType :: Value Text
contactId :: Value Text
haddock_workaround_ :: ()
channelAddress :: Value Text
channelName :: Value Text
channelType :: Value Text
contactId :: Value Text
..}