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