{-# 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 #-}

-- Derived from AWS service descriptions, licensed under Apache 2.0.

-- |
-- Module      : Amazonka.CognitoIdentityProvider.Types.LambdaConfigType
-- Copyright   : (c) 2013-2023 Brendan Hay
-- License     : Mozilla Public License, v. 2.0.
-- Maintainer  : Brendan Hay
-- Stability   : auto-generated
-- Portability : non-portable (GHC extensions)
module Amazonka.CognitoIdentityProvider.Types.LambdaConfigType where

import Amazonka.CognitoIdentityProvider.Types.CustomEmailLambdaVersionConfigType
import Amazonka.CognitoIdentityProvider.Types.CustomSMSLambdaVersionConfigType
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

-- | Specifies the configuration for Lambda triggers.
--
-- /See:/ 'newLambdaConfigType' smart constructor.
data LambdaConfigType = LambdaConfigType'
  { -- | Creates an authentication challenge.
    LambdaConfigType -> Maybe Text
createAuthChallenge :: Prelude.Maybe Prelude.Text,
    -- | A custom email sender Lambda trigger.
    LambdaConfigType -> Maybe CustomEmailLambdaVersionConfigType
customEmailSender :: Prelude.Maybe CustomEmailLambdaVersionConfigType,
    -- | A custom Message Lambda trigger.
    LambdaConfigType -> Maybe Text
customMessage :: Prelude.Maybe Prelude.Text,
    -- | A custom SMS sender Lambda trigger.
    LambdaConfigType -> Maybe CustomSMSLambdaVersionConfigType
customSMSSender :: Prelude.Maybe CustomSMSLambdaVersionConfigType,
    -- | Defines the authentication challenge.
    LambdaConfigType -> Maybe Text
defineAuthChallenge :: Prelude.Maybe Prelude.Text,
    -- | The Amazon Resource Name (ARN) of an
    -- </kms/latest/developerguide/concepts.html#master_keys KMS key>. Amazon
    -- Cognito uses the key to encrypt codes and temporary passwords sent to
    -- @CustomEmailSender@ and @CustomSMSSender@.
    LambdaConfigType -> Maybe Text
kmsKeyID :: Prelude.Maybe Prelude.Text,
    -- | A post-authentication Lambda trigger.
    LambdaConfigType -> Maybe Text
postAuthentication :: Prelude.Maybe Prelude.Text,
    -- | A post-confirmation Lambda trigger.
    LambdaConfigType -> Maybe Text
postConfirmation :: Prelude.Maybe Prelude.Text,
    -- | A pre-authentication Lambda trigger.
    LambdaConfigType -> Maybe Text
preAuthentication :: Prelude.Maybe Prelude.Text,
    -- | A pre-registration Lambda trigger.
    LambdaConfigType -> Maybe Text
preSignUp :: Prelude.Maybe Prelude.Text,
    -- | A Lambda trigger that is invoked before token generation.
    LambdaConfigType -> Maybe Text
preTokenGeneration :: Prelude.Maybe Prelude.Text,
    -- | The user migration Lambda config type.
    LambdaConfigType -> Maybe Text
userMigration :: Prelude.Maybe Prelude.Text,
    -- | Verifies the authentication challenge response.
    LambdaConfigType -> Maybe Text
verifyAuthChallengeResponse :: Prelude.Maybe Prelude.Text
  }
  deriving (LambdaConfigType -> LambdaConfigType -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: LambdaConfigType -> LambdaConfigType -> Bool
$c/= :: LambdaConfigType -> LambdaConfigType -> Bool
== :: LambdaConfigType -> LambdaConfigType -> Bool
$c== :: LambdaConfigType -> LambdaConfigType -> Bool
Prelude.Eq, ReadPrec [LambdaConfigType]
ReadPrec LambdaConfigType
Int -> ReadS LambdaConfigType
ReadS [LambdaConfigType]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [LambdaConfigType]
$creadListPrec :: ReadPrec [LambdaConfigType]
readPrec :: ReadPrec LambdaConfigType
$creadPrec :: ReadPrec LambdaConfigType
readList :: ReadS [LambdaConfigType]
$creadList :: ReadS [LambdaConfigType]
readsPrec :: Int -> ReadS LambdaConfigType
$creadsPrec :: Int -> ReadS LambdaConfigType
Prelude.Read, Int -> LambdaConfigType -> ShowS
[LambdaConfigType] -> ShowS
LambdaConfigType -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [LambdaConfigType] -> ShowS
$cshowList :: [LambdaConfigType] -> ShowS
show :: LambdaConfigType -> String
$cshow :: LambdaConfigType -> String
showsPrec :: Int -> LambdaConfigType -> ShowS
$cshowsPrec :: Int -> LambdaConfigType -> ShowS
Prelude.Show, forall x. Rep LambdaConfigType x -> LambdaConfigType
forall x. LambdaConfigType -> Rep LambdaConfigType x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep LambdaConfigType x -> LambdaConfigType
$cfrom :: forall x. LambdaConfigType -> Rep LambdaConfigType x
Prelude.Generic)

-- |
-- Create a value of 'LambdaConfigType' with all optional fields omitted.
--
-- Use <https://hackage.haskell.org/package/generic-lens generic-lens> or <https://hackage.haskell.org/package/optics optics> to modify other optional fields.
--
-- The following record fields are available, with the corresponding lenses provided
-- for backwards compatibility:
--
-- 'createAuthChallenge', 'lambdaConfigType_createAuthChallenge' - Creates an authentication challenge.
--
-- 'customEmailSender', 'lambdaConfigType_customEmailSender' - A custom email sender Lambda trigger.
--
-- 'customMessage', 'lambdaConfigType_customMessage' - A custom Message Lambda trigger.
--
-- 'customSMSSender', 'lambdaConfigType_customSMSSender' - A custom SMS sender Lambda trigger.
--
-- 'defineAuthChallenge', 'lambdaConfigType_defineAuthChallenge' - Defines the authentication challenge.
--
-- 'kmsKeyID', 'lambdaConfigType_kmsKeyID' - The Amazon Resource Name (ARN) of an
-- </kms/latest/developerguide/concepts.html#master_keys KMS key>. Amazon
-- Cognito uses the key to encrypt codes and temporary passwords sent to
-- @CustomEmailSender@ and @CustomSMSSender@.
--
-- 'postAuthentication', 'lambdaConfigType_postAuthentication' - A post-authentication Lambda trigger.
--
-- 'postConfirmation', 'lambdaConfigType_postConfirmation' - A post-confirmation Lambda trigger.
--
-- 'preAuthentication', 'lambdaConfigType_preAuthentication' - A pre-authentication Lambda trigger.
--
-- 'preSignUp', 'lambdaConfigType_preSignUp' - A pre-registration Lambda trigger.
--
-- 'preTokenGeneration', 'lambdaConfigType_preTokenGeneration' - A Lambda trigger that is invoked before token generation.
--
-- 'userMigration', 'lambdaConfigType_userMigration' - The user migration Lambda config type.
--
-- 'verifyAuthChallengeResponse', 'lambdaConfigType_verifyAuthChallengeResponse' - Verifies the authentication challenge response.
newLambdaConfigType ::
  LambdaConfigType
newLambdaConfigType :: LambdaConfigType
newLambdaConfigType =
  LambdaConfigType'
    { $sel:createAuthChallenge:LambdaConfigType' :: Maybe Text
createAuthChallenge =
        forall a. Maybe a
Prelude.Nothing,
      $sel:customEmailSender:LambdaConfigType' :: Maybe CustomEmailLambdaVersionConfigType
customEmailSender = forall a. Maybe a
Prelude.Nothing,
      $sel:customMessage:LambdaConfigType' :: Maybe Text
customMessage = forall a. Maybe a
Prelude.Nothing,
      $sel:customSMSSender:LambdaConfigType' :: Maybe CustomSMSLambdaVersionConfigType
customSMSSender = forall a. Maybe a
Prelude.Nothing,
      $sel:defineAuthChallenge:LambdaConfigType' :: Maybe Text
defineAuthChallenge = forall a. Maybe a
Prelude.Nothing,
      $sel:kmsKeyID:LambdaConfigType' :: Maybe Text
kmsKeyID = forall a. Maybe a
Prelude.Nothing,
      $sel:postAuthentication:LambdaConfigType' :: Maybe Text
postAuthentication = forall a. Maybe a
Prelude.Nothing,
      $sel:postConfirmation:LambdaConfigType' :: Maybe Text
postConfirmation = forall a. Maybe a
Prelude.Nothing,
      $sel:preAuthentication:LambdaConfigType' :: Maybe Text
preAuthentication = forall a. Maybe a
Prelude.Nothing,
      $sel:preSignUp:LambdaConfigType' :: Maybe Text
preSignUp = forall a. Maybe a
Prelude.Nothing,
      $sel:preTokenGeneration:LambdaConfigType' :: Maybe Text
preTokenGeneration = forall a. Maybe a
Prelude.Nothing,
      $sel:userMigration:LambdaConfigType' :: Maybe Text
userMigration = forall a. Maybe a
Prelude.Nothing,
      $sel:verifyAuthChallengeResponse:LambdaConfigType' :: Maybe Text
verifyAuthChallengeResponse = forall a. Maybe a
Prelude.Nothing
    }

-- | Creates an authentication challenge.
lambdaConfigType_createAuthChallenge :: Lens.Lens' LambdaConfigType (Prelude.Maybe Prelude.Text)
lambdaConfigType_createAuthChallenge :: Lens' LambdaConfigType (Maybe Text)
lambdaConfigType_createAuthChallenge = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\LambdaConfigType' {Maybe Text
createAuthChallenge :: Maybe Text
$sel:createAuthChallenge:LambdaConfigType' :: LambdaConfigType -> Maybe Text
createAuthChallenge} -> Maybe Text
createAuthChallenge) (\s :: LambdaConfigType
s@LambdaConfigType' {} Maybe Text
a -> LambdaConfigType
s {$sel:createAuthChallenge:LambdaConfigType' :: Maybe Text
createAuthChallenge = Maybe Text
a} :: LambdaConfigType)

