{-# 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 #-}

-- Derived from AWS service descriptions, licensed under Apache 2.0.

-- |
-- Module      : Amazonka.Pinpoint.Types.PushNotificationTemplateResponse
-- Copyright   : (c) 2013-2021 Brendan Hay
-- License     : Mozilla Public License, v. 2.0.
-- Maintainer  : Brendan Hay <brendan.g.hay+amazonka@gmail.com>
-- Stability   : auto-generated
-- Portability : non-portable (GHC extensions)
module Amazonka.Pinpoint.Types.PushNotificationTemplateResponse 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 Amazonka.Pinpoint.Types.TemplateType
import qualified Amazonka.Prelude as Prelude

-- | Provides information about the content and settings for a message
-- template that can be used in messages that are sent through a push
-- notification channel.
--
-- /See:/ 'newPushNotificationTemplateResponse' smart constructor.
data PushNotificationTemplateResponse = PushNotificationTemplateResponse'
  { -- | The Amazon Resource Name (ARN) of the message template.
    PushNotificationTemplateResponse -> Maybe Text
arn :: Prelude.Maybe Prelude.Text,
    -- | The default message template that\'s used for push notification
    -- channels.
    PushNotificationTemplateResponse
-> Maybe DefaultPushNotificationTemplate
default' :: Prelude.Maybe DefaultPushNotificationTemplate,
    -- | The custom description of the message template.
    PushNotificationTemplateResponse -> Maybe Text
templateDescription :: Prelude.Maybe Prelude.Text,
    -- | The message template that\'s used for the GCM channel, which is used to
    -- send notifications through the Firebase Cloud Messaging (FCM), formerly
    -- Google Cloud Messaging (GCM), service. This message template overrides
    -- the default template for push notification channels
    -- (DefaultPushNotificationTemplate).
    PushNotificationTemplateResponse
-> Maybe AndroidPushNotificationTemplate
gcm :: Prelude.Maybe AndroidPushNotificationTemplate,
    -- | The message template that\'s used for the APNs (Apple Push Notification
    -- service) channel. This message template overrides the default template
    -- for push notification channels (DefaultPushNotificationTemplate).
    PushNotificationTemplateResponse
-> Maybe APNSPushNotificationTemplate
apns :: Prelude.Maybe APNSPushNotificationTemplate,
    -- | The JSON object that specifies the default values that are used for
    -- message variables in the message template. This object is a set of
    -- key-value pairs. Each key defines a message variable in the template.
    -- The corresponding value defines the default value for that variable.
    PushNotificationTemplateResponse -> Maybe Text
defaultSubstitutions :: Prelude.Maybe Prelude.Text,
    -- | The unique identifier, as an integer, for the active version of the
    -- message template, or the version of the template that you specified by
    -- using the version parameter in your request.
    PushNotificationTemplateResponse -> Maybe Text
version :: Prelude.Maybe Prelude.Text,
    -- | The message template that\'s used for the ADM (Amazon Device Messaging)
    -- channel. This message template overrides the default template for push
    -- notification channels (DefaultPushNotificationTemplate).
    PushNotificationTemplateResponse
-> Maybe AndroidPushNotificationTemplate
adm :: Prelude.Maybe AndroidPushNotificationTemplate,
    -- | The message template that\'s used for the Baidu (Baidu Cloud Push)
    -- channel. This message template overrides the default template for push
    -- notification channels (DefaultPushNotificationTemplate).
    PushNotificationTemplateResponse
-> Maybe AndroidPushNotificationTemplate
baidu :: Prelude.Maybe AndroidPushNotificationTemplate,
    -- | The unique identifier for the recommender model that\'s used by the
    -- message template.
    PushNotificationTemplateResponse -> Maybe Text
recommenderId :: Prelude.Maybe Prelude.Text,
    -- | A string-to-string map of key-value pairs that identifies the tags that
    -- are associated with the message template. Each tag consists of a
    -- required tag key and an associated tag value.
    PushNotificationTemplateResponse -> Maybe (HashMap Text Text)
tags :: Prelude.Maybe (Prelude.HashMap Prelude.Text Prelude.Text),
    -- | The date, in ISO 8601 format, when the message template was last
    -- modified.
    PushNotificationTemplateResponse -> Text
lastModifiedDate :: Prelude.Text,
    -- | The date, in ISO 8601 format, when the message template was created.
    PushNotificationTemplateResponse -> Text
creationDate :: Prelude.Text,
    -- | The type of channel that the message template is designed for. For a
    -- push notification template, this value is PUSH.
    PushNotificationTemplateResponse -> TemplateType
templateType :: TemplateType,
    -- | The name of the message template.
    PushNotificationTemplateResponse -> Text
templateName :: Prelude.Text
  }
  deriving (PushNotificationTemplateResponse
-> PushNotificationTemplateResponse -> Bool
(PushNotificationTemplateResponse
 -> PushNotificationTemplateResponse -> Bool)
-> (PushNotificationTemplateResponse
    -> PushNotificationTemplateResponse -> Bool)
-> Eq PushNotificationTemplateResponse
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: PushNotificationTemplateResponse
-> PushNotificationTemplateResponse -> Bool
$c/= :: PushNotificationTemplateResponse
-> PushNotificationTemplateResponse -> Bool
== :: PushNotificationTemplateResponse
-> PushNotificationTemplateResponse -> Bool
$c== :: PushNotificationTemplateResponse
-> PushNotificationTemplateResponse -> Bool
Prelude.Eq, ReadPrec [PushNotificationTemplateResponse]
ReadPrec PushNotificationTemplateResponse
Int -> ReadS PushNotificationTemplateResponse
ReadS [PushNotificationTemplateResponse]
(Int -> ReadS PushNotificationTemplateResponse)
-> ReadS [PushNotificationTemplateResponse]
-> ReadPrec PushNotificationTemplateResponse
-> ReadPrec [PushNotificationTemplateResponse]
-> Read PushNotificationTemplateResponse
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [PushNotificationTemplateResponse]
$creadListPrec :: ReadPrec [PushNotificationTemplateResponse]
readPrec :: ReadPrec PushNotificationTemplateResponse
$creadPrec :: ReadPrec PushNotificationTemplateResponse
readList :: ReadS [PushNotificationTemplateResponse]
$creadList :: ReadS [PushNotificationTemplateResponse]
readsPrec :: Int -> ReadS PushNotificationTemplateResponse
$creadsPrec :: Int -> ReadS PushNotificationTemplateResponse
Prelude.Read, Int -> PushNotificationTemplateResponse -> ShowS
[PushNotificationTemplateResponse] -> ShowS
PushNotificationTemplateResponse -> String
(Int -> PushNotificationTemplateResponse -> ShowS)
-> (PushNotificationTemplateResponse -> String)
-> ([PushNotificationTemplateResponse] -> ShowS)
-> Show PushNotificationTemplateResponse
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [PushNotificationTemplateResponse] -> ShowS
$cshowList :: [PushNotificationTemplateResponse] -> ShowS
show :: PushNotificationTemplateResponse -> String
$cshow :: PushNotificationTemplateResponse -> String
showsPrec :: Int -> PushNotificationTemplateResponse -> ShowS
$cshowsPrec :: Int -> PushNotificationTemplateResponse -> ShowS
Prelude.Show, (forall x.
 PushNotificationTemplateResponse
 -> Rep PushNotificationTemplateResponse x)
-> (forall x.
    Rep PushNotificationTemplateResponse x
    -> PushNotificationTemplateResponse)
-> Generic PushNotificationTemplateResponse
forall x.
Rep PushNotificationTemplateResponse x
-> PushNotificationTemplateResponse
forall x.
PushNotificationTemplateResponse
-> Rep PushNotificationTemplateResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep PushNotificationTemplateResponse x
-> PushNotificationTemplateResponse
$cfrom :: forall x.
PushNotificationTemplateResponse
-> Rep PushNotificationTemplateResponse x
Prelude.Generic)

