{-# 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.ApplicationSettingsResource 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 ApplicationSettingsResource = ApplicationSettingsResource'
{
ApplicationSettingsResource -> Maybe Text
lastModifiedDate :: Prelude.Maybe Prelude.Text,
ApplicationSettingsResource -> Maybe CampaignLimits
limits :: Prelude.Maybe CampaignLimits,
ApplicationSettingsResource -> Maybe QuietTime
quietTime :: Prelude.Maybe QuietTime,
ApplicationSettingsResource -> Maybe CampaignHook
campaignHook :: Prelude.Maybe CampaignHook,
ApplicationSettingsResource -> Text
applicationId :: Prelude.Text
}
deriving (ApplicationSettingsResource -> ApplicationSettingsResource -> Bool
(ApplicationSettingsResource
-> ApplicationSettingsResource -> Bool)
-> (ApplicationSettingsResource
-> ApplicationSettingsResource -> Bool)
-> Eq ApplicationSettingsResource
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ApplicationSettingsResource -> ApplicationSettingsResource -> Bool
$c/= :: ApplicationSettingsResource -> ApplicationSettingsResource -> Bool
== :: ApplicationSettingsResource -> ApplicationSettingsResource -> Bool
$c== :: ApplicationSettingsResource -> ApplicationSettingsResource -> Bool
Prelude.Eq, ReadPrec [ApplicationSettingsResource]
ReadPrec ApplicationSettingsResource
Int -> ReadS ApplicationSettingsResource
ReadS [ApplicationSettingsResource]
(Int -> ReadS ApplicationSettingsResource)
-> ReadS [ApplicationSettingsResource]
-> ReadPrec ApplicationSettingsResource
-> ReadPrec [ApplicationSettingsResource]
-> Read ApplicationSettingsResource
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [ApplicationSettingsResource]
$creadListPrec :: ReadPrec [ApplicationSettingsResource]
readPrec :: ReadPrec ApplicationSettingsResource
$creadPrec :: ReadPrec ApplicationSettingsResource
readList :: ReadS [ApplicationSettingsResource]
$creadList :: ReadS [ApplicationSettingsResource]
readsPrec :: Int -> ReadS ApplicationSettingsResource
$creadsPrec :: Int -> ReadS ApplicationSettingsResource
Prelude.Read, Int -> ApplicationSettingsResource -> ShowS
[ApplicationSettingsResource] -> ShowS
ApplicationSettingsResource -> String
(Int -> ApplicationSettingsResource -> ShowS)
-> (ApplicationSettingsResource -> String)
-> ([ApplicationSettingsResource] -> ShowS)
-> Show ApplicationSettingsResource
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [ApplicationSettingsResource] -> ShowS
$cshowList :: [ApplicationSettingsResource] -> ShowS
show :: ApplicationSettingsResource -> String
$cshow :: ApplicationSettingsResource -> String
showsPrec :: Int -> ApplicationSettingsResource -> ShowS
$cshowsPrec :: Int -> ApplicationSettingsResource -> ShowS
Prelude.Show, (forall x.
ApplicationSettingsResource -> Rep ApplicationSettingsResource x)
-> (forall x.
Rep ApplicationSettingsResource x -> ApplicationSettingsResource)
-> Generic ApplicationSettingsResource
forall x.
Rep ApplicationSettingsResource x -> ApplicationSettingsResource
forall x.
ApplicationSettingsResource -> Rep ApplicationSettingsResource x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep ApplicationSettingsResource x -> ApplicationSettingsResource
$cfrom :: forall x.
ApplicationSettingsResource -> Rep ApplicationSettingsResource x
Prelude.Generic)
newApplicationSettingsResource ::
Prelude.Text ->
ApplicationSettingsResource
newApplicationSettingsResource :: Text -> ApplicationSettingsResource
newApplicationSettingsResource Text
pApplicationId_ =
ApplicationSettingsResource' :: Maybe Text
-> Maybe CampaignLimits
-> Maybe QuietTime
-> Maybe CampaignHook
-> Text
-> ApplicationSettingsResource
ApplicationSettingsResource'
{ $sel:lastModifiedDate:ApplicationSettingsResource' :: Maybe Text
lastModifiedDate =
Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:limits:ApplicationSettingsResource' :: Maybe CampaignLimits
limits = Maybe CampaignLimits
forall a. Maybe a
Prelude.Nothing,
$sel:quietTime:ApplicationSettingsResource' :: Maybe QuietTime
quietTime = Maybe QuietTime
forall a. Maybe a
Prelude.Nothing,
$sel:campaignHook:ApplicationSettingsResource' :: Maybe CampaignHook
campaignHook = Maybe CampaignHook
forall a. Maybe a
Prelude.Nothing,
$sel:applicationId:ApplicationSettingsResource' :: Text
applicationId = Text
pApplicationId_
}
applicationSettingsResource_lastModifiedDate :: Lens.Lens' ApplicationSettingsResource (Prelude.Maybe Prelude.Text)
applicationSettingsResource_lastModifiedDate :: (Maybe Text -> f (Maybe Text))
-> ApplicationSettingsResource -> f ApplicationSettingsResource
applicationSettingsResource_lastModifiedDate = (ApplicationSettingsResource -> Maybe Text)
-> (ApplicationSettingsResource
-> Maybe Text -> ApplicationSettingsResource)
-> Lens
ApplicationSettingsResource
ApplicationSettingsResource
(Maybe Text)
(Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ApplicationSettingsResource' {Maybe Text
lastModifiedDate :: Maybe Text
$sel:lastModifiedDate:ApplicationSettingsResource' :: ApplicationSettingsResource -> Maybe Text
lastModifiedDate} -> Maybe Text
lastModifiedDate) (\s :: ApplicationSettingsResource
s@ApplicationSettingsResource' {} Maybe Text
a -> ApplicationSettingsResource
s {$sel:lastModifiedDate:ApplicationSettingsResource' :: Maybe Text
lastModifiedDate = Maybe Text
a} :: ApplicationSettingsResource)
applicationSettingsResource_limits :: Lens.Lens' ApplicationSettingsResource (Prelude.Maybe CampaignLimits)
applicationSettingsResource_limits :: (Maybe CampaignLimits -> f (Maybe CampaignLimits))
-> ApplicationSettingsResource -> f ApplicationSettingsResource
applicationSettingsResource_limits = (ApplicationSettingsResource -> Maybe CampaignLimits)
-> (ApplicationSettingsResource
-> Maybe CampaignLimits -> ApplicationSettingsResource)
-> Lens
ApplicationSettingsResource
ApplicationSettingsResource
(Maybe CampaignLimits)
(Maybe CampaignLimits)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ApplicationSettingsResource' {Maybe CampaignLimits
limits :: Maybe CampaignLimits
$sel:limits:ApplicationSettingsResource' :: ApplicationSettingsResource -> Maybe CampaignLimits
limits} -> Maybe CampaignLimits
limits) (\s :: ApplicationSettingsResource
s@ApplicationSettingsResource' {} Maybe CampaignLimits
a -> ApplicationSettingsResource
s {$sel:limits:ApplicationSettingsResource' :: Maybe CampaignLimits
limits = Maybe CampaignLimits
a} :: ApplicationSettingsResource)
applicationSettingsResource_quietTime :: Lens.Lens' ApplicationSettingsResource (Prelude.Maybe QuietTime)
applicationSettingsResource_quietTime :: (Maybe QuietTime -> f (Maybe QuietTime))
-> ApplicationSettingsResource -> f ApplicationSettingsResource
applicationSettingsResource_quietTime = (ApplicationSettingsResource -> Maybe QuietTime)
-> (ApplicationSettingsResource
-> Maybe QuietTime -> ApplicationSettingsResource)
-> Lens
ApplicationSettingsResource
ApplicationSettingsResource
(Maybe QuietTime)
(Maybe QuietTime)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ApplicationSettingsResource' {Maybe QuietTime
quietTime :: Maybe QuietTime
$sel:quietTime:ApplicationSettingsResource' :: ApplicationSettingsResource -> Maybe QuietTime
quietTime} -> Maybe QuietTime
quietTime) (\s :: ApplicationSettingsResource
s@ApplicationSettingsResource' {} Maybe QuietTime
a -> ApplicationSettingsResource
s {$sel:quietTime:ApplicationSettingsResource' :: Maybe QuietTime
quietTime = Maybe QuietTime
a} :: ApplicationSettingsResource)
applicationSettingsResource_campaignHook :: Lens.Lens' ApplicationSettingsResource (Prelude.Maybe CampaignHook)
applicationSettingsResource_campaignHook :: (Maybe CampaignHook -> f (Maybe CampaignHook))
-> ApplicationSettingsResource -> f ApplicationSettingsResource
applicationSettingsResource_campaignHook = (ApplicationSettingsResource -> Maybe CampaignHook)
-> (ApplicationSettingsResource
-> Maybe CampaignHook -> ApplicationSettingsResource)
-> Lens
ApplicationSettingsResource
ApplicationSettingsResource
(Maybe CampaignHook)
(Maybe CampaignHook)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ApplicationSettingsResource' {Maybe CampaignHook
campaignHook :: Maybe CampaignHook
$sel:campaignHook:ApplicationSettingsResource' :: ApplicationSettingsResource -> Maybe CampaignHook
campaignHook} -> Maybe CampaignHook
campaignHook) (\s :: ApplicationSettingsResource
s@ApplicationSettingsResource' {} Maybe CampaignHook
a -> ApplicationSettingsResource
s {$sel:campaignHook:ApplicationSettingsResource' :: Maybe CampaignHook
campaignHook = Maybe CampaignHook
a} :: ApplicationSettingsResource)
applicationSettingsResource_applicationId :: Lens.Lens' ApplicationSettingsResource Prelude.Text
applicationSettingsResource_applicationId :: (Text -> f Text)
-> ApplicationSettingsResource -> f ApplicationSettingsResource
applicationSettingsResource_applicationId = (ApplicationSettingsResource -> Text)
-> (ApplicationSettingsResource
-> Text -> ApplicationSettingsResource)
-> Lens
ApplicationSettingsResource ApplicationSettingsResource Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ApplicationSettingsResource' {Text
applicationId :: Text
$sel:applicationId:ApplicationSettingsResource' :: ApplicationSettingsResource -> Text
applicationId} -> Text
applicationId) (\s :: ApplicationSettingsResource
s@ApplicationSettingsResource' {} Text
a -> ApplicationSettingsResource
s {$sel:applicationId:ApplicationSettingsResource' :: Text
applicationId = Text
a} :: ApplicationSettingsResource)
instance Core.FromJSON ApplicationSettingsResource where
parseJSON :: Value -> Parser ApplicationSettingsResource
parseJSON =
String
-> (Object -> Parser ApplicationSettingsResource)
-> Value
-> Parser ApplicationSettingsResource
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Core.withObject
String
"ApplicationSettingsResource"
( \Object
x ->
Maybe Text
-> Maybe CampaignLimits
-> Maybe QuietTime
-> Maybe CampaignHook
-> Text
-> ApplicationSettingsResource
ApplicationSettingsResource'
(Maybe Text
-> Maybe CampaignLimits
-> Maybe QuietTime
-> Maybe CampaignHook
-> Text
-> ApplicationSettingsResource)
-> Parser (Maybe Text)
-> Parser
(Maybe CampaignLimits
-> Maybe QuietTime
-> Maybe CampaignHook
-> Text
-> ApplicationSettingsResource)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x Object -> Text -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"LastModifiedDate")
Parser
(Maybe CampaignLimits
-> Maybe QuietTime
-> Maybe CampaignHook
-> Text
-> ApplicationSettingsResource)
-> Parser (Maybe CampaignLimits)
-> Parser
(Maybe QuietTime
-> Maybe CampaignHook -> Text -> ApplicationSettingsResource)
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 QuietTime
-> Maybe CampaignHook -> Text -> ApplicationSettingsResource)
-> Parser (Maybe QuietTime)
-> Parser
(Maybe CampaignHook -> Text -> ApplicationSettingsResource)
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 CampaignHook -> Text -> ApplicationSettingsResource)
-> Parser (Maybe CampaignHook)
-> Parser (Text -> ApplicationSettingsResource)
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
"CampaignHook")
Parser (Text -> ApplicationSettingsResource)
-> Parser Text -> Parser ApplicationSettingsResource
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 ApplicationSettingsResource
instance Prelude.NFData ApplicationSettingsResource