{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE DuplicateRecordFields #-}
{-# LANGUAGE NamedFieldPuns #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE RecordWildCards #-}
{-# LANGUAGE StrictData #-}
{-# LANGUAGE TypeFamilies #-}
{-# LANGUAGE NoImplicitPrelude #-}
{-# OPTIONS_GHC -fno-warn-unused-binds #-}
{-# OPTIONS_GHC -fno-warn-unused-imports #-}
{-# OPTIONS_GHC -fno-warn-unused-matches #-}

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

-- |
-- Module      : Amazonka.Polly.StartSpeechSynthesisTask
-- 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)
--
-- Allows the creation of an asynchronous synthesis task, by starting a new
-- @SpeechSynthesisTask@. This operation requires all the standard
-- information needed for speech synthesis, plus the name of an Amazon S3
-- bucket for the service to store the output of the synthesis task and two
-- optional parameters (@OutputS3KeyPrefix@ and @SnsTopicArn@). Once the
-- synthesis task is created, this operation will return a
-- @SpeechSynthesisTask@ object, which will include an identifier of this
-- task as well as the current status. The @SpeechSynthesisTask@ object is
-- available for 72 hours after starting the asynchronous synthesis task.
module Amazonka.Polly.StartSpeechSynthesisTask
  ( -- * Creating a Request
    StartSpeechSynthesisTask (..),
    newStartSpeechSynthesisTask,

    -- * Request Lenses
    startSpeechSynthesisTask_languageCode,
    startSpeechSynthesisTask_snsTopicArn,
    startSpeechSynthesisTask_outputS3KeyPrefix,
    startSpeechSynthesisTask_engine,
    startSpeechSynthesisTask_speechMarkTypes,
    startSpeechSynthesisTask_sampleRate,
    startSpeechSynthesisTask_textType,
    startSpeechSynthesisTask_lexiconNames,
    startSpeechSynthesisTask_outputFormat,
    startSpeechSynthesisTask_outputS3BucketName,
    startSpeechSynthesisTask_text,
    startSpeechSynthesisTask_voiceId,

    -- * Destructuring the Response
    StartSpeechSynthesisTaskResponse (..),
    newStartSpeechSynthesisTaskResponse,

    -- * Response Lenses
    startSpeechSynthesisTaskResponse_synthesisTask,
    startSpeechSynthesisTaskResponse_httpStatus,
  )
where

import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import Amazonka.Polly.Types
import qualified Amazonka.Prelude as Prelude
import qualified Amazonka.Request as Request
import qualified Amazonka.Response as Response

-- | /See:/ 'newStartSpeechSynthesisTask' smart constructor.
data StartSpeechSynthesisTask = StartSpeechSynthesisTask'
  { -- | Optional language code for the Speech Synthesis request. This is only
    -- necessary if using a bilingual voice, such as Aditi, which can be used
    -- for either Indian English (en-IN) or Hindi (hi-IN).
    --
    -- If a bilingual voice is used and no language code is specified, Amazon
    -- Polly uses the default language of the bilingual voice. The default
    -- language for any voice is the one returned by the
    -- <https://docs.aws.amazon.com/polly/latest/dg/API_DescribeVoices.html DescribeVoices>
    -- operation for the @LanguageCode@ parameter. For example, if no language
    -- code is specified, Aditi will use Indian English rather than Hindi.
    StartSpeechSynthesisTask -> Maybe LanguageCode
languageCode :: Prelude.Maybe LanguageCode,
    -- | ARN for the SNS topic optionally used for providing status notification
    -- for a speech synthesis task.
    StartSpeechSynthesisTask -> Maybe Text
snsTopicArn :: Prelude.Maybe Prelude.Text,
    -- | The Amazon S3 key prefix for the output speech file.
    StartSpeechSynthesisTask -> Maybe Text
outputS3KeyPrefix :: Prelude.Maybe Prelude.Text,
    -- | Specifies the engine (@standard@ or @neural@) for Amazon Polly to use
    -- when processing input text for speech synthesis. Using a voice that is
    -- not supported for the engine selected will result in an error.
    StartSpeechSynthesisTask -> Maybe Engine
engine :: Prelude.Maybe Engine,
    -- | The type of speech marks returned for the input text.
    StartSpeechSynthesisTask -> Maybe [SpeechMarkType]
speechMarkTypes :: Prelude.Maybe [SpeechMarkType],
    -- | The audio frequency specified in Hz.
    --
    -- The valid values for mp3 and ogg_vorbis are \"8000\", \"16000\",
    -- \"22050\", and \"24000\". The default value for standard voices is
    -- \"22050\". The default value for neural voices is \"24000\".
    --
    -- Valid values for pcm are \"8000\" and \"16000\" The default value is
    -- \"16000\".
    StartSpeechSynthesisTask -> Maybe Text
sampleRate :: Prelude.Maybe Prelude.Text,
    -- | Specifies whether the input text is plain text or SSML. The default
    -- value is plain text.
    StartSpeechSynthesisTask -> Maybe TextType
textType :: Prelude.Maybe TextType,
    -- | List of one or more pronunciation lexicon names you want the service to
    -- apply during synthesis. Lexicons are applied only if the language of the
    -- lexicon is the same as the language of the voice.
    StartSpeechSynthesisTask -> Maybe [Text]
lexiconNames :: Prelude.Maybe [Prelude.Text],
    -- | The format in which the returned output will be encoded. For audio
    -- stream, this will be mp3, ogg_vorbis, or pcm. For speech marks, this
    -- will be json.
    StartSpeechSynthesisTask -> OutputFormat
outputFormat :: OutputFormat,
    -- | Amazon S3 bucket name to which the output file will be saved.
    StartSpeechSynthesisTask -> Text
outputS3BucketName :: Prelude.Text,
    -- | The input text to synthesize. If you specify ssml as the TextType,
    -- follow the SSML format for the input text.
    StartSpeechSynthesisTask -> Text
text :: Prelude.Text,
    -- | Voice ID to use for the synthesis.
    StartSpeechSynthesisTask -> VoiceId
voiceId :: VoiceId
  }
  deriving (StartSpeechSynthesisTask -> StartSpeechSynthesisTask -> Bool
(StartSpeechSynthesisTask -> StartSpeechSynthesisTask -> Bool)
-> (StartSpeechSynthesisTask -> StartSpeechSynthesisTask -> Bool)
-> Eq StartSpeechSynthesisTask
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: StartSpeechSynthesisTask -> StartSpeechSynthesisTask -> Bool
$c/= :: StartSpeechSynthesisTask -> StartSpeechSynthesisTask -> Bool
== :: StartSpeechSynthesisTask -> StartSpeechSynthesisTask -> Bool
$c== :: StartSpeechSynthesisTask -> StartSpeechSynthesisTask -> Bool
Prelude.Eq, ReadPrec [StartSpeechSynthesisTask]
ReadPrec StartSpeechSynthesisTask
Int -> ReadS StartSpeechSynthesisTask
ReadS [StartSpeechSynthesisTask]
(Int -> ReadS StartSpeechSynthesisTask)
-> ReadS [StartSpeechSynthesisTask]
-> ReadPrec StartSpeechSynthesisTask
-> ReadPrec [StartSpeechSynthesisTask]
-> Read StartSpeechSynthesisTask
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [StartSpeechSynthesisTask]
$creadListPrec :: ReadPrec [StartSpeechSynthesisTask]
readPrec :: ReadPrec StartSpeechSynthesisTask
$creadPrec :: ReadPrec StartSpeechSynthesisTask
readList :: ReadS [StartSpeechSynthesisTask]
$creadList :: ReadS [StartSpeechSynthesisTask]
readsPrec :: Int -> ReadS StartSpeechSynthesisTask
$creadsPrec :: Int -> ReadS StartSpeechSynthesisTask
Prelude.Read, Int -> StartSpeechSynthesisTask -> ShowS
[StartSpeechSynthesisTask] -> ShowS
StartSpeechSynthesisTask -> String
(Int -> StartSpeechSynthesisTask -> ShowS)
-> (StartSpeechSynthesisTask -> String)
-> ([StartSpeechSynthesisTask] -> ShowS)
-> Show StartSpeechSynthesisTask
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [StartSpeechSynthesisTask] -> ShowS
$cshowList :: [StartSpeechSynthesisTask] -> ShowS
show :: StartSpeechSynthesisTask -> String
$cshow :: StartSpeechSynthesisTask -> String
showsPrec :: Int -> StartSpeechSynthesisTask -> ShowS
$cshowsPrec :: Int -> StartSpeechSynthesisTask -> ShowS
Prelude.Show, (forall x.
 StartSpeechSynthesisTask -> Rep StartSpeechSynthesisTask x)
-> (forall x.
    Rep StartSpeechSynthesisTask x -> StartSpeechSynthesisTask)
-> Generic StartSpeechSynthesisTask
forall x.
Rep StartSpeechSynthesisTask x -> StartSpeechSynthesisTask
forall x.
StartSpeechSynthesisTask -> Rep StartSpeechSynthesisTask x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep StartSpeechSynthesisTask x -> StartSpeechSynthesisTask
$cfrom :: forall x.
StartSpeechSynthesisTask -> Rep StartSpeechSynthesisTask x
Prelude.Generic)

-- |
-- Create a value of 'StartSpeechSynthesisTask' 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', 'startSpeechSynthesisTask_languageCode' - Optional language code for the Speech Synthesis request. This is only
-- necessary if using a bilingual voice, such as Aditi, which can be used
-- for either Indian English (en-IN) or Hindi (hi-IN).
--
-- If a bilingual voice is used and no language code is specified, Amazon
-- Polly uses the default language of the bilingual voice. The default
-- language for any voice is the one returned by the
-- <https://docs.aws.amazon.com/polly/latest/dg/API_DescribeVoices.html DescribeVoices>
-- operation for the @LanguageCode@ parameter. For example, if no language
-- code is specified, Aditi will use Indian English rather than Hindi.
--
-- 'snsTopicArn', 'startSpeechSynthesisTask_snsTopicArn' - ARN for the SNS topic optionally used for providing status notification
-- for a speech synthesis task.
--
-- 'outputS3KeyPrefix', 'startSpeechSynthesisTask_outputS3KeyPrefix' - The Amazon S3 key prefix for the output speech file.
--
-- 'engine', 'startSpeechSynthesisTask_engine' - Specifies the engine (@standard@ or @neural@) for Amazon Polly to use
-- when processing input text for speech synthesis. Using a voice that is
-- not supported for the engine selected will result in an error.
--
-- 'speechMarkTypes', 'startSpeechSynthesisTask_speechMarkTypes' - The type of speech marks returned for the input text.
--
-- 'sampleRate', 'startSpeechSynthesisTask_sampleRate' - The audio frequency specified in Hz.
--
-- The valid values for mp3 and ogg_vorbis are \"8000\", \"16000\",
-- \"22050\", and \"24000\". The default value for standard voices is
-- \"22050\". The default value for neural voices is \"24000\".
--
-- Valid values for pcm are \"8000\" and \"16000\" The default value is
-- \"16000\".
--
-- 'textType', 'startSpeechSynthesisTask_textType' - Specifies whether the input text is plain text or SSML. The default
-- value is plain text.
--
-- 'lexiconNames', 'startSpeechSynthesisTask_lexiconNames' - List of one or more pronunciation lexicon names you want the service to
-- apply during synthesis. Lexicons are applied only if the language of the
-- lexicon is the same as the language of the voice.
--
-- 'outputFormat', 'startSpeechSynthesisTask_outputFormat' - The format in which the returned output will be encoded. For audio
-- stream, this will be mp3, ogg_vorbis, or pcm. For speech marks, this
-- will be json.
--
-- 'outputS3BucketName', 'startSpeechSynthesisTask_outputS3BucketName' - Amazon S3 bucket name to which the output file will be saved.
--
-- 'text', 'startSpeechSynthesisTask_text' - The input text to synthesize. If you specify ssml as the TextType,
-- follow the SSML format for the input text.
--
-- 'voiceId', 'startSpeechSynthesisTask_voiceId' - Voice ID to use for the synthesis.
newStartSpeechSynthesisTask ::
  -- | 'outputFormat'
  OutputFormat ->
  -- | 'outputS3BucketName'
  Prelude.Text ->
  -- | 'text'
  Prelude.Text ->
  -- | 'voiceId'
  VoiceId ->
  StartSpeechSynthesisTask
newStartSpeechSynthesisTask :: OutputFormat -> Text -> Text -> VoiceId -> StartSpeechSynthesisTask
newStartSpeechSynthesisTask
  OutputFormat
pOutputFormat_
  Text
pOutputS3BucketName_
  Text
pText_
  VoiceId
pVoiceId_ =
    StartSpeechSynthesisTask' :: Maybe LanguageCode
-> Maybe Text
-> Maybe Text
-> Maybe Engine
-> Maybe [SpeechMarkType]
-> Maybe Text
-> Maybe TextType
-> Maybe [Text]
-> OutputFormat
-> Text
-> Text
-> VoiceId
-> StartSpeechSynthesisTask
StartSpeechSynthesisTask'
      { $sel:languageCode:StartSpeechSynthesisTask' :: Maybe LanguageCode
languageCode =
          Maybe LanguageCode
forall a. Maybe a
Prelude.Nothing,
        $sel:snsTopicArn:StartSpeechSynthesisTask' :: Maybe Text
snsTopicArn = Maybe Text
forall a. Maybe a
Prelude.Nothing,
        $sel:outputS3KeyPrefix:StartSpeechSynthesisTask' :: Maybe Text
outputS3KeyPrefix = Maybe Text
forall a. Maybe a
Prelude.Nothing,
        $sel:engine:StartSpeechSynthesisTask' :: Maybe Engine
engine = Maybe Engine
forall a. Maybe a
Prelude.Nothing,
        $sel:speechMarkTypes:StartSpeechSynthesisTask' :: Maybe [SpeechMarkType]
speechMarkTypes = Maybe [SpeechMarkType]
forall a. Maybe a
Prelude.Nothing,
        $sel:sampleRate:StartSpeechSynthesisTask' :: Maybe Text
sampleRate = Maybe Text
forall a. Maybe a
Prelude.Nothing,
        $sel:textType:StartSpeechSynthesisTask' :: Maybe TextType
textType = Maybe TextType
forall a. Maybe a
Prelude.Nothing,
        $sel:lexiconNames:StartSpeechSynthesisTask' :: Maybe [Text]
lexiconNames = Maybe [Text]
forall a. Maybe a
Prelude.Nothing,
        $sel:outputFormat:StartSpeechSynthesisTask' :: OutputFormat
outputFormat = OutputFormat
pOutputFormat_,
        $sel:outputS3BucketName:StartSpeechSynthesisTask' :: Text
outputS3BucketName = Text
pOutputS3BucketName_,
        $sel:text:StartSpeechSynthesisTask' :: Text
text = Text
pText_,
        $sel:voiceId:StartSpeechSynthesisTask' :: VoiceId
voiceId = VoiceId
pVoiceId_
      }

-- | Optional language code for the Speech Synthesis request. This is only
-- necessary if using a bilingual voice, such as Aditi, which can be used
-- for either Indian English (en-IN) or Hindi (hi-IN).
--
-- If a bilingual voice is used and no language code is specified, Amazon
-- Polly uses the default language of the bilingual voice. The default
-- language for any voice is the one returned by the
-- <https://docs.aws.amazon.com/polly/latest/dg/API_DescribeVoices.html DescribeVoices>
-- operation for the @LanguageCode@ parameter. For example, if no language
-- code is specified, Aditi will use Indian English rather than Hindi.
startSpeechSynthesisTask_languageCode :: Lens.Lens' StartSpeechSynthesisTask (Prelude.Maybe LanguageCode)
startSpeechSynthesisTask_languageCode :: (Maybe LanguageCode -> f (Maybe LanguageCode))
-> StartSpeechSynthesisTask -> f StartSpeechSynthesisTask
startSpeechSynthesisTask_languageCode = (StartSpeechSynthesisTask -> Maybe LanguageCode)
-> (StartSpeechSynthesisTask
    -> Maybe LanguageCode -> StartSpeechSynthesisTask)
-> Lens
     StartSpeechSynthesisTask
     StartSpeechSynthesisTask
     (Maybe LanguageCode)
     (Maybe LanguageCode)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\StartSpeechSynthesisTask' {Maybe LanguageCode
languageCode :: Maybe LanguageCode
$sel:languageCode:StartSpeechSynthesisTask' :: StartSpeechSynthesisTask -> Maybe LanguageCode
languageCode} -> Maybe LanguageCode
languageCode) (\s :: StartSpeechSynthesisTask
s@StartSpeechSynthesisTask' {} Maybe LanguageCode
a -> StartSpeechSynthesisTask
s {$sel:languageCode:StartSpeechSynthesisTask' :: Maybe LanguageCode
languageCode = Maybe LanguageCode
a} :: StartSpeechSynthesisTask)

-- | ARN for the SNS topic optionally used for providing status notification
-- for a speech synthesis task.
startSpeechSynthesisTask_snsTopicArn :: Lens.Lens' StartSpeechSynthesisTask (Prelude.Maybe Prelude.Text)
startSpeechSynthesisTask_snsTopicArn :: (Maybe Text -> f (Maybe Text))
-> StartSpeechSynthesisTask -> f StartSpeechSynthesisTask
startSpeechSynthesisTask_snsTopicArn = (StartSpeechSynthesisTask -> Maybe Text)
-> (StartSpeechSynthesisTask
    -> Maybe Text -> StartSpeechSynthesisTask)
-> Lens
     StartSpeechSynthesisTask
     StartSpeechSynthesisTask
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\StartSpeechSynthesisTask' {Maybe Text
snsTopicArn :: Maybe Text
$sel:snsTopicArn:StartSpeechSynthesisTask' :: StartSpeechSynthesisTask -> Maybe Text
snsTopicArn} -> Maybe Text
snsTopicArn) (\s :: StartSpeechSynthesisTask
s@StartSpeechSynthesisTask' {} Maybe Text
a -> StartSpeechSynthesisTask
s {$sel:snsTopicArn:StartSpeechSynthesisTask' :: Maybe Text
snsTopicArn = Maybe Text
a} :: StartSpeechSynthesisTask)

-- | The Amazon S3 key prefix for the output speech file.
startSpeechSynthesisTask_outputS3KeyPrefix :: Lens.Lens' StartSpeechSynthesisTask (Prelude.Maybe Prelude.Text)
startSpeechSynthesisTask_outputS3KeyPrefix :: (Maybe Text -> f (Maybe Text))
-> StartSpeechSynthesisTask -> f StartSpeechSynthesisTask
startSpeechSynthesisTask_outputS3KeyPrefix = (StartSpeechSynthesisTask -> Maybe Text)
-> (StartSpeechSynthesisTask
    -> Maybe Text -> StartSpeechSynthesisTask)
-> Lens
     StartSpeechSynthesisTask
     StartSpeechSynthesisTask
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\StartSpeechSynthesisTask' {Maybe Text
outputS3KeyPrefix :: Maybe Text
$sel:outputS3KeyPrefix:StartSpeechSynthesisTask' :: StartSpeechSynthesisTask -> Maybe Text
outputS3KeyPrefix} -> Maybe Text
outputS3KeyPrefix) (\s :: StartSpeechSynthesisTask
s@StartSpeechSynthesisTask' {} Maybe Text
a -> StartSpeechSynthesisTask
s {$sel:outputS3KeyPrefix:StartSpeechSynthesisTask' :: Maybe Text
outputS3KeyPrefix = Maybe Text
a} :: StartSpeechSynthesisTask)

-- | Specifies the engine (@standard@ or @neural@) for Amazon Polly to use
-- when processing input text for speech synthesis. Using a voice that is
-- not supported for the engine selected will result in an error.
startSpeechSynthesisTask_engine :: Lens.Lens' StartSpeechSynthesisTask (Prelude.Maybe Engine)
startSpeechSynthesisTask_engine :: (Maybe Engine -> f (Maybe Engine))
-> StartSpeechSynthesisTask -> f StartSpeechSynthesisTask
startSpeechSynthesisTask_engine = (StartSpeechSynthesisTask -> Maybe Engine)
-> (StartSpeechSynthesisTask
    -> Maybe Engine -> StartSpeechSynthesisTask)
-> Lens
     StartSpeechSynthesisTask
     StartSpeechSynthesisTask
     (Maybe Engine)
     (Maybe Engine)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\StartSpeechSynthesisTask' {Maybe Engine
engine :: Maybe Engine
$sel:engine:StartSpeechSynthesisTask' :: StartSpeechSynthesisTask -> Maybe Engine
engine} -> Maybe Engine
engine) (\s :: StartSpeechSynthesisTask
s@StartSpeechSynthesisTask' {} Maybe Engine
a -> StartSpeechSynthesisTask
s {$sel:engine:StartSpeechSynthesisTask' :: Maybe Engine
engine = Maybe Engine
a} :: StartSpeechSynthesisTask)

