{-# 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.DeviceSecretVerifierConfigType where
import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude
data DeviceSecretVerifierConfigType = DeviceSecretVerifierConfigType'
{
DeviceSecretVerifierConfigType -> Maybe Text
passwordVerifier :: Prelude.Maybe Prelude.Text,
DeviceSecretVerifierConfigType -> Maybe Text
salt :: Prelude.Maybe Prelude.Text
}
deriving (DeviceSecretVerifierConfigType
-> DeviceSecretVerifierConfigType -> Bool
(DeviceSecretVerifierConfigType
-> DeviceSecretVerifierConfigType -> Bool)
-> (DeviceSecretVerifierConfigType
-> DeviceSecretVerifierConfigType -> Bool)
-> Eq DeviceSecretVerifierConfigType
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: DeviceSecretVerifierConfigType
-> DeviceSecretVerifierConfigType -> Bool
$c/= :: DeviceSecretVerifierConfigType
-> DeviceSecretVerifierConfigType -> Bool
== :: DeviceSecretVerifierConfigType
-> DeviceSecretVerifierConfigType -> Bool
$c== :: DeviceSecretVerifierConfigType
-> DeviceSecretVerifierConfigType -> Bool
Prelude.Eq, ReadPrec [DeviceSecretVerifierConfigType]
ReadPrec DeviceSecretVerifierConfigType
Int -> ReadS DeviceSecretVerifierConfigType
ReadS [DeviceSecretVerifierConfigType]
(Int -> ReadS DeviceSecretVerifierConfigType)
-> ReadS [DeviceSecretVerifierConfigType]
-> ReadPrec DeviceSecretVerifierConfigType
-> ReadPrec [DeviceSecretVerifierConfigType]
-> Read DeviceSecretVerifierConfigType
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [DeviceSecretVerifierConfigType]
$creadListPrec :: ReadPrec [DeviceSecretVerifierConfigType]
readPrec :: ReadPrec DeviceSecretVerifierConfigType
$creadPrec :: ReadPrec DeviceSecretVerifierConfigType
readList :: ReadS [DeviceSecretVerifierConfigType]
$creadList :: ReadS [DeviceSecretVerifierConfigType]
readsPrec :: Int -> ReadS DeviceSecretVerifierConfigType
$creadsPrec :: Int -> ReadS DeviceSecretVerifierConfigType
Prelude.Read, Int -> DeviceSecretVerifierConfigType -> ShowS
[DeviceSecretVerifierConfigType] -> ShowS
DeviceSecretVerifierConfigType -> String
(Int -> DeviceSecretVerifierConfigType -> ShowS)
-> (DeviceSecretVerifierConfigType -> String)
-> ([DeviceSecretVerifierConfigType] -> ShowS)
-> Show DeviceSecretVerifierConfigType
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [DeviceSecretVerifierConfigType] -> ShowS
$cshowList :: [DeviceSecretVerifierConfigType] -> ShowS
show :: DeviceSecretVerifierConfigType -> String
$cshow :: DeviceSecretVerifierConfigType -> String
showsPrec :: Int -> DeviceSecretVerifierConfigType -> ShowS
$cshowsPrec :: Int -> DeviceSecretVerifierConfigType -> ShowS
Prelude.Show, (forall x.
DeviceSecretVerifierConfigType
-> Rep DeviceSecretVerifierConfigType x)
-> (forall x.
Rep DeviceSecretVerifierConfigType x
-> DeviceSecretVerifierConfigType)
-> Generic DeviceSecretVerifierConfigType
forall x.
Rep DeviceSecretVerifierConfigType x
-> DeviceSecretVerifierConfigType
forall x.
DeviceSecretVerifierConfigType
-> Rep DeviceSecretVerifierConfigType x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep DeviceSecretVerifierConfigType x
-> DeviceSecretVerifierConfigType
$cfrom :: forall x.
DeviceSecretVerifierConfigType
-> Rep DeviceSecretVerifierConfigType x
Prelude.Generic)
newDeviceSecretVerifierConfigType ::
DeviceSecretVerifierConfigType
newDeviceSecretVerifierConfigType :: DeviceSecretVerifierConfigType
newDeviceSecretVerifierConfigType =
DeviceSecretVerifierConfigType' :: Maybe Text -> Maybe Text -> DeviceSecretVerifierConfigType
DeviceSecretVerifierConfigType'
{ $sel:passwordVerifier:DeviceSecretVerifierConfigType' :: Maybe Text
passwordVerifier =
Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:salt:DeviceSecretVerifierConfigType' :: Maybe Text
salt = Maybe Text
forall a. Maybe a
Prelude.Nothing
}
deviceSecretVerifierConfigType_passwordVerifier :: Lens.Lens' DeviceSecretVerifierConfigType (Prelude.Maybe Prelude.Text)
deviceSecretVerifierConfigType_passwordVerifier :: (Maybe Text -> f (Maybe Text))
-> DeviceSecretVerifierConfigType
-> f DeviceSecretVerifierConfigType
deviceSecretVerifierConfigType_passwordVerifier = (DeviceSecretVerifierConfigType -> Maybe Text)
-> (DeviceSecretVerifierConfigType
-> Maybe Text -> DeviceSecretVerifierConfigType)
-> Lens
DeviceSecretVerifierConfigType
DeviceSecretVerifierConfigType
(Maybe Text)
(Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DeviceSecretVerifierConfigType' {Maybe Text
passwordVerifier :: Maybe Text
$sel:passwordVerifier:DeviceSecretVerifierConfigType' :: DeviceSecretVerifierConfigType -> Maybe Text
passwordVerifier} -> Maybe Text
passwordVerifier) (\s :: DeviceSecretVerifierConfigType
s@DeviceSecretVerifierConfigType' {} Maybe Text
a -> DeviceSecretVerifierConfigType
s {$sel:passwordVerifier:DeviceSecretVerifierConfigType' :: Maybe Text
passwordVerifier = Maybe Text
a} :: DeviceSecretVerifierConfigType)
deviceSecretVerifierConfigType_salt :: Lens.Lens' DeviceSecretVerifierConfigType (Prelude.Maybe Prelude.Text)
deviceSecretVerifierConfigType_salt :: (Maybe Text -> f (Maybe Text))
-> DeviceSecretVerifierConfigType
-> f DeviceSecretVerifierConfigType
deviceSecretVerifierConfigType_salt = (DeviceSecretVerifierConfigType -> Maybe Text)
-> (DeviceSecretVerifierConfigType
-> Maybe Text -> DeviceSecretVerifierConfigType)
-> Lens
DeviceSecretVerifierConfigType
DeviceSecretVerifierConfigType
(Maybe Text)
(Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DeviceSecretVerifierConfigType' {Maybe Text
salt :: Maybe Text
$sel:salt:DeviceSecretVerifierConfigType' :: DeviceSecretVerifierConfigType -> Maybe Text
salt} -> Maybe Text
salt) (\s :: DeviceSecretVerifierConfigType
s@DeviceSecretVerifierConfigType' {} Maybe Text
a -> DeviceSecretVerifierConfigType
s {$sel:salt:DeviceSecretVerifierConfigType' :: Maybe Text
salt = Maybe Text
a} :: DeviceSecretVerifierConfigType)
instance
Prelude.Hashable
DeviceSecretVerifierConfigType
instance
Prelude.NFData
DeviceSecretVerifierConfigType
instance Core.ToJSON DeviceSecretVerifierConfigType where
toJSON :: DeviceSecretVerifierConfigType -> Value
toJSON DeviceSecretVerifierConfigType' {Maybe Text
salt :: Maybe Text
passwordVerifier :: Maybe Text
$sel:salt:DeviceSecretVerifierConfigType' :: DeviceSecretVerifierConfigType -> Maybe Text
$sel:passwordVerifier:DeviceSecretVerifierConfigType' :: DeviceSecretVerifierConfigType -> Maybe Text
..} =
[Pair] -> Value
Core.object
( [Maybe Pair] -> [Pair]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
[ (Text
"PasswordVerifier" 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
passwordVerifier,
(Text
"Salt" 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
salt
]
)