@aws-sdk/client-polly 3.306.0 → 3.309.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.
- package/dist-cjs/commands/DeleteLexiconCommand.js +2 -2
- package/dist-cjs/commands/DescribeVoicesCommand.js +2 -2
- package/dist-cjs/commands/GetLexiconCommand.js +2 -2
- package/dist-cjs/commands/GetSpeechSynthesisTaskCommand.js +2 -2
- package/dist-cjs/commands/ListLexiconsCommand.js +2 -2
- package/dist-cjs/commands/ListSpeechSynthesisTasksCommand.js +2 -2
- package/dist-cjs/commands/PutLexiconCommand.js +2 -2
- package/dist-cjs/commands/StartSpeechSynthesisTaskCommand.js +2 -2
- package/dist-cjs/commands/SynthesizeSpeechCommand.js +2 -2
- package/dist-cjs/protocols/Aws_restJson1.js +150 -164
- package/dist-es/commands/DeleteLexiconCommand.js +3 -3
- package/dist-es/commands/DescribeVoicesCommand.js +3 -3
- package/dist-es/commands/GetLexiconCommand.js +3 -3
- package/dist-es/commands/GetSpeechSynthesisTaskCommand.js +3 -3
- package/dist-es/commands/ListLexiconsCommand.js +3 -3
- package/dist-es/commands/ListSpeechSynthesisTasksCommand.js +3 -3
- package/dist-es/commands/PutLexiconCommand.js +3 -3
- package/dist-es/commands/StartSpeechSynthesisTaskCommand.js +3 -3
- package/dist-es/commands/SynthesizeSpeechCommand.js +3 -3
- package/dist-es/protocols/Aws_restJson1.js +131 -145
- package/dist-types/protocols/Aws_restJson1.d.ts +72 -18
- package/dist-types/ts3.4/protocols/Aws_restJson1.d.ts +18 -18
- package/package.json +6 -6
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.
|
|
3
|
+
exports.de_SynthesizeSpeechCommand = exports.de_StartSpeechSynthesisTaskCommand = exports.de_PutLexiconCommand = exports.de_ListSpeechSynthesisTasksCommand = exports.de_ListLexiconsCommand = exports.de_GetSpeechSynthesisTaskCommand = exports.de_GetLexiconCommand = exports.de_DescribeVoicesCommand = exports.de_DeleteLexiconCommand = exports.se_SynthesizeSpeechCommand = exports.se_StartSpeechSynthesisTaskCommand = exports.se_PutLexiconCommand = exports.se_ListSpeechSynthesisTasksCommand = exports.se_ListLexiconsCommand = exports.se_GetSpeechSynthesisTaskCommand = exports.se_GetLexiconCommand = exports.se_DescribeVoicesCommand = exports.se_DeleteLexiconCommand = void 0;
|
|
4
4
|
const protocol_http_1 = require("@aws-sdk/protocol-http");
|
|
5
5
|
const smithy_client_1 = require("@aws-sdk/smithy-client");
|
|
6
6
|
const models_0_1 = require("../models/models_0");
|
|
7
7
|
const PollyServiceException_1 = require("../models/PollyServiceException");
|
|
8
|
-
const
|
|
8
|
+
const se_DeleteLexiconCommand = async (input, context) => {
|
|
9
9
|
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
10
10
|
const headers = {};
|
|
11
11
|
let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/v1/lexicons/{Name}";
|
|
@@ -21,8 +21,8 @@ const serializeAws_restJson1DeleteLexiconCommand = async (input, context) => {
|
|
|
21
21
|
body,
|
|
22
22
|
});
|
|
23
23
|
};
|
|
24
|
-
exports.
|
|
25
|
-
const
|
|
24
|
+
exports.se_DeleteLexiconCommand = se_DeleteLexiconCommand;
|
|
25
|
+
const se_DescribeVoicesCommand = async (input, context) => {
|
|
26
26
|
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
27
27
|
const headers = {};
|
|
28
28
|
const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/v1/voices";
|
|
@@ -47,8 +47,8 @@ const serializeAws_restJson1DescribeVoicesCommand = async (input, context) => {
|
|
|
47
47
|
body,
|
|
48
48
|
});
|
|
49
49
|
};
|
|
50
|
-
exports.
|
|
51
|
-
const
|
|
50
|
+
exports.se_DescribeVoicesCommand = se_DescribeVoicesCommand;
|
|
51
|
+
const se_GetLexiconCommand = async (input, context) => {
|
|
52
52
|
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
53
53
|
const headers = {};
|
|
54
54
|
let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/v1/lexicons/{Name}";
|
|
@@ -64,8 +64,8 @@ const serializeAws_restJson1GetLexiconCommand = async (input, context) => {
|
|
|
64
64
|
body,
|
|
65
65
|
});
|
|
66
66
|
};
|
|
67
|
-
exports.
|
|
68
|
-
const
|
|
67
|
+
exports.se_GetLexiconCommand = se_GetLexiconCommand;
|
|
68
|
+
const se_GetSpeechSynthesisTaskCommand = async (input, context) => {
|
|
69
69
|
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
70
70
|
const headers = {};
|
|
71
71
|
let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/v1/synthesisTasks/{TaskId}";
|
|
@@ -81,8 +81,8 @@ const serializeAws_restJson1GetSpeechSynthesisTaskCommand = async (input, contex
|
|
|
81
81
|
body,
|
|
82
82
|
});
|
|
83
83
|
};
|
|
84
|
-
exports.
|
|
85
|
-
const
|
|
84
|
+
exports.se_GetSpeechSynthesisTaskCommand = se_GetSpeechSynthesisTaskCommand;
|
|
85
|
+
const se_ListLexiconsCommand = async (input, context) => {
|
|
86
86
|
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
87
87
|
const headers = {};
|
|
88
88
|
const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/v1/lexicons";
|
|
@@ -101,8 +101,8 @@ const serializeAws_restJson1ListLexiconsCommand = async (input, context) => {
|
|
|
101
101
|
body,
|
|
102
102
|
});
|
|
103
103
|
};
|
|
104
|
-
exports.
|
|
105
|
-
const
|
|
104
|
+
exports.se_ListLexiconsCommand = se_ListLexiconsCommand;
|
|
105
|
+
const se_ListSpeechSynthesisTasksCommand = async (input, context) => {
|
|
106
106
|
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
107
107
|
const headers = {};
|
|
108
108
|
const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/v1/synthesisTasks";
|
|
@@ -123,8 +123,8 @@ const serializeAws_restJson1ListSpeechSynthesisTasksCommand = async (input, cont
|
|
|
123
123
|
body,
|
|
124
124
|
});
|
|
125
125
|
};
|
|
126
|
-
exports.
|
|
127
|
-
const
|
|
126
|
+
exports.se_ListSpeechSynthesisTasksCommand = se_ListSpeechSynthesisTasksCommand;
|
|
127
|
+
const se_PutLexiconCommand = async (input, context) => {
|
|
128
128
|
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
129
129
|
const headers = {
|
|
130
130
|
"content-type": "application/json",
|
|
@@ -145,8 +145,8 @@ const serializeAws_restJson1PutLexiconCommand = async (input, context) => {
|
|
|
145
145
|
body,
|
|
146
146
|
});
|
|
147
147
|
};
|
|
148
|
-
exports.
|
|
149
|
-
const
|
|
148
|
+
exports.se_PutLexiconCommand = se_PutLexiconCommand;
|
|
149
|
+
const se_StartSpeechSynthesisTaskCommand = async (input, context) => {
|
|
150
150
|
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
151
151
|
const headers = {
|
|
152
152
|
"content-type": "application/json",
|
|
@@ -156,17 +156,13 @@ const serializeAws_restJson1StartSpeechSynthesisTaskCommand = async (input, cont
|
|
|
156
156
|
body = JSON.stringify({
|
|
157
157
|
...(input.Engine != null && { Engine: input.Engine }),
|
|
158
158
|
...(input.LanguageCode != null && { LanguageCode: input.LanguageCode }),
|
|
159
|
-
...(input.LexiconNames != null && {
|
|
160
|
-
LexiconNames: serializeAws_restJson1LexiconNameList(input.LexiconNames, context),
|
|
161
|
-
}),
|
|
159
|
+
...(input.LexiconNames != null && { LexiconNames: se_LexiconNameList(input.LexiconNames, context) }),
|
|
162
160
|
...(input.OutputFormat != null && { OutputFormat: input.OutputFormat }),
|
|
163
161
|
...(input.OutputS3BucketName != null && { OutputS3BucketName: input.OutputS3BucketName }),
|
|
164
162
|
...(input.OutputS3KeyPrefix != null && { OutputS3KeyPrefix: input.OutputS3KeyPrefix }),
|
|
165
163
|
...(input.SampleRate != null && { SampleRate: input.SampleRate }),
|
|
166
164
|
...(input.SnsTopicArn != null && { SnsTopicArn: input.SnsTopicArn }),
|
|
167
|
-
...(input.SpeechMarkTypes != null && {
|
|
168
|
-
SpeechMarkTypes: serializeAws_restJson1SpeechMarkTypeList(input.SpeechMarkTypes, context),
|
|
169
|
-
}),
|
|
165
|
+
...(input.SpeechMarkTypes != null && { SpeechMarkTypes: se_SpeechMarkTypeList(input.SpeechMarkTypes, context) }),
|
|
170
166
|
...(input.Text != null && { Text: input.Text }),
|
|
171
167
|
...(input.TextType != null && { TextType: input.TextType }),
|
|
172
168
|
...(input.VoiceId != null && { VoiceId: input.VoiceId }),
|
|
@@ -181,8 +177,8 @@ const serializeAws_restJson1StartSpeechSynthesisTaskCommand = async (input, cont
|
|
|
181
177
|
body,
|
|
182
178
|
});
|
|
183
179
|
};
|
|
184
|
-
exports.
|
|
185
|
-
const
|
|
180
|
+
exports.se_StartSpeechSynthesisTaskCommand = se_StartSpeechSynthesisTaskCommand;
|
|
181
|
+
const se_SynthesizeSpeechCommand = async (input, context) => {
|
|
186
182
|
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
187
183
|
const headers = {
|
|
188
184
|
"content-type": "application/json",
|
|
@@ -192,14 +188,10 @@ const serializeAws_restJson1SynthesizeSpeechCommand = async (input, context) =>
|
|
|
192
188
|
body = JSON.stringify({
|
|
193
189
|
...(input.Engine != null && { Engine: input.Engine }),
|
|
194
190
|
...(input.LanguageCode != null && { LanguageCode: input.LanguageCode }),
|
|
195
|
-
...(input.LexiconNames != null && {
|
|
196
|
-
LexiconNames: serializeAws_restJson1LexiconNameList(input.LexiconNames, context),
|
|
197
|
-
}),
|
|
191
|
+
...(input.LexiconNames != null && { LexiconNames: se_LexiconNameList(input.LexiconNames, context) }),
|
|
198
192
|
...(input.OutputFormat != null && { OutputFormat: input.OutputFormat }),
|
|
199
193
|
...(input.SampleRate != null && { SampleRate: input.SampleRate }),
|
|
200
|
-
...(input.SpeechMarkTypes != null && {
|
|
201
|
-
SpeechMarkTypes: serializeAws_restJson1SpeechMarkTypeList(input.SpeechMarkTypes, context),
|
|
202
|
-
}),
|
|
194
|
+
...(input.SpeechMarkTypes != null && { SpeechMarkTypes: se_SpeechMarkTypeList(input.SpeechMarkTypes, context) }),
|
|
203
195
|
...(input.Text != null && { Text: input.Text }),
|
|
204
196
|
...(input.TextType != null && { TextType: input.TextType }),
|
|
205
197
|
...(input.VoiceId != null && { VoiceId: input.VoiceId }),
|
|
@@ -214,10 +206,10 @@ const serializeAws_restJson1SynthesizeSpeechCommand = async (input, context) =>
|
|
|
214
206
|
body,
|
|
215
207
|
});
|
|
216
208
|
};
|
|
217
|
-
exports.
|
|
218
|
-
const
|
|
209
|
+
exports.se_SynthesizeSpeechCommand = se_SynthesizeSpeechCommand;
|
|
210
|
+
const de_DeleteLexiconCommand = async (output, context) => {
|
|
219
211
|
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
220
|
-
return
|
|
212
|
+
return de_DeleteLexiconCommandError(output, context);
|
|
221
213
|
}
|
|
222
214
|
const contents = map({
|
|
223
215
|
$metadata: deserializeMetadata(output),
|
|
@@ -225,8 +217,8 @@ const deserializeAws_restJson1DeleteLexiconCommand = async (output, context) =>
|
|
|
225
217
|
await collectBody(output.body, context);
|
|
226
218
|
return contents;
|
|
227
219
|
};
|
|
228
|
-
exports.
|
|
229
|
-
const
|
|
220
|
+
exports.de_DeleteLexiconCommand = de_DeleteLexiconCommand;
|
|
221
|
+
const de_DeleteLexiconCommandError = async (output, context) => {
|
|
230
222
|
const parsedOutput = {
|
|
231
223
|
...output,
|
|
232
224
|
body: await parseErrorBody(output.body, context),
|
|
@@ -235,10 +227,10 @@ const deserializeAws_restJson1DeleteLexiconCommandError = async (output, context
|
|
|
235
227
|
switch (errorCode) {
|
|
236
228
|
case "LexiconNotFoundException":
|
|
237
229
|
case "com.amazonaws.polly#LexiconNotFoundException":
|
|
238
|
-
throw await
|
|
230
|
+
throw await de_LexiconNotFoundExceptionRes(parsedOutput, context);
|
|
239
231
|
case "ServiceFailureException":
|
|
240
232
|
case "com.amazonaws.polly#ServiceFailureException":
|
|
241
|
-
throw await
|
|
233
|
+
throw await de_ServiceFailureExceptionRes(parsedOutput, context);
|
|
242
234
|
default:
|
|
243
235
|
const parsedBody = parsedOutput.body;
|
|
244
236
|
(0, smithy_client_1.throwDefaultError)({
|
|
@@ -249,9 +241,9 @@ const deserializeAws_restJson1DeleteLexiconCommandError = async (output, context
|
|
|
249
241
|
});
|
|
250
242
|
}
|
|
251
243
|
};
|
|
252
|
-
const
|
|
244
|
+
const de_DescribeVoicesCommand = async (output, context) => {
|
|
253
245
|
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
254
|
-
return
|
|
246
|
+
return de_DescribeVoicesCommandError(output, context);
|
|
255
247
|
}
|
|
256
248
|
const contents = map({
|
|
257
249
|
$metadata: deserializeMetadata(output),
|
|
@@ -261,12 +253,12 @@ const deserializeAws_restJson1DescribeVoicesCommand = async (output, context) =>
|
|
|
261
253
|
contents.NextToken = (0, smithy_client_1.expectString)(data.NextToken);
|
|
262
254
|
}
|
|
263
255
|
if (data.Voices != null) {
|
|
264
|
-
contents.Voices =
|
|
256
|
+
contents.Voices = de_VoiceList(data.Voices, context);
|
|
265
257
|
}
|
|
266
258
|
return contents;
|
|
267
259
|
};
|
|
268
|
-
exports.
|
|
269
|
-
const
|
|
260
|
+
exports.de_DescribeVoicesCommand = de_DescribeVoicesCommand;
|
|
261
|
+
const de_DescribeVoicesCommandError = async (output, context) => {
|
|
270
262
|
const parsedOutput = {
|
|
271
263
|
...output,
|
|
272
264
|
body: await parseErrorBody(output.body, context),
|
|
@@ -275,10 +267,10 @@ const deserializeAws_restJson1DescribeVoicesCommandError = async (output, contex
|
|
|
275
267
|
switch (errorCode) {
|
|
276
268
|
case "InvalidNextTokenException":
|
|
277
269
|
case "com.amazonaws.polly#InvalidNextTokenException":
|
|
278
|
-
throw await
|
|
270
|
+
throw await de_InvalidNextTokenExceptionRes(parsedOutput, context);
|
|
279
271
|
case "ServiceFailureException":
|
|
280
272
|
case "com.amazonaws.polly#ServiceFailureException":
|
|
281
|
-
throw await
|
|
273
|
+
throw await de_ServiceFailureExceptionRes(parsedOutput, context);
|
|
282
274
|
default:
|
|
283
275
|
const parsedBody = parsedOutput.body;
|
|
284
276
|
(0, smithy_client_1.throwDefaultError)({
|
|
@@ -289,24 +281,24 @@ const deserializeAws_restJson1DescribeVoicesCommandError = async (output, contex
|
|
|
289
281
|
});
|
|
290
282
|
}
|
|
291
283
|
};
|
|
292
|
-
const
|
|
284
|
+
const de_GetLexiconCommand = async (output, context) => {
|
|
293
285
|
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
294
|
-
return
|
|
286
|
+
return de_GetLexiconCommandError(output, context);
|
|
295
287
|
}
|
|
296
288
|
const contents = map({
|
|
297
289
|
$metadata: deserializeMetadata(output),
|
|
298
290
|
});
|
|
299
291
|
const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
|
|
300
292
|
if (data.Lexicon != null) {
|
|
301
|
-
contents.Lexicon =
|
|
293
|
+
contents.Lexicon = de_Lexicon(data.Lexicon, context);
|
|
302
294
|
}
|
|
303
295
|
if (data.LexiconAttributes != null) {
|
|
304
|
-
contents.LexiconAttributes =
|
|
296
|
+
contents.LexiconAttributes = de_LexiconAttributes(data.LexiconAttributes, context);
|
|
305
297
|
}
|
|
306
298
|
return contents;
|
|
307
299
|
};
|
|
308
|
-
exports.
|
|
309
|
-
const
|
|
300
|
+
exports.de_GetLexiconCommand = de_GetLexiconCommand;
|
|
301
|
+
const de_GetLexiconCommandError = async (output, context) => {
|
|
310
302
|
const parsedOutput = {
|
|
311
303
|
...output,
|
|
312
304
|
body: await parseErrorBody(output.body, context),
|
|
@@ -315,10 +307,10 @@ const deserializeAws_restJson1GetLexiconCommandError = async (output, context) =
|
|
|
315
307
|
switch (errorCode) {
|
|
316
308
|
case "LexiconNotFoundException":
|
|
317
309
|
case "com.amazonaws.polly#LexiconNotFoundException":
|
|
318
|
-
throw await
|
|
310
|
+
throw await de_LexiconNotFoundExceptionRes(parsedOutput, context);
|
|
319
311
|
case "ServiceFailureException":
|
|
320
312
|
case "com.amazonaws.polly#ServiceFailureException":
|
|
321
|
-
throw await
|
|
313
|
+
throw await de_ServiceFailureExceptionRes(parsedOutput, context);
|
|
322
314
|
default:
|
|
323
315
|
const parsedBody = parsedOutput.body;
|
|
324
316
|
(0, smithy_client_1.throwDefaultError)({
|
|
@@ -329,21 +321,21 @@ const deserializeAws_restJson1GetLexiconCommandError = async (output, context) =
|
|
|
329
321
|
});
|
|
330
322
|
}
|
|
331
323
|
};
|
|
332
|
-
const
|
|
324
|
+
const de_GetSpeechSynthesisTaskCommand = async (output, context) => {
|
|
333
325
|
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
334
|
-
return
|
|
326
|
+
return de_GetSpeechSynthesisTaskCommandError(output, context);
|
|
335
327
|
}
|
|
336
328
|
const contents = map({
|
|
337
329
|
$metadata: deserializeMetadata(output),
|
|
338
330
|
});
|
|
339
331
|
const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
|
|
340
332
|
if (data.SynthesisTask != null) {
|
|
341
|
-
contents.SynthesisTask =
|
|
333
|
+
contents.SynthesisTask = de_SynthesisTask(data.SynthesisTask, context);
|
|
342
334
|
}
|
|
343
335
|
return contents;
|
|
344
336
|
};
|
|
345
|
-
exports.
|
|
346
|
-
const
|
|
337
|
+
exports.de_GetSpeechSynthesisTaskCommand = de_GetSpeechSynthesisTaskCommand;
|
|
338
|
+
const de_GetSpeechSynthesisTaskCommandError = async (output, context) => {
|
|
347
339
|
const parsedOutput = {
|
|
348
340
|
...output,
|
|
349
341
|
body: await parseErrorBody(output.body, context),
|
|
@@ -352,13 +344,13 @@ const deserializeAws_restJson1GetSpeechSynthesisTaskCommandError = async (output
|
|
|
352
344
|
switch (errorCode) {
|
|
353
345
|
case "InvalidTaskIdException":
|
|
354
346
|
case "com.amazonaws.polly#InvalidTaskIdException":
|
|
355
|
-
throw await
|
|
347
|
+
throw await de_InvalidTaskIdExceptionRes(parsedOutput, context);
|
|
356
348
|
case "ServiceFailureException":
|
|
357
349
|
case "com.amazonaws.polly#ServiceFailureException":
|
|
358
|
-
throw await
|
|
350
|
+
throw await de_ServiceFailureExceptionRes(parsedOutput, context);
|
|
359
351
|
case "SynthesisTaskNotFoundException":
|
|
360
352
|
case "com.amazonaws.polly#SynthesisTaskNotFoundException":
|
|
361
|
-
throw await
|
|
353
|
+
throw await de_SynthesisTaskNotFoundExceptionRes(parsedOutput, context);
|
|
362
354
|
default:
|
|
363
355
|
const parsedBody = parsedOutput.body;
|
|
364
356
|
(0, smithy_client_1.throwDefaultError)({
|
|
@@ -369,24 +361,24 @@ const deserializeAws_restJson1GetSpeechSynthesisTaskCommandError = async (output
|
|
|
369
361
|
});
|
|
370
362
|
}
|
|
371
363
|
};
|
|
372
|
-
const
|
|
364
|
+
const de_ListLexiconsCommand = async (output, context) => {
|
|
373
365
|
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
374
|
-
return
|
|
366
|
+
return de_ListLexiconsCommandError(output, context);
|
|
375
367
|
}
|
|
376
368
|
const contents = map({
|
|
377
369
|
$metadata: deserializeMetadata(output),
|
|
378
370
|
});
|
|
379
371
|
const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
|
|
380
372
|
if (data.Lexicons != null) {
|
|
381
|
-
contents.Lexicons =
|
|
373
|
+
contents.Lexicons = de_LexiconDescriptionList(data.Lexicons, context);
|
|
382
374
|
}
|
|
383
375
|
if (data.NextToken != null) {
|
|
384
376
|
contents.NextToken = (0, smithy_client_1.expectString)(data.NextToken);
|
|
385
377
|
}
|
|
386
378
|
return contents;
|
|
387
379
|
};
|
|
388
|
-
exports.
|
|
389
|
-
const
|
|
380
|
+
exports.de_ListLexiconsCommand = de_ListLexiconsCommand;
|
|
381
|
+
const de_ListLexiconsCommandError = async (output, context) => {
|
|
390
382
|
const parsedOutput = {
|
|
391
383
|
...output,
|
|
392
384
|
body: await parseErrorBody(output.body, context),
|
|
@@ -395,10 +387,10 @@ const deserializeAws_restJson1ListLexiconsCommandError = async (output, context)
|
|
|
395
387
|
switch (errorCode) {
|
|
396
388
|
case "InvalidNextTokenException":
|
|
397
389
|
case "com.amazonaws.polly#InvalidNextTokenException":
|
|
398
|
-
throw await
|
|
390
|
+
throw await de_InvalidNextTokenExceptionRes(parsedOutput, context);
|
|
399
391
|
case "ServiceFailureException":
|
|
400
392
|
case "com.amazonaws.polly#ServiceFailureException":
|
|
401
|
-
throw await
|
|
393
|
+
throw await de_ServiceFailureExceptionRes(parsedOutput, context);
|
|
402
394
|
default:
|
|
403
395
|
const parsedBody = parsedOutput.body;
|
|
404
396
|
(0, smithy_client_1.throwDefaultError)({
|
|
@@ -409,9 +401,9 @@ const deserializeAws_restJson1ListLexiconsCommandError = async (output, context)
|
|
|
409
401
|
});
|
|
410
402
|
}
|
|
411
403
|
};
|
|
412
|
-
const
|
|
404
|
+
const de_ListSpeechSynthesisTasksCommand = async (output, context) => {
|
|
413
405
|
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
414
|
-
return
|
|
406
|
+
return de_ListSpeechSynthesisTasksCommandError(output, context);
|
|
415
407
|
}
|
|
416
408
|
const contents = map({
|
|
417
409
|
$metadata: deserializeMetadata(output),
|
|
@@ -421,12 +413,12 @@ const deserializeAws_restJson1ListSpeechSynthesisTasksCommand = async (output, c
|
|
|
421
413
|
contents.NextToken = (0, smithy_client_1.expectString)(data.NextToken);
|
|
422
414
|
}
|
|
423
415
|
if (data.SynthesisTasks != null) {
|
|
424
|
-
contents.SynthesisTasks =
|
|
416
|
+
contents.SynthesisTasks = de_SynthesisTasks(data.SynthesisTasks, context);
|
|
425
417
|
}
|
|
426
418
|
return contents;
|
|
427
419
|
};
|
|
428
|
-
exports.
|
|
429
|
-
const
|
|
420
|
+
exports.de_ListSpeechSynthesisTasksCommand = de_ListSpeechSynthesisTasksCommand;
|
|
421
|
+
const de_ListSpeechSynthesisTasksCommandError = async (output, context) => {
|
|
430
422
|
const parsedOutput = {
|
|
431
423
|
...output,
|
|
432
424
|
body: await parseErrorBody(output.body, context),
|
|
@@ -435,10 +427,10 @@ const deserializeAws_restJson1ListSpeechSynthesisTasksCommandError = async (outp
|
|
|
435
427
|
switch (errorCode) {
|
|
436
428
|
case "InvalidNextTokenException":
|
|
437
429
|
case "com.amazonaws.polly#InvalidNextTokenException":
|
|
438
|
-
throw await
|
|
430
|
+
throw await de_InvalidNextTokenExceptionRes(parsedOutput, context);
|
|
439
431
|
case "ServiceFailureException":
|
|
440
432
|
case "com.amazonaws.polly#ServiceFailureException":
|
|
441
|
-
throw await
|
|
433
|
+
throw await de_ServiceFailureExceptionRes(parsedOutput, context);
|
|
442
434
|
default:
|
|
443
435
|
const parsedBody = parsedOutput.body;
|
|
444
436
|
(0, smithy_client_1.throwDefaultError)({
|
|
@@ -449,9 +441,9 @@ const deserializeAws_restJson1ListSpeechSynthesisTasksCommandError = async (outp
|
|
|
449
441
|
});
|
|
450
442
|
}
|
|
451
443
|
};
|
|
452
|
-
const
|
|
444
|
+
const de_PutLexiconCommand = async (output, context) => {
|
|
453
445
|
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
454
|
-
return
|
|
446
|
+
return de_PutLexiconCommandError(output, context);
|
|
455
447
|
}
|
|
456
448
|
const contents = map({
|
|
457
449
|
$metadata: deserializeMetadata(output),
|
|
@@ -459,8 +451,8 @@ const deserializeAws_restJson1PutLexiconCommand = async (output, context) => {
|
|
|
459
451
|
await collectBody(output.body, context);
|
|
460
452
|
return contents;
|
|
461
453
|
};
|
|
462
|
-
exports.
|
|
463
|
-
const
|
|
454
|
+
exports.de_PutLexiconCommand = de_PutLexiconCommand;
|
|
455
|
+
const de_PutLexiconCommandError = async (output, context) => {
|
|
464
456
|
const parsedOutput = {
|
|
465
457
|
...output,
|
|
466
458
|
body: await parseErrorBody(output.body, context),
|
|
@@ -469,25 +461,25 @@ const deserializeAws_restJson1PutLexiconCommandError = async (output, context) =
|
|
|
469
461
|
switch (errorCode) {
|
|
470
462
|
case "InvalidLexiconException":
|
|
471
463
|
case "com.amazonaws.polly#InvalidLexiconException":
|
|
472
|
-
throw await
|
|
464
|
+
throw await de_InvalidLexiconExceptionRes(parsedOutput, context);
|
|
473
465
|
case "LexiconSizeExceededException":
|
|
474
466
|
case "com.amazonaws.polly#LexiconSizeExceededException":
|
|
475
|
-
throw await
|
|
467
|
+
throw await de_LexiconSizeExceededExceptionRes(parsedOutput, context);
|
|
476
468
|
case "MaxLexemeLengthExceededException":
|
|
477
469
|
case "com.amazonaws.polly#MaxLexemeLengthExceededException":
|
|
478
|
-
throw await
|
|
470
|
+
throw await de_MaxLexemeLengthExceededExceptionRes(parsedOutput, context);
|
|
479
471
|
case "MaxLexiconsNumberExceededException":
|
|
480
472
|
case "com.amazonaws.polly#MaxLexiconsNumberExceededException":
|
|
481
|
-
throw await
|
|
473
|
+
throw await de_MaxLexiconsNumberExceededExceptionRes(parsedOutput, context);
|
|
482
474
|
case "ServiceFailureException":
|
|
483
475
|
case "com.amazonaws.polly#ServiceFailureException":
|
|
484
|
-
throw await
|
|
476
|
+
throw await de_ServiceFailureExceptionRes(parsedOutput, context);
|
|
485
477
|
case "UnsupportedPlsAlphabetException":
|
|
486
478
|
case "com.amazonaws.polly#UnsupportedPlsAlphabetException":
|
|
487
|
-
throw await
|
|
479
|
+
throw await de_UnsupportedPlsAlphabetExceptionRes(parsedOutput, context);
|
|
488
480
|
case "UnsupportedPlsLanguageException":
|
|
489
481
|
case "com.amazonaws.polly#UnsupportedPlsLanguageException":
|
|
490
|
-
throw await
|
|
482
|
+
throw await de_UnsupportedPlsLanguageExceptionRes(parsedOutput, context);
|
|
491
483
|
default:
|
|
492
484
|
const parsedBody = parsedOutput.body;
|
|
493
485
|
(0, smithy_client_1.throwDefaultError)({
|
|
@@ -498,21 +490,21 @@ const deserializeAws_restJson1PutLexiconCommandError = async (output, context) =
|
|
|
498
490
|
});
|
|
499
491
|
}
|
|
500
492
|
};
|
|
501
|
-
const
|
|
493
|
+
const de_StartSpeechSynthesisTaskCommand = async (output, context) => {
|
|
502
494
|
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
503
|
-
return
|
|
495
|
+
return de_StartSpeechSynthesisTaskCommandError(output, context);
|
|
504
496
|
}
|
|
505
497
|
const contents = map({
|
|
506
498
|
$metadata: deserializeMetadata(output),
|
|
507
499
|
});
|
|
508
500
|
const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
|
|
509
501
|
if (data.SynthesisTask != null) {
|
|
510
|
-
contents.SynthesisTask =
|
|
502
|
+
contents.SynthesisTask = de_SynthesisTask(data.SynthesisTask, context);
|
|
511
503
|
}
|
|
512
504
|
return contents;
|
|
513
505
|
};
|
|
514
|
-
exports.
|
|
515
|
-
const
|
|
506
|
+
exports.de_StartSpeechSynthesisTaskCommand = de_StartSpeechSynthesisTaskCommand;
|
|
507
|
+
const de_StartSpeechSynthesisTaskCommandError = async (output, context) => {
|
|
516
508
|
const parsedOutput = {
|
|
517
509
|
...output,
|
|
518
510
|
body: await parseErrorBody(output.body, context),
|
|
@@ -521,40 +513,40 @@ const deserializeAws_restJson1StartSpeechSynthesisTaskCommandError = async (outp
|
|
|
521
513
|
switch (errorCode) {
|
|
522
514
|
case "EngineNotSupportedException":
|
|
523
515
|
case "com.amazonaws.polly#EngineNotSupportedException":
|
|
524
|
-
throw await
|
|
516
|
+
throw await de_EngineNotSupportedExceptionRes(parsedOutput, context);
|
|
525
517
|
case "InvalidS3BucketException":
|
|
526
518
|
case "com.amazonaws.polly#InvalidS3BucketException":
|
|
527
|
-
throw await
|
|
519
|
+
throw await de_InvalidS3BucketExceptionRes(parsedOutput, context);
|
|
528
520
|
case "InvalidS3KeyException":
|
|
529
521
|
case "com.amazonaws.polly#InvalidS3KeyException":
|
|
530
|
-
throw await
|
|
522
|
+
throw await de_InvalidS3KeyExceptionRes(parsedOutput, context);
|
|
531
523
|
case "InvalidSampleRateException":
|
|
532
524
|
case "com.amazonaws.polly#InvalidSampleRateException":
|
|
533
|
-
throw await
|
|
525
|
+
throw await de_InvalidSampleRateExceptionRes(parsedOutput, context);
|
|
534
526
|
case "InvalidSnsTopicArnException":
|
|
535
527
|
case "com.amazonaws.polly#InvalidSnsTopicArnException":
|
|
536
|
-
throw await
|
|
528
|
+
throw await de_InvalidSnsTopicArnExceptionRes(parsedOutput, context);
|
|
537
529
|
case "InvalidSsmlException":
|
|
538
530
|
case "com.amazonaws.polly#InvalidSsmlException":
|
|
539
|
-
throw await
|
|
531
|
+
throw await de_InvalidSsmlExceptionRes(parsedOutput, context);
|
|
540
532
|
case "LanguageNotSupportedException":
|
|
541
533
|
case "com.amazonaws.polly#LanguageNotSupportedException":
|
|
542
|
-
throw await
|
|
534
|
+
throw await de_LanguageNotSupportedExceptionRes(parsedOutput, context);
|
|
543
535
|
case "LexiconNotFoundException":
|
|
544
536
|
case "com.amazonaws.polly#LexiconNotFoundException":
|
|
545
|
-
throw await
|
|
537
|
+
throw await de_LexiconNotFoundExceptionRes(parsedOutput, context);
|
|
546
538
|
case "MarksNotSupportedForFormatException":
|
|
547
539
|
case "com.amazonaws.polly#MarksNotSupportedForFormatException":
|
|
548
|
-
throw await
|
|
540
|
+
throw await de_MarksNotSupportedForFormatExceptionRes(parsedOutput, context);
|
|
549
541
|
case "ServiceFailureException":
|
|
550
542
|
case "com.amazonaws.polly#ServiceFailureException":
|
|
551
|
-
throw await
|
|
543
|
+
throw await de_ServiceFailureExceptionRes(parsedOutput, context);
|
|
552
544
|
case "SsmlMarksNotSupportedForTextTypeException":
|
|
553
545
|
case "com.amazonaws.polly#SsmlMarksNotSupportedForTextTypeException":
|
|
554
|
-
throw await
|
|
546
|
+
throw await de_SsmlMarksNotSupportedForTextTypeExceptionRes(parsedOutput, context);
|
|
555
547
|
case "TextLengthExceededException":
|
|
556
548
|
case "com.amazonaws.polly#TextLengthExceededException":
|
|
557
|
-
throw await
|
|
549
|
+
throw await de_TextLengthExceededExceptionRes(parsedOutput, context);
|
|
558
550
|
default:
|
|
559
551
|
const parsedBody = parsedOutput.body;
|
|
560
552
|
(0, smithy_client_1.throwDefaultError)({
|
|
@@ -565,9 +557,9 @@ const deserializeAws_restJson1StartSpeechSynthesisTaskCommandError = async (outp
|
|
|
565
557
|
});
|
|
566
558
|
}
|
|
567
559
|
};
|
|
568
|
-
const
|
|
560
|
+
const de_SynthesizeSpeechCommand = async (output, context) => {
|
|
569
561
|
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
570
|
-
return
|
|
562
|
+
return de_SynthesizeSpeechCommandError(output, context);
|
|
571
563
|
}
|
|
572
564
|
const contents = map({
|
|
573
565
|
$metadata: deserializeMetadata(output),
|
|
@@ -582,8 +574,8 @@ const deserializeAws_restJson1SynthesizeSpeechCommand = async (output, context)
|
|
|
582
574
|
contents.AudioStream = data;
|
|
583
575
|
return contents;
|
|
584
576
|
};
|
|
585
|
-
exports.
|
|
586
|
-
const
|
|
577
|
+
exports.de_SynthesizeSpeechCommand = de_SynthesizeSpeechCommand;
|
|
578
|
+
const de_SynthesizeSpeechCommandError = async (output, context) => {
|
|
587
579
|
const parsedOutput = {
|
|
588
580
|
...output,
|
|
589
581
|
body: await parseErrorBody(output.body, context),
|
|
@@ -592,31 +584,31 @@ const deserializeAws_restJson1SynthesizeSpeechCommandError = async (output, cont
|
|
|
592
584
|
switch (errorCode) {
|
|
593
585
|
case "EngineNotSupportedException":
|
|
594
586
|
case "com.amazonaws.polly#EngineNotSupportedException":
|
|
595
|
-
throw await
|
|
587
|
+
throw await de_EngineNotSupportedExceptionRes(parsedOutput, context);
|
|
596
588
|
case "InvalidSampleRateException":
|
|
597
589
|
case "com.amazonaws.polly#InvalidSampleRateException":
|
|
598
|
-
throw await
|
|
590
|
+
throw await de_InvalidSampleRateExceptionRes(parsedOutput, context);
|
|
599
591
|
case "InvalidSsmlException":
|
|
600
592
|
case "com.amazonaws.polly#InvalidSsmlException":
|
|
601
|
-
throw await
|
|
593
|
+
throw await de_InvalidSsmlExceptionRes(parsedOutput, context);
|
|
602
594
|
case "LanguageNotSupportedException":
|
|
603
595
|
case "com.amazonaws.polly#LanguageNotSupportedException":
|
|
604
|
-
throw await
|
|
596
|
+
throw await de_LanguageNotSupportedExceptionRes(parsedOutput, context);
|
|
605
597
|
case "LexiconNotFoundException":
|
|
606
598
|
case "com.amazonaws.polly#LexiconNotFoundException":
|
|
607
|
-
throw await
|
|
599
|
+
throw await de_LexiconNotFoundExceptionRes(parsedOutput, context);
|
|
608
600
|
case "MarksNotSupportedForFormatException":
|
|
609
601
|
case "com.amazonaws.polly#MarksNotSupportedForFormatException":
|
|
610
|
-
throw await
|
|
602
|
+
throw await de_MarksNotSupportedForFormatExceptionRes(parsedOutput, context);
|
|
611
603
|
case "ServiceFailureException":
|
|
612
604
|
case "com.amazonaws.polly#ServiceFailureException":
|
|
613
|
-
throw await
|
|
605
|
+
throw await de_ServiceFailureExceptionRes(parsedOutput, context);
|
|
614
606
|
case "SsmlMarksNotSupportedForTextTypeException":
|
|
615
607
|
case "com.amazonaws.polly#SsmlMarksNotSupportedForTextTypeException":
|
|
616
|
-
throw await
|
|
608
|
+
throw await de_SsmlMarksNotSupportedForTextTypeExceptionRes(parsedOutput, context);
|
|
617
609
|
case "TextLengthExceededException":
|
|
618
610
|
case "com.amazonaws.polly#TextLengthExceededException":
|
|
619
|
-
throw await
|
|
611
|
+
throw await de_TextLengthExceededExceptionRes(parsedOutput, context);
|
|
620
612
|
default:
|
|
621
613
|
const parsedBody = parsedOutput.body;
|
|
622
614
|
(0, smithy_client_1.throwDefaultError)({
|
|
@@ -628,7 +620,7 @@ const deserializeAws_restJson1SynthesizeSpeechCommandError = async (output, cont
|
|
|
628
620
|
}
|
|
629
621
|
};
|
|
630
622
|
const map = smithy_client_1.map;
|
|
631
|
-
const
|
|
623
|
+
const de_EngineNotSupportedExceptionRes = async (parsedOutput, context) => {
|
|
632
624
|
const contents = map({});
|
|
633
625
|
const data = parsedOutput.body;
|
|
634
626
|
if (data.message != null) {
|
|
@@ -640,7 +632,7 @@ const deserializeAws_restJson1EngineNotSupportedExceptionResponse = async (parse
|
|
|
640
632
|
});
|
|
641
633
|
return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
|
|
642
634
|
};
|
|
643
|
-
const
|
|
635
|
+
const de_InvalidLexiconExceptionRes = async (parsedOutput, context) => {
|
|
644
636
|
const contents = map({});
|
|
645
637
|
const data = parsedOutput.body;
|
|
646
638
|
if (data.message != null) {
|
|
@@ -652,7 +644,7 @@ const deserializeAws_restJson1InvalidLexiconExceptionResponse = async (parsedOut
|
|
|
652
644
|
});
|
|
653
645
|
return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
|
|
654
646
|
};
|
|
655
|
-
const
|
|
647
|
+
const de_InvalidNextTokenExceptionRes = async (parsedOutput, context) => {
|
|
656
648
|
const contents = map({});
|
|
657
649
|
const data = parsedOutput.body;
|
|
658
650
|
if (data.message != null) {
|
|
@@ -664,7 +656,7 @@ const deserializeAws_restJson1InvalidNextTokenExceptionResponse = async (parsedO
|
|
|
664
656
|
});
|
|
665
657
|
return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
|
|
666
658
|
};
|
|
667
|
-
const
|
|
659
|
+
const de_InvalidS3BucketExceptionRes = async (parsedOutput, context) => {
|
|
668
660
|
const contents = map({});
|
|
669
661
|
const data = parsedOutput.body;
|
|
670
662
|
if (data.message != null) {
|
|
@@ -676,7 +668,7 @@ const deserializeAws_restJson1InvalidS3BucketExceptionResponse = async (parsedOu
|
|
|
676
668
|
});
|
|
677
669
|
return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
|
|
678
670
|
};
|
|
679
|
-
const
|
|
671
|
+
const de_InvalidS3KeyExceptionRes = async (parsedOutput, context) => {
|
|
680
672
|
const contents = map({});
|
|
681
673
|
const data = parsedOutput.body;
|
|
682
674
|
if (data.message != null) {
|
|
@@ -688,7 +680,7 @@ const deserializeAws_restJson1InvalidS3KeyExceptionResponse = async (parsedOutpu
|
|
|
688
680
|
});
|
|
689
681
|
return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
|
|
690
682
|
};
|
|
691
|
-
const
|
|
683
|
+
const de_InvalidSampleRateExceptionRes = async (parsedOutput, context) => {
|
|
692
684
|
const contents = map({});
|
|
693
685
|
const data = parsedOutput.body;
|
|
694
686
|
if (data.message != null) {
|
|
@@ -700,7 +692,7 @@ const deserializeAws_restJson1InvalidSampleRateExceptionResponse = async (parsed
|
|
|
700
692
|
});
|
|
701
693
|
return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
|
|
702
694
|
};
|
|
703
|
-
const
|
|
695
|
+
const de_InvalidSnsTopicArnExceptionRes = async (parsedOutput, context) => {
|
|
704
696
|
const contents = map({});
|
|
705
697
|
const data = parsedOutput.body;
|
|
706
698
|
if (data.message != null) {
|
|
@@ -712,7 +704,7 @@ const deserializeAws_restJson1InvalidSnsTopicArnExceptionResponse = async (parse
|
|
|
712
704
|
});
|
|
713
705
|
return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
|
|
714
706
|
};
|
|
715
|
-
const
|
|
707
|
+
const de_InvalidSsmlExceptionRes = async (parsedOutput, context) => {
|
|
716
708
|
const contents = map({});
|
|
717
709
|
const data = parsedOutput.body;
|
|
718
710
|
if (data.message != null) {
|
|
@@ -724,7 +716,7 @@ const deserializeAws_restJson1InvalidSsmlExceptionResponse = async (parsedOutput
|
|
|
724
716
|
});
|
|
725
717
|
return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
|
|
726
718
|
};
|
|
727
|
-
const
|
|
719
|
+
const de_InvalidTaskIdExceptionRes = async (parsedOutput, context) => {
|
|
728
720
|
const contents = map({});
|
|
729
721
|
const data = parsedOutput.body;
|
|
730
722
|
if (data.message != null) {
|
|
@@ -736,7 +728,7 @@ const deserializeAws_restJson1InvalidTaskIdExceptionResponse = async (parsedOutp
|
|
|
736
728
|
});
|
|
737
729
|
return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
|
|
738
730
|
};
|
|
739
|
-
const
|
|
731
|
+
const de_LanguageNotSupportedExceptionRes = async (parsedOutput, context) => {
|
|
740
732
|
const contents = map({});
|
|
741
733
|
const data = parsedOutput.body;
|
|
742
734
|
if (data.message != null) {
|
|
@@ -748,7 +740,7 @@ const deserializeAws_restJson1LanguageNotSupportedExceptionResponse = async (par
|
|
|
748
740
|
});
|
|
749
741
|
return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
|
|
750
742
|
};
|
|
751
|
-
const
|
|
743
|
+
const de_LexiconNotFoundExceptionRes = async (parsedOutput, context) => {
|
|
752
744
|
const contents = map({});
|
|
753
745
|
const data = parsedOutput.body;
|
|
754
746
|
if (data.message != null) {
|
|
@@ -760,7 +752,7 @@ const deserializeAws_restJson1LexiconNotFoundExceptionResponse = async (parsedOu
|
|
|
760
752
|
});
|
|
761
753
|
return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
|
|
762
754
|
};
|
|
763
|
-
const
|
|
755
|
+
const de_LexiconSizeExceededExceptionRes = async (parsedOutput, context) => {
|
|
764
756
|
const contents = map({});
|
|
765
757
|
const data = parsedOutput.body;
|
|
766
758
|
if (data.message != null) {
|
|
@@ -772,7 +764,7 @@ const deserializeAws_restJson1LexiconSizeExceededExceptionResponse = async (pars
|
|
|
772
764
|
});
|
|
773
765
|
return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
|
|
774
766
|
};
|
|
775
|
-
const
|
|
767
|
+
const de_MarksNotSupportedForFormatExceptionRes = async (parsedOutput, context) => {
|
|
776
768
|
const contents = map({});
|
|
777
769
|
const data = parsedOutput.body;
|
|
778
770
|
if (data.message != null) {
|
|
@@ -784,7 +776,7 @@ const deserializeAws_restJson1MarksNotSupportedForFormatExceptionResponse = asyn
|
|
|
784
776
|
});
|
|
785
777
|
return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
|
|
786
778
|
};
|
|
787
|
-
const
|
|
779
|
+
const de_MaxLexemeLengthExceededExceptionRes = async (parsedOutput, context) => {
|
|
788
780
|
const contents = map({});
|
|
789
781
|
const data = parsedOutput.body;
|
|
790
782
|
if (data.message != null) {
|
|
@@ -796,7 +788,7 @@ const deserializeAws_restJson1MaxLexemeLengthExceededExceptionResponse = async (
|
|
|
796
788
|
});
|
|
797
789
|
return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
|
|
798
790
|
};
|
|
799
|
-
const
|
|
791
|
+
const de_MaxLexiconsNumberExceededExceptionRes = async (parsedOutput, context) => {
|
|
800
792
|
const contents = map({});
|
|
801
793
|
const data = parsedOutput.body;
|
|
802
794
|
if (data.message != null) {
|
|
@@ -808,7 +800,7 @@ const deserializeAws_restJson1MaxLexiconsNumberExceededExceptionResponse = async
|
|
|
808
800
|
});
|
|
809
801
|
return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
|
|
810
802
|
};
|
|
811
|
-
const
|
|
803
|
+
const de_ServiceFailureExceptionRes = async (parsedOutput, context) => {
|
|
812
804
|
const contents = map({});
|
|
813
805
|
const data = parsedOutput.body;
|
|
814
806
|
if (data.message != null) {
|
|
@@ -820,7 +812,7 @@ const deserializeAws_restJson1ServiceFailureExceptionResponse = async (parsedOut
|
|
|
820
812
|
});
|
|
821
813
|
return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
|
|
822
814
|
};
|
|
823
|
-
const
|
|
815
|
+
const de_SsmlMarksNotSupportedForTextTypeExceptionRes = async (parsedOutput, context) => {
|
|
824
816
|
const contents = map({});
|
|
825
817
|
const data = parsedOutput.body;
|
|
826
818
|
if (data.message != null) {
|
|
@@ -832,7 +824,7 @@ const deserializeAws_restJson1SsmlMarksNotSupportedForTextTypeExceptionResponse
|
|
|
832
824
|
});
|
|
833
825
|
return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
|
|
834
826
|
};
|
|
835
|
-
const
|
|
827
|
+
const de_SynthesisTaskNotFoundExceptionRes = async (parsedOutput, context) => {
|
|
836
828
|
const contents = map({});
|
|
837
829
|
const data = parsedOutput.body;
|
|
838
830
|
if (data.message != null) {
|
|
@@ -844,7 +836,7 @@ const deserializeAws_restJson1SynthesisTaskNotFoundExceptionResponse = async (pa
|
|
|
844
836
|
});
|
|
845
837
|
return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
|
|
846
838
|
};
|
|
847
|
-
const
|
|
839
|
+
const de_TextLengthExceededExceptionRes = async (parsedOutput, context) => {
|
|
848
840
|
const contents = map({});
|
|
849
841
|
const data = parsedOutput.body;
|
|
850
842
|
if (data.message != null) {
|
|
@@ -856,7 +848,7 @@ const deserializeAws_restJson1TextLengthExceededExceptionResponse = async (parse
|
|
|
856
848
|
});
|
|
857
849
|
return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
|
|
858
850
|
};
|
|
859
|
-
const
|
|
851
|
+
const de_UnsupportedPlsAlphabetExceptionRes = async (parsedOutput, context) => {
|
|
860
852
|
const contents = map({});
|
|
861
853
|
const data = parsedOutput.body;
|
|
862
854
|
if (data.message != null) {
|
|
@@ -868,7 +860,7 @@ const deserializeAws_restJson1UnsupportedPlsAlphabetExceptionResponse = async (p
|
|
|
868
860
|
});
|
|
869
861
|
return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
|
|
870
862
|
};
|
|
871
|
-
const
|
|
863
|
+
const de_UnsupportedPlsLanguageExceptionRes = async (parsedOutput, context) => {
|
|
872
864
|
const contents = map({});
|
|
873
865
|
const data = parsedOutput.body;
|
|
874
866
|
if (data.message != null) {
|
|
@@ -880,21 +872,21 @@ const deserializeAws_restJson1UnsupportedPlsLanguageExceptionResponse = async (p
|
|
|
880
872
|
});
|
|
881
873
|
return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
|
|
882
874
|
};
|
|
883
|
-
const
|
|
875
|
+
const se_LexiconNameList = (input, context) => {
|
|
884
876
|
return input
|
|
885
877
|
.filter((e) => e != null)
|
|
886
878
|
.map((entry) => {
|
|
887
879
|
return entry;
|
|
888
880
|
});
|
|
889
881
|
};
|
|
890
|
-
const
|
|
882
|
+
const se_SpeechMarkTypeList = (input, context) => {
|
|
891
883
|
return input
|
|
892
884
|
.filter((e) => e != null)
|
|
893
885
|
.map((entry) => {
|
|
894
886
|
return entry;
|
|
895
887
|
});
|
|
896
888
|
};
|
|
897
|
-
const
|
|
889
|
+
const de_EngineList = (output, context) => {
|
|
898
890
|
const retVal = (output || [])
|
|
899
891
|
.filter((e) => e != null)
|
|
900
892
|
.map((entry) => {
|
|
@@ -905,7 +897,7 @@ const deserializeAws_restJson1EngineList = (output, context) => {
|
|
|
905
897
|
});
|
|
906
898
|
return retVal;
|
|
907
899
|
};
|
|
908
|
-
const
|
|
900
|
+
const de_LanguageCodeList = (output, context) => {
|
|
909
901
|
const retVal = (output || [])
|
|
910
902
|
.filter((e) => e != null)
|
|
911
903
|
.map((entry) => {
|
|
@@ -916,13 +908,13 @@ const deserializeAws_restJson1LanguageCodeList = (output, context) => {
|
|
|
916
908
|
});
|
|
917
909
|
return retVal;
|
|
918
910
|
};
|
|
919
|
-
const
|
|
911
|
+
const de_Lexicon = (output, context) => {
|
|
920
912
|
return {
|
|
921
913
|
Content: (0, smithy_client_1.expectString)(output.Content),
|
|
922
914
|
Name: (0, smithy_client_1.expectString)(output.Name),
|
|
923
915
|
};
|
|
924
916
|
};
|
|
925
|
-
const
|
|
917
|
+
const de_LexiconAttributes = (output, context) => {
|
|
926
918
|
return {
|
|
927
919
|
Alphabet: (0, smithy_client_1.expectString)(output.Alphabet),
|
|
928
920
|
LanguageCode: (0, smithy_client_1.expectString)(output.LanguageCode),
|
|
@@ -934,24 +926,24 @@ const deserializeAws_restJson1LexiconAttributes = (output, context) => {
|
|
|
934
926
|
Size: (0, smithy_client_1.expectInt32)(output.Size),
|
|
935
927
|
};
|
|
936
928
|
};
|
|
937
|
-
const
|
|
929
|
+
const de_LexiconDescription = (output, context) => {
|
|
938
930
|
return {
|
|
939
|
-
Attributes: output.Attributes != null ?
|
|
931
|
+
Attributes: output.Attributes != null ? de_LexiconAttributes(output.Attributes, context) : undefined,
|
|
940
932
|
Name: (0, smithy_client_1.expectString)(output.Name),
|
|
941
933
|
};
|
|
942
934
|
};
|
|
943
|
-
const
|
|
935
|
+
const de_LexiconDescriptionList = (output, context) => {
|
|
944
936
|
const retVal = (output || [])
|
|
945
937
|
.filter((e) => e != null)
|
|
946
938
|
.map((entry) => {
|
|
947
939
|
if (entry === null) {
|
|
948
940
|
return null;
|
|
949
941
|
}
|
|
950
|
-
return
|
|
942
|
+
return de_LexiconDescription(entry, context);
|
|
951
943
|
});
|
|
952
944
|
return retVal;
|
|
953
945
|
};
|
|
954
|
-
const
|
|
946
|
+
const de_LexiconNameList = (output, context) => {
|
|
955
947
|
const retVal = (output || [])
|
|
956
948
|
.filter((e) => e != null)
|
|
957
949
|
.map((entry) => {
|
|
@@ -962,7 +954,7 @@ const deserializeAws_restJson1LexiconNameList = (output, context) => {
|
|
|
962
954
|
});
|
|
963
955
|
return retVal;
|
|
964
956
|
};
|
|
965
|
-
const
|
|
957
|
+
const de_SpeechMarkTypeList = (output, context) => {
|
|
966
958
|
const retVal = (output || [])
|
|
967
959
|
.filter((e) => e != null)
|
|
968
960
|
.map((entry) => {
|
|
@@ -973,22 +965,20 @@ const deserializeAws_restJson1SpeechMarkTypeList = (output, context) => {
|
|
|
973
965
|
});
|
|
974
966
|
return retVal;
|
|
975
967
|
};
|
|
976
|
-
const
|
|
968
|
+
const de_SynthesisTask = (output, context) => {
|
|
977
969
|
return {
|
|
978
970
|
CreationTime: output.CreationTime != null
|
|
979
971
|
? (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(output.CreationTime)))
|
|
980
972
|
: undefined,
|
|
981
973
|
Engine: (0, smithy_client_1.expectString)(output.Engine),
|
|
982
974
|
LanguageCode: (0, smithy_client_1.expectString)(output.LanguageCode),
|
|
983
|
-
LexiconNames: output.LexiconNames != null ?
|
|
975
|
+
LexiconNames: output.LexiconNames != null ? de_LexiconNameList(output.LexiconNames, context) : undefined,
|
|
984
976
|
OutputFormat: (0, smithy_client_1.expectString)(output.OutputFormat),
|
|
985
977
|
OutputUri: (0, smithy_client_1.expectString)(output.OutputUri),
|
|
986
978
|
RequestCharacters: (0, smithy_client_1.expectInt32)(output.RequestCharacters),
|
|
987
979
|
SampleRate: (0, smithy_client_1.expectString)(output.SampleRate),
|
|
988
980
|
SnsTopicArn: (0, smithy_client_1.expectString)(output.SnsTopicArn),
|
|
989
|
-
SpeechMarkTypes: output.SpeechMarkTypes != null
|
|
990
|
-
? deserializeAws_restJson1SpeechMarkTypeList(output.SpeechMarkTypes, context)
|
|
991
|
-
: undefined,
|
|
981
|
+
SpeechMarkTypes: output.SpeechMarkTypes != null ? de_SpeechMarkTypeList(output.SpeechMarkTypes, context) : undefined,
|
|
992
982
|
TaskId: (0, smithy_client_1.expectString)(output.TaskId),
|
|
993
983
|
TaskStatus: (0, smithy_client_1.expectString)(output.TaskStatus),
|
|
994
984
|
TaskStatusReason: (0, smithy_client_1.expectString)(output.TaskStatusReason),
|
|
@@ -996,40 +986,36 @@ const deserializeAws_restJson1SynthesisTask = (output, context) => {
|
|
|
996
986
|
VoiceId: (0, smithy_client_1.expectString)(output.VoiceId),
|
|
997
987
|
};
|
|
998
988
|
};
|
|
999
|
-
const
|
|
989
|
+
const de_SynthesisTasks = (output, context) => {
|
|
1000
990
|
const retVal = (output || [])
|
|
1001
991
|
.filter((e) => e != null)
|
|
1002
992
|
.map((entry) => {
|
|
1003
993
|
if (entry === null) {
|
|
1004
994
|
return null;
|
|
1005
995
|
}
|
|
1006
|
-
return
|
|
996
|
+
return de_SynthesisTask(entry, context);
|
|
1007
997
|
});
|
|
1008
998
|
return retVal;
|
|
1009
999
|
};
|
|
1010
|
-
const
|
|
1000
|
+
const de_Voice = (output, context) => {
|
|
1011
1001
|
return {
|
|
1012
|
-
AdditionalLanguageCodes: output.AdditionalLanguageCodes != null
|
|
1013
|
-
? deserializeAws_restJson1LanguageCodeList(output.AdditionalLanguageCodes, context)
|
|
1014
|
-
: undefined,
|
|
1002
|
+
AdditionalLanguageCodes: output.AdditionalLanguageCodes != null ? de_LanguageCodeList(output.AdditionalLanguageCodes, context) : undefined,
|
|
1015
1003
|
Gender: (0, smithy_client_1.expectString)(output.Gender),
|
|
1016
1004
|
Id: (0, smithy_client_1.expectString)(output.Id),
|
|
1017
1005
|
LanguageCode: (0, smithy_client_1.expectString)(output.LanguageCode),
|
|
1018
1006
|
LanguageName: (0, smithy_client_1.expectString)(output.LanguageName),
|
|
1019
1007
|
Name: (0, smithy_client_1.expectString)(output.Name),
|
|
1020
|
-
SupportedEngines: output.SupportedEngines != null
|
|
1021
|
-
? deserializeAws_restJson1EngineList(output.SupportedEngines, context)
|
|
1022
|
-
: undefined,
|
|
1008
|
+
SupportedEngines: output.SupportedEngines != null ? de_EngineList(output.SupportedEngines, context) : undefined,
|
|
1023
1009
|
};
|
|
1024
1010
|
};
|
|
1025
|
-
const
|
|
1011
|
+
const de_VoiceList = (output, context) => {
|
|
1026
1012
|
const retVal = (output || [])
|
|
1027
1013
|
.filter((e) => e != null)
|
|
1028
1014
|
.map((entry) => {
|
|
1029
1015
|
if (entry === null) {
|
|
1030
1016
|
return null;
|
|
1031
1017
|
}
|
|
1032
|
-
return
|
|
1018
|
+
return de_Voice(entry, context);
|
|
1033
1019
|
});
|
|
1034
1020
|
return retVal;
|
|
1035
1021
|
};
|