{-# 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.WriteApplicationSettingsRequest 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.QuietTime
import qualified Amazonka.Prelude as Prelude
data WriteApplicationSettingsRequest = WriteApplicationSettingsRequest'
{ WriteApplicationSettingsRequest -> Maybe Bool
eventTaggingEnabled :: Prelude.Maybe Prelude.Bool,
WriteApplicationSettingsRequest -> Maybe Bool
cloudWatchMetricsEnabled :: Prelude.Maybe Prelude.Bool,
WriteApplicationSettingsRequest -> Maybe CampaignLimits
limits :: Prelude.Maybe CampaignLimits,
WriteApplicationSettingsRequest -> Maybe QuietTime
quietTime :: Prelude.Maybe QuietTime,
WriteApplicationSettingsRequest -> Maybe CampaignHook
campaignHook :: Prelude.Maybe CampaignHook
}
deriving (WriteApplicationSettingsRequest
-> WriteApplicationSettingsRequest -> Bool
(WriteApplicationSettingsRequest
-> WriteApplicationSettingsRequest -> Bool)
-> (WriteApplicationSettingsRequest
-> WriteApplicationSettingsRequest -> Bool)
-> Eq WriteApplicationSettingsRequest
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: WriteApplicationSettingsRequest
-> WriteApplicationSettingsRequest -> Bool
$c/= :: WriteApplicationSettingsRequest
-> WriteApplicationSettingsRequest -> Bool
== :: WriteApplicationSettingsRequest
-> WriteApplicationSettingsRequest -> Bool
$c== :: WriteApplicationSettingsRequest
-> WriteApplicationSettingsRequest -> Bool
Prelude.Eq, ReadPrec [WriteApplicationSettingsRequest]
ReadPrec WriteApplicationSettingsRequest
Int -> ReadS WriteApplicationSettingsRequest
ReadS [WriteApplicationSettingsRequest]
(Int -> ReadS WriteApplicationSettingsRequest)
-> ReadS [WriteApplicationSettingsRequest]
-> ReadPrec WriteApplicationSettingsRequest
-> ReadPrec [WriteApplicationSettingsRequest]
-> Read WriteApplicationSettingsRequest
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [WriteApplicationSettingsRequest]
$creadListPrec :: ReadPrec [WriteApplicationSettingsRequest]
readPrec :: ReadPrec WriteApplicationSettingsRequest
$creadPrec :: ReadPrec WriteApplicationSettingsRequest
readList :: ReadS [WriteApplicationSettingsRequest]
$creadList :: ReadS [WriteApplicationSettingsRequest]
readsPrec :: Int -> ReadS WriteApplicationSettingsRequest
$creadsPrec :: Int -> ReadS WriteApplicationSettingsRequest
Prelude.Read, Int -> WriteApplicationSettingsRequest -> ShowS
[WriteApplicationSettingsRequest] -> ShowS
WriteApplicationSettingsRequest -> String
(Int -> WriteApplicationSettingsRequest -> ShowS)
-> (WriteApplicationSettingsRequest -> String)
-> ([WriteApplicationSettingsRequest] -> ShowS)
-> Show WriteApplicationSettingsRequest
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [WriteApplicationSettingsRequest] -> ShowS
$cshowList :: [WriteApplicationSettingsRequest] -> ShowS
show :: WriteApplicationSettingsRequest -> String
$cshow :: WriteApplicationSettingsRequest -> String
showsPrec :: Int -> WriteApplicationSettingsRequest -> ShowS
$cshowsPrec :: Int -> WriteApplicationSettingsRequest -> ShowS
Prelude.Show, (forall x.
WriteApplicationSettingsRequest
-> Rep WriteApplicationSettingsRequest x)
-> (forall x.
Rep WriteApplicationSettingsRequest x
-> WriteApplicationSettingsRequest)
-> Generic WriteApplicationSettingsRequest
forall x.
Rep WriteApplicationSettingsRequest x
-> WriteApplicationSettingsRequest
forall x.
WriteApplicationSettingsRequest
-> Rep WriteApplicationSettingsRequest x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep WriteApplicationSettingsRequest x
-> WriteApplicationSettingsRequest
$cfrom :: forall x.
WriteApplicationSettingsRequest
-> Rep WriteApplicationSettingsRequest x
Prelude.Generic)
newWriteApplicationSettingsRequest ::
WriteApplicationSettingsRequest
newWriteApplicationSettingsRequest :: WriteApplicationSettingsRequest
newWriteApplicationSettingsRequest =
WriteApplicationSettingsRequest' :: Maybe Bool
-> Maybe Bool
-> Maybe CampaignLimits
-> Maybe QuietTime
-> Maybe CampaignHook
-> WriteApplicationSettingsRequest
WriteApplicationSettingsRequest'
{ $sel:eventTaggingEnabled:WriteApplicationSettingsRequest' :: Maybe Bool
eventTaggingEnabled =
Maybe Bool
forall a. Maybe a
Prelude.Nothing,
$sel:cloudWatchMetricsEnabled:WriteApplicationSettingsRequest' :: Maybe Bool
cloudWatchMetricsEnabled = Maybe Bool
forall a. Maybe a
Prelude.Nothing,
$sel:limits:WriteApplicationSettingsRequest' :: Maybe CampaignLimits
limits = Maybe CampaignLimits
forall a. Maybe a
Prelude.Nothing,
$sel:quietTime:WriteApplicationSettingsRequest' :: Maybe QuietTime
quietTime = Maybe QuietTime
forall a. Maybe a
Prelude.Nothing,
$sel:campaignHook:WriteApplicationSettingsRequest' :: Maybe CampaignHook
campaignHook = Maybe CampaignHook
forall a. Maybe a
Prelude.Nothing
}
writeApplicationSettingsRequest_eventTaggingEnabled :: Lens.Lens' WriteApplicationSettingsRequest (Prelude.Maybe Prelude.Bool)
writeApplicationSettingsRequest_eventTaggingEnabled :: (Maybe Bool -> f (Maybe Bool))
-> WriteApplicationSettingsRequest
-> f WriteApplicationSettingsRequest
writeApplicationSettingsRequest_eventTaggingEnabled = (WriteApplicationSettingsRequest -> Maybe Bool)
-> (WriteApplicationSettingsRequest
-> Maybe Bool -> WriteApplicationSettingsRequest)
-> Lens
WriteApplicationSettingsRequest
WriteApplicationSettingsRequest
(Maybe Bool)
(Maybe Bool)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\WriteApplicationSettingsRequest' {Maybe Bool
eventTaggingEnabled :: Maybe Bool
$sel:eventTaggingEnabled:WriteApplicationSettingsRequest' :: WriteApplicationSettingsRequest -> Maybe Bool
eventTaggingEnabled} -> Maybe Bool
eventTaggingEnabled) (\s :: WriteApplicationSettingsRequest
s@WriteApplicationSettingsRequest' {} Maybe Bool
a -> WriteApplicationSettingsRequest
s {$sel:eventTaggingEnabled:WriteApplicationSettingsRequest' :: Maybe Bool
eventTaggingEnabled = Maybe Bool
a} :: WriteApplicationSettingsRequest)
writeApplicationSettingsRequest_cloudWatchMetricsEnabled :: Lens.Lens' WriteApplicationSettingsRequest (Prelude.Maybe Prelude.Bool)
writeApplicationSettingsRequest_cloudWatchMetricsEnabled :: (Maybe Bool -> f (Maybe Bool))
-> WriteApplicationSettingsRequest
-> f WriteApplicationSettingsRequest
writeApplicationSettingsRequest_cloudWatchMetricsEnabled = (WriteApplicationSettingsRequest -> Maybe Bool)
-> (WriteApplicationSettingsRequest
-> Maybe Bool -> WriteApplicationSettingsRequest)
-> Lens
WriteApplicationSettingsRequest
WriteApplicationSettingsRequest
(Maybe Bool)
(Maybe Bool)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\WriteApplicationSettingsRequest' {Maybe Bool
cloudWatchMetricsEnabled :: Maybe Bool
$sel:cloudWatchMetricsEnabled:WriteApplicationSettingsRequest' :: WriteApplicationSettingsRequest -> Maybe Bool
cloudWatchMetricsEnabled} -> Maybe Bool
cloudWatchMetricsEnabled) (\s :: WriteApplicationSettingsRequest
s@WriteApplicationSettingsRequest' {} Maybe Bool
a -> WriteApplicationSettingsRequest
s {$sel:cloudWatchMetricsEnabled:WriteApplicationSettingsRequest' :: Maybe Bool
cloudWatchMetricsEnabled = Maybe Bool
a} :: WriteApplicationSettingsRequest)
writeApplicationSettingsRequest_limits :: Lens.Lens' WriteApplicationSettingsRequest (Prelude.Maybe CampaignLimits)
writeApplicationSettingsRequest_limits :: (Maybe CampaignLimits -> f (Maybe CampaignLimits))
-> WriteApplicationSettingsRequest
-> f WriteApplicationSettingsRequest
writeApplicationSettingsRequest_limits = (WriteApplicationSettingsRequest -> Maybe CampaignLimits)
-> (WriteApplicationSettingsRequest
-> Maybe CampaignLimits -> WriteApplicationSettingsRequest)
-> Lens
WriteApplicationSettingsRequest
WriteApplicationSettingsRequest
(Maybe CampaignLimits)
(Maybe CampaignLimits)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\WriteApplicationSettingsRequest' {Maybe CampaignLimits
limits :: Maybe CampaignLimits
$sel:limits:WriteApplicationSettingsRequest' :: WriteApplicationSettingsRequest -> Maybe CampaignLimits
limits} -> Maybe CampaignLimits
limits) (\s :: WriteApplicationSettingsRequest
s@WriteApplicationSettingsRequest' {} Maybe CampaignLimits
a -> WriteApplicationSettingsRequest
s {$sel:limits:WriteApplicationSettingsRequest' :: Maybe CampaignLimits
limits = Maybe CampaignLimits
a} :: WriteApplicationSettingsRequest)
writeApplicationSettingsRequest_quietTime :: Lens.Lens' WriteApplicationSettingsRequest (Prelude.Maybe QuietTime)
writeApplicationSettingsRequest_quietTime :: (Maybe QuietTime -> f (Maybe QuietTime))
-> WriteApplicationSettingsRequest
-> f WriteApplicationSettingsRequest
writeApplicationSettingsRequest_quietTime = (WriteApplicationSettingsRequest -> Maybe QuietTime)
-> (WriteApplicationSettingsRequest
-> Maybe QuietTime -> WriteApplicationSettingsRequest)
-> Lens
WriteApplicationSettingsRequest
WriteApplicationSettingsRequest
(Maybe QuietTime)
(Maybe QuietTime)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\WriteApplicationSettingsRequest' {Maybe QuietTime
quietTime :: Maybe QuietTime
$sel:quietTime:WriteApplicationSettingsRequest' :: WriteApplicationSettingsRequest -> Maybe QuietTime
quietTime} -> Maybe QuietTime
quietTime) (\s :: WriteApplicationSettingsRequest
s@WriteApplicationSettingsRequest' {} Maybe QuietTime
a -> WriteApplicationSettingsRequest
s {$sel:quietTime:WriteApplicationSettingsRequest' :: Maybe QuietTime
quietTime = Maybe QuietTime
a} :: WriteApplicationSettingsRequest)
writeApplicationSettingsRequest_campaignHook :: Lens.Lens' WriteApplicationSettingsRequest (Prelude.Maybe CampaignHook)
writeApplicationSettingsRequest_campaignHook :: (Maybe CampaignHook -> f (Maybe CampaignHook))
-> WriteApplicationSettingsRequest
-> f WriteApplicationSettingsRequest
writeApplicationSettingsRequest_campaignHook = (WriteApplicationSettingsRequest -> Maybe CampaignHook)
-> (WriteApplicationSettingsRequest
-> Maybe CampaignHook -> WriteApplicationSettingsRequest)
-> Lens
WriteApplicationSettingsRequest
WriteApplicationSettingsRequest
(Maybe CampaignHook)
(Maybe CampaignHook)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\WriteApplicationSettingsRequest' {Maybe CampaignHook
campaignHook :: Maybe CampaignHook
$sel:campaignHook:WriteApplicationSettingsRequest' :: WriteApplicationSettingsRequest -> Maybe CampaignHook
campaignHook} -> Maybe CampaignHook
campaignHook) (\s :: WriteApplicationSettingsRequest
s@WriteApplicationSettingsRequest' {} Maybe CampaignHook
a -> WriteApplicationSettingsRequest
s {$sel:campaignHook:WriteApplicationSettingsRequest' :: Maybe CampaignHook
campaignHook = Maybe CampaignHook
a} :: WriteApplicationSettingsRequest)
instance
Prelude.Hashable
WriteApplicationSettingsRequest
instance
Prelude.NFData
WriteApplicationSettingsRequest
instance Core.ToJSON WriteApplicationSettingsRequest where
toJSON :: WriteApplicationSettingsRequest -> Value
toJSON WriteApplicationSettingsRequest' {Maybe Bool
Maybe CampaignLimits
Maybe CampaignHook
Maybe QuietTime
campaignHook :: Maybe CampaignHook
quietTime :: Maybe QuietTime
limits :: Maybe CampaignLimits
cloudWatchMetricsEnabled :: Maybe Bool
eventTaggingEnabled :: Maybe Bool
$sel:campaignHook:WriteApplicationSettingsRequest' :: WriteApplicationSettingsRequest -> Maybe CampaignHook
$sel:quietTime:WriteApplicationSettingsRequest' :: WriteApplicationSettingsRequest -> Maybe QuietTime
$sel:limits:WriteApplicationSettingsRequest' :: WriteApplicationSettingsRequest -> Maybe CampaignLimits
$sel:cloudWatchMetricsEnabled:WriteApplicationSettingsRequest' :: WriteApplicationSettingsRequest -> Maybe Bool
$sel:eventTaggingEnabled:WriteApplicationSettingsRequest' :: WriteApplicationSettingsRequest -> Maybe Bool
..} =
[Pair] -> Value
Core.object
( [Maybe Pair] -> [Pair]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
[ (Text
"EventTaggingEnabled" 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
eventTaggingEnabled,
(Text
"CloudWatchMetricsEnabled" 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
cloudWatchMetricsEnabled,
(Text
"Limits" Text -> CampaignLimits -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (CampaignLimits -> Pair) -> Maybe CampaignLimits -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe CampaignLimits
limits,
(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
"CampaignHook" Text -> CampaignHook -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (CampaignHook -> Pair) -> Maybe CampaignHook -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe CampaignHook
campaignHook
]
)