{-# 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.ListProfileObjectTypeTemplateItem where
import qualified Amazonka.Core as Core
import qualified Amazonka.Core.Lens.Internal as Lens
import qualified Amazonka.Data as Data
import qualified Amazonka.Prelude as Prelude
data ListProfileObjectTypeTemplateItem = ListProfileObjectTypeTemplateItem'
{
ListProfileObjectTypeTemplateItem -> Maybe Text
sourceName :: Prelude.Maybe Prelude.Text,
ListProfileObjectTypeTemplateItem -> Maybe Text
sourceObject :: Prelude.Maybe Prelude.Text,
ListProfileObjectTypeTemplateItem -> Maybe Text
templateId :: Prelude.Maybe Prelude.Text
}
deriving (ListProfileObjectTypeTemplateItem
-> ListProfileObjectTypeTemplateItem -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ListProfileObjectTypeTemplateItem
-> ListProfileObjectTypeTemplateItem -> Bool
$c/= :: ListProfileObjectTypeTemplateItem
-> ListProfileObjectTypeTemplateItem -> Bool
== :: ListProfileObjectTypeTemplateItem
-> ListProfileObjectTypeTemplateItem -> Bool
$c== :: ListProfileObjectTypeTemplateItem
-> ListProfileObjectTypeTemplateItem -> Bool
Prelude.Eq, ReadPrec [ListProfileObjectTypeTemplateItem]
ReadPrec ListProfileObjectTypeTemplateItem
Int -> ReadS ListProfileObjectTypeTemplateItem
ReadS [ListProfileObjectTypeTemplateItem]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [ListProfileObjectTypeTemplateItem]
$creadListPrec :: ReadPrec [ListProfileObjectTypeTemplateItem]
readPrec :: ReadPrec ListProfileObjectTypeTemplateItem
$creadPrec :: ReadPrec ListProfileObjectTypeTemplateItem
readList :: ReadS [ListProfileObjectTypeTemplateItem]
$creadList :: ReadS [ListProfileObjectTypeTemplateItem]
readsPrec :: Int -> ReadS ListProfileObjectTypeTemplateItem
$creadsPrec :: Int -> ReadS ListProfileObjectTypeTemplateItem
Prelude.Read, Int -> ListProfileObjectTypeTemplateItem -> ShowS
[ListProfileObjectTypeTemplateItem] -> ShowS
ListProfileObjectTypeTemplateItem -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [ListProfileObjectTypeTemplateItem] -> ShowS
$cshowList :: [ListProfileObjectTypeTemplateItem] -> ShowS
show :: ListProfileObjectTypeTemplateItem -> String
$cshow :: ListProfileObjectTypeTemplateItem -> String
showsPrec :: Int -> ListProfileObjectTypeTemplateItem -> ShowS
$cshowsPrec :: Int -> ListProfileObjectTypeTemplateItem -> ShowS
Prelude.Show, forall x.
Rep ListProfileObjectTypeTemplateItem x
-> ListProfileObjectTypeTemplateItem
forall x.
ListProfileObjectTypeTemplateItem
-> Rep ListProfileObjectTypeTemplateItem x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep ListProfileObjectTypeTemplateItem x
-> ListProfileObjectTypeTemplateItem
$cfrom :: forall x.
ListProfileObjectTypeTemplateItem
-> Rep ListProfileObjectTypeTemplateItem x
Prelude.Generic)
newListProfileObjectTypeTemplateItem ::
ListProfileObjectTypeTemplateItem
newListProfileObjectTypeTemplateItem :: ListProfileObjectTypeTemplateItem
newListProfileObjectTypeTemplateItem =
ListProfileObjectTypeTemplateItem'
{ $sel:sourceName:ListProfileObjectTypeTemplateItem' :: Maybe Text
sourceName =
forall a. Maybe a
Prelude.Nothing,
$sel:sourceObject:ListProfileObjectTypeTemplateItem' :: Maybe Text
sourceObject = forall a. Maybe a
Prelude.Nothing,
$sel:templateId:ListProfileObjectTypeTemplateItem' :: Maybe Text
templateId = forall a. Maybe a
Prelude.Nothing
}
listProfileObjectTypeTemplateItem_sourceName :: Lens.Lens' ListProfileObjectTypeTemplateItem (Prelude.Maybe Prelude.Text)
listProfileObjectTypeTemplateItem_sourceName :: Lens' ListProfileObjectTypeTemplateItem (Maybe Text)
listProfileObjectTypeTemplateItem_sourceName = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListProfileObjectTypeTemplateItem' {Maybe Text
sourceName :: Maybe Text
$sel:sourceName:ListProfileObjectTypeTemplateItem' :: ListProfileObjectTypeTemplateItem -> Maybe Text
sourceName} -> Maybe Text
sourceName) (\s :: ListProfileObjectTypeTemplateItem
s@ListProfileObjectTypeTemplateItem' {} Maybe Text
a -> ListProfileObjectTypeTemplateItem
s {$sel:sourceName:ListProfileObjectTypeTemplateItem' :: Maybe Text
sourceName = Maybe Text
a} :: ListProfileObjectTypeTemplateItem)
listProfileObjectTypeTemplateItem_sourceObject :: Lens.Lens' ListProfileObjectTypeTemplateItem (Prelude.Maybe Prelude.Text)
listProfileObjectTypeTemplateItem_sourceObject :: Lens' ListProfileObjectTypeTemplateItem (Maybe Text)
listProfileObjectTypeTemplateItem_sourceObject = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListProfileObjectTypeTemplateItem' {Maybe Text
sourceObject :: Maybe Text
$sel:sourceObject:ListProfileObjectTypeTemplateItem' :: ListProfileObjectTypeTemplateItem -> Maybe Text
sourceObject} -> Maybe Text
sourceObject) (\s :: ListProfileObjectTypeTemplateItem
s@ListProfileObjectTypeTemplateItem' {} Maybe Text
a -> ListProfileObjectTypeTemplateItem
s {$sel:sourceObject:ListProfileObjectTypeTemplateItem' :: Maybe Text
sourceObject = Maybe Text
a} :: ListProfileObjectTypeTemplateItem)
listProfileObjectTypeTemplateItem_templateId :: Lens.Lens' ListProfileObjectTypeTemplateItem (Prelude.Maybe Prelude.Text)
listProfileObjectTypeTemplateItem_templateId :: Lens' ListProfileObjectTypeTemplateItem (Maybe Text)
listProfileObjectTypeTemplateItem_templateId = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListProfileObjectTypeTemplateItem' {Maybe Text
templateId :: Maybe Text
$sel:templateId:ListProfileObjectTypeTemplateItem' :: ListProfileObjectTypeTemplateItem -> Maybe Text
templateId} -> Maybe Text
templateId) (\s :: ListProfileObjectTypeTemplateItem
s@ListProfileObjectTypeTemplateItem' {} Maybe Text
a -> ListProfileObjectTypeTemplateItem
s {$sel:templateId:ListProfileObjectTypeTemplateItem' :: Maybe Text
templateId = Maybe Text
a} :: ListProfileObjectTypeTemplateItem)
instance
Data.FromJSON
ListProfileObjectTypeTemplateItem
where
parseJSON :: Value -> Parser ListProfileObjectTypeTemplateItem
parseJSON =
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Data.withObject
String
"ListProfileObjectTypeTemplateItem"
( \Object
x ->
Maybe Text
-> Maybe Text -> Maybe Text -> ListProfileObjectTypeTemplateItem
ListProfileObjectTypeTemplateItem'
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"SourceName")
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"SourceObject")
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"TemplateId")
)
instance
Prelude.Hashable
ListProfileObjectTypeTemplateItem
where
hashWithSalt :: Int -> ListProfileObjectTypeTemplateItem -> Int
hashWithSalt
Int
_salt
ListProfileObjectTypeTemplateItem' {Maybe Text
templateId :: Maybe Text
sourceObject :: Maybe Text
sourceName :: Maybe Text
$sel:templateId:ListProfileObjectTypeTemplateItem' :: ListProfileObjectTypeTemplateItem -> Maybe Text
$sel:sourceObject:ListProfileObjectTypeTemplateItem' :: ListProfileObjectTypeTemplateItem -> Maybe Text
$sel:sourceName:ListProfileObjectTypeTemplateItem' :: ListProfileObjectTypeTemplateItem -> Maybe Text
..} =
Int
_salt
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
sourceName
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
sourceObject
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
templateId
instance
Prelude.NFData
ListProfileObjectTypeTemplateItem
where
rnf :: ListProfileObjectTypeTemplateItem -> ()
rnf ListProfileObjectTypeTemplateItem' {Maybe Text
templateId :: Maybe Text
sourceObject :: Maybe Text
sourceName :: Maybe Text
$sel:templateId:ListProfileObjectTypeTemplateItem' :: ListProfileObjectTypeTemplateItem -> Maybe Text
$sel:sourceObject:ListProfileObjectTypeTemplateItem' :: ListProfileObjectTypeTemplateItem -> Maybe Text
$sel:sourceName:ListProfileObjectTypeTemplateItem' :: ListProfileObjectTypeTemplateItem -> Maybe Text
..} =
forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
sourceName
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
sourceObject
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
templateId