feat(hos_client_create, hos_client_destory): 多次调用destory不会导致重复释放

This commit is contained in:
彭宣正
2020-12-14 17:24:58 +08:00
parent 505d529c32
commit 10b370e486
55976 changed files with 8544395 additions and 2 deletions

View File

@@ -0,0 +1,76 @@
add_project(aws-cpp-sdk-polly "C++ SDK for the AWS polly service" aws-cpp-sdk-core)
file(GLOB AWS_POLLY_HEADERS
"include/aws/polly/*.h"
)
file(GLOB AWS_POLLY_MODEL_HEADERS
"include/aws/polly/model/*.h"
)
file(GLOB AWS_POLLY_SOURCE
"source/*.cpp"
)
file(GLOB AWS_POLLY_MODEL_SOURCE
"source/model/*.cpp"
)
file(GLOB POLLY_UNIFIED_HEADERS
${AWS_POLLY_HEADERS}
${AWS_POLLY_MODEL_HEADERS}
)
file(GLOB POLLY_UNITY_SRC
${AWS_POLLY_SOURCE}
${AWS_POLLY_MODEL_SOURCE}
)
if(ENABLE_UNITY_BUILD)
enable_unity_build("POLLY" POLLY_UNITY_SRC)
endif()
file(GLOB POLLY_SRC
${POLLY_UNIFIED_HEADERS}
${POLLY_UNITY_SRC}
)
if(WIN32)
#if we are compiling for visual studio, create a sane directory tree.
if(MSVC)
source_group("Header Files\\aws\\polly" FILES ${AWS_POLLY_HEADERS})
source_group("Header Files\\aws\\polly\\model" FILES ${AWS_POLLY_MODEL_HEADERS})
source_group("Source Files" FILES ${AWS_POLLY_SOURCE})
source_group("Source Files\\model" FILES ${AWS_POLLY_MODEL_SOURCE})
endif(MSVC)
endif()
set(POLLY_INCLUDES
"${CMAKE_CURRENT_SOURCE_DIR}/include/"
)
add_library(${PROJECT_NAME} ${POLLY_SRC})
add_library(AWS::${PROJECT_NAME} ALIAS ${PROJECT_NAME})
set_compiler_flags(${PROJECT_NAME})
set_compiler_warnings(${PROJECT_NAME})
if(USE_WINDOWS_DLL_SEMANTICS AND BUILD_SHARED_LIBS)
target_compile_definitions(${PROJECT_NAME} PRIVATE "AWS_POLLY_EXPORTS")
endif()
target_include_directories(${PROJECT_NAME} PUBLIC
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/include>
$<INSTALL_INTERFACE:include>)
target_link_libraries(${PROJECT_NAME} PRIVATE ${PLATFORM_DEP_LIBS} ${PROJECT_LIBS})
setup_install()
install (FILES ${AWS_POLLY_HEADERS} DESTINATION ${INCLUDE_DIRECTORY}/aws/polly)
install (FILES ${AWS_POLLY_MODEL_HEADERS} DESTINATION ${INCLUDE_DIRECTORY}/aws/polly/model)
do_packaging()

View File

@@ -0,0 +1,522 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#pragma once
#include <aws/polly/Polly_EXPORTS.h>
#include <aws/polly/PollyErrors.h>
#include <aws/core/client/AWSError.h>
#include <aws/core/client/ClientConfiguration.h>
#include <aws/core/client/AWSClient.h>
#include <aws/core/utils/memory/stl/AWSString.h>
#include <aws/core/utils/json/JsonSerializer.h>
#include <aws/polly/model/DeleteLexiconResult.h>
#include <aws/polly/model/DescribeVoicesResult.h>
#include <aws/polly/model/GetLexiconResult.h>
#include <aws/polly/model/GetSpeechSynthesisTaskResult.h>
#include <aws/polly/model/ListLexiconsResult.h>
#include <aws/polly/model/ListSpeechSynthesisTasksResult.h>
#include <aws/polly/model/PutLexiconResult.h>
#include <aws/polly/model/StartSpeechSynthesisTaskResult.h>
#include <aws/polly/model/SynthesizeSpeechResult.h>
#include <aws/core/client/AsyncCallerContext.h>
#include <aws/core/http/HttpTypes.h>
#include <future>
#include <functional>
namespace Aws
{
namespace Http
{
class HttpClient;
class HttpClientFactory;
} // namespace Http
namespace Utils
{
template< typename R, typename E> class Outcome;
namespace Threading
{
class Executor;
} // namespace Threading
} // namespace Utils
namespace Auth
{
class AWSCredentials;
class AWSCredentialsProvider;
} // namespace Auth
namespace Client
{
class RetryStrategy;
} // namespace Client
namespace Polly
{
namespace Model
{
class DeleteLexiconRequest;
class DescribeVoicesRequest;
class GetLexiconRequest;
class GetSpeechSynthesisTaskRequest;
class ListLexiconsRequest;
class ListSpeechSynthesisTasksRequest;
class PutLexiconRequest;
class StartSpeechSynthesisTaskRequest;
class SynthesizeSpeechRequest;
typedef Aws::Utils::Outcome<DeleteLexiconResult, PollyError> DeleteLexiconOutcome;
typedef Aws::Utils::Outcome<DescribeVoicesResult, PollyError> DescribeVoicesOutcome;
typedef Aws::Utils::Outcome<GetLexiconResult, PollyError> GetLexiconOutcome;
typedef Aws::Utils::Outcome<GetSpeechSynthesisTaskResult, PollyError> GetSpeechSynthesisTaskOutcome;
typedef Aws::Utils::Outcome<ListLexiconsResult, PollyError> ListLexiconsOutcome;
typedef Aws::Utils::Outcome<ListSpeechSynthesisTasksResult, PollyError> ListSpeechSynthesisTasksOutcome;
typedef Aws::Utils::Outcome<PutLexiconResult, PollyError> PutLexiconOutcome;
typedef Aws::Utils::Outcome<StartSpeechSynthesisTaskResult, PollyError> StartSpeechSynthesisTaskOutcome;
typedef Aws::Utils::Outcome<SynthesizeSpeechResult, PollyError> SynthesizeSpeechOutcome;
typedef std::future<DeleteLexiconOutcome> DeleteLexiconOutcomeCallable;
typedef std::future<DescribeVoicesOutcome> DescribeVoicesOutcomeCallable;
typedef std::future<GetLexiconOutcome> GetLexiconOutcomeCallable;
typedef std::future<GetSpeechSynthesisTaskOutcome> GetSpeechSynthesisTaskOutcomeCallable;
typedef std::future<ListLexiconsOutcome> ListLexiconsOutcomeCallable;
typedef std::future<ListSpeechSynthesisTasksOutcome> ListSpeechSynthesisTasksOutcomeCallable;
typedef std::future<PutLexiconOutcome> PutLexiconOutcomeCallable;
typedef std::future<StartSpeechSynthesisTaskOutcome> StartSpeechSynthesisTaskOutcomeCallable;
typedef std::future<SynthesizeSpeechOutcome> SynthesizeSpeechOutcomeCallable;
} // namespace Model
class PollyClient;
typedef std::function<void(const PollyClient*, const Model::DeleteLexiconRequest&, const Model::DeleteLexiconOutcome&, const std::shared_ptr<const Aws::Client::AsyncCallerContext>&) > DeleteLexiconResponseReceivedHandler;
typedef std::function<void(const PollyClient*, const Model::DescribeVoicesRequest&, const Model::DescribeVoicesOutcome&, const std::shared_ptr<const Aws::Client::AsyncCallerContext>&) > DescribeVoicesResponseReceivedHandler;
typedef std::function<void(const PollyClient*, const Model::GetLexiconRequest&, const Model::GetLexiconOutcome&, const std::shared_ptr<const Aws::Client::AsyncCallerContext>&) > GetLexiconResponseReceivedHandler;
typedef std::function<void(const PollyClient*, const Model::GetSpeechSynthesisTaskRequest&, const Model::GetSpeechSynthesisTaskOutcome&, const std::shared_ptr<const Aws::Client::AsyncCallerContext>&) > GetSpeechSynthesisTaskResponseReceivedHandler;
typedef std::function<void(const PollyClient*, const Model::ListLexiconsRequest&, const Model::ListLexiconsOutcome&, const std::shared_ptr<const Aws::Client::AsyncCallerContext>&) > ListLexiconsResponseReceivedHandler;
typedef std::function<void(const PollyClient*, const Model::ListSpeechSynthesisTasksRequest&, const Model::ListSpeechSynthesisTasksOutcome&, const std::shared_ptr<const Aws::Client::AsyncCallerContext>&) > ListSpeechSynthesisTasksResponseReceivedHandler;
typedef std::function<void(const PollyClient*, const Model::PutLexiconRequest&, const Model::PutLexiconOutcome&, const std::shared_ptr<const Aws::Client::AsyncCallerContext>&) > PutLexiconResponseReceivedHandler;
typedef std::function<void(const PollyClient*, const Model::StartSpeechSynthesisTaskRequest&, const Model::StartSpeechSynthesisTaskOutcome&, const std::shared_ptr<const Aws::Client::AsyncCallerContext>&) > StartSpeechSynthesisTaskResponseReceivedHandler;
typedef std::function<void(const PollyClient*, const Model::SynthesizeSpeechRequest&, Model::SynthesizeSpeechOutcome, const std::shared_ptr<const Aws::Client::AsyncCallerContext>&) > SynthesizeSpeechResponseReceivedHandler;
/**
* <p>Amazon Polly is a web service that makes it easy to synthesize speech from
* text.</p> <p>The Amazon Polly service provides API operations for synthesizing
* high-quality speech from plain text and Speech Synthesis Markup Language (SSML),
* along with managing pronunciations lexicons that enable you to get the best
* results for your application domain.</p>
*/
class AWS_POLLY_API PollyClient : public Aws::Client::AWSJsonClient
{
public:
typedef Aws::Client::AWSJsonClient BASECLASS;
/**
* Initializes client to use DefaultCredentialProviderChain, with default http client factory, and optional client config. If client config
* is not specified, it will be initialized to default values.
*/
PollyClient(const Aws::Client::ClientConfiguration& clientConfiguration = Aws::Client::ClientConfiguration());
/**
* Initializes client to use SimpleAWSCredentialsProvider, with default http client factory, and optional client config. If client config
* is not specified, it will be initialized to default values.
*/
PollyClient(const Aws::Auth::AWSCredentials& credentials, const Aws::Client::ClientConfiguration& clientConfiguration = Aws::Client::ClientConfiguration());
/**
* Initializes client to use specified credentials provider with specified client config. If http client factory is not supplied,
* the default http client factory will be used
*/
PollyClient(const std::shared_ptr<Aws::Auth::AWSCredentialsProvider>& credentialsProvider,
const Aws::Client::ClientConfiguration& clientConfiguration = Aws::Client::ClientConfiguration());
virtual ~PollyClient();
/**
* <p>Deletes the specified pronunciation lexicon stored in an AWS Region. A
* lexicon which has been deleted is not available for speech synthesis, nor is it
* possible to retrieve it using either the <code>GetLexicon</code> or
* <code>ListLexicon</code> APIs.</p> <p>For more information, see <a
* href="https://docs.aws.amazon.com/polly/latest/dg/managing-lexicons.html">Managing
* Lexicons</a>.</p><p><h3>See Also:</h3> <a
* href="http://docs.aws.amazon.com/goto/WebAPI/polly-2016-06-10/DeleteLexicon">AWS
* API Reference</a></p>
*/
virtual Model::DeleteLexiconOutcome DeleteLexicon(const Model::DeleteLexiconRequest& request) const;
/**
* <p>Deletes the specified pronunciation lexicon stored in an AWS Region. A
* lexicon which has been deleted is not available for speech synthesis, nor is it
* possible to retrieve it using either the <code>GetLexicon</code> or
* <code>ListLexicon</code> APIs.</p> <p>For more information, see <a
* href="https://docs.aws.amazon.com/polly/latest/dg/managing-lexicons.html">Managing
* Lexicons</a>.</p><p><h3>See Also:</h3> <a
* href="http://docs.aws.amazon.com/goto/WebAPI/polly-2016-06-10/DeleteLexicon">AWS
* API Reference</a></p>
*
* returns a future to the operation so that it can be executed in parallel to other requests.
*/
virtual Model::DeleteLexiconOutcomeCallable DeleteLexiconCallable(const Model::DeleteLexiconRequest& request) const;
/**
* <p>Deletes the specified pronunciation lexicon stored in an AWS Region. A
* lexicon which has been deleted is not available for speech synthesis, nor is it
* possible to retrieve it using either the <code>GetLexicon</code> or
* <code>ListLexicon</code> APIs.</p> <p>For more information, see <a
* href="https://docs.aws.amazon.com/polly/latest/dg/managing-lexicons.html">Managing
* Lexicons</a>.</p><p><h3>See Also:</h3> <a
* href="http://docs.aws.amazon.com/goto/WebAPI/polly-2016-06-10/DeleteLexicon">AWS
* API Reference</a></p>
*
* Queues the request into a thread executor and triggers associated callback when operation has finished.
*/
virtual void DeleteLexiconAsync(const Model::DeleteLexiconRequest& request, const DeleteLexiconResponseReceivedHandler& handler, const std::shared_ptr<const Aws::Client::AsyncCallerContext>& context = nullptr) const;
/**
* <p>Returns the list of voices that are available for use when requesting speech
* synthesis. Each voice speaks a specified language, is either male or female, and
* is identified by an ID, which is the ASCII version of the voice name. </p>
* <p>When synthesizing speech ( <code>SynthesizeSpeech</code> ), you provide the
* voice ID for the voice you want from the list of voices returned by
* <code>DescribeVoices</code>.</p> <p>For example, you want your news reader
* application to read news in a specific language, but giving a user the option to
* choose the voice. Using the <code>DescribeVoices</code> operation you can
* provide the user with a list of available voices to select from.</p> <p> You can
* optionally specify a language code to filter the available voices. For example,
* if you specify <code>en-US</code>, the operation returns a list of all available
* US English voices. </p> <p>This operation requires permissions to perform the
* <code>polly:DescribeVoices</code> action.</p><p><h3>See Also:</h3> <a
* href="http://docs.aws.amazon.com/goto/WebAPI/polly-2016-06-10/DescribeVoices">AWS
* API Reference</a></p>
*/
virtual Model::DescribeVoicesOutcome DescribeVoices(const Model::DescribeVoicesRequest& request) const;
/**
* <p>Returns the list of voices that are available for use when requesting speech
* synthesis. Each voice speaks a specified language, is either male or female, and
* is identified by an ID, which is the ASCII version of the voice name. </p>
* <p>When synthesizing speech ( <code>SynthesizeSpeech</code> ), you provide the
* voice ID for the voice you want from the list of voices returned by
* <code>DescribeVoices</code>.</p> <p>For example, you want your news reader
* application to read news in a specific language, but giving a user the option to
* choose the voice. Using the <code>DescribeVoices</code> operation you can
* provide the user with a list of available voices to select from.</p> <p> You can
* optionally specify a language code to filter the available voices. For example,
* if you specify <code>en-US</code>, the operation returns a list of all available
* US English voices. </p> <p>This operation requires permissions to perform the
* <code>polly:DescribeVoices</code> action.</p><p><h3>See Also:</h3> <a
* href="http://docs.aws.amazon.com/goto/WebAPI/polly-2016-06-10/DescribeVoices">AWS
* API Reference</a></p>
*
* returns a future to the operation so that it can be executed in parallel to other requests.
*/
virtual Model::DescribeVoicesOutcomeCallable DescribeVoicesCallable(const Model::DescribeVoicesRequest& request) const;
/**
* <p>Returns the list of voices that are available for use when requesting speech
* synthesis. Each voice speaks a specified language, is either male or female, and
* is identified by an ID, which is the ASCII version of the voice name. </p>
* <p>When synthesizing speech ( <code>SynthesizeSpeech</code> ), you provide the
* voice ID for the voice you want from the list of voices returned by
* <code>DescribeVoices</code>.</p> <p>For example, you want your news reader
* application to read news in a specific language, but giving a user the option to
* choose the voice. Using the <code>DescribeVoices</code> operation you can
* provide the user with a list of available voices to select from.</p> <p> You can
* optionally specify a language code to filter the available voices. For example,
* if you specify <code>en-US</code>, the operation returns a list of all available
* US English voices. </p> <p>This operation requires permissions to perform the
* <code>polly:DescribeVoices</code> action.</p><p><h3>See Also:</h3> <a
* href="http://docs.aws.amazon.com/goto/WebAPI/polly-2016-06-10/DescribeVoices">AWS
* API Reference</a></p>
*
* Queues the request into a thread executor and triggers associated callback when operation has finished.
*/
virtual void DescribeVoicesAsync(const Model::DescribeVoicesRequest& request, const DescribeVoicesResponseReceivedHandler& handler, const std::shared_ptr<const Aws::Client::AsyncCallerContext>& context = nullptr) const;
/**
* <p>Returns the content of the specified pronunciation lexicon stored in an AWS
* Region. For more information, see <a
* href="https://docs.aws.amazon.com/polly/latest/dg/managing-lexicons.html">Managing
* Lexicons</a>.</p><p><h3>See Also:</h3> <a
* href="http://docs.aws.amazon.com/goto/WebAPI/polly-2016-06-10/GetLexicon">AWS
* API Reference</a></p>
*/
virtual Model::GetLexiconOutcome GetLexicon(const Model::GetLexiconRequest& request) const;
/**
* <p>Returns the content of the specified pronunciation lexicon stored in an AWS
* Region. For more information, see <a
* href="https://docs.aws.amazon.com/polly/latest/dg/managing-lexicons.html">Managing
* Lexicons</a>.</p><p><h3>See Also:</h3> <a
* href="http://docs.aws.amazon.com/goto/WebAPI/polly-2016-06-10/GetLexicon">AWS
* API Reference</a></p>
*
* returns a future to the operation so that it can be executed in parallel to other requests.
*/
virtual Model::GetLexiconOutcomeCallable GetLexiconCallable(const Model::GetLexiconRequest& request) const;
/**
* <p>Returns the content of the specified pronunciation lexicon stored in an AWS
* Region. For more information, see <a
* href="https://docs.aws.amazon.com/polly/latest/dg/managing-lexicons.html">Managing
* Lexicons</a>.</p><p><h3>See Also:</h3> <a
* href="http://docs.aws.amazon.com/goto/WebAPI/polly-2016-06-10/GetLexicon">AWS
* API Reference</a></p>
*
* Queues the request into a thread executor and triggers associated callback when operation has finished.
*/
virtual void GetLexiconAsync(const Model::GetLexiconRequest& request, const GetLexiconResponseReceivedHandler& handler, const std::shared_ptr<const Aws::Client::AsyncCallerContext>& context = nullptr) const;
/**
* <p>Retrieves a specific SpeechSynthesisTask object based on its TaskID. This
* object contains information about the given speech synthesis task, including the
* status of the task, and a link to the S3 bucket containing the output of the
* task.</p><p><h3>See Also:</h3> <a
* href="http://docs.aws.amazon.com/goto/WebAPI/polly-2016-06-10/GetSpeechSynthesisTask">AWS
* API Reference</a></p>
*/
virtual Model::GetSpeechSynthesisTaskOutcome GetSpeechSynthesisTask(const Model::GetSpeechSynthesisTaskRequest& request) const;
/**
* <p>Retrieves a specific SpeechSynthesisTask object based on its TaskID. This
* object contains information about the given speech synthesis task, including the
* status of the task, and a link to the S3 bucket containing the output of the
* task.</p><p><h3>See Also:</h3> <a
* href="http://docs.aws.amazon.com/goto/WebAPI/polly-2016-06-10/GetSpeechSynthesisTask">AWS
* API Reference</a></p>
*
* returns a future to the operation so that it can be executed in parallel to other requests.
*/
virtual Model::GetSpeechSynthesisTaskOutcomeCallable GetSpeechSynthesisTaskCallable(const Model::GetSpeechSynthesisTaskRequest& request) const;
/**
* <p>Retrieves a specific SpeechSynthesisTask object based on its TaskID. This
* object contains information about the given speech synthesis task, including the
* status of the task, and a link to the S3 bucket containing the output of the
* task.</p><p><h3>See Also:</h3> <a
* href="http://docs.aws.amazon.com/goto/WebAPI/polly-2016-06-10/GetSpeechSynthesisTask">AWS
* API Reference</a></p>
*
* Queues the request into a thread executor and triggers associated callback when operation has finished.
*/
virtual void GetSpeechSynthesisTaskAsync(const Model::GetSpeechSynthesisTaskRequest& request, const GetSpeechSynthesisTaskResponseReceivedHandler& handler, const std::shared_ptr<const Aws::Client::AsyncCallerContext>& context = nullptr) const;
/**
* <p>Returns a list of pronunciation lexicons stored in an AWS Region. For more
* information, see <a
* href="https://docs.aws.amazon.com/polly/latest/dg/managing-lexicons.html">Managing
* Lexicons</a>.</p><p><h3>See Also:</h3> <a
* href="http://docs.aws.amazon.com/goto/WebAPI/polly-2016-06-10/ListLexicons">AWS
* API Reference</a></p>
*/
virtual Model::ListLexiconsOutcome ListLexicons(const Model::ListLexiconsRequest& request) const;
/**
* <p>Returns a list of pronunciation lexicons stored in an AWS Region. For more
* information, see <a
* href="https://docs.aws.amazon.com/polly/latest/dg/managing-lexicons.html">Managing
* Lexicons</a>.</p><p><h3>See Also:</h3> <a
* href="http://docs.aws.amazon.com/goto/WebAPI/polly-2016-06-10/ListLexicons">AWS
* API Reference</a></p>
*
* returns a future to the operation so that it can be executed in parallel to other requests.
*/
virtual Model::ListLexiconsOutcomeCallable ListLexiconsCallable(const Model::ListLexiconsRequest& request) const;
/**
* <p>Returns a list of pronunciation lexicons stored in an AWS Region. For more
* information, see <a
* href="https://docs.aws.amazon.com/polly/latest/dg/managing-lexicons.html">Managing
* Lexicons</a>.</p><p><h3>See Also:</h3> <a
* href="http://docs.aws.amazon.com/goto/WebAPI/polly-2016-06-10/ListLexicons">AWS
* API Reference</a></p>
*
* Queues the request into a thread executor and triggers associated callback when operation has finished.
*/
virtual void ListLexiconsAsync(const Model::ListLexiconsRequest& request, const ListLexiconsResponseReceivedHandler& handler, const std::shared_ptr<const Aws::Client::AsyncCallerContext>& context = nullptr) const;
/**
* <p>Returns a list of SpeechSynthesisTask objects ordered by their creation date.
* This operation can filter the tasks by their status, for example, allowing users
* to list only tasks that are completed.</p><p><h3>See Also:</h3> <a
* href="http://docs.aws.amazon.com/goto/WebAPI/polly-2016-06-10/ListSpeechSynthesisTasks">AWS
* API Reference</a></p>
*/
virtual Model::ListSpeechSynthesisTasksOutcome ListSpeechSynthesisTasks(const Model::ListSpeechSynthesisTasksRequest& request) const;
/**
* <p>Returns a list of SpeechSynthesisTask objects ordered by their creation date.
* This operation can filter the tasks by their status, for example, allowing users
* to list only tasks that are completed.</p><p><h3>See Also:</h3> <a
* href="http://docs.aws.amazon.com/goto/WebAPI/polly-2016-06-10/ListSpeechSynthesisTasks">AWS
* API Reference</a></p>
*
* returns a future to the operation so that it can be executed in parallel to other requests.
*/
virtual Model::ListSpeechSynthesisTasksOutcomeCallable ListSpeechSynthesisTasksCallable(const Model::ListSpeechSynthesisTasksRequest& request) const;
/**
* <p>Returns a list of SpeechSynthesisTask objects ordered by their creation date.
* This operation can filter the tasks by their status, for example, allowing users
* to list only tasks that are completed.</p><p><h3>See Also:</h3> <a
* href="http://docs.aws.amazon.com/goto/WebAPI/polly-2016-06-10/ListSpeechSynthesisTasks">AWS
* API Reference</a></p>
*
* Queues the request into a thread executor and triggers associated callback when operation has finished.
*/
virtual void ListSpeechSynthesisTasksAsync(const Model::ListSpeechSynthesisTasksRequest& request, const ListSpeechSynthesisTasksResponseReceivedHandler& handler, const std::shared_ptr<const Aws::Client::AsyncCallerContext>& context = nullptr) const;
/**
* <p>Stores a pronunciation lexicon in an AWS Region. If a lexicon with the same
* name already exists in the region, it is overwritten by the new lexicon. Lexicon
* operations have eventual consistency, therefore, it might take some time before
* the lexicon is available to the SynthesizeSpeech operation.</p> <p>For more
* information, see <a
* href="https://docs.aws.amazon.com/polly/latest/dg/managing-lexicons.html">Managing
* Lexicons</a>.</p><p><h3>See Also:</h3> <a
* href="http://docs.aws.amazon.com/goto/WebAPI/polly-2016-06-10/PutLexicon">AWS
* API Reference</a></p>
*/
virtual Model::PutLexiconOutcome PutLexicon(const Model::PutLexiconRequest& request) const;
/**
* <p>Stores a pronunciation lexicon in an AWS Region. If a lexicon with the same
* name already exists in the region, it is overwritten by the new lexicon. Lexicon
* operations have eventual consistency, therefore, it might take some time before
* the lexicon is available to the SynthesizeSpeech operation.</p> <p>For more
* information, see <a
* href="https://docs.aws.amazon.com/polly/latest/dg/managing-lexicons.html">Managing
* Lexicons</a>.</p><p><h3>See Also:</h3> <a
* href="http://docs.aws.amazon.com/goto/WebAPI/polly-2016-06-10/PutLexicon">AWS
* API Reference</a></p>
*
* returns a future to the operation so that it can be executed in parallel to other requests.
*/
virtual Model::PutLexiconOutcomeCallable PutLexiconCallable(const Model::PutLexiconRequest& request) const;
/**
* <p>Stores a pronunciation lexicon in an AWS Region. If a lexicon with the same
* name already exists in the region, it is overwritten by the new lexicon. Lexicon
* operations have eventual consistency, therefore, it might take some time before
* the lexicon is available to the SynthesizeSpeech operation.</p> <p>For more
* information, see <a
* href="https://docs.aws.amazon.com/polly/latest/dg/managing-lexicons.html">Managing
* Lexicons</a>.</p><p><h3>See Also:</h3> <a
* href="http://docs.aws.amazon.com/goto/WebAPI/polly-2016-06-10/PutLexicon">AWS
* API Reference</a></p>
*
* Queues the request into a thread executor and triggers associated callback when operation has finished.
*/
virtual void PutLexiconAsync(const Model::PutLexiconRequest& request, const PutLexiconResponseReceivedHandler& handler, const std::shared_ptr<const Aws::Client::AsyncCallerContext>& context = nullptr) const;
/**
* <p>Allows the creation of an asynchronous synthesis task, by starting a new
* <code>SpeechSynthesisTask</code>. 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.</p><p><h3>See
* Also:</h3> <a
* href="http://docs.aws.amazon.com/goto/WebAPI/polly-2016-06-10/StartSpeechSynthesisTask">AWS
* API Reference</a></p>
*/
virtual Model::StartSpeechSynthesisTaskOutcome StartSpeechSynthesisTask(const Model::StartSpeechSynthesisTaskRequest& request) const;
/**
* <p>Allows the creation of an asynchronous synthesis task, by starting a new
* <code>SpeechSynthesisTask</code>. 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.</p><p><h3>See
* Also:</h3> <a
* href="http://docs.aws.amazon.com/goto/WebAPI/polly-2016-06-10/StartSpeechSynthesisTask">AWS
* API Reference</a></p>
*
* returns a future to the operation so that it can be executed in parallel to other requests.
*/
virtual Model::StartSpeechSynthesisTaskOutcomeCallable StartSpeechSynthesisTaskCallable(const Model::StartSpeechSynthesisTaskRequest& request) const;
/**
* <p>Allows the creation of an asynchronous synthesis task, by starting a new
* <code>SpeechSynthesisTask</code>. 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.</p><p><h3>See
* Also:</h3> <a
* href="http://docs.aws.amazon.com/goto/WebAPI/polly-2016-06-10/StartSpeechSynthesisTask">AWS
* API Reference</a></p>
*
* Queues the request into a thread executor and triggers associated callback when operation has finished.
*/
virtual void StartSpeechSynthesisTaskAsync(const Model::StartSpeechSynthesisTaskRequest& request, const StartSpeechSynthesisTaskResponseReceivedHandler& handler, const std::shared_ptr<const Aws::Client::AsyncCallerContext>& context = nullptr) const;
/**
* <p>Synthesizes UTF-8 input, plain text or SSML, to a stream of bytes. SSML input
* must be valid, well-formed SSML. Some alphabets might not be available with all
* the voices (for example, Cyrillic might not be read at all by English voices)
* unless phoneme mapping is used. For more information, see <a
* href="https://docs.aws.amazon.com/polly/latest/dg/how-text-to-speech-works.html">How
* it Works</a>.</p><p><h3>See Also:</h3> <a
* href="http://docs.aws.amazon.com/goto/WebAPI/polly-2016-06-10/SynthesizeSpeech">AWS
* API Reference</a></p>
*/
virtual Model::SynthesizeSpeechOutcome SynthesizeSpeech(const Model::SynthesizeSpeechRequest& request) const;
/**
* <p>Synthesizes UTF-8 input, plain text or SSML, to a stream of bytes. SSML input
* must be valid, well-formed SSML. Some alphabets might not be available with all
* the voices (for example, Cyrillic might not be read at all by English voices)
* unless phoneme mapping is used. For more information, see <a
* href="https://docs.aws.amazon.com/polly/latest/dg/how-text-to-speech-works.html">How
* it Works</a>.</p><p><h3>See Also:</h3> <a
* href="http://docs.aws.amazon.com/goto/WebAPI/polly-2016-06-10/SynthesizeSpeech">AWS
* API Reference</a></p>
*
* returns a future to the operation so that it can be executed in parallel to other requests.
*/
virtual Model::SynthesizeSpeechOutcomeCallable SynthesizeSpeechCallable(const Model::SynthesizeSpeechRequest& request) const;
/**
* <p>Synthesizes UTF-8 input, plain text or SSML, to a stream of bytes. SSML input
* must be valid, well-formed SSML. Some alphabets might not be available with all
* the voices (for example, Cyrillic might not be read at all by English voices)
* unless phoneme mapping is used. For more information, see <a
* href="https://docs.aws.amazon.com/polly/latest/dg/how-text-to-speech-works.html">How
* it Works</a>.</p><p><h3>See Also:</h3> <a
* href="http://docs.aws.amazon.com/goto/WebAPI/polly-2016-06-10/SynthesizeSpeech">AWS
* API Reference</a></p>
*
* Queues the request into a thread executor and triggers associated callback when operation has finished.
*/
virtual void SynthesizeSpeechAsync(const Model::SynthesizeSpeechRequest& request, const SynthesizeSpeechResponseReceivedHandler& handler, const std::shared_ptr<const Aws::Client::AsyncCallerContext>& context = nullptr) const;
void OverrideEndpoint(const Aws::String& endpoint);
private:
void init(const Aws::Client::ClientConfiguration& clientConfiguration);
void DeleteLexiconAsyncHelper(const Model::DeleteLexiconRequest& request, const DeleteLexiconResponseReceivedHandler& handler, const std::shared_ptr<const Aws::Client::AsyncCallerContext>& context) const;
void DescribeVoicesAsyncHelper(const Model::DescribeVoicesRequest& request, const DescribeVoicesResponseReceivedHandler& handler, const std::shared_ptr<const Aws::Client::AsyncCallerContext>& context) const;
void GetLexiconAsyncHelper(const Model::GetLexiconRequest& request, const GetLexiconResponseReceivedHandler& handler, const std::shared_ptr<const Aws::Client::AsyncCallerContext>& context) const;
void GetSpeechSynthesisTaskAsyncHelper(const Model::GetSpeechSynthesisTaskRequest& request, const GetSpeechSynthesisTaskResponseReceivedHandler& handler, const std::shared_ptr<const Aws::Client::AsyncCallerContext>& context) const;
void ListLexiconsAsyncHelper(const Model::ListLexiconsRequest& request, const ListLexiconsResponseReceivedHandler& handler, const std::shared_ptr<const Aws::Client::AsyncCallerContext>& context) const;
void ListSpeechSynthesisTasksAsyncHelper(const Model::ListSpeechSynthesisTasksRequest& request, const ListSpeechSynthesisTasksResponseReceivedHandler& handler, const std::shared_ptr<const Aws::Client::AsyncCallerContext>& context) const;
void PutLexiconAsyncHelper(const Model::PutLexiconRequest& request, const PutLexiconResponseReceivedHandler& handler, const std::shared_ptr<const Aws::Client::AsyncCallerContext>& context) const;
void StartSpeechSynthesisTaskAsyncHelper(const Model::StartSpeechSynthesisTaskRequest& request, const StartSpeechSynthesisTaskResponseReceivedHandler& handler, const std::shared_ptr<const Aws::Client::AsyncCallerContext>& context) const;
void SynthesizeSpeechAsyncHelper(const Model::SynthesizeSpeechRequest& request, const SynthesizeSpeechResponseReceivedHandler& handler, const std::shared_ptr<const Aws::Client::AsyncCallerContext>& context) const;
Aws::String m_uri;
Aws::String m_configScheme;
std::shared_ptr<Aws::Utils::Threading::Executor> m_executor;
};
} // namespace Polly
} // namespace Aws

View File

@@ -0,0 +1,21 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#pragma once
#include <aws/polly/Polly_EXPORTS.h>
#include <aws/core/Region.h>
#include <aws/core/utils/memory/stl/AWSString.h>
namespace Aws
{
namespace Polly
{
namespace PollyEndpoint
{
AWS_POLLY_API Aws::String ForRegion(const Aws::String& regionName, bool useDualStack = false);
} // namespace PollyEndpoint
} // namespace Polly
} // namespace Aws

View File

@@ -0,0 +1,23 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#pragma once
#include <aws/polly/Polly_EXPORTS.h>
#include <aws/core/client/AWSErrorMarshaller.h>
namespace Aws
{
namespace Client
{
class AWS_POLLY_API PollyErrorMarshaller : public Aws::Client::JsonErrorMarshaller
{
public:
Aws::Client::AWSError<Aws::Client::CoreErrors> FindErrorByName(const char* exceptionName) const override;
};
} // namespace Client
} // namespace Aws

View File

@@ -0,0 +1,92 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#pragma once
#include <aws/core/client/AWSError.h>
#include <aws/core/client/CoreErrors.h>
#include <aws/polly/Polly_EXPORTS.h>
namespace Aws
{
namespace Polly
{
enum class PollyErrors
{
//From Core//
//////////////////////////////////////////////////////////////////////////////////////////
INCOMPLETE_SIGNATURE = 0,
INTERNAL_FAILURE = 1,
INVALID_ACTION = 2,
INVALID_CLIENT_TOKEN_ID = 3,
INVALID_PARAMETER_COMBINATION = 4,
INVALID_QUERY_PARAMETER = 5,
INVALID_PARAMETER_VALUE = 6,
MISSING_ACTION = 7, // SDK should never allow
MISSING_AUTHENTICATION_TOKEN = 8, // SDK should never allow
MISSING_PARAMETER = 9, // SDK should never allow
OPT_IN_REQUIRED = 10,
REQUEST_EXPIRED = 11,
SERVICE_UNAVAILABLE = 12,
THROTTLING = 13,
VALIDATION = 14,
ACCESS_DENIED = 15,
RESOURCE_NOT_FOUND = 16,
UNRECOGNIZED_CLIENT = 17,
MALFORMED_QUERY_STRING = 18,
SLOW_DOWN = 19,
REQUEST_TIME_TOO_SKEWED = 20,
INVALID_SIGNATURE = 21,
SIGNATURE_DOES_NOT_MATCH = 22,
INVALID_ACCESS_KEY_ID = 23,
REQUEST_TIMEOUT = 24,
NETWORK_CONNECTION = 99,
UNKNOWN = 100,
///////////////////////////////////////////////////////////////////////////////////////////
ENGINE_NOT_SUPPORTED= static_cast<int>(Aws::Client::CoreErrors::SERVICE_EXTENSION_START_RANGE) + 1,
INVALID_LEXICON,
INVALID_NEXT_TOKEN,
INVALID_S3_BUCKET,
INVALID_S3_KEY,
INVALID_SAMPLE_RATE,
INVALID_SNS_TOPIC_ARN,
INVALID_SSML,
INVALID_TASK_ID,
LANGUAGE_NOT_SUPPORTED,
LEXICON_NOT_FOUND,
LEXICON_SIZE_EXCEEDED,
MARKS_NOT_SUPPORTED_FOR_FORMAT,
MAX_LEXEME_LENGTH_EXCEEDED,
MAX_LEXICONS_NUMBER_EXCEEDED,
SERVICE_FAILURE,
SSML_MARKS_NOT_SUPPORTED_FOR_TEXT_TYPE,
SYNTHESIS_TASK_NOT_FOUND,
TEXT_LENGTH_EXCEEDED,
UNSUPPORTED_PLS_ALPHABET,
UNSUPPORTED_PLS_LANGUAGE
};
class AWS_POLLY_API PollyError : public Aws::Client::AWSError<PollyErrors>
{
public:
PollyError() {}
PollyError(const Aws::Client::AWSError<Aws::Client::CoreErrors>& rhs) : Aws::Client::AWSError<PollyErrors>(rhs) {}
PollyError(Aws::Client::AWSError<Aws::Client::CoreErrors>&& rhs) : Aws::Client::AWSError<PollyErrors>(rhs) {}
PollyError(const Aws::Client::AWSError<PollyErrors>& rhs) : Aws::Client::AWSError<PollyErrors>(rhs) {}
PollyError(Aws::Client::AWSError<PollyErrors>&& rhs) : Aws::Client::AWSError<PollyErrors>(rhs) {}
template <typename T>
T GetModeledError();
};
namespace PollyErrorMapper
{
AWS_POLLY_API Aws::Client::AWSError<Aws::Client::CoreErrors> GetErrorForName(const char* errorName);
}
} // namespace Polly
} // namespace Aws

View File

@@ -0,0 +1,42 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#pragma once
#include <aws/polly/Polly_EXPORTS.h>
#include <aws/core/AmazonSerializableWebServiceRequest.h>
#include <aws/core/utils/UnreferencedParam.h>
#include <aws/core/http/HttpRequest.h>
namespace Aws
{
namespace Polly
{
class AWS_POLLY_API PollyRequest : public Aws::AmazonSerializableWebServiceRequest
{
public:
virtual ~PollyRequest () {}
void AddParametersToRequest(Aws::Http::HttpRequest& httpRequest) const { AWS_UNREFERENCED_PARAM(httpRequest); }
inline Aws::Http::HeaderValueCollection GetHeaders() const override
{
auto headers = GetRequestSpecificHeaders();
if(headers.size() == 0 || (headers.size() > 0 && headers.count(Aws::Http::CONTENT_TYPE_HEADER) == 0))
{
headers.emplace(Aws::Http::HeaderValuePair(Aws::Http::CONTENT_TYPE_HEADER, Aws::AMZN_JSON_CONTENT_TYPE_1_1 ));
}
headers.emplace(Aws::Http::HeaderValuePair(Aws::Http::API_VERSION_HEADER, "2016-06-10"));
return headers;
}
protected:
virtual Aws::Http::HeaderValueCollection GetRequestSpecificHeaders() const { return Aws::Http::HeaderValueCollection(); }
};
} // namespace Polly
} // namespace Aws

