@aws-sdk/client-polly 3.35.0 → 3.38.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (142) hide show
  1. package/CHANGELOG.md +47 -0
  2. package/dist-cjs/Polly.js +0 -9
  3. package/dist-cjs/PollyClient.js +0 -14
  4. package/dist-cjs/commands/DeleteLexiconCommand.js +0 -28
  5. package/dist-cjs/commands/DescribeVoicesCommand.js +0 -43
  6. package/dist-cjs/commands/GetLexiconCommand.js +0 -26
  7. package/dist-cjs/commands/GetSpeechSynthesisTaskCommand.js +0 -28
  8. package/dist-cjs/commands/ListLexiconsCommand.js +0 -25
  9. package/dist-cjs/commands/ListSpeechSynthesisTasksCommand.js +0 -27
  10. package/dist-cjs/commands/PutLexiconCommand.js +0 -30
  11. package/dist-cjs/commands/StartSpeechSynthesisTaskCommand.js +0 -34
  12. package/dist-cjs/commands/SynthesizeSpeechCommand.js +0 -29
  13. package/dist-cjs/commands/index.js +12 -0
  14. package/dist-cjs/endpoints.js +1 -2
  15. package/dist-cjs/index.js +4 -14
  16. package/dist-cjs/models/index.js +0 -1
  17. package/dist-cjs/models/models_0.js +0 -133
  18. package/dist-cjs/pagination/Interfaces.js +0 -1
  19. package/dist-cjs/pagination/ListSpeechSynthesisTasksPaginator.js +0 -11
  20. package/dist-cjs/pagination/index.js +5 -0
  21. package/dist-cjs/protocols/Aws_restJson1.js +0 -6
  22. package/dist-cjs/runtimeConfig.browser.js +1 -6
  23. package/dist-cjs/runtimeConfig.js +2 -7
  24. package/dist-cjs/runtimeConfig.native.js +0 -4
  25. package/dist-cjs/runtimeConfig.shared.js +0 -4
  26. package/dist-es/Polly.js +0 -1
  27. package/dist-es/PollyClient.js +0 -1
  28. package/dist-es/commands/DeleteLexiconCommand.js +0 -1
  29. package/dist-es/commands/DescribeVoicesCommand.js +0 -1
  30. package/dist-es/commands/GetLexiconCommand.js +0 -1
  31. package/dist-es/commands/GetSpeechSynthesisTaskCommand.js +0 -1
  32. package/dist-es/commands/ListLexiconsCommand.js +0 -1
  33. package/dist-es/commands/ListSpeechSynthesisTasksCommand.js +0 -1
  34. package/dist-es/commands/PutLexiconCommand.js +0 -1
  35. package/dist-es/commands/StartSpeechSynthesisTaskCommand.js +0 -1
  36. package/dist-es/commands/SynthesizeSpeechCommand.js +0 -1
  37. package/dist-es/commands/index.js +9 -0
  38. package/dist-es/endpoints.js +1 -2
  39. package/dist-es/index.js +4 -14
  40. package/dist-es/models/index.js +0 -1
  41. package/dist-es/models/models_0.js +0 -1
  42. package/dist-es/pagination/Interfaces.js +0 -1
  43. package/dist-es/pagination/ListSpeechSynthesisTasksPaginator.js +0 -1
  44. package/dist-es/pagination/index.js +2 -0
  45. package/dist-es/protocols/Aws_restJson1.js +0 -1
  46. package/dist-es/runtimeConfig.browser.js +1 -2
  47. package/dist-es/runtimeConfig.js +2 -3
  48. package/dist-es/runtimeConfig.native.js +0 -1
  49. package/dist-es/runtimeConfig.shared.js +0 -1
  50. package/dist-types/commands/index.d.ts +9 -0
  51. package/dist-types/index.d.ts +4 -13
  52. package/dist-types/pagination/index.d.ts +2 -0
  53. package/dist-types/ts3.4/Polly.d.ts +10 -80
  54. package/dist-types/ts3.4/PollyClient.d.ts +24 -94
  55. package/dist-types/ts3.4/commands/DeleteLexiconCommand.d.ts +2 -23
  56. package/dist-types/ts3.4/commands/DescribeVoicesCommand.d.ts +2 -38
  57. package/dist-types/ts3.4/commands/GetLexiconCommand.d.ts +2 -21
  58. package/dist-types/ts3.4/commands/GetSpeechSynthesisTaskCommand.d.ts +2 -23
  59. package/dist-types/ts3.4/commands/ListLexiconsCommand.d.ts +2 -20
  60. package/dist-types/ts3.4/commands/ListSpeechSynthesisTasksCommand.d.ts +2 -22
  61. package/dist-types/ts3.4/commands/PutLexiconCommand.d.ts +2 -25
  62. package/dist-types/ts3.4/commands/StartSpeechSynthesisTaskCommand.d.ts +2 -29
  63. package/dist-types/ts3.4/commands/SynthesizeSpeechCommand.d.ts +2 -24
  64. package/dist-types/ts3.4/commands/index.d.ts +9 -0
  65. package/dist-types/ts3.4/index.d.ts +4 -13
  66. package/dist-types/ts3.4/models/models_0.d.ts +150 -642
  67. package/dist-types/ts3.4/pagination/index.d.ts +2 -0
  68. package/dist-types/ts3.4/runtimeConfig.browser.d.ts +1 -3
  69. package/dist-types/ts3.4/runtimeConfig.d.ts +1 -3
  70. package/dist-types/ts3.4/runtimeConfig.native.d.ts +1 -3
  71. package/dist-types/ts3.4/runtimeConfig.shared.d.ts +1 -3
  72. package/package.json +33 -30
  73. package/dist-cjs/Polly.js.map +0 -1
  74. package/dist-cjs/PollyClient.js.map +0 -1
  75. package/dist-cjs/commands/DeleteLexiconCommand.js.map +0 -1
  76. package/dist-cjs/commands/DescribeVoicesCommand.js.map +0 -1
  77. package/dist-cjs/commands/GetLexiconCommand.js.map +0 -1
  78. package/dist-cjs/commands/GetSpeechSynthesisTaskCommand.js.map +0 -1
  79. package/dist-cjs/commands/ListLexiconsCommand.js.map +0 -1
  80. package/dist-cjs/commands/ListSpeechSynthesisTasksCommand.js.map +0 -1
  81. package/dist-cjs/commands/PutLexiconCommand.js.map +0 -1
  82. package/dist-cjs/commands/StartSpeechSynthesisTaskCommand.js.map +0 -1
  83. package/dist-cjs/commands/SynthesizeSpeechCommand.js.map +0 -1
  84. package/dist-cjs/endpoints.js.map +0 -1
  85. package/dist-cjs/index.js.map +0 -1
  86. package/dist-cjs/models/index.js.map +0 -1
  87. package/dist-cjs/models/models_0.js.map +0 -1
  88. package/dist-cjs/pagination/Interfaces.js.map +0 -1
  89. package/dist-cjs/pagination/ListSpeechSynthesisTasksPaginator.js.map +0 -1
  90. package/dist-cjs/protocols/Aws_restJson1.js.map +0 -1
  91. package/dist-cjs/runtimeConfig.browser.js.map +0 -1
  92. package/dist-cjs/runtimeConfig.js.map +0 -1
  93. package/dist-cjs/runtimeConfig.native.js.map +0 -1
  94. package/dist-cjs/runtimeConfig.shared.js.map +0 -1
  95. package/dist-es/Polly.js.map +0 -1
  96. package/dist-es/PollyClient.js.map +0 -1
  97. package/dist-es/commands/DeleteLexiconCommand.js.map +0 -1
  98. package/dist-es/commands/DescribeVoicesCommand.js.map +0 -1
  99. package/dist-es/commands/GetLexiconCommand.js.map +0 -1
  100. package/dist-es/commands/GetSpeechSynthesisTaskCommand.js.map +0 -1
  101. package/dist-es/commands/ListLexiconsCommand.js.map +0 -1
  102. package/dist-es/commands/ListSpeechSynthesisTasksCommand.js.map +0 -1
  103. package/dist-es/commands/PutLexiconCommand.js.map +0 -1
  104. package/dist-es/commands/StartSpeechSynthesisTaskCommand.js.map +0 -1
  105. package/dist-es/commands/SynthesizeSpeechCommand.js.map +0 -1
  106. package/dist-es/endpoints.js.map +0 -1
  107. package/dist-es/index.js.map +0 -1
  108. package/dist-es/models/index.js.map +0 -1
  109. package/dist-es/models/models_0.js.map +0 -1
  110. package/dist-es/pagination/Interfaces.js.map +0 -1
  111. package/dist-es/pagination/ListSpeechSynthesisTasksPaginator.js.map +0 -1
  112. package/dist-es/protocols/Aws_restJson1.js.map +0 -1
  113. package/dist-es/runtimeConfig.browser.js.map +0 -1
  114. package/dist-es/runtimeConfig.js.map +0 -1
  115. package/dist-es/runtimeConfig.native.js.map +0 -1
  116. package/dist-es/runtimeConfig.shared.js.map +0 -1
  117. package/jest.config.js +0 -4
  118. package/src/Polly.ts +0 -368
  119. package/src/PollyClient.ts +0 -277
  120. package/src/commands/DeleteLexiconCommand.ts +0 -98
  121. package/src/commands/DescribeVoicesCommand.ts +0 -113
  122. package/src/commands/GetLexiconCommand.ts +0 -96
  123. package/src/commands/GetSpeechSynthesisTaskCommand.ts +0 -98
  124. package/src/commands/ListLexiconsCommand.ts +0 -95
  125. package/src/commands/ListSpeechSynthesisTasksCommand.ts +0 -97
  126. package/src/commands/PutLexiconCommand.ts +0 -100
  127. package/src/commands/StartSpeechSynthesisTaskCommand.ts +0 -104
  128. package/src/commands/SynthesizeSpeechCommand.ts +0 -99
  129. package/src/endpoints.ts +0 -82
  130. package/src/index.ts +0 -14
  131. package/src/models/index.ts +0 -1
  132. package/src/models/models_0.ts +0 -1374
  133. package/src/pagination/Interfaces.ts +0 -8
  134. package/src/pagination/ListSpeechSynthesisTasksPaginator.ts +0 -59
  135. package/src/protocols/Aws_restJson1.ts +0 -1712
  136. package/src/runtimeConfig.browser.ts +0 -41
  137. package/src/runtimeConfig.native.ts +0 -17
  138. package/src/runtimeConfig.shared.ts +0 -17
  139. package/src/runtimeConfig.ts +0 -46
  140. package/tsconfig.es.json +0 -10
  141. package/tsconfig.json +0 -33
  142. package/tsconfig.types.json +0 -9
