{-# 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-2023 Brendan Hay
-- License     : Mozilla Public License, v. 2.0.
-- Maintainer  : Brendan Hay
-- Stability   : auto-generated
-- Portability : non-portable (GHC extensions)
module Amazonka.Pinpoint.Types.PushNotificationTemplateResponse 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 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 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 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 Amazon Resource Name (ARN) of the message template.
    PushNotificationTemplateResponse -> Maybe Text
arn :: Prelude.Maybe Prelude.Text,
    -- | 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 default message template that\'s used for push notification
    -- channels.
    PushNotificationTemplateResponse
-> Maybe DefaultPushNotificationTemplate
default' :: Prelude.Maybe DefaultPushNotificationTemplate,
    -- | 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 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 unique identifier for the recommender model that\'s used by the
    -- message template.
    PushNotificationTemplateResponse -> Maybe Text
recommenderId :: Prelude.Maybe Prelude.Text,
    -- | The custom description of the message template.
    PushNotificationTemplateResponse -> Maybe Text
templateDescription :: 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,
    -- | 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
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]
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
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.
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:
--
-- '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).
--
-- '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).
--
-- 'arn', 'pushNotificationTemplateResponse_arn' - The Amazon Resource Name (ARN) of the message template.
--
-- '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).
--
-- 'default'', 'pushNotificationTemplateResponse_default' - The default message template that\'s used for push notification
-- channels.
--
-- '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.
--
-- '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).
--
-- 'recommenderId', 'pushNotificationTemplateResponse_recommenderId' - The unique identifier for the recommender model that\'s used by the
-- message template.
--
-- 'templateDescription', 'pushNotificationTemplateResponse_templateDescription' - The custom description of the message template.
--
-- '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.
--
-- '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'
      { $sel:adm:PushNotificationTemplateResponse' :: Maybe AndroidPushNotificationTemplate
adm =
          forall a. Maybe a
Prelude.Nothing,
        $sel:apns:PushNotificationTemplateResponse' :: Maybe APNSPushNotificationTemplate
apns = forall a. Maybe a
Prelude.Nothing,
        $sel:arn:PushNotificationTemplateResponse' :: Maybe Text
arn = forall a. Maybe a
Prelude.Nothing,
        $sel:baidu:PushNotificationTemplateResponse' :: Maybe AndroidPushNotificationTemplate
baidu = forall a. Maybe a
Prelude.Nothing,
        $sel:default':PushNotificationTemplateResponse' :: Maybe DefaultPushNotificationTemplate
default' = forall a. Maybe a
Prelude.Nothing,
        $sel:defaultSubstitutions:PushNotificationTemplateResponse' :: Maybe Text
defaultSubstitutions = forall a. Maybe a
Prelude.Nothing,
        $sel:gcm:PushNotificationTemplateResponse' :: Maybe AndroidPushNotificationTemplate
gcm = forall a. Maybe a
Prelude.Nothing,
        $sel:recommenderId:PushNotificationTemplateResponse' :: Maybe Text
recommenderId = forall a. Maybe a
Prelude.Nothing,
        $sel:templateDescription:PushNotificationTemplateResponse' :: Maybe Text
templateDescription = forall a. Maybe a
Prelude.Nothing,
        $sel:version:PushNotificationTemplateResponse' :: Maybe Text
version = forall a. Maybe a
Prelude.Nothing,
        $sel:tags:PushNotificationTemplateResponse' :: Maybe (HashMap Text Text)
tags = 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 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 :: Lens'
  PushNotificationTemplateResponse
  (Maybe AndroidPushNotificationTemplate)
pushNotificationTemplateResponse_adm = 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 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 :: Lens'
  PushNotificationTemplateResponse
  (Maybe APNSPushNotificationTemplate)
pushNotificationTemplateResponse_apns = 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 Amazon Resource Name (ARN) of the message template.
pushNotificationTemplateResponse_arn :: Lens.Lens' PushNotificationTemplateResponse (Prelude.Maybe Prelude.Text)
pushNotificationTemplateResponse_arn :: Lens' PushNotificationTemplateResponse (Maybe Text)
pushNotificationTemplateResponse_arn = 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 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 :: Lens'
  PushNotificationTemplateResponse
  (Maybe AndroidPushNotificationTemplate)
pushNotificationTemplateResponse_baidu = 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 default message template that\'s used for push notification
-- channels.
pushNotificationTemplateResponse_default :: Lens.Lens' PushNotificationTemplateResponse (Prelude.Maybe DefaultPushNotificationTemplate)
pushNotificationTemplateResponse_default :: Lens'
  PushNotificationTemplateResponse
  (Maybe DefaultPushNotificationTemplate)
pushNotificationTemplateResponse_default = 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 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 :: Lens' PushNotificationTemplateResponse (Maybe Text)
pushNotificationTemplateResponse_defaultSubstitutions = 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 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 :: Lens'
  PushNotificationTemplateResponse
  (Maybe AndroidPushNotificationTemplate)
pushNotificationTemplateResponse_gcm = 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 unique identifier for the recommender model that\'s used by the
-- message template.
pushNotificationTemplateResponse_recommenderId :: Lens.Lens' PushNotificationTemplateResponse (Prelude.Maybe Prelude.Text)
pushNotificationTemplateResponse_recommenderId :: Lens' PushNotificationTemplateResponse (Maybe Text)
pushNotificationTemplateResponse_recommenderId = 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)

