module Stratosphere.Cognito.UserPoolRiskConfigurationAttachment.NotifyEmailTypeProperty (
NotifyEmailTypeProperty(..), mkNotifyEmailTypeProperty
) where
import qualified Data.Aeson as JSON
import qualified Stratosphere.Prelude as Prelude
import Stratosphere.Property
import Stratosphere.ResourceProperties
import Stratosphere.Value
data NotifyEmailTypeProperty
=
NotifyEmailTypeProperty {NotifyEmailTypeProperty -> ()
haddock_workaround_ :: (),
NotifyEmailTypeProperty -> Maybe (Value Text)
htmlBody :: (Prelude.Maybe (Value Prelude.Text)),
NotifyEmailTypeProperty -> Value Text
subject :: (Value Prelude.Text),
NotifyEmailTypeProperty -> Maybe (Value Text)
textBody :: (Prelude.Maybe (Value Prelude.Text))}
deriving stock (NotifyEmailTypeProperty -> NotifyEmailTypeProperty -> Bool
(NotifyEmailTypeProperty -> NotifyEmailTypeProperty -> Bool)
-> (NotifyEmailTypeProperty -> NotifyEmailTypeProperty -> Bool)
-> Eq NotifyEmailTypeProperty
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: NotifyEmailTypeProperty -> NotifyEmailTypeProperty -> Bool
== :: NotifyEmailTypeProperty -> NotifyEmailTypeProperty -> Bool
$c/= :: NotifyEmailTypeProperty -> NotifyEmailTypeProperty -> Bool
/= :: NotifyEmailTypeProperty -> NotifyEmailTypeProperty -> Bool
Prelude.Eq, Int -> NotifyEmailTypeProperty -> ShowS
[NotifyEmailTypeProperty] -> ShowS
NotifyEmailTypeProperty -> String
(Int -> NotifyEmailTypeProperty -> ShowS)
-> (NotifyEmailTypeProperty -> String)
-> ([NotifyEmailTypeProperty] -> ShowS)
-> Show NotifyEmailTypeProperty
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> NotifyEmailTypeProperty -> ShowS
showsPrec :: Int -> NotifyEmailTypeProperty -> ShowS
$cshow :: NotifyEmailTypeProperty -> String
show :: NotifyEmailTypeProperty -> String
$cshowList :: [NotifyEmailTypeProperty] -> ShowS
showList :: [NotifyEmailTypeProperty] -> ShowS
Prelude.Show)
mkNotifyEmailTypeProperty ::
Value Prelude.Text -> NotifyEmailTypeProperty
mkNotifyEmailTypeProperty :: Value Text -> NotifyEmailTypeProperty
mkNotifyEmailTypeProperty Value Text
subject
= NotifyEmailTypeProperty
{haddock_workaround_ :: ()
haddock_workaround_ = (), subject :: Value Text
subject = Value Text
subject,
htmlBody :: Maybe (Value Text)
htmlBody = Maybe (Value Text)
forall a. Maybe a
Prelude.Nothing, textBody :: Maybe (Value Text)
textBody = Maybe (Value Text)
forall a. Maybe a
Prelude.Nothing}
instance ToResourceProperties NotifyEmailTypeProperty where
toResourceProperties :: NotifyEmailTypeProperty -> ResourceProperties
toResourceProperties NotifyEmailTypeProperty {Maybe (Value Text)
()
Value Text
haddock_workaround_ :: NotifyEmailTypeProperty -> ()
htmlBody :: NotifyEmailTypeProperty -> Maybe (Value Text)
subject :: NotifyEmailTypeProperty -> Value Text
textBody :: NotifyEmailTypeProperty -> Maybe (Value Text)
haddock_workaround_ :: ()
htmlBody :: Maybe (Value Text)
subject :: Value Text
textBody :: Maybe (Value Text)
..}
= ResourceProperties
{awsType :: Text
awsType = Text
"AWS::Cognito::UserPoolRiskConfigurationAttachment.NotifyEmailType",
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
"Subject" 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
subject]
([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
"HtmlBody" (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)
htmlBody,
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
"TextBody" (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)
textBody]))}
instance JSON.ToJSON NotifyEmailTypeProperty where
toJSON :: NotifyEmailTypeProperty -> Value
toJSON NotifyEmailTypeProperty {Maybe (Value Text)
()
Value Text
haddock_workaround_ :: NotifyEmailTypeProperty -> ()
htmlBody :: NotifyEmailTypeProperty -> Maybe (Value Text)
subject :: NotifyEmailTypeProperty -> Value Text
textBody :: NotifyEmailTypeProperty -> Maybe (Value Text)
haddock_workaround_ :: ()
htmlBody :: Maybe (Value Text)
subject :: Value Text
textBody :: 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
"Subject" 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
subject]
([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
"HtmlBody" (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)
htmlBody,
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
"TextBody" (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)
textBody])))
instance Property "HtmlBody" NotifyEmailTypeProperty where
type PropertyType "HtmlBody" NotifyEmailTypeProperty = Value Prelude.Text
set :: PropertyType "HtmlBody" NotifyEmailTypeProperty
-> NotifyEmailTypeProperty -> NotifyEmailTypeProperty
set PropertyType "HtmlBody" NotifyEmailTypeProperty
newValue NotifyEmailTypeProperty {Maybe (Value Text)
()
Value Text
haddock_workaround_ :: NotifyEmailTypeProperty -> ()
htmlBody :: NotifyEmailTypeProperty -> Maybe (Value Text)
subject :: NotifyEmailTypeProperty -> Value Text
textBody :: NotifyEmailTypeProperty -> Maybe (Value Text)
haddock_workaround_ :: ()
htmlBody :: Maybe (Value Text)
subject :: Value Text
textBody :: Maybe (Value Text)
..}
= NotifyEmailTypeProperty {htmlBody :: Maybe (Value Text)
htmlBody = Value Text -> Maybe (Value Text)
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType "HtmlBody" NotifyEmailTypeProperty
Value Text
newValue, Maybe (Value Text)
()
Value Text
haddock_workaround_ :: ()
subject :: Value Text
textBody :: Maybe (Value Text)
haddock_workaround_ :: ()
subject :: Value Text
textBody :: Maybe (Value Text)
..}
instance Property "Subject" NotifyEmailTypeProperty where
type PropertyType "Subject" NotifyEmailTypeProperty = Value Prelude.Text
set :: PropertyType "Subject" NotifyEmailTypeProperty
-> NotifyEmailTypeProperty -> NotifyEmailTypeProperty
set PropertyType "Subject" NotifyEmailTypeProperty
newValue NotifyEmailTypeProperty {Maybe (Value Text)
()
Value Text
haddock_workaround_ :: NotifyEmailTypeProperty -> ()
htmlBody :: NotifyEmailTypeProperty -> Maybe (Value Text)
subject :: NotifyEmailTypeProperty -> Value Text
textBody :: NotifyEmailTypeProperty -> Maybe (Value Text)
haddock_workaround_ :: ()
htmlBody :: Maybe (Value Text)
subject :: Value Text
textBody :: Maybe (Value Text)
..}
= NotifyEmailTypeProperty {subject :: Value Text
subject = PropertyType "Subject" NotifyEmailTypeProperty
Value Text
newValue, Maybe (Value Text)
()
haddock_workaround_ :: ()
htmlBody :: Maybe (Value Text)
textBody :: Maybe (Value Text)
haddock_workaround_ :: ()
htmlBody :: Maybe (Value Text)
textBody :: Maybe (Value Text)
..}
instance Property "TextBody" NotifyEmailTypeProperty where
type PropertyType "TextBody" NotifyEmailTypeProperty = Value Prelude.Text
set :: PropertyType "TextBody" NotifyEmailTypeProperty
-> NotifyEmailTypeProperty -> NotifyEmailTypeProperty
set PropertyType "TextBody" NotifyEmailTypeProperty
newValue NotifyEmailTypeProperty {Maybe (Value Text)
()
Value Text
haddock_workaround_ :: NotifyEmailTypeProperty -> ()
htmlBody :: NotifyEmailTypeProperty -> Maybe (Value Text)
subject :: NotifyEmailTypeProperty -> Value Text
textBody :: NotifyEmailTypeProperty -> Maybe (Value Text)
haddock_workaround_ :: ()
htmlBody :: Maybe (Value Text)
subject :: Value Text
textBody :: Maybe (Value Text)
..}
= NotifyEmailTypeProperty {textBody :: Maybe (Value Text)
textBody = Value Text -> Maybe (Value Text)
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType "TextBody" NotifyEmailTypeProperty
Value Text
newValue, Maybe (Value Text)
()
Value Text
haddock_workaround_ :: ()
htmlBody :: Maybe (Value Text)
subject :: Value Text
haddock_workaround_ :: ()
htmlBody :: Maybe (Value Text)
subject :: Value Text
..}