module Stratosphere.Cognito.UserPool.EmailConfigurationProperty (
        EmailConfigurationProperty(..), mkEmailConfigurationProperty
    ) where
import qualified Data.Aeson as JSON
import qualified Stratosphere.Prelude as Prelude
import Stratosphere.Property
import Stratosphere.ResourceProperties
import Stratosphere.Value
data EmailConfigurationProperty
  = -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-cognito-userpool-emailconfiguration.html>
    EmailConfigurationProperty {EmailConfigurationProperty -> ()
haddock_workaround_ :: (),
                                -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-cognito-userpool-emailconfiguration.html#cfn-cognito-userpool-emailconfiguration-configurationset>
                                EmailConfigurationProperty -> Maybe (Value Text)
configurationSet :: (Prelude.Maybe (Value Prelude.Text)),
                                -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-cognito-userpool-emailconfiguration.html#cfn-cognito-userpool-emailconfiguration-emailsendingaccount>
                                EmailConfigurationProperty -> Maybe (Value Text)
emailSendingAccount :: (Prelude.Maybe (Value Prelude.Text)),
                                -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-cognito-userpool-emailconfiguration.html#cfn-cognito-userpool-emailconfiguration-from>
                                EmailConfigurationProperty -> Maybe (Value Text)
from :: (Prelude.Maybe (Value Prelude.Text)),
                                -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-cognito-userpool-emailconfiguration.html#cfn-cognito-userpool-emailconfiguration-replytoemailaddress>
                                EmailConfigurationProperty -> Maybe (Value Text)
replyToEmailAddress :: (Prelude.Maybe (Value Prelude.Text)),
                                -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-cognito-userpool-emailconfiguration.html#cfn-cognito-userpool-emailconfiguration-sourcearn>
                                EmailConfigurationProperty -> Maybe (Value Text)
sourceArn :: (Prelude.Maybe (Value Prelude.Text))}
  deriving stock (EmailConfigurationProperty -> EmailConfigurationProperty -> Bool
(EmailConfigurationProperty -> EmailConfigurationProperty -> Bool)
-> (EmailConfigurationProperty
    -> EmailConfigurationProperty -> Bool)
-> Eq EmailConfigurationProperty
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: EmailConfigurationProperty -> EmailConfigurationProperty -> Bool
== :: EmailConfigurationProperty -> EmailConfigurationProperty -> Bool
$c/= :: EmailConfigurationProperty -> EmailConfigurationProperty -> Bool
/= :: EmailConfigurationProperty -> EmailConfigurationProperty -> Bool
Prelude.Eq, Int -> EmailConfigurationProperty -> ShowS
[EmailConfigurationProperty] -> ShowS
EmailConfigurationProperty -> String
(Int -> EmailConfigurationProperty -> ShowS)
-> (EmailConfigurationProperty -> String)
-> ([EmailConfigurationProperty] -> ShowS)
-> Show EmailConfigurationProperty
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> EmailConfigurationProperty -> ShowS
showsPrec :: Int -> EmailConfigurationProperty -> ShowS
$cshow :: EmailConfigurationProperty -> String
show :: EmailConfigurationProperty -> String
$cshowList :: [EmailConfigurationProperty] -> ShowS
showList :: [EmailConfigurationProperty] -> ShowS
Prelude.Show)
mkEmailConfigurationProperty :: EmailConfigurationProperty
mkEmailConfigurationProperty :: EmailConfigurationProperty
mkEmailConfigurationProperty
  = EmailConfigurationProperty
      {haddock_workaround_ :: ()
haddock_workaround_ = (), configurationSet :: Maybe (Value Text)
configurationSet = Maybe (Value Text)
forall a. Maybe a
Prelude.Nothing,
       emailSendingAccount :: Maybe (Value Text)
emailSendingAccount = Maybe (Value Text)
forall a. Maybe a
Prelude.Nothing, from :: Maybe (Value Text)
from = Maybe (Value Text)
forall a. Maybe a
Prelude.Nothing,
       replyToEmailAddress :: Maybe (Value Text)
replyToEmailAddress = Maybe (Value Text)
forall a. Maybe a
Prelude.Nothing, sourceArn :: Maybe (Value Text)
sourceArn = Maybe (Value Text)
forall a. Maybe a
Prelude.Nothing}
instance ToResourceProperties EmailConfigurationProperty where
  toResourceProperties :: EmailConfigurationProperty -> ResourceProperties
