{-# 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.JourneyResponse where
import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import Amazonka.Pinpoint.Types.Activity
import Amazonka.Pinpoint.Types.JourneyChannelSettings
import Amazonka.Pinpoint.Types.JourneyLimits
import Amazonka.Pinpoint.Types.JourneySchedule
import Amazonka.Pinpoint.Types.QuietTime
import Amazonka.Pinpoint.Types.StartCondition
import Amazonka.Pinpoint.Types.State
import qualified Amazonka.Prelude as Prelude
data JourneyResponse = JourneyResponse'
{
JourneyResponse -> Maybe State
state :: Prelude.Maybe State,
JourneyResponse -> Maybe Text
lastModifiedDate :: Prelude.Maybe Prelude.Text,
JourneyResponse -> Maybe JourneySchedule
schedule :: Prelude.Maybe JourneySchedule,
JourneyResponse -> Maybe Bool
localTime :: Prelude.Maybe Prelude.Bool,
JourneyResponse -> Maybe (HashMap Text Activity)
activities :: Prelude.Maybe (Prelude.HashMap Prelude.Text Activity),
JourneyResponse -> Maybe Bool
refreshOnSegmentUpdate :: Prelude.Maybe Prelude.Bool,
JourneyResponse -> Maybe JourneyLimits
limits :: Prelude.Maybe JourneyLimits,
JourneyResponse -> Maybe Bool
waitForQuietTime :: Prelude.Maybe Prelude.Bool,
JourneyResponse -> Maybe QuietTime
quietTime :: Prelude.Maybe QuietTime,
JourneyResponse -> Maybe Text
startActivity :: Prelude.Maybe Prelude.Text,
JourneyResponse -> Maybe Text
creationDate :: Prelude.Maybe Prelude.Text,
JourneyResponse -> Maybe StartCondition
startCondition :: Prelude.Maybe StartCondition,
JourneyResponse -> Maybe JourneyChannelSettings
journeyChannelSettings :: Prelude.Maybe JourneyChannelSettings,
JourneyResponse -> Maybe Text
refreshFrequency :: Prelude.Maybe Prelude.Text,
JourneyResponse -> Maybe (HashMap Text Text)
tags :: Prelude.Maybe (Prelude.HashMap Prelude.Text Prelude.Text),
JourneyResponse -> Text
name :: Prelude.Text,
JourneyResponse -> Text
id :: Prelude.Text,
JourneyResponse -> Text
applicationId :: Prelude.Text
}
deriving (JourneyResponse -> JourneyResponse -> Bool
(JourneyResponse -> JourneyResponse -> Bool)
-> (JourneyResponse -> JourneyResponse -> Bool)
-> Eq JourneyResponse
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: JourneyResponse -> JourneyResponse -> Bool
$c/= :: JourneyResponse -> JourneyResponse -> Bool
== :: JourneyResponse -> JourneyResponse -> Bool
$c== :: JourneyResponse -> JourneyResponse -> Bool
Prelude.Eq, ReadPrec [JourneyResponse]
ReadPrec JourneyResponse
Int -> ReadS JourneyResponse
ReadS [JourneyResponse]
(Int -> ReadS JourneyResponse)
-> ReadS [JourneyResponse]
-> ReadPrec JourneyResponse
-> ReadPrec [JourneyResponse]
-> Read JourneyResponse
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [JourneyResponse]
$creadListPrec :: ReadPrec [JourneyResponse]
readPrec :: ReadPrec JourneyResponse
$creadPrec :: ReadPrec JourneyResponse
readList :: ReadS [JourneyResponse]
$creadList :: ReadS [JourneyResponse]
readsPrec :: Int -> ReadS JourneyResponse
$creadsPrec :: Int -> ReadS JourneyResponse
Prelude.Read, Int -> JourneyResponse -> ShowS
[JourneyResponse] -> ShowS
JourneyResponse -> String
(Int -> JourneyResponse -> ShowS)
-> (JourneyResponse -> String)
-> ([JourneyResponse] -> ShowS)
-> Show JourneyResponse
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [JourneyResponse] -> ShowS
$cshowList :: [JourneyResponse] -> ShowS
show :: JourneyResponse -> String
$cshow :: JourneyResponse -> String
showsPrec :: Int -> JourneyResponse -> ShowS
$cshowsPrec :: Int -> JourneyResponse -> ShowS
Prelude.Show, (forall x. JourneyResponse -> Rep JourneyResponse x)
-> (forall x. Rep JourneyResponse x -> JourneyResponse)
-> Generic JourneyResponse
forall x. Rep JourneyResponse x -> JourneyResponse
forall x. JourneyResponse -> Rep JourneyResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep JourneyResponse x -> JourneyResponse
$cfrom :: forall x. JourneyResponse -> Rep JourneyResponse x
Prelude.Generic)
newJourneyResponse ::
Prelude.Text ->
Prelude.Text ->
Prelude.Text ->
JourneyResponse
newJourneyResponse :: Text -> Text -> Text -> JourneyResponse
newJourneyResponse Text
pName_ Text
pId_ Text
pApplicationId_ =
JourneyResponse' :: Maybe State
-> Maybe Text
-> Maybe JourneySchedule
-> Maybe Bool
-> Maybe (HashMap Text Activity)
-> Maybe Bool
-> Maybe JourneyLimits
-> Maybe Bool
-> Maybe QuietTime
-> Maybe Text
-> Maybe Text
-> Maybe StartCondition
-> Maybe JourneyChannelSettings
-> Maybe Text
-> Maybe (HashMap Text Text)
-> Text
-> Text
-> Text
-> JourneyResponse
JourneyResponse'
{ $sel:state:JourneyResponse' :: Maybe State
state = Maybe State
forall a. Maybe a
Prelude.Nothing,
$sel:lastModifiedDate:JourneyResponse' :: Maybe Text
lastModifiedDate = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:schedule:JourneyResponse' :: Maybe JourneySchedule
schedule = Maybe JourneySchedule
forall a. Maybe a
Prelude.Nothing,
$sel:localTime:JourneyResponse' :: Maybe Bool
localTime = Maybe Bool
forall a. Maybe a
Prelude.Nothing,
$sel:activities:JourneyResponse' :: Maybe (HashMap Text Activity)
activities = Maybe (HashMap Text Activity)
forall a. Maybe a
Prelude.Nothing,
$sel:refreshOnSegmentUpdate:JourneyResponse' :: Maybe Bool
refreshOnSegmentUpdate = Maybe Bool
forall a. Maybe a
Prelude.Nothing,
$sel:limits:JourneyResponse' :: Maybe JourneyLimits
limits = Maybe JourneyLimits
forall a. Maybe a
Prelude.Nothing,
$sel:waitForQuietTime:JourneyResponse' :: Maybe Bool
waitForQuietTime = Maybe Bool
forall a. Maybe a
Prelude.Nothing,
$sel:quietTime:JourneyResponse' :: Maybe QuietTime
quietTime = Maybe QuietTime
forall a. Maybe a
Prelude.Nothing,
$sel:startActivity:JourneyResponse' :: Maybe Text
startActivity = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:creationDate:JourneyResponse' :: Maybe Text
creationDate = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:startCondition:JourneyResponse' :: Maybe StartCondition
startCondition = Maybe StartCondition
forall a. Maybe a
Prelude.Nothing,
$sel:journeyChannelSettings:JourneyResponse' :: Maybe JourneyChannelSettings
journeyChannelSettings = Maybe JourneyChannelSettings
forall a. Maybe a
Prelude.Nothing,
$sel:refreshFrequency:JourneyResponse' :: Maybe Text
refreshFrequency = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:tags:JourneyResponse' :: Maybe (HashMap Text Text)
tags = Maybe (HashMap Text Text)
forall a. Maybe a
Prelude.Nothing,
$sel:name:JourneyResponse' :: Text
name = Text
pName_,
$sel:id:JourneyResponse' :: Text
id = Text
pId_,
$sel:applicationId:JourneyResponse' :: Text
applicationId = Text
pApplicationId_
}
journeyResponse_state :: Lens.Lens' JourneyResponse (Prelude.Maybe State)
journeyResponse_state :: (Maybe State -> f (Maybe State))
-> JourneyResponse -> f JourneyResponse
journeyResponse_state = (JourneyResponse -> Maybe State)
-> (JourneyResponse -> Maybe State -> JourneyResponse)
-> Lens JourneyResponse JourneyResponse (Maybe State) (Maybe State)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\JourneyResponse' {Maybe State
state :: Maybe State
$sel:state:JourneyResponse' :: JourneyResponse -> Maybe State
state} -> Maybe State
state) (\s :: JourneyResponse
s@JourneyResponse' {} Maybe State
a -> JourneyResponse
s {$sel:state:JourneyResponse' :: Maybe State
state = Maybe State
a} :: JourneyResponse)
journeyResponse_lastModifiedDate :: Lens.Lens' JourneyResponse (Prelude.Maybe Prelude.Text)
journeyResponse_lastModifiedDate :: (Maybe Text -> f (Maybe Text))
-> JourneyResponse -> f JourneyResponse
journeyResponse_lastModifiedDate = (JourneyResponse -> Maybe Text)
-> (JourneyResponse -> Maybe Text -> JourneyResponse)
-> Lens JourneyResponse JourneyResponse (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\JourneyResponse' {Maybe Text
lastModifiedDate :: Maybe Text
$sel:lastModifiedDate:JourneyResponse' :: JourneyResponse -> Maybe Text
lastModifiedDate} -> Maybe Text
lastModifiedDate) (\s :: JourneyResponse
s@JourneyResponse' {} Maybe Text
a -> JourneyResponse
s {$sel:lastModifiedDate:JourneyResponse' :: Maybe Text
lastModifiedDate = Maybe Text
a} :: JourneyResponse)
journeyResponse_schedule :: Lens.Lens' JourneyResponse (Prelude.Maybe JourneySchedule)
journeyResponse_schedule :: (Maybe JourneySchedule -> f (Maybe JourneySchedule))
-> JourneyResponse -> f JourneyResponse
journeyResponse_schedule = (JourneyResponse -> Maybe JourneySchedule)
-> (JourneyResponse -> Maybe JourneySchedule -> JourneyResponse)
-> Lens
JourneyResponse
JourneyResponse
(Maybe JourneySchedule)
(Maybe JourneySchedule)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\JourneyResponse' {Maybe JourneySchedule
schedule :: Maybe JourneySchedule
$sel:schedule:JourneyResponse' :: JourneyResponse -> Maybe JourneySchedule
schedule} -> Maybe JourneySchedule
schedule) (\s :: JourneyResponse
s@JourneyResponse' {} Maybe JourneySchedule
a -> JourneyResponse
s {$sel:schedule:JourneyResponse' :: Maybe JourneySchedule
schedule = Maybe JourneySchedule
a} :: JourneyResponse)
journeyResponse_localTime :: Lens.Lens' JourneyResponse (Prelude.Maybe Prelude.Bool)
journeyResponse_localTime :: (Maybe Bool -> f (Maybe Bool))
-> JourneyResponse -> f JourneyResponse
journeyResponse_localTime = (JourneyResponse -> Maybe Bool)
-> (JourneyResponse -> Maybe Bool -> JourneyResponse)
-> Lens JourneyResponse JourneyResponse (Maybe Bool) (Maybe Bool)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\JourneyResponse' {Maybe Bool
localTime :: Maybe Bool
$sel:localTime:JourneyResponse' :: JourneyResponse -> Maybe Bool
localTime} -> Maybe Bool
localTime) (\s :: JourneyResponse
s@JourneyResponse' {} Maybe Bool
a -> JourneyResponse
s {$sel:localTime:JourneyResponse' :: Maybe Bool
localTime = Maybe Bool
a} :: JourneyResponse)
journeyResponse_activities :: Lens.Lens' JourneyResponse (Prelude.Maybe (Prelude.HashMap Prelude.Text Activity))
journeyResponse_activities :: (Maybe (HashMap Text Activity)
-> f (Maybe (HashMap Text Activity)))
-> JourneyResponse -> f JourneyResponse
journeyResponse_activities = (JourneyResponse -> Maybe (HashMap Text Activity))
-> (JourneyResponse
-> Maybe (HashMap Text Activity) -> JourneyResponse)
-> Lens
JourneyResponse
JourneyResponse
(Maybe (HashMap Text Activity))
(Maybe (HashMap Text Activity))
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\JourneyResponse' {Maybe (HashMap Text Activity)
activities :: Maybe (HashMap Text Activity)
$sel:activities:JourneyResponse' :: JourneyResponse -> Maybe (HashMap Text Activity)
activities} -> Maybe (HashMap Text Activity)
activities) (\s :: JourneyResponse
s@JourneyResponse' {} Maybe (HashMap Text Activity)
a -> JourneyResponse
s {$sel:activities:JourneyResponse' :: Maybe (HashMap Text Activity)
activities = Maybe (HashMap Text Activity)
a} :: JourneyResponse) ((Maybe (HashMap Text Activity)
-> f (Maybe (HashMap Text Activity)))
-> JourneyResponse -> f JourneyResponse)
-> ((Maybe (HashMap Text Activity)
-> f (Maybe (HashMap Text Activity)))
-> Maybe (HashMap Text Activity)
-> f (Maybe (HashMap Text Activity)))
-> (Maybe (HashMap Text Activity)
-> f (Maybe (HashMap Text Activity)))
-> JourneyResponse
-> f JourneyResponse
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso
(HashMap Text Activity)
(HashMap Text Activity)
(HashMap Text Activity)
(HashMap Text Activity)
-> Iso
(Maybe (HashMap Text Activity))
(Maybe (HashMap Text Activity))
(Maybe (HashMap Text Activity))
(Maybe (HashMap Text Activity))
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 Activity)
(HashMap Text Activity)
(HashMap Text Activity)
(HashMap Text Activity)
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced
journeyResponse_refreshOnSegmentUpdate :: Lens.Lens' JourneyResponse (Prelude.Maybe Prelude.Bool)
journeyResponse_refreshOnSegmentUpdate :: (Maybe Bool -> f (Maybe Bool))
-> JourneyResponse -> f JourneyResponse
journeyResponse_refreshOnSegmentUpdate = (JourneyResponse -> Maybe Bool)
-> (JourneyResponse -> Maybe Bool -> JourneyResponse)
-> Lens JourneyResponse JourneyResponse (Maybe Bool) (Maybe Bool)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\JourneyResponse' {Maybe Bool
refreshOnSegmentUpdate :: Maybe Bool
$sel:refreshOnSegmentUpdate:JourneyResponse' :: JourneyResponse -> Maybe Bool
refreshOnSegmentUpdate} -> Maybe Bool
refreshOnSegmentUpdate) (\s :: JourneyResponse
s@JourneyResponse' {} Maybe Bool
a -> JourneyResponse
s {$sel:refreshOnSegmentUpdate:JourneyResponse' :: Maybe Bool
refreshOnSegmentUpdate = Maybe Bool
a} :: JourneyResponse)
journeyResponse_limits :: Lens.Lens' JourneyResponse (Prelude.Maybe JourneyLimits)
journeyResponse_limits :: (Maybe JourneyLimits -> f (Maybe JourneyLimits))
-> JourneyResponse -> f JourneyResponse
journeyResponse_limits = (JourneyResponse -> Maybe JourneyLimits)
-> (JourneyResponse -> Maybe JourneyLimits -> JourneyResponse)
-> Lens
JourneyResponse
JourneyResponse
(Maybe JourneyLimits)
(Maybe JourneyLimits)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\JourneyResponse' {Maybe JourneyLimits
limits :: Maybe JourneyLimits
$sel:limits:JourneyResponse' :: JourneyResponse -> Maybe JourneyLimits
limits} -> Maybe JourneyLimits
limits) (\s :: JourneyResponse
s@JourneyResponse' {} Maybe JourneyLimits
a -> JourneyResponse
s {$sel:limits:JourneyResponse' :: Maybe JourneyLimits
limits = Maybe JourneyLimits
a} :: JourneyResponse)
journeyResponse_waitForQuietTime :: Lens.Lens' JourneyResponse (Prelude.Maybe Prelude.Bool)
journeyResponse_waitForQuietTime :: (Maybe Bool -> f (Maybe Bool))
-> JourneyResponse -> f JourneyResponse
journeyResponse_waitForQuietTime = (JourneyResponse -> Maybe Bool)
-> (JourneyResponse -> Maybe Bool -> JourneyResponse)
-> Lens JourneyResponse JourneyResponse (Maybe Bool) (Maybe Bool)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\JourneyResponse' {Maybe Bool
waitForQuietTime :: Maybe Bool
$sel:waitForQuietTime:JourneyResponse' :: JourneyResponse -> Maybe Bool
waitForQuietTime} -> Maybe Bool
waitForQuietTime) (\s :: JourneyResponse
s@JourneyResponse' {} Maybe Bool
a -> JourneyResponse
s {$sel:waitForQuietTime:JourneyResponse' :: Maybe Bool
waitForQuietTime = Maybe Bool
a} :: JourneyResponse)
journeyResponse_quietTime :: Lens.Lens' JourneyResponse (Prelude.Maybe QuietTime)
journeyResponse_quietTime :: (Maybe QuietTime -> f (Maybe QuietTime))
-> JourneyResponse -> f JourneyResponse
journeyResponse_quietTime = (JourneyResponse -> Maybe QuietTime)
-> (JourneyResponse -> Maybe QuietTime -> JourneyResponse)
-> Lens
JourneyResponse JourneyResponse (Maybe QuietTime) (Maybe QuietTime)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\JourneyResponse' {Maybe QuietTime
quietTime :: Maybe QuietTime
$sel:quietTime:JourneyResponse' :: JourneyResponse -> Maybe QuietTime
quietTime} -> Maybe QuietTime
quietTime) (\s :: JourneyResponse
s@JourneyResponse' {} Maybe QuietTime
a -> JourneyResponse
s {$sel:quietTime:JourneyResponse' :: Maybe QuietTime
quietTime = Maybe QuietTime
a} :: JourneyResponse)
journeyResponse_startActivity :: Lens.Lens' JourneyResponse (Prelude.Maybe Prelude.Text)
journeyResponse_startActivity :: (Maybe Text -> f (Maybe Text))
-> JourneyResponse -> f JourneyResponse
journeyResponse_startActivity = (JourneyResponse -> Maybe Text)
-> (JourneyResponse -> Maybe Text -> JourneyResponse)
-> Lens JourneyResponse JourneyResponse (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\JourneyResponse' {Maybe Text
startActivity :: Maybe Text
$sel:startActivity:JourneyResponse' :: JourneyResponse -> Maybe Text
startActivity} -> Maybe Text
startActivity) (\s :: JourneyResponse
s@JourneyResponse' {} Maybe Text
a -> JourneyResponse
s {$sel:startActivity:JourneyResponse' :: Maybe Text
startActivity = Maybe Text
a} :: JourneyResponse)
journeyResponse_creationDate :: Lens.Lens' JourneyResponse (Prelude.Maybe Prelude.Text)
journeyResponse_creationDate :: (Maybe Text -> f (Maybe Text))
-> JourneyResponse -> f JourneyResponse
journeyResponse_creationDate = (JourneyResponse -> Maybe Text)
-> (JourneyResponse -> Maybe Text -> JourneyResponse)
-> Lens JourneyResponse JourneyResponse (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\JourneyResponse' {Maybe Text
creationDate :: Maybe Text
$sel:creationDate:JourneyResponse' :: JourneyResponse -> Maybe Text
creationDate} -> Maybe Text
creationDate) (\s :: JourneyResponse
s@JourneyResponse' {} Maybe Text
a -> JourneyResponse
s {$sel:creationDate:JourneyResponse' :: Maybe Text
creationDate = Maybe Text
a} :: JourneyResponse)
journeyResponse_startCondition :: Lens.Lens' JourneyResponse (Prelude.Maybe StartCondition)
journeyResponse_startCondition :: (Maybe StartCondition -> f (Maybe StartCondition))
-> JourneyResponse -> f JourneyResponse
journeyResponse_startCondition = (JourneyResponse -> Maybe StartCondition)
-> (JourneyResponse -> Maybe StartCondition -> JourneyResponse)
-> Lens
JourneyResponse
JourneyResponse
(Maybe StartCondition)
(Maybe StartCondition)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\JourneyResponse' {Maybe StartCondition
startCondition :: Maybe StartCondition
$sel:startCondition:JourneyResponse' :: JourneyResponse -> Maybe StartCondition
startCondition} -> Maybe StartCondition
startCondition) (\s :: JourneyResponse
s@JourneyResponse' {} Maybe StartCondition
a -> JourneyResponse
s {$sel:startCondition:JourneyResponse' :: Maybe StartCondition
startCondition = Maybe StartCondition
a} :: JourneyResponse)
journeyResponse_journeyChannelSettings :: Lens.Lens' JourneyResponse (Prelude.Maybe JourneyChannelSettings)
journeyResponse_journeyChannelSettings :: (Maybe JourneyChannelSettings -> f (Maybe JourneyChannelSettings))
-> JourneyResponse -> f JourneyResponse
journeyResponse_journeyChannelSettings = (JourneyResponse -> Maybe JourneyChannelSettings)
-> (JourneyResponse
-> Maybe JourneyChannelSettings -> JourneyResponse)
-> Lens
JourneyResponse
JourneyResponse
(Maybe JourneyChannelSettings)
(Maybe JourneyChannelSettings)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\JourneyResponse' {Maybe JourneyChannelSettings
journeyChannelSettings :: Maybe JourneyChannelSettings
$sel:journeyChannelSettings:JourneyResponse' :: JourneyResponse -> Maybe JourneyChannelSettings
journeyChannelSettings} -> Maybe JourneyChannelSettings
journeyChannelSettings) (\s :: JourneyResponse
s@JourneyResponse' {} Maybe JourneyChannelSettings
a -> JourneyResponse
s {$sel:journeyChannelSettings:JourneyResponse' :: Maybe JourneyChannelSettings
journeyChannelSettings = Maybe JourneyChannelSettings
a} :: JourneyResponse)
journeyResponse_refreshFrequency :: Lens.Lens' JourneyResponse (Prelude.Maybe Prelude.Text)
journeyResponse_refreshFrequency :: (Maybe Text -> f (Maybe Text))
-> JourneyResponse -> f JourneyResponse
journeyResponse_refreshFrequency = (JourneyResponse -> Maybe Text)
-> (JourneyResponse -> Maybe Text -> JourneyResponse)
-> Lens JourneyResponse JourneyResponse (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\JourneyResponse' {Maybe Text
refreshFrequency :: Maybe Text
$sel:refreshFrequency:JourneyResponse' :: JourneyResponse -> Maybe Text
refreshFrequency} -> Maybe Text
refreshFrequency) (\s :: JourneyResponse
s@JourneyResponse' {} Maybe Text
a -> JourneyResponse
s {$sel:refreshFrequency:JourneyResponse' :: Maybe Text
refreshFrequency = Maybe Text
a} :: JourneyResponse)
journeyResponse_tags :: Lens.Lens' JourneyResponse (Prelude.Maybe (Prelude.HashMap Prelude.Text Prelude.Text))
journeyResponse_tags :: (Maybe (HashMap Text Text) -> f (Maybe (HashMap Text Text)))
-> JourneyResponse -> f JourneyResponse
journeyResponse_tags = (JourneyResponse -> Maybe (HashMap Text Text))
-> (JourneyResponse
-> Maybe (HashMap Text Text) -> JourneyResponse)
-> Lens
JourneyResponse
JourneyResponse
(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 (\JourneyResponse' {Maybe (HashMap Text Text)
tags :: Maybe (HashMap Text Text)
$sel:tags:JourneyResponse' :: JourneyResponse -> Maybe (HashMap Text Text)
tags} -> Maybe (HashMap Text Text)
tags) (\s :: JourneyResponse
s@JourneyResponse' {} Maybe (HashMap Text Text)
a -> JourneyResponse
s {$sel:tags:JourneyResponse' :: Maybe (HashMap Text Text)
tags = Maybe (HashMap Text Text)
a} :: JourneyResponse) ((Maybe (HashMap Text Text) -> f (Maybe (HashMap Text Text)))
-> JourneyResponse -> f JourneyResponse)
-> ((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)))
-> JourneyResponse
-> f JourneyResponse
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
journeyResponse_name :: Lens.Lens' JourneyResponse Prelude.Text
journeyResponse_name :: (Text -> f Text) -> JourneyResponse -> f JourneyResponse
journeyResponse_name = (JourneyResponse -> Text)
-> (JourneyResponse -> Text -> JourneyResponse)
-> Lens JourneyResponse JourneyResponse Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\JourneyResponse' {Text
name :: Text
$sel:name:JourneyResponse' :: JourneyResponse -> Text
name} -> Text
name) (\s :: JourneyResponse
s@JourneyResponse' {} Text
a -> JourneyResponse
s {$sel:name:JourneyResponse' :: Text
name = Text
a} :: JourneyResponse)
journeyResponse_id :: Lens.Lens' JourneyResponse Prelude.Text
journeyResponse_id :: (Text -> f Text) -> JourneyResponse -> f JourneyResponse
journeyResponse_id = (JourneyResponse -> Text)
-> (JourneyResponse -> Text -> JourneyResponse)
-> Lens JourneyResponse JourneyResponse Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\JourneyResponse' {Text
id :: Text
$sel:id:JourneyResponse' :: JourneyResponse -> Text
id} -> Text
id) (\s :: JourneyResponse
s@JourneyResponse' {} Text
a -> JourneyResponse
s {$sel:id:JourneyResponse' :: Text
id = Text
a} :: JourneyResponse)
journeyResponse_applicationId :: Lens.Lens' JourneyResponse Prelude.Text
journeyResponse_applicationId :: (Text -> f Text) -> JourneyResponse -> f JourneyResponse
journeyResponse_applicationId = (JourneyResponse -> Text)
-> (JourneyResponse -> Text -> JourneyResponse)
-> Lens JourneyResponse JourneyResponse Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\JourneyResponse' {Text
applicationId :: Text
$sel:applicationId:JourneyResponse' :: JourneyResponse -> Text
applicationId} -> Text
applicationId) (\s :: JourneyResponse
s@JourneyResponse' {} Text
a -> JourneyResponse
s {$sel:applicationId:JourneyResponse' :: Text
applicationId = Text
a} :: JourneyResponse)
instance Core.FromJSON JourneyResponse where
parseJSON :: Value -> Parser JourneyResponse
parseJSON =
String
-> (Object -> Parser JourneyResponse)
-> Value
-> Parser JourneyResponse
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Core.withObject
String
"JourneyResponse"
( \Object
x ->
Maybe State
-> Maybe Text
-> Maybe JourneySchedule
-> Maybe Bool
-> Maybe (HashMap Text Activity)
-> Maybe Bool
-> Maybe JourneyLimits
-> Maybe Bool
-> Maybe QuietTime
-> Maybe Text
-> Maybe Text
-> Maybe StartCondition
-> Maybe JourneyChannelSettings
-> Maybe Text
-> Maybe (HashMap Text Text)
-> Text
-> Text
-> Text
-> JourneyResponse
JourneyResponse'
(Maybe State
-> Maybe Text
-> Maybe JourneySchedule
-> Maybe Bool
-> Maybe (HashMap Text Activity)
-> Maybe Bool
-> Maybe JourneyLimits
-> Maybe Bool
-> Maybe QuietTime
-> Maybe Text
-> Maybe Text
-> Maybe StartCondition
-> Maybe JourneyChannelSettings
-> Maybe Text
-> Maybe (HashMap Text Text)
-> Text
-> Text
-> Text
-> JourneyResponse)
-> Parser (Maybe State)
-> Parser
(Maybe Text
-> Maybe JourneySchedule
-> Maybe Bool
-> Maybe (HashMap Text Activity)
-> Maybe Bool
-> Maybe JourneyLimits
-> Maybe Bool
-> Maybe QuietTime
-> Maybe Text
-> Maybe Text
-> Maybe StartCondition
-> Maybe JourneyChannelSettings
-> Maybe Text
-> Maybe (HashMap Text Text)
-> Text
-> Text
-> Text
-> JourneyResponse)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x Object -> Text -> Parser (Maybe State)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"State")
Parser
(Maybe Text
-> Maybe JourneySchedule
-> Maybe Bool
-> Maybe (HashMap Text Activity)
-> Maybe Bool
-> Maybe JourneyLimits
-> Maybe Bool
-> Maybe QuietTime
-> Maybe Text
-> Maybe Text
-> Maybe StartCondition
-> Maybe JourneyChannelSettings
-> Maybe Text
-> Maybe (HashMap Text Text)
-> Text
-> Text
-> Text
-> JourneyResponse)
-> Parser (Maybe Text)
-> Parser
(Maybe JourneySchedule
-> Maybe Bool
-> Maybe (HashMap Text Activity)
-> Maybe Bool
-> Maybe JourneyLimits
-> Maybe Bool
-> Maybe QuietTime
-> Maybe Text
-> Maybe Text
-> Maybe StartCondition
-> Maybe JourneyChannelSettings
-> Maybe Text
-> Maybe (HashMap Text Text)
-> Text
-> Text
-> Text
-> JourneyResponse)
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
"LastModifiedDate")
Parser
(Maybe JourneySchedule
-> Maybe Bool
-> Maybe (HashMap Text Activity)
-> Maybe Bool
-> Maybe JourneyLimits
-> Maybe Bool
-> Maybe QuietTime
-> Maybe Text
-> Maybe Text
-> Maybe StartCondition
-> Maybe JourneyChannelSettings
-> Maybe Text
-> Maybe (HashMap Text Text)
-> Text
-> Text
-> Text
-> JourneyResponse)
-> Parser (Maybe JourneySchedule)
-> Parser
(Maybe Bool
-> Maybe (HashMap Text Activity)
-> Maybe Bool
-> Maybe JourneyLimits
-> Maybe Bool
-> Maybe QuietTime
-> Maybe Text
-> Maybe Text
-> Maybe StartCondition
-> Maybe JourneyChannelSettings
-> Maybe Text
-> Maybe (HashMap Text Text)
-> Text
-> Text
-> Text
-> JourneyResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe JourneySchedule)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"Schedule")
Parser
(Maybe Bool
-> Maybe (HashMap Text Activity)
-> Maybe Bool
-> Maybe JourneyLimits
-> Maybe Bool
-> Maybe QuietTime
-> Maybe Text
-> Maybe Text
-> Maybe StartCondition
-> Maybe JourneyChannelSettings
-> Maybe Text
-> Maybe (HashMap Text Text)
-> Text
-> Text
-> Text
-> JourneyResponse)
-> Parser (Maybe Bool)
-> Parser
(Maybe (HashMap Text Activity)
-> Maybe Bool
-> Maybe JourneyLimits
-> Maybe Bool
-> Maybe QuietTime
-> Maybe Text
-> Maybe Text
-> Maybe StartCondition
-> Maybe JourneyChannelSettings
-> Maybe Text
-> Maybe (HashMap Text Text)
-> Text
-> Text
-> Text
-> JourneyResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Bool)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"LocalTime")
Parser
(Maybe (HashMap Text Activity)
-> Maybe Bool
-> Maybe JourneyLimits
-> Maybe Bool
-> Maybe QuietTime
-> Maybe Text
-> Maybe Text
-> Maybe StartCondition
-> Maybe JourneyChannelSettings
-> Maybe Text
-> Maybe (HashMap Text Text)
-> Text
-> Text
-> Text
-> JourneyResponse)
-> Parser (Maybe (HashMap Text Activity))
-> Parser
(Maybe Bool
-> Maybe JourneyLimits
-> Maybe Bool
-> Maybe QuietTime
-> Maybe Text
-> Maybe Text
-> Maybe StartCondition
-> Maybe JourneyChannelSettings
-> Maybe Text
-> Maybe (HashMap Text Text)
-> Text
-> Text
-> Text
-> JourneyResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe (Maybe (HashMap Text Activity)))
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"Activities" Parser (Maybe (Maybe (HashMap Text Activity)))
-> Maybe (HashMap Text Activity)
-> Parser (Maybe (HashMap Text Activity))
forall a. Parser (Maybe a) -> a -> Parser a
Core..!= Maybe (HashMap Text Activity)
forall a. Monoid a => a
Prelude.mempty)
Parser
(Maybe Bool
-> Maybe JourneyLimits
-> Maybe Bool
-> Maybe QuietTime
-> Maybe Text
-> Maybe Text
-> Maybe StartCondition
-> Maybe JourneyChannelSettings
-> Maybe Text
-> Maybe (HashMap Text Text)
-> Text
-> Text
-> Text
-> JourneyResponse)
-> Parser (Maybe Bool)
-> Parser
(Maybe JourneyLimits
-> Maybe Bool
-> Maybe QuietTime
-> Maybe Text
-> Maybe Text
-> Maybe StartCondition
-> Maybe JourneyChannelSettings
-> Maybe Text
-> Maybe (HashMap Text Text)
-> Text
-> Text
-> Text
-> JourneyResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Bool)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"RefreshOnSegmentUpdate")
Parser
(Maybe JourneyLimits
-> Maybe Bool
-> Maybe QuietTime
-> Maybe Text
-> Maybe Text
-> Maybe StartCondition
-> Maybe JourneyChannelSettings
-> Maybe Text
-> Maybe (HashMap Text Text)
-> Text
-> Text
-> Text
-> JourneyResponse)
-> Parser (Maybe JourneyLimits)
-> Parser
(Maybe Bool
-> Maybe QuietTime
-> Maybe Text
-> Maybe Text
-> Maybe StartCondition
-> Maybe JourneyChannelSettings
-> Maybe Text
-> Maybe (HashMap Text Text)
-> Text
-> Text
-> Text
-> JourneyResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe JourneyLimits)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"Limits")
Parser
(Maybe Bool
-> Maybe QuietTime
-> Maybe Text
-> Maybe Text
-> Maybe StartCondition
-> Maybe JourneyChannelSettings
-> Maybe Text
-> Maybe (HashMap Text Text)
-> Text
-> Text
-> Text
-> JourneyResponse)
-> Parser (Maybe Bool)
-> Parser
(Maybe QuietTime
-> Maybe Text
-> Maybe Text
-> Maybe StartCondition
-> Maybe JourneyChannelSettings
-> Maybe Text
-> Maybe (HashMap Text Text)
-> Text
-> Text
-> Text
-> JourneyResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Bool)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"WaitForQuietTime")
Parser
(Maybe QuietTime
-> Maybe Text
-> Maybe Text
-> Maybe StartCondition
-> Maybe JourneyChannelSettings
-> Maybe Text
-> Maybe (HashMap Text Text)
-> Text
-> Text
-> Text
-> JourneyResponse)
-> Parser (Maybe QuietTime)
-> Parser
(Maybe Text
-> Maybe Text
-> Maybe StartCondition
-> Maybe JourneyChannelSettings
-> Maybe Text
-> Maybe (HashMap Text Text)
-> Text
-> Text
-> Text
-> JourneyResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe QuietTime)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"QuietTime")
Parser
(Maybe Text
-> Maybe Text
-> Maybe StartCondition
-> Maybe JourneyChannelSettings
-> Maybe Text
-> Maybe (HashMap Text Text)
-> Text
-> Text
-> Text
-> JourneyResponse)
-> Parser (Maybe Text)
-> Parser
(Maybe Text
-> Maybe StartCondition
-> Maybe JourneyChannelSettings
-> Maybe Text
-> Maybe (HashMap Text Text)
-> Text
-> Text
-> Text
-> JourneyResponse)
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
"StartActivity")
Parser
(Maybe Text
-> Maybe StartCondition
-> Maybe JourneyChannelSettings
-> Maybe Text
-> Maybe (HashMap Text Text)
-> Text
-> Text
-> Text
-> JourneyResponse)
-> Parser (Maybe Text)
-> Parser
(Maybe StartCondition
-> Maybe JourneyChannelSettings
-> Maybe Text
-> Maybe (HashMap Text Text)
-> Text
-> Text
-> Text
-> JourneyResponse)
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
"CreationDate")
Parser
(Maybe StartCondition
-> Maybe JourneyChannelSettings
-> Maybe Text
-> Maybe (HashMap Text Text)
-> Text
-> Text
-> Text
-> JourneyResponse)
-> Parser (Maybe StartCondition)
-> Parser
(Maybe JourneyChannelSettings
-> Maybe Text
-> Maybe (HashMap Text Text)
-> Text
-> Text
-> Text
-> JourneyResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe StartCondition)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"StartCondition")
Parser
(Maybe JourneyChannelSettings
-> Maybe Text
-> Maybe (HashMap Text Text)
-> Text
-> Text
-> Text
-> JourneyResponse)
-> Parser (Maybe JourneyChannelSettings)
-> Parser
(Maybe Text
-> Maybe (HashMap Text Text)
-> Text
-> Text
-> Text
-> JourneyResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe JourneyChannelSettings)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"JourneyChannelSettings")
Parser
(Maybe Text
-> Maybe (HashMap Text Text)
-> Text
-> Text
-> Text
-> JourneyResponse)
-> Parser (Maybe Text)
-> Parser
(Maybe (HashMap Text Text)
-> Text -> Text -> Text -> JourneyResponse)
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
"RefreshFrequency")
Parser
(Maybe (HashMap Text Text)
-> Text -> Text -> Text -> JourneyResponse)
-> Parser (Maybe (HashMap Text Text))
-> Parser (Text -> Text -> Text -> JourneyResponse)
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 -> Text -> JourneyResponse)
-> Parser Text -> Parser (Text -> Text -> JourneyResponse)
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
"Name")
Parser (Text -> Text -> JourneyResponse)
-> Parser Text -> Parser (Text -> JourneyResponse)
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
"Id")
Parser (Text -> JourneyResponse)
-> Parser Text -> Parser JourneyResponse
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
"ApplicationId")
)
instance Prelude.Hashable JourneyResponse
instance Prelude.NFData JourneyResponse