-- | The type of speech marks returned for the input text.
startSpeechSynthesisTask_speechMarkTypes :: Lens.Lens' StartSpeechSynthesisTask (Prelude.Maybe [SpeechMarkType])
startSpeechSynthesisTask_speechMarkTypes :: (Maybe [SpeechMarkType] -> f (Maybe [SpeechMarkType]))
-> StartSpeechSynthesisTask -> f StartSpeechSynthesisTask
startSpeechSynthesisTask_speechMarkTypes = (StartSpeechSynthesisTask -> Maybe [SpeechMarkType])
-> (StartSpeechSynthesisTask
    -> Maybe [SpeechMarkType] -> StartSpeechSynthesisTask)
-> Lens
     StartSpeechSynthesisTask
     StartSpeechSynthesisTask
     (Maybe [SpeechMarkType])
     (Maybe [SpeechMarkType])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\StartSpeechSynthesisTask' {Maybe [SpeechMarkType]
speechMarkTypes :: Maybe [SpeechMarkType]
$sel:speechMarkTypes:StartSpeechSynthesisTask' :: StartSpeechSynthesisTask -> Maybe [SpeechMarkType]
speechMarkTypes} -> Maybe [SpeechMarkType]
speechMarkTypes) (\s :: StartSpeechSynthesisTask
s@StartSpeechSynthesisTask' {} Maybe [SpeechMarkType]
a -> StartSpeechSynthesisTask
s {$sel:speechMarkTypes:StartSpeechSynthesisTask' :: Maybe [SpeechMarkType]
speechMarkTypes = Maybe [SpeechMarkType]
a} :: StartSpeechSynthesisTask) ((Maybe [SpeechMarkType] -> f (Maybe [SpeechMarkType]))
 -> StartSpeechSynthesisTask -> f StartSpeechSynthesisTask)