-- |
-- Create a value of 'PushNotificationTemplateResponse' with all optional fields omitted.
--
-- Use <https://hackage.haskell.org/package/generic-lens generic-lens> or <https://hackage.haskell.org/package/optics optics> to modify other optional fields.
--
-- The following record fields are available, with the corresponding lenses provided
-- for backwards compatibility:
--
-- 'arn', 'pushNotificationTemplateResponse_arn' - The Amazon Resource Name (ARN) of the message template.
--
-- 'default'', 'pushNotificationTemplateResponse_default' - The default message template that\'s used for push notification
-- channels.
--
-- 'templateDescription', 'pushNotificationTemplateResponse_templateDescription' - The custom description of the message template.
--
-- 'gcm', 'pushNotificationTemplateResponse_gcm' - The message template that\'s used for the GCM channel, which is used to
-- send notifications through the Firebase Cloud Messaging (FCM), formerly
-- Google Cloud Messaging (GCM), service. This message template overrides
-- the default template for push notification channels
-- (DefaultPushNotificationTemplate).
--
-- 'apns', 'pushNotificationTemplateResponse_apns' - The message template that\'s used for the APNs (Apple Push Notification
-- service) channel. This message template overrides the default template
-- for push notification channels (DefaultPushNotificationTemplate).
--
-- 'defaultSubstitutions', 'pushNotificationTemplateResponse_defaultSubstitutions' - The JSON object that specifies the default values that are used for
-- message variables in the message template. This object is a set of
-- key-value pairs. Each key defines a message variable in the template.
-- The corresponding value defines the default value for that variable.
--
-- 'version', 'pushNotificationTemplateResponse_version' - The unique identifier, as an integer, for the active version of the
-- message template, or the version of the template that you specified by
-- using the version parameter in your request.
--
-- 'adm', 'pushNotificationTemplateResponse_adm' - The message template that\'s used for the ADM (Amazon Device Messaging)
-- channel. This message template overrides the default template for push
-- notification channels (DefaultPushNotificationTemplate).
--
-- 'baidu', 'pushNotificationTemplateResponse_baidu' - The message template that\'s used for the Baidu (Baidu Cloud Push)
-- channel. This message template overrides the default template for push
-- notification channels (DefaultPushNotificationTemplate).
--
-- 'recommenderId', 'pushNotificationTemplateResponse_recommenderId' - The unique identifier for the recommender model that\'s used by the
-- message template.
--
-- 'tags', 'pushNotificationTemplateResponse_tags' - A string-to-string map of key-value pairs that identifies the tags that
-- are associated with the message template. Each tag consists of a
-- required tag key and an associated tag value.
--
-- 'lastModifiedDate', 'pushNotificationTemplateResponse_lastModifiedDate' - The date, in ISO 8601 format, when the message template was last
-- modified.
--
-- 'creationDate', 'pushNotificationTemplateResponse_creationDate' - The date, in ISO 8601 format, when the message template was created.
--
-- 'templateType', 'pushNotificationTemplateResponse_templateType' - The type of channel that the message template is designed for. For a
-- push notification template, this value is PUSH.
--
-- 'templateName', 'pushNotificationTemplateResponse_templateName' - The name of the message template.
newPushNotificationTemplateResponse ::
  -- | 'lastModifiedDate'
  Prelude.Text ->
  -- | 'creationDate'
  Prelude.Text ->
  -- | 'templateType'
  TemplateType ->
  -- | 'templateName'
  Prelude.Text ->
  PushNotificationTemplateResponse
newPushNotificationTemplateResponse :: Text
-> Text -> TemplateType -> Text -> PushNotificationTemplateResponse
newPushNotificationTemplateResponse
  Text
pLastModifiedDate_
  Text
pCreationDate_
  TemplateType
pTemplateType_
  Text
pTemplateName_ =
    PushNotificationTemplateResponse' :: Maybe Text