View File

@@ -0,0 +1,29 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#pragma once
#ifdef _MSC_VER
//disable windows complaining about max template size.
#pragma warning (disable : 4503)
#endif // _MSC_VER
#if defined (USE_WINDOWS_DLL_SEMANTICS) || defined (_WIN32)
#ifdef _MSC_VER
#pragma warning(disable : 4251)
#endif // _MSC_VER
#ifdef USE_IMPORT_EXPORT
#ifdef AWS_POLLY_EXPORTS
#define AWS_POLLY_API __declspec(dllexport)
#else
#define AWS_POLLY_API __declspec(dllimport)
#endif /* AWS_POLLY_EXPORTS */
#else
#define AWS_POLLY_API
#endif // USE_IMPORT_EXPORT
#else // defined (USE_WINDOWS_DLL_SEMANTICS) || defined (WIN32)
#define AWS_POLLY_API
#endif // defined (USE_WINDOWS_DLL_SEMANTICS) || defined (WIN32)

View File

@@ -0,0 +1,91 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#pragma once
#include <aws/polly/Polly_EXPORTS.h>
#include <aws/polly/PollyRequest.h>
#include <aws/core/utils/memory/stl/AWSString.h>
#include <utility>
namespace Aws
{
namespace Polly
{
namespace Model
{
/**
*/
class AWS_POLLY_API DeleteLexiconRequest : public PollyRequest
{
public:
DeleteLexiconRequest();
// Service request name is the Operation name which will send this request out,
// each operation should has unique request name, so that we can get operation's name from this request.
// Note: this is not true for response, multiple operations may have the same response name,
// so we can not get operation's name from response.
inline virtual const char* GetServiceRequestName() const override { return "DeleteLexicon"; }
Aws::String SerializePayload() const override;
/**
* <p>The name of the lexicon to delete. Must be an existing lexicon in the
* region.</p>
*/
inline const Aws::String& GetName() const{ return m_name; }
/**
* <p>The name of the lexicon to delete. Must be an existing lexicon in the
* region.</p>
*/
inline bool NameHasBeenSet() const { return m_nameHasBeenSet; }
/**
* <p>The name of the lexicon to delete. Must be an existing lexicon in the
* region.</p>
*/
inline void SetName(const Aws::String& value) { m_nameHasBeenSet = true; m_name = value; }
/**
* <p>The name of the lexicon to delete. Must be an existing lexicon in the
* region.</p>
*/
inline void SetName(Aws::String&& value) { m_nameHasBeenSet = true; m_name = std::move(value); }
/**
* <p>The name of the lexicon to delete. Must be an existing lexicon in the
* region.</p>
*/
inline void SetName(const char* value) { m_nameHasBeenSet = true; m_name.assign(value); }
/**
* <p>The name of the lexicon to delete. Must be an existing lexicon in the
* region.</p>
*/
inline DeleteLexiconRequest& WithName(const Aws::String& value) { SetName(value); return *this;}
/**
* <p>The name of the lexicon to delete. Must be an existing lexicon in the
* region.</p>
*/
inline DeleteLexiconRequest& WithName(Aws::String&& value) { SetName(std::move(value)); return *this;}
/**
* <p>The name of the lexicon to delete. Must be an existing lexicon in the
* region.</p>
*/
inline DeleteLexiconRequest& WithName(const char* value) { SetName(value); return *this;}
private:
Aws::String m_name;
bool m_nameHasBeenSet;
};
} // namespace Model
} // namespace Polly
} // namespace Aws

View File

@@ -0,0 +1,36 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#pragma once
#include <aws/polly/Polly_EXPORTS.h>
namespace Aws
{
template<typename RESULT_TYPE>
class AmazonWebServiceResult;
namespace Utils
{
namespace Json
{
class JsonValue;
} // namespace Json
} // namespace Utils
namespace Polly
{
namespace Model
{
class AWS_POLLY_API DeleteLexiconResult
{
public:
DeleteLexiconResult();
DeleteLexiconResult(const Aws::AmazonWebServiceResult<Aws::Utils::Json::JsonValue>& result);
DeleteLexiconResult& operator=(const Aws::AmazonWebServiceResult<Aws::Utils::Json::JsonValue>& result);
};
} // namespace Model
} // namespace Polly
} // namespace Aws

View File

@@ -0,0 +1,233 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#pragma once
#include <aws/polly/Polly_EXPORTS.h>
#include <aws/polly/PollyRequest.h>
#include <aws/polly/model/Engine.h>
#include <aws/polly/model/LanguageCode.h>
#include <aws/core/utils/memory/stl/AWSString.h>
#include <utility>
namespace Aws
{
namespace Http
{
class URI;
} //namespace Http
namespace Polly
{
namespace Model
{
/**
*/
class AWS_POLLY_API DescribeVoicesRequest : public PollyRequest
{
public:
DescribeVoicesRequest();
// Service request name is the Operation name which will send this request out,
// each operation should has unique request name, so that we can get operation's name from this request.
// Note: this is not true for response, multiple operations may have the same response name,
// so we can not get operation's name from response.
inline virtual const char* GetServiceRequestName() const override { return "DescribeVoices"; }
Aws::String SerializePayload() const override;
void AddQueryStringParameters(Aws::Http::URI& uri) const override;
/**
* <p>Specifies the engine (<code>standard</code> or <code>neural</code>) used by
* Amazon Polly when processing input text for speech synthesis. </p>
*/
inline const Engine& GetEngine() const{ return m_engine; }
/**
* <p>Specifies the engine (<code>standard</code> or <code>neural</code>) used by
* Amazon Polly when processing input text for speech synthesis. </p>
*/
inline bool EngineHasBeenSet() const { return m_engineHasBeenSet; }
/**
* <p>Specifies the engine (<code>standard</code> or <code>neural</code>) used by
* Amazon Polly when processing input text for speech synthesis. </p>
*/
inline void SetEngine(const Engine& value) { m_engineHasBeenSet = true; m_engine = value; }
/**
* <p>Specifies the engine (<code>standard</code> or <code>neural</code>) used by
* Amazon Polly when processing input text for speech synthesis. </p>
*/
inline void SetEngine(Engine&& value) { m_engineHasBeenSet = true; m_engine = std::move(value); }
/**
* <p>Specifies the engine (<code>standard</code> or <code>neural</code>) used by
* Amazon Polly when processing input text for speech synthesis. </p>
*/
inline DescribeVoicesRequest& WithEngine(const Engine& value) { SetEngine(value); return *this;}
/**
* <p>Specifies the engine (<code>standard</code> or <code>neural</code>) used by
* Amazon Polly when processing input text for speech synthesis. </p>
*/
inline DescribeVoicesRequest& WithEngine(Engine&& value) { SetEngine(std::move(value)); return *this;}
/**
* <p> The language identification tag (ISO 639 code for the language name-ISO 3166
* country code) for filtering the list of voices returned. If you don't specify
* this optional parameter, all available voices are returned. </p>
*/
inline const LanguageCode& GetLanguageCode() const{ return m_languageCode; }
/**
* <p> The language identification tag (ISO 639 code for the language name-ISO 3166
* country code) for filtering the list of voices returned. If you don't specify
* this optional parameter, all available voices are returned. </p>
*/
inline bool LanguageCodeHasBeenSet() const { return m_languageCodeHasBeenSet; }
/**
* <p> The language identification tag (ISO 639 code for the language name-ISO 3166
* country code) for filtering the list of voices returned. If you don't specify
* this optional parameter, all available voices are returned. </p>
*/
inline void SetLanguageCode(const LanguageCode& value) { m_languageCodeHasBeenSet = true; m_languageCode = value; }
/**
* <p> The language identification tag (ISO 639 code for the language name-ISO 3166
* country code) for filtering the list of voices returned. If you don't specify
* this optional parameter, all available voices are returned. </p>
*/
inline void SetLanguageCode(LanguageCode&& value) { m_languageCodeHasBeenSet = true; m_languageCode = std::move(value); }
/**
* <p> The language identification tag (ISO 639 code for the language name-ISO 3166
* country code) for filtering the list of voices returned. If you don't specify
* this optional parameter, all available voices are returned. </p>
*/
inline DescribeVoicesRequest& WithLanguageCode(const LanguageCode& value) { SetLanguageCode(value); return *this;}
/**
* <p> The language identification tag (ISO 639 code for the language name-ISO 3166
* country code) for filtering the list of voices returned. If you don't specify
* this optional parameter, all available voices are returned. </p>
*/
inline DescribeVoicesRequest& WithLanguageCode(LanguageCode&& value) { SetLanguageCode(std::move(value)); return *this;}
/**
* <p>Boolean value indicating whether to return any bilingual voices that use the
* specified language as an additional language. For instance, if you request all
* languages that use US English (es-US), and there is an Italian voice that speaks
* both Italian (it-IT) and US English, that voice will be included if you specify
* <code>yes</code> but not if you specify <code>no</code>.</p>
*/
inline bool GetIncludeAdditionalLanguageCodes() const{ return m_includeAdditionalLanguageCodes; }
/**
* <p>Boolean value indicating whether to return any bilingual voices that use the
* specified language as an additional language. For instance, if you request all
* languages that use US English (es-US), and there is an Italian voice that speaks
* both Italian (it-IT) and US English, that voice will be included if you specify
* <code>yes</code> but not if you specify <code>no</code>.</p>
*/
inline bool IncludeAdditionalLanguageCodesHasBeenSet() const { return m_includeAdditionalLanguageCodesHasBeenSet; }
/**
* <p>Boolean value indicating whether to return any bilingual voices that use the
* specified language as an additional language. For instance, if you request all
* languages that use US English (es-US), and there is an Italian voice that speaks
* both Italian (it-IT) and US English, that voice will be included if you specify
* <code>yes</code> but not if you specify <code>no</code>.</p>
*/
inline void SetIncludeAdditionalLanguageCodes(bool value) { m_includeAdditionalLanguageCodesHasBeenSet = true; m_includeAdditionalLanguageCodes = value; }
/**
* <p>Boolean value indicating whether to return any bilingual voices that use the
* specified language as an additional language. For instance, if you request all
* languages that use US English (es-US), and there is an Italian voice that speaks
* both Italian (it-IT) and US English, that voice will be included if you specify
* <code>yes</code> but not if you specify <code>no</code>.</p>
*/
inline DescribeVoicesRequest& WithIncludeAdditionalLanguageCodes(bool value) { SetIncludeAdditionalLanguageCodes(value); return *this;}
/**
* <p>An opaque pagination token returned from the previous
* <code>DescribeVoices</code> operation. If present, this indicates where to
* continue the listing.</p>
*/
inline const Aws::String& GetNextToken() const{ return m_nextToken; }
/**
* <p>An opaque pagination token returned from the previous
* <code>DescribeVoices</code> operation. If present, this indicates where to
* continue the listing.</p>
*/
inline bool NextTokenHasBeenSet() const { return m_nextTokenHasBeenSet; }
/**
* <p>An opaque pagination token returned from the previous
* <code>DescribeVoices</code> operation. If present, this indicates where to
* continue the listing.</p>
*/
inline void SetNextToken(const Aws::String& value) { m_nextTokenHasBeenSet = true; m_nextToken = value; }
/**
* <p>An opaque pagination token returned from the previous
* <code>DescribeVoices</code> operation. If present, this indicates where to
* continue the listing.</p>
*/
inline void SetNextToken(Aws::String&& value) { m_nextTokenHasBeenSet = true; m_nextToken = std::move(value); }
/**
* <p>An opaque pagination token returned from the previous
* <code>DescribeVoices</code> operation. If present, this indicates where to
* continue the listing.</p>
*/
inline void SetNextToken(const char* value) { m_nextTokenHasBeenSet = true; m_nextToken.assign(value); }
/**
* <p>An opaque pagination token returned from the previous
* <code>DescribeVoices</code> operation. If present, this indicates where to
* continue the listing.</p>
*/
inline DescribeVoicesRequest& WithNextToken(const Aws::String& value) { SetNextToken(value); return *this;}
/**
* <p>An opaque pagination token returned from the previous
* <code>DescribeVoices</code> operation. If present, this indicates where to
* continue the listing.</p>
*/
inline DescribeVoicesRequest& WithNextToken(Aws::String&& value) { SetNextToken(std::move(value)); return *this;}
/**
* <p>An opaque pagination token returned from the previous
* <code>DescribeVoices</code> operation. If present, this indicates where to
* continue the listing.</p>
*/
inline DescribeVoicesRequest& WithNextToken(const char* value) { SetNextToken(value); return *this;}
private:
Engine m_engine;
bool m_engineHasBeenSet;
LanguageCode m_languageCode;
bool m_languageCodeHasBeenSet;
bool m_includeAdditionalLanguageCodes;
bool m_includeAdditionalLanguageCodesHasBeenSet;
Aws::String m_nextToken;
bool m_nextTokenHasBeenSet;
};
} // namespace Model
} // namespace Polly
} // namespace Aws

View File

@@ -0,0 +1,131 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#pragma once
#include <aws/polly/Polly_EXPORTS.h>
#include <aws/core/utils/memory/stl/AWSVector.h>
#include <aws/core/utils/memory/stl/AWSString.h>
#include <aws/polly/model/Voice.h>
#include <utility>
namespace Aws
{
template<typename RESULT_TYPE>
class AmazonWebServiceResult;
namespace Utils
{
namespace Json
{
class JsonValue;
} // namespace Json
} // namespace Utils
namespace Polly
{
namespace Model
{
class AWS_POLLY_API DescribeVoicesResult
{
public:
DescribeVoicesResult();
DescribeVoicesResult(const Aws::AmazonWebServiceResult<Aws::Utils::Json::JsonValue>& result);
DescribeVoicesResult& operator=(const Aws::AmazonWebServiceResult<Aws::Utils::Json::JsonValue>& result);
/**
* <p>A list of voices with their properties.</p>
*/
inline const Aws::Vector<Voice>& GetVoices() const{ return m_voices; }
/**
* <p>A list of voices with their properties.</p>
*/
inline void SetVoices(const Aws::Vector<Voice>& value) { m_voices = value; }
/**
* <p>A list of voices with their properties.</p>
*/
inline void SetVoices(Aws::Vector<Voice>&& value) { m_voices = std::move(value); }
/**
* <p>A list of voices with their properties.</p>
*/
inline DescribeVoicesResult& WithVoices(const Aws::Vector<Voice>& value) { SetVoices(value); return *this;}
/**
* <p>A list of voices with their properties.</p>
*/
inline DescribeVoicesResult& WithVoices(Aws::Vector<Voice>&& value) { SetVoices(std::move(value)); return *this;}
/**
* <p>A list of voices with their properties.</p>
*/
inline DescribeVoicesResult& AddVoices(const Voice& value) { m_voices.push_back(value); return *this; }
/**
* <p>A list of voices with their properties.</p>
*/
inline DescribeVoicesResult& AddVoices(Voice&& value) { m_voices.push_back(std::move(value)); return *this; }
/**
* <p>The pagination token to use in the next request to continue the listing of
* voices. <code>NextToken</code> is returned only if the response is
* truncated.</p>
*/
inline const Aws::String& GetNextToken() const{ return m_nextToken; }
/**
* <p>The pagination token to use in the next request to continue the listing of
* voices. <code>NextToken</code> is returned only if the response is
* truncated.</p>
*/
inline void SetNextToken(const Aws::String& value) { m_nextToken = value; }
/**
* <p>The pagination token to use in the next request to continue the listing of
* voices. <code>NextToken</code> is returned only if the response is
* truncated.</p>
*/
inline void SetNextToken(Aws::String&& value) { m_nextToken = std::move(value); }
/**
* <p>The pagination token to use in the next request to continue the listing of
* voices. <code>NextToken</code> is returned only if the response is
* truncated.</p>
*/
inline void SetNextToken(const char* value) { m_nextToken.assign(value); }
/**
* <p>The pagination token to use in the next request to continue the listing of
* voices. <code>NextToken</code> is returned only if the response is
* truncated.</p>
*/
inline DescribeVoicesResult& WithNextToken(const Aws::String& value) { SetNextToken(value); return *this;}
/**
* <p>The pagination token to use in the next request to continue the listing of
* voices. <code>NextToken</code> is returned only if the response is
* truncated.</p>
*/
inline DescribeVoicesResult& WithNextToken(Aws::String&& value) { SetNextToken(std::move(value)); return *this;}
/**
* <p>The pagination token to use in the next request to continue the listing of
* voices. <code>NextToken</code> is returned only if the response is
* truncated.</p>
*/
inline DescribeVoicesResult& WithNextToken(const char* value) { SetNextToken(value); return *this;}
private:
Aws::Vector<Voice> m_voices;
Aws::String m_nextToken;
};
} // namespace Model
} // namespace Polly
} // namespace Aws

View File

@@ -0,0 +1,31 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#pragma once
#include <aws/polly/Polly_EXPORTS.h>
#include <aws/core/utils/memory/stl/AWSString.h>
namespace Aws
{
namespace Polly
{
namespace Model
{
enum class Engine
{
NOT_SET,
standard,
neural
};
namespace EngineMapper
{
AWS_POLLY_API Engine GetEngineForName(const Aws::String& name);
AWS_POLLY_API Aws::String GetNameForEngine(Engine value);
} // namespace EngineMapper
} // namespace Model
} // namespace Polly
} // namespace Aws

View File

@@ -0,0 +1,31 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#pragma once
#include <aws/polly/Polly_EXPORTS.h>
#include <aws/core/utils/memory/stl/AWSString.h>
namespace Aws
{
namespace Polly
{
namespace Model
{
enum class Gender
{
NOT_SET,
Female,
Male
};
namespace GenderMapper
{
AWS_POLLY_API Gender GetGenderForName(const Aws::String& name);
AWS_POLLY_API Aws::String GetNameForGender(Gender value);
} // namespace GenderMapper
} // namespace Model
} // namespace Polly
} // namespace Aws

View File

@@ -0,0 +1,83 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#pragma once
#include <aws/polly/Polly_EXPORTS.h>
#include <aws/polly/PollyRequest.h>
#include <aws/core/utils/memory/stl/AWSString.h>
#include <utility>
namespace Aws
{
namespace Polly
{
namespace Model
{
/**
*/
class AWS_POLLY_API GetLexiconRequest : public PollyRequest
{
public:
GetLexiconRequest();
// Service request name is the Operation name which will send this request out,
// each operation should has unique request name, so that we can get operation's name from this request.
// Note: this is not true for response, multiple operations may have the same response name,
// so we can not get operation's name from response.
inline virtual const char* GetServiceRequestName() const override { return "GetLexicon"; }
Aws::String SerializePayload() const override;
/**
* <p>Name of the lexicon.</p>
*/
inline const Aws::String& GetName() const{ return m_name; }
/**
* <p>Name of the lexicon.</p>
*/
inline bool NameHasBeenSet() const { return m_nameHasBeenSet; }
/**
* <p>Name of the lexicon.</p>
*/
inline void SetName(const Aws::String& value) { m_nameHasBeenSet = true; m_name = value; }
/**
* <p>Name of the lexicon.</p>
*/
inline void SetName(Aws::String&& value) { m_nameHasBeenSet = true; m_name = std::move(value); }
/**
* <p>Name of the lexicon.</p>
*/
inline void SetName(const char* value) { m_nameHasBeenSet = true; m_name.assign(value); }
/**
* <p>Name of the lexicon.</p>
*/
inline GetLexiconRequest& WithName(const Aws::String& value) { SetName(value); return *this;}
/**
* <p>Name of the lexicon.</p>
*/
inline GetLexiconRequest& WithName(Aws::String&& value) { SetName(std::move(value)); return *this;}
/**
* <p>Name of the lexicon.</p>
*/
inline GetLexiconRequest& WithName(const char* value) { SetName(value); return *this;}
private:
Aws::String m_name;
bool m_nameHasBeenSet;
};
} // namespace Model
} // namespace Polly
} // namespace Aws

View File

@@ -0,0 +1,106 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#pragma once
#include <aws/polly/Polly_EXPORTS.h>
#include <aws/polly/model/Lexicon.h>
#include <aws/polly/model/LexiconAttributes.h>
#include <utility>
namespace Aws
{
template<typename RESULT_TYPE>
class AmazonWebServiceResult;
namespace Utils
{
namespace Json
{
class JsonValue;
} // namespace Json
} // namespace Utils
namespace Polly
{
namespace Model
{
class AWS_POLLY_API GetLexiconResult
{
public:
GetLexiconResult();
GetLexiconResult(const Aws::AmazonWebServiceResult<Aws::Utils::Json::JsonValue>& result);
GetLexiconResult& operator=(const Aws::AmazonWebServiceResult<Aws::Utils::Json::JsonValue>& result);
/**
* <p>Lexicon object that provides name and the string content of the lexicon. </p>
*/
inline const Lexicon& GetLexicon() const{ return m_lexicon; }
/**
* <p>Lexicon object that provides name and the string content of the lexicon. </p>
*/
inline void SetLexicon(const Lexicon& value) { m_lexicon = value; }
/**
* <p>Lexicon object that provides name and the string content of the lexicon. </p>
*/
inline void SetLexicon(Lexicon&& value) { m_lexicon = std::move(value); }
/**
* <p>Lexicon object that provides name and the string content of the lexicon. </p>
*/
inline GetLexiconResult& WithLexicon(const Lexicon& value) { SetLexicon(value); return *this;}
/**
* <p>Lexicon object that provides name and the string content of the lexicon. </p>
*/
inline GetLexiconResult& WithLexicon(Lexicon&& value) { SetLexicon(std::move(value)); return *this;}
/**
* <p>Metadata of the lexicon, including phonetic alphabetic used, language code,
* lexicon ARN, number of lexemes defined in the lexicon, and size of lexicon in
* bytes.</p>
*/
inline const LexiconAttributes& GetLexiconAttributes() const{ return m_lexiconAttributes; }
/**
* <p>Metadata of the lexicon, including phonetic alphabetic used, language code,
* lexicon ARN, number of lexemes defined in the lexicon, and size of lexicon in
* bytes.</p>
*/
inline void SetLexiconAttributes(const LexiconAttributes& value) { m_lexiconAttributes = value; }
/**
* <p>Metadata of the lexicon, including phonetic alphabetic used, language code,
* lexicon ARN, number of lexemes defined in the lexicon, and size of lexicon in
* bytes.</p>
*/
inline void SetLexiconAttributes(LexiconAttributes&& value) { m_lexiconAttributes = std::move(value); }
/**
* <p>Metadata of the lexicon, including phonetic alphabetic used, language code,
* lexicon ARN, number of lexemes defined in the lexicon, and size of lexicon in
* bytes.</p>
*/
inline GetLexiconResult& WithLexiconAttributes(const LexiconAttributes& value) { SetLexiconAttributes(value); return *this;}
/**
* <p>Metadata of the lexicon, including phonetic alphabetic used, language code,
* lexicon ARN, number of lexemes defined in the lexicon, and size of lexicon in
* bytes.</p>
*/
inline GetLexiconResult& WithLexiconAttributes(LexiconAttributes&& value) { SetLexiconAttributes(std::move(value)); return *this;}
private:
Lexicon m_lexicon;
LexiconAttributes m_lexiconAttributes;
};
} // namespace Model
} // namespace Polly
} // namespace Aws

View File

@@ -0,0 +1,83 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#pragma once
#include <aws/polly/Polly_EXPORTS.h>
#include <aws/polly/PollyRequest.h>
#include <aws/core/utils/memory/stl/AWSString.h>
#include <utility>
namespace Aws
{
namespace Polly
{
namespace Model
{
/**
*/
class AWS_POLLY_API GetSpeechSynthesisTaskRequest : public PollyRequest
{
public:
GetSpeechSynthesisTaskRequest();
// Service request name is the Operation name which will send this request out,
// each operation should has unique request name, so that we can get operation's name from this request.
// Note: this is not true for response, multiple operations may have the same response name,
// so we can not get operation's name from response.
inline virtual const char* GetServiceRequestName() const override { return "GetSpeechSynthesisTask"; }
Aws::String SerializePayload() const override;
/**
* <p>The Amazon Polly generated identifier for a speech synthesis task.</p>
*/
inline const Aws::String& GetTaskId() const{ return m_taskId; }
/**
* <p>The Amazon Polly generated identifier for a speech synthesis task.</p>
*/
inline bool TaskIdHasBeenSet() const { return m_taskIdHasBeenSet; }
/**
* <p>The Amazon Polly generated identifier for a speech synthesis task.</p>
*/
inline void SetTaskId(const Aws::String& value) { m_taskIdHasBeenSet = true; m_taskId = value; }
/**
* <p>The Amazon Polly generated identifier for a speech synthesis task.</p>
*/
inline void SetTaskId(Aws::String&& value) { m_taskIdHasBeenSet = true; m_taskId = std::move(value); }
/**
* <p>The Amazon Polly generated identifier for a speech synthesis task.</p>
*/
inline void SetTaskId(const char* value) { m_taskIdHasBeenSet = true; m_taskId.assign(value); }
/**
* <p>The Amazon Polly generated identifier for a speech synthesis task.</p>
*/
inline GetSpeechSynthesisTaskRequest& WithTaskId(const Aws::String& value) { SetTaskId(value); return *this;}
/**
* <p>The Amazon Polly generated identifier for a speech synthesis task.</p>
*/
inline GetSpeechSynthesisTaskRequest& WithTaskId(Aws::String&& value) { SetTaskId(std::move(value)); return *this;}
/**
* <p>The Amazon Polly generated identifier for a speech synthesis task.</p>
*/
inline GetSpeechSynthesisTaskRequest& WithTaskId(const char* value) { SetTaskId(value); return *this;}
private:
Aws::String m_taskId;
bool m_taskIdHasBeenSet;
};
} // namespace Model
} // namespace Polly
} // namespace Aws

View File

@@ -0,0 +1,72 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#pragma once
#include <aws/polly/Polly_EXPORTS.h>
#include <aws/polly/model/SynthesisTask.h>
#include <utility>
namespace Aws
{
template<typename RESULT_TYPE>
class AmazonWebServiceResult;
namespace Utils
{
namespace Json
{
class JsonValue;
} // namespace Json
} // namespace Utils
namespace Polly
{
namespace Model
{
class AWS_POLLY_API GetSpeechSynthesisTaskResult
{
public:
GetSpeechSynthesisTaskResult();
GetSpeechSynthesisTaskResult(const Aws::AmazonWebServiceResult<Aws::Utils::Json::JsonValue>& result);
GetSpeechSynthesisTaskResult& operator=(const Aws::AmazonWebServiceResult<Aws::Utils::Json::JsonValue>& result);
/**
* <p>SynthesisTask object that provides information from the requested task,
* including output format, creation time, task status, and so on.</p>
*/
inline const SynthesisTask& GetSynthesisTask() const{ return m_synthesisTask; }
/**
* <p>SynthesisTask object that provides information from the requested task,
* including output format, creation time, task status, and so on.</p>
*/
inline void SetSynthesisTask(const SynthesisTask& value) { m_synthesisTask = value; }
/**
* <p>SynthesisTask object that provides information from the requested task,
* including output format, creation time, task status, and so on.</p>
*/
inline void SetSynthesisTask(SynthesisTask&& value) { m_synthesisTask = std::move(value); }
/**
* <p>SynthesisTask object that provides information from the requested task,
* including output format, creation time, task status, and so on.</p>
*/
inline GetSpeechSynthesisTaskResult& WithSynthesisTask(const SynthesisTask& value) { SetSynthesisTask(value); return *this;}
/**
* <p>SynthesisTask object that provides information from the requested task,
* including output format, creation time, task status, and so on.</p>
*/
inline GetSpeechSynthesisTaskResult& WithSynthesisTask(SynthesisTask&& value) { SetSynthesisTask(std::move(value)); return *this;}
private:
SynthesisTask m_synthesisTask;
};
} // namespace Model
} // namespace Polly
} // namespace Aws

View File

@@ -0,0 +1,58 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#pragma once
#include <aws/polly/Polly_EXPORTS.h>
#include <aws/core/utils/memory/stl/AWSString.h>
namespace Aws
{
namespace Polly
{
namespace Model
{
enum class LanguageCode
{
NOT_SET,
arb,
cmn_CN,
cy_GB,
da_DK,
de_DE,
en_AU,
en_GB,
en_GB_WLS,
en_IN,
en_US,
es_ES,
es_MX,
es_US,
fr_CA,
fr_FR,
is_IS,
it_IT,
ja_JP,
hi_IN,
ko_KR,
nb_NO,
nl_NL,
pl_PL,
pt_BR,
pt_PT,
ro_RO,
ru_RU,
sv_SE,
tr_TR
};
namespace LanguageCodeMapper
{
AWS_POLLY_API LanguageCode GetLanguageCodeForName(const Aws::String& name);
AWS_POLLY_API Aws::String GetNameForLanguageCode(LanguageCode value);
} // namespace LanguageCodeMapper
} // namespace Model
} // namespace Polly
} // namespace Aws

View File

@@ -0,0 +1,143 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#pragma once
#include <aws/polly/Polly_EXPORTS.h>
#include <aws/core/utils/memory/stl/AWSString.h>
#include <utility>
namespace Aws
{
namespace Utils
{
namespace Json
{
class JsonValue;
class JsonView;
} // namespace Json
} // namespace Utils
namespace Polly
{
namespace Model
{
/**
* <p>Provides lexicon name and lexicon content in string format. For more
* information, see <a
* href="https://www.w3.org/TR/pronunciation-lexicon/">Pronunciation Lexicon
* Specification (PLS) Version 1.0</a>.</p><p><h3>See Also:</h3> <a
* href="http://docs.aws.amazon.com/goto/WebAPI/polly-2016-06-10/Lexicon">AWS API
* Reference</a></p>
*/
class AWS_POLLY_API Lexicon
{
public:
Lexicon();
Lexicon(Aws::Utils::Json::JsonView jsonValue);
Lexicon& operator=(Aws::Utils::Json::JsonView jsonValue);
Aws::Utils::Json::JsonValue Jsonize() const;
/**
* <p>Lexicon content in string format. The content of a lexicon must be in PLS
* format.</p>
*/
inline const Aws::String& GetContent() const{ return m_content; }
/**
* <p>Lexicon content in string format. The content of a lexicon must be in PLS
* format.</p>
*/
inline bool ContentHasBeenSet() const { return m_contentHasBeenSet; }
/**
* <p>Lexicon content in string format. The content of a lexicon must be in PLS
* format.</p>
*/
inline void SetContent(const Aws::String& value) { m_contentHasBeenSet = true; m_content = value; }
/**
* <p>Lexicon content in string format. The content of a lexicon must be in PLS
* format.</p>
*/
inline void SetContent(Aws::String&& value) { m_contentHasBeenSet = true; m_content = std::move(value); }
/**
* <p>Lexicon content in string format. The content of a lexicon must be in PLS
* format.</p>
*/
inline void SetContent(const char* value) { m_contentHasBeenSet = true; m_content.assign(value); }
/**
* <p>Lexicon content in string format. The content of a lexicon must be in PLS
* format.</p>
*/
inline Lexicon& WithContent(const Aws::String& value) { SetContent(value); return *this;}
/**
* <p>Lexicon content in string format. The content of a lexicon must be in PLS
* format.</p>
*/
inline Lexicon& WithContent(Aws::String&& value) { SetContent(std::move(value)); return *this;}
/**
* <p>Lexicon content in string format. The content of a lexicon must be in PLS
* format.</p>
*/
inline Lexicon& WithContent(const char* value) { SetContent(value); return *this;}
/**
* <p>Name of the lexicon.</p>
*/
inline const Aws::String& GetName() const{ return m_name; }
/**
* <p>Name of the lexicon.</p>
*/
inline bool NameHasBeenSet() const { return m_nameHasBeenSet; }
/**
* <p>Name of the lexicon.</p>
*/
inline void SetName(const Aws::String& value) { m_nameHasBeenSet = true; m_name = value; }
/**
* <p>Name of the lexicon.</p>
*/
inline void SetName(Aws::String&& value) { m_nameHasBeenSet = true; m_name = std::move(value); }
/**
* <p>Name of the lexicon.</p>
*/
inline void SetName(const char* value) { m_nameHasBeenSet = true; m_name.assign(value); }
/**
* <p>Name of the lexicon.</p>
*/
inline Lexicon& WithName(const Aws::String& value) { SetName(value); return *this;}
/**
* <p>Name of the lexicon.</p>
*/
inline Lexicon& WithName(Aws::String&& value) { SetName(std::move(value)); return *this;}
/**
* <p>Name of the lexicon.</p>
*/
inline Lexicon& WithName(const char* value) { SetName(value); return *this;}
private:
Aws::String m_content;
bool m_contentHasBeenSet;
Aws::String m_name;
bool m_nameHasBeenSet;
};
} // namespace Model
} // namespace Polly
} // namespace Aws

View File

@@ -0,0 +1,273 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#pragma once
#include <aws/polly/Polly_EXPORTS.h>
#include <aws/core/utils/memory/stl/AWSString.h>
#include <aws/polly/model/LanguageCode.h>
#include <aws/core/utils/DateTime.h>
#include <utility>
namespace Aws
{
namespace Utils
{
namespace Json
{
class JsonValue;
class JsonView;
} // namespace Json
} // namespace Utils
namespace Polly
{
namespace Model
{
/**
* <p>Contains metadata describing the lexicon such as the number of lexemes,
* language code, and so on. For more information, see <a
* href="https://docs.aws.amazon.com/polly/latest/dg/managing-lexicons.html">Managing
* Lexicons</a>.</p><p><h3>See Also:</h3> <a
* href="http://docs.aws.amazon.com/goto/WebAPI/polly-2016-06-10/LexiconAttributes">AWS
* API Reference</a></p>
*/
class AWS_POLLY_API LexiconAttributes
{
public:
LexiconAttributes();
LexiconAttributes(Aws::Utils::Json::JsonView jsonValue);
LexiconAttributes& operator=(Aws::Utils::Json::JsonView jsonValue);
Aws::Utils::Json::JsonValue Jsonize() const;
/**
* <p>Phonetic alphabet used in the lexicon. Valid values are <code>ipa</code> and
* <code>x-sampa</code>.</p>
*/
inline const Aws::String& GetAlphabet() const{ return m_alphabet; }
/**
* <p>Phonetic alphabet used in the lexicon. Valid values are <code>ipa</code> and
* <code>x-sampa</code>.</p>
*/
inline bool AlphabetHasBeenSet() const { return m_alphabetHasBeenSet; }
/**
* <p>Phonetic alphabet used in the lexicon. Valid values are <code>ipa</code> and
* <code>x-sampa</code>.</p>
*/
inline void SetAlphabet(const Aws::String& value) { m_alphabetHasBeenSet = true; m_alphabet = value; }
/**
* <p>Phonetic alphabet used in the lexicon. Valid values are <code>ipa</code> and
* <code>x-sampa</code>.</p>
*/
inline void SetAlphabet(Aws::String&& value) { m_alphabetHasBeenSet = true; m_alphabet = std::move(value); }
/**
* <p>Phonetic alphabet used in the lexicon. Valid values are <code>ipa</code> and
* <code>x-sampa</code>.</p>
*/
inline void SetAlphabet(const char* value) { m_alphabetHasBeenSet = true; m_alphabet.assign(value); }
/**
* <p>Phonetic alphabet used in the lexicon. Valid values are <code>ipa</code> and
* <code>x-sampa</code>.</p>
*/
inline LexiconAttributes& WithAlphabet(const Aws::String& value) { SetAlphabet(value); return *this;}
/**
* <p>Phonetic alphabet used in the lexicon. Valid values are <code>ipa</code> and
* <code>x-sampa</code>.</p>
*/
inline LexiconAttributes& WithAlphabet(Aws::String&& value) { SetAlphabet(std::move(value)); return *this;}
/**
* <p>Phonetic alphabet used in the lexicon. Valid values are <code>ipa</code> and
* <code>x-sampa</code>.</p>
*/
inline LexiconAttributes& WithAlphabet(const char* value) { SetAlphabet(value); return *this;}
/**
* <p>Language code that the lexicon applies to. A lexicon with a language code
* such as "en" would be applied to all English languages (en-GB, en-US, en-AUS,
* en-WLS, and so on.</p>
*/
inline const LanguageCode& GetLanguageCode() const{ return m_languageCode; }
/**
* <p>Language code that the lexicon applies to. A lexicon with a language code
* such as "en" would be applied to all English languages (en-GB, en-US, en-AUS,
* en-WLS, and so on.</p>
*/
inline bool LanguageCodeHasBeenSet() const { return m_languageCodeHasBeenSet; }
/**
* <p>Language code that the lexicon applies to. A lexicon with a language code
* such as "en" would be applied to all English languages (en-GB, en-US, en-AUS,
* en-WLS, and so on.</p>
*/
inline void SetLanguageCode(const LanguageCode& value) { m_languageCodeHasBeenSet = true; m_languageCode = value; }
/**
* <p>Language code that the lexicon applies to. A lexicon with a language code
* such as "en" would be applied to all English languages (en-GB, en-US, en-AUS,
* en-WLS, and so on.</p>
*/
inline void SetLanguageCode(LanguageCode&& value) { m_languageCodeHasBeenSet = true; m_languageCode = std::move(value); }
/**
* <p>Language code that the lexicon applies to. A lexicon with a language code
* such as "en" would be applied to all English languages (en-GB, en-US, en-AUS,
* en-WLS, and so on.</p>
*/
inline LexiconAttributes& WithLanguageCode(const LanguageCode& value) { SetLanguageCode(value); return *this;}
/**
* <p>Language code that the lexicon applies to. A lexicon with a language code
* such as "en" would be applied to all English languages (en-GB, en-US, en-AUS,
* en-WLS, and so on.</p>
*/
inline LexiconAttributes& WithLanguageCode(LanguageCode&& value) { SetLanguageCode(std::move(value)); return *this;}
/**
* <p>Date lexicon was last modified (a timestamp value).</p>
*/
inline const Aws::Utils::DateTime& GetLastModified() const{ return m_lastModified; }
/**
* <p>Date lexicon was last modified (a timestamp value).</p>
*/
inline bool LastModifiedHasBeenSet() const { return m_lastModifiedHasBeenSet; }
/**
* <p>Date lexicon was last modified (a timestamp value).</p>
*/
inline void SetLastModified(const Aws::Utils::DateTime& value) { m_lastModifiedHasBeenSet = true; m_lastModified = value; }
/**
* <p>Date lexicon was last modified (a timestamp value).</p>
*/
inline void SetLastModified(Aws::Utils::DateTime&& value) { m_lastModifiedHasBeenSet = true; m_lastModified = std::move(value); }
/**
* <p>Date lexicon was last modified (a timestamp value).</p>
*/
inline LexiconAttributes& WithLastModified(const Aws::Utils::DateTime& value) { SetLastModified(value); return *this;}
/**
* <p>Date lexicon was last modified (a timestamp value).</p>
*/
inline LexiconAttributes& WithLastModified(Aws::Utils::DateTime&& value) { SetLastModified(std::move(value)); return *this;}
/**
* <p>Amazon Resource Name (ARN) of the lexicon.</p>
*/
inline const Aws::String& GetLexiconArn() const{ return m_lexiconArn; }
/**
* <p>Amazon Resource Name (ARN) of the lexicon.</p>
*/
inline bool LexiconArnHasBeenSet() const { return m_lexiconArnHasBeenSet; }
/**
* <p>Amazon Resource Name (ARN) of the lexicon.</p>
*/
inline void SetLexiconArn(const Aws::String& value) { m_lexiconArnHasBeenSet = true; m_lexiconArn = value; }
/**
* <p>Amazon Resource Name (ARN) of the lexicon.</p>
*/
inline void SetLexiconArn(Aws::String&& value) { m_lexiconArnHasBeenSet = true; m_lexiconArn = std::move(value); }
/**
* <p>Amazon Resource Name (ARN) of the lexicon.</p>
*/
inline void SetLexiconArn(const char* value) { m_lexiconArnHasBeenSet = true; m_lexiconArn.assign(value); }
/**
* <p>Amazon Resource Name (ARN) of the lexicon.</p>
*/
inline LexiconAttributes& WithLexiconArn(const Aws::String& value) { SetLexiconArn(value); return *this;}
/**
* <p>Amazon Resource Name (ARN) of the lexicon.</p>
*/
inline LexiconAttributes& WithLexiconArn(Aws::String&& value) { SetLexiconArn(std::move(value)); return *this;}
/**
* <p>Amazon Resource Name (ARN) of the lexicon.</p>
*/
inline LexiconAttributes& WithLexiconArn(const char* value) { SetLexiconArn(value); return *this;}
/**
* <p>Number of lexemes in the lexicon.</p>
*/
inline int GetLexemesCount() const{ return m_lexemesCount; }
/**
* <p>Number of lexemes in the lexicon.</p>
*/
inline bool LexemesCountHasBeenSet() const { return m_lexemesCountHasBeenSet; }
/**
* <p>Number of lexemes in the lexicon.</p>
*/
inline void SetLexemesCount(int value) { m_lexemesCountHasBeenSet = true; m_lexemesCount = value; }
/**
* <p>Number of lexemes in the lexicon.</p>
*/
inline LexiconAttributes& WithLexemesCount(int value) { SetLexemesCount(value); return *this;}
/**
* <p>Total size of the lexicon, in characters.</p>
*/
inline int GetSize() const{ return m_size; }
/**
* <p>Total size of the lexicon, in characters.</p>
*/
inline bool SizeHasBeenSet() const { return m_sizeHasBeenSet; }
/**
* <p>Total size of the lexicon, in characters.</p>
*/
inline void SetSize(int value) { m_sizeHasBeenSet = true; m_size = value; }
/**
* <p>Total size of the lexicon, in characters.</p>
*/
inline LexiconAttributes& WithSize(int value) { SetSize(value); return *this;}
private:
Aws::String m_alphabet;
bool m_alphabetHasBeenSet;
LanguageCode m_languageCode;
bool m_languageCodeHasBeenSet;
Aws::Utils::DateTime m_lastModified;
bool m_lastModifiedHasBeenSet;
Aws::String m_lexiconArn;
bool m_lexiconArnHasBeenSet;
int m_lexemesCount;
bool m_lexemesCountHasBeenSet;
int m_size;
bool m_sizeHasBeenSet;
};
} // namespace Model
} // namespace Polly
} // namespace Aws

