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