{-# 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.WriteJourneyRequest where
import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import Amazonka.Pinpoint.Types.Activity
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 WriteJourneyRequest = WriteJourneyRequest'
{
WriteJourneyRequest -> Maybe State
state :: Prelude.Maybe State,
WriteJourneyRequest -> Maybe Text
lastModifiedDate :: Prelude.Maybe Prelude.Text,
WriteJourneyRequest -> Maybe JourneySchedule
schedule :: Prelude.Maybe JourneySchedule,
WriteJourneyRequest -> Maybe Bool
localTime :: Prelude.Maybe Prelude.Bool,
WriteJourneyRequest -> Maybe (HashMap Text Activity)
activities :: Prelude.Maybe (Prelude.HashMap Prelude.Text Activity),
WriteJourneyRequest -> Maybe Bool
refreshOnSegmentUpdate :: Prelude.Maybe Prelude.Bool,
WriteJourneyRequest -> Maybe JourneyLimits
limits :: Prelude.Maybe JourneyLimits,
WriteJourneyRequest -> Maybe Bool
waitForQuietTime :: Prelude.Maybe Prelude.Bool,
WriteJourneyRequest -> Maybe QuietTime
quietTime :: Prelude.Maybe QuietTime,
WriteJourneyRequest -> Maybe Text
startActivity :: Prelude.Maybe Prelude.Text,
WriteJourneyRequest -> Maybe Text
creationDate :: Prelude.Maybe Prelude.Text,
WriteJourneyRequest -> Maybe StartCondition
startCondition :: Prelude.Maybe StartCondition,
WriteJourneyRequest -> Maybe Text
refreshFrequency :: Prelude.Maybe Prelude.Text,
WriteJourneyRequest -> Text
name :: Prelude.Text
}
deriving (WriteJourneyRequest -> WriteJourneyRequest -> Bool
(WriteJourneyRequest -> WriteJourneyRequest -> Bool)
-> (WriteJourneyRequest -> WriteJourneyRequest -> Bool)
-> Eq WriteJourneyRequest
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: WriteJourneyRequest -> WriteJourneyRequest -> Bool
$c/= :: WriteJourneyRequest -> WriteJourneyRequest -> Bool
== :: WriteJourneyRequest -> WriteJourneyRequest -> Bool
$c== :: WriteJourneyRequest -> WriteJourneyRequest -> Bool
Prelude.Eq, ReadPrec [WriteJourneyRequest]
ReadPrec WriteJourneyRequest
Int -> ReadS WriteJourneyRequest
ReadS [WriteJourneyRequest]
(Int -> ReadS WriteJourneyRequest)
-> ReadS [WriteJourneyRequest]
-> ReadPrec WriteJourneyRequest
-> ReadPrec [WriteJourneyRequest]
-> Read WriteJourneyRequest
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [WriteJourneyRequest]
$creadListPrec :: ReadPrec [WriteJourneyRequest]
readPrec :: ReadPrec WriteJourneyRequest
$creadPrec :: ReadPrec WriteJourneyRequest
readList :: ReadS [WriteJourneyRequest]
$creadList :: ReadS [WriteJourneyRequest]
readsPrec :: Int -> ReadS WriteJourneyRequest
$creadsPrec :: Int -> ReadS WriteJourneyRequest
Prelude.Read, Int -> WriteJourneyRequest -> ShowS
[WriteJourneyRequest] -> ShowS
WriteJourneyRequest -> String
(Int -> WriteJourneyRequest -> ShowS)
-> (WriteJourneyRequest -> String)
-> ([WriteJourneyRequest] -> ShowS)
-> Show WriteJourneyRequest
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [WriteJourneyRequest] -> ShowS
$cshowList :: [WriteJourneyRequest] -> ShowS
show :: WriteJourneyRequest -> String
$cshow :: WriteJourneyRequest -> String
showsPrec :: Int -> WriteJourneyRequest -> ShowS
$cshowsPrec :: Int -> WriteJourneyRequest -> ShowS
Prelude.Show, (forall x. WriteJourneyRequest -> Rep WriteJourneyRequest x)
-> (forall x. Rep WriteJourneyRequest x -> WriteJourneyRequest)
-> Generic WriteJourneyRequest
forall x. Rep WriteJourneyRequest x -> WriteJourneyRequest
forall x. WriteJourneyRequest -> Rep WriteJourneyRequest x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep WriteJourneyRequest x -> WriteJourneyRequest
$cfrom :: forall x. WriteJourneyRequest -> Rep WriteJourneyRequest x
Prelude.Generic)
newWriteJourneyRequest ::
Prelude.Text ->
WriteJourneyRequest
newWriteJourneyRequest :: Text -> WriteJourneyRequest
newWriteJourneyRequest Text
pName_ =
WriteJourneyRequest' :: 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 Text
-> Text
-> WriteJourneyRequest
WriteJourneyRequest'
{ $sel:state:WriteJourneyRequest' :: Maybe State
state = Maybe State
forall a. Maybe a
Prelude.Nothing,
$sel:lastModifiedDate:WriteJourneyRequest' :: Maybe Text
lastModifiedDate = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:schedule:WriteJourneyRequest' :: Maybe JourneySchedule
schedule = Maybe JourneySchedule
forall a. Maybe a
Prelude.Nothing,
$sel:localTime:WriteJourneyRequest' :: Maybe Bool
localTime = Maybe Bool
forall a. Maybe a
Prelude.Nothing,
$sel:activities:WriteJourneyRequest' :: Maybe (HashMap Text Activity)
activities = Maybe (HashMap Text Activity)
forall a. Maybe a
Prelude.Nothing,
$sel:refreshOnSegmentUpdate:WriteJourneyRequest' :: Maybe Bool
refreshOnSegmentUpdate = Maybe Bool
forall a. Maybe a
Prelude.Nothing,
$sel:limits:WriteJourneyRequest' :: Maybe JourneyLimits
limits = Maybe JourneyLimits
forall a. Maybe a
Prelude.Nothing,
$sel:waitForQuietTime:WriteJourneyRequest' :: Maybe Bool
waitForQuietTime = Maybe Bool
forall a. Maybe a
Prelude.Nothing,
$sel:quietTime:WriteJourneyRequest' :: Maybe QuietTime
quietTime = Maybe QuietTime
forall a. Maybe a
Prelude.Nothing,
$sel:startActivity:WriteJourneyRequest' :: Maybe Text
startActivity = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:creationDate:WriteJourneyRequest' :: Maybe Text
creationDate = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:startCondition:WriteJourneyRequest' :: Maybe StartCondition
startCondition = Maybe StartCondition
forall a. Maybe a
Prelude.Nothing,
$sel:refreshFrequency:WriteJourneyRequest' :: Maybe Text
refreshFrequency = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:name:WriteJourneyRequest' :: Text
name = Text
pName_
}
writeJourneyRequest_state :: Lens.Lens' WriteJourneyRequest (Prelude.Maybe State)
writeJourneyRequest_state :: (Maybe State -> f (Maybe State))
-> WriteJourneyRequest -> f WriteJourneyRequest
writeJourneyRequest_state = (WriteJourneyRequest -> Maybe State)
-> (WriteJourneyRequest -> Maybe State -> WriteJourneyRequest)
-> Lens
WriteJourneyRequest WriteJourneyRequest (Maybe State) (Maybe State)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\WriteJourneyRequest' {Maybe State
state :: Maybe State
$sel:state:WriteJourneyRequest' :: WriteJourneyRequest -> Maybe State
state} -> Maybe State
state) (\s :: WriteJourneyRequest
s@WriteJourneyRequest' {} Maybe State
a -> WriteJourneyRequest
s {$sel:state:WriteJourneyRequest' :: Maybe State
state = Maybe State
a} :: WriteJourneyRequest)
writeJourneyRequest_lastModifiedDate :: Lens.Lens' WriteJourneyRequest (Prelude.Maybe Prelude.Text)
writeJourneyRequest_lastModifiedDate :: (Maybe Text -> f (Maybe Text))
-> WriteJourneyRequest -> f WriteJourneyRequest
writeJourneyRequest_lastModifiedDate = (WriteJourneyRequest -> Maybe Text)
-> (WriteJourneyRequest -> Maybe Text -> WriteJourneyRequest)
-> Lens
WriteJourneyRequest WriteJourneyRequest (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\WriteJourneyRequest' {Maybe Text
lastModifiedDate :: Maybe Text
$sel:lastModifiedDate:WriteJourneyRequest' :: WriteJourneyRequest -> Maybe Text
lastModifiedDate} -> Maybe Text
lastModifiedDate) (\s :: WriteJourneyRequest
s@WriteJourneyRequest' {} Maybe Text
a -> WriteJourneyRequest
s {$sel:lastModifiedDate:WriteJourneyRequest' :: Maybe Text
lastModifiedDate = Maybe Text
a} :: WriteJourneyRequest)
writeJourneyRequest_schedule :: Lens.Lens' WriteJourneyRequest (Prelude.Maybe JourneySchedule)
writeJourneyRequest_schedule :: (Maybe JourneySchedule -> f (Maybe JourneySchedule))
-> WriteJourneyRequest -> f WriteJourneyRequest
writeJourneyRequest_schedule = (WriteJourneyRequest -> Maybe JourneySchedule)
-> (WriteJourneyRequest
-> Maybe JourneySchedule -> WriteJourneyRequest)
-> Lens
WriteJourneyRequest
WriteJourneyRequest
(Maybe JourneySchedule)
(Maybe JourneySchedule)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\WriteJourneyRequest' {Maybe JourneySchedule
schedule :: Maybe JourneySchedule
$sel:schedule:WriteJourneyRequest' :: WriteJourneyRequest -> Maybe JourneySchedule
schedule} -> Maybe JourneySchedule
schedule) (\s :: WriteJourneyRequest
s@WriteJourneyRequest' {} Maybe JourneySchedule
a -> WriteJourneyRequest
s {$sel:schedule:WriteJourneyRequest' :: Maybe JourneySchedule
schedule = Maybe JourneySchedule
a} :: WriteJourneyRequest)
writeJourneyRequest_localTime :: Lens.Lens' WriteJourneyRequest (Prelude.Maybe Prelude.Bool)
writeJourneyRequest_localTime :: (Maybe Bool -> f (Maybe Bool))
-> WriteJourneyRequest -> f WriteJourneyRequest
writeJourneyRequest_localTime = (WriteJourneyRequest -> Maybe Bool)
-> (WriteJourneyRequest -> Maybe Bool -> WriteJourneyRequest)
-> Lens
WriteJourneyRequest WriteJourneyRequest (Maybe Bool) (Maybe Bool)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\WriteJourneyRequest' {Maybe Bool
localTime :: Maybe Bool
$sel:localTime:WriteJourneyRequest' :: WriteJourneyRequest -> Maybe Bool
localTime} -> Maybe Bool
localTime) (\s :: WriteJourneyRequest
s@WriteJourneyRequest' {} Maybe Bool
a -> WriteJourneyRequest
s {$sel:localTime:WriteJourneyRequest' :: Maybe Bool
localTime = Maybe Bool
a} :: WriteJourneyRequest)
writeJourneyRequest_activities :: Lens.Lens' WriteJourneyRequest (Prelude.Maybe (Prelude.HashMap Prelude.Text Activity))
writeJourneyRequest_activities :: (Maybe (HashMap Text Activity)
-> f (Maybe (HashMap Text Activity)))
-> WriteJourneyRequest -> f WriteJourneyRequest
writeJourneyRequest_activities = (WriteJourneyRequest -> Maybe (HashMap Text Activity))
-> (WriteJourneyRequest
-> Maybe (HashMap Text Activity) -> WriteJourneyRequest)
-> Lens
WriteJourneyRequest
WriteJourneyRequest
(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 (\WriteJourneyRequest' {Maybe (HashMap Text Activity)
activities :: Maybe (HashMap Text Activity)
$sel:activities:WriteJourneyRequest' :: WriteJourneyRequest -> Maybe (HashMap Text Activity)
activities} -> Maybe (HashMap Text Activity)
activities) (\s :: WriteJourneyRequest
s@WriteJourneyRequest' {} Maybe (HashMap Text Activity)
a -> WriteJourneyRequest
s {$sel:activities:WriteJourneyRequest' :: Maybe (HashMap Text Activity)
activities = Maybe (HashMap Text Activity)
a} :: WriteJourneyRequest) ((Maybe (HashMap Text Activity)
-> f (Maybe (HashMap Text Activity)))
-> WriteJourneyRequest -> f WriteJourneyRequest)
-> ((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)))
-> WriteJourneyRequest
-> f WriteJourneyRequest
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
writeJourneyRequest_refreshOnSegmentUpdate :: Lens.Lens' WriteJourneyRequest (Prelude.Maybe Prelude.Bool)
writeJourneyRequest_refreshOnSegmentUpdate :: (Maybe Bool -> f (Maybe Bool))
-> WriteJourneyRequest -> f WriteJourneyRequest
writeJourneyRequest_refreshOnSegmentUpdate = (WriteJourneyRequest -> Maybe Bool)
-> (WriteJourneyRequest -> Maybe Bool -> WriteJourneyRequest)
-> Lens
WriteJourneyRequest WriteJourneyRequest (Maybe Bool) (Maybe Bool)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\WriteJourneyRequest' {Maybe Bool
refreshOnSegmentUpdate :: Maybe Bool
$sel:refreshOnSegmentUpdate:WriteJourneyRequest' :: WriteJourneyRequest -> Maybe Bool
refreshOnSegmentUpdate} -> Maybe Bool
refreshOnSegmentUpdate) (\s :: WriteJourneyRequest
s@WriteJourneyRequest' {} Maybe Bool
a -> WriteJourneyRequest
s {$sel:refreshOnSegmentUpdate:WriteJourneyRequest' :: Maybe Bool
refreshOnSegmentUpdate = Maybe Bool
a} :: WriteJourneyRequest)
writeJourneyRequest_limits :: Lens.Lens' WriteJourneyRequest (Prelude.Maybe JourneyLimits)
writeJourneyRequest_limits :: (Maybe JourneyLimits -> f (Maybe JourneyLimits))
-> WriteJourneyRequest -> f WriteJourneyRequest
writeJourneyRequest_limits = (WriteJourneyRequest -> Maybe JourneyLimits)
-> (WriteJourneyRequest
-> Maybe JourneyLimits -> WriteJourneyRequest)
-> Lens
WriteJourneyRequest
WriteJourneyRequest
(Maybe JourneyLimits)
(Maybe JourneyLimits)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\WriteJourneyRequest' {Maybe JourneyLimits
limits :: Maybe JourneyLimits
$sel:limits:WriteJourneyRequest' :: WriteJourneyRequest -> Maybe JourneyLimits
limits} -> Maybe JourneyLimits
limits) (\s :: WriteJourneyRequest
s@WriteJourneyRequest' {} Maybe JourneyLimits
a -> WriteJourneyRequest
s {$sel:limits:WriteJourneyRequest' :: Maybe JourneyLimits
limits = Maybe JourneyLimits
a} :: WriteJourneyRequest)
writeJourneyRequest_waitForQuietTime :: Lens.Lens' WriteJourneyRequest (Prelude.Maybe Prelude.Bool)
writeJourneyRequest_waitForQuietTime :: (Maybe Bool -> f (Maybe Bool))
-> WriteJourneyRequest -> f WriteJourneyRequest
writeJourneyRequest_waitForQuietTime = (WriteJourneyRequest -> Maybe Bool)
-> (WriteJourneyRequest -> Maybe Bool -> WriteJourneyRequest)
-> Lens
WriteJourneyRequest WriteJourneyRequest (Maybe Bool) (Maybe Bool)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\WriteJourneyRequest' {Maybe Bool
waitForQuietTime :: Maybe Bool
$sel:waitForQuietTime:WriteJourneyRequest' :: WriteJourneyRequest -> Maybe Bool
waitForQuietTime} -> Maybe Bool
waitForQuietTime) (\s :: WriteJourneyRequest
s@WriteJourneyRequest' {} Maybe Bool
a -> WriteJourneyRequest
s {$sel:waitForQuietTime:WriteJourneyRequest' :: Maybe Bool
waitForQuietTime = Maybe Bool
a} :: WriteJourneyRequest)
writeJourneyRequest_quietTime :: Lens.Lens' WriteJourneyRequest (Prelude.Maybe QuietTime)
writeJourneyRequest_quietTime :: (Maybe QuietTime -> f (Maybe QuietTime))
-> WriteJourneyRequest -> f WriteJourneyRequest
writeJourneyRequest_quietTime = (WriteJourneyRequest -> Maybe QuietTime)
-> (WriteJourneyRequest -> Maybe QuietTime -> WriteJourneyRequest)
-> Lens
WriteJourneyRequest
WriteJourneyRequest
(Maybe QuietTime)
(Maybe QuietTime)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\WriteJourneyRequest' {Maybe QuietTime
quietTime :: Maybe QuietTime
$sel:quietTime:WriteJourneyRequest' :: WriteJourneyRequest -> Maybe QuietTime
quietTime} -> Maybe QuietTime
quietTime) (\s :: WriteJourneyRequest
s@WriteJourneyRequest' {} Maybe QuietTime
a -> WriteJourneyRequest
s {$sel:quietTime:WriteJourneyRequest' :: Maybe QuietTime
quietTime = Maybe QuietTime
a} :: WriteJourneyRequest)
writeJourneyRequest_startActivity :: Lens.Lens' WriteJourneyRequest (Prelude.Maybe Prelude.Text)
writeJourneyRequest_startActivity :: (Maybe Text -> f (Maybe Text))
-> WriteJourneyRequest -> f WriteJourneyRequest
writeJourneyRequest_startActivity = (WriteJourneyRequest -> Maybe Text)
-> (WriteJourneyRequest -> Maybe Text -> WriteJourneyRequest)
-> Lens
WriteJourneyRequest WriteJourneyRequest (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\WriteJourneyRequest' {Maybe Text
startActivity :: Maybe Text
$sel:startActivity:WriteJourneyRequest' :: WriteJourneyRequest -> Maybe Text
startActivity} -> Maybe Text
startActivity) (\s :: WriteJourneyRequest
s@WriteJourneyRequest' {} Maybe Text
a -> WriteJourneyRequest
s {$sel:startActivity:WriteJourneyRequest' :: Maybe Text
startActivity = Maybe Text
a} :: WriteJourneyRequest)
writeJourneyRequest_creationDate :: Lens.Lens' WriteJourneyRequest (Prelude.Maybe Prelude.Text)
writeJourneyRequest_creationDate :: (Maybe Text -> f (Maybe Text))
-> WriteJourneyRequest -> f WriteJourneyRequest
writeJourneyRequest_creationDate = (WriteJourneyRequest -> Maybe Text)
-> (WriteJourneyRequest -> Maybe Text -> WriteJourneyRequest)
-> Lens
WriteJourneyRequest WriteJourneyRequest (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\WriteJourneyRequest' {Maybe Text
creationDate :: Maybe Text
$sel:creationDate:WriteJourneyRequest' :: WriteJourneyRequest -> Maybe Text
creationDate} -> Maybe Text
creationDate) (\s :: WriteJourneyRequest
s@WriteJourneyRequest' {} Maybe Text
a -> WriteJourneyRequest
s {$sel:creationDate:WriteJourneyRequest' :: Maybe Text
creationDate = Maybe Text
a} :: WriteJourneyRequest)
writeJourneyRequest_startCondition :: Lens.Lens' WriteJourneyRequest (Prelude.Maybe StartCondition)
writeJourneyRequest_startCondition :: (Maybe StartCondition -> f (Maybe StartCondition))
-> WriteJourneyRequest -> f WriteJourneyRequest
writeJourneyRequest_startCondition = (WriteJourneyRequest -> Maybe StartCondition)
-> (WriteJourneyRequest
-> Maybe StartCondition -> WriteJourneyRequest)
-> Lens
WriteJourneyRequest
WriteJourneyRequest
(Maybe StartCondition)
(Maybe StartCondition)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\WriteJourneyRequest' {Maybe StartCondition
startCondition :: Maybe StartCondition
$sel:startCondition:WriteJourneyRequest' :: WriteJourneyRequest -> Maybe StartCondition
startCondition} -> Maybe StartCondition
startCondition) (\s :: WriteJourneyRequest
s@WriteJourneyRequest' {} Maybe StartCondition
a -> WriteJourneyRequest
s {$sel:startCondition:WriteJourneyRequest' :: Maybe StartCondition
startCondition = Maybe StartCondition
a} :: WriteJourneyRequest)
writeJourneyRequest_refreshFrequency :: Lens.Lens' WriteJourneyRequest (Prelude.Maybe Prelude.Text)
writeJourneyRequest_refreshFrequency :: (Maybe Text -> f (Maybe Text))
-> WriteJourneyRequest -> f WriteJourneyRequest
writeJourneyRequest_refreshFrequency = (WriteJourneyRequest -> Maybe Text)
-> (WriteJourneyRequest -> Maybe Text -> WriteJourneyRequest)
-> Lens
WriteJourneyRequest WriteJourneyRequest (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\WriteJourneyRequest' {Maybe Text
refreshFrequency :: Maybe Text
$sel:refreshFrequency:WriteJourneyRequest' :: WriteJourneyRequest -> Maybe Text
refreshFrequency} -> Maybe Text
refreshFrequency) (\s :: WriteJourneyRequest
s@WriteJourneyRequest' {} Maybe Text
a -> WriteJourneyRequest
s {$sel:refreshFrequency:WriteJourneyRequest' :: Maybe Text
refreshFrequency = Maybe Text
a} :: WriteJourneyRequest)
writeJourneyRequest_name :: Lens.Lens' WriteJourneyRequest Prelude.Text
writeJourneyRequest_name :: (Text -> f Text) -> WriteJourneyRequest -> f WriteJourneyRequest
writeJourneyRequest_name = (WriteJourneyRequest -> Text)
-> (WriteJourneyRequest -> Text -> WriteJourneyRequest)
-> Lens WriteJourneyRequest WriteJourneyRequest Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\WriteJourneyRequest' {Text
name :: Text
$sel:name:WriteJourneyRequest' :: WriteJourneyRequest -> Text
name} -> Text
name) (\s :: WriteJourneyRequest
s@WriteJourneyRequest' {} Text
a -> WriteJourneyRequest
s {$sel:name:WriteJourneyRequest' :: Text
name = Text
a} :: WriteJourneyRequest)
instance Prelude.Hashable WriteJourneyRequest
instance Prelude.NFData WriteJourneyRequest
instance Core.ToJSON WriteJourneyRequest where
toJSON :: WriteJourneyRequest -> Value
toJSON WriteJourneyRequest' {Maybe Bool
Maybe Text
Maybe (HashMap Text Activity)
Maybe JourneyLimits
Maybe JourneySchedule
Maybe QuietTime
Maybe StartCondition
Maybe State
Text
name :: Text
refreshFrequency :: Maybe Text
startCondition :: Maybe StartCondition
creationDate :: Maybe Text
startActivity :: Maybe Text
quietTime :: Maybe QuietTime
waitForQuietTime :: Maybe Bool
limits :: Maybe JourneyLimits
refreshOnSegmentUpdate :: Maybe Bool
activities :: Maybe (HashMap Text Activity)
localTime :: Maybe Bool
schedule :: Maybe JourneySchedule
lastModifiedDate :: Maybe Text
state :: Maybe State
$sel:name:WriteJourneyRequest' :: WriteJourneyRequest -> Text
$sel:refreshFrequency:WriteJourneyRequest' :: WriteJourneyRequest -> Maybe Text
$sel:startCondition:WriteJourneyRequest' :: WriteJourneyRequest -> Maybe StartCondition
$sel:creationDate:WriteJourneyRequest' :: WriteJourneyRequest -> Maybe Text
$sel:startActivity:WriteJourneyRequest' :: WriteJourneyRequest -> Maybe Text
$sel:quietTime:WriteJourneyRequest' :: WriteJourneyRequest -> Maybe QuietTime
$sel:waitForQuietTime:WriteJourneyRequest' :: WriteJourneyRequest -> Maybe Bool
$sel:limits:WriteJourneyRequest' :: WriteJourneyRequest -> Maybe JourneyLimits
$sel:refreshOnSegmentUpdate:WriteJourneyRequest' :: WriteJourneyRequest -> Maybe Bool
$sel:activities:WriteJourneyRequest' :: WriteJourneyRequest -> Maybe (HashMap Text Activity)
$sel:localTime:WriteJourneyRequest' :: WriteJourneyRequest -> Maybe Bool
$sel:schedule:WriteJourneyRequest' :: WriteJourneyRequest -> Maybe JourneySchedule
$sel:lastModifiedDate:WriteJourneyRequest' :: WriteJourneyRequest -> Maybe Text
$sel:state:WriteJourneyRequest' :: WriteJourneyRequest -> Maybe State
..} =
[Pair] -> Value
Core.object
( [Maybe Pair] -> [Pair]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
[ (Text
"State" Text -> State -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (State -> Pair) -> Maybe State -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe State
state,
(Text
"LastModifiedDate" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=)
(Text -> Pair) -> Maybe Text -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Text
lastModifiedDate,
(Text
"Schedule" Text -> JourneySchedule -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (JourneySchedule -> Pair) -> Maybe JourneySchedule -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe JourneySchedule
schedule,
(Text
"LocalTime" Text -> Bool -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (Bool -> Pair) -> Maybe Bool -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Bool
localTime,
(Text
"Activities" Text -> HashMap Text Activity -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (HashMap Text Activity -> Pair)
-> Maybe (HashMap Text Activity) -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe (HashMap Text Activity)
activities,
(Text
"RefreshOnSegmentUpdate" Text -> Bool -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=)
(Bool -> Pair) -> Maybe Bool -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Bool
refreshOnSegmentUpdate,
(Text
"Limits" Text -> JourneyLimits -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (JourneyLimits -> Pair) -> Maybe JourneyLimits -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe JourneyLimits
limits,
(Text
"WaitForQuietTime" Text -> Bool -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=)
(Bool -> Pair) -> Maybe Bool -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Bool
waitForQuietTime,
(Text
"QuietTime" Text -> QuietTime -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (QuietTime -> Pair) -> Maybe QuietTime -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe QuietTime
quietTime,
(Text
"StartActivity" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (Text -> Pair) -> Maybe Text -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Text
startActivity,
(Text
"CreationDate" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (Text -> Pair) -> Maybe Text -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Text
creationDate,
(Text
"StartCondition" Text -> StartCondition -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=)
(StartCondition -> Pair) -> Maybe StartCondition -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe StartCondition
startCondition,
(Text
"RefreshFrequency" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=)
(Text -> Pair) -> Maybe Text -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Text
refreshFrequency,
Pair -> Maybe Pair
forall a. a -> Maybe a
Prelude.Just (Text
"Name" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= Text
name)
]
)