@aws-sdk/client-polly 3.118.1 → 3.127.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/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,36 @@
|
|
|
3
3
|
All notable changes to this project will be documented in this file.
|
|
4
4
|
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
|
5
5
|
|
|
6
|
+
# [3.127.0](https://github.com/aws/aws-sdk-js-v3/compare/v3.126.0...v3.127.0) (2022-07-11)
|
|
7
|
+
|
|
8
|
+
**Note:** Version bump only for package @aws-sdk/client-polly
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
# [3.121.0](https://github.com/aws/aws-sdk-js-v3/compare/v3.120.0...v3.121.0) (2022-06-30)
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
### Features
|
|
18
|
+
|
|
19
|
+
* **clients:** fallback to status code for unmodeled errors ([#3752](https://github.com/aws/aws-sdk-js-v3/issues/3752)) ([49bcc4f](https://github.com/aws/aws-sdk-js-v3/commit/49bcc4f153e890e798a8e82fd5fc397b2dcc449f))
|
|
20
|
+
|
|
21
|
+
|
|
22
|
+
|
|
23
|
+
|
|
24
|
+
|
|
25
|
+
# [3.119.0](https://github.com/aws/aws-sdk-js-v3/compare/v3.118.1...v3.119.0) (2022-06-28)
|
|
26
|
+
|
|
27
|
+
|
|
28
|
+
### Features
|
|
29
|
+
|
|
30
|
+
* **client-polly:** Add 4 new neural voices - Pedro (es-US), Liam (fr-CA), Daniel (de-DE) and Arthur (en-GB). ([6fbb85a](https://github.com/aws/aws-sdk-js-v3/commit/6fbb85a5eab8425275ff1fe467cab747a35607ef))
|
|
31
|
+
|
|
32
|
+
|
|
33
|
+
|
|
34
|
+
|
|
35
|
+
|
|
6
36
|
## [3.118.1](https://github.com/aws/aws-sdk-js-v3/compare/v3.118.0...v3.118.1) (2022-06-27)
|
|
7
37
|
|
|
8
38
|
**Note:** Version bump only for package @aws-sdk/client-polly
|
|
@@ -168,7 +168,7 @@ const serializeAws_restJson1PutLexiconCommand = async (input, context) => {
|
|
|
168
168
|
}
|
|
169
169
|
let body;
|
|
170
170
|
body = JSON.stringify({
|
|
171
|
-
...(input.Content
|
|
171
|
+
...(input.Content != null && { Content: input.Content }),
|
|
172
172
|
});
|
|
173
173
|
return new protocol_http_1.HttpRequest({
|
|
174
174
|
protocol,
|
|
@@ -189,26 +189,22 @@ const serializeAws_restJson1StartSpeechSynthesisTaskCommand = async (input, cont
|
|
|
189
189
|
const resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` + "/v1/synthesisTasks";
|
|
190
190
|
let body;
|
|
191
191
|
body = JSON.stringify({
|
|
192
|
-
...(input.Engine
|
|
193
|
-
...(input.LanguageCode
|
|
194
|
-
...(input.LexiconNames
|
|
195
|
-
input.LexiconNames !== null && {
|
|
192
|
+
...(input.Engine != null && { Engine: input.Engine }),
|
|
193
|
+
...(input.LanguageCode != null && { LanguageCode: input.LanguageCode }),
|
|
194
|
+
...(input.LexiconNames != null && {
|
|
196
195
|
LexiconNames: serializeAws_restJson1LexiconNameList(input.LexiconNames, context),
|
|
197
196
|
}),
|
|
198
|
-
...(input.OutputFormat
|
|
199
|
-
...(input.OutputS3BucketName
|
|
200
|
-
|
|
201
|
-
...(input.
|
|
202
|
-
|
|
203
|
-
...(input.
|
|
204
|
-
...(input.SnsTopicArn !== undefined && input.SnsTopicArn !== null && { SnsTopicArn: input.SnsTopicArn }),
|
|
205
|
-
...(input.SpeechMarkTypes !== undefined &&
|
|
206
|
-
input.SpeechMarkTypes !== null && {
|
|
197
|
+
...(input.OutputFormat != null && { OutputFormat: input.OutputFormat }),
|
|
198
|
+
...(input.OutputS3BucketName != null && { OutputS3BucketName: input.OutputS3BucketName }),
|
|
199
|
+
...(input.OutputS3KeyPrefix != null && { OutputS3KeyPrefix: input.OutputS3KeyPrefix }),
|
|
200
|
+
...(input.SampleRate != null && { SampleRate: input.SampleRate }),
|
|
201
|
+
...(input.SnsTopicArn != null && { SnsTopicArn: input.SnsTopicArn }),
|
|
202
|
+
...(input.SpeechMarkTypes != null && {
|
|
207
203
|
SpeechMarkTypes: serializeAws_restJson1SpeechMarkTypeList(input.SpeechMarkTypes, context),
|
|
208
204
|
}),
|
|
209
|
-
...(input.Text
|
|
210
|
-
...(input.TextType
|
|
211
|
-
...(input.VoiceId
|
|
205
|
+
...(input.Text != null && { Text: input.Text }),
|
|
206
|
+
...(input.TextType != null && { TextType: input.TextType }),
|
|
207
|
+
...(input.VoiceId != null && { VoiceId: input.VoiceId }),
|
|
212
208
|
});
|
|
213
209
|
return new protocol_http_1.HttpRequest({
|
|
214
210
|
protocol,
|
|
@@ -229,21 +225,19 @@ const serializeAws_restJson1SynthesizeSpeechCommand = async (input, context) =>
|
|
|
229
225
|
const resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` + "/v1/speech";
|
|
230
226
|
let body;
|
|
231
227
|
body = JSON.stringify({
|
|
232
|
-
...(input.Engine
|
|
233
|
-
...(input.LanguageCode
|
|
234
|
-
...(input.LexiconNames
|
|
235
|
-
input.LexiconNames !== null && {
|
|
228
|
+
...(input.Engine != null && { Engine: input.Engine }),
|
|
229
|
+
...(input.LanguageCode != null && { LanguageCode: input.LanguageCode }),
|
|
230
|
+
...(input.LexiconNames != null && {
|
|
236
231
|
LexiconNames: serializeAws_restJson1LexiconNameList(input.LexiconNames, context),
|
|
237
232
|
}),
|
|
238
|
-
...(input.OutputFormat
|
|
239
|
-
...(input.SampleRate
|
|
240
|
-
...(input.SpeechMarkTypes
|
|
241
|
-
input.SpeechMarkTypes !== null && {
|
|
233
|
+
...(input.OutputFormat != null && { OutputFormat: input.OutputFormat }),
|
|
234
|
+
...(input.SampleRate != null && { SampleRate: input.SampleRate }),
|
|
235
|
+
...(input.SpeechMarkTypes != null && {
|
|
242
236
|
SpeechMarkTypes: serializeAws_restJson1SpeechMarkTypeList(input.SpeechMarkTypes, context),
|
|
243
237
|
}),
|
|
244
|
-
...(input.Text
|
|
245
|
-
...(input.TextType
|
|
246
|
-
...(input.VoiceId
|
|
238
|
+
...(input.Text != null && { Text: input.Text }),
|
|
239
|
+
...(input.TextType != null && { TextType: input.TextType }),
|
|
240
|
+
...(input.VoiceId != null && { VoiceId: input.VoiceId }),
|
|
247
241
|
});
|
|
248
242
|
return new protocol_http_1.HttpRequest({
|
|
249
243
|
protocol,
|
|
@@ -273,8 +267,7 @@ const deserializeAws_restJson1DeleteLexiconCommandError = async (output, context
|
|
|
273
267
|
body: await parseBody(output.body, context),
|
|
274
268
|
};
|
|
275
269
|
let response;
|
|
276
|
-
|
|
277
|
-
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
270
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
278
271
|
switch (errorCode) {
|
|
279
272
|
case "LexiconNotFoundException":
|
|
280
273
|
case "com.amazonaws.polly#LexiconNotFoundException":
|
|
@@ -284,10 +277,12 @@ const deserializeAws_restJson1DeleteLexiconCommandError = async (output, context
|
|
|
284
277
|
throw await deserializeAws_restJson1ServiceFailureExceptionResponse(parsedOutput, context);
|
|
285
278
|
default:
|
|
286
279
|
const parsedBody = parsedOutput.body;
|
|
280
|
+
const $metadata = deserializeMetadata(output);
|
|
281
|
+
const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
|
|
287
282
|
response = new PollyServiceException_1.PollyServiceException({
|
|
288
|
-
name: parsedBody.code || parsedBody.Code || errorCode,
|
|
283
|
+
name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
|
|
289
284
|
$fault: "client",
|
|
290
|
-
$metadata
|
|
285
|
+
$metadata,
|
|
291
286
|
});
|
|
292
287
|
throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
|
|
293
288
|
}
|
|
@@ -317,8 +312,7 @@ const deserializeAws_restJson1DescribeVoicesCommandError = async (output, contex
|
|
|
317
312
|
body: await parseBody(output.body, context),
|
|
318
313
|
};
|
|
319
314
|
let response;
|
|
320
|
-
|
|
321
|
-
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
315
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
322
316
|
switch (errorCode) {
|
|
323
317
|
case "InvalidNextTokenException":
|
|
324
318
|
case "com.amazonaws.polly#InvalidNextTokenException":
|
|
@@ -328,10 +322,12 @@ const deserializeAws_restJson1DescribeVoicesCommandError = async (output, contex
|
|
|
328
322
|
throw await deserializeAws_restJson1ServiceFailureExceptionResponse(parsedOutput, context);
|
|
329
323
|
default:
|
|
330
324
|
const parsedBody = parsedOutput.body;
|
|
325
|
+
const $metadata = deserializeMetadata(output);
|
|
326
|
+
const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
|
|
331
327
|
response = new PollyServiceException_1.PollyServiceException({
|
|
332
|
-
name: parsedBody.code || parsedBody.Code || errorCode,
|
|
328
|
+
name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
|
|
333
329
|
$fault: "client",
|
|
334
|
-
$metadata
|
|
330
|
+
$metadata,
|
|
335
331
|
});
|
|
336
332
|
throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
|
|
337
333
|
}
|
|
@@ -361,8 +357,7 @@ const deserializeAws_restJson1GetLexiconCommandError = async (output, context) =
|
|
|
361
357
|
body: await parseBody(output.body, context),
|
|
362
358
|
};
|
|
363
359
|
let response;
|
|
364
|
-
|
|
365
|
-
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
360
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
366
361
|
switch (errorCode) {
|
|
367
362
|
case "LexiconNotFoundException":
|
|
368
363
|
case "com.amazonaws.polly#LexiconNotFoundException":
|
|
@@ -372,10 +367,12 @@ const deserializeAws_restJson1GetLexiconCommandError = async (output, context) =
|
|
|
372
367
|
throw await deserializeAws_restJson1ServiceFailureExceptionResponse(parsedOutput, context);
|
|
373
368
|
default:
|
|
374
369
|
const parsedBody = parsedOutput.body;
|
|
370
|
+
const $metadata = deserializeMetadata(output);
|
|
371
|
+
const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
|
|
375
372
|
response = new PollyServiceException_1.PollyServiceException({
|
|
376
|
-
name: parsedBody.code || parsedBody.Code || errorCode,
|
|
373
|
+
name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
|
|
377
374
|
$fault: "client",
|
|
378
|
-
$metadata
|
|
375
|
+
$metadata,
|
|
379
376
|
});
|
|
380
377
|
throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
|
|
381
378
|
}
|
|
@@ -401,8 +398,7 @@ const deserializeAws_restJson1GetSpeechSynthesisTaskCommandError = async (output
|
|
|
401
398
|
body: await parseBody(output.body, context),
|
|
402
399
|
};
|
|
403
400
|
let response;
|
|
404
|
-
|
|
405
|
-
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
401
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
406
402
|
switch (errorCode) {
|
|
407
403
|
case "InvalidTaskIdException":
|
|
408
404
|
case "com.amazonaws.polly#InvalidTaskIdException":
|
|
@@ -415,10 +411,12 @@ const deserializeAws_restJson1GetSpeechSynthesisTaskCommandError = async (output
|
|
|
415
411
|
throw await deserializeAws_restJson1SynthesisTaskNotFoundExceptionResponse(parsedOutput, context);
|
|
416
412
|
default:
|
|
417
413
|
const parsedBody = parsedOutput.body;
|
|
414
|
+
const $metadata = deserializeMetadata(output);
|
|
415
|
+
const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
|
|
418
416
|
response = new PollyServiceException_1.PollyServiceException({
|
|
419
|
-
name: parsedBody.code || parsedBody.Code || errorCode,
|
|
417
|
+
name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
|
|
420
418
|
$fault: "client",
|
|
421
|
-
$metadata
|
|
419
|
+
$metadata,
|
|
422
420
|
});
|
|
423
421
|
throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
|
|
424
422
|
}
|
|
@@ -448,8 +446,7 @@ const deserializeAws_restJson1ListLexiconsCommandError = async (output, context)
|
|
|
448
446
|
body: await parseBody(output.body, context),
|
|
449
447
|
};
|
|
450
448
|
let response;
|
|
451
|
-
|
|
452
|
-
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
449
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
453
450
|
switch (errorCode) {
|
|
454
451
|
case "InvalidNextTokenException":
|
|
455
452
|
case "com.amazonaws.polly#InvalidNextTokenException":
|
|
@@ -459,10 +456,12 @@ const deserializeAws_restJson1ListLexiconsCommandError = async (output, context)
|
|
|
459
456
|
throw await deserializeAws_restJson1ServiceFailureExceptionResponse(parsedOutput, context);
|
|
460
457
|
default:
|
|
461
458
|
const parsedBody = parsedOutput.body;
|
|
459
|
+
const $metadata = deserializeMetadata(output);
|
|
460
|
+
const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
|
|
462
461
|
response = new PollyServiceException_1.PollyServiceException({
|
|
463
|
-
name: parsedBody.code || parsedBody.Code || errorCode,
|
|
462
|
+
name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
|
|
464
463
|
$fault: "client",
|
|
465
|
-
$metadata
|
|
464
|
+
$metadata,
|
|
466
465
|
});
|
|
467
466
|
throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
|
|
468
467
|
}
|
|
@@ -492,8 +491,7 @@ const deserializeAws_restJson1ListSpeechSynthesisTasksCommandError = async (outp
|
|
|
492
491
|
body: await parseBody(output.body, context),
|
|
493
492
|
};
|
|
494
493
|
let response;
|
|
495
|
-
|
|
496
|
-
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
494
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
497
495
|
switch (errorCode) {
|
|
498
496
|
case "InvalidNextTokenException":
|
|
499
497
|
case "com.amazonaws.polly#InvalidNextTokenException":
|
|
@@ -503,10 +501,12 @@ const deserializeAws_restJson1ListSpeechSynthesisTasksCommandError = async (outp
|
|
|
503
501
|
throw await deserializeAws_restJson1ServiceFailureExceptionResponse(parsedOutput, context);
|
|
504
502
|
default:
|
|
505
503
|
const parsedBody = parsedOutput.body;
|
|
504
|
+
const $metadata = deserializeMetadata(output);
|
|
505
|
+
const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
|
|
506
506
|
response = new PollyServiceException_1.PollyServiceException({
|
|
507
|
-
name: parsedBody.code || parsedBody.Code || errorCode,
|
|
507
|
+
name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
|
|
508
508
|
$fault: "client",
|
|
509
|
-
$metadata
|
|
509
|
+
$metadata,
|
|
510
510
|
});
|
|
511
511
|
throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
|
|
512
512
|
}
|
|
@@ -528,8 +528,7 @@ const deserializeAws_restJson1PutLexiconCommandError = async (output, context) =
|
|
|
528
528
|
body: await parseBody(output.body, context),
|
|
529
529
|
};
|
|
530
530
|
let response;
|
|
531
|
-
|
|
532
|
-
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
531
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
533
532
|
switch (errorCode) {
|
|
534
533
|
case "InvalidLexiconException":
|
|
535
534
|
case "com.amazonaws.polly#InvalidLexiconException":
|
|
@@ -554,10 +553,12 @@ const deserializeAws_restJson1PutLexiconCommandError = async (output, context) =
|
|
|
554
553
|
throw await deserializeAws_restJson1UnsupportedPlsLanguageExceptionResponse(parsedOutput, context);
|
|
555
554
|
default:
|
|
556
555
|
const parsedBody = parsedOutput.body;
|
|
556
|
+
const $metadata = deserializeMetadata(output);
|
|
557
|
+
const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
|
|
557
558
|
response = new PollyServiceException_1.PollyServiceException({
|
|
558
|
-
name: parsedBody.code || parsedBody.Code || errorCode,
|
|
559
|
+
name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
|
|
559
560
|
$fault: "client",
|
|
560
|
-
$metadata
|
|
561
|
+
$metadata,
|
|
561
562
|
});
|
|
562
563
|
throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
|
|
563
564
|
}
|
|
@@ -583,8 +584,7 @@ const deserializeAws_restJson1StartSpeechSynthesisTaskCommandError = async (outp
|
|
|
583
584
|
body: await parseBody(output.body, context),
|
|
584
585
|
};
|
|
585
586
|
let response;
|
|
586
|
-
|
|
587
|
-
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
587
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
588
588
|
switch (errorCode) {
|
|
589
589
|
case "EngineNotSupportedException":
|
|
590
590
|
case "com.amazonaws.polly#EngineNotSupportedException":
|
|
@@ -624,10 +624,12 @@ const deserializeAws_restJson1StartSpeechSynthesisTaskCommandError = async (outp
|
|
|
624
624
|
throw await deserializeAws_restJson1TextLengthExceededExceptionResponse(parsedOutput, context);
|
|
625
625
|
default:
|
|
626
626
|
const parsedBody = parsedOutput.body;
|
|
627
|
+
const $metadata = deserializeMetadata(output);
|
|
628
|
+
const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
|
|
627
629
|
response = new PollyServiceException_1.PollyServiceException({
|
|
628
|
-
name: parsedBody.code || parsedBody.Code || errorCode,
|
|
630
|
+
name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
|
|
629
631
|
$fault: "client",
|
|
630
|
-
$metadata
|
|
632
|
+
$metadata,
|
|
631
633
|
});
|
|
632
634
|
throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
|
|
633
635
|
}
|
|
@@ -659,8 +661,7 @@ const deserializeAws_restJson1SynthesizeSpeechCommandError = async (output, cont
|
|
|
659
661
|
body: await parseBody(output.body, context),
|
|
660
662
|
};
|
|
661
663
|
let response;
|
|
662
|
-
|
|
663
|
-
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
664
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
664
665
|
switch (errorCode) {
|
|
665
666
|
case "EngineNotSupportedException":
|
|
666
667
|
case "com.amazonaws.polly#EngineNotSupportedException":
|
|
@@ -691,10 +692,12 @@ const deserializeAws_restJson1SynthesizeSpeechCommandError = async (output, cont
|
|
|
691
692
|
throw await deserializeAws_restJson1TextLengthExceededExceptionResponse(parsedOutput, context);
|
|
692
693
|
default:
|
|
693
694
|
const parsedBody = parsedOutput.body;
|
|
695
|
+
const $metadata = deserializeMetadata(output);
|
|
696
|
+
const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
|
|
694
697
|
response = new PollyServiceException_1.PollyServiceException({
|
|
695
|
-
name: parsedBody.code || parsedBody.Code || errorCode,
|
|
698
|
+
name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
|
|
696
699
|
$fault: "client",
|
|
697
|
-
$metadata
|
|
700
|
+
$metadata,
|
|
698
701
|
});
|
|
699
702
|
throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
|
|
700
703
|
}
|
|
@@ -1003,7 +1006,7 @@ const deserializeAws_restJson1LexiconAttributes = (output, context) => {
|
|
|
1003
1006
|
return {
|
|
1004
1007
|
Alphabet: (0, smithy_client_1.expectString)(output.Alphabet),
|
|
1005
1008
|
LanguageCode: (0, smithy_client_1.expectString)(output.LanguageCode),
|
|
1006
|
-
LastModified: output.LastModified
|
|
1009
|
+
LastModified: output.LastModified != null
|
|
1007
1010
|
? (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(output.LastModified)))
|
|
1008
1011
|
: undefined,
|
|
1009
1012
|
LexemesCount: (0, smithy_client_1.expectInt32)(output.LexemesCount),
|
|
@@ -1013,9 +1016,7 @@ const deserializeAws_restJson1LexiconAttributes = (output, context) => {
|
|
|
1013
1016
|
};
|
|
1014
1017
|
const deserializeAws_restJson1LexiconDescription = (output, context) => {
|
|
1015
1018
|
return {
|
|
1016
|
-
Attributes: output.Attributes
|
|
1017
|
-
? deserializeAws_restJson1LexiconAttributes(output.Attributes, context)
|
|
1018
|
-
: undefined,
|
|
1019
|
+
Attributes: output.Attributes != null ? deserializeAws_restJson1LexiconAttributes(output.Attributes, context) : undefined,
|
|
1019
1020
|
Name: (0, smithy_client_1.expectString)(output.Name),
|
|
1020
1021
|
};
|
|
1021
1022
|
};
|
|
@@ -1054,20 +1055,18 @@ const deserializeAws_restJson1SpeechMarkTypeList = (output, context) => {
|
|
|
1054
1055
|
};
|
|
1055
1056
|
const deserializeAws_restJson1SynthesisTask = (output, context) => {
|
|
1056
1057
|
return {
|
|
1057
|
-
CreationTime: output.CreationTime
|
|
1058
|
+
CreationTime: output.CreationTime != null
|
|
1058
1059
|
? (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(output.CreationTime)))
|
|
1059
1060
|
: undefined,
|
|
1060
1061
|
Engine: (0, smithy_client_1.expectString)(output.Engine),
|
|
1061
1062
|
LanguageCode: (0, smithy_client_1.expectString)(output.LanguageCode),
|
|
1062
|
-
LexiconNames: output.LexiconNames
|
|
1063
|
-
? deserializeAws_restJson1LexiconNameList(output.LexiconNames, context)
|
|
1064
|
-
: undefined,
|
|
1063
|
+
LexiconNames: output.LexiconNames != null ? deserializeAws_restJson1LexiconNameList(output.LexiconNames, context) : undefined,
|
|
1065
1064
|
OutputFormat: (0, smithy_client_1.expectString)(output.OutputFormat),
|
|
1066
1065
|
OutputUri: (0, smithy_client_1.expectString)(output.OutputUri),
|
|
1067
1066
|
RequestCharacters: (0, smithy_client_1.expectInt32)(output.RequestCharacters),
|
|
1068
1067
|
SampleRate: (0, smithy_client_1.expectString)(output.SampleRate),
|
|
1069
1068
|
SnsTopicArn: (0, smithy_client_1.expectString)(output.SnsTopicArn),
|
|
1070
|
-
SpeechMarkTypes: output.SpeechMarkTypes
|
|
1069
|
+
SpeechMarkTypes: output.SpeechMarkTypes != null
|
|
1071
1070
|
? deserializeAws_restJson1SpeechMarkTypeList(output.SpeechMarkTypes, context)
|
|
1072
1071
|
: undefined,
|
|
1073
1072
|
TaskId: (0, smithy_client_1.expectString)(output.TaskId),
|
|
@@ -1090,7 +1089,7 @@ const deserializeAws_restJson1SynthesisTasks = (output, context) => {
|
|
|
1090
1089
|
};
|
|
1091
1090
|
const deserializeAws_restJson1Voice = (output, context) => {
|
|
1092
1091
|
return {
|
|
1093
|
-
AdditionalLanguageCodes: output.AdditionalLanguageCodes
|
|
1092
|
+
AdditionalLanguageCodes: output.AdditionalLanguageCodes != null
|
|
1094
1093
|
? deserializeAws_restJson1LanguageCodeList(output.AdditionalLanguageCodes, context)
|
|
1095
1094
|
: undefined,
|
|
1096
1095
|
Gender: (0, smithy_client_1.expectString)(output.Gender),
|
|
@@ -1098,7 +1097,7 @@ const deserializeAws_restJson1Voice = (output, context) => {
|
|
|
1098
1097
|
LanguageCode: (0, smithy_client_1.expectString)(output.LanguageCode),
|
|
1099
1098
|
LanguageName: (0, smithy_client_1.expectString)(output.LanguageName),
|
|
1100
1099
|
Name: (0, smithy_client_1.expectString)(output.Name),
|
|
1101
|
-
SupportedEngines: output.SupportedEngines
|
|
1100
|
+
SupportedEngines: output.SupportedEngines != null
|
|
1102
1101
|
? deserializeAws_restJson1EngineList(output.SupportedEngines, context)
|
|
1103
1102
|
: undefined,
|
|
1104
1103
|
};
|
|
@@ -1163,5 +1162,4 @@ const loadRestJsonErrorCode = (output, data) => {
|
|
|
1163
1162
|
if (data["__type"] !== undefined) {
|
|
1164
1163
|
return sanitizeErrorCode(data["__type"]);
|
|
1165
1164
|
}
|
|
1166
|
-
return "";
|
|
1167
1165
|
};
|
|
@@ -188,7 +188,7 @@ export var serializeAws_restJson1PutLexiconCommand = function (input, context) {
|
|
|
188
188
|
else {
|
|
189
189
|
throw new Error("No value provided for input HTTP label: Name.");
|
|
190
190
|
}
|
|
191
|
-
body = JSON.stringify(__assign({}, (input.Content
|
|
191
|
+
body = JSON.stringify(__assign({}, (input.Content != null && { Content: input.Content })));
|
|
192
192
|
return [2, new __HttpRequest({
|
|
193
193
|
protocol: protocol,
|
|
194
194
|
hostname: hostname,
|
|
@@ -212,15 +212,11 @@ export var serializeAws_restJson1StartSpeechSynthesisTaskCommand = function (inp
|
|
|
212
212
|
"content-type": "application/json",
|
|
213
213
|
};
|
|
214
214
|
resolvedPath = "".concat((basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || "") + "/v1/synthesisTasks";
|
|
215
|
-
body = JSON.stringify(__assign(__assign(__assign(__assign(__assign(__assign(__assign(__assign(__assign(__assign(__assign(__assign({}, (input.Engine
|
|
216
|
-
input.LexiconNames !== null && {
|
|
215
|
+
body = JSON.stringify(__assign(__assign(__assign(__assign(__assign(__assign(__assign(__assign(__assign(__assign(__assign(__assign({}, (input.Engine != null && { Engine: input.Engine })), (input.LanguageCode != null && { LanguageCode: input.LanguageCode })), (input.LexiconNames != null && {
|
|
217
216
|
LexiconNames: serializeAws_restJson1LexiconNameList(input.LexiconNames, context),
|
|
218
|
-
})), (input.OutputFormat
|
|
219
|
-
input.OutputS3BucketName !== null && { OutputS3BucketName: input.OutputS3BucketName })), (input.OutputS3KeyPrefix !== undefined &&
|
|
220
|
-
input.OutputS3KeyPrefix !== null && { OutputS3KeyPrefix: input.OutputS3KeyPrefix })), (input.SampleRate !== undefined && input.SampleRate !== null && { SampleRate: input.SampleRate })), (input.SnsTopicArn !== undefined && input.SnsTopicArn !== null && { SnsTopicArn: input.SnsTopicArn })), (input.SpeechMarkTypes !== undefined &&
|
|
221
|
-
input.SpeechMarkTypes !== null && {
|
|
217
|
+
})), (input.OutputFormat != null && { OutputFormat: input.OutputFormat })), (input.OutputS3BucketName != null && { OutputS3BucketName: input.OutputS3BucketName })), (input.OutputS3KeyPrefix != null && { OutputS3KeyPrefix: input.OutputS3KeyPrefix })), (input.SampleRate != null && { SampleRate: input.SampleRate })), (input.SnsTopicArn != null && { SnsTopicArn: input.SnsTopicArn })), (input.SpeechMarkTypes != null && {
|
|
222
218
|
SpeechMarkTypes: serializeAws_restJson1SpeechMarkTypeList(input.SpeechMarkTypes, context),
|
|
223
|
-
})), (input.Text
|
|
219
|
+
})), (input.Text != null && { Text: input.Text })), (input.TextType != null && { TextType: input.TextType })), (input.VoiceId != null && { VoiceId: input.VoiceId })));
|
|
224
220
|
return [2, new __HttpRequest({
|
|
225
221
|
protocol: protocol,
|
|
226
222
|
hostname: hostname,
|
|
@@ -244,13 +240,11 @@ export var serializeAws_restJson1SynthesizeSpeechCommand = function (input, cont
|
|
|
244
240
|
"content-type": "application/json",
|
|
245
241
|
};
|
|
246
242
|
resolvedPath = "".concat((basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || "") + "/v1/speech";
|
|
247
|
-
body = JSON.stringify(__assign(__assign(__assign(__assign(__assign(__assign(__assign(__assign(__assign({}, (input.Engine
|
|
248
|
-
input.LexiconNames !== null && {
|
|
243
|
+
body = JSON.stringify(__assign(__assign(__assign(__assign(__assign(__assign(__assign(__assign(__assign({}, (input.Engine != null && { Engine: input.Engine })), (input.LanguageCode != null && { LanguageCode: input.LanguageCode })), (input.LexiconNames != null && {
|
|
249
244
|
LexiconNames: serializeAws_restJson1LexiconNameList(input.LexiconNames, context),
|
|
250
|
-
})), (input.OutputFormat
|
|
251
|
-
input.SpeechMarkTypes !== null && {
|
|
245
|
+
})), (input.OutputFormat != null && { OutputFormat: input.OutputFormat })), (input.SampleRate != null && { SampleRate: input.SampleRate })), (input.SpeechMarkTypes != null && {
|
|
252
246
|
SpeechMarkTypes: serializeAws_restJson1SpeechMarkTypeList(input.SpeechMarkTypes, context),
|
|
253
|
-
})), (input.Text
|
|
247
|
+
})), (input.Text != null && { Text: input.Text })), (input.TextType != null && { TextType: input.TextType })), (input.VoiceId != null && { VoiceId: input.VoiceId })));
|
|
254
248
|
return [2, new __HttpRequest({
|
|
255
249
|
protocol: protocol,
|
|
256
250
|
hostname: hostname,
|
|
@@ -282,7 +276,7 @@ export var deserializeAws_restJson1DeleteLexiconCommand = function (output, cont
|
|
|
282
276
|
});
|
|
283
277
|
}); };
|
|
284
278
|
var deserializeAws_restJson1DeleteLexiconCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
285
|
-
var parsedOutput, _a, response, errorCode, _b, parsedBody;
|
|
279
|
+
var parsedOutput, _a, response, errorCode, _b, parsedBody, $metadata, statusCode;
|
|
286
280
|
var _c;
|
|
287
281
|
return __generator(this, function (_d) {
|
|
288
282
|
switch (_d.label) {
|
|
@@ -292,7 +286,6 @@ var deserializeAws_restJson1DeleteLexiconCommandError = function (output, contex
|
|
|
292
286
|
return [4, parseBody(output.body, context)];
|
|
293
287
|
case 1:
|
|
294
288
|
parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
|
|
295
|
-
errorCode = "UnknownError";
|
|
296
289
|
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
297
290
|
_b = errorCode;
|
|
298
291
|
switch (_b) {
|
|
@@ -308,10 +301,12 @@ var deserializeAws_restJson1DeleteLexiconCommandError = function (output, contex
|
|
|
308
301
|
case 5: throw _d.sent();
|
|
309
302
|
case 6:
|
|
310
303
|
parsedBody = parsedOutput.body;
|
|
304
|
+
$metadata = deserializeMetadata(output);
|
|
305
|
+
statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
|
|
311
306
|
response = new __BaseException({
|
|
312
|
-
name: parsedBody.code || parsedBody.Code || errorCode,
|
|
307
|
+
name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
|
|
313
308
|
$fault: "client",
|
|
314
|
-
$metadata:
|
|
309
|
+
$metadata: $metadata,
|
|
315
310
|
});
|
|
316
311
|
throw __decorateServiceException(response, parsedBody);
|
|
317
312
|
}
|
|
@@ -346,7 +341,7 @@ export var deserializeAws_restJson1DescribeVoicesCommand = function (output, con
|
|
|
346
341
|
});
|
|
347
342
|
}); };
|
|
348
343
|
var deserializeAws_restJson1DescribeVoicesCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
349
|
-
var parsedOutput, _a, response, errorCode, _b, parsedBody;
|
|
344
|
+
var parsedOutput, _a, response, errorCode, _b, parsedBody, $metadata, statusCode;
|
|
350
345
|
var _c;
|
|
351
346
|
return __generator(this, function (_d) {
|
|
352
347
|
switch (_d.label) {
|
|
@@ -356,7 +351,6 @@ var deserializeAws_restJson1DescribeVoicesCommandError = function (output, conte
|
|
|
356
351
|
return [4, parseBody(output.body, context)];
|
|
357
352
|
case 1:
|
|
358
353
|
parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
|
|
359
|
-
errorCode = "UnknownError";
|
|
360
354
|
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
361
355
|
_b = errorCode;
|
|
362
356
|
switch (_b) {
|
|
@@ -372,10 +366,12 @@ var deserializeAws_restJson1DescribeVoicesCommandError = function (output, conte
|
|
|
372
366
|
case 5: throw _d.sent();
|
|
373
367
|
case 6:
|
|
374
368
|
parsedBody = parsedOutput.body;
|
|
369
|
+
$metadata = deserializeMetadata(output);
|
|
370
|
+
statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
|
|
375
371
|
response = new __BaseException({
|
|
376
|
-
name: parsedBody.code || parsedBody.Code || errorCode,
|
|
372
|
+
name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
|
|
377
373
|
$fault: "client",
|
|
378
|
-
$metadata:
|
|
374
|
+
$metadata: $metadata,
|
|
379
375
|
});
|
|
380
376
|
throw __decorateServiceException(response, parsedBody);
|
|
381
377
|
}
|
|
@@ -410,7 +406,7 @@ export var deserializeAws_restJson1GetLexiconCommand = function (output, context
|
|
|
410
406
|
});
|
|
411
407
|
}); };
|
|
412
408
|
var deserializeAws_restJson1GetLexiconCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
413
|
-
var parsedOutput, _a, response, errorCode, _b, parsedBody;
|
|
409
|
+
var parsedOutput, _a, response, errorCode, _b, parsedBody, $metadata, statusCode;
|
|
414
410
|
var _c;
|
|
415
411
|
return __generator(this, function (_d) {
|
|
416
412
|
switch (_d.label) {
|
|
@@ -420,7 +416,6 @@ var deserializeAws_restJson1GetLexiconCommandError = function (output, context)
|
|
|
420
416
|
return [4, parseBody(output.body, context)];
|
|
421
417
|
case 1:
|
|
422
418
|
parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
|
|
423
|
-
errorCode = "UnknownError";
|
|
424
419
|
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
425
420
|
_b = errorCode;
|
|
426
421
|
switch (_b) {
|
|
@@ -436,10 +431,12 @@ var deserializeAws_restJson1GetLexiconCommandError = function (output, context)
|
|
|
436
431
|
case 5: throw _d.sent();
|
|
437
432
|
case 6:
|
|
438
433
|
parsedBody = parsedOutput.body;
|
|
434
|
+
$metadata = deserializeMetadata(output);
|
|
435
|
+
statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
|
|
439
436
|
response = new __BaseException({
|
|
440
|
-
name: parsedBody.code || parsedBody.Code || errorCode,
|
|
437
|
+
name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
|
|
441
438
|
$fault: "client",
|
|
442
|
-
$metadata:
|
|
439
|
+
$metadata: $metadata,
|
|
443
440
|
});
|
|
444
441
|
throw __decorateServiceException(response, parsedBody);
|
|
445
442
|
}
|
|
@@ -470,7 +467,7 @@ export var deserializeAws_restJson1GetSpeechSynthesisTaskCommand = function (out
|
|
|
470
467
|
});
|
|
471
468
|
}); };
|
|
472
469
|
var deserializeAws_restJson1GetSpeechSynthesisTaskCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
473
|
-
var parsedOutput, _a, response, errorCode, _b, parsedBody;
|
|
470
|
+
var parsedOutput, _a, response, errorCode, _b, parsedBody, $metadata, statusCode;
|
|
474
471
|
var _c;
|
|
475
472
|
return __generator(this, function (_d) {
|
|
476
473
|
switch (_d.label) {
|
|
@@ -480,7 +477,6 @@ var deserializeAws_restJson1GetSpeechSynthesisTaskCommandError = function (outpu
|
|
|
480
477
|
return [4, parseBody(output.body, context)];
|
|
481
478
|
case 1:
|
|
482
479
|
parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
|
|
483
|
-
errorCode = "UnknownError";
|
|
484
480
|
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
485
481
|
_b = errorCode;
|
|
486
482
|
switch (_b) {
|
|
@@ -500,10 +496,12 @@ var deserializeAws_restJson1GetSpeechSynthesisTaskCommandError = function (outpu
|
|
|
500
496
|
case 7: throw _d.sent();
|
|
501
497
|
case 8:
|
|
502
498
|
parsedBody = parsedOutput.body;
|
|
499
|
+
$metadata = deserializeMetadata(output);
|
|
500
|
+
statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
|
|
503
501
|
response = new __BaseException({
|
|
504
|
-
name: parsedBody.code || parsedBody.Code || errorCode,
|
|
502
|
+
name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
|
|
505
503
|
$fault: "client",
|
|
506
|
-
$metadata:
|
|
504
|
+
$metadata: $metadata,
|
|
507
505
|
});
|
|
508
506
|
throw __decorateServiceException(response, parsedBody);
|
|
509
507
|
}
|
|
@@ -538,7 +536,7 @@ export var deserializeAws_restJson1ListLexiconsCommand = function (output, conte
|
|
|
538
536
|
});
|
|
539
537
|
}); };
|
|
540
538
|
var deserializeAws_restJson1ListLexiconsCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
541
|
-
var parsedOutput, _a, response, errorCode, _b, parsedBody;
|
|
539
|
+
var parsedOutput, _a, response, errorCode, _b, parsedBody, $metadata, statusCode;
|
|
542
540
|
var _c;
|
|
543
541
|
return __generator(this, function (_d) {
|
|
544
542
|
switch (_d.label) {
|
|
@@ -548,7 +546,6 @@ var deserializeAws_restJson1ListLexiconsCommandError = function (output, context
|
|
|
548
546
|
return [4, parseBody(output.body, context)];
|
|
549
547
|
case 1:
|
|
550
548
|
parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
|
|
551
|
-
errorCode = "UnknownError";
|
|
552
549
|
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
553
550
|
_b = errorCode;
|
|
554
551
|
switch (_b) {
|
|
@@ -564,10 +561,12 @@ var deserializeAws_restJson1ListLexiconsCommandError = function (output, context
|
|
|
564
561
|
case 5: throw _d.sent();
|
|
565
562
|
case 6:
|
|
566
563
|
parsedBody = parsedOutput.body;
|
|
564
|
+
$metadata = deserializeMetadata(output);
|
|
565
|
+
statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
|
|
567
566
|
response = new __BaseException({
|
|
568
|
-
name: parsedBody.code || parsedBody.Code || errorCode,
|
|
567
|
+
name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
|
|
569
568
|
$fault: "client",
|
|
570
|
-
$metadata:
|
|
569
|
+
$metadata: $metadata,
|
|
571
570
|
});
|
|
572
571
|
throw __decorateServiceException(response, parsedBody);
|
|
573
572
|
}
|
|
@@ -602,7 +601,7 @@ export var deserializeAws_restJson1ListSpeechSynthesisTasksCommand = function (o
|
|
|
602
601
|
});
|
|
603
602
|
}); };
|
|
604
603
|
var deserializeAws_restJson1ListSpeechSynthesisTasksCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
605
|
-
var parsedOutput, _a, response, errorCode, _b, parsedBody;
|
|
604
|
+
var parsedOutput, _a, response, errorCode, _b, parsedBody, $metadata, statusCode;
|
|
606
605
|
var _c;
|
|
607
606
|
return __generator(this, function (_d) {
|
|
608
607
|
switch (_d.label) {
|
|
@@ -612,7 +611,6 @@ var deserializeAws_restJson1ListSpeechSynthesisTasksCommandError = function (out
|
|
|
612
611
|
return [4, parseBody(output.body, context)];
|
|
613
612
|
case 1:
|
|
614
613
|
parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
|
|
615
|
-
errorCode = "UnknownError";
|
|
616
614
|
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
617
615
|
_b = errorCode;
|
|
618
616
|
switch (_b) {
|
|
@@ -628,10 +626,12 @@ var deserializeAws_restJson1ListSpeechSynthesisTasksCommandError = function (out
|
|
|
628
626
|
case 5: throw _d.sent();
|
|
629
627
|
case 6:
|
|
630
628
|
parsedBody = parsedOutput.body;
|
|
629
|
+
$metadata = deserializeMetadata(output);
|
|
630
|
+
statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
|
|
631
631
|
response = new __BaseException({
|
|
632
|
-
name: parsedBody.code || parsedBody.Code || errorCode,
|
|
632
|
+
name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
|
|
633
633
|
$fault: "client",
|
|
634
|
-
$metadata:
|
|
634
|
+
$metadata: $metadata,
|
|
635
635
|
});
|
|
636
636
|
throw __decorateServiceException(response, parsedBody);
|
|
637
637
|
}
|
|
@@ -656,7 +656,7 @@ export var deserializeAws_restJson1PutLexiconCommand = function (output, context
|
|
|
656
656
|
});
|
|
657
657
|
}); };
|
|
658
658
|
var deserializeAws_restJson1PutLexiconCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
659
|
-
var parsedOutput, _a, response, errorCode, _b, parsedBody;
|
|
659
|
+
var parsedOutput, _a, response, errorCode, _b, parsedBody, $metadata, statusCode;
|
|
660
660
|
var _c;
|
|
661
661
|
return __generator(this, function (_d) {
|
|
662
662
|
switch (_d.label) {
|
|
@@ -666,7 +666,6 @@ var deserializeAws_restJson1PutLexiconCommandError = function (output, context)
|
|
|
666
666
|
return [4, parseBody(output.body, context)];
|
|
667
667
|
case 1:
|
|
668
668
|
parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
|
|
669
|
-
errorCode = "UnknownError";
|
|
670
669
|
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
671
670
|
_b = errorCode;
|
|
672
671
|
switch (_b) {
|
|
@@ -702,10 +701,12 @@ var deserializeAws_restJson1PutLexiconCommandError = function (output, context)
|
|
|
702
701
|
case 15: throw _d.sent();
|
|
703
702
|
case 16:
|
|
704
703
|
parsedBody = parsedOutput.body;
|
|
704
|
+
$metadata = deserializeMetadata(output);
|
|
705
|
+
statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
|
|
705
706
|
response = new __BaseException({
|
|
706
|
-
name: parsedBody.code || parsedBody.Code || errorCode,
|
|
707
|
+
name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
|
|
707
708
|
$fault: "client",
|
|
708
|
-
$metadata:
|
|
709
|
+
$metadata: $metadata,
|
|
709
710
|
});
|
|
710
711
|
throw __decorateServiceException(response, parsedBody);
|
|
711
712
|
}
|
|
@@ -736,7 +737,7 @@ export var deserializeAws_restJson1StartSpeechSynthesisTaskCommand = function (o
|
|
|
736
737
|
});
|
|
737
738
|
}); };
|
|
738
739
|
var deserializeAws_restJson1StartSpeechSynthesisTaskCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
739
|
-
var parsedOutput, _a, response, errorCode, _b, parsedBody;
|
|
740
|
+
var parsedOutput, _a, response, errorCode, _b, parsedBody, $metadata, statusCode;
|
|
740
741
|
var _c;
|
|
741
742
|
return __generator(this, function (_d) {
|
|
742
743
|
switch (_d.label) {
|
|
@@ -746,7 +747,6 @@ var deserializeAws_restJson1StartSpeechSynthesisTaskCommandError = function (out
|
|
|
746
747
|
return [4, parseBody(output.body, context)];
|
|
747
748
|
case 1:
|
|
748
749
|
parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
|
|
749
|
-
errorCode = "UnknownError";
|
|
750
750
|
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
751
751
|
_b = errorCode;
|
|
752
752
|
switch (_b) {
|
|
@@ -802,10 +802,12 @@ var deserializeAws_restJson1StartSpeechSynthesisTaskCommandError = function (out
|
|
|
802
802
|
case 25: throw _d.sent();
|
|
803
803
|
case 26:
|
|
804
804
|
parsedBody = parsedOutput.body;
|
|
805
|
+
$metadata = deserializeMetadata(output);
|
|
806
|
+
statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
|
|
805
807
|
response = new __BaseException({
|
|
806
|
-
name: parsedBody.code || parsedBody.Code || errorCode,
|
|
808
|
+
name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
|
|
807
809
|
$fault: "client",
|
|
808
|
-
$metadata:
|
|
810
|
+
$metadata: $metadata,
|
|
809
811
|
});
|
|
810
812
|
throw __decorateServiceException(response, parsedBody);
|
|
811
813
|
}
|
|
@@ -835,7 +837,7 @@ export var deserializeAws_restJson1SynthesizeSpeechCommand = function (output, c
|
|
|
835
837
|
});
|
|
836
838
|
}); };
|
|
837
839
|
var deserializeAws_restJson1SynthesizeSpeechCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
838
|
-
var parsedOutput, _a, response, errorCode, _b, parsedBody;
|
|
840
|
+
var parsedOutput, _a, response, errorCode, _b, parsedBody, $metadata, statusCode;
|
|
839
841
|
var _c;
|
|
840
842
|
return __generator(this, function (_d) {
|
|
841
843
|
switch (_d.label) {
|
|
@@ -845,7 +847,6 @@ var deserializeAws_restJson1SynthesizeSpeechCommandError = function (output, con
|
|
|
845
847
|
return [4, parseBody(output.body, context)];
|
|
846
848
|
case 1:
|
|
847
849
|
parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
|
|
848
|
-
errorCode = "UnknownError";
|
|
849
850
|
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
850
851
|
_b = errorCode;
|
|
851
852
|
switch (_b) {
|
|
@@ -889,10 +890,12 @@ var deserializeAws_restJson1SynthesizeSpeechCommandError = function (output, con
|
|
|
889
890
|
case 19: throw _d.sent();
|
|
890
891
|
case 20:
|
|
891
892
|
parsedBody = parsedOutput.body;
|
|
893
|
+
$metadata = deserializeMetadata(output);
|
|
894
|
+
statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
|
|
892
895
|
response = new __BaseException({
|
|
893
|
-
name: parsedBody.code || parsedBody.Code || errorCode,
|
|
896
|
+
name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
|
|
894
897
|
$fault: "client",
|
|
895
|
-
$metadata:
|
|
898
|
+
$metadata: $metadata,
|
|
896
899
|
});
|
|
897
900
|
throw __decorateServiceException(response, parsedBody);
|
|
898
901
|
}
|
|
@@ -1202,7 +1205,7 @@ var deserializeAws_restJson1LexiconAttributes = function (output, context) {
|
|
|
1202
1205
|
return {
|
|
1203
1206
|
Alphabet: __expectString(output.Alphabet),
|
|
1204
1207
|
LanguageCode: __expectString(output.LanguageCode),
|
|
1205
|
-
LastModified: output.LastModified
|
|
1208
|
+
LastModified: output.LastModified != null
|
|
1206
1209
|
? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.LastModified)))
|
|
1207
1210
|
: undefined,
|
|
1208
1211
|
LexemesCount: __expectInt32(output.LexemesCount),
|
|
@@ -1212,9 +1215,7 @@ var deserializeAws_restJson1LexiconAttributes = function (output, context) {
|
|
|
1212
1215
|
};
|
|
1213
1216
|
var deserializeAws_restJson1LexiconDescription = function (output, context) {
|
|
1214
1217
|
return {
|
|
1215
|
-
Attributes: output.Attributes
|
|
1216
|
-
? deserializeAws_restJson1LexiconAttributes(output.Attributes, context)
|
|
1217
|
-
: undefined,
|
|
1218
|
+
Attributes: output.Attributes != null ? deserializeAws_restJson1LexiconAttributes(output.Attributes, context) : undefined,
|
|
1218
1219
|
Name: __expectString(output.Name),
|
|
1219
1220
|
};
|
|
1220
1221
|
};
|
|
@@ -1253,20 +1254,18 @@ var deserializeAws_restJson1SpeechMarkTypeList = function (output, context) {
|
|
|
1253
1254
|
};
|
|
1254
1255
|
var deserializeAws_restJson1SynthesisTask = function (output, context) {
|
|
1255
1256
|
return {
|
|
1256
|
-
CreationTime: output.CreationTime
|
|
1257
|
+
CreationTime: output.CreationTime != null
|
|
1257
1258
|
? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.CreationTime)))
|
|
1258
1259
|
: undefined,
|
|
1259
1260
|
Engine: __expectString(output.Engine),
|
|
1260
1261
|
LanguageCode: __expectString(output.LanguageCode),
|
|
1261
|
-
LexiconNames: output.LexiconNames
|
|
1262
|
-
? deserializeAws_restJson1LexiconNameList(output.LexiconNames, context)
|
|
1263
|
-
: undefined,
|
|
1262
|
+
LexiconNames: output.LexiconNames != null ? deserializeAws_restJson1LexiconNameList(output.LexiconNames, context) : undefined,
|
|
1264
1263
|
OutputFormat: __expectString(output.OutputFormat),
|
|
1265
1264
|
OutputUri: __expectString(output.OutputUri),
|
|
1266
1265
|
RequestCharacters: __expectInt32(output.RequestCharacters),
|
|
1267
1266
|
SampleRate: __expectString(output.SampleRate),
|
|
1268
1267
|
SnsTopicArn: __expectString(output.SnsTopicArn),
|
|
1269
|
-
SpeechMarkTypes: output.SpeechMarkTypes
|
|
1268
|
+
SpeechMarkTypes: output.SpeechMarkTypes != null
|
|
1270
1269
|
? deserializeAws_restJson1SpeechMarkTypeList(output.SpeechMarkTypes, context)
|
|
1271
1270
|
: undefined,
|
|
1272
1271
|
TaskId: __expectString(output.TaskId),
|
|
@@ -1289,7 +1288,7 @@ var deserializeAws_restJson1SynthesisTasks = function (output, context) {
|
|
|
1289
1288
|
};
|
|
1290
1289
|
var deserializeAws_restJson1Voice = function (output, context) {
|
|
1291
1290
|
return {
|
|
1292
|
-
AdditionalLanguageCodes: output.AdditionalLanguageCodes
|
|
1291
|
+
AdditionalLanguageCodes: output.AdditionalLanguageCodes != null
|
|
1293
1292
|
? deserializeAws_restJson1LanguageCodeList(output.AdditionalLanguageCodes, context)
|
|
1294
1293
|
: undefined,
|
|
1295
1294
|
Gender: __expectString(output.Gender),
|
|
@@ -1297,7 +1296,7 @@ var deserializeAws_restJson1Voice = function (output, context) {
|
|
|
1297
1296
|
LanguageCode: __expectString(output.LanguageCode),
|
|
1298
1297
|
LanguageName: __expectString(output.LanguageName),
|
|
1299
1298
|
Name: __expectString(output.Name),
|
|
1300
|
-
SupportedEngines: output.SupportedEngines
|
|
1299
|
+
SupportedEngines: output.SupportedEngines != null
|
|
1301
1300
|
? deserializeAws_restJson1EngineList(output.SupportedEngines, context)
|
|
1302
1301
|
: undefined,
|
|
1303
1302
|
};
|
|
@@ -1369,5 +1368,4 @@ var loadRestJsonErrorCode = function (output, data) {
|
|
|
1369
1368
|
if (data["__type"] !== undefined) {
|
|
1370
1369
|
return sanitizeErrorCode(data["__type"]);
|
|
1371
1370
|
}
|
|
1372
|
-
return "";
|
|
1373
1371
|
};
|
|
@@ -90,7 +90,7 @@ export declare namespace DescribeVoicesInput {
|
|
|
90
90
|
const filterSensitiveLog: (obj: DescribeVoicesInput) => any;
|
|
91
91
|
}
|
|
92
92
|
export declare type Gender = "Female" | "Male";
|
|
93
|
-
export declare type VoiceId = "Aditi" | "Amy" | "Aria" | "Arlet" | "Astrid" | "Ayanda" | "Bianca" | "Brian" | "Camila" | "Carla" | "Carmen" | "Celine" | "Chantal" | "Conchita" | "Cristiano" | "Dora" | "Emma" | "Enrique" | "Ewa" | "Filiz" | "Gabrielle" | "Geraint" | "Giorgio" | "Gwyneth" | "Hannah" | "Hans" | "Ines" | "Ivy" | "Jacek" | "Jan" | "Joanna" | "Joey" | "Justin" | "Karl" | "Kendra" | "Kevin" | "Kimberly" | "Lea" | "Liv" | "Lotte" | "Lucia" | "Lupe" | "Mads" | "Maja" | "Marlene" | "Mathieu" | "Matthew" | "Maxim" | "Mia" | "Miguel" | "Mizuki" | "Naja" | "Nicole" | "Olivia" | "Penelope" | "Raveena" | "Ricardo" | "Ruben" | "Russell" | "Salli" | "Seoyeon" | "Takumi" | "Tatyana" | "Vicki" | "Vitoria" | "Zeina" | "Zhiyu";
|
|
93
|
+
export declare type VoiceId = "Aditi" | "Amy" | "Aria" | "Arlet" | "Arthur" | "Astrid" | "Ayanda" | "Bianca" | "Brian" | "Camila" | "Carla" | "Carmen" | "Celine" | "Chantal" | "Conchita" | "Cristiano" | "Daniel" | "Dora" | "Emma" | "Enrique" | "Ewa" | "Filiz" | "Gabrielle" | "Geraint" | "Giorgio" | "Gwyneth" | "Hannah" | "Hans" | "Ines" | "Ivy" | "Jacek" | "Jan" | "Joanna" | "Joey" | "Justin" | "Karl" | "Kendra" | "Kevin" | "Kimberly" | "Lea" | "Liam" | "Liv" | "Lotte" | "Lucia" | "Lupe" | "Mads" | "Maja" | "Marlene" | "Mathieu" | "Matthew" | "Maxim" | "Mia" | "Miguel" | "Mizuki" | "Naja" | "Nicole" | "Olivia" | "Pedro" | "Penelope" | "Raveena" | "Ricardo" | "Ruben" | "Russell" | "Salli" | "Seoyeon" | "Takumi" | "Tatyana" | "Vicki" | "Vitoria" | "Zeina" | "Zhiyu";
|
|
94
94
|
/**
|
|
95
95
|
* <p>Description of the voice.</p>
|
|
96
96
|
*/
|
|
@@ -50,7 +50,7 @@ export declare namespace DescribeVoicesInput {
|
|
|
50
50
|
const filterSensitiveLog: (obj: DescribeVoicesInput) => any;
|
|
51
51
|
}
|
|
52
52
|
export declare type Gender = "Female" | "Male";
|
|
53
|
-
export declare type VoiceId = "Aditi" | "Amy" | "Aria" | "Arlet" | "Astrid" | "Ayanda" | "Bianca" | "Brian" | "Camila" | "Carla" | "Carmen" | "Celine" | "Chantal" | "Conchita" | "Cristiano" | "Dora" | "Emma" | "Enrique" | "Ewa" | "Filiz" | "Gabrielle" | "Geraint" | "Giorgio" | "Gwyneth" | "Hannah" | "Hans" | "Ines" | "Ivy" | "Jacek" | "Jan" | "Joanna" | "Joey" | "Justin" | "Karl" | "Kendra" | "Kevin" | "Kimberly" | "Lea" | "Liv" | "Lotte" | "Lucia" | "Lupe" | "Mads" | "Maja" | "Marlene" | "Mathieu" | "Matthew" | "Maxim" | "Mia" | "Miguel" | "Mizuki" | "Naja" | "Nicole" | "Olivia" | "Penelope" | "Raveena" | "Ricardo" | "Ruben" | "Russell" | "Salli" | "Seoyeon" | "Takumi" | "Tatyana" | "Vicki" | "Vitoria" | "Zeina" | "Zhiyu";
|
|
53
|
+
export declare type VoiceId = "Aditi" | "Amy" | "Aria" | "Arlet" | "Arthur" | "Astrid" | "Ayanda" | "Bianca" | "Brian" | "Camila" | "Carla" | "Carmen" | "Celine" | "Chantal" | "Conchita" | "Cristiano" | "Daniel" | "Dora" | "Emma" | "Enrique" | "Ewa" | "Filiz" | "Gabrielle" | "Geraint" | "Giorgio" | "Gwyneth" | "Hannah" | "Hans" | "Ines" | "Ivy" | "Jacek" | "Jan" | "Joanna" | "Joey" | "Justin" | "Karl" | "Kendra" | "Kevin" | "Kimberly" | "Lea" | "Liam" | "Liv" | "Lotte" | "Lucia" | "Lupe" | "Mads" | "Maja" | "Marlene" | "Mathieu" | "Matthew" | "Maxim" | "Mia" | "Miguel" | "Mizuki" | "Naja" | "Nicole" | "Olivia" | "Pedro" | "Penelope" | "Raveena" | "Ricardo" | "Ruben" | "Russell" | "Salli" | "Seoyeon" | "Takumi" | "Tatyana" | "Vicki" | "Vitoria" | "Zeina" | "Zhiyu";
|
|
54
54
|
|
|
55
55
|
export interface Voice {
|
|
56
56
|
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@aws-sdk/client-polly",
|
|
3
3
|
"description": "AWS SDK for JavaScript Polly Client for Node.js, Browser and React Native",
|
|
4
|
-
"version": "3.
|
|
4
|
+
"version": "3.127.0",
|
|
5
5
|
"scripts": {
|
|
6
6
|
"build": "concurrently 'yarn:build:cjs' 'yarn:build:es' 'yarn:build:types'",
|
|
7
7
|
"build:cjs": "tsc -p tsconfig.cjs.json",
|
|
@@ -18,35 +18,35 @@
|
|
|
18
18
|
"dependencies": {
|
|
19
19
|
"@aws-crypto/sha256-browser": "2.0.0",
|
|
20
20
|
"@aws-crypto/sha256-js": "2.0.0",
|
|
21
|
-
"@aws-sdk/client-sts": "3.
|
|
22
|
-
"@aws-sdk/config-resolver": "3.
|
|
23
|
-
"@aws-sdk/credential-provider-node": "3.
|
|
24
|
-
"@aws-sdk/fetch-http-handler": "3.
|
|
25
|
-
"@aws-sdk/hash-node": "3.
|
|
26
|
-
"@aws-sdk/invalid-dependency": "3.
|
|
27
|
-
"@aws-sdk/middleware-content-length": "3.
|
|
28
|
-
"@aws-sdk/middleware-host-header": "3.
|
|
29
|
-
"@aws-sdk/middleware-logger": "3.
|
|
30
|
-
"@aws-sdk/middleware-recursion-detection": "3.
|
|
31
|
-
"@aws-sdk/middleware-retry": "3.
|
|
32
|
-
"@aws-sdk/middleware-serde": "3.
|
|
33
|
-
"@aws-sdk/middleware-signing": "3.
|
|
34
|
-
"@aws-sdk/middleware-stack": "3.
|
|
35
|
-
"@aws-sdk/middleware-user-agent": "3.
|
|
36
|
-
"@aws-sdk/node-config-provider": "3.
|
|
37
|
-
"@aws-sdk/node-http-handler": "3.
|
|
38
|
-
"@aws-sdk/protocol-http": "3.
|
|
39
|
-
"@aws-sdk/smithy-client": "3.
|
|
40
|
-
"@aws-sdk/types": "3.
|
|
41
|
-
"@aws-sdk/url-parser": "3.
|
|
21
|
+
"@aws-sdk/client-sts": "3.127.0",
|
|
22
|
+
"@aws-sdk/config-resolver": "3.127.0",
|
|
23
|
+
"@aws-sdk/credential-provider-node": "3.127.0",
|
|
24
|
+
"@aws-sdk/fetch-http-handler": "3.127.0",
|
|
25
|
+
"@aws-sdk/hash-node": "3.127.0",
|
|
26
|
+
"@aws-sdk/invalid-dependency": "3.127.0",
|
|
27
|
+
"@aws-sdk/middleware-content-length": "3.127.0",
|
|
28
|
+
"@aws-sdk/middleware-host-header": "3.127.0",
|
|
29
|
+
"@aws-sdk/middleware-logger": "3.127.0",
|
|
30
|
+
"@aws-sdk/middleware-recursion-detection": "3.127.0",
|
|
31
|
+
"@aws-sdk/middleware-retry": "3.127.0",
|
|
32
|
+
"@aws-sdk/middleware-serde": "3.127.0",
|
|
33
|
+
"@aws-sdk/middleware-signing": "3.127.0",
|
|
34
|
+
"@aws-sdk/middleware-stack": "3.127.0",
|
|
35
|
+
"@aws-sdk/middleware-user-agent": "3.127.0",
|
|
36
|
+
"@aws-sdk/node-config-provider": "3.127.0",
|
|
37
|
+
"@aws-sdk/node-http-handler": "3.127.0",
|
|
38
|
+
"@aws-sdk/protocol-http": "3.127.0",
|
|
39
|
+
"@aws-sdk/smithy-client": "3.127.0",
|
|
40
|
+
"@aws-sdk/types": "3.127.0",
|
|
41
|
+
"@aws-sdk/url-parser": "3.127.0",
|
|
42
42
|
"@aws-sdk/util-base64-browser": "3.109.0",
|
|
43
43
|
"@aws-sdk/util-base64-node": "3.55.0",
|
|
44
44
|
"@aws-sdk/util-body-length-browser": "3.55.0",
|
|
45
45
|
"@aws-sdk/util-body-length-node": "3.55.0",
|
|
46
|
-
"@aws-sdk/util-defaults-mode-browser": "3.
|
|
47
|
-
"@aws-sdk/util-defaults-mode-node": "3.
|
|
48
|
-
"@aws-sdk/util-user-agent-browser": "3.
|
|
49
|
-
"@aws-sdk/util-user-agent-node": "3.
|
|
46
|
+
"@aws-sdk/util-defaults-mode-browser": "3.127.0",
|
|
47
|
+
"@aws-sdk/util-defaults-mode-node": "3.127.0",
|
|
48
|
+
"@aws-sdk/util-user-agent-browser": "3.127.0",
|
|
49
|
+
"@aws-sdk/util-user-agent-node": "3.127.0",
|
|
50
50
|
"@aws-sdk/util-utf8-browser": "3.109.0",
|
|
51
51
|
"@aws-sdk/util-utf8-node": "3.109.0",
|
|
52
52
|
"tslib": "^2.3.1"
|