-> Maybe DefaultPushNotificationTemplate
-> Maybe Text
-> Maybe AndroidPushNotificationTemplate
-> Maybe APNSPushNotificationTemplate
-> Maybe Text
-> Maybe Text
-> Maybe AndroidPushNotificationTemplate
-> Maybe AndroidPushNotificationTemplate
-> Maybe Text
-> Maybe (HashMap Text Text)
-> Text
-> Text
-> TemplateType
-> Text
-> PushNotificationTemplateResponse
PushNotificationTemplateResponse'
      { $sel:arn:PushNotificationTemplateResponse' :: Maybe Text
arn =
          Maybe Text
forall a. Maybe a
Prelude.Nothing,
        $sel:default':PushNotificationTemplateResponse' :: Maybe DefaultPushNotificationTemplate
default' = Maybe DefaultPushNotificationTemplate
forall a. Maybe a
Prelude.Nothing,
        $sel:templateDescription:PushNotificationTemplateResponse' :: Maybe Text
templateDescription = Maybe Text
forall a. Maybe a
Prelude.Nothing,
        $sel:gcm:PushNotificationTemplateResponse' :: Maybe AndroidPushNotificationTemplate
gcm = Maybe AndroidPushNotificationTemplate
forall a. Maybe a
Prelude.Nothing,
        $sel:apns:PushNotificationTemplateResponse' :: Maybe APNSPushNotificationTemplate
apns = Maybe APNSPushNotificationTemplate
forall a. Maybe a
Prelude.Nothing,
        $sel:defaultSubstitutions:PushNotificationTemplateResponse' :: Maybe Text
defaultSubstitutions = Maybe Text
forall a. Maybe a
Prelude.Nothing,
        $sel:version:PushNotificationTemplateResponse' :: Maybe Text
version = Maybe Text
forall a. Maybe a
Prelude.Nothing,
        $sel:adm:PushNotificationTemplateResponse' :: Maybe AndroidPushNotificationTemplate
adm = Maybe AndroidPushNotificationTemplate
forall a. Maybe a
Prelude.Nothing,
        $sel:baidu:PushNotificationTemplateResponse' :: Maybe AndroidPushNotificationTemplate
baidu = Maybe AndroidPushNotificationTemplate
forall a. Maybe a
Prelude.Nothing,
        $sel:recommenderId:PushNotificationTemplateResponse' :: Maybe Text
recommenderId = Maybe Text
forall a. Maybe a
Prelude.Nothing,
        $sel:tags:PushNotificationTemplateResponse' :: Maybe (HashMap Text Text)
tags = Maybe (HashMap Text Text)
forall a. Maybe a
Prelude.Nothing,
        $sel:lastModifiedDate:PushNotificationTemplateResponse' :: Text
lastModifiedDate = Text
pLastModifiedDate_,
        $sel:creationDate:PushNotificationTemplateResponse' :: Text
creationDate = Text
pCreationDate_,
        $sel:templateType:PushNotificationTemplateResponse' :: TemplateType
templateType = TemplateType
pTemplateType_,
        $sel:templateName:PushNotificationTemplateResponse' :: Text
templateName = Text
pTemplateName_
      }

-- | The Amazon Resource Name (ARN) of the message template.
pushNotificationTemplateResponse_arn :: Lens.Lens' PushNotificationTemplateResponse (Prelude.Maybe Prelude.Text)
pushNotificationTemplateResponse_arn :: (Maybe Text -> f (Maybe Text))
-> PushNotificationTemplateResponse
-> f PushNotificationTemplateResponse
pushNotificationTemplateResponse_arn = (PushNotificationTemplateResponse -> Maybe Text)
-> (PushNotificationTemplateResponse
    -> Maybe Text -> PushNotificationTemplateResponse)
-> Lens
     PushNotificationTemplateResponse
     PushNotificationTemplateResponse
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\PushNotificationTemplateResponse' {Maybe Text
arn :: Maybe Text
$sel:arn:PushNotificationTemplateResponse' :: PushNotificationTemplateResponse -> Maybe Text
arn} -> Maybe Text
arn) (\s :: PushNotificationTemplateResponse
s@PushNotificationTemplateResponse' {} Maybe Text
a -> PushNotificationTemplateResponse
s {$sel:arn:PushNotificationTemplateResponse' :: Maybe Text
arn = Maybe Text
a} :: PushNotificationTemplateResponse)

-- | The default message template that\'s used for push notification
-- channels.
pushNotificationTemplateResponse_default :: Lens.Lens' PushNotificationTemplateResponse (Prelude.Maybe DefaultPushNotificationTemplate)
pushNotificationTemplateResponse_default :: (Maybe DefaultPushNotificationTemplate
 -> f (Maybe DefaultPushNotificationTemplate))
-> PushNotificationTemplateResponse
-> f PushNotificationTemplateResponse
pushNotificationTemplateResponse_default = (PushNotificationTemplateResponse
 -> Maybe DefaultPushNotificationTemplate)
-> (PushNotificationTemplateResponse
    -> Maybe DefaultPushNotificationTemplate
    -> PushNotificationTemplateResponse)
-> Lens
     PushNotificationTemplateResponse
     PushNotificationTemplateResponse
     (Maybe DefaultPushNotificationTemplate)
     (Maybe DefaultPushNotificationTemplate)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\PushNotificationTemplateResponse' {Maybe DefaultPushNotificationTemplate
default' :: Maybe DefaultPushNotificationTemplate
$sel:default':PushNotificationTemplateResponse' :: PushNotificationTemplateResponse
-> Maybe DefaultPushNotificationTemplate
default'} -> Maybe DefaultPushNotificationTemplate
default') (\s :: PushNotificationTemplateResponse
s@PushNotificationTemplateResponse' {} Maybe DefaultPushNotificationTemplate
a -> PushNotificationTemplateResponse
s {$sel:default':PushNotificationTemplateResponse' :: Maybe DefaultPushNotificationTemplate
default' = Maybe DefaultPushNotificationTemplate
a} :: PushNotificationTemplateResponse)