View File

@@ -0,0 +1,123 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#pragma once
#include <aws/polly/Polly_EXPORTS.h>
#include <aws/core/utils/memory/stl/AWSString.h>
#include <aws/polly/model/LexiconAttributes.h>
#include <utility>
namespace Aws
{
namespace Utils
{
namespace Json
{
class JsonValue;
class JsonView;
} // namespace Json
} // namespace Utils
namespace Polly
{
namespace Model
{
/**
* <p>Describes the content of the lexicon.</p><p><h3>See Also:</h3> <a
* href="http://docs.aws.amazon.com/goto/WebAPI/polly-2016-06-10/LexiconDescription">AWS
* API Reference</a></p>
*/
class AWS_POLLY_API LexiconDescription
{
public:
LexiconDescription();
LexiconDescription(Aws::Utils::Json::JsonView jsonValue);
LexiconDescription& operator=(Aws::Utils::Json::JsonView jsonValue);
Aws::Utils::Json::JsonValue Jsonize() const;
/**
* <p>Name of the lexicon.</p>
*/
inline const Aws::String& GetName() const{ return m_name; }
/**
* <p>Name of the lexicon.</p>
*/
inline bool NameHasBeenSet() const { return m_nameHasBeenSet; }
/**
* <p>Name of the lexicon.</p>
*/
inline void SetName(const Aws::String& value) { m_nameHasBeenSet = true; m_name = value; }
/**
* <p>Name of the lexicon.</p>
*/
inline void SetName(Aws::String&& value) { m_nameHasBeenSet = true; m_name = std::move(value); }
/**
* <p>Name of the lexicon.</p>
*/
inline void SetName(const char* value) { m_nameHasBeenSet = true; m_name.assign(value); }
/**
* <p>Name of the lexicon.</p>
*/
inline LexiconDescription& WithName(const Aws::String& value) { SetName(value); return *this;}
/**
* <p>Name of the lexicon.</p>
*/
inline LexiconDescription& WithName(Aws::String&& value) { SetName(std::move(value)); return *this;}
/**
* <p>Name of the lexicon.</p>
*/
inline LexiconDescription& WithName(const char* value) { SetName(value); return *this;}
/**
* <p>Provides lexicon metadata.</p>
*/
inline const LexiconAttributes& GetAttributes() const{ return m_attributes; }
/**
* <p>Provides lexicon metadata.</p>
*/
inline bool AttributesHasBeenSet() const { return m_attributesHasBeenSet; }
/**
* <p>Provides lexicon metadata.</p>
*/
inline void SetAttributes(const LexiconAttributes& value) { m_attributesHasBeenSet = true; m_attributes = value; }
/**
* <p>Provides lexicon metadata.</p>
*/
inline void SetAttributes(LexiconAttributes&& value) { m_attributesHasBeenSet = true; m_attributes = std::move(value); }
/**
* <p>Provides lexicon metadata.</p>
*/
inline LexiconDescription& WithAttributes(const LexiconAttributes& value) { SetAttributes(value); return *this;}
/**
* <p>Provides lexicon metadata.</p>
*/
inline LexiconDescription& WithAttributes(LexiconAttributes&& value) { SetAttributes(std::move(value)); return *this;}
private:
Aws::String m_name;
bool m_nameHasBeenSet;
LexiconAttributes m_attributes;
bool m_attributesHasBeenSet;
};
} // namespace Model
} // namespace Polly
} // namespace Aws

View File

@@ -0,0 +1,97 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#pragma once
#include <aws/polly/Polly_EXPORTS.h>
#include <aws/polly/PollyRequest.h>
#include <aws/core/utils/memory/stl/AWSString.h>
#include <utility>
namespace Aws
{
namespace Http
{
class URI;
} //namespace Http
namespace Polly
{
namespace Model
{
/**
*/
class AWS_POLLY_API ListLexiconsRequest : public PollyRequest
{
public:
ListLexiconsRequest();
// Service request name is the Operation name which will send this request out,
// each operation should has unique request name, so that we can get operation's name from this request.
// Note: this is not true for response, multiple operations may have the same response name,
// so we can not get operation's name from response.
inline virtual const char* GetServiceRequestName() const override { return "ListLexicons"; }
Aws::String SerializePayload() const override;
void AddQueryStringParameters(Aws::Http::URI& uri) const override;
/**
* <p>An opaque pagination token returned from previous <code>ListLexicons</code>
* operation. If present, indicates where to continue the list of lexicons.</p>
*/
inline const Aws::String& GetNextToken() const{ return m_nextToken; }
/**
* <p>An opaque pagination token returned from previous <code>ListLexicons</code>
* operation. If present, indicates where to continue the list of lexicons.</p>
*/
inline bool NextTokenHasBeenSet() const { return m_nextTokenHasBeenSet; }
/**
* <p>An opaque pagination token returned from previous <code>ListLexicons</code>
* operation. If present, indicates where to continue the list of lexicons.</p>
*/
inline void SetNextToken(const Aws::String& value) { m_nextTokenHasBeenSet = true; m_nextToken = value; }
/**
* <p>An opaque pagination token returned from previous <code>ListLexicons</code>
* operation. If present, indicates where to continue the list of lexicons.</p>
*/
inline void SetNextToken(Aws::String&& value) { m_nextTokenHasBeenSet = true; m_nextToken = std::move(value); }
/**
* <p>An opaque pagination token returned from previous <code>ListLexicons</code>
* operation. If present, indicates where to continue the list of lexicons.</p>
*/
inline void SetNextToken(const char* value) { m_nextTokenHasBeenSet = true; m_nextToken.assign(value); }
/**
* <p>An opaque pagination token returned from previous <code>ListLexicons</code>
* operation. If present, indicates where to continue the list of lexicons.</p>
*/
inline ListLexiconsRequest& WithNextToken(const Aws::String& value) { SetNextToken(value); return *this;}
/**
* <p>An opaque pagination token returned from previous <code>ListLexicons</code>
* operation. If present, indicates where to continue the list of lexicons.</p>
*/
inline ListLexiconsRequest& WithNextToken(Aws::String&& value) { SetNextToken(std::move(value)); return *this;}
/**
* <p>An opaque pagination token returned from previous <code>ListLexicons</code>
* operation. If present, indicates where to continue the list of lexicons.</p>
*/
inline ListLexiconsRequest& WithNextToken(const char* value) { SetNextToken(value); return *this;}
private:
Aws::String m_nextToken;
bool m_nextTokenHasBeenSet;
};
} // namespace Model
} // namespace Polly
} // namespace Aws

View File

@@ -0,0 +1,131 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#pragma once
#include <aws/polly/Polly_EXPORTS.h>
#include <aws/core/utils/memory/stl/AWSVector.h>
#include <aws/core/utils/memory/stl/AWSString.h>
#include <aws/polly/model/LexiconDescription.h>
#include <utility>
namespace Aws
{
template<typename RESULT_TYPE>
class AmazonWebServiceResult;
namespace Utils
{
namespace Json
{
class JsonValue;
} // namespace Json
} // namespace Utils
namespace Polly
{
namespace Model
{
class AWS_POLLY_API ListLexiconsResult
{
public:
ListLexiconsResult();
ListLexiconsResult(const Aws::AmazonWebServiceResult<Aws::Utils::Json::JsonValue>& result);
ListLexiconsResult& operator=(const Aws::AmazonWebServiceResult<Aws::Utils::Json::JsonValue>& result);
/**
* <p>A list of lexicon names and attributes.</p>
*/
inline const Aws::Vector<LexiconDescription>& GetLexicons() const{ return m_lexicons; }
/**
* <p>A list of lexicon names and attributes.</p>
*/
inline void SetLexicons(const Aws::Vector<LexiconDescription>& value) { m_lexicons = value; }
/**
* <p>A list of lexicon names and attributes.</p>
*/
inline void SetLexicons(Aws::Vector<LexiconDescription>&& value) { m_lexicons = std::move(value); }
/**
* <p>A list of lexicon names and attributes.</p>
*/
inline ListLexiconsResult& WithLexicons(const Aws::Vector<LexiconDescription>& value) { SetLexicons(value); return *this;}
/**
* <p>A list of lexicon names and attributes.</p>
*/
inline ListLexiconsResult& WithLexicons(Aws::Vector<LexiconDescription>&& value) { SetLexicons(std::move(value)); return *this;}
/**
* <p>A list of lexicon names and attributes.</p>
*/
inline ListLexiconsResult& AddLexicons(const LexiconDescription& value) { m_lexicons.push_back(value); return *this; }
/**
* <p>A list of lexicon names and attributes.</p>
*/
inline ListLexiconsResult& AddLexicons(LexiconDescription&& value) { m_lexicons.push_back(std::move(value)); return *this; }
/**
* <p>The pagination token to use in the next request to continue the listing of
* lexicons. <code>NextToken</code> is returned only if the response is
* truncated.</p>
*/
inline const Aws::String& GetNextToken() const{ return m_nextToken; }
/**
* <p>The pagination token to use in the next request to continue the listing of
* lexicons. <code>NextToken</code> is returned only if the response is
* truncated.</p>
*/
inline void SetNextToken(const Aws::String& value) { m_nextToken = value; }
/**
* <p>The pagination token to use in the next request to continue the listing of
* lexicons. <code>NextToken</code> is returned only if the response is
* truncated.</p>
*/
inline void SetNextToken(Aws::String&& value) { m_nextToken = std::move(value); }
/**
* <p>The pagination token to use in the next request to continue the listing of
* lexicons. <code>NextToken</code> is returned only if the response is
* truncated.</p>
*/
inline void SetNextToken(const char* value) { m_nextToken.assign(value); }
/**
* <p>The pagination token to use in the next request to continue the listing of
* lexicons. <code>NextToken</code> is returned only if the response is
* truncated.</p>
*/
inline ListLexiconsResult& WithNextToken(const Aws::String& value) { SetNextToken(value); return *this;}
/**
* <p>The pagination token to use in the next request to continue the listing of
* lexicons. <code>NextToken</code> is returned only if the response is
* truncated.</p>
*/
inline ListLexiconsResult& WithNextToken(Aws::String&& value) { SetNextToken(std::move(value)); return *this;}
/**
* <p>The pagination token to use in the next request to continue the listing of
* lexicons. <code>NextToken</code> is returned only if the response is
* truncated.</p>
*/
inline ListLexiconsResult& WithNextToken(const char* value) { SetNextToken(value); return *this;}
private:
Aws::Vector<LexiconDescription> m_lexicons;
Aws::String m_nextToken;
};
} // namespace Model
} // namespace Polly
} // namespace Aws

View File

@@ -0,0 +1,156 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#pragma once
#include <aws/polly/Polly_EXPORTS.h>
#include <aws/polly/PollyRequest.h>
#include <aws/core/utils/memory/stl/AWSString.h>
#include <aws/polly/model/TaskStatus.h>
#include <utility>
namespace Aws
{
namespace Http
{
class URI;
} //namespace Http
namespace Polly
{
namespace Model
{
/**
*/
class AWS_POLLY_API ListSpeechSynthesisTasksRequest : public PollyRequest
{
public:
ListSpeechSynthesisTasksRequest();
// Service request name is the Operation name which will send this request out,
// each operation should has unique request name, so that we can get operation's name from this request.
// Note: this is not true for response, multiple operations may have the same response name,
// so we can not get operation's name from response.
inline virtual const char* GetServiceRequestName() const override { return "ListSpeechSynthesisTasks"; }
Aws::String SerializePayload() const override;
void AddQueryStringParameters(Aws::Http::URI& uri) const override;
/**
* <p>Maximum number of speech synthesis tasks returned in a List operation.</p>
*/
inline int GetMaxResults() const{ return m_maxResults; }
/**
* <p>Maximum number of speech synthesis tasks returned in a List operation.</p>
*/
inline bool MaxResultsHasBeenSet() const { return m_maxResultsHasBeenSet; }
/**
* <p>Maximum number of speech synthesis tasks returned in a List operation.</p>
*/
inline void SetMaxResults(int value) { m_maxResultsHasBeenSet = true; m_maxResults = value; }
/**
* <p>Maximum number of speech synthesis tasks returned in a List operation.</p>
*/
inline ListSpeechSynthesisTasksRequest& WithMaxResults(int value) { SetMaxResults(value); return *this;}
/**
* <p>The pagination token to use in the next request to continue the listing of
* speech synthesis tasks. </p>
*/
inline const Aws::String& GetNextToken() const{ return m_nextToken; }
/**
* <p>The pagination token to use in the next request to continue the listing of
* speech synthesis tasks. </p>
*/
inline bool NextTokenHasBeenSet() const { return m_nextTokenHasBeenSet; }
/**
* <p>The pagination token to use in the next request to continue the listing of
* speech synthesis tasks. </p>
*/
inline void SetNextToken(const Aws::String& value) { m_nextTokenHasBeenSet = true; m_nextToken = value; }
/**
* <p>The pagination token to use in the next request to continue the listing of
* speech synthesis tasks. </p>
*/
inline void SetNextToken(Aws::String&& value) { m_nextTokenHasBeenSet = true; m_nextToken = std::move(value); }
/**
* <p>The pagination token to use in the next request to continue the listing of
* speech synthesis tasks. </p>
*/
inline void SetNextToken(const char* value) { m_nextTokenHasBeenSet = true; m_nextToken.assign(value); }
/**
* <p>The pagination token to use in the next request to continue the listing of
* speech synthesis tasks. </p>
*/
inline ListSpeechSynthesisTasksRequest& WithNextToken(const Aws::String& value) { SetNextToken(value); return *this;}
/**
* <p>The pagination token to use in the next request to continue the listing of
* speech synthesis tasks. </p>
*/
inline ListSpeechSynthesisTasksRequest& WithNextToken(Aws::String&& value) { SetNextToken(std::move(value)); return *this;}
/**
* <p>The pagination token to use in the next request to continue the listing of
* speech synthesis tasks. </p>
*/
inline ListSpeechSynthesisTasksRequest& WithNextToken(const char* value) { SetNextToken(value); return *this;}
/**
* <p>Status of the speech synthesis tasks returned in a List operation</p>
*/
inline const TaskStatus& GetStatus() const{ return m_status; }
/**
* <p>Status of the speech synthesis tasks returned in a List operation</p>
*/
inline bool StatusHasBeenSet() const { return m_statusHasBeenSet; }
/**
* <p>Status of the speech synthesis tasks returned in a List operation</p>
*/
inline void SetStatus(const TaskStatus& value) { m_statusHasBeenSet = true; m_status = value; }
/**
* <p>Status of the speech synthesis tasks returned in a List operation</p>
*/
inline void SetStatus(TaskStatus&& value) { m_statusHasBeenSet = true; m_status = std::move(value); }
/**
* <p>Status of the speech synthesis tasks returned in a List operation</p>
*/
inline ListSpeechSynthesisTasksRequest& WithStatus(const TaskStatus& value) { SetStatus(value); return *this;}
/**
* <p>Status of the speech synthesis tasks returned in a List operation</p>
*/
inline ListSpeechSynthesisTasksRequest& WithStatus(TaskStatus&& value) { SetStatus(std::move(value)); return *this;}
private:
int m_maxResults;
bool m_maxResultsHasBeenSet;
Aws::String m_nextToken;
bool m_nextTokenHasBeenSet;
TaskStatus m_status;
bool m_statusHasBeenSet;
};
} // namespace Model
} // namespace Polly
} // namespace Aws

View File

@@ -0,0 +1,138 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#pragma once
#include <aws/polly/Polly_EXPORTS.h>
#include <aws/core/utils/memory/stl/AWSString.h>
#include <aws/core/utils/memory/stl/AWSVector.h>
#include <aws/polly/model/SynthesisTask.h>
#include <utility>
namespace Aws
{
template<typename RESULT_TYPE>
class AmazonWebServiceResult;
namespace Utils
{
namespace Json
{
class JsonValue;
} // namespace Json
} // namespace Utils
namespace Polly
{
namespace Model
{
class AWS_POLLY_API ListSpeechSynthesisTasksResult
{
public:
ListSpeechSynthesisTasksResult();
ListSpeechSynthesisTasksResult(const Aws::AmazonWebServiceResult<Aws::Utils::Json::JsonValue>& result);
ListSpeechSynthesisTasksResult& operator=(const Aws::AmazonWebServiceResult<Aws::Utils::Json::JsonValue>& result);
/**
* <p>An opaque pagination token returned from the previous List operation in this
* request. If present, this indicates where to continue the listing.</p>
*/
inline const Aws::String& GetNextToken() const{ return m_nextToken; }
/**
* <p>An opaque pagination token returned from the previous List operation in this
* request. If present, this indicates where to continue the listing.</p>
*/
inline void SetNextToken(const Aws::String& value) { m_nextToken = value; }
/**
* <p>An opaque pagination token returned from the previous List operation in this
* request. If present, this indicates where to continue the listing.</p>
*/
inline void SetNextToken(Aws::String&& value) { m_nextToken = std::move(value); }
/**
* <p>An opaque pagination token returned from the previous List operation in this
* request. If present, this indicates where to continue the listing.</p>
*/
inline void SetNextToken(const char* value) { m_nextToken.assign(value); }
/**
* <p>An opaque pagination token returned from the previous List operation in this
* request. If present, this indicates where to continue the listing.</p>
*/
inline ListSpeechSynthesisTasksResult& WithNextToken(const Aws::String& value) { SetNextToken(value); return *this;}
/**
* <p>An opaque pagination token returned from the previous List operation in this
* request. If present, this indicates where to continue the listing.</p>
*/
inline ListSpeechSynthesisTasksResult& WithNextToken(Aws::String&& value) { SetNextToken(std::move(value)); return *this;}
/**
* <p>An opaque pagination token returned from the previous List operation in this
* request. If present, this indicates where to continue the listing.</p>
*/
inline ListSpeechSynthesisTasksResult& WithNextToken(const char* value) { SetNextToken(value); return *this;}
/**
* <p>List of SynthesisTask objects that provides information from the specified
* task in the list request, including output format, creation time, task status,
* and so on.</p>
*/
inline const Aws::Vector<SynthesisTask>& GetSynthesisTasks() const{ return m_synthesisTasks; }
/**
* <p>List of SynthesisTask objects that provides information from the specified
* task in the list request, including output format, creation time, task status,
* and so on.</p>
*/
inline void SetSynthesisTasks(const Aws::Vector<SynthesisTask>& value) { m_synthesisTasks = value; }
/**
* <p>List of SynthesisTask objects that provides information from the specified
* task in the list request, including output format, creation time, task status,
* and so on.</p>
*/
inline void SetSynthesisTasks(Aws::Vector<SynthesisTask>&& value) { m_synthesisTasks = std::move(value); }
/**
* <p>List of SynthesisTask objects that provides information from the specified
* task in the list request, including output format, creation time, task status,
* and so on.</p>
*/
inline ListSpeechSynthesisTasksResult& WithSynthesisTasks(const Aws::Vector<SynthesisTask>& value) { SetSynthesisTasks(value); return *this;}
/**
* <p>List of SynthesisTask objects that provides information from the specified
* task in the list request, including output format, creation time, task status,
* and so on.</p>
*/
inline ListSpeechSynthesisTasksResult& WithSynthesisTasks(Aws::Vector<SynthesisTask>&& value) { SetSynthesisTasks(std::move(value)); return *this;}
/**
* <p>List of SynthesisTask objects that provides information from the specified
* task in the list request, including output format, creation time, task status,
* and so on.</p>
*/
inline ListSpeechSynthesisTasksResult& AddSynthesisTasks(const SynthesisTask& value) { m_synthesisTasks.push_back(value); return *this; }
/**
* <p>List of SynthesisTask objects that provides information from the specified
* task in the list request, including output format, creation time, task status,
* and so on.</p>
*/
inline ListSpeechSynthesisTasksResult& AddSynthesisTasks(SynthesisTask&& value) { m_synthesisTasks.push_back(std::move(value)); return *this; }
private:
Aws::String m_nextToken;
Aws::Vector<SynthesisTask> m_synthesisTasks;
};
} // namespace Model
} // namespace Polly
} // namespace Aws

View File

@@ -0,0 +1,33 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#pragma once
#include <aws/polly/Polly_EXPORTS.h>
#include <aws/core/utils/memory/stl/AWSString.h>
namespace Aws
{
namespace Polly
{
namespace Model
{
enum class OutputFormat
{
NOT_SET,
json,
mp3,
ogg_vorbis,
pcm
};
namespace OutputFormatMapper
{
AWS_POLLY_API OutputFormat GetOutputFormatForName(const Aws::String& name);
AWS_POLLY_API Aws::String GetNameForOutputFormat(OutputFormat value);
} // namespace OutputFormatMapper
} // namespace Model
} // namespace Polly
} // namespace Aws

View File

@@ -0,0 +1,143 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#pragma once
#include <aws/polly/Polly_EXPORTS.h>
#include <aws/polly/PollyRequest.h>
#include <aws/core/utils/memory/stl/AWSString.h>
#include <utility>
namespace Aws
{
namespace Polly
{
namespace Model
{
/**
*/
class AWS_POLLY_API PutLexiconRequest : public PollyRequest
{
public:
PutLexiconRequest();
// Service request name is the Operation name which will send this request out,
// each operation should has unique request name, so that we can get operation's name from this request.
// Note: this is not true for response, multiple operations may have the same response name,
// so we can not get operation's name from response.
inline virtual const char* GetServiceRequestName() const override { return "PutLexicon"; }
Aws::String SerializePayload() const override;
/**
* <p>Name of the lexicon. The name must follow the regular express format
* [0-9A-Za-z]{1,20}. That is, the name is a case-sensitive alphanumeric string up
* to 20 characters long. </p>
*/
inline const Aws::String& GetName() const{ return m_name; }
/**
* <p>Name of the lexicon. The name must follow the regular express format
* [0-9A-Za-z]{1,20}. That is, the name is a case-sensitive alphanumeric string up
* to 20 characters long. </p>
*/
inline bool NameHasBeenSet() const { return m_nameHasBeenSet; }
/**
* <p>Name of the lexicon. The name must follow the regular express format
* [0-9A-Za-z]{1,20}. That is, the name is a case-sensitive alphanumeric string up
* to 20 characters long. </p>
*/
inline void SetName(const Aws::String& value) { m_nameHasBeenSet = true; m_name = value; }
/**
* <p>Name of the lexicon. The name must follow the regular express format
* [0-9A-Za-z]{1,20}. That is, the name is a case-sensitive alphanumeric string up
* to 20 characters long. </p>
*/
inline void SetName(Aws::String&& value) { m_nameHasBeenSet = true; m_name = std::move(value); }
/**
* <p>Name of the lexicon. The name must follow the regular express format
* [0-9A-Za-z]{1,20}. That is, the name is a case-sensitive alphanumeric string up
* to 20 characters long. </p>
*/
inline void SetName(const char* value) { m_nameHasBeenSet = true; m_name.assign(value); }
/**
* <p>Name of the lexicon. The name must follow the regular express format
* [0-9A-Za-z]{1,20}. That is, the name is a case-sensitive alphanumeric string up
* to 20 characters long. </p>
*/
inline PutLexiconRequest& WithName(const Aws::String& value) { SetName(value); return *this;}
/**
* <p>Name of the lexicon. The name must follow the regular express format
* [0-9A-Za-z]{1,20}. That is, the name is a case-sensitive alphanumeric string up
* to 20 characters long. </p>
*/
inline PutLexiconRequest& WithName(Aws::String&& value) { SetName(std::move(value)); return *this;}
/**
* <p>Name of the lexicon. The name must follow the regular express format
* [0-9A-Za-z]{1,20}. That is, the name is a case-sensitive alphanumeric string up
* to 20 characters long. </p>
*/
inline PutLexiconRequest& WithName(const char* value) { SetName(value); return *this;}
/**
* <p>Content of the PLS lexicon as string data.</p>
*/
inline const Aws::String& GetContent() const{ return m_content; }
/**
* <p>Content of the PLS lexicon as string data.</p>
*/
inline bool ContentHasBeenSet() const { return m_contentHasBeenSet; }
/**
* <p>Content of the PLS lexicon as string data.</p>
*/
inline void SetContent(const Aws::String& value) { m_contentHasBeenSet = true; m_content = value; }
/**
* <p>Content of the PLS lexicon as string data.</p>
*/
inline void SetContent(Aws::String&& value) { m_contentHasBeenSet = true; m_content = std::move(value); }
/**
* <p>Content of the PLS lexicon as string data.</p>
*/
inline void SetContent(const char* value) { m_contentHasBeenSet = true; m_content.assign(value); }
/**
* <p>Content of the PLS lexicon as string data.</p>
*/
inline PutLexiconRequest& WithContent(const Aws::String& value) { SetContent(value); return *this;}
/**
* <p>Content of the PLS lexicon as string data.</p>
*/
inline PutLexiconRequest& WithContent(Aws::String&& value) { SetContent(std::move(value)); return *this;}
/**
* <p>Content of the PLS lexicon as string data.</p>
*/
inline PutLexiconRequest& WithContent(const char* value) { SetContent(value); return *this;}
private:
Aws::String m_name;
bool m_nameHasBeenSet;
Aws::String m_content;
bool m_contentHasBeenSet;
};
} // namespace Model
} // namespace Polly
} // namespace Aws

View File

@@ -0,0 +1,36 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#pragma once
#include <aws/polly/Polly_EXPORTS.h>
namespace Aws
{
template<typename RESULT_TYPE>
class AmazonWebServiceResult;
namespace Utils
{
namespace Json
{
class JsonValue;
} // namespace Json
} // namespace Utils
namespace Polly
{
namespace Model
{
class AWS_POLLY_API PutLexiconResult
{
public:
PutLexiconResult();
PutLexiconResult(const Aws::AmazonWebServiceResult<Aws::Utils::Json::JsonValue>& result);
PutLexiconResult& operator=(const Aws::AmazonWebServiceResult<Aws::Utils::Json::JsonValue>& result);
};
} // namespace Model
} // namespace Polly
} // namespace Aws

View File

@@ -0,0 +1,33 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#pragma once
#include <aws/polly/Polly_EXPORTS.h>
#include <aws/core/utils/memory/stl/AWSString.h>
namespace Aws
{
namespace Polly
{
namespace Model
{
enum class SpeechMarkType
{
NOT_SET,
sentence,
ssml,
viseme,
word
};
namespace SpeechMarkTypeMapper
{
AWS_POLLY_API SpeechMarkType GetSpeechMarkTypeForName(const Aws::String& name);
AWS_POLLY_API Aws::String GetNameForSpeechMarkType(SpeechMarkType value);
} // namespace SpeechMarkTypeMapper
} // namespace Model
} // namespace Polly
} // namespace Aws

View File