-> ((Maybe [SpeechMarkType] -> f (Maybe [SpeechMarkType]))
    -> Maybe [SpeechMarkType] -> f (Maybe [SpeechMarkType]))
-> (Maybe [SpeechMarkType] -> f (Maybe [SpeechMarkType]))
-> StartSpeechSynthesisTask
-> f StartSpeechSynthesisTask
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso
  [SpeechMarkType] [SpeechMarkType] [SpeechMarkType] [SpeechMarkType]
-> Iso
     (Maybe [SpeechMarkType])
     (Maybe [SpeechMarkType])
     (Maybe [SpeechMarkType])
     (Maybe [SpeechMarkType])
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
  [SpeechMarkType] [SpeechMarkType] [SpeechMarkType] [SpeechMarkType]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

-- | The audio frequency specified in Hz.
--
-- The valid values for mp3 and ogg_vorbis are \"8000\", \"16000\",
-- \"22050\", and \"24000\". The default value for standard voices is
-- \"22050\". The default value for neural voices is \"24000\".
--
-- Valid values for pcm are \"8000\" and \"16000\" The default value is
-- \"16000\".
startSpeechSynthesisTask_sampleRate :: Lens.Lens' StartSpeechSynthesisTask (Prelude.Maybe Prelude.Text)
startSpeechSynthesisTask_sampleRate :: (Maybe Text -> f (Maybe Text))
-> StartSpeechSynthesisTask -> f StartSpeechSynthesisTask
startSpeechSynthesisTask_sampleRate = (StartSpeechSynthesisTask -> Maybe Text)
-> (StartSpeechSynthesisTask
    -> Maybe Text -> StartSpeechSynthesisTask)
