{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE DuplicateRecordFields #-}
{-# LANGUAGE NamedFieldPuns #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE RecordWildCards #-}
{-# LANGUAGE StrictData #-}
{-# LANGUAGE NoImplicitPrelude #-}
{-# OPTIONS_GHC -fno-warn-unused-imports #-}
{-# OPTIONS_GHC -fno-warn-unused-matches #-}
module Amazonka.CognitoIdentityProvider.Types.UserAttributeUpdateSettingsType where
import Amazonka.CognitoIdentityProvider.Types.VerifiedAttributeType
import qualified Amazonka.Core as Core
import qualified Amazonka.Core.Lens.Internal as Lens
import qualified Amazonka.Data as Data
import qualified Amazonka.Prelude as Prelude
data UserAttributeUpdateSettingsType = UserAttributeUpdateSettingsType'
{
UserAttributeUpdateSettingsType -> Maybe [VerifiedAttributeType]
attributesRequireVerificationBeforeUpdate :: Prelude.Maybe [VerifiedAttributeType]
}
deriving (UserAttributeUpdateSettingsType
-> UserAttributeUpdateSettingsType -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: UserAttributeUpdateSettingsType
-> UserAttributeUpdateSettingsType -> Bool
$c/= :: UserAttributeUpdateSettingsType
-> UserAttributeUpdateSettingsType -> Bool
== :: UserAttributeUpdateSettingsType
-> UserAttributeUpdateSettingsType -> Bool
$c== :: UserAttributeUpdateSettingsType
-> UserAttributeUpdateSettingsType -> Bool
Prelude.Eq, ReadPrec [UserAttributeUpdateSettingsType]
ReadPrec UserAttributeUpdateSettingsType
Int -> ReadS UserAttributeUpdateSettingsType
ReadS [UserAttributeUpdateSettingsType]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [UserAttributeUpdateSettingsType]
$creadListPrec :: ReadPrec [UserAttributeUpdateSettingsType]
readPrec :: ReadPrec UserAttributeUpdateSettingsType
$creadPrec :: ReadPrec UserAttributeUpdateSettingsType
readList :: ReadS [UserAttributeUpdateSettingsType]
$creadList :: ReadS [UserAttributeUpdateSettingsType]
readsPrec :: Int -> ReadS UserAttributeUpdateSettingsType
$creadsPrec :: Int -> ReadS UserAttributeUpdateSettingsType
Prelude.Read, Int -> UserAttributeUpdateSettingsType -> ShowS
[UserAttributeUpdateSettingsType] -> ShowS
UserAttributeUpdateSettingsType -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [UserAttributeUpdateSettingsType] -> ShowS
$cshowList :: [UserAttributeUpdateSettingsType] -> ShowS
show :: UserAttributeUpdateSettingsType -> String
$cshow :: UserAttributeUpdateSettingsType -> String
showsPrec :: Int -> UserAttributeUpdateSettingsType -> ShowS
$cshowsPrec :: Int -> UserAttributeUpdateSettingsType -> ShowS
Prelude.Show, forall x.
Rep UserAttributeUpdateSettingsType x
-> UserAttributeUpdateSettingsType
forall x.
UserAttributeUpdateSettingsType
-> Rep UserAttributeUpdateSettingsType x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep UserAttributeUpdateSettingsType x
-> UserAttributeUpdateSettingsType
$cfrom :: forall x.
UserAttributeUpdateSettingsType
-> Rep UserAttributeUpdateSettingsType x
Prelude.Generic)
newUserAttributeUpdateSettingsType ::
UserAttributeUpdateSettingsType
newUserAttributeUpdateSettingsType :: UserAttributeUpdateSettingsType
newUserAttributeUpdateSettingsType =
UserAttributeUpdateSettingsType'
{ $sel:attributesRequireVerificationBeforeUpdate:UserAttributeUpdateSettingsType' :: Maybe [VerifiedAttributeType]
attributesRequireVerificationBeforeUpdate =
forall a. Maybe a
Prelude.Nothing
}
userAttributeUpdateSettingsType_attributesRequireVerificationBeforeUpdate :: Lens.Lens' UserAttributeUpdateSettingsType (Prelude.Maybe [VerifiedAttributeType])
userAttributeUpdateSettingsType_attributesRequireVerificationBeforeUpdate :: Lens'
UserAttributeUpdateSettingsType (Maybe [VerifiedAttributeType])
userAttributeUpdateSettingsType_attributesRequireVerificationBeforeUpdate = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UserAttributeUpdateSettingsType' {Maybe [VerifiedAttributeType]
attributesRequireVerificationBeforeUpdate :: Maybe [VerifiedAttributeType]
$sel:attributesRequireVerificationBeforeUpdate:UserAttributeUpdateSettingsType' :: UserAttributeUpdateSettingsType -> Maybe [VerifiedAttributeType]
attributesRequireVerificationBeforeUpdate} -> Maybe [VerifiedAttributeType]
attributesRequireVerificationBeforeUpdate) (\s :: UserAttributeUpdateSettingsType
s@UserAttributeUpdateSettingsType' {} Maybe [VerifiedAttributeType]
a -> UserAttributeUpdateSettingsType
s {$sel:attributesRequireVerificationBeforeUpdate:UserAttributeUpdateSettingsType' :: Maybe [VerifiedAttributeType]
attributesRequireVerificationBeforeUpdate = Maybe [VerifiedAttributeType]
a} :: UserAttributeUpdateSettingsType) forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. 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 forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced
instance
Data.FromJSON
UserAttributeUpdateSettingsType
where
parseJSON :: Value -> Parser UserAttributeUpdateSettingsType
parseJSON =
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Data.withObject
String
"UserAttributeUpdateSettingsType"
( \Object
x ->
Maybe [VerifiedAttributeType] -> UserAttributeUpdateSettingsType
UserAttributeUpdateSettingsType'
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
"AttributesRequireVerificationBeforeUpdate"
forall a. Parser (Maybe a) -> a -> Parser a
Data..!= forall a. Monoid a => a
Prelude.mempty
)
)
instance
Prelude.Hashable
UserAttributeUpdateSettingsType
where
hashWithSalt :: Int -> UserAttributeUpdateSettingsType -> Int
hashWithSalt
Int
_salt
UserAttributeUpdateSettingsType' {Maybe [VerifiedAttributeType]
attributesRequireVerificationBeforeUpdate :: Maybe [VerifiedAttributeType]
$sel:attributesRequireVerificationBeforeUpdate:UserAttributeUpdateSettingsType' :: UserAttributeUpdateSettingsType -> Maybe [VerifiedAttributeType]
..} =
Int
_salt
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe [VerifiedAttributeType]
attributesRequireVerificationBeforeUpdate
instance
Prelude.NFData
UserAttributeUpdateSettingsType
where
rnf :: UserAttributeUpdateSettingsType -> ()
rnf UserAttributeUpdateSettingsType' {Maybe [VerifiedAttributeType]
attributesRequireVerificationBeforeUpdate :: Maybe [VerifiedAttributeType]
$sel:attributesRequireVerificationBeforeUpdate:UserAttributeUpdateSettingsType' :: UserAttributeUpdateSettingsType -> Maybe [VerifiedAttributeType]
..} =
forall a. NFData a => a -> ()
Prelude.rnf
Maybe [VerifiedAttributeType]
attributesRequireVerificationBeforeUpdate
instance Data.ToJSON UserAttributeUpdateSettingsType where
toJSON :: UserAttributeUpdateSettingsType -> Value
toJSON UserAttributeUpdateSettingsType' {Maybe [VerifiedAttributeType]
attributesRequireVerificationBeforeUpdate :: Maybe [VerifiedAttributeType]
$sel:attributesRequireVerificationBeforeUpdate:UserAttributeUpdateSettingsType' :: UserAttributeUpdateSettingsType -> Maybe [VerifiedAttributeType]
..} =
[Pair] -> Value
Data.object
( forall a. [Maybe a] -> [a]
Prelude.catMaybes
[ ( Key
"AttributesRequireVerificationBeforeUpdate"
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 [VerifiedAttributeType]
attributesRequireVerificationBeforeUpdate
]
)