{-# 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.Pinpoint.Types.JourneyChannelSettings 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 JourneyChannelSettings = JourneyChannelSettings'
{
JourneyChannelSettings -> Maybe Text
connectCampaignArn :: Prelude.Maybe Prelude.Text,
JourneyChannelSettings -> Maybe Text
connectCampaignExecutionRoleArn :: Prelude.Maybe Prelude.Text
}
deriving (JourneyChannelSettings -> JourneyChannelSettings -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: JourneyChannelSettings -> JourneyChannelSettings -> Bool
$c/= :: JourneyChannelSettings -> JourneyChannelSettings -> Bool
== :: JourneyChannelSettings -> JourneyChannelSettings -> Bool
$c== :: JourneyChannelSettings -> JourneyChannelSettings -> Bool
Prelude.Eq, ReadPrec [JourneyChannelSettings]
ReadPrec JourneyChannelSettings
Int -> ReadS JourneyChannelSettings
ReadS [JourneyChannelSettings]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [JourneyChannelSettings]
$creadListPrec :: ReadPrec [JourneyChannelSettings]
readPrec :: ReadPrec JourneyChannelSettings
$creadPrec :: ReadPrec JourneyChannelSettings
readList :: ReadS [JourneyChannelSettings]
$creadList :: ReadS [JourneyChannelSettings]
readsPrec :: Int -> ReadS JourneyChannelSettings
$creadsPrec :: Int -> ReadS JourneyChannelSettings
Prelude.Read, Int -> JourneyChannelSettings -> ShowS
[JourneyChannelSettings] -> ShowS
JourneyChannelSettings -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [JourneyChannelSettings] -> ShowS
$cshowList :: [JourneyChannelSettings] -> ShowS
show :: JourneyChannelSettings -> String
$cshow :: JourneyChannelSettings -> String
showsPrec :: Int -> JourneyChannelSettings -> ShowS
$cshowsPrec :: Int -> JourneyChannelSettings -> ShowS
Prelude.Show, forall x. Rep JourneyChannelSettings x -> JourneyChannelSettings
forall x. JourneyChannelSettings -> Rep JourneyChannelSettings x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep JourneyChannelSettings x -> JourneyChannelSettings
$cfrom :: forall x. JourneyChannelSettings -> Rep JourneyChannelSettings x
Prelude.Generic)
newJourneyChannelSettings ::
JourneyChannelSettings
newJourneyChannelSettings :: JourneyChannelSettings
newJourneyChannelSettings =
JourneyChannelSettings'
{ $sel:connectCampaignArn:JourneyChannelSettings' :: Maybe Text
connectCampaignArn =
forall a. Maybe a
Prelude.Nothing,
$sel:connectCampaignExecutionRoleArn:JourneyChannelSettings' :: Maybe Text
connectCampaignExecutionRoleArn = forall a. Maybe a
Prelude.Nothing
}
journeyChannelSettings_connectCampaignArn :: Lens.Lens' JourneyChannelSettings (Prelude.Maybe Prelude.Text)
journeyChannelSettings_connectCampaignArn :: Lens' JourneyChannelSettings (Maybe Text)
journeyChannelSettings_connectCampaignArn = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\JourneyChannelSettings' {Maybe Text
connectCampaignArn :: Maybe Text
$sel:connectCampaignArn:JourneyChannelSettings' :: JourneyChannelSettings -> Maybe Text
connectCampaignArn} -> Maybe Text
connectCampaignArn) (\s :: JourneyChannelSettings
s@JourneyChannelSettings' {} Maybe Text
a -> JourneyChannelSettings
s {$sel:connectCampaignArn:JourneyChannelSettings' :: Maybe Text
connectCampaignArn = Maybe Text
a} :: JourneyChannelSettings)
journeyChannelSettings_connectCampaignExecutionRoleArn :: Lens.Lens' JourneyChannelSettings (Prelude.Maybe Prelude.Text)
journeyChannelSettings_connectCampaignExecutionRoleArn :: Lens' JourneyChannelSettings (Maybe Text)
journeyChannelSettings_connectCampaignExecutionRoleArn = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\JourneyChannelSettings' {Maybe Text
connectCampaignExecutionRoleArn :: Maybe Text
$sel:connectCampaignExecutionRoleArn:JourneyChannelSettings' :: JourneyChannelSettings -> Maybe Text
connectCampaignExecutionRoleArn} -> Maybe Text
connectCampaignExecutionRoleArn) (\s :: JourneyChannelSettings
s@JourneyChannelSettings' {} Maybe Text
a -> JourneyChannelSettings
s {$sel:connectCampaignExecutionRoleArn:JourneyChannelSettings' :: Maybe Text
connectCampaignExecutionRoleArn = Maybe Text
a} :: JourneyChannelSettings)
instance Data.FromJSON JourneyChannelSettings where
parseJSON :: Value -> Parser JourneyChannelSettings
parseJSON =
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Data.withObject
String
"JourneyChannelSettings"
( \Object
x ->
Maybe Text -> Maybe Text -> JourneyChannelSettings
JourneyChannelSettings'
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
"ConnectCampaignArn")
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
"ConnectCampaignExecutionRoleArn")
)
instance Prelude.Hashable JourneyChannelSettings where
hashWithSalt :: Int -> JourneyChannelSettings -> Int
hashWithSalt Int
_salt JourneyChannelSettings' {Maybe Text
connectCampaignExecutionRoleArn :: Maybe Text
connectCampaignArn :: Maybe Text
$sel:connectCampaignExecutionRoleArn:JourneyChannelSettings' :: JourneyChannelSettings -> Maybe Text
$sel:connectCampaignArn:JourneyChannelSettings' :: JourneyChannelSettings -> Maybe Text
..} =
Int
_salt
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
connectCampaignArn
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
connectCampaignExecutionRoleArn
instance Prelude.NFData JourneyChannelSettings where
rnf :: JourneyChannelSettings -> ()
rnf JourneyChannelSettings' {Maybe Text
connectCampaignExecutionRoleArn :: Maybe Text
connectCampaignArn :: Maybe Text
$sel:connectCampaignExecutionRoleArn:JourneyChannelSettings' :: JourneyChannelSettings -> Maybe Text
$sel:connectCampaignArn:JourneyChannelSettings' :: JourneyChannelSettings -> Maybe Text
..} =
forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
connectCampaignArn
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
connectCampaignExecutionRoleArn
instance Data.ToJSON JourneyChannelSettings where
toJSON :: JourneyChannelSettings -> Value
toJSON JourneyChannelSettings' {Maybe Text
connectCampaignExecutionRoleArn :: Maybe Text
connectCampaignArn :: Maybe Text
$sel:connectCampaignExecutionRoleArn:JourneyChannelSettings' :: JourneyChannelSettings -> Maybe Text
$sel:connectCampaignArn:JourneyChannelSettings' :: JourneyChannelSettings -> Maybe Text
..} =
[Pair] -> Value
Data.object
( forall a. [Maybe a] -> [a]
Prelude.catMaybes
[ (Key
"ConnectCampaignArn" 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
connectCampaignArn,
(Key
"ConnectCampaignExecutionRoleArn" 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
connectCampaignExecutionRoleArn
]
)