-- | The custom description of the message template.
pushNotificationTemplateResponse_templateDescription :: Lens.Lens' PushNotificationTemplateResponse (Prelude.Maybe Prelude.Text)
pushNotificationTemplateResponse_templateDescription :: Lens' PushNotificationTemplateResponse (Maybe Text)
pushNotificationTemplateResponse_templateDescription = 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 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 :: Lens' PushNotificationTemplateResponse (Maybe Text)
pushNotificationTemplateResponse_version = 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)

-- | 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 :: Lens' PushNotificationTemplateResponse (Maybe (HashMap Text Text))
pushNotificationTemplateResponse_tags = 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) 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

-- | The date, in ISO 8601 format, when the message template was last
-- modified.
pushNotificationTemplateResponse_lastModifiedDate :: Lens.Lens' PushNotificationTemplateResponse Prelude.Text
pushNotificationTemplateResponse_lastModifiedDate :: Lens' PushNotificationTemplateResponse Text
pushNotificationTemplateResponse_lastModifiedDate = 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 :: Lens' PushNotificationTemplateResponse Text
pushNotificationTemplateResponse_creationDate = 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 :: Lens' PushNotificationTemplateResponse TemplateType
pushNotificationTemplateResponse_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 :: Lens' PushNotificationTemplateResponse Text
pushNotificationTemplateResponse_templateName = 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
  Data.FromJSON
    PushNotificationTemplateResponse
  where
  parseJSON :: Value -> Parser PushNotificationTemplateResponse
parseJSON =
    forall a. String -> (Object -> Parser a) -> Value -> Parser a
Data.withObject
      String
"PushNotificationTemplateResponse"
      ( \Object
x ->
          Maybe AndroidPushNotificationTemplate
-> Maybe APNSPushNotificationTemplate
-> Maybe Text
-> Maybe AndroidPushNotificationTemplate
-> Maybe DefaultPushNotificationTemplate
-> Maybe Text
-> Maybe AndroidPushNotificationTemplate
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe (HashMap Text Text)
-> Text
-> Text
-> TemplateType
-> Text
-> PushNotificationTemplateResponse
PushNotificationTemplateResponse'
            forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"ADM")
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"APNS")
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"Arn")
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"Baidu")
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"Default")
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"DefaultSubstitutions")
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"GCM")
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"RecommenderId")
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"TemplateDescription")
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"Version")
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"tags" forall a. Parser (Maybe a) -> a -> Parser a
Data..!= forall a. Monoid a => a
Prelude.mempty)
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser a
Data..: Key
"LastModifiedDate")
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser a
Data..: Key
"CreationDate")
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser a
Data..: Key
"TemplateType")
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser a
Data..: Key
"TemplateName")
      )

instance
  Prelude.Hashable
    PushNotificationTemplateResponse
  where
  hashWithSalt :: Int -> PushNotificationTemplateResponse -> Int
hashWithSalt
    Int
_salt
    PushNotificationTemplateResponse' {Maybe Text
