{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE DuplicateRecordFields #-}
{-# LANGUAGE NamedFieldPuns #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE RecordWildCards #-}
{-# LANGUAGE StrictData #-}
{-# LANGUAGE TypeFamilies #-}
{-# LANGUAGE NoImplicitPrelude #-}
{-# OPTIONS_GHC -fno-warn-unused-binds #-}
{-# OPTIONS_GHC -fno-warn-unused-imports #-}
{-# OPTIONS_GHC -fno-warn-unused-matches #-}
module Amazonka.CognitoIdentityProvider.CreateUserPool
(
CreateUserPool (..),
newCreateUserPool,
createUserPool_userPoolTags,
createUserPool_verificationMessageTemplate,
createUserPool_emailVerificationMessage,
createUserPool_smsAuthenticationMessage,
createUserPool_userPoolAddOns,
createUserPool_emailVerificationSubject,
createUserPool_usernameAttributes,
createUserPool_aliasAttributes,
createUserPool_schema,
createUserPool_accountRecoverySetting,
createUserPool_emailConfiguration,
createUserPool_smsVerificationMessage,
createUserPool_mfaConfiguration,
createUserPool_lambdaConfig,
createUserPool_smsConfiguration,
createUserPool_adminCreateUserConfig,
createUserPool_deviceConfiguration,
createUserPool_autoVerifiedAttributes,
createUserPool_policies,
createUserPool_usernameConfiguration,
createUserPool_poolName,
CreateUserPoolResponse (..),
newCreateUserPoolResponse,
createUserPoolResponse_userPool,
createUserPoolResponse_httpStatus,
)
where
import Amazonka.CognitoIdentityProvider.Types
import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude
import qualified Amazonka.Request as Request
import qualified Amazonka.Response as Response
data CreateUserPool = CreateUserPool'
{
CreateUserPool -> Maybe (HashMap Text Text)
userPoolTags :: Prelude.Maybe (Prelude.HashMap Prelude.Text Prelude.Text),
CreateUserPool -> Maybe VerificationMessageTemplateType
verificationMessageTemplate :: Prelude.Maybe VerificationMessageTemplateType,
CreateUserPool -> Maybe Text
emailVerificationMessage :: Prelude.Maybe Prelude.Text,
CreateUserPool -> Maybe Text
smsAuthenticationMessage :: Prelude.Maybe Prelude.Text,
CreateUserPool -> Maybe UserPoolAddOnsType
userPoolAddOns :: Prelude.Maybe UserPoolAddOnsType,
CreateUserPool -> Maybe Text
emailVerificationSubject :: Prelude.Maybe Prelude.Text,
CreateUserPool -> Maybe [UsernameAttributeType]
usernameAttributes :: Prelude.Maybe [UsernameAttributeType],
CreateUserPool -> Maybe [AliasAttributeType]
aliasAttributes :: Prelude.Maybe [AliasAttributeType],
CreateUserPool -> Maybe (NonEmpty SchemaAttributeType)
schema :: Prelude.Maybe (Prelude.NonEmpty SchemaAttributeType),
CreateUserPool -> Maybe AccountRecoverySettingType
accountRecoverySetting :: Prelude.Maybe AccountRecoverySettingType,
CreateUserPool -> Maybe EmailConfigurationType
emailConfiguration :: Prelude.Maybe EmailConfigurationType,
CreateUserPool -> Maybe Text
smsVerificationMessage :: Prelude.Maybe Prelude.Text,
CreateUserPool -> Maybe UserPoolMfaType
mfaConfiguration :: Prelude.Maybe UserPoolMfaType,
CreateUserPool -> Maybe LambdaConfigType
lambdaConfig :: Prelude.Maybe LambdaConfigType,
CreateUserPool -> Maybe SmsConfigurationType
smsConfiguration :: Prelude.Maybe SmsConfigurationType,
CreateUserPool -> Maybe AdminCreateUserConfigType
adminCreateUserConfig :: Prelude.Maybe AdminCreateUserConfigType,
CreateUserPool -> Maybe DeviceConfigurationType
deviceConfiguration :: Prelude.Maybe DeviceConfigurationType,
CreateUserPool -> Maybe [VerifiedAttributeType]
autoVerifiedAttributes :: Prelude.Maybe [VerifiedAttributeType],
CreateUserPool -> Maybe UserPoolPolicyType
policies :: Prelude.Maybe UserPoolPolicyType,
CreateUserPool -> Maybe UsernameConfigurationType
usernameConfiguration :: Prelude.Maybe UsernameConfigurationType,
CreateUserPool -> Text
poolName :: Prelude.Text
}
deriving (CreateUserPool -> CreateUserPool -> Bool
(CreateUserPool -> CreateUserPool -> Bool)
-> (CreateUserPool -> CreateUserPool -> Bool) -> Eq CreateUserPool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: CreateUserPool -> CreateUserPool -> Bool
$c/= :: CreateUserPool -> CreateUserPool -> Bool
== :: CreateUserPool -> CreateUserPool -> Bool
$c== :: CreateUserPool -> CreateUserPool -> Bool
Prelude.Eq, ReadPrec [CreateUserPool]
ReadPrec CreateUserPool
Int -> ReadS CreateUserPool
ReadS [CreateUserPool]
(Int -> ReadS CreateUserPool)
-> ReadS [CreateUserPool]
-> ReadPrec CreateUserPool
-> ReadPrec [CreateUserPool]
-> Read CreateUserPool
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [CreateUserPool]
$creadListPrec :: ReadPrec [CreateUserPool]
readPrec :: ReadPrec CreateUserPool
$creadPrec :: ReadPrec CreateUserPool
readList :: ReadS [CreateUserPool]
$creadList :: ReadS [CreateUserPool]
readsPrec :: Int -> ReadS CreateUserPool
$creadsPrec :: Int -> ReadS CreateUserPool
Prelude.Read, Int -> CreateUserPool -> ShowS
[CreateUserPool] -> ShowS
CreateUserPool -> String
(Int -> CreateUserPool -> ShowS)
-> (CreateUserPool -> String)
-> ([CreateUserPool] -> ShowS)
-> Show CreateUserPool
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [CreateUserPool] -> ShowS
$cshowList :: [CreateUserPool] -> ShowS
show :: CreateUserPool -> String
$cshow :: CreateUserPool -> String
showsPrec :: Int -> CreateUserPool -> ShowS
$cshowsPrec :: Int -> CreateUserPool -> ShowS
Prelude.Show, (forall x. CreateUserPool -> Rep CreateUserPool x)
-> (forall x. Rep CreateUserPool x -> CreateUserPool)
-> Generic CreateUserPool
forall x. Rep CreateUserPool x -> CreateUserPool
forall x. CreateUserPool -> Rep CreateUserPool x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep CreateUserPool x -> CreateUserPool
$cfrom :: forall x. CreateUserPool -> Rep CreateUserPool x
Prelude.Generic)
newCreateUserPool ::
Prelude.Text ->
CreateUserPool
newCreateUserPool :: Text -> CreateUserPool
newCreateUserPool Text
pPoolName_ =
CreateUserPool' :: Maybe (HashMap Text Text)
-> Maybe VerificationMessageTemplateType
-> Maybe Text
-> Maybe Text
-> Maybe UserPoolAddOnsType
-> Maybe Text
-> Maybe [UsernameAttributeType]
-> Maybe [AliasAttributeType]
-> Maybe (NonEmpty SchemaAttributeType)
-> Maybe AccountRecoverySettingType
-> Maybe EmailConfigurationType
-> Maybe Text
-> Maybe UserPoolMfaType
-> Maybe LambdaConfigType
-> Maybe SmsConfigurationType
-> Maybe AdminCreateUserConfigType
-> Maybe DeviceConfigurationType
-> Maybe [VerifiedAttributeType]
-> Maybe UserPoolPolicyType
-> Maybe UsernameConfigurationType
-> Text
-> CreateUserPool
CreateUserPool'
{ $sel:userPoolTags:CreateUserPool' :: Maybe (HashMap Text Text)
userPoolTags = Maybe (HashMap Text Text)
forall a. Maybe a
Prelude.Nothing,
$sel:verificationMessageTemplate:CreateUserPool' :: Maybe VerificationMessageTemplateType
verificationMessageTemplate = Maybe VerificationMessageTemplateType
forall a. Maybe a
Prelude.Nothing,
$sel:emailVerificationMessage:CreateUserPool' :: Maybe Text
emailVerificationMessage = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:smsAuthenticationMessage:CreateUserPool' :: Maybe Text
smsAuthenticationMessage = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:userPoolAddOns:CreateUserPool' :: Maybe UserPoolAddOnsType
userPoolAddOns = Maybe UserPoolAddOnsType
forall a. Maybe a
Prelude.Nothing,
$sel:emailVerificationSubject:CreateUserPool' :: Maybe Text
emailVerificationSubject = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:usernameAttributes:CreateUserPool' :: Maybe [UsernameAttributeType]
usernameAttributes = Maybe [UsernameAttributeType]
forall a. Maybe a
Prelude.Nothing,
$sel:aliasAttributes:CreateUserPool' :: Maybe [AliasAttributeType]
aliasAttributes = Maybe [AliasAttributeType]
forall a. Maybe a
Prelude.Nothing,
$sel:schema:CreateUserPool' :: Maybe (NonEmpty SchemaAttributeType)
schema = Maybe (NonEmpty SchemaAttributeType)
forall a. Maybe a
Prelude.Nothing,
$sel:accountRecoverySetting:CreateUserPool' :: Maybe AccountRecoverySettingType
accountRecoverySetting = Maybe AccountRecoverySettingType
forall a. Maybe a
Prelude.Nothing,
$sel:emailConfiguration:CreateUserPool' :: Maybe EmailConfigurationType
emailConfiguration = Maybe EmailConfigurationType
forall a. Maybe a
Prelude.Nothing,
$sel:smsVerificationMessage:CreateUserPool' :: Maybe Text
smsVerificationMessage = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:mfaConfiguration:CreateUserPool' :: Maybe UserPoolMfaType
mfaConfiguration = Maybe UserPoolMfaType
forall a. Maybe a
Prelude.Nothing,
$sel:lambdaConfig:CreateUserPool' :: Maybe LambdaConfigType
lambdaConfig = Maybe LambdaConfigType
forall a. Maybe a
Prelude.Nothing,
$sel:smsConfiguration:CreateUserPool' :: Maybe SmsConfigurationType
smsConfiguration = Maybe SmsConfigurationType
forall a. Maybe a
Prelude.Nothing,
$sel:adminCreateUserConfig:CreateUserPool' :: Maybe AdminCreateUserConfigType
adminCreateUserConfig = Maybe AdminCreateUserConfigType
forall a. Maybe a
Prelude.Nothing,
$sel:deviceConfiguration:CreateUserPool' :: Maybe DeviceConfigurationType
deviceConfiguration = Maybe DeviceConfigurationType
forall a. Maybe a
Prelude.Nothing,
$sel:autoVerifiedAttributes:CreateUserPool' :: Maybe [VerifiedAttributeType]
autoVerifiedAttributes = Maybe [VerifiedAttributeType]
forall a. Maybe a
Prelude.Nothing,
$sel:policies:CreateUserPool' :: Maybe UserPoolPolicyType
policies = Maybe UserPoolPolicyType
forall a. Maybe a
Prelude.Nothing,
$sel:usernameConfiguration:CreateUserPool' :: Maybe UsernameConfigurationType
usernameConfiguration = Maybe UsernameConfigurationType
forall a. Maybe a
Prelude.Nothing,
$sel:poolName:CreateUserPool' :: Text
poolName = Text
pPoolName_
}
createUserPool_userPoolTags :: Lens.Lens' CreateUserPool (Prelude.Maybe (Prelude.HashMap Prelude.Text Prelude.Text))
createUserPool_userPoolTags :: (Maybe (HashMap Text Text) -> f (Maybe (HashMap Text Text)))
-> CreateUserPool -> f CreateUserPool
createUserPool_userPoolTags = (CreateUserPool -> Maybe (HashMap Text Text))
-> (CreateUserPool -> Maybe (HashMap Text Text) -> CreateUserPool)
-> Lens
CreateUserPool
CreateUserPool
(Maybe (HashMap Text Text))
(Maybe (HashMap Text Text))
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateUserPool' {Maybe (HashMap Text Text)
userPoolTags :: Maybe (HashMap Text Text)
$sel:userPoolTags:CreateUserPool' :: CreateUserPool -> Maybe (HashMap Text Text)
userPoolTags} -> Maybe (HashMap Text Text)
userPoolTags) (\s :: CreateUserPool
s@CreateUserPool' {} Maybe (HashMap Text Text)
a -> CreateUserPool
s {$sel:userPoolTags:CreateUserPool' :: Maybe (HashMap Text Text)
userPoolTags = Maybe (HashMap Text Text)
a} :: CreateUserPool) ((Maybe (HashMap Text Text) -> f (Maybe (HashMap Text Text)))
-> CreateUserPool -> f CreateUserPool)
-> ((Maybe (HashMap Text Text) -> f (Maybe (HashMap Text Text)))
-> Maybe (HashMap Text Text) -> f (Maybe (HashMap Text Text)))
-> (Maybe (HashMap Text Text) -> f (Maybe (HashMap Text Text)))
-> CreateUserPool
-> f CreateUserPool
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso
(HashMap Text Text)
(HashMap Text Text)
(HashMap Text Text)
(HashMap Text Text)
-> Iso
(Maybe (HashMap Text Text))
(Maybe (HashMap Text Text))
(Maybe (HashMap Text Text))
(Maybe (HashMap Text Text))
forall (f :: * -> *) (g :: * -> *) s t a b.
(Functor f, Functor g) =>
AnIso s t a b -> Iso (f s) (g t) (f a) (g b)
Lens.mapping AnIso
(HashMap Text Text)
(HashMap Text Text)
(HashMap Text Text)
(HashMap Text Text)
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced
createUserPool_verificationMessageTemplate :: Lens.Lens' CreateUserPool (Prelude.Maybe VerificationMessageTemplateType)
createUserPool_verificationMessageTemplate :: (Maybe VerificationMessageTemplateType
-> f (Maybe VerificationMessageTemplateType))
-> CreateUserPool -> f CreateUserPool
createUserPool_verificationMessageTemplate = (CreateUserPool -> Maybe VerificationMessageTemplateType)
-> (CreateUserPool
-> Maybe VerificationMessageTemplateType -> CreateUserPool)
-> Lens
CreateUserPool
CreateUserPool
(Maybe VerificationMessageTemplateType)
(Maybe VerificationMessageTemplateType)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateUserPool' {Maybe VerificationMessageTemplateType
verificationMessageTemplate :: Maybe VerificationMessageTemplateType
$sel:verificationMessageTemplate:CreateUserPool' :: CreateUserPool -> Maybe VerificationMessageTemplateType
verificationMessageTemplate} -> Maybe VerificationMessageTemplateType
verificationMessageTemplate) (\s :: CreateUserPool
s@CreateUserPool' {} Maybe VerificationMessageTemplateType
a -> CreateUserPool
s {$sel:verificationMessageTemplate:CreateUserPool' :: Maybe VerificationMessageTemplateType
verificationMessageTemplate = Maybe VerificationMessageTemplateType
a} :: CreateUserPool)
createUserPool_emailVerificationMessage :: Lens.Lens' CreateUserPool (Prelude.Maybe Prelude.Text)
createUserPool_emailVerificationMessage :: (Maybe Text -> f (Maybe Text))
-> CreateUserPool -> f CreateUserPool
createUserPool_emailVerificationMessage = (CreateUserPool -> Maybe Text)
-> (CreateUserPool -> Maybe Text -> CreateUserPool)
-> Lens CreateUserPool CreateUserPool (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateUserPool' {Maybe Text
emailVerificationMessage :: Maybe Text
$sel:emailVerificationMessage:CreateUserPool' :: CreateUserPool -> Maybe Text
emailVerificationMessage} -> Maybe Text
emailVerificationMessage) (\s :: CreateUserPool
s@CreateUserPool' {} Maybe Text
a -> CreateUserPool
s {$sel:emailVerificationMessage:CreateUserPool' :: Maybe Text
emailVerificationMessage = Maybe Text
a} :: CreateUserPool)
createUserPool_smsAuthenticationMessage :: Lens.Lens' CreateUserPool (Prelude.Maybe Prelude.Text)
createUserPool_smsAuthenticationMessage :: (Maybe Text -> f (Maybe Text))
-> CreateUserPool -> f CreateUserPool
createUserPool_smsAuthenticationMessage = (CreateUserPool -> Maybe Text)
-> (CreateUserPool -> Maybe Text -> CreateUserPool)
-> Lens CreateUserPool CreateUserPool (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateUserPool' {Maybe Text
smsAuthenticationMessage :: Maybe Text
$sel:smsAuthenticationMessage:CreateUserPool' :: CreateUserPool -> Maybe Text
smsAuthenticationMessage} -> Maybe Text
smsAuthenticationMessage) (\s :: CreateUserPool
s@CreateUserPool' {} Maybe Text
a -> CreateUserPool
s {$sel:smsAuthenticationMessage:CreateUserPool' :: Maybe Text
smsAuthenticationMessage = Maybe Text
a} :: CreateUserPool)
createUserPool_userPoolAddOns :: Lens.Lens' CreateUserPool (Prelude.Maybe UserPoolAddOnsType)
createUserPool_userPoolAddOns :: (Maybe UserPoolAddOnsType -> f (Maybe UserPoolAddOnsType))
-> CreateUserPool -> f CreateUserPool
createUserPool_userPoolAddOns = (CreateUserPool -> Maybe UserPoolAddOnsType)
-> (CreateUserPool -> Maybe UserPoolAddOnsType -> CreateUserPool)
-> Lens
CreateUserPool
CreateUserPool
(Maybe UserPoolAddOnsType)
(Maybe UserPoolAddOnsType)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateUserPool' {Maybe UserPoolAddOnsType
userPoolAddOns :: Maybe UserPoolAddOnsType
$sel:userPoolAddOns:CreateUserPool' :: CreateUserPool -> Maybe UserPoolAddOnsType
userPoolAddOns} -> Maybe UserPoolAddOnsType
userPoolAddOns) (\s :: CreateUserPool
s@CreateUserPool' {} Maybe UserPoolAddOnsType
a -> CreateUserPool
s {$sel:userPoolAddOns:CreateUserPool' :: Maybe UserPoolAddOnsType
userPoolAddOns = Maybe UserPoolAddOnsType
a} :: CreateUserPool)
createUserPool_emailVerificationSubject :: Lens.Lens' CreateUserPool (Prelude.Maybe Prelude.Text)
createUserPool_emailVerificationSubject :: (Maybe Text -> f (Maybe Text))
-> CreateUserPool -> f CreateUserPool
createUserPool_emailVerificationSubject = (CreateUserPool -> Maybe Text)
-> (CreateUserPool -> Maybe Text -> CreateUserPool)
-> Lens CreateUserPool CreateUserPool (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateUserPool' {Maybe Text
emailVerificationSubject :: Maybe Text
$sel:emailVerificationSubject:CreateUserPool' :: CreateUserPool -> Maybe Text
emailVerificationSubject} -> Maybe Text
emailVerificationSubject) (\s :: CreateUserPool
s@CreateUserPool' {} Maybe Text
a -> CreateUserPool
s {$sel:emailVerificationSubject:CreateUserPool' :: Maybe Text
emailVerificationSubject = Maybe Text
a} :: CreateUserPool)
createUserPool_usernameAttributes :: Lens.Lens' CreateUserPool (Prelude.Maybe [UsernameAttributeType])
createUserPool_usernameAttributes :: (Maybe [UsernameAttributeType]
-> f (Maybe [UsernameAttributeType]))
-> CreateUserPool -> f CreateUserPool
createUserPool_usernameAttributes = (CreateUserPool -> Maybe [UsernameAttributeType])
-> (CreateUserPool
-> Maybe [UsernameAttributeType] -> CreateUserPool)
-> Lens
CreateUserPool
CreateUserPool
(Maybe [UsernameAttributeType])
(Maybe [UsernameAttributeType])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateUserPool' {Maybe [UsernameAttributeType]
usernameAttributes :: Maybe [UsernameAttributeType]
$sel:usernameAttributes:CreateUserPool' :: CreateUserPool -> Maybe [UsernameAttributeType]
usernameAttributes} -> Maybe [UsernameAttributeType]
usernameAttributes) (\s :: CreateUserPool
s@CreateUserPool' {} Maybe [UsernameAttributeType]
a -> CreateUserPool
s {$sel:usernameAttributes:CreateUserPool' :: Maybe [UsernameAttributeType]
usernameAttributes = Maybe [UsernameAttributeType]
a} :: CreateUserPool) ((Maybe [UsernameAttributeType]
-> f (Maybe [UsernameAttributeType]))
-> CreateUserPool -> f CreateUserPool)
-> ((Maybe [UsernameAttributeType]
-> f (Maybe [UsernameAttributeType]))
-> Maybe [UsernameAttributeType]
-> f (Maybe [UsernameAttributeType]))
-> (Maybe [UsernameAttributeType]
-> f (Maybe [UsernameAttributeType]))
-> CreateUserPool
-> f CreateUserPool
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso
[UsernameAttributeType]
[UsernameAttributeType]
[UsernameAttributeType]
[UsernameAttributeType]
-> Iso
(Maybe [UsernameAttributeType])
(Maybe [UsernameAttributeType])
(Maybe [UsernameAttributeType])
(Maybe [UsernameAttributeType])
forall (f :: * -> *) (g :: * -> *) s t a b.
(Functor f, Functor g) =>
AnIso s t a b -> Iso (f s) (g t) (f a) (g b)
Lens.mapping AnIso
[UsernameAttributeType]
[UsernameAttributeType]
[UsernameAttributeType]
[UsernameAttributeType]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced
createUserPool_aliasAttributes :: Lens.Lens' CreateUserPool (Prelude.Maybe [AliasAttributeType])
createUserPool_aliasAttributes :: (Maybe [AliasAttributeType] -> f (Maybe [AliasAttributeType]))
-> CreateUserPool -> f CreateUserPool
createUserPool_aliasAttributes = (CreateUserPool -> Maybe [AliasAttributeType])
-> (CreateUserPool -> Maybe [AliasAttributeType] -> CreateUserPool)
-> Lens
CreateUserPool
CreateUserPool
(Maybe [AliasAttributeType])
(Maybe [AliasAttributeType])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateUserPool' {Maybe [AliasAttributeType]
aliasAttributes :: Maybe [AliasAttributeType]
$sel:aliasAttributes:CreateUserPool' :: CreateUserPool -> Maybe [AliasAttributeType]
aliasAttributes} -> Maybe [AliasAttributeType]
aliasAttributes) (\s :: CreateUserPool
s@CreateUserPool' {} Maybe [AliasAttributeType]
a -> CreateUserPool
s {$sel:aliasAttributes:CreateUserPool' :: Maybe [AliasAttributeType]
aliasAttributes = Maybe [AliasAttributeType]
a} :: CreateUserPool) ((Maybe [AliasAttributeType] -> f (Maybe [AliasAttributeType]))
-> CreateUserPool -> f CreateUserPool)
-> ((Maybe [AliasAttributeType] -> f (Maybe [AliasAttributeType]))
-> Maybe [AliasAttributeType] -> f (Maybe [AliasAttributeType]))
-> (Maybe [AliasAttributeType] -> f (Maybe [AliasAttributeType]))
-> CreateUserPool
-> f CreateUserPool
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso
[AliasAttributeType]
[AliasAttributeType]
[AliasAttributeType]
[AliasAttributeType]
-> Iso
(Maybe [AliasAttributeType])
(Maybe [AliasAttributeType])
(Maybe [AliasAttributeType])
(Maybe [AliasAttributeType])
forall (f :: * -> *) (g :: * -> *) s t a b.
(Functor f, Functor g) =>
AnIso s t a b -> Iso (f s) (g t) (f a) (g b)
Lens.mapping AnIso
[AliasAttributeType]
[AliasAttributeType]
[AliasAttributeType]
[AliasAttributeType]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced
createUserPool_schema :: Lens.Lens' CreateUserPool (Prelude.Maybe (Prelude.NonEmpty SchemaAttributeType))
createUserPool_schema :: (Maybe (NonEmpty SchemaAttributeType)
-> f (Maybe (NonEmpty SchemaAttributeType)))
-> CreateUserPool -> f CreateUserPool
createUserPool_schema = (CreateUserPool -> Maybe (NonEmpty SchemaAttributeType))
-> (CreateUserPool
-> Maybe (NonEmpty SchemaAttributeType) -> CreateUserPool)
-> Lens
CreateUserPool
CreateUserPool
(Maybe (NonEmpty SchemaAttributeType))
(Maybe (NonEmpty SchemaAttributeType))
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateUserPool' {Maybe (NonEmpty SchemaAttributeType)
schema :: Maybe (NonEmpty SchemaAttributeType)
$sel:schema:CreateUserPool' :: CreateUserPool -> Maybe (NonEmpty SchemaAttributeType)
schema} -> Maybe (NonEmpty SchemaAttributeType)
schema) (\s :: CreateUserPool
s@CreateUserPool' {} Maybe (NonEmpty SchemaAttributeType)
a -> CreateUserPool
s {$sel:schema:CreateUserPool' :: Maybe (NonEmpty SchemaAttributeType)
schema = Maybe (NonEmpty SchemaAttributeType)
a} :: CreateUserPool) ((Maybe (NonEmpty SchemaAttributeType)
-> f (Maybe (NonEmpty SchemaAttributeType)))
-> CreateUserPool -> f CreateUserPool)
-> ((Maybe (NonEmpty SchemaAttributeType)
-> f (Maybe (NonEmpty SchemaAttributeType)))
-> Maybe (NonEmpty SchemaAttributeType)
-> f (Maybe (NonEmpty SchemaAttributeType)))
-> (Maybe (NonEmpty SchemaAttributeType)
-> f (Maybe (NonEmpty SchemaAttributeType)))
-> CreateUserPool
-> f CreateUserPool
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso
(NonEmpty SchemaAttributeType)
(NonEmpty SchemaAttributeType)
(NonEmpty SchemaAttributeType)
(NonEmpty SchemaAttributeType)
-> Iso
(Maybe (NonEmpty SchemaAttributeType))
(Maybe (NonEmpty SchemaAttributeType))
(Maybe (NonEmpty SchemaAttributeType))
(Maybe (NonEmpty SchemaAttributeType))
forall (f :: * -> *) (g :: * -> *) s t a b.
(Functor f, Functor g) =>
AnIso s t a b -> Iso (f s) (g t) (f a) (g b)
Lens.mapping AnIso
(NonEmpty SchemaAttributeType)
(NonEmpty SchemaAttributeType)
(NonEmpty SchemaAttributeType)
(NonEmpty SchemaAttributeType)
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced
createUserPool_accountRecoverySetting :: Lens.Lens' CreateUserPool (Prelude.Maybe AccountRecoverySettingType)
createUserPool_accountRecoverySetting :: (Maybe AccountRecoverySettingType
-> f (Maybe AccountRecoverySettingType))
-> CreateUserPool -> f CreateUserPool
createUserPool_accountRecoverySetting = (CreateUserPool -> Maybe AccountRecoverySettingType)
-> (CreateUserPool
-> Maybe AccountRecoverySettingType -> CreateUserPool)
-> Lens
CreateUserPool
CreateUserPool
(Maybe AccountRecoverySettingType)
(Maybe AccountRecoverySettingType)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateUserPool' {Maybe AccountRecoverySettingType
accountRecoverySetting :: Maybe AccountRecoverySettingType
$sel:accountRecoverySetting:CreateUserPool' :: CreateUserPool -> Maybe AccountRecoverySettingType
accountRecoverySetting} -> Maybe AccountRecoverySettingType
accountRecoverySetting) (\s :: CreateUserPool
s@CreateUserPool' {} Maybe AccountRecoverySettingType
a -> CreateUserPool
s {$sel:accountRecoverySetting:CreateUserPool' :: Maybe AccountRecoverySettingType
accountRecoverySetting = Maybe AccountRecoverySettingType
a} :: CreateUserPool)
createUserPool_emailConfiguration :: Lens.Lens' CreateUserPool (Prelude.Maybe EmailConfigurationType)
createUserPool_emailConfiguration :: (Maybe EmailConfigurationType -> f (Maybe EmailConfigurationType))
-> CreateUserPool -> f CreateUserPool
createUserPool_emailConfiguration = (CreateUserPool -> Maybe EmailConfigurationType)
-> (CreateUserPool
-> Maybe EmailConfigurationType -> CreateUserPool)
-> Lens
CreateUserPool
CreateUserPool
(Maybe EmailConfigurationType)
(Maybe EmailConfigurationType)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateUserPool' {Maybe EmailConfigurationType
emailConfiguration :: Maybe EmailConfigurationType
$sel:emailConfiguration:CreateUserPool' :: CreateUserPool -> Maybe EmailConfigurationType
emailConfiguration} -> Maybe EmailConfigurationType
emailConfiguration) (\s :: CreateUserPool
s@CreateUserPool' {} Maybe EmailConfigurationType
a -> CreateUserPool
s {$sel:emailConfiguration:CreateUserPool' :: Maybe EmailConfigurationType
emailConfiguration = Maybe EmailConfigurationType
a} :: CreateUserPool)
createUserPool_smsVerificationMessage :: Lens.Lens' CreateUserPool (Prelude.Maybe Prelude.Text)
createUserPool_smsVerificationMessage :: (Maybe Text -> f (Maybe Text))
-> CreateUserPool -> f CreateUserPool
createUserPool_smsVerificationMessage = (CreateUserPool -> Maybe Text)
-> (CreateUserPool -> Maybe Text -> CreateUserPool)
-> Lens CreateUserPool CreateUserPool (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateUserPool' {Maybe Text
smsVerificationMessage :: Maybe Text
$sel:smsVerificationMessage:CreateUserPool' :: CreateUserPool -> Maybe Text
smsVerificationMessage} -> Maybe Text
smsVerificationMessage) (\s :: CreateUserPool
s@CreateUserPool' {} Maybe Text
a -> CreateUserPool
s {$sel:smsVerificationMessage:CreateUserPool' :: Maybe Text
smsVerificationMessage = Maybe Text
a} :: CreateUserPool)
createUserPool_mfaConfiguration :: Lens.Lens' CreateUserPool (Prelude.Maybe UserPoolMfaType)
createUserPool_mfaConfiguration :: (Maybe UserPoolMfaType -> f (Maybe UserPoolMfaType))
-> CreateUserPool -> f CreateUserPool
createUserPool_mfaConfiguration = (CreateUserPool -> Maybe UserPoolMfaType)
-> (CreateUserPool -> Maybe UserPoolMfaType -> CreateUserPool)
-> Lens
CreateUserPool
CreateUserPool
(Maybe UserPoolMfaType)
(Maybe UserPoolMfaType)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateUserPool' {Maybe UserPoolMfaType
mfaConfiguration :: Maybe UserPoolMfaType
$sel:mfaConfiguration:CreateUserPool' :: CreateUserPool -> Maybe UserPoolMfaType
mfaConfiguration} -> Maybe UserPoolMfaType
mfaConfiguration) (\s :: CreateUserPool
s@CreateUserPool' {} Maybe UserPoolMfaType
a -> CreateUserPool
s {$sel:mfaConfiguration:CreateUserPool' :: Maybe UserPoolMfaType
mfaConfiguration = Maybe UserPoolMfaType
a} :: CreateUserPool)
createUserPool_lambdaConfig :: Lens.Lens' CreateUserPool (Prelude.Maybe LambdaConfigType)
createUserPool_lambdaConfig :: (Maybe LambdaConfigType -> f (Maybe LambdaConfigType))
-> CreateUserPool -> f CreateUserPool
createUserPool_lambdaConfig = (CreateUserPool -> Maybe LambdaConfigType)
-> (CreateUserPool -> Maybe LambdaConfigType -> CreateUserPool)
-> Lens
CreateUserPool
CreateUserPool
(Maybe LambdaConfigType)
(Maybe LambdaConfigType)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateUserPool' {Maybe LambdaConfigType
lambdaConfig :: Maybe LambdaConfigType
$sel:lambdaConfig:CreateUserPool' :: CreateUserPool -> Maybe LambdaConfigType
lambdaConfig} -> Maybe LambdaConfigType
lambdaConfig) (\s :: CreateUserPool
s@CreateUserPool' {} Maybe LambdaConfigType
a -> CreateUserPool
s {$sel:lambdaConfig:CreateUserPool' :: Maybe LambdaConfigType
lambdaConfig = Maybe LambdaConfigType
a} :: CreateUserPool)
createUserPool_smsConfiguration :: Lens.Lens' CreateUserPool (Prelude.Maybe SmsConfigurationType)
createUserPool_smsConfiguration :: (Maybe SmsConfigurationType -> f (Maybe SmsConfigurationType))
-> CreateUserPool -> f CreateUserPool
createUserPool_smsConfiguration = (CreateUserPool -> Maybe SmsConfigurationType)
-> (CreateUserPool -> Maybe SmsConfigurationType -> CreateUserPool)
-> Lens
CreateUserPool
CreateUserPool
(Maybe SmsConfigurationType)
(Maybe SmsConfigurationType)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateUserPool' {Maybe SmsConfigurationType
smsConfiguration :: Maybe SmsConfigurationType
$sel:smsConfiguration:CreateUserPool' :: CreateUserPool -> Maybe SmsConfigurationType
smsConfiguration} -> Maybe SmsConfigurationType
smsConfiguration) (\s :: CreateUserPool
s@CreateUserPool' {} Maybe SmsConfigurationType
a -> CreateUserPool
s {$sel:smsConfiguration:CreateUserPool' :: Maybe SmsConfigurationType
smsConfiguration = Maybe SmsConfigurationType
a} :: CreateUserPool)
createUserPool_adminCreateUserConfig :: Lens.Lens' CreateUserPool (Prelude.Maybe AdminCreateUserConfigType)
createUserPool_adminCreateUserConfig :: (Maybe AdminCreateUserConfigType
-> f (Maybe AdminCreateUserConfigType))
-> CreateUserPool -> f CreateUserPool
createUserPool_adminCreateUserConfig = (CreateUserPool -> Maybe AdminCreateUserConfigType)
-> (CreateUserPool
-> Maybe AdminCreateUserConfigType -> CreateUserPool)
-> Lens
CreateUserPool
CreateUserPool
(Maybe AdminCreateUserConfigType)
(Maybe AdminCreateUserConfigType)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateUserPool' {Maybe AdminCreateUserConfigType
adminCreateUserConfig :: Maybe AdminCreateUserConfigType
$sel:adminCreateUserConfig:CreateUserPool' :: CreateUserPool -> Maybe AdminCreateUserConfigType
adminCreateUserConfig} -> Maybe AdminCreateUserConfigType
adminCreateUserConfig) (\s :: CreateUserPool
s@CreateUserPool' {} Maybe AdminCreateUserConfigType
a -> CreateUserPool
s {$sel:adminCreateUserConfig:CreateUserPool' :: Maybe AdminCreateUserConfigType
adminCreateUserConfig = Maybe AdminCreateUserConfigType
a} :: CreateUserPool)
createUserPool_deviceConfiguration :: Lens.Lens' CreateUserPool (Prelude.Maybe DeviceConfigurationType)
createUserPool_deviceConfiguration :: (Maybe DeviceConfigurationType
-> f (Maybe DeviceConfigurationType))
-> CreateUserPool -> f CreateUserPool
createUserPool_deviceConfiguration = (CreateUserPool -> Maybe DeviceConfigurationType)
-> (CreateUserPool
-> Maybe DeviceConfigurationType -> CreateUserPool)
-> Lens
CreateUserPool
CreateUserPool
(Maybe DeviceConfigurationType)
(Maybe DeviceConfigurationType)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateUserPool' {Maybe DeviceConfigurationType
deviceConfiguration :: Maybe DeviceConfigurationType
$sel:deviceConfiguration:CreateUserPool' :: CreateUserPool -> Maybe DeviceConfigurationType
deviceConfiguration} -> Maybe DeviceConfigurationType
deviceConfiguration) (\s :: CreateUserPool
s@CreateUserPool' {} Maybe DeviceConfigurationType
a -> CreateUserPool
s {$sel:deviceConfiguration:CreateUserPool' :: Maybe DeviceConfigurationType
deviceConfiguration = Maybe DeviceConfigurationType
a} :: CreateUserPool)
createUserPool_autoVerifiedAttributes :: Lens.Lens' CreateUserPool (Prelude.Maybe [VerifiedAttributeType])
createUserPool_autoVerifiedAttributes :: (Maybe [VerifiedAttributeType]
-> f (Maybe [VerifiedAttributeType]))
-> CreateUserPool -> f CreateUserPool
createUserPool_autoVerifiedAttributes = (CreateUserPool -> Maybe [VerifiedAttributeType])
-> (CreateUserPool
-> Maybe [VerifiedAttributeType] -> CreateUserPool)
-> Lens
CreateUserPool
CreateUserPool
(Maybe [VerifiedAttributeType])
(Maybe [VerifiedAttributeType])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateUserPool' {Maybe [VerifiedAttributeType]
autoVerifiedAttributes :: Maybe [VerifiedAttributeType]
$sel:autoVerifiedAttributes:CreateUserPool' :: CreateUserPool -> Maybe [VerifiedAttributeType]
autoVerifiedAttributes} -> Maybe [VerifiedAttributeType]
autoVerifiedAttributes) (\s :: CreateUserPool
s@CreateUserPool' {} Maybe [VerifiedAttributeType]
a -> CreateUserPool
s {$sel:autoVerifiedAttributes:CreateUserPool' :: Maybe [VerifiedAttributeType]
autoVerifiedAttributes = Maybe [VerifiedAttributeType]
a} :: CreateUserPool) ((Maybe [VerifiedAttributeType]
-> f (Maybe [VerifiedAttributeType]))
-> CreateUserPool -> f CreateUserPool)
-> ((Maybe [VerifiedAttributeType]
-> f (Maybe [VerifiedAttributeType]))
-> Maybe [VerifiedAttributeType]
-> f (Maybe [VerifiedAttributeType]))
-> (Maybe [VerifiedAttributeType]
-> f (Maybe [VerifiedAttributeType]))
-> CreateUserPool
-> f CreateUserPool
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso
[VerifiedAttributeType]
[VerifiedAttributeType]
[VerifiedAttributeType]
[VerifiedAttributeType]
-> Iso
(Maybe [VerifiedAttributeType])
(Maybe [VerifiedAttributeType])
(Maybe [VerifiedAttributeType])
(Maybe [VerifiedAttributeType])
forall (f :: * -> *) (g :: * -> *) s t a b.
(Functor f, Functor g) =>
AnIso s t a b -> Iso (f s) (g t) (f a) (g b)
Lens.mapping AnIso
[VerifiedAttributeType]
[VerifiedAttributeType]
[VerifiedAttributeType]
[VerifiedAttributeType]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced
createUserPool_policies :: Lens.Lens' CreateUserPool (Prelude.Maybe UserPoolPolicyType)
createUserPool_policies :: (Maybe UserPoolPolicyType -> f (Maybe UserPoolPolicyType))
-> CreateUserPool -> f CreateUserPool
createUserPool_policies = (CreateUserPool -> Maybe UserPoolPolicyType)
-> (CreateUserPool -> Maybe UserPoolPolicyType -> CreateUserPool)
-> Lens
CreateUserPool
CreateUserPool
(Maybe UserPoolPolicyType)
(Maybe UserPoolPolicyType)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateUserPool' {Maybe UserPoolPolicyType
policies :: Maybe UserPoolPolicyType
$sel:policies:CreateUserPool' :: CreateUserPool -> Maybe UserPoolPolicyType
policies} -> Maybe UserPoolPolicyType
policies) (\s :: CreateUserPool
s@CreateUserPool' {} Maybe UserPoolPolicyType
a -> CreateUserPool
s {$sel:policies:CreateUserPool' :: Maybe UserPoolPolicyType
policies = Maybe UserPoolPolicyType
a} :: CreateUserPool)
createUserPool_usernameConfiguration :: Lens.Lens' CreateUserPool (Prelude.Maybe UsernameConfigurationType)
createUserPool_usernameConfiguration :: (Maybe UsernameConfigurationType
-> f (Maybe UsernameConfigurationType))
-> CreateUserPool -> f CreateUserPool
createUserPool_usernameConfiguration = (CreateUserPool -> Maybe UsernameConfigurationType)
-> (CreateUserPool
-> Maybe UsernameConfigurationType -> CreateUserPool)
-> Lens
CreateUserPool
CreateUserPool
(Maybe UsernameConfigurationType)
(Maybe UsernameConfigurationType)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateUserPool' {Maybe UsernameConfigurationType
usernameConfiguration :: Maybe UsernameConfigurationType
$sel:usernameConfiguration:CreateUserPool' :: CreateUserPool -> Maybe UsernameConfigurationType
usernameConfiguration} -> Maybe UsernameConfigurationType
usernameConfiguration) (\s :: CreateUserPool
s@CreateUserPool' {} Maybe UsernameConfigurationType
a -> CreateUserPool
s {$sel:usernameConfiguration:CreateUserPool' :: Maybe UsernameConfigurationType
usernameConfiguration = Maybe UsernameConfigurationType
a} :: CreateUserPool)
createUserPool_poolName :: Lens.Lens' CreateUserPool Prelude.Text
createUserPool_poolName :: (Text -> f Text) -> CreateUserPool -> f CreateUserPool
createUserPool_poolName = (CreateUserPool -> Text)
-> (CreateUserPool -> Text -> CreateUserPool)
-> Lens CreateUserPool CreateUserPool Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateUserPool' {Text
poolName :: Text
$sel:poolName:CreateUserPool' :: CreateUserPool -> Text
poolName} -> Text
poolName) (\s :: CreateUserPool
s@CreateUserPool' {} Text
a -> CreateUserPool
s {$sel:poolName:CreateUserPool' :: Text
poolName = Text
a} :: CreateUserPool)
instance Core.AWSRequest CreateUserPool where
type
AWSResponse CreateUserPool =
CreateUserPoolResponse
request :: CreateUserPool -> Request CreateUserPool
request = Service -> CreateUserPool -> Request CreateUserPool
forall a. (ToRequest a, ToJSON a) => Service -> a -> Request a
Request.postJSON Service
defaultService
response :: Logger
-> Service
-> Proxy CreateUserPool
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse CreateUserPool)))
response =
(Int
-> ResponseHeaders
-> Object
-> Either String (AWSResponse CreateUserPool))
-> Logger
-> Service
-> Proxy CreateUserPool
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse CreateUserPool)))
forall (m :: * -> *) a.
MonadResource m =>
(Int -> ResponseHeaders -> Object -> Either String (AWSResponse a))
-> Logger
-> Service
-> Proxy a
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse a)))
Response.receiveJSON
( \Int
s ResponseHeaders
h Object
x ->
Maybe UserPoolType -> Int -> CreateUserPoolResponse
CreateUserPoolResponse'
(Maybe UserPoolType -> Int -> CreateUserPoolResponse)
-> Either String (Maybe UserPoolType)
-> Either String (Int -> CreateUserPoolResponse)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x Object -> Text -> Either String (Maybe UserPoolType)
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"UserPool")
Either String (Int -> CreateUserPoolResponse)
-> Either String Int -> Either String CreateUserPoolResponse
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Int -> Either String Int
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure (Int -> Int
forall a. Enum a => a -> Int
Prelude.fromEnum Int
s))
)
instance Prelude.Hashable CreateUserPool
instance Prelude.NFData CreateUserPool
instance Core.ToHeaders CreateUserPool where
toHeaders :: CreateUserPool -> ResponseHeaders
toHeaders =
ResponseHeaders -> CreateUserPool -> ResponseHeaders
forall a b. a -> b -> a
Prelude.const
( [ResponseHeaders] -> ResponseHeaders
forall a. Monoid a => [a] -> a
Prelude.mconcat
[ HeaderName
"X-Amz-Target"
HeaderName -> ByteString -> ResponseHeaders
forall a. ToHeader a => HeaderName -> a -> ResponseHeaders
Core.=# ( ByteString
"AWSCognitoIdentityProviderService.CreateUserPool" ::
Prelude.ByteString
),
HeaderName
"Content-Type"
HeaderName -> ByteString -> ResponseHeaders
forall a. ToHeader a => HeaderName -> a -> ResponseHeaders
Core.=# ( ByteString
"application/x-amz-json-1.1" ::
Prelude.ByteString
)
]
)
instance Core.ToJSON CreateUserPool where
toJSON :: CreateUserPool -> Value
toJSON CreateUserPool' {Maybe [AliasAttributeType]
Maybe [UsernameAttributeType]
Maybe [VerifiedAttributeType]
Maybe (NonEmpty SchemaAttributeType)
Maybe Text
Maybe (HashMap Text Text)
Maybe DeviceConfigurationType
Maybe EmailConfigurationType
Maybe LambdaConfigType
Maybe AdminCreateUserConfigType
Maybe AccountRecoverySettingType
Maybe SmsConfigurationType
Maybe UserPoolAddOnsType
Maybe UserPoolMfaType
Maybe UserPoolPolicyType
Maybe UsernameConfigurationType
Maybe VerificationMessageTemplateType
Text
poolName :: Text
usernameConfiguration :: Maybe UsernameConfigurationType
policies :: Maybe UserPoolPolicyType
autoVerifiedAttributes :: Maybe [VerifiedAttributeType]
deviceConfiguration :: Maybe DeviceConfigurationType
adminCreateUserConfig :: Maybe AdminCreateUserConfigType
smsConfiguration :: Maybe SmsConfigurationType
lambdaConfig :: Maybe LambdaConfigType
mfaConfiguration :: Maybe UserPoolMfaType
smsVerificationMessage :: Maybe Text
emailConfiguration :: Maybe EmailConfigurationType
accountRecoverySetting :: Maybe AccountRecoverySettingType
schema :: Maybe (NonEmpty SchemaAttributeType)
aliasAttributes :: Maybe [AliasAttributeType]
usernameAttributes :: Maybe [UsernameAttributeType]
emailVerificationSubject :: Maybe Text
userPoolAddOns :: Maybe UserPoolAddOnsType
smsAuthenticationMessage :: Maybe Text
emailVerificationMessage :: Maybe Text
verificationMessageTemplate :: Maybe VerificationMessageTemplateType
userPoolTags :: Maybe (HashMap Text Text)
$sel:poolName:CreateUserPool' :: CreateUserPool -> Text
$sel:usernameConfiguration:CreateUserPool' :: CreateUserPool -> Maybe UsernameConfigurationType
$sel:policies:CreateUserPool' :: CreateUserPool -> Maybe UserPoolPolicyType
$sel:autoVerifiedAttributes:CreateUserPool' :: CreateUserPool -> Maybe [VerifiedAttributeType]
$sel:deviceConfiguration:CreateUserPool' :: CreateUserPool -> Maybe DeviceConfigurationType
$sel:adminCreateUserConfig:CreateUserPool' :: CreateUserPool -> Maybe AdminCreateUserConfigType
$sel:smsConfiguration:CreateUserPool' :: CreateUserPool -> Maybe SmsConfigurationType
$sel:lambdaConfig:CreateUserPool' :: CreateUserPool -> Maybe LambdaConfigType
$sel:mfaConfiguration:CreateUserPool' :: CreateUserPool -> Maybe UserPoolMfaType
$sel:smsVerificationMessage:CreateUserPool' :: CreateUserPool -> Maybe Text
$sel:emailConfiguration:CreateUserPool' :: CreateUserPool -> Maybe EmailConfigurationType
$sel:accountRecoverySetting:CreateUserPool' :: CreateUserPool -> Maybe AccountRecoverySettingType
$sel:schema:CreateUserPool' :: CreateUserPool -> Maybe (NonEmpty SchemaAttributeType)
$sel:aliasAttributes:CreateUserPool' :: CreateUserPool -> Maybe [AliasAttributeType]
$sel:usernameAttributes:CreateUserPool' :: CreateUserPool -> Maybe [UsernameAttributeType]
$sel:emailVerificationSubject:CreateUserPool' :: CreateUserPool -> Maybe Text
$sel:userPoolAddOns:CreateUserPool' :: CreateUserPool -> Maybe UserPoolAddOnsType
$sel:smsAuthenticationMessage:CreateUserPool' :: CreateUserPool -> Maybe Text
$sel:emailVerificationMessage:CreateUserPool' :: CreateUserPool -> Maybe Text
$sel:verificationMessageTemplate:CreateUserPool' :: CreateUserPool -> Maybe VerificationMessageTemplateType
$sel:userPoolTags:CreateUserPool' :: CreateUserPool -> Maybe (HashMap Text Text)
..} =
[Pair] -> Value
Core.object
( [Maybe Pair] -> [Pair]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
[ (Text
"UserPoolTags" Text -> HashMap Text Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (HashMap Text Text -> Pair)
-> Maybe (HashMap Text Text) -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe (HashMap Text Text)
userPoolTags,
(Text
"VerificationMessageTemplate" Text -> VerificationMessageTemplateType -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=)
(VerificationMessageTemplateType -> Pair)
-> Maybe VerificationMessageTemplateType -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe VerificationMessageTemplateType
verificationMessageTemplate,
(Text
"EmailVerificationMessage" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=)
(Text -> Pair) -> Maybe Text -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Text
emailVerificationMessage,
(Text
"SmsAuthenticationMessage" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=)
(Text -> Pair) -> Maybe Text -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Text
smsAuthenticationMessage,
(Text
"UserPoolAddOns" Text -> UserPoolAddOnsType -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=)
(UserPoolAddOnsType -> Pair)
-> Maybe UserPoolAddOnsType -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe UserPoolAddOnsType
userPoolAddOns,
(Text
"EmailVerificationSubject" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=)
(Text -> Pair) -> Maybe Text -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Text
emailVerificationSubject,
(Text
"UsernameAttributes" Text -> [UsernameAttributeType] -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=)
([UsernameAttributeType] -> Pair)
-> Maybe [UsernameAttributeType] -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe [UsernameAttributeType]
usernameAttributes,
(Text
"AliasAttributes" Text -> [AliasAttributeType] -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=)
([AliasAttributeType] -> Pair)
-> Maybe [AliasAttributeType] -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe [AliasAttributeType]
aliasAttributes,
(Text
"Schema" Text -> NonEmpty SchemaAttributeType -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (NonEmpty SchemaAttributeType -> Pair)
-> Maybe (NonEmpty SchemaAttributeType) -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe (NonEmpty SchemaAttributeType)
schema,
(Text
"AccountRecoverySetting" Text -> AccountRecoverySettingType -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=)
(AccountRecoverySettingType -> Pair)
-> Maybe AccountRecoverySettingType -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe AccountRecoverySettingType
accountRecoverySetting,
(Text
"EmailConfiguration" Text -> EmailConfigurationType -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=)
(EmailConfigurationType -> Pair)
-> Maybe EmailConfigurationType -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe EmailConfigurationType
emailConfiguration,
(Text
"SmsVerificationMessage" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=)
(Text -> Pair) -> Maybe Text -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Text
smsVerificationMessage,
(Text
"MfaConfiguration" Text -> UserPoolMfaType -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=)
(UserPoolMfaType -> Pair) -> Maybe UserPoolMfaType -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe UserPoolMfaType
mfaConfiguration,
(Text
"LambdaConfig" Text -> LambdaConfigType -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (LambdaConfigType -> Pair) -> Maybe LambdaConfigType -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe LambdaConfigType
lambdaConfig,
(Text
"SmsConfiguration" Text -> SmsConfigurationType -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=)
(SmsConfigurationType -> Pair)
-> Maybe SmsConfigurationType -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe SmsConfigurationType
smsConfiguration,
(Text
"AdminCreateUserConfig" Text -> AdminCreateUserConfigType -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=)
(AdminCreateUserConfigType -> Pair)
-> Maybe AdminCreateUserConfigType -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe AdminCreateUserConfigType
adminCreateUserConfig,
(Text
"DeviceConfiguration" Text -> DeviceConfigurationType -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=)
(DeviceConfigurationType -> Pair)
-> Maybe DeviceConfigurationType -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe DeviceConfigurationType
deviceConfiguration,
(Text
"AutoVerifiedAttributes" Text -> [VerifiedAttributeType] -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=)
([VerifiedAttributeType] -> Pair)
-> Maybe [VerifiedAttributeType] -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe [VerifiedAttributeType]
autoVerifiedAttributes,
(Text
"Policies" Text -> UserPoolPolicyType -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (UserPoolPolicyType -> Pair)
-> Maybe UserPoolPolicyType -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe UserPoolPolicyType
policies,
(Text
"UsernameConfiguration" Text -> UsernameConfigurationType -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=)
(UsernameConfigurationType -> Pair)
-> Maybe UsernameConfigurationType -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe UsernameConfigurationType
usernameConfiguration,
Pair -> Maybe Pair
forall a. a -> Maybe a
Prelude.Just (Text
"PoolName" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= Text
poolName)
]
)
instance Core.ToPath CreateUserPool where
toPath :: CreateUserPool -> ByteString
toPath = ByteString -> CreateUserPool -> ByteString
forall a b. a -> b -> a
Prelude.const ByteString
"/"
instance Core.ToQuery CreateUserPool where
toQuery :: CreateUserPool -> QueryString
toQuery = QueryString -> CreateUserPool -> QueryString
forall a b. a -> b -> a
Prelude.const QueryString
forall a. Monoid a => a
Prelude.mempty
data CreateUserPoolResponse = CreateUserPoolResponse'
{
CreateUserPoolResponse -> Maybe UserPoolType
userPool :: Prelude.Maybe UserPoolType,
CreateUserPoolResponse -> Int
httpStatus :: Prelude.Int
}
deriving (CreateUserPoolResponse -> CreateUserPoolResponse -> Bool
(CreateUserPoolResponse -> CreateUserPoolResponse -> Bool)
-> (CreateUserPoolResponse -> CreateUserPoolResponse -> Bool)
-> Eq CreateUserPoolResponse
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: CreateUserPoolResponse -> CreateUserPoolResponse -> Bool
$c/= :: CreateUserPoolResponse -> CreateUserPoolResponse -> Bool
== :: CreateUserPoolResponse -> CreateUserPoolResponse -> Bool
$c== :: CreateUserPoolResponse -> CreateUserPoolResponse -> Bool
Prelude.Eq, ReadPrec [CreateUserPoolResponse]
ReadPrec CreateUserPoolResponse
Int -> ReadS CreateUserPoolResponse
ReadS [CreateUserPoolResponse]
(Int -> ReadS CreateUserPoolResponse)
-> ReadS [CreateUserPoolResponse]
-> ReadPrec CreateUserPoolResponse
-> ReadPrec [CreateUserPoolResponse]
-> Read CreateUserPoolResponse
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [CreateUserPoolResponse]
$creadListPrec :: ReadPrec [CreateUserPoolResponse]
readPrec :: ReadPrec CreateUserPoolResponse
$creadPrec :: ReadPrec CreateUserPoolResponse
readList :: ReadS [CreateUserPoolResponse]
$creadList :: ReadS [CreateUserPoolResponse]
readsPrec :: Int -> ReadS CreateUserPoolResponse
$creadsPrec :: Int -> ReadS CreateUserPoolResponse
Prelude.Read, Int -> CreateUserPoolResponse -> ShowS
[CreateUserPoolResponse] -> ShowS
CreateUserPoolResponse -> String
(Int -> CreateUserPoolResponse -> ShowS)
-> (CreateUserPoolResponse -> String)
-> ([CreateUserPoolResponse] -> ShowS)
-> Show CreateUserPoolResponse
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [CreateUserPoolResponse] -> ShowS
$cshowList :: [CreateUserPoolResponse] -> ShowS
show :: CreateUserPoolResponse -> String
$cshow :: CreateUserPoolResponse -> String
showsPrec :: Int -> CreateUserPoolResponse -> ShowS
$cshowsPrec :: Int -> CreateUserPoolResponse -> ShowS
Prelude.Show, (forall x. CreateUserPoolResponse -> Rep CreateUserPoolResponse x)
-> (forall x.
Rep CreateUserPoolResponse x -> CreateUserPoolResponse)
-> Generic CreateUserPoolResponse
forall x. Rep CreateUserPoolResponse x -> CreateUserPoolResponse
forall x. CreateUserPoolResponse -> Rep CreateUserPoolResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep CreateUserPoolResponse x -> CreateUserPoolResponse
$cfrom :: forall x. CreateUserPoolResponse -> Rep CreateUserPoolResponse x
Prelude.Generic)
newCreateUserPoolResponse ::
Prelude.Int ->
CreateUserPoolResponse
newCreateUserPoolResponse :: Int -> CreateUserPoolResponse
newCreateUserPoolResponse Int
pHttpStatus_ =
CreateUserPoolResponse' :: Maybe UserPoolType -> Int -> CreateUserPoolResponse
CreateUserPoolResponse'
{ $sel:userPool:CreateUserPoolResponse' :: Maybe UserPoolType
userPool = Maybe UserPoolType
forall a. Maybe a
Prelude.Nothing,
$sel:httpStatus:CreateUserPoolResponse' :: Int
httpStatus = Int
pHttpStatus_
}
createUserPoolResponse_userPool :: Lens.Lens' CreateUserPoolResponse (Prelude.Maybe UserPoolType)
createUserPoolResponse_userPool :: (Maybe UserPoolType -> f (Maybe UserPoolType))
-> CreateUserPoolResponse -> f CreateUserPoolResponse
createUserPoolResponse_userPool = (CreateUserPoolResponse -> Maybe UserPoolType)
-> (CreateUserPoolResponse
-> Maybe UserPoolType -> CreateUserPoolResponse)
-> Lens
CreateUserPoolResponse
CreateUserPoolResponse
(Maybe UserPoolType)
(Maybe UserPoolType)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateUserPoolResponse' {Maybe UserPoolType
userPool :: Maybe UserPoolType
$sel:userPool:CreateUserPoolResponse' :: CreateUserPoolResponse -> Maybe UserPoolType
userPool} -> Maybe UserPoolType
userPool) (\s :: CreateUserPoolResponse
s@CreateUserPoolResponse' {} Maybe UserPoolType
a -> CreateUserPoolResponse
s {$sel:userPool:CreateUserPoolResponse' :: Maybe UserPoolType
userPool = Maybe UserPoolType
a} :: CreateUserPoolResponse)
createUserPoolResponse_httpStatus :: Lens.Lens' CreateUserPoolResponse Prelude.Int
createUserPoolResponse_httpStatus :: (Int -> f Int)
-> CreateUserPoolResponse -> f CreateUserPoolResponse
createUserPoolResponse_httpStatus = (CreateUserPoolResponse -> Int)
-> (CreateUserPoolResponse -> Int -> CreateUserPoolResponse)
-> Lens CreateUserPoolResponse CreateUserPoolResponse Int Int
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateUserPoolResponse' {Int
httpStatus :: Int
$sel:httpStatus:CreateUserPoolResponse' :: CreateUserPoolResponse -> Int
httpStatus} -> Int
httpStatus) (\s :: CreateUserPoolResponse
s@CreateUserPoolResponse' {} Int
a -> CreateUserPoolResponse
s {$sel:httpStatus:CreateUserPoolResponse' :: Int
httpStatus = Int
a} :: CreateUserPoolResponse)
instance Prelude.NFData CreateUserPoolResponse