{-# 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.AmplifyBackend.Types.UpdateBackendAuthUserPoolConfig where
import Amazonka.AmplifyBackend.Types.UpdateBackendAuthForgotPasswordConfig
import Amazonka.AmplifyBackend.Types.UpdateBackendAuthMFAConfig
import Amazonka.AmplifyBackend.Types.UpdateBackendAuthOAuthConfig
import Amazonka.AmplifyBackend.Types.UpdateBackendAuthPasswordPolicyConfig
import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude
data UpdateBackendAuthUserPoolConfig = UpdateBackendAuthUserPoolConfig'
{
UpdateBackendAuthUserPoolConfig
-> Maybe UpdateBackendAuthPasswordPolicyConfig
passwordPolicy :: Prelude.Maybe UpdateBackendAuthPasswordPolicyConfig,
UpdateBackendAuthUserPoolConfig -> Maybe UpdateBackendAuthMFAConfig
mfa :: Prelude.Maybe UpdateBackendAuthMFAConfig,
UpdateBackendAuthUserPoolConfig
-> Maybe UpdateBackendAuthForgotPasswordConfig
forgotPassword :: Prelude.Maybe UpdateBackendAuthForgotPasswordConfig,
UpdateBackendAuthUserPoolConfig
-> Maybe UpdateBackendAuthOAuthConfig
oAuth :: Prelude.Maybe UpdateBackendAuthOAuthConfig
}
deriving (UpdateBackendAuthUserPoolConfig
-> UpdateBackendAuthUserPoolConfig -> Bool
(UpdateBackendAuthUserPoolConfig
-> UpdateBackendAuthUserPoolConfig -> Bool)
-> (UpdateBackendAuthUserPoolConfig
-> UpdateBackendAuthUserPoolConfig -> Bool)
-> Eq UpdateBackendAuthUserPoolConfig
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: UpdateBackendAuthUserPoolConfig
-> UpdateBackendAuthUserPoolConfig -> Bool
$c/= :: UpdateBackendAuthUserPoolConfig
-> UpdateBackendAuthUserPoolConfig -> Bool
== :: UpdateBackendAuthUserPoolConfig
-> UpdateBackendAuthUserPoolConfig -> Bool
$c== :: UpdateBackendAuthUserPoolConfig
-> UpdateBackendAuthUserPoolConfig -> Bool
Prelude.Eq, ReadPrec [UpdateBackendAuthUserPoolConfig]
ReadPrec UpdateBackendAuthUserPoolConfig
Int -> ReadS UpdateBackendAuthUserPoolConfig
ReadS [UpdateBackendAuthUserPoolConfig]
(Int -> ReadS UpdateBackendAuthUserPoolConfig)
-> ReadS [UpdateBackendAuthUserPoolConfig]
-> ReadPrec UpdateBackendAuthUserPoolConfig
-> ReadPrec [UpdateBackendAuthUserPoolConfig]
-> Read UpdateBackendAuthUserPoolConfig
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [UpdateBackendAuthUserPoolConfig]
$creadListPrec :: ReadPrec [UpdateBackendAuthUserPoolConfig]
readPrec :: ReadPrec UpdateBackendAuthUserPoolConfig
$creadPrec :: ReadPrec UpdateBackendAuthUserPoolConfig
readList :: ReadS [UpdateBackendAuthUserPoolConfig]
$creadList :: ReadS [UpdateBackendAuthUserPoolConfig]
readsPrec :: Int -> ReadS UpdateBackendAuthUserPoolConfig
$creadsPrec :: Int -> ReadS UpdateBackendAuthUserPoolConfig
Prelude.Read, Int -> UpdateBackendAuthUserPoolConfig -> ShowS
[UpdateBackendAuthUserPoolConfig] -> ShowS
UpdateBackendAuthUserPoolConfig -> String
(Int -> UpdateBackendAuthUserPoolConfig -> ShowS)
-> (UpdateBackendAuthUserPoolConfig -> String)
-> ([UpdateBackendAuthUserPoolConfig] -> ShowS)
-> Show UpdateBackendAuthUserPoolConfig
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [UpdateBackendAuthUserPoolConfig] -> ShowS
$cshowList :: [UpdateBackendAuthUserPoolConfig] -> ShowS
show :: UpdateBackendAuthUserPoolConfig -> String
$cshow :: UpdateBackendAuthUserPoolConfig -> String
showsPrec :: Int -> UpdateBackendAuthUserPoolConfig -> ShowS
$cshowsPrec :: Int -> UpdateBackendAuthUserPoolConfig -> ShowS
Prelude.Show, (forall x.
UpdateBackendAuthUserPoolConfig
-> Rep UpdateBackendAuthUserPoolConfig x)
-> (forall x.
Rep UpdateBackendAuthUserPoolConfig x
-> UpdateBackendAuthUserPoolConfig)
-> Generic UpdateBackendAuthUserPoolConfig
forall x.
Rep UpdateBackendAuthUserPoolConfig x
-> UpdateBackendAuthUserPoolConfig
forall x.
UpdateBackendAuthUserPoolConfig
-> Rep UpdateBackendAuthUserPoolConfig x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep UpdateBackendAuthUserPoolConfig x
-> UpdateBackendAuthUserPoolConfig
$cfrom :: forall x.
UpdateBackendAuthUserPoolConfig
-> Rep UpdateBackendAuthUserPoolConfig x
Prelude.Generic)
newUpdateBackendAuthUserPoolConfig ::
UpdateBackendAuthUserPoolConfig
newUpdateBackendAuthUserPoolConfig :: UpdateBackendAuthUserPoolConfig
newUpdateBackendAuthUserPoolConfig =
UpdateBackendAuthUserPoolConfig' :: Maybe UpdateBackendAuthPasswordPolicyConfig
-> Maybe UpdateBackendAuthMFAConfig
-> Maybe UpdateBackendAuthForgotPasswordConfig
-> Maybe UpdateBackendAuthOAuthConfig
-> UpdateBackendAuthUserPoolConfig
UpdateBackendAuthUserPoolConfig'
{ $sel:passwordPolicy:UpdateBackendAuthUserPoolConfig' :: Maybe UpdateBackendAuthPasswordPolicyConfig
passwordPolicy =
Maybe UpdateBackendAuthPasswordPolicyConfig
forall a. Maybe a
Prelude.Nothing,
$sel:mfa:UpdateBackendAuthUserPoolConfig' :: Maybe UpdateBackendAuthMFAConfig
mfa = Maybe UpdateBackendAuthMFAConfig
forall a. Maybe a
Prelude.Nothing,
$sel:forgotPassword:UpdateBackendAuthUserPoolConfig' :: Maybe UpdateBackendAuthForgotPasswordConfig
forgotPassword = Maybe UpdateBackendAuthForgotPasswordConfig
forall a. Maybe a
Prelude.Nothing,
$sel:oAuth:UpdateBackendAuthUserPoolConfig' :: Maybe UpdateBackendAuthOAuthConfig
oAuth = Maybe UpdateBackendAuthOAuthConfig
forall a. Maybe a
Prelude.Nothing
}
updateBackendAuthUserPoolConfig_passwordPolicy :: Lens.Lens' UpdateBackendAuthUserPoolConfig (Prelude.Maybe UpdateBackendAuthPasswordPolicyConfig)
updateBackendAuthUserPoolConfig_passwordPolicy :: (Maybe UpdateBackendAuthPasswordPolicyConfig
-> f (Maybe UpdateBackendAuthPasswordPolicyConfig))
-> UpdateBackendAuthUserPoolConfig
-> f UpdateBackendAuthUserPoolConfig
updateBackendAuthUserPoolConfig_passwordPolicy = (UpdateBackendAuthUserPoolConfig
-> Maybe UpdateBackendAuthPasswordPolicyConfig)
-> (UpdateBackendAuthUserPoolConfig
-> Maybe UpdateBackendAuthPasswordPolicyConfig
-> UpdateBackendAuthUserPoolConfig)
-> Lens
UpdateBackendAuthUserPoolConfig
UpdateBackendAuthUserPoolConfig
(Maybe UpdateBackendAuthPasswordPolicyConfig)
(Maybe UpdateBackendAuthPasswordPolicyConfig)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateBackendAuthUserPoolConfig' {Maybe UpdateBackendAuthPasswordPolicyConfig
passwordPolicy :: Maybe UpdateBackendAuthPasswordPolicyConfig
$sel:passwordPolicy:UpdateBackendAuthUserPoolConfig' :: UpdateBackendAuthUserPoolConfig
-> Maybe UpdateBackendAuthPasswordPolicyConfig
passwordPolicy} -> Maybe UpdateBackendAuthPasswordPolicyConfig
passwordPolicy) (\s :: UpdateBackendAuthUserPoolConfig
s@UpdateBackendAuthUserPoolConfig' {} Maybe UpdateBackendAuthPasswordPolicyConfig
a -> UpdateBackendAuthUserPoolConfig
s {$sel:passwordPolicy:UpdateBackendAuthUserPoolConfig' :: Maybe UpdateBackendAuthPasswordPolicyConfig
passwordPolicy = Maybe UpdateBackendAuthPasswordPolicyConfig
a} :: UpdateBackendAuthUserPoolConfig)
updateBackendAuthUserPoolConfig_mfa :: Lens.Lens' UpdateBackendAuthUserPoolConfig (Prelude.Maybe UpdateBackendAuthMFAConfig)
updateBackendAuthUserPoolConfig_mfa :: (Maybe UpdateBackendAuthMFAConfig
-> f (Maybe UpdateBackendAuthMFAConfig))
-> UpdateBackendAuthUserPoolConfig
-> f UpdateBackendAuthUserPoolConfig
updateBackendAuthUserPoolConfig_mfa = (UpdateBackendAuthUserPoolConfig
-> Maybe UpdateBackendAuthMFAConfig)
-> (UpdateBackendAuthUserPoolConfig
-> Maybe UpdateBackendAuthMFAConfig
-> UpdateBackendAuthUserPoolConfig)
-> Lens
UpdateBackendAuthUserPoolConfig
UpdateBackendAuthUserPoolConfig
(Maybe UpdateBackendAuthMFAConfig)
(Maybe UpdateBackendAuthMFAConfig)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateBackendAuthUserPoolConfig' {Maybe UpdateBackendAuthMFAConfig
mfa :: Maybe UpdateBackendAuthMFAConfig
$sel:mfa:UpdateBackendAuthUserPoolConfig' :: UpdateBackendAuthUserPoolConfig -> Maybe UpdateBackendAuthMFAConfig
mfa} -> Maybe UpdateBackendAuthMFAConfig
mfa) (\s :: UpdateBackendAuthUserPoolConfig
s@UpdateBackendAuthUserPoolConfig' {} Maybe UpdateBackendAuthMFAConfig
a -> UpdateBackendAuthUserPoolConfig
s {$sel:mfa:UpdateBackendAuthUserPoolConfig' :: Maybe UpdateBackendAuthMFAConfig
mfa = Maybe UpdateBackendAuthMFAConfig
a} :: UpdateBackendAuthUserPoolConfig)
updateBackendAuthUserPoolConfig_forgotPassword :: Lens.Lens' UpdateBackendAuthUserPoolConfig (Prelude.Maybe UpdateBackendAuthForgotPasswordConfig)
updateBackendAuthUserPoolConfig_forgotPassword :: (Maybe UpdateBackendAuthForgotPasswordConfig
-> f (Maybe UpdateBackendAuthForgotPasswordConfig))
-> UpdateBackendAuthUserPoolConfig
-> f UpdateBackendAuthUserPoolConfig
updateBackendAuthUserPoolConfig_forgotPassword = (UpdateBackendAuthUserPoolConfig
-> Maybe UpdateBackendAuthForgotPasswordConfig)
-> (UpdateBackendAuthUserPoolConfig
-> Maybe UpdateBackendAuthForgotPasswordConfig
-> UpdateBackendAuthUserPoolConfig)
-> Lens
UpdateBackendAuthUserPoolConfig
UpdateBackendAuthUserPoolConfig
(Maybe UpdateBackendAuthForgotPasswordConfig)
(Maybe UpdateBackendAuthForgotPasswordConfig)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateBackendAuthUserPoolConfig' {Maybe UpdateBackendAuthForgotPasswordConfig
forgotPassword :: Maybe UpdateBackendAuthForgotPasswordConfig
$sel:forgotPassword:UpdateBackendAuthUserPoolConfig' :: UpdateBackendAuthUserPoolConfig
-> Maybe UpdateBackendAuthForgotPasswordConfig
forgotPassword} -> Maybe UpdateBackendAuthForgotPasswordConfig
forgotPassword) (\s :: UpdateBackendAuthUserPoolConfig
s@UpdateBackendAuthUserPoolConfig' {} Maybe UpdateBackendAuthForgotPasswordConfig
a -> UpdateBackendAuthUserPoolConfig
s {$sel:forgotPassword:UpdateBackendAuthUserPoolConfig' :: Maybe UpdateBackendAuthForgotPasswordConfig
forgotPassword = Maybe UpdateBackendAuthForgotPasswordConfig
a} :: UpdateBackendAuthUserPoolConfig)
updateBackendAuthUserPoolConfig_oAuth :: Lens.Lens' UpdateBackendAuthUserPoolConfig (Prelude.Maybe UpdateBackendAuthOAuthConfig)
updateBackendAuthUserPoolConfig_oAuth :: (Maybe UpdateBackendAuthOAuthConfig
-> f (Maybe UpdateBackendAuthOAuthConfig))
-> UpdateBackendAuthUserPoolConfig
-> f UpdateBackendAuthUserPoolConfig
updateBackendAuthUserPoolConfig_oAuth = (UpdateBackendAuthUserPoolConfig
-> Maybe UpdateBackendAuthOAuthConfig)
-> (UpdateBackendAuthUserPoolConfig
-> Maybe UpdateBackendAuthOAuthConfig
-> UpdateBackendAuthUserPoolConfig)
-> Lens
UpdateBackendAuthUserPoolConfig
UpdateBackendAuthUserPoolConfig
(Maybe UpdateBackendAuthOAuthConfig)
(Maybe UpdateBackendAuthOAuthConfig)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateBackendAuthUserPoolConfig' {Maybe UpdateBackendAuthOAuthConfig
oAuth :: Maybe UpdateBackendAuthOAuthConfig
$sel:oAuth:UpdateBackendAuthUserPoolConfig' :: UpdateBackendAuthUserPoolConfig
-> Maybe UpdateBackendAuthOAuthConfig
oAuth} -> Maybe UpdateBackendAuthOAuthConfig
oAuth) (\s :: UpdateBackendAuthUserPoolConfig
s@UpdateBackendAuthUserPoolConfig' {} Maybe UpdateBackendAuthOAuthConfig
a -> UpdateBackendAuthUserPoolConfig
s {$sel:oAuth:UpdateBackendAuthUserPoolConfig' :: Maybe UpdateBackendAuthOAuthConfig
oAuth = Maybe UpdateBackendAuthOAuthConfig
a} :: UpdateBackendAuthUserPoolConfig)
instance
Prelude.Hashable
UpdateBackendAuthUserPoolConfig
instance
Prelude.NFData
UpdateBackendAuthUserPoolConfig
instance Core.ToJSON UpdateBackendAuthUserPoolConfig where
toJSON :: UpdateBackendAuthUserPoolConfig -> Value
toJSON UpdateBackendAuthUserPoolConfig' {Maybe UpdateBackendAuthForgotPasswordConfig
Maybe UpdateBackendAuthMFAConfig
Maybe UpdateBackendAuthOAuthConfig
Maybe UpdateBackendAuthPasswordPolicyConfig
oAuth :: Maybe UpdateBackendAuthOAuthConfig
forgotPassword :: Maybe UpdateBackendAuthForgotPasswordConfig
mfa :: Maybe UpdateBackendAuthMFAConfig
passwordPolicy :: Maybe UpdateBackendAuthPasswordPolicyConfig
$sel:oAuth:UpdateBackendAuthUserPoolConfig' :: UpdateBackendAuthUserPoolConfig
-> Maybe UpdateBackendAuthOAuthConfig
$sel:forgotPassword:UpdateBackendAuthUserPoolConfig' :: UpdateBackendAuthUserPoolConfig
-> Maybe UpdateBackendAuthForgotPasswordConfig
$sel:mfa:UpdateBackendAuthUserPoolConfig' :: UpdateBackendAuthUserPoolConfig -> Maybe UpdateBackendAuthMFAConfig
$sel:passwordPolicy:UpdateBackendAuthUserPoolConfig' :: UpdateBackendAuthUserPoolConfig
-> Maybe UpdateBackendAuthPasswordPolicyConfig
..} =
[Pair] -> Value
Core.object
( [Maybe Pair] -> [Pair]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
[ (Text
"passwordPolicy" Text -> UpdateBackendAuthPasswordPolicyConfig -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=)
(UpdateBackendAuthPasswordPolicyConfig -> Pair)
-> Maybe UpdateBackendAuthPasswordPolicyConfig -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe UpdateBackendAuthPasswordPolicyConfig
passwordPolicy,
(Text
"mfa" Text -> UpdateBackendAuthMFAConfig -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (UpdateBackendAuthMFAConfig -> Pair)
-> Maybe UpdateBackendAuthMFAConfig -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe UpdateBackendAuthMFAConfig
mfa,
(Text
"forgotPassword" Text -> UpdateBackendAuthForgotPasswordConfig -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=)
(UpdateBackendAuthForgotPasswordConfig -> Pair)
-> Maybe UpdateBackendAuthForgotPasswordConfig -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe UpdateBackendAuthForgotPasswordConfig
forgotPassword,
(Text
"oAuth" Text -> UpdateBackendAuthOAuthConfig -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (UpdateBackendAuthOAuthConfig -> Pair)
-> Maybe UpdateBackendAuthOAuthConfig -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe UpdateBackendAuthOAuthConfig
oAuth
]
)