toResourceProperties EmailConfigurationProperty {Maybe (Value Text)
()
haddock_workaround_ :: EmailConfigurationProperty -> ()
configurationSet :: EmailConfigurationProperty -> Maybe (Value Text)
emailSendingAccount :: EmailConfigurationProperty -> Maybe (Value Text)
from :: EmailConfigurationProperty -> Maybe (Value Text)
replyToEmailAddress :: EmailConfigurationProperty -> Maybe (Value Text)
sourceArn :: EmailConfigurationProperty -> Maybe (Value Text)
haddock_workaround_ :: ()
configurationSet :: Maybe (Value Text)
emailSendingAccount :: Maybe (Value Text)
from :: Maybe (Value Text)
replyToEmailAddress :: Maybe (Value Text)
sourceArn :: Maybe (Value Text)
..}
    = ResourceProperties
        {awsType :: Text
awsType = Text
"AWS::Cognito::UserPool.EmailConfiguration",
         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
"ConfigurationSet" (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)
configurationSet,
                            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
"EmailSendingAccount" (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)
emailSendingAccount,
                            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
"From" (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)
from,
                            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
"ReplyToEmailAddress" (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)
replyToEmailAddress,
                            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
"SourceArn" (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)
sourceArn])}
instance JSON.ToJSON EmailConfigurationProperty where
  toJSON :: EmailConfigurationProperty -> Value
toJSON EmailConfigurationProperty {Maybe (Value Text)
()
haddock_workaround_ :: EmailConfigurationProperty -> ()
configurationSet :: EmailConfigurationProperty -> Maybe (Value Text)
emailSendingAccount :: EmailConfigurationProperty -> Maybe (Value Text)
from :: EmailConfigurationProperty -> Maybe (Value Text)
replyToEmailAddress :: EmailConfigurationProperty -> Maybe (Value Text)
sourceArn :: EmailConfigurationProperty -> Maybe (Value Text)
haddock_workaround_ :: ()
configurationSet :: Maybe (Value Text)
emailSendingAccount :: Maybe (Value Text)
from :: Maybe (Value Text)
replyToEmailAddress :: Maybe (Value Text)
sourceArn :: 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
"ConfigurationSet" (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)
configurationSet,
               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
"EmailSendingAccount" (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)
emailSendingAccount,
               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
"From" (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)
from,
               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
"ReplyToEmailAddress" (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)
replyToEmailAddress,
               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
"SourceArn" (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)
sourceArn]))
instance Property "ConfigurationSet" EmailConfigurationProperty where
  type PropertyType "ConfigurationSet" EmailConfigurationProperty = Value Prelude.Text
  set :: PropertyType "ConfigurationSet" EmailConfigurationProperty
-> EmailConfigurationProperty -> EmailConfigurationProperty
set PropertyType "ConfigurationSet" EmailConfigurationProperty
newValue EmailConfigurationProperty {Maybe (Value Text)
()
haddock_workaround_ :: EmailConfigurationProperty -> ()
configurationSet :: EmailConfigurationProperty -> Maybe (Value Text)
emailSendingAccount :: EmailConfigurationProperty -> Maybe (Value Text)
from :: EmailConfigurationProperty -> Maybe (Value Text)
replyToEmailAddress :: EmailConfigurationProperty -> Maybe (Value Text)
sourceArn :: EmailConfigurationProperty -> Maybe (Value Text)
haddock_workaround_ :: ()
configurationSet :: Maybe (Value Text)
emailSendingAccount :: Maybe (Value Text)
from :: Maybe (Value Text)
replyToEmailAddress :: Maybe (Value Text)
sourceArn :: Maybe (Value Text)
..}
    = EmailConfigurationProperty
        {configurationSet :: Maybe (Value Text)
configurationSet = Value Text -> Maybe (Value Text)
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType "ConfigurationSet" EmailConfigurationProperty
Value Text
newValue, Maybe (Value Text)
()
haddock_workaround_ :: ()
emailSendingAccount :: Maybe (Value Text)
from :: Maybe (Value Text)
replyToEmailAddress :: Maybe (Value Text)
sourceArn :: Maybe (Value Text)
haddock_workaround_ :: ()
emailSendingAccount :: Maybe (Value Text)
from :: Maybe (Value Text)
replyToEmailAddress :: Maybe (Value Text)
sourceArn :: Maybe (Value Text)
..}
instance Property "EmailSendingAccount" EmailConfigurationProperty where
  type PropertyType "EmailSendingAccount" EmailConfigurationProperty = Value Prelude.Text
  set :: PropertyType "EmailSendingAccount" EmailConfigurationProperty