-- | The custom description of the message template.
pushNotificationTemplateResponse_templateDescription :: Lens.Lens' PushNotificationTemplateResponse (Prelude.Maybe Prelude.Text)
pushNotificationTemplateResponse_templateDescription :: (Maybe Text -> f (Maybe Text))
-> PushNotificationTemplateResponse
-> f PushNotificationTemplateResponse
pushNotificationTemplateResponse_templateDescription = (PushNotificationTemplateResponse -> Maybe Text)
-> (PushNotificationTemplateResponse
    -> Maybe Text -> PushNotificationTemplateResponse)
-> Lens
     PushNotificationTemplateResponse
     PushNotificationTemplateResponse
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\PushNotificationTemplateResponse' {Maybe Text
templateDescription :: Maybe Text
$sel:templateDescription:PushNotificationTemplateResponse' :: PushNotificationTemplateResponse -> Maybe Text
templateDescription} -> Maybe Text
templateDescription) (\s :: PushNotificationTemplateResponse
s@PushNotificationTemplateResponse' {} Maybe Text
a -> PushNotificationTemplateResponse
s {$sel:templateDescription:PushNotificationTemplateResponse' :: Maybe Text
templateDescription = Maybe Text
a} :: PushNotificationTemplateResponse)

-- | The message template that\'s used for the GCM channel, which is used to
-- send notifications through the Firebase Cloud Messaging (FCM), formerly
-- Google Cloud Messaging (GCM), service. This message template overrides
-- the default template for push notification channels
-- (DefaultPushNotificationTemplate).
pushNotificationTemplateResponse_gcm :: Lens.Lens' PushNotificationTemplateResponse (Prelude.Maybe AndroidPushNotificationTemplate)
pushNotificationTemplateResponse_gcm :: (Maybe AndroidPushNotificationTemplate
 -> f (Maybe AndroidPushNotificationTemplate))
-> PushNotificationTemplateResponse
-> f PushNotificationTemplateResponse
pushNotificationTemplateResponse_gcm = (PushNotificationTemplateResponse
 -> Maybe AndroidPushNotificationTemplate)
-> (PushNotificationTemplateResponse
    -> Maybe AndroidPushNotificationTemplate
    -> PushNotificationTemplateResponse)
-> Lens
     PushNotificationTemplateResponse
     PushNotificationTemplateResponse
     (Maybe AndroidPushNotificationTemplate)
     (Maybe AndroidPushNotificationTemplate)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\PushNotificationTemplateResponse' {Maybe AndroidPushNotificationTemplate
gcm :: Maybe AndroidPushNotificationTemplate
$sel:gcm:PushNotificationTemplateResponse' :: PushNotificationTemplateResponse
-> Maybe AndroidPushNotificationTemplate
gcm} -> Maybe AndroidPushNotificationTemplate
gcm) (\s :: PushNotificationTemplateResponse
s@PushNotificationTemplateResponse' {} Maybe AndroidPushNotificationTemplate
a -> PushNotificationTemplateResponse
s {$sel:gcm:PushNotificationTemplateResponse' :: Maybe AndroidPushNotificationTemplate
gcm = Maybe AndroidPushNotificationTemplate
a} :: PushNotificationTemplateResponse)

-- | The message template that\'s used for the APNs (Apple Push Notification
-- service) channel. This message template overrides the default template
-- for push notification channels (DefaultPushNotificationTemplate).
pushNotificationTemplateResponse_apns :: Lens.Lens' PushNotificationTemplateResponse (Prelude.Maybe APNSPushNotificationTemplate)
pushNotificationTemplateResponse_apns :: (Maybe APNSPushNotificationTemplate
 -> f (Maybe APNSPushNotificationTemplate))
-> PushNotificationTemplateResponse
-> f PushNotificationTemplateResponse
pushNotificationTemplateResponse_apns = (PushNotificationTemplateResponse
 -> Maybe APNSPushNotificationTemplate)
-> (PushNotificationTemplateResponse
    -> Maybe APNSPushNotificationTemplate
    -> PushNotificationTemplateResponse)
-> Lens
     PushNotificationTemplateResponse
     PushNotificationTemplateResponse
     (Maybe APNSPushNotificationTemplate)
     (Maybe APNSPushNotificationTemplate)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\PushNotificationTemplateResponse' {Maybe APNSPushNotificationTemplate
apns :: Maybe APNSPushNotificationTemplate
$sel:apns:PushNotificationTemplateResponse' :: PushNotificationTemplateResponse
-> Maybe APNSPushNotificationTemplate
apns} -> Maybe APNSPushNotificationTemplate
apns) (\s :: PushNotificationTemplateResponse
s@PushNotificationTemplateResponse' {} Maybe APNSPushNotificationTemplate
a -> PushNotificationTemplateResponse
s {$sel:apns:PushNotificationTemplateResponse' :: Maybe APNSPushNotificationTemplate
apns = Maybe APNSPushNotificationTemplate
a} :: PushNotificationTemplateResponse)

-- | The JSON object that specifies the default values that are used for
-- message variables in the message template. This object is a set of
-- key-value pairs. Each key defines a message variable in the template.
-- The corresponding value defines the default value for that variable.
pushNotificationTemplateResponse_defaultSubstitutions :: Lens.Lens' PushNotificationTemplateResponse (Prelude.Maybe Prelude.Text)
pushNotificationTemplateResponse_defaultSubstitutions :: (Maybe Text -> f (Maybe Text))
-> PushNotificationTemplateResponse
-> f PushNotificationTemplateResponse
pushNotificationTemplateResponse_defaultSubstitutions = (PushNotificationTemplateResponse -> Maybe Text)
-> (PushNotificationTemplateResponse
    -> Maybe Text -> PushNotificationTemplateResponse)
-> Lens
     PushNotificationTemplateResponse
     PushNotificationTemplateResponse
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\PushNotificationTemplateResponse' {Maybe Text
defaultSubstitutions :: Maybe Text
$sel:defaultSubstitutions:PushNotificationTemplateResponse' :: PushNotificationTemplateResponse -> Maybe Text
defaultSubstitutions} -> Maybe Text
defaultSubstitutions) (\s :: PushNotificationTemplateResponse
s@PushNotificationTemplateResponse' {} Maybe Text
a -> PushNotificationTemplateResponse
s {$sel:defaultSubstitutions:PushNotificationTemplateResponse' :: Maybe Text
defaultSubstitutions = Maybe Text
a} :: PushNotificationTemplateResponse)

