{-# 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.CustomerProfiles.Types.ListProfileObjectTypeItem where
import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude
data ListProfileObjectTypeItem = ListProfileObjectTypeItem'
{
ListProfileObjectTypeItem -> Maybe POSIX
lastUpdatedAt :: Prelude.Maybe Core.POSIX,
ListProfileObjectTypeItem -> Maybe POSIX
createdAt :: Prelude.Maybe Core.POSIX,
ListProfileObjectTypeItem -> Maybe (HashMap Text Text)
tags :: Prelude.Maybe (Prelude.HashMap Prelude.Text Prelude.Text),
ListProfileObjectTypeItem -> Text
objectTypeName :: Prelude.Text,
ListProfileObjectTypeItem -> Text
description :: Prelude.Text
}
deriving (ListProfileObjectTypeItem -> ListProfileObjectTypeItem -> Bool
(ListProfileObjectTypeItem -> ListProfileObjectTypeItem -> Bool)
-> (ListProfileObjectTypeItem -> ListProfileObjectTypeItem -> Bool)
-> Eq ListProfileObjectTypeItem
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ListProfileObjectTypeItem -> ListProfileObjectTypeItem -> Bool
$c/= :: ListProfileObjectTypeItem -> ListProfileObjectTypeItem -> Bool
== :: ListProfileObjectTypeItem -> ListProfileObjectTypeItem -> Bool
$c== :: ListProfileObjectTypeItem -> ListProfileObjectTypeItem -> Bool
Prelude.Eq, ReadPrec [ListProfileObjectTypeItem]
ReadPrec ListProfileObjectTypeItem
Int -> ReadS ListProfileObjectTypeItem
ReadS [ListProfileObjectTypeItem]
(Int -> ReadS ListProfileObjectTypeItem)
-> ReadS [ListProfileObjectTypeItem]
-> ReadPrec ListProfileObjectTypeItem
-> ReadPrec [ListProfileObjectTypeItem]
-> Read ListProfileObjectTypeItem
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [ListProfileObjectTypeItem]
$creadListPrec :: ReadPrec [ListProfileObjectTypeItem]
readPrec :: ReadPrec ListProfileObjectTypeItem
$creadPrec :: ReadPrec ListProfileObjectTypeItem
readList :: ReadS [ListProfileObjectTypeItem]
$creadList :: ReadS [ListProfileObjectTypeItem]
readsPrec :: Int -> ReadS ListProfileObjectTypeItem
$creadsPrec :: Int -> ReadS ListProfileObjectTypeItem
Prelude.Read, Int -> ListProfileObjectTypeItem -> ShowS
[ListProfileObjectTypeItem] -> ShowS
ListProfileObjectTypeItem -> String
(Int -> ListProfileObjectTypeItem -> ShowS)
-> (ListProfileObjectTypeItem -> String)
-> ([ListProfileObjectTypeItem] -> ShowS)
-> Show ListProfileObjectTypeItem
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [ListProfileObjectTypeItem] -> ShowS
$cshowList :: [ListProfileObjectTypeItem] -> ShowS
show :: ListProfileObjectTypeItem -> String
$cshow :: ListProfileObjectTypeItem -> String
showsPrec :: Int -> ListProfileObjectTypeItem -> ShowS
$cshowsPrec :: Int -> ListProfileObjectTypeItem -> ShowS
Prelude.Show, (forall x.
ListProfileObjectTypeItem -> Rep ListProfileObjectTypeItem x)
-> (forall x.
Rep ListProfileObjectTypeItem x -> ListProfileObjectTypeItem)
-> Generic ListProfileObjectTypeItem
forall x.
Rep ListProfileObjectTypeItem x -> ListProfileObjectTypeItem
forall x.
ListProfileObjectTypeItem -> Rep ListProfileObjectTypeItem x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep ListProfileObjectTypeItem x -> ListProfileObjectTypeItem
$cfrom :: forall x.
ListProfileObjectTypeItem -> Rep ListProfileObjectTypeItem x
Prelude.Generic)
newListProfileObjectTypeItem ::
Prelude.Text ->
Prelude.Text ->
ListProfileObjectTypeItem
newListProfileObjectTypeItem :: Text -> Text -> ListProfileObjectTypeItem
newListProfileObjectTypeItem
Text
pObjectTypeName_
Text
pDescription_ =
ListProfileObjectTypeItem' :: Maybe POSIX
-> Maybe POSIX
-> Maybe (HashMap Text Text)
-> Text
-> Text
-> ListProfileObjectTypeItem
ListProfileObjectTypeItem'
{ $sel:lastUpdatedAt:ListProfileObjectTypeItem' :: Maybe POSIX
lastUpdatedAt =
Maybe POSIX
forall a. Maybe a
Prelude.Nothing,
$sel:createdAt:ListProfileObjectTypeItem' :: Maybe POSIX
createdAt = Maybe POSIX
forall a. Maybe a
Prelude.Nothing,
$sel:tags:ListProfileObjectTypeItem' :: Maybe (HashMap Text Text)
tags = Maybe (HashMap Text Text)
forall a. Maybe a
Prelude.Nothing,
$sel:objectTypeName:ListProfileObjectTypeItem' :: Text
objectTypeName = Text
pObjectTypeName_,
$sel:description:ListProfileObjectTypeItem' :: Text
description = Text
pDescription_
}
listProfileObjectTypeItem_lastUpdatedAt :: Lens.Lens' ListProfileObjectTypeItem (Prelude.Maybe Prelude.UTCTime)
listProfileObjectTypeItem_lastUpdatedAt :: (Maybe UTCTime -> f (Maybe UTCTime))
-> ListProfileObjectTypeItem -> f ListProfileObjectTypeItem
listProfileObjectTypeItem_lastUpdatedAt = (ListProfileObjectTypeItem -> Maybe POSIX)
-> (ListProfileObjectTypeItem
-> Maybe POSIX -> ListProfileObjectTypeItem)
-> Lens
ListProfileObjectTypeItem
ListProfileObjectTypeItem
(Maybe POSIX)
(Maybe POSIX)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListProfileObjectTypeItem' {Maybe POSIX
lastUpdatedAt :: Maybe POSIX
$sel:lastUpdatedAt:ListProfileObjectTypeItem' :: ListProfileObjectTypeItem -> Maybe POSIX
lastUpdatedAt} -> Maybe POSIX
lastUpdatedAt) (\s :: ListProfileObjectTypeItem
s@ListProfileObjectTypeItem' {} Maybe POSIX
a -> ListProfileObjectTypeItem
s {$sel:lastUpdatedAt:ListProfileObjectTypeItem' :: Maybe POSIX
lastUpdatedAt = Maybe POSIX
a} :: ListProfileObjectTypeItem) ((Maybe POSIX -> f (Maybe POSIX))
-> ListProfileObjectTypeItem -> f ListProfileObjectTypeItem)
-> ((Maybe UTCTime -> f (Maybe UTCTime))
-> Maybe POSIX -> f (Maybe POSIX))
-> (Maybe UTCTime -> f (Maybe UTCTime))
-> ListProfileObjectTypeItem
-> f ListProfileObjectTypeItem
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso POSIX POSIX UTCTime UTCTime
-> Iso (Maybe POSIX) (Maybe POSIX) (Maybe UTCTime) (Maybe UTCTime)
forall (f :: * -> *) (g :: * -> *) s t a b.
(Functor f, Functor g) =>
AnIso s t a b -> Iso (f s) (g t) (f a) (g b)
Lens.mapping AnIso POSIX POSIX UTCTime UTCTime
forall (a :: Format). Iso' (Time a) UTCTime
Core._Time
listProfileObjectTypeItem_createdAt :: Lens.Lens' ListProfileObjectTypeItem (Prelude.Maybe Prelude.UTCTime)
listProfileObjectTypeItem_createdAt :: (Maybe UTCTime -> f (Maybe UTCTime))
-> ListProfileObjectTypeItem -> f ListProfileObjectTypeItem
listProfileObjectTypeItem_createdAt = (ListProfileObjectTypeItem -> Maybe POSIX)
-> (ListProfileObjectTypeItem
-> Maybe POSIX -> ListProfileObjectTypeItem)
-> Lens
ListProfileObjectTypeItem
ListProfileObjectTypeItem
(Maybe POSIX)
(Maybe POSIX)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListProfileObjectTypeItem' {Maybe POSIX
createdAt :: Maybe POSIX
$sel:createdAt:ListProfileObjectTypeItem' :: ListProfileObjectTypeItem -> Maybe POSIX
createdAt} -> Maybe POSIX
createdAt) (\s :: ListProfileObjectTypeItem
s@ListProfileObjectTypeItem' {} Maybe POSIX
a -> ListProfileObjectTypeItem
s {$sel:createdAt:ListProfileObjectTypeItem' :: Maybe POSIX
createdAt = Maybe POSIX
a} :: ListProfileObjectTypeItem) ((Maybe POSIX -> f (Maybe POSIX))
-> ListProfileObjectTypeItem -> f ListProfileObjectTypeItem)
-> ((Maybe UTCTime -> f (Maybe UTCTime))
-> Maybe POSIX -> f (Maybe POSIX))
-> (Maybe UTCTime -> f (Maybe UTCTime))
-> ListProfileObjectTypeItem
-> f ListProfileObjectTypeItem
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso POSIX POSIX UTCTime UTCTime
-> Iso (Maybe POSIX) (Maybe POSIX) (Maybe UTCTime) (Maybe UTCTime)
forall (f :: * -> *) (g :: * -> *) s t a b.
(Functor f, Functor g) =>
AnIso s t a b -> Iso (f s) (g t) (f a) (g b)
Lens.mapping AnIso POSIX POSIX UTCTime UTCTime
forall (a :: Format). Iso' (Time a) UTCTime
Core._Time
listProfileObjectTypeItem_tags :: Lens.Lens' ListProfileObjectTypeItem (Prelude.Maybe (Prelude.HashMap Prelude.Text Prelude.Text))
listProfileObjectTypeItem_tags :: (Maybe (HashMap Text Text) -> f (Maybe (HashMap Text Text)))
-> ListProfileObjectTypeItem -> f ListProfileObjectTypeItem
listProfileObjectTypeItem_tags = (ListProfileObjectTypeItem -> Maybe (HashMap Text Text))
-> (ListProfileObjectTypeItem
-> Maybe (HashMap Text Text) -> ListProfileObjectTypeItem)
-> Lens
ListProfileObjectTypeItem
ListProfileObjectTypeItem
(Maybe (HashMap Text Text))
(Maybe (HashMap Text Text))
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListProfileObjectTypeItem' {Maybe (HashMap Text Text)
tags :: Maybe (HashMap Text Text)
$sel:tags:ListProfileObjectTypeItem' :: ListProfileObjectTypeItem -> Maybe (HashMap Text Text)
tags} -> Maybe (HashMap Text Text)
tags) (\s :: ListProfileObjectTypeItem
s@ListProfileObjectTypeItem' {} Maybe (HashMap Text Text)
a -> ListProfileObjectTypeItem
s {$sel:tags:ListProfileObjectTypeItem' :: Maybe (HashMap Text Text)
tags = Maybe (HashMap Text Text)
a} :: ListProfileObjectTypeItem) ((Maybe (HashMap Text Text) -> f (Maybe (HashMap Text Text)))
-> ListProfileObjectTypeItem -> f ListProfileObjectTypeItem)
-> ((Maybe (HashMap Text Text) -> f (Maybe (HashMap Text Text)))
-> Maybe (HashMap Text Text) -> f (Maybe (HashMap Text Text)))
-> (Maybe (HashMap Text Text) -> f (Maybe (HashMap Text Text)))
-> ListProfileObjectTypeItem
-> f ListProfileObjectTypeItem
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso
(HashMap Text Text)
(HashMap Text Text)
(HashMap Text Text)
(HashMap Text Text)
-> Iso
(Maybe (HashMap Text Text))
(Maybe (HashMap Text Text))
(Maybe (HashMap Text Text))
(Maybe (HashMap Text Text))
forall (f :: * -> *) (g :: * -> *) s t a b.
(Functor f, Functor g) =>
AnIso s t a b -> Iso (f s) (g t) (f a) (g b)
Lens.mapping AnIso
(HashMap Text Text)
(HashMap Text Text)
(HashMap Text Text)
(HashMap Text Text)
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced
listProfileObjectTypeItem_objectTypeName :: Lens.Lens' ListProfileObjectTypeItem Prelude.Text
listProfileObjectTypeItem_objectTypeName :: (Text -> f Text)
-> ListProfileObjectTypeItem -> f ListProfileObjectTypeItem
listProfileObjectTypeItem_objectTypeName = (ListProfileObjectTypeItem -> Text)
-> (ListProfileObjectTypeItem -> Text -> ListProfileObjectTypeItem)
-> Lens
ListProfileObjectTypeItem ListProfileObjectTypeItem Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListProfileObjectTypeItem' {Text
objectTypeName :: Text
$sel:objectTypeName:ListProfileObjectTypeItem' :: ListProfileObjectTypeItem -> Text
objectTypeName} -> Text
objectTypeName) (\s :: ListProfileObjectTypeItem
s@ListProfileObjectTypeItem' {} Text
a -> ListProfileObjectTypeItem
s {$sel:objectTypeName:ListProfileObjectTypeItem' :: Text
objectTypeName = Text
a} :: ListProfileObjectTypeItem)
listProfileObjectTypeItem_description :: Lens.Lens' ListProfileObjectTypeItem Prelude.Text
listProfileObjectTypeItem_description :: (Text -> f Text)
-> ListProfileObjectTypeItem -> f ListProfileObjectTypeItem
listProfileObjectTypeItem_description = (ListProfileObjectTypeItem -> Text)
-> (ListProfileObjectTypeItem -> Text -> ListProfileObjectTypeItem)
-> Lens
ListProfileObjectTypeItem ListProfileObjectTypeItem Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListProfileObjectTypeItem' {Text
description :: Text
$sel:description:ListProfileObjectTypeItem' :: ListProfileObjectTypeItem -> Text
description} -> Text
description) (\s :: ListProfileObjectTypeItem
s@ListProfileObjectTypeItem' {} Text
a -> ListProfileObjectTypeItem
s {$sel:description:ListProfileObjectTypeItem' :: Text
description = Text
a} :: ListProfileObjectTypeItem)
instance Core.FromJSON ListProfileObjectTypeItem where
parseJSON :: Value -> Parser ListProfileObjectTypeItem
parseJSON =
String
-> (Object -> Parser ListProfileObjectTypeItem)
-> Value
-> Parser ListProfileObjectTypeItem
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Core.withObject
String
"ListProfileObjectTypeItem"
( \Object
x ->
Maybe POSIX
-> Maybe POSIX
-> Maybe (HashMap Text Text)
-> Text
-> Text
-> ListProfileObjectTypeItem
ListProfileObjectTypeItem'
(Maybe POSIX
-> Maybe POSIX
-> Maybe (HashMap Text Text)
-> Text
-> Text
-> ListProfileObjectTypeItem)
-> Parser (Maybe POSIX)
-> Parser
(Maybe POSIX
-> Maybe (HashMap Text Text)
-> Text
-> Text
-> ListProfileObjectTypeItem)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x Object -> Text -> Parser (Maybe POSIX)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"LastUpdatedAt")
Parser
(Maybe POSIX
-> Maybe (HashMap Text Text)
-> Text
-> Text
-> ListProfileObjectTypeItem)
-> Parser (Maybe POSIX)
-> Parser
(Maybe (HashMap Text Text)
-> Text -> Text -> ListProfileObjectTypeItem)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe POSIX)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"CreatedAt")
Parser
(Maybe (HashMap Text Text)
-> Text -> Text -> ListProfileObjectTypeItem)
-> Parser (Maybe (HashMap Text Text))
-> Parser (Text -> Text -> ListProfileObjectTypeItem)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe (Maybe (HashMap Text Text)))
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"Tags" Parser (Maybe (Maybe (HashMap Text Text)))
-> Maybe (HashMap Text Text) -> Parser (Maybe (HashMap Text Text))
forall a. Parser (Maybe a) -> a -> Parser a
Core..!= Maybe (HashMap Text Text)
forall a. Monoid a => a
Prelude.mempty)
Parser (Text -> Text -> ListProfileObjectTypeItem)
-> Parser Text -> Parser (Text -> ListProfileObjectTypeItem)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser Text
forall a. FromJSON a => Object -> Text -> Parser a
Core..: Text
"ObjectTypeName")
Parser (Text -> ListProfileObjectTypeItem)
-> Parser Text -> Parser ListProfileObjectTypeItem
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser Text
forall a. FromJSON a => Object -> Text -> Parser a
Core..: Text
"Description")
)
instance Prelude.Hashable ListProfileObjectTypeItem
instance Prelude.NFData ListProfileObjectTypeItem