-- | A custom email sender Lambda trigger.
lambdaConfigType_customEmailSender :: Lens.Lens' LambdaConfigType (Prelude.Maybe CustomEmailLambdaVersionConfigType)
lambdaConfigType_customEmailSender :: Lens' LambdaConfigType (Maybe CustomEmailLambdaVersionConfigType)
lambdaConfigType_customEmailSender = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\LambdaConfigType' {Maybe CustomEmailLambdaVersionConfigType
customEmailSender :: Maybe CustomEmailLambdaVersionConfigType
$sel:customEmailSender:LambdaConfigType' :: LambdaConfigType -> Maybe CustomEmailLambdaVersionConfigType
customEmailSender} -> Maybe CustomEmailLambdaVersionConfigType
customEmailSender) (\s :: LambdaConfigType
s@LambdaConfigType' {} Maybe CustomEmailLambdaVersionConfigType
a -> LambdaConfigType
s {$sel:customEmailSender:LambdaConfigType' :: Maybe CustomEmailLambdaVersionConfigType
customEmailSender = Maybe CustomEmailLambdaVersionConfigType
a} :: LambdaConfigType)

-- | A custom Message Lambda trigger.
lambdaConfigType_customMessage :: Lens.Lens' LambdaConfigType (Prelude.Maybe Prelude.Text)
lambdaConfigType_customMessage :: Lens' LambdaConfigType (Maybe Text)
lambdaConfigType_customMessage = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\LambdaConfigType' {Maybe Text
customMessage :: Maybe Text
$sel:customMessage:LambdaConfigType' :: LambdaConfigType -> Maybe Text
customMessage} -> Maybe Text
customMessage) (\s :: LambdaConfigType
s@LambdaConfigType' {} Maybe Text
a -> LambdaConfigType
s {$sel:customMessage:LambdaConfigType' :: Maybe Text
customMessage = Maybe Text
a} :: LambdaConfigType)