-- | The unique identifier, as an integer, for the active version of the
-- message template, or the version of the template that you specified by
-- using the version parameter in your request.
pushNotificationTemplateResponse_version :: Lens.Lens' PushNotificationTemplateResponse (Prelude.Maybe Prelude.Text)
pushNotificationTemplateResponse_version :: (Maybe Text -> f (Maybe Text))
-> PushNotificationTemplateResponse
-> f PushNotificationTemplateResponse
pushNotificationTemplateResponse_version = (PushNotificationTemplateResponse -> Maybe Text)
-> (PushNotificationTemplateResponse
    -> Maybe Text -> PushNotificationTemplateResponse)
-> Lens
     PushNotificationTemplateResponse
     PushNotificationTemplateResponse
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\PushNotificationTemplateResponse' {Maybe Text
version :: Maybe Text
$sel:version:PushNotificationTemplateResponse' :: PushNotificationTemplateResponse -> Maybe Text
version} -> Maybe Text
version) (\s :: PushNotificationTemplateResponse
s@PushNotificationTemplateResponse' {} Maybe Text
a -> PushNotificationTemplateResponse
s {$sel:version:PushNotificationTemplateResponse' :: Maybe Text
version = Maybe Text
a} :: PushNotificationTemplateResponse)

-- | The message template that\'s used for the ADM (Amazon Device Messaging)
-- channel. This message template overrides the default template for push
-- notification channels (DefaultPushNotificationTemplate).
pushNotificationTemplateResponse_adm :: Lens.Lens' PushNotificationTemplateResponse (Prelude.Maybe AndroidPushNotificationTemplate)
pushNotificationTemplateResponse_adm :: (Maybe AndroidPushNotificationTemplate
 -> f (Maybe AndroidPushNotificationTemplate))
-> PushNotificationTemplateResponse
-> f PushNotificationTemplateResponse
pushNotificationTemplateResponse_adm = (PushNotificationTemplateResponse
 -> Maybe AndroidPushNotificationTemplate)
-> (PushNotificationTemplateResponse
    -> Maybe AndroidPushNotificationTemplate
    -> PushNotificationTemplateResponse)
-> Lens
     PushNotificationTemplateResponse
     PushNotificationTemplateResponse
     (Maybe AndroidPushNotificationTemplate)
     (Maybe AndroidPushNotificationTemplate)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\PushNotificationTemplateResponse' {Maybe AndroidPushNotificationTemplate
adm :: Maybe AndroidPushNotificationTemplate
$sel:adm:PushNotificationTemplateResponse' :: PushNotificationTemplateResponse
-> Maybe AndroidPushNotificationTemplate
adm} -> Maybe AndroidPushNotificationTemplate
adm) (\s :: PushNotificationTemplateResponse
s@PushNotificationTemplateResponse' {} Maybe AndroidPushNotificationTemplate
a -> PushNotificationTemplateResponse
s {$sel:adm:PushNotificationTemplateResponse' :: Maybe AndroidPushNotificationTemplate
adm = Maybe AndroidPushNotificationTemplate
a} :: PushNotificationTemplateResponse)

-- | The message template that\'s used for the Baidu (Baidu Cloud Push)
-- channel. This message template overrides the default template for push
-- notification channels (DefaultPushNotificationTemplate).
pushNotificationTemplateResponse_baidu :: Lens.Lens' PushNotificationTemplateResponse (Prelude.Maybe AndroidPushNotificationTemplate)
pushNotificationTemplateResponse_baidu :: (Maybe AndroidPushNotificationTemplate
 -> f (Maybe AndroidPushNotificationTemplate))
-> PushNotificationTemplateResponse
-> f PushNotificationTemplateResponse
pushNotificationTemplateResponse_baidu = (PushNotificationTemplateResponse
 -> Maybe AndroidPushNotificationTemplate)
-> (PushNotificationTemplateResponse
    -> Maybe AndroidPushNotificationTemplate
    -> PushNotificationTemplateResponse)
-> Lens
     PushNotificationTemplateResponse
     PushNotificationTemplateResponse
     (Maybe AndroidPushNotificationTemplate)
     (Maybe AndroidPushNotificationTemplate)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\PushNotificationTemplateResponse' {Maybe AndroidPushNotificationTemplate
baidu :: Maybe AndroidPushNotificationTemplate
$sel:baidu:PushNotificationTemplateResponse' :: PushNotificationTemplateResponse
-> Maybe AndroidPushNotificationTemplate
baidu} -> Maybe AndroidPushNotificationTemplate
baidu) (\s :: PushNotificationTemplateResponse
s@PushNotificationTemplateResponse' {} Maybe AndroidPushNotificationTemplate
a -> PushNotificationTemplateResponse
s {$sel:baidu:PushNotificationTemplateResponse' :: Maybe AndroidPushNotificationTemplate
baidu = Maybe AndroidPushNotificationTemplate
a} :: PushNotificationTemplateResponse)

-- | The unique identifier for the recommender model that\'s used by the
-- message template.
pushNotificationTemplateResponse_recommenderId :: Lens.Lens' PushNotificationTemplateResponse (Prelude.Maybe Prelude.Text)
pushNotificationTemplateResponse_recommenderId :: (Maybe Text -> f (Maybe Text))
-> PushNotificationTemplateResponse
-> f PushNotificationTemplateResponse
pushNotificationTemplateResponse_recommenderId = (PushNotificationTemplateResponse -> Maybe Text)
-> (PushNotificationTemplateResponse
    -> Maybe Text -> PushNotificationTemplateResponse)