-> EmailConfigurationProperty -> EmailConfigurationProperty
set PropertyType "EmailSendingAccount" EmailConfigurationProperty
newValue EmailConfigurationProperty {Maybe (Value Text)
()
haddock_workaround_ :: EmailConfigurationProperty -> ()
configurationSet :: EmailConfigurationProperty -> Maybe (Value Text)
emailSendingAccount :: EmailConfigurationProperty -> Maybe (Value Text)
from :: EmailConfigurationProperty -> Maybe (Value Text)
replyToEmailAddress :: EmailConfigurationProperty -> Maybe (Value Text)
sourceArn :: EmailConfigurationProperty -> Maybe (Value Text)
haddock_workaround_ :: ()
configurationSet :: Maybe (Value Text)
emailSendingAccount :: Maybe (Value Text)
from :: Maybe (Value Text)
replyToEmailAddress :: Maybe (Value Text)
sourceArn :: Maybe (Value Text)
..}
    = EmailConfigurationProperty
        {emailSendingAccount :: Maybe (Value Text)
emailSendingAccount = Value Text -> Maybe (Value Text)
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType "EmailSendingAccount" EmailConfigurationProperty
Value Text
newValue, Maybe (Value Text)
()
haddock_workaround_ :: ()
configurationSet :: Maybe (Value Text)
from :: Maybe (Value Text)
replyToEmailAddress :: Maybe (Value Text)
sourceArn :: Maybe (Value Text)
haddock_workaround_ :: ()
configurationSet :: Maybe (Value Text)
from :: Maybe (Value Text)
replyToEmailAddress :: Maybe (Value Text)
sourceArn :: Maybe (Value Text)
..}
instance Property "From" EmailConfigurationProperty where
  type PropertyType "From" EmailConfigurationProperty = Value Prelude.Text
  set :: PropertyType "From" EmailConfigurationProperty
-> EmailConfigurationProperty -> EmailConfigurationProperty
set PropertyType "From" EmailConfigurationProperty
newValue EmailConfigurationProperty {Maybe (Value Text)
()
haddock_workaround_ :: EmailConfigurationProperty -> ()
configurationSet :: EmailConfigurationProperty -> Maybe (Value Text)
emailSendingAccount :: EmailConfigurationProperty -> Maybe (Value Text)
from :: EmailConfigurationProperty -> Maybe (Value Text)
replyToEmailAddress :: EmailConfigurationProperty -> Maybe (Value Text)
sourceArn :: EmailConfigurationProperty -> Maybe (Value Text)
haddock_workaround_ :: ()
configurationSet :: Maybe (Value Text)
emailSendingAccount :: Maybe (Value Text)
from :: Maybe (Value Text)
replyToEmailAddress :: Maybe (Value Text)
sourceArn :: Maybe (Value Text)
..}
    = EmailConfigurationProperty {from :: Maybe (Value Text)
from = Value Text -> Maybe (Value Text)
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType "From" EmailConfigurationProperty
Value Text
newValue, Maybe (Value Text)
()
haddock_workaround_ :: ()
configurationSet :: Maybe (Value Text)
emailSendingAccount :: Maybe (Value Text)
replyToEmailAddress :: Maybe (Value Text)
sourceArn :: Maybe (Value Text)
haddock_workaround_ :: ()
configurationSet :: Maybe (Value Text)
emailSendingAccount :: Maybe (Value Text)
replyToEmailAddress :: Maybe (Value Text)
sourceArn :: Maybe (Value Text)
..}
instance Property "ReplyToEmailAddress" EmailConfigurationProperty where
  type PropertyType "ReplyToEmailAddress" EmailConfigurationProperty = Value Prelude.Text
  set :: PropertyType "ReplyToEmailAddress" EmailConfigurationProperty
