{-# 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.Lens as Lens
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 DefaultPushNotificationTemplate
default' :: Prelude.Maybe DefaultPushNotificationTemplate,
PushNotificationTemplateRequest -> Maybe Text
templateDescription :: Prelude.Maybe Prelude.Text,
PushNotificationTemplateRequest
-> Maybe AndroidPushNotificationTemplate
gcm :: Prelude.Maybe AndroidPushNotificationTemplate,
PushNotificationTemplateRequest
-> Maybe APNSPushNotificationTemplate
apns :: Prelude.Maybe APNSPushNotificationTemplate,
PushNotificationTemplateRequest -> Maybe Text
defaultSubstitutions :: Prelude.Maybe Prelude.Text,
PushNotificationTemplateRequest
-> Maybe AndroidPushNotificationTemplate
adm :: Prelude.Maybe AndroidPushNotificationTemplate,
PushNotificationTemplateRequest
-> Maybe AndroidPushNotificationTemplate
baidu :: Prelude.Maybe AndroidPushNotificationTemplate,
PushNotificationTemplateRequest -> Maybe Text
recommenderId :: Prelude.Maybe Prelude.Text,
PushNotificationTemplateRequest -> Maybe (HashMap Text Text)
tags :: Prelude.Maybe (Prelude.HashMap Prelude.Text Prelude.Text)
}
deriving (PushNotificationTemplateRequest
-> PushNotificationTemplateRequest -> Bool
(PushNotificationTemplateRequest
-> PushNotificationTemplateRequest -> Bool)
-> (PushNotificationTemplateRequest
-> PushNotificationTemplateRequest -> Bool)
-> Eq PushNotificationTemplateRequest
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]
(Int -> ReadS PushNotificationTemplateRequest)
-> ReadS [PushNotificationTemplateRequest]
-> ReadPrec PushNotificationTemplateRequest
-> ReadPrec [PushNotificationTemplateRequest]
-> Read 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
(Int -> PushNotificationTemplateRequest -> ShowS)
-> (PushNotificationTemplateRequest -> String)
-> ([PushNotificationTemplateRequest] -> ShowS)
-> Show PushNotificationTemplateRequest
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.
PushNotificationTemplateRequest
-> Rep PushNotificationTemplateRequest x)
-> (forall x.
Rep PushNotificationTemplateRequest x
-> PushNotificationTemplateRequest)
-> Generic PushNotificationTemplateRequest
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' :: Maybe DefaultPushNotificationTemplate
-> Maybe Text
-> Maybe AndroidPushNotificationTemplate
-> Maybe APNSPushNotificationTemplate
-> Maybe Text
-> Maybe AndroidPushNotificationTemplate
-> Maybe AndroidPushNotificationTemplate
-> Maybe Text
-> Maybe (HashMap Text Text)
-> PushNotificationTemplateRequest
PushNotificationTemplateRequest'
{ $sel:default':PushNotificationTemplateRequest' :: Maybe DefaultPushNotificationTemplate
default' =
Maybe DefaultPushNotificationTemplate
forall a. Maybe a
Prelude.Nothing,
$sel:templateDescription:PushNotificationTemplateRequest' :: Maybe Text
templateDescription = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:gcm:PushNotificationTemplateRequest' :: Maybe AndroidPushNotificationTemplate
gcm = Maybe AndroidPushNotificationTemplate
forall a. Maybe a
Prelude.Nothing,
$sel:apns:PushNotificationTemplateRequest' :: Maybe APNSPushNotificationTemplate
apns = Maybe APNSPushNotificationTemplate
forall a. Maybe a
Prelude.Nothing,
$sel:defaultSubstitutions:PushNotificationTemplateRequest' :: Maybe Text
defaultSubstitutions = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:adm:PushNotificationTemplateRequest' :: Maybe AndroidPushNotificationTemplate
adm = Maybe AndroidPushNotificationTemplate
forall a. Maybe a
Prelude.Nothing,
$sel:baidu:PushNotificationTemplateRequest' :: Maybe AndroidPushNotificationTemplate
baidu = Maybe AndroidPushNotificationTemplate
forall a. Maybe a
Prelude.Nothing,
$sel:recommenderId:PushNotificationTemplateRequest' :: Maybe Text
recommenderId = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:tags:PushNotificationTemplateRequest' :: Maybe (HashMap Text Text)
tags = Maybe (HashMap Text Text)
forall a. Maybe a
Prelude.Nothing
}
pushNotificationTemplateRequest_default :: Lens.Lens' PushNotificationTemplateRequest (Prelude.Maybe DefaultPushNotificationTemplate)
pushNotificationTemplateRequest_default :: (Maybe DefaultPushNotificationTemplate
-> f (Maybe DefaultPushNotificationTemplate))
-> PushNotificationTemplateRequest
-> f PushNotificationTemplateRequest
pushNotificationTemplateRequest_default = (PushNotificationTemplateRequest
-> Maybe DefaultPushNotificationTemplate)
-> (PushNotificationTemplateRequest
-> Maybe DefaultPushNotificationTemplate
-> PushNotificationTemplateRequest)
-> Lens
PushNotificationTemplateRequest
PushNotificationTemplateRequest
(Maybe DefaultPushNotificationTemplate)
(Maybe DefaultPushNotificationTemplate)
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_templateDescription :: Lens.Lens' PushNotificationTemplateRequest (Prelude.Maybe Prelude.Text)
pushNotificationTemplateRequest_templateDescription :: (Maybe Text -> f (Maybe Text))
-> PushNotificationTemplateRequest
-> f PushNotificationTemplateRequest
pushNotificationTemplateRequest_templateDescription = (PushNotificationTemplateRequest -> Maybe Text)
-> (PushNotificationTemplateRequest
-> Maybe Text -> PushNotificationTemplateRequest)
-> Lens
PushNotificationTemplateRequest
PushNotificationTemplateRequest
(Maybe Text)
(Maybe Text)
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_gcm :: Lens.Lens' PushNotificationTemplateRequest (Prelude.Maybe AndroidPushNotificationTemplate)
pushNotificationTemplateRequest_gcm :: (Maybe AndroidPushNotificationTemplate
-> f (Maybe AndroidPushNotificationTemplate))
-> PushNotificationTemplateRequest
-> f PushNotificationTemplateRequest
pushNotificationTemplateRequest_gcm = (PushNotificationTemplateRequest
-> Maybe AndroidPushNotificationTemplate)
-> (PushNotificationTemplateRequest
-> Maybe AndroidPushNotificationTemplate
-> PushNotificationTemplateRequest)
-> Lens
PushNotificationTemplateRequest
PushNotificationTemplateRequest
(Maybe AndroidPushNotificationTemplate)
(Maybe AndroidPushNotificationTemplate)
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_apns :: Lens.Lens' PushNotificationTemplateRequest (Prelude.Maybe APNSPushNotificationTemplate)
pushNotificationTemplateRequest_apns :: (Maybe APNSPushNotificationTemplate
-> f (Maybe APNSPushNotificationTemplate))
-> PushNotificationTemplateRequest
-> f PushNotificationTemplateRequest
pushNotificationTemplateRequest_apns = (PushNotificationTemplateRequest
-> Maybe APNSPushNotificationTemplate)
-> (PushNotificationTemplateRequest
-> Maybe APNSPushNotificationTemplate
-> PushNotificationTemplateRequest)
-> Lens
PushNotificationTemplateRequest
PushNotificationTemplateRequest
(Maybe APNSPushNotificationTemplate)
(Maybe APNSPushNotificationTemplate)
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_defaultSubstitutions :: Lens.Lens' PushNotificationTemplateRequest (Prelude.Maybe Prelude.Text)
pushNotificationTemplateRequest_defaultSubstitutions :: (Maybe Text -> f (Maybe Text))
-> PushNotificationTemplateRequest
-> f PushNotificationTemplateRequest
pushNotificationTemplateRequest_defaultSubstitutions = (PushNotificationTemplateRequest -> Maybe Text)
-> (PushNotificationTemplateRequest
-> Maybe Text -> PushNotificationTemplateRequest)
-> Lens
PushNotificationTemplateRequest
PushNotificationTemplateRequest
(Maybe Text)
(Maybe Text)
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_adm :: Lens.Lens' PushNotificationTemplateRequest (Prelude.Maybe AndroidPushNotificationTemplate)
pushNotificationTemplateRequest_adm :: (Maybe AndroidPushNotificationTemplate
-> f (Maybe AndroidPushNotificationTemplate))
-> PushNotificationTemplateRequest
-> f PushNotificationTemplateRequest
pushNotificationTemplateRequest_adm = (PushNotificationTemplateRequest
-> Maybe AndroidPushNotificationTemplate)
-> (PushNotificationTemplateRequest
-> Maybe AndroidPushNotificationTemplate
-> PushNotificationTemplateRequest)
-> Lens
PushNotificationTemplateRequest
PushNotificationTemplateRequest
(Maybe AndroidPushNotificationTemplate)
(Maybe AndroidPushNotificationTemplate)
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_baidu :: Lens.Lens' PushNotificationTemplateRequest (Prelude.Maybe AndroidPushNotificationTemplate)
pushNotificationTemplateRequest_baidu :: (Maybe AndroidPushNotificationTemplate
-> f (Maybe AndroidPushNotificationTemplate))
-> PushNotificationTemplateRequest
-> f PushNotificationTemplateRequest
pushNotificationTemplateRequest_baidu = (PushNotificationTemplateRequest
-> Maybe AndroidPushNotificationTemplate)
-> (PushNotificationTemplateRequest
-> Maybe AndroidPushNotificationTemplate
-> PushNotificationTemplateRequest)
-> Lens
PushNotificationTemplateRequest
PushNotificationTemplateRequest
(Maybe AndroidPushNotificationTemplate)
(Maybe AndroidPushNotificationTemplate)
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_recommenderId :: Lens.Lens' PushNotificationTemplateRequest (Prelude.Maybe Prelude.Text)
pushNotificationTemplateRequest_recommenderId :: (Maybe Text -> f (Maybe Text))
-> PushNotificationTemplateRequest
-> f PushNotificationTemplateRequest
pushNotificationTemplateRequest_recommenderId = (PushNotificationTemplateRequest -> Maybe Text)
-> (PushNotificationTemplateRequest
-> Maybe Text -> PushNotificationTemplateRequest)
-> Lens
PushNotificationTemplateRequest
PushNotificationTemplateRequest
(Maybe Text)
(Maybe Text)
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_tags :: Lens.Lens' PushNotificationTemplateRequest (Prelude.Maybe (Prelude.HashMap Prelude.Text Prelude.Text))
pushNotificationTemplateRequest_tags :: (Maybe (HashMap Text Text) -> f (Maybe (HashMap Text Text)))
-> PushNotificationTemplateRequest
-> f PushNotificationTemplateRequest
pushNotificationTemplateRequest_tags = (PushNotificationTemplateRequest -> Maybe (HashMap Text Text))
-> (PushNotificationTemplateRequest
-> Maybe (HashMap Text Text) -> PushNotificationTemplateRequest)
-> Lens
PushNotificationTemplateRequest
PushNotificationTemplateRequest
(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 (\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) ((Maybe (HashMap Text Text) -> f (Maybe (HashMap Text Text)))
-> PushNotificationTemplateRequest
-> f PushNotificationTemplateRequest)
-> ((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)))
-> PushNotificationTemplateRequest
-> f PushNotificationTemplateRequest
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
instance
Prelude.Hashable
PushNotificationTemplateRequest
instance
Prelude.NFData
PushNotificationTemplateRequest
instance Core.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)
recommenderId :: Maybe Text
baidu :: Maybe AndroidPushNotificationTemplate
adm :: Maybe AndroidPushNotificationTemplate
defaultSubstitutions :: Maybe Text
apns :: Maybe APNSPushNotificationTemplate
gcm :: Maybe AndroidPushNotificationTemplate
templateDescription :: Maybe Text
default' :: Maybe DefaultPushNotificationTemplate
$sel:tags:PushNotificationTemplateRequest' :: PushNotificationTemplateRequest -> Maybe (HashMap Text Text)
$sel:recommenderId:PushNotificationTemplateRequest' :: PushNotificationTemplateRequest -> Maybe Text
$sel:baidu:PushNotificationTemplateRequest' :: PushNotificationTemplateRequest
-> Maybe AndroidPushNotificationTemplate
$sel:adm:PushNotificationTemplateRequest' :: PushNotificationTemplateRequest
-> Maybe AndroidPushNotificationTemplate
$sel:defaultSubstitutions:PushNotificationTemplateRequest' :: PushNotificationTemplateRequest -> Maybe Text
$sel:apns:PushNotificationTemplateRequest' :: PushNotificationTemplateRequest
-> Maybe APNSPushNotificationTemplate
$sel:gcm:PushNotificationTemplateRequest' :: PushNotificationTemplateRequest
-> Maybe AndroidPushNotificationTemplate
$sel:templateDescription:PushNotificationTemplateRequest' :: PushNotificationTemplateRequest -> Maybe Text
$sel:default':PushNotificationTemplateRequest' :: PushNotificationTemplateRequest
-> Maybe DefaultPushNotificationTemplate
..} =
[Pair] -> Value
Core.object
( [Maybe Pair] -> [Pair]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
[ (Text
"Default" Text -> DefaultPushNotificationTemplate -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (DefaultPushNotificationTemplate -> Pair)
-> Maybe DefaultPushNotificationTemplate -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe DefaultPushNotificationTemplate
default',
(Text
"TemplateDescription" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=)
(Text -> Pair) -> Maybe Text -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Text
templateDescription,
(Text
"GCM" Text -> AndroidPushNotificationTemplate -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (AndroidPushNotificationTemplate -> Pair)
-> Maybe AndroidPushNotificationTemplate -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe AndroidPushNotificationTemplate
gcm,
(Text
"APNS" Text -> APNSPushNotificationTemplate -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (APNSPushNotificationTemplate -> Pair)
-> Maybe APNSPushNotificationTemplate -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe APNSPushNotificationTemplate
apns,
(Text
"DefaultSubstitutions" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=)
(Text -> Pair) -> Maybe Text -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Text
defaultSubstitutions,
(Text
"ADM" Text -> AndroidPushNotificationTemplate -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (AndroidPushNotificationTemplate -> Pair)
-> Maybe AndroidPushNotificationTemplate -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe AndroidPushNotificationTemplate
adm,
(Text
"Baidu" Text -> AndroidPushNotificationTemplate -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (AndroidPushNotificationTemplate -> Pair)
-> Maybe AndroidPushNotificationTemplate -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe AndroidPushNotificationTemplate
baidu,
(Text
"RecommenderId" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (Text -> Pair) -> Maybe Text -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Text
recommenderId,
(Text
"tags" Text -> HashMap Text Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (HashMap Text Text -> Pair)
-> Maybe (HashMap Text Text) -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe (HashMap Text Text)
tags
]
)