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