{-# 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.VoiceTemplateResponse
-- 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.VoiceTemplateResponse where

import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
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 the voice
-- channel.
--
-- /See:/ 'newVoiceTemplateResponse' smart constructor.
data VoiceTemplateResponse = VoiceTemplateResponse'
  { -- | The code for the language that\'s used when synthesizing the text of the
    -- script in messages that are based on the message template. For a list of
    -- supported languages and the code for each one, see the
    -- <https://docs.aws.amazon.com/polly/latest/dg/what-is.html Amazon Polly Developer Guide>.
    VoiceTemplateResponse -> Maybe Text
languageCode :: Prelude.Maybe Prelude.Text,
    -- | The Amazon Resource Name (ARN) of the message template.
    VoiceTemplateResponse -> Maybe Text
arn :: Prelude.Maybe Prelude.Text,
    -- | The text of the script that\'s used in messages that are based on the
    -- message template, in plain text format.
    VoiceTemplateResponse -> Maybe Text
body :: Prelude.Maybe Prelude.Text,
    -- | The custom description of the message template.
    VoiceTemplateResponse -> Maybe Text
templateDescription :: Prelude.Maybe Prelude.Text,
    -- | 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.
    VoiceTemplateResponse -> 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.
    VoiceTemplateResponse -> Maybe Text
version :: Prelude.Maybe Prelude.Text,
    -- | The name of the voice that\'s used when delivering messages that are
    -- based on the message template. For a list of supported voices, see the
    -- <https://docs.aws.amazon.com/polly/latest/dg/what-is.html Amazon Polly Developer Guide>.
    VoiceTemplateResponse -> Maybe Text
voiceId :: 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.
    VoiceTemplateResponse -> 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.
    VoiceTemplateResponse -> Text
lastModifiedDate :: Prelude.Text,
    -- | The date, in ISO 8601 format, when the message template was created.
    VoiceTemplateResponse -> Text
creationDate :: Prelude.Text,
    -- | The name of the message template.
    VoiceTemplateResponse -> Text
templateName :: Prelude.Text,
    -- | The type of channel that the message template is designed for. For a
    -- voice template, this value is VOICE.
    VoiceTemplateResponse -> TemplateType
templateType :: TemplateType
  }
  deriving (VoiceTemplateResponse -> VoiceTemplateResponse -> Bool
(VoiceTemplateResponse -> VoiceTemplateResponse -> Bool)
-> (VoiceTemplateResponse -> VoiceTemplateResponse -> Bool)
-> Eq VoiceTemplateResponse
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: VoiceTemplateResponse -> VoiceTemplateResponse -> Bool
$c/= :: VoiceTemplateResponse -> VoiceTemplateResponse -> Bool
== :: VoiceTemplateResponse -> VoiceTemplateResponse -> Bool
$c== :: VoiceTemplateResponse -> VoiceTemplateResponse -> Bool
Prelude.Eq, ReadPrec [VoiceTemplateResponse]
ReadPrec VoiceTemplateResponse
Int -> ReadS VoiceTemplateResponse
ReadS [VoiceTemplateResponse]
(Int -> ReadS VoiceTemplateResponse)
-> ReadS [VoiceTemplateResponse]
-> ReadPrec VoiceTemplateResponse
-> ReadPrec [VoiceTemplateResponse]
-> Read VoiceTemplateResponse
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [VoiceTemplateResponse]
$creadListPrec :: ReadPrec [VoiceTemplateResponse]
readPrec :: ReadPrec VoiceTemplateResponse
$creadPrec :: ReadPrec VoiceTemplateResponse
readList :: ReadS [VoiceTemplateResponse]
$creadList :: ReadS [VoiceTemplateResponse]
readsPrec :: Int -> ReadS VoiceTemplateResponse
$creadsPrec :: Int -> ReadS VoiceTemplateResponse
Prelude.Read, Int -> VoiceTemplateResponse -> ShowS
[VoiceTemplateResponse] -> ShowS
VoiceTemplateResponse -> String
(Int -> VoiceTemplateResponse -> ShowS)
-> (VoiceTemplateResponse -> String)
-> ([VoiceTemplateResponse] -> ShowS)
-> Show VoiceTemplateResponse
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [VoiceTemplateResponse] -> ShowS
$cshowList :: [VoiceTemplateResponse] -> ShowS
show :: VoiceTemplateResponse -> String
$cshow :: VoiceTemplateResponse -> String
showsPrec :: Int -> VoiceTemplateResponse -> ShowS
$cshowsPrec :: Int -> VoiceTemplateResponse -> ShowS
Prelude.Show, (forall x. VoiceTemplateResponse -> Rep VoiceTemplateResponse x)
-> (forall x. Rep VoiceTemplateResponse x -> VoiceTemplateResponse)
-> Generic VoiceTemplateResponse
forall x. Rep VoiceTemplateResponse x -> VoiceTemplateResponse
forall x. VoiceTemplateResponse -> Rep VoiceTemplateResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep VoiceTemplateResponse x -> VoiceTemplateResponse
$cfrom :: forall x. VoiceTemplateResponse -> Rep VoiceTemplateResponse x
Prelude.Generic)

-- |
-- Create a value of 'VoiceTemplateResponse' 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:
--
-- 'languageCode', 'voiceTemplateResponse_languageCode' - The code for the language that\'s used when synthesizing the text of the
-- script in messages that are based on the message template. For a list of
-- supported languages and the code for each one, see the
-- <https://docs.aws.amazon.com/polly/latest/dg/what-is.html Amazon Polly Developer Guide>.
--
-- 'arn', 'voiceTemplateResponse_arn' - The Amazon Resource Name (ARN) of the message template.
--
-- 'body', 'voiceTemplateResponse_body' - The text of the script that\'s used in messages that are based on the
-- message template, in plain text format.
--
-- 'templateDescription', 'voiceTemplateResponse_templateDescription' - The custom description of the message template.
--
-- 'defaultSubstitutions', 'voiceTemplateResponse_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', 'voiceTemplateResponse_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.
--
-- 'voiceId', 'voiceTemplateResponse_voiceId' - The name of the voice that\'s used when delivering messages that are
-- based on the message template. For a list of supported voices, see the
-- <https://docs.aws.amazon.com/polly/latest/dg/what-is.html Amazon Polly Developer Guide>.
--
-- 'tags', 'voiceTemplateResponse_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', 'voiceTemplateResponse_lastModifiedDate' - The date, in ISO 8601 format, when the message template was last
-- modified.
--
-- 'creationDate', 'voiceTemplateResponse_creationDate' - The date, in ISO 8601 format, when the message template was created.
--
-- 'templateName', 'voiceTemplateResponse_templateName' - The name of the message template.
--
-- 'templateType', 'voiceTemplateResponse_templateType' - The type of channel that the message template is designed for. For a
-- voice template, this value is VOICE.
newVoiceTemplateResponse ::
  -- | 'lastModifiedDate'
  Prelude.Text ->
  -- | 'creationDate'
  Prelude.Text ->
  -- | 'templateName'
  Prelude.Text ->
  -- | 'templateType'
  TemplateType ->
  VoiceTemplateResponse
newVoiceTemplateResponse :: Text -> Text -> Text -> TemplateType -> VoiceTemplateResponse
newVoiceTemplateResponse
  Text
pLastModifiedDate_
  Text
pCreationDate_
  Text
pTemplateName_
  TemplateType
pTemplateType_ =
    VoiceTemplateResponse' :: Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe (HashMap Text Text)
-> Text
-> Text
-> Text
-> TemplateType
-> VoiceTemplateResponse
VoiceTemplateResponse'
      { $sel:languageCode:VoiceTemplateResponse' :: Maybe Text
languageCode =
          Maybe Text
forall a. Maybe a
Prelude.Nothing,
        $sel:arn:VoiceTemplateResponse' :: Maybe Text
arn = Maybe Text
forall a. Maybe a
Prelude.Nothing,
        $sel:body:VoiceTemplateResponse' :: Maybe Text
body = Maybe Text
forall a. Maybe a
Prelude.Nothing,
        $sel:templateDescription:VoiceTemplateResponse' :: Maybe Text
templateDescription = Maybe Text
forall a. Maybe a
Prelude.Nothing,
        $sel:defaultSubstitutions:VoiceTemplateResponse' :: Maybe Text
defaultSubstitutions = Maybe Text
forall a. Maybe a
Prelude.Nothing,
        $sel:version:VoiceTemplateResponse' :: Maybe Text
version = Maybe Text
forall a. Maybe a
Prelude.Nothing,
        $sel:voiceId:VoiceTemplateResponse' :: Maybe Text
voiceId = Maybe Text
forall a. Maybe a
Prelude.Nothing,
        $sel:tags:VoiceTemplateResponse' :: Maybe (HashMap Text Text)
tags = Maybe (HashMap Text Text)
forall a. Maybe a
Prelude.Nothing,
        $sel:lastModifiedDate:VoiceTemplateResponse' :: Text
lastModifiedDate = Text
pLastModifiedDate_,
        $sel:creationDate:VoiceTemplateResponse' :: Text
creationDate = Text
pCreationDate_,
        $sel:templateName:VoiceTemplateResponse' :: Text
templateName = Text
pTemplateName_,
        $sel:templateType:VoiceTemplateResponse' :: TemplateType
templateType = TemplateType
pTemplateType_
      }

-- | The code for the language that\'s used when synthesizing the text of the
-- script in messages that are based on the message template. For a list of
-- supported languages and the code for each one, see the
-- <https://docs.aws.amazon.com/polly/latest/dg/what-is.html Amazon Polly Developer Guide>.
voiceTemplateResponse_languageCode :: Lens.Lens' VoiceTemplateResponse (Prelude.Maybe Prelude.Text)
voiceTemplateResponse_languageCode :: (Maybe Text -> f (Maybe Text))
-> VoiceTemplateResponse -> f VoiceTemplateResponse
voiceTemplateResponse_languageCode = (VoiceTemplateResponse -> Maybe Text)
-> (VoiceTemplateResponse -> Maybe Text -> VoiceTemplateResponse)
-> Lens
     VoiceTemplateResponse
     VoiceTemplateResponse
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\VoiceTemplateResponse' {Maybe Text
languageCode :: Maybe Text
$sel:languageCode:VoiceTemplateResponse' :: VoiceTemplateResponse -> Maybe Text
languageCode} -> Maybe Text
languageCode) (\s :: VoiceTemplateResponse
s@VoiceTemplateResponse' {} Maybe Text
a -> VoiceTemplateResponse
s {$sel:languageCode:VoiceTemplateResponse' :: Maybe Text
languageCode = Maybe Text
a} :: VoiceTemplateResponse)

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

