{-# 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.Label where
import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude
data Label = Label'
{
Label -> Maybe Text
lastUpdatedTime :: Prelude.Maybe Prelude.Text,
Label -> Maybe Text
arn :: Prelude.Maybe Prelude.Text,
Label -> Maybe Text
createdTime :: Prelude.Maybe Prelude.Text,
Label -> Maybe Text
name :: Prelude.Maybe Prelude.Text,
Label -> Maybe Text
description :: Prelude.Maybe Prelude.Text
}
deriving (Label -> Label -> Bool
(Label -> Label -> Bool) -> (Label -> Label -> Bool) -> Eq Label
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: Label -> Label -> Bool
$c/= :: Label -> Label -> Bool
== :: Label -> Label -> Bool
$c== :: Label -> Label -> Bool
Prelude.Eq, ReadPrec [Label]
ReadPrec Label
Int -> ReadS Label
ReadS [Label]
(Int -> ReadS Label)
-> ReadS [Label]
-> ReadPrec Label
-> ReadPrec [Label]
-> Read Label
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [Label]
$creadListPrec :: ReadPrec [Label]
readPrec :: ReadPrec Label
$creadPrec :: ReadPrec Label
readList :: ReadS [Label]
$creadList :: ReadS [Label]
readsPrec :: Int -> ReadS Label
$creadsPrec :: Int -> ReadS Label
Prelude.Read, Int -> Label -> ShowS
[Label] -> ShowS
Label -> String
(Int -> Label -> ShowS)
-> (Label -> String) -> ([Label] -> ShowS) -> Show Label
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [Label] -> ShowS
$cshowList :: [Label] -> ShowS
show :: Label -> String
$cshow :: Label -> String
showsPrec :: Int -> Label -> ShowS
$cshowsPrec :: Int -> Label -> ShowS
Prelude.Show, (forall x. Label -> Rep Label x)
-> (forall x. Rep Label x -> Label) -> Generic Label
forall x. Rep Label x -> Label
forall x. Label -> Rep Label x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep Label x -> Label
$cfrom :: forall x. Label -> Rep Label x
Prelude.Generic)
newLabel ::
Label
newLabel :: Label
newLabel =
Label' :: Maybe Text
-> Maybe Text -> Maybe Text -> Maybe Text -> Maybe Text -> Label
Label'
{ $sel:lastUpdatedTime:Label' :: Maybe Text
lastUpdatedTime = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:arn:Label' :: Maybe Text
arn = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:createdTime:Label' :: Maybe Text
createdTime = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:name:Label' :: Maybe Text
name = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:description:Label' :: Maybe Text
description = Maybe Text
forall a. Maybe a
Prelude.Nothing
}
label_lastUpdatedTime :: Lens.Lens' Label (Prelude.Maybe Prelude.Text)
label_lastUpdatedTime :: (Maybe Text -> f (Maybe Text)) -> Label -> f Label
label_lastUpdatedTime = (Label -> Maybe Text)
-> (Label -> Maybe Text -> Label)
-> Lens Label Label (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Label' {Maybe Text
lastUpdatedTime :: Maybe Text
$sel:lastUpdatedTime:Label' :: Label -> Maybe Text
lastUpdatedTime} -> Maybe Text
lastUpdatedTime) (\s :: Label
s@Label' {} Maybe Text
a -> Label
s {$sel:lastUpdatedTime:Label' :: Maybe Text
lastUpdatedTime = Maybe Text
a} :: Label)
label_arn :: Lens.Lens' Label (Prelude.Maybe Prelude.Text)
label_arn :: (Maybe Text -> f (Maybe Text)) -> Label -> f Label
label_arn = (Label -> Maybe Text)
-> (Label -> Maybe Text -> Label)
-> Lens Label Label (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Label' {Maybe Text
arn :: Maybe Text
$sel:arn:Label' :: Label -> Maybe Text
arn} -> Maybe Text
arn) (\s :: Label
s@Label' {} Maybe Text
a -> Label
s {$sel:arn:Label' :: Maybe Text
arn = Maybe Text
a} :: Label)
label_createdTime :: Lens.Lens' Label (Prelude.Maybe Prelude.Text)
label_createdTime :: (Maybe Text -> f (Maybe Text)) -> Label -> f Label
label_createdTime = (Label -> Maybe Text)
-> (Label -> Maybe Text -> Label)
-> Lens Label Label (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Label' {Maybe Text
createdTime :: Maybe Text
$sel:createdTime:Label' :: Label -> Maybe Text
createdTime} -> Maybe Text
createdTime) (\s :: Label
s@Label' {} Maybe Text
a -> Label
s {$sel:createdTime:Label' :: Maybe Text
createdTime = Maybe Text
a} :: Label)
label_name :: Lens.Lens' Label (Prelude.Maybe Prelude.Text)
label_name :: (Maybe Text -> f (Maybe Text)) -> Label -> f Label
label_name = (Label -> Maybe Text)
-> (Label -> Maybe Text -> Label)
-> Lens Label Label (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Label' {Maybe Text
name :: Maybe Text
$sel:name:Label' :: Label -> Maybe Text
name} -> Maybe Text
name) (\s :: Label
s@Label' {} Maybe Text
a -> Label
s {$sel:name:Label' :: Maybe Text
name = Maybe Text
a} :: Label)
label_description :: Lens.Lens' Label (Prelude.Maybe Prelude.Text)
label_description :: (Maybe Text -> f (Maybe Text)) -> Label -> f Label
label_description = (Label -> Maybe Text)
-> (Label -> Maybe Text -> Label)
-> Lens Label Label (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Label' {Maybe Text
description :: Maybe Text
$sel:description:Label' :: Label -> Maybe Text
description} -> Maybe Text
description) (\s :: Label
s@Label' {} Maybe Text
a -> Label
s {$sel:description:Label' :: Maybe Text
description = Maybe Text
a} :: Label)
instance Core.FromJSON Label where
parseJSON :: Value -> Parser Label
parseJSON =
String -> (Object -> Parser Label) -> Value -> Parser Label
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Core.withObject
String
"Label"
( \Object
x ->
Maybe Text
-> Maybe Text -> Maybe Text -> Maybe Text -> Maybe Text -> Label
Label'
(Maybe Text
-> Maybe Text -> Maybe Text -> Maybe Text -> Maybe Text -> Label)
-> Parser (Maybe Text)
-> Parser
(Maybe Text -> Maybe Text -> Maybe Text -> Maybe Text -> Label)
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 Text -> Label)
-> Parser (Maybe Text)
-> Parser (Maybe Text -> Maybe Text -> Maybe Text -> Label)
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 Text -> Label)
-> Parser (Maybe Text)
-> Parser (Maybe Text -> Maybe Text -> Label)
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 Text -> Label)
-> Parser (Maybe Text) -> Parser (Maybe Text -> Label)
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 Text -> Label) -> Parser (Maybe Text) -> Parser Label
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 Label
instance Prelude.NFData Label