-> Lens
     PushNotificationTemplateResponse
     PushNotificationTemplateResponse
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\PushNotificationTemplateResponse' {Maybe Text
recommenderId :: Maybe Text
$sel:recommenderId:PushNotificationTemplateResponse' :: PushNotificationTemplateResponse -> Maybe Text
recommenderId} -> Maybe Text
recommenderId) (\s :: PushNotificationTemplateResponse
s@PushNotificationTemplateResponse' {} Maybe Text
a -> PushNotificationTemplateResponse
s {$sel:recommenderId:PushNotificationTemplateResponse' :: Maybe Text
recommenderId = Maybe Text
a} :: PushNotificationTemplateResponse)

-- | A string-to-string map of key-value pairs that identifies the tags that
-- are associated with the message template. Each tag consists of a
-- required tag key and an associated tag value.
pushNotificationTemplateResponse_tags :: Lens.Lens' PushNotificationTemplateResponse (Prelude.Maybe (Prelude.HashMap Prelude.Text Prelude.Text))
pushNotificationTemplateResponse_tags :: (Maybe (HashMap Text Text) -> f (Maybe (HashMap Text Text)))
-> PushNotificationTemplateResponse
-> f PushNotificationTemplateResponse
pushNotificationTemplateResponse_tags = (PushNotificationTemplateResponse -> Maybe (HashMap Text Text))
-> (PushNotificationTemplateResponse
    -> Maybe (HashMap Text Text) -> PushNotificationTemplateResponse)
-> Lens
     PushNotificationTemplateResponse
     PushNotificationTemplateResponse
     (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 (\PushNotificationTemplateResponse' {Maybe (HashMap Text Text)
tags :: Maybe (HashMap Text Text)
$sel:tags:PushNotificationTemplateResponse' :: PushNotificationTemplateResponse -> Maybe (HashMap Text Text)
tags} -> Maybe (HashMap Text Text)
tags) (\s :: PushNotificationTemplateResponse
s@PushNotificationTemplateResponse' {} Maybe (HashMap Text Text)
a -> PushNotificationTemplateResponse
s {$sel:tags:PushNotificationTemplateResponse' :: Maybe (HashMap Text Text)
tags = Maybe (HashMap Text Text)
a} :: PushNotificationTemplateResponse) ((Maybe (HashMap Text Text) -> f (Maybe (HashMap Text Text)))
 -> PushNotificationTemplateResponse
 -> f PushNotificationTemplateResponse)
-> ((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)))
-> PushNotificationTemplateResponse
-> f PushNotificationTemplateResponse
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

-- | The date, in ISO 8601 format, when the message template was last
-- modified.
pushNotificationTemplateResponse_lastModifiedDate :: Lens.Lens' PushNotificationTemplateResponse Prelude.Text
pushNotificationTemplateResponse_lastModifiedDate :: (Text -> f Text)
-> PushNotificationTemplateResponse
-> f PushNotificationTemplateResponse
pushNotificationTemplateResponse_lastModifiedDate = (PushNotificationTemplateResponse -> Text)
-> (PushNotificationTemplateResponse
    -> Text -> PushNotificationTemplateResponse)
-> Lens
     PushNotificationTemplateResponse
     PushNotificationTemplateResponse
     Text
     Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\PushNotificationTemplateResponse' {Text
lastModifiedDate :: Text
$sel:lastModifiedDate:PushNotificationTemplateResponse' :: PushNotificationTemplateResponse -> Text
lastModifiedDate} -> Text
lastModifiedDate) (\s :: PushNotificationTemplateResponse
s@PushNotificationTemplateResponse' {} Text
a -> PushNotificationTemplateResponse
s {$sel:lastModifiedDate:PushNotificationTemplateResponse' :: Text
lastModifiedDate = Text
a} :: PushNotificationTemplateResponse)

-- | The date, in ISO 8601 format, when the message template was created.
pushNotificationTemplateResponse_creationDate :: Lens.Lens' PushNotificationTemplateResponse Prelude.Text
pushNotificationTemplateResponse_creationDate :: (Text -> f Text)
-> PushNotificationTemplateResponse
-> f PushNotificationTemplateResponse
pushNotificationTemplateResponse_creationDate = (PushNotificationTemplateResponse -> Text)
-> (PushNotificationTemplateResponse
    -> Text -> PushNotificationTemplateResponse)
-> Lens
     PushNotificationTemplateResponse
     PushNotificationTemplateResponse
     Text
     Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\PushNotificationTemplateResponse' {Text
creationDate :: Text
$sel:creationDate:PushNotificationTemplateResponse' :: PushNotificationTemplateResponse -> Text
creationDate} -> Text
creationDate) (\s :: PushNotificationTemplateResponse
s@PushNotificationTemplateResponse' {} Text
a -> PushNotificationTemplateResponse
s {$sel:creationDate:PushNotificationTemplateResponse' :: Text
creationDate = Text
a} :: PushNotificationTemplateResponse)

-- | The type of channel that the message template is designed for. For a
-- push notification template, this value is PUSH.
pushNotificationTemplateResponse_templateType :: Lens.Lens' PushNotificationTemplateResponse TemplateType
pushNotificationTemplateResponse_templateType :: (TemplateType -> f TemplateType)
-> PushNotificationTemplateResponse
-> f PushNotificationTemplateResponse
pushNotificationTemplateResponse_templateType = (PushNotificationTemplateResponse -> TemplateType)
-> (PushNotificationTemplateResponse
    -> TemplateType -> PushNotificationTemplateResponse)
-> Lens
     PushNotificationTemplateResponse
     PushNotificationTemplateResponse
     TemplateType
     TemplateType
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\PushNotificationTemplateResponse' {TemplateType
templateType :: TemplateType
$sel:templateType:PushNotificationTemplateResponse' :: PushNotificationTemplateResponse -> TemplateType
templateType} -> TemplateType
templateType) (\s :: PushNotificationTemplateResponse
s@PushNotificationTemplateResponse' {} TemplateType
a -> PushNotificationTemplateResponse
s {$sel:templateType:PushNotificationTemplateResponse' :: TemplateType
templateType = TemplateType
a} :: PushNotificationTemplateResponse)

