{-# 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.Core.Lens.Internal as Lens
import qualified Amazonka.Data as Data
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 CampaignHook
campaignHook :: Prelude.Maybe CampaignHook,
ApplicationSettingsResource -> Maybe Text
lastModifiedDate :: Prelude.Maybe Prelude.Text,
ApplicationSettingsResource -> Maybe CampaignLimits
limits :: Prelude.Maybe CampaignLimits,
ApplicationSettingsResource -> Maybe QuietTime
quietTime :: Prelude.Maybe QuietTime,
ApplicationSettingsResource -> Text
applicationId :: Prelude.Text
}
deriving (ApplicationSettingsResource -> ApplicationSettingsResource -> Bool
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]
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
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.
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'
{ $sel:campaignHook:ApplicationSettingsResource' :: Maybe CampaignHook
campaignHook =
forall a. Maybe a
Prelude.Nothing,
$sel:lastModifiedDate:ApplicationSettingsResource' :: Maybe Text
lastModifiedDate = forall a. Maybe a
Prelude.Nothing,
$sel:limits:ApplicationSettingsResource' :: Maybe CampaignLimits
limits = forall a. Maybe a
Prelude.Nothing,
$sel:quietTime:ApplicationSettingsResource' :: Maybe QuietTime
quietTime = forall a. Maybe a
Prelude.Nothing,
$sel:applicationId:ApplicationSettingsResource' :: Text
applicationId = Text
pApplicationId_
}
applicationSettingsResource_campaignHook :: Lens.Lens' ApplicationSettingsResource (Prelude.Maybe CampaignHook)
applicationSettingsResource_campaignHook :: Lens' ApplicationSettingsResource (Maybe CampaignHook)
applicationSettingsResource_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_lastModifiedDate :: Lens.Lens' ApplicationSettingsResource (Prelude.Maybe Prelude.Text)
applicationSettingsResource_lastModifiedDate :: Lens' ApplicationSettingsResource (Maybe Text)
applicationSettingsResource_lastModifiedDate = 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 :: Lens' ApplicationSettingsResource (Maybe CampaignLimits)
applicationSettingsResource_limits = 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 :: Lens' ApplicationSettingsResource (Maybe QuietTime)
applicationSettingsResource_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_applicationId :: Lens.Lens' ApplicationSettingsResource Prelude.Text
applicationSettingsResource_applicationId :: Lens' ApplicationSettingsResource Text
applicationSettingsResource_applicationId = 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 Data.FromJSON ApplicationSettingsResource where
parseJSON :: Value -> Parser ApplicationSettingsResource
parseJSON =
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Data.withObject
String
"ApplicationSettingsResource"
( \Object
x ->
Maybe CampaignHook
-> Maybe Text
-> Maybe CampaignLimits
-> Maybe QuietTime
-> Text
-> ApplicationSettingsResource
ApplicationSettingsResource'
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"CampaignHook")
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"LastModifiedDate")
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"Limits")
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"QuietTime")
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser a
Data..: Key
"ApplicationId")
)
instance Prelude.Hashable ApplicationSettingsResource where
hashWithSalt :: Int -> ApplicationSettingsResource -> Int
hashWithSalt Int
_salt ApplicationSettingsResource' {Maybe Text
Maybe CampaignLimits
Maybe CampaignHook
Maybe QuietTime
Text
applicationId :: Text
quietTime :: Maybe QuietTime
limits :: Maybe CampaignLimits
lastModifiedDate :: Maybe Text
campaignHook :: Maybe CampaignHook
$sel:applicationId:ApplicationSettingsResource' :: ApplicationSettingsResource -> Text
$sel:quietTime:ApplicationSettingsResource' :: ApplicationSettingsResource -> Maybe QuietTime
$sel:limits:ApplicationSettingsResource' :: ApplicationSettingsResource -> Maybe CampaignLimits
$sel:lastModifiedDate:ApplicationSettingsResource' :: ApplicationSettingsResource -> Maybe Text
$sel:campaignHook:ApplicationSettingsResource' :: ApplicationSettingsResource -> Maybe CampaignHook
..} =
Int
_salt
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe CampaignHook
campaignHook
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
lastModifiedDate
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe CampaignLimits
limits
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe QuietTime
quietTime
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Text
applicationId
instance Prelude.NFData ApplicationSettingsResource where
rnf :: ApplicationSettingsResource -> ()
rnf ApplicationSettingsResource' {Maybe Text
Maybe CampaignLimits
Maybe CampaignHook
Maybe QuietTime
Text
applicationId :: Text
quietTime :: Maybe QuietTime
limits :: Maybe CampaignLimits
lastModifiedDate :: Maybe Text
campaignHook :: Maybe CampaignHook
$sel:applicationId:ApplicationSettingsResource' :: ApplicationSettingsResource -> Text
$sel:quietTime:ApplicationSettingsResource' :: ApplicationSettingsResource -> Maybe QuietTime
$sel:limits:ApplicationSettingsResource' :: ApplicationSettingsResource -> Maybe CampaignLimits
$sel:lastModifiedDate:ApplicationSettingsResource' :: ApplicationSettingsResource -> Maybe Text
$sel:campaignHook:ApplicationSettingsResource' :: ApplicationSettingsResource -> Maybe CampaignHook
..} =
forall a. NFData a => a -> ()
Prelude.rnf Maybe CampaignHook
campaignHook
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
lastModifiedDate
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe CampaignLimits
limits
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe QuietTime
quietTime
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Text
applicationId