module Stratosphere.SSMIncidents.ResponsePlan.NotificationTargetItemProperty (
NotificationTargetItemProperty(..),
mkNotificationTargetItemProperty
) where
import qualified Data.Aeson as JSON
import qualified Stratosphere.Prelude as Prelude
import Stratosphere.Property
import Stratosphere.ResourceProperties
import Stratosphere.Value
data NotificationTargetItemProperty
=
NotificationTargetItemProperty {NotificationTargetItemProperty -> ()
haddock_workaround_ :: (),
NotificationTargetItemProperty -> Maybe (Value Text)
snsTopicArn :: (Prelude.Maybe (Value Prelude.Text))}
deriving stock (NotificationTargetItemProperty
-> NotificationTargetItemProperty -> Bool
(NotificationTargetItemProperty
-> NotificationTargetItemProperty -> Bool)
-> (NotificationTargetItemProperty
-> NotificationTargetItemProperty -> Bool)
-> Eq NotificationTargetItemProperty
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: NotificationTargetItemProperty
-> NotificationTargetItemProperty -> Bool
== :: NotificationTargetItemProperty
-> NotificationTargetItemProperty -> Bool
$c/= :: NotificationTargetItemProperty
-> NotificationTargetItemProperty -> Bool
/= :: NotificationTargetItemProperty
-> NotificationTargetItemProperty -> Bool
Prelude.Eq, Int -> NotificationTargetItemProperty -> ShowS
[NotificationTargetItemProperty] -> ShowS
NotificationTargetItemProperty -> String
(Int -> NotificationTargetItemProperty -> ShowS)
-> (NotificationTargetItemProperty -> String)
-> ([NotificationTargetItemProperty] -> ShowS)
-> Show NotificationTargetItemProperty
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> NotificationTargetItemProperty -> ShowS
showsPrec :: Int -> NotificationTargetItemProperty -> ShowS
$cshow :: NotificationTargetItemProperty -> String
show :: NotificationTargetItemProperty -> String
$cshowList :: [NotificationTargetItemProperty] -> ShowS
showList :: [NotificationTargetItemProperty] -> ShowS
Prelude.Show)
mkNotificationTargetItemProperty :: NotificationTargetItemProperty
mkNotificationTargetItemProperty :: NotificationTargetItemProperty
mkNotificationTargetItemProperty
= NotificationTargetItemProperty
{haddock_workaround_ :: ()
haddock_workaround_ = (), snsTopicArn :: Maybe (Value Text)
snsTopicArn = Maybe (Value Text)
forall a. Maybe a
Prelude.Nothing}
instance ToResourceProperties NotificationTargetItemProperty where
toResourceProperties :: NotificationTargetItemProperty -> ResourceProperties
toResourceProperties NotificationTargetItemProperty {Maybe (Value Text)
()
haddock_workaround_ :: NotificationTargetItemProperty -> ()
snsTopicArn :: NotificationTargetItemProperty -> Maybe (Value Text)
haddock_workaround_ :: ()
snsTopicArn :: Maybe (Value Text)
..}
= ResourceProperties
{awsType :: Text
awsType = Text
"AWS::SSMIncidents::ResponsePlan.NotificationTargetItem",
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 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
"SnsTopicArn" (Value Text -> (Key, Value))
-> Maybe (Value Text) -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe (Value Text)
snsTopicArn])}
instance JSON.ToJSON NotificationTargetItemProperty where
toJSON :: NotificationTargetItemProperty -> Value
toJSON NotificationTargetItemProperty {Maybe (Value Text)
()
haddock_workaround_ :: NotificationTargetItemProperty -> ()
snsTopicArn :: NotificationTargetItemProperty -> Maybe (Value Text)
haddock_workaround_ :: ()
snsTopicArn :: Maybe (Value Text)
..}
= [(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 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
"SnsTopicArn" (Value Text -> (Key, Value))
-> Maybe (Value Text) -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe (Value Text)
snsTopicArn]))
instance Property "SnsTopicArn" NotificationTargetItemProperty where
type PropertyType "SnsTopicArn" NotificationTargetItemProperty = Value Prelude.Text
set :: PropertyType "SnsTopicArn" NotificationTargetItemProperty
-> NotificationTargetItemProperty -> NotificationTargetItemProperty
set PropertyType "SnsTopicArn" NotificationTargetItemProperty
newValue NotificationTargetItemProperty {Maybe (Value Text)
()
haddock_workaround_ :: NotificationTargetItemProperty -> ()
snsTopicArn :: NotificationTargetItemProperty -> Maybe (Value Text)
haddock_workaround_ :: ()
snsTopicArn :: Maybe (Value Text)
..}
= NotificationTargetItemProperty
{snsTopicArn :: Maybe (Value Text)
snsTopicArn = Value Text -> Maybe (Value Text)
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType "SnsTopicArn" NotificationTargetItemProperty
Value Text
newValue, ()
haddock_workaround_ :: ()
haddock_workaround_ :: ()
..}