module Stratosphere.Connect.Rule.SendNotificationActionProperty (
module Exports, SendNotificationActionProperty(..),
mkSendNotificationActionProperty
) where
import qualified Data.Aeson as JSON
import qualified Stratosphere.Prelude as Prelude
import Stratosphere.Property
import {-# SOURCE #-} Stratosphere.Connect.Rule.NotificationRecipientTypeProperty as Exports
import Stratosphere.ResourceProperties
import Stratosphere.Value
data SendNotificationActionProperty
=
SendNotificationActionProperty {SendNotificationActionProperty -> ()
haddock_workaround_ :: (),
SendNotificationActionProperty -> Value Text
content :: (Value Prelude.Text),
SendNotificationActionProperty -> Value Text
contentType :: (Value Prelude.Text),
SendNotificationActionProperty -> Value Text
deliveryMethod :: (Value Prelude.Text),
SendNotificationActionProperty -> NotificationRecipientTypeProperty
recipient :: NotificationRecipientTypeProperty,
SendNotificationActionProperty -> Maybe (Value Text)
subject :: (Prelude.Maybe (Value Prelude.Text))}
deriving stock (SendNotificationActionProperty
-> SendNotificationActionProperty -> Bool
(SendNotificationActionProperty
-> SendNotificationActionProperty -> Bool)
-> (SendNotificationActionProperty
-> SendNotificationActionProperty -> Bool)
-> Eq SendNotificationActionProperty
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: SendNotificationActionProperty
-> SendNotificationActionProperty -> Bool
== :: SendNotificationActionProperty
-> SendNotificationActionProperty -> Bool
$c/= :: SendNotificationActionProperty
-> SendNotificationActionProperty -> Bool
/= :: SendNotificationActionProperty
-> SendNotificationActionProperty -> Bool
Prelude.Eq, Int -> SendNotificationActionProperty -> ShowS
[SendNotificationActionProperty] -> ShowS
SendNotificationActionProperty -> String
(Int -> SendNotificationActionProperty -> ShowS)
-> (SendNotificationActionProperty -> String)
-> ([SendNotificationActionProperty] -> ShowS)
-> Show SendNotificationActionProperty
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> SendNotificationActionProperty -> ShowS
showsPrec :: Int -> SendNotificationActionProperty -> ShowS
$cshow :: SendNotificationActionProperty -> String
show :: SendNotificationActionProperty -> String
$cshowList :: [SendNotificationActionProperty] -> ShowS
showList :: [SendNotificationActionProperty] -> ShowS
Prelude.Show)
mkSendNotificationActionProperty ::
Value Prelude.Text
-> Value Prelude.Text
-> Value Prelude.Text
-> NotificationRecipientTypeProperty
-> SendNotificationActionProperty
mkSendNotificationActionProperty :: Value Text
-> Value Text
-> Value Text
-> NotificationRecipientTypeProperty
-> SendNotificationActionProperty
mkSendNotificationActionProperty
Value Text
content
Value Text
contentType
Value Text
deliveryMethod
NotificationRecipientTypeProperty
recipient
= SendNotificationActionProperty
{haddock_workaround_ :: ()
haddock_workaround_ = (), content :: Value Text
content = Value Text
content,
contentType :: Value Text
contentType = Value Text
contentType, deliveryMethod :: Value Text
deliveryMethod = Value Text
deliveryMethod,
recipient :: NotificationRecipientTypeProperty
recipient = NotificationRecipientTypeProperty
recipient, subject :: Maybe (Value Text)
subject = Maybe (Value Text)
forall a. Maybe a
Prelude.Nothing}
instance ToResourceProperties SendNotificationActionProperty where
toResourceProperties :: SendNotificationActionProperty -> ResourceProperties
toResourceProperties SendNotificationActionProperty {Maybe (Value Text)
()
Value Text
NotificationRecipientTypeProperty
haddock_workaround_ :: SendNotificationActionProperty -> ()
content :: SendNotificationActionProperty -> Value Text
contentType :: SendNotificationActionProperty -> Value Text
deliveryMethod :: SendNotificationActionProperty -> Value Text
recipient :: SendNotificationActionProperty -> NotificationRecipientTypeProperty
subject :: SendNotificationActionProperty -> Maybe (Value Text)
haddock_workaround_ :: ()
content :: Value Text
contentType :: Value Text
deliveryMethod :: Value Text
recipient :: NotificationRecipientTypeProperty
subject :: Maybe (Value Text)
..}
= ResourceProperties
{awsType :: Text
awsType = Text
"AWS::Connect::Rule.SendNotificationAction",
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
"Content" 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
content, Key
"ContentType" 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
contentType,
Key
"DeliveryMethod" 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
deliveryMethod,
Key
"Recipient" Key -> NotificationRecipientTypeProperty -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
JSON..= NotificationRecipientTypeProperty
recipient]
([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
"Subject" (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)
subject]))}
instance JSON.ToJSON SendNotificationActionProperty where
toJSON :: SendNotificationActionProperty -> Value
toJSON SendNotificationActionProperty {Maybe (Value Text)
()
Value Text
NotificationRecipientTypeProperty
haddock_workaround_ :: SendNotificationActionProperty -> ()
content :: SendNotificationActionProperty -> Value Text
contentType :: SendNotificationActionProperty -> Value Text
deliveryMethod :: SendNotificationActionProperty -> Value Text
recipient :: SendNotificationActionProperty -> NotificationRecipientTypeProperty
subject :: SendNotificationActionProperty -> Maybe (Value Text)
haddock_workaround_ :: ()
content :: Value Text
contentType :: Value Text
deliveryMethod :: Value Text
recipient :: NotificationRecipientTypeProperty
subject :: Maybe (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
"Content" 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
content, Key
"ContentType" 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
contentType,
Key
"DeliveryMethod" 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
deliveryMethod,
Key
"Recipient" Key -> NotificationRecipientTypeProperty -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
JSON..= NotificationRecipientTypeProperty
recipient]
([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
"Subject" (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)
subject])))
instance Property "Content" SendNotificationActionProperty where
type PropertyType "Content" SendNotificationActionProperty = Value Prelude.Text
set :: PropertyType "Content" SendNotificationActionProperty
-> SendNotificationActionProperty -> SendNotificationActionProperty
set PropertyType "Content" SendNotificationActionProperty
newValue SendNotificationActionProperty {Maybe (Value Text)
()
Value Text
NotificationRecipientTypeProperty
haddock_workaround_ :: SendNotificationActionProperty -> ()
content :: SendNotificationActionProperty -> Value Text
contentType :: SendNotificationActionProperty -> Value Text
deliveryMethod :: SendNotificationActionProperty -> Value Text
recipient :: SendNotificationActionProperty -> NotificationRecipientTypeProperty
subject :: SendNotificationActionProperty -> Maybe (Value Text)
haddock_workaround_ :: ()
content :: Value Text
contentType :: Value Text
deliveryMethod :: Value Text
recipient :: NotificationRecipientTypeProperty
subject :: Maybe (Value Text)
..}
= SendNotificationActionProperty {content :: Value Text
content = PropertyType "Content" SendNotificationActionProperty
Value Text
newValue, Maybe (Value Text)
()
Value Text
NotificationRecipientTypeProperty
haddock_workaround_ :: ()
contentType :: Value Text
deliveryMethod :: Value Text
recipient :: NotificationRecipientTypeProperty
subject :: Maybe (Value Text)
haddock_workaround_ :: ()
contentType :: Value Text
deliveryMethod :: Value Text
recipient :: NotificationRecipientTypeProperty
subject :: Maybe (Value Text)
..}
instance Property "ContentType" SendNotificationActionProperty where
type PropertyType "ContentType" SendNotificationActionProperty = Value Prelude.Text
set :: PropertyType "ContentType" SendNotificationActionProperty
-> SendNotificationActionProperty -> SendNotificationActionProperty
set PropertyType "ContentType" SendNotificationActionProperty
newValue SendNotificationActionProperty {Maybe (Value Text)
()
Value Text
NotificationRecipientTypeProperty
haddock_workaround_ :: SendNotificationActionProperty -> ()
content :: SendNotificationActionProperty -> Value Text
contentType :: SendNotificationActionProperty -> Value Text
deliveryMethod :: SendNotificationActionProperty -> Value Text
recipient :: SendNotificationActionProperty -> NotificationRecipientTypeProperty
subject :: SendNotificationActionProperty -> Maybe (Value Text)
haddock_workaround_ :: ()
content :: Value Text
contentType :: Value Text
deliveryMethod :: Value Text
recipient :: NotificationRecipientTypeProperty
subject :: Maybe (Value Text)
..}
= SendNotificationActionProperty {contentType :: Value Text
contentType = PropertyType "ContentType" SendNotificationActionProperty
Value Text
newValue, Maybe (Value Text)
()
Value Text
NotificationRecipientTypeProperty
haddock_workaround_ :: ()
content :: Value Text
deliveryMethod :: Value Text
recipient :: NotificationRecipientTypeProperty
subject :: Maybe (Value Text)
haddock_workaround_ :: ()
content :: Value Text
deliveryMethod :: Value Text
recipient :: NotificationRecipientTypeProperty
subject :: Maybe (Value Text)
..}
instance Property "DeliveryMethod" SendNotificationActionProperty where
type PropertyType "DeliveryMethod" SendNotificationActionProperty = Value Prelude.Text
set :: PropertyType "DeliveryMethod" SendNotificationActionProperty
-> SendNotificationActionProperty -> SendNotificationActionProperty
set PropertyType "DeliveryMethod" SendNotificationActionProperty
newValue SendNotificationActionProperty {Maybe (Value Text)
()
Value Text
NotificationRecipientTypeProperty
haddock_workaround_ :: SendNotificationActionProperty -> ()
content :: SendNotificationActionProperty -> Value Text
contentType :: SendNotificationActionProperty -> Value Text
deliveryMethod :: SendNotificationActionProperty -> Value Text
recipient :: SendNotificationActionProperty -> NotificationRecipientTypeProperty
subject :: SendNotificationActionProperty -> Maybe (Value Text)
haddock_workaround_ :: ()
content :: Value Text
contentType :: Value Text
deliveryMethod :: Value Text
recipient :: NotificationRecipientTypeProperty
subject :: Maybe (Value Text)
..}
= SendNotificationActionProperty {deliveryMethod :: Value Text
deliveryMethod = PropertyType "DeliveryMethod" SendNotificationActionProperty
Value Text
newValue, Maybe (Value Text)
()
Value Text
NotificationRecipientTypeProperty
haddock_workaround_ :: ()
content :: Value Text
contentType :: Value Text
recipient :: NotificationRecipientTypeProperty
subject :: Maybe (Value Text)
haddock_workaround_ :: ()
content :: Value Text
contentType :: Value Text
recipient :: NotificationRecipientTypeProperty
subject :: Maybe (Value Text)
..}
instance Property "Recipient" SendNotificationActionProperty where
type PropertyType "Recipient" SendNotificationActionProperty = NotificationRecipientTypeProperty
set :: PropertyType "Recipient" SendNotificationActionProperty
-> SendNotificationActionProperty -> SendNotificationActionProperty
set PropertyType "Recipient" SendNotificationActionProperty
newValue SendNotificationActionProperty {Maybe (Value Text)
()
Value Text
NotificationRecipientTypeProperty
haddock_workaround_ :: SendNotificationActionProperty -> ()
content :: SendNotificationActionProperty -> Value Text
contentType :: SendNotificationActionProperty -> Value Text
deliveryMethod :: SendNotificationActionProperty -> Value Text
recipient :: SendNotificationActionProperty -> NotificationRecipientTypeProperty
subject :: SendNotificationActionProperty -> Maybe (Value Text)
haddock_workaround_ :: ()
content :: Value Text
contentType :: Value Text
deliveryMethod :: Value Text
recipient :: NotificationRecipientTypeProperty
subject :: Maybe (Value Text)
..}
= SendNotificationActionProperty {recipient :: NotificationRecipientTypeProperty
recipient = PropertyType "Recipient" SendNotificationActionProperty
NotificationRecipientTypeProperty
newValue, Maybe (Value Text)
()
Value Text
haddock_workaround_ :: ()
content :: Value Text
contentType :: Value Text
deliveryMethod :: Value Text
subject :: Maybe (Value Text)
haddock_workaround_ :: ()
content :: Value Text
contentType :: Value Text
deliveryMethod :: Value Text
subject :: Maybe (Value Text)
..}
instance Property "Subject" SendNotificationActionProperty where
type PropertyType "Subject" SendNotificationActionProperty = Value Prelude.Text
set :: PropertyType "Subject" SendNotificationActionProperty
-> SendNotificationActionProperty -> SendNotificationActionProperty
set PropertyType "Subject" SendNotificationActionProperty
newValue SendNotificationActionProperty {Maybe (Value Text)
()
Value Text
NotificationRecipientTypeProperty
haddock_workaround_ :: SendNotificationActionProperty -> ()
content :: SendNotificationActionProperty -> Value Text
contentType :: SendNotificationActionProperty -> Value Text
deliveryMethod :: SendNotificationActionProperty -> Value Text
recipient :: SendNotificationActionProperty -> NotificationRecipientTypeProperty
subject :: SendNotificationActionProperty -> Maybe (Value Text)
haddock_workaround_ :: ()
content :: Value Text
contentType :: Value Text
deliveryMethod :: Value Text
recipient :: NotificationRecipientTypeProperty
subject :: Maybe (Value Text)
..}
= SendNotificationActionProperty
{subject :: Maybe (Value Text)
subject = Value Text -> Maybe (Value Text)
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType "Subject" SendNotificationActionProperty
Value Text
newValue, ()
Value Text
NotificationRecipientTypeProperty
haddock_workaround_ :: ()
content :: Value Text
contentType :: Value Text
deliveryMethod :: Value Text
recipient :: NotificationRecipientTypeProperty
haddock_workaround_ :: ()
content :: Value Text
contentType :: Value Text
deliveryMethod :: Value Text
recipient :: NotificationRecipientTypeProperty
..}