{-# 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_engine,
startSpeechSynthesisTask_languageCode,
startSpeechSynthesisTask_lexiconNames,
startSpeechSynthesisTask_outputS3KeyPrefix,
startSpeechSynthesisTask_sampleRate,
startSpeechSynthesisTask_snsTopicArn,
startSpeechSynthesisTask_speechMarkTypes,
startSpeechSynthesisTask_textType,
startSpeechSynthesisTask_outputFormat,
startSpeechSynthesisTask_outputS3BucketName,
startSpeechSynthesisTask_text,
startSpeechSynthesisTask_voiceId,
StartSpeechSynthesisTaskResponse (..),
newStartSpeechSynthesisTaskResponse,
startSpeechSynthesisTaskResponse_synthesisTask,
startSpeechSynthesisTaskResponse_httpStatus,
)
where
import qualified Amazonka.Core as Core
import qualified Amazonka.Core.Lens.Internal as Lens
import qualified Amazonka.Data as Data
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 Engine
engine :: Prelude.Maybe Engine,
StartSpeechSynthesisTask -> Maybe LanguageCode
languageCode :: Prelude.Maybe LanguageCode,
StartSpeechSynthesisTask -> Maybe [Text]
lexiconNames :: Prelude.Maybe [Prelude.Text],
StartSpeechSynthesisTask -> Maybe Text
outputS3KeyPrefix :: Prelude.Maybe Prelude.Text,
StartSpeechSynthesisTask -> Maybe Text
sampleRate :: Prelude.Maybe Prelude.Text,
StartSpeechSynthesisTask -> Maybe Text
snsTopicArn :: Prelude.Maybe Prelude.Text,
StartSpeechSynthesisTask -> Maybe [SpeechMarkType]
speechMarkTypes :: Prelude.Maybe [SpeechMarkType],
StartSpeechSynthesisTask -> Maybe TextType
textType :: Prelude.Maybe TextType,
StartSpeechSynthesisTask -> OutputFormat
outputFormat :: OutputFormat,
StartSpeechSynthesisTask -> Text
outputS3BucketName :: Prelude.Text,
StartSpeechSynthesisTask -> Text
text :: Prelude.Text,
StartSpeechSynthesisTask -> VoiceId
voiceId :: VoiceId
}
deriving (StartSpeechSynthesisTask -> StartSpeechSynthesisTask -> Bool
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]
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
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.
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'
{ $sel:engine:StartSpeechSynthesisTask' :: Maybe Engine
engine = forall a. Maybe a
Prelude.Nothing,
$sel:languageCode:StartSpeechSynthesisTask' :: Maybe LanguageCode
languageCode = forall a. Maybe a
Prelude.Nothing,
$sel:lexiconNames:StartSpeechSynthesisTask' :: Maybe [Text]
lexiconNames = forall a. Maybe a
Prelude.Nothing,
$sel:outputS3KeyPrefix:StartSpeechSynthesisTask' :: Maybe Text
outputS3KeyPrefix = forall a. Maybe a
Prelude.Nothing,
$sel:sampleRate:StartSpeechSynthesisTask' :: Maybe Text
sampleRate = forall a. Maybe a
Prelude.Nothing,
$sel:snsTopicArn:StartSpeechSynthesisTask' :: Maybe Text
snsTopicArn = forall a. Maybe a
Prelude.Nothing,
$sel:speechMarkTypes:StartSpeechSynthesisTask' :: Maybe [SpeechMarkType]
speechMarkTypes = forall a. Maybe a
Prelude.Nothing,
$sel:textType:StartSpeechSynthesisTask' :: Maybe TextType
textType = 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_engine :: Lens.Lens' StartSpeechSynthesisTask (Prelude.Maybe Engine)
startSpeechSynthesisTask_engine :: Lens' StartSpeechSynthesisTask (Maybe Engine)
startSpeechSynthesisTask_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_languageCode :: Lens.Lens' StartSpeechSynthesisTask (Prelude.Maybe LanguageCode)
startSpeechSynthesisTask_languageCode :: Lens' StartSpeechSynthesisTask (Maybe LanguageCode)
startSpeechSynthesisTask_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_lexiconNames :: Lens.Lens' StartSpeechSynthesisTask (Prelude.Maybe [Prelude.Text])
startSpeechSynthesisTask_lexiconNames :: Lens' StartSpeechSynthesisTask (Maybe [Text])
startSpeechSynthesisTask_lexiconNames = 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) forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. forall (f :: * -> *) (g :: * -> *) s t a b.
(Functor f, Functor g) =>
AnIso s t a b -> Iso (f s) (g t) (f a) (g b)
Lens.mapping forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced
startSpeechSynthesisTask_outputS3KeyPrefix :: Lens.Lens' StartSpeechSynthesisTask (Prelude.Maybe Prelude.Text)
startSpeechSynthesisTask_outputS3KeyPrefix :: Lens' StartSpeechSynthesisTask (Maybe Text)
startSpeechSynthesisTask_outputS3KeyPrefix = 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_sampleRate :: Lens.Lens' StartSpeechSynthesisTask (Prelude.Maybe Prelude.Text)
startSpeechSynthesisTask_sampleRate :: Lens' StartSpeechSynthesisTask (Maybe Text)
startSpeechSynthesisTask_sampleRate = 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_snsTopicArn :: Lens.Lens' StartSpeechSynthesisTask (Prelude.Maybe Prelude.Text)
startSpeechSynthesisTask_snsTopicArn :: Lens' StartSpeechSynthesisTask (Maybe Text)
startSpeechSynthesisTask_snsTopicArn = 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_speechMarkTypes :: Lens.Lens' StartSpeechSynthesisTask (Prelude.Maybe [SpeechMarkType])
startSpeechSynthesisTask_speechMarkTypes :: Lens' StartSpeechSynthesisTask (Maybe [SpeechMarkType])
startSpeechSynthesisTask_speechMarkTypes = 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) forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. forall (f :: * -> *) (g :: * -> *) s t a b.
(Functor f, Functor g) =>
AnIso s t a b -> Iso (f s) (g t) (f a) (g b)
Lens.mapping forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced
startSpeechSynthesisTask_textType :: Lens.Lens' StartSpeechSynthesisTask (Prelude.Maybe TextType)
startSpeechSynthesisTask_textType :: Lens' StartSpeechSynthesisTask (Maybe TextType)
startSpeechSynthesisTask_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_outputFormat :: Lens.Lens' StartSpeechSynthesisTask OutputFormat
startSpeechSynthesisTask_outputFormat :: Lens' StartSpeechSynthesisTask OutputFormat
startSpeechSynthesisTask_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 :: Lens' StartSpeechSynthesisTask Text
startSpeechSynthesisTask_outputS3BucketName = 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 :: Lens' StartSpeechSynthesisTask Text
startSpeechSynthesisTask_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 :: Lens' StartSpeechSynthesisTask VoiceId
startSpeechSynthesisTask_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 :: (Service -> Service)
-> StartSpeechSynthesisTask -> Request StartSpeechSynthesisTask
request Service -> Service
overrides =
forall a. (ToRequest a, ToJSON a) => Service -> a -> Request a
Request.postJSON (Service -> Service
overrides Service
defaultService)
response :: forall (m :: * -> *).
MonadResource m =>
(ByteStringLazy -> IO ByteStringLazy)
-> Service
-> Proxy StartSpeechSynthesisTask
-> ClientResponse ClientBody
-> m (Either
Error (ClientResponse (AWSResponse StartSpeechSynthesisTask)))
response =
forall (m :: * -> *) a.
MonadResource m =>
(Int -> ResponseHeaders -> Object -> Either String (AWSResponse a))
-> (ByteStringLazy -> IO ByteStringLazy)
-> Service
-> Proxy a
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse a)))
Response.receiveJSON
( \Int
s ResponseHeaders
h Object
x ->
Maybe SynthesisTask -> Int -> StartSpeechSynthesisTaskResponse
StartSpeechSynthesisTaskResponse'
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x forall a. FromJSON a => Object -> Key -> Either String (Maybe a)
Data..?> Key
"SynthesisTask")
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure (forall a. Enum a => a -> Int
Prelude.fromEnum Int
s))
)
instance Prelude.Hashable StartSpeechSynthesisTask where
hashWithSalt :: Int -> StartSpeechSynthesisTask -> Int
hashWithSalt Int
_salt StartSpeechSynthesisTask' {Maybe [Text]
Maybe [SpeechMarkType]
Maybe Text
Maybe Engine
Maybe LanguageCode
Maybe TextType
Text
OutputFormat
VoiceId
voiceId :: VoiceId
text :: Text
outputS3BucketName :: Text
outputFormat :: OutputFormat
textType :: Maybe TextType
speechMarkTypes :: Maybe [SpeechMarkType]
snsTopicArn :: Maybe Text
sampleRate :: Maybe Text
outputS3KeyPrefix :: Maybe Text
lexiconNames :: Maybe [Text]
languageCode :: Maybe LanguageCode
engine :: Maybe Engine
$sel:voiceId:StartSpeechSynthesisTask' :: StartSpeechSynthesisTask -> VoiceId
$sel:text:StartSpeechSynthesisTask' :: StartSpeechSynthesisTask -> Text
$sel:outputS3BucketName:StartSpeechSynthesisTask' :: StartSpeechSynthesisTask -> Text
$sel:outputFormat:StartSpeechSynthesisTask' :: StartSpeechSynthesisTask -> OutputFormat
$sel:textType:StartSpeechSynthesisTask' :: StartSpeechSynthesisTask -> Maybe TextType
$sel:speechMarkTypes:StartSpeechSynthesisTask' :: StartSpeechSynthesisTask -> Maybe [SpeechMarkType]
$sel:snsTopicArn:StartSpeechSynthesisTask' :: StartSpeechSynthesisTask -> Maybe Text
$sel:sampleRate:StartSpeechSynthesisTask' :: StartSpeechSynthesisTask -> Maybe Text
$sel:outputS3KeyPrefix:StartSpeechSynthesisTask' :: StartSpeechSynthesisTask -> Maybe Text
$sel:lexiconNames:StartSpeechSynthesisTask' :: StartSpeechSynthesisTask -> Maybe [Text]
$sel:languageCode:StartSpeechSynthesisTask' :: StartSpeechSynthesisTask -> Maybe LanguageCode
$sel:engine:StartSpeechSynthesisTask' :: StartSpeechSynthesisTask -> Maybe Engine
..} =
Int
_salt
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Engine
engine
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe LanguageCode
languageCode
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe [Text]
lexiconNames
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
outputS3KeyPrefix
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
sampleRate
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
snsTopicArn
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe [SpeechMarkType]
speechMarkTypes
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe TextType
textType
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` OutputFormat
outputFormat
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Text
outputS3BucketName
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Text
text
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` VoiceId
voiceId
instance Prelude.NFData StartSpeechSynthesisTask where
rnf :: StartSpeechSynthesisTask -> ()
rnf StartSpeechSynthesisTask' {Maybe [Text]
Maybe [SpeechMarkType]
Maybe Text
Maybe Engine
Maybe LanguageCode
Maybe TextType
Text
OutputFormat
VoiceId
voiceId :: VoiceId
text :: Text
outputS3BucketName :: Text
outputFormat :: OutputFormat
textType :: Maybe TextType
speechMarkTypes :: Maybe [SpeechMarkType]
snsTopicArn :: Maybe Text
sampleRate :: Maybe Text
outputS3KeyPrefix :: Maybe Text
lexiconNames :: Maybe [Text]
languageCode :: Maybe LanguageCode
engine :: Maybe Engine
$sel:voiceId:StartSpeechSynthesisTask' :: StartSpeechSynthesisTask -> VoiceId
$sel:text:StartSpeechSynthesisTask' :: StartSpeechSynthesisTask -> Text
$sel:outputS3BucketName:StartSpeechSynthesisTask' :: StartSpeechSynthesisTask -> Text
$sel:outputFormat:StartSpeechSynthesisTask' :: StartSpeechSynthesisTask -> OutputFormat
$sel:textType:StartSpeechSynthesisTask' :: StartSpeechSynthesisTask -> Maybe TextType
$sel:speechMarkTypes:StartSpeechSynthesisTask' :: StartSpeechSynthesisTask -> Maybe [SpeechMarkType]
$sel:snsTopicArn:StartSpeechSynthesisTask' :: StartSpeechSynthesisTask -> Maybe Text
$sel:sampleRate:StartSpeechSynthesisTask' :: StartSpeechSynthesisTask -> Maybe Text
$sel:outputS3KeyPrefix:StartSpeechSynthesisTask' :: StartSpeechSynthesisTask -> Maybe Text
$sel:lexiconNames:StartSpeechSynthesisTask' :: StartSpeechSynthesisTask -> Maybe [Text]
$sel:languageCode:StartSpeechSynthesisTask' :: StartSpeechSynthesisTask -> Maybe LanguageCode
$sel:engine:StartSpeechSynthesisTask' :: StartSpeechSynthesisTask -> Maybe Engine
..} =
forall a. NFData a => a -> ()
Prelude.rnf Maybe Engine
engine
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe LanguageCode
languageCode
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe [Text]
lexiconNames
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
outputS3KeyPrefix
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
sampleRate
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
snsTopicArn
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe [SpeechMarkType]
speechMarkTypes
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe TextType
textType
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf OutputFormat
outputFormat
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Text
outputS3BucketName
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Text
text
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf VoiceId
voiceId
instance Data.ToHeaders StartSpeechSynthesisTask where
toHeaders :: StartSpeechSynthesisTask -> ResponseHeaders
toHeaders = forall a b. a -> b -> a
Prelude.const forall a. Monoid a => a
Prelude.mempty
instance Data.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
textType :: Maybe TextType
speechMarkTypes :: Maybe [SpeechMarkType]
snsTopicArn :: Maybe Text
sampleRate :: Maybe Text
outputS3KeyPrefix :: Maybe Text
lexiconNames :: Maybe [Text]
languageCode :: Maybe LanguageCode
engine :: Maybe Engine
$sel:voiceId:StartSpeechSynthesisTask' :: StartSpeechSynthesisTask -> VoiceId
$sel:text:StartSpeechSynthesisTask' :: StartSpeechSynthesisTask -> Text
$sel:outputS3BucketName:StartSpeechSynthesisTask' :: StartSpeechSynthesisTask -> Text
$sel:outputFormat:StartSpeechSynthesisTask' :: StartSpeechSynthesisTask -> OutputFormat
$sel:textType:StartSpeechSynthesisTask' :: StartSpeechSynthesisTask -> Maybe TextType
$sel:speechMarkTypes:StartSpeechSynthesisTask' :: StartSpeechSynthesisTask -> Maybe [SpeechMarkType]
$sel:snsTopicArn:StartSpeechSynthesisTask' :: StartSpeechSynthesisTask -> Maybe Text
$sel:sampleRate:StartSpeechSynthesisTask' :: StartSpeechSynthesisTask -> Maybe Text
$sel:outputS3KeyPrefix:StartSpeechSynthesisTask' :: StartSpeechSynthesisTask -> Maybe Text
$sel:lexiconNames:StartSpeechSynthesisTask' :: StartSpeechSynthesisTask -> Maybe [Text]
$sel:languageCode:StartSpeechSynthesisTask' :: StartSpeechSynthesisTask -> Maybe LanguageCode
$sel:engine:StartSpeechSynthesisTask' :: StartSpeechSynthesisTask -> Maybe Engine
..} =
[Pair] -> Value
Data.object
( forall a. [Maybe a] -> [a]
Prelude.catMaybes
[ (Key
"Engine" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=) forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Engine
engine,
(Key
"LanguageCode" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=) forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe LanguageCode
languageCode,
(Key
"LexiconNames" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=) forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe [Text]
lexiconNames,
(Key
"OutputS3KeyPrefix" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Text
outputS3KeyPrefix,
(Key
"SampleRate" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=) forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Text
sampleRate,
(Key
"SnsTopicArn" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=) forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Text
snsTopicArn,
(Key
"SpeechMarkTypes" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe [SpeechMarkType]
speechMarkTypes,
(Key
"TextType" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=) forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe TextType
textType,
forall a. a -> Maybe a
Prelude.Just (Key
"OutputFormat" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..= OutputFormat
outputFormat),
forall a. a -> Maybe a
Prelude.Just
(Key
"OutputS3BucketName" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..= Text
outputS3BucketName),
forall a. a -> Maybe a
Prelude.Just (Key
"Text" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..= Text
text),
forall a. a -> Maybe a
Prelude.Just (Key
"VoiceId" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..= VoiceId
voiceId)
]
)
instance Data.ToPath StartSpeechSynthesisTask where
toPath :: StartSpeechSynthesisTask -> ByteString
toPath = forall a b. a -> b -> a
Prelude.const ByteString
"/v1/synthesisTasks"
instance Data.ToQuery StartSpeechSynthesisTask where
toQuery :: StartSpeechSynthesisTask -> QueryString
toQuery = forall a b. a -> b -> a
Prelude.const 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
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]
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
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.
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'
{ $sel:synthesisTask:StartSpeechSynthesisTaskResponse' :: Maybe SynthesisTask
synthesisTask =
forall a. Maybe a
Prelude.Nothing,
$sel:httpStatus:StartSpeechSynthesisTaskResponse' :: Int
httpStatus = Int
pHttpStatus_
}
startSpeechSynthesisTaskResponse_synthesisTask :: Lens.Lens' StartSpeechSynthesisTaskResponse (Prelude.Maybe SynthesisTask)
startSpeechSynthesisTaskResponse_synthesisTask :: Lens' StartSpeechSynthesisTaskResponse (Maybe SynthesisTask)
startSpeechSynthesisTaskResponse_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 :: Lens' StartSpeechSynthesisTaskResponse Int
startSpeechSynthesisTaskResponse_httpStatus = 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
where
rnf :: StartSpeechSynthesisTaskResponse -> ()
rnf StartSpeechSynthesisTaskResponse' {Int
Maybe SynthesisTask
httpStatus :: Int
synthesisTask :: Maybe SynthesisTask
$sel:httpStatus:StartSpeechSynthesisTaskResponse' :: StartSpeechSynthesisTaskResponse -> Int
$sel:synthesisTask:StartSpeechSynthesisTaskResponse' :: StartSpeechSynthesisTaskResponse -> Maybe SynthesisTask
..} =
forall a. NFData a => a -> ()
Prelude.rnf Maybe SynthesisTask
synthesisTask
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Int
httpStatus