-- | The text of the script that\'s used in messages that are based on the
-- message template, in plain text format.
voiceTemplateResponse_body :: Lens.Lens' VoiceTemplateResponse (Prelude.Maybe Prelude.Text)
voiceTemplateResponse_body :: (Maybe Text -> f (Maybe Text))
-> VoiceTemplateResponse -> f VoiceTemplateResponse
voiceTemplateResponse_body = (VoiceTemplateResponse -> Maybe Text)
-> (VoiceTemplateResponse -> Maybe Text -> VoiceTemplateResponse)
-> Lens
     VoiceTemplateResponse
     VoiceTemplateResponse
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\VoiceTemplateResponse' {Maybe Text
body :: Maybe Text
$sel:body:VoiceTemplateResponse' :: VoiceTemplateResponse -> Maybe Text
body} -> Maybe Text
body) (\s :: VoiceTemplateResponse
s@VoiceTemplateResponse' {} Maybe Text
a -> VoiceTemplateResponse
s {$sel:body:VoiceTemplateResponse' :: Maybe Text
body = Maybe Text
a} :: VoiceTemplateResponse)

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

-- | 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.
voiceTemplateResponse_defaultSubstitutions :: Lens.Lens' VoiceTemplateResponse (Prelude.Maybe Prelude.Text)
voiceTemplateResponse_defaultSubstitutions :: (Maybe Text -> f (Maybe Text))
-> VoiceTemplateResponse -> f VoiceTemplateResponse
voiceTemplateResponse_defaultSubstitutions = (VoiceTemplateResponse -> Maybe Text)
-> (VoiceTemplateResponse -> Maybe Text -> VoiceTemplateResponse)
-> Lens
     VoiceTemplateResponse
     VoiceTemplateResponse
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\VoiceTemplateResponse' {Maybe Text
defaultSubstitutions :: Maybe Text
$sel:defaultSubstitutions:VoiceTemplateResponse' :: VoiceTemplateResponse -> Maybe Text
defaultSubstitutions} -> Maybe Text
defaultSubstitutions) (\s :: VoiceTemplateResponse
s@VoiceTemplateResponse' {} Maybe Text
a -> VoiceTemplateResponse
s {$sel:defaultSubstitutions:VoiceTemplateResponse' :: Maybe Text
defaultSubstitutions = Maybe Text
a} :: VoiceTemplateResponse)