-- | A custom SMS sender Lambda trigger.
lambdaConfigType_customSMSSender :: Lens.Lens' LambdaConfigType (Prelude.Maybe CustomSMSLambdaVersionConfigType)
lambdaConfigType_customSMSSender :: Lens' LambdaConfigType (Maybe CustomSMSLambdaVersionConfigType)
lambdaConfigType_customSMSSender = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\LambdaConfigType' {Maybe CustomSMSLambdaVersionConfigType
customSMSSender :: Maybe CustomSMSLambdaVersionConfigType
$sel:customSMSSender:LambdaConfigType' :: LambdaConfigType -> Maybe CustomSMSLambdaVersionConfigType
customSMSSender} -> Maybe CustomSMSLambdaVersionConfigType
customSMSSender) (\s :: LambdaConfigType
s@LambdaConfigType' {} Maybe CustomSMSLambdaVersionConfigType
a -> LambdaConfigType
s {$sel:customSMSSender:LambdaConfigType' :: Maybe CustomSMSLambdaVersionConfigType
customSMSSender = Maybe CustomSMSLambdaVersionConfigType
a} :: LambdaConfigType)

-- | Defines the authentication challenge.
lambdaConfigType_defineAuthChallenge :: Lens.Lens' LambdaConfigType (Prelude.Maybe Prelude.Text)
lambdaConfigType_defineAuthChallenge :: Lens' LambdaConfigType (Maybe Text)
lambdaConfigType_defineAuthChallenge = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\LambdaConfigType' {Maybe Text
defineAuthChallenge :: Maybe Text
$sel:defineAuthChallenge:LambdaConfigType' :: LambdaConfigType -> Maybe Text
defineAuthChallenge} -> Maybe Text
defineAuthChallenge) (\s :: LambdaConfigType
s@LambdaConfigType' {} Maybe Text
a -> LambdaConfigType
s {$sel:defineAuthChallenge:LambdaConfigType' :: Maybe Text
defineAuthChallenge = Maybe Text
a} :: LambdaConfigType)

