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