-> Lens
     StartSpeechSynthesisTask
     StartSpeechSynthesisTask
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\StartSpeechSynthesisTask' {Maybe Text
sampleRate :: Maybe Text
$sel:sampleRate:StartSpeechSynthesisTask' :: StartSpeechSynthesisTask -> Maybe Text
sampleRate} -> Maybe Text
sampleRate) (\s :: StartSpeechSynthesisTask
s@StartSpeechSynthesisTask' {} Maybe Text
a -> StartSpeechSynthesisTask
s {$sel:sampleRate:StartSpeechSynthesisTask' :: Maybe Text
sampleRate = Maybe Text
a} :: StartSpeechSynthesisTask)

-- | Specifies whether the input text is plain text or SSML. The default
-- value is plain text.
startSpeechSynthesisTask_textType :: Lens.Lens' StartSpeechSynthesisTask (Prelude.Maybe TextType)
startSpeechSynthesisTask_textType :: (Maybe TextType -> f (Maybe TextType))
-> StartSpeechSynthesisTask -> f StartSpeechSynthesisTask
startSpeechSynthesisTask_textType = (StartSpeechSynthesisTask -> Maybe TextType)
-> (StartSpeechSynthesisTask
    -> Maybe TextType -> StartSpeechSynthesisTask)