-- | The Amazon Resource Name (ARN) of an
-- </kms/latest/developerguide/concepts.html#master_keys KMS key>. Amazon
-- Cognito uses the key to encrypt codes and temporary passwords sent to
-- @CustomEmailSender@ and @CustomSMSSender@.
lambdaConfigType_kmsKeyID :: Lens.Lens' LambdaConfigType (Prelude.Maybe Prelude.Text)
lambdaConfigType_kmsKeyID :: Lens' LambdaConfigType (Maybe Text)
lambdaConfigType_kmsKeyID = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\LambdaConfigType' {Maybe Text
kmsKeyID :: Maybe Text
$sel:kmsKeyID:LambdaConfigType' :: LambdaConfigType -> Maybe Text
kmsKeyID} -> Maybe Text
kmsKeyID) (\s :: LambdaConfigType
s@LambdaConfigType' {} Maybe Text
a -> LambdaConfigType
s {$sel:kmsKeyID:LambdaConfigType' :: Maybe Text
kmsKeyID = Maybe Text
a} :: LambdaConfigType)

-- | A post-authentication Lambda trigger.
lambdaConfigType_postAuthentication :: Lens.Lens' LambdaConfigType (Prelude.Maybe Prelude.Text)
lambdaConfigType_postAuthentication :: Lens' LambdaConfigType (Maybe Text)
lambdaConfigType_postAuthentication = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\LambdaConfigType' {Maybe Text
postAuthentication :: Maybe Text
$sel:postAuthentication:LambdaConfigType' :: LambdaConfigType -> Maybe Text
postAuthentication} -> Maybe Text
postAuthentication) (\s :: LambdaConfigType
s@LambdaConfigType' {} Maybe Text
a -> LambdaConfigType
s {$sel:postAuthentication:LambdaConfigType' :: Maybe Text
postAuthentication = Maybe Text
a} :: LambdaConfigType)