-- | 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.
voiceTemplateResponse_version :: Lens.Lens' VoiceTemplateResponse (Prelude.Maybe Prelude.Text)
voiceTemplateResponse_version :: (Maybe Text -> f (Maybe Text))
-> VoiceTemplateResponse -> f VoiceTemplateResponse
voiceTemplateResponse_version = (VoiceTemplateResponse -> Maybe Text)
-> (VoiceTemplateResponse -> Maybe Text -> VoiceTemplateResponse)
-> Lens
     VoiceTemplateResponse
     VoiceTemplateResponse
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\VoiceTemplateResponse' {Maybe Text
version :: Maybe Text
$sel:version:VoiceTemplateResponse' :: VoiceTemplateResponse -> Maybe Text
version} -> Maybe Text
version) (\s :: VoiceTemplateResponse
s@VoiceTemplateResponse' {} Maybe Text
a -> VoiceTemplateResponse
s {$sel:version:VoiceTemplateResponse' :: Maybe Text
version = Maybe Text
a} :: VoiceTemplateResponse)

-- | The name of the voice that\'s used when delivering messages that are
-- based on the message template. For a list of supported voices, see the
-- <https://docs.aws.amazon.com/polly/latest/dg/what-is.html Amazon Polly Developer Guide>.
voiceTemplateResponse_voiceId :: Lens.Lens' VoiceTemplateResponse (Prelude.Maybe Prelude.Text)
voiceTemplateResponse_voiceId :: (Maybe Text -> f (Maybe Text))
-> VoiceTemplateResponse -> f VoiceTemplateResponse
voiceTemplateResponse_voiceId = (VoiceTemplateResponse -> Maybe Text)
-> (VoiceTemplateResponse -> Maybe Text -> VoiceTemplateResponse)
-> Lens
     VoiceTemplateResponse
     VoiceTemplateResponse
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\VoiceTemplateResponse' {Maybe Text
voiceId :: Maybe Text
$sel:voiceId:VoiceTemplateResponse' :: VoiceTemplateResponse -> Maybe Text
voiceId} -> Maybe Text
voiceId) (\s :: VoiceTemplateResponse
s@VoiceTemplateResponse' {} Maybe Text
a -> VoiceTemplateResponse
s {$sel:voiceId:VoiceTemplateResponse' :: Maybe Text
voiceId = Maybe Text
a} :: VoiceTemplateResponse)

