{-# 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.FraudDetector.Types.RuleDetail where
import qualified Amazonka.Core as Core
import Amazonka.FraudDetector.Types.Language
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude
data RuleDetail = RuleDetail'
{
RuleDetail -> Maybe Text
ruleVersion :: Prelude.Maybe Prelude.Text,
RuleDetail -> Maybe Text
lastUpdatedTime :: Prelude.Maybe Prelude.Text,
RuleDetail -> Maybe Text
arn :: Prelude.Maybe Prelude.Text,
RuleDetail -> Maybe Text
createdTime :: Prelude.Maybe Prelude.Text,
RuleDetail -> Maybe Text
ruleId :: Prelude.Maybe Prelude.Text,
RuleDetail -> Maybe (NonEmpty Text)
outcomes :: Prelude.Maybe (Prelude.NonEmpty Prelude.Text),
RuleDetail -> Maybe Text
detectorId :: Prelude.Maybe Prelude.Text,
RuleDetail -> Maybe (Sensitive Text)
expression :: Prelude.Maybe (Core.Sensitive Prelude.Text),
RuleDetail -> Maybe Language
language :: Prelude.Maybe Language,
RuleDetail -> Maybe Text
description :: Prelude.Maybe Prelude.Text
}
deriving (RuleDetail -> RuleDetail -> Bool
(RuleDetail -> RuleDetail -> Bool)
-> (RuleDetail -> RuleDetail -> Bool) -> Eq RuleDetail
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: RuleDetail -> RuleDetail -> Bool
$c/= :: RuleDetail -> RuleDetail -> Bool
== :: RuleDetail -> RuleDetail -> Bool
$c== :: RuleDetail -> RuleDetail -> Bool
Prelude.Eq, Int -> RuleDetail -> ShowS
[RuleDetail] -> ShowS
RuleDetail -> String
(Int -> RuleDetail -> ShowS)
-> (RuleDetail -> String)
-> ([RuleDetail] -> ShowS)
-> Show RuleDetail
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [RuleDetail] -> ShowS
$cshowList :: [RuleDetail] -> ShowS
show :: RuleDetail -> String
$cshow :: RuleDetail -> String
showsPrec :: Int -> RuleDetail -> ShowS
$cshowsPrec :: Int -> RuleDetail -> ShowS
Prelude.Show, (forall x. RuleDetail -> Rep RuleDetail x)
-> (forall x. Rep RuleDetail x -> RuleDetail) -> Generic RuleDetail
forall x. Rep RuleDetail x -> RuleDetail
forall x. RuleDetail -> Rep RuleDetail x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep RuleDetail x -> RuleDetail
$cfrom :: forall x. RuleDetail -> Rep RuleDetail x
Prelude.Generic)
newRuleDetail ::
RuleDetail
newRuleDetail :: RuleDetail
newRuleDetail =
RuleDetail' :: Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe (NonEmpty Text)
-> Maybe Text
-> Maybe (Sensitive Text)
-> Maybe Language
-> Maybe Text
-> RuleDetail
RuleDetail'
{ $sel:ruleVersion:RuleDetail' :: Maybe Text
ruleVersion = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:lastUpdatedTime:RuleDetail' :: Maybe Text
lastUpdatedTime = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:arn:RuleDetail' :: Maybe Text
arn = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:createdTime:RuleDetail' :: Maybe Text
createdTime = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:ruleId:RuleDetail' :: Maybe Text
ruleId = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:outcomes:RuleDetail' :: Maybe (NonEmpty Text)
outcomes = Maybe (NonEmpty Text)
forall a. Maybe a
Prelude.Nothing,
$sel:detectorId:RuleDetail' :: Maybe Text
detectorId = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:expression:RuleDetail' :: Maybe (Sensitive Text)
expression = Maybe (Sensitive Text)
forall a. Maybe a
Prelude.Nothing,
$sel:language:RuleDetail' :: Maybe Language
language = Maybe Language
forall a. Maybe a
Prelude.Nothing,
$sel:description:RuleDetail' :: Maybe Text
description = Maybe Text
forall a. Maybe a
Prelude.Nothing
}
ruleDetail_ruleVersion :: Lens.Lens' RuleDetail (Prelude.Maybe Prelude.Text)
ruleDetail_ruleVersion :: (Maybe Text -> f (Maybe Text)) -> RuleDetail -> f RuleDetail
ruleDetail_ruleVersion = (RuleDetail -> Maybe Text)
-> (RuleDetail -> Maybe Text -> RuleDetail)
-> Lens RuleDetail RuleDetail (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\RuleDetail' {Maybe Text
ruleVersion :: Maybe Text
$sel:ruleVersion:RuleDetail' :: RuleDetail -> Maybe Text
ruleVersion} -> Maybe Text
ruleVersion) (\s :: RuleDetail
s@RuleDetail' {} Maybe Text
a -> RuleDetail
s {$sel:ruleVersion:RuleDetail' :: Maybe Text
ruleVersion = Maybe Text
a} :: RuleDetail)
ruleDetail_lastUpdatedTime :: Lens.Lens' RuleDetail (Prelude.Maybe Prelude.Text)
ruleDetail_lastUpdatedTime :: (Maybe Text -> f (Maybe Text)) -> RuleDetail -> f RuleDetail
ruleDetail_lastUpdatedTime = (RuleDetail -> Maybe Text)
-> (RuleDetail -> Maybe Text -> RuleDetail)
-> Lens RuleDetail RuleDetail (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\RuleDetail' {Maybe Text
lastUpdatedTime :: Maybe Text
$sel:lastUpdatedTime:RuleDetail' :: RuleDetail -> Maybe Text
lastUpdatedTime} -> Maybe Text
lastUpdatedTime) (\s :: RuleDetail
s@RuleDetail' {} Maybe Text
a -> RuleDetail
s {$sel:lastUpdatedTime:RuleDetail' :: Maybe Text
lastUpdatedTime = Maybe Text
a} :: RuleDetail)
ruleDetail_arn :: Lens.Lens' RuleDetail (Prelude.Maybe Prelude.Text)
ruleDetail_arn :: (Maybe Text -> f (Maybe Text)) -> RuleDetail -> f RuleDetail
ruleDetail_arn = (RuleDetail -> Maybe Text)
-> (RuleDetail -> Maybe Text -> RuleDetail)
-> Lens RuleDetail RuleDetail (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\RuleDetail' {Maybe Text
arn :: Maybe Text
$sel:arn:RuleDetail' :: RuleDetail -> Maybe Text
arn} -> Maybe Text
arn) (\s :: RuleDetail
s@RuleDetail' {} Maybe Text
a -> RuleDetail
s {$sel:arn:RuleDetail' :: Maybe Text
arn = Maybe Text
a} :: RuleDetail)
ruleDetail_createdTime :: Lens.Lens' RuleDetail (Prelude.Maybe Prelude.Text)
ruleDetail_createdTime :: (Maybe Text -> f (Maybe Text)) -> RuleDetail -> f RuleDetail
ruleDetail_createdTime = (RuleDetail -> Maybe Text)
-> (RuleDetail -> Maybe Text -> RuleDetail)
-> Lens RuleDetail RuleDetail (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\RuleDetail' {Maybe Text
createdTime :: Maybe Text
$sel:createdTime:RuleDetail' :: RuleDetail -> Maybe Text
createdTime} -> Maybe Text
createdTime) (\s :: RuleDetail
s@RuleDetail' {} Maybe Text
a -> RuleDetail
s {$sel:createdTime:RuleDetail' :: Maybe Text
createdTime = Maybe Text
a} :: RuleDetail)
ruleDetail_ruleId :: Lens.Lens' RuleDetail (Prelude.Maybe Prelude.Text)
ruleDetail_ruleId :: (Maybe Text -> f (Maybe Text)) -> RuleDetail -> f RuleDetail
ruleDetail_ruleId = (RuleDetail -> Maybe Text)
-> (RuleDetail -> Maybe Text -> RuleDetail)
-> Lens RuleDetail RuleDetail (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\RuleDetail' {Maybe Text
ruleId :: Maybe Text
$sel:ruleId:RuleDetail' :: RuleDetail -> Maybe Text
ruleId} -> Maybe Text
ruleId) (\s :: RuleDetail
s@RuleDetail' {} Maybe Text
a -> RuleDetail
s {$sel:ruleId:RuleDetail' :: Maybe Text
ruleId = Maybe Text
a} :: RuleDetail)
ruleDetail_outcomes :: Lens.Lens' RuleDetail (Prelude.Maybe (Prelude.NonEmpty Prelude.Text))
ruleDetail_outcomes :: (Maybe (NonEmpty Text) -> f (Maybe (NonEmpty Text)))
-> RuleDetail -> f RuleDetail
ruleDetail_outcomes = (RuleDetail -> Maybe (NonEmpty Text))
-> (RuleDetail -> Maybe (NonEmpty Text) -> RuleDetail)
-> Lens
RuleDetail
RuleDetail
(Maybe (NonEmpty Text))
(Maybe (NonEmpty Text))
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\RuleDetail' {Maybe (NonEmpty Text)
outcomes :: Maybe (NonEmpty Text)
$sel:outcomes:RuleDetail' :: RuleDetail -> Maybe (NonEmpty Text)
outcomes} -> Maybe (NonEmpty Text)
outcomes) (\s :: RuleDetail
s@RuleDetail' {} Maybe (NonEmpty Text)
a -> RuleDetail
s {$sel:outcomes:RuleDetail' :: Maybe (NonEmpty Text)
outcomes = Maybe (NonEmpty Text)
a} :: RuleDetail) ((Maybe (NonEmpty Text) -> f (Maybe (NonEmpty Text)))
-> RuleDetail -> f RuleDetail)
-> ((Maybe (NonEmpty Text) -> f (Maybe (NonEmpty Text)))
-> Maybe (NonEmpty Text) -> f (Maybe (NonEmpty Text)))
-> (Maybe (NonEmpty Text) -> f (Maybe (NonEmpty Text)))
-> RuleDetail
-> f RuleDetail
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso
(NonEmpty Text) (NonEmpty Text) (NonEmpty Text) (NonEmpty Text)
-> Iso
(Maybe (NonEmpty Text))
(Maybe (NonEmpty Text))
(Maybe (NonEmpty Text))
(Maybe (NonEmpty 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
(NonEmpty Text) (NonEmpty Text) (NonEmpty Text) (NonEmpty Text)
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced
ruleDetail_detectorId :: Lens.Lens' RuleDetail (Prelude.Maybe Prelude.Text)
ruleDetail_detectorId :: (Maybe Text -> f (Maybe Text)) -> RuleDetail -> f RuleDetail
ruleDetail_detectorId = (RuleDetail -> Maybe Text)
-> (RuleDetail -> Maybe Text -> RuleDetail)
-> Lens RuleDetail RuleDetail (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\RuleDetail' {Maybe Text
detectorId :: Maybe Text
$sel:detectorId:RuleDetail' :: RuleDetail -> Maybe Text
detectorId} -> Maybe Text
detectorId) (\s :: RuleDetail
s@RuleDetail' {} Maybe Text
a -> RuleDetail
s {$sel:detectorId:RuleDetail' :: Maybe Text
detectorId = Maybe Text
a} :: RuleDetail)
ruleDetail_expression :: Lens.Lens' RuleDetail (Prelude.Maybe Prelude.Text)
ruleDetail_expression :: (Maybe Text -> f (Maybe Text)) -> RuleDetail -> f RuleDetail
ruleDetail_expression = (RuleDetail -> Maybe (Sensitive Text))
-> (RuleDetail -> Maybe (Sensitive Text) -> RuleDetail)
-> Lens
RuleDetail
RuleDetail
(Maybe (Sensitive Text))
(Maybe (Sensitive Text))
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\RuleDetail' {Maybe (Sensitive Text)
expression :: Maybe (Sensitive Text)
$sel:expression:RuleDetail' :: RuleDetail -> Maybe (Sensitive Text)
expression} -> Maybe (Sensitive Text)
expression) (\s :: RuleDetail
s@RuleDetail' {} Maybe (Sensitive Text)
a -> RuleDetail
s {$sel:expression:RuleDetail' :: Maybe (Sensitive Text)
expression = Maybe (Sensitive Text)
a} :: RuleDetail) ((Maybe (Sensitive Text) -> f (Maybe (Sensitive Text)))
-> RuleDetail -> f RuleDetail)
-> ((Maybe Text -> f (Maybe Text))
-> Maybe (Sensitive Text) -> f (Maybe (Sensitive Text)))
-> (Maybe Text -> f (Maybe Text))
-> RuleDetail
-> f RuleDetail
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
ruleDetail_language :: Lens.Lens' RuleDetail (Prelude.Maybe Language)
ruleDetail_language :: (Maybe Language -> f (Maybe Language))
-> RuleDetail -> f RuleDetail
ruleDetail_language = (RuleDetail -> Maybe Language)
-> (RuleDetail -> Maybe Language -> RuleDetail)
-> Lens RuleDetail RuleDetail (Maybe Language) (Maybe Language)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\RuleDetail' {Maybe Language
language :: Maybe Language
$sel:language:RuleDetail' :: RuleDetail -> Maybe Language
language} -> Maybe Language
language) (\s :: RuleDetail
s@RuleDetail' {} Maybe Language
a -> RuleDetail
s {$sel:language:RuleDetail' :: Maybe Language
language = Maybe Language
a} :: RuleDetail)
ruleDetail_description :: Lens.Lens' RuleDetail (Prelude.Maybe Prelude.Text)
ruleDetail_description :: (Maybe Text -> f (Maybe Text)) -> RuleDetail -> f RuleDetail
ruleDetail_description = (RuleDetail -> Maybe Text)
-> (RuleDetail -> Maybe Text -> RuleDetail)
-> Lens RuleDetail RuleDetail (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\RuleDetail' {Maybe Text
description :: Maybe Text
$sel:description:RuleDetail' :: RuleDetail -> Maybe Text
description} -> Maybe Text
description) (\s :: RuleDetail
s@RuleDetail' {} Maybe Text
a -> RuleDetail
s {$sel:description:RuleDetail' :: Maybe Text
description = Maybe Text
a} :: RuleDetail)
instance Core.FromJSON RuleDetail where
parseJSON :: Value -> Parser RuleDetail
parseJSON =
String
-> (Object -> Parser RuleDetail) -> Value -> Parser RuleDetail
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Core.withObject
String
"RuleDetail"
( \Object
x ->
Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe (NonEmpty Text)
-> Maybe Text
-> Maybe (Sensitive Text)
-> Maybe Language
-> Maybe Text
-> RuleDetail
RuleDetail'
(Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe (NonEmpty Text)
-> Maybe Text
-> Maybe (Sensitive Text)
-> Maybe Language
-> Maybe Text
-> RuleDetail)
-> Parser (Maybe Text)
-> Parser
(Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe (NonEmpty Text)
-> Maybe Text
-> Maybe (Sensitive Text)
-> Maybe Language
-> Maybe Text
-> RuleDetail)
forall (f :: * -> *) a b. Functor 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
"ruleVersion")
Parser
(Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe (NonEmpty Text)
-> Maybe Text
-> Maybe (Sensitive Text)
-> Maybe Language
-> Maybe Text
-> RuleDetail)
-> Parser (Maybe Text)
-> Parser
(Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe (NonEmpty Text)
-> Maybe Text
-> Maybe (Sensitive Text)
-> Maybe Language
-> Maybe Text
-> RuleDetail)
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
"lastUpdatedTime")
Parser
(Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe (NonEmpty Text)
-> Maybe Text
-> Maybe (Sensitive Text)
-> Maybe Language
-> Maybe Text
-> RuleDetail)
-> Parser (Maybe Text)
-> Parser
(Maybe Text
-> Maybe Text
-> Maybe (NonEmpty Text)
-> Maybe Text
-> Maybe (Sensitive Text)
-> Maybe Language
-> Maybe Text
-> RuleDetail)
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
"arn")
Parser
(Maybe Text
-> Maybe Text
-> Maybe (NonEmpty Text)
-> Maybe Text
-> Maybe (Sensitive Text)
-> Maybe Language
-> Maybe Text
-> RuleDetail)
-> Parser (Maybe Text)
-> Parser
(Maybe Text
-> Maybe (NonEmpty Text)
-> Maybe Text
-> Maybe (Sensitive Text)
-> Maybe Language
-> Maybe Text
-> RuleDetail)
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
"createdTime")
Parser
(Maybe Text
-> Maybe (NonEmpty Text)
-> Maybe Text
-> Maybe (Sensitive Text)
-> Maybe Language
-> Maybe Text
-> RuleDetail)
-> Parser (Maybe Text)
-> Parser
(Maybe (NonEmpty Text)
-> Maybe Text
-> Maybe (Sensitive Text)
-> Maybe Language
-> Maybe Text
-> RuleDetail)
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
"ruleId")
Parser
(Maybe (NonEmpty Text)
-> Maybe Text
-> Maybe (Sensitive Text)
-> Maybe Language
-> Maybe Text
-> RuleDetail)
-> Parser (Maybe (NonEmpty Text))
-> Parser
(Maybe Text
-> Maybe (Sensitive Text)
-> Maybe Language
-> Maybe Text
-> RuleDetail)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe (NonEmpty Text))
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"outcomes")
Parser
(Maybe Text
-> Maybe (Sensitive Text)
-> Maybe Language
-> Maybe Text
-> RuleDetail)
-> Parser (Maybe Text)
-> Parser
(Maybe (Sensitive Text)
-> Maybe Language -> Maybe Text -> RuleDetail)
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
"detectorId")
Parser
(Maybe (Sensitive Text)
-> Maybe Language -> Maybe Text -> RuleDetail)
-> Parser (Maybe (Sensitive Text))
-> Parser (Maybe Language -> Maybe Text -> RuleDetail)
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
"expression")
Parser (Maybe Language -> Maybe Text -> RuleDetail)
-> Parser (Maybe Language) -> Parser (Maybe Text -> RuleDetail)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Language)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"language")
Parser (Maybe Text -> RuleDetail)
-> Parser (Maybe Text) -> Parser RuleDetail
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
"description")
)
instance Prelude.Hashable RuleDetail
instance Prelude.NFData RuleDetail