AWS SDK for C++

AWS SDK for C++ Version 1.11.781

Loading...
Searching...
No Matches
PollyClient.h
1
6#pragma once
7#include <aws/core/client/AWSClient.h>
8#include <aws/core/client/AWSClientAsyncCRTP.h>
9#include <aws/core/client/ClientConfiguration.h>
10#include <aws/core/utils/json/JsonSerializer.h>
11#include <aws/polly/PollyPaginationBase.h>
12#include <aws/polly/PollyServiceClientModel.h>
13#include <aws/polly/PollyWaiter.h>
14#include <aws/polly/Polly_EXPORTS.h>
15
16namespace Aws {
17namespace Polly {
25class AWS_POLLY_API PollyClient : public Aws::Client::AWSJsonClient,
27 public PollyPaginationBase<PollyClient>,
28 public PollyWaiter<PollyClient> {
29 public:
31 static const char* GetServiceName();
32 static const char* GetAllocationTag();
33
36
42 std::shared_ptr<PollyEndpointProviderBase> endpointProvider = nullptr);
43
48 PollyClient(const Aws::Auth::AWSCredentials& credentials, std::shared_ptr<PollyEndpointProviderBase> endpointProvider = nullptr,
50
55 PollyClient(const std::shared_ptr<Aws::Auth::AWSCredentialsProvider>& credentialsProvider,
56 std::shared_ptr<PollyEndpointProviderBase> endpointProvider = nullptr,
58
59 /* Legacy constructors due deprecation */
64 PollyClient(const Aws::Client::ClientConfiguration& clientConfiguration);
65
70 PollyClient(const Aws::Auth::AWSCredentials& credentials, const Aws::Client::ClientConfiguration& clientConfiguration);
71
76 PollyClient(const std::shared_ptr<Aws::Auth::AWSCredentialsProvider>& credentialsProvider,
77 const Aws::Client::ClientConfiguration& clientConfiguration);
78
79 /* End of legacy constructors due deprecation */
80 virtual ~PollyClient();
81
93
97 template <typename DeleteLexiconRequestT = Model::DeleteLexiconRequest>
98 Model::DeleteLexiconOutcomeCallable DeleteLexiconCallable(const DeleteLexiconRequestT& request) const {
99 return SubmitCallable(&PollyClient::DeleteLexicon, request);
100 }
101
106 template <typename DeleteLexiconRequestT = Model::DeleteLexiconRequest>
107 void DeleteLexiconAsync(const DeleteLexiconRequestT& request, const DeleteLexiconResponseReceivedHandler& handler,
108 const std::shared_ptr<const Aws::Client::AsyncCallerContext>& context = nullptr) const {
109 return SubmitAsync(&PollyClient::DeleteLexicon, request, handler, context);
110 }
111
130
134 template <typename DescribeVoicesRequestT = Model::DescribeVoicesRequest>
135 Model::DescribeVoicesOutcomeCallable DescribeVoicesCallable(const DescribeVoicesRequestT& request = {}) const {
136 return SubmitCallable(&PollyClient::DescribeVoices, request);
137 }
138
143 template <typename DescribeVoicesRequestT = Model::DescribeVoicesRequest>
145 const std::shared_ptr<const Aws::Client::AsyncCallerContext>& context = nullptr,
146 const DescribeVoicesRequestT& request = {}) const {
147 return SubmitAsync(&PollyClient::DescribeVoices, request, handler, context);
148 }
149
159
163 template <typename GetLexiconRequestT = Model::GetLexiconRequest>
164 Model::GetLexiconOutcomeCallable GetLexiconCallable(const GetLexiconRequestT& request) const {
165 return SubmitCallable(&PollyClient::GetLexicon, request);
166 }
167
172 template <typename GetLexiconRequestT = Model::GetLexiconRequest>
173 void GetLexiconAsync(const GetLexiconRequestT& request, const GetLexiconResponseReceivedHandler& handler,
174 const std::shared_ptr<const Aws::Client::AsyncCallerContext>& context = nullptr) const {
175 return SubmitAsync(&PollyClient::GetLexicon, request, handler, context);
176 }
177
187
192 template <typename GetSpeechSynthesisTaskRequestT = Model::GetSpeechSynthesisTaskRequest>
193 Model::GetSpeechSynthesisTaskOutcomeCallable GetSpeechSynthesisTaskCallable(const GetSpeechSynthesisTaskRequestT& request) const {
194 return SubmitCallable(&PollyClient::GetSpeechSynthesisTask, request);
195 }
196
201 template <typename GetSpeechSynthesisTaskRequestT = Model::GetSpeechSynthesisTaskRequest>
202 void GetSpeechSynthesisTaskAsync(const GetSpeechSynthesisTaskRequestT& request,
204 const std::shared_ptr<const Aws::Client::AsyncCallerContext>& context = nullptr) const {
205 return SubmitAsync(&PollyClient::GetSpeechSynthesisTask, request, handler, context);
206 }
207
217
221 template <typename ListLexiconsRequestT = Model::ListLexiconsRequest>
222 Model::ListLexiconsOutcomeCallable ListLexiconsCallable(const ListLexiconsRequestT& request = {}) const {
223 return SubmitCallable(&PollyClient::ListLexicons, request);
224 }
225
230 template <typename ListLexiconsRequestT = Model::ListLexiconsRequest>
232 const std::shared_ptr<const Aws::Client::AsyncCallerContext>& context = nullptr,
233 const ListLexiconsRequestT& request = {}) const {
234 return SubmitAsync(&PollyClient::ListLexicons, request, handler, context);
235 }
236
245
250 template <typename ListSpeechSynthesisTasksRequestT = Model::ListSpeechSynthesisTasksRequest>
252 const ListSpeechSynthesisTasksRequestT& request = {}) const {
253 return SubmitCallable(&PollyClient::ListSpeechSynthesisTasks, request);
254 }
255
260 template <typename ListSpeechSynthesisTasksRequestT = Model::ListSpeechSynthesisTasksRequest>
262 const std::shared_ptr<const Aws::Client::AsyncCallerContext>& context = nullptr,
263 const ListSpeechSynthesisTasksRequestT& request = {}) const {
264 return SubmitAsync(&PollyClient::ListSpeechSynthesisTasks, request, handler, context);
265 }
266
279
283 template <typename PutLexiconRequestT = Model::PutLexiconRequest>
284 Model::PutLexiconOutcomeCallable PutLexiconCallable(const PutLexiconRequestT& request) const {
285 return SubmitCallable(&PollyClient::PutLexicon, request);
286 }
287
292 template <typename PutLexiconRequestT = Model::PutLexiconRequest>
293 void PutLexiconAsync(const PutLexiconRequestT& request, const PutLexiconResponseReceivedHandler& handler,
294 const std::shared_ptr<const Aws::Client::AsyncCallerContext>& context = nullptr) const {
295 return SubmitAsync(&PollyClient::PutLexicon, request, handler, context);
296 }
297
316 const std::shared_ptr<const Aws::Client::AsyncCallerContext>& handlerContext = nullptr) const;
317
333
338 template <typename StartSpeechSynthesisTaskRequestT = Model::StartSpeechSynthesisTaskRequest>
339 Model::StartSpeechSynthesisTaskOutcomeCallable StartSpeechSynthesisTaskCallable(const StartSpeechSynthesisTaskRequestT& request) const {
340 return SubmitCallable(&PollyClient::StartSpeechSynthesisTask, request);
341 }
342
347 template <typename StartSpeechSynthesisTaskRequestT = Model::StartSpeechSynthesisTaskRequest>
348 void StartSpeechSynthesisTaskAsync(const StartSpeechSynthesisTaskRequestT& request,
350 const std::shared_ptr<const Aws::Client::AsyncCallerContext>& context = nullptr) const {
351 return SubmitAsync(&PollyClient::StartSpeechSynthesisTask, request, handler, context);
352 }
353
365
370 template <typename SynthesizeSpeechRequestT = Model::SynthesizeSpeechRequest>
371 Model::SynthesizeSpeechOutcomeCallable SynthesizeSpeechCallable(const SynthesizeSpeechRequestT& request) const {
372 return SubmitCallable(&PollyClient::SynthesizeSpeech, request);
373 }
374
379 template <typename SynthesizeSpeechRequestT = Model::SynthesizeSpeechRequest>
380 void SynthesizeSpeechAsync(const SynthesizeSpeechRequestT& request, const SynthesizeSpeechResponseReceivedHandler& handler,
381 const std::shared_ptr<const Aws::Client::AsyncCallerContext>& context = nullptr) const {
382 return SubmitAsync(&PollyClient::SynthesizeSpeech, request, handler, context);
383 }
384
385 virtual void OverrideEndpoint(const Aws::String& endpoint);
386 virtual std::shared_ptr<PollyEndpointProviderBase>& accessEndpointProvider();
387
388 private:
390 void init(const PollyClientConfiguration& clientConfiguration);
391
393
394 InvokeOperationOutcome InvokeServiceOperation(const AmazonWebServiceRequest& request,
395 const std::function<void(Aws::Endpoint::ResolveEndpointOutcome&)>& resolveUri,
396 Aws::Http::HttpMethod httpMethod) const;
397
398 PollyClientConfiguration m_clientConfiguration;
399 std::shared_ptr<PollyEndpointProviderBase> m_endpointProvider;
400};
401
402} // namespace Polly
403} // namespace Aws
PollyClient(const Aws::Client::ClientConfiguration &clientConfiguration)
virtual Model::GetLexiconOutcome GetLexicon(const Model::GetLexiconRequest &request) const
void DescribeVoicesAsync(const DescribeVoicesResponseReceivedHandler &handler, const std::shared_ptr< const Aws::Client::AsyncCallerContext > &context=nullptr, const DescribeVoicesRequestT &request={}) const
PollyClient(const std::shared_ptr< Aws::Auth::AWSCredentialsProvider > &credentialsProvider, const Aws::Client::ClientConfiguration &clientConfiguration)
void PutLexiconAsync(const PutLexiconRequestT &request, const PutLexiconResponseReceivedHandler &handler, const std::shared_ptr< const Aws::Client::AsyncCallerContext > &context=nullptr) const
void ListSpeechSynthesisTasksAsync(const ListSpeechSynthesisTasksResponseReceivedHandler &handler, const std::shared_ptr< const Aws::Client::AsyncCallerContext > &context=nullptr, const ListSpeechSynthesisTasksRequestT &request={}) const
virtual Model::GetSpeechSynthesisTaskOutcome GetSpeechSynthesisTask(const Model::GetSpeechSynthesisTaskRequest &request) const
virtual Model::PutLexiconOutcome PutLexicon(const Model::PutLexiconRequest &request) const
virtual Model::DescribeVoicesOutcome DescribeVoices(const Model::DescribeVoicesRequest &request={}) const
void ListLexiconsAsync(const ListLexiconsResponseReceivedHandler &handler, const std::shared_ptr< const Aws::Client::AsyncCallerContext > &context=nullptr, const ListLexiconsRequestT &request={}) const
Model::ListSpeechSynthesisTasksOutcomeCallable ListSpeechSynthesisTasksCallable(const ListSpeechSynthesisTasksRequestT &request={}) const
void DeleteLexiconAsync(const DeleteLexiconRequestT &request, const DeleteLexiconResponseReceivedHandler &handler, const std::shared_ptr< const Aws::Client::AsyncCallerContext > &context=nullptr) const
void GetSpeechSynthesisTaskAsync(const GetSpeechSynthesisTaskRequestT &request, const GetSpeechSynthesisTaskResponseReceivedHandler &handler, const std::shared_ptr< const Aws::Client::AsyncCallerContext > &context=nullptr) const
Model::DescribeVoicesOutcomeCallable DescribeVoicesCallable(const DescribeVoicesRequestT &request={}) const
virtual Model::ListLexiconsOutcome ListLexicons(const Model::ListLexiconsRequest &request={}) const
virtual Model::DeleteLexiconOutcome DeleteLexicon(const Model::DeleteLexiconRequest &request) const
virtual Model::StartSpeechSynthesisTaskOutcome StartSpeechSynthesisTask(const Model::StartSpeechSynthesisTaskRequest &request) const
Model::DeleteLexiconOutcomeCallable DeleteLexiconCallable(const DeleteLexiconRequestT &request) const
Definition PollyClient.h:98
Model::StartSpeechSynthesisTaskOutcomeCallable StartSpeechSynthesisTaskCallable(const StartSpeechSynthesisTaskRequestT &request) const
void SynthesizeSpeechAsync(const SynthesizeSpeechRequestT &request, const SynthesizeSpeechResponseReceivedHandler &handler, const std::shared_ptr< const Aws::Client::AsyncCallerContext > &context=nullptr) const
PollyClient(const Aws::Auth::AWSCredentials &credentials, std::shared_ptr< PollyEndpointProviderBase > endpointProvider=nullptr, const Aws::Polly::PollyClientConfiguration &clientConfiguration=Aws::Polly::PollyClientConfiguration())
PollyClient(const std::shared_ptr< Aws::Auth::AWSCredentialsProvider > &credentialsProvider, std::shared_ptr< PollyEndpointProviderBase > endpointProvider=nullptr, const Aws::Polly::PollyClientConfiguration &clientConfiguration=Aws::Polly::PollyClientConfiguration())
virtual Model::ListSpeechSynthesisTasksOutcome ListSpeechSynthesisTasks(const Model::ListSpeechSynthesisTasksRequest &request={}) const
PollyClient(const Aws::Polly::PollyClientConfiguration &clientConfiguration=Aws::Polly::PollyClientConfiguration(), std::shared_ptr< PollyEndpointProviderBase > endpointProvider=nullptr)
static const char * GetAllocationTag()
Model::GetSpeechSynthesisTaskOutcomeCallable GetSpeechSynthesisTaskCallable(const GetSpeechSynthesisTaskRequestT &request) const
virtual void OverrideEndpoint(const Aws::String &endpoint)
PollyClient(const Aws::Auth::AWSCredentials &credentials, const Aws::Client::ClientConfiguration &clientConfiguration)
static const char * GetServiceName()
Model::GetLexiconOutcomeCallable GetLexiconCallable(const GetLexiconRequestT &request) const
PollyClientConfiguration ClientConfigurationType
Definition PollyClient.h:34
virtual void StartSpeechSynthesisStreamAsync(Model::StartSpeechSynthesisStreamRequest &request, const StartSpeechSynthesisStreamStreamReadyHandler &streamReadyHandler, const StartSpeechSynthesisStreamResponseReceivedHandler &handler, const std::shared_ptr< const Aws::Client::AsyncCallerContext > &handlerContext=nullptr) const
void StartSpeechSynthesisTaskAsync(const StartSpeechSynthesisTaskRequestT &request, const StartSpeechSynthesisTaskResponseReceivedHandler &handler, const std::shared_ptr< const Aws::Client::AsyncCallerContext > &context=nullptr) const
virtual Model::SynthesizeSpeechOutcome SynthesizeSpeech(const Model::SynthesizeSpeechRequest &request) const
Model::ListLexiconsOutcomeCallable ListLexiconsCallable(const ListLexiconsRequestT &request={}) const
Aws::Client::AWSJsonClient BASECLASS
Definition PollyClient.h:30
void GetLexiconAsync(const GetLexiconRequestT &request, const GetLexiconResponseReceivedHandler &handler, const std::shared_ptr< const Aws::Client::AsyncCallerContext > &context=nullptr) const
Model::PutLexiconOutcomeCallable PutLexiconCallable(const PutLexiconRequestT &request) const
virtual std::shared_ptr< PollyEndpointProviderBase > & accessEndpointProvider()
Model::SynthesizeSpeechOutcomeCallable SynthesizeSpeechCallable(const SynthesizeSpeechRequestT &request) const
PollyEndpointProvider EndpointProviderType
Definition PollyClient.h:35
std::future< ListSpeechSynthesisTasksOutcome > ListSpeechSynthesisTasksOutcomeCallable
std::future< DeleteLexiconOutcome > DeleteLexiconOutcomeCallable
std::future< GetLexiconOutcome > GetLexiconOutcomeCallable
std::future< PutLexiconOutcome > PutLexiconOutcomeCallable
std::future< GetSpeechSynthesisTaskOutcome > GetSpeechSynthesisTaskOutcomeCallable
std::future< ListLexiconsOutcome > ListLexiconsOutcomeCallable
std::future< SynthesizeSpeechOutcome > SynthesizeSpeechOutcomeCallable
std::future< StartSpeechSynthesisTaskOutcome > StartSpeechSynthesisTaskOutcomeCallable
std::future< DescribeVoicesOutcome > DescribeVoicesOutcomeCallable
std::function< void(Model::StartSpeechSynthesisStreamActionStream &)> StartSpeechSynthesisStreamStreamReadyHandler
std::function< void(const PollyClient *, const Model::StartSpeechSynthesisTaskRequest &, const Model::StartSpeechSynthesisTaskOutcome &, const std::shared_ptr< const Aws::Client::AsyncCallerContext > &)> StartSpeechSynthesisTaskResponseReceivedHandler
std::function< void(const PollyClient *, const Model::DescribeVoicesRequest &, const Model::DescribeVoicesOutcome &, const std::shared_ptr< const Aws::Client::AsyncCallerContext > &)> DescribeVoicesResponseReceivedHandler
std::function< void(const PollyClient *, const Model::SynthesizeSpeechRequest &, Model::SynthesizeSpeechOutcome, const std::shared_ptr< const Aws::Client::AsyncCallerContext > &)> SynthesizeSpeechResponseReceivedHandler
std::function< void(const PollyClient *, const Model::PutLexiconRequest &, const Model::PutLexiconOutcome &, const std::shared_ptr< const Aws::Client::AsyncCallerContext > &)> PutLexiconResponseReceivedHandler
std::function< void(const PollyClient *, const Model::GetLexiconRequest &, const Model::GetLexiconOutcome &, const std::shared_ptr< const Aws::Client::AsyncCallerContext > &)> GetLexiconResponseReceivedHandler
std::function< void(const PollyClient *, const Model::GetSpeechSynthesisTaskRequest &, const Model::GetSpeechSynthesisTaskOutcome &, const std::shared_ptr< const Aws::Client::AsyncCallerContext > &)> GetSpeechSynthesisTaskResponseReceivedHandler
std::function< void(const PollyClient *, const Model::StartSpeechSynthesisStreamRequest &, const Model::StartSpeechSynthesisStreamOutcome &, const std::shared_ptr< const Aws::Client::AsyncCallerContext > &)> StartSpeechSynthesisStreamResponseReceivedHandler
std::function< void(const PollyClient *, const Model::ListSpeechSynthesisTasksRequest &, const Model::ListSpeechSynthesisTasksOutcome &, const std::shared_ptr< const Aws::Client::AsyncCallerContext > &)> ListSpeechSynthesisTasksResponseReceivedHandler
std::function< void(const PollyClient *, const Model::DeleteLexiconRequest &, const Model::DeleteLexiconOutcome &, const std::shared_ptr< const Aws::Client::AsyncCallerContext > &)> DeleteLexiconResponseReceivedHandler
std::function< void(const PollyClient *, const Model::ListLexiconsRequest &, const Model::ListLexiconsOutcome &, const std::shared_ptr< const Aws::Client::AsyncCallerContext > &)> ListLexiconsResponseReceivedHandler
std::basic_string< char, std::char_traits< char >, Aws::Allocator< char > > String