{-# 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.Core.Lens.Internal as Lens
import qualified Amazonka.Data as Data
import qualified Amazonka.Prelude as Prelude
data CustomSMSLambdaVersionConfigType = CustomSMSLambdaVersionConfigType'
{
CustomSMSLambdaVersionConfigType
-> CustomSMSSenderLambdaVersionType
lambdaVersion :: CustomSMSSenderLambdaVersionType,
CustomSMSLambdaVersionConfigType -> Text
lambdaArn :: Prelude.Text
}
deriving (CustomSMSLambdaVersionConfigType
-> CustomSMSLambdaVersionConfigType -> Bool
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]
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
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.
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'
{ $sel:lambdaVersion:CustomSMSLambdaVersionConfigType' :: CustomSMSSenderLambdaVersionType
lambdaVersion =
CustomSMSSenderLambdaVersionType
pLambdaVersion_,
$sel:lambdaArn:CustomSMSLambdaVersionConfigType' :: Text
lambdaArn = Text
pLambdaArn_
}
customSMSLambdaVersionConfigType_lambdaVersion :: Lens.Lens' CustomSMSLambdaVersionConfigType CustomSMSSenderLambdaVersionType
customSMSLambdaVersionConfigType_lambdaVersion :: Lens'
CustomSMSLambdaVersionConfigType CustomSMSSenderLambdaVersionType
customSMSLambdaVersionConfigType_lambdaVersion = 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 :: Lens' CustomSMSLambdaVersionConfigType Text
customSMSLambdaVersionConfigType_lambdaArn = 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
Data.FromJSON
CustomSMSLambdaVersionConfigType
where
parseJSON :: Value -> Parser CustomSMSLambdaVersionConfigType
parseJSON =
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Data.withObject
String
"CustomSMSLambdaVersionConfigType"
( \Object
x ->
CustomSMSSenderLambdaVersionType
-> Text -> CustomSMSLambdaVersionConfigType
CustomSMSLambdaVersionConfigType'
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x forall a. FromJSON a => Object -> Key -> Parser a
Data..: Key
"LambdaVersion")
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser a
Data..: Key
"LambdaArn")
)
instance
Prelude.Hashable
CustomSMSLambdaVersionConfigType
where
hashWithSalt :: Int -> CustomSMSLambdaVersionConfigType -> Int
hashWithSalt
Int
_salt
CustomSMSLambdaVersionConfigType' {Text
CustomSMSSenderLambdaVersionType
lambdaArn :: Text
lambdaVersion :: CustomSMSSenderLambdaVersionType
$sel:lambdaArn:CustomSMSLambdaVersionConfigType' :: CustomSMSLambdaVersionConfigType -> Text
$sel:lambdaVersion:CustomSMSLambdaVersionConfigType' :: CustomSMSLambdaVersionConfigType
-> CustomSMSSenderLambdaVersionType
..} =
Int
_salt
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` CustomSMSSenderLambdaVersionType
lambdaVersion
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Text
lambdaArn
instance
Prelude.NFData
CustomSMSLambdaVersionConfigType
where
rnf :: CustomSMSLambdaVersionConfigType -> ()
rnf CustomSMSLambdaVersionConfigType' {Text
CustomSMSSenderLambdaVersionType
lambdaArn :: Text
lambdaVersion :: CustomSMSSenderLambdaVersionType
$sel:lambdaArn:CustomSMSLambdaVersionConfigType' :: CustomSMSLambdaVersionConfigType -> Text
$sel:lambdaVersion:CustomSMSLambdaVersionConfigType' :: CustomSMSLambdaVersionConfigType
-> CustomSMSSenderLambdaVersionType
..} =
forall a. NFData a => a -> ()
Prelude.rnf CustomSMSSenderLambdaVersionType
lambdaVersion
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Text
lambdaArn
instance Data.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
Data.object
( forall a. [Maybe a] -> [a]
Prelude.catMaybes
[ forall a. a -> Maybe a
Prelude.Just
(Key
"LambdaVersion" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..= CustomSMSSenderLambdaVersionType
lambdaVersion),
forall a. a -> Maybe a
Prelude.Just (Key
"LambdaArn" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..= Text
lambdaArn)
]
)