-- | A post-confirmation Lambda trigger.
lambdaConfigType_postConfirmation :: Lens.Lens' LambdaConfigType (Prelude.Maybe Prelude.Text)
lambdaConfigType_postConfirmation :: Lens' LambdaConfigType (Maybe Text)
lambdaConfigType_postConfirmation = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\LambdaConfigType' {Maybe Text
postConfirmation :: Maybe Text
$sel:postConfirmation:LambdaConfigType' :: LambdaConfigType -> Maybe Text
postConfirmation} -> Maybe Text
postConfirmation) (\s :: LambdaConfigType
s@LambdaConfigType' {} Maybe Text
a -> LambdaConfigType
s {$sel:postConfirmation:LambdaConfigType' :: Maybe Text
postConfirmation = Maybe Text
a} :: LambdaConfigType)

-- | A pre-authentication Lambda trigger.
lambdaConfigType_preAuthentication :: Lens.Lens' LambdaConfigType (Prelude.Maybe Prelude.Text)
lambdaConfigType_preAuthentication :: Lens' LambdaConfigType (Maybe Text)
lambdaConfigType_preAuthentication = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\LambdaConfigType' {Maybe Text
preAuthentication :: Maybe Text
$sel:preAuthentication:LambdaConfigType' :: LambdaConfigType -> Maybe Text
preAuthentication} -> Maybe Text
preAuthentication) (\s :: LambdaConfigType
s@LambdaConfigType' {} Maybe Text
a -> LambdaConfigType
s {$sel:preAuthentication:LambdaConfigType' :: Maybe Text
preAuthentication = Maybe Text
a} :: LambdaConfigType)

-- | A pre-registration Lambda trigger.
lambdaConfigType_preSignUp :: Lens.Lens' LambdaConfigType (Prelude.Maybe Prelude.Text)
lambdaConfigType_preSignUp :: Lens' LambdaConfigType (Maybe Text)
lambdaConfigType_preSignUp = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\LambdaConfigType' {Maybe Text
preSignUp :: Maybe Text
$sel:preSignUp:LambdaConfigType' :: LambdaConfigType -> Maybe Text
preSignUp} -> Maybe Text
preSignUp) (\s :: LambdaConfigType
s@LambdaConfigType' {} Maybe Text
a -> LambdaConfigType
s {$sel:preSignUp:LambdaConfigType' :: Maybe Text
preSignUp = Maybe Text
a} :: LambdaConfigType)

-- | A Lambda trigger that is invoked before token generation.
lambdaConfigType_preTokenGeneration :: Lens.Lens' LambdaConfigType (Prelude.Maybe Prelude.Text)
lambdaConfigType_preTokenGeneration :: Lens' LambdaConfigType (Maybe Text)
lambdaConfigType_preTokenGeneration = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\LambdaConfigType' {Maybe Text
preTokenGeneration :: Maybe Text
$sel:preTokenGeneration:LambdaConfigType' :: LambdaConfigType -> Maybe Text
preTokenGeneration} -> Maybe Text
preTokenGeneration) (\s :: LambdaConfigType
s@LambdaConfigType' {} Maybe Text
a -> LambdaConfigType
s {$sel:preTokenGeneration:LambdaConfigType' :: Maybe Text
preTokenGeneration = Maybe Text
a} :: LambdaConfigType)