-> Lens
     StartSpeechSynthesisTask
     StartSpeechSynthesisTask
     (Maybe TextType)
     (Maybe TextType)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\StartSpeechSynthesisTask' {Maybe TextType
textType :: Maybe TextType
$sel:textType:StartSpeechSynthesisTask' :: StartSpeechSynthesisTask -> Maybe TextType
textType} -> Maybe TextType
textType) (\s :: StartSpeechSynthesisTask
s@StartSpeechSynthesisTask' {} Maybe TextType
a -> StartSpeechSynthesisTask
s {$sel:textType:StartSpeechSynthesisTask' :: Maybe TextType
textType = Maybe TextType
a} :: StartSpeechSynthesisTask)

-- | List of one or more pronunciation lexicon names you want the service to
-- apply during synthesis. Lexicons are applied only if the language of the
-- lexicon is the same as the language of the voice.
startSpeechSynthesisTask_lexiconNames :: Lens.Lens' StartSpeechSynthesisTask (Prelude.Maybe [Prelude.Text])
startSpeechSynthesisTask_lexiconNames :: (Maybe [Text] -> f (Maybe [Text]))
-> StartSpeechSynthesisTask -> f StartSpeechSynthesisTask
startSpeechSynthesisTask_lexiconNames = (StartSpeechSynthesisTask -> Maybe [Text])
-> (StartSpeechSynthesisTask
    -> Maybe [Text] -> StartSpeechSynthesisTask)
-> Lens
     StartSpeechSynthesisTask
     StartSpeechSynthesisTask
     (Maybe [Text])
     (Maybe [Text])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\StartSpeechSynthesisTask' {Maybe [Text]
lexiconNames :: Maybe [Text]
$sel:lexiconNames:StartSpeechSynthesisTask' :: StartSpeechSynthesisTask -> Maybe [Text]
lexiconNames} -> Maybe [Text]
lexiconNames) (\s :: StartSpeechSynthesisTask
s@StartSpeechSynthesisTask' {} Maybe [Text]
a -> StartSpeechSynthesisTask
s {$sel:lexiconNames:StartSpeechSynthesisTask' :: Maybe [Text]
lexiconNames = Maybe [Text]
a} :: StartSpeechSynthesisTask) ((Maybe [Text] -> f (Maybe [Text]))
 -> StartSpeechSynthesisTask -> f StartSpeechSynthesisTask)
-> ((Maybe [Text] -> f (Maybe [Text]))
    -> Maybe [Text] -> f (Maybe [Text]))
-> (Maybe [Text] -> f (Maybe [Text]))
-> StartSpeechSynthesisTask
-> f StartSpeechSynthesisTask
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso [Text] [Text] [Text] [Text]
-> Iso (Maybe [Text]) (Maybe [Text]) (Maybe [Text]) (Maybe [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 [Text] [Text] [Text] [Text]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

-- | The format in which the returned output will be encoded. For audio
-- stream, this will be mp3, ogg_vorbis, or pcm. For speech marks, this
-- will be json.
startSpeechSynthesisTask_outputFormat :: Lens.Lens' StartSpeechSynthesisTask OutputFormat
startSpeechSynthesisTask_outputFormat :: (OutputFormat -> f OutputFormat)
-> StartSpeechSynthesisTask -> f StartSpeechSynthesisTask
startSpeechSynthesisTask_outputFormat = (StartSpeechSynthesisTask -> OutputFormat)
-> (StartSpeechSynthesisTask
    -> OutputFormat -> StartSpeechSynthesisTask)
-> Lens
     StartSpeechSynthesisTask
     StartSpeechSynthesisTask
     OutputFormat
     OutputFormat
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\StartSpeechSynthesisTask' {OutputFormat
outputFormat :: OutputFormat
$sel:outputFormat:StartSpeechSynthesisTask' :: StartSpeechSynthesisTask -> OutputFormat
outputFormat} -> OutputFormat
outputFormat) (\s :: StartSpeechSynthesisTask
s@StartSpeechSynthesisTask' {} OutputFormat
a -> StartSpeechSynthesisTask
s {$sel:outputFormat:StartSpeechSynthesisTask' :: OutputFormat
outputFormat = OutputFormat
a} :: StartSpeechSynthesisTask)

-- | Amazon S3 bucket name to which the output file will be saved.
startSpeechSynthesisTask_outputS3BucketName :: Lens.Lens' StartSpeechSynthesisTask Prelude.Text
startSpeechSynthesisTask_outputS3BucketName :: (Text -> f Text)
-> StartSpeechSynthesisTask -> f StartSpeechSynthesisTask
startSpeechSynthesisTask_outputS3BucketName = (StartSpeechSynthesisTask -> Text)
-> (StartSpeechSynthesisTask -> Text -> StartSpeechSynthesisTask)
-> Lens StartSpeechSynthesisTask StartSpeechSynthesisTask Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\StartSpeechSynthesisTask' {Text
outputS3BucketName :: Text
$sel:outputS3BucketName:StartSpeechSynthesisTask' :: StartSpeechSynthesisTask -> Text
outputS3BucketName} -> Text
outputS3BucketName) (\s :: StartSpeechSynthesisTask
s@StartSpeechSynthesisTask' {} Text
a -> StartSpeechSynthesisTask
s {$sel:outputS3BucketName:StartSpeechSynthesisTask' :: Text
outputS3BucketName = Text
a} :: StartSpeechSynthesisTask)