@@ -0,0 +1,667 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#pragma once
#include <aws/polly/Polly_EXPORTS.h>
#include <aws/polly/PollyRequest.h>
#include <aws/polly/model/Engine.h>
#include <aws/polly/model/LanguageCode.h>
#include <aws/core/utils/memory/stl/AWSVector.h>
#include <aws/polly/model/OutputFormat.h>
#include <aws/core/utils/memory/stl/AWSString.h>
#include <aws/polly/model/TextType.h>
#include <aws/polly/model/VoiceId.h>
#include <aws/polly/model/SpeechMarkType.h>
#include <utility>
namespace Aws
{
namespace Polly
{
namespace Model
{
/**
*/
class AWS_POLLY_API StartSpeechSynthesisTaskRequest : public PollyRequest
{
public:
StartSpeechSynthesisTaskRequest();
// Service request name is the Operation name which will send this request out,
// each operation should has unique request name, so that we can get operation's name from this request.
// Note: this is not true for response, multiple operations may have the same response name,
// so we can not get operation's name from response.
inline virtual const char* GetServiceRequestName() const override { return "StartSpeechSynthesisTask"; }
Aws::String SerializePayload() const override;
/**
* <p>Specifies the engine (<code>standard</code> or <code>neural</code>) 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.</p>
*/
inline const Engine& GetEngine() const{ return m_engine; }
/**
* <p>Specifies the engine (<code>standard</code> or <code>neural</code>) 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.</p>
*/
inline bool EngineHasBeenSet() const { return m_engineHasBeenSet; }
/**
* <p>Specifies the engine (<code>standard</code> or <code>neural</code>) 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.</p>
*/
inline void SetEngine(const Engine& value) { m_engineHasBeenSet = true; m_engine = value; }
/**
* <p>Specifies the engine (<code>standard</code> or <code>neural</code>) 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.</p>
*/
inline void SetEngine(Engine&& value) { m_engineHasBeenSet = true; m_engine = std::move(value); }
/**
* <p>Specifies the engine (<code>standard</code> or <code>neural</code>) 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.</p>
*/
inline StartSpeechSynthesisTaskRequest& WithEngine(const Engine& value) { SetEngine(value); return *this;}
/**
* <p>Specifies the engine (<code>standard</code> or <code>neural</code>) 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.</p>
*/
inline StartSpeechSynthesisTaskRequest& WithEngine(Engine&& value) { SetEngine(std::move(value)); return *this;}
/**
* <p>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). </p> <p>If a bilingual voice is
* used and no language code is specified, Amazon Polly will use the default
* language of the bilingual voice. The default language for any voice is the one
* returned by the <a
* href="https://docs.aws.amazon.com/polly/latest/dg/API_DescribeVoices.html">DescribeVoices</a>
* operation for the <code>LanguageCode</code> parameter. For example, if no
* language code is specified, Aditi will use Indian English rather than Hindi.</p>
*/
inline const LanguageCode& GetLanguageCode() const{ return m_languageCode; }
/**
* <p>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). </p> <p>If a bilingual voice is
* used and no language code is specified, Amazon Polly will use the default
* language of the bilingual voice. The default language for any voice is the one
* returned by the <a
* href="https://docs.aws.amazon.com/polly/latest/dg/API_DescribeVoices.html">DescribeVoices</a>
* operation for the <code>LanguageCode</code> parameter. For example, if no
* language code is specified, Aditi will use Indian English rather than Hindi.</p>
*/
inline bool LanguageCodeHasBeenSet() const { return m_languageCodeHasBeenSet; }
/**
* <p>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). </p> <p>If a bilingual voice is
* used and no language code is specified, Amazon Polly will use the default
* language of the bilingual voice. The default language for any voice is the one
* returned by the <a
* href="https://docs.aws.amazon.com/polly/latest/dg/API_DescribeVoices.html">DescribeVoices</a>
* operation for the <code>LanguageCode</code> parameter. For example, if no
* language code is specified, Aditi will use Indian English rather than Hindi.</p>
*/
inline void SetLanguageCode(const LanguageCode& value) { m_languageCodeHasBeenSet = true; m_languageCode = value; }
/**
* <p>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). </p> <p>If a bilingual voice is
* used and no language code is specified, Amazon Polly will use the default
* language of the bilingual voice. The default language for any voice is the one
* returned by the <a
* href="https://docs.aws.amazon.com/polly/latest/dg/API_DescribeVoices.html">DescribeVoices</a>
* operation for the <code>LanguageCode</code> parameter. For example, if no
* language code is specified, Aditi will use Indian English rather than Hindi.</p>
*/
inline void SetLanguageCode(LanguageCode&& value) { m_languageCodeHasBeenSet = true; m_languageCode = std::move(value); }
/**
* <p>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). </p> <p>If a bilingual voice is
* used and no language code is specified, Amazon Polly will use the default
* language of the bilingual voice. The default language for any voice is the one
* returned by the <a
* href="https://docs.aws.amazon.com/polly/latest/dg/API_DescribeVoices.html">DescribeVoices</a>
* operation for the <code>LanguageCode</code> parameter. For example, if no
* language code is specified, Aditi will use Indian English rather than Hindi.</p>
*/
inline StartSpeechSynthesisTaskRequest& WithLanguageCode(const LanguageCode& value) { SetLanguageCode(value); return *this;}
/**
* <p>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). </p> <p>If a bilingual voice is
* used and no language code is specified, Amazon Polly will use the default
* language of the bilingual voice. The default language for any voice is the one
* returned by the <a
* href="https://docs.aws.amazon.com/polly/latest/dg/API_DescribeVoices.html">DescribeVoices</a>
* operation for the <code>LanguageCode</code> parameter. For example, if no
* language code is specified, Aditi will use Indian English rather than Hindi.</p>
*/
inline StartSpeechSynthesisTaskRequest& WithLanguageCode(LanguageCode&& value) { SetLanguageCode(std::move(value)); return *this;}
/**
* <p>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. </p>
*/
inline const Aws::Vector<Aws::String>& GetLexiconNames() const{ return m_lexiconNames; }
/**
* <p>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. </p>
*/
inline bool LexiconNamesHasBeenSet() const { return m_lexiconNamesHasBeenSet; }
/**
* <p>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. </p>
*/
inline void SetLexiconNames(const Aws::Vector<Aws::String>& value) { m_lexiconNamesHasBeenSet = true; m_lexiconNames = value; }
/**
* <p>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. </p>
*/
inline void SetLexiconNames(Aws::Vector<Aws::String>&& value) { m_lexiconNamesHasBeenSet = true; m_lexiconNames = std::move(value); }
/**
* <p>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. </p>
*/
inline StartSpeechSynthesisTaskRequest& WithLexiconNames(const Aws::Vector<Aws::String>& value) { SetLexiconNames(value); return *this;}
/**
* <p>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. </p>
*/
inline StartSpeechSynthesisTaskRequest& WithLexiconNames(Aws::Vector<Aws::String>&& value) { SetLexiconNames(std::move(value)); return *this;}
/**
* <p>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. </p>
*/
inline StartSpeechSynthesisTaskRequest& AddLexiconNames(const Aws::String& value) { m_lexiconNamesHasBeenSet = true; m_lexiconNames.push_back(value); return *this; }
/**
* <p>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. </p>
*/
inline StartSpeechSynthesisTaskRequest& AddLexiconNames(Aws::String&& value) { m_lexiconNamesHasBeenSet = true; m_lexiconNames.push_back(std::move(value)); return *this; }
/**
* <p>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. </p>
*/
inline StartSpeechSynthesisTaskRequest& AddLexiconNames(const char* value) { m_lexiconNamesHasBeenSet = true; m_lexiconNames.push_back(value); return *this; }
/**
* <p>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. </p>
*/
inline const OutputFormat& GetOutputFormat() const{ return m_outputFormat; }
/**
* <p>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. </p>
*/
inline bool OutputFormatHasBeenSet() const { return m_outputFormatHasBeenSet; }
/**
* <p>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. </p>
*/
inline void SetOutputFormat(const OutputFormat& value) { m_outputFormatHasBeenSet = true; m_outputFormat = value; }
/**
* <p>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. </p>
*/
inline void SetOutputFormat(OutputFormat&& value) { m_outputFormatHasBeenSet = true; m_outputFormat = std::move(value); }
/**
* <p>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. </p>
*/
inline StartSpeechSynthesisTaskRequest& WithOutputFormat(const OutputFormat& value) { SetOutputFormat(value); return *this;}
/**
* <p>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. </p>
*/
inline StartSpeechSynthesisTaskRequest& WithOutputFormat(OutputFormat&& value) { SetOutputFormat(std::move(value)); return *this;}
/**
* <p>Amazon S3 bucket name to which the output file will be saved.</p>
*/
inline const Aws::String& GetOutputS3BucketName() const{ return m_outputS3BucketName; }
/**
* <p>Amazon S3 bucket name to which the output file will be saved.</p>
*/
inline bool OutputS3BucketNameHasBeenSet() const { return m_outputS3BucketNameHasBeenSet; }
/**
* <p>Amazon S3 bucket name to which the output file will be saved.</p>
*/
inline void SetOutputS3BucketName(const Aws::String& value) { m_outputS3BucketNameHasBeenSet = true; m_outputS3BucketName = value; }
/**
* <p>Amazon S3 bucket name to which the output file will be saved.</p>
*/
inline void SetOutputS3BucketName(Aws::String&& value) { m_outputS3BucketNameHasBeenSet = true; m_outputS3BucketName = std::move(value); }
/**
* <p>Amazon S3 bucket name to which the output file will be saved.</p>
*/
inline void SetOutputS3BucketName(const char* value) { m_outputS3BucketNameHasBeenSet = true; m_outputS3BucketName.assign(value); }
/**
* <p>Amazon S3 bucket name to which the output file will be saved.</p>
*/
inline StartSpeechSynthesisTaskRequest& WithOutputS3BucketName(const Aws::String& value) { SetOutputS3BucketName(value); return *this;}
/**
* <p>Amazon S3 bucket name to which the output file will be saved.</p>
*/
inline StartSpeechSynthesisTaskRequest& WithOutputS3BucketName(Aws::String&& value) { SetOutputS3BucketName(std::move(value)); return *this;}
/**
* <p>Amazon S3 bucket name to which the output file will be saved.</p>
*/
inline StartSpeechSynthesisTaskRequest& WithOutputS3BucketName(const char* value) { SetOutputS3BucketName(value); return *this;}
/**
* <p>The Amazon S3 key prefix for the output speech file.</p>
*/
inline const Aws::String& GetOutputS3KeyPrefix() const{ return m_outputS3KeyPrefix; }
/**
* <p>The Amazon S3 key prefix for the output speech file.</p>
*/
inline bool OutputS3KeyPrefixHasBeenSet() const { return m_outputS3KeyPrefixHasBeenSet; }
/**
* <p>The Amazon S3 key prefix for the output speech file.</p>
*/
inline void SetOutputS3KeyPrefix(const Aws::String& value) { m_outputS3KeyPrefixHasBeenSet = true; m_outputS3KeyPrefix = value; }
/**
* <p>The Amazon S3 key prefix for the output speech file.</p>
*/
inline void SetOutputS3KeyPrefix(Aws::String&& value) { m_outputS3KeyPrefixHasBeenSet = true; m_outputS3KeyPrefix = std::move(value); }
/**
* <p>The Amazon S3 key prefix for the output speech file.</p>
*/
inline void SetOutputS3KeyPrefix(const char* value) { m_outputS3KeyPrefixHasBeenSet = true; m_outputS3KeyPrefix.assign(value); }
/**
* <p>The Amazon S3 key prefix for the output speech file.</p>
*/
inline StartSpeechSynthesisTaskRequest& WithOutputS3KeyPrefix(const Aws::String& value) { SetOutputS3KeyPrefix(value); return *this;}
/**
* <p>The Amazon S3 key prefix for the output speech file.</p>
*/
inline StartSpeechSynthesisTaskRequest& WithOutputS3KeyPrefix(Aws::String&& value) { SetOutputS3KeyPrefix(std::move(value)); return *this;}
/**
* <p>The Amazon S3 key prefix for the output speech file.</p>
*/
inline StartSpeechSynthesisTaskRequest& WithOutputS3KeyPrefix(const char* value) { SetOutputS3KeyPrefix(value); return *this;}
/**
* <p>The audio frequency specified in Hz.</p> <p>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".</p>
* <p>Valid values for pcm are "8000" and "16000" The default value is "16000".
* </p>
*/
inline const Aws::String& GetSampleRate() const{ return m_sampleRate; }
/**
* <p>The audio frequency specified in Hz.</p> <p>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".</p>
* <p>Valid values for pcm are "8000" and "16000" The default value is "16000".
* </p>
*/
inline bool SampleRateHasBeenSet() const { return m_sampleRateHasBeenSet; }
/**
* <p>The audio frequency specified in Hz.</p> <p>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".</p>
* <p>Valid values for pcm are "8000" and "16000" The default value is "16000".
* </p>
*/
inline void SetSampleRate(const Aws::String& value) { m_sampleRateHasBeenSet = true; m_sampleRate = value; }
/**
* <p>The audio frequency specified in Hz.</p> <p>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".</p>
* <p>Valid values for pcm are "8000" and "16000" The default value is "16000".
* </p>
*/
inline void SetSampleRate(Aws::String&& value) { m_sampleRateHasBeenSet = true; m_sampleRate = std::move(value); }
/**
* <p>The audio frequency specified in Hz.</p> <p>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".</p>
* <p>Valid values for pcm are "8000" and "16000" The default value is "16000".
* </p>
*/
inline void SetSampleRate(const char* value) { m_sampleRateHasBeenSet = true; m_sampleRate.assign(value); }
/**
* <p>The audio frequency specified in Hz.</p> <p>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".</p>
* <p>Valid values for pcm are "8000" and "16000" The default value is "16000".
* </p>
*/
inline StartSpeechSynthesisTaskRequest& WithSampleRate(const Aws::String& value) { SetSampleRate(value); return *this;}
/**
* <p>The audio frequency specified in Hz.</p> <p>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".</p>
* <p>Valid values for pcm are "8000" and "16000" The default value is "16000".
* </p>
*/
inline StartSpeechSynthesisTaskRequest& WithSampleRate(Aws::String&& value) { SetSampleRate(std::move(value)); return *this;}
/**
* <p>The audio frequency specified in Hz.</p> <p>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".</p>
* <p>Valid values for pcm are "8000" and "16000" The default value is "16000".
* </p>
*/
inline StartSpeechSynthesisTaskRequest& WithSampleRate(const char* value) { SetSampleRate(value); return *this;}
/**
* <p>ARN for the SNS topic optionally used for providing status notification for a
* speech synthesis task.</p>
*/
inline const Aws::String& GetSnsTopicArn() const{ return m_snsTopicArn; }
/**
* <p>ARN for the SNS topic optionally used for providing status notification for a
* speech synthesis task.</p>
*/
inline bool SnsTopicArnHasBeenSet() const { return m_snsTopicArnHasBeenSet; }
/**
* <p>ARN for the SNS topic optionally used for providing status notification for a
* speech synthesis task.</p>
*/
inline void SetSnsTopicArn(const Aws::String& value) { m_snsTopicArnHasBeenSet = true; m_snsTopicArn = value; }
/**
* <p>ARN for the SNS topic optionally used for providing status notification for a
* speech synthesis task.</p>
*/
inline void SetSnsTopicArn(Aws::String&& value) { m_snsTopicArnHasBeenSet = true; m_snsTopicArn = std::move(value); }
/**
* <p>ARN for the SNS topic optionally used for providing status notification for a
* speech synthesis task.</p>
*/
inline void SetSnsTopicArn(const char* value) { m_snsTopicArnHasBeenSet = true; m_snsTopicArn.assign(value); }
/**
* <p>ARN for the SNS topic optionally used for providing status notification for a
* speech synthesis task.</p>
*/
inline StartSpeechSynthesisTaskRequest& WithSnsTopicArn(const Aws::String& value) { SetSnsTopicArn(value); return *this;}
/**
* <p>ARN for the SNS topic optionally used for providing status notification for a
* speech synthesis task.</p>
*/
inline StartSpeechSynthesisTaskRequest& WithSnsTopicArn(Aws::String&& value) { SetSnsTopicArn(std::move(value)); return *this;}
/**
* <p>ARN for the SNS topic optionally used for providing status notification for a
* speech synthesis task.</p>
*/
inline StartSpeechSynthesisTaskRequest& WithSnsTopicArn(const char* value) { SetSnsTopicArn(value); return *this;}
/**
* <p>The type of speech marks returned for the input text.</p>
*/
inline const Aws::Vector<SpeechMarkType>& GetSpeechMarkTypes() const{ return m_speechMarkTypes; }
/**
* <p>The type of speech marks returned for the input text.</p>
*/
inline bool SpeechMarkTypesHasBeenSet() const { return m_speechMarkTypesHasBeenSet; }
/**
* <p>The type of speech marks returned for the input text.</p>
*/
inline void SetSpeechMarkTypes(const Aws::Vector<SpeechMarkType>& value) { m_speechMarkTypesHasBeenSet = true; m_speechMarkTypes = value; }
/**
* <p>The type of speech marks returned for the input text.</p>
*/
inline void SetSpeechMarkTypes(Aws::Vector<SpeechMarkType>&& value) { m_speechMarkTypesHasBeenSet = true; m_speechMarkTypes = std::move(value); }
/**
* <p>The type of speech marks returned for the input text.</p>
*/
inline StartSpeechSynthesisTaskRequest& WithSpeechMarkTypes(const Aws::Vector<SpeechMarkType>& value) { SetSpeechMarkTypes(value); return *this;}
/**
* <p>The type of speech marks returned for the input text.</p>
*/
inline StartSpeechSynthesisTaskRequest& WithSpeechMarkTypes(Aws::Vector<SpeechMarkType>&& value) { SetSpeechMarkTypes(std::move(value)); return *this;}
/**
* <p>The type of speech marks returned for the input text.</p>
*/
inline StartSpeechSynthesisTaskRequest& AddSpeechMarkTypes(const SpeechMarkType& value) { m_speechMarkTypesHasBeenSet = true; m_speechMarkTypes.push_back(value); return *this; }
/**
* <p>The type of speech marks returned for the input text.</p>
*/
inline StartSpeechSynthesisTaskRequest& AddSpeechMarkTypes(SpeechMarkType&& value) { m_speechMarkTypesHasBeenSet = true; m_speechMarkTypes.push_back(std::move(value)); return *this; }
/**
* <p>The input text to synthesize. If you specify ssml as the TextType, follow the
* SSML format for the input text. </p>
*/
inline const Aws::String& GetText() const{ return m_text; }
/**
* <p>The input text to synthesize. If you specify ssml as the TextType, follow the
* SSML format for the input text. </p>
*/
inline bool TextHasBeenSet() const { return m_textHasBeenSet; }
/**
* <p>The input text to synthesize. If you specify ssml as the TextType, follow the
* SSML format for the input text. </p>
*/
inline void SetText(const Aws::String& value) { m_textHasBeenSet = true; m_text = value; }
/**
* <p>The input text to synthesize. If you specify ssml as the TextType, follow the
* SSML format for the input text. </p>
*/
inline void SetText(Aws::String&& value) { m_textHasBeenSet = true; m_text = std::move(value); }
/**
* <p>The input text to synthesize. If you specify ssml as the TextType, follow the
* SSML format for the input text. </p>
*/
inline void SetText(const char* value) { m_textHasBeenSet = true; m_text.assign(value); }
/**
* <p>The input text to synthesize. If you specify ssml as the TextType, follow the
* SSML format for the input text. </p>
*/
inline StartSpeechSynthesisTaskRequest& WithText(const Aws::String& value) { SetText(value); return *this;}
/**
* <p>The input text to synthesize. If you specify ssml as the TextType, follow the
* SSML format for the input text. </p>
*/
inline StartSpeechSynthesisTaskRequest& WithText(Aws::String&& value) { SetText(std::move(value)); return *this;}
/**
* <p>The input text to synthesize. If you specify ssml as the TextType, follow the
* SSML format for the input text. </p>
*/
inline StartSpeechSynthesisTaskRequest& WithText(const char* value) { SetText(value); return *this;}
/**
* <p>Specifies whether the input text is plain text or SSML. The default value is
* plain text. </p>
*/
inline const TextType& GetTextType() const{ return m_textType; }
/**
* <p>Specifies whether the input text is plain text or SSML. The default value is
* plain text. </p>
*/
inline bool TextTypeHasBeenSet() const { return m_textTypeHasBeenSet; }
/**
* <p>Specifies whether the input text is plain text or SSML. The default value is
* plain text. </p>
*/
inline void SetTextType(const TextType& value) { m_textTypeHasBeenSet = true; m_textType = value; }
/**
* <p>Specifies whether the input text is plain text or SSML. The default value is
* plain text. </p>
*/
inline void SetTextType(TextType&& value) { m_textTypeHasBeenSet = true; m_textType = std::move(value); }
/**
* <p>Specifies whether the input text is plain text or SSML. The default value is
* plain text. </p>
*/
inline StartSpeechSynthesisTaskRequest& WithTextType(const TextType& value) { SetTextType(value); return *this;}
/**
* <p>Specifies whether the input text is plain text or SSML. The default value is
* plain text. </p>
*/
inline StartSpeechSynthesisTaskRequest& WithTextType(TextType&& value) { SetTextType(std::move(value)); return *this;}
/**
* <p>Voice ID to use for the synthesis. </p>
*/
inline const VoiceId& GetVoiceId() const{ return m_voiceId; }
/**
* <p>Voice ID to use for the synthesis. </p>
*/
inline bool VoiceIdHasBeenSet() const { return m_voiceIdHasBeenSet; }
/**
* <p>Voice ID to use for the synthesis. </p>
*/
inline void SetVoiceId(const VoiceId& value) { m_voiceIdHasBeenSet = true; m_voiceId = value; }
/**
* <p>Voice ID to use for the synthesis. </p>
*/
inline void SetVoiceId(VoiceId&& value) { m_voiceIdHasBeenSet = true; m_voiceId = std::move(value); }
/**
* <p>Voice ID to use for the synthesis. </p>
*/
inline StartSpeechSynthesisTaskRequest& WithVoiceId(const VoiceId& value) { SetVoiceId(value); return *this;}
/**
* <p>Voice ID to use for the synthesis. </p>
*/
inline StartSpeechSynthesisTaskRequest& WithVoiceId(VoiceId&& value) { SetVoiceId(std::move(value)); return *this;}
private:
Engine m_engine;
bool m_engineHasBeenSet;
LanguageCode m_languageCode;
bool m_languageCodeHasBeenSet;
Aws::Vector<Aws::String> m_lexiconNames;
bool m_lexiconNamesHasBeenSet;
OutputFormat m_outputFormat;
bool m_outputFormatHasBeenSet;
Aws::String m_outputS3BucketName;
bool m_outputS3BucketNameHasBeenSet;
Aws::String m_outputS3KeyPrefix;
bool m_outputS3KeyPrefixHasBeenSet;
Aws::String m_sampleRate;
bool m_sampleRateHasBeenSet;
Aws::String m_snsTopicArn;
bool m_snsTopicArnHasBeenSet;
Aws::Vector<SpeechMarkType> m_speechMarkTypes;
bool m_speechMarkTypesHasBeenSet;
Aws::String m_text;
bool m_textHasBeenSet;
TextType m_textType;
bool m_textTypeHasBeenSet;
VoiceId m_voiceId;
bool m_voiceIdHasBeenSet;
};
} // namespace Model
} // namespace Polly
} // namespace Aws

View File

@@ -0,0 +1,72 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#pragma once
#include <aws/polly/Polly_EXPORTS.h>
#include <aws/polly/model/SynthesisTask.h>
#include <utility>
namespace Aws
{
template<typename RESULT_TYPE>
class AmazonWebServiceResult;
namespace Utils
{
namespace Json
{
class JsonValue;
} // namespace Json
} // namespace Utils
namespace Polly
{
namespace Model
{
class AWS_POLLY_API StartSpeechSynthesisTaskResult
{
public:
StartSpeechSynthesisTaskResult();
StartSpeechSynthesisTaskResult(const Aws::AmazonWebServiceResult<Aws::Utils::Json::JsonValue>& result);
StartSpeechSynthesisTaskResult& operator=(const Aws::AmazonWebServiceResult<Aws::Utils::Json::JsonValue>& result);
/**
* <p>SynthesisTask object that provides information and attributes about a newly
* submitted speech synthesis task.</p>
*/
inline const SynthesisTask& GetSynthesisTask() const{ return m_synthesisTask; }
/**
* <p>SynthesisTask object that provides information and attributes about a newly
* submitted speech synthesis task.</p>
*/
inline void SetSynthesisTask(const SynthesisTask& value) { m_synthesisTask = value; }
/**
* <p>SynthesisTask object that provides information and attributes about a newly
* submitted speech synthesis task.</p>
*/
inline void SetSynthesisTask(SynthesisTask&& value) { m_synthesisTask = std::move(value); }
/**
* <p>SynthesisTask object that provides information and attributes about a newly
* submitted speech synthesis task.</p>
*/
inline StartSpeechSynthesisTaskResult& WithSynthesisTask(const SynthesisTask& value) { SetSynthesisTask(value); return *this;}
/**
* <p>SynthesisTask object that provides information and attributes about a newly
* submitted speech synthesis task.</p>
*/
inline StartSpeechSynthesisTaskResult& WithSynthesisTask(SynthesisTask&& value) { SetSynthesisTask(std::move(value)); return *this;}
private:
SynthesisTask m_synthesisTask;
};
} // namespace Model
} // namespace Polly
} // namespace Aws

View File

@@ -0,0 +1,761 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#pragma once
#include <aws/polly/Polly_EXPORTS.h>
#include <aws/polly/model/Engine.h>
#include <aws/core/utils/memory/stl/AWSString.h>
#include <aws/polly/model/TaskStatus.h>
#include <aws/core/utils/DateTime.h>
#include <aws/core/utils/memory/stl/AWSVector.h>
#include <aws/polly/model/OutputFormat.h>
#include <aws/polly/model/TextType.h>
#include <aws/polly/model/VoiceId.h>
#include <aws/polly/model/LanguageCode.h>
#include <aws/polly/model/SpeechMarkType.h>
#include <utility>
namespace Aws
{
namespace Utils
{
namespace Json
{
class JsonValue;
class JsonView;
} // namespace Json
} // namespace Utils
namespace Polly
{
namespace Model
{
/**
* <p>SynthesisTask object that provides information about a speech synthesis
* task.</p><p><h3>See Also:</h3> <a
* href="http://docs.aws.amazon.com/goto/WebAPI/polly-2016-06-10/SynthesisTask">AWS
* API Reference</a></p>
*/
class AWS_POLLY_API SynthesisTask
{
public:
SynthesisTask();
SynthesisTask(Aws::Utils::Json::JsonView jsonValue);
SynthesisTask& operator=(Aws::Utils::Json::JsonView jsonValue);
Aws::Utils::Json::JsonValue Jsonize() const;
/**
* <p>Specifies the engine (<code>standard</code> or <code>neural</code>) 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.</p>
*/
inline const Engine& GetEngine() const{ return m_engine; }
/**
* <p>Specifies the engine (<code>standard</code> or <code>neural</code>) 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.</p>
*/
inline bool EngineHasBeenSet() const { return m_engineHasBeenSet; }
/**
* <p>Specifies the engine (<code>standard</code> or <code>neural</code>) 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.</p>
*/
inline void SetEngine(const Engine& value) { m_engineHasBeenSet = true; m_engine = value; }
/**
* <p>Specifies the engine (<code>standard</code> or <code>neural</code>) 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.</p>
*/
inline void SetEngine(Engine&& value) { m_engineHasBeenSet = true; m_engine = std::move(value); }
/**
* <p>Specifies the engine (<code>standard</code> or <code>neural</code>) 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.</p>
*/
inline SynthesisTask& WithEngine(const Engine& value) { SetEngine(value); return *this;}
/**
* <p>Specifies the engine (<code>standard</code> or <code>neural</code>) 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.</p>
*/
inline SynthesisTask& WithEngine(Engine&& value) { SetEngine(std::move(value)); return *this;}
/**
* <p>The Amazon Polly generated identifier for a speech synthesis task.</p>
*/
inline const Aws::String& GetTaskId() const{ return m_taskId; }
/**
* <p>The Amazon Polly generated identifier for a speech synthesis task.</p>
*/
inline bool TaskIdHasBeenSet() const { return m_taskIdHasBeenSet; }
/**
* <p>The Amazon Polly generated identifier for a speech synthesis task.</p>
*/
inline void SetTaskId(const Aws::String& value) { m_taskIdHasBeenSet = true; m_taskId = value; }
/**
* <p>The Amazon Polly generated identifier for a speech synthesis task.</p>
*/
inline void SetTaskId(Aws::String&& value) { m_taskIdHasBeenSet = true; m_taskId = std::move(value); }
/**
* <p>The Amazon Polly generated identifier for a speech synthesis task.</p>
*/
inline void SetTaskId(const char* value) { m_taskIdHasBeenSet = true; m_taskId.assign(value); }
/**
* <p>The Amazon Polly generated identifier for a speech synthesis task.</p>
*/
inline SynthesisTask& WithTaskId(const Aws::String& value) { SetTaskId(value); return *this;}
/**
* <p>The Amazon Polly generated identifier for a speech synthesis task.</p>
*/
inline SynthesisTask& WithTaskId(Aws::String&& value) { SetTaskId(std::move(value)); return *this;}
/**
* <p>The Amazon Polly generated identifier for a speech synthesis task.</p>
*/
inline SynthesisTask& WithTaskId(const char* value) { SetTaskId(value); return *this;}
/**
* <p>Current status of the individual speech synthesis task.</p>
*/
inline const TaskStatus& GetTaskStatus() const{ return m_taskStatus; }
/**
* <p>Current status of the individual speech synthesis task.</p>
*/
inline bool TaskStatusHasBeenSet() const { return m_taskStatusHasBeenSet; }
/**
* <p>Current status of the individual speech synthesis task.</p>
*/
inline void SetTaskStatus(const TaskStatus& value) { m_taskStatusHasBeenSet = true; m_taskStatus = value; }
/**
* <p>Current status of the individual speech synthesis task.</p>
*/
inline void SetTaskStatus(TaskStatus&& value) { m_taskStatusHasBeenSet = true; m_taskStatus = std::move(value); }
/**
* <p>Current status of the individual speech synthesis task.</p>
*/
inline SynthesisTask& WithTaskStatus(const TaskStatus& value) { SetTaskStatus(value); return *this;}
/**
* <p>Current status of the individual speech synthesis task.</p>
*/
inline SynthesisTask& WithTaskStatus(TaskStatus&& value) { SetTaskStatus(std::move(value)); return *this;}
/**
* <p>Reason for the current status of a specific speech synthesis task, including
* errors if the task has failed.</p>
*/
inline const Aws::String& GetTaskStatusReason() const{ return m_taskStatusReason; }
/**
* <p>Reason for the current status of a specific speech synthesis task, including
* errors if the task has failed.</p>
*/
inline bool TaskStatusReasonHasBeenSet() const { return m_taskStatusReasonHasBeenSet; }
/**
* <p>Reason for the current status of a specific speech synthesis task, including
* errors if the task has failed.</p>
*/
inline void SetTaskStatusReason(const Aws::String& value) { m_taskStatusReasonHasBeenSet = true; m_taskStatusReason = value; }
/**
* <p>Reason for the current status of a specific speech synthesis task, including
* errors if the task has failed.</p>
*/
inline void SetTaskStatusReason(Aws::String&& value) { m_taskStatusReasonHasBeenSet = true; m_taskStatusReason = std::move(value); }
/**
* <p>Reason for the current status of a specific speech synthesis task, including
* errors if the task has failed.</p>
*/
inline void SetTaskStatusReason(const char* value) { m_taskStatusReasonHasBeenSet = true; m_taskStatusReason.assign(value); }
/**
* <p>Reason for the current status of a specific speech synthesis task, including
* errors if the task has failed.</p>
*/
inline SynthesisTask& WithTaskStatusReason(const Aws::String& value) { SetTaskStatusReason(value); return *this;}
/**
* <p>Reason for the current status of a specific speech synthesis task, including
* errors if the task has failed.</p>
*/
inline SynthesisTask& WithTaskStatusReason(Aws::String&& value) { SetTaskStatusReason(std::move(value)); return *this;}
/**
* <p>Reason for the current status of a specific speech synthesis task, including
* errors if the task has failed.</p>
*/
inline SynthesisTask& WithTaskStatusReason(const char* value) { SetTaskStatusReason(value); return *this;}
/**
* <p>Pathway for the output speech file.</p>
*/
inline const Aws::String& GetOutputUri() const{ return m_outputUri; }
/**
* <p>Pathway for the output speech file.</p>
*/
inline bool OutputUriHasBeenSet() const { return m_outputUriHasBeenSet; }
/**
* <p>Pathway for the output speech file.</p>
*/
inline void SetOutputUri(const Aws::String& value) { m_outputUriHasBeenSet = true; m_outputUri = value; }
/**
* <p>Pathway for the output speech file.</p>
*/
inline void SetOutputUri(Aws::String&& value) { m_outputUriHasBeenSet = true; m_outputUri = std::move(value); }
/**
* <p>Pathway for the output speech file.</p>
*/
inline void SetOutputUri(const char* value) { m_outputUriHasBeenSet = true; m_outputUri.assign(value); }
/**
* <p>Pathway for the output speech file.</p>
*/
inline SynthesisTask& WithOutputUri(const Aws::String& value) { SetOutputUri(value); return *this;}
/**
* <p>Pathway for the output speech file.</p>
*/
inline SynthesisTask& WithOutputUri(Aws::String&& value) { SetOutputUri(std::move(value)); return *this;}
/**
* <p>Pathway for the output speech file.</p>
*/
inline SynthesisTask& WithOutputUri(const char* value) { SetOutputUri(value); return *this;}
/**
* <p>Timestamp for the time the synthesis task was started.</p>
*/
inline const Aws::Utils::DateTime& GetCreationTime() const{ return m_creationTime; }
/**
* <p>Timestamp for the time the synthesis task was started.</p>
*/
inline bool CreationTimeHasBeenSet() const { return m_creationTimeHasBeenSet; }
/**
* <p>Timestamp for the time the synthesis task was started.</p>
*/
inline void SetCreationTime(const Aws::Utils::DateTime& value) { m_creationTimeHasBeenSet = true; m_creationTime = value; }
/**
* <p>Timestamp for the time the synthesis task was started.</p>
*/
inline void SetCreationTime(Aws::Utils::DateTime&& value) { m_creationTimeHasBeenSet = true; m_creationTime = std::move(value); }
/**
* <p>Timestamp for the time the synthesis task was started.</p>
*/
inline SynthesisTask& WithCreationTime(const Aws::Utils::DateTime& value) { SetCreationTime(value); return *this;}
/**
* <p>Timestamp for the time the synthesis task was started.</p>
*/
inline SynthesisTask& WithCreationTime(Aws::Utils::DateTime&& value) { SetCreationTime(std::move(value)); return *this;}
/**
* <p>Number of billable characters synthesized.</p>
*/
inline int GetRequestCharacters() const{ return m_requestCharacters; }
/**
* <p>Number of billable characters synthesized.</p>
*/
inline bool RequestCharactersHasBeenSet() const { return m_requestCharactersHasBeenSet; }
/**
* <p>Number of billable characters synthesized.</p>
*/
inline void SetRequestCharacters(int value) { m_requestCharactersHasBeenSet = true; m_requestCharacters = value; }
/**
* <p>Number of billable characters synthesized.</p>
*/
inline SynthesisTask& WithRequestCharacters(int value) { SetRequestCharacters(value); return *this;}
/**
* <p>ARN for the SNS topic optionally used for providing status notification for a
* speech synthesis task.</p>
*/
inline const Aws::String& GetSnsTopicArn() const{ return m_snsTopicArn; }
/**
* <p>ARN for the SNS topic optionally used for providing status notification for a
* speech synthesis task.</p>
*/
inline bool SnsTopicArnHasBeenSet() const { return m_snsTopicArnHasBeenSet; }
/**
* <p>ARN for the SNS topic optionally used for providing status notification for a
* speech synthesis task.</p>
*/
inline void SetSnsTopicArn(const Aws::String& value) { m_snsTopicArnHasBeenSet = true; m_snsTopicArn = value; }
/**
* <p>ARN for the SNS topic optionally used for providing status notification for a
* speech synthesis task.</p>
*/
inline void SetSnsTopicArn(Aws::String&& value) { m_snsTopicArnHasBeenSet = true; m_snsTopicArn = std::move(value); }
/**
* <p>ARN for the SNS topic optionally used for providing status notification for a
* speech synthesis task.</p>
*/
inline void SetSnsTopicArn(const char* value) { m_snsTopicArnHasBeenSet = true; m_snsTopicArn.assign(value); }
/**
* <p>ARN for the SNS topic optionally used for providing status notification for a
* speech synthesis task.</p>
*/
inline SynthesisTask& WithSnsTopicArn(const Aws::String& value) { SetSnsTopicArn(value); return *this;}
/**
* <p>ARN for the SNS topic optionally used for providing status notification for a
* speech synthesis task.</p>
*/
inline SynthesisTask& WithSnsTopicArn(Aws::String&& value) { SetSnsTopicArn(std::move(value)); return *this;}
/**
* <p>ARN for the SNS topic optionally used for providing status notification for a
* speech synthesis task.</p>
*/
inline SynthesisTask& WithSnsTopicArn(const char* value) { SetSnsTopicArn(value); return *this;}
/**
* <p>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. </p>
*/
inline const Aws::Vector<Aws::String>& GetLexiconNames() const{ return m_lexiconNames; }
/**
* <p>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. </p>
*/
inline bool LexiconNamesHasBeenSet() const { return m_lexiconNamesHasBeenSet; }
/**
* <p>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. </p>
*/
inline void SetLexiconNames(const Aws::Vector<Aws::String>& value) { m_lexiconNamesHasBeenSet = true; m_lexiconNames = value; }
/**
* <p>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. </p>
*/
inline void SetLexiconNames(Aws::Vector<Aws::String>&& value) { m_lexiconNamesHasBeenSet = true; m_lexiconNames = std::move(value); }
/**
* <p>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. </p>
*/
inline SynthesisTask& WithLexiconNames(const Aws::Vector<Aws::String>& value) { SetLexiconNames(value); return *this;}
/**
* <p>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. </p>
*/
inline SynthesisTask& WithLexiconNames(Aws::Vector<Aws::String>&& value) { SetLexiconNames(std::move(value)); return *this;}
/**
* <p>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. </p>
*/
inline SynthesisTask& AddLexiconNames(const Aws::String& value) { m_lexiconNamesHasBeenSet = true; m_lexiconNames.push_back(value); return *this; }
/**
* <p>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. </p>
*/
inline SynthesisTask& AddLexiconNames(Aws::String&& value) { m_lexiconNamesHasBeenSet = true; m_lexiconNames.push_back(std::move(value)); return *this; }
/**
* <p>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. </p>
*/
inline SynthesisTask& AddLexiconNames(const char* value) { m_lexiconNamesHasBeenSet = true; m_lexiconNames.push_back(value); return *this; }
/**
* <p>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. </p>
*/
inline const OutputFormat& GetOutputFormat() const{ return m_outputFormat; }
/**
* <p>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. </p>
*/
inline bool OutputFormatHasBeenSet() const { return m_outputFormatHasBeenSet; }
/**
* <p>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. </p>
*/
inline void SetOutputFormat(const OutputFormat& value) { m_outputFormatHasBeenSet = true; m_outputFormat = value; }
/**
* <p>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. </p>
*/
inline void SetOutputFormat(OutputFormat&& value) { m_outputFormatHasBeenSet = true; m_outputFormat = std::move(value); }
/**
* <p>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. </p>
*/
inline SynthesisTask& WithOutputFormat(const OutputFormat& value) { SetOutputFormat(value); return *this;}
/**
* <p>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. </p>
*/
inline SynthesisTask& WithOutputFormat(OutputFormat&& value) { SetOutputFormat(std::move(value)); return *this;}
/**
* <p>The audio frequency specified in Hz.</p> <p>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".</p>
* <p>Valid values for pcm are "8000" and "16000" The default value is "16000".
* </p>
*/
inline const Aws::String& GetSampleRate() const{ return m_sampleRate; }
/**
* <p>The audio frequency specified in Hz.</p> <p>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".</p>
* <p>Valid values for pcm are "8000" and "16000" The default value is "16000".
* </p>
*/
inline bool SampleRateHasBeenSet() const { return m_sampleRateHasBeenSet; }
/**
* <p>The audio frequency specified in Hz.</p> <p>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".</p>
* <p>Valid values for pcm are "8000" and "16000" The default value is "16000".
* </p>
*/
inline void SetSampleRate(const Aws::String& value) { m_sampleRateHasBeenSet = true; m_sampleRate = value; }
/**
* <p>The audio frequency specified in Hz.</p> <p>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".</p>
* <p>Valid values for pcm are "8000" and "16000" The default value is "16000".
* </p>
*/
inline void SetSampleRate(Aws::String&& value) { m_sampleRateHasBeenSet = true; m_sampleRate = std::move(value); }
/**
* <p>The audio frequency specified in Hz.</p> <p>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".</p>
* <p>Valid values for pcm are "8000" and "16000" The default value is "16000".
* </p>
*/
inline void SetSampleRate(const char* value) { m_sampleRateHasBeenSet = true; m_sampleRate.assign(value); }
/**
* <p>The audio frequency specified in Hz.</p> <p>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".</p>
* <p>Valid values for pcm are "8000" and "16000" The default value is "16000".
* </p>
*/
inline SynthesisTask& WithSampleRate(const Aws::String& value) { SetSampleRate(value); return *this;}
/**
* <p>The audio frequency specified in Hz.</p> <p>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".</p>
* <p>Valid values for pcm are "8000" and "16000" The default value is "16000".
* </p>
*/
inline SynthesisTask& WithSampleRate(Aws::String&& value) { SetSampleRate(std::move(value)); return *this;}
/**
* <p>The audio frequency specified in Hz.</p> <p>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".</p>
* <p>Valid values for pcm are "8000" and "16000" The default value is "16000".
* </p>
*/
inline SynthesisTask& WithSampleRate(const char* value) { SetSampleRate(value); return *this;}
/**
* <p>The type of speech marks returned for the input text.</p>
*/
inline const Aws::Vector<SpeechMarkType>& GetSpeechMarkTypes() const{ return m_speechMarkTypes; }
/**
* <p>The type of speech marks returned for the input text.</p>
*/
inline bool SpeechMarkTypesHasBeenSet() const { return m_speechMarkTypesHasBeenSet; }
/**
* <p>The type of speech marks returned for the input text.</p>
*/
inline void SetSpeechMarkTypes(const Aws::Vector<SpeechMarkType>& value) { m_speechMarkTypesHasBeenSet = true; m_speechMarkTypes = value; }
/**
* <p>The type of speech marks returned for the input text.</p>
*/
inline void SetSpeechMarkTypes(Aws::Vector<SpeechMarkType>&& value) { m_speechMarkTypesHasBeenSet = true; m_speechMarkTypes = std::move(value); }
/**
* <p>The type of speech marks returned for the input text.</p>
*/
inline SynthesisTask& WithSpeechMarkTypes(const Aws::Vector<SpeechMarkType>& value) { SetSpeechMarkTypes(value); return *this;}
/**
* <p>The type of speech marks returned for the input text.</p>
*/
inline SynthesisTask& WithSpeechMarkTypes(Aws::Vector<SpeechMarkType>&& value) { SetSpeechMarkTypes(std::move(value)); return *this;}
/**
* <p>The type of speech marks returned for the input text.</p>
*/
inline SynthesisTask& AddSpeechMarkTypes(const SpeechMarkType& value) { m_speechMarkTypesHasBeenSet = true; m_speechMarkTypes.push_back(value); return *this; }
/**
* <p>The type of speech marks returned for the input text.</p>
*/
inline SynthesisTask& AddSpeechMarkTypes(SpeechMarkType&& value) { m_speechMarkTypesHasBeenSet = true; m_speechMarkTypes.push_back(std::move(value)); return *this; }
/**
* <p>Specifies whether the input text is plain text or SSML. The default value is
* plain text. </p>
*/
inline const TextType& GetTextType() const{ return m_textType; }
/**
* <p>Specifies whether the input text is plain text or SSML. The default value is
* plain text. </p>
*/
inline bool TextTypeHasBeenSet() const { return m_textTypeHasBeenSet; }
/**
* <p>Specifies whether the input text is plain text or SSML. The default value is
* plain text. </p>
*/
inline void SetTextType(const TextType& value) { m_textTypeHasBeenSet = true; m_textType = value; }
/**
* <p>Specifies whether the input text is plain text or SSML. The default value is
* plain text. </p>
*/
inline void SetTextType(TextType&& value) { m_textTypeHasBeenSet = true; m_textType = std::move(value); }
/**
* <p>Specifies whether the input text is plain text or SSML. The default value is
* plain text. </p>
*/
inline SynthesisTask& WithTextType(const TextType& value) { SetTextType(value); return *this;}
/**
* <p>Specifies whether the input text is plain text or SSML. The default value is
* plain text. </p>
*/
inline SynthesisTask& WithTextType(TextType&& value) { SetTextType(std::move(value)); return *this;}
/**
* <p>Voice ID to use for the synthesis. </p>
*/
inline const VoiceId& GetVoiceId() const{ return m_voiceId; }
/**
* <p>Voice ID to use for the synthesis. </p>
*/
inline bool VoiceIdHasBeenSet() const { return m_voiceIdHasBeenSet; }
/**
* <p>Voice ID to use for the synthesis. </p>
*/
inline void SetVoiceId(const VoiceId& value) { m_voiceIdHasBeenSet = true; m_voiceId = value; }
/**
* <p>Voice ID to use for the synthesis. </p>
*/
inline void SetVoiceId(VoiceId&& value) { m_voiceIdHasBeenSet = true; m_voiceId = std::move(value); }
/**
* <p>Voice ID to use for the synthesis. </p>
*/
inline SynthesisTask& WithVoiceId(const VoiceId& value) { SetVoiceId(value); return *this;}
/**
* <p>Voice ID to use for the synthesis. </p>
*/
inline SynthesisTask& WithVoiceId(VoiceId&& value) { SetVoiceId(std::move(value)); return *this;}
/**
* <p>Optional language code for a synthesis task. 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). </p> <p>If a bilingual voice is used and no language
* code is specified, Amazon Polly will use the default language of the bilingual
* voice. The default language for any voice is the one returned by the <a
* href="https://docs.aws.amazon.com/polly/latest/dg/API_DescribeVoices.html">DescribeVoices</a>
* operation for the <code>LanguageCode</code> parameter. For example, if no
* language code is specified, Aditi will use Indian English rather than Hindi.</p>
*/
inline const LanguageCode& GetLanguageCode() const{ return m_languageCode; }
/**
* <p>Optional language code for a synthesis task. 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). </p> <p>If a bilingual voice is used and no language
* code is specified, Amazon Polly will use the default language of the bilingual
* voice. The default language for any voice is the one returned by the <a
* href="https://docs.aws.amazon.com/polly/latest/dg/API_DescribeVoices.html">DescribeVoices</a>
* operation for the <code>LanguageCode</code> parameter. For example, if no
* language code is specified, Aditi will use Indian English rather than Hindi.</p>
*/
inline bool LanguageCodeHasBeenSet() const { return m_languageCodeHasBeenSet; }
/**
* <p>Optional language code for a synthesis task. 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). </p> <p>If a bilingual voice is used and no language
* code is specified, Amazon Polly will use the default language of the bilingual
* voice. The default language for any voice is the one returned by the <a
* href="https://docs.aws.amazon.com/polly/latest/dg/API_DescribeVoices.html">DescribeVoices</a>
* operation for the <code>LanguageCode</code> parameter. For example, if no
* language code is specified, Aditi will use Indian English rather than Hindi.</p>
*/
inline void SetLanguageCode(const LanguageCode& value) { m_languageCodeHasBeenSet = true; m_languageCode = value; }
/**
* <p>Optional language code for a synthesis task. 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). </p> <p>If a bilingual voice is used and no language
* code is specified, Amazon Polly will use the default language of the bilingual
* voice. The default language for any voice is the one returned by the <a
* href="https://docs.aws.amazon.com/polly/latest/dg/API_DescribeVoices.html">DescribeVoices</a>
* operation for the <code>LanguageCode</code> parameter. For example, if no
* language code is specified, Aditi will use Indian English rather than Hindi.</p>
*/
inline void SetLanguageCode(LanguageCode&& value) { m_languageCodeHasBeenSet = true; m_languageCode = std::move(value); }
/**
* <p>Optional language code for a synthesis task. 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). </p> <p>If a bilingual voice is used and no language
* code is specified, Amazon Polly will use the default language of the bilingual
* voice. The default language for any voice is the one returned by the <a
* href="https://docs.aws.amazon.com/polly/latest/dg/API_DescribeVoices.html">DescribeVoices</a>
* operation for the <code>LanguageCode</code> parameter. For example, if no
* language code is specified, Aditi will use Indian English rather than Hindi.</p>
*/
inline SynthesisTask& WithLanguageCode(const LanguageCode& value) { SetLanguageCode(value); return *this;}
/**
* <p>Optional language code for a synthesis task. 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). </p> <p>If a bilingual voice is used and no language
* code is specified, Amazon Polly will use the default language of the bilingual
* voice. The default language for any voice is the one returned by the <a
* href="https://docs.aws.amazon.com/polly/latest/dg/API_DescribeVoices.html">DescribeVoices</a>
* operation for the <code>LanguageCode</code> parameter. For example, if no
* language code is specified, Aditi will use Indian English rather than Hindi.</p>
*/
inline SynthesisTask& WithLanguageCode(LanguageCode&& value) { SetLanguageCode(std::move(value)); return *this;}
private:
Engine m_engine;
bool m_engineHasBeenSet;
Aws::String m_taskId;
bool m_taskIdHasBeenSet;
TaskStatus m_taskStatus;
bool m_taskStatusHasBeenSet;
Aws::String m_taskStatusReason;
bool m_taskStatusReasonHasBeenSet;
Aws::String m_outputUri;
bool m_outputUriHasBeenSet;
Aws::Utils::DateTime m_creationTime;
bool m_creationTimeHasBeenSet;
int m_requestCharacters;
bool m_requestCharactersHasBeenSet;
Aws::String m_snsTopicArn;
bool m_snsTopicArnHasBeenSet;
Aws::Vector<Aws::String> m_lexiconNames;
bool m_lexiconNamesHasBeenSet;
OutputFormat m_outputFormat;
bool m_outputFormatHasBeenSet;
Aws::String m_sampleRate;
bool m_sampleRateHasBeenSet;
Aws::Vector<SpeechMarkType> m_speechMarkTypes;
bool m_speechMarkTypesHasBeenSet;
TextType m_textType;
bool m_textTypeHasBeenSet;
VoiceId m_voiceId;
bool m_voiceIdHasBeenSet;
LanguageCode m_languageCode;
bool m_languageCodeHasBeenSet;
};
} // namespace Model
} // namespace Polly
} // namespace Aws