-- | The user migration Lambda config type.
lambdaConfigType_userMigration :: Lens.Lens' LambdaConfigType (Prelude.Maybe Prelude.Text)
lambdaConfigType_userMigration :: Lens' LambdaConfigType (Maybe Text)
lambdaConfigType_userMigration = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\LambdaConfigType' {Maybe Text
userMigration :: Maybe Text
$sel:userMigration:LambdaConfigType' :: LambdaConfigType -> Maybe Text
userMigration} -> Maybe Text
userMigration) (\s :: LambdaConfigType
s@LambdaConfigType' {} Maybe Text
a -> LambdaConfigType
s {$sel:userMigration:LambdaConfigType' :: Maybe Text
userMigration = Maybe Text
a} :: LambdaConfigType)

-- | Verifies the authentication challenge response.
lambdaConfigType_verifyAuthChallengeResponse :: Lens.Lens' LambdaConfigType (Prelude.Maybe Prelude.Text)
lambdaConfigType_verifyAuthChallengeResponse :: Lens' LambdaConfigType (Maybe Text)
lambdaConfigType_verifyAuthChallengeResponse = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\LambdaConfigType' {Maybe Text
verifyAuthChallengeResponse :: Maybe Text
$sel:verifyAuthChallengeResponse:LambdaConfigType' :: LambdaConfigType -> Maybe Text
verifyAuthChallengeResponse} -> Maybe Text
verifyAuthChallengeResponse) (\s :: LambdaConfigType
s@LambdaConfigType' {} Maybe Text
a -> LambdaConfigType
s {$sel:verifyAuthChallengeResponse:LambdaConfigType' :: Maybe Text
verifyAuthChallengeResponse = Maybe Text
a} :: LambdaConfigType)

instance Data.FromJSON LambdaConfigType where
  parseJSON :: Value -> Parser LambdaConfigType
parseJSON =
    forall a. String -> (Object -> Parser a) -> Value -> Parser a
Data.withObject
      String
"LambdaConfigType"
      ( \Object
x ->
          Maybe Text
-> Maybe CustomEmailLambdaVersionConfigType
-> Maybe Text
-> Maybe CustomSMSLambdaVersionConfigType
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> LambdaConfigType
LambdaConfigType'
            forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"CreateAuthChallenge")
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"CustomEmailSender")
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"CustomMessage")
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"CustomSMSSender")
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"DefineAuthChallenge")
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"KMSKeyID")
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"PostAuthentication")
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"PostConfirmation")
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"PreAuthentication")
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"PreSignUp")
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"PreTokenGeneration")
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"UserMigration")
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"VerifyAuthChallengeResponse")
      )

instance Prelude.Hashable LambdaConfigType where
  hashWithSalt :: Int -> LambdaConfigType -> Int