-- | The input text to synthesize. If you specify ssml as the TextType,
-- follow the SSML format for the input text.
startSpeechSynthesisTask_text :: Lens.Lens' StartSpeechSynthesisTask Prelude.Text
startSpeechSynthesisTask_text :: (Text -> f Text)
-> StartSpeechSynthesisTask -> f StartSpeechSynthesisTask
startSpeechSynthesisTask_text = (StartSpeechSynthesisTask -> Text)
-> (StartSpeechSynthesisTask -> Text -> StartSpeechSynthesisTask)
-> Lens StartSpeechSynthesisTask StartSpeechSynthesisTask Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\StartSpeechSynthesisTask' {Text
text :: Text
$sel:text:StartSpeechSynthesisTask' :: StartSpeechSynthesisTask -> Text
text} -> Text
text) (\s :: StartSpeechSynthesisTask
s@StartSpeechSynthesisTask' {} Text
a -> StartSpeechSynthesisTask
s {$sel:text:StartSpeechSynthesisTask' :: Text
text = Text
a} :: StartSpeechSynthesisTask)

-- | Voice ID to use for the synthesis.
startSpeechSynthesisTask_voiceId :: Lens.Lens' StartSpeechSynthesisTask VoiceId
startSpeechSynthesisTask_voiceId :: (VoiceId -> f VoiceId)
-> StartSpeechSynthesisTask -> f StartSpeechSynthesisTask
startSpeechSynthesisTask_voiceId = (StartSpeechSynthesisTask -> VoiceId)
-> (StartSpeechSynthesisTask
    -> VoiceId -> StartSpeechSynthesisTask)
-> Lens
     StartSpeechSynthesisTask StartSpeechSynthesisTask VoiceId VoiceId
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\StartSpeechSynthesisTask' {VoiceId
voiceId :: VoiceId
$sel:voiceId:StartSpeechSynthesisTask' :: StartSpeechSynthesisTask -> VoiceId
voiceId} -> VoiceId
voiceId) (\s :: StartSpeechSynthesisTask
s@StartSpeechSynthesisTask' {} VoiceId
a -> StartSpeechSynthesisTask
s {$sel:voiceId:StartSpeechSynthesisTask' :: VoiceId
voiceId = VoiceId
a} :: StartSpeechSynthesisTask)

instance Core.AWSRequest StartSpeechSynthesisTask where
  type
    AWSResponse StartSpeechSynthesisTask =
      StartSpeechSynthesisTaskResponse
  request :: StartSpeechSynthesisTask -> Request StartSpeechSynthesisTask
request = Service
-> StartSpeechSynthesisTask -> Request StartSpeechSynthesisTask
forall a. (ToRequest a, ToJSON a) => Service -> a -> Request a
Request.postJSON Service
defaultService
  response :: Logger
-> Service
-> Proxy StartSpeechSynthesisTask
-> ClientResponse ClientBody
-> m (Either
        Error (ClientResponse (AWSResponse StartSpeechSynthesisTask)))
response =
    (Int
 -> ResponseHeaders
 -> Object
 -> Either String (AWSResponse StartSpeechSynthesisTask))
-> Logger
-> Service
-> Proxy StartSpeechSynthesisTask
-> ClientResponse ClientBody
-> m (Either
        Error (ClientResponse (AWSResponse StartSpeechSynthesisTask)))
forall (m :: * -> *) a.
MonadResource m =>
(Int -> ResponseHeaders -> Object -> Either String (AWSResponse a))
-> Logger
-> Service
-> Proxy a
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse a)))
Response.receiveJSON
      ( \Int
s ResponseHeaders
h Object
x ->
          Maybe SynthesisTask -> Int -> StartSpeechSynthesisTaskResponse
StartSpeechSynthesisTaskResponse'
            (Maybe SynthesisTask -> Int -> StartSpeechSynthesisTaskResponse)
-> Either String (Maybe SynthesisTask)
-> Either String (Int -> StartSpeechSynthesisTaskResponse)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x Object -> Text -> Either String (Maybe SynthesisTask)
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"SynthesisTask")
            Either String (Int -> StartSpeechSynthesisTaskResponse)
-> Either String Int
-> Either String StartSpeechSynthesisTaskResponse
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Int -> Either String Int
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure (Int -> Int
forall a. Enum a => a -> Int
Prelude.fromEnum Int
s))
      )

instance Prelude.Hashable StartSpeechSynthesisTask

instance Prelude.NFData StartSpeechSynthesisTask

instance Core.ToHeaders StartSpeechSynthesisTask where
  toHeaders :: StartSpeechSynthesisTask -> ResponseHeaders
toHeaders = ResponseHeaders -> StartSpeechSynthesisTask -> ResponseHeaders
forall a b. a -> b -> a
Prelude.const ResponseHeaders
forall a. Monoid a => a
Prelude.mempty

instance Core.ToJSON StartSpeechSynthesisTask where
  toJSON :: StartSpeechSynthesisTask -> Value
