{-# 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.RiskConfigurationType where
import Amazonka.CognitoIdentityProvider.Types.AccountTakeoverRiskConfigurationType
import Amazonka.CognitoIdentityProvider.Types.CompromisedCredentialsRiskConfigurationType
import Amazonka.CognitoIdentityProvider.Types.RiskExceptionConfigurationType
import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude
data RiskConfigurationType = RiskConfigurationType'
{
RiskConfigurationType -> Maybe RiskExceptionConfigurationType
riskExceptionConfiguration :: Prelude.Maybe RiskExceptionConfigurationType,
RiskConfigurationType -> Maybe (Sensitive Text)
clientId :: Prelude.Maybe (Core.Sensitive Prelude.Text),
RiskConfigurationType -> Maybe AccountTakeoverRiskConfigurationType
accountTakeoverRiskConfiguration :: Prelude.Maybe AccountTakeoverRiskConfigurationType,
RiskConfigurationType -> Maybe POSIX
lastModifiedDate :: Prelude.Maybe Core.POSIX,
RiskConfigurationType -> Maybe Text
userPoolId :: Prelude.Maybe Prelude.Text,
RiskConfigurationType
-> Maybe CompromisedCredentialsRiskConfigurationType
compromisedCredentialsRiskConfiguration :: Prelude.Maybe CompromisedCredentialsRiskConfigurationType
}
deriving (RiskConfigurationType -> RiskConfigurationType -> Bool
(RiskConfigurationType -> RiskConfigurationType -> Bool)
-> (RiskConfigurationType -> RiskConfigurationType -> Bool)
-> Eq RiskConfigurationType
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: RiskConfigurationType -> RiskConfigurationType -> Bool
$c/= :: RiskConfigurationType -> RiskConfigurationType -> Bool
== :: RiskConfigurationType -> RiskConfigurationType -> Bool
$c== :: RiskConfigurationType -> RiskConfigurationType -> Bool
Prelude.Eq, Int -> RiskConfigurationType -> ShowS
[RiskConfigurationType] -> ShowS
RiskConfigurationType -> String
(Int -> RiskConfigurationType -> ShowS)
-> (RiskConfigurationType -> String)
-> ([RiskConfigurationType] -> ShowS)
-> Show RiskConfigurationType
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [RiskConfigurationType] -> ShowS
$cshowList :: [RiskConfigurationType] -> ShowS
show :: RiskConfigurationType -> String
$cshow :: RiskConfigurationType -> String
showsPrec :: Int -> RiskConfigurationType -> ShowS
$cshowsPrec :: Int -> RiskConfigurationType -> ShowS
Prelude.Show, (forall x. RiskConfigurationType -> Rep RiskConfigurationType x)
-> (forall x. Rep RiskConfigurationType x -> RiskConfigurationType)
-> Generic RiskConfigurationType
forall x. Rep RiskConfigurationType x -> RiskConfigurationType
forall x. RiskConfigurationType -> Rep RiskConfigurationType x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep RiskConfigurationType x -> RiskConfigurationType
$cfrom :: forall x. RiskConfigurationType -> Rep RiskConfigurationType x
Prelude.Generic)
newRiskConfigurationType ::
RiskConfigurationType
newRiskConfigurationType :: RiskConfigurationType
newRiskConfigurationType =
RiskConfigurationType' :: Maybe RiskExceptionConfigurationType
-> Maybe (Sensitive Text)
-> Maybe AccountTakeoverRiskConfigurationType
-> Maybe POSIX
-> Maybe Text
-> Maybe CompromisedCredentialsRiskConfigurationType
-> RiskConfigurationType
RiskConfigurationType'
{ $sel:riskExceptionConfiguration:RiskConfigurationType' :: Maybe RiskExceptionConfigurationType
riskExceptionConfiguration =
Maybe RiskExceptionConfigurationType
forall a. Maybe a
Prelude.Nothing,
$sel:clientId:RiskConfigurationType' :: Maybe (Sensitive Text)
clientId = Maybe (Sensitive Text)
forall a. Maybe a
Prelude.Nothing,
$sel:accountTakeoverRiskConfiguration:RiskConfigurationType' :: Maybe AccountTakeoverRiskConfigurationType
accountTakeoverRiskConfiguration = Maybe AccountTakeoverRiskConfigurationType
forall a. Maybe a
Prelude.Nothing,
$sel:lastModifiedDate:RiskConfigurationType' :: Maybe POSIX
lastModifiedDate = Maybe POSIX
forall a. Maybe a
Prelude.Nothing,
$sel:userPoolId:RiskConfigurationType' :: Maybe Text
userPoolId = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:compromisedCredentialsRiskConfiguration:RiskConfigurationType' :: Maybe CompromisedCredentialsRiskConfigurationType
compromisedCredentialsRiskConfiguration =
Maybe CompromisedCredentialsRiskConfigurationType
forall a. Maybe a
Prelude.Nothing
}
riskConfigurationType_riskExceptionConfiguration :: Lens.Lens' RiskConfigurationType (Prelude.Maybe RiskExceptionConfigurationType)
riskConfigurationType_riskExceptionConfiguration :: (Maybe RiskExceptionConfigurationType
-> f (Maybe RiskExceptionConfigurationType))
-> RiskConfigurationType -> f RiskConfigurationType
riskConfigurationType_riskExceptionConfiguration = (RiskConfigurationType -> Maybe RiskExceptionConfigurationType)
-> (RiskConfigurationType
-> Maybe RiskExceptionConfigurationType -> RiskConfigurationType)
-> Lens
RiskConfigurationType
RiskConfigurationType
(Maybe RiskExceptionConfigurationType)
(Maybe RiskExceptionConfigurationType)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\RiskConfigurationType' {Maybe RiskExceptionConfigurationType
riskExceptionConfiguration :: Maybe RiskExceptionConfigurationType
$sel:riskExceptionConfiguration:RiskConfigurationType' :: RiskConfigurationType -> Maybe RiskExceptionConfigurationType
riskExceptionConfiguration} -> Maybe RiskExceptionConfigurationType
riskExceptionConfiguration) (\s :: RiskConfigurationType
s@RiskConfigurationType' {} Maybe RiskExceptionConfigurationType
a -> RiskConfigurationType
s {$sel:riskExceptionConfiguration:RiskConfigurationType' :: Maybe RiskExceptionConfigurationType
riskExceptionConfiguration = Maybe RiskExceptionConfigurationType
a} :: RiskConfigurationType)
riskConfigurationType_clientId :: Lens.Lens' RiskConfigurationType (Prelude.Maybe Prelude.Text)
riskConfigurationType_clientId :: (Maybe Text -> f (Maybe Text))
-> RiskConfigurationType -> f RiskConfigurationType
riskConfigurationType_clientId = (RiskConfigurationType -> Maybe (Sensitive Text))
-> (RiskConfigurationType
-> Maybe (Sensitive Text) -> RiskConfigurationType)
-> Lens
RiskConfigurationType
RiskConfigurationType
(Maybe (Sensitive Text))
(Maybe (Sensitive Text))
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\RiskConfigurationType' {Maybe (Sensitive Text)
clientId :: Maybe (Sensitive Text)
$sel:clientId:RiskConfigurationType' :: RiskConfigurationType -> Maybe (Sensitive Text)
clientId} -> Maybe (Sensitive Text)
clientId) (\s :: RiskConfigurationType
s@RiskConfigurationType' {} Maybe (Sensitive Text)
a -> RiskConfigurationType
s {$sel:clientId:RiskConfigurationType' :: Maybe (Sensitive Text)
clientId = Maybe (Sensitive Text)
a} :: RiskConfigurationType) ((Maybe (Sensitive Text) -> f (Maybe (Sensitive Text)))
-> RiskConfigurationType -> f RiskConfigurationType)
-> ((Maybe Text -> f (Maybe Text))
-> Maybe (Sensitive Text) -> f (Maybe (Sensitive Text)))
-> (Maybe Text -> f (Maybe Text))
-> RiskConfigurationType
-> f RiskConfigurationType
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso (Sensitive Text) (Sensitive Text) Text Text
-> Iso
(Maybe (Sensitive Text))
(Maybe (Sensitive Text))
(Maybe Text)
(Maybe Text)
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 AnIso (Sensitive Text) (Sensitive Text) Text Text
forall a. Iso' (Sensitive a) a
Core._Sensitive
riskConfigurationType_accountTakeoverRiskConfiguration :: Lens.Lens' RiskConfigurationType (Prelude.Maybe AccountTakeoverRiskConfigurationType)
riskConfigurationType_accountTakeoverRiskConfiguration :: (Maybe AccountTakeoverRiskConfigurationType
-> f (Maybe AccountTakeoverRiskConfigurationType))
-> RiskConfigurationType -> f RiskConfigurationType
riskConfigurationType_accountTakeoverRiskConfiguration = (RiskConfigurationType
-> Maybe AccountTakeoverRiskConfigurationType)
-> (RiskConfigurationType
-> Maybe AccountTakeoverRiskConfigurationType
-> RiskConfigurationType)
-> Lens
RiskConfigurationType
RiskConfigurationType
(Maybe AccountTakeoverRiskConfigurationType)
(Maybe AccountTakeoverRiskConfigurationType)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\RiskConfigurationType' {Maybe AccountTakeoverRiskConfigurationType
accountTakeoverRiskConfiguration :: Maybe AccountTakeoverRiskConfigurationType
$sel:accountTakeoverRiskConfiguration:RiskConfigurationType' :: RiskConfigurationType -> Maybe AccountTakeoverRiskConfigurationType
accountTakeoverRiskConfiguration} -> Maybe AccountTakeoverRiskConfigurationType
accountTakeoverRiskConfiguration) (\s :: RiskConfigurationType
s@RiskConfigurationType' {} Maybe AccountTakeoverRiskConfigurationType
a -> RiskConfigurationType
s {$sel:accountTakeoverRiskConfiguration:RiskConfigurationType' :: Maybe AccountTakeoverRiskConfigurationType
accountTakeoverRiskConfiguration = Maybe AccountTakeoverRiskConfigurationType
a} :: RiskConfigurationType)
riskConfigurationType_lastModifiedDate :: Lens.Lens' RiskConfigurationType (Prelude.Maybe Prelude.UTCTime)
riskConfigurationType_lastModifiedDate :: (Maybe UTCTime -> f (Maybe UTCTime))
-> RiskConfigurationType -> f RiskConfigurationType
riskConfigurationType_lastModifiedDate = (RiskConfigurationType -> Maybe POSIX)
-> (RiskConfigurationType -> Maybe POSIX -> RiskConfigurationType)
-> Lens
RiskConfigurationType
RiskConfigurationType
(Maybe POSIX)
(Maybe POSIX)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\RiskConfigurationType' {Maybe POSIX
lastModifiedDate :: Maybe POSIX
$sel:lastModifiedDate:RiskConfigurationType' :: RiskConfigurationType -> Maybe POSIX
lastModifiedDate} -> Maybe POSIX
lastModifiedDate) (\s :: RiskConfigurationType
s@RiskConfigurationType' {} Maybe POSIX
a -> RiskConfigurationType
s {$sel:lastModifiedDate:RiskConfigurationType' :: Maybe POSIX
lastModifiedDate = Maybe POSIX
a} :: RiskConfigurationType) ((Maybe POSIX -> f (Maybe POSIX))
-> RiskConfigurationType -> f RiskConfigurationType)
-> ((Maybe UTCTime -> f (Maybe UTCTime))
-> Maybe POSIX -> f (Maybe POSIX))
-> (Maybe UTCTime -> f (Maybe UTCTime))
-> RiskConfigurationType
-> f RiskConfigurationType
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso POSIX POSIX UTCTime UTCTime
-> Iso (Maybe POSIX) (Maybe POSIX) (Maybe UTCTime) (Maybe UTCTime)
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 AnIso POSIX POSIX UTCTime UTCTime
forall (a :: Format). Iso' (Time a) UTCTime
Core._Time
riskConfigurationType_userPoolId :: Lens.Lens' RiskConfigurationType (Prelude.Maybe Prelude.Text)
riskConfigurationType_userPoolId :: (Maybe Text -> f (Maybe Text))
-> RiskConfigurationType -> f RiskConfigurationType
riskConfigurationType_userPoolId = (RiskConfigurationType -> Maybe Text)
-> (RiskConfigurationType -> Maybe Text -> RiskConfigurationType)
-> Lens
RiskConfigurationType
RiskConfigurationType
(Maybe Text)
(Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\RiskConfigurationType' {Maybe Text
userPoolId :: Maybe Text
$sel:userPoolId:RiskConfigurationType' :: RiskConfigurationType -> Maybe Text
userPoolId} -> Maybe Text
userPoolId) (\s :: RiskConfigurationType
s@RiskConfigurationType' {} Maybe Text
a -> RiskConfigurationType
s {$sel:userPoolId:RiskConfigurationType' :: Maybe Text
userPoolId = Maybe Text
a} :: RiskConfigurationType)
riskConfigurationType_compromisedCredentialsRiskConfiguration :: Lens.Lens' RiskConfigurationType (Prelude.Maybe CompromisedCredentialsRiskConfigurationType)
riskConfigurationType_compromisedCredentialsRiskConfiguration :: (Maybe CompromisedCredentialsRiskConfigurationType
-> f (Maybe CompromisedCredentialsRiskConfigurationType))
-> RiskConfigurationType -> f RiskConfigurationType
riskConfigurationType_compromisedCredentialsRiskConfiguration = (RiskConfigurationType
-> Maybe CompromisedCredentialsRiskConfigurationType)
-> (RiskConfigurationType
-> Maybe CompromisedCredentialsRiskConfigurationType
-> RiskConfigurationType)
-> Lens
RiskConfigurationType
RiskConfigurationType
(Maybe CompromisedCredentialsRiskConfigurationType)
(Maybe CompromisedCredentialsRiskConfigurationType)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\RiskConfigurationType' {Maybe CompromisedCredentialsRiskConfigurationType
compromisedCredentialsRiskConfiguration :: Maybe CompromisedCredentialsRiskConfigurationType
$sel:compromisedCredentialsRiskConfiguration:RiskConfigurationType' :: RiskConfigurationType
-> Maybe CompromisedCredentialsRiskConfigurationType
compromisedCredentialsRiskConfiguration} -> Maybe CompromisedCredentialsRiskConfigurationType
compromisedCredentialsRiskConfiguration) (\s :: RiskConfigurationType
s@RiskConfigurationType' {} Maybe CompromisedCredentialsRiskConfigurationType
a -> RiskConfigurationType
s {$sel:compromisedCredentialsRiskConfiguration:RiskConfigurationType' :: Maybe CompromisedCredentialsRiskConfigurationType
compromisedCredentialsRiskConfiguration = Maybe CompromisedCredentialsRiskConfigurationType
a} :: RiskConfigurationType)
instance Core.FromJSON RiskConfigurationType where
parseJSON :: Value -> Parser RiskConfigurationType
parseJSON =
String
-> (Object -> Parser RiskConfigurationType)
-> Value
-> Parser RiskConfigurationType
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Core.withObject
String
"RiskConfigurationType"
( \Object
x ->
Maybe RiskExceptionConfigurationType
-> Maybe (Sensitive Text)
-> Maybe AccountTakeoverRiskConfigurationType
-> Maybe POSIX
-> Maybe Text
-> Maybe CompromisedCredentialsRiskConfigurationType
-> RiskConfigurationType
RiskConfigurationType'
(Maybe RiskExceptionConfigurationType
-> Maybe (Sensitive Text)
-> Maybe AccountTakeoverRiskConfigurationType
-> Maybe POSIX
-> Maybe Text
-> Maybe CompromisedCredentialsRiskConfigurationType
-> RiskConfigurationType)
-> Parser (Maybe RiskExceptionConfigurationType)
-> Parser
(Maybe (Sensitive Text)
-> Maybe AccountTakeoverRiskConfigurationType
-> Maybe POSIX
-> Maybe Text
-> Maybe CompromisedCredentialsRiskConfigurationType
-> RiskConfigurationType)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x Object -> Text -> Parser (Maybe RiskExceptionConfigurationType)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"RiskExceptionConfiguration")
Parser
(Maybe (Sensitive Text)
-> Maybe AccountTakeoverRiskConfigurationType
-> Maybe POSIX
-> Maybe Text
-> Maybe CompromisedCredentialsRiskConfigurationType
-> RiskConfigurationType)
-> Parser (Maybe (Sensitive Text))
-> Parser
(Maybe AccountTakeoverRiskConfigurationType
-> Maybe POSIX
-> Maybe Text
-> Maybe CompromisedCredentialsRiskConfigurationType
-> RiskConfigurationType)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe (Sensitive Text))
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"ClientId")
Parser
(Maybe AccountTakeoverRiskConfigurationType
-> Maybe POSIX
-> Maybe Text
-> Maybe CompromisedCredentialsRiskConfigurationType
-> RiskConfigurationType)
-> Parser (Maybe AccountTakeoverRiskConfigurationType)
-> Parser
(Maybe POSIX
-> Maybe Text
-> Maybe CompromisedCredentialsRiskConfigurationType
-> RiskConfigurationType)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object
-> Text -> Parser (Maybe AccountTakeoverRiskConfigurationType)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"AccountTakeoverRiskConfiguration")
Parser
(Maybe POSIX
-> Maybe Text
-> Maybe CompromisedCredentialsRiskConfigurationType
-> RiskConfigurationType)
-> Parser (Maybe POSIX)
-> Parser
(Maybe Text
-> Maybe CompromisedCredentialsRiskConfigurationType
-> RiskConfigurationType)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe POSIX)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"LastModifiedDate")
Parser
(Maybe Text
-> Maybe CompromisedCredentialsRiskConfigurationType
-> RiskConfigurationType)
-> Parser (Maybe Text)
-> Parser
(Maybe CompromisedCredentialsRiskConfigurationType
-> RiskConfigurationType)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"UserPoolId")
Parser
(Maybe CompromisedCredentialsRiskConfigurationType
-> RiskConfigurationType)
-> Parser (Maybe CompromisedCredentialsRiskConfigurationType)
-> Parser RiskConfigurationType
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> ( Object
x
Object
-> Text
-> Parser (Maybe CompromisedCredentialsRiskConfigurationType)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"CompromisedCredentialsRiskConfiguration"
)
)
instance Prelude.Hashable RiskConfigurationType
instance Prelude.NFData RiskConfigurationType