{-# 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.Lens as Lens
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
(JourneyChannelSettings -> JourneyChannelSettings -> Bool)
-> (JourneyChannelSettings -> JourneyChannelSettings -> Bool)
-> Eq JourneyChannelSettings
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]
(Int -> ReadS JourneyChannelSettings)
-> ReadS [JourneyChannelSettings]
-> ReadPrec JourneyChannelSettings
-> ReadPrec [JourneyChannelSettings]
-> Read 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
(Int -> JourneyChannelSettings -> ShowS)
-> (JourneyChannelSettings -> String)
-> ([JourneyChannelSettings] -> ShowS)
-> Show JourneyChannelSettings
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. JourneyChannelSettings -> Rep JourneyChannelSettings x)
-> (forall x.
Rep JourneyChannelSettings x -> JourneyChannelSettings)
-> Generic JourneyChannelSettings
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' :: Maybe Text -> Maybe Text -> JourneyChannelSettings
JourneyChannelSettings'
{ $sel:connectCampaignArn:JourneyChannelSettings' :: Maybe Text
connectCampaignArn =
Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:connectCampaignExecutionRoleArn:JourneyChannelSettings' :: Maybe Text
connectCampaignExecutionRoleArn = Maybe Text
forall a. Maybe a
Prelude.Nothing
}
journeyChannelSettings_connectCampaignArn :: Lens.Lens' JourneyChannelSettings (Prelude.Maybe Prelude.Text)
journeyChannelSettings_connectCampaignArn :: (Maybe Text -> f (Maybe Text))
-> JourneyChannelSettings -> f JourneyChannelSettings
journeyChannelSettings_connectCampaignArn = (JourneyChannelSettings -> Maybe Text)
-> (JourneyChannelSettings -> Maybe Text -> JourneyChannelSettings)
-> Lens
JourneyChannelSettings
JourneyChannelSettings
(Maybe Text)
(Maybe Text)
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 :: (Maybe Text -> f (Maybe Text))
-> JourneyChannelSettings -> f JourneyChannelSettings
journeyChannelSettings_connectCampaignExecutionRoleArn = (JourneyChannelSettings -> Maybe Text)
-> (JourneyChannelSettings -> Maybe Text -> JourneyChannelSettings)
-> Lens
JourneyChannelSettings
JourneyChannelSettings
(Maybe Text)
(Maybe Text)
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 Core.FromJSON JourneyChannelSettings where
parseJSON :: Value -> Parser JourneyChannelSettings
parseJSON =
String
-> (Object -> Parser JourneyChannelSettings)
-> Value
-> Parser JourneyChannelSettings
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Core.withObject
String
"JourneyChannelSettings"
( \Object
x ->
Maybe Text -> Maybe Text -> JourneyChannelSettings
JourneyChannelSettings'
(Maybe Text -> Maybe Text -> JourneyChannelSettings)
-> Parser (Maybe Text)
-> Parser (Maybe Text -> JourneyChannelSettings)
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
"ConnectCampaignArn")
Parser (Maybe Text -> JourneyChannelSettings)
-> Parser (Maybe Text) -> Parser JourneyChannelSettings
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
"ConnectCampaignExecutionRoleArn")
)
instance Prelude.Hashable JourneyChannelSettings
instance Prelude.NFData JourneyChannelSettings