{-# 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.AppFlow.Types.CustomerProfilesDestinationProperties 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 CustomerProfilesDestinationProperties = CustomerProfilesDestinationProperties'
{
CustomerProfilesDestinationProperties -> Maybe Text
objectTypeName :: Prelude.Maybe Prelude.Text,
CustomerProfilesDestinationProperties -> Text
domainName :: Prelude.Text
}
deriving (CustomerProfilesDestinationProperties
-> CustomerProfilesDestinationProperties -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: CustomerProfilesDestinationProperties
-> CustomerProfilesDestinationProperties -> Bool
$c/= :: CustomerProfilesDestinationProperties
-> CustomerProfilesDestinationProperties -> Bool
== :: CustomerProfilesDestinationProperties
-> CustomerProfilesDestinationProperties -> Bool
$c== :: CustomerProfilesDestinationProperties
-> CustomerProfilesDestinationProperties -> Bool
Prelude.Eq, ReadPrec [CustomerProfilesDestinationProperties]
ReadPrec CustomerProfilesDestinationProperties
Int -> ReadS CustomerProfilesDestinationProperties
ReadS [CustomerProfilesDestinationProperties]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [CustomerProfilesDestinationProperties]
$creadListPrec :: ReadPrec [CustomerProfilesDestinationProperties]
readPrec :: ReadPrec CustomerProfilesDestinationProperties
$creadPrec :: ReadPrec CustomerProfilesDestinationProperties
readList :: ReadS [CustomerProfilesDestinationProperties]
$creadList :: ReadS [CustomerProfilesDestinationProperties]
readsPrec :: Int -> ReadS CustomerProfilesDestinationProperties
$creadsPrec :: Int -> ReadS CustomerProfilesDestinationProperties
Prelude.Read, Int -> CustomerProfilesDestinationProperties -> ShowS
[CustomerProfilesDestinationProperties] -> ShowS
CustomerProfilesDestinationProperties -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [CustomerProfilesDestinationProperties] -> ShowS
$cshowList :: [CustomerProfilesDestinationProperties] -> ShowS
show :: CustomerProfilesDestinationProperties -> String
$cshow :: CustomerProfilesDestinationProperties -> String
showsPrec :: Int -> CustomerProfilesDestinationProperties -> ShowS
$cshowsPrec :: Int -> CustomerProfilesDestinationProperties -> ShowS
Prelude.Show, forall x.
Rep CustomerProfilesDestinationProperties x
-> CustomerProfilesDestinationProperties
forall x.
CustomerProfilesDestinationProperties
-> Rep CustomerProfilesDestinationProperties x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep CustomerProfilesDestinationProperties x
-> CustomerProfilesDestinationProperties
$cfrom :: forall x.
CustomerProfilesDestinationProperties
-> Rep CustomerProfilesDestinationProperties x
Prelude.Generic)
newCustomerProfilesDestinationProperties ::
Prelude.Text ->
CustomerProfilesDestinationProperties
newCustomerProfilesDestinationProperties :: Text -> CustomerProfilesDestinationProperties
newCustomerProfilesDestinationProperties Text
pDomainName_ =
CustomerProfilesDestinationProperties'
{ $sel:objectTypeName:CustomerProfilesDestinationProperties' :: Maybe Text
objectTypeName =
forall a. Maybe a
Prelude.Nothing,
$sel:domainName:CustomerProfilesDestinationProperties' :: Text
domainName = Text
pDomainName_
}
customerProfilesDestinationProperties_objectTypeName :: Lens.Lens' CustomerProfilesDestinationProperties (Prelude.Maybe Prelude.Text)
customerProfilesDestinationProperties_objectTypeName :: Lens' CustomerProfilesDestinationProperties (Maybe Text)
customerProfilesDestinationProperties_objectTypeName = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CustomerProfilesDestinationProperties' {Maybe Text
objectTypeName :: Maybe Text
$sel:objectTypeName:CustomerProfilesDestinationProperties' :: CustomerProfilesDestinationProperties -> Maybe Text
objectTypeName} -> Maybe Text
objectTypeName) (\s :: CustomerProfilesDestinationProperties
s@CustomerProfilesDestinationProperties' {} Maybe Text
a -> CustomerProfilesDestinationProperties
s {$sel:objectTypeName:CustomerProfilesDestinationProperties' :: Maybe Text
objectTypeName = Maybe Text
a} :: CustomerProfilesDestinationProperties)
customerProfilesDestinationProperties_domainName :: Lens.Lens' CustomerProfilesDestinationProperties Prelude.Text
customerProfilesDestinationProperties_domainName :: Lens' CustomerProfilesDestinationProperties Text
customerProfilesDestinationProperties_domainName = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CustomerProfilesDestinationProperties' {Text
domainName :: Text
$sel:domainName:CustomerProfilesDestinationProperties' :: CustomerProfilesDestinationProperties -> Text
domainName} -> Text
domainName) (\s :: CustomerProfilesDestinationProperties
s@CustomerProfilesDestinationProperties' {} Text
a -> CustomerProfilesDestinationProperties
s {$sel:domainName:CustomerProfilesDestinationProperties' :: Text
domainName = Text
a} :: CustomerProfilesDestinationProperties)
instance
Data.FromJSON
CustomerProfilesDestinationProperties
where
parseJSON :: Value -> Parser CustomerProfilesDestinationProperties
parseJSON =
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Data.withObject
String
"CustomerProfilesDestinationProperties"
( \Object
x ->
Maybe Text -> Text -> CustomerProfilesDestinationProperties
CustomerProfilesDestinationProperties'
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
"objectTypeName")
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser a
Data..: Key
"domainName")
)
instance
Prelude.Hashable
CustomerProfilesDestinationProperties
where
hashWithSalt :: Int -> CustomerProfilesDestinationProperties -> Int
hashWithSalt
Int
_salt
CustomerProfilesDestinationProperties' {Maybe Text
Text
domainName :: Text
objectTypeName :: Maybe Text
$sel:domainName:CustomerProfilesDestinationProperties' :: CustomerProfilesDestinationProperties -> Text
$sel:objectTypeName:CustomerProfilesDestinationProperties' :: CustomerProfilesDestinationProperties -> Maybe Text
..} =
Int
_salt
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
objectTypeName
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Text
domainName
instance
Prelude.NFData
CustomerProfilesDestinationProperties
where
rnf :: CustomerProfilesDestinationProperties -> ()
rnf CustomerProfilesDestinationProperties' {Maybe Text
Text
domainName :: Text
objectTypeName :: Maybe Text
$sel:domainName:CustomerProfilesDestinationProperties' :: CustomerProfilesDestinationProperties -> Text
$sel:objectTypeName:CustomerProfilesDestinationProperties' :: CustomerProfilesDestinationProperties -> Maybe Text
..} =
forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
objectTypeName
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Text
domainName
instance
Data.ToJSON
CustomerProfilesDestinationProperties
where
toJSON :: CustomerProfilesDestinationProperties -> Value
toJSON CustomerProfilesDestinationProperties' {Maybe Text
Text
domainName :: Text
objectTypeName :: Maybe Text
$sel:domainName:CustomerProfilesDestinationProperties' :: CustomerProfilesDestinationProperties -> Text
$sel:objectTypeName:CustomerProfilesDestinationProperties' :: CustomerProfilesDestinationProperties -> Maybe Text
..} =
[Pair] -> Value
Data.object
( forall a. [Maybe a] -> [a]
Prelude.catMaybes
[ (Key
"objectTypeName" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Text
objectTypeName,
forall a. a -> Maybe a
Prelude.Just (Key
"domainName" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..= Text
domainName)
]
)