@aws-sdk/client-polly 3.50.0 → 3.53.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 +27 -0
- package/dist-cjs/index.js +3 -0
- package/dist-cjs/models/PollyServiceException.js +11 -0
- package/dist-cjs/models/models_0.js +275 -1
- package/dist-cjs/protocols/Aws_restJson1.js +219 -490
- package/dist-es/index.js +1 -0
- package/dist-es/models/PollyServiceException.js +12 -0
- package/dist-es/models/models_0.js +254 -1
- package/dist-es/protocols/Aws_restJson1.js +291 -548
- package/dist-types/index.d.ts +1 -0
- package/dist-types/models/PollyServiceException.d.ts +10 -0
- package/dist-types/models/models_0.d.ts +149 -85
- package/dist-types/ts3.4/Polly.d.ts +50 -0
- package/dist-types/ts3.4/PollyClient.d.ts +82 -0
- package/dist-types/ts3.4/commands/DeleteLexiconCommand.d.ts +17 -0
- package/dist-types/ts3.4/commands/DescribeVoicesCommand.d.ts +17 -0
- package/dist-types/ts3.4/commands/GetLexiconCommand.d.ts +17 -0
- package/dist-types/ts3.4/commands/GetSpeechSynthesisTaskCommand.d.ts +17 -0
- package/dist-types/ts3.4/commands/ListLexiconsCommand.d.ts +17 -0
- package/dist-types/ts3.4/commands/ListSpeechSynthesisTasksCommand.d.ts +17 -0
- package/dist-types/ts3.4/commands/PutLexiconCommand.d.ts +17 -0
- package/dist-types/ts3.4/commands/StartSpeechSynthesisTaskCommand.d.ts +17 -0
- package/dist-types/ts3.4/commands/SynthesizeSpeechCommand.d.ts +17 -0
- package/dist-types/ts3.4/commands/index.d.ts +9 -0
- package/dist-types/ts3.4/endpoints.d.ts +2 -0
- package/dist-types/ts3.4/index.d.ts +6 -0
- package/dist-types/ts3.4/models/PollyServiceException.d.ts +6 -0
- package/dist-types/ts3.4/models/index.d.ts +1 -0
- package/dist-types/ts3.4/models/models_0.d.ts +481 -0
- package/dist-types/ts3.4/pagination/Interfaces.d.ts +6 -0
- package/dist-types/ts3.4/pagination/ListSpeechSynthesisTasksPaginator.d.ts +4 -0
- package/dist-types/ts3.4/pagination/index.d.ts +2 -0
- package/dist-types/ts3.4/protocols/Aws_restJson1.d.ts +29 -0
- package/dist-types/ts3.4/runtimeConfig.browser.d.ts +38 -0
- package/dist-types/ts3.4/runtimeConfig.d.ts +38 -0
- package/dist-types/ts3.4/runtimeConfig.native.d.ts +37 -0
- package/dist-types/ts3.4/runtimeConfig.shared.d.ts +11 -0
- package/package.json +33 -33
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
import { __assign, __awaiter, __generator } from "tslib";
|
|
2
2
|
import { HttpRequest as __HttpRequest } from "@aws-sdk/protocol-http";
|
|
3
|
-
import { expectInt32 as __expectInt32, expectNonNull as __expectNonNull, expectNumber as __expectNumber, expectObject as __expectObject, expectString as __expectString, extendedEncodeURIComponent as __extendedEncodeURIComponent, parseEpochTimestamp as __parseEpochTimestamp, strictParseInt32 as __strictParseInt32, } from "@aws-sdk/smithy-client";
|
|
3
|
+
import { decorateServiceException as __decorateServiceException, expectInt32 as __expectInt32, expectNonNull as __expectNonNull, expectNumber as __expectNumber, expectObject as __expectObject, expectString as __expectString, extendedEncodeURIComponent as __extendedEncodeURIComponent, parseEpochTimestamp as __parseEpochTimestamp, strictParseInt32 as __strictParseInt32, } from "@aws-sdk/smithy-client";
|
|
4
|
+
import { EngineNotSupportedException, InvalidLexiconException, InvalidNextTokenException, InvalidS3BucketException, InvalidS3KeyException, InvalidSampleRateException, InvalidSnsTopicArnException, InvalidSsmlException, InvalidTaskIdException, LanguageNotSupportedException, LexiconNotFoundException, LexiconSizeExceededException, MarksNotSupportedForFormatException, MaxLexemeLengthExceededException, MaxLexiconsNumberExceededException, ServiceFailureException, SsmlMarksNotSupportedForTextTypeException, SynthesisTaskNotFoundException, TextLengthExceededException, UnsupportedPlsAlphabetException, UnsupportedPlsLanguageException, } from "../models/models_0";
|
|
5
|
+
import { PollyServiceException as __BaseException } from "../models/PollyServiceException";
|
|
4
6
|
export var serializeAws_restJson1DeleteLexiconCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
5
7
|
var _a, hostname, _b, protocol, port, basePath, headers, resolvedPath, labelValue, body;
|
|
6
8
|
return __generator(this, function (_c) {
|
|
@@ -280,16 +282,16 @@ export var deserializeAws_restJson1DeleteLexiconCommand = function (output, cont
|
|
|
280
282
|
});
|
|
281
283
|
}); };
|
|
282
284
|
var deserializeAws_restJson1DeleteLexiconCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
283
|
-
var parsedOutput, _a, response, errorCode, _b,
|
|
284
|
-
var
|
|
285
|
-
return __generator(this, function (
|
|
286
|
-
switch (
|
|
285
|
+
var parsedOutput, _a, response, errorCode, _b, parsedBody;
|
|
286
|
+
var _c;
|
|
287
|
+
return __generator(this, function (_d) {
|
|
288
|
+
switch (_d.label) {
|
|
287
289
|
case 0:
|
|
288
290
|
_a = [__assign({}, output)];
|
|
289
|
-
|
|
291
|
+
_c = {};
|
|
290
292
|
return [4, parseBody(output.body, context)];
|
|
291
293
|
case 1:
|
|
292
|
-
parsedOutput = __assign.apply(void 0, _a.concat([(
|
|
294
|
+
parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
|
|
293
295
|
errorCode = "UnknownError";
|
|
294
296
|
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
295
297
|
_b = errorCode;
|
|
@@ -300,28 +302,18 @@ var deserializeAws_restJson1DeleteLexiconCommandError = function (output, contex
|
|
|
300
302
|
case "com.amazonaws.polly#ServiceFailureException": return [3, 4];
|
|
301
303
|
}
|
|
302
304
|
return [3, 6];
|
|
303
|
-
case 2:
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
case
|
|
307
|
-
response = __assign.apply(void 0, [__assign.apply(void 0, _c.concat([(_f.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
|
|
308
|
-
return [3, 7];
|
|
309
|
-
case 4:
|
|
310
|
-
_d = [{}];
|
|
311
|
-
return [4, deserializeAws_restJson1ServiceFailureExceptionResponse(parsedOutput, context)];
|
|
312
|
-
case 5:
|
|
313
|
-
response = __assign.apply(void 0, [__assign.apply(void 0, _d.concat([(_f.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
|
|
314
|
-
return [3, 7];
|
|
305
|
+
case 2: return [4, deserializeAws_restJson1LexiconNotFoundExceptionResponse(parsedOutput, context)];
|
|
306
|
+
case 3: throw _d.sent();
|
|
307
|
+
case 4: return [4, deserializeAws_restJson1ServiceFailureExceptionResponse(parsedOutput, context)];
|
|
308
|
+
case 5: throw _d.sent();
|
|
315
309
|
case 6:
|
|
316
310
|
parsedBody = parsedOutput.body;
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
response
|
|
323
|
-
delete response.Message;
|
|
324
|
-
return [2, Promise.reject(Object.assign(new Error(message), response))];
|
|
311
|
+
response = new __BaseException({
|
|
312
|
+
name: parsedBody.code || parsedBody.Code || errorCode,
|
|
313
|
+
$fault: "client",
|
|
314
|
+
$metadata: deserializeMetadata(output),
|
|
315
|
+
});
|
|
316
|
+
throw __decorateServiceException(response, parsedBody);
|
|
325
317
|
}
|
|
326
318
|
});
|
|
327
319
|
}); };
|
|
@@ -354,16 +346,16 @@ export var deserializeAws_restJson1DescribeVoicesCommand = function (output, con
|
|
|
354
346
|
});
|
|
355
347
|
}); };
|
|
356
348
|
var deserializeAws_restJson1DescribeVoicesCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
357
|
-
var parsedOutput, _a, response, errorCode, _b,
|
|
358
|
-
var
|
|
359
|
-
return __generator(this, function (
|
|
360
|
-
switch (
|
|
349
|
+
var parsedOutput, _a, response, errorCode, _b, parsedBody;
|
|
350
|
+
var _c;
|
|
351
|
+
return __generator(this, function (_d) {
|
|
352
|
+
switch (_d.label) {
|
|
361
353
|
case 0:
|
|
362
354
|
_a = [__assign({}, output)];
|
|
363
|
-
|
|
355
|
+
_c = {};
|
|
364
356
|
return [4, parseBody(output.body, context)];
|
|
365
357
|
case 1:
|
|
366
|
-
parsedOutput = __assign.apply(void 0, _a.concat([(
|
|
358
|
+
parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
|
|
367
359
|
errorCode = "UnknownError";
|
|
368
360
|
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
369
361
|
_b = errorCode;
|
|
@@ -374,28 +366,18 @@ var deserializeAws_restJson1DescribeVoicesCommandError = function (output, conte
|
|
|
374
366
|
case "com.amazonaws.polly#ServiceFailureException": return [3, 4];
|
|
375
367
|
}
|
|
376
368
|
return [3, 6];
|
|
377
|
-
case 2:
|
|
378
|
-
|
|
379
|
-
|
|
380
|
-
case
|
|
381
|
-
response = __assign.apply(void 0, [__assign.apply(void 0, _c.concat([(_f.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
|
|
382
|
-
return [3, 7];
|
|
383
|
-
case 4:
|
|
384
|
-
_d = [{}];
|
|
385
|
-
return [4, deserializeAws_restJson1ServiceFailureExceptionResponse(parsedOutput, context)];
|
|
386
|
-
case 5:
|
|
387
|
-
response = __assign.apply(void 0, [__assign.apply(void 0, _d.concat([(_f.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
|
|
388
|
-
return [3, 7];
|
|
369
|
+
case 2: return [4, deserializeAws_restJson1InvalidNextTokenExceptionResponse(parsedOutput, context)];
|
|
370
|
+
case 3: throw _d.sent();
|
|
371
|
+
case 4: return [4, deserializeAws_restJson1ServiceFailureExceptionResponse(parsedOutput, context)];
|
|
372
|
+
case 5: throw _d.sent();
|
|
389
373
|
case 6:
|
|
390
374
|
parsedBody = parsedOutput.body;
|
|
391
|
-
|
|
392
|
-
|
|
393
|
-
|
|
394
|
-
|
|
395
|
-
|
|
396
|
-
response
|
|
397
|
-
delete response.Message;
|
|
398
|
-
return [2, Promise.reject(Object.assign(new Error(message), response))];
|
|
375
|
+
response = new __BaseException({
|
|
376
|
+
name: parsedBody.code || parsedBody.Code || errorCode,
|
|
377
|
+
$fault: "client",
|
|
378
|
+
$metadata: deserializeMetadata(output),
|
|
379
|
+
});
|
|
380
|
+
throw __decorateServiceException(response, parsedBody);
|
|
399
381
|
}
|
|
400
382
|
});
|
|
401
383
|
}); };
|
|
@@ -428,16 +410,16 @@ export var deserializeAws_restJson1GetLexiconCommand = function (output, context
|
|
|
428
410
|
});
|
|
429
411
|
}); };
|
|
430
412
|
var deserializeAws_restJson1GetLexiconCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
431
|
-
var parsedOutput, _a, response, errorCode, _b,
|
|
432
|
-
var
|
|
433
|
-
return __generator(this, function (
|
|
434
|
-
switch (
|
|
413
|
+
var parsedOutput, _a, response, errorCode, _b, parsedBody;
|
|
414
|
+
var _c;
|
|
415
|
+
return __generator(this, function (_d) {
|
|
416
|
+
switch (_d.label) {
|
|
435
417
|
case 0:
|
|
436
418
|
_a = [__assign({}, output)];
|
|
437
|
-
|
|
419
|
+
_c = {};
|
|
438
420
|
return [4, parseBody(output.body, context)];
|
|
439
421
|
case 1:
|
|
440
|
-
parsedOutput = __assign.apply(void 0, _a.concat([(
|
|
422
|
+
parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
|
|
441
423
|
errorCode = "UnknownError";
|
|
442
424
|
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
443
425
|
_b = errorCode;
|
|
@@ -448,28 +430,18 @@ var deserializeAws_restJson1GetLexiconCommandError = function (output, context)
|
|
|
448
430
|
case "com.amazonaws.polly#ServiceFailureException": return [3, 4];
|
|
449
431
|
}
|
|
450
432
|
return [3, 6];
|
|
451
|
-
case 2:
|
|
452
|
-
|
|
453
|
-
|
|
454
|
-
case
|
|
455
|
-
response = __assign.apply(void 0, [__assign.apply(void 0, _c.concat([(_f.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
|
|
456
|
-
return [3, 7];
|
|
457
|
-
case 4:
|
|
458
|
-
_d = [{}];
|
|
459
|
-
return [4, deserializeAws_restJson1ServiceFailureExceptionResponse(parsedOutput, context)];
|
|
460
|
-
case 5:
|
|
461
|
-
response = __assign.apply(void 0, [__assign.apply(void 0, _d.concat([(_f.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
|
|
462
|
-
return [3, 7];
|
|
433
|
+
case 2: return [4, deserializeAws_restJson1LexiconNotFoundExceptionResponse(parsedOutput, context)];
|
|
434
|
+
case 3: throw _d.sent();
|
|
435
|
+
case 4: return [4, deserializeAws_restJson1ServiceFailureExceptionResponse(parsedOutput, context)];
|
|
436
|
+
case 5: throw _d.sent();
|
|
463
437
|
case 6:
|
|
464
438
|
parsedBody = parsedOutput.body;
|
|
465
|
-
|
|
466
|
-
|
|
467
|
-
|
|
468
|
-
|
|
469
|
-
|
|
470
|
-
response
|
|
471
|
-
delete response.Message;
|
|
472
|
-
return [2, Promise.reject(Object.assign(new Error(message), response))];
|
|
439
|
+
response = new __BaseException({
|
|
440
|
+
name: parsedBody.code || parsedBody.Code || errorCode,
|
|
441
|
+
$fault: "client",
|
|
442
|
+
$metadata: deserializeMetadata(output),
|
|
443
|
+
});
|
|
444
|
+
throw __decorateServiceException(response, parsedBody);
|
|
473
445
|
}
|
|
474
446
|
});
|
|
475
447
|
}); };
|
|
@@ -498,16 +470,16 @@ export var deserializeAws_restJson1GetSpeechSynthesisTaskCommand = function (out
|
|
|
498
470
|
});
|
|
499
471
|
}); };
|
|
500
472
|
var deserializeAws_restJson1GetSpeechSynthesisTaskCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
501
|
-
var parsedOutput, _a, response, errorCode, _b,
|
|
502
|
-
var
|
|
503
|
-
return __generator(this, function (
|
|
504
|
-
switch (
|
|
473
|
+
var parsedOutput, _a, response, errorCode, _b, parsedBody;
|
|
474
|
+
var _c;
|
|
475
|
+
return __generator(this, function (_d) {
|
|
476
|
+
switch (_d.label) {
|
|
505
477
|
case 0:
|
|
506
478
|
_a = [__assign({}, output)];
|
|
507
|
-
|
|
479
|
+
_c = {};
|
|
508
480
|
return [4, parseBody(output.body, context)];
|
|
509
481
|
case 1:
|
|
510
|
-
parsedOutput = __assign.apply(void 0, _a.concat([(
|
|
482
|
+
parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
|
|
511
483
|
errorCode = "UnknownError";
|
|
512
484
|
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
513
485
|
_b = errorCode;
|
|
@@ -520,34 +492,20 @@ var deserializeAws_restJson1GetSpeechSynthesisTaskCommandError = function (outpu
|
|
|
520
492
|
case "com.amazonaws.polly#SynthesisTaskNotFoundException": return [3, 6];
|
|
521
493
|
}
|
|
522
494
|
return [3, 8];
|
|
523
|
-
case 2:
|
|
524
|
-
|
|
525
|
-
|
|
526
|
-
case
|
|
527
|
-
|
|
528
|
-
|
|
529
|
-
case 4:
|
|
530
|
-
_d = [{}];
|
|
531
|
-
return [4, deserializeAws_restJson1ServiceFailureExceptionResponse(parsedOutput, context)];
|
|
532
|
-
case 5:
|
|
533
|
-
response = __assign.apply(void 0, [__assign.apply(void 0, _d.concat([(_g.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
|
|
534
|
-
return [3, 9];
|
|
535
|
-
case 6:
|
|
536
|
-
_e = [{}];
|
|
537
|
-
return [4, deserializeAws_restJson1SynthesisTaskNotFoundExceptionResponse(parsedOutput, context)];
|
|
538
|
-
case 7:
|
|
539
|
-
response = __assign.apply(void 0, [__assign.apply(void 0, _e.concat([(_g.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
|
|
540
|
-
return [3, 9];
|
|
495
|
+
case 2: return [4, deserializeAws_restJson1InvalidTaskIdExceptionResponse(parsedOutput, context)];
|
|
496
|
+
case 3: throw _d.sent();
|
|
497
|
+
case 4: return [4, deserializeAws_restJson1ServiceFailureExceptionResponse(parsedOutput, context)];
|
|
498
|
+
case 5: throw _d.sent();
|
|
499
|
+
case 6: return [4, deserializeAws_restJson1SynthesisTaskNotFoundExceptionResponse(parsedOutput, context)];
|
|
500
|
+
case 7: throw _d.sent();
|
|
541
501
|
case 8:
|
|
542
502
|
parsedBody = parsedOutput.body;
|
|
543
|
-
|
|
544
|
-
|
|
545
|
-
|
|
546
|
-
|
|
547
|
-
|
|
548
|
-
response
|
|
549
|
-
delete response.Message;
|
|
550
|
-
return [2, Promise.reject(Object.assign(new Error(message), response))];
|
|
503
|
+
response = new __BaseException({
|
|
504
|
+
name: parsedBody.code || parsedBody.Code || errorCode,
|
|
505
|
+
$fault: "client",
|
|
506
|
+
$metadata: deserializeMetadata(output),
|
|
507
|
+
});
|
|
508
|
+
throw __decorateServiceException(response, parsedBody);
|
|
551
509
|
}
|
|
552
510
|
});
|
|
553
511
|
}); };
|
|
@@ -580,16 +538,16 @@ export var deserializeAws_restJson1ListLexiconsCommand = function (output, conte
|
|
|
580
538
|
});
|
|
581
539
|
}); };
|
|
582
540
|
var deserializeAws_restJson1ListLexiconsCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
583
|
-
var parsedOutput, _a, response, errorCode, _b,
|
|
584
|
-
var
|
|
585
|
-
return __generator(this, function (
|
|
586
|
-
switch (
|
|
541
|
+
var parsedOutput, _a, response, errorCode, _b, parsedBody;
|
|
542
|
+
var _c;
|
|
543
|
+
return __generator(this, function (_d) {
|
|
544
|
+
switch (_d.label) {
|
|
587
545
|
case 0:
|
|
588
546
|
_a = [__assign({}, output)];
|
|
589
|
-
|
|
547
|
+
_c = {};
|
|
590
548
|
return [4, parseBody(output.body, context)];
|
|
591
549
|
case 1:
|
|
592
|
-
parsedOutput = __assign.apply(void 0, _a.concat([(
|
|
550
|
+
parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
|
|
593
551
|
errorCode = "UnknownError";
|
|
594
552
|
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
595
553
|
_b = errorCode;
|
|
@@ -600,28 +558,18 @@ var deserializeAws_restJson1ListLexiconsCommandError = function (output, context
|
|
|
600
558
|
case "com.amazonaws.polly#ServiceFailureException": return [3, 4];
|
|
601
559
|
}
|
|
602
560
|
return [3, 6];
|
|
603
|
-
case 2:
|
|
604
|
-
|
|
605
|
-
|
|
606
|
-
case
|
|
607
|
-
response = __assign.apply(void 0, [__assign.apply(void 0, _c.concat([(_f.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
|
|
608
|
-
return [3, 7];
|
|
609
|
-
case 4:
|
|
610
|
-
_d = [{}];
|
|
611
|
-
return [4, deserializeAws_restJson1ServiceFailureExceptionResponse(parsedOutput, context)];
|
|
612
|
-
case 5:
|
|
613
|
-
response = __assign.apply(void 0, [__assign.apply(void 0, _d.concat([(_f.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
|
|
614
|
-
return [3, 7];
|
|
561
|
+
case 2: return [4, deserializeAws_restJson1InvalidNextTokenExceptionResponse(parsedOutput, context)];
|
|
562
|
+
case 3: throw _d.sent();
|
|
563
|
+
case 4: return [4, deserializeAws_restJson1ServiceFailureExceptionResponse(parsedOutput, context)];
|
|
564
|
+
case 5: throw _d.sent();
|
|
615
565
|
case 6:
|
|
616
566
|
parsedBody = parsedOutput.body;
|
|
617
|
-
|
|
618
|
-
|
|
619
|
-
|
|
620
|
-
|
|
621
|
-
|
|
622
|
-
response
|
|
623
|
-
delete response.Message;
|
|
624
|
-
return [2, Promise.reject(Object.assign(new Error(message), response))];
|
|
567
|
+
response = new __BaseException({
|
|
568
|
+
name: parsedBody.code || parsedBody.Code || errorCode,
|
|
569
|
+
$fault: "client",
|
|
570
|
+
$metadata: deserializeMetadata(output),
|
|
571
|
+
});
|
|
572
|
+
throw __decorateServiceException(response, parsedBody);
|
|
625
573
|
}
|
|
626
574
|
});
|
|
627
575
|
}); };
|
|
@@ -654,16 +602,16 @@ export var deserializeAws_restJson1ListSpeechSynthesisTasksCommand = function (o
|
|
|
654
602
|
});
|
|
655
603
|
}); };
|
|
656
604
|
var deserializeAws_restJson1ListSpeechSynthesisTasksCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
657
|
-
var parsedOutput, _a, response, errorCode, _b,
|
|
658
|
-
var
|
|
659
|
-
return __generator(this, function (
|
|
660
|
-
switch (
|
|
605
|
+
var parsedOutput, _a, response, errorCode, _b, parsedBody;
|
|
606
|
+
var _c;
|
|
607
|
+
return __generator(this, function (_d) {
|
|
608
|
+
switch (_d.label) {
|
|
661
609
|
case 0:
|
|
662
610
|
_a = [__assign({}, output)];
|
|
663
|
-
|
|
611
|
+
_c = {};
|
|
664
612
|
return [4, parseBody(output.body, context)];
|
|
665
613
|
case 1:
|
|
666
|
-
parsedOutput = __assign.apply(void 0, _a.concat([(
|
|
614
|
+
parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
|
|
667
615
|
errorCode = "UnknownError";
|
|
668
616
|
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
669
617
|
_b = errorCode;
|
|
@@ -674,28 +622,18 @@ var deserializeAws_restJson1ListSpeechSynthesisTasksCommandError = function (out
|
|
|
674
622
|
case "com.amazonaws.polly#ServiceFailureException": return [3, 4];
|
|
675
623
|
}
|
|
676
624
|
return [3, 6];
|
|
677
|
-
case 2:
|
|
678
|
-
|
|
679
|
-
|
|
680
|
-
case
|
|
681
|
-
response = __assign.apply(void 0, [__assign.apply(void 0, _c.concat([(_f.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
|
|
682
|
-
return [3, 7];
|
|
683
|
-
case 4:
|
|
684
|
-
_d = [{}];
|
|
685
|
-
return [4, deserializeAws_restJson1ServiceFailureExceptionResponse(parsedOutput, context)];
|
|
686
|
-
case 5:
|
|
687
|
-
response = __assign.apply(void 0, [__assign.apply(void 0, _d.concat([(_f.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
|
|
688
|
-
return [3, 7];
|
|
625
|
+
case 2: return [4, deserializeAws_restJson1InvalidNextTokenExceptionResponse(parsedOutput, context)];
|
|
626
|
+
case 3: throw _d.sent();
|
|
627
|
+
case 4: return [4, deserializeAws_restJson1ServiceFailureExceptionResponse(parsedOutput, context)];
|
|
628
|
+
case 5: throw _d.sent();
|
|
689
629
|
case 6:
|
|
690
630
|
parsedBody = parsedOutput.body;
|
|
691
|
-
|
|
692
|
-
|
|
693
|
-
|
|
694
|
-
|
|
695
|
-
|
|
696
|
-
response
|
|
697
|
-
delete response.Message;
|
|
698
|
-
return [2, Promise.reject(Object.assign(new Error(message), response))];
|
|
631
|
+
response = new __BaseException({
|
|
632
|
+
name: parsedBody.code || parsedBody.Code || errorCode,
|
|
633
|
+
$fault: "client",
|
|
634
|
+
$metadata: deserializeMetadata(output),
|
|
635
|
+
});
|
|
636
|
+
throw __decorateServiceException(response, parsedBody);
|
|
699
637
|
}
|
|
700
638
|
});
|
|
701
639
|
}); };
|
|
@@ -718,16 +656,16 @@ export var deserializeAws_restJson1PutLexiconCommand = function (output, context
|
|
|
718
656
|
});
|
|
719
657
|
}); };
|
|
720
658
|
var deserializeAws_restJson1PutLexiconCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
721
|
-
var parsedOutput, _a, response, errorCode, _b,
|
|
722
|
-
var
|
|
723
|
-
return __generator(this, function (
|
|
724
|
-
switch (
|
|
659
|
+
var parsedOutput, _a, response, errorCode, _b, parsedBody;
|
|
660
|
+
var _c;
|
|
661
|
+
return __generator(this, function (_d) {
|
|
662
|
+
switch (_d.label) {
|
|
725
663
|
case 0:
|
|
726
664
|
_a = [__assign({}, output)];
|
|
727
|
-
|
|
665
|
+
_c = {};
|
|
728
666
|
return [4, parseBody(output.body, context)];
|
|
729
667
|
case 1:
|
|
730
|
-
parsedOutput = __assign.apply(void 0, _a.concat([(
|
|
668
|
+
parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
|
|
731
669
|
errorCode = "UnknownError";
|
|
732
670
|
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
733
671
|
_b = errorCode;
|
|
@@ -748,58 +686,28 @@ var deserializeAws_restJson1PutLexiconCommandError = function (output, context)
|
|
|
748
686
|
case "com.amazonaws.polly#UnsupportedPlsLanguageException": return [3, 14];
|
|
749
687
|
}
|
|
750
688
|
return [3, 16];
|
|
751
|
-
case 2:
|
|
752
|
-
|
|
753
|
-
|
|
754
|
-
case
|
|
755
|
-
|
|
756
|
-
|
|
757
|
-
case 4
|
|
758
|
-
|
|
759
|
-
|
|
760
|
-
case
|
|
761
|
-
|
|
762
|
-
|
|
763
|
-
case
|
|
764
|
-
|
|
765
|
-
return [4, deserializeAws_restJson1MaxLexemeLengthExceededExceptionResponse(parsedOutput, context)];
|
|
766
|
-
case 7:
|
|
767
|
-
response = __assign.apply(void 0, [__assign.apply(void 0, _e.concat([(_l.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
|
|
768
|
-
return [3, 17];
|
|
769
|
-
case 8:
|
|
770
|
-
_f = [{}];
|
|
771
|
-
return [4, deserializeAws_restJson1MaxLexiconsNumberExceededExceptionResponse(parsedOutput, context)];
|
|
772
|
-
case 9:
|
|
773
|
-
response = __assign.apply(void 0, [__assign.apply(void 0, _f.concat([(_l.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
|
|
774
|
-
return [3, 17];
|
|
775
|
-
case 10:
|
|
776
|
-
_g = [{}];
|
|
777
|
-
return [4, deserializeAws_restJson1ServiceFailureExceptionResponse(parsedOutput, context)];
|
|
778
|
-
case 11:
|
|
779
|
-
response = __assign.apply(void 0, [__assign.apply(void 0, _g.concat([(_l.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
|
|
780
|
-
return [3, 17];
|
|
781
|
-
case 12:
|
|
782
|
-
_h = [{}];
|
|
783
|
-
return [4, deserializeAws_restJson1UnsupportedPlsAlphabetExceptionResponse(parsedOutput, context)];
|
|
784
|
-
case 13:
|
|
785
|
-
response = __assign.apply(void 0, [__assign.apply(void 0, _h.concat([(_l.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
|
|
786
|
-
return [3, 17];
|
|
787
|
-
case 14:
|
|
788
|
-
_j = [{}];
|
|
789
|
-
return [4, deserializeAws_restJson1UnsupportedPlsLanguageExceptionResponse(parsedOutput, context)];
|
|
790
|
-
case 15:
|
|
791
|
-
response = __assign.apply(void 0, [__assign.apply(void 0, _j.concat([(_l.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
|
|
792
|
-
return [3, 17];
|
|
689
|
+
case 2: return [4, deserializeAws_restJson1InvalidLexiconExceptionResponse(parsedOutput, context)];
|
|
690
|
+
case 3: throw _d.sent();
|
|
691
|
+
case 4: return [4, deserializeAws_restJson1LexiconSizeExceededExceptionResponse(parsedOutput, context)];
|
|
692
|
+
case 5: throw _d.sent();
|
|
693
|
+
case 6: return [4, deserializeAws_restJson1MaxLexemeLengthExceededExceptionResponse(parsedOutput, context)];
|
|
694
|
+
case 7: throw _d.sent();
|
|
695
|
+
case 8: return [4, deserializeAws_restJson1MaxLexiconsNumberExceededExceptionResponse(parsedOutput, context)];
|
|
696
|
+
case 9: throw _d.sent();
|
|
697
|
+
case 10: return [4, deserializeAws_restJson1ServiceFailureExceptionResponse(parsedOutput, context)];
|
|
698
|
+
case 11: throw _d.sent();
|
|
699
|
+
case 12: return [4, deserializeAws_restJson1UnsupportedPlsAlphabetExceptionResponse(parsedOutput, context)];
|
|
700
|
+
case 13: throw _d.sent();
|
|
701
|
+
case 14: return [4, deserializeAws_restJson1UnsupportedPlsLanguageExceptionResponse(parsedOutput, context)];
|
|
702
|
+
case 15: throw _d.sent();
|
|
793
703
|
case 16:
|
|
794
704
|
parsedBody = parsedOutput.body;
|
|
795
|
-
|
|
796
|
-
|
|
797
|
-
|
|
798
|
-
|
|
799
|
-
|
|
800
|
-
response
|
|
801
|
-
delete response.Message;
|
|
802
|
-
return [2, Promise.reject(Object.assign(new Error(message), response))];
|
|
705
|
+
response = new __BaseException({
|
|
706
|
+
name: parsedBody.code || parsedBody.Code || errorCode,
|
|
707
|
+
$fault: "client",
|
|
708
|
+
$metadata: deserializeMetadata(output),
|
|
709
|
+
});
|
|
710
|
+
throw __decorateServiceException(response, parsedBody);
|
|
803
711
|
}
|
|
804
712
|
});
|
|
805
713
|
}); };
|
|
@@ -828,16 +736,16 @@ export var deserializeAws_restJson1StartSpeechSynthesisTaskCommand = function (o
|
|
|
828
736
|
});
|
|
829
737
|
}); };
|
|
830
738
|
var deserializeAws_restJson1StartSpeechSynthesisTaskCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
831
|
-
var parsedOutput, _a, response, errorCode, _b,
|
|
832
|
-
var
|
|
833
|
-
return __generator(this, function (
|
|
834
|
-
switch (
|
|
739
|
+
var parsedOutput, _a, response, errorCode, _b, parsedBody;
|
|
740
|
+
var _c;
|
|
741
|
+
return __generator(this, function (_d) {
|
|
742
|
+
switch (_d.label) {
|
|
835
743
|
case 0:
|
|
836
744
|
_a = [__assign({}, output)];
|
|
837
|
-
|
|
745
|
+
_c = {};
|
|
838
746
|
return [4, parseBody(output.body, context)];
|
|
839
747
|
case 1:
|
|
840
|
-
parsedOutput = __assign.apply(void 0, _a.concat([(
|
|
748
|
+
parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
|
|
841
749
|
errorCode = "UnknownError";
|
|
842
750
|
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
843
751
|
_b = errorCode;
|
|
@@ -868,88 +776,38 @@ var deserializeAws_restJson1StartSpeechSynthesisTaskCommandError = function (out
|
|
|
868
776
|
case "com.amazonaws.polly#TextLengthExceededException": return [3, 24];
|
|
869
777
|
}
|
|
870
778
|
return [3, 26];
|
|
871
|
-
case 2:
|
|
872
|
-
|
|
873
|
-
|
|
874
|
-
case
|
|
875
|
-
|
|
876
|
-
|
|
877
|
-
case 4
|
|
878
|
-
|
|
879
|
-
|
|
880
|
-
case
|
|
881
|
-
|
|
882
|
-
|
|
883
|
-
case
|
|
884
|
-
|
|
885
|
-
|
|
886
|
-
case
|
|
887
|
-
|
|
888
|
-
|
|
889
|
-
case
|
|
890
|
-
|
|
891
|
-
|
|
892
|
-
case
|
|
893
|
-
|
|
894
|
-
|
|
895
|
-
case 10:
|
|
896
|
-
_g = [{}];
|
|
897
|
-
return [4, deserializeAws_restJson1InvalidSnsTopicArnExceptionResponse(parsedOutput, context)];
|
|
898
|
-
case 11:
|
|
899
|
-
response = __assign.apply(void 0, [__assign.apply(void 0, _g.concat([(_r.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
|
|
900
|
-
return [3, 27];
|
|
901
|
-
case 12:
|
|
902
|
-
_h = [{}];
|
|
903
|
-
return [4, deserializeAws_restJson1InvalidSsmlExceptionResponse(parsedOutput, context)];
|
|
904
|
-
case 13:
|
|
905
|
-
response = __assign.apply(void 0, [__assign.apply(void 0, _h.concat([(_r.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
|
|
906
|
-
return [3, 27];
|
|
907
|
-
case 14:
|
|
908
|
-
_j = [{}];
|
|
909
|
-
return [4, deserializeAws_restJson1LanguageNotSupportedExceptionResponse(parsedOutput, context)];
|
|
910
|
-
case 15:
|
|
911
|
-
response = __assign.apply(void 0, [__assign.apply(void 0, _j.concat([(_r.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
|
|
912
|
-
return [3, 27];
|
|
913
|
-
case 16:
|
|
914
|
-
_k = [{}];
|
|
915
|
-
return [4, deserializeAws_restJson1LexiconNotFoundExceptionResponse(parsedOutput, context)];
|
|
916
|
-
case 17:
|
|
917
|
-
response = __assign.apply(void 0, [__assign.apply(void 0, _k.concat([(_r.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
|
|
918
|
-
return [3, 27];
|
|
919
|
-
case 18:
|
|
920
|
-
_l = [{}];
|
|
921
|
-
return [4, deserializeAws_restJson1MarksNotSupportedForFormatExceptionResponse(parsedOutput, context)];
|
|
922
|
-
case 19:
|
|
923
|
-
response = __assign.apply(void 0, [__assign.apply(void 0, _l.concat([(_r.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
|
|
924
|
-
return [3, 27];
|
|
925
|
-
case 20:
|
|
926
|
-
_m = [{}];
|
|
927
|
-
return [4, deserializeAws_restJson1ServiceFailureExceptionResponse(parsedOutput, context)];
|
|
928
|
-
case 21:
|
|
929
|
-
response = __assign.apply(void 0, [__assign.apply(void 0, _m.concat([(_r.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
|
|
930
|
-
return [3, 27];
|
|
931
|
-
case 22:
|
|
932
|
-
_o = [{}];
|
|
933
|
-
return [4, deserializeAws_restJson1SsmlMarksNotSupportedForTextTypeExceptionResponse(parsedOutput, context)];
|
|
934
|
-
case 23:
|
|
935
|
-
response = __assign.apply(void 0, [__assign.apply(void 0, _o.concat([(_r.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
|
|
936
|
-
return [3, 27];
|
|
937
|
-
case 24:
|
|
938
|
-
_p = [{}];
|
|
939
|
-
return [4, deserializeAws_restJson1TextLengthExceededExceptionResponse(parsedOutput, context)];
|
|
940
|
-
case 25:
|
|
941
|
-
response = __assign.apply(void 0, [__assign.apply(void 0, _p.concat([(_r.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
|
|
942
|
-
return [3, 27];
|
|
779
|
+
case 2: return [4, deserializeAws_restJson1EngineNotSupportedExceptionResponse(parsedOutput, context)];
|
|
780
|
+
case 3: throw _d.sent();
|
|
781
|
+
case 4: return [4, deserializeAws_restJson1InvalidS3BucketExceptionResponse(parsedOutput, context)];
|
|
782
|
+
case 5: throw _d.sent();
|
|
783
|
+
case 6: return [4, deserializeAws_restJson1InvalidS3KeyExceptionResponse(parsedOutput, context)];
|
|
784
|
+
case 7: throw _d.sent();
|
|
785
|
+
case 8: return [4, deserializeAws_restJson1InvalidSampleRateExceptionResponse(parsedOutput, context)];
|
|
786
|
+
case 9: throw _d.sent();
|
|
787
|
+
case 10: return [4, deserializeAws_restJson1InvalidSnsTopicArnExceptionResponse(parsedOutput, context)];
|
|
788
|
+
case 11: throw _d.sent();
|
|
789
|
+
case 12: return [4, deserializeAws_restJson1InvalidSsmlExceptionResponse(parsedOutput, context)];
|
|
790
|
+
case 13: throw _d.sent();
|
|
791
|
+
case 14: return [4, deserializeAws_restJson1LanguageNotSupportedExceptionResponse(parsedOutput, context)];
|
|
792
|
+
case 15: throw _d.sent();
|
|
793
|
+
case 16: return [4, deserializeAws_restJson1LexiconNotFoundExceptionResponse(parsedOutput, context)];
|
|
794
|
+
case 17: throw _d.sent();
|
|
795
|
+
case 18: return [4, deserializeAws_restJson1MarksNotSupportedForFormatExceptionResponse(parsedOutput, context)];
|
|
796
|
+
case 19: throw _d.sent();
|
|
797
|
+
case 20: return [4, deserializeAws_restJson1ServiceFailureExceptionResponse(parsedOutput, context)];
|
|
798
|
+
case 21: throw _d.sent();
|
|
799
|
+
case 22: return [4, deserializeAws_restJson1SsmlMarksNotSupportedForTextTypeExceptionResponse(parsedOutput, context)];
|
|
800
|
+
case 23: throw _d.sent();
|
|
801
|
+
case 24: return [4, deserializeAws_restJson1TextLengthExceededExceptionResponse(parsedOutput, context)];
|
|
802
|
+
case 25: throw _d.sent();
|
|
943
803
|
case 26:
|
|
944
804
|
parsedBody = parsedOutput.body;
|
|
945
|
-
|
|
946
|
-
|
|
947
|
-
|
|
948
|
-
|
|
949
|
-
|
|
950
|
-
response
|
|
951
|
-
delete response.Message;
|
|
952
|
-
return [2, Promise.reject(Object.assign(new Error(message), response))];
|
|
805
|
+
response = new __BaseException({
|
|
806
|
+
name: parsedBody.code || parsedBody.Code || errorCode,
|
|
807
|
+
$fault: "client",
|
|
808
|
+
$metadata: deserializeMetadata(output),
|
|
809
|
+
});
|
|
810
|
+
throw __decorateServiceException(response, parsedBody);
|
|
953
811
|
}
|
|
954
812
|
});
|
|
955
813
|
}); };
|
|
@@ -977,16 +835,16 @@ export var deserializeAws_restJson1SynthesizeSpeechCommand = function (output, c
|
|
|
977
835
|
});
|
|
978
836
|
}); };
|
|
979
837
|
var deserializeAws_restJson1SynthesizeSpeechCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
980
|
-
var parsedOutput, _a, response, errorCode, _b,
|
|
981
|
-
var
|
|
982
|
-
return __generator(this, function (
|
|
983
|
-
switch (
|
|
838
|
+
var parsedOutput, _a, response, errorCode, _b, parsedBody;
|
|
839
|
+
var _c;
|
|
840
|
+
return __generator(this, function (_d) {
|
|
841
|
+
switch (_d.label) {
|
|
984
842
|
case 0:
|
|
985
843
|
_a = [__assign({}, output)];
|
|
986
|
-
|
|
844
|
+
_c = {};
|
|
987
845
|
return [4, parseBody(output.body, context)];
|
|
988
846
|
case 1:
|
|
989
|
-
parsedOutput = __assign.apply(void 0, _a.concat([(
|
|
847
|
+
parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
|
|
990
848
|
errorCode = "UnknownError";
|
|
991
849
|
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
992
850
|
_b = errorCode;
|
|
@@ -1011,407 +869,285 @@ var deserializeAws_restJson1SynthesizeSpeechCommandError = function (output, con
|
|
|
1011
869
|
case "com.amazonaws.polly#TextLengthExceededException": return [3, 18];
|
|
1012
870
|
}
|
|
1013
871
|
return [3, 20];
|
|
1014
|
-
case 2:
|
|
1015
|
-
|
|
1016
|
-
|
|
1017
|
-
case
|
|
1018
|
-
|
|
1019
|
-
|
|
1020
|
-
case 4
|
|
1021
|
-
|
|
1022
|
-
|
|
1023
|
-
case
|
|
1024
|
-
|
|
1025
|
-
|
|
1026
|
-
case
|
|
1027
|
-
|
|
1028
|
-
|
|
1029
|
-
case
|
|
1030
|
-
|
|
1031
|
-
|
|
1032
|
-
case 8:
|
|
1033
|
-
_f = [{}];
|
|
1034
|
-
return [4, deserializeAws_restJson1LanguageNotSupportedExceptionResponse(parsedOutput, context)];
|
|
1035
|
-
case 9:
|
|
1036
|
-
response = __assign.apply(void 0, [__assign.apply(void 0, _f.concat([(_o.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
|
|
1037
|
-
return [3, 21];
|
|
1038
|
-
case 10:
|
|
1039
|
-
_g = [{}];
|
|
1040
|
-
return [4, deserializeAws_restJson1LexiconNotFoundExceptionResponse(parsedOutput, context)];
|
|
1041
|
-
case 11:
|
|
1042
|
-
response = __assign.apply(void 0, [__assign.apply(void 0, _g.concat([(_o.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
|
|
1043
|
-
return [3, 21];
|
|
1044
|
-
case 12:
|
|
1045
|
-
_h = [{}];
|
|
1046
|
-
return [4, deserializeAws_restJson1MarksNotSupportedForFormatExceptionResponse(parsedOutput, context)];
|
|
1047
|
-
case 13:
|
|
1048
|
-
response = __assign.apply(void 0, [__assign.apply(void 0, _h.concat([(_o.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
|
|
1049
|
-
return [3, 21];
|
|
1050
|
-
case 14:
|
|
1051
|
-
_j = [{}];
|
|
1052
|
-
return [4, deserializeAws_restJson1ServiceFailureExceptionResponse(parsedOutput, context)];
|
|
1053
|
-
case 15:
|
|
1054
|
-
response = __assign.apply(void 0, [__assign.apply(void 0, _j.concat([(_o.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
|
|
1055
|
-
return [3, 21];
|
|
1056
|
-
case 16:
|
|
1057
|
-
_k = [{}];
|
|
1058
|
-
return [4, deserializeAws_restJson1SsmlMarksNotSupportedForTextTypeExceptionResponse(parsedOutput, context)];
|
|
1059
|
-
case 17:
|
|
1060
|
-
response = __assign.apply(void 0, [__assign.apply(void 0, _k.concat([(_o.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
|
|
1061
|
-
return [3, 21];
|
|
1062
|
-
case 18:
|
|
1063
|
-
_l = [{}];
|
|
1064
|
-
return [4, deserializeAws_restJson1TextLengthExceededExceptionResponse(parsedOutput, context)];
|
|
1065
|
-
case 19:
|
|
1066
|
-
response = __assign.apply(void 0, [__assign.apply(void 0, _l.concat([(_o.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
|
|
1067
|
-
return [3, 21];
|
|
872
|
+
case 2: return [4, deserializeAws_restJson1EngineNotSupportedExceptionResponse(parsedOutput, context)];
|
|
873
|
+
case 3: throw _d.sent();
|
|
874
|
+
case 4: return [4, deserializeAws_restJson1InvalidSampleRateExceptionResponse(parsedOutput, context)];
|
|
875
|
+
case 5: throw _d.sent();
|
|
876
|
+
case 6: return [4, deserializeAws_restJson1InvalidSsmlExceptionResponse(parsedOutput, context)];
|
|
877
|
+
case 7: throw _d.sent();
|
|
878
|
+
case 8: return [4, deserializeAws_restJson1LanguageNotSupportedExceptionResponse(parsedOutput, context)];
|
|
879
|
+
case 9: throw _d.sent();
|
|
880
|
+
case 10: return [4, deserializeAws_restJson1LexiconNotFoundExceptionResponse(parsedOutput, context)];
|
|
881
|
+
case 11: throw _d.sent();
|
|
882
|
+
case 12: return [4, deserializeAws_restJson1MarksNotSupportedForFormatExceptionResponse(parsedOutput, context)];
|
|
883
|
+
case 13: throw _d.sent();
|
|
884
|
+
case 14: return [4, deserializeAws_restJson1ServiceFailureExceptionResponse(parsedOutput, context)];
|
|
885
|
+
case 15: throw _d.sent();
|
|
886
|
+
case 16: return [4, deserializeAws_restJson1SsmlMarksNotSupportedForTextTypeExceptionResponse(parsedOutput, context)];
|
|
887
|
+
case 17: throw _d.sent();
|
|
888
|
+
case 18: return [4, deserializeAws_restJson1TextLengthExceededExceptionResponse(parsedOutput, context)];
|
|
889
|
+
case 19: throw _d.sent();
|
|
1068
890
|
case 20:
|
|
1069
891
|
parsedBody = parsedOutput.body;
|
|
1070
|
-
|
|
1071
|
-
|
|
1072
|
-
|
|
1073
|
-
|
|
1074
|
-
|
|
1075
|
-
response
|
|
1076
|
-
delete response.Message;
|
|
1077
|
-
return [2, Promise.reject(Object.assign(new Error(message), response))];
|
|
892
|
+
response = new __BaseException({
|
|
893
|
+
name: parsedBody.code || parsedBody.Code || errorCode,
|
|
894
|
+
$fault: "client",
|
|
895
|
+
$metadata: deserializeMetadata(output),
|
|
896
|
+
});
|
|
897
|
+
throw __decorateServiceException(response, parsedBody);
|
|
1078
898
|
}
|
|
1079
899
|
});
|
|
1080
900
|
}); };
|
|
1081
901
|
var deserializeAws_restJson1EngineNotSupportedExceptionResponse = function (parsedOutput, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
1082
|
-
var contents, data;
|
|
902
|
+
var contents, data, exception;
|
|
1083
903
|
return __generator(this, function (_a) {
|
|
1084
|
-
contents = {
|
|
1085
|
-
name: "EngineNotSupportedException",
|
|
1086
|
-
$fault: "client",
|
|
1087
|
-
$metadata: deserializeMetadata(parsedOutput),
|
|
1088
|
-
message: undefined,
|
|
1089
|
-
};
|
|
904
|
+
contents = {};
|
|
1090
905
|
data = parsedOutput.body;
|
|
1091
906
|
if (data.message !== undefined && data.message !== null) {
|
|
1092
907
|
contents.message = __expectString(data.message);
|
|
1093
908
|
}
|
|
1094
|
-
|
|
909
|
+
exception = new EngineNotSupportedException(__assign({ $metadata: deserializeMetadata(parsedOutput) }, contents));
|
|
910
|
+
return [2, __decorateServiceException(exception, parsedOutput.body)];
|
|
1095
911
|
});
|
|
1096
912
|
}); };
|
|
1097
913
|
var deserializeAws_restJson1InvalidLexiconExceptionResponse = function (parsedOutput, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
1098
|
-
var contents, data;
|
|
914
|
+
var contents, data, exception;
|
|
1099
915
|
return __generator(this, function (_a) {
|
|
1100
|
-
contents = {
|
|
1101
|
-
name: "InvalidLexiconException",
|
|
1102
|
-
$fault: "client",
|
|
1103
|
-
$metadata: deserializeMetadata(parsedOutput),
|
|
1104
|
-
message: undefined,
|
|
1105
|
-
};
|
|
916
|
+
contents = {};
|
|
1106
917
|
data = parsedOutput.body;
|
|
1107
918
|
if (data.message !== undefined && data.message !== null) {
|
|
1108
919
|
contents.message = __expectString(data.message);
|
|
1109
920
|
}
|
|
1110
|
-
|
|
921
|
+
exception = new InvalidLexiconException(__assign({ $metadata: deserializeMetadata(parsedOutput) }, contents));
|
|
922
|
+
return [2, __decorateServiceException(exception, parsedOutput.body)];
|
|
1111
923
|
});
|
|
1112
924
|
}); };
|
|
1113
925
|
var deserializeAws_restJson1InvalidNextTokenExceptionResponse = function (parsedOutput, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
1114
|
-
var contents, data;
|
|
926
|
+
var contents, data, exception;
|
|
1115
927
|
return __generator(this, function (_a) {
|
|
1116
|
-
contents = {
|
|
1117
|
-
name: "InvalidNextTokenException",
|
|
1118
|
-
$fault: "client",
|
|
1119
|
-
$metadata: deserializeMetadata(parsedOutput),
|
|
1120
|
-
message: undefined,
|
|
1121
|
-
};
|
|
928
|
+
contents = {};
|
|
1122
929
|
data = parsedOutput.body;
|
|
1123
930
|
if (data.message !== undefined && data.message !== null) {
|
|
1124
931
|
contents.message = __expectString(data.message);
|
|
1125
932
|
}
|
|
1126
|
-
|
|
933
|
+
exception = new InvalidNextTokenException(__assign({ $metadata: deserializeMetadata(parsedOutput) }, contents));
|
|
934
|
+
return [2, __decorateServiceException(exception, parsedOutput.body)];
|
|
1127
935
|
});
|
|
1128
936
|
}); };
|
|
1129
937
|
var deserializeAws_restJson1InvalidS3BucketExceptionResponse = function (parsedOutput, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
1130
|
-
var contents, data;
|
|
938
|
+
var contents, data, exception;
|
|
1131
939
|
return __generator(this, function (_a) {
|
|
1132
|
-
contents = {
|
|
1133
|
-
name: "InvalidS3BucketException",
|
|
1134
|
-
$fault: "client",
|
|
1135
|
-
$metadata: deserializeMetadata(parsedOutput),
|
|
1136
|
-
message: undefined,
|
|
1137
|
-
};
|
|
940
|
+
contents = {};
|
|
1138
941
|
data = parsedOutput.body;
|
|
1139
942
|
if (data.message !== undefined && data.message !== null) {
|
|
1140
943
|
contents.message = __expectString(data.message);
|
|
1141
944
|
}
|
|
1142
|
-
|
|
945
|
+
exception = new InvalidS3BucketException(__assign({ $metadata: deserializeMetadata(parsedOutput) }, contents));
|
|
946
|
+
return [2, __decorateServiceException(exception, parsedOutput.body)];
|
|
1143
947
|
});
|
|
1144
948
|
}); };
|
|
1145
949
|
var deserializeAws_restJson1InvalidS3KeyExceptionResponse = function (parsedOutput, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
1146
|
-
var contents, data;
|
|
950
|
+
var contents, data, exception;
|
|
1147
951
|
return __generator(this, function (_a) {
|
|
1148
|
-
contents = {
|
|
1149
|
-
name: "InvalidS3KeyException",
|
|
1150
|
-
$fault: "client",
|
|
1151
|
-
$metadata: deserializeMetadata(parsedOutput),
|
|
1152
|
-
message: undefined,
|
|
1153
|
-
};
|
|
952
|
+
contents = {};
|
|
1154
953
|
data = parsedOutput.body;
|
|
1155
954
|
if (data.message !== undefined && data.message !== null) {
|
|
1156
955
|
contents.message = __expectString(data.message);
|
|
1157
956
|
}
|
|
1158
|
-
|
|
957
|
+
exception = new InvalidS3KeyException(__assign({ $metadata: deserializeMetadata(parsedOutput) }, contents));
|
|
958
|
+
return [2, __decorateServiceException(exception, parsedOutput.body)];
|
|
1159
959
|
});
|
|
1160
960
|
}); };
|
|
1161
961
|
var deserializeAws_restJson1InvalidSampleRateExceptionResponse = function (parsedOutput, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
1162
|
-
var contents, data;
|
|
962
|
+
var contents, data, exception;
|
|
1163
963
|
return __generator(this, function (_a) {
|
|
1164
|
-
contents = {
|
|
1165
|
-
name: "InvalidSampleRateException",
|
|
1166
|
-
$fault: "client",
|
|
1167
|
-
$metadata: deserializeMetadata(parsedOutput),
|
|
1168
|
-
message: undefined,
|
|
1169
|
-
};
|
|
964
|
+
contents = {};
|
|
1170
965
|
data = parsedOutput.body;
|
|
1171
966
|
if (data.message !== undefined && data.message !== null) {
|
|
1172
967
|
contents.message = __expectString(data.message);
|
|
1173
968
|
}
|
|
1174
|
-
|
|
969
|
+
exception = new InvalidSampleRateException(__assign({ $metadata: deserializeMetadata(parsedOutput) }, contents));
|
|
970
|
+
return [2, __decorateServiceException(exception, parsedOutput.body)];
|
|
1175
971
|
});
|
|
1176
972
|
}); };
|
|
1177
973
|
var deserializeAws_restJson1InvalidSnsTopicArnExceptionResponse = function (parsedOutput, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
1178
|
-
var contents, data;
|
|
974
|
+
var contents, data, exception;
|
|
1179
975
|
return __generator(this, function (_a) {
|
|
1180
|
-
contents = {
|
|
1181
|
-
name: "InvalidSnsTopicArnException",
|
|
1182
|
-
$fault: "client",
|
|
1183
|
-
$metadata: deserializeMetadata(parsedOutput),
|
|
1184
|
-
message: undefined,
|
|
1185
|
-
};
|
|
976
|
+
contents = {};
|
|
1186
977
|
data = parsedOutput.body;
|
|
1187
978
|
if (data.message !== undefined && data.message !== null) {
|
|
1188
979
|
contents.message = __expectString(data.message);
|
|
1189
980
|
}
|
|
1190
|
-
|
|
981
|
+
exception = new InvalidSnsTopicArnException(__assign({ $metadata: deserializeMetadata(parsedOutput) }, contents));
|
|
982
|
+
return [2, __decorateServiceException(exception, parsedOutput.body)];
|
|
1191
983
|
});
|
|
1192
984
|
}); };
|
|
1193
985
|
var deserializeAws_restJson1InvalidSsmlExceptionResponse = function (parsedOutput, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
1194
|
-
var contents, data;
|
|
986
|
+
var contents, data, exception;
|
|
1195
987
|
return __generator(this, function (_a) {
|
|
1196
|
-
contents = {
|
|
1197
|
-
name: "InvalidSsmlException",
|
|
1198
|
-
$fault: "client",
|
|
1199
|
-
$metadata: deserializeMetadata(parsedOutput),
|
|
1200
|
-
message: undefined,
|
|
1201
|
-
};
|
|
988
|
+
contents = {};
|
|
1202
989
|
data = parsedOutput.body;
|
|
1203
990
|
if (data.message !== undefined && data.message !== null) {
|
|
1204
991
|
contents.message = __expectString(data.message);
|
|
1205
992
|
}
|
|
1206
|
-
|
|
993
|
+
exception = new InvalidSsmlException(__assign({ $metadata: deserializeMetadata(parsedOutput) }, contents));
|
|
994
|
+
return [2, __decorateServiceException(exception, parsedOutput.body)];
|
|
1207
995
|
});
|
|
1208
996
|
}); };
|
|
1209
997
|
var deserializeAws_restJson1InvalidTaskIdExceptionResponse = function (parsedOutput, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
1210
|
-
var contents, data;
|
|
998
|
+
var contents, data, exception;
|
|
1211
999
|
return __generator(this, function (_a) {
|
|
1212
|
-
contents = {
|
|
1213
|
-
name: "InvalidTaskIdException",
|
|
1214
|
-
$fault: "client",
|
|
1215
|
-
$metadata: deserializeMetadata(parsedOutput),
|
|
1216
|
-
message: undefined,
|
|
1217
|
-
};
|
|
1000
|
+
contents = {};
|
|
1218
1001
|
data = parsedOutput.body;
|
|
1219
1002
|
if (data.message !== undefined && data.message !== null) {
|
|
1220
1003
|
contents.message = __expectString(data.message);
|
|
1221
1004
|
}
|
|
1222
|
-
|
|
1005
|
+
exception = new InvalidTaskIdException(__assign({ $metadata: deserializeMetadata(parsedOutput) }, contents));
|
|
1006
|
+
return [2, __decorateServiceException(exception, parsedOutput.body)];
|
|
1223
1007
|
});
|
|
1224
1008
|
}); };
|
|
1225
1009
|
var deserializeAws_restJson1LanguageNotSupportedExceptionResponse = function (parsedOutput, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
1226
|
-
var contents, data;
|
|
1010
|
+
var contents, data, exception;
|
|
1227
1011
|
return __generator(this, function (_a) {
|
|
1228
|
-
contents = {
|
|
1229
|
-
name: "LanguageNotSupportedException",
|
|
1230
|
-
$fault: "client",
|
|
1231
|
-
$metadata: deserializeMetadata(parsedOutput),
|
|
1232
|
-
message: undefined,
|
|
1233
|
-
};
|
|
1012
|
+
contents = {};
|
|
1234
1013
|
data = parsedOutput.body;
|
|
1235
1014
|
if (data.message !== undefined && data.message !== null) {
|
|
1236
1015
|
contents.message = __expectString(data.message);
|
|
1237
1016
|
}
|
|
1238
|
-
|
|
1017
|
+
exception = new LanguageNotSupportedException(__assign({ $metadata: deserializeMetadata(parsedOutput) }, contents));
|
|
1018
|
+
return [2, __decorateServiceException(exception, parsedOutput.body)];
|
|
1239
1019
|
});
|
|
1240
1020
|
}); };
|
|
1241
1021
|
var deserializeAws_restJson1LexiconNotFoundExceptionResponse = function (parsedOutput, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
1242
|
-
var contents, data;
|
|
1022
|
+
var contents, data, exception;
|
|
1243
1023
|
return __generator(this, function (_a) {
|
|
1244
|
-
contents = {
|
|
1245
|
-
name: "LexiconNotFoundException",
|
|
1246
|
-
$fault: "client",
|
|
1247
|
-
$metadata: deserializeMetadata(parsedOutput),
|
|
1248
|
-
message: undefined,
|
|
1249
|
-
};
|
|
1024
|
+
contents = {};
|
|
1250
1025
|
data = parsedOutput.body;
|
|
1251
1026
|
if (data.message !== undefined && data.message !== null) {
|
|
1252
1027
|
contents.message = __expectString(data.message);
|
|
1253
1028
|
}
|
|
1254
|
-
|
|
1029
|
+
exception = new LexiconNotFoundException(__assign({ $metadata: deserializeMetadata(parsedOutput) }, contents));
|
|
1030
|
+
return [2, __decorateServiceException(exception, parsedOutput.body)];
|
|
1255
1031
|
});
|
|
1256
1032
|
}); };
|
|
1257
1033
|
var deserializeAws_restJson1LexiconSizeExceededExceptionResponse = function (parsedOutput, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
1258
|
-
var contents, data;
|
|
1034
|
+
var contents, data, exception;
|
|
1259
1035
|
return __generator(this, function (_a) {
|
|
1260
|
-
contents = {
|
|
1261
|
-
name: "LexiconSizeExceededException",
|
|
1262
|
-
$fault: "client",
|
|
1263
|
-
$metadata: deserializeMetadata(parsedOutput),
|
|
1264
|
-
message: undefined,
|
|
1265
|
-
};
|
|
1036
|
+
contents = {};
|
|
1266
1037
|
data = parsedOutput.body;
|
|
1267
1038
|
if (data.message !== undefined && data.message !== null) {
|
|
1268
1039
|
contents.message = __expectString(data.message);
|
|
1269
1040
|
}
|
|
1270
|
-
|
|
1041
|
+
exception = new LexiconSizeExceededException(__assign({ $metadata: deserializeMetadata(parsedOutput) }, contents));
|
|
1042
|
+
return [2, __decorateServiceException(exception, parsedOutput.body)];
|
|
1271
1043
|
});
|
|
1272
1044
|
}); };
|
|
1273
1045
|
var deserializeAws_restJson1MarksNotSupportedForFormatExceptionResponse = function (parsedOutput, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
1274
|
-
var contents, data;
|
|
1046
|
+
var contents, data, exception;
|
|
1275
1047
|
return __generator(this, function (_a) {
|
|
1276
|
-
contents = {
|
|
1277
|
-
name: "MarksNotSupportedForFormatException",
|
|
1278
|
-
$fault: "client",
|
|
1279
|
-
$metadata: deserializeMetadata(parsedOutput),
|
|
1280
|
-
message: undefined,
|
|
1281
|
-
};
|
|
1048
|
+
contents = {};
|
|
1282
1049
|
data = parsedOutput.body;
|
|
1283
1050
|
if (data.message !== undefined && data.message !== null) {
|
|
1284
1051
|
contents.message = __expectString(data.message);
|
|
1285
1052
|
}
|
|
1286
|
-
|
|
1053
|
+
exception = new MarksNotSupportedForFormatException(__assign({ $metadata: deserializeMetadata(parsedOutput) }, contents));
|
|
1054
|
+
return [2, __decorateServiceException(exception, parsedOutput.body)];
|
|
1287
1055
|
});
|
|
1288
1056
|
}); };
|
|
1289
1057
|
var deserializeAws_restJson1MaxLexemeLengthExceededExceptionResponse = function (parsedOutput, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
1290
|
-
var contents, data;
|
|
1058
|
+
var contents, data, exception;
|
|
1291
1059
|
return __generator(this, function (_a) {
|
|
1292
|
-
contents = {
|
|
1293
|
-
name: "MaxLexemeLengthExceededException",
|
|
1294
|
-
$fault: "client",
|
|
1295
|
-
$metadata: deserializeMetadata(parsedOutput),
|
|
1296
|
-
message: undefined,
|
|
1297
|
-
};
|
|
1060
|
+
contents = {};
|
|
1298
1061
|
data = parsedOutput.body;
|
|
1299
1062
|
if (data.message !== undefined && data.message !== null) {
|
|
1300
1063
|
contents.message = __expectString(data.message);
|
|
1301
1064
|
}
|
|
1302
|
-
|
|
1065
|
+
exception = new MaxLexemeLengthExceededException(__assign({ $metadata: deserializeMetadata(parsedOutput) }, contents));
|
|
1066
|
+
return [2, __decorateServiceException(exception, parsedOutput.body)];
|
|
1303
1067
|
});
|
|
1304
1068
|
}); };
|
|
1305
1069
|
var deserializeAws_restJson1MaxLexiconsNumberExceededExceptionResponse = function (parsedOutput, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
1306
|
-
var contents, data;
|
|
1070
|
+
var contents, data, exception;
|
|
1307
1071
|
return __generator(this, function (_a) {
|
|
1308
|
-
contents = {
|
|
1309
|
-
name: "MaxLexiconsNumberExceededException",
|
|
1310
|
-
$fault: "client",
|
|
1311
|
-
$metadata: deserializeMetadata(parsedOutput),
|
|
1312
|
-
message: undefined,
|
|
1313
|
-
};
|
|
1072
|
+
contents = {};
|
|
1314
1073
|
data = parsedOutput.body;
|
|
1315
1074
|
if (data.message !== undefined && data.message !== null) {
|
|
1316
1075
|
contents.message = __expectString(data.message);
|
|
1317
1076
|
}
|
|
1318
|
-
|
|
1077
|
+
exception = new MaxLexiconsNumberExceededException(__assign({ $metadata: deserializeMetadata(parsedOutput) }, contents));
|
|
1078
|
+
return [2, __decorateServiceException(exception, parsedOutput.body)];
|
|
1319
1079
|
});
|
|
1320
1080
|
}); };
|
|
1321
1081
|
var deserializeAws_restJson1ServiceFailureExceptionResponse = function (parsedOutput, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
1322
|
-
var contents, data;
|
|
1082
|
+
var contents, data, exception;
|
|
1323
1083
|
return __generator(this, function (_a) {
|
|
1324
|
-
contents = {
|
|
1325
|
-
name: "ServiceFailureException",
|
|
1326
|
-
$fault: "server",
|
|
1327
|
-
$metadata: deserializeMetadata(parsedOutput),
|
|
1328
|
-
message: undefined,
|
|
1329
|
-
};
|
|
1084
|
+
contents = {};
|
|
1330
1085
|
data = parsedOutput.body;
|
|
1331
1086
|
if (data.message !== undefined && data.message !== null) {
|
|
1332
1087
|
contents.message = __expectString(data.message);
|
|
1333
1088
|
}
|
|
1334
|
-
|
|
1089
|
+
exception = new ServiceFailureException(__assign({ $metadata: deserializeMetadata(parsedOutput) }, contents));
|
|
1090
|
+
return [2, __decorateServiceException(exception, parsedOutput.body)];
|
|
1335
1091
|
});
|
|
1336
1092
|
}); };
|
|
1337
1093
|
var deserializeAws_restJson1SsmlMarksNotSupportedForTextTypeExceptionResponse = function (parsedOutput, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
1338
|
-
var contents, data;
|
|
1094
|
+
var contents, data, exception;
|
|
1339
1095
|
return __generator(this, function (_a) {
|
|
1340
|
-
contents = {
|
|
1341
|
-
name: "SsmlMarksNotSupportedForTextTypeException",
|
|
1342
|
-
$fault: "client",
|
|
1343
|
-
$metadata: deserializeMetadata(parsedOutput),
|
|
1344
|
-
message: undefined,
|
|
1345
|
-
};
|
|
1096
|
+
contents = {};
|
|
1346
1097
|
data = parsedOutput.body;
|
|
1347
1098
|
if (data.message !== undefined && data.message !== null) {
|
|
1348
1099
|
contents.message = __expectString(data.message);
|
|
1349
1100
|
}
|
|
1350
|
-
|
|
1101
|
+
exception = new SsmlMarksNotSupportedForTextTypeException(__assign({ $metadata: deserializeMetadata(parsedOutput) }, contents));
|
|
1102
|
+
return [2, __decorateServiceException(exception, parsedOutput.body)];
|
|
1351
1103
|
});
|
|
1352
1104
|
}); };
|
|
1353
1105
|
var deserializeAws_restJson1SynthesisTaskNotFoundExceptionResponse = function (parsedOutput, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
1354
|
-
var contents, data;
|
|
1106
|
+
var contents, data, exception;
|
|
1355
1107
|
return __generator(this, function (_a) {
|
|
1356
|
-
contents = {
|
|
1357
|
-
name: "SynthesisTaskNotFoundException",
|
|
1358
|
-
$fault: "client",
|
|
1359
|
-
$metadata: deserializeMetadata(parsedOutput),
|
|
1360
|
-
message: undefined,
|
|
1361
|
-
};
|
|
1108
|
+
contents = {};
|
|
1362
1109
|
data = parsedOutput.body;
|
|
1363
1110
|
if (data.message !== undefined && data.message !== null) {
|
|
1364
1111
|
contents.message = __expectString(data.message);
|
|
1365
1112
|
}
|
|
1366
|
-
|
|
1113
|
+
exception = new SynthesisTaskNotFoundException(__assign({ $metadata: deserializeMetadata(parsedOutput) }, contents));
|
|
1114
|
+
return [2, __decorateServiceException(exception, parsedOutput.body)];
|
|
1367
1115
|
});
|
|
1368
1116
|
}); };
|
|
1369
1117
|
var deserializeAws_restJson1TextLengthExceededExceptionResponse = function (parsedOutput, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
1370
|
-
var contents, data;
|
|
1118
|
+
var contents, data, exception;
|
|
1371
1119
|
return __generator(this, function (_a) {
|
|
1372
|
-
contents = {
|
|
1373
|
-
name: "TextLengthExceededException",
|
|
1374
|
-
$fault: "client",
|
|
1375
|
-
$metadata: deserializeMetadata(parsedOutput),
|
|
1376
|
-
message: undefined,
|
|
1377
|
-
};
|
|
1120
|
+
contents = {};
|
|
1378
1121
|
data = parsedOutput.body;
|
|
1379
1122
|
if (data.message !== undefined && data.message !== null) {
|
|
1380
1123
|
contents.message = __expectString(data.message);
|
|
1381
1124
|
}
|
|
1382
|
-
|
|
1125
|
+
exception = new TextLengthExceededException(__assign({ $metadata: deserializeMetadata(parsedOutput) }, contents));
|
|
1126
|
+
return [2, __decorateServiceException(exception, parsedOutput.body)];
|
|
1383
1127
|
});
|
|
1384
1128
|
}); };
|
|
1385
1129
|
var deserializeAws_restJson1UnsupportedPlsAlphabetExceptionResponse = function (parsedOutput, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
1386
|
-
var contents, data;
|
|
1130
|
+
var contents, data, exception;
|
|
1387
1131
|
return __generator(this, function (_a) {
|
|
1388
|
-
contents = {
|
|
1389
|
-
name: "UnsupportedPlsAlphabetException",
|
|
1390
|
-
$fault: "client",
|
|
1391
|
-
$metadata: deserializeMetadata(parsedOutput),
|
|
1392
|
-
message: undefined,
|
|
1393
|
-
};
|
|
1132
|
+
contents = {};
|
|
1394
1133
|
data = parsedOutput.body;
|
|
1395
1134
|
if (data.message !== undefined && data.message !== null) {
|
|
1396
1135
|
contents.message = __expectString(data.message);
|
|
1397
1136
|
}
|
|
1398
|
-
|
|
1137
|
+
exception = new UnsupportedPlsAlphabetException(__assign({ $metadata: deserializeMetadata(parsedOutput) }, contents));
|
|
1138
|
+
return [2, __decorateServiceException(exception, parsedOutput.body)];
|
|
1399
1139
|
});
|
|
1400
1140
|
}); };
|
|
1401
1141
|
var deserializeAws_restJson1UnsupportedPlsLanguageExceptionResponse = function (parsedOutput, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
1402
|
-
var contents, data;
|
|
1142
|
+
var contents, data, exception;
|
|
1403
1143
|
return __generator(this, function (_a) {
|
|
1404
|
-
contents = {
|
|
1405
|
-
name: "UnsupportedPlsLanguageException",
|
|
1406
|
-
$fault: "client",
|
|
1407
|
-
$metadata: deserializeMetadata(parsedOutput),
|
|
1408
|
-
message: undefined,
|
|
1409
|
-
};
|
|
1144
|
+
contents = {};
|
|
1410
1145
|
data = parsedOutput.body;
|
|
1411
1146
|
if (data.message !== undefined && data.message !== null) {
|
|
1412
1147
|
contents.message = __expectString(data.message);
|
|
1413
1148
|
}
|
|
1414
|
-
|
|
1149
|
+
exception = new UnsupportedPlsLanguageException(__assign({ $metadata: deserializeMetadata(parsedOutput) }, contents));
|
|
1150
|
+
return [2, __decorateServiceException(exception, parsedOutput.body)];
|
|
1415
1151
|
});
|
|
1416
1152
|
}); };
|
|
1417
1153
|
var serializeAws_restJson1LexiconNameList = function (input, context) {
|
|
@@ -1435,7 +1171,7 @@ var serializeAws_restJson1SpeechMarkTypeList = function (input, context) {
|
|
|
1435
1171
|
});
|
|
1436
1172
|
};
|
|
1437
1173
|
var deserializeAws_restJson1EngineList = function (output, context) {
|
|
1438
|
-
|
|
1174
|
+
var retVal = (output || [])
|
|
1439
1175
|
.filter(function (e) { return e != null; })
|
|
1440
1176
|
.map(function (entry) {
|
|
1441
1177
|
if (entry === null) {
|
|
@@ -1443,9 +1179,10 @@ var deserializeAws_restJson1EngineList = function (output, context) {
|
|
|
1443
1179
|
}
|
|
1444
1180
|
return __expectString(entry);
|
|
1445
1181
|
});
|
|
1182
|
+
return retVal;
|
|
1446
1183
|
};
|
|
1447
1184
|
var deserializeAws_restJson1LanguageCodeList = function (output, context) {
|
|
1448
|
-
|
|
1185
|
+
var retVal = (output || [])
|
|
1449
1186
|
.filter(function (e) { return e != null; })
|
|
1450
1187
|
.map(function (entry) {
|
|
1451
1188
|
if (entry === null) {
|
|
@@ -1453,6 +1190,7 @@ var deserializeAws_restJson1LanguageCodeList = function (output, context) {
|
|
|
1453
1190
|
}
|
|
1454
1191
|
return __expectString(entry);
|
|
1455
1192
|
});
|
|
1193
|
+
return retVal;
|
|
1456
1194
|
};
|
|
1457
1195
|
var deserializeAws_restJson1Lexicon = function (output, context) {
|
|
1458
1196
|
return {
|
|
@@ -1481,7 +1219,7 @@ var deserializeAws_restJson1LexiconDescription = function (output, context) {
|
|
|
1481
1219
|
};
|
|
1482
1220
|
};
|
|
1483
1221
|
var deserializeAws_restJson1LexiconDescriptionList = function (output, context) {
|
|
1484
|
-
|
|
1222
|
+
var retVal = (output || [])
|
|
1485
1223
|
.filter(function (e) { return e != null; })
|
|
1486
1224
|
.map(function (entry) {
|
|
1487
1225
|
if (entry === null) {
|
|
@@ -1489,9 +1227,10 @@ var deserializeAws_restJson1LexiconDescriptionList = function (output, context)
|
|
|
1489
1227
|
}
|
|
1490
1228
|
return deserializeAws_restJson1LexiconDescription(entry, context);
|
|
1491
1229
|
});
|
|
1230
|
+
return retVal;
|
|
1492
1231
|
};
|
|
1493
1232
|
var deserializeAws_restJson1LexiconNameList = function (output, context) {
|
|
1494
|
-
|
|
1233
|
+
var retVal = (output || [])
|
|
1495
1234
|
.filter(function (e) { return e != null; })
|
|
1496
1235
|
.map(function (entry) {
|
|
1497
1236
|
if (entry === null) {
|
|
@@ -1499,9 +1238,10 @@ var deserializeAws_restJson1LexiconNameList = function (output, context) {
|
|
|
1499
1238
|
}
|
|
1500
1239
|
return __expectString(entry);
|
|
1501
1240
|
});
|
|
1241
|
+
return retVal;
|
|
1502
1242
|
};
|
|
1503
1243
|
var deserializeAws_restJson1SpeechMarkTypeList = function (output, context) {
|
|
1504
|
-
|
|
1244
|
+
var retVal = (output || [])
|
|
1505
1245
|
.filter(function (e) { return e != null; })
|
|
1506
1246
|
.map(function (entry) {
|
|
1507
1247
|
if (entry === null) {
|
|
@@ -1509,6 +1249,7 @@ var deserializeAws_restJson1SpeechMarkTypeList = function (output, context) {
|
|
|
1509
1249
|
}
|
|
1510
1250
|
return __expectString(entry);
|
|
1511
1251
|
});
|
|
1252
|
+
return retVal;
|
|
1512
1253
|
};
|
|
1513
1254
|
var deserializeAws_restJson1SynthesisTask = function (output, context) {
|
|
1514
1255
|
return {
|
|
@@ -1536,7 +1277,7 @@ var deserializeAws_restJson1SynthesisTask = function (output, context) {
|
|
|
1536
1277
|
};
|
|
1537
1278
|
};
|
|
1538
1279
|
var deserializeAws_restJson1SynthesisTasks = function (output, context) {
|
|
1539
|
-
|
|
1280
|
+
var retVal = (output || [])
|
|
1540
1281
|
.filter(function (e) { return e != null; })
|
|
1541
1282
|
.map(function (entry) {
|
|
1542
1283
|
if (entry === null) {
|
|
@@ -1544,6 +1285,7 @@ var deserializeAws_restJson1SynthesisTasks = function (output, context) {
|
|
|
1544
1285
|
}
|
|
1545
1286
|
return deserializeAws_restJson1SynthesisTask(entry, context);
|
|
1546
1287
|
});
|
|
1288
|
+
return retVal;
|
|
1547
1289
|
};
|
|
1548
1290
|
var deserializeAws_restJson1Voice = function (output, context) {
|
|
1549
1291
|
return {
|
|
@@ -1561,7 +1303,7 @@ var deserializeAws_restJson1Voice = function (output, context) {
|
|
|
1561
1303
|
};
|
|
1562
1304
|
};
|
|
1563
1305
|
var deserializeAws_restJson1VoiceList = function (output, context) {
|
|
1564
|
-
|
|
1306
|
+
var retVal = (output || [])
|
|
1565
1307
|
.filter(function (e) { return e != null; })
|
|
1566
1308
|
.map(function (entry) {
|
|
1567
1309
|
if (entry === null) {
|
|
@@ -1569,6 +1311,7 @@ var deserializeAws_restJson1VoiceList = function (output, context) {
|
|
|
1569
1311
|
}
|
|
1570
1312
|
return deserializeAws_restJson1Voice(entry, context);
|
|
1571
1313
|
});
|
|
1314
|
+
return retVal;
|
|
1572
1315
|
};
|
|
1573
1316
|
var deserializeMetadata = function (output) {
|
|
1574
1317
|
var _a;
|