-- | 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.
voiceTemplateResponse_tags :: Lens.Lens' VoiceTemplateResponse (Prelude.Maybe (Prelude.HashMap Prelude.Text Prelude.Text))
voiceTemplateResponse_tags :: (Maybe (HashMap Text Text) -> f (Maybe (HashMap Text Text)))
-> VoiceTemplateResponse -> f VoiceTemplateResponse
voiceTemplateResponse_tags = (VoiceTemplateResponse -> Maybe (HashMap Text Text))
-> (VoiceTemplateResponse
    -> Maybe (HashMap Text Text) -> VoiceTemplateResponse)
-> Lens
     VoiceTemplateResponse
     VoiceTemplateResponse
     (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 (\VoiceTemplateResponse' {Maybe (HashMap Text Text)
tags :: Maybe (HashMap Text Text)
$sel:tags:VoiceTemplateResponse' :: VoiceTemplateResponse -> Maybe (HashMap Text Text)
tags} -> Maybe (HashMap Text Text)
tags) (\s :: VoiceTemplateResponse
s@VoiceTemplateResponse' {} Maybe (HashMap Text Text)
a -> VoiceTemplateResponse
s {$sel:tags:VoiceTemplateResponse' :: Maybe (HashMap Text Text)
tags = Maybe (HashMap Text Text)
a} :: VoiceTemplateResponse) ((Maybe (HashMap Text Text) -> f (Maybe (HashMap Text Text)))
 -> VoiceTemplateResponse -> f VoiceTemplateResponse)
-> ((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)))
-> VoiceTemplateResponse
-> f VoiceTemplateResponse
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.
voiceTemplateResponse_lastModifiedDate :: Lens.Lens' VoiceTemplateResponse Prelude.Text
voiceTemplateResponse_lastModifiedDate :: (Text -> f Text)
-> VoiceTemplateResponse -> f VoiceTemplateResponse
voiceTemplateResponse_lastModifiedDate = (VoiceTemplateResponse -> Text)
-> (VoiceTemplateResponse -> Text -> VoiceTemplateResponse)
-> Lens VoiceTemplateResponse VoiceTemplateResponse Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\VoiceTemplateResponse' {Text
lastModifiedDate :: Text
$sel:lastModifiedDate:VoiceTemplateResponse' :: VoiceTemplateResponse -> Text
lastModifiedDate} -> Text
lastModifiedDate) (\s :: VoiceTemplateResponse
s@VoiceTemplateResponse' {} Text
a -> VoiceTemplateResponse
s {$sel:lastModifiedDate:VoiceTemplateResponse' :: Text
lastModifiedDate = Text
a} :: VoiceTemplateResponse)

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

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

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