-- | The name of the message template.
pushNotificationTemplateResponse_templateName :: Lens.Lens' PushNotificationTemplateResponse Prelude.Text
pushNotificationTemplateResponse_templateName :: (Text -> f Text)
-> PushNotificationTemplateResponse
-> f PushNotificationTemplateResponse
pushNotificationTemplateResponse_templateName = (PushNotificationTemplateResponse -> Text)
-> (PushNotificationTemplateResponse
    -> Text -> PushNotificationTemplateResponse)
-> Lens
     PushNotificationTemplateResponse
     PushNotificationTemplateResponse
     Text
     Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\PushNotificationTemplateResponse' {Text
templateName :: Text
$sel:templateName:PushNotificationTemplateResponse' :: PushNotificationTemplateResponse -> Text
templateName} -> Text
templateName) (\s :: PushNotificationTemplateResponse
s@PushNotificationTemplateResponse' {} Text
a -> PushNotificationTemplateResponse
s {$sel:templateName:PushNotificationTemplateResponse' :: Text
templateName = Text
a} :: PushNotificationTemplateResponse)

instance
  Core.FromJSON
    PushNotificationTemplateResponse
  where
  parseJSON :: Value -> Parser PushNotificationTemplateResponse
parseJSON =
    String
-> (Object -> Parser PushNotificationTemplateResponse)
-> Value
-> Parser PushNotificationTemplateResponse
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Core.withObject
      String
"PushNotificationTemplateResponse"
      ( \Object
x ->
          Maybe Text
-> Maybe DefaultPushNotificationTemplate
-> Maybe Text
-> Maybe AndroidPushNotificationTemplate
-> Maybe APNSPushNotificationTemplate
-> Maybe Text
-> Maybe Text
-> Maybe AndroidPushNotificationTemplate
-> Maybe AndroidPushNotificationTemplate
-> Maybe Text
-> Maybe (HashMap Text Text)
-> Text
-> Text
-> TemplateType
-> Text
-> PushNotificationTemplateResponse
PushNotificationTemplateResponse'
            (Maybe Text
 -> Maybe DefaultPushNotificationTemplate
 -> Maybe Text
 -> Maybe AndroidPushNotificationTemplate
 -> Maybe APNSPushNotificationTemplate
 -> Maybe Text
 -> Maybe Text
 -> Maybe AndroidPushNotificationTemplate
 -> Maybe AndroidPushNotificationTemplate
 -> Maybe Text
 -> Maybe (HashMap Text Text)
 -> Text
 -> Text
 -> TemplateType
 -> Text
 -> PushNotificationTemplateResponse)
-> Parser (Maybe Text)
-> Parser
     (Maybe DefaultPushNotificationTemplate
      -> Maybe Text
      -> Maybe AndroidPushNotificationTemplate
      -> Maybe APNSPushNotificationTemplate
      -> Maybe Text
      -> Maybe Text
      -> Maybe AndroidPushNotificationTemplate
      -> Maybe AndroidPushNotificationTemplate
      -> Maybe Text
      -> Maybe (HashMap Text Text)
      -> Text
      -> Text
      -> TemplateType
      -> Text
      -> PushNotificationTemplateResponse)
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
"Arn")
            Parser
  (Maybe DefaultPushNotificationTemplate
   -> Maybe Text
   -> Maybe AndroidPushNotificationTemplate
   -> Maybe APNSPushNotificationTemplate
   -> Maybe Text
   -> Maybe Text
   -> Maybe AndroidPushNotificationTemplate
   -> Maybe AndroidPushNotificationTemplate
   -> Maybe Text
   -> Maybe (HashMap Text Text)
   -> Text
   -> Text
   -> TemplateType
   -> Text
   -> PushNotificationTemplateResponse)
-> Parser (Maybe DefaultPushNotificationTemplate)
-> Parser
     (Maybe Text
      -> Maybe AndroidPushNotificationTemplate
      -> Maybe APNSPushNotificationTemplate
      -> Maybe Text
      -> Maybe Text
      -> Maybe AndroidPushNotificationTemplate
      -> Maybe AndroidPushNotificationTemplate
      -> Maybe Text
      -> Maybe (HashMap Text Text)
      -> Text
      -> Text
      -> TemplateType
      -> Text
      -> PushNotificationTemplateResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe DefaultPushNotificationTemplate)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"Default")
            Parser
  (Maybe Text
   -> Maybe AndroidPushNotificationTemplate
   -> Maybe APNSPushNotificationTemplate
   -> Maybe Text
   -> Maybe Text
   -> Maybe AndroidPushNotificationTemplate
   -> Maybe AndroidPushNotificationTemplate
   -> Maybe Text
   -> Maybe (HashMap Text Text)
   -> Text
   -> Text
   -> TemplateType
   -> Text
   -> PushNotificationTemplateResponse)
-> Parser (Maybe Text)
-> Parser
     (Maybe AndroidPushNotificationTemplate
      -> Maybe APNSPushNotificationTemplate
      -> Maybe Text
      -> Maybe Text
      -> Maybe AndroidPushNotificationTemplate
      -> Maybe AndroidPushNotificationTemplate
      -> Maybe Text
      -> Maybe (HashMap Text Text)
      -> Text
      -> Text
      -> TemplateType
      -> Text
      -> PushNotificationTemplateResponse)
forall (f :: * -> *) a b. Applicative f => 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
"TemplateDescription")
            Parser
  (Maybe AndroidPushNotificationTemplate
   -> Maybe APNSPushNotificationTemplate
   -> Maybe Text
   -> Maybe Text
   -> Maybe AndroidPushNotificationTemplate
   -> Maybe AndroidPushNotificationTemplate
   -> Maybe Text
   -> Maybe (HashMap Text Text)
   -> Text
   -> Text
   -> TemplateType
   -> Text
   -> PushNotificationTemplateResponse)
