{-# 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 #-}
module Amazonka.Polly.StartSpeechSynthesisTask
(
StartSpeechSynthesisTask (..),
newStartSpeechSynthesisTask,
startSpeechSynthesisTask_languageCode,
startSpeechSynthesisTask_snsTopicArn,
startSpeechSynthesisTask_outputS3KeyPrefix,
startSpeechSynthesisTask_engine,
startSpeechSynthesisTask_speechMarkTypes,
startSpeechSynthesisTask_sampleRate,
startSpeechSynthesisTask_textType,
startSpeechSynthesisTask_lexiconNames,
startSpeechSynthesisTask_outputFormat,
startSpeechSynthesisTask_outputS3BucketName,
startSpeechSynthesisTask_text,
startSpeechSynthesisTask_voiceId,
StartSpeechSynthesisTaskResponse (..),
newStartSpeechSynthesisTaskResponse,
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
data StartSpeechSynthesisTask = StartSpeechSynthesisTask'
{
StartSpeechSynthesisTask -> Maybe LanguageCode
languageCode :: Prelude.Maybe LanguageCode,
StartSpeechSynthesisTask -> Maybe Text
snsTopicArn :: Prelude.Maybe Prelude.Text,
StartSpeechSynthesisTask -> Maybe Text
outputS3KeyPrefix :: Prelude.Maybe Prelude.Text,
StartSpeechSynthesisTask -> Maybe Engine
engine :: Prelude.Maybe Engine,
StartSpeechSynthesisTask -> Maybe [SpeechMarkType]
speechMarkTypes :: Prelude.Maybe [SpeechMarkType],
StartSpeechSynthesisTask -> Maybe Text
sampleRate :: Prelude.Maybe Prelude.Text,
StartSpeechSynthesisTask -> Maybe TextType
textType :: Prelude.Maybe TextType,
StartSpeechSynthesisTask -> Maybe [Text]
lexiconNames :: Prelude.Maybe [Prelude.Text],
StartSpeechSynthesisTask -> OutputFormat
outputFormat :: OutputFormat,
StartSpeechSynthesisTask -> Text
outputS3BucketName :: Prelude.Text,
StartSpeechSynthesisTask -> Text
text :: Prelude.Text,
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)
newStartSpeechSynthesisTask ::
OutputFormat ->
Prelude.Text ->
Prelude.Text ->
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_
}
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)
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)
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)
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)
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
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)
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)
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
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)
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)
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)
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
data StartSpeechSynthesisTaskResponse = StartSpeechSynthesisTaskResponse'
{
StartSpeechSynthesisTaskResponse -> Maybe SynthesisTask
synthesisTask :: Prelude.Maybe SynthesisTask,
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)
newStartSpeechSynthesisTaskResponse ::
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_
}
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)
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