instance Core.FromJSON VoiceTemplateResponse where
  parseJSON :: Value -> Parser VoiceTemplateResponse
parseJSON =
    String
-> (Object -> Parser VoiceTemplateResponse)
-> Value
-> Parser VoiceTemplateResponse
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Core.withObject
      String
"VoiceTemplateResponse"
      ( \Object
x ->
          Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe (HashMap Text Text)
-> Text
-> Text
-> Text
-> TemplateType
-> VoiceTemplateResponse
VoiceTemplateResponse'
            (Maybe Text
 -> Maybe Text
 -> Maybe Text
 -> Maybe Text
 -> Maybe Text
 -> Maybe Text
 -> Maybe Text
 -> Maybe (HashMap Text Text)
 -> Text
 -> Text
 -> Text
 -> TemplateType
 -> VoiceTemplateResponse)
-> Parser (Maybe Text)
-> Parser
     (Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe (HashMap Text Text)
      -> Text
      -> Text
      -> Text
      -> TemplateType
      -> VoiceTemplateResponse)
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
"LanguageCode")
            Parser
  (Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe (HashMap Text Text)
   -> Text
   -> Text
   -> Text
   -> TemplateType
   -> VoiceTemplateResponse)
-> Parser (Maybe Text)
-> Parser
     (Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe (HashMap Text Text)
      -> Text
      -> Text
      -> Text
      -> TemplateType
      -> VoiceTemplateResponse)
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
"Arn")
            Parser
  (Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe (HashMap Text Text)
   -> Text
   -> Text
   -> Text
   -> TemplateType
   -> VoiceTemplateResponse)
-> Parser (Maybe Text)
-> Parser
     (Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe (HashMap Text Text)
      -> Text
      -> Text
      -> Text
      -> TemplateType
      -> VoiceTemplateResponse)
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
"Body")
            Parser
  (Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe (HashMap Text Text)
   -> Text
   -> Text
   -> Text
   -> TemplateType
   -> VoiceTemplateResponse)
-> Parser (Maybe Text)
-> Parser
     (Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe (HashMap Text Text)
      -> Text
      -> Text
      -> Text
      -> TemplateType
      -> VoiceTemplateResponse)
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 Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe (HashMap Text Text)
   -> Text
   -> Text
   -> Text
   -> TemplateType
   -> VoiceTemplateResponse)
-> Parser (Maybe Text)
-> Parser
     (Maybe Text
      -> Maybe Text
      -> Maybe (HashMap Text Text)
      -> Text
      -> Text
      -> Text
      -> TemplateType
      -> VoiceTemplateResponse)
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 Text
   -> Maybe (HashMap Text Text)
   -> Text
   -> Text
   -> Text
   -> TemplateType
   -> VoiceTemplateResponse)
-> Parser (Maybe Text)
-> Parser
     (Maybe Text
      -> Maybe (HashMap Text Text)
      -> Text
      -> Text
      -> Text
      -> TemplateType
      -> VoiceTemplateResponse)
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 Text
   -> Maybe (HashMap Text Text)
   -> Text
   -> Text
   -> Text
   -> TemplateType
   -> VoiceTemplateResponse)
-> Parser (Maybe Text)
-> Parser
     (Maybe (HashMap Text Text)
      -> Text -> Text -> Text -> TemplateType -> VoiceTemplateResponse)
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
"VoiceId")
            Parser
  (Maybe (HashMap Text Text)
   -> Text -> Text -> Text -> TemplateType -> VoiceTemplateResponse)
-> Parser (Maybe (HashMap Text Text))
-> Parser
     (Text -> Text -> Text -> TemplateType -> VoiceTemplateResponse)
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 -> Text -> TemplateType -> VoiceTemplateResponse)
-> Parser Text
-> Parser (Text -> Text -> TemplateType -> VoiceTemplateResponse)
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 -> Text -> TemplateType -> VoiceTemplateResponse)
-> Parser Text
-> Parser (Text -> TemplateType -> VoiceTemplateResponse)
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 (Text -> TemplateType -> VoiceTemplateResponse)
-> Parser Text -> Parser (TemplateType -> VoiceTemplateResponse)
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")
            Parser (TemplateType -> VoiceTemplateResponse)
-> Parser TemplateType -> Parser VoiceTemplateResponse
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")
      )

instance Prelude.Hashable VoiceTemplateResponse

instance Prelude.NFData VoiceTemplateResponse