{-# 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.CampaignResponse where
import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import Amazonka.Pinpoint.Types.CampaignHook
import Amazonka.Pinpoint.Types.CampaignLimits
import Amazonka.Pinpoint.Types.CampaignState
import Amazonka.Pinpoint.Types.CustomDeliveryConfiguration
import Amazonka.Pinpoint.Types.MessageConfiguration
import Amazonka.Pinpoint.Types.Schedule
import Amazonka.Pinpoint.Types.TemplateConfiguration
import Amazonka.Pinpoint.Types.TreatmentResource
import qualified Amazonka.Prelude as Prelude
data CampaignResponse = CampaignResponse'
{
CampaignResponse -> Maybe CustomDeliveryConfiguration
customDeliveryConfiguration :: Prelude.Maybe CustomDeliveryConfiguration,
CampaignResponse -> Maybe CampaignState
state :: Prelude.Maybe CampaignState,
CampaignResponse -> Maybe Int
priority :: Prelude.Maybe Prelude.Int,
CampaignResponse -> Maybe Schedule
schedule :: Prelude.Maybe Schedule,
CampaignResponse -> Maybe TemplateConfiguration
templateConfiguration :: Prelude.Maybe TemplateConfiguration,
CampaignResponse -> Maybe CampaignHook
hook :: Prelude.Maybe CampaignHook,
CampaignResponse -> Maybe Text
treatmentName :: Prelude.Maybe Prelude.Text,
CampaignResponse -> Maybe CampaignLimits
limits :: Prelude.Maybe CampaignLimits,
CampaignResponse -> Maybe Bool
isPaused :: Prelude.Maybe Prelude.Bool,
CampaignResponse -> Maybe CampaignState
defaultState :: Prelude.Maybe CampaignState,
CampaignResponse -> Maybe Text
name :: Prelude.Maybe Prelude.Text,
CampaignResponse -> Maybe Int
version :: Prelude.Maybe Prelude.Int,
CampaignResponse -> Maybe Int
holdoutPercent :: Prelude.Maybe Prelude.Int,
CampaignResponse -> Maybe Text
treatmentDescription :: Prelude.Maybe Prelude.Text,
CampaignResponse -> Maybe MessageConfiguration
messageConfiguration :: Prelude.Maybe MessageConfiguration,
CampaignResponse -> Maybe Text
description :: Prelude.Maybe Prelude.Text,
CampaignResponse -> Maybe [TreatmentResource]
additionalTreatments :: Prelude.Maybe [TreatmentResource],
CampaignResponse -> Maybe (HashMap Text Text)
tags :: Prelude.Maybe (Prelude.HashMap Prelude.Text Prelude.Text),
CampaignResponse -> Text
lastModifiedDate :: Prelude.Text,
CampaignResponse -> Text
creationDate :: Prelude.Text,
CampaignResponse -> Text
segmentId :: Prelude.Text,
CampaignResponse -> Int
segmentVersion :: Prelude.Int,
CampaignResponse -> Text
id :: Prelude.Text,
CampaignResponse -> Text
arn :: Prelude.Text,
CampaignResponse -> Text
applicationId :: Prelude.Text
}
deriving (CampaignResponse -> CampaignResponse -> Bool
(CampaignResponse -> CampaignResponse -> Bool)
-> (CampaignResponse -> CampaignResponse -> Bool)
-> Eq CampaignResponse
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: CampaignResponse -> CampaignResponse -> Bool
$c/= :: CampaignResponse -> CampaignResponse -> Bool
== :: CampaignResponse -> CampaignResponse -> Bool
$c== :: CampaignResponse -> CampaignResponse -> Bool
Prelude.Eq, ReadPrec [CampaignResponse]
ReadPrec CampaignResponse
Int -> ReadS CampaignResponse
ReadS [CampaignResponse]
(Int -> ReadS CampaignResponse)
-> ReadS [CampaignResponse]
-> ReadPrec CampaignResponse
-> ReadPrec [CampaignResponse]
-> Read CampaignResponse
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [CampaignResponse]
$creadListPrec :: ReadPrec [CampaignResponse]
readPrec :: ReadPrec CampaignResponse
$creadPrec :: ReadPrec CampaignResponse
readList :: ReadS [CampaignResponse]
$creadList :: ReadS [CampaignResponse]
readsPrec :: Int -> ReadS CampaignResponse
$creadsPrec :: Int -> ReadS CampaignResponse
Prelude.Read, Int -> CampaignResponse -> ShowS
[CampaignResponse] -> ShowS
CampaignResponse -> String
(Int -> CampaignResponse -> ShowS)
-> (CampaignResponse -> String)
-> ([CampaignResponse] -> ShowS)
-> Show CampaignResponse
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [CampaignResponse] -> ShowS
$cshowList :: [CampaignResponse] -> ShowS
show :: CampaignResponse -> String
$cshow :: CampaignResponse -> String
showsPrec :: Int -> CampaignResponse -> ShowS
$cshowsPrec :: Int -> CampaignResponse -> ShowS
Prelude.Show, (forall x. CampaignResponse -> Rep CampaignResponse x)
-> (forall x. Rep CampaignResponse x -> CampaignResponse)
-> Generic CampaignResponse
forall x. Rep CampaignResponse x -> CampaignResponse
forall x. CampaignResponse -> Rep CampaignResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep CampaignResponse x -> CampaignResponse
$cfrom :: forall x. CampaignResponse -> Rep CampaignResponse x
Prelude.Generic)
newCampaignResponse ::
Prelude.Text ->
Prelude.Text ->
Prelude.Text ->
Prelude.Int ->
Prelude.Text ->
Prelude.Text ->
Prelude.Text ->
CampaignResponse
newCampaignResponse :: Text
-> Text -> Text -> Int -> Text -> Text -> Text -> CampaignResponse
newCampaignResponse
Text
pLastModifiedDate_
Text
pCreationDate_
Text
pSegmentId_
Int
pSegmentVersion_
Text
pId_
Text
pArn_
Text
pApplicationId_ =
CampaignResponse' :: Maybe CustomDeliveryConfiguration
-> Maybe CampaignState
-> Maybe Int
-> Maybe Schedule
-> Maybe TemplateConfiguration
-> Maybe CampaignHook
-> Maybe Text
-> Maybe CampaignLimits
-> Maybe Bool
-> Maybe CampaignState
-> Maybe Text
-> Maybe Int
-> Maybe Int
-> Maybe Text
-> Maybe MessageConfiguration
-> Maybe Text
-> Maybe [TreatmentResource]
-> Maybe (HashMap Text Text)
-> Text
-> Text
-> Text
-> Int
-> Text
-> Text
-> Text
-> CampaignResponse
CampaignResponse'
{ $sel:customDeliveryConfiguration:CampaignResponse' :: Maybe CustomDeliveryConfiguration
customDeliveryConfiguration =
Maybe CustomDeliveryConfiguration
forall a. Maybe a
Prelude.Nothing,
$sel:state:CampaignResponse' :: Maybe CampaignState
state = Maybe CampaignState
forall a. Maybe a
Prelude.Nothing,
$sel:priority:CampaignResponse' :: Maybe Int
priority = Maybe Int
forall a. Maybe a
Prelude.Nothing,
$sel:schedule:CampaignResponse' :: Maybe Schedule
schedule = Maybe Schedule
forall a. Maybe a
Prelude.Nothing,
$sel:templateConfiguration:CampaignResponse' :: Maybe TemplateConfiguration
templateConfiguration = Maybe TemplateConfiguration
forall a. Maybe a
Prelude.Nothing,
$sel:hook:CampaignResponse' :: Maybe CampaignHook
hook = Maybe CampaignHook
forall a. Maybe a
Prelude.Nothing,
$sel:treatmentName:CampaignResponse' :: Maybe Text
treatmentName = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:limits:CampaignResponse' :: Maybe CampaignLimits
limits = Maybe CampaignLimits
forall a. Maybe a
Prelude.Nothing,
$sel:isPaused:CampaignResponse' :: Maybe Bool
isPaused = Maybe Bool
forall a. Maybe a
Prelude.Nothing,
$sel:defaultState:CampaignResponse' :: Maybe CampaignState
defaultState = Maybe CampaignState
forall a. Maybe a
Prelude.Nothing,
$sel:name:CampaignResponse' :: Maybe Text
name = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:version:CampaignResponse' :: Maybe Int
version = Maybe Int
forall a. Maybe a
Prelude.Nothing,
$sel:holdoutPercent:CampaignResponse' :: Maybe Int
holdoutPercent = Maybe Int
forall a. Maybe a
Prelude.Nothing,
$sel:treatmentDescription:CampaignResponse' :: Maybe Text
treatmentDescription = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:messageConfiguration:CampaignResponse' :: Maybe MessageConfiguration
messageConfiguration = Maybe MessageConfiguration
forall a. Maybe a
Prelude.Nothing,
$sel:description:CampaignResponse' :: Maybe Text
description = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:additionalTreatments:CampaignResponse' :: Maybe [TreatmentResource]
additionalTreatments = Maybe [TreatmentResource]
forall a. Maybe a
Prelude.Nothing,
$sel:tags:CampaignResponse' :: Maybe (HashMap Text Text)
tags = Maybe (HashMap Text Text)
forall a. Maybe a
Prelude.Nothing,
$sel:lastModifiedDate:CampaignResponse' :: Text
lastModifiedDate = Text
pLastModifiedDate_,
$sel:creationDate:CampaignResponse' :: Text
creationDate = Text
pCreationDate_,
$sel:segmentId:CampaignResponse' :: Text
segmentId = Text
pSegmentId_,
$sel:segmentVersion:CampaignResponse' :: Int
segmentVersion = Int
pSegmentVersion_,
$sel:id:CampaignResponse' :: Text
id = Text
pId_,
$sel:arn:CampaignResponse' :: Text
arn = Text
pArn_,
$sel:applicationId:CampaignResponse' :: Text
applicationId = Text
pApplicationId_
}
campaignResponse_customDeliveryConfiguration :: Lens.Lens' CampaignResponse (Prelude.Maybe CustomDeliveryConfiguration)
campaignResponse_customDeliveryConfiguration :: (Maybe CustomDeliveryConfiguration
-> f (Maybe CustomDeliveryConfiguration))
-> CampaignResponse -> f CampaignResponse
campaignResponse_customDeliveryConfiguration = (CampaignResponse -> Maybe CustomDeliveryConfiguration)
-> (CampaignResponse
-> Maybe CustomDeliveryConfiguration -> CampaignResponse)
-> Lens
CampaignResponse
CampaignResponse
(Maybe CustomDeliveryConfiguration)
(Maybe CustomDeliveryConfiguration)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CampaignResponse' {Maybe CustomDeliveryConfiguration
customDeliveryConfiguration :: Maybe CustomDeliveryConfiguration
$sel:customDeliveryConfiguration:CampaignResponse' :: CampaignResponse -> Maybe CustomDeliveryConfiguration
customDeliveryConfiguration} -> Maybe CustomDeliveryConfiguration
customDeliveryConfiguration) (\s :: CampaignResponse
s@CampaignResponse' {} Maybe CustomDeliveryConfiguration
a -> CampaignResponse
s {$sel:customDeliveryConfiguration:CampaignResponse' :: Maybe CustomDeliveryConfiguration
customDeliveryConfiguration = Maybe CustomDeliveryConfiguration
a} :: CampaignResponse)
campaignResponse_state :: Lens.Lens' CampaignResponse (Prelude.Maybe CampaignState)
campaignResponse_state :: (Maybe CampaignState -> f (Maybe CampaignState))
-> CampaignResponse -> f CampaignResponse
campaignResponse_state = (CampaignResponse -> Maybe CampaignState)
-> (CampaignResponse -> Maybe CampaignState -> CampaignResponse)
-> Lens
CampaignResponse
CampaignResponse
(Maybe CampaignState)
(Maybe CampaignState)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CampaignResponse' {Maybe CampaignState
state :: Maybe CampaignState
$sel:state:CampaignResponse' :: CampaignResponse -> Maybe CampaignState
state} -> Maybe CampaignState
state) (\s :: CampaignResponse
s@CampaignResponse' {} Maybe CampaignState
a -> CampaignResponse
s {$sel:state:CampaignResponse' :: Maybe CampaignState
state = Maybe CampaignState
a} :: CampaignResponse)
campaignResponse_priority :: Lens.Lens' CampaignResponse (Prelude.Maybe Prelude.Int)
campaignResponse_priority :: (Maybe Int -> f (Maybe Int))
-> CampaignResponse -> f CampaignResponse
campaignResponse_priority = (CampaignResponse -> Maybe Int)
-> (CampaignResponse -> Maybe Int -> CampaignResponse)
-> Lens CampaignResponse CampaignResponse (Maybe Int) (Maybe Int)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CampaignResponse' {Maybe Int
priority :: Maybe Int
$sel:priority:CampaignResponse' :: CampaignResponse -> Maybe Int
priority} -> Maybe Int
priority) (\s :: CampaignResponse
s@CampaignResponse' {} Maybe Int
a -> CampaignResponse
s {$sel:priority:CampaignResponse' :: Maybe Int
priority = Maybe Int
a} :: CampaignResponse)
campaignResponse_schedule :: Lens.Lens' CampaignResponse (Prelude.Maybe Schedule)
campaignResponse_schedule :: (Maybe Schedule -> f (Maybe Schedule))
-> CampaignResponse -> f CampaignResponse
campaignResponse_schedule = (CampaignResponse -> Maybe Schedule)
-> (CampaignResponse -> Maybe Schedule -> CampaignResponse)
-> Lens
CampaignResponse CampaignResponse (Maybe Schedule) (Maybe Schedule)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CampaignResponse' {Maybe Schedule
schedule :: Maybe Schedule
$sel:schedule:CampaignResponse' :: CampaignResponse -> Maybe Schedule
schedule} -> Maybe Schedule
schedule) (\s :: CampaignResponse
s@CampaignResponse' {} Maybe Schedule
a -> CampaignResponse
s {$sel:schedule:CampaignResponse' :: Maybe Schedule
schedule = Maybe Schedule
a} :: CampaignResponse)
campaignResponse_templateConfiguration :: Lens.Lens' CampaignResponse (Prelude.Maybe TemplateConfiguration)
campaignResponse_templateConfiguration :: (Maybe TemplateConfiguration -> f (Maybe TemplateConfiguration))
-> CampaignResponse -> f CampaignResponse
campaignResponse_templateConfiguration = (CampaignResponse -> Maybe TemplateConfiguration)
-> (CampaignResponse
-> Maybe TemplateConfiguration -> CampaignResponse)
-> Lens
CampaignResponse
CampaignResponse
(Maybe TemplateConfiguration)
(Maybe TemplateConfiguration)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CampaignResponse' {Maybe TemplateConfiguration
templateConfiguration :: Maybe TemplateConfiguration
$sel:templateConfiguration:CampaignResponse' :: CampaignResponse -> Maybe TemplateConfiguration
templateConfiguration} -> Maybe TemplateConfiguration
templateConfiguration) (\s :: CampaignResponse
s@CampaignResponse' {} Maybe TemplateConfiguration
a -> CampaignResponse
s {$sel:templateConfiguration:CampaignResponse' :: Maybe TemplateConfiguration
templateConfiguration = Maybe TemplateConfiguration
a} :: CampaignResponse)
campaignResponse_hook :: Lens.Lens' CampaignResponse (Prelude.Maybe CampaignHook)
campaignResponse_hook :: (Maybe CampaignHook -> f (Maybe CampaignHook))
-> CampaignResponse -> f CampaignResponse
campaignResponse_hook = (CampaignResponse -> Maybe CampaignHook)
-> (CampaignResponse -> Maybe CampaignHook -> CampaignResponse)
-> Lens
CampaignResponse
CampaignResponse
(Maybe CampaignHook)
(Maybe CampaignHook)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CampaignResponse' {Maybe CampaignHook
hook :: Maybe CampaignHook
$sel:hook:CampaignResponse' :: CampaignResponse -> Maybe CampaignHook
hook} -> Maybe CampaignHook
hook) (\s :: CampaignResponse
s@CampaignResponse' {} Maybe CampaignHook
a -> CampaignResponse
s {$sel:hook:CampaignResponse' :: Maybe CampaignHook
hook = Maybe CampaignHook
a} :: CampaignResponse)
campaignResponse_treatmentName :: Lens.Lens' CampaignResponse (Prelude.Maybe Prelude.Text)
campaignResponse_treatmentName :: (Maybe Text -> f (Maybe Text))
-> CampaignResponse -> f CampaignResponse
campaignResponse_treatmentName = (CampaignResponse -> Maybe Text)
-> (CampaignResponse -> Maybe Text -> CampaignResponse)
-> Lens CampaignResponse CampaignResponse (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CampaignResponse' {Maybe Text
treatmentName :: Maybe Text
$sel:treatmentName:CampaignResponse' :: CampaignResponse -> Maybe Text
treatmentName} -> Maybe Text
treatmentName) (\s :: CampaignResponse
s@CampaignResponse' {} Maybe Text
a -> CampaignResponse
s {$sel:treatmentName:CampaignResponse' :: Maybe Text
treatmentName = Maybe Text
a} :: CampaignResponse)
campaignResponse_limits :: Lens.Lens' CampaignResponse (Prelude.Maybe CampaignLimits)
campaignResponse_limits :: (Maybe CampaignLimits -> f (Maybe CampaignLimits))
-> CampaignResponse -> f CampaignResponse
campaignResponse_limits = (CampaignResponse -> Maybe CampaignLimits)
-> (CampaignResponse -> Maybe CampaignLimits -> CampaignResponse)
-> Lens
CampaignResponse
CampaignResponse
(Maybe CampaignLimits)
(Maybe CampaignLimits)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CampaignResponse' {Maybe CampaignLimits
limits :: Maybe CampaignLimits
$sel:limits:CampaignResponse' :: CampaignResponse -> Maybe CampaignLimits
limits} -> Maybe CampaignLimits
limits) (\s :: CampaignResponse
s@CampaignResponse' {} Maybe CampaignLimits
a -> CampaignResponse
s {$sel:limits:CampaignResponse' :: Maybe CampaignLimits
limits = Maybe CampaignLimits
a} :: CampaignResponse)
campaignResponse_isPaused :: Lens.Lens' CampaignResponse (Prelude.Maybe Prelude.Bool)
campaignResponse_isPaused :: (Maybe Bool -> f (Maybe Bool))
-> CampaignResponse -> f CampaignResponse
campaignResponse_isPaused = (CampaignResponse -> Maybe Bool)
-> (CampaignResponse -> Maybe Bool -> CampaignResponse)
-> Lens CampaignResponse CampaignResponse (Maybe Bool) (Maybe Bool)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CampaignResponse' {Maybe Bool
isPaused :: Maybe Bool
$sel:isPaused:CampaignResponse' :: CampaignResponse -> Maybe Bool
isPaused} -> Maybe Bool
isPaused) (\s :: CampaignResponse
s@CampaignResponse' {} Maybe Bool
a -> CampaignResponse
s {$sel:isPaused:CampaignResponse' :: Maybe Bool
isPaused = Maybe Bool
a} :: CampaignResponse)
campaignResponse_defaultState :: Lens.Lens' CampaignResponse (Prelude.Maybe CampaignState)
campaignResponse_defaultState :: (Maybe CampaignState -> f (Maybe CampaignState))
-> CampaignResponse -> f CampaignResponse
campaignResponse_defaultState = (CampaignResponse -> Maybe CampaignState)
-> (CampaignResponse -> Maybe CampaignState -> CampaignResponse)
-> Lens
CampaignResponse
CampaignResponse
(Maybe CampaignState)
(Maybe CampaignState)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CampaignResponse' {Maybe CampaignState
defaultState :: Maybe CampaignState
$sel:defaultState:CampaignResponse' :: CampaignResponse -> Maybe CampaignState
defaultState} -> Maybe CampaignState
defaultState) (\s :: CampaignResponse
s@CampaignResponse' {} Maybe CampaignState
a -> CampaignResponse
s {$sel:defaultState:CampaignResponse' :: Maybe CampaignState
defaultState = Maybe CampaignState
a} :: CampaignResponse)
campaignResponse_name :: Lens.Lens' CampaignResponse (Prelude.Maybe Prelude.Text)
campaignResponse_name :: (Maybe Text -> f (Maybe Text))
-> CampaignResponse -> f CampaignResponse
campaignResponse_name = (CampaignResponse -> Maybe Text)
-> (CampaignResponse -> Maybe Text -> CampaignResponse)
-> Lens CampaignResponse CampaignResponse (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CampaignResponse' {Maybe Text
name :: Maybe Text
$sel:name:CampaignResponse' :: CampaignResponse -> Maybe Text
name} -> Maybe Text
name) (\s :: CampaignResponse
s@CampaignResponse' {} Maybe Text
a -> CampaignResponse
s {$sel:name:CampaignResponse' :: Maybe Text
name = Maybe Text
a} :: CampaignResponse)
campaignResponse_version :: Lens.Lens' CampaignResponse (Prelude.Maybe Prelude.Int)
campaignResponse_version :: (Maybe Int -> f (Maybe Int))
-> CampaignResponse -> f CampaignResponse
campaignResponse_version = (CampaignResponse -> Maybe Int)
-> (CampaignResponse -> Maybe Int -> CampaignResponse)
-> Lens CampaignResponse CampaignResponse (Maybe Int) (Maybe Int)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CampaignResponse' {Maybe Int
version :: Maybe Int
$sel:version:CampaignResponse' :: CampaignResponse -> Maybe Int
version} -> Maybe Int
version) (\s :: CampaignResponse
s@CampaignResponse' {} Maybe Int
a -> CampaignResponse
s {$sel:version:CampaignResponse' :: Maybe Int
version = Maybe Int
a} :: CampaignResponse)
campaignResponse_holdoutPercent :: Lens.Lens' CampaignResponse (Prelude.Maybe Prelude.Int)
campaignResponse_holdoutPercent :: (Maybe Int -> f (Maybe Int))
-> CampaignResponse -> f CampaignResponse
campaignResponse_holdoutPercent = (CampaignResponse -> Maybe Int)
-> (CampaignResponse -> Maybe Int -> CampaignResponse)
-> Lens CampaignResponse CampaignResponse (Maybe Int) (Maybe Int)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CampaignResponse' {Maybe Int
holdoutPercent :: Maybe Int
$sel:holdoutPercent:CampaignResponse' :: CampaignResponse -> Maybe Int
holdoutPercent} -> Maybe Int
holdoutPercent) (\s :: CampaignResponse
s@CampaignResponse' {} Maybe Int
a -> CampaignResponse
s {$sel:holdoutPercent:CampaignResponse' :: Maybe Int
holdoutPercent = Maybe Int
a} :: CampaignResponse)
campaignResponse_treatmentDescription :: Lens.Lens' CampaignResponse (Prelude.Maybe Prelude.Text)
campaignResponse_treatmentDescription :: (Maybe Text -> f (Maybe Text))
-> CampaignResponse -> f CampaignResponse
campaignResponse_treatmentDescription = (CampaignResponse -> Maybe Text)
-> (CampaignResponse -> Maybe Text -> CampaignResponse)
-> Lens CampaignResponse CampaignResponse (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CampaignResponse' {Maybe Text
treatmentDescription :: Maybe Text
$sel:treatmentDescription:CampaignResponse' :: CampaignResponse -> Maybe Text
treatmentDescription} -> Maybe Text
treatmentDescription) (\s :: CampaignResponse
s@CampaignResponse' {} Maybe Text
a -> CampaignResponse
s {$sel:treatmentDescription:CampaignResponse' :: Maybe Text
treatmentDescription = Maybe Text
a} :: CampaignResponse)
campaignResponse_messageConfiguration :: Lens.Lens' CampaignResponse (Prelude.Maybe MessageConfiguration)
campaignResponse_messageConfiguration :: (Maybe MessageConfiguration -> f (Maybe MessageConfiguration))
-> CampaignResponse -> f CampaignResponse
campaignResponse_messageConfiguration = (CampaignResponse -> Maybe MessageConfiguration)
-> (CampaignResponse
-> Maybe MessageConfiguration -> CampaignResponse)
-> Lens
CampaignResponse
CampaignResponse
(Maybe MessageConfiguration)
(Maybe MessageConfiguration)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CampaignResponse' {Maybe MessageConfiguration
messageConfiguration :: Maybe MessageConfiguration
$sel:messageConfiguration:CampaignResponse' :: CampaignResponse -> Maybe MessageConfiguration
messageConfiguration} -> Maybe MessageConfiguration
messageConfiguration) (\s :: CampaignResponse
s@CampaignResponse' {} Maybe MessageConfiguration
a -> CampaignResponse
s {$sel:messageConfiguration:CampaignResponse' :: Maybe MessageConfiguration
messageConfiguration = Maybe MessageConfiguration
a} :: CampaignResponse)
campaignResponse_description :: Lens.Lens' CampaignResponse (Prelude.Maybe Prelude.Text)
campaignResponse_description :: (Maybe Text -> f (Maybe Text))
-> CampaignResponse -> f CampaignResponse
campaignResponse_description = (CampaignResponse -> Maybe Text)
-> (CampaignResponse -> Maybe Text -> CampaignResponse)
-> Lens CampaignResponse CampaignResponse (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CampaignResponse' {Maybe Text
description :: Maybe Text
$sel:description:CampaignResponse' :: CampaignResponse -> Maybe Text
description} -> Maybe Text
description) (\s :: CampaignResponse
s@CampaignResponse' {} Maybe Text
a -> CampaignResponse
s {$sel:description:CampaignResponse' :: Maybe Text
description = Maybe Text
a} :: CampaignResponse)
campaignResponse_additionalTreatments :: Lens.Lens' CampaignResponse (Prelude.Maybe [TreatmentResource])
campaignResponse_additionalTreatments :: (Maybe [TreatmentResource] -> f (Maybe [TreatmentResource]))
-> CampaignResponse -> f CampaignResponse
campaignResponse_additionalTreatments = (CampaignResponse -> Maybe [TreatmentResource])
-> (CampaignResponse
-> Maybe [TreatmentResource] -> CampaignResponse)
-> Lens
CampaignResponse
CampaignResponse
(Maybe [TreatmentResource])
(Maybe [TreatmentResource])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CampaignResponse' {Maybe [TreatmentResource]
additionalTreatments :: Maybe [TreatmentResource]
$sel:additionalTreatments:CampaignResponse' :: CampaignResponse -> Maybe [TreatmentResource]
additionalTreatments} -> Maybe [TreatmentResource]
additionalTreatments) (\s :: CampaignResponse
s@CampaignResponse' {} Maybe [TreatmentResource]
a -> CampaignResponse
s {$sel:additionalTreatments:CampaignResponse' :: Maybe [TreatmentResource]
additionalTreatments = Maybe [TreatmentResource]
a} :: CampaignResponse) ((Maybe [TreatmentResource] -> f (Maybe [TreatmentResource]))
-> CampaignResponse -> f CampaignResponse)
-> ((Maybe [TreatmentResource] -> f (Maybe [TreatmentResource]))
-> Maybe [TreatmentResource] -> f (Maybe [TreatmentResource]))
-> (Maybe [TreatmentResource] -> f (Maybe [TreatmentResource]))
-> CampaignResponse
-> f CampaignResponse
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso
[TreatmentResource]
[TreatmentResource]
[TreatmentResource]
[TreatmentResource]
-> Iso
(Maybe [TreatmentResource])
(Maybe [TreatmentResource])
(Maybe [TreatmentResource])
(Maybe [TreatmentResource])
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
[TreatmentResource]
[TreatmentResource]
[TreatmentResource]
[TreatmentResource]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced
campaignResponse_tags :: Lens.Lens' CampaignResponse (Prelude.Maybe (Prelude.HashMap Prelude.Text Prelude.Text))
campaignResponse_tags :: (Maybe (HashMap Text Text) -> f (Maybe (HashMap Text Text)))
-> CampaignResponse -> f CampaignResponse
campaignResponse_tags = (CampaignResponse -> Maybe (HashMap Text Text))
-> (CampaignResponse
-> Maybe (HashMap Text Text) -> CampaignResponse)
-> Lens
CampaignResponse
CampaignResponse
(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 (\CampaignResponse' {Maybe (HashMap Text Text)
tags :: Maybe (HashMap Text Text)
$sel:tags:CampaignResponse' :: CampaignResponse -> Maybe (HashMap Text Text)
tags} -> Maybe (HashMap Text Text)
tags) (\s :: CampaignResponse
s@CampaignResponse' {} Maybe (HashMap Text Text)
a -> CampaignResponse
s {$sel:tags:CampaignResponse' :: Maybe (HashMap Text Text)
tags = Maybe (HashMap Text Text)
a} :: CampaignResponse) ((Maybe (HashMap Text Text) -> f (Maybe (HashMap Text Text)))
-> CampaignResponse -> f CampaignResponse)
-> ((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)))
-> CampaignResponse
-> f CampaignResponse
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
campaignResponse_lastModifiedDate :: Lens.Lens' CampaignResponse Prelude.Text
campaignResponse_lastModifiedDate :: (Text -> f Text) -> CampaignResponse -> f CampaignResponse
campaignResponse_lastModifiedDate = (CampaignResponse -> Text)
-> (CampaignResponse -> Text -> CampaignResponse)
-> Lens CampaignResponse CampaignResponse Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CampaignResponse' {Text
lastModifiedDate :: Text
$sel:lastModifiedDate:CampaignResponse' :: CampaignResponse -> Text
lastModifiedDate} -> Text
lastModifiedDate) (\s :: CampaignResponse
s@CampaignResponse' {} Text
a -> CampaignResponse
s {$sel:lastModifiedDate:CampaignResponse' :: Text
lastModifiedDate = Text
a} :: CampaignResponse)
campaignResponse_creationDate :: Lens.Lens' CampaignResponse Prelude.Text
campaignResponse_creationDate :: (Text -> f Text) -> CampaignResponse -> f CampaignResponse
campaignResponse_creationDate = (CampaignResponse -> Text)
-> (CampaignResponse -> Text -> CampaignResponse)
-> Lens CampaignResponse CampaignResponse Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CampaignResponse' {Text
creationDate :: Text
$sel:creationDate:CampaignResponse' :: CampaignResponse -> Text
creationDate} -> Text
creationDate) (\s :: CampaignResponse
s@CampaignResponse' {} Text
a -> CampaignResponse
s {$sel:creationDate:CampaignResponse' :: Text
creationDate = Text
a} :: CampaignResponse)
campaignResponse_segmentId :: Lens.Lens' CampaignResponse Prelude.Text
campaignResponse_segmentId :: (Text -> f Text) -> CampaignResponse -> f CampaignResponse
campaignResponse_segmentId = (CampaignResponse -> Text)
-> (CampaignResponse -> Text -> CampaignResponse)
-> Lens CampaignResponse CampaignResponse Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CampaignResponse' {Text
segmentId :: Text
$sel:segmentId:CampaignResponse' :: CampaignResponse -> Text
segmentId} -> Text
segmentId) (\s :: CampaignResponse
s@CampaignResponse' {} Text
a -> CampaignResponse
s {$sel:segmentId:CampaignResponse' :: Text
segmentId = Text
a} :: CampaignResponse)
campaignResponse_segmentVersion :: Lens.Lens' CampaignResponse Prelude.Int
campaignResponse_segmentVersion :: (Int -> f Int) -> CampaignResponse -> f CampaignResponse
campaignResponse_segmentVersion = (CampaignResponse -> Int)
-> (CampaignResponse -> Int -> CampaignResponse)
-> Lens CampaignResponse CampaignResponse Int Int
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CampaignResponse' {Int
segmentVersion :: Int
$sel:segmentVersion:CampaignResponse' :: CampaignResponse -> Int
segmentVersion} -> Int
segmentVersion) (\s :: CampaignResponse
s@CampaignResponse' {} Int
a -> CampaignResponse
s {$sel:segmentVersion:CampaignResponse' :: Int
segmentVersion = Int
a} :: CampaignResponse)
campaignResponse_id :: Lens.Lens' CampaignResponse Prelude.Text
campaignResponse_id :: (Text -> f Text) -> CampaignResponse -> f CampaignResponse
campaignResponse_id = (CampaignResponse -> Text)
-> (CampaignResponse -> Text -> CampaignResponse)
-> Lens CampaignResponse CampaignResponse Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CampaignResponse' {Text
id :: Text
$sel:id:CampaignResponse' :: CampaignResponse -> Text
id} -> Text
id) (\s :: CampaignResponse
s@CampaignResponse' {} Text
a -> CampaignResponse
s {$sel:id:CampaignResponse' :: Text
id = Text
a} :: CampaignResponse)
campaignResponse_arn :: Lens.Lens' CampaignResponse Prelude.Text
campaignResponse_arn :: (Text -> f Text) -> CampaignResponse -> f CampaignResponse
campaignResponse_arn = (CampaignResponse -> Text)
-> (CampaignResponse -> Text -> CampaignResponse)
-> Lens CampaignResponse CampaignResponse Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CampaignResponse' {Text
arn :: Text
$sel:arn:CampaignResponse' :: CampaignResponse -> Text
arn} -> Text
arn) (\s :: CampaignResponse
s@CampaignResponse' {} Text
a -> CampaignResponse
s {$sel:arn:CampaignResponse' :: Text
arn = Text
a} :: CampaignResponse)
campaignResponse_applicationId :: Lens.Lens' CampaignResponse Prelude.Text
campaignResponse_applicationId :: (Text -> f Text) -> CampaignResponse -> f CampaignResponse
campaignResponse_applicationId = (CampaignResponse -> Text)
-> (CampaignResponse -> Text -> CampaignResponse)
-> Lens CampaignResponse CampaignResponse Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CampaignResponse' {Text
applicationId :: Text
$sel:applicationId:CampaignResponse' :: CampaignResponse -> Text
applicationId} -> Text
applicationId) (\s :: CampaignResponse
s@CampaignResponse' {} Text
a -> CampaignResponse
s {$sel:applicationId:CampaignResponse' :: Text
applicationId = Text
a} :: CampaignResponse)
instance Core.FromJSON CampaignResponse where
parseJSON :: Value -> Parser CampaignResponse
parseJSON =
String
-> (Object -> Parser CampaignResponse)
-> Value
-> Parser CampaignResponse
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Core.withObject
String
"CampaignResponse"
( \Object
x ->
Maybe CustomDeliveryConfiguration
-> Maybe CampaignState
-> Maybe Int
-> Maybe Schedule
-> Maybe TemplateConfiguration
-> Maybe CampaignHook
-> Maybe Text
-> Maybe CampaignLimits
-> Maybe Bool
-> Maybe CampaignState
-> Maybe Text
-> Maybe Int
-> Maybe Int
-> Maybe Text
-> Maybe MessageConfiguration
-> Maybe Text
-> Maybe [TreatmentResource]
-> Maybe (HashMap Text Text)
-> Text
-> Text
-> Text
-> Int
-> Text
-> Text
-> Text
-> CampaignResponse
CampaignResponse'
(Maybe CustomDeliveryConfiguration
-> Maybe CampaignState
-> Maybe Int
-> Maybe Schedule
-> Maybe TemplateConfiguration
-> Maybe CampaignHook
-> Maybe Text
-> Maybe CampaignLimits
-> Maybe Bool
-> Maybe CampaignState
-> Maybe Text
-> Maybe Int
-> Maybe Int
-> Maybe Text
-> Maybe MessageConfiguration
-> Maybe Text
-> Maybe [TreatmentResource]
-> Maybe (HashMap Text Text)
-> Text
-> Text
-> Text
-> Int
-> Text
-> Text
-> Text
-> CampaignResponse)
-> Parser (Maybe CustomDeliveryConfiguration)
-> Parser
(Maybe CampaignState
-> Maybe Int
-> Maybe Schedule
-> Maybe TemplateConfiguration
-> Maybe CampaignHook
-> Maybe Text
-> Maybe CampaignLimits
-> Maybe Bool
-> Maybe CampaignState
-> Maybe Text
-> Maybe Int
-> Maybe Int
-> Maybe Text
-> Maybe MessageConfiguration
-> Maybe Text
-> Maybe [TreatmentResource]
-> Maybe (HashMap Text Text)
-> Text
-> Text
-> Text
-> Int
-> Text
-> Text
-> Text
-> CampaignResponse)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x Object -> Text -> Parser (Maybe CustomDeliveryConfiguration)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"CustomDeliveryConfiguration")
Parser
(Maybe CampaignState
-> Maybe Int
-> Maybe Schedule
-> Maybe TemplateConfiguration
-> Maybe CampaignHook
-> Maybe Text
-> Maybe CampaignLimits
-> Maybe Bool
-> Maybe CampaignState
-> Maybe Text
-> Maybe Int
-> Maybe Int
-> Maybe Text
-> Maybe MessageConfiguration
-> Maybe Text
-> Maybe [TreatmentResource]
-> Maybe (HashMap Text Text)
-> Text
-> Text
-> Text
-> Int
-> Text
-> Text
-> Text
-> CampaignResponse)
-> Parser (Maybe CampaignState)
-> Parser
(Maybe Int
-> Maybe Schedule
-> Maybe TemplateConfiguration
-> Maybe CampaignHook
-> Maybe Text
-> Maybe CampaignLimits
-> Maybe Bool
-> Maybe CampaignState
-> Maybe Text
-> Maybe Int
-> Maybe Int
-> Maybe Text
-> Maybe MessageConfiguration
-> Maybe Text
-> Maybe [TreatmentResource]
-> Maybe (HashMap Text Text)
-> Text
-> Text
-> Text
-> Int
-> Text
-> Text
-> Text
-> CampaignResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe CampaignState)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"State")
Parser
(Maybe Int
-> Maybe Schedule
-> Maybe TemplateConfiguration
-> Maybe CampaignHook
-> Maybe Text
-> Maybe CampaignLimits
-> Maybe Bool
-> Maybe CampaignState
-> Maybe Text
-> Maybe Int
-> Maybe Int
-> Maybe Text
-> Maybe MessageConfiguration
-> Maybe Text
-> Maybe [TreatmentResource]
-> Maybe (HashMap Text Text)
-> Text
-> Text
-> Text
-> Int
-> Text
-> Text
-> Text
-> CampaignResponse)
-> Parser (Maybe Int)
-> Parser
(Maybe Schedule
-> Maybe TemplateConfiguration
-> Maybe CampaignHook
-> Maybe Text
-> Maybe CampaignLimits
-> Maybe Bool
-> Maybe CampaignState
-> Maybe Text
-> Maybe Int
-> Maybe Int
-> Maybe Text
-> Maybe MessageConfiguration
-> Maybe Text
-> Maybe [TreatmentResource]
-> Maybe (HashMap Text Text)
-> Text
-> Text
-> Text
-> Int
-> Text
-> Text
-> Text
-> CampaignResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Int)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"Priority")
Parser
(Maybe Schedule
-> Maybe TemplateConfiguration
-> Maybe CampaignHook
-> Maybe Text
-> Maybe CampaignLimits
-> Maybe Bool
-> Maybe CampaignState
-> Maybe Text
-> Maybe Int
-> Maybe Int
-> Maybe Text
-> Maybe MessageConfiguration
-> Maybe Text
-> Maybe [TreatmentResource]
-> Maybe (HashMap Text Text)
-> Text
-> Text
-> Text
-> Int
-> Text
-> Text
-> Text
-> CampaignResponse)
-> Parser (Maybe Schedule)
-> Parser
(Maybe TemplateConfiguration
-> Maybe CampaignHook
-> Maybe Text
-> Maybe CampaignLimits
-> Maybe Bool
-> Maybe CampaignState
-> Maybe Text
-> Maybe Int
-> Maybe Int
-> Maybe Text
-> Maybe MessageConfiguration
-> Maybe Text
-> Maybe [TreatmentResource]
-> Maybe (HashMap Text Text)
-> Text
-> Text
-> Text
-> Int
-> Text
-> Text
-> Text
-> CampaignResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Schedule)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"Schedule")
Parser
(Maybe TemplateConfiguration
-> Maybe CampaignHook
-> Maybe Text
-> Maybe CampaignLimits
-> Maybe Bool
-> Maybe CampaignState
-> Maybe Text
-> Maybe Int
-> Maybe Int
-> Maybe Text
-> Maybe MessageConfiguration
-> Maybe Text
-> Maybe [TreatmentResource]
-> Maybe (HashMap Text Text)
-> Text
-> Text
-> Text
-> Int
-> Text
-> Text
-> Text
-> CampaignResponse)
-> Parser (Maybe TemplateConfiguration)
-> Parser
(Maybe CampaignHook
-> Maybe Text
-> Maybe CampaignLimits
-> Maybe Bool
-> Maybe CampaignState
-> Maybe Text
-> Maybe Int
-> Maybe Int
-> Maybe Text
-> Maybe MessageConfiguration
-> Maybe Text
-> Maybe [TreatmentResource]
-> Maybe (HashMap Text Text)
-> Text
-> Text
-> Text
-> Int
-> Text
-> Text
-> Text
-> CampaignResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe TemplateConfiguration)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"TemplateConfiguration")
Parser
(Maybe CampaignHook
-> Maybe Text
-> Maybe CampaignLimits
-> Maybe Bool
-> Maybe CampaignState
-> Maybe Text
-> Maybe Int
-> Maybe Int
-> Maybe Text
-> Maybe MessageConfiguration
-> Maybe Text
-> Maybe [TreatmentResource]
-> Maybe (HashMap Text Text)
-> Text
-> Text
-> Text
-> Int
-> Text
-> Text
-> Text
-> CampaignResponse)
-> Parser (Maybe CampaignHook)
-> Parser
(Maybe Text
-> Maybe CampaignLimits
-> Maybe Bool
-> Maybe CampaignState
-> Maybe Text
-> Maybe Int
-> Maybe Int
-> Maybe Text
-> Maybe MessageConfiguration
-> Maybe Text
-> Maybe [TreatmentResource]
-> Maybe (HashMap Text Text)
-> Text
-> Text
-> Text
-> Int
-> Text
-> Text
-> Text
-> CampaignResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe CampaignHook)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"Hook")
Parser
(Maybe Text
-> Maybe CampaignLimits
-> Maybe Bool
-> Maybe CampaignState
-> Maybe Text
-> Maybe Int
-> Maybe Int
-> Maybe Text
-> Maybe MessageConfiguration
-> Maybe Text
-> Maybe [TreatmentResource]
-> Maybe (HashMap Text Text)
-> Text
-> Text
-> Text
-> Int
-> Text
-> Text
-> Text
-> CampaignResponse)
-> Parser (Maybe Text)
-> Parser
(Maybe CampaignLimits
-> Maybe Bool
-> Maybe CampaignState
-> Maybe Text
-> Maybe Int
-> Maybe Int
-> Maybe Text
-> Maybe MessageConfiguration
-> Maybe Text
-> Maybe [TreatmentResource]
-> Maybe (HashMap Text Text)
-> Text
-> Text
-> Text
-> Int
-> Text
-> Text
-> Text
-> CampaignResponse)
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
"TreatmentName")
Parser
(Maybe CampaignLimits
-> Maybe Bool
-> Maybe CampaignState
-> Maybe Text
-> Maybe Int
-> Maybe Int
-> Maybe Text
-> Maybe MessageConfiguration
-> Maybe Text
-> Maybe [TreatmentResource]
-> Maybe (HashMap Text Text)
-> Text
-> Text
-> Text
-> Int
-> Text
-> Text
-> Text
-> CampaignResponse)
-> Parser (Maybe CampaignLimits)
-> Parser
(Maybe Bool
-> Maybe CampaignState
-> Maybe Text
-> Maybe Int
-> Maybe Int
-> Maybe Text
-> Maybe MessageConfiguration
-> Maybe Text
-> Maybe [TreatmentResource]
-> Maybe (HashMap Text Text)
-> Text
-> Text
-> Text
-> Int
-> Text
-> Text
-> Text
-> CampaignResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe CampaignLimits)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"Limits")
Parser
(Maybe Bool
-> Maybe CampaignState
-> Maybe Text
-> Maybe Int
-> Maybe Int
-> Maybe Text
-> Maybe MessageConfiguration
-> Maybe Text
-> Maybe [TreatmentResource]
-> Maybe (HashMap Text Text)
-> Text
-> Text
-> Text
-> Int
-> Text
-> Text
-> Text
-> CampaignResponse)
-> Parser (Maybe Bool)
-> Parser
(Maybe CampaignState
-> Maybe Text
-> Maybe Int
-> Maybe Int
-> Maybe Text
-> Maybe MessageConfiguration
-> Maybe Text
-> Maybe [TreatmentResource]
-> Maybe (HashMap Text Text)
-> Text
-> Text
-> Text
-> Int
-> Text
-> Text
-> Text
-> CampaignResponse)
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
"IsPaused")
Parser
(Maybe CampaignState
-> Maybe Text
-> Maybe Int
-> Maybe Int
-> Maybe Text
-> Maybe MessageConfiguration
-> Maybe Text
-> Maybe [TreatmentResource]
-> Maybe (HashMap Text Text)
-> Text
-> Text
-> Text
-> Int
-> Text
-> Text
-> Text
-> CampaignResponse)
-> Parser (Maybe CampaignState)
-> Parser
(Maybe Text
-> Maybe Int
-> Maybe Int
-> Maybe Text
-> Maybe MessageConfiguration
-> Maybe Text
-> Maybe [TreatmentResource]
-> Maybe (HashMap Text Text)
-> Text
-> Text
-> Text
-> Int
-> Text
-> Text
-> Text
-> CampaignResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe CampaignState)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"DefaultState")
Parser
(Maybe Text
-> Maybe Int
-> Maybe Int
-> Maybe Text
-> Maybe MessageConfiguration
-> Maybe Text
-> Maybe [TreatmentResource]
-> Maybe (HashMap Text Text)
-> Text
-> Text
-> Text
-> Int
-> Text
-> Text
-> Text
-> CampaignResponse)
-> Parser (Maybe Text)
-> Parser
(Maybe Int
-> Maybe Int
-> Maybe Text
-> Maybe MessageConfiguration
-> Maybe Text
-> Maybe [TreatmentResource]
-> Maybe (HashMap Text Text)
-> Text
-> Text
-> Text
-> Int
-> Text
-> Text
-> Text
-> CampaignResponse)
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
"Name")
Parser
(Maybe Int
-> Maybe Int
-> Maybe Text
-> Maybe MessageConfiguration
-> Maybe Text
-> Maybe [TreatmentResource]
-> Maybe (HashMap Text Text)
-> Text
-> Text
-> Text
-> Int
-> Text
-> Text
-> Text
-> CampaignResponse)
-> Parser (Maybe Int)
-> Parser
(Maybe Int
-> Maybe Text
-> Maybe MessageConfiguration
-> Maybe Text
-> Maybe [TreatmentResource]
-> Maybe (HashMap Text Text)
-> Text
-> Text
-> Text
-> Int
-> Text
-> Text
-> Text
-> CampaignResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Int)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"Version")
Parser
(Maybe Int
-> Maybe Text
-> Maybe MessageConfiguration
-> Maybe Text
-> Maybe [TreatmentResource]
-> Maybe (HashMap Text Text)
-> Text
-> Text
-> Text
-> Int
-> Text
-> Text
-> Text
-> CampaignResponse)
-> Parser (Maybe Int)
-> Parser
(Maybe Text
-> Maybe MessageConfiguration
-> Maybe Text
-> Maybe [TreatmentResource]
-> Maybe (HashMap Text Text)
-> Text
-> Text
-> Text
-> Int
-> Text
-> Text
-> Text
-> CampaignResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Int)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"HoldoutPercent")
Parser
(Maybe Text
-> Maybe MessageConfiguration
-> Maybe Text
-> Maybe [TreatmentResource]
-> Maybe (HashMap Text Text)
-> Text
-> Text
-> Text
-> Int
-> Text
-> Text
-> Text
-> CampaignResponse)
-> Parser (Maybe Text)
-> Parser
(Maybe MessageConfiguration
-> Maybe Text
-> Maybe [TreatmentResource]
-> Maybe (HashMap Text Text)
-> Text
-> Text
-> Text
-> Int
-> Text
-> Text
-> Text
-> CampaignResponse)
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
"TreatmentDescription")
Parser
(Maybe MessageConfiguration
-> Maybe Text
-> Maybe [TreatmentResource]
-> Maybe (HashMap Text Text)
-> Text
-> Text
-> Text
-> Int
-> Text
-> Text
-> Text
-> CampaignResponse)
-> Parser (Maybe MessageConfiguration)
-> Parser
(Maybe Text
-> Maybe [TreatmentResource]
-> Maybe (HashMap Text Text)
-> Text
-> Text
-> Text
-> Int
-> Text
-> Text
-> Text
-> CampaignResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe MessageConfiguration)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"MessageConfiguration")
Parser
(Maybe Text
-> Maybe [TreatmentResource]
-> Maybe (HashMap Text Text)
-> Text
-> Text
-> Text
-> Int
-> Text
-> Text
-> Text
-> CampaignResponse)
-> Parser (Maybe Text)
-> Parser
(Maybe [TreatmentResource]
-> Maybe (HashMap Text Text)
-> Text
-> Text
-> Text
-> Int
-> Text
-> Text
-> Text
-> CampaignResponse)
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
"Description")
Parser
(Maybe [TreatmentResource]
-> Maybe (HashMap Text Text)
-> Text
-> Text
-> Text
-> Int
-> Text
-> Text
-> Text
-> CampaignResponse)
-> Parser (Maybe [TreatmentResource])
-> Parser
(Maybe (HashMap Text Text)
-> Text
-> Text
-> Text
-> Int
-> Text
-> Text
-> Text
-> CampaignResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> ( Object
x Object -> Text -> Parser (Maybe (Maybe [TreatmentResource]))
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"AdditionalTreatments"
Parser (Maybe (Maybe [TreatmentResource]))
-> Maybe [TreatmentResource] -> Parser (Maybe [TreatmentResource])
forall a. Parser (Maybe a) -> a -> Parser a
Core..!= Maybe [TreatmentResource]
forall a. Monoid a => a
Prelude.mempty
)
Parser
(Maybe (HashMap Text Text)
-> Text
-> Text
-> Text
-> Int
-> Text
-> Text
-> Text
-> CampaignResponse)
-> Parser (Maybe (HashMap Text Text))
-> Parser
(Text
-> Text -> Text -> Int -> Text -> Text -> Text -> CampaignResponse)
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 -> Int -> Text -> Text -> Text -> CampaignResponse)
-> Parser Text
-> Parser
(Text -> Text -> Int -> Text -> Text -> Text -> CampaignResponse)
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
"LastModifiedDate")
Parser
(Text -> Text -> Int -> Text -> Text -> Text -> CampaignResponse)
-> Parser Text
-> Parser (Text -> Int -> Text -> Text -> Text -> CampaignResponse)
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
"CreationDate")
Parser (Text -> Int -> Text -> Text -> Text -> CampaignResponse)
-> Parser Text
-> Parser (Int -> Text -> Text -> Text -> CampaignResponse)
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
"SegmentId")
Parser (Int -> Text -> Text -> Text -> CampaignResponse)
-> Parser Int -> Parser (Text -> Text -> Text -> CampaignResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser Int
forall a. FromJSON a => Object -> Text -> Parser a
Core..: Text
"SegmentVersion")
Parser (Text -> Text -> Text -> CampaignResponse)
-> Parser Text -> Parser (Text -> Text -> CampaignResponse)
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 -> Text -> CampaignResponse)
-> Parser Text -> Parser (Text -> CampaignResponse)
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
"Arn")
Parser (Text -> CampaignResponse)
-> Parser Text -> Parser CampaignResponse
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 CampaignResponse
instance Prelude.NFData CampaignResponse