{-# 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.PushNotificationTemplateRequest 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.APNSPushNotificationTemplate
import Amazonka.Pinpoint.Types.AndroidPushNotificationTemplate
import Amazonka.Pinpoint.Types.DefaultPushNotificationTemplate
import qualified Amazonka.Prelude as Prelude
data PushNotificationTemplateRequest = PushNotificationTemplateRequest'
{
PushNotificationTemplateRequest
-> Maybe AndroidPushNotificationTemplate
adm :: Prelude.Maybe AndroidPushNotificationTemplate,
PushNotificationTemplateRequest
-> Maybe APNSPushNotificationTemplate
apns :: Prelude.Maybe APNSPushNotificationTemplate,
PushNotificationTemplateRequest
-> Maybe AndroidPushNotificationTemplate
baidu :: Prelude.Maybe AndroidPushNotificationTemplate,
PushNotificationTemplateRequest
-> Maybe DefaultPushNotificationTemplate
default' :: Prelude.Maybe DefaultPushNotificationTemplate,
PushNotificationTemplateRequest -> Maybe Text
defaultSubstitutions :: Prelude.Maybe Prelude.Text,
PushNotificationTemplateRequest
-> Maybe AndroidPushNotificationTemplate
gcm :: Prelude.Maybe AndroidPushNotificationTemplate,
PushNotificationTemplateRequest -> Maybe Text
recommenderId :: Prelude.Maybe Prelude.Text,
PushNotificationTemplateRequest -> Maybe Text
templateDescription :: Prelude.Maybe Prelude.Text,
PushNotificationTemplateRequest -> Maybe (HashMap Text Text)
tags :: Prelude.Maybe (Prelude.HashMap Prelude.Text Prelude.Text)
}
deriving (PushNotificationTemplateRequest
-> PushNotificationTemplateRequest -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: PushNotificationTemplateRequest
-> PushNotificationTemplateRequest -> Bool
$c/= :: PushNotificationTemplateRequest
-> PushNotificationTemplateRequest -> Bool
== :: PushNotificationTemplateRequest
-> PushNotificationTemplateRequest -> Bool
$c== :: PushNotificationTemplateRequest
-> PushNotificationTemplateRequest -> Bool
Prelude.Eq, ReadPrec [PushNotificationTemplateRequest]
ReadPrec PushNotificationTemplateRequest
Int -> ReadS PushNotificationTemplateRequest
ReadS [PushNotificationTemplateRequest]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [PushNotificationTemplateRequest]
$creadListPrec :: ReadPrec [PushNotificationTemplateRequest]
readPrec :: ReadPrec PushNotificationTemplateRequest
$creadPrec :: ReadPrec PushNotificationTemplateRequest
readList :: ReadS [PushNotificationTemplateRequest]
$creadList :: ReadS [PushNotificationTemplateRequest]
readsPrec :: Int -> ReadS PushNotificationTemplateRequest
$creadsPrec :: Int -> ReadS PushNotificationTemplateRequest
Prelude.Read, Int -> PushNotificationTemplateRequest -> ShowS
[PushNotificationTemplateRequest] -> ShowS
PushNotificationTemplateRequest -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [PushNotificationTemplateRequest] -> ShowS
$cshowList :: [PushNotificationTemplateRequest] -> ShowS
show :: PushNotificationTemplateRequest -> String
$cshow :: PushNotificationTemplateRequest -> String
showsPrec :: Int -> PushNotificationTemplateRequest -> ShowS
$cshowsPrec :: Int -> PushNotificationTemplateRequest -> ShowS
Prelude.Show, forall x.
Rep PushNotificationTemplateRequest x
-> PushNotificationTemplateRequest
forall x.
PushNotificationTemplateRequest
-> Rep PushNotificationTemplateRequest x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep PushNotificationTemplateRequest x
-> PushNotificationTemplateRequest
$cfrom :: forall x.
PushNotificationTemplateRequest
-> Rep PushNotificationTemplateRequest x
Prelude.Generic)
newPushNotificationTemplateRequest ::
PushNotificationTemplateRequest
newPushNotificationTemplateRequest :: PushNotificationTemplateRequest
newPushNotificationTemplateRequest =
PushNotificationTemplateRequest'
{ $sel:adm:PushNotificationTemplateRequest' :: Maybe AndroidPushNotificationTemplate
adm =
forall a. Maybe a
Prelude.Nothing,
$sel:apns:PushNotificationTemplateRequest' :: Maybe APNSPushNotificationTemplate
apns = forall a. Maybe a
Prelude.Nothing,
$sel:baidu:PushNotificationTemplateRequest' :: Maybe AndroidPushNotificationTemplate
baidu = forall a. Maybe a
Prelude.Nothing,
$sel:default':PushNotificationTemplateRequest' :: Maybe DefaultPushNotificationTemplate
default' = forall a. Maybe a
Prelude.Nothing,
$sel:defaultSubstitutions:PushNotificationTemplateRequest' :: Maybe Text
defaultSubstitutions = forall a. Maybe a
Prelude.Nothing,
$sel:gcm:PushNotificationTemplateRequest' :: Maybe AndroidPushNotificationTemplate
gcm = forall a. Maybe a
Prelude.Nothing,
$sel:recommenderId:PushNotificationTemplateRequest' :: Maybe Text
recommenderId = forall a. Maybe a
Prelude.Nothing,
$sel:templateDescription:PushNotificationTemplateRequest' :: Maybe Text
templateDescription = forall a. Maybe a
Prelude.Nothing,
$sel:tags:PushNotificationTemplateRequest' :: Maybe (HashMap Text Text)
tags = forall a. Maybe a
Prelude.Nothing
}
pushNotificationTemplateRequest_adm :: Lens.Lens' PushNotificationTemplateRequest (Prelude.Maybe AndroidPushNotificationTemplate)
pushNotificationTemplateRequest_adm :: Lens'
PushNotificationTemplateRequest
(Maybe AndroidPushNotificationTemplate)
pushNotificationTemplateRequest_adm = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\PushNotificationTemplateRequest' {Maybe AndroidPushNotificationTemplate
adm :: Maybe AndroidPushNotificationTemplate
$sel:adm:PushNotificationTemplateRequest' :: PushNotificationTemplateRequest
-> Maybe AndroidPushNotificationTemplate
adm} -> Maybe AndroidPushNotificationTemplate
adm) (\s :: PushNotificationTemplateRequest
s@PushNotificationTemplateRequest' {} Maybe AndroidPushNotificationTemplate
a -> PushNotificationTemplateRequest
s {$sel:adm:PushNotificationTemplateRequest' :: Maybe AndroidPushNotificationTemplate
adm = Maybe AndroidPushNotificationTemplate
a} :: PushNotificationTemplateRequest)
pushNotificationTemplateRequest_apns :: Lens.Lens' PushNotificationTemplateRequest (Prelude.Maybe APNSPushNotificationTemplate)
pushNotificationTemplateRequest_apns :: Lens'
PushNotificationTemplateRequest
(Maybe APNSPushNotificationTemplate)
pushNotificationTemplateRequest_apns = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\PushNotificationTemplateRequest' {Maybe APNSPushNotificationTemplate
apns :: Maybe APNSPushNotificationTemplate
$sel:apns:PushNotificationTemplateRequest' :: PushNotificationTemplateRequest
-> Maybe APNSPushNotificationTemplate
apns} -> Maybe APNSPushNotificationTemplate
apns) (\s :: PushNotificationTemplateRequest
s@PushNotificationTemplateRequest' {} Maybe APNSPushNotificationTemplate
a -> PushNotificationTemplateRequest
s {$sel:apns:PushNotificationTemplateRequest' :: Maybe APNSPushNotificationTemplate
apns = Maybe APNSPushNotificationTemplate
a} :: PushNotificationTemplateRequest)
pushNotificationTemplateRequest_baidu :: Lens.Lens' PushNotificationTemplateRequest (Prelude.Maybe AndroidPushNotificationTemplate)
pushNotificationTemplateRequest_baidu :: Lens'
PushNotificationTemplateRequest
(Maybe AndroidPushNotificationTemplate)
pushNotificationTemplateRequest_baidu = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\PushNotificationTemplateRequest' {Maybe AndroidPushNotificationTemplate
baidu :: Maybe AndroidPushNotificationTemplate
$sel:baidu:PushNotificationTemplateRequest' :: PushNotificationTemplateRequest
-> Maybe AndroidPushNotificationTemplate
baidu} -> Maybe AndroidPushNotificationTemplate
baidu) (\s :: PushNotificationTemplateRequest
s@PushNotificationTemplateRequest' {} Maybe AndroidPushNotificationTemplate
a -> PushNotificationTemplateRequest
s {$sel:baidu:PushNotificationTemplateRequest' :: Maybe AndroidPushNotificationTemplate
baidu = Maybe AndroidPushNotificationTemplate
a} :: PushNotificationTemplateRequest)
pushNotificationTemplateRequest_default :: Lens.Lens' PushNotificationTemplateRequest (Prelude.Maybe DefaultPushNotificationTemplate)
pushNotificationTemplateRequest_default :: Lens'
PushNotificationTemplateRequest
(Maybe DefaultPushNotificationTemplate)
pushNotificationTemplateRequest_default = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\PushNotificationTemplateRequest' {Maybe DefaultPushNotificationTemplate
default' :: Maybe DefaultPushNotificationTemplate
$sel:default':PushNotificationTemplateRequest' :: PushNotificationTemplateRequest
-> Maybe DefaultPushNotificationTemplate
default'} -> Maybe DefaultPushNotificationTemplate
default') (\s :: PushNotificationTemplateRequest
s@PushNotificationTemplateRequest' {} Maybe DefaultPushNotificationTemplate
a -> PushNotificationTemplateRequest
s {$sel:default':PushNotificationTemplateRequest' :: Maybe DefaultPushNotificationTemplate
default' = Maybe DefaultPushNotificationTemplate
a} :: PushNotificationTemplateRequest)
pushNotificationTemplateRequest_defaultSubstitutions :: Lens.Lens' PushNotificationTemplateRequest (Prelude.Maybe Prelude.Text)
pushNotificationTemplateRequest_defaultSubstitutions :: Lens' PushNotificationTemplateRequest (Maybe Text)
pushNotificationTemplateRequest_defaultSubstitutions = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\PushNotificationTemplateRequest' {Maybe Text
defaultSubstitutions :: Maybe Text
$sel:defaultSubstitutions:PushNotificationTemplateRequest' :: PushNotificationTemplateRequest -> Maybe Text
defaultSubstitutions} -> Maybe Text
defaultSubstitutions) (\s :: PushNotificationTemplateRequest
s@PushNotificationTemplateRequest' {} Maybe Text
a -> PushNotificationTemplateRequest
s {$sel:defaultSubstitutions:PushNotificationTemplateRequest' :: Maybe Text
defaultSubstitutions = Maybe Text
a} :: PushNotificationTemplateRequest)
pushNotificationTemplateRequest_gcm :: Lens.Lens' PushNotificationTemplateRequest (Prelude.Maybe AndroidPushNotificationTemplate)
pushNotificationTemplateRequest_gcm :: Lens'
PushNotificationTemplateRequest
(Maybe AndroidPushNotificationTemplate)
pushNotificationTemplateRequest_gcm = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\PushNotificationTemplateRequest' {Maybe AndroidPushNotificationTemplate
gcm :: Maybe AndroidPushNotificationTemplate
$sel:gcm:PushNotificationTemplateRequest' :: PushNotificationTemplateRequest
-> Maybe AndroidPushNotificationTemplate
gcm} -> Maybe AndroidPushNotificationTemplate
gcm) (\s :: PushNotificationTemplateRequest
s@PushNotificationTemplateRequest' {} Maybe AndroidPushNotificationTemplate
a -> PushNotificationTemplateRequest
s {$sel:gcm:PushNotificationTemplateRequest' :: Maybe AndroidPushNotificationTemplate
gcm = Maybe AndroidPushNotificationTemplate
a} :: PushNotificationTemplateRequest)
pushNotificationTemplateRequest_recommenderId :: Lens.Lens' PushNotificationTemplateRequest (Prelude.Maybe Prelude.Text)
pushNotificationTemplateRequest_recommenderId :: Lens' PushNotificationTemplateRequest (Maybe Text)
pushNotificationTemplateRequest_recommenderId = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\PushNotificationTemplateRequest' {Maybe Text
recommenderId :: Maybe Text
$sel:recommenderId:PushNotificationTemplateRequest' :: PushNotificationTemplateRequest -> Maybe Text
recommenderId} -> Maybe Text
recommenderId) (\s :: PushNotificationTemplateRequest
s@PushNotificationTemplateRequest' {} Maybe Text
a -> PushNotificationTemplateRequest
s {$sel:recommenderId:PushNotificationTemplateRequest' :: Maybe Text
recommenderId = Maybe Text
a} :: PushNotificationTemplateRequest)
pushNotificationTemplateRequest_templateDescription :: Lens.Lens' PushNotificationTemplateRequest (Prelude.Maybe Prelude.Text)
pushNotificationTemplateRequest_templateDescription :: Lens' PushNotificationTemplateRequest (Maybe Text)
pushNotificationTemplateRequest_templateDescription = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\PushNotificationTemplateRequest' {Maybe Text
templateDescription :: Maybe Text
$sel:templateDescription:PushNotificationTemplateRequest' :: PushNotificationTemplateRequest -> Maybe Text
templateDescription} -> Maybe Text
templateDescription) (\s :: PushNotificationTemplateRequest
s@PushNotificationTemplateRequest' {} Maybe Text
a -> PushNotificationTemplateRequest
s {$sel:templateDescription:PushNotificationTemplateRequest' :: Maybe Text
templateDescription = Maybe Text
a} :: PushNotificationTemplateRequest)
pushNotificationTemplateRequest_tags :: Lens.Lens' PushNotificationTemplateRequest (Prelude.Maybe (Prelude.HashMap Prelude.Text Prelude.Text))
pushNotificationTemplateRequest_tags :: Lens' PushNotificationTemplateRequest (Maybe (HashMap Text Text))
pushNotificationTemplateRequest_tags = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\PushNotificationTemplateRequest' {Maybe (HashMap Text Text)
tags :: Maybe (HashMap Text Text)
$sel:tags:PushNotificationTemplateRequest' :: PushNotificationTemplateRequest -> Maybe (HashMap Text Text)
tags} -> Maybe (HashMap Text Text)
tags) (\s :: PushNotificationTemplateRequest
s@PushNotificationTemplateRequest' {} Maybe (HashMap Text Text)
a -> PushNotificationTemplateRequest
s {$sel:tags:PushNotificationTemplateRequest' :: Maybe (HashMap Text Text)
tags = Maybe (HashMap Text Text)
a} :: PushNotificationTemplateRequest) forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. 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 forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced
instance
Prelude.Hashable
PushNotificationTemplateRequest
where
hashWithSalt :: Int -> PushNotificationTemplateRequest -> Int
hashWithSalt
Int
_salt
PushNotificationTemplateRequest' {Maybe Text
Maybe (HashMap Text Text)
Maybe APNSPushNotificationTemplate
Maybe AndroidPushNotificationTemplate
Maybe DefaultPushNotificationTemplate
tags :: Maybe (HashMap Text Text)
templateDescription :: Maybe Text
recommenderId :: Maybe Text
gcm :: Maybe AndroidPushNotificationTemplate
defaultSubstitutions :: Maybe Text
default' :: Maybe DefaultPushNotificationTemplate
baidu :: Maybe AndroidPushNotificationTemplate
apns :: Maybe APNSPushNotificationTemplate
adm :: Maybe AndroidPushNotificationTemplate
$sel:tags:PushNotificationTemplateRequest' :: PushNotificationTemplateRequest -> Maybe (HashMap Text Text)
$sel:templateDescription:PushNotificationTemplateRequest' :: PushNotificationTemplateRequest -> Maybe Text
$sel:recommenderId:PushNotificationTemplateRequest' :: PushNotificationTemplateRequest -> Maybe Text
$sel:gcm:PushNotificationTemplateRequest' :: PushNotificationTemplateRequest
-> Maybe AndroidPushNotificationTemplate
$sel:defaultSubstitutions:PushNotificationTemplateRequest' :: PushNotificationTemplateRequest -> Maybe Text
$sel:default':PushNotificationTemplateRequest' :: PushNotificationTemplateRequest
-> Maybe DefaultPushNotificationTemplate
$sel:baidu:PushNotificationTemplateRequest' :: PushNotificationTemplateRequest
-> Maybe AndroidPushNotificationTemplate
$sel:apns:PushNotificationTemplateRequest' :: PushNotificationTemplateRequest
-> Maybe APNSPushNotificationTemplate
$sel:adm:PushNotificationTemplateRequest' :: PushNotificationTemplateRequest
-> Maybe AndroidPushNotificationTemplate
..} =
Int
_salt
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe AndroidPushNotificationTemplate
adm
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe APNSPushNotificationTemplate
apns
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe AndroidPushNotificationTemplate
baidu
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe DefaultPushNotificationTemplate
default'
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
defaultSubstitutions
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe AndroidPushNotificationTemplate
gcm
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
recommenderId
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
templateDescription
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe (HashMap Text Text)
tags
instance
Prelude.NFData
PushNotificationTemplateRequest
where
rnf :: PushNotificationTemplateRequest -> ()
rnf PushNotificationTemplateRequest' {Maybe Text
Maybe (HashMap Text Text)
Maybe APNSPushNotificationTemplate
Maybe AndroidPushNotificationTemplate
Maybe DefaultPushNotificationTemplate
tags :: Maybe (HashMap Text Text)
templateDescription :: Maybe Text
recommenderId :: Maybe Text
gcm :: Maybe AndroidPushNotificationTemplate
defaultSubstitutions :: Maybe Text
default' :: Maybe DefaultPushNotificationTemplate
baidu :: Maybe AndroidPushNotificationTemplate
apns :: Maybe APNSPushNotificationTemplate
adm :: Maybe AndroidPushNotificationTemplate
$sel:tags:PushNotificationTemplateRequest' :: PushNotificationTemplateRequest -> Maybe (HashMap Text Text)
$sel:templateDescription:PushNotificationTemplateRequest' :: PushNotificationTemplateRequest -> Maybe Text
$sel:recommenderId:PushNotificationTemplateRequest' :: PushNotificationTemplateRequest -> Maybe Text
$sel:gcm:PushNotificationTemplateRequest' :: PushNotificationTemplateRequest
-> Maybe AndroidPushNotificationTemplate
$sel:defaultSubstitutions:PushNotificationTemplateRequest' :: PushNotificationTemplateRequest -> Maybe Text
$sel:default':PushNotificationTemplateRequest' :: PushNotificationTemplateRequest
-> Maybe DefaultPushNotificationTemplate
$sel:baidu:PushNotificationTemplateRequest' :: PushNotificationTemplateRequest
-> Maybe AndroidPushNotificationTemplate
$sel:apns:PushNotificationTemplateRequest' :: PushNotificationTemplateRequest
-> Maybe APNSPushNotificationTemplate
$sel:adm:PushNotificationTemplateRequest' :: PushNotificationTemplateRequest
-> Maybe AndroidPushNotificationTemplate
..} =
forall a. NFData a => a -> ()
Prelude.rnf Maybe AndroidPushNotificationTemplate
adm
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe APNSPushNotificationTemplate
apns
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe AndroidPushNotificationTemplate
baidu
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe DefaultPushNotificationTemplate
default'
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
defaultSubstitutions
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe AndroidPushNotificationTemplate
gcm
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
recommenderId
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
templateDescription
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe (HashMap Text Text)
tags
instance Data.ToJSON PushNotificationTemplateRequest where
toJSON :: PushNotificationTemplateRequest -> Value
toJSON PushNotificationTemplateRequest' {Maybe Text
Maybe (HashMap Text Text)
Maybe APNSPushNotificationTemplate
Maybe AndroidPushNotificationTemplate
Maybe DefaultPushNotificationTemplate
tags :: Maybe (HashMap Text Text)
templateDescription :: Maybe Text
recommenderId :: Maybe Text
gcm :: Maybe AndroidPushNotificationTemplate
defaultSubstitutions :: Maybe Text
default' :: Maybe DefaultPushNotificationTemplate
baidu :: Maybe AndroidPushNotificationTemplate
apns :: Maybe APNSPushNotificationTemplate
adm :: Maybe AndroidPushNotificationTemplate
$sel:tags:PushNotificationTemplateRequest' :: PushNotificationTemplateRequest -> Maybe (HashMap Text Text)
$sel:templateDescription:PushNotificationTemplateRequest' :: PushNotificationTemplateRequest -> Maybe Text
$sel:recommenderId:PushNotificationTemplateRequest' :: PushNotificationTemplateRequest -> Maybe Text
$sel:gcm:PushNotificationTemplateRequest' :: PushNotificationTemplateRequest
-> Maybe AndroidPushNotificationTemplate
$sel:defaultSubstitutions:PushNotificationTemplateRequest' :: PushNotificationTemplateRequest -> Maybe Text
$sel:default':PushNotificationTemplateRequest' :: PushNotificationTemplateRequest
-> Maybe DefaultPushNotificationTemplate
$sel:baidu:PushNotificationTemplateRequest' :: PushNotificationTemplateRequest
-> Maybe AndroidPushNotificationTemplate
$sel:apns:PushNotificationTemplateRequest' :: PushNotificationTemplateRequest
-> Maybe APNSPushNotificationTemplate
$sel:adm:PushNotificationTemplateRequest' :: PushNotificationTemplateRequest
-> Maybe AndroidPushNotificationTemplate
..} =
[Pair] -> Value
Data.object
( forall a. [Maybe a] -> [a]
Prelude.catMaybes
[ (Key
"ADM" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=) forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe AndroidPushNotificationTemplate
adm,
(Key
"APNS" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=) forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe APNSPushNotificationTemplate
apns,
(Key
"Baidu" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=) forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe AndroidPushNotificationTemplate
baidu,
(Key
"Default" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=) forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe DefaultPushNotificationTemplate
default',
(Key
"DefaultSubstitutions" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Text
defaultSubstitutions,
(Key
"GCM" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=) forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe AndroidPushNotificationTemplate
gcm,
(Key
"RecommenderId" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=) forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Text
recommenderId,
(Key
"TemplateDescription" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Text
templateDescription,
(Key
"tags" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=) forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe (HashMap Text Text)
tags
]
)