hashWithSalt Int
_salt LambdaConfigType' {Maybe Text
Maybe CustomEmailLambdaVersionConfigType
Maybe CustomSMSLambdaVersionConfigType
verifyAuthChallengeResponse :: Maybe Text
userMigration :: Maybe Text
preTokenGeneration :: Maybe Text
preSignUp :: Maybe Text
preAuthentication :: Maybe Text
postConfirmation :: Maybe Text
postAuthentication :: Maybe Text
kmsKeyID :: Maybe Text
defineAuthChallenge :: Maybe Text
customSMSSender :: Maybe CustomSMSLambdaVersionConfigType
customMessage :: Maybe Text
customEmailSender :: Maybe CustomEmailLambdaVersionConfigType
createAuthChallenge :: Maybe Text
$sel:verifyAuthChallengeResponse:LambdaConfigType' :: LambdaConfigType -> Maybe Text
$sel:userMigration:LambdaConfigType' :: LambdaConfigType -> Maybe Text
$sel:preTokenGeneration:LambdaConfigType' :: LambdaConfigType -> Maybe Text
$sel:preSignUp:LambdaConfigType' :: LambdaConfigType -> Maybe Text
$sel:preAuthentication:LambdaConfigType' :: LambdaConfigType -> Maybe Text
$sel:postConfirmation:LambdaConfigType' :: LambdaConfigType -> Maybe Text
$sel:postAuthentication:LambdaConfigType' :: LambdaConfigType -> Maybe Text
$sel:kmsKeyID:LambdaConfigType' :: LambdaConfigType -> Maybe Text
$sel:defineAuthChallenge:LambdaConfigType' :: LambdaConfigType -> Maybe Text
$sel:customSMSSender:LambdaConfigType' :: LambdaConfigType -> Maybe CustomSMSLambdaVersionConfigType
$sel:customMessage:LambdaConfigType' :: LambdaConfigType -> Maybe Text
$sel:customEmailSender:LambdaConfigType' :: LambdaConfigType -> Maybe CustomEmailLambdaVersionConfigType
$sel:createAuthChallenge:LambdaConfigType' :: LambdaConfigType -> Maybe Text
..} =
    Int
_salt
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
createAuthChallenge
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe CustomEmailLambdaVersionConfigType
customEmailSender
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
customMessage
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe CustomSMSLambdaVersionConfigType
customSMSSender
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
defineAuthChallenge
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
kmsKeyID
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
postAuthentication
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
postConfirmation
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
preAuthentication
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
preSignUp
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
preTokenGeneration
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
userMigration
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
verifyAuthChallengeResponse

instance Prelude.NFData LambdaConfigType where
  rnf :: LambdaConfigType -> ()
rnf LambdaConfigType' {Maybe Text
Maybe CustomEmailLambdaVersionConfigType
Maybe CustomSMSLambdaVersionConfigType
verifyAuthChallengeResponse :: Maybe Text
userMigration :: Maybe Text
preTokenGeneration :: Maybe Text
preSignUp :: Maybe Text
preAuthentication :: Maybe Text
postConfirmation :: Maybe Text
postAuthentication :: Maybe Text
kmsKeyID :: Maybe Text
defineAuthChallenge :: Maybe Text
customSMSSender :: Maybe CustomSMSLambdaVersionConfigType
customMessage :: Maybe Text
customEmailSender :: Maybe CustomEmailLambdaVersionConfigType
createAuthChallenge :: Maybe Text
$sel:verifyAuthChallengeResponse:LambdaConfigType' :: LambdaConfigType -> Maybe Text
$sel:userMigration:LambdaConfigType' :: LambdaConfigType -> Maybe Text
$sel:preTokenGeneration:LambdaConfigType' :: LambdaConfigType -> Maybe Text
$sel:preSignUp:LambdaConfigType' :: LambdaConfigType -> Maybe Text
$sel:preAuthentication:LambdaConfigType' :: LambdaConfigType -> Maybe Text
$sel:postConfirmation:LambdaConfigType' :: LambdaConfigType -> Maybe Text
$sel:postAuthentication:LambdaConfigType' :: LambdaConfigType -> Maybe Text
$sel:kmsKeyID:LambdaConfigType' :: LambdaConfigType -> Maybe Text
$sel:defineAuthChallenge:LambdaConfigType' :: LambdaConfigType -> Maybe Text
$sel:customSMSSender:LambdaConfigType' :: LambdaConfigType -> Maybe CustomSMSLambdaVersionConfigType
$sel:customMessage:LambdaConfigType' :: LambdaConfigType -> Maybe Text
$sel:customEmailSender:LambdaConfigType' :: LambdaConfigType -> Maybe CustomEmailLambdaVersionConfigType
$sel:createAuthChallenge:LambdaConfigType' :: LambdaConfigType -> Maybe Text
..} =
    forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
