{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE DuplicateRecordFields #-}
{-# LANGUAGE NamedFieldPuns #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE RecordWildCards #-}
{-# LANGUAGE StrictData #-}
{-# LANGUAGE NoImplicitPrelude #-}
{-# OPTIONS_GHC -fno-warn-unused-imports #-}
{-# OPTIONS_GHC -fno-warn-unused-matches #-}
module Amazonka.CognitoIdentityProvider.Types.CustomEmailLambdaVersionConfigType where
import Amazonka.CognitoIdentityProvider.Types.CustomEmailSenderLambdaVersionType
import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude
data CustomEmailLambdaVersionConfigType = CustomEmailLambdaVersionConfigType'
{
CustomEmailLambdaVersionConfigType
-> CustomEmailSenderLambdaVersionType
lambdaVersion :: CustomEmailSenderLambdaVersionType,
CustomEmailLambdaVersionConfigType -> Text
lambdaArn :: Prelude.Text
}
deriving (CustomEmailLambdaVersionConfigType
-> CustomEmailLambdaVersionConfigType -> Bool
(CustomEmailLambdaVersionConfigType
-> CustomEmailLambdaVersionConfigType -> Bool)
-> (CustomEmailLambdaVersionConfigType
-> CustomEmailLambdaVersionConfigType -> Bool)
-> Eq CustomEmailLambdaVersionConfigType
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: CustomEmailLambdaVersionConfigType
-> CustomEmailLambdaVersionConfigType -> Bool
$c/= :: CustomEmailLambdaVersionConfigType
-> CustomEmailLambdaVersionConfigType -> Bool
== :: CustomEmailLambdaVersionConfigType
-> CustomEmailLambdaVersionConfigType -> Bool
$c== :: CustomEmailLambdaVersionConfigType
-> CustomEmailLambdaVersionConfigType -> Bool
Prelude.Eq, ReadPrec [CustomEmailLambdaVersionConfigType]
ReadPrec CustomEmailLambdaVersionConfigType
Int -> ReadS CustomEmailLambdaVersionConfigType
ReadS [CustomEmailLambdaVersionConfigType]
(Int -> ReadS CustomEmailLambdaVersionConfigType)
-> ReadS [CustomEmailLambdaVersionConfigType]
-> ReadPrec CustomEmailLambdaVersionConfigType
-> ReadPrec [CustomEmailLambdaVersionConfigType]
-> Read CustomEmailLambdaVersionConfigType
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [CustomEmailLambdaVersionConfigType]
$creadListPrec :: ReadPrec [CustomEmailLambdaVersionConfigType]
readPrec :: ReadPrec CustomEmailLambdaVersionConfigType
$creadPrec :: ReadPrec CustomEmailLambdaVersionConfigType
readList :: ReadS [CustomEmailLambdaVersionConfigType]
$creadList :: ReadS [CustomEmailLambdaVersionConfigType]
readsPrec :: Int -> ReadS CustomEmailLambdaVersionConfigType
$creadsPrec :: Int -> ReadS CustomEmailLambdaVersionConfigType
Prelude.Read, Int -> CustomEmailLambdaVersionConfigType -> ShowS
[CustomEmailLambdaVersionConfigType] -> ShowS
CustomEmailLambdaVersionConfigType -> String
(Int -> CustomEmailLambdaVersionConfigType -> ShowS)
-> (CustomEmailLambdaVersionConfigType -> String)
-> ([CustomEmailLambdaVersionConfigType] -> ShowS)
-> Show CustomEmailLambdaVersionConfigType
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [CustomEmailLambdaVersionConfigType] -> ShowS
$cshowList :: [CustomEmailLambdaVersionConfigType] -> ShowS
show :: CustomEmailLambdaVersionConfigType -> String
$cshow :: CustomEmailLambdaVersionConfigType -> String
showsPrec :: Int -> CustomEmailLambdaVersionConfigType -> ShowS
$cshowsPrec :: Int -> CustomEmailLambdaVersionConfigType -> ShowS
Prelude.Show, (forall x.
CustomEmailLambdaVersionConfigType
-> Rep CustomEmailLambdaVersionConfigType x)
-> (forall x.
Rep CustomEmailLambdaVersionConfigType x
-> CustomEmailLambdaVersionConfigType)
-> Generic CustomEmailLambdaVersionConfigType
forall x.
Rep CustomEmailLambdaVersionConfigType x
-> CustomEmailLambdaVersionConfigType
forall x.
CustomEmailLambdaVersionConfigType
-> Rep CustomEmailLambdaVersionConfigType x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep CustomEmailLambdaVersionConfigType x
-> CustomEmailLambdaVersionConfigType
$cfrom :: forall x.
CustomEmailLambdaVersionConfigType
-> Rep CustomEmailLambdaVersionConfigType x
Prelude.Generic)
newCustomEmailLambdaVersionConfigType ::
CustomEmailSenderLambdaVersionType ->
Prelude.Text ->
CustomEmailLambdaVersionConfigType
newCustomEmailLambdaVersionConfigType :: CustomEmailSenderLambdaVersionType
-> Text -> CustomEmailLambdaVersionConfigType
newCustomEmailLambdaVersionConfigType
CustomEmailSenderLambdaVersionType
pLambdaVersion_
Text
pLambdaArn_ =
CustomEmailLambdaVersionConfigType' :: CustomEmailSenderLambdaVersionType
-> Text -> CustomEmailLambdaVersionConfigType
CustomEmailLambdaVersionConfigType'
{ $sel:lambdaVersion:CustomEmailLambdaVersionConfigType' :: CustomEmailSenderLambdaVersionType
lambdaVersion =
CustomEmailSenderLambdaVersionType
pLambdaVersion_,
$sel:lambdaArn:CustomEmailLambdaVersionConfigType' :: Text
lambdaArn = Text
pLambdaArn_
}
customEmailLambdaVersionConfigType_lambdaVersion :: Lens.Lens' CustomEmailLambdaVersionConfigType CustomEmailSenderLambdaVersionType
customEmailLambdaVersionConfigType_lambdaVersion :: (CustomEmailSenderLambdaVersionType
-> f CustomEmailSenderLambdaVersionType)
-> CustomEmailLambdaVersionConfigType
-> f CustomEmailLambdaVersionConfigType
customEmailLambdaVersionConfigType_lambdaVersion = (CustomEmailLambdaVersionConfigType
-> CustomEmailSenderLambdaVersionType)
-> (CustomEmailLambdaVersionConfigType
-> CustomEmailSenderLambdaVersionType
-> CustomEmailLambdaVersionConfigType)
-> Lens
CustomEmailLambdaVersionConfigType
CustomEmailLambdaVersionConfigType
CustomEmailSenderLambdaVersionType
CustomEmailSenderLambdaVersionType
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CustomEmailLambdaVersionConfigType' {CustomEmailSenderLambdaVersionType
lambdaVersion :: CustomEmailSenderLambdaVersionType
$sel:lambdaVersion:CustomEmailLambdaVersionConfigType' :: CustomEmailLambdaVersionConfigType
-> CustomEmailSenderLambdaVersionType
lambdaVersion} -> CustomEmailSenderLambdaVersionType
lambdaVersion) (\s :: CustomEmailLambdaVersionConfigType
s@CustomEmailLambdaVersionConfigType' {} CustomEmailSenderLambdaVersionType
a -> CustomEmailLambdaVersionConfigType
s {$sel:lambdaVersion:CustomEmailLambdaVersionConfigType' :: CustomEmailSenderLambdaVersionType
lambdaVersion = CustomEmailSenderLambdaVersionType
a} :: CustomEmailLambdaVersionConfigType)
customEmailLambdaVersionConfigType_lambdaArn :: Lens.Lens' CustomEmailLambdaVersionConfigType Prelude.Text
customEmailLambdaVersionConfigType_lambdaArn :: (Text -> f Text)
-> CustomEmailLambdaVersionConfigType
-> f CustomEmailLambdaVersionConfigType
customEmailLambdaVersionConfigType_lambdaArn = (CustomEmailLambdaVersionConfigType -> Text)
-> (CustomEmailLambdaVersionConfigType
-> Text -> CustomEmailLambdaVersionConfigType)
-> Lens
CustomEmailLambdaVersionConfigType
CustomEmailLambdaVersionConfigType
Text
Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CustomEmailLambdaVersionConfigType' {Text
lambdaArn :: Text
$sel:lambdaArn:CustomEmailLambdaVersionConfigType' :: CustomEmailLambdaVersionConfigType -> Text
lambdaArn} -> Text
lambdaArn) (\s :: CustomEmailLambdaVersionConfigType
s@CustomEmailLambdaVersionConfigType' {} Text
a -> CustomEmailLambdaVersionConfigType
s {$sel:lambdaArn:CustomEmailLambdaVersionConfigType' :: Text
lambdaArn = Text
a} :: CustomEmailLambdaVersionConfigType)
instance
Core.FromJSON
CustomEmailLambdaVersionConfigType
where
parseJSON :: Value -> Parser CustomEmailLambdaVersionConfigType
parseJSON =
String
-> (Object -> Parser CustomEmailLambdaVersionConfigType)
-> Value
-> Parser CustomEmailLambdaVersionConfigType
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Core.withObject
String
"CustomEmailLambdaVersionConfigType"
( \Object
x ->
CustomEmailSenderLambdaVersionType
-> Text -> CustomEmailLambdaVersionConfigType
CustomEmailLambdaVersionConfigType'
(CustomEmailSenderLambdaVersionType
-> Text -> CustomEmailLambdaVersionConfigType)
-> Parser CustomEmailSenderLambdaVersionType
-> Parser (Text -> CustomEmailLambdaVersionConfigType)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x Object -> Text -> Parser CustomEmailSenderLambdaVersionType
forall a. FromJSON a => Object -> Text -> Parser a
Core..: Text
"LambdaVersion")
Parser (Text -> CustomEmailLambdaVersionConfigType)
-> Parser Text -> Parser CustomEmailLambdaVersionConfigType
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser Text
forall a. FromJSON a => Object -> Text -> Parser a
Core..: Text
"LambdaArn")
)
instance
Prelude.Hashable
CustomEmailLambdaVersionConfigType
instance
Prelude.NFData
CustomEmailLambdaVersionConfigType
instance
Core.ToJSON
CustomEmailLambdaVersionConfigType
where
toJSON :: CustomEmailLambdaVersionConfigType -> Value
toJSON CustomEmailLambdaVersionConfigType' {Text
CustomEmailSenderLambdaVersionType
lambdaArn :: Text
lambdaVersion :: CustomEmailSenderLambdaVersionType
$sel:lambdaArn:CustomEmailLambdaVersionConfigType' :: CustomEmailLambdaVersionConfigType -> Text
$sel:lambdaVersion:CustomEmailLambdaVersionConfigType' :: CustomEmailLambdaVersionConfigType
-> CustomEmailSenderLambdaVersionType
..} =
[Pair] -> Value
Core.object
( [Maybe Pair] -> [Pair]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
[ Pair -> Maybe Pair
forall a. a -> Maybe a
Prelude.Just
(Text
"LambdaVersion" Text -> CustomEmailSenderLambdaVersionType -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= CustomEmailSenderLambdaVersionType
lambdaVersion),
Pair -> Maybe Pair
forall a. a -> Maybe a
Prelude.Just (Text
"LambdaArn" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= Text
lambdaArn)
]
)