View File

@@ -0,0 +1,585 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#pragma once
#include <aws/polly/Polly_EXPORTS.h>
#include <aws/polly/PollyRequest.h>
#include <aws/polly/model/Engine.h>
#include <aws/polly/model/LanguageCode.h>
#include <aws/core/utils/memory/stl/AWSVector.h>
#include <aws/polly/model/OutputFormat.h>
#include <aws/core/utils/memory/stl/AWSString.h>
#include <aws/polly/model/TextType.h>
#include <aws/polly/model/VoiceId.h>
#include <aws/polly/model/SpeechMarkType.h>
#include <utility>
namespace Aws
{
namespace Polly
{
namespace Model
{
/**
*/
class AWS_POLLY_API SynthesizeSpeechRequest : public PollyRequest
{
public:
SynthesizeSpeechRequest();
// Service request name is the Operation name which will send this request out,
// each operation should has unique request name, so that we can get operation's name from this request.
// Note: this is not true for response, multiple operations may have the same response name,
// so we can not get operation's name from response.
inline virtual const char* GetServiceRequestName() const override { return "SynthesizeSpeech"; }
Aws::String SerializePayload() const override;
protected:
void DumpBodyToUrl(Aws::Http::URI& uri ) const override;
public:
/**
* <p>Specifies the engine (<code>standard</code> or <code>neural</code>) 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.</p>
*/
inline const Engine& GetEngine() const{ return m_engine; }
/**
* <p>Specifies the engine (<code>standard</code> or <code>neural</code>) 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.</p>
*/
inline bool EngineHasBeenSet() const { return m_engineHasBeenSet; }
/**
* <p>Specifies the engine (<code>standard</code> or <code>neural</code>) 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.</p>
*/
inline void SetEngine(const Engine& value) { m_engineHasBeenSet = true; m_engine = value; }
/**
* <p>Specifies the engine (<code>standard</code> or <code>neural</code>) 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.</p>
*/
inline void SetEngine(Engine&& value) { m_engineHasBeenSet = true; m_engine = std::move(value); }
/**
* <p>Specifies the engine (<code>standard</code> or <code>neural</code>) 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.</p>
*/
inline SynthesizeSpeechRequest& WithEngine(const Engine& value) { SetEngine(value); return *this;}
/**
* <p>Specifies the engine (<code>standard</code> or <code>neural</code>) 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.</p>
*/
inline SynthesizeSpeechRequest& WithEngine(Engine&& value) { SetEngine(std::move(value)); return *this;}
/**
* <p>Optional language code for the Synthesize Speech 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). </p> <p>If a bilingual voice is
* used and no language code is specified, Amazon Polly will use the default
* language of the bilingual voice. The default language for any voice is the one
* returned by the <a
* href="https://docs.aws.amazon.com/polly/latest/dg/API_DescribeVoices.html">DescribeVoices</a>
* operation for the <code>LanguageCode</code> parameter. For example, if no
* language code is specified, Aditi will use Indian English rather than Hindi.</p>
*/
inline const LanguageCode& GetLanguageCode() const{ return m_languageCode; }
/**
* <p>Optional language code for the Synthesize Speech 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). </p> <p>If a bilingual voice is
* used and no language code is specified, Amazon Polly will use the default
* language of the bilingual voice. The default language for any voice is the one
* returned by the <a
* href="https://docs.aws.amazon.com/polly/latest/dg/API_DescribeVoices.html">DescribeVoices</a>
* operation for the <code>LanguageCode</code> parameter. For example, if no
* language code is specified, Aditi will use Indian English rather than Hindi.</p>
*/
inline bool LanguageCodeHasBeenSet() const { return m_languageCodeHasBeenSet; }
/**
* <p>Optional language code for the Synthesize Speech 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). </p> <p>If a bilingual voice is
* used and no language code is specified, Amazon Polly will use the default
* language of the bilingual voice. The default language for any voice is the one
* returned by the <a
* href="https://docs.aws.amazon.com/polly/latest/dg/API_DescribeVoices.html">DescribeVoices</a>
* operation for the <code>LanguageCode</code> parameter. For example, if no
* language code is specified, Aditi will use Indian English rather than Hindi.</p>
*/
inline void SetLanguageCode(const LanguageCode& value) { m_languageCodeHasBeenSet = true; m_languageCode = value; }
/**
* <p>Optional language code for the Synthesize Speech 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). </p> <p>If a bilingual voice is
* used and no language code is specified, Amazon Polly will use the default
* language of the bilingual voice. The default language for any voice is the one
* returned by the <a
* href="https://docs.aws.amazon.com/polly/latest/dg/API_DescribeVoices.html">DescribeVoices</a>
* operation for the <code>LanguageCode</code> parameter. For example, if no
* language code is specified, Aditi will use Indian English rather than Hindi.</p>
*/
inline void SetLanguageCode(LanguageCode&& value) { m_languageCodeHasBeenSet = true; m_languageCode = std::move(value); }
/**
* <p>Optional language code for the Synthesize Speech 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). </p> <p>If a bilingual voice is
* used and no language code is specified, Amazon Polly will use the default
* language of the bilingual voice. The default language for any voice is the one
* returned by the <a
* href="https://docs.aws.amazon.com/polly/latest/dg/API_DescribeVoices.html">DescribeVoices</a>
* operation for the <code>LanguageCode</code> parameter. For example, if no
* language code is specified, Aditi will use Indian English rather than Hindi.</p>
*/
inline SynthesizeSpeechRequest& WithLanguageCode(const LanguageCode& value) { SetLanguageCode(value); return *this;}
/**
* <p>Optional language code for the Synthesize Speech 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). </p> <p>If a bilingual voice is
* used and no language code is specified, Amazon Polly will use the default
* language of the bilingual voice. The default language for any voice is the one
* returned by the <a
* href="https://docs.aws.amazon.com/polly/latest/dg/API_DescribeVoices.html">DescribeVoices</a>
* operation for the <code>LanguageCode</code> parameter. For example, if no
* language code is specified, Aditi will use Indian English rather than Hindi.</p>
*/
inline SynthesizeSpeechRequest& WithLanguageCode(LanguageCode&& value) { SetLanguageCode(std::move(value)); return *this;}
/**
* <p>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. For information about storing lexicons,
* see <a
* href="https://docs.aws.amazon.com/polly/latest/dg/API_PutLexicon.html">PutLexicon</a>.</p>
*/
inline const Aws::Vector<Aws::String>& GetLexiconNames() const{ return m_lexiconNames; }
/**
* <p>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. For information about storing lexicons,
* see <a
* href="https://docs.aws.amazon.com/polly/latest/dg/API_PutLexicon.html">PutLexicon</a>.</p>
*/
inline bool LexiconNamesHasBeenSet() const { return m_lexiconNamesHasBeenSet; }
/**
* <p>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. For information about storing lexicons,
* see <a
* href="https://docs.aws.amazon.com/polly/latest/dg/API_PutLexicon.html">PutLexicon</a>.</p>
*/
inline void SetLexiconNames(const Aws::Vector<Aws::String>& value) { m_lexiconNamesHasBeenSet = true; m_lexiconNames = value; }
/**
* <p>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. For information about storing lexicons,
* see <a
* href="https://docs.aws.amazon.com/polly/latest/dg/API_PutLexicon.html">PutLexicon</a>.</p>
*/
inline void SetLexiconNames(Aws::Vector<Aws::String>&& value) { m_lexiconNamesHasBeenSet = true; m_lexiconNames = std::move(value); }
/**
* <p>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. For information about storing lexicons,
* see <a
* href="https://docs.aws.amazon.com/polly/latest/dg/API_PutLexicon.html">PutLexicon</a>.</p>
*/
inline SynthesizeSpeechRequest& WithLexiconNames(const Aws::Vector<Aws::String>& value) { SetLexiconNames(value); return *this;}
/**
* <p>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. For information about storing lexicons,
* see <a
* href="https://docs.aws.amazon.com/polly/latest/dg/API_PutLexicon.html">PutLexicon</a>.</p>
*/
inline SynthesizeSpeechRequest& WithLexiconNames(Aws::Vector<Aws::String>&& value) { SetLexiconNames(std::move(value)); return *this;}
/**
* <p>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. For information about storing lexicons,
* see <a
* href="https://docs.aws.amazon.com/polly/latest/dg/API_PutLexicon.html">PutLexicon</a>.</p>
*/
inline SynthesizeSpeechRequest& AddLexiconNames(const Aws::String& value) { m_lexiconNamesHasBeenSet = true; m_lexiconNames.push_back(value); return *this; }
/**
* <p>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. For information about storing lexicons,
* see <a
* href="https://docs.aws.amazon.com/polly/latest/dg/API_PutLexicon.html">PutLexicon</a>.</p>
*/
inline SynthesizeSpeechRequest& AddLexiconNames(Aws::String&& value) { m_lexiconNamesHasBeenSet = true; m_lexiconNames.push_back(std::move(value)); return *this; }
/**
* <p>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. For information about storing lexicons,
* see <a
* href="https://docs.aws.amazon.com/polly/latest/dg/API_PutLexicon.html">PutLexicon</a>.</p>
*/
inline SynthesizeSpeechRequest& AddLexiconNames(const char* value) { m_lexiconNamesHasBeenSet = true; m_lexiconNames.push_back(value); return *this; }
/**
* <p> 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. </p>
* <p>When pcm is used, the content returned is audio/pcm in a signed 16-bit, 1
* channel (mono), little-endian format. </p>
*/
inline const OutputFormat& GetOutputFormat() const{ return m_outputFormat; }
/**
* <p> 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. </p>
* <p>When pcm is used, the content returned is audio/pcm in a signed 16-bit, 1
* channel (mono), little-endian format. </p>
*/
inline bool OutputFormatHasBeenSet() const { return m_outputFormatHasBeenSet; }
/**
* <p> 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. </p>
* <p>When pcm is used, the content returned is audio/pcm in a signed 16-bit, 1
* channel (mono), little-endian format. </p>
*/
inline void SetOutputFormat(const OutputFormat& value) { m_outputFormatHasBeenSet = true; m_outputFormat = value; }
/**
* <p> 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. </p>
* <p>When pcm is used, the content returned is audio/pcm in a signed 16-bit, 1
* channel (mono), little-endian format. </p>
*/
inline void SetOutputFormat(OutputFormat&& value) { m_outputFormatHasBeenSet = true; m_outputFormat = std::move(value); }
/**
* <p> 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. </p>
* <p>When pcm is used, the content returned is audio/pcm in a signed 16-bit, 1
* channel (mono), little-endian format. </p>
*/
inline SynthesizeSpeechRequest& WithOutputFormat(const OutputFormat& value) { SetOutputFormat(value); return *this;}
/**
* <p> 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. </p>
* <p>When pcm is used, the content returned is audio/pcm in a signed 16-bit, 1
* channel (mono), little-endian format. </p>
*/
inline SynthesizeSpeechRequest& WithOutputFormat(OutputFormat&& value) { SetOutputFormat(std::move(value)); return *this;}
/**
* <p>The audio frequency specified in Hz.</p> <p>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".</p>
* <p>Valid values for pcm are "8000" and "16000" The default value is "16000".
* </p>
*/
inline const Aws::String& GetSampleRate() const{ return m_sampleRate; }
/**
* <p>The audio frequency specified in Hz.</p> <p>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".</p>
* <p>Valid values for pcm are "8000" and "16000" The default value is "16000".
* </p>
*/
inline bool SampleRateHasBeenSet() const { return m_sampleRateHasBeenSet; }
/**
* <p>The audio frequency specified in Hz.</p> <p>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".</p>
* <p>Valid values for pcm are "8000" and "16000" The default value is "16000".
* </p>
*/
inline void SetSampleRate(const Aws::String& value) { m_sampleRateHasBeenSet = true; m_sampleRate = value; }
/**
* <p>The audio frequency specified in Hz.</p> <p>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".</p>
* <p>Valid values for pcm are "8000" and "16000" The default value is "16000".
* </p>
*/
inline void SetSampleRate(Aws::String&& value) { m_sampleRateHasBeenSet = true; m_sampleRate = std::move(value); }
/**
* <p>The audio frequency specified in Hz.</p> <p>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".</p>
* <p>Valid values for pcm are "8000" and "16000" The default value is "16000".
* </p>
*/
inline void SetSampleRate(const char* value) { m_sampleRateHasBeenSet = true; m_sampleRate.assign(value); }
/**
* <p>The audio frequency specified in Hz.</p> <p>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".</p>
* <p>Valid values for pcm are "8000" and "16000" The default value is "16000".
* </p>
*/
inline SynthesizeSpeechRequest& WithSampleRate(const Aws::String& value) { SetSampleRate(value); return *this;}
/**
* <p>The audio frequency specified in Hz.</p> <p>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".</p>
* <p>Valid values for pcm are "8000" and "16000" The default value is "16000".
* </p>
*/
inline SynthesizeSpeechRequest& WithSampleRate(Aws::String&& value) { SetSampleRate(std::move(value)); return *this;}
/**
* <p>The audio frequency specified in Hz.</p> <p>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".</p>
* <p>Valid values for pcm are "8000" and "16000" The default value is "16000".
* </p>
*/
inline SynthesizeSpeechRequest& WithSampleRate(const char* value) { SetSampleRate(value); return *this;}
/**
* <p>The type of speech marks returned for the input text.</p>
*/
inline const Aws::Vector<SpeechMarkType>& GetSpeechMarkTypes() const{ return m_speechMarkTypes; }
/**
* <p>The type of speech marks returned for the input text.</p>
*/
inline bool SpeechMarkTypesHasBeenSet() const { return m_speechMarkTypesHasBeenSet; }
/**
* <p>The type of speech marks returned for the input text.</p>
*/
inline void SetSpeechMarkTypes(const Aws::Vector<SpeechMarkType>& value) { m_speechMarkTypesHasBeenSet = true; m_speechMarkTypes = value; }
/**
* <p>The type of speech marks returned for the input text.</p>
*/
inline void SetSpeechMarkTypes(Aws::Vector<SpeechMarkType>&& value) { m_speechMarkTypesHasBeenSet = true; m_speechMarkTypes = std::move(value); }
/**
* <p>The type of speech marks returned for the input text.</p>
*/
inline SynthesizeSpeechRequest& WithSpeechMarkTypes(const Aws::Vector<SpeechMarkType>& value) { SetSpeechMarkTypes(value); return *this;}
/**
* <p>The type of speech marks returned for the input text.</p>
*/
inline SynthesizeSpeechRequest& WithSpeechMarkTypes(Aws::Vector<SpeechMarkType>&& value) { SetSpeechMarkTypes(std::move(value)); return *this;}
/**
* <p>The type of speech marks returned for the input text.</p>
*/
inline SynthesizeSpeechRequest& AddSpeechMarkTypes(const SpeechMarkType& value) { m_speechMarkTypesHasBeenSet = true; m_speechMarkTypes.push_back(value); return *this; }
/**
* <p>The type of speech marks returned for the input text.</p>
*/
inline SynthesizeSpeechRequest& AddSpeechMarkTypes(SpeechMarkType&& value) { m_speechMarkTypesHasBeenSet = true; m_speechMarkTypes.push_back(std::move(value)); return *this; }
/**
* <p> Input text to synthesize. If you specify <code>ssml</code> as the
* <code>TextType</code>, follow the SSML format for the input text. </p>
*/
inline const Aws::String& GetText() const{ return m_text; }
/**
* <p> Input text to synthesize. If you specify <code>ssml</code> as the
* <code>TextType</code>, follow the SSML format for the input text. </p>
*/
inline bool TextHasBeenSet() const { return m_textHasBeenSet; }
/**
* <p> Input text to synthesize. If you specify <code>ssml</code> as the
* <code>TextType</code>, follow the SSML format for the input text. </p>
*/
inline void SetText(const Aws::String& value) { m_textHasBeenSet = true; m_text = value; }
/**
* <p> Input text to synthesize. If you specify <code>ssml</code> as the
* <code>TextType</code>, follow the SSML format for the input text. </p>
*/
inline void SetText(Aws::String&& value) { m_textHasBeenSet = true; m_text = std::move(value); }
/**
* <p> Input text to synthesize. If you specify <code>ssml</code> as the
* <code>TextType</code>, follow the SSML format for the input text. </p>
*/
inline void SetText(const char* value) { m_textHasBeenSet = true; m_text.assign(value); }
/**
* <p> Input text to synthesize. If you specify <code>ssml</code> as the
* <code>TextType</code>, follow the SSML format for the input text. </p>
*/
inline SynthesizeSpeechRequest& WithText(const Aws::String& value) { SetText(value); return *this;}
/**
* <p> Input text to synthesize. If you specify <code>ssml</code> as the
* <code>TextType</code>, follow the SSML format for the input text. </p>
*/
inline SynthesizeSpeechRequest& WithText(Aws::String&& value) { SetText(std::move(value)); return *this;}
/**
* <p> Input text to synthesize. If you specify <code>ssml</code> as the
* <code>TextType</code>, follow the SSML format for the input text. </p>
*/
inline SynthesizeSpeechRequest& WithText(const char* value) { SetText(value); return *this;}
/**
* <p> Specifies whether the input text is plain text or SSML. The default value is
* plain text. For more information, see <a
* href="https://docs.aws.amazon.com/polly/latest/dg/ssml.html">Using SSML</a>.</p>
*/
inline const TextType& GetTextType() const{ return m_textType; }
/**
* <p> Specifies whether the input text is plain text or SSML. The default value is
* plain text. For more information, see <a
* href="https://docs.aws.amazon.com/polly/latest/dg/ssml.html">Using SSML</a>.</p>
*/
inline bool TextTypeHasBeenSet() const { return m_textTypeHasBeenSet; }
/**
* <p> Specifies whether the input text is plain text or SSML. The default value is
* plain text. For more information, see <a
* href="https://docs.aws.amazon.com/polly/latest/dg/ssml.html">Using SSML</a>.</p>
*/
inline void SetTextType(const TextType& value) { m_textTypeHasBeenSet = true; m_textType = value; }
/**
* <p> Specifies whether the input text is plain text or SSML. The default value is
* plain text. For more information, see <a
* href="https://docs.aws.amazon.com/polly/latest/dg/ssml.html">Using SSML</a>.</p>
*/
inline void SetTextType(TextType&& value) { m_textTypeHasBeenSet = true; m_textType = std::move(value); }
/**
* <p> Specifies whether the input text is plain text or SSML. The default value is
* plain text. For more information, see <a
* href="https://docs.aws.amazon.com/polly/latest/dg/ssml.html">Using SSML</a>.</p>
*/
inline SynthesizeSpeechRequest& WithTextType(const TextType& value) { SetTextType(value); return *this;}
/**
* <p> Specifies whether the input text is plain text or SSML. The default value is
* plain text. For more information, see <a
* href="https://docs.aws.amazon.com/polly/latest/dg/ssml.html">Using SSML</a>.</p>
*/
inline SynthesizeSpeechRequest& WithTextType(TextType&& value) { SetTextType(std::move(value)); return *this;}
/**
* <p> Voice ID to use for the synthesis. You can get a list of available voice IDs
* by calling the <a
* href="https://docs.aws.amazon.com/polly/latest/dg/API_DescribeVoices.html">DescribeVoices</a>
* operation. </p>
*/
inline const VoiceId& GetVoiceId() const{ return m_voiceId; }
/**
* <p> Voice ID to use for the synthesis. You can get a list of available voice IDs
* by calling the <a
* href="https://docs.aws.amazon.com/polly/latest/dg/API_DescribeVoices.html">DescribeVoices</a>
* operation. </p>
*/
inline bool VoiceIdHasBeenSet() const { return m_voiceIdHasBeenSet; }
/**
* <p> Voice ID to use for the synthesis. You can get a list of available voice IDs
* by calling the <a
* href="https://docs.aws.amazon.com/polly/latest/dg/API_DescribeVoices.html">DescribeVoices</a>
* operation. </p>
*/
inline void SetVoiceId(const VoiceId& value) { m_voiceIdHasBeenSet = true; m_voiceId = value; }
/**
* <p> Voice ID to use for the synthesis. You can get a list of available voice IDs
* by calling the <a
* href="https://docs.aws.amazon.com/polly/latest/dg/API_DescribeVoices.html">DescribeVoices</a>
* operation. </p>
*/
inline void SetVoiceId(VoiceId&& value) { m_voiceIdHasBeenSet = true; m_voiceId = std::move(value); }
/**
* <p> Voice ID to use for the synthesis. You can get a list of available voice IDs
* by calling the <a
* href="https://docs.aws.amazon.com/polly/latest/dg/API_DescribeVoices.html">DescribeVoices</a>
* operation. </p>
*/
inline SynthesizeSpeechRequest& WithVoiceId(const VoiceId& value) { SetVoiceId(value); return *this;}
/**
* <p> Voice ID to use for the synthesis. You can get a list of available voice IDs
* by calling the <a
* href="https://docs.aws.amazon.com/polly/latest/dg/API_DescribeVoices.html">DescribeVoices</a>
* operation. </p>
*/
inline SynthesizeSpeechRequest& WithVoiceId(VoiceId&& value) { SetVoiceId(std::move(value)); return *this;}
private:
Engine m_engine;
bool m_engineHasBeenSet;
LanguageCode m_languageCode;
bool m_languageCodeHasBeenSet;
Aws::Vector<Aws::String> m_lexiconNames;
bool m_lexiconNamesHasBeenSet;
OutputFormat m_outputFormat;
bool m_outputFormatHasBeenSet;
Aws::String m_sampleRate;
bool m_sampleRateHasBeenSet;
Aws::Vector<SpeechMarkType> m_speechMarkTypes;
bool m_speechMarkTypesHasBeenSet;
Aws::String m_text;
bool m_textHasBeenSet;
TextType m_textType;
bool m_textTypeHasBeenSet;
VoiceId m_voiceId;
bool m_voiceIdHasBeenSet;
};
} // namespace Model
} // namespace Polly
} // namespace Aws

View File

@@ -0,0 +1,183 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#pragma once
#include <aws/polly/Polly_EXPORTS.h>
#include <aws/core/utils/stream/ResponseStream.h>
#include <aws/core/utils/Array.h>
#include <aws/core/utils/memory/stl/AWSString.h>
#include <utility>
namespace Aws
{
template<typename RESULT_TYPE>
class AmazonWebServiceResult;
namespace Polly
{
namespace Model
{
class AWS_POLLY_API SynthesizeSpeechResult
{
public:
SynthesizeSpeechResult();
//We have to define these because Microsoft doesn't auto generate them
SynthesizeSpeechResult(SynthesizeSpeechResult&&);
SynthesizeSpeechResult& operator=(SynthesizeSpeechResult&&);
//we delete these because Microsoft doesn't handle move generation correctly
//and we therefore don't trust them to get it right here either.
SynthesizeSpeechResult(const SynthesizeSpeechResult&) = delete;
SynthesizeSpeechResult& operator=(const SynthesizeSpeechResult&) = delete;
SynthesizeSpeechResult(Aws::AmazonWebServiceResult<Aws::Utils::Stream::ResponseStream>&& result);
SynthesizeSpeechResult& operator=(Aws::AmazonWebServiceResult<Aws::Utils::Stream::ResponseStream>&& result);
/**
* <p> Stream containing the synthesized speech. </p>
*/
inline Aws::IOStream& GetAudioStream() { return m_audioStream.GetUnderlyingStream(); }
/**
* <p> Stream containing the synthesized speech. </p>
*/
inline void ReplaceBody(Aws::IOStream* body) { m_audioStream = Aws::Utils::Stream::ResponseStream(body); }
/**
* <p> Specifies the type audio stream. This should reflect the
* <code>OutputFormat</code> parameter in your request. </p> <ul> <li> <p> If you
* request <code>mp3</code> as the <code>OutputFormat</code>, the
* <code>ContentType</code> returned is audio/mpeg. </p> </li> <li> <p> If you
* request <code>ogg_vorbis</code> as the <code>OutputFormat</code>, the
* <code>ContentType</code> returned is audio/ogg. </p> </li> <li> <p> If you
* request <code>pcm</code> as the <code>OutputFormat</code>, the
* <code>ContentType</code> returned is audio/pcm in a signed 16-bit, 1 channel
* (mono), little-endian format. </p> </li> <li> <p>If you request
* <code>json</code> as the <code>OutputFormat</code>, the <code>ContentType</code>
* returned is audio/json.</p> </li> </ul> <p> </p>
*/
inline const Aws::String& GetContentType() const{ return m_contentType; }
/**
* <p> Specifies the type audio stream. This should reflect the
* <code>OutputFormat</code> parameter in your request. </p> <ul> <li> <p> If you
* request <code>mp3</code> as the <code>OutputFormat</code>, the
* <code>ContentType</code> returned is audio/mpeg. </p> </li> <li> <p> If you
* request <code>ogg_vorbis</code> as the <code>OutputFormat</code>, the
* <code>ContentType</code> returned is audio/ogg. </p> </li> <li> <p> If you
* request <code>pcm</code> as the <code>OutputFormat</code>, the
* <code>ContentType</code> returned is audio/pcm in a signed 16-bit, 1 channel
* (mono), little-endian format. </p> </li> <li> <p>If you request
* <code>json</code> as the <code>OutputFormat</code>, the <code>ContentType</code>
* returned is audio/json.</p> </li> </ul> <p> </p>
*/
inline void SetContentType(const Aws::String& value) { m_contentType = value; }
/**
* <p> Specifies the type audio stream. This should reflect the
* <code>OutputFormat</code> parameter in your request. </p> <ul> <li> <p> If you
* request <code>mp3</code> as the <code>OutputFormat</code>, the
* <code>ContentType</code> returned is audio/mpeg. </p> </li> <li> <p> If you
* request <code>ogg_vorbis</code> as the <code>OutputFormat</code>, the
* <code>ContentType</code> returned is audio/ogg. </p> </li> <li> <p> If you
* request <code>pcm</code> as the <code>OutputFormat</code>, the
* <code>ContentType</code> returned is audio/pcm in a signed 16-bit, 1 channel
* (mono), little-endian format. </p> </li> <li> <p>If you request
* <code>json</code> as the <code>OutputFormat</code>, the <code>ContentType</code>
* returned is audio/json.</p> </li> </ul> <p> </p>
*/
inline void SetContentType(Aws::String&& value) { m_contentType = std::move(value); }
/**
* <p> Specifies the type audio stream. This should reflect the
* <code>OutputFormat</code> parameter in your request. </p> <ul> <li> <p> If you
* request <code>mp3</code> as the <code>OutputFormat</code>, the
* <code>ContentType</code> returned is audio/mpeg. </p> </li> <li> <p> If you
* request <code>ogg_vorbis</code> as the <code>OutputFormat</code>, the
* <code>ContentType</code> returned is audio/ogg. </p> </li> <li> <p> If you
* request <code>pcm</code> as the <code>OutputFormat</code>, the
* <code>ContentType</code> returned is audio/pcm in a signed 16-bit, 1 channel
* (mono), little-endian format. </p> </li> <li> <p>If you request
* <code>json</code> as the <code>OutputFormat</code>, the <code>ContentType</code>
* returned is audio/json.</p> </li> </ul> <p> </p>
*/
inline void SetContentType(const char* value) { m_contentType.assign(value); }
/**
* <p> Specifies the type audio stream. This should reflect the
* <code>OutputFormat</code> parameter in your request. </p> <ul> <li> <p> If you
* request <code>mp3</code> as the <code>OutputFormat</code>, the
* <code>ContentType</code> returned is audio/mpeg. </p> </li> <li> <p> If you
* request <code>ogg_vorbis</code> as the <code>OutputFormat</code>, the
* <code>ContentType</code> returned is audio/ogg. </p> </li> <li> <p> If you
* request <code>pcm</code> as the <code>OutputFormat</code>, the
* <code>ContentType</code> returned is audio/pcm in a signed 16-bit, 1 channel
* (mono), little-endian format. </p> </li> <li> <p>If you request
* <code>json</code> as the <code>OutputFormat</code>, the <code>ContentType</code>
* returned is audio/json.</p> </li> </ul> <p> </p>
*/
inline SynthesizeSpeechResult& WithContentType(const Aws::String& value) { SetContentType(value); return *this;}
/**
* <p> Specifies the type audio stream. This should reflect the
* <code>OutputFormat</code> parameter in your request. </p> <ul> <li> <p> If you
* request <code>mp3</code> as the <code>OutputFormat</code>, the
* <code>ContentType</code> returned is audio/mpeg. </p> </li> <li> <p> If you
* request <code>ogg_vorbis</code> as the <code>OutputFormat</code>, the
* <code>ContentType</code> returned is audio/ogg. </p> </li> <li> <p> If you
* request <code>pcm</code> as the <code>OutputFormat</code>, the
* <code>ContentType</code> returned is audio/pcm in a signed 16-bit, 1 channel
* (mono), little-endian format. </p> </li> <li> <p>If you request
* <code>json</code> as the <code>OutputFormat</code>, the <code>ContentType</code>
* returned is audio/json.</p> </li> </ul> <p> </p>
*/
inline SynthesizeSpeechResult& WithContentType(Aws::String&& value) { SetContentType(std::move(value)); return *this;}
/**
* <p> Specifies the type audio stream. This should reflect the
* <code>OutputFormat</code> parameter in your request. </p> <ul> <li> <p> If you
* request <code>mp3</code> as the <code>OutputFormat</code>, the
* <code>ContentType</code> returned is audio/mpeg. </p> </li> <li> <p> If you
* request <code>ogg_vorbis</code> as the <code>OutputFormat</code>, the
* <code>ContentType</code> returned is audio/ogg. </p> </li> <li> <p> If you
* request <code>pcm</code> as the <code>OutputFormat</code>, the
* <code>ContentType</code> returned is audio/pcm in a signed 16-bit, 1 channel
* (mono), little-endian format. </p> </li> <li> <p>If you request
* <code>json</code> as the <code>OutputFormat</code>, the <code>ContentType</code>
* returned is audio/json.</p> </li> </ul> <p> </p>
*/
inline SynthesizeSpeechResult& WithContentType(const char* value) { SetContentType(value); return *this;}
/**
* <p>Number of characters synthesized.</p>
*/
inline int GetRequestCharacters() const{ return m_requestCharacters; }
/**
* <p>Number of characters synthesized.</p>
*/
inline void SetRequestCharacters(int value) { m_requestCharacters = value; }
/**
* <p>Number of characters synthesized.</p>
*/
inline SynthesizeSpeechResult& WithRequestCharacters(int value) { SetRequestCharacters(value); return *this;}
private:
Aws::Utils::Stream::ResponseStream m_audioStream;
Aws::String m_contentType;
int m_requestCharacters;
};
} // namespace Model
} // namespace Polly
} // namespace Aws

View File

@@ -0,0 +1,33 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#pragma once
#include <aws/polly/Polly_EXPORTS.h>
#include <aws/core/utils/memory/stl/AWSString.h>
namespace Aws
{
namespace Polly
{
namespace Model
{
enum class TaskStatus
{
NOT_SET,
scheduled,
inProgress,
completed,
failed
};
namespace TaskStatusMapper
{
AWS_POLLY_API TaskStatus GetTaskStatusForName(const Aws::String& name);
AWS_POLLY_API Aws::String GetNameForTaskStatus(TaskStatus value);
} // namespace TaskStatusMapper
} // namespace Model
} // namespace Polly
} // namespace Aws

View File

@@ -0,0 +1,31 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#pragma once
#include <aws/polly/Polly_EXPORTS.h>
#include <aws/core/utils/memory/stl/AWSString.h>
namespace Aws
{
namespace Polly
{
namespace Model
{
enum class TextType
{
NOT_SET,
ssml,
text
};
namespace TextTypeMapper
{
AWS_POLLY_API TextType GetTextTypeForName(const Aws::String& name);
AWS_POLLY_API Aws::String GetNameForTextType(TextType value);
} // namespace TextTypeMapper
} // namespace Model
} // namespace Polly
} // namespace Aws

View File