toJSON StartSpeechSynthesisTask' {Maybe [Text]
Maybe [SpeechMarkType]
Maybe Text
Maybe Engine
Maybe LanguageCode
Maybe TextType
Text
OutputFormat
VoiceId
voiceId :: VoiceId
text :: Text
outputS3BucketName :: Text
outputFormat :: OutputFormat
lexiconNames :: Maybe [Text]
textType :: Maybe TextType
sampleRate :: Maybe Text
speechMarkTypes :: Maybe [SpeechMarkType]
engine :: Maybe Engine
outputS3KeyPrefix :: Maybe Text
snsTopicArn :: Maybe Text
languageCode :: Maybe LanguageCode
$sel:voiceId:StartSpeechSynthesisTask' :: StartSpeechSynthesisTask -> VoiceId
$sel:text:StartSpeechSynthesisTask' :: StartSpeechSynthesisTask -> Text
$sel:outputS3BucketName:StartSpeechSynthesisTask' :: StartSpeechSynthesisTask -> Text
$sel:outputFormat:StartSpeechSynthesisTask' :: StartSpeechSynthesisTask -> OutputFormat
$sel:lexiconNames:StartSpeechSynthesisTask' :: StartSpeechSynthesisTask -> Maybe [Text]
$sel:textType:StartSpeechSynthesisTask' :: StartSpeechSynthesisTask -> Maybe TextType
$sel:sampleRate:StartSpeechSynthesisTask' :: StartSpeechSynthesisTask -> Maybe Text
$sel:speechMarkTypes:StartSpeechSynthesisTask' :: StartSpeechSynthesisTask -> Maybe [SpeechMarkType]
$sel:engine:StartSpeechSynthesisTask' :: StartSpeechSynthesisTask -> Maybe Engine
$sel:outputS3KeyPrefix:StartSpeechSynthesisTask' :: StartSpeechSynthesisTask -> Maybe Text
$sel:snsTopicArn:StartSpeechSynthesisTask' :: StartSpeechSynthesisTask -> Maybe Text
$sel:languageCode:StartSpeechSynthesisTask' :: StartSpeechSynthesisTask -> Maybe LanguageCode
..} =
    [Pair] -> Value
