{-# 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.Variable where
import qualified Amazonka.Core as Core
import Amazonka.FraudDetector.Types.DataSource
import Amazonka.FraudDetector.Types.DataType
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude
data Variable = Variable'
{
Variable -> Maybe Text
lastUpdatedTime :: Prelude.Maybe Prelude.Text,
Variable -> Maybe Text
arn :: Prelude.Maybe Prelude.Text,
Variable -> Maybe Text
createdTime :: Prelude.Maybe Prelude.Text,
Variable -> Maybe Text
name :: Prelude.Maybe Prelude.Text,
Variable -> Maybe DataSource
dataSource :: Prelude.Maybe DataSource,
Variable -> Maybe DataType
dataType :: Prelude.Maybe DataType,
Variable -> Maybe Text
defaultValue :: Prelude.Maybe Prelude.Text,
Variable -> Maybe Text
variableType :: Prelude.Maybe Prelude.Text,
Variable -> Maybe Text
description :: Prelude.Maybe Prelude.Text
}
deriving (Variable -> Variable -> Bool
(Variable -> Variable -> Bool)
-> (Variable -> Variable -> Bool) -> Eq Variable
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: Variable -> Variable -> Bool
$c/= :: Variable -> Variable -> Bool
== :: Variable -> Variable -> Bool
$c== :: Variable -> Variable -> Bool
Prelude.Eq, ReadPrec [Variable]
ReadPrec Variable
Int -> ReadS Variable
ReadS [Variable]
(Int -> ReadS Variable)
-> ReadS [Variable]
-> ReadPrec Variable
-> ReadPrec [Variable]
-> Read Variable
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [Variable]
$creadListPrec :: ReadPrec [Variable]
readPrec :: ReadPrec Variable
$creadPrec :: ReadPrec Variable
readList :: ReadS [Variable]
$creadList :: ReadS [Variable]
readsPrec :: Int -> ReadS Variable
$creadsPrec :: Int -> ReadS Variable
Prelude.Read, Int -> Variable -> ShowS
[Variable] -> ShowS
Variable -> String
(Int -> Variable -> ShowS)
-> (Variable -> String) -> ([Variable] -> ShowS) -> Show Variable
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [Variable] -> ShowS
$cshowList :: [Variable] -> ShowS
show :: Variable -> String
$cshow :: Variable -> String
showsPrec :: Int -> Variable -> ShowS
$cshowsPrec :: Int -> Variable -> ShowS
Prelude.Show, (forall x. Variable -> Rep Variable x)
-> (forall x. Rep Variable x -> Variable) -> Generic Variable
forall x. Rep Variable x -> Variable
forall x. Variable -> Rep Variable x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep Variable x -> Variable
$cfrom :: forall x. Variable -> Rep Variable x
Prelude.Generic)
newVariable ::
Variable
newVariable :: Variable
newVariable =
Variable' :: Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe DataSource
-> Maybe DataType
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Variable
Variable'
{ $sel:lastUpdatedTime:Variable' :: Maybe Text
lastUpdatedTime = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:arn:Variable' :: Maybe Text
arn = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:createdTime:Variable' :: Maybe Text
createdTime = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:name:Variable' :: Maybe Text
name = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:dataSource:Variable' :: Maybe DataSource
dataSource = Maybe DataSource
forall a. Maybe a
Prelude.Nothing,
$sel:dataType:Variable' :: Maybe DataType
dataType = Maybe DataType
forall a. Maybe a
Prelude.Nothing,
$sel:defaultValue:Variable' :: Maybe Text
defaultValue = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:variableType:Variable' :: Maybe Text
variableType = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:description:Variable' :: Maybe Text
description = Maybe Text
forall a. Maybe a
Prelude.Nothing
}
variable_lastUpdatedTime :: Lens.Lens' Variable (Prelude.Maybe Prelude.Text)
variable_lastUpdatedTime :: (Maybe Text -> f (Maybe Text)) -> Variable -> f Variable
variable_lastUpdatedTime = (Variable -> Maybe Text)
-> (Variable -> Maybe Text -> Variable)
-> Lens Variable Variable (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Variable' {Maybe Text
lastUpdatedTime :: Maybe Text
$sel:lastUpdatedTime:Variable' :: Variable -> Maybe Text
lastUpdatedTime} -> Maybe Text
lastUpdatedTime) (\s :: Variable
s@Variable' {} Maybe Text
a -> Variable
s {$sel:lastUpdatedTime:Variable' :: Maybe Text
lastUpdatedTime = Maybe Text
a} :: Variable)
variable_arn :: Lens.Lens' Variable (Prelude.Maybe Prelude.Text)
variable_arn :: (Maybe Text -> f (Maybe Text)) -> Variable -> f Variable
variable_arn = (Variable -> Maybe Text)
-> (Variable -> Maybe Text -> Variable)
-> Lens Variable Variable (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Variable' {Maybe Text
arn :: Maybe Text
$sel:arn:Variable' :: Variable -> Maybe Text
arn} -> Maybe Text
arn) (\s :: Variable
s@Variable' {} Maybe Text
a -> Variable
s {$sel:arn:Variable' :: Maybe Text
arn = Maybe Text
a} :: Variable)
variable_createdTime :: Lens.Lens' Variable (Prelude.Maybe Prelude.Text)
variable_createdTime :: (Maybe Text -> f (Maybe Text)) -> Variable -> f Variable
variable_createdTime = (Variable -> Maybe Text)
-> (Variable -> Maybe Text -> Variable)
-> Lens Variable Variable (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Variable' {Maybe Text
createdTime :: Maybe Text
$sel:createdTime:Variable' :: Variable -> Maybe Text
createdTime} -> Maybe Text
createdTime) (\s :: Variable
s@Variable' {} Maybe Text
a -> Variable
s {$sel:createdTime:Variable' :: Maybe Text
createdTime = Maybe Text
a} :: Variable)
variable_name :: Lens.Lens' Variable (Prelude.Maybe Prelude.Text)
variable_name :: (Maybe Text -> f (Maybe Text)) -> Variable -> f Variable
variable_name = (Variable -> Maybe Text)
-> (Variable -> Maybe Text -> Variable)
-> Lens Variable Variable (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Variable' {Maybe Text
name :: Maybe Text
$sel:name:Variable' :: Variable -> Maybe Text
name} -> Maybe Text
name) (\s :: Variable
s@Variable' {} Maybe Text
a -> Variable
s {$sel:name:Variable' :: Maybe Text
name = Maybe Text
a} :: Variable)
variable_dataSource :: Lens.Lens' Variable (Prelude.Maybe DataSource)
variable_dataSource :: (Maybe DataSource -> f (Maybe DataSource))
-> Variable -> f Variable
variable_dataSource = (Variable -> Maybe DataSource)
-> (Variable -> Maybe DataSource -> Variable)
-> Lens Variable Variable (Maybe DataSource) (Maybe DataSource)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Variable' {Maybe DataSource
dataSource :: Maybe DataSource
$sel:dataSource:Variable' :: Variable -> Maybe DataSource
dataSource} -> Maybe DataSource
dataSource) (\s :: Variable
s@Variable' {} Maybe DataSource
a -> Variable
s {$sel:dataSource:Variable' :: Maybe DataSource
dataSource = Maybe DataSource
a} :: Variable)
variable_dataType :: Lens.Lens' Variable (Prelude.Maybe DataType)
variable_dataType :: (Maybe DataType -> f (Maybe DataType)) -> Variable -> f Variable
variable_dataType = (Variable -> Maybe DataType)
-> (Variable -> Maybe DataType -> Variable)
-> Lens Variable Variable (Maybe DataType) (Maybe DataType)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Variable' {Maybe DataType
dataType :: Maybe DataType
$sel:dataType:Variable' :: Variable -> Maybe DataType
dataType} -> Maybe DataType
dataType) (\s :: Variable
s@Variable' {} Maybe DataType
a -> Variable
s {$sel:dataType:Variable' :: Maybe DataType
dataType = Maybe DataType
a} :: Variable)
variable_defaultValue :: Lens.Lens' Variable (Prelude.Maybe Prelude.Text)
variable_defaultValue :: (Maybe Text -> f (Maybe Text)) -> Variable -> f Variable
variable_defaultValue = (Variable -> Maybe Text)
-> (Variable -> Maybe Text -> Variable)
-> Lens Variable Variable (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Variable' {Maybe Text
defaultValue :: Maybe Text
$sel:defaultValue:Variable' :: Variable -> Maybe Text
defaultValue} -> Maybe Text
defaultValue) (\s :: Variable
s@Variable' {} Maybe Text
a -> Variable
s {$sel:defaultValue:Variable' :: Maybe Text
defaultValue = Maybe Text
a} :: Variable)
variable_variableType :: Lens.Lens' Variable (Prelude.Maybe Prelude.Text)
variable_variableType :: (Maybe Text -> f (Maybe Text)) -> Variable -> f Variable
variable_variableType = (Variable -> Maybe Text)
-> (Variable -> Maybe Text -> Variable)
-> Lens Variable Variable (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Variable' {Maybe Text
variableType :: Maybe Text
$sel:variableType:Variable' :: Variable -> Maybe Text
variableType} -> Maybe Text
variableType) (\s :: Variable
s@Variable' {} Maybe Text
a -> Variable
s {$sel:variableType:Variable' :: Maybe Text
variableType = Maybe Text
a} :: Variable)
variable_description :: Lens.Lens' Variable (Prelude.Maybe Prelude.Text)
variable_description :: (Maybe Text -> f (Maybe Text)) -> Variable -> f Variable
variable_description = (Variable -> Maybe Text)
-> (Variable -> Maybe Text -> Variable)
-> Lens Variable Variable (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Variable' {Maybe Text
description :: Maybe Text
$sel:description:Variable' :: Variable -> Maybe Text
description} -> Maybe Text
description) (\s :: Variable
s@Variable' {} Maybe Text
a -> Variable
s {$sel:description:Variable' :: Maybe Text
description = Maybe Text
a} :: Variable)
instance Core.FromJSON Variable where
parseJSON :: Value -> Parser Variable
parseJSON =
String -> (Object -> Parser Variable) -> Value -> Parser Variable
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Core.withObject
String
"Variable"
( \Object
x ->
Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe DataSource
-> Maybe DataType
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Variable
Variable'
(Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe DataSource
-> Maybe DataType
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Variable)
-> Parser (Maybe Text)
-> Parser
(Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe DataSource
-> Maybe DataType
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Variable)
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
"lastUpdatedTime")
Parser
(Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe DataSource
-> Maybe DataType
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Variable)
-> Parser (Maybe Text)
-> Parser
(Maybe Text
-> Maybe Text
-> Maybe DataSource
-> Maybe DataType
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Variable)
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 DataSource
-> Maybe DataType
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Variable)
-> Parser (Maybe Text)
-> Parser
(Maybe Text
-> Maybe DataSource
-> Maybe DataType
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Variable)
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 DataSource
-> Maybe DataType
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Variable)
-> Parser (Maybe Text)
-> Parser
(Maybe DataSource
-> Maybe DataType
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Variable)
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
"name")
Parser
(Maybe DataSource
-> Maybe DataType
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Variable)
-> Parser (Maybe DataSource)
-> Parser
(Maybe DataType
-> Maybe Text -> Maybe Text -> Maybe Text -> Variable)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe DataSource)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"dataSource")
Parser
(Maybe DataType
-> Maybe Text -> Maybe Text -> Maybe Text -> Variable)
-> Parser (Maybe DataType)
-> Parser (Maybe Text -> Maybe Text -> Maybe Text -> Variable)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe DataType)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"dataType")
Parser (Maybe Text -> Maybe Text -> Maybe Text -> Variable)
-> Parser (Maybe Text)
-> Parser (Maybe Text -> Maybe Text -> Variable)
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
"defaultValue")
Parser (Maybe Text -> Maybe Text -> Variable)
-> Parser (Maybe Text) -> Parser (Maybe Text -> Variable)
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
"variableType")
Parser (Maybe Text -> Variable)
-> Parser (Maybe Text) -> Parser Variable
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 Variable
instance Prelude.NFData Variable