@@ -0,0 +1,381 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#pragma once
#include <aws/polly/Polly_EXPORTS.h>
#include <aws/polly/model/Gender.h>
#include <aws/polly/model/VoiceId.h>
#include <aws/polly/model/LanguageCode.h>
#include <aws/core/utils/memory/stl/AWSString.h>
#include <aws/core/utils/memory/stl/AWSVector.h>
#include <aws/polly/model/Engine.h>
#include <utility>
namespace Aws
{
namespace Utils
{
namespace Json
{
class JsonValue;
class JsonView;
} // namespace Json
} // namespace Utils
namespace Polly
{
namespace Model
{
/**
* <p>Description of the voice.</p><p><h3>See Also:</h3> <a
* href="http://docs.aws.amazon.com/goto/WebAPI/polly-2016-06-10/Voice">AWS API
* Reference</a></p>
*/
class AWS_POLLY_API Voice
{
public:
Voice();
Voice(Aws::Utils::Json::JsonView jsonValue);
Voice& operator=(Aws::Utils::Json::JsonView jsonValue);
Aws::Utils::Json::JsonValue Jsonize() const;
/**
* <p>Gender of the voice.</p>
*/
inline const Gender& GetGender() const{ return m_gender; }
/**
* <p>Gender of the voice.</p>
*/
inline bool GenderHasBeenSet() const { return m_genderHasBeenSet; }
/**
* <p>Gender of the voice.</p>
*/
inline void SetGender(const Gender& value) { m_genderHasBeenSet = true; m_gender = value; }
/**
* <p>Gender of the voice.</p>
*/
inline void SetGender(Gender&& value) { m_genderHasBeenSet = true; m_gender = std::move(value); }
/**
* <p>Gender of the voice.</p>
*/
inline Voice& WithGender(const Gender& value) { SetGender(value); return *this;}
/**
* <p>Gender of the voice.</p>
*/
inline Voice& WithGender(Gender&& value) { SetGender(std::move(value)); return *this;}
/**
* <p>Amazon Polly assigned voice ID. This is the ID that you specify when calling
* the <code>SynthesizeSpeech</code> operation.</p>
*/
inline const VoiceId& GetId() const{ return m_id; }
/**
* <p>Amazon Polly assigned voice ID. This is the ID that you specify when calling
* the <code>SynthesizeSpeech</code> operation.</p>
*/
inline bool IdHasBeenSet() const { return m_idHasBeenSet; }
/**
* <p>Amazon Polly assigned voice ID. This is the ID that you specify when calling
* the <code>SynthesizeSpeech</code> operation.</p>
*/
inline void SetId(const VoiceId& value) { m_idHasBeenSet = true; m_id = value; }
/**
* <p>Amazon Polly assigned voice ID. This is the ID that you specify when calling
* the <code>SynthesizeSpeech</code> operation.</p>
*/
inline void SetId(VoiceId&& value) { m_idHasBeenSet = true; m_id = std::move(value); }
/**
* <p>Amazon Polly assigned voice ID. This is the ID that you specify when calling
* the <code>SynthesizeSpeech</code> operation.</p>
*/
inline Voice& WithId(const VoiceId& value) { SetId(value); return *this;}
/**
* <p>Amazon Polly assigned voice ID. This is the ID that you specify when calling
* the <code>SynthesizeSpeech</code> operation.</p>
*/
inline Voice& WithId(VoiceId&& value) { SetId(std::move(value)); return *this;}
/**
* <p>Language code of the voice.</p>
*/
inline const LanguageCode& GetLanguageCode() const{ return m_languageCode; }
/**
* <p>Language code of the voice.</p>
*/
inline bool LanguageCodeHasBeenSet() const { return m_languageCodeHasBeenSet; }
/**
* <p>Language code of the voice.</p>
*/
inline void SetLanguageCode(const LanguageCode& value) { m_languageCodeHasBeenSet = true; m_languageCode = value; }
/**
* <p>Language code of the voice.</p>
*/
inline void SetLanguageCode(LanguageCode&& value) { m_languageCodeHasBeenSet = true; m_languageCode = std::move(value); }
/**
* <p>Language code of the voice.</p>
*/
inline Voice& WithLanguageCode(const LanguageCode& value) { SetLanguageCode(value); return *this;}
/**
* <p>Language code of the voice.</p>
*/
inline Voice& WithLanguageCode(LanguageCode&& value) { SetLanguageCode(std::move(value)); return *this;}
/**
* <p>Human readable name of the language in English.</p>
*/
inline const Aws::String& GetLanguageName() const{ return m_languageName; }
/**
* <p>Human readable name of the language in English.</p>
*/
inline bool LanguageNameHasBeenSet() const { return m_languageNameHasBeenSet; }
/**
* <p>Human readable name of the language in English.</p>
*/
inline void SetLanguageName(const Aws::String& value) { m_languageNameHasBeenSet = true; m_languageName = value; }
/**
* <p>Human readable name of the language in English.</p>
*/
inline void SetLanguageName(Aws::String&& value) { m_languageNameHasBeenSet = true; m_languageName = std::move(value); }
/**
* <p>Human readable name of the language in English.</p>
*/
inline void SetLanguageName(const char* value) { m_languageNameHasBeenSet = true; m_languageName.assign(value); }
/**
* <p>Human readable name of the language in English.</p>
*/
inline Voice& WithLanguageName(const Aws::String& value) { SetLanguageName(value); return *this;}
/**
* <p>Human readable name of the language in English.</p>
*/
inline Voice& WithLanguageName(Aws::String&& value) { SetLanguageName(std::move(value)); return *this;}
/**
* <p>Human readable name of the language in English.</p>
*/
inline Voice& WithLanguageName(const char* value) { SetLanguageName(value); return *this;}
/**
* <p>Name of the voice (for example, Salli, Kendra, etc.). This provides a human
* readable voice name that you might display in your application.</p>
*/
inline const Aws::String& GetName() const{ return m_name; }
/**
* <p>Name of the voice (for example, Salli, Kendra, etc.). This provides a human
* readable voice name that you might display in your application.</p>
*/
inline bool NameHasBeenSet() const { return m_nameHasBeenSet; }
/**
* <p>Name of the voice (for example, Salli, Kendra, etc.). This provides a human
* readable voice name that you might display in your application.</p>
*/
inline void SetName(const Aws::String& value) { m_nameHasBeenSet = true; m_name = value; }
/**
* <p>Name of the voice (for example, Salli, Kendra, etc.). This provides a human
* readable voice name that you might display in your application.</p>
*/
inline void SetName(Aws::String&& value) { m_nameHasBeenSet = true; m_name = std::move(value); }
/**
* <p>Name of the voice (for example, Salli, Kendra, etc.). This provides a human
* readable voice name that you might display in your application.</p>
*/
inline void SetName(const char* value) { m_nameHasBeenSet = true; m_name.assign(value); }
/**
* <p>Name of the voice (for example, Salli, Kendra, etc.). This provides a human
* readable voice name that you might display in your application.</p>
*/
inline Voice& WithName(const Aws::String& value) { SetName(value); return *this;}
/**
* <p>Name of the voice (for example, Salli, Kendra, etc.). This provides a human
* readable voice name that you might display in your application.</p>
*/
inline Voice& WithName(Aws::String&& value) { SetName(std::move(value)); return *this;}
/**
* <p>Name of the voice (for example, Salli, Kendra, etc.). This provides a human
* readable voice name that you might display in your application.</p>
*/
inline Voice& WithName(const char* value) { SetName(value); return *this;}
/**
* <p>Additional codes for languages available for the specified voice in addition
* to its default language. </p> <p>For example, the default language for Aditi is
* Indian English (en-IN) because it was first used for that language. Since Aditi
* is bilingual and fluent in both Indian English and Hindi, this parameter would
* show the code <code>hi-IN</code>.</p>
*/
inline const Aws::Vector<LanguageCode>& GetAdditionalLanguageCodes() const{ return m_additionalLanguageCodes; }
/**
* <p>Additional codes for languages available for the specified voice in addition
* to its default language. </p> <p>For example, the default language for Aditi is
* Indian English (en-IN) because it was first used for that language. Since Aditi
* is bilingual and fluent in both Indian English and Hindi, this parameter would
* show the code <code>hi-IN</code>.</p>
*/
inline bool AdditionalLanguageCodesHasBeenSet() const { return m_additionalLanguageCodesHasBeenSet; }
/**
* <p>Additional codes for languages available for the specified voice in addition
* to its default language. </p> <p>For example, the default language for Aditi is
* Indian English (en-IN) because it was first used for that language. Since Aditi
* is bilingual and fluent in both Indian English and Hindi, this parameter would
* show the code <code>hi-IN</code>.</p>
*/
inline void SetAdditionalLanguageCodes(const Aws::Vector<LanguageCode>& value) { m_additionalLanguageCodesHasBeenSet = true; m_additionalLanguageCodes = value; }
/**
* <p>Additional codes for languages available for the specified voice in addition
* to its default language. </p> <p>For example, the default language for Aditi is
* Indian English (en-IN) because it was first used for that language. Since Aditi
* is bilingual and fluent in both Indian English and Hindi, this parameter would
* show the code <code>hi-IN</code>.</p>
*/
inline void SetAdditionalLanguageCodes(Aws::Vector<LanguageCode>&& value) { m_additionalLanguageCodesHasBeenSet = true; m_additionalLanguageCodes = std::move(value); }
/**
* <p>Additional codes for languages available for the specified voice in addition
* to its default language. </p> <p>For example, the default language for Aditi is
* Indian English (en-IN) because it was first used for that language. Since Aditi
* is bilingual and fluent in both Indian English and Hindi, this parameter would
* show the code <code>hi-IN</code>.</p>
*/
inline Voice& WithAdditionalLanguageCodes(const Aws::Vector<LanguageCode>& value) { SetAdditionalLanguageCodes(value); return *this;}
/**
* <p>Additional codes for languages available for the specified voice in addition
* to its default language. </p> <p>For example, the default language for Aditi is
* Indian English (en-IN) because it was first used for that language. Since Aditi
* is bilingual and fluent in both Indian English and Hindi, this parameter would
* show the code <code>hi-IN</code>.</p>
*/
inline Voice& WithAdditionalLanguageCodes(Aws::Vector<LanguageCode>&& value) { SetAdditionalLanguageCodes(std::move(value)); return *this;}
/**
* <p>Additional codes for languages available for the specified voice in addition
* to its default language. </p> <p>For example, the default language for Aditi is
* Indian English (en-IN) because it was first used for that language. Since Aditi
* is bilingual and fluent in both Indian English and Hindi, this parameter would
* show the code <code>hi-IN</code>.</p>
*/
inline Voice& AddAdditionalLanguageCodes(const LanguageCode& value) { m_additionalLanguageCodesHasBeenSet = true; m_additionalLanguageCodes.push_back(value); return *this; }
/**
* <p>Additional codes for languages available for the specified voice in addition
* to its default language. </p> <p>For example, the default language for Aditi is
* Indian English (en-IN) because it was first used for that language. Since Aditi
* is bilingual and fluent in both Indian English and Hindi, this parameter would
* show the code <code>hi-IN</code>.</p>
*/
inline Voice& AddAdditionalLanguageCodes(LanguageCode&& value) { m_additionalLanguageCodesHasBeenSet = true; m_additionalLanguageCodes.push_back(std::move(value)); return *this; }
/**
* <p>Specifies which engines (<code>standard</code> or <code>neural</code>) that
* are supported by a given voice.</p>
*/
inline const Aws::Vector<Engine>& GetSupportedEngines() const{ return m_supportedEngines; }
/**
* <p>Specifies which engines (<code>standard</code> or <code>neural</code>) that
* are supported by a given voice.</p>
*/
inline bool SupportedEnginesHasBeenSet() const { return m_supportedEnginesHasBeenSet; }
/**
* <p>Specifies which engines (<code>standard</code> or <code>neural</code>) that
* are supported by a given voice.</p>
*/
inline void SetSupportedEngines(const Aws::Vector<Engine>& value) { m_supportedEnginesHasBeenSet = true; m_supportedEngines = value; }
/**
* <p>Specifies which engines (<code>standard</code> or <code>neural</code>) that
* are supported by a given voice.</p>
*/
inline void SetSupportedEngines(Aws::Vector<Engine>&& value) { m_supportedEnginesHasBeenSet = true; m_supportedEngines = std::move(value); }
/**
* <p>Specifies which engines (<code>standard</code> or <code>neural</code>) that
* are supported by a given voice.</p>
*/
inline Voice& WithSupportedEngines(const Aws::Vector<Engine>& value) { SetSupportedEngines(value); return *this;}
/**
* <p>Specifies which engines (<code>standard</code> or <code>neural</code>) that
* are supported by a given voice.</p>
*/
inline Voice& WithSupportedEngines(Aws::Vector<Engine>&& value) { SetSupportedEngines(std::move(value)); return *this;}
/**
* <p>Specifies which engines (<code>standard</code> or <code>neural</code>) that
* are supported by a given voice.</p>
*/
inline Voice& AddSupportedEngines(const Engine& value) { m_supportedEnginesHasBeenSet = true; m_supportedEngines.push_back(value); return *this; }
/**
* <p>Specifies which engines (<code>standard</code> or <code>neural</code>) that
* are supported by a given voice.</p>
*/
inline Voice& AddSupportedEngines(Engine&& value) { m_supportedEnginesHasBeenSet = true; m_supportedEngines.push_back(std::move(value)); return *this; }
private:
Gender m_gender;
bool m_genderHasBeenSet;
VoiceId m_id;
bool m_idHasBeenSet;
LanguageCode m_languageCode;
bool m_languageCodeHasBeenSet;
Aws::String m_languageName;
bool m_languageNameHasBeenSet;
Aws::String m_name;
bool m_nameHasBeenSet;
Aws::Vector<LanguageCode> m_additionalLanguageCodes;
bool m_additionalLanguageCodesHasBeenSet;
Aws::Vector<Engine> m_supportedEngines;
bool m_supportedEnginesHasBeenSet;
};
} // namespace Model
} // namespace Polly
} // namespace Aws

View File

@@ -0,0 +1,90 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#pragma once
#include <aws/polly/Polly_EXPORTS.h>
#include <aws/core/utils/memory/stl/AWSString.h>
namespace Aws
{
namespace Polly
{
namespace Model
{
enum class VoiceId
{
NOT_SET,
Aditi,
Amy,
Astrid,
Bianca,
Brian,
Camila,
Carla,
Carmen,
Celine,
Chantal,
Conchita,
Cristiano,
Dora,
Emma,
Enrique,
Ewa,
Filiz,
Geraint,
Giorgio,
Gwyneth,
Hans,
Ines,
Ivy,
Jacek,
Jan,
Joanna,
Joey,
Justin,
Karl,
Kendra,
Kevin,
Kimberly,
Lea,
Liv,
Lotte,
Lucia,
Lupe,
Mads,
Maja,
Marlene,
Mathieu,
Matthew,
Maxim,
Mia,
Miguel,
Mizuki,
Naja,
Nicole,
Penelope,
Raveena,
Ricardo,
Ruben,
Russell,
Salli,
Seoyeon,
Takumi,
Tatyana,
Vicki,
Vitoria,
Zeina,
Zhiyu
};
namespace VoiceIdMapper
{
AWS_POLLY_API VoiceId GetVoiceIdForName(const Aws::String& name);
AWS_POLLY_API Aws::String GetNameForVoiceId(VoiceId value);
} // namespace VoiceIdMapper
} // namespace Model
} // namespace Polly
} // namespace Aws

View File

@@ -0,0 +1,372 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/core/utils/Outcome.h>
#include <aws/core/auth/AWSAuthSigner.h>
#include <aws/core/client/CoreErrors.h>
#include <aws/core/client/RetryStrategy.h>
#include <aws/core/http/HttpClient.h>
#include <aws/core/http/HttpResponse.h>
#include <aws/core/http/HttpClientFactory.h>
#include <aws/core/auth/AWSCredentialsProviderChain.h>
#include <aws/core/utils/json/JsonSerializer.h>
#include <aws/core/utils/memory/stl/AWSStringStream.h>
#include <aws/core/utils/threading/Executor.h>
#include <aws/core/utils/DNS.h>
#include <aws/core/utils/logging/LogMacros.h>
#include <aws/polly/PollyClient.h>
#include <aws/polly/PollyEndpoint.h>
#include <aws/polly/PollyErrorMarshaller.h>
#include <aws/polly/model/DeleteLexiconRequest.h>
#include <aws/polly/model/DescribeVoicesRequest.h>
#include <aws/polly/model/GetLexiconRequest.h>
#include <aws/polly/model/GetSpeechSynthesisTaskRequest.h>
#include <aws/polly/model/ListLexiconsRequest.h>
#include <aws/polly/model/ListSpeechSynthesisTasksRequest.h>
#include <aws/polly/model/PutLexiconRequest.h>
#include <aws/polly/model/StartSpeechSynthesisTaskRequest.h>
#include <aws/polly/model/SynthesizeSpeechRequest.h>
using namespace Aws;
using namespace Aws::Auth;
using namespace Aws::Client;
using namespace Aws::Polly;
using namespace Aws::Polly::Model;
using namespace Aws::Http;
using namespace Aws::Utils::Json;
static const char* SERVICE_NAME = "polly";
static const char* ALLOCATION_TAG = "PollyClient";
PollyClient::PollyClient(const Client::ClientConfiguration& clientConfiguration) :
BASECLASS(clientConfiguration,
Aws::MakeShared<AWSAuthV4Signer>(ALLOCATION_TAG, Aws::MakeShared<DefaultAWSCredentialsProviderChain>(ALLOCATION_TAG),
SERVICE_NAME, Aws::Region::ComputeSignerRegion(clientConfiguration.region)),
Aws::MakeShared<PollyErrorMarshaller>(ALLOCATION_TAG)),
m_executor(clientConfiguration.executor)
{
init(clientConfiguration);
}
PollyClient::PollyClient(const AWSCredentials& credentials, const Client::ClientConfiguration& clientConfiguration) :
BASECLASS(clientConfiguration,
Aws::MakeShared<AWSAuthV4Signer>(ALLOCATION_TAG, Aws::MakeShared<SimpleAWSCredentialsProvider>(ALLOCATION_TAG, credentials),
SERVICE_NAME, Aws::Region::ComputeSignerRegion(clientConfiguration.region)),
Aws::MakeShared<PollyErrorMarshaller>(ALLOCATION_TAG)),
m_executor(clientConfiguration.executor)
{
init(clientConfiguration);
}
PollyClient::PollyClient(const std::shared_ptr<AWSCredentialsProvider>& credentialsProvider,
const Client::ClientConfiguration& clientConfiguration) :
BASECLASS(clientConfiguration,
Aws::MakeShared<AWSAuthV4Signer>(ALLOCATION_TAG, credentialsProvider,
SERVICE_NAME, Aws::Region::ComputeSignerRegion(clientConfiguration.region)),
Aws::MakeShared<PollyErrorMarshaller>(ALLOCATION_TAG)),
m_executor(clientConfiguration.executor)
{
init(clientConfiguration);
}
PollyClient::~PollyClient()
{
}
void PollyClient::init(const ClientConfiguration& config)
{
SetServiceClientName("Polly");
m_configScheme = SchemeMapper::ToString(config.scheme);
if (config.endpointOverride.empty())
{
m_uri = m_configScheme + "://" + PollyEndpoint::ForRegion(config.region, config.useDualStack);
}
else
{
OverrideEndpoint(config.endpointOverride);
}
}
void PollyClient::OverrideEndpoint(const Aws::String& endpoint)
{
if (endpoint.compare(0, 7, "http://") == 0 || endpoint.compare(0, 8, "https://") == 0)
{
m_uri = endpoint;
}
else
{
m_uri = m_configScheme + "://" + endpoint;
}
}
DeleteLexiconOutcome PollyClient::DeleteLexicon(const DeleteLexiconRequest& request) const
{
if (!request.NameHasBeenSet())
{
AWS_LOGSTREAM_ERROR("DeleteLexicon", "Required field: Name, is not set");
return DeleteLexiconOutcome(Aws::Client::AWSError<PollyErrors>(PollyErrors::MISSING_PARAMETER, "MISSING_PARAMETER", "Missing required field [Name]", false));
}
Aws::Http::URI uri = m_uri;
Aws::StringStream ss;
ss << "/v1/lexicons/";
ss << request.GetName();
uri.SetPath(uri.GetPath() + ss.str());
return DeleteLexiconOutcome(MakeRequest(uri, request, Aws::Http::HttpMethod::HTTP_DELETE, Aws::Auth::SIGV4_SIGNER));
}
DeleteLexiconOutcomeCallable PollyClient::DeleteLexiconCallable(const DeleteLexiconRequest& request) const
{
auto task = Aws::MakeShared< std::packaged_task< DeleteLexiconOutcome() > >(ALLOCATION_TAG, [this, request](){ return this->DeleteLexicon(request); } );
auto packagedFunction = [task]() { (*task)(); };
m_executor->Submit(packagedFunction);
return task->get_future();
}
void PollyClient::DeleteLexiconAsync(const DeleteLexiconRequest& request, const DeleteLexiconResponseReceivedHandler& handler, const std::shared_ptr<const Aws::Client::AsyncCallerContext>& context) const
{
m_executor->Submit( [this, request, handler, context](){ this->DeleteLexiconAsyncHelper( request, handler, context ); } );
}
void PollyClient::DeleteLexiconAsyncHelper(const DeleteLexiconRequest& request, const DeleteLexiconResponseReceivedHandler& handler, const std::shared_ptr<const Aws::Client::AsyncCallerContext>& context) const
{
handler(this, request, DeleteLexicon(request), context);
}
DescribeVoicesOutcome PollyClient::DescribeVoices(const DescribeVoicesRequest& request) const
{
Aws::Http::URI uri = m_uri;
Aws::StringStream ss;
ss << "/v1/voices";
uri.SetPath(uri.GetPath() + ss.str());
return DescribeVoicesOutcome(MakeRequest(uri, request, Aws::Http::HttpMethod::HTTP_GET, Aws::Auth::SIGV4_SIGNER));
}
DescribeVoicesOutcomeCallable PollyClient::DescribeVoicesCallable(const DescribeVoicesRequest& request) const
{
auto task = Aws::MakeShared< std::packaged_task< DescribeVoicesOutcome() > >(ALLOCATION_TAG, [this, request](){ return this->DescribeVoices(request); } );
auto packagedFunction = [task]() { (*task)(); };
m_executor->Submit(packagedFunction);
return task->get_future();
}
void PollyClient::DescribeVoicesAsync(const DescribeVoicesRequest& request, const DescribeVoicesResponseReceivedHandler& handler, const std::shared_ptr<const Aws::Client::AsyncCallerContext>& context) const
{
m_executor->Submit( [this, request, handler, context](){ this->DescribeVoicesAsyncHelper( request, handler, context ); } );
}
void PollyClient::DescribeVoicesAsyncHelper(const DescribeVoicesRequest& request, const DescribeVoicesResponseReceivedHandler& handler, const std::shared_ptr<const Aws::Client::AsyncCallerContext>& context) const
{
handler(this, request, DescribeVoices(request), context);
}
GetLexiconOutcome PollyClient::GetLexicon(const GetLexiconRequest& request) const
{
if (!request.NameHasBeenSet())
{
AWS_LOGSTREAM_ERROR("GetLexicon", "Required field: Name, is not set");
return GetLexiconOutcome(Aws::Client::AWSError<PollyErrors>(PollyErrors::MISSING_PARAMETER, "MISSING_PARAMETER", "Missing required field [Name]", false));
}
Aws::Http::URI uri = m_uri;
Aws::StringStream ss;
ss << "/v1/lexicons/";
ss << request.GetName();
uri.SetPath(uri.GetPath() + ss.str());
return GetLexiconOutcome(MakeRequest(uri, request, Aws::Http::HttpMethod::HTTP_GET, Aws::Auth::SIGV4_SIGNER));
}
GetLexiconOutcomeCallable PollyClient::GetLexiconCallable(const GetLexiconRequest& request) const
{
auto task = Aws::MakeShared< std::packaged_task< GetLexiconOutcome() > >(ALLOCATION_TAG, [this, request](){ return this->GetLexicon(request); } );
auto packagedFunction = [task]() { (*task)(); };
m_executor->Submit(packagedFunction);
return task->get_future();
}
void PollyClient::GetLexiconAsync(const GetLexiconRequest& request, const GetLexiconResponseReceivedHandler& handler, const std::shared_ptr<const Aws::Client::AsyncCallerContext>& context) const
{
m_executor->Submit( [this, request, handler, context](){ this->GetLexiconAsyncHelper( request, handler, context ); } );
}
void PollyClient::GetLexiconAsyncHelper(const GetLexiconRequest& request, const GetLexiconResponseReceivedHandler& handler, const std::shared_ptr<const Aws::Client::AsyncCallerContext>& context) const
{
handler(this, request, GetLexicon(request), context);
}
GetSpeechSynthesisTaskOutcome PollyClient::GetSpeechSynthesisTask(const GetSpeechSynthesisTaskRequest& request) const
{
if (!request.TaskIdHasBeenSet())
{
AWS_LOGSTREAM_ERROR("GetSpeechSynthesisTask", "Required field: TaskId, is not set");
return GetSpeechSynthesisTaskOutcome(Aws::Client::AWSError<PollyErrors>(PollyErrors::MISSING_PARAMETER, "MISSING_PARAMETER", "Missing required field [TaskId]", false));
}
Aws::Http::URI uri = m_uri;
Aws::StringStream ss;
ss << "/v1/synthesisTasks/";
ss << request.GetTaskId();
uri.SetPath(uri.GetPath() + ss.str());
return GetSpeechSynthesisTaskOutcome(MakeRequest(uri, request, Aws::Http::HttpMethod::HTTP_GET, Aws::Auth::SIGV4_SIGNER));
}
GetSpeechSynthesisTaskOutcomeCallable PollyClient::GetSpeechSynthesisTaskCallable(const GetSpeechSynthesisTaskRequest& request) const
{
auto task = Aws::MakeShared< std::packaged_task< GetSpeechSynthesisTaskOutcome() > >(ALLOCATION_TAG, [this, request](){ return this->GetSpeechSynthesisTask(request); } );
auto packagedFunction = [task]() { (*task)(); };
m_executor->Submit(packagedFunction);
return task->get_future();
}
void PollyClient::GetSpeechSynthesisTaskAsync(const GetSpeechSynthesisTaskRequest& request, const GetSpeechSynthesisTaskResponseReceivedHandler& handler, const std::shared_ptr<const Aws::Client::AsyncCallerContext>& context) const
{
m_executor->Submit( [this, request, handler, context](){ this->GetSpeechSynthesisTaskAsyncHelper( request, handler, context ); } );
}
void PollyClient::GetSpeechSynthesisTaskAsyncHelper(const GetSpeechSynthesisTaskRequest& request, const GetSpeechSynthesisTaskResponseReceivedHandler& handler, const std::shared_ptr<const Aws::Client::AsyncCallerContext>& context) const
{
handler(this, request, GetSpeechSynthesisTask(request), context);
}
ListLexiconsOutcome PollyClient::ListLexicons(const ListLexiconsRequest& request) const
{
Aws::Http::URI uri = m_uri;
Aws::StringStream ss;
ss << "/v1/lexicons";
uri.SetPath(uri.GetPath() + ss.str());
return ListLexiconsOutcome(MakeRequest(uri, request, Aws::Http::HttpMethod::HTTP_GET, Aws::Auth::SIGV4_SIGNER));
}
ListLexiconsOutcomeCallable PollyClient::ListLexiconsCallable(const ListLexiconsRequest& request) const
{
auto task = Aws::MakeShared< std::packaged_task< ListLexiconsOutcome() > >(ALLOCATION_TAG, [this, request](){ return this->ListLexicons(request); } );
auto packagedFunction = [task]() { (*task)(); };
m_executor->Submit(packagedFunction);
return task->get_future();
}
void PollyClient::ListLexiconsAsync(const ListLexiconsRequest& request, const ListLexiconsResponseReceivedHandler& handler, const std::shared_ptr<const Aws::Client::AsyncCallerContext>& context) const
{
m_executor->Submit( [this, request, handler, context](){ this->ListLexiconsAsyncHelper( request, handler, context ); } );
}
void PollyClient::ListLexiconsAsyncHelper(const ListLexiconsRequest& request, const ListLexiconsResponseReceivedHandler& handler, const std::shared_ptr<const Aws::Client::AsyncCallerContext>& context) const
{
handler(this, request, ListLexicons(request), context);
}
ListSpeechSynthesisTasksOutcome PollyClient::ListSpeechSynthesisTasks(const ListSpeechSynthesisTasksRequest& request) const
{
Aws::Http::URI uri = m_uri;
Aws::StringStream ss;
ss << "/v1/synthesisTasks";
uri.SetPath(uri.GetPath() + ss.str());
return ListSpeechSynthesisTasksOutcome(MakeRequest(uri, request, Aws::Http::HttpMethod::HTTP_GET, Aws::Auth::SIGV4_SIGNER));
}
ListSpeechSynthesisTasksOutcomeCallable PollyClient::ListSpeechSynthesisTasksCallable(const ListSpeechSynthesisTasksRequest& request) const
{
auto task = Aws::MakeShared< std::packaged_task< ListSpeechSynthesisTasksOutcome() > >(ALLOCATION_TAG, [this, request](){ return this->ListSpeechSynthesisTasks(request); } );
auto packagedFunction = [task]() { (*task)(); };
m_executor->Submit(packagedFunction);
return task->get_future();
}
void PollyClient::ListSpeechSynthesisTasksAsync(const ListSpeechSynthesisTasksRequest& request, const ListSpeechSynthesisTasksResponseReceivedHandler& handler, const std::shared_ptr<const Aws::Client::AsyncCallerContext>& context) const
{
m_executor->Submit( [this, request, handler, context](){ this->ListSpeechSynthesisTasksAsyncHelper( request, handler, context ); } );
}
void PollyClient::ListSpeechSynthesisTasksAsyncHelper(const ListSpeechSynthesisTasksRequest& request, const ListSpeechSynthesisTasksResponseReceivedHandler& handler, const std::shared_ptr<const Aws::Client::AsyncCallerContext>& context) const
{
handler(this, request, ListSpeechSynthesisTasks(request), context);
}
PutLexiconOutcome PollyClient::PutLexicon(const PutLexiconRequest& request) const
{
if (!request.NameHasBeenSet())
{
AWS_LOGSTREAM_ERROR("PutLexicon", "Required field: Name, is not set");
return PutLexiconOutcome(Aws::Client::AWSError<PollyErrors>(PollyErrors::MISSING_PARAMETER, "MISSING_PARAMETER", "Missing required field [Name]", false));
}
Aws::Http::URI uri = m_uri;
Aws::StringStream ss;
ss << "/v1/lexicons/";
ss << request.GetName();
uri.SetPath(uri.GetPath() + ss.str());
return PutLexiconOutcome(MakeRequest(uri, request, Aws::Http::HttpMethod::HTTP_PUT, Aws::Auth::SIGV4_SIGNER));
}
PutLexiconOutcomeCallable PollyClient::PutLexiconCallable(const PutLexiconRequest& request) const
{
auto task = Aws::MakeShared< std::packaged_task< PutLexiconOutcome() > >(ALLOCATION_TAG, [this, request](){ return this->PutLexicon(request); } );
auto packagedFunction = [task]() { (*task)(); };
m_executor->Submit(packagedFunction);
return task->get_future();
}
void PollyClient::PutLexiconAsync(const PutLexiconRequest& request, const PutLexiconResponseReceivedHandler& handler, const std::shared_ptr<const Aws::Client::AsyncCallerContext>& context) const
{
m_executor->Submit( [this, request, handler, context](){ this->PutLexiconAsyncHelper( request, handler, context ); } );
}
void PollyClient::PutLexiconAsyncHelper(const PutLexiconRequest& request, const PutLexiconResponseReceivedHandler& handler, const std::shared_ptr<const Aws::Client::AsyncCallerContext>& context) const
{
handler(this, request, PutLexicon(request), context);
}
StartSpeechSynthesisTaskOutcome PollyClient::StartSpeechSynthesisTask(const StartSpeechSynthesisTaskRequest& request) const
{
Aws::Http::URI uri = m_uri;
Aws::StringStream ss;
ss << "/v1/synthesisTasks";
uri.SetPath(uri.GetPath() + ss.str());
return StartSpeechSynthesisTaskOutcome(MakeRequest(uri, request, Aws::Http::HttpMethod::HTTP_POST, Aws::Auth::SIGV4_SIGNER));
}
StartSpeechSynthesisTaskOutcomeCallable PollyClient::StartSpeechSynthesisTaskCallable(const StartSpeechSynthesisTaskRequest& request) const
{
auto task = Aws::MakeShared< std::packaged_task< StartSpeechSynthesisTaskOutcome() > >(ALLOCATION_TAG, [this, request](){ return this->StartSpeechSynthesisTask(request); } );
auto packagedFunction = [task]() { (*task)(); };
m_executor->Submit(packagedFunction);
return task->get_future();
}
void PollyClient::StartSpeechSynthesisTaskAsync(const StartSpeechSynthesisTaskRequest& request, const StartSpeechSynthesisTaskResponseReceivedHandler& handler, const std::shared_ptr<const Aws::Client::AsyncCallerContext>& context) const
{
m_executor->Submit( [this, request, handler, context](){ this->StartSpeechSynthesisTaskAsyncHelper( request, handler, context ); } );
}
void PollyClient::StartSpeechSynthesisTaskAsyncHelper(const StartSpeechSynthesisTaskRequest& request, const StartSpeechSynthesisTaskResponseReceivedHandler& handler, const std::shared_ptr<const Aws::Client::AsyncCallerContext>& context) const
{
handler(this, request, StartSpeechSynthesisTask(request), context);
}
SynthesizeSpeechOutcome PollyClient::SynthesizeSpeech(const SynthesizeSpeechRequest& request) const
{
Aws::Http::URI uri = m_uri;
Aws::StringStream ss;
ss << "/v1/speech";
uri.SetPath(uri.GetPath() + ss.str());
return SynthesizeSpeechOutcome(MakeRequestWithUnparsedResponse(uri, request, Aws::Http::HttpMethod::HTTP_POST));
}
SynthesizeSpeechOutcomeCallable PollyClient::SynthesizeSpeechCallable(const SynthesizeSpeechRequest& request) const
{
auto task = Aws::MakeShared< std::packaged_task< SynthesizeSpeechOutcome() > >(ALLOCATION_TAG, [this, request](){ return this->SynthesizeSpeech(request); } );
auto packagedFunction = [task]() { (*task)(); };
m_executor->Submit(packagedFunction);
return task->get_future();
}
void PollyClient::SynthesizeSpeechAsync(const SynthesizeSpeechRequest& request, const SynthesizeSpeechResponseReceivedHandler& handler, const std::shared_ptr<const Aws::Client::AsyncCallerContext>& context) const
{
m_executor->Submit( [this, request, handler, context](){ this->SynthesizeSpeechAsyncHelper( request, handler, context ); } );
}
void PollyClient::SynthesizeSpeechAsyncHelper(const SynthesizeSpeechRequest& request, const SynthesizeSpeechResponseReceivedHandler& handler, const std::shared_ptr<const Aws::Client::AsyncCallerContext>& context) const
{
handler(this, request, SynthesizeSpeech(request), context);
}

View File

@@ -0,0 +1,64 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/polly/PollyEndpoint.h>
#include <aws/core/utils/memory/stl/AWSStringStream.h>
#include <aws/core/utils/HashingUtils.h>
using namespace Aws;
using namespace Aws::Polly;
namespace Aws
{
namespace Polly
{
namespace PollyEndpoint
{
static const int CN_NORTH_1_HASH = Aws::Utils::HashingUtils::HashString("cn-north-1");
static const int CN_NORTHWEST_1_HASH = Aws::Utils::HashingUtils::HashString("cn-northwest-1");
static const int US_ISO_EAST_1_HASH = Aws::Utils::HashingUtils::HashString("us-iso-east-1");
static const int US_ISOB_EAST_1_HASH = Aws::Utils::HashingUtils::HashString("us-isob-east-1");
Aws::String ForRegion(const Aws::String& regionName, bool useDualStack)
{
// Fallback to us-east-1 if global endpoint does not exists.
Aws::String region = regionName == Aws::Region::AWS_GLOBAL ? Aws::Region::US_EAST_1 : regionName;
auto hash = Aws::Utils::HashingUtils::HashString(region.c_str());
Aws::StringStream ss;
ss << "polly" << ".";
if(useDualStack)
{
ss << "dualstack.";
}
ss << region;
if (hash == CN_NORTH_1_HASH || hash == CN_NORTHWEST_1_HASH)
{
ss << ".amazonaws.com.cn";
}
else if (hash == US_ISO_EAST_1_HASH)
{
ss << ".c2s.ic.gov";
}
else if (hash == US_ISOB_EAST_1_HASH)
{
ss << ".sc2s.sgov.gov";
}
else
{
ss << ".amazonaws.com";
}
return ss.str();
}
} // namespace PollyEndpoint
} // namespace Polly
} // namespace Aws

View File

@@ -0,0 +1,22 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/core/client/AWSError.h>
#include <aws/polly/PollyErrorMarshaller.h>
#include <aws/polly/PollyErrors.h>
using namespace Aws::Client;
using namespace Aws::Polly;
AWSError<CoreErrors> PollyErrorMarshaller::FindErrorByName(const char* errorName) const
{
AWSError<CoreErrors> error = PollyErrorMapper::GetErrorForName(errorName);
if(error.GetErrorType() != CoreErrors::UNKNOWN)
{
return error;
}
return AWSErrorMarshaller::FindErrorByName(errorName);
}

View File

@@ -0,0 +1,137 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/core/client/AWSError.h>
#include <aws/core/utils/HashingUtils.h>
#include <aws/polly/PollyErrors.h>
using namespace Aws::Client;
using namespace Aws::Utils;
using namespace Aws::Polly;
namespace Aws
{
namespace Polly
{
namespace PollyErrorMapper
{
static const int SSML_MARKS_NOT_SUPPORTED_FOR_TEXT_TYPE_HASH = HashingUtils::HashString("SsmlMarksNotSupportedForTextTypeException");
static const int LEXICON_NOT_FOUND_HASH = HashingUtils::HashString("LexiconNotFoundException");
static const int INVALID_SNS_TOPIC_ARN_HASH = HashingUtils::HashString("InvalidSnsTopicArnException");
static const int MARKS_NOT_SUPPORTED_FOR_FORMAT_HASH = HashingUtils::HashString("MarksNotSupportedForFormatException");
static const int TEXT_LENGTH_EXCEEDED_HASH = HashingUtils::HashString("TextLengthExceededException");
static const int ENGINE_NOT_SUPPORTED_HASH = HashingUtils::HashString("EngineNotSupportedException");
static const int UNSUPPORTED_PLS_LANGUAGE_HASH = HashingUtils::HashString("UnsupportedPlsLanguageException");
static const int UNSUPPORTED_PLS_ALPHABET_HASH = HashingUtils::HashString("UnsupportedPlsAlphabetException");
static const int LANGUAGE_NOT_SUPPORTED_HASH = HashingUtils::HashString("LanguageNotSupportedException");
static const int MAX_LEXICONS_NUMBER_EXCEEDED_HASH = HashingUtils::HashString("MaxLexiconsNumberExceededException");
static const int INVALID_NEXT_TOKEN_HASH = HashingUtils::HashString("InvalidNextTokenException");
static const int INVALID_S3_KEY_HASH = HashingUtils::HashString("InvalidS3KeyException");
static const int INVALID_TASK_ID_HASH = HashingUtils::HashString("InvalidTaskIdException");
static const int SERVICE_FAILURE_HASH = HashingUtils::HashString("ServiceFailureException");
static const int SYNTHESIS_TASK_NOT_FOUND_HASH = HashingUtils::HashString("SynthesisTaskNotFoundException");
static const int INVALID_SAMPLE_RATE_HASH = HashingUtils::HashString("InvalidSampleRateException");
static const int INVALID_LEXICON_HASH = HashingUtils::HashString("InvalidLexiconException");
static const int INVALID_S3_BUCKET_HASH = HashingUtils::HashString("InvalidS3BucketException");
static const int LEXICON_SIZE_EXCEEDED_HASH = HashingUtils::HashString("LexiconSizeExceededException");
static const int MAX_LEXEME_LENGTH_EXCEEDED_HASH = HashingUtils::HashString("MaxLexemeLengthExceededException");
static const int INVALID_SSML_HASH = HashingUtils::HashString("InvalidSsmlException");
AWSError<CoreErrors> GetErrorForName(const char* errorName)
{
int hashCode = HashingUtils::HashString(errorName);
if (hashCode == SSML_MARKS_NOT_SUPPORTED_FOR_TEXT_TYPE_HASH)
{
return AWSError<CoreErrors>(static_cast<CoreErrors>(PollyErrors::SSML_MARKS_NOT_SUPPORTED_FOR_TEXT_TYPE), false);
}
else if (hashCode == LEXICON_NOT_FOUND_HASH)
{
return AWSError<CoreErrors>(static_cast<CoreErrors>(PollyErrors::LEXICON_NOT_FOUND), false);
}
else if (hashCode == INVALID_SNS_TOPIC_ARN_HASH)
{
return AWSError<CoreErrors>(static_cast<CoreErrors>(PollyErrors::INVALID_SNS_TOPIC_ARN), false);
}
else if (hashCode == MARKS_NOT_SUPPORTED_FOR_FORMAT_HASH)
{
return AWSError<CoreErrors>(static_cast<CoreErrors>(PollyErrors::MARKS_NOT_SUPPORTED_FOR_FORMAT), false);
}
else if (hashCode == TEXT_LENGTH_EXCEEDED_HASH)
{
return AWSError<CoreErrors>(static_cast<CoreErrors>(PollyErrors::TEXT_LENGTH_EXCEEDED), false);
}
else if (hashCode == ENGINE_NOT_SUPPORTED_HASH)
{
return AWSError<CoreErrors>(static_cast<CoreErrors>(PollyErrors::ENGINE_NOT_SUPPORTED), false);
}
else if (hashCode == UNSUPPORTED_PLS_LANGUAGE_HASH)
{
return AWSError<CoreErrors>(static_cast<CoreErrors>(PollyErrors::UNSUPPORTED_PLS_LANGUAGE), false);
}
else if (hashCode == UNSUPPORTED_PLS_ALPHABET_HASH)
{
return AWSError<CoreErrors>(static_cast<CoreErrors>(PollyErrors::UNSUPPORTED_PLS_ALPHABET), false);
}
else if (hashCode == LANGUAGE_NOT_SUPPORTED_HASH)
{
return AWSError<CoreErrors>(static_cast<CoreErrors>(PollyErrors::LANGUAGE_NOT_SUPPORTED), false);
}
else if (hashCode == MAX_LEXICONS_NUMBER_EXCEEDED_HASH)
{
return AWSError<CoreErrors>(static_cast<CoreErrors>(PollyErrors::MAX_LEXICONS_NUMBER_EXCEEDED), false);
}
else if (hashCode == INVALID_NEXT_TOKEN_HASH)
{
return AWSError<CoreErrors>(static_cast<CoreErrors>(PollyErrors::INVALID_NEXT_TOKEN), false);
}
else if (hashCode == INVALID_S3_KEY_HASH)
{
return AWSError<CoreErrors>(static_cast<CoreErrors>(PollyErrors::INVALID_S3_KEY), false);
}
else if (hashCode == INVALID_TASK_ID_HASH)
{
return AWSError<CoreErrors>(static_cast<CoreErrors>(PollyErrors::INVALID_TASK_ID), false);
}
else if (hashCode == SERVICE_FAILURE_HASH)
{
return AWSError<CoreErrors>(static_cast<CoreErrors>(PollyErrors::SERVICE_FAILURE), false);
}
else if (hashCode == SYNTHESIS_TASK_NOT_FOUND_HASH)
{
return AWSError<CoreErrors>(static_cast<CoreErrors>(PollyErrors::SYNTHESIS_TASK_NOT_FOUND), false);
}
else if (hashCode == INVALID_SAMPLE_RATE_HASH)
{
return AWSError<CoreErrors>(static_cast<CoreErrors>(PollyErrors::INVALID_SAMPLE_RATE), false);
}
else if (hashCode == INVALID_LEXICON_HASH)
{
return AWSError<CoreErrors>(static_cast<CoreErrors>(PollyErrors::INVALID_LEXICON), false);
}
else if (hashCode == INVALID_S3_BUCKET_HASH)
{
return AWSError<CoreErrors>(static_cast<CoreErrors>(PollyErrors::INVALID_S3_BUCKET), false);
}
else if (hashCode == LEXICON_SIZE_EXCEEDED_HASH)
{
return AWSError<CoreErrors>(static_cast<CoreErrors>(PollyErrors::LEXICON_SIZE_EXCEEDED), false);
}
else if (hashCode == MAX_LEXEME_LENGTH_EXCEEDED_HASH)
{
return AWSError<CoreErrors>(static_cast<CoreErrors>(PollyErrors::MAX_LEXEME_LENGTH_EXCEEDED), false);
}
else if (hashCode == INVALID_SSML_HASH)
{
return AWSError<CoreErrors>(static_cast<CoreErrors>(PollyErrors::INVALID_SSML), false);
}
return AWSError<CoreErrors>(CoreErrors::UNKNOWN, false);
}
} // namespace PollyErrorMapper
} // namespace Polly
} // namespace Aws

