{-# LANGUAGE DisambiguateRecordFields #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE StrictData #-}
{-# LANGUAGE NoImplicitPrelude #-}
{-# OPTIONS_GHC -fno-warn-unused-matches #-}

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

-- |
-- Module      : Amazonka.Polly.Types
-- 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.Polly.Types
  ( -- * Service Configuration
    defaultService,

    -- * Errors
    _EngineNotSupportedException,
    _InvalidLexiconException,
    _InvalidNextTokenException,
    _InvalidS3BucketException,
    _InvalidS3KeyException,
    _InvalidSampleRateException,
    _InvalidSnsTopicArnException,
    _InvalidSsmlException,
    _InvalidTaskIdException,
    _LanguageNotSupportedException,
    _LexiconNotFoundException,
    _LexiconSizeExceededException,
    _MarksNotSupportedForFormatException,
    _MaxLexemeLengthExceededException,
    _MaxLexiconsNumberExceededException,
    _ServiceFailureException,
    _SsmlMarksNotSupportedForTextTypeException,
    _SynthesisTaskNotFoundException,
    _TextLengthExceededException,
    _UnsupportedPlsAlphabetException,
    _UnsupportedPlsLanguageException,

    -- * Engine
    Engine (..),

    -- * Gender
    Gender (..),

    -- * LanguageCode
    LanguageCode (..),

    -- * OutputFormat
    OutputFormat (..),

    -- * SpeechMarkType
    SpeechMarkType (..),

    -- * TaskStatus
    TaskStatus (..),

    -- * TextType
    TextType (..),

    -- * VoiceId
    VoiceId (..),

    -- * Lexicon
    Lexicon (..),
    newLexicon,
    lexicon_content,
    lexicon_name,

    -- * LexiconAttributes
    LexiconAttributes (..),
    newLexiconAttributes,
    lexiconAttributes_alphabet,
    lexiconAttributes_languageCode,
    lexiconAttributes_lastModified,
    lexiconAttributes_lexemesCount,
    lexiconAttributes_lexiconArn,
    lexiconAttributes_size,

    -- * LexiconDescription
    LexiconDescription (..),
    newLexiconDescription,
    lexiconDescription_attributes,
    lexiconDescription_name,

    -- * SynthesisTask
    SynthesisTask (..),
    newSynthesisTask,
    synthesisTask_creationTime,
    synthesisTask_engine,
    synthesisTask_languageCode,
    synthesisTask_lexiconNames,
    synthesisTask_outputFormat,
    synthesisTask_outputUri,
    synthesisTask_requestCharacters,
    synthesisTask_sampleRate,
    synthesisTask_snsTopicArn,
    synthesisTask_speechMarkTypes,
    synthesisTask_taskId,
    synthesisTask_taskStatus,
    synthesisTask_taskStatusReason,
    synthesisTask_textType,
    synthesisTask_voiceId,

    -- * Voice
    Voice (..),
    newVoice,
    voice_additionalLanguageCodes,
    voice_gender,
    voice_id,
    voice_languageCode,
    voice_languageName,
    voice_name,
    voice_supportedEngines,
  )
where

import qualified Amazonka.Core as Core
import qualified Amazonka.Core.Lens.Internal as Lens
import Amazonka.Polly.Types.Engine
import Amazonka.Polly.Types.Gender
import Amazonka.Polly.Types.LanguageCode
import Amazonka.Polly.Types.Lexicon
import Amazonka.Polly.Types.LexiconAttributes
import Amazonka.Polly.Types.LexiconDescription
import Amazonka.Polly.Types.OutputFormat
import Amazonka.Polly.Types.SpeechMarkType
import Amazonka.Polly.Types.SynthesisTask
import Amazonka.Polly.Types.TaskStatus
import Amazonka.Polly.Types.TextType
import Amazonka.Polly.Types.Voice
import Amazonka.Polly.Types.VoiceId
import qualified Amazonka.Prelude as Prelude
import qualified Amazonka.Sign.V4 as Sign

-- | API version @2016-06-10@ of the Amazon Polly SDK configuration.
defaultService :: Core.Service
defaultService :: Service
defaultService =
  Core.Service
    { $sel:abbrev:Service :: Abbrev
Core.abbrev = Abbrev
"Polly",
      $sel:signer:Service :: Signer
Core.signer = Signer
Sign.v4,
      $sel:endpointPrefix:Service :: ByteString
Core.endpointPrefix = ByteString
"polly",
      $sel:signingName:Service :: ByteString
Core.signingName = ByteString
"polly",
      $sel:version:Service :: ByteString
Core.version = ByteString
"2016-06-10",
      $sel:s3AddressingStyle:Service :: S3AddressingStyle
Core.s3AddressingStyle = S3AddressingStyle
Core.S3AddressingStyleAuto,
      $sel:endpoint:Service :: Region -> Endpoint
Core.endpoint = Service -> Region -> Endpoint
Core.defaultEndpoint Service
defaultService,
      $sel:timeout:Service :: Maybe Seconds
Core.timeout = forall a. a -> Maybe a
Prelude.Just Seconds
70,
      $sel:check:Service :: Status -> Bool
Core.check = Status -> Bool
Core.statusSuccess,
      $sel:error:Service :: Status -> [Header] -> ByteStringLazy -> Error
Core.error = Abbrev -> Status -> [Header] -> ByteStringLazy -> Error
Core.parseJSONError Abbrev
"Polly",
      $sel:retry:Service :: Retry
Core.retry = Retry
retry
    }
  where
    retry :: Retry
retry =
      Core.Exponential
        { $sel:base:Exponential :: Double
Core.base = Double
5.0e-2,
          $sel:growth:Exponential :: Int
Core.growth = Int
2,
          $sel:attempts:Exponential :: Int
Core.attempts = Int
5,
          $sel:check:Exponential :: ServiceError -> Maybe Text
Core.check = forall {a}. IsString a => ServiceError -> Maybe a
check
        }
    check :: ServiceError -> Maybe a
check ServiceError
e
      | forall s a. Getting Any s a -> s -> Bool
Lens.has (forall (f :: * -> *) (p :: * -> * -> *).
(Applicative f, Choice p) =>
Int -> Optic' p f ServiceError ServiceError
Core.hasStatus Int
502) ServiceError
e =
          forall a. a -> Maybe a
Prelude.Just a
"bad_gateway"
      | forall s a. Getting Any s a -> s -> Bool
Lens.has (forall (f :: * -> *) (p :: * -> * -> *).
(Applicative f, Choice p) =>
Int -> Optic' p f ServiceError ServiceError
Core.hasStatus Int
504) ServiceError
e =
          forall a. a -> Maybe a
Prelude.Just a
"gateway_timeout"
      | forall s a. Getting Any s a -> s -> Bool
Lens.has (forall (f :: * -> *) (p :: * -> * -> *).
(Applicative f, Choice p) =>
Int -> Optic' p f ServiceError ServiceError
Core.hasStatus Int
500) ServiceError
e =
          forall a. a -> Maybe a
Prelude.Just a
"general_server_error"
      | forall s a. Getting Any s a -> s -> Bool
Lens.has (forall (f :: * -> *) (p :: * -> * -> *).
(Applicative f, Choice p) =>
Int -> Optic' p f ServiceError ServiceError
Core.hasStatus Int
509) ServiceError
e =
          forall a. a -> Maybe a
Prelude.Just a
"limit_exceeded"
      | forall s a. Getting Any s a -> s -> Bool
Lens.has
          ( forall (f :: * -> *) (p :: * -> * -> *).
(Applicative f, Choice p) =>
ErrorCode -> Optic' p f ServiceError ServiceError
Core.hasCode ErrorCode
"RequestThrottledException"
              forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. forall (f :: * -> *) (p :: * -> * -> *).
(Applicative f, Choice p) =>
Int -> Optic' p f ServiceError ServiceError
Core.hasStatus Int
400
          )
          ServiceError
e =
          forall a. a -> Maybe a
Prelude.Just a
"request_throttled_exception"
      | forall s a. Getting Any s a -> s -> Bool
Lens.has (forall (f :: * -> *) (p :: * -> * -> *).
(Applicative f, Choice p) =>
Int -> Optic' p f ServiceError ServiceError
Core.hasStatus Int
503) ServiceError
e =
          forall a. a -> Maybe a
Prelude.Just a
"service_unavailable"
      | forall s a. Getting Any s a -> s -> Bool
Lens.has
          ( forall (f :: * -> *) (p :: * -> * -> *).
(Applicative f, Choice p) =>
ErrorCode -> Optic' p f ServiceError ServiceError
Core.hasCode ErrorCode
"ThrottledException"
              forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. forall (f :: * -> *) (p :: * -> * -> *).
(Applicative f, Choice p) =>
Int -> Optic' p f ServiceError ServiceError
Core.hasStatus Int
400
          )
          ServiceError
e =
          forall a. a -> Maybe a
Prelude.Just a
"throttled_exception"
      | forall s a. Getting Any s a -> s -> Bool
Lens.has
          ( forall (f :: * -> *) (p :: * -> * -> *).
(Applicative f, Choice p) =>
ErrorCode -> Optic' p f ServiceError ServiceError
Core.hasCode ErrorCode
"Throttling"
              forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. forall (f :: * -> *) (p :: * -> * -> *).
(Applicative f, Choice p) =>
Int -> Optic' p f ServiceError ServiceError
Core.hasStatus Int
400
          )
          ServiceError
e =
          forall a. a -> Maybe a
Prelude.Just a
"throttling"
      | forall s a. Getting Any s a -> s -> Bool
Lens.has
          ( forall (f :: * -> *) (p :: * -> * -> *).
(Applicative f, Choice p) =>
ErrorCode -> Optic' p f ServiceError ServiceError
Core.hasCode ErrorCode
"ThrottlingException"
              forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. forall (f :: * -> *) (p :: * -> * -> *).
(Applicative f, Choice p) =>
Int -> Optic' p f ServiceError ServiceError
Core.hasStatus Int
400
          )
          ServiceError
e =
          forall a. a -> Maybe a
Prelude.Just a
"throttling_exception"
      | forall s a. Getting Any s a -> s -> Bool
Lens.has
          ( forall (f :: * -> *) (p :: * -> * -> *).
(Applicative f, Choice p) =>
ErrorCode -> Optic' p f ServiceError ServiceError
Core.hasCode
              ErrorCode
"ProvisionedThroughputExceededException"
              forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. forall (f :: * -> *) (p :: * -> * -> *).
(Applicative f, Choice p) =>
Int -> Optic' p f ServiceError ServiceError
Core.hasStatus Int
400
          )
          ServiceError
e =
          forall a. a -> Maybe a
Prelude.Just a
"throughput_exceeded"
      | forall s a. Getting Any s a -> s -> Bool
Lens.has (forall (f :: * -> *) (p :: * -> * -> *).
(Applicative f, Choice p) =>
Int -> Optic' p f ServiceError ServiceError
Core.hasStatus Int
429) ServiceError
e =
          forall a. a -> Maybe a
Prelude.Just a
"too_many_requests"
      | Bool
Prelude.otherwise = forall a. Maybe a
Prelude.Nothing

-- | This engine is not compatible with the voice that you have designated.
-- Choose a new voice that is compatible with the engine or change the
-- engine and restart the operation.
_EngineNotSupportedException :: (Core.AsError a) => Lens.Fold a Core.ServiceError
_EngineNotSupportedException :: forall a. AsError a => Fold a ServiceError
_EngineNotSupportedException =
  forall a. AsError a => Service -> ErrorCode -> Fold a ServiceError
Core._MatchServiceError
    Service
defaultService
    ErrorCode
"EngineNotSupportedException"
    forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. forall (f :: * -> *) (p :: * -> * -> *).
(Applicative f, Choice p) =>
Int -> Optic' p f ServiceError ServiceError
Core.hasStatus Int
400

-- | Amazon Polly can\'t find the specified lexicon. Verify that the
-- lexicon\'s name is spelled correctly, and then try again.
_InvalidLexiconException :: (Core.AsError a) => Lens.Fold a Core.ServiceError
_InvalidLexiconException :: forall a. AsError a => Fold a ServiceError
_InvalidLexiconException =
  forall a. AsError a => Service -> ErrorCode -> Fold a ServiceError
Core._MatchServiceError
    Service
defaultService
    ErrorCode
"InvalidLexiconException"
    forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. forall (f :: * -> *) (p :: * -> * -> *).
(Applicative f, Choice p) =>
Int -> Optic' p f ServiceError ServiceError
Core.hasStatus Int
400

-- | The NextToken is invalid. Verify that it\'s spelled correctly, and then
-- try again.
_InvalidNextTokenException :: (Core.AsError a) => Lens.Fold a Core.ServiceError
_InvalidNextTokenException :: forall a. AsError a => Fold a ServiceError
_InvalidNextTokenException =
  forall a. AsError a => Service -> ErrorCode -> Fold a ServiceError
Core._MatchServiceError
    Service
defaultService
    ErrorCode
"InvalidNextTokenException"
    forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. forall (f :: * -> *) (p :: * -> * -> *).
(Applicative f, Choice p) =>
Int -> Optic' p f ServiceError ServiceError
Core.hasStatus Int
400

-- | The provided Amazon S3 bucket name is invalid. Please check your input
-- with S3 bucket naming requirements and try again.
_InvalidS3BucketException :: (Core.AsError a) => Lens.Fold a Core.ServiceError
_InvalidS3BucketException :: forall a. AsError a => Fold a ServiceError
_InvalidS3BucketException =
  forall a. AsError a => Service -> ErrorCode -> Fold a ServiceError
Core._MatchServiceError
    Service
defaultService
    ErrorCode
"InvalidS3BucketException"
    forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. forall (f :: * -> *) (p :: * -> * -> *).
(Applicative f, Choice p) =>
Int -> Optic' p f ServiceError ServiceError
Core.hasStatus Int
400

-- | The provided Amazon S3 key prefix is invalid. Please provide a valid S3
-- object key name.
_InvalidS3KeyException :: (Core.AsError a) => Lens.Fold a Core.ServiceError
_InvalidS3KeyException :: forall a. AsError a => Fold a ServiceError
_InvalidS3KeyException =
  forall a. AsError a => Service -> ErrorCode -> Fold a ServiceError
Core._MatchServiceError
    Service
defaultService
    ErrorCode
"InvalidS3KeyException"
    forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. forall (f :: * -> *) (p :: * -> * -> *).
(Applicative f, Choice p) =>
Int -> Optic' p f ServiceError ServiceError
Core.hasStatus Int
400

-- | The specified sample rate is not valid.
_InvalidSampleRateException :: (Core.AsError a) => Lens.Fold a Core.ServiceError
_InvalidSampleRateException :: forall a. AsError a => Fold a ServiceError
_InvalidSampleRateException =
  forall a. AsError a => Service -> ErrorCode -> Fold a ServiceError
Core._MatchServiceError
    Service
defaultService
    ErrorCode
"InvalidSampleRateException"
    forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. forall (f :: * -> *) (p :: * -> * -> *).
(Applicative f, Choice p) =>
Int -> Optic' p f ServiceError ServiceError
Core.hasStatus Int
400

-- | The provided SNS topic ARN is invalid. Please provide a valid SNS topic
-- ARN and try again.
_InvalidSnsTopicArnException :: (Core.AsError a) => Lens.Fold a Core.ServiceError
_InvalidSnsTopicArnException :: forall a. AsError a => Fold a ServiceError
_InvalidSnsTopicArnException =
  forall a. AsError a => Service -> ErrorCode -> Fold a ServiceError
Core._MatchServiceError
    Service
defaultService
    ErrorCode
"InvalidSnsTopicArnException"
    forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. forall (f :: * -> *) (p :: * -> * -> *).
(Applicative f, Choice p) =>
Int -> Optic' p f ServiceError ServiceError
Core.hasStatus Int
400

-- | The SSML you provided is invalid. Verify the SSML syntax, spelling of
-- tags and values, and then try again.
_InvalidSsmlException :: (Core.AsError a) => Lens.Fold a Core.ServiceError
_InvalidSsmlException :: forall a. AsError a => Fold a ServiceError
_InvalidSsmlException =
  forall a. AsError a => Service -> ErrorCode -> Fold a ServiceError
Core._MatchServiceError
    Service
defaultService
    ErrorCode
"InvalidSsmlException"
    forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. forall (f :: * -> *) (p :: * -> * -> *).
(Applicative f, Choice p) =>
Int -> Optic' p f ServiceError ServiceError
Core.hasStatus Int
400

-- | The provided Task ID is not valid. Please provide a valid Task ID and
-- try again.
_InvalidTaskIdException :: (Core.AsError a) => Lens.Fold a Core.ServiceError
_InvalidTaskIdException :: forall a. AsError a => Fold a ServiceError
_InvalidTaskIdException =
  forall a. AsError a => Service -> ErrorCode -> Fold a ServiceError
Core._MatchServiceError
    Service
defaultService
    ErrorCode
"InvalidTaskIdException"
    forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. forall (f :: * -> *) (p :: * -> * -> *).
(Applicative f, Choice p) =>
Int -> Optic' p f ServiceError ServiceError
Core.hasStatus Int
400

-- | The language specified is not currently supported by Amazon Polly in
-- this capacity.
_LanguageNotSupportedException :: (Core.AsError a) => Lens.Fold a Core.ServiceError
_LanguageNotSupportedException :: forall a. AsError a => Fold a ServiceError
_LanguageNotSupportedException =
  forall a. AsError a => Service -> ErrorCode -> Fold a ServiceError
Core._MatchServiceError
    Service
defaultService
    ErrorCode
"LanguageNotSupportedException"
    forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. forall (f :: * -> *) (p :: * -> * -> *).
(Applicative f, Choice p) =>
Int -> Optic' p f ServiceError ServiceError
Core.hasStatus Int
400

-- | Amazon Polly can\'t find the specified lexicon. This could be caused by
-- a lexicon that is missing, its name is misspelled or specifying a
-- lexicon that is in a different region.
--
-- Verify that the lexicon exists, is in the region (see ListLexicons) and
-- that you spelled its name is spelled correctly. Then try again.
_LexiconNotFoundException :: (Core.AsError a) => Lens.Fold a Core.ServiceError
_LexiconNotFoundException :: forall a. AsError a => Fold a ServiceError
_LexiconNotFoundException =
  forall a. AsError a => Service -> ErrorCode -> Fold a ServiceError
Core._MatchServiceError
    Service
defaultService
    ErrorCode
"LexiconNotFoundException"
    forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. forall (f :: * -> *) (p :: * -> * -> *).
(Applicative f, Choice p) =>
Int -> Optic' p f ServiceError ServiceError
Core.hasStatus Int
404

-- | The maximum size of the specified lexicon would be exceeded by this
-- operation.
_LexiconSizeExceededException :: (Core.AsError a) => Lens.Fold a Core.ServiceError
_LexiconSizeExceededException :: forall a. AsError a => Fold a ServiceError
_LexiconSizeExceededException =
  forall a. AsError a => Service -> ErrorCode -> Fold a ServiceError
Core._MatchServiceError
    Service
defaultService
    ErrorCode
"LexiconSizeExceededException"
    forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. forall (f :: * -> *) (p :: * -> * -> *).
(Applicative f, Choice p) =>
Int -> Optic' p f ServiceError ServiceError
Core.hasStatus Int
400

-- | Speech marks are not supported for the @OutputFormat@ selected. Speech
-- marks are only available for content in @json@ format.
_MarksNotSupportedForFormatException :: (Core.AsError a) => Lens.Fold a Core.ServiceError
_MarksNotSupportedForFormatException :: forall a. AsError a => Fold a ServiceError
_MarksNotSupportedForFormatException =
  forall a. AsError a => Service -> ErrorCode -> Fold a ServiceError
Core._MatchServiceError
    Service
defaultService
    ErrorCode
"MarksNotSupportedForFormatException"
    forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. forall (f :: * -> *) (p :: * -> * -> *).
(Applicative f, Choice p) =>
Int -> Optic' p f ServiceError ServiceError
Core.hasStatus Int
400

-- | The maximum size of the lexeme would be exceeded by this operation.
_MaxLexemeLengthExceededException :: (Core.AsError a) => Lens.Fold a Core.ServiceError
_MaxLexemeLengthExceededException :: forall a. AsError a => Fold a ServiceError
_MaxLexemeLengthExceededException =
  forall a. AsError a => Service -> ErrorCode -> Fold a ServiceError
Core._MatchServiceError
    Service
defaultService
    ErrorCode
"MaxLexemeLengthExceededException"
    forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. forall (f :: * -> *) (p :: * -> * -> *).
(Applicative f, Choice p) =>
Int -> Optic' p f ServiceError ServiceError
Core.hasStatus Int
400

-- | The maximum number of lexicons would be exceeded by this operation.
_MaxLexiconsNumberExceededException :: (Core.AsError a) => Lens.Fold a Core.ServiceError
_MaxLexiconsNumberExceededException :: forall a. AsError a => Fold a ServiceError
_MaxLexiconsNumberExceededException =
  forall a. AsError a => Service -> ErrorCode -> Fold a ServiceError
Core._MatchServiceError
    Service
defaultService
    ErrorCode
"MaxLexiconsNumberExceededException"
    forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. forall (f :: * -> *) (p :: * -> * -> *).
(Applicative f, Choice p) =>
Int -> Optic' p f ServiceError ServiceError
Core.hasStatus Int
400

-- | An unknown condition has caused a service failure.
_ServiceFailureException :: (Core.AsError a) => Lens.Fold a Core.ServiceError
_ServiceFailureException :: forall a. AsError a => Fold a ServiceError
_ServiceFailureException =
  forall a. AsError a => Service -> ErrorCode -> Fold a ServiceError
Core._MatchServiceError
    Service
defaultService
    ErrorCode
"ServiceFailureException"
    forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. forall (f :: * -> *) (p :: * -> * -> *).
(Applicative f, Choice p) =>
Int -> Optic' p f ServiceError ServiceError
Core.hasStatus Int
500

-- | SSML speech marks are not supported for plain text-type input.
_SsmlMarksNotSupportedForTextTypeException :: (Core.AsError a) => Lens.Fold a Core.ServiceError
_SsmlMarksNotSupportedForTextTypeException :: forall a. AsError a => Fold a ServiceError
_SsmlMarksNotSupportedForTextTypeException =
  forall a. AsError a => Service -> ErrorCode -> Fold a ServiceError
Core._MatchServiceError
    Service
defaultService
    ErrorCode
"SsmlMarksNotSupportedForTextTypeException"
    forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. forall (f :: * -> *) (p :: * -> * -> *).
(Applicative f, Choice p) =>
Int -> Optic' p f ServiceError ServiceError
Core.hasStatus Int
400

-- | The Speech Synthesis task with requested Task ID cannot be found.
_SynthesisTaskNotFoundException :: (Core.AsError a) => Lens.Fold a Core.ServiceError
_SynthesisTaskNotFoundException :: forall a. AsError a => Fold a ServiceError
_SynthesisTaskNotFoundException =
  forall a. AsError a => Service -> ErrorCode -> Fold a ServiceError
Core._MatchServiceError
    Service
defaultService
    ErrorCode
"SynthesisTaskNotFoundException"
    forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. forall (f :: * -> *) (p :: * -> * -> *).
(Applicative f, Choice p) =>
Int -> Optic' p f ServiceError ServiceError
Core.hasStatus Int
400

-- | The value of the \"Text\" parameter is longer than the accepted limits.
-- For the @SynthesizeSpeech@ API, the limit for input text is a maximum of
-- 6000 characters total, of which no more than 3000 can be billed
-- characters. For the @StartSpeechSynthesisTask@ API, the maximum is
-- 200,000 characters, of which no more than 100,000 can be billed
-- characters. SSML tags are not counted as billed characters.
_TextLengthExceededException :: (Core.AsError a) => Lens.Fold a Core.ServiceError
_TextLengthExceededException :: forall a. AsError a => Fold a ServiceError
_TextLengthExceededException =
  forall a. AsError a => Service -> ErrorCode -> Fold a ServiceError
Core._MatchServiceError
    Service
defaultService
    ErrorCode
"TextLengthExceededException"
    forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. forall (f :: * -> *) (p :: * -> * -> *).
(Applicative f, Choice p) =>
Int -> Optic' p f ServiceError ServiceError
Core.hasStatus Int
400

-- | The alphabet specified by the lexicon is not a supported alphabet. Valid
-- values are @x-sampa@ and @ipa@.
_UnsupportedPlsAlphabetException :: (Core.AsError a) => Lens.Fold a Core.ServiceError
_UnsupportedPlsAlphabetException :: forall a. AsError a => Fold a ServiceError
_UnsupportedPlsAlphabetException =
  forall a. AsError a => Service -> ErrorCode -> Fold a ServiceError
Core._MatchServiceError
    Service
defaultService
    ErrorCode
"UnsupportedPlsAlphabetException"
    forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. forall (f :: * -> *) (p :: * -> * -> *).
(Applicative f, Choice p) =>
Int -> Optic' p f ServiceError ServiceError
Core.hasStatus Int
400

-- | The language specified in the lexicon is unsupported. For a list of
-- supported languages, see
-- <https://docs.aws.amazon.com/polly/latest/dg/API_LexiconAttributes.html Lexicon Attributes>.
_UnsupportedPlsLanguageException :: (Core.AsError a) => Lens.Fold a Core.ServiceError
_UnsupportedPlsLanguageException :: forall a. AsError a => Fold a ServiceError
_UnsupportedPlsLanguageException =
  forall a. AsError a => Service -> ErrorCode -> Fold a ServiceError
Core._MatchServiceError
    Service
defaultService
    ErrorCode
"UnsupportedPlsLanguageException"
    forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. forall (f :: * -> *) (p :: * -> * -> *).
(Applicative f, Choice p) =>
Int -> Optic' p f ServiceError ServiceError
Core.hasStatus Int
400