{-# 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.VoiceId.Types.KnownFraudsterRisk where
import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude
data KnownFraudsterRisk = KnownFraudsterRisk'
{
KnownFraudsterRisk -> Maybe Text
generatedFraudsterId :: Prelude.Maybe Prelude.Text,
KnownFraudsterRisk -> Natural
riskScore :: Prelude.Natural
}
deriving (KnownFraudsterRisk -> KnownFraudsterRisk -> Bool
(KnownFraudsterRisk -> KnownFraudsterRisk -> Bool)
-> (KnownFraudsterRisk -> KnownFraudsterRisk -> Bool)
-> Eq KnownFraudsterRisk
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: KnownFraudsterRisk -> KnownFraudsterRisk -> Bool
$c/= :: KnownFraudsterRisk -> KnownFraudsterRisk -> Bool
== :: KnownFraudsterRisk -> KnownFraudsterRisk -> Bool
$c== :: KnownFraudsterRisk -> KnownFraudsterRisk -> Bool
Prelude.Eq, ReadPrec [KnownFraudsterRisk]
ReadPrec KnownFraudsterRisk
Int -> ReadS KnownFraudsterRisk
ReadS [KnownFraudsterRisk]
(Int -> ReadS KnownFraudsterRisk)
-> ReadS [KnownFraudsterRisk]
-> ReadPrec KnownFraudsterRisk
-> ReadPrec [KnownFraudsterRisk]
-> Read KnownFraudsterRisk
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [KnownFraudsterRisk]
$creadListPrec :: ReadPrec [KnownFraudsterRisk]
readPrec :: ReadPrec KnownFraudsterRisk
$creadPrec :: ReadPrec KnownFraudsterRisk
readList :: ReadS [KnownFraudsterRisk]
$creadList :: ReadS [KnownFraudsterRisk]
readsPrec :: Int -> ReadS KnownFraudsterRisk
$creadsPrec :: Int -> ReadS KnownFraudsterRisk
Prelude.Read, Int -> KnownFraudsterRisk -> ShowS
[KnownFraudsterRisk] -> ShowS
KnownFraudsterRisk -> String
(Int -> KnownFraudsterRisk -> ShowS)
-> (KnownFraudsterRisk -> String)
-> ([KnownFraudsterRisk] -> ShowS)
-> Show KnownFraudsterRisk
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [KnownFraudsterRisk] -> ShowS
$cshowList :: [KnownFraudsterRisk] -> ShowS
show :: KnownFraudsterRisk -> String
$cshow :: KnownFraudsterRisk -> String
showsPrec :: Int -> KnownFraudsterRisk -> ShowS
$cshowsPrec :: Int -> KnownFraudsterRisk -> ShowS
Prelude.Show, (forall x. KnownFraudsterRisk -> Rep KnownFraudsterRisk x)
-> (forall x. Rep KnownFraudsterRisk x -> KnownFraudsterRisk)
-> Generic KnownFraudsterRisk
forall x. Rep KnownFraudsterRisk x -> KnownFraudsterRisk
forall x. KnownFraudsterRisk -> Rep KnownFraudsterRisk x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep KnownFraudsterRisk x -> KnownFraudsterRisk
$cfrom :: forall x. KnownFraudsterRisk -> Rep KnownFraudsterRisk x
Prelude.Generic)
newKnownFraudsterRisk ::
Prelude.Natural ->
KnownFraudsterRisk
newKnownFraudsterRisk :: Natural -> KnownFraudsterRisk
newKnownFraudsterRisk Natural
pRiskScore_ =
KnownFraudsterRisk' :: Maybe Text -> Natural -> KnownFraudsterRisk
KnownFraudsterRisk'
{ $sel:generatedFraudsterId:KnownFraudsterRisk' :: Maybe Text
generatedFraudsterId =
Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:riskScore:KnownFraudsterRisk' :: Natural
riskScore = Natural
pRiskScore_
}
knownFraudsterRisk_generatedFraudsterId :: Lens.Lens' KnownFraudsterRisk (Prelude.Maybe Prelude.Text)
knownFraudsterRisk_generatedFraudsterId :: (Maybe Text -> f (Maybe Text))
-> KnownFraudsterRisk -> f KnownFraudsterRisk
knownFraudsterRisk_generatedFraudsterId = (KnownFraudsterRisk -> Maybe Text)
-> (KnownFraudsterRisk -> Maybe Text -> KnownFraudsterRisk)
-> Lens
KnownFraudsterRisk KnownFraudsterRisk (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\KnownFraudsterRisk' {Maybe Text
generatedFraudsterId :: Maybe Text
$sel:generatedFraudsterId:KnownFraudsterRisk' :: KnownFraudsterRisk -> Maybe Text
generatedFraudsterId} -> Maybe Text
generatedFraudsterId) (\s :: KnownFraudsterRisk
s@KnownFraudsterRisk' {} Maybe Text
a -> KnownFraudsterRisk
s {$sel:generatedFraudsterId:KnownFraudsterRisk' :: Maybe Text
generatedFraudsterId = Maybe Text
a} :: KnownFraudsterRisk)
knownFraudsterRisk_riskScore :: Lens.Lens' KnownFraudsterRisk Prelude.Natural
knownFraudsterRisk_riskScore :: (Natural -> f Natural)
-> KnownFraudsterRisk -> f KnownFraudsterRisk
knownFraudsterRisk_riskScore = (KnownFraudsterRisk -> Natural)
-> (KnownFraudsterRisk -> Natural -> KnownFraudsterRisk)
-> Lens KnownFraudsterRisk KnownFraudsterRisk Natural Natural
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\KnownFraudsterRisk' {Natural
riskScore :: Natural
$sel:riskScore:KnownFraudsterRisk' :: KnownFraudsterRisk -> Natural
riskScore} -> Natural
riskScore) (\s :: KnownFraudsterRisk
s@KnownFraudsterRisk' {} Natural
a -> KnownFraudsterRisk
s {$sel:riskScore:KnownFraudsterRisk' :: Natural
riskScore = Natural
a} :: KnownFraudsterRisk)
instance Core.FromJSON KnownFraudsterRisk where
parseJSON :: Value -> Parser KnownFraudsterRisk
parseJSON =
String
-> (Object -> Parser KnownFraudsterRisk)
-> Value
-> Parser KnownFraudsterRisk
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Core.withObject
String
"KnownFraudsterRisk"
( \Object
x ->
Maybe Text -> Natural -> KnownFraudsterRisk
KnownFraudsterRisk'
(Maybe Text -> Natural -> KnownFraudsterRisk)
-> Parser (Maybe Text) -> Parser (Natural -> KnownFraudsterRisk)
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
"GeneratedFraudsterId")
Parser (Natural -> KnownFraudsterRisk)
-> Parser Natural -> Parser KnownFraudsterRisk
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser Natural
forall a. FromJSON a => Object -> Text -> Parser a
Core..: Text
"RiskScore")
)
instance Prelude.Hashable KnownFraudsterRisk
instance Prelude.NFData KnownFraudsterRisk