-> EmailConfigurationProperty -> EmailConfigurationProperty
set PropertyType "ReplyToEmailAddress" EmailConfigurationProperty
newValue EmailConfigurationProperty {Maybe (Value Text)
()
haddock_workaround_ :: EmailConfigurationProperty -> ()
configurationSet :: EmailConfigurationProperty -> Maybe (Value Text)
emailSendingAccount :: EmailConfigurationProperty -> Maybe (Value Text)
from :: EmailConfigurationProperty -> Maybe (Value Text)
replyToEmailAddress :: EmailConfigurationProperty -> Maybe (Value Text)
sourceArn :: EmailConfigurationProperty -> Maybe (Value Text)
haddock_workaround_ :: ()
configurationSet :: Maybe (Value Text)
emailSendingAccount :: Maybe (Value Text)
from :: Maybe (Value Text)
replyToEmailAddress :: Maybe (Value Text)
sourceArn :: Maybe (Value Text)
..}
    = EmailConfigurationProperty
        {replyToEmailAddress :: Maybe (Value Text)
replyToEmailAddress = Value Text -> Maybe (Value Text)
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType "ReplyToEmailAddress" EmailConfigurationProperty
Value Text
newValue, Maybe (Value Text)
()
haddock_workaround_ :: ()
configurationSet :: Maybe (Value Text)
emailSendingAccount :: Maybe (Value Text)
from :: Maybe (Value Text)
sourceArn :: Maybe (Value Text)
haddock_workaround_ :: ()
configurationSet :: Maybe (Value Text)
emailSendingAccount :: Maybe (Value Text)
from :: Maybe (Value Text)
sourceArn :: Maybe (Value Text)
..}
instance Property "SourceArn" EmailConfigurationProperty where
  type PropertyType "SourceArn" EmailConfigurationProperty = Value Prelude.Text
  set :: PropertyType "SourceArn" EmailConfigurationProperty
-> EmailConfigurationProperty -> EmailConfigurationProperty
set PropertyType "SourceArn" EmailConfigurationProperty
newValue EmailConfigurationProperty {Maybe (Value Text)
()
haddock_workaround_ :: EmailConfigurationProperty -> ()
configurationSet :: EmailConfigurationProperty -> Maybe (Value Text)
emailSendingAccount :: EmailConfigurationProperty -> Maybe (Value Text)
from :: EmailConfigurationProperty -> Maybe (Value Text)
replyToEmailAddress :: EmailConfigurationProperty -> Maybe (Value Text)
sourceArn :: EmailConfigurationProperty -> Maybe (Value Text)
haddock_workaround_ :: ()
configurationSet :: Maybe (Value Text)
emailSendingAccount :: Maybe (Value Text)
from :: Maybe (Value Text)
replyToEmailAddress :: Maybe (Value Text)
sourceArn :: Maybe (Value Text)
..}
    = EmailConfigurationProperty
        {sourceArn :: Maybe (Value Text)
sourceArn = Value Text -> Maybe (Value Text)
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType "SourceArn" EmailConfigurationProperty
Value Text
newValue, Maybe (Value Text)
()
haddock_workaround_ :: ()
configurationSet :: Maybe (Value Text)
emailSendingAccount :: Maybe (Value Text)
from :: Maybe (Value Text)
replyToEmailAddress :: Maybe (Value Text)
haddock_workaround_ :: ()
configurationSet :: Maybe (Value Text)
emailSendingAccount :: Maybe (Value Text)
from :: Maybe (Value Text)
replyToEmailAddress :: Maybe (Value Text)
..}