View File

@@ -0,0 +1,27 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/polly/model/DeleteLexiconRequest.h>
#include <aws/core/utils/json/JsonSerializer.h>
#include <utility>
using namespace Aws::Polly::Model;
using namespace Aws::Utils::Json;
using namespace Aws::Utils;
DeleteLexiconRequest::DeleteLexiconRequest() :
m_nameHasBeenSet(false)
{
}
Aws::String DeleteLexiconRequest::SerializePayload() const
{
return {};
}

View File

@@ -0,0 +1,34 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/polly/model/DeleteLexiconResult.h>
#include <aws/core/utils/json/JsonSerializer.h>
#include <aws/core/AmazonWebServiceResult.h>
#include <aws/core/utils/StringUtils.h>
#include <aws/core/utils/UnreferencedParam.h>
#include <utility>
using namespace Aws::Polly::Model;
using namespace Aws::Utils::Json;
using namespace Aws::Utils;
using namespace Aws;
DeleteLexiconResult::DeleteLexiconResult()
{
}
DeleteLexiconResult::DeleteLexiconResult(const Aws::AmazonWebServiceResult<JsonValue>& result)
{
*this = result;
}
DeleteLexiconResult& DeleteLexiconResult::operator =(const Aws::AmazonWebServiceResult<JsonValue>& result)
{
AWS_UNREFERENCED_PARAM(result);
return *this;
}

View File

@@ -0,0 +1,68 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/polly/model/DescribeVoicesRequest.h>
#include <aws/core/utils/json/JsonSerializer.h>
#include <aws/core/http/URI.h>
#include <aws/core/utils/memory/stl/AWSStringStream.h>
#include <utility>
using namespace Aws::Polly::Model;
using namespace Aws::Utils::Json;
using namespace Aws::Utils;
using namespace Aws::Http;
DescribeVoicesRequest::DescribeVoicesRequest() :
m_engine(Engine::NOT_SET),
m_engineHasBeenSet(false),
m_languageCode(LanguageCode::NOT_SET),
m_languageCodeHasBeenSet(false),
m_includeAdditionalLanguageCodes(false),
m_includeAdditionalLanguageCodesHasBeenSet(false),
m_nextTokenHasBeenSet(false)
{
}
Aws::String DescribeVoicesRequest::SerializePayload() const
{
return {};
}
void DescribeVoicesRequest::AddQueryStringParameters(URI& uri) const
{
Aws::StringStream ss;
if(m_engineHasBeenSet)
{
ss << EngineMapper::GetNameForEngine(m_engine);
uri.AddQueryStringParameter("Engine", ss.str());
ss.str("");
}
if(m_languageCodeHasBeenSet)
{
ss << LanguageCodeMapper::GetNameForLanguageCode(m_languageCode);
uri.AddQueryStringParameter("LanguageCode", ss.str());
ss.str("");
}
if(m_includeAdditionalLanguageCodesHasBeenSet)
{
ss << m_includeAdditionalLanguageCodes;
uri.AddQueryStringParameter("IncludeAdditionalLanguageCodes", ss.str());
ss.str("");
}
if(m_nextTokenHasBeenSet)
{
ss << m_nextToken;
uri.AddQueryStringParameter("NextToken", ss.str());
ss.str("");
}
}

View File

@@ -0,0 +1,49 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/polly/model/DescribeVoicesResult.h>
#include <aws/core/utils/json/JsonSerializer.h>
#include <aws/core/AmazonWebServiceResult.h>
#include <aws/core/utils/StringUtils.h>
#include <aws/core/utils/UnreferencedParam.h>
#include <utility>
using namespace Aws::Polly::Model;
using namespace Aws::Utils::Json;
using namespace Aws::Utils;
using namespace Aws;
DescribeVoicesResult::DescribeVoicesResult()
{
}
DescribeVoicesResult::DescribeVoicesResult(const Aws::AmazonWebServiceResult<JsonValue>& result)
{
*this = result;
}
DescribeVoicesResult& DescribeVoicesResult::operator =(const Aws::AmazonWebServiceResult<JsonValue>& result)
{
JsonView jsonValue = result.GetPayload().View();
if(jsonValue.ValueExists("Voices"))
{
Array<JsonView> voicesJsonList = jsonValue.GetArray("Voices");
for(unsigned voicesIndex = 0; voicesIndex < voicesJsonList.GetLength(); ++voicesIndex)
{
m_voices.push_back(voicesJsonList[voicesIndex].AsObject());
}
}
if(jsonValue.ValueExists("NextToken"))
{
m_nextToken = jsonValue.GetString("NextToken");
}
return *this;
}

View File

@@ -0,0 +1,70 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/polly/model/Engine.h>
#include <aws/core/utils/HashingUtils.h>
#include <aws/core/Globals.h>
#include <aws/core/utils/EnumParseOverflowContainer.h>
using namespace Aws::Utils;
namespace Aws
{
namespace Polly
{
namespace Model
{
namespace EngineMapper
{
static const int standard_HASH = HashingUtils::HashString("standard");
static const int neural_HASH = HashingUtils::HashString("neural");
Engine GetEngineForName(const Aws::String& name)
{
int hashCode = HashingUtils::HashString(name.c_str());
if (hashCode == standard_HASH)
{
return Engine::standard;
}
else if (hashCode == neural_HASH)
{
return Engine::neural;
}
EnumParseOverflowContainer* overflowContainer = Aws::GetEnumOverflowContainer();
if(overflowContainer)
{
overflowContainer->StoreOverflow(hashCode, name);
return static_cast<Engine>(hashCode);
}
return Engine::NOT_SET;
}
Aws::String GetNameForEngine(Engine enumValue)
{
switch(enumValue)
{
case Engine::standard:
return "standard";
case Engine::neural:
return "neural";
default:
EnumParseOverflowContainer* overflowContainer = Aws::GetEnumOverflowContainer();
if(overflowContainer)
{
return overflowContainer->RetrieveOverflow(static_cast<int>(enumValue));
}
return {};
}
}
} // namespace EngineMapper
} // namespace Model
} // namespace Polly
} // namespace Aws

View File

@@ -0,0 +1,70 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/polly/model/Gender.h>
#include <aws/core/utils/HashingUtils.h>
#include <aws/core/Globals.h>
#include <aws/core/utils/EnumParseOverflowContainer.h>
using namespace Aws::Utils;
namespace Aws
{
namespace Polly
{
namespace Model
{
namespace GenderMapper
{
static const int Female_HASH = HashingUtils::HashString("Female");
static const int Male_HASH = HashingUtils::HashString("Male");
Gender GetGenderForName(const Aws::String& name)
{
int hashCode = HashingUtils::HashString(name.c_str());
if (hashCode == Female_HASH)
{
return Gender::Female;
}
else if (hashCode == Male_HASH)
{
return Gender::Male;
}
EnumParseOverflowContainer* overflowContainer = Aws::GetEnumOverflowContainer();
if(overflowContainer)
{
overflowContainer->StoreOverflow(hashCode, name);
return static_cast<Gender>(hashCode);
}
return Gender::NOT_SET;
}
Aws::String GetNameForGender(Gender enumValue)
{
switch(enumValue)
{
case Gender::Female:
return "Female";
case Gender::Male:
return "Male";
default:
EnumParseOverflowContainer* overflowContainer = Aws::GetEnumOverflowContainer();
if(overflowContainer)
{
return overflowContainer->RetrieveOverflow(static_cast<int>(enumValue));
}
return {};
}
}
} // namespace GenderMapper
} // namespace Model
} // namespace Polly
} // namespace Aws

View File

@@ -0,0 +1,27 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/polly/model/GetLexiconRequest.h>
#include <aws/core/utils/json/JsonSerializer.h>
#include <utility>
using namespace Aws::Polly::Model;
using namespace Aws::Utils::Json;
using namespace Aws::Utils;
GetLexiconRequest::GetLexiconRequest() :
m_nameHasBeenSet(false)
{
}
Aws::String GetLexiconRequest::SerializePayload() const
{
return {};
}

View File

@@ -0,0 +1,46 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/polly/model/GetLexiconResult.h>
#include <aws/core/utils/json/JsonSerializer.h>
#include <aws/core/AmazonWebServiceResult.h>
#include <aws/core/utils/StringUtils.h>
#include <aws/core/utils/UnreferencedParam.h>
#include <utility>
using namespace Aws::Polly::Model;
using namespace Aws::Utils::Json;
using namespace Aws::Utils;
using namespace Aws;
GetLexiconResult::GetLexiconResult()
{
}
GetLexiconResult::GetLexiconResult(const Aws::AmazonWebServiceResult<JsonValue>& result)
{
*this = result;
}
GetLexiconResult& GetLexiconResult::operator =(const Aws::AmazonWebServiceResult<JsonValue>& result)
{
JsonView jsonValue = result.GetPayload().View();
if(jsonValue.ValueExists("Lexicon"))
{
m_lexicon = jsonValue.GetObject("Lexicon");
}
if(jsonValue.ValueExists("LexiconAttributes"))
{
m_lexiconAttributes = jsonValue.GetObject("LexiconAttributes");
}
return *this;
}

View File

@@ -0,0 +1,27 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/polly/model/GetSpeechSynthesisTaskRequest.h>
#include <aws/core/utils/json/JsonSerializer.h>
#include <utility>
using namespace Aws::Polly::Model;
using namespace Aws::Utils::Json;
using namespace Aws::Utils;
GetSpeechSynthesisTaskRequest::GetSpeechSynthesisTaskRequest() :
m_taskIdHasBeenSet(false)
{
}
Aws::String GetSpeechSynthesisTaskRequest::SerializePayload() const
{
return {};
}

View File

@@ -0,0 +1,40 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/polly/model/GetSpeechSynthesisTaskResult.h>
#include <aws/core/utils/json/JsonSerializer.h>
#include <aws/core/AmazonWebServiceResult.h>
#include <aws/core/utils/StringUtils.h>
#include <aws/core/utils/UnreferencedParam.h>
#include <utility>
using namespace Aws::Polly::Model;
using namespace Aws::Utils::Json;
using namespace Aws::Utils;
using namespace Aws;
GetSpeechSynthesisTaskResult::GetSpeechSynthesisTaskResult()
{
}
GetSpeechSynthesisTaskResult::GetSpeechSynthesisTaskResult(const Aws::AmazonWebServiceResult<JsonValue>& result)
{
*this = result;
}
GetSpeechSynthesisTaskResult& GetSpeechSynthesisTaskResult::operator =(const Aws::AmazonWebServiceResult<JsonValue>& result)
{
JsonView jsonValue = result.GetPayload().View();
if(jsonValue.ValueExists("SynthesisTask"))
{
m_synthesisTask = jsonValue.GetObject("SynthesisTask");
}
return *this;
}

View File

@@ -0,0 +1,259 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/polly/model/LanguageCode.h>
#include <aws/core/utils/HashingUtils.h>
#include <aws/core/Globals.h>
#include <aws/core/utils/EnumParseOverflowContainer.h>
using namespace Aws::Utils;
namespace Aws
{
namespace Polly
{
namespace Model
{
namespace LanguageCodeMapper
{
static const int arb_HASH = HashingUtils::HashString("arb");
static const int cmn_CN_HASH = HashingUtils::HashString("cmn-CN");
static const int cy_GB_HASH = HashingUtils::HashString("cy-GB");
static const int da_DK_HASH = HashingUtils::HashString("da-DK");
static const int de_DE_HASH = HashingUtils::HashString("de-DE");
static const int en_AU_HASH = HashingUtils::HashString("en-AU");
static const int en_GB_HASH = HashingUtils::HashString("en-GB");
static const int en_GB_WLS_HASH = HashingUtils::HashString("en-GB-WLS");
static const int en_IN_HASH = HashingUtils::HashString("en-IN");
static const int en_US_HASH = HashingUtils::HashString("en-US");
static const int es_ES_HASH = HashingUtils::HashString("es-ES");
static const int es_MX_HASH = HashingUtils::HashString("es-MX");
static const int es_US_HASH = HashingUtils::HashString("es-US");
static const int fr_CA_HASH = HashingUtils::HashString("fr-CA");
static const int fr_FR_HASH = HashingUtils::HashString("fr-FR");
static const int is_IS_HASH = HashingUtils::HashString("is-IS");
static const int it_IT_HASH = HashingUtils::HashString("it-IT");
static const int ja_JP_HASH = HashingUtils::HashString("ja-JP");
static const int hi_IN_HASH = HashingUtils::HashString("hi-IN");
static const int ko_KR_HASH = HashingUtils::HashString("ko-KR");
static const int nb_NO_HASH = HashingUtils::HashString("nb-NO");
static const int nl_NL_HASH = HashingUtils::HashString("nl-NL");
static const int pl_PL_HASH = HashingUtils::HashString("pl-PL");
static const int pt_BR_HASH = HashingUtils::HashString("pt-BR");
static const int pt_PT_HASH = HashingUtils::HashString("pt-PT");
static const int ro_RO_HASH = HashingUtils::HashString("ro-RO");
static const int ru_RU_HASH = HashingUtils::HashString("ru-RU");
static const int sv_SE_HASH = HashingUtils::HashString("sv-SE");
static const int tr_TR_HASH = HashingUtils::HashString("tr-TR");
LanguageCode GetLanguageCodeForName(const Aws::String& name)
{
int hashCode = HashingUtils::HashString(name.c_str());
if (hashCode == arb_HASH)
{
return LanguageCode::arb;
}
else if (hashCode == cmn_CN_HASH)
{
return LanguageCode::cmn_CN;
}
else if (hashCode == cy_GB_HASH)
{
return LanguageCode::cy_GB;
}
else if (hashCode == da_DK_HASH)
{
return LanguageCode::da_DK;
}
else if (hashCode == de_DE_HASH)
{
return LanguageCode::de_DE;
}
else if (hashCode == en_AU_HASH)
{
return LanguageCode::en_AU;
}
else if (hashCode == en_GB_HASH)
{
return LanguageCode::en_GB;
}
else if (hashCode == en_GB_WLS_HASH)
{
return LanguageCode::en_GB_WLS;
}
else if (hashCode == en_IN_HASH)
{
return LanguageCode::en_IN;
}
else if (hashCode == en_US_HASH)
{
return LanguageCode::en_US;
}
else if (hashCode == es_ES_HASH)
{
return LanguageCode::es_ES;
}
else if (hashCode == es_MX_HASH)
{
return LanguageCode::es_MX;
}
else if (hashCode == es_US_HASH)
{
return LanguageCode::es_US;
}
else if (hashCode == fr_CA_HASH)
{
return LanguageCode::fr_CA;
}
else if (hashCode == fr_FR_HASH)
{
return LanguageCode::fr_FR;
}
else if (hashCode == is_IS_HASH)
{
return LanguageCode::is_IS;
}
else if (hashCode == it_IT_HASH)
{
return LanguageCode::it_IT;
}
else if (hashCode == ja_JP_HASH)
{
return LanguageCode::ja_JP;
}
else if (hashCode == hi_IN_HASH)
{
return LanguageCode::hi_IN;
}
else if (hashCode == ko_KR_HASH)
{
return LanguageCode::ko_KR;
}
else if (hashCode == nb_NO_HASH)
{
return LanguageCode::nb_NO;
}
else if (hashCode == nl_NL_HASH)
{
return LanguageCode::nl_NL;
}
else if (hashCode == pl_PL_HASH)
{
return LanguageCode::pl_PL;
}
else if (hashCode == pt_BR_HASH)
{
return LanguageCode::pt_BR;
}
else if (hashCode == pt_PT_HASH)
{
return LanguageCode::pt_PT;
}
else if (hashCode == ro_RO_HASH)
{
return LanguageCode::ro_RO;
}
else if (hashCode == ru_RU_HASH)
{
return LanguageCode::ru_RU;
}
else if (hashCode == sv_SE_HASH)
{
return LanguageCode::sv_SE;
}
else if (hashCode == tr_TR_HASH)
{
return LanguageCode::tr_TR;
}
EnumParseOverflowContainer* overflowContainer = Aws::GetEnumOverflowContainer();
if(overflowContainer)
{
overflowContainer->StoreOverflow(hashCode, name);
return static_cast<LanguageCode>(hashCode);
}
return LanguageCode::NOT_SET;
}
Aws::String GetNameForLanguageCode(LanguageCode enumValue)
{
switch(enumValue)
{
case LanguageCode::arb:
return "arb";
case LanguageCode::cmn_CN:
return "cmn-CN";
case LanguageCode::cy_GB:
return "cy-GB";
case LanguageCode::da_DK:
return "da-DK";
case LanguageCode::de_DE:
return "de-DE";
case LanguageCode::en_AU:
return "en-AU";
case LanguageCode::en_GB:
return "en-GB";
case LanguageCode::en_GB_WLS:
return "en-GB-WLS";
case LanguageCode::en_IN:
return "en-IN";
case LanguageCode::en_US:
return "en-US";
case LanguageCode::es_ES:
return "es-ES";
case LanguageCode::es_MX:
return "es-MX";
case LanguageCode::es_US:
return "es-US";
case LanguageCode::fr_CA:
return "fr-CA";
case LanguageCode::fr_FR:
return "fr-FR";
case LanguageCode::is_IS:
return "is-IS";
case LanguageCode::it_IT:
return "it-IT";
case LanguageCode::ja_JP:
return "ja-JP";
case LanguageCode::hi_IN:
return "hi-IN";
case LanguageCode::ko_KR:
return "ko-KR";
case LanguageCode::nb_NO:
return "nb-NO";
case LanguageCode::nl_NL:
return "nl-NL";
case LanguageCode::pl_PL:
return "pl-PL";
case LanguageCode::pt_BR:
return "pt-BR";
case LanguageCode::pt_PT:
return "pt-PT";
case LanguageCode::ro_RO:
return "ro-RO";
case LanguageCode::ru_RU:
return "ru-RU";
case LanguageCode::sv_SE:
return "sv-SE";
case LanguageCode::tr_TR:
return "tr-TR";
default:
EnumParseOverflowContainer* overflowContainer = Aws::GetEnumOverflowContainer();
if(overflowContainer)
{
return overflowContainer->RetrieveOverflow(static_cast<int>(enumValue));
}
return {};
}
}
} // namespace LanguageCodeMapper
} // namespace Model
} // namespace Polly
} // namespace Aws

View File

@@ -0,0 +1,74 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/polly/model/Lexicon.h>
#include <aws/core/utils/json/JsonSerializer.h>
#include <utility>
using namespace Aws::Utils::Json;
using namespace Aws::Utils;
namespace Aws
{
namespace Polly
{
namespace Model
{
Lexicon::Lexicon() :
m_contentHasBeenSet(false),
m_nameHasBeenSet(false)
{
}
Lexicon::Lexicon(JsonView jsonValue) :
m_contentHasBeenSet(false),
m_nameHasBeenSet(false)
{
*this = jsonValue;
}
Lexicon& Lexicon::operator =(JsonView jsonValue)
{
if(jsonValue.ValueExists("Content"))
{
m_content = jsonValue.GetString("Content");
m_contentHasBeenSet = true;
}
if(jsonValue.ValueExists("Name"))
{
m_name = jsonValue.GetString("Name");
m_nameHasBeenSet = true;
}
return *this;
}
JsonValue Lexicon::Jsonize() const
{
JsonValue payload;
if(m_contentHasBeenSet)
{
payload.WithString("Content", m_content);
}
if(m_nameHasBeenSet)
{
payload.WithString("Name", m_name);
}
return payload;
}
} // namespace Model
} // namespace Polly
} // namespace Aws

View File

@@ -0,0 +1,138 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/polly/model/LexiconAttributes.h>
#include <aws/core/utils/json/JsonSerializer.h>
#include <utility>
using namespace Aws::Utils::Json;
using namespace Aws::Utils;
namespace Aws
{
namespace Polly
{
namespace Model
{
LexiconAttributes::LexiconAttributes() :
m_alphabetHasBeenSet(false),
m_languageCode(LanguageCode::NOT_SET),
m_languageCodeHasBeenSet(false),
m_lastModifiedHasBeenSet(false),
m_lexiconArnHasBeenSet(false),
m_lexemesCount(0),
m_lexemesCountHasBeenSet(false),
m_size(0),
m_sizeHasBeenSet(false)
{
}
LexiconAttributes::LexiconAttributes(JsonView jsonValue) :
m_alphabetHasBeenSet(false),
m_languageCode(LanguageCode::NOT_SET),
m_languageCodeHasBeenSet(false),
m_lastModifiedHasBeenSet(false),
m_lexiconArnHasBeenSet(false),
m_lexemesCount(0),
m_lexemesCountHasBeenSet(false),
m_size(0),
m_sizeHasBeenSet(false)
{
*this = jsonValue;
}
LexiconAttributes& LexiconAttributes::operator =(JsonView jsonValue)
{
if(jsonValue.ValueExists("Alphabet"))
{
m_alphabet = jsonValue.GetString("Alphabet");
m_alphabetHasBeenSet = true;
}
if(jsonValue.ValueExists("LanguageCode"))
{
m_languageCode = LanguageCodeMapper::GetLanguageCodeForName(jsonValue.GetString("LanguageCode"));
m_languageCodeHasBeenSet = true;
}
if(jsonValue.ValueExists("LastModified"))
{
m_lastModified = jsonValue.GetDouble("LastModified");
m_lastModifiedHasBeenSet = true;
}
if(jsonValue.ValueExists("LexiconArn"))
{
m_lexiconArn = jsonValue.GetString("LexiconArn");
m_lexiconArnHasBeenSet = true;
}
if(jsonValue.ValueExists("LexemesCount"))
{
m_lexemesCount = jsonValue.GetInteger("LexemesCount");
m_lexemesCountHasBeenSet = true;
}
if(jsonValue.ValueExists("Size"))
{
m_size = jsonValue.GetInteger("Size");
m_sizeHasBeenSet = true;
}
return *this;
}
JsonValue LexiconAttributes::Jsonize() const
{
JsonValue payload;
if(m_alphabetHasBeenSet)
{
payload.WithString("Alphabet", m_alphabet);
}
if(m_languageCodeHasBeenSet)
{
payload.WithString("LanguageCode", LanguageCodeMapper::GetNameForLanguageCode(m_languageCode));
}
if(m_lastModifiedHasBeenSet)
{
payload.WithDouble("LastModified", m_lastModified.SecondsWithMSPrecision());
}
if(m_lexiconArnHasBeenSet)
{
payload.WithString("LexiconArn", m_lexiconArn);
}
if(m_lexemesCountHasBeenSet)
{
payload.WithInteger("LexemesCount", m_lexemesCount);
}
if(m_sizeHasBeenSet)
{
payload.WithInteger("Size", m_size);
}
return payload;
}
} // namespace Model
} // namespace Polly
} // namespace Aws

View File

@@ -0,0 +1,74 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/polly/model/LexiconDescription.h>
#include <aws/core/utils/json/JsonSerializer.h>
#include <utility>
using namespace Aws::Utils::Json;
using namespace Aws::Utils;
namespace Aws
{
namespace Polly
{
namespace Model
{
LexiconDescription::LexiconDescription() :
m_nameHasBeenSet(false),
m_attributesHasBeenSet(false)
{
}
LexiconDescription::LexiconDescription(JsonView jsonValue) :
m_nameHasBeenSet(false),
m_attributesHasBeenSet(false)
{
*this = jsonValue;
}
LexiconDescription& LexiconDescription::operator =(JsonView jsonValue)
{
if(jsonValue.ValueExists("Name"))
{
m_name = jsonValue.GetString("Name");
m_nameHasBeenSet = true;
}
if(jsonValue.ValueExists("Attributes"))
{
m_attributes = jsonValue.GetObject("Attributes");
m_attributesHasBeenSet = true;
}
return *this;
}
JsonValue LexiconDescription::Jsonize() const
{
JsonValue payload;
if(m_nameHasBeenSet)
{
payload.WithString("Name", m_name);
}
if(m_attributesHasBeenSet)
{
payload.WithObject("Attributes", m_attributes.Jsonize());
}
return payload;
}
} // namespace Model
} // namespace Polly
} // namespace Aws

View File

@@ -0,0 +1,41 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/polly/model/ListLexiconsRequest.h>
#include <aws/core/utils/json/JsonSerializer.h>
#include <aws/core/http/URI.h>
#include <aws/core/utils/memory/stl/AWSStringStream.h>
#include <utility>
using namespace Aws::Polly::Model;
using namespace Aws::Utils::Json;
using namespace Aws::Utils;
using namespace Aws::Http;
ListLexiconsRequest::ListLexiconsRequest() :
m_nextTokenHasBeenSet(false)
{
}
Aws::String ListLexiconsRequest::SerializePayload() const
{
return {};
}
void ListLexiconsRequest::AddQueryStringParameters(URI& uri) const
{
Aws::StringStream ss;
if(m_nextTokenHasBeenSet)
{
ss << m_nextToken;
uri.AddQueryStringParameter("NextToken", ss.str());
ss.str("");
}
}

View File

@@ -0,0 +1,49 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/polly/model/ListLexiconsResult.h>
#include <aws/core/utils/json/JsonSerializer.h>
#include <aws/core/AmazonWebServiceResult.h>
#include <aws/core/utils/StringUtils.h>
#include <aws/core/utils/UnreferencedParam.h>
#include <utility>
using namespace Aws::Polly::Model;
using namespace Aws::Utils::Json;
using namespace Aws::Utils;
using namespace Aws;
ListLexiconsResult::ListLexiconsResult()
{
}
ListLexiconsResult::ListLexiconsResult(const Aws::AmazonWebServiceResult<JsonValue>& result)
{
*this = result;
}
ListLexiconsResult& ListLexiconsResult::operator =(const Aws::AmazonWebServiceResult<JsonValue>& result)
{
JsonView jsonValue = result.GetPayload().View();
if(jsonValue.ValueExists("Lexicons"))
{
Array<JsonView> lexiconsJsonList = jsonValue.GetArray("Lexicons");
for(unsigned lexiconsIndex = 0; lexiconsIndex < lexiconsJsonList.GetLength(); ++lexiconsIndex)
{
m_lexicons.push_back(lexiconsJsonList[lexiconsIndex].AsObject());
}
}
if(jsonValue.ValueExists("NextToken"))
{
m_nextToken = jsonValue.GetString("NextToken");
}
return *this;
}

View File

@@ -0,0 +1,59 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/polly/model/ListSpeechSynthesisTasksRequest.h>
#include <aws/core/utils/json/JsonSerializer.h>
#include <aws/core/http/URI.h>
#include <aws/core/utils/memory/stl/AWSStringStream.h>
#include <utility>
using namespace Aws::Polly::Model;
using namespace Aws::Utils::Json;
using namespace Aws::Utils;
using namespace Aws::Http;
ListSpeechSynthesisTasksRequest::ListSpeechSynthesisTasksRequest() :
m_maxResults(0),
m_maxResultsHasBeenSet(false),
m_nextTokenHasBeenSet(false),
m_status(TaskStatus::NOT_SET),
m_statusHasBeenSet(false)
{
}
Aws::String ListSpeechSynthesisTasksRequest::SerializePayload() const
{
return {};
}
void ListSpeechSynthesisTasksRequest::AddQueryStringParameters(URI& uri) const
{
Aws::StringStream ss;
if(m_maxResultsHasBeenSet)
{
ss << m_maxResults;
uri.AddQueryStringParameter("MaxResults", ss.str());
ss.str("");
}
if(m_nextTokenHasBeenSet)
{
ss << m_nextToken;
uri.AddQueryStringParameter("NextToken", ss.str());
ss.str("");
}
if(m_statusHasBeenSet)
{
ss << TaskStatusMapper::GetNameForTaskStatus(m_status);
uri.AddQueryStringParameter("Status", ss.str());
ss.str("");
}
}

View File

@@ -0,0 +1,49 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/polly/model/ListSpeechSynthesisTasksResult.h>
#include <aws/core/utils/json/JsonSerializer.h>
#include <aws/core/AmazonWebServiceResult.h>
#include <aws/core/utils/StringUtils.h>
#include <aws/core/utils/UnreferencedParam.h>
#include <utility>
using namespace Aws::Polly::Model;
using namespace Aws::Utils::Json;
using namespace Aws::Utils;
using namespace Aws;
ListSpeechSynthesisTasksResult::ListSpeechSynthesisTasksResult()
{
}
ListSpeechSynthesisTasksResult::ListSpeechSynthesisTasksResult(const Aws::AmazonWebServiceResult<JsonValue>& result)
{
*this = result;
}
ListSpeechSynthesisTasksResult& ListSpeechSynthesisTasksResult::operator =(const Aws::AmazonWebServiceResult<JsonValue>& result)
{
JsonView jsonValue = result.GetPayload().View();
if(jsonValue.ValueExists("NextToken"))
{
m_nextToken = jsonValue.GetString("NextToken");
}
if(jsonValue.ValueExists("SynthesisTasks"))
{
Array<JsonView> synthesisTasksJsonList = jsonValue.GetArray("SynthesisTasks");
for(unsigned synthesisTasksIndex = 0; synthesisTasksIndex < synthesisTasksJsonList.GetLength(); ++synthesisTasksIndex)
{
m_synthesisTasks.push_back(synthesisTasksJsonList[synthesisTasksIndex].AsObject());
}
}
return *this;
}

View File

@@ -0,0 +1,84 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/polly/model/OutputFormat.h>
#include <aws/core/utils/HashingUtils.h>
#include <aws/core/Globals.h>
#include <aws/core/utils/EnumParseOverflowContainer.h>
using namespace Aws::Utils;
namespace Aws
{
namespace Polly
{
namespace Model
{
namespace OutputFormatMapper
{
static const int json_HASH = HashingUtils::HashString("json");
static const int mp3_HASH = HashingUtils::HashString("mp3");
static const int ogg_vorbis_HASH = HashingUtils::HashString("ogg_vorbis");
static const int pcm_HASH = HashingUtils::HashString("pcm");
OutputFormat GetOutputFormatForName(const Aws::String& name)
{
int hashCode = HashingUtils::HashString(name.c_str());
if (hashCode == json_HASH)
{
return OutputFormat::json;
}
else if (hashCode == mp3_HASH)
{
return OutputFormat::mp3;
}
else if (hashCode == ogg_vorbis_HASH)
{
return OutputFormat::ogg_vorbis;
}
else if (hashCode == pcm_HASH)
{
return OutputFormat::pcm;
}
EnumParseOverflowContainer* overflowContainer = Aws::GetEnumOverflowContainer();
if(overflowContainer)
{
overflowContainer->StoreOverflow(hashCode, name);
return static_cast<OutputFormat>(hashCode);
}
return OutputFormat::NOT_SET;
}
Aws::String GetNameForOutputFormat(OutputFormat enumValue)
{
switch(enumValue)
{
case OutputFormat::json:
return "json";
case OutputFormat::mp3:
return "mp3";
case OutputFormat::ogg_vorbis:
return "ogg_vorbis";
case OutputFormat::pcm:
return "pcm";
default:
EnumParseOverflowContainer* overflowContainer = Aws::GetEnumOverflowContainer();
if(overflowContainer)
{
return overflowContainer->RetrieveOverflow(static_cast<int>(enumValue));
}
return {};
}
}
} // namespace OutputFormatMapper
} // namespace Model
} // namespace Polly
} // namespace Aws

View File

@@ -0,0 +1,36 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/polly/model/PutLexiconRequest.h>
#include <aws/core/utils/json/JsonSerializer.h>
#include <utility>
using namespace Aws::Polly::Model;
using namespace Aws::Utils::Json;
using namespace Aws::Utils;
PutLexiconRequest::PutLexiconRequest() :
m_nameHasBeenSet(false),
m_contentHasBeenSet(false)
{
}
Aws::String PutLexiconRequest::SerializePayload() const
{
JsonValue payload;
if(m_contentHasBeenSet)
{
payload.WithString("Content", m_content);
}
return payload.View().WriteReadable();
}

View File

@@ -0,0 +1,34 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/polly/model/PutLexiconResult.h>
#include <aws/core/utils/json/JsonSerializer.h>
#include <aws/core/AmazonWebServiceResult.h>
#include <aws/core/utils/StringUtils.h>
#include <aws/core/utils/UnreferencedParam.h>
#include <utility>
using namespace Aws::Polly::Model;
using namespace Aws::Utils::Json;
using namespace Aws::Utils;
using namespace Aws;
PutLexiconResult::PutLexiconResult()
{
}
PutLexiconResult::PutLexiconResult(const Aws::AmazonWebServiceResult<JsonValue>& result)
{
*this = result;
}
PutLexiconResult& PutLexiconResult::operator =(const Aws::AmazonWebServiceResult<JsonValue>& result)
{
AWS_UNREFERENCED_PARAM(result);
return *this;
}

View File

@@ -0,0 +1,84 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/polly/model/SpeechMarkType.h>
#include <aws/core/utils/HashingUtils.h>
#include <aws/core/Globals.h>
#include <aws/core/utils/EnumParseOverflowContainer.h>
using namespace Aws::Utils;
namespace Aws
{
namespace Polly
{
namespace Model
{
namespace SpeechMarkTypeMapper
{
static const int sentence_HASH = HashingUtils::HashString("sentence");
static const int ssml_HASH = HashingUtils::HashString("ssml");
static const int viseme_HASH = HashingUtils::HashString("viseme");
static const int word_HASH = HashingUtils::HashString("word");
SpeechMarkType GetSpeechMarkTypeForName(const Aws::String& name)
{
int hashCode = HashingUtils::HashString(name.c_str());
if (hashCode == sentence_HASH)
{
return SpeechMarkType::sentence;
}
else if (hashCode == ssml_HASH)
{
return SpeechMarkType::ssml;
}
else if (hashCode == viseme_HASH)
{
return SpeechMarkType::viseme;
}
else if (hashCode == word_HASH)
{
return SpeechMarkType::word;
}
EnumParseOverflowContainer* overflowContainer = Aws::GetEnumOverflowContainer();
if(overflowContainer)
{
overflowContainer->StoreOverflow(hashCode, name);
return static_cast<SpeechMarkType>(hashCode);
}
return SpeechMarkType::NOT_SET;
}
Aws::String GetNameForSpeechMarkType(SpeechMarkType enumValue)
{
switch(enumValue)
{
case SpeechMarkType::sentence:
return "sentence";
case SpeechMarkType::ssml:
return "ssml";
case SpeechMarkType::viseme:
return "viseme";
case SpeechMarkType::word:
return "word";
default:
EnumParseOverflowContainer* overflowContainer = Aws::GetEnumOverflowContainer();
if(overflowContainer)
{
return overflowContainer->RetrieveOverflow(static_cast<int>(enumValue));
}
return {};
}
}
} // namespace SpeechMarkTypeMapper
} // namespace Model
} // namespace Polly
} // namespace Aws

View File

@@ -0,0 +1,122 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/polly/model/StartSpeechSynthesisTaskRequest.h>
#include <aws/core/utils/json/JsonSerializer.h>
#include <utility>
using namespace Aws::Polly::Model;
using namespace Aws::Utils::Json;
using namespace Aws::Utils;
StartSpeechSynthesisTaskRequest::StartSpeechSynthesisTaskRequest() :
m_engine(Engine::NOT_SET),
m_engineHasBeenSet(false),
m_languageCode(LanguageCode::NOT_SET),
m_languageCodeHasBeenSet(false),
m_lexiconNamesHasBeenSet(false),
m_outputFormat(OutputFormat::NOT_SET),
m_outputFormatHasBeenSet(false),
m_outputS3BucketNameHasBeenSet(false),
m_outputS3KeyPrefixHasBeenSet(false),
m_sampleRateHasBeenSet(false),
m_snsTopicArnHasBeenSet(false),
m_speechMarkTypesHasBeenSet(false),
m_textHasBeenSet(false),
m_textType(TextType::NOT_SET),
m_textTypeHasBeenSet(false),
m_voiceId(VoiceId::NOT_SET),
m_voiceIdHasBeenSet(false)
{
}
Aws::String StartSpeechSynthesisTaskRequest::SerializePayload() const
{
JsonValue payload;
if(m_engineHasBeenSet)
{
payload.WithString("Engine", EngineMapper::GetNameForEngine(m_engine));
}
if(m_languageCodeHasBeenSet)
{
payload.WithString("LanguageCode", LanguageCodeMapper::GetNameForLanguageCode(m_languageCode));
}
if(m_lexiconNamesHasBeenSet)
{
Array<JsonValue> lexiconNamesJsonList(m_lexiconNames.size());
for(unsigned lexiconNamesIndex = 0; lexiconNamesIndex < lexiconNamesJsonList.GetLength(); ++lexiconNamesIndex)
{
lexiconNamesJsonList[lexiconNamesIndex].AsString(m_lexiconNames[lexiconNamesIndex]);
}
payload.WithArray("LexiconNames", std::move(lexiconNamesJsonList));
}
if(m_outputFormatHasBeenSet)
{
payload.WithString("OutputFormat", OutputFormatMapper::GetNameForOutputFormat(m_outputFormat));
}
if(m_outputS3BucketNameHasBeenSet)
{
payload.WithString("OutputS3BucketName", m_outputS3BucketName);
}
if(m_outputS3KeyPrefixHasBeenSet)
{
payload.WithString("OutputS3KeyPrefix", m_outputS3KeyPrefix);
}
if(m_sampleRateHasBeenSet)
{
payload.WithString("SampleRate", m_sampleRate);
}
if(m_snsTopicArnHasBeenSet)
{
payload.WithString("SnsTopicArn", m_snsTopicArn);
}
if(m_speechMarkTypesHasBeenSet)
{
Array<JsonValue> speechMarkTypesJsonList(m_speechMarkTypes.size());
for(unsigned speechMarkTypesIndex = 0; speechMarkTypesIndex < speechMarkTypesJsonList.GetLength(); ++speechMarkTypesIndex)
{
speechMarkTypesJsonList[speechMarkTypesIndex].AsString(SpeechMarkTypeMapper::GetNameForSpeechMarkType(m_speechMarkTypes[speechMarkTypesIndex]));
}
payload.WithArray("SpeechMarkTypes", std::move(speechMarkTypesJsonList));
}
if(m_textHasBeenSet)
{
payload.WithString("Text", m_text);
}
if(m_textTypeHasBeenSet)
{
payload.WithString("TextType", TextTypeMapper::GetNameForTextType(m_textType));
}
if(m_voiceIdHasBeenSet)
{
payload.WithString("VoiceId", VoiceIdMapper::GetNameForVoiceId(m_voiceId));
}
return payload.View().WriteReadable();
}

View File