-> Parser (Maybe AndroidPushNotificationTemplate)
-> Parser
     (Maybe APNSPushNotificationTemplate
      -> Maybe Text
      -> Maybe Text
      -> Maybe AndroidPushNotificationTemplate
      -> Maybe AndroidPushNotificationTemplate
      -> Maybe Text
      -> Maybe (HashMap Text Text)
      -> Text
      -> Text
      -> TemplateType
      -> Text
      -> PushNotificationTemplateResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe AndroidPushNotificationTemplate)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"GCM")
            Parser
  (Maybe APNSPushNotificationTemplate
   -> Maybe Text
   -> Maybe Text
   -> Maybe AndroidPushNotificationTemplate
   -> Maybe AndroidPushNotificationTemplate
   -> Maybe Text
   -> Maybe (HashMap Text Text)
   -> Text
   -> Text
   -> TemplateType
   -> Text
   -> PushNotificationTemplateResponse)
-> Parser (Maybe APNSPushNotificationTemplate)
-> Parser
     (Maybe Text
      -> Maybe Text
      -> Maybe AndroidPushNotificationTemplate
      -> Maybe AndroidPushNotificationTemplate
      -> Maybe Text
      -> Maybe (HashMap Text Text)
      -> Text
      -> Text
      -> TemplateType
      -> Text
      -> PushNotificationTemplateResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe APNSPushNotificationTemplate)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"APNS")
            Parser
  (Maybe Text
   -> Maybe Text
   -> Maybe AndroidPushNotificationTemplate
   -> Maybe AndroidPushNotificationTemplate
   -> Maybe Text
   -> Maybe (HashMap Text Text)
   -> Text
   -> Text
   -> TemplateType
   -> Text
   -> PushNotificationTemplateResponse)
-> Parser (Maybe Text)
-> Parser
     (Maybe Text
      -> Maybe AndroidPushNotificationTemplate
      -> Maybe AndroidPushNotificationTemplate
      -> Maybe Text
      -> Maybe (HashMap Text Text)
      -> Text
      -> Text
      -> TemplateType
      -> Text
      -> PushNotificationTemplateResponse)
forall (f :: * -> *) a b. Applicative f => 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
"DefaultSubstitutions")
            Parser
  (Maybe Text
   -> Maybe AndroidPushNotificationTemplate
   -> Maybe AndroidPushNotificationTemplate
   -> Maybe Text
   -> Maybe (HashMap Text Text)
   -> Text
   -> Text
   -> TemplateType
   -> Text
   -> PushNotificationTemplateResponse)
-> Parser (Maybe Text)
-> Parser
     (Maybe AndroidPushNotificationTemplate
      -> Maybe AndroidPushNotificationTemplate
      -> Maybe Text
      -> Maybe (HashMap Text Text)
      -> Text
      -> Text
      -> TemplateType
      -> Text
      -> PushNotificationTemplateResponse)
forall (f :: * -> *) a b. Applicative f => 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
"Version")
            Parser
  (Maybe AndroidPushNotificationTemplate
   -> Maybe AndroidPushNotificationTemplate
   -> Maybe Text
   -> Maybe (HashMap Text Text)
   -> Text
   -> Text
   -> TemplateType
   -> Text
   -> PushNotificationTemplateResponse)
-> Parser (Maybe AndroidPushNotificationTemplate)
-> Parser
     (Maybe AndroidPushNotificationTemplate
      -> Maybe Text
      -> Maybe (HashMap Text Text)
      -> Text
      -> Text
      -> TemplateType
      -> Text
      -> PushNotificationTemplateResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe AndroidPushNotificationTemplate)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"ADM")
            Parser
  (Maybe AndroidPushNotificationTemplate
   -> Maybe Text
   -> Maybe (HashMap Text Text)
   -> Text
   -> Text
   -> TemplateType
   -> Text
   -> PushNotificationTemplateResponse)
-> Parser (Maybe AndroidPushNotificationTemplate)
-> Parser
     (Maybe Text
      -> Maybe (HashMap Text Text)
      -> Text
      -> Text
      -> TemplateType
      -> Text
      -> PushNotificationTemplateResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe AndroidPushNotificationTemplate)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"Baidu")
            Parser
  (Maybe Text
   -> Maybe (HashMap Text Text)
   -> Text
   -> Text
   -> TemplateType
   -> Text
   -> PushNotificationTemplateResponse)
-> Parser (Maybe Text)
-> Parser
     (Maybe (HashMap Text Text)
      -> Text
      -> Text
      -> TemplateType
      -> Text
      -> PushNotificationTemplateResponse)
forall (f :: * -> *) a b. Applicative f => 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
"RecommenderId")
            Parser
  (Maybe (HashMap Text Text)
   -> Text
   -> Text
   -> TemplateType
   -> Text
   -> PushNotificationTemplateResponse)
-> Parser (Maybe (HashMap Text Text))
-> Parser
     (Text
      -> Text
      -> TemplateType
      -> Text
      -> PushNotificationTemplateResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe (Maybe (HashMap Text Text)))
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"tags" Parser (Maybe (Maybe (HashMap Text Text)))
-> Maybe (HashMap Text Text) -> Parser (Maybe (HashMap Text Text))
forall a. Parser (Maybe a) -> a -> Parser a
Core..!= Maybe (HashMap Text Text)
forall a. Monoid a => a
Prelude.mempty)
            Parser
  (Text
   -> Text
   -> TemplateType
   -> Text
   -> PushNotificationTemplateResponse)
-> Parser Text
-> Parser
     (Text -> TemplateType -> Text -> PushNotificationTemplateResponse)
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
"LastModifiedDate")
            Parser
  (Text -> TemplateType -> Text -> PushNotificationTemplateResponse)
-> Parser Text
-> Parser
     (TemplateType -> Text -> PushNotificationTemplateResponse)
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
"CreationDate")
            Parser (TemplateType -> Text -> PushNotificationTemplateResponse)
-> Parser TemplateType
-> Parser (Text -> PushNotificationTemplateResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser TemplateType
forall a. FromJSON a => Object -> Text -> Parser a
Core..: Text
"TemplateType")
            Parser (Text -> PushNotificationTemplateResponse)
-> Parser Text -> Parser PushNotificationTemplateResponse
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
"TemplateName")
      )

instance
  Prelude.Hashable
    PushNotificationTemplateResponse

instance
  Prelude.NFData
    PushNotificationTemplateResponse