@@ -1,277 +0,0 @@
1
- import {
2
- EndpointsInputConfig,
3
- EndpointsResolvedConfig,
4
- RegionInputConfig,
5
- RegionResolvedConfig,
6
- resolveEndpointsConfig,
7
- resolveRegionConfig,
8
- } from "@aws-sdk/config-resolver";
9
- import { getContentLengthPlugin } from "@aws-sdk/middleware-content-length";
10
- import {
11
- getHostHeaderPlugin,
12
- HostHeaderInputConfig,
13
- HostHeaderResolvedConfig,
14
- resolveHostHeaderConfig,
15
- } from "@aws-sdk/middleware-host-header";
16
- import { getLoggerPlugin } from "@aws-sdk/middleware-logger";
17
- import { getRetryPlugin, resolveRetryConfig, RetryInputConfig, RetryResolvedConfig } from "@aws-sdk/middleware-retry";
18
- import {
19
- AwsAuthInputConfig,
20
- AwsAuthResolvedConfig,
21
- getAwsAuthPlugin,
22
- resolveAwsAuthConfig,
23
- } from "@aws-sdk/middleware-signing";
24
- import {
25
- getUserAgentPlugin,
26
- resolveUserAgentConfig,
27
- UserAgentInputConfig,
28
- UserAgentResolvedConfig,
29
- } from "@aws-sdk/middleware-user-agent";
30
- import { HttpHandler as __HttpHandler } from "@aws-sdk/protocol-http";
31
- import {
32
- Client as __Client,
33
- SmithyConfiguration as __SmithyConfiguration,
34
- SmithyResolvedConfiguration as __SmithyResolvedConfiguration,
35
- } from "@aws-sdk/smithy-client";
36
- import {
37
- Credentials as __Credentials,
38
- Decoder as __Decoder,
39
- Encoder as __Encoder,
40
- Hash as __Hash,
41
- HashConstructor as __HashConstructor,
42
- HttpHandlerOptions as __HttpHandlerOptions,
43
- Logger as __Logger,
44
- Provider as __Provider,
45
- Provider,
46
- RegionInfoProvider,
47
- StreamCollector as __StreamCollector,
48
- UrlParser as __UrlParser,
49
- UserAgent as __UserAgent,
50
- } from "@aws-sdk/types";
51
-
52
- import { DeleteLexiconCommandInput, DeleteLexiconCommandOutput } from "./commands/DeleteLexiconCommand";
53
- import { DescribeVoicesCommandInput, DescribeVoicesCommandOutput } from "./commands/DescribeVoicesCommand";
54
- import { GetLexiconCommandInput, GetLexiconCommandOutput } from "./commands/GetLexiconCommand";
55
- import {
56
- GetSpeechSynthesisTaskCommandInput,
57
- GetSpeechSynthesisTaskCommandOutput,
58
- } from "./commands/GetSpeechSynthesisTaskCommand";
59
- import { ListLexiconsCommandInput, ListLexiconsCommandOutput } from "./commands/ListLexiconsCommand";
60
- import {
61
- ListSpeechSynthesisTasksCommandInput,
62
- ListSpeechSynthesisTasksCommandOutput,
63
- } from "./commands/ListSpeechSynthesisTasksCommand";
64
- import { PutLexiconCommandInput, PutLexiconCommandOutput } from "./commands/PutLexiconCommand";
65
- import {
66
- StartSpeechSynthesisTaskCommandInput,
67
- StartSpeechSynthesisTaskCommandOutput,
68
- } from "./commands/StartSpeechSynthesisTaskCommand";
69
- import { SynthesizeSpeechCommandInput, SynthesizeSpeechCommandOutput } from "./commands/SynthesizeSpeechCommand";
70
- import { getRuntimeConfig as __getRuntimeConfig } from "./runtimeConfig";
71
-
72
- export type ServiceInputTypes =
73
- | DeleteLexiconCommandInput
74
- | DescribeVoicesCommandInput
75
- | GetLexiconCommandInput
76
- | GetSpeechSynthesisTaskCommandInput
77
- | ListLexiconsCommandInput
78
- | ListSpeechSynthesisTasksCommandInput
79
- | PutLexiconCommandInput
80
- | StartSpeechSynthesisTaskCommandInput
81
- | SynthesizeSpeechCommandInput;
82
-
83
- export type ServiceOutputTypes =
84
- | DeleteLexiconCommandOutput
85
- | DescribeVoicesCommandOutput
86
- | GetLexiconCommandOutput
87
- | GetSpeechSynthesisTaskCommandOutput
88
- | ListLexiconsCommandOutput
89
- | ListSpeechSynthesisTasksCommandOutput
90
- | PutLexiconCommandOutput
91
- | StartSpeechSynthesisTaskCommandOutput
92
- | SynthesizeSpeechCommandOutput;
93
-
94
- export interface ClientDefaults extends Partial<__SmithyResolvedConfiguration<__HttpHandlerOptions>> {
95
- /**
96
- * The HTTP handler to use. Fetch in browser and Https in Nodejs.
97
- */
98
- requestHandler?: __HttpHandler;
99
-
100
- /**
101
- * A constructor for a class implementing the {@link __Hash} interface
102
- * that computes the SHA-256 HMAC or checksum of a string or binary buffer.
103
- * @internal
104
- */
105
- sha256?: __HashConstructor;
106
-
107
- /**
108
- * The function that will be used to convert strings into HTTP endpoints.
109
- * @internal
110
- */
111
- urlParser?: __UrlParser;
112
-
113
- /**
114
- * A function that can calculate the length of a request body.
115
- * @internal
116
- */
117
- bodyLengthChecker?: (body: any) => number | undefined;
118
-
119
- /**
120
- * A function that converts a stream into an array of bytes.
121
- * @internal
122
- */
123
- streamCollector?: __StreamCollector;
124
-
125
- /**
126
- * The function that will be used to convert a base64-encoded string to a byte array.
127
- * @internal
128
- */
129
- base64Decoder?: __Decoder;
130
-
131
- /**
132
- * The function that will be used to convert binary data to a base64-encoded string.
133
- * @internal
134
- */
135
- base64Encoder?: __Encoder;
136
-
137
- /**
138
- * The function that will be used to convert a UTF8-encoded string to a byte array.
139
- * @internal
140
- */
141
- utf8Decoder?: __Decoder;
142
-
143
- /**
144
- * The function that will be used to convert binary data to a UTF-8 encoded string.
145
- * @internal
146
- */
147
- utf8Encoder?: __Encoder;
148
-
149
- /**
150
- * The runtime environment.
151
- * @internal
152
- */
153
- runtime?: string;
154
-
155
- /**
156
- * Disable dyanamically changing the endpoint of the client based on the hostPrefix
157
- * trait of an operation.
158
- */
159
- disableHostPrefix?: boolean;
160
-
161
- /**
162
- * Value for how many times a request will be made at most in case of retry.
163
- */
164
- maxAttempts?: number | __Provider<number>;
165
-
166
- /**
167
- * Specifies which retry algorithm to use.
168
- */
169
- retryMode?: string | __Provider<string>;
170
-
171
- /**
172
- * Optional logger for logging debug/info/warn/error.
173
- */
174
- logger?: __Logger;
175
-
176
- /**
177
- * Unique service identifier.
178
- * @internal
179
- */
180
- serviceId?: string;
181
-
182
- /**
183
- * The AWS region to which this client will send requests
184
- */
185
- region?: string | __Provider<string>;
186
-
187
- /**
188
- * Default credentials provider; Not available in browser runtime.
189
- * @internal
190
- */
191
- credentialDefaultProvider?: (input: any) => __Provider<__Credentials>;
192
-
193
- /**
194
- * Fetch related hostname, signing name or signing region with given region.
195
- * @internal
196
- */
197
- regionInfoProvider?: RegionInfoProvider;
198
-
199
- /**
200
- * The provider populating default tracking information to be sent with `user-agent`, `x-amz-user-agent` header
201
- * @internal
202
- */
203
- defaultUserAgentProvider?: Provider<__UserAgent>;
204
- }
205
-
206
- type PollyClientConfigType = Partial<__SmithyConfiguration<__HttpHandlerOptions>> &
207
- ClientDefaults &
208
- RegionInputConfig &
209
- EndpointsInputConfig &
210
- RetryInputConfig &
211
- HostHeaderInputConfig &
212
- AwsAuthInputConfig &
213
- UserAgentInputConfig;
214
- /**
215
- * The configuration interface of PollyClient class constructor that set the region, credentials and other options.
216
- */
217
- export interface PollyClientConfig extends PollyClientConfigType {}
218
-
219
- type PollyClientResolvedConfigType = __SmithyResolvedConfiguration<__HttpHandlerOptions> &
220
- Required<ClientDefaults> &
221
- RegionResolvedConfig &
222
- EndpointsResolvedConfig &
223
- RetryResolvedConfig &
224
- HostHeaderResolvedConfig &
225
- AwsAuthResolvedConfig &
226
- UserAgentResolvedConfig;
227
- /**
228
- * The resolved configuration interface of PollyClient class. This is resolved and normalized from the {@link PollyClientConfig | constructor configuration interface}.
229
- */
230
- export interface PollyClientResolvedConfig extends PollyClientResolvedConfigType {}
231
-
232
- /**
233
- * <p>Amazon Polly is a web service that makes it easy to synthesize speech from
234
- * text.</p>
235
- * <p>The Amazon Polly service provides API operations for synthesizing
236
- * high-quality speech from plain text and Speech Synthesis Markup Language
237
- * (SSML), along with managing pronunciations lexicons that enable you to get
238
- * the best results for your application domain.</p>
239
- */
240
- export class PollyClient extends __Client<
241
- __HttpHandlerOptions,
242
- ServiceInputTypes,
243
- ServiceOutputTypes,
244
- PollyClientResolvedConfig
245
- > {
246
- /**
247
- * The resolved configuration of PollyClient class. This is resolved and normalized from the {@link PollyClientConfig | constructor configuration interface}.
248
- */
249
- readonly config: PollyClientResolvedConfig;
250
-
251
- constructor(configuration: PollyClientConfig) {
252
- const _config_0 = __getRuntimeConfig(configuration);
253
- const _config_1 = resolveRegionConfig(_config_0);
254
- const _config_2 = resolveEndpointsConfig(_config_1);
255
- const _config_3 = resolveRetryConfig(_config_2);
256
- const _config_4 = resolveHostHeaderConfig(_config_3);
257
- const _config_5 = resolveAwsAuthConfig(_config_4);
258
- const _config_6 = resolveUserAgentConfig(_config_5);
259
- super(_config_6);
260
- this.config = _config_6;
261
- this.middlewareStack.use(getRetryPlugin(this.config));
262
- this.middlewareStack.use(getContentLengthPlugin(this.config));
263
- this.middlewareStack.use(getHostHeaderPlugin(this.config));
264
- this.middlewareStack.use(getLoggerPlugin(this.config));
265
- this.middlewareStack.use(getAwsAuthPlugin(this.config));
266
- this.middlewareStack.use(getUserAgentPlugin(this.config));
267
- }
268
-
269
- /**
270
- * Destroy underlying resources, like sockets. It's usually not necessary to do this.
271
- * However in Node.js, it's best to explicitly shut down the client's agent when it is no longer needed.
272
- * Otherwise, sockets might stay open for quite a long time before the server terminates them.
273
- */
274
- destroy(): void {
275
- super.destroy();
276
- }
277
- }
@@ -1,98 +0,0 @@
1
- import { getSerdePlugin } from "@aws-sdk/middleware-serde";
2
- import { HttpRequest as __HttpRequest, HttpResponse as __HttpResponse } from "@aws-sdk/protocol-http";
3
- import { Command as $Command } from "@aws-sdk/smithy-client";
4
- import {
5
- FinalizeHandlerArguments,
6
- Handler,
7
- HandlerExecutionContext,
8
- HttpHandlerOptions as __HttpHandlerOptions,
9
- MetadataBearer as __MetadataBearer,
10
- MiddlewareStack,
11
- SerdeContext as __SerdeContext,
12
- } from "@aws-sdk/types";
13
-
14
- import { DeleteLexiconInput, DeleteLexiconOutput } from "../models/models_0";
15
- import { PollyClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../PollyClient";
16
- import {
17
- deserializeAws_restJson1DeleteLexiconCommand,
18
- serializeAws_restJson1DeleteLexiconCommand,
19
- } from "../protocols/Aws_restJson1";
20
-
21
- export interface DeleteLexiconCommandInput extends DeleteLexiconInput {}
22
- export interface DeleteLexiconCommandOutput extends DeleteLexiconOutput, __MetadataBearer {}
23
-
24
- /**
25
- * <p>Deletes the specified pronunciation lexicon stored in an Amazon Web Services Region. A lexicon which has been deleted is not available for
26
- * speech synthesis, nor is it possible to retrieve it using either the
27
- * <code>GetLexicon</code> or <code>ListLexicon</code> APIs.</p>
28
- * <p>For more information, see <a href="https://docs.aws.amazon.com/polly/latest/dg/managing-lexicons.html">Managing Lexicons</a>.</p>
29
- * @example
30
- * Use a bare-bones client and the command you need to make an API call.
31
- * ```javascript
32
- * import { PollyClient, DeleteLexiconCommand } from "@aws-sdk/client-polly"; // ES Modules import
33
- * // const { PollyClient, DeleteLexiconCommand } = require("@aws-sdk/client-polly"); // CommonJS import
34
- * const client = new PollyClient(config);
35
- * const command = new DeleteLexiconCommand(input);
36
- * const response = await client.send(command);
37
- * ```
38
- *
39
- * @see {@link DeleteLexiconCommandInput} for command's `input` shape.
40
- * @see {@link DeleteLexiconCommandOutput} for command's `response` shape.
41
- * @see {@link PollyClientResolvedConfig | config} for command's `input` shape.
42
- *
43
- */
44
- export class DeleteLexiconCommand extends $Command<
45
- DeleteLexiconCommandInput,
46
- DeleteLexiconCommandOutput,
47
- PollyClientResolvedConfig
48
- > {
49
- // Start section: command_properties
50
- // End section: command_properties
51
-
52
- constructor(readonly input: DeleteLexiconCommandInput) {
53
- // Start section: command_constructor
54
- super();
55
- // End section: command_constructor
56
- }
57
-
58
- /**
59
- * @internal
60
- */
61
- resolveMiddleware(
62
- clientStack: MiddlewareStack<ServiceInputTypes, ServiceOutputTypes>,
63
- configuration: PollyClientResolvedConfig,
64
- options?: __HttpHandlerOptions
65
- ): Handler<DeleteLexiconCommandInput, DeleteLexiconCommandOutput> {
66
- this.middlewareStack.use(getSerdePlugin(configuration, this.serialize, this.deserialize));
67
-
68
- const stack = clientStack.concat(this.middlewareStack);
69
-
70
- const { logger } = configuration;
71
- const clientName = "PollyClient";
72
- const commandName = "DeleteLexiconCommand";
73
- const handlerExecutionContext: HandlerExecutionContext = {
74
- logger,
75
- clientName,
76
- commandName,
77
- inputFilterSensitiveLog: DeleteLexiconInput.filterSensitiveLog,
78
- outputFilterSensitiveLog: DeleteLexiconOutput.filterSensitiveLog,
79
- };
80
- const { requestHandler } = configuration;
81
- return stack.resolve(
82
- (request: FinalizeHandlerArguments<any>) =>
83
- requestHandler.handle(request.request as __HttpRequest, options || {}),
84
- handlerExecutionContext
85
- );
86
- }
87
-
88
- private serialize(input: DeleteLexiconCommandInput, context: __SerdeContext): Promise<__HttpRequest> {
89
- return serializeAws_restJson1DeleteLexiconCommand(input, context);
90
- }
91
-
92
- private deserialize(output: __HttpResponse, context: __SerdeContext): Promise<DeleteLexiconCommandOutput> {
93
- return deserializeAws_restJson1DeleteLexiconCommand(output, context);
94
- }
95
-
96
- // Start section: command_body_extra
97
- // End section: command_body_extra
98
- }
@@ -1,113 +0,0 @@
1
- import { getSerdePlugin } from "@aws-sdk/middleware-serde";
2
- import { HttpRequest as __HttpRequest, HttpResponse as __HttpResponse } from "@aws-sdk/protocol-http";
3
- import { Command as $Command } from "@aws-sdk/smithy-client";
4
- import {
5
- FinalizeHandlerArguments,
6
- Handler,
7
- HandlerExecutionContext,
8
- HttpHandlerOptions as __HttpHandlerOptions,
9
- MetadataBearer as __MetadataBearer,
10
- MiddlewareStack,
11
- SerdeContext as __SerdeContext,
12
- } from "@aws-sdk/types";
13
-
14
- import { DescribeVoicesInput, DescribeVoicesOutput } from "../models/models_0";
15
- import { PollyClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../PollyClient";
16
- import {
17
- deserializeAws_restJson1DescribeVoicesCommand,
18
- serializeAws_restJson1DescribeVoicesCommand,
19
- } from "../protocols/Aws_restJson1";
20
-
21
- export interface DescribeVoicesCommandInput extends DescribeVoicesInput {}
22
- export interface DescribeVoicesCommandOutput extends DescribeVoicesOutput, __MetadataBearer {}
23
-
24
- /**
25
- * <p>Returns the list of voices that are available for use when
26
- * requesting speech synthesis. Each voice speaks a specified language, is
27
- * either male or female, and is identified by an ID, which is the ASCII
28
- * version of the voice name. </p>
29
- *
30
- * <p>When synthesizing speech ( <code>SynthesizeSpeech</code> ), you
31
- * provide the voice ID for the voice you want from the list of voices
32
- * returned by <code>DescribeVoices</code>.</p>
33
- *
34
- * <p>For example, you want your news reader application to read news in
35
- * a specific language, but giving a user the option to choose the voice.
36
- * Using the <code>DescribeVoices</code> operation you can provide the user
37
- * with a list of available voices to select from.</p>
38
- *
39
- * <p> You can optionally specify a language code to filter the available
40
- * voices. For example, if you specify <code>en-US</code>, the operation
41
- * returns a list of all available US English voices. </p>
42
- * <p>This operation requires permissions to perform the
43
- * <code>polly:DescribeVoices</code> action.</p>
44
- * @example
45
- * Use a bare-bones client and the command you need to make an API call.
46
- * ```javascript
47
- * import { PollyClient, DescribeVoicesCommand } from "@aws-sdk/client-polly"; // ES Modules import
48
- * // const { PollyClient, DescribeVoicesCommand } = require("@aws-sdk/client-polly"); // CommonJS import
49
- * const client = new PollyClient(config);
50
- * const command = new DescribeVoicesCommand(input);
51
- * const response = await client.send(command);
52
- * ```
53
- *
54
- * @see {@link DescribeVoicesCommandInput} for command's `input` shape.
55
- * @see {@link DescribeVoicesCommandOutput} for command's `response` shape.
56
- * @see {@link PollyClientResolvedConfig | config} for command's `input` shape.
57
- *
58
- */
59
- export class DescribeVoicesCommand extends $Command<
60
- DescribeVoicesCommandInput,
61
- DescribeVoicesCommandOutput,
62
- PollyClientResolvedConfig
63
- > {
64
- // Start section: command_properties
65
- // End section: command_properties
66
-
67
- constructor(readonly input: DescribeVoicesCommandInput) {
68
- // Start section: command_constructor
69
- super();
70
- // End section: command_constructor
71
- }
72
-
73
- /**
74
- * @internal
75
- */
76
- resolveMiddleware(
77
- clientStack: MiddlewareStack<ServiceInputTypes, ServiceOutputTypes>,
78
- configuration: PollyClientResolvedConfig,
79
- options?: __HttpHandlerOptions
80
- ): Handler<DescribeVoicesCommandInput, DescribeVoicesCommandOutput> {
81
- this.middlewareStack.use(getSerdePlugin(configuration, this.serialize, this.deserialize));
82
-
83
- const stack = clientStack.concat(this.middlewareStack);
84
-
85
- const { logger } = configuration;
86
- const clientName = "PollyClient";
87
- const commandName = "DescribeVoicesCommand";
88
- const handlerExecutionContext: HandlerExecutionContext = {
89
- logger,
90
- clientName,
91
- commandName,
92
- inputFilterSensitiveLog: DescribeVoicesInput.filterSensitiveLog,
93
- outputFilterSensitiveLog: DescribeVoicesOutput.filterSensitiveLog,
94
- };
95
- const { requestHandler } = configuration;
96
- return stack.resolve(
97
- (request: FinalizeHandlerArguments<any>) =>
98
- requestHandler.handle(request.request as __HttpRequest, options || {}),
99
- handlerExecutionContext
100
- );
101
- }
102
-
103
- private serialize(input: DescribeVoicesCommandInput, context: __SerdeContext): Promise<__HttpRequest> {
104
- return serializeAws_restJson1DescribeVoicesCommand(input, context);
105
- }
106
-
107
- private deserialize(output: __HttpResponse, context: __SerdeContext): Promise<DescribeVoicesCommandOutput> {
108
- return deserializeAws_restJson1DescribeVoicesCommand(output, context);
109
- }
110
-
111
- // Start section: command_body_extra
112
- // End section: command_body_extra
113
- }
@@ -1,96 +0,0 @@
1
- import { getSerdePlugin } from "@aws-sdk/middleware-serde";
2
- import { HttpRequest as __HttpRequest, HttpResponse as __HttpResponse } from "@aws-sdk/protocol-http";
3
- import { Command as $Command } from "@aws-sdk/smithy-client";
4
- import {
5
- FinalizeHandlerArguments,
6
- Handler,
7
- HandlerExecutionContext,
8
- HttpHandlerOptions as __HttpHandlerOptions,
9
- MetadataBearer as __MetadataBearer,
10
- MiddlewareStack,
11
- SerdeContext as __SerdeContext,
12
- } from "@aws-sdk/types";
13
-
14
- import { GetLexiconInput, GetLexiconOutput } from "../models/models_0";
15
- import { PollyClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../PollyClient";
16
- import {
17
- deserializeAws_restJson1GetLexiconCommand,
18
- serializeAws_restJson1GetLexiconCommand,
19
- } from "../protocols/Aws_restJson1";
20
-
21
- export interface GetLexiconCommandInput extends GetLexiconInput {}
22
- export interface GetLexiconCommandOutput extends GetLexiconOutput, __MetadataBearer {}
23
-
24
- /**
25
- * <p>Returns the content of the specified pronunciation lexicon stored
26
- * in an Amazon Web Services Region. For more information, see <a href="https://docs.aws.amazon.com/polly/latest/dg/managing-lexicons.html">Managing Lexicons</a>.</p>
27
- * @example
28
- * Use a bare-bones client and the command you need to make an API call.
29
- * ```javascript
30
- * import { PollyClient, GetLexiconCommand } from "@aws-sdk/client-polly"; // ES Modules import
31
- * // const { PollyClient, GetLexiconCommand } = require("@aws-sdk/client-polly"); // CommonJS import
32
- * const client = new PollyClient(config);
33
- * const command = new GetLexiconCommand(input);
34
- * const response = await client.send(command);
35
- * ```
36
- *
37
- * @see {@link GetLexiconCommandInput} for command's `input` shape.
38
- * @see {@link GetLexiconCommandOutput} for command's `response` shape.
39
- * @see {@link PollyClientResolvedConfig | config} for command's `input` shape.
40
- *
41
- */
42
- export class GetLexiconCommand extends $Command<
43
- GetLexiconCommandInput,
44
- GetLexiconCommandOutput,
45
- PollyClientResolvedConfig
46
- > {
47
- // Start section: command_properties
48
- // End section: command_properties
49
-
50
- constructor(readonly input: GetLexiconCommandInput) {
51
- // Start section: command_constructor
52
- super();
53
- // End section: command_constructor
54
- }
55
-
56
- /**
57
- * @internal
58
- */
59
- resolveMiddleware(
60
- clientStack: MiddlewareStack<ServiceInputTypes, ServiceOutputTypes>,
61
- configuration: PollyClientResolvedConfig,
62
- options?: __HttpHandlerOptions
63
- ): Handler<GetLexiconCommandInput, GetLexiconCommandOutput> {
64
- this.middlewareStack.use(getSerdePlugin(configuration, this.serialize, this.deserialize));
65
-
66
- const stack = clientStack.concat(this.middlewareStack);
67
-
68
- const { logger } = configuration;
69
- const clientName = "PollyClient";
70
- const commandName = "GetLexiconCommand";
71
- const handlerExecutionContext: HandlerExecutionContext = {
72
- logger,
73
- clientName,
74
- commandName,
75
- inputFilterSensitiveLog: GetLexiconInput.filterSensitiveLog,
76
- outputFilterSensitiveLog: GetLexiconOutput.filterSensitiveLog,
77
- };
78
- const { requestHandler } = configuration;
79
- return stack.resolve(
80
- (request: FinalizeHandlerArguments<any>) =>
81
- requestHandler.handle(request.request as __HttpRequest, options || {}),
82
- handlerExecutionContext
83
- );
84
- }
85
-
86
- private serialize(input: GetLexiconCommandInput, context: __SerdeContext): Promise<__HttpRequest> {
87
- return serializeAws_restJson1GetLexiconCommand(input, context);
88
- }
89
-
90
- private deserialize(output: __HttpResponse, context: __SerdeContext): Promise<GetLexiconCommandOutput> {
91
- return deserializeAws_restJson1GetLexiconCommand(output, context);
92
- }
93
-
94
- // Start section: command_body_extra
95
- // End section: command_body_extra
96
- }
@@ -1,98 +0,0 @@
1
- import { getSerdePlugin } from "@aws-sdk/middleware-serde";
2
- import { HttpRequest as __HttpRequest, HttpResponse as __HttpResponse } from "@aws-sdk/protocol-http";
3
- import { Command as $Command } from "@aws-sdk/smithy-client";
4
- import {
5
- FinalizeHandlerArguments,
6
- Handler,
7
- HandlerExecutionContext,
8
- HttpHandlerOptions as __HttpHandlerOptions,
9
- MetadataBearer as __MetadataBearer,
10
- MiddlewareStack,
11
- SerdeContext as __SerdeContext,
12
- } from "@aws-sdk/types";
13
-
14
- import { GetSpeechSynthesisTaskInput, GetSpeechSynthesisTaskOutput } from "../models/models_0";
15
- import { PollyClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../PollyClient";
16
- import {
17
- deserializeAws_restJson1GetSpeechSynthesisTaskCommand,
18
- serializeAws_restJson1GetSpeechSynthesisTaskCommand,
19
- } from "../protocols/Aws_restJson1";
20
-
21
- export interface GetSpeechSynthesisTaskCommandInput extends GetSpeechSynthesisTaskInput {}
22
- export interface GetSpeechSynthesisTaskCommandOutput extends GetSpeechSynthesisTaskOutput, __MetadataBearer {}
23
-
24
- /**
25
- * <p>Retrieves a specific SpeechSynthesisTask object based on its TaskID.
26
- * This object contains information about the given speech synthesis task,
27
- * including the status of the task, and a link to the S3 bucket containing
28
- * the output of the task.</p>
29
- * @example
30
- * Use a bare-bones client and the command you need to make an API call.
31
- * ```javascript
32
- * import { PollyClient, GetSpeechSynthesisTaskCommand } from "@aws-sdk/client-polly"; // ES Modules import
33
- * // const { PollyClient, GetSpeechSynthesisTaskCommand } = require("@aws-sdk/client-polly"); // CommonJS import
34
- * const client = new PollyClient(config);
35
- * const command = new GetSpeechSynthesisTaskCommand(input);
36
- * const response = await client.send(command);
37
- * ```
38
- *
39
- * @see {@link GetSpeechSynthesisTaskCommandInput} for command's `input` shape.
40
- * @see {@link GetSpeechSynthesisTaskCommandOutput} for command's `response` shape.
41
- * @see {@link PollyClientResolvedConfig | config} for command's `input` shape.
42
- *
43
- */
44
- export class GetSpeechSynthesisTaskCommand extends $Command<
45
- GetSpeechSynthesisTaskCommandInput,
46
- GetSpeechSynthesisTaskCommandOutput,
47
- PollyClientResolvedConfig
48
- > {
49
- // Start section: command_properties
50
- // End section: command_properties
51
-
52
- constructor(readonly input: GetSpeechSynthesisTaskCommandInput) {
53
- // Start section: command_constructor
54
- super();
55
- // End section: command_constructor
56
- }
57
-
58
- /**
59
- * @internal
60
- */
61
- resolveMiddleware(
62
- clientStack: MiddlewareStack<ServiceInputTypes, ServiceOutputTypes>,
63
- configuration: PollyClientResolvedConfig,
64
- options?: __HttpHandlerOptions
65
- ): Handler<GetSpeechSynthesisTaskCommandInput, GetSpeechSynthesisTaskCommandOutput> {
66
- this.middlewareStack.use(getSerdePlugin(configuration, this.serialize, this.deserialize));
67
-
68
- const stack = clientStack.concat(this.middlewareStack);
69
-
70
- const { logger } = configuration;
71
- const clientName = "PollyClient";
72
- const commandName = "GetSpeechSynthesisTaskCommand";
73
- const handlerExecutionContext: HandlerExecutionContext = {
74
- logger,
75
- clientName,
76
- commandName,
77
- inputFilterSensitiveLog: GetSpeechSynthesisTaskInput.filterSensitiveLog,
78
- outputFilterSensitiveLog: GetSpeechSynthesisTaskOutput.filterSensitiveLog,
79
- };
80
- const { requestHandler } = configuration;
81
- return stack.resolve(
82
- (request: FinalizeHandlerArguments<any>) =>
83
- requestHandler.handle(request.request as __HttpRequest, options || {}),
84
- handlerExecutionContext
85
- );
86
- }
87
-
88
- private serialize(input: GetSpeechSynthesisTaskCommandInput, context: __SerdeContext): Promise<__HttpRequest> {
89
- return serializeAws_restJson1GetSpeechSynthesisTaskCommand(input, context);
90
- }
91
-
92
- private deserialize(output: __HttpResponse, context: __SerdeContext): Promise<GetSpeechSynthesisTaskCommandOutput> {
93
- return deserializeAws_restJson1GetSpeechSynthesisTaskCommand(output, context);
94
- }
95
-
96
- // Start section: command_body_extra
97
- // End section: command_body_extra
98
- }