@@ -0,0 +1,40 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/polly/model/StartSpeechSynthesisTaskResult.h>
#include <aws/core/utils/json/JsonSerializer.h>
#include <aws/core/AmazonWebServiceResult.h>
#include <aws/core/utils/StringUtils.h>
#include <aws/core/utils/UnreferencedParam.h>
#include <utility>
using namespace Aws::Polly::Model;
using namespace Aws::Utils::Json;
using namespace Aws::Utils;
using namespace Aws;
StartSpeechSynthesisTaskResult::StartSpeechSynthesisTaskResult()
{
}
StartSpeechSynthesisTaskResult::StartSpeechSynthesisTaskResult(const Aws::AmazonWebServiceResult<JsonValue>& result)
{
*this = result;
}
StartSpeechSynthesisTaskResult& StartSpeechSynthesisTaskResult::operator =(const Aws::AmazonWebServiceResult<JsonValue>& result)
{
JsonView jsonValue = result.GetPayload().View();
if(jsonValue.ValueExists("SynthesisTask"))
{
m_synthesisTask = jsonValue.GetObject("SynthesisTask");
}
return *this;
}

View File

@@ -0,0 +1,292 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/polly/model/SynthesisTask.h>
#include <aws/core/utils/json/JsonSerializer.h>
#include <utility>
using namespace Aws::Utils::Json;
using namespace Aws::Utils;
namespace Aws
{
namespace Polly
{
namespace Model
{
SynthesisTask::SynthesisTask() :
m_engine(Engine::NOT_SET),
m_engineHasBeenSet(false),
m_taskIdHasBeenSet(false),
m_taskStatus(TaskStatus::NOT_SET),
m_taskStatusHasBeenSet(false),
m_taskStatusReasonHasBeenSet(false),
m_outputUriHasBeenSet(false),
m_creationTimeHasBeenSet(false),
m_requestCharacters(0),
m_requestCharactersHasBeenSet(false),
m_snsTopicArnHasBeenSet(false),
m_lexiconNamesHasBeenSet(false),
m_outputFormat(OutputFormat::NOT_SET),
m_outputFormatHasBeenSet(false),
m_sampleRateHasBeenSet(false),
m_speechMarkTypesHasBeenSet(false),
m_textType(TextType::NOT_SET),
m_textTypeHasBeenSet(false),
m_voiceId(VoiceId::NOT_SET),
m_voiceIdHasBeenSet(false),
m_languageCode(LanguageCode::NOT_SET),
m_languageCodeHasBeenSet(false)
{
}
SynthesisTask::SynthesisTask(JsonView jsonValue) :
m_engine(Engine::NOT_SET),
m_engineHasBeenSet(false),
m_taskIdHasBeenSet(false),
m_taskStatus(TaskStatus::NOT_SET),
m_taskStatusHasBeenSet(false),
m_taskStatusReasonHasBeenSet(false),
m_outputUriHasBeenSet(false),
m_creationTimeHasBeenSet(false),
m_requestCharacters(0),
m_requestCharactersHasBeenSet(false),
m_snsTopicArnHasBeenSet(false),
m_lexiconNamesHasBeenSet(false),
m_outputFormat(OutputFormat::NOT_SET),
m_outputFormatHasBeenSet(false),
m_sampleRateHasBeenSet(false),
m_speechMarkTypesHasBeenSet(false),
m_textType(TextType::NOT_SET),
m_textTypeHasBeenSet(false),
m_voiceId(VoiceId::NOT_SET),
m_voiceIdHasBeenSet(false),
m_languageCode(LanguageCode::NOT_SET),
m_languageCodeHasBeenSet(false)
{
*this = jsonValue;
}
SynthesisTask& SynthesisTask::operator =(JsonView jsonValue)
{
if(jsonValue.ValueExists("Engine"))
{
m_engine = EngineMapper::GetEngineForName(jsonValue.GetString("Engine"));
m_engineHasBeenSet = true;
}
if(jsonValue.ValueExists("TaskId"))
{
m_taskId = jsonValue.GetString("TaskId");
m_taskIdHasBeenSet = true;
}
if(jsonValue.ValueExists("TaskStatus"))
{
m_taskStatus = TaskStatusMapper::GetTaskStatusForName(jsonValue.GetString("TaskStatus"));
m_taskStatusHasBeenSet = true;
}
if(jsonValue.ValueExists("TaskStatusReason"))
{
m_taskStatusReason = jsonValue.GetString("TaskStatusReason");
m_taskStatusReasonHasBeenSet = true;
}
if(jsonValue.ValueExists("OutputUri"))
{
m_outputUri = jsonValue.GetString("OutputUri");
m_outputUriHasBeenSet = true;
}
if(jsonValue.ValueExists("CreationTime"))
{
m_creationTime = jsonValue.GetDouble("CreationTime");
m_creationTimeHasBeenSet = true;
}
if(jsonValue.ValueExists("RequestCharacters"))
{
m_requestCharacters = jsonValue.GetInteger("RequestCharacters");
m_requestCharactersHasBeenSet = true;
}
if(jsonValue.ValueExists("SnsTopicArn"))
{
m_snsTopicArn = jsonValue.GetString("SnsTopicArn");
m_snsTopicArnHasBeenSet = true;
}
if(jsonValue.ValueExists("LexiconNames"))
{
Array<JsonView> lexiconNamesJsonList = jsonValue.GetArray("LexiconNames");
for(unsigned lexiconNamesIndex = 0; lexiconNamesIndex < lexiconNamesJsonList.GetLength(); ++lexiconNamesIndex)
{
m_lexiconNames.push_back(lexiconNamesJsonList[lexiconNamesIndex].AsString());
}
m_lexiconNamesHasBeenSet = true;
}
if(jsonValue.ValueExists("OutputFormat"))
{
m_outputFormat = OutputFormatMapper::GetOutputFormatForName(jsonValue.GetString("OutputFormat"));
m_outputFormatHasBeenSet = true;
}
if(jsonValue.ValueExists("SampleRate"))
{
m_sampleRate = jsonValue.GetString("SampleRate");
m_sampleRateHasBeenSet = true;
}
if(jsonValue.ValueExists("SpeechMarkTypes"))
{
Array<JsonView> speechMarkTypesJsonList = jsonValue.GetArray("SpeechMarkTypes");
for(unsigned speechMarkTypesIndex = 0; speechMarkTypesIndex < speechMarkTypesJsonList.GetLength(); ++speechMarkTypesIndex)
{
m_speechMarkTypes.push_back(SpeechMarkTypeMapper::GetSpeechMarkTypeForName(speechMarkTypesJsonList[speechMarkTypesIndex].AsString()));
}
m_speechMarkTypesHasBeenSet = true;
}
if(jsonValue.ValueExists("TextType"))
{
m_textType = TextTypeMapper::GetTextTypeForName(jsonValue.GetString("TextType"));
m_textTypeHasBeenSet = true;
}
if(jsonValue.ValueExists("VoiceId"))
{
m_voiceId = VoiceIdMapper::GetVoiceIdForName(jsonValue.GetString("VoiceId"));
m_voiceIdHasBeenSet = true;
}
if(jsonValue.ValueExists("LanguageCode"))
{
m_languageCode = LanguageCodeMapper::GetLanguageCodeForName(jsonValue.GetString("LanguageCode"));
m_languageCodeHasBeenSet = true;
}
return *this;
}
JsonValue SynthesisTask::Jsonize() const
{
JsonValue payload;
if(m_engineHasBeenSet)
{
payload.WithString("Engine", EngineMapper::GetNameForEngine(m_engine));
}
if(m_taskIdHasBeenSet)
{
payload.WithString("TaskId", m_taskId);
}
if(m_taskStatusHasBeenSet)
{
payload.WithString("TaskStatus", TaskStatusMapper::GetNameForTaskStatus(m_taskStatus));
}
if(m_taskStatusReasonHasBeenSet)
{
payload.WithString("TaskStatusReason", m_taskStatusReason);
}
if(m_outputUriHasBeenSet)
{
payload.WithString("OutputUri", m_outputUri);
}
if(m_creationTimeHasBeenSet)
{
payload.WithDouble("CreationTime", m_creationTime.SecondsWithMSPrecision());
}
if(m_requestCharactersHasBeenSet)
{
payload.WithInteger("RequestCharacters", m_requestCharacters);
}
if(m_snsTopicArnHasBeenSet)
{
payload.WithString("SnsTopicArn", m_snsTopicArn);
}
if(m_lexiconNamesHasBeenSet)
{
Array<JsonValue> lexiconNamesJsonList(m_lexiconNames.size());
for(unsigned lexiconNamesIndex = 0; lexiconNamesIndex < lexiconNamesJsonList.GetLength(); ++lexiconNamesIndex)
{
lexiconNamesJsonList[lexiconNamesIndex].AsString(m_lexiconNames[lexiconNamesIndex]);
}
payload.WithArray("LexiconNames", std::move(lexiconNamesJsonList));
}
if(m_outputFormatHasBeenSet)
{
payload.WithString("OutputFormat", OutputFormatMapper::GetNameForOutputFormat(m_outputFormat));
}
if(m_sampleRateHasBeenSet)
{
payload.WithString("SampleRate", m_sampleRate);
}
if(m_speechMarkTypesHasBeenSet)
{
Array<JsonValue> speechMarkTypesJsonList(m_speechMarkTypes.size());
for(unsigned speechMarkTypesIndex = 0; speechMarkTypesIndex < speechMarkTypesJsonList.GetLength(); ++speechMarkTypesIndex)
{
speechMarkTypesJsonList[speechMarkTypesIndex].AsString(SpeechMarkTypeMapper::GetNameForSpeechMarkType(m_speechMarkTypes[speechMarkTypesIndex]));
}
payload.WithArray("SpeechMarkTypes", std::move(speechMarkTypesJsonList));
}
if(m_textTypeHasBeenSet)
{
payload.WithString("TextType", TextTypeMapper::GetNameForTextType(m_textType));
}
if(m_voiceIdHasBeenSet)
{
payload.WithString("VoiceId", VoiceIdMapper::GetNameForVoiceId(m_voiceId));
}
if(m_languageCodeHasBeenSet)
{
payload.WithString("LanguageCode", LanguageCodeMapper::GetNameForLanguageCode(m_languageCode));
}
return payload;
}
} // namespace Model
} // namespace Polly
} // namespace Aws

View File

@@ -0,0 +1,157 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/polly/model/SynthesizeSpeechRequest.h>
#include <aws/core/utils/json/JsonSerializer.h>
#include <aws/core/utils/StringUtils.h>
#include <utility>
using namespace Aws::Polly::Model;
using namespace Aws::Utils::Json;
using namespace Aws::Utils;
SynthesizeSpeechRequest::SynthesizeSpeechRequest() :
m_engine(Engine::NOT_SET),
m_engineHasBeenSet(false),
m_languageCode(LanguageCode::NOT_SET),
m_languageCodeHasBeenSet(false),
m_lexiconNamesHasBeenSet(false),
m_outputFormat(OutputFormat::NOT_SET),
m_outputFormatHasBeenSet(false),
m_sampleRateHasBeenSet(false),
m_speechMarkTypesHasBeenSet(false),
m_textHasBeenSet(false),
m_textType(TextType::NOT_SET),
m_textTypeHasBeenSet(false),
m_voiceId(VoiceId::NOT_SET),
m_voiceIdHasBeenSet(false)
{
}
Aws::String SynthesizeSpeechRequest::SerializePayload() const
{
JsonValue payload;
if(m_engineHasBeenSet)
{
payload.WithString("Engine", EngineMapper::GetNameForEngine(m_engine));
}
if(m_languageCodeHasBeenSet)
{
payload.WithString("LanguageCode", LanguageCodeMapper::GetNameForLanguageCode(m_languageCode));
}
if(m_lexiconNamesHasBeenSet)
{
Array<JsonValue> lexiconNamesJsonList(m_lexiconNames.size());
for(unsigned lexiconNamesIndex = 0; lexiconNamesIndex < lexiconNamesJsonList.GetLength(); ++lexiconNamesIndex)
{
lexiconNamesJsonList[lexiconNamesIndex].AsString(m_lexiconNames[lexiconNamesIndex]);
}
payload.WithArray("LexiconNames", std::move(lexiconNamesJsonList));
}
if(m_outputFormatHasBeenSet)
{
payload.WithString("OutputFormat", OutputFormatMapper::GetNameForOutputFormat(m_outputFormat));
}
if(m_sampleRateHasBeenSet)
{
payload.WithString("SampleRate", m_sampleRate);
}
if(m_speechMarkTypesHasBeenSet)
{
Array<JsonValue> speechMarkTypesJsonList(m_speechMarkTypes.size());
for(unsigned speechMarkTypesIndex = 0; speechMarkTypesIndex < speechMarkTypesJsonList.GetLength(); ++speechMarkTypesIndex)
{
speechMarkTypesJsonList[speechMarkTypesIndex].AsString(SpeechMarkTypeMapper::GetNameForSpeechMarkType(m_speechMarkTypes[speechMarkTypesIndex]));
}
payload.WithArray("SpeechMarkTypes", std::move(speechMarkTypesJsonList));
}
if(m_textHasBeenSet)
{
payload.WithString("Text", m_text);
}
if(m_textTypeHasBeenSet)
{
payload.WithString("TextType", TextTypeMapper::GetNameForTextType(m_textType));
}
if(m_voiceIdHasBeenSet)
{
payload.WithString("VoiceId", VoiceIdMapper::GetNameForVoiceId(m_voiceId));
}
return payload.View().WriteReadable();
}
void SynthesizeSpeechRequest::DumpBodyToUrl(Aws::Http::URI& uri ) const
{
if(m_engineHasBeenSet)
{
uri.AddQueryStringParameter("Engine", EngineMapper::GetNameForEngine(m_engine));
}
if(m_languageCodeHasBeenSet)
{
uri.AddQueryStringParameter("LanguageCode", LanguageCodeMapper::GetNameForLanguageCode(m_languageCode));
}
if(m_lexiconNamesHasBeenSet)
{
for(auto& item : m_lexiconNames)
{
uri.AddQueryStringParameter("LexiconNames", StringUtils::to_string(item));
}
}
if(m_outputFormatHasBeenSet)
{
uri.AddQueryStringParameter("OutputFormat", OutputFormatMapper::GetNameForOutputFormat(m_outputFormat));
}
if(m_sampleRateHasBeenSet)
{
uri.AddQueryStringParameter("SampleRate", m_sampleRate);
}
if(m_speechMarkTypesHasBeenSet)
{
for(auto& item : m_speechMarkTypes)
{
uri.AddQueryStringParameter("SpeechMarkTypes", SpeechMarkTypeMapper::GetNameForSpeechMarkType(item));
}
}
if(m_textHasBeenSet)
{
uri.AddQueryStringParameter("Text", m_text);
}
if(m_textTypeHasBeenSet)
{
uri.AddQueryStringParameter("TextType", TextTypeMapper::GetNameForTextType(m_textType));
}
if(m_voiceIdHasBeenSet)
{
uri.AddQueryStringParameter("VoiceId", VoiceIdMapper::GetNameForVoiceId(m_voiceId));
}
}

View File

@@ -0,0 +1,69 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/polly/model/SynthesizeSpeechResult.h>
#include <aws/core/AmazonWebServiceResult.h>
#include <aws/core/utils/StringUtils.h>
#include <aws/core/utils/HashingUtils.h>
#include <aws/core/utils/memory/stl/AWSStringStream.h>
#include <utility>
using namespace Aws::Polly::Model;
using namespace Aws::Utils::Stream;
using namespace Aws::Utils;
using namespace Aws;
SynthesizeSpeechResult::SynthesizeSpeechResult() :
m_requestCharacters(0)
{
}
SynthesizeSpeechResult::SynthesizeSpeechResult(SynthesizeSpeechResult&& toMove) :
m_audioStream(std::move(toMove.m_audioStream)),
m_contentType(std::move(toMove.m_contentType)),
m_requestCharacters(toMove.m_requestCharacters)
{
}
SynthesizeSpeechResult& SynthesizeSpeechResult::operator=(SynthesizeSpeechResult&& toMove)
{
if(this == &toMove)
{
return *this;
}
m_audioStream = std::move(toMove.m_audioStream);
m_contentType = std::move(toMove.m_contentType);
m_requestCharacters = toMove.m_requestCharacters;
return *this;
}
SynthesizeSpeechResult::SynthesizeSpeechResult(Aws::AmazonWebServiceResult<ResponseStream>&& result) :
m_requestCharacters(0)
{
*this = std::move(result);
}
SynthesizeSpeechResult& SynthesizeSpeechResult::operator =(Aws::AmazonWebServiceResult<ResponseStream>&& result)
{
m_audioStream = result.TakeOwnershipOfPayload();
const auto& headers = result.GetHeaderValueCollection();
const auto& contentTypeIter = headers.find("content-type");
if(contentTypeIter != headers.end())
{
m_contentType = contentTypeIter->second;
}
const auto& requestCharactersIter = headers.find("x-amzn-requestcharacters");
if(requestCharactersIter != headers.end())
{
m_requestCharacters = StringUtils::ConvertToInt32(requestCharactersIter->second.c_str());
}
return *this;
}

View File

@@ -0,0 +1,84 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/polly/model/TaskStatus.h>
#include <aws/core/utils/HashingUtils.h>
#include <aws/core/Globals.h>
#include <aws/core/utils/EnumParseOverflowContainer.h>
using namespace Aws::Utils;
namespace Aws
{
namespace Polly
{
namespace Model
{
namespace TaskStatusMapper
{
static const int scheduled_HASH = HashingUtils::HashString("scheduled");
static const int inProgress_HASH = HashingUtils::HashString("inProgress");
static const int completed_HASH = HashingUtils::HashString("completed");
static const int failed_HASH = HashingUtils::HashString("failed");
TaskStatus GetTaskStatusForName(const Aws::String& name)
{
int hashCode = HashingUtils::HashString(name.c_str());
if (hashCode == scheduled_HASH)
{
return TaskStatus::scheduled;
}
else if (hashCode == inProgress_HASH)
{
return TaskStatus::inProgress;
}
else if (hashCode == completed_HASH)
{
return TaskStatus::completed;
}
else if (hashCode == failed_HASH)
{
return TaskStatus::failed;
}
EnumParseOverflowContainer* overflowContainer = Aws::GetEnumOverflowContainer();
if(overflowContainer)
{
overflowContainer->StoreOverflow(hashCode, name);
return static_cast<TaskStatus>(hashCode);
}
return TaskStatus::NOT_SET;
}
Aws::String GetNameForTaskStatus(TaskStatus enumValue)
{
switch(enumValue)
{
case TaskStatus::scheduled:
return "scheduled";
case TaskStatus::inProgress:
return "inProgress";
case TaskStatus::completed:
return "completed";
case TaskStatus::failed:
return "failed";
default:
EnumParseOverflowContainer* overflowContainer = Aws::GetEnumOverflowContainer();
if(overflowContainer)
{
return overflowContainer->RetrieveOverflow(static_cast<int>(enumValue));
}
return {};
}
}
} // namespace TaskStatusMapper
} // namespace Model
} // namespace Polly
} // namespace Aws

View File

@@ -0,0 +1,70 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/polly/model/TextType.h>
#include <aws/core/utils/HashingUtils.h>
#include <aws/core/Globals.h>
#include <aws/core/utils/EnumParseOverflowContainer.h>
using namespace Aws::Utils;
namespace Aws
{
namespace Polly
{
namespace Model
{
namespace TextTypeMapper
{
static const int ssml_HASH = HashingUtils::HashString("ssml");
static const int text_HASH = HashingUtils::HashString("text");
TextType GetTextTypeForName(const Aws::String& name)
{
int hashCode = HashingUtils::HashString(name.c_str());
if (hashCode == ssml_HASH)
{
return TextType::ssml;
}
else if (hashCode == text_HASH)
{
return TextType::text;
}
EnumParseOverflowContainer* overflowContainer = Aws::GetEnumOverflowContainer();
if(overflowContainer)
{
overflowContainer->StoreOverflow(hashCode, name);
return static_cast<TextType>(hashCode);
}
return TextType::NOT_SET;
}
Aws::String GetNameForTextType(TextType enumValue)
{
switch(enumValue)
{
case TextType::ssml:
return "ssml";
case TextType::text:
return "text";
default:
EnumParseOverflowContainer* overflowContainer = Aws::GetEnumOverflowContainer();
if(overflowContainer)
{
return overflowContainer->RetrieveOverflow(static_cast<int>(enumValue));
}
return {};
}
}
} // namespace TextTypeMapper
} // namespace Model
} // namespace Polly
} // namespace Aws

View File

@@ -0,0 +1,168 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/polly/model/Voice.h>
#include <aws/core/utils/json/JsonSerializer.h>
#include <utility>
using namespace Aws::Utils::Json;
using namespace Aws::Utils;
namespace Aws
{
namespace Polly
{
namespace Model
{
Voice::Voice() :
m_gender(Gender::NOT_SET),
m_genderHasBeenSet(false),
m_id(VoiceId::NOT_SET),
m_idHasBeenSet(false),
m_languageCode(LanguageCode::NOT_SET),
m_languageCodeHasBeenSet(false),
m_languageNameHasBeenSet(false),
m_nameHasBeenSet(false),
m_additionalLanguageCodesHasBeenSet(false),
m_supportedEnginesHasBeenSet(false)
{
}
Voice::Voice(JsonView jsonValue) :
m_gender(Gender::NOT_SET),
m_genderHasBeenSet(false),
m_id(VoiceId::NOT_SET),
m_idHasBeenSet(false),
m_languageCode(LanguageCode::NOT_SET),
m_languageCodeHasBeenSet(false),
m_languageNameHasBeenSet(false),
m_nameHasBeenSet(false),
m_additionalLanguageCodesHasBeenSet(false),
m_supportedEnginesHasBeenSet(false)
{
*this = jsonValue;
}
Voice& Voice::operator =(JsonView jsonValue)
{
if(jsonValue.ValueExists("Gender"))
{
m_gender = GenderMapper::GetGenderForName(jsonValue.GetString("Gender"));
m_genderHasBeenSet = true;
}
if(jsonValue.ValueExists("Id"))
{
m_id = VoiceIdMapper::GetVoiceIdForName(jsonValue.GetString("Id"));
m_idHasBeenSet = true;
}
if(jsonValue.ValueExists("LanguageCode"))
{
m_languageCode = LanguageCodeMapper::GetLanguageCodeForName(jsonValue.GetString("LanguageCode"));
m_languageCodeHasBeenSet = true;
}
if(jsonValue.ValueExists("LanguageName"))
{
m_languageName = jsonValue.GetString("LanguageName");
m_languageNameHasBeenSet = true;
}
if(jsonValue.ValueExists("Name"))
{
m_name = jsonValue.GetString("Name");
m_nameHasBeenSet = true;
}
if(jsonValue.ValueExists("AdditionalLanguageCodes"))
{
Array<JsonView> additionalLanguageCodesJsonList = jsonValue.GetArray("AdditionalLanguageCodes");
for(unsigned additionalLanguageCodesIndex = 0; additionalLanguageCodesIndex < additionalLanguageCodesJsonList.GetLength(); ++additionalLanguageCodesIndex)
{
m_additionalLanguageCodes.push_back(LanguageCodeMapper::GetLanguageCodeForName(additionalLanguageCodesJsonList[additionalLanguageCodesIndex].AsString()));
}
m_additionalLanguageCodesHasBeenSet = true;
}
if(jsonValue.ValueExists("SupportedEngines"))
{
Array<JsonView> supportedEnginesJsonList = jsonValue.GetArray("SupportedEngines");
for(unsigned supportedEnginesIndex = 0; supportedEnginesIndex < supportedEnginesJsonList.GetLength(); ++supportedEnginesIndex)
{
m_supportedEngines.push_back(EngineMapper::GetEngineForName(supportedEnginesJsonList[supportedEnginesIndex].AsString()));
}
m_supportedEnginesHasBeenSet = true;
}
return *this;
}
JsonValue Voice::Jsonize() const
{
JsonValue payload;
if(m_genderHasBeenSet)
{
payload.WithString("Gender", GenderMapper::GetNameForGender(m_gender));
}
if(m_idHasBeenSet)
{
payload.WithString("Id", VoiceIdMapper::GetNameForVoiceId(m_id));
}
if(m_languageCodeHasBeenSet)
{
payload.WithString("LanguageCode", LanguageCodeMapper::GetNameForLanguageCode(m_languageCode));
}
if(m_languageNameHasBeenSet)
{
payload.WithString("LanguageName", m_languageName);
}
if(m_nameHasBeenSet)
{
payload.WithString("Name", m_name);
}
if(m_additionalLanguageCodesHasBeenSet)
{
Array<JsonValue> additionalLanguageCodesJsonList(m_additionalLanguageCodes.size());
for(unsigned additionalLanguageCodesIndex = 0; additionalLanguageCodesIndex < additionalLanguageCodesJsonList.GetLength(); ++additionalLanguageCodesIndex)
{
additionalLanguageCodesJsonList[additionalLanguageCodesIndex].AsString(LanguageCodeMapper::GetNameForLanguageCode(m_additionalLanguageCodes[additionalLanguageCodesIndex]));
}
payload.WithArray("AdditionalLanguageCodes", std::move(additionalLanguageCodesJsonList));
}
if(m_supportedEnginesHasBeenSet)
{
Array<JsonValue> supportedEnginesJsonList(m_supportedEngines.size());
for(unsigned supportedEnginesIndex = 0; supportedEnginesIndex < supportedEnginesJsonList.GetLength(); ++supportedEnginesIndex)
{
supportedEnginesJsonList[supportedEnginesIndex].AsString(EngineMapper::GetNameForEngine(m_supportedEngines[supportedEnginesIndex]));
}
payload.WithArray("SupportedEngines", std::move(supportedEnginesJsonList));
}
return payload;
}
} // namespace Model
} // namespace Polly
} // namespace Aws

View File

@@ -0,0 +1,483 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/polly/model/VoiceId.h>
#include <aws/core/utils/HashingUtils.h>
#include <aws/core/Globals.h>
#include <aws/core/utils/EnumParseOverflowContainer.h>
using namespace Aws::Utils;
namespace Aws
{
namespace Polly
{
namespace Model
{
namespace VoiceIdMapper
{
static const int Aditi_HASH = HashingUtils::HashString("Aditi");
static const int Amy_HASH = HashingUtils::HashString("Amy");
static const int Astrid_HASH = HashingUtils::HashString("Astrid");
static const int Bianca_HASH = HashingUtils::HashString("Bianca");
static const int Brian_HASH = HashingUtils::HashString("Brian");
static const int Camila_HASH = HashingUtils::HashString("Camila");
static const int Carla_HASH = HashingUtils::HashString("Carla");
static const int Carmen_HASH = HashingUtils::HashString("Carmen");
static const int Celine_HASH = HashingUtils::HashString("Celine");
static const int Chantal_HASH = HashingUtils::HashString("Chantal");
static const int Conchita_HASH = HashingUtils::HashString("Conchita");
static const int Cristiano_HASH = HashingUtils::HashString("Cristiano");
static const int Dora_HASH = HashingUtils::HashString("Dora");
static const int Emma_HASH = HashingUtils::HashString("Emma");
static const int Enrique_HASH = HashingUtils::HashString("Enrique");
static const int Ewa_HASH = HashingUtils::HashString("Ewa");
static const int Filiz_HASH = HashingUtils::HashString("Filiz");
static const int Geraint_HASH = HashingUtils::HashString("Geraint");
static const int Giorgio_HASH = HashingUtils::HashString("Giorgio");
static const int Gwyneth_HASH = HashingUtils::HashString("Gwyneth");
static const int Hans_HASH = HashingUtils::HashString("Hans");
static const int Ines_HASH = HashingUtils::HashString("Ines");
static const int Ivy_HASH = HashingUtils::HashString("Ivy");
static const int Jacek_HASH = HashingUtils::HashString("Jacek");
static const int Jan_HASH = HashingUtils::HashString("Jan");
static const int Joanna_HASH = HashingUtils::HashString("Joanna");
static const int Joey_HASH = HashingUtils::HashString("Joey");
static const int Justin_HASH = HashingUtils::HashString("Justin");
static const int Karl_HASH = HashingUtils::HashString("Karl");
static const int Kendra_HASH = HashingUtils::HashString("Kendra");
static const int Kevin_HASH = HashingUtils::HashString("Kevin");
static const int Kimberly_HASH = HashingUtils::HashString("Kimberly");
static const int Lea_HASH = HashingUtils::HashString("Lea");
static const int Liv_HASH = HashingUtils::HashString("Liv");
static const int Lotte_HASH = HashingUtils::HashString("Lotte");
static const int Lucia_HASH = HashingUtils::HashString("Lucia");
static const int Lupe_HASH = HashingUtils::HashString("Lupe");
static const int Mads_HASH = HashingUtils::HashString("Mads");
static const int Maja_HASH = HashingUtils::HashString("Maja");
static const int Marlene_HASH = HashingUtils::HashString("Marlene");
static const int Mathieu_HASH = HashingUtils::HashString("Mathieu");
static const int Matthew_HASH = HashingUtils::HashString("Matthew");
static const int Maxim_HASH = HashingUtils::HashString("Maxim");
static const int Mia_HASH = HashingUtils::HashString("Mia");
static const int Miguel_HASH = HashingUtils::HashString("Miguel");
static const int Mizuki_HASH = HashingUtils::HashString("Mizuki");
static const int Naja_HASH = HashingUtils::HashString("Naja");
static const int Nicole_HASH = HashingUtils::HashString("Nicole");
static const int Penelope_HASH = HashingUtils::HashString("Penelope");
static const int Raveena_HASH = HashingUtils::HashString("Raveena");
static const int Ricardo_HASH = HashingUtils::HashString("Ricardo");
static const int Ruben_HASH = HashingUtils::HashString("Ruben");
static const int Russell_HASH = HashingUtils::HashString("Russell");
static const int Salli_HASH = HashingUtils::HashString("Salli");
static const int Seoyeon_HASH = HashingUtils::HashString("Seoyeon");
static const int Takumi_HASH = HashingUtils::HashString("Takumi");
static const int Tatyana_HASH = HashingUtils::HashString("Tatyana");
static const int Vicki_HASH = HashingUtils::HashString("Vicki");
static const int Vitoria_HASH = HashingUtils::HashString("Vitoria");
static const int Zeina_HASH = HashingUtils::HashString("Zeina");
static const int Zhiyu_HASH = HashingUtils::HashString("Zhiyu");
VoiceId GetVoiceIdForName(const Aws::String& name)
{
int hashCode = HashingUtils::HashString(name.c_str());
if (hashCode == Aditi_HASH)
{
return VoiceId::Aditi;
}
else if (hashCode == Amy_HASH)
{
return VoiceId::Amy;
}
else if (hashCode == Astrid_HASH)
{
return VoiceId::Astrid;
}
else if (hashCode == Bianca_HASH)
{
return VoiceId::Bianca;
}
else if (hashCode == Brian_HASH)
{
return VoiceId::Brian;
}
else if (hashCode == Camila_HASH)
{
return VoiceId::Camila;
}
else if (hashCode == Carla_HASH)
{
return VoiceId::Carla;
}
else if (hashCode == Carmen_HASH)
{
return VoiceId::Carmen;
}
else if (hashCode == Celine_HASH)
{
return VoiceId::Celine;
}
else if (hashCode == Chantal_HASH)
{
return VoiceId::Chantal;
}
else if (hashCode == Conchita_HASH)
{
return VoiceId::Conchita;
}
else if (hashCode == Cristiano_HASH)
{
return VoiceId::Cristiano;
}
else if (hashCode == Dora_HASH)
{
return VoiceId::Dora;
}
else if (hashCode == Emma_HASH)
{
return VoiceId::Emma;
}
else if (hashCode == Enrique_HASH)
{
return VoiceId::Enrique;
}
else if (hashCode == Ewa_HASH)
{
return VoiceId::Ewa;
}
else if (hashCode == Filiz_HASH)
{
return VoiceId::Filiz;
}
else if (hashCode == Geraint_HASH)
{
return VoiceId::Geraint;
}
else if (hashCode == Giorgio_HASH)
{
return VoiceId::Giorgio;
}
else if (hashCode == Gwyneth_HASH)
{
return VoiceId::Gwyneth;
}
else if (hashCode == Hans_HASH)
{
return VoiceId::Hans;
}
else if (hashCode == Ines_HASH)
{
return VoiceId::Ines;
}
else if (hashCode == Ivy_HASH)
{
return VoiceId::Ivy;
}
else if (hashCode == Jacek_HASH)
{
return VoiceId::Jacek;
}
else if (hashCode == Jan_HASH)
{
return VoiceId::Jan;
}
else if (hashCode == Joanna_HASH)
{
return VoiceId::Joanna;
}
else if (hashCode == Joey_HASH)
{
return VoiceId::Joey;
}
else if (hashCode == Justin_HASH)
{
return VoiceId::Justin;
}
else if (hashCode == Karl_HASH)
{
return VoiceId::Karl;
}
else if (hashCode == Kendra_HASH)
{
return VoiceId::Kendra;
}
else if (hashCode == Kevin_HASH)
{
return VoiceId::Kevin;
}
else if (hashCode == Kimberly_HASH)
{
return VoiceId::Kimberly;
}
else if (hashCode == Lea_HASH)
{
return VoiceId::Lea;
}
else if (hashCode == Liv_HASH)
{
return VoiceId::Liv;
}
else if (hashCode == Lotte_HASH)
{
return VoiceId::Lotte;
}
else if (hashCode == Lucia_HASH)
{
return VoiceId::Lucia;
}
else if (hashCode == Lupe_HASH)
{
return VoiceId::Lupe;
}
else if (hashCode == Mads_HASH)
{
return VoiceId::Mads;
}
else if (hashCode == Maja_HASH)
{
return VoiceId::Maja;
}
else if (hashCode == Marlene_HASH)
{
return VoiceId::Marlene;
}
else if (hashCode == Mathieu_HASH)
{
return VoiceId::Mathieu;
}
else if (hashCode == Matthew_HASH)
{
return VoiceId::Matthew;
}
else if (hashCode == Maxim_HASH)
{
return VoiceId::Maxim;
}
else if (hashCode == Mia_HASH)
{
return VoiceId::Mia;
}
else if (hashCode == Miguel_HASH)
{
return VoiceId::Miguel;
}
else if (hashCode == Mizuki_HASH)
{
return VoiceId::Mizuki;
}
else if (hashCode == Naja_HASH)
{
return VoiceId::Naja;
}
else if (hashCode == Nicole_HASH)
{
return VoiceId::Nicole;
}
else if (hashCode == Penelope_HASH)
{
return VoiceId::Penelope;
}
else if (hashCode == Raveena_HASH)
{
return VoiceId::Raveena;
}
else if (hashCode == Ricardo_HASH)
{
return VoiceId::Ricardo;
}
else if (hashCode == Ruben_HASH)
{
return VoiceId::Ruben;
}
else if (hashCode == Russell_HASH)
{
return VoiceId::Russell;
}
else if (hashCode == Salli_HASH)
{
return VoiceId::Salli;
}
else if (hashCode == Seoyeon_HASH)
{
return VoiceId::Seoyeon;
}
else if (hashCode == Takumi_HASH)
{
return VoiceId::Takumi;
}
else if (hashCode == Tatyana_HASH)
{
return VoiceId::Tatyana;
}
else if (hashCode == Vicki_HASH)
{
return VoiceId::Vicki;
}
else if (hashCode == Vitoria_HASH)
{
return VoiceId::Vitoria;
}
else if (hashCode == Zeina_HASH)
{
return VoiceId::Zeina;
}
else if (hashCode == Zhiyu_HASH)
{
return VoiceId::Zhiyu;
}
EnumParseOverflowContainer* overflowContainer = Aws::GetEnumOverflowContainer();
if(overflowContainer)
{
overflowContainer->StoreOverflow(hashCode, name);
return static_cast<VoiceId>(hashCode);
}
return VoiceId::NOT_SET;
}
Aws::String GetNameForVoiceId(VoiceId enumValue)
{
switch(enumValue)
{
case VoiceId::Aditi:
return "Aditi";
case VoiceId::Amy:
return "Amy";
case VoiceId::Astrid:
return "Astrid";
case VoiceId::Bianca:
return "Bianca";
case VoiceId::Brian:
return "Brian";
case VoiceId::Camila:
return "Camila";
case VoiceId::Carla:
return "Carla";
case VoiceId::Carmen:
return "Carmen";
case VoiceId::Celine:
return "Celine";
case VoiceId::Chantal:
return "Chantal";
case VoiceId::Conchita:
return "Conchita";
case VoiceId::Cristiano:
return "Cristiano";
case VoiceId::Dora:
return "Dora";
case VoiceId::Emma:
return "Emma";
case VoiceId::Enrique:
return "Enrique";
case VoiceId::Ewa:
return "Ewa";
case VoiceId::Filiz:
return "Filiz";
case VoiceId::Geraint:
return "Geraint";
case VoiceId::Giorgio:
return "Giorgio";
case VoiceId::Gwyneth:
return "Gwyneth";
case VoiceId::Hans:
return "Hans";
case VoiceId::Ines:
return "Ines";
case VoiceId::Ivy:
return "Ivy";
case VoiceId::Jacek:
return "Jacek";
case VoiceId::Jan:
return "Jan";
case VoiceId::Joanna:
return "Joanna";
case VoiceId::Joey:
return "Joey";
case VoiceId::Justin:
return "Justin";
case VoiceId::Karl:
return "Karl";
case VoiceId::Kendra:
return "Kendra";
case VoiceId::Kevin:
return "Kevin";
case VoiceId::Kimberly:
return "Kimberly";
case VoiceId::Lea:
return "Lea";
case VoiceId::Liv:
return "Liv";
case VoiceId::Lotte:
return "Lotte";
case VoiceId::Lucia:
return "Lucia";
case VoiceId::Lupe:
return "Lupe";
case VoiceId::Mads:
return "Mads";
case VoiceId::Maja:
return "Maja";
case VoiceId::Marlene:
return "Marlene";
case VoiceId::Mathieu:
return "Mathieu";
case VoiceId::Matthew:
return "Matthew";
case VoiceId::Maxim:
return "Maxim";
case VoiceId::Mia:
return "Mia";
case VoiceId::Miguel:
return "Miguel";
case VoiceId::Mizuki:
return "Mizuki";
case VoiceId::Naja:
return "Naja";
case VoiceId::Nicole:
return "Nicole";
case VoiceId::Penelope:
return "Penelope";
case VoiceId::Raveena:
return "Raveena";
case VoiceId::Ricardo:
return "Ricardo";
case VoiceId::Ruben:
return "Ruben";
case VoiceId::Russell:
return "Russell";
case VoiceId::Salli:
return "Salli";
case VoiceId::Seoyeon:
return "Seoyeon";
case VoiceId::Takumi:
return "Takumi";
case VoiceId::Tatyana:
return "Tatyana";
case VoiceId::Vicki:
return "Vicki";
case VoiceId::Vitoria:
return "Vitoria";
case VoiceId::Zeina:
return "Zeina";
case VoiceId::Zhiyu:
return "Zhiyu";
default:
EnumParseOverflowContainer* overflowContainer = Aws::GetEnumOverflowContainer();
if(overflowContainer)
{
return overflowContainer->RetrieveOverflow(static_cast<int>(enumValue));
}
return {};
}
}
} // namespace VoiceIdMapper
} // namespace Model
} // namespace Polly
} // namespace Aws