createAuthChallenge
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe CustomEmailLambdaVersionConfigType
customEmailSender
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
customMessage
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe CustomSMSLambdaVersionConfigType
customSMSSender
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
defineAuthChallenge
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
kmsKeyID
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
postAuthentication
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
postConfirmation
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
preAuthentication
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
preSignUp
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
preTokenGeneration
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
userMigration
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
verifyAuthChallengeResponse

instance Data.ToJSON LambdaConfigType where
  toJSON :: LambdaConfigType -> Value
toJSON LambdaConfigType' {Maybe Text
Maybe CustomEmailLambdaVersionConfigType
Maybe CustomSMSLambdaVersionConfigType
verifyAuthChallengeResponse :: Maybe Text
userMigration :: Maybe Text
preTokenGeneration :: Maybe Text
preSignUp :: Maybe Text
preAuthentication :: Maybe Text
postConfirmation :: Maybe Text
postAuthentication :: Maybe Text
kmsKeyID :: Maybe Text
defineAuthChallenge :: Maybe Text
customSMSSender :: Maybe CustomSMSLambdaVersionConfigType
customMessage :: Maybe Text
customEmailSender :: Maybe CustomEmailLambdaVersionConfigType
createAuthChallenge :: Maybe Text
$sel:verifyAuthChallengeResponse:LambdaConfigType' :: LambdaConfigType -> Maybe Text
$sel:userMigration:LambdaConfigType' :: LambdaConfigType -> Maybe Text
$sel:preTokenGeneration:LambdaConfigType' :: LambdaConfigType -> Maybe Text
$sel:preSignUp:LambdaConfigType' :: LambdaConfigType -> Maybe Text
$sel:preAuthentication:LambdaConfigType' :: LambdaConfigType -> Maybe Text
$sel:postConfirmation:LambdaConfigType' :: LambdaConfigType -> Maybe Text
$sel:postAuthentication:LambdaConfigType' :: LambdaConfigType -> Maybe Text
$sel:kmsKeyID:LambdaConfigType' :: LambdaConfigType -> Maybe Text
$sel:defineAuthChallenge:LambdaConfigType' :: LambdaConfigType -> Maybe Text
$sel:customSMSSender:LambdaConfigType' :: LambdaConfigType -> Maybe CustomSMSLambdaVersionConfigType
$sel:customMessage:LambdaConfigType' :: LambdaConfigType -> Maybe Text
$sel:customEmailSender:LambdaConfigType' :: LambdaConfigType -> Maybe CustomEmailLambdaVersionConfigType
$sel:createAuthChallenge:LambdaConfigType' :: LambdaConfigType -> Maybe Text
..} =
    [Pair] -> Value
Data.object
      ( forall a. [Maybe a] -> [a]
Prelude.catMaybes
          [ (Key
"CreateAuthChallenge" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=)
              forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Text
createAuthChallenge,
            (Key
"CustomEmailSender" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=)
              forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe CustomEmailLambdaVersionConfigType
customEmailSender,
            (Key
"CustomMessage" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=) forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Text
customMessage,
            (Key
"CustomSMSSender" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=)
              forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe CustomSMSLambdaVersionConfigType
customSMSSender,
            (Key
"DefineAuthChallenge" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=)
              forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Text
defineAuthChallenge,
            (Key
"KMSKeyID" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=) forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Text
kmsKeyID,
            (Key
"PostAuthentication" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=)
              forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Text
postAuthentication,
            (Key
"PostConfirmation" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=)
              forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Text
postConfirmation,
            (Key
"PreAuthentication" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=)
              forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Text
preAuthentication,
            (Key
"PreSignUp" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=) forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Text
preSignUp,
            (Key
"PreTokenGeneration" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=)
              forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Text
preTokenGeneration,
            (Key
"UserMigration" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=) forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Text
userMigration,
            (Key
"VerifyAuthChallengeResponse" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=)
              forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Text
verifyAuthChallengeResponse
          ]
      )