module Stratosphere.Cognito.UserPool.CustomEmailSenderProperty (
        CustomEmailSenderProperty(..), mkCustomEmailSenderProperty
    ) where
import qualified Data.Aeson as JSON
import qualified Stratosphere.Prelude as Prelude
import Stratosphere.Property
import Stratosphere.ResourceProperties
import Stratosphere.Value
data CustomEmailSenderProperty
  = -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-cognito-userpool-customemailsender.html>
    CustomEmailSenderProperty {CustomEmailSenderProperty -> ()
haddock_workaround_ :: (),
                               -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-cognito-userpool-customemailsender.html#cfn-cognito-userpool-customemailsender-lambdaarn>
                               CustomEmailSenderProperty -> Maybe (Value Text)
lambdaArn :: (Prelude.Maybe (Value Prelude.Text)),
                               -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-cognito-userpool-customemailsender.html#cfn-cognito-userpool-customemailsender-lambdaversion>
                               CustomEmailSenderProperty -> Maybe (Value Text)
lambdaVersion :: (Prelude.Maybe (Value Prelude.Text))}
  deriving stock (CustomEmailSenderProperty -> CustomEmailSenderProperty -> Bool
(CustomEmailSenderProperty -> CustomEmailSenderProperty -> Bool)
-> (CustomEmailSenderProperty -> CustomEmailSenderProperty -> Bool)
-> Eq CustomEmailSenderProperty
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: CustomEmailSenderProperty -> CustomEmailSenderProperty -> Bool
== :: CustomEmailSenderProperty -> CustomEmailSenderProperty -> Bool
$c/= :: CustomEmailSenderProperty -> CustomEmailSenderProperty -> Bool
/= :: CustomEmailSenderProperty -> CustomEmailSenderProperty -> Bool
Prelude.Eq, Int -> CustomEmailSenderProperty -> ShowS
[CustomEmailSenderProperty] -> ShowS
CustomEmailSenderProperty -> String
(Int -> CustomEmailSenderProperty -> ShowS)
-> (CustomEmailSenderProperty -> String)
-> ([CustomEmailSenderProperty] -> ShowS)
-> Show CustomEmailSenderProperty
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> CustomEmailSenderProperty -> ShowS
showsPrec :: Int -> CustomEmailSenderProperty -> ShowS
$cshow :: CustomEmailSenderProperty -> String
show :: CustomEmailSenderProperty -> String
$cshowList :: [CustomEmailSenderProperty] -> ShowS
showList :: [CustomEmailSenderProperty] -> ShowS
Prelude.Show)
mkCustomEmailSenderProperty :: CustomEmailSenderProperty
mkCustomEmailSenderProperty :: CustomEmailSenderProperty
mkCustomEmailSenderProperty
  = CustomEmailSenderProperty
      {haddock_workaround_ :: ()
haddock_workaround_ = (), lambdaArn :: Maybe (Value Text)
lambdaArn = Maybe (Value Text)
forall a. Maybe a
Prelude.Nothing,
       lambdaVersion :: Maybe (Value Text)
lambdaVersion = Maybe (Value Text)
forall a. Maybe a
Prelude.Nothing}
instance ToResourceProperties CustomEmailSenderProperty where
  toResourceProperties :: CustomEmailSenderProperty -> ResourceProperties
toResourceProperties CustomEmailSenderProperty {Maybe (Value Text)
()
haddock_workaround_ :: CustomEmailSenderProperty -> ()
lambdaArn :: CustomEmailSenderProperty -> Maybe (Value Text)
lambdaVersion :: CustomEmailSenderProperty -> Maybe (Value Text)
haddock_workaround_ :: ()
lambdaArn :: Maybe (Value Text)
lambdaVersion :: Maybe (Value Text)
..}
    = ResourceProperties
        {awsType :: Text
awsType = Text
"AWS::Cognito::UserPool.CustomEmailSender",
         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
"LambdaArn" (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)
lambdaArn,
                            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
"LambdaVersion" (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)
lambdaVersion])}
instance JSON.ToJSON CustomEmailSenderProperty where
  toJSON :: CustomEmailSenderProperty -> Value
toJSON CustomEmailSenderProperty {Maybe (Value Text)
()
haddock_workaround_ :: CustomEmailSenderProperty -> ()
lambdaArn :: CustomEmailSenderProperty -> Maybe (Value Text)
lambdaVersion :: CustomEmailSenderProperty -> Maybe (Value Text)
haddock_workaround_ :: ()
lambdaArn :: Maybe (Value Text)
lambdaVersion :: 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
"LambdaArn" (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)
lambdaArn,
               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
"LambdaVersion" (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)
lambdaVersion]))
instance Property "LambdaArn" CustomEmailSenderProperty where
  type PropertyType "LambdaArn" CustomEmailSenderProperty = Value Prelude.Text
  set :: PropertyType "LambdaArn" CustomEmailSenderProperty
-> CustomEmailSenderProperty -> CustomEmailSenderProperty
set PropertyType "LambdaArn" CustomEmailSenderProperty
newValue CustomEmailSenderProperty {Maybe (Value Text)
()
haddock_workaround_ :: CustomEmailSenderProperty -> ()
lambdaArn :: CustomEmailSenderProperty -> Maybe (Value Text)
lambdaVersion :: CustomEmailSenderProperty -> Maybe (Value Text)
haddock_workaround_ :: ()
lambdaArn :: Maybe (Value Text)
lambdaVersion :: Maybe (Value Text)
..}
    = CustomEmailSenderProperty {lambdaArn :: Maybe (Value Text)
lambdaArn = Value Text -> Maybe (Value Text)
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType "LambdaArn" CustomEmailSenderProperty
Value Text
newValue, Maybe (Value Text)
()
haddock_workaround_ :: ()
lambdaVersion :: Maybe (Value Text)
haddock_workaround_ :: ()
lambdaVersion :: Maybe (Value Text)
..}
instance Property "LambdaVersion" CustomEmailSenderProperty where
  type PropertyType "LambdaVersion" CustomEmailSenderProperty = Value Prelude.Text
  set :: PropertyType "LambdaVersion" CustomEmailSenderProperty
-> CustomEmailSenderProperty -> CustomEmailSenderProperty
set PropertyType "LambdaVersion" CustomEmailSenderProperty
newValue CustomEmailSenderProperty {Maybe (Value Text)
()
haddock_workaround_ :: CustomEmailSenderProperty -> ()
lambdaArn :: CustomEmailSenderProperty -> Maybe (Value Text)
lambdaVersion :: CustomEmailSenderProperty -> Maybe (Value Text)
haddock_workaround_ :: ()
lambdaArn :: Maybe (Value Text)
lambdaVersion :: Maybe (Value Text)
..}
    = CustomEmailSenderProperty
        {lambdaVersion :: Maybe (Value Text)
lambdaVersion = Value Text -> Maybe (Value Text)
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType "LambdaVersion" CustomEmailSenderProperty
Value Text
newValue, Maybe (Value Text)
()
haddock_workaround_ :: ()
lambdaArn :: Maybe (Value Text)
haddock_workaround_ :: ()
lambdaArn :: Maybe (Value Text)
..}