{-# 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.CustomSMSLambdaVersionConfigType where
import Amazonka.CognitoIdentityProvider.Types.CustomSMSSenderLambdaVersionType
import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude
data CustomSMSLambdaVersionConfigType = CustomSMSLambdaVersionConfigType'
{
CustomSMSLambdaVersionConfigType
-> CustomSMSSenderLambdaVersionType
lambdaVersion :: CustomSMSSenderLambdaVersionType,
CustomSMSLambdaVersionConfigType -> Text
lambdaArn :: Prelude.Text
}
deriving (CustomSMSLambdaVersionConfigType
-> CustomSMSLambdaVersionConfigType -> Bool
(CustomSMSLambdaVersionConfigType
-> CustomSMSLambdaVersionConfigType -> Bool)
-> (CustomSMSLambdaVersionConfigType
-> CustomSMSLambdaVersionConfigType -> Bool)
-> Eq CustomSMSLambdaVersionConfigType
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: CustomSMSLambdaVersionConfigType
-> CustomSMSLambdaVersionConfigType -> Bool
$c/= :: CustomSMSLambdaVersionConfigType
-> CustomSMSLambdaVersionConfigType -> Bool
== :: CustomSMSLambdaVersionConfigType
-> CustomSMSLambdaVersionConfigType -> Bool
$c== :: CustomSMSLambdaVersionConfigType
-> CustomSMSLambdaVersionConfigType -> Bool
Prelude.Eq, ReadPrec [CustomSMSLambdaVersionConfigType]
ReadPrec CustomSMSLambdaVersionConfigType
Int -> ReadS CustomSMSLambdaVersionConfigType
ReadS [CustomSMSLambdaVersionConfigType]
(Int -> ReadS CustomSMSLambdaVersionConfigType)
-> ReadS [CustomSMSLambdaVersionConfigType]
-> ReadPrec CustomSMSLambdaVersionConfigType
-> ReadPrec [CustomSMSLambdaVersionConfigType]
-> Read CustomSMSLambdaVersionConfigType
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [CustomSMSLambdaVersionConfigType]
$creadListPrec :: ReadPrec [CustomSMSLambdaVersionConfigType]
readPrec :: ReadPrec CustomSMSLambdaVersionConfigType
$creadPrec :: ReadPrec CustomSMSLambdaVersionConfigType
readList :: ReadS [CustomSMSLambdaVersionConfigType]
$creadList :: ReadS [CustomSMSLambdaVersionConfigType]
readsPrec :: Int -> ReadS CustomSMSLambdaVersionConfigType
$creadsPrec :: Int -> ReadS CustomSMSLambdaVersionConfigType
Prelude.Read, Int -> CustomSMSLambdaVersionConfigType -> ShowS
[CustomSMSLambdaVersionConfigType] -> ShowS
CustomSMSLambdaVersionConfigType -> String
(Int -> CustomSMSLambdaVersionConfigType -> ShowS)
-> (CustomSMSLambdaVersionConfigType -> String)
-> ([CustomSMSLambdaVersionConfigType] -> ShowS)
-> Show CustomSMSLambdaVersionConfigType
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [CustomSMSLambdaVersionConfigType] -> ShowS
$cshowList :: [CustomSMSLambdaVersionConfigType] -> ShowS
show :: CustomSMSLambdaVersionConfigType -> String
$cshow :: CustomSMSLambdaVersionConfigType -> String
showsPrec :: Int -> CustomSMSLambdaVersionConfigType -> ShowS
$cshowsPrec :: Int -> CustomSMSLambdaVersionConfigType -> ShowS
Prelude.Show, (forall x.
CustomSMSLambdaVersionConfigType
-> Rep CustomSMSLambdaVersionConfigType x)
-> (forall x.
Rep CustomSMSLambdaVersionConfigType x
-> CustomSMSLambdaVersionConfigType)
-> Generic CustomSMSLambdaVersionConfigType
forall x.
Rep CustomSMSLambdaVersionConfigType x
-> CustomSMSLambdaVersionConfigType
forall x.
CustomSMSLambdaVersionConfigType
-> Rep CustomSMSLambdaVersionConfigType x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep CustomSMSLambdaVersionConfigType x
-> CustomSMSLambdaVersionConfigType
$cfrom :: forall x.
CustomSMSLambdaVersionConfigType
-> Rep CustomSMSLambdaVersionConfigType x
Prelude.Generic)
newCustomSMSLambdaVersionConfigType ::
CustomSMSSenderLambdaVersionType ->
Prelude.Text ->
CustomSMSLambdaVersionConfigType
newCustomSMSLambdaVersionConfigType :: CustomSMSSenderLambdaVersionType
-> Text -> CustomSMSLambdaVersionConfigType
newCustomSMSLambdaVersionConfigType
CustomSMSSenderLambdaVersionType
pLambdaVersion_
Text
pLambdaArn_ =
CustomSMSLambdaVersionConfigType' :: CustomSMSSenderLambdaVersionType
-> Text -> CustomSMSLambdaVersionConfigType
CustomSMSLambdaVersionConfigType'
{ $sel:lambdaVersion:CustomSMSLambdaVersionConfigType' :: CustomSMSSenderLambdaVersionType
lambdaVersion =
CustomSMSSenderLambdaVersionType
pLambdaVersion_,
$sel:lambdaArn:CustomSMSLambdaVersionConfigType' :: Text
lambdaArn = Text
pLambdaArn_
}
customSMSLambdaVersionConfigType_lambdaVersion :: Lens.Lens' CustomSMSLambdaVersionConfigType CustomSMSSenderLambdaVersionType
customSMSLambdaVersionConfigType_lambdaVersion :: (CustomSMSSenderLambdaVersionType
-> f CustomSMSSenderLambdaVersionType)
-> CustomSMSLambdaVersionConfigType
-> f CustomSMSLambdaVersionConfigType
customSMSLambdaVersionConfigType_lambdaVersion = (CustomSMSLambdaVersionConfigType
-> CustomSMSSenderLambdaVersionType)
-> (CustomSMSLambdaVersionConfigType
-> CustomSMSSenderLambdaVersionType
-> CustomSMSLambdaVersionConfigType)
-> Lens
CustomSMSLambdaVersionConfigType
CustomSMSLambdaVersionConfigType
CustomSMSSenderLambdaVersionType
CustomSMSSenderLambdaVersionType
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CustomSMSLambdaVersionConfigType' {CustomSMSSenderLambdaVersionType
lambdaVersion :: CustomSMSSenderLambdaVersionType
$sel:lambdaVersion:CustomSMSLambdaVersionConfigType' :: CustomSMSLambdaVersionConfigType
-> CustomSMSSenderLambdaVersionType
lambdaVersion} -> CustomSMSSenderLambdaVersionType
lambdaVersion) (\s :: CustomSMSLambdaVersionConfigType
s@CustomSMSLambdaVersionConfigType' {} CustomSMSSenderLambdaVersionType
a -> CustomSMSLambdaVersionConfigType
s {$sel:lambdaVersion:CustomSMSLambdaVersionConfigType' :: CustomSMSSenderLambdaVersionType
lambdaVersion = CustomSMSSenderLambdaVersionType
a} :: CustomSMSLambdaVersionConfigType)
customSMSLambdaVersionConfigType_lambdaArn :: Lens.Lens' CustomSMSLambdaVersionConfigType Prelude.Text
customSMSLambdaVersionConfigType_lambdaArn :: (Text -> f Text)
-> CustomSMSLambdaVersionConfigType
-> f CustomSMSLambdaVersionConfigType
customSMSLambdaVersionConfigType_lambdaArn = (CustomSMSLambdaVersionConfigType -> Text)
-> (CustomSMSLambdaVersionConfigType
-> Text -> CustomSMSLambdaVersionConfigType)
-> Lens
CustomSMSLambdaVersionConfigType
CustomSMSLambdaVersionConfigType
Text
Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CustomSMSLambdaVersionConfigType' {Text
lambdaArn :: Text
$sel:lambdaArn:CustomSMSLambdaVersionConfigType' :: CustomSMSLambdaVersionConfigType -> Text
lambdaArn} -> Text
lambdaArn) (\s :: CustomSMSLambdaVersionConfigType
s@CustomSMSLambdaVersionConfigType' {} Text
a -> CustomSMSLambdaVersionConfigType
s {$sel:lambdaArn:CustomSMSLambdaVersionConfigType' :: Text
lambdaArn = Text
a} :: CustomSMSLambdaVersionConfigType)
instance
Core.FromJSON
CustomSMSLambdaVersionConfigType
where
parseJSON :: Value -> Parser CustomSMSLambdaVersionConfigType
parseJSON =
String
-> (Object -> Parser CustomSMSLambdaVersionConfigType)
-> Value
-> Parser CustomSMSLambdaVersionConfigType
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Core.withObject
String
"CustomSMSLambdaVersionConfigType"
( \Object
x ->
CustomSMSSenderLambdaVersionType
-> Text -> CustomSMSLambdaVersionConfigType
CustomSMSLambdaVersionConfigType'
(CustomSMSSenderLambdaVersionType
-> Text -> CustomSMSLambdaVersionConfigType)
-> Parser CustomSMSSenderLambdaVersionType
-> Parser (Text -> CustomSMSLambdaVersionConfigType)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x Object -> Text -> Parser CustomSMSSenderLambdaVersionType
forall a. FromJSON a => Object -> Text -> Parser a
Core..: Text
"LambdaVersion")
Parser (Text -> CustomSMSLambdaVersionConfigType)
-> Parser Text -> Parser CustomSMSLambdaVersionConfigType
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
CustomSMSLambdaVersionConfigType
instance
Prelude.NFData
CustomSMSLambdaVersionConfigType
instance Core.ToJSON CustomSMSLambdaVersionConfigType where
toJSON :: CustomSMSLambdaVersionConfigType -> Value
toJSON CustomSMSLambdaVersionConfigType' {Text
CustomSMSSenderLambdaVersionType
lambdaArn :: Text
lambdaVersion :: CustomSMSSenderLambdaVersionType
$sel:lambdaArn:CustomSMSLambdaVersionConfigType' :: CustomSMSLambdaVersionConfigType -> Text
$sel:lambdaVersion:CustomSMSLambdaVersionConfigType' :: CustomSMSLambdaVersionConfigType
-> CustomSMSSenderLambdaVersionType
..} =
[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 -> CustomSMSSenderLambdaVersionType -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= CustomSMSSenderLambdaVersionType
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)
]
)