Core.object
      ( [Maybe Pair] -> [Pair]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
          [ (Text
"LanguageCode" Text -> LanguageCode -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (LanguageCode -> Pair) -> Maybe LanguageCode -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe LanguageCode
languageCode,
            (Text
"SnsTopicArn" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (Text -> Pair) -> Maybe Text -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Text
snsTopicArn,
            (Text
"OutputS3KeyPrefix" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=)
              (Text -> Pair) -> Maybe Text -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Text
outputS3KeyPrefix,
            (Text
"Engine" Text -> Engine -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (Engine -> Pair) -> Maybe Engine -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Engine
engine,
            (Text
"SpeechMarkTypes" Text -> [SpeechMarkType] -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=)
              ([SpeechMarkType] -> Pair) -> Maybe [SpeechMarkType] -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe [SpeechMarkType]
speechMarkTypes,
            (Text
"SampleRate" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (Text -> Pair) -> Maybe Text -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Text
sampleRate,
            (Text
"TextType" Text -> TextType -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (TextType -> Pair) -> Maybe TextType -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe TextType
textType,
            (Text
"LexiconNames" Text -> [Text] -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) ([Text] -> Pair) -> Maybe [Text] -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe [Text]
lexiconNames,
            Pair -> Maybe Pair
forall a. a -> Maybe a
Prelude.Just (Text
"OutputFormat" Text -> OutputFormat -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= OutputFormat
outputFormat),
            Pair -> Maybe Pair
forall a. a -> Maybe a
Prelude.Just
              (Text
"OutputS3BucketName" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= Text
outputS3BucketName),
            Pair -> Maybe Pair
forall a. a -> Maybe a
Prelude.Just (Text
"Text" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= Text
text),
            Pair -> Maybe Pair
forall a. a -> Maybe a
Prelude.Just (Text
"VoiceId" Text -> VoiceId -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= VoiceId
voiceId)
          ]
      )

instance Core.ToPath StartSpeechSynthesisTask where
  toPath :: StartSpeechSynthesisTask -> ByteString
toPath = ByteString -> StartSpeechSynthesisTask -> ByteString
forall a b. a -> b -> a
Prelude.const ByteString
"/v1/synthesisTasks"

instance Core.ToQuery StartSpeechSynthesisTask where
  toQuery :: StartSpeechSynthesisTask -> QueryString
toQuery = QueryString -> StartSpeechSynthesisTask -> QueryString
forall a b. a -> b -> a
Prelude.const QueryString
forall a. Monoid a => a
Prelude.mempty

-- | /See:/ 'newStartSpeechSynthesisTaskResponse' smart constructor.
data StartSpeechSynthesisTaskResponse = StartSpeechSynthesisTaskResponse'
  { -- | SynthesisTask object that provides information and attributes about a
    -- newly submitted speech synthesis task.
    StartSpeechSynthesisTaskResponse -> Maybe SynthesisTask
synthesisTask :: Prelude.Maybe SynthesisTask,
    -- | The response's http status code.
    StartSpeechSynthesisTaskResponse -> Int
httpStatus :: Prelude.Int
  }
  deriving (StartSpeechSynthesisTaskResponse
-> StartSpeechSynthesisTaskResponse -> Bool
(StartSpeechSynthesisTaskResponse
 -> StartSpeechSynthesisTaskResponse -> Bool)
-> (StartSpeechSynthesisTaskResponse
    -> StartSpeechSynthesisTaskResponse -> Bool)
-> Eq StartSpeechSynthesisTaskResponse
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: StartSpeechSynthesisTaskResponse
-> StartSpeechSynthesisTaskResponse -> Bool
$c/= :: StartSpeechSynthesisTaskResponse
-> StartSpeechSynthesisTaskResponse -> Bool
== :: StartSpeechSynthesisTaskResponse
-> StartSpeechSynthesisTaskResponse -> Bool
$c== :: StartSpeechSynthesisTaskResponse
-> StartSpeechSynthesisTaskResponse -> Bool
Prelude.Eq, ReadPrec [StartSpeechSynthesisTaskResponse]
ReadPrec StartSpeechSynthesisTaskResponse
Int -> ReadS StartSpeechSynthesisTaskResponse
ReadS [StartSpeechSynthesisTaskResponse]
(Int -> ReadS StartSpeechSynthesisTaskResponse)
-> ReadS [StartSpeechSynthesisTaskResponse]
-> ReadPrec StartSpeechSynthesisTaskResponse
-> ReadPrec [StartSpeechSynthesisTaskResponse]
-> Read StartSpeechSynthesisTaskResponse
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [StartSpeechSynthesisTaskResponse]
$creadListPrec :: ReadPrec [StartSpeechSynthesisTaskResponse]
readPrec :: ReadPrec StartSpeechSynthesisTaskResponse
$creadPrec :: ReadPrec StartSpeechSynthesisTaskResponse
readList :: ReadS [StartSpeechSynthesisTaskResponse]
$creadList :: ReadS [StartSpeechSynthesisTaskResponse]
readsPrec :: Int -> ReadS StartSpeechSynthesisTaskResponse
$creadsPrec :: Int -> ReadS StartSpeechSynthesisTaskResponse
Prelude.Read, Int -> StartSpeechSynthesisTaskResponse -> ShowS
[StartSpeechSynthesisTaskResponse] -> ShowS
StartSpeechSynthesisTaskResponse -> String
(Int -> StartSpeechSynthesisTaskResponse -> ShowS)
-> (StartSpeechSynthesisTaskResponse -> String)
-> ([StartSpeechSynthesisTaskResponse] -> ShowS)
-> Show StartSpeechSynthesisTaskResponse
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [StartSpeechSynthesisTaskResponse] -> ShowS
$cshowList :: [StartSpeechSynthesisTaskResponse] -> ShowS
show :: StartSpeechSynthesisTaskResponse -> String
$cshow :: StartSpeechSynthesisTaskResponse -> String
showsPrec :: Int -> StartSpeechSynthesisTaskResponse -> ShowS
$cshowsPrec :: Int -> StartSpeechSynthesisTaskResponse -> ShowS
Prelude.Show, (forall x.
 StartSpeechSynthesisTaskResponse
 -> Rep StartSpeechSynthesisTaskResponse x)
-> (forall x.
    Rep StartSpeechSynthesisTaskResponse x
    -> StartSpeechSynthesisTaskResponse)
-> Generic StartSpeechSynthesisTaskResponse
forall x.
Rep StartSpeechSynthesisTaskResponse x
-> StartSpeechSynthesisTaskResponse
forall x.
StartSpeechSynthesisTaskResponse
-> Rep StartSpeechSynthesisTaskResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep StartSpeechSynthesisTaskResponse x
-> StartSpeechSynthesisTaskResponse
$cfrom :: forall x.
StartSpeechSynthesisTaskResponse
-> Rep StartSpeechSynthesisTaskResponse x
Prelude.Generic)

-- |
-- Create a value of 'StartSpeechSynthesisTaskResponse' 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:
--
-- 'synthesisTask', 'startSpeechSynthesisTaskResponse_synthesisTask' - SynthesisTask object that provides information and attributes about a
-- newly submitted speech synthesis task.
--
-- 'httpStatus', 'startSpeechSynthesisTaskResponse_httpStatus' - The response's http status code.
newStartSpeechSynthesisTaskResponse ::
  -- | 'httpStatus'
  Prelude.Int ->
  StartSpeechSynthesisTaskResponse
newStartSpeechSynthesisTaskResponse :: Int -> StartSpeechSynthesisTaskResponse
newStartSpeechSynthesisTaskResponse Int
pHttpStatus_ =
  StartSpeechSynthesisTaskResponse' :: Maybe SynthesisTask -> Int -> StartSpeechSynthesisTaskResponse
StartSpeechSynthesisTaskResponse'
    { $sel:synthesisTask:StartSpeechSynthesisTaskResponse' :: Maybe SynthesisTask
synthesisTask =
        Maybe SynthesisTask
forall a. Maybe a
Prelude.Nothing,
      $sel:httpStatus:StartSpeechSynthesisTaskResponse' :: Int
httpStatus = Int
pHttpStatus_
    }

-- | SynthesisTask object that provides information and attributes about a
-- newly submitted speech synthesis task.
startSpeechSynthesisTaskResponse_synthesisTask :: Lens.Lens' StartSpeechSynthesisTaskResponse (Prelude.Maybe SynthesisTask)
startSpeechSynthesisTaskResponse_synthesisTask :: (Maybe SynthesisTask -> f (Maybe SynthesisTask))
-> StartSpeechSynthesisTaskResponse
-> f StartSpeechSynthesisTaskResponse
startSpeechSynthesisTaskResponse_synthesisTask = (StartSpeechSynthesisTaskResponse -> Maybe SynthesisTask)
-> (StartSpeechSynthesisTaskResponse
    -> Maybe SynthesisTask -> StartSpeechSynthesisTaskResponse)
-> Lens
     StartSpeechSynthesisTaskResponse
     StartSpeechSynthesisTaskResponse
     (Maybe SynthesisTask)
     (Maybe SynthesisTask)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\StartSpeechSynthesisTaskResponse' {Maybe SynthesisTask
synthesisTask :: Maybe SynthesisTask
$sel:synthesisTask:StartSpeechSynthesisTaskResponse' :: StartSpeechSynthesisTaskResponse -> Maybe SynthesisTask
synthesisTask} -> Maybe SynthesisTask
synthesisTask) (\s :: StartSpeechSynthesisTaskResponse
s@StartSpeechSynthesisTaskResponse' {} Maybe SynthesisTask
a -> StartSpeechSynthesisTaskResponse
s {$sel:synthesisTask:StartSpeechSynthesisTaskResponse' :: Maybe SynthesisTask
synthesisTask = Maybe SynthesisTask
a} :: StartSpeechSynthesisTaskResponse)

-- | The response's http status code.
startSpeechSynthesisTaskResponse_httpStatus :: Lens.Lens' StartSpeechSynthesisTaskResponse Prelude.Int
startSpeechSynthesisTaskResponse_httpStatus :: (Int -> f Int)
-> StartSpeechSynthesisTaskResponse
-> f StartSpeechSynthesisTaskResponse
startSpeechSynthesisTaskResponse_httpStatus = (StartSpeechSynthesisTaskResponse -> Int)
-> (StartSpeechSynthesisTaskResponse
    -> Int -> StartSpeechSynthesisTaskResponse)
-> Lens
     StartSpeechSynthesisTaskResponse
     StartSpeechSynthesisTaskResponse
     Int
     Int
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\StartSpeechSynthesisTaskResponse' {Int
httpStatus :: Int
$sel:httpStatus:StartSpeechSynthesisTaskResponse' :: StartSpeechSynthesisTaskResponse -> Int
httpStatus} -> Int
httpStatus) (\s :: StartSpeechSynthesisTaskResponse
s@StartSpeechSynthesisTaskResponse' {} Int
a -> StartSpeechSynthesisTaskResponse
s {$sel:httpStatus:StartSpeechSynthesisTaskResponse' :: Int
httpStatus = Int
a} :: StartSpeechSynthesisTaskResponse)

instance
  Prelude.NFData
    StartSpeechSynthesisTaskResponse