Maybe (HashMap Text Text)
Maybe APNSPushNotificationTemplate
Maybe AndroidPushNotificationTemplate
Maybe DefaultPushNotificationTemplate
Text
TemplateType
templateName :: Text
templateType :: TemplateType
creationDate :: Text
lastModifiedDate :: Text
tags :: Maybe (HashMap Text Text)
version :: Maybe Text
templateDescription :: Maybe Text
recommenderId :: Maybe Text
gcm :: Maybe AndroidPushNotificationTemplate
defaultSubstitutions :: Maybe Text
default' :: Maybe DefaultPushNotificationTemplate
baidu :: Maybe AndroidPushNotificationTemplate
arn :: Maybe Text
apns :: Maybe APNSPushNotificationTemplate
adm :: Maybe AndroidPushNotificationTemplate
$sel:templateName:PushNotificationTemplateResponse' :: PushNotificationTemplateResponse -> Text
$sel:templateType:PushNotificationTemplateResponse' :: PushNotificationTemplateResponse -> TemplateType
$sel:creationDate:PushNotificationTemplateResponse' :: PushNotificationTemplateResponse -> Text
$sel:lastModifiedDate:PushNotificationTemplateResponse' :: PushNotificationTemplateResponse -> Text
$sel:tags:PushNotificationTemplateResponse' :: PushNotificationTemplateResponse -> Maybe (HashMap Text Text)
$sel:version:PushNotificationTemplateResponse' :: PushNotificationTemplateResponse -> Maybe Text
$sel:templateDescription:PushNotificationTemplateResponse' :: PushNotificationTemplateResponse -> Maybe Text
$sel:recommenderId:PushNotificationTemplateResponse' :: PushNotificationTemplateResponse -> Maybe Text
$sel:gcm:PushNotificationTemplateResponse' :: PushNotificationTemplateResponse
-> Maybe AndroidPushNotificationTemplate
$sel:defaultSubstitutions:PushNotificationTemplateResponse' :: PushNotificationTemplateResponse -> Maybe Text
$sel:default':PushNotificationTemplateResponse' :: PushNotificationTemplateResponse
-> Maybe DefaultPushNotificationTemplate
$sel:baidu:PushNotificationTemplateResponse' :: PushNotificationTemplateResponse
-> Maybe AndroidPushNotificationTemplate
$sel:arn:PushNotificationTemplateResponse' :: PushNotificationTemplateResponse -> Maybe Text
$sel:apns:PushNotificationTemplateResponse' :: PushNotificationTemplateResponse
-> Maybe APNSPushNotificationTemplate
$sel:adm:PushNotificationTemplateResponse' :: PushNotificationTemplateResponse
-> 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 Text
arn
        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 Text
version
        forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe (HashMap Text Text)
tags
        forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Text
lastModifiedDate
        forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Text
creationDate
        forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` TemplateType
templateType
        forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Text
templateName

instance
  Prelude.NFData
    PushNotificationTemplateResponse
  where
  rnf :: PushNotificationTemplateResponse -> ()
rnf PushNotificationTemplateResponse' {Maybe Text
Maybe (HashMap Text Text)
Maybe APNSPushNotificationTemplate
Maybe AndroidPushNotificationTemplate
Maybe DefaultPushNotificationTemplate
Text
TemplateType
templateName :: Text
templateType :: TemplateType
creationDate :: Text
lastModifiedDate :: Text
tags :: Maybe (HashMap Text Text)
version :: Maybe Text
templateDescription :: Maybe Text
recommenderId :: Maybe Text
gcm :: Maybe AndroidPushNotificationTemplate
defaultSubstitutions :: Maybe Text
default' :: Maybe DefaultPushNotificationTemplate
baidu :: Maybe AndroidPushNotificationTemplate
arn :: Maybe Text
apns :: Maybe APNSPushNotificationTemplate
adm :: Maybe AndroidPushNotificationTemplate
$sel:templateName:PushNotificationTemplateResponse' :: PushNotificationTemplateResponse -> Text
$sel:templateType:PushNotificationTemplateResponse' :: PushNotificationTemplateResponse -> TemplateType
$sel:creationDate:PushNotificationTemplateResponse' :: PushNotificationTemplateResponse -> Text
$sel:lastModifiedDate:PushNotificationTemplateResponse' :: PushNotificationTemplateResponse -> Text
$sel:tags:PushNotificationTemplateResponse' :: PushNotificationTemplateResponse -> Maybe (HashMap Text Text)
$sel:version:PushNotificationTemplateResponse' :: PushNotificationTemplateResponse -> Maybe Text
$sel:templateDescription:PushNotificationTemplateResponse' :: PushNotificationTemplateResponse -> Maybe Text
$sel:recommenderId:PushNotificationTemplateResponse' :: PushNotificationTemplateResponse -> Maybe Text
$sel:gcm:PushNotificationTemplateResponse' :: PushNotificationTemplateResponse
-> Maybe AndroidPushNotificationTemplate
$sel:defaultSubstitutions:PushNotificationTemplateResponse' :: PushNotificationTemplateResponse -> Maybe Text
$sel:default':PushNotificationTemplateResponse' :: PushNotificationTemplateResponse
-> Maybe DefaultPushNotificationTemplate
$sel:baidu:PushNotificationTemplateResponse' :: PushNotificationTemplateResponse
-> Maybe AndroidPushNotificationTemplate
$sel:arn:PushNotificationTemplateResponse' :: PushNotificationTemplateResponse -> Maybe Text
$sel:apns:PushNotificationTemplateResponse' :: PushNotificationTemplateResponse
-> Maybe APNSPushNotificationTemplate
$sel:adm:PushNotificationTemplateResponse' :: PushNotificationTemplateResponse
-> 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 Text
arn
      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 Text
version
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe (HashMap Text Text)
tags
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Text
lastModifiedDate
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Text
creationDate
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf TemplateType
templateType
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Text
templateName