@aws-sdk/client-rbin 3.52.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 +11 -0
- package/dist-cjs/index.js +3 -0
- package/dist-cjs/models/RbinServiceException.js +11 -0
- package/dist-cjs/models/models_0.js +61 -1
- package/dist-cjs/protocols/Aws_restJson1.js +88 -258
- package/dist-es/index.js +1 -0
- package/dist-es/models/RbinServiceException.js +12 -0
- package/dist-es/models/models_0.js +57 -1
- package/dist-es/protocols/Aws_restJson1.js +169 -295
- package/dist-types/index.d.ts +1 -0
- package/dist-types/models/RbinServiceException.d.ts +10 -0
- package/dist-types/models/models_0.d.ts +30 -13
- package/dist-types/ts3.4/index.d.ts +1 -0
- package/dist-types/ts3.4/models/RbinServiceException.d.ts +6 -0
- package/dist-types/ts3.4/models/models_0.d.ts +22 -13
- package/package.json +25 -25
|
@@ -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, expectObject as __expectObject, expectString as __expectString, extendedEncodeURIComponent as __extendedEncodeURIComponent, } from "@aws-sdk/smithy-client";
|
|
3
|
+
import { decorateServiceException as __decorateServiceException, expectInt32 as __expectInt32, expectNonNull as __expectNonNull, expectObject as __expectObject, expectString as __expectString, extendedEncodeURIComponent as __extendedEncodeURIComponent, } from "@aws-sdk/smithy-client";
|
|
4
|
+
import { InternalServerException, ResourceNotFoundException, ServiceQuotaExceededException, ValidationException, } from "../models/models_0";
|
|
5
|
+
import { RbinServiceException as __BaseException } from "../models/RbinServiceException";
|
|
4
6
|
export var serializeAws_restJson1CreateRuleCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
5
7
|
var _a, hostname, _b, protocol, port, basePath, headers, resolvedPath, body;
|
|
6
8
|
return __generator(this, function (_c) {
|
|
@@ -303,16 +305,16 @@ export var deserializeAws_restJson1CreateRuleCommand = function (output, context
|
|
|
303
305
|
});
|
|
304
306
|
}); };
|
|
305
307
|
var deserializeAws_restJson1CreateRuleCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
306
|
-
var parsedOutput, _a, response, errorCode, _b,
|
|
307
|
-
var
|
|
308
|
-
return __generator(this, function (
|
|
309
|
-
switch (
|
|
308
|
+
var parsedOutput, _a, response, errorCode, _b, parsedBody;
|
|
309
|
+
var _c;
|
|
310
|
+
return __generator(this, function (_d) {
|
|
311
|
+
switch (_d.label) {
|
|
310
312
|
case 0:
|
|
311
313
|
_a = [__assign({}, output)];
|
|
312
|
-
|
|
314
|
+
_c = {};
|
|
313
315
|
return [4, parseBody(output.body, context)];
|
|
314
316
|
case 1:
|
|
315
|
-
parsedOutput = __assign.apply(void 0, _a.concat([(
|
|
317
|
+
parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
|
|
316
318
|
errorCode = "UnknownError";
|
|
317
319
|
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
318
320
|
_b = errorCode;
|
|
@@ -325,34 +327,20 @@ var deserializeAws_restJson1CreateRuleCommandError = function (output, context)
|
|
|
325
327
|
case "com.amazonaws.rbin#ValidationException": return [3, 6];
|
|
326
328
|
}
|
|
327
329
|
return [3, 8];
|
|
328
|
-
case 2:
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
case
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
case 4:
|
|
335
|
-
_d = [{}];
|
|
336
|
-
return [4, deserializeAws_restJson1ServiceQuotaExceededExceptionResponse(parsedOutput, context)];
|
|
337
|
-
case 5:
|
|
338
|
-
response = __assign.apply(void 0, [__assign.apply(void 0, _d.concat([(_g.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
|
|
339
|
-
return [3, 9];
|
|
340
|
-
case 6:
|
|
341
|
-
_e = [{}];
|
|
342
|
-
return [4, deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context)];
|
|
343
|
-
case 7:
|
|
344
|
-
response = __assign.apply(void 0, [__assign.apply(void 0, _e.concat([(_g.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
|
|
345
|
-
return [3, 9];
|
|
330
|
+
case 2: return [4, deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context)];
|
|
331
|
+
case 3: throw _d.sent();
|
|
332
|
+
case 4: return [4, deserializeAws_restJson1ServiceQuotaExceededExceptionResponse(parsedOutput, context)];
|
|
333
|
+
case 5: throw _d.sent();
|
|
334
|
+
case 6: return [4, deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context)];
|
|
335
|
+
case 7: throw _d.sent();
|
|
346
336
|
case 8:
|
|
347
337
|
parsedBody = parsedOutput.body;
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
response
|
|
354
|
-
delete response.Message;
|
|
355
|
-
return [2, Promise.reject(Object.assign(new Error(message), response))];
|
|
338
|
+
response = new __BaseException({
|
|
339
|
+
name: parsedBody.code || parsedBody.Code || errorCode,
|
|
340
|
+
$fault: "client",
|
|
341
|
+
$metadata: deserializeMetadata(output),
|
|
342
|
+
});
|
|
343
|
+
throw __decorateServiceException(response, parsedBody);
|
|
356
344
|
}
|
|
357
345
|
});
|
|
358
346
|
}); };
|
|
@@ -375,16 +363,16 @@ export var deserializeAws_restJson1DeleteRuleCommand = function (output, context
|
|
|
375
363
|
});
|
|
376
364
|
}); };
|
|
377
365
|
var deserializeAws_restJson1DeleteRuleCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
378
|
-
var parsedOutput, _a, response, errorCode, _b,
|
|
379
|
-
var
|
|
380
|
-
return __generator(this, function (
|
|
381
|
-
switch (
|
|
366
|
+
var parsedOutput, _a, response, errorCode, _b, parsedBody;
|
|
367
|
+
var _c;
|
|
368
|
+
return __generator(this, function (_d) {
|
|
369
|
+
switch (_d.label) {
|
|
382
370
|
case 0:
|
|
383
371
|
_a = [__assign({}, output)];
|
|
384
|
-
|
|
372
|
+
_c = {};
|
|
385
373
|
return [4, parseBody(output.body, context)];
|
|
386
374
|
case 1:
|
|
387
|
-
parsedOutput = __assign.apply(void 0, _a.concat([(
|
|
375
|
+
parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
|
|
388
376
|
errorCode = "UnknownError";
|
|
389
377
|
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
390
378
|
_b = errorCode;
|
|
@@ -397,34 +385,20 @@ var deserializeAws_restJson1DeleteRuleCommandError = function (output, context)
|
|
|
397
385
|
case "com.amazonaws.rbin#ValidationException": return [3, 6];
|
|
398
386
|
}
|
|
399
387
|
return [3, 8];
|
|
400
|
-
case 2:
|
|
401
|
-
|
|
402
|
-
|
|
403
|
-
case
|
|
404
|
-
|
|
405
|
-
|
|
406
|
-
case 4:
|
|
407
|
-
_d = [{}];
|
|
408
|
-
return [4, deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context)];
|
|
409
|
-
case 5:
|
|
410
|
-
response = __assign.apply(void 0, [__assign.apply(void 0, _d.concat([(_g.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
|
|
411
|
-
return [3, 9];
|
|
412
|
-
case 6:
|
|
413
|
-
_e = [{}];
|
|
414
|
-
return [4, deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context)];
|
|
415
|
-
case 7:
|
|
416
|
-
response = __assign.apply(void 0, [__assign.apply(void 0, _e.concat([(_g.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
|
|
417
|
-
return [3, 9];
|
|
388
|
+
case 2: return [4, deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context)];
|
|
389
|
+
case 3: throw _d.sent();
|
|
390
|
+
case 4: return [4, deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context)];
|
|
391
|
+
case 5: throw _d.sent();
|
|
392
|
+
case 6: return [4, deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context)];
|
|
393
|
+
case 7: throw _d.sent();
|
|
418
394
|
case 8:
|
|
419
395
|
parsedBody = parsedOutput.body;
|
|
420
|
-
|
|
421
|
-
|
|
422
|
-
|
|
423
|
-
|
|
424
|
-
|
|
425
|
-
response
|
|
426
|
-
delete response.Message;
|
|
427
|
-
return [2, Promise.reject(Object.assign(new Error(message), response))];
|
|
396
|
+
response = new __BaseException({
|
|
397
|
+
name: parsedBody.code || parsedBody.Code || errorCode,
|
|
398
|
+
$fault: "client",
|
|
399
|
+
$metadata: deserializeMetadata(output),
|
|
400
|
+
});
|
|
401
|
+
throw __decorateServiceException(response, parsedBody);
|
|
428
402
|
}
|
|
429
403
|
});
|
|
430
404
|
}); };
|
|
@@ -473,16 +447,16 @@ export var deserializeAws_restJson1GetRuleCommand = function (output, context) {
|
|
|
473
447
|
});
|
|
474
448
|
}); };
|
|
475
449
|
var deserializeAws_restJson1GetRuleCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
476
|
-
var parsedOutput, _a, response, errorCode, _b,
|
|
477
|
-
var
|
|
478
|
-
return __generator(this, function (
|
|
479
|
-
switch (
|
|
450
|
+
var parsedOutput, _a, response, errorCode, _b, parsedBody;
|
|
451
|
+
var _c;
|
|
452
|
+
return __generator(this, function (_d) {
|
|
453
|
+
switch (_d.label) {
|
|
480
454
|
case 0:
|
|
481
455
|
_a = [__assign({}, output)];
|
|
482
|
-
|
|
456
|
+
_c = {};
|
|
483
457
|
return [4, parseBody(output.body, context)];
|
|
484
458
|
case 1:
|
|
485
|
-
parsedOutput = __assign.apply(void 0, _a.concat([(
|
|
459
|
+
parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
|
|
486
460
|
errorCode = "UnknownError";
|
|
487
461
|
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
488
462
|
_b = errorCode;
|
|
@@ -495,34 +469,20 @@ var deserializeAws_restJson1GetRuleCommandError = function (output, context) { r
|
|
|
495
469
|
case "com.amazonaws.rbin#ValidationException": return [3, 6];
|
|
496
470
|
}
|
|
497
471
|
return [3, 8];
|
|
498
|
-
case 2:
|
|
499
|
-
|
|
500
|
-
|
|
501
|
-
case
|
|
502
|
-
|
|
503
|
-
|
|
504
|
-
case 4:
|
|
505
|
-
_d = [{}];
|
|
506
|
-
return [4, deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context)];
|
|
507
|
-
case 5:
|
|
508
|
-
response = __assign.apply(void 0, [__assign.apply(void 0, _d.concat([(_g.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
|
|
509
|
-
return [3, 9];
|
|
510
|
-
case 6:
|
|
511
|
-
_e = [{}];
|
|
512
|
-
return [4, deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context)];
|
|
513
|
-
case 7:
|
|
514
|
-
response = __assign.apply(void 0, [__assign.apply(void 0, _e.concat([(_g.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
|
|
515
|
-
return [3, 9];
|
|
472
|
+
case 2: return [4, deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context)];
|
|
473
|
+
case 3: throw _d.sent();
|
|
474
|
+
case 4: return [4, deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context)];
|
|
475
|
+
case 5: throw _d.sent();
|
|
476
|
+
case 6: return [4, deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context)];
|
|
477
|
+
case 7: throw _d.sent();
|
|
516
478
|
case 8:
|
|
517
479
|
parsedBody = parsedOutput.body;
|
|
518
|
-
|
|
519
|
-
|
|
520
|
-
|
|
521
|
-
|
|
522
|
-
|
|
523
|
-
response
|
|
524
|
-
delete response.Message;
|
|
525
|
-
return [2, Promise.reject(Object.assign(new Error(message), response))];
|
|
480
|
+
response = new __BaseException({
|
|
481
|
+
name: parsedBody.code || parsedBody.Code || errorCode,
|
|
482
|
+
$fault: "client",
|
|
483
|
+
$metadata: deserializeMetadata(output),
|
|
484
|
+
});
|
|
485
|
+
throw __decorateServiceException(response, parsedBody);
|
|
526
486
|
}
|
|
527
487
|
});
|
|
528
488
|
}); };
|
|
@@ -555,16 +515,16 @@ export var deserializeAws_restJson1ListRulesCommand = function (output, context)
|
|
|
555
515
|
});
|
|
556
516
|
}); };
|
|
557
517
|
var deserializeAws_restJson1ListRulesCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
558
|
-
var parsedOutput, _a, response, errorCode, _b,
|
|
559
|
-
var
|
|
560
|
-
return __generator(this, function (
|
|
561
|
-
switch (
|
|
518
|
+
var parsedOutput, _a, response, errorCode, _b, parsedBody;
|
|
519
|
+
var _c;
|
|
520
|
+
return __generator(this, function (_d) {
|
|
521
|
+
switch (_d.label) {
|
|
562
522
|
case 0:
|
|
563
523
|
_a = [__assign({}, output)];
|
|
564
|
-
|
|
524
|
+
_c = {};
|
|
565
525
|
return [4, parseBody(output.body, context)];
|
|
566
526
|
case 1:
|
|
567
|
-
parsedOutput = __assign.apply(void 0, _a.concat([(
|
|
527
|
+
parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
|
|
568
528
|
errorCode = "UnknownError";
|
|
569
529
|
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
570
530
|
_b = errorCode;
|
|
@@ -575,28 +535,18 @@ var deserializeAws_restJson1ListRulesCommandError = function (output, context) {
|
|
|
575
535
|
case "com.amazonaws.rbin#ValidationException": return [3, 4];
|
|
576
536
|
}
|
|
577
537
|
return [3, 6];
|
|
578
|
-
case 2:
|
|
579
|
-
|
|
580
|
-
|
|
581
|
-
case
|
|
582
|
-
response = __assign.apply(void 0, [__assign.apply(void 0, _c.concat([(_f.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
|
|
583
|
-
return [3, 7];
|
|
584
|
-
case 4:
|
|
585
|
-
_d = [{}];
|
|
586
|
-
return [4, deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context)];
|
|
587
|
-
case 5:
|
|
588
|
-
response = __assign.apply(void 0, [__assign.apply(void 0, _d.concat([(_f.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
|
|
589
|
-
return [3, 7];
|
|
538
|
+
case 2: return [4, deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context)];
|
|
539
|
+
case 3: throw _d.sent();
|
|
540
|
+
case 4: return [4, deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context)];
|
|
541
|
+
case 5: throw _d.sent();
|
|
590
542
|
case 6:
|
|
591
543
|
parsedBody = parsedOutput.body;
|
|
592
|
-
|
|
593
|
-
|
|
594
|
-
|
|
595
|
-
|
|
596
|
-
|
|
597
|
-
response
|
|
598
|
-
delete response.Message;
|
|
599
|
-
return [2, Promise.reject(Object.assign(new Error(message), response))];
|
|
544
|
+
response = new __BaseException({
|
|
545
|
+
name: parsedBody.code || parsedBody.Code || errorCode,
|
|
546
|
+
$fault: "client",
|
|
547
|
+
$metadata: deserializeMetadata(output),
|
|
548
|
+
});
|
|
549
|
+
throw __decorateServiceException(response, parsedBody);
|
|
600
550
|
}
|
|
601
551
|
});
|
|
602
552
|
}); };
|
|
@@ -625,16 +575,16 @@ export var deserializeAws_restJson1ListTagsForResourceCommand = function (output
|
|
|
625
575
|
});
|
|
626
576
|
}); };
|
|
627
577
|
var deserializeAws_restJson1ListTagsForResourceCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
628
|
-
var parsedOutput, _a, response, errorCode, _b,
|
|
629
|
-
var
|
|
630
|
-
return __generator(this, function (
|
|
631
|
-
switch (
|
|
578
|
+
var parsedOutput, _a, response, errorCode, _b, parsedBody;
|
|
579
|
+
var _c;
|
|
580
|
+
return __generator(this, function (_d) {
|
|
581
|
+
switch (_d.label) {
|
|
632
582
|
case 0:
|
|
633
583
|
_a = [__assign({}, output)];
|
|
634
|
-
|
|
584
|
+
_c = {};
|
|
635
585
|
return [4, parseBody(output.body, context)];
|
|
636
586
|
case 1:
|
|
637
|
-
parsedOutput = __assign.apply(void 0, _a.concat([(
|
|
587
|
+
parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
|
|
638
588
|
errorCode = "UnknownError";
|
|
639
589
|
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
640
590
|
_b = errorCode;
|
|
@@ -647,34 +597,20 @@ var deserializeAws_restJson1ListTagsForResourceCommandError = function (output,
|
|
|
647
597
|
case "com.amazonaws.rbin#ValidationException": return [3, 6];
|
|
648
598
|
}
|
|
649
599
|
return [3, 8];
|
|
650
|
-
case 2:
|
|
651
|
-
|
|
652
|
-
|
|
653
|
-
case
|
|
654
|
-
|
|
655
|
-
|
|
656
|
-
case 4:
|
|
657
|
-
_d = [{}];
|
|
658
|
-
return [4, deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context)];
|
|
659
|
-
case 5:
|
|
660
|
-
response = __assign.apply(void 0, [__assign.apply(void 0, _d.concat([(_g.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
|
|
661
|
-
return [3, 9];
|
|
662
|
-
case 6:
|
|
663
|
-
_e = [{}];
|
|
664
|
-
return [4, deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context)];
|
|
665
|
-
case 7:
|
|
666
|
-
response = __assign.apply(void 0, [__assign.apply(void 0, _e.concat([(_g.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
|
|
667
|
-
return [3, 9];
|
|
600
|
+
case 2: return [4, deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context)];
|
|
601
|
+
case 3: throw _d.sent();
|
|
602
|
+
case 4: return [4, deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context)];
|
|
603
|
+
case 5: throw _d.sent();
|
|
604
|
+
case 6: return [4, deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context)];
|
|
605
|
+
case 7: throw _d.sent();
|
|
668
606
|
case 8:
|
|
669
607
|
parsedBody = parsedOutput.body;
|
|
670
|
-
|
|
671
|
-
|
|
672
|
-
|
|
673
|
-
|
|
674
|
-
|
|
675
|
-
response
|
|
676
|
-
delete response.Message;
|
|
677
|
-
return [2, Promise.reject(Object.assign(new Error(message), response))];
|
|
608
|
+
response = new __BaseException({
|
|
609
|
+
name: parsedBody.code || parsedBody.Code || errorCode,
|
|
610
|
+
$fault: "client",
|
|
611
|
+
$metadata: deserializeMetadata(output),
|
|
612
|
+
});
|
|
613
|
+
throw __decorateServiceException(response, parsedBody);
|
|
678
614
|
}
|
|
679
615
|
});
|
|
680
616
|
}); };
|
|
@@ -697,16 +633,16 @@ export var deserializeAws_restJson1TagResourceCommand = function (output, contex
|
|
|
697
633
|
});
|
|
698
634
|
}); };
|
|
699
635
|
var deserializeAws_restJson1TagResourceCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
700
|
-
var parsedOutput, _a, response, errorCode, _b,
|
|
701
|
-
var
|
|
702
|
-
return __generator(this, function (
|
|
703
|
-
switch (
|
|
636
|
+
var parsedOutput, _a, response, errorCode, _b, parsedBody;
|
|
637
|
+
var _c;
|
|
638
|
+
return __generator(this, function (_d) {
|
|
639
|
+
switch (_d.label) {
|
|
704
640
|
case 0:
|
|
705
641
|
_a = [__assign({}, output)];
|
|
706
|
-
|
|
642
|
+
_c = {};
|
|
707
643
|
return [4, parseBody(output.body, context)];
|
|
708
644
|
case 1:
|
|
709
|
-
parsedOutput = __assign.apply(void 0, _a.concat([(
|
|
645
|
+
parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
|
|
710
646
|
errorCode = "UnknownError";
|
|
711
647
|
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
712
648
|
_b = errorCode;
|
|
@@ -721,40 +657,22 @@ var deserializeAws_restJson1TagResourceCommandError = function (output, context)
|
|
|
721
657
|
case "com.amazonaws.rbin#ValidationException": return [3, 8];
|
|
722
658
|
}
|
|
723
659
|
return [3, 10];
|
|
724
|
-
case 2:
|
|
725
|
-
|
|
726
|
-
|
|
727
|
-
case
|
|
728
|
-
|
|
729
|
-
|
|
730
|
-
case 4
|
|
731
|
-
|
|
732
|
-
return [4, deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context)];
|
|
733
|
-
case 5:
|
|
734
|
-
response = __assign.apply(void 0, [__assign.apply(void 0, _d.concat([(_h.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
|
|
735
|
-
return [3, 11];
|
|
736
|
-
case 6:
|
|
737
|
-
_e = [{}];
|
|
738
|
-
return [4, deserializeAws_restJson1ServiceQuotaExceededExceptionResponse(parsedOutput, context)];
|
|
739
|
-
case 7:
|
|
740
|
-
response = __assign.apply(void 0, [__assign.apply(void 0, _e.concat([(_h.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
|
|
741
|
-
return [3, 11];
|
|
742
|
-
case 8:
|
|
743
|
-
_f = [{}];
|
|
744
|
-
return [4, deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context)];
|
|
745
|
-
case 9:
|
|
746
|
-
response = __assign.apply(void 0, [__assign.apply(void 0, _f.concat([(_h.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
|
|
747
|
-
return [3, 11];
|
|
660
|
+
case 2: return [4, deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context)];
|
|
661
|
+
case 3: throw _d.sent();
|
|
662
|
+
case 4: return [4, deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context)];
|
|
663
|
+
case 5: throw _d.sent();
|
|
664
|
+
case 6: return [4, deserializeAws_restJson1ServiceQuotaExceededExceptionResponse(parsedOutput, context)];
|
|
665
|
+
case 7: throw _d.sent();
|
|
666
|
+
case 8: return [4, deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context)];
|
|
667
|
+
case 9: throw _d.sent();
|
|
748
668
|
case 10:
|
|
749
669
|
parsedBody = parsedOutput.body;
|
|
750
|
-
|
|
751
|
-
|
|
752
|
-
|
|
753
|
-
|
|
754
|
-
|
|
755
|
-
response
|
|
756
|
-
delete response.Message;
|
|
757
|
-
return [2, Promise.reject(Object.assign(new Error(message), response))];
|
|
670
|
+
response = new __BaseException({
|
|
671
|
+
name: parsedBody.code || parsedBody.Code || errorCode,
|
|
672
|
+
$fault: "client",
|
|
673
|
+
$metadata: deserializeMetadata(output),
|
|
674
|
+
});
|
|
675
|
+
throw __decorateServiceException(response, parsedBody);
|
|
758
676
|
}
|
|
759
677
|
});
|
|
760
678
|
}); };
|
|
@@ -777,16 +695,16 @@ export var deserializeAws_restJson1UntagResourceCommand = function (output, cont
|
|
|
777
695
|
});
|
|
778
696
|
}); };
|
|
779
697
|
var deserializeAws_restJson1UntagResourceCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
780
|
-
var parsedOutput, _a, response, errorCode, _b,
|
|
781
|
-
var
|
|
782
|
-
return __generator(this, function (
|
|
783
|
-
switch (
|
|
698
|
+
var parsedOutput, _a, response, errorCode, _b, parsedBody;
|
|
699
|
+
var _c;
|
|
700
|
+
return __generator(this, function (_d) {
|
|
701
|
+
switch (_d.label) {
|
|
784
702
|
case 0:
|
|
785
703
|
_a = [__assign({}, output)];
|
|
786
|
-
|
|
704
|
+
_c = {};
|
|
787
705
|
return [4, parseBody(output.body, context)];
|
|
788
706
|
case 1:
|
|
789
|
-
parsedOutput = __assign.apply(void 0, _a.concat([(
|
|
707
|
+
parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
|
|
790
708
|
errorCode = "UnknownError";
|
|
791
709
|
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
792
710
|
_b = errorCode;
|
|
@@ -799,34 +717,20 @@ var deserializeAws_restJson1UntagResourceCommandError = function (output, contex
|
|
|
799
717
|
case "com.amazonaws.rbin#ValidationException": return [3, 6];
|
|
800
718
|
}
|
|
801
719
|
return [3, 8];
|
|
802
|
-
case 2:
|
|
803
|
-
|
|
804
|
-
|
|
805
|
-
case
|
|
806
|
-
|
|
807
|
-
|
|
808
|
-
case 4:
|
|
809
|
-
_d = [{}];
|
|
810
|
-
return [4, deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context)];
|
|
811
|
-
case 5:
|
|
812
|
-
response = __assign.apply(void 0, [__assign.apply(void 0, _d.concat([(_g.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
|
|
813
|
-
return [3, 9];
|
|
814
|
-
case 6:
|
|
815
|
-
_e = [{}];
|
|
816
|
-
return [4, deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context)];
|
|
817
|
-
case 7:
|
|
818
|
-
response = __assign.apply(void 0, [__assign.apply(void 0, _e.concat([(_g.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
|
|
819
|
-
return [3, 9];
|
|
720
|
+
case 2: return [4, deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context)];
|
|
721
|
+
case 3: throw _d.sent();
|
|
722
|
+
case 4: return [4, deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context)];
|
|
723
|
+
case 5: throw _d.sent();
|
|
724
|
+
case 6: return [4, deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context)];
|
|
725
|
+
case 7: throw _d.sent();
|
|
820
726
|
case 8:
|
|
821
727
|
parsedBody = parsedOutput.body;
|
|
822
|
-
|
|
823
|
-
|
|
824
|
-
|
|
825
|
-
|
|
826
|
-
|
|
827
|
-
response
|
|
828
|
-
delete response.Message;
|
|
829
|
-
return [2, Promise.reject(Object.assign(new Error(message), response))];
|
|
728
|
+
response = new __BaseException({
|
|
729
|
+
name: parsedBody.code || parsedBody.Code || errorCode,
|
|
730
|
+
$fault: "client",
|
|
731
|
+
$metadata: deserializeMetadata(output),
|
|
732
|
+
});
|
|
733
|
+
throw __decorateServiceException(response, parsedBody);
|
|
830
734
|
}
|
|
831
735
|
});
|
|
832
736
|
}); };
|
|
@@ -875,16 +779,16 @@ export var deserializeAws_restJson1UpdateRuleCommand = function (output, context
|
|
|
875
779
|
});
|
|
876
780
|
}); };
|
|
877
781
|
var deserializeAws_restJson1UpdateRuleCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
878
|
-
var parsedOutput, _a, response, errorCode, _b,
|
|
879
|
-
var
|
|
880
|
-
return __generator(this, function (
|
|
881
|
-
switch (
|
|
782
|
+
var parsedOutput, _a, response, errorCode, _b, parsedBody;
|
|
783
|
+
var _c;
|
|
784
|
+
return __generator(this, function (_d) {
|
|
785
|
+
switch (_d.label) {
|
|
882
786
|
case 0:
|
|
883
787
|
_a = [__assign({}, output)];
|
|
884
|
-
|
|
788
|
+
_c = {};
|
|
885
789
|
return [4, parseBody(output.body, context)];
|
|
886
790
|
case 1:
|
|
887
|
-
parsedOutput = __assign.apply(void 0, _a.concat([(
|
|
791
|
+
parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
|
|
888
792
|
errorCode = "UnknownError";
|
|
889
793
|
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
890
794
|
_b = errorCode;
|
|
@@ -897,63 +801,39 @@ var deserializeAws_restJson1UpdateRuleCommandError = function (output, context)
|
|
|
897
801
|
case "com.amazonaws.rbin#ValidationException": return [3, 6];
|
|
898
802
|
}
|
|
899
803
|
return [3, 8];
|
|
900
|
-
case 2:
|
|
901
|
-
|
|
902
|
-
|
|
903
|
-
case
|
|
904
|
-
|
|
905
|
-
|
|
906
|
-
case 4:
|
|
907
|
-
_d = [{}];
|
|
908
|
-
return [4, deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context)];
|
|
909
|
-
case 5:
|
|
910
|
-
response = __assign.apply(void 0, [__assign.apply(void 0, _d.concat([(_g.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
|
|
911
|
-
return [3, 9];
|
|
912
|
-
case 6:
|
|
913
|
-
_e = [{}];
|
|
914
|
-
return [4, deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context)];
|
|
915
|
-
case 7:
|
|
916
|
-
response = __assign.apply(void 0, [__assign.apply(void 0, _e.concat([(_g.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
|
|
917
|
-
return [3, 9];
|
|
804
|
+
case 2: return [4, deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context)];
|
|
805
|
+
case 3: throw _d.sent();
|
|
806
|
+
case 4: return [4, deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context)];
|
|
807
|
+
case 5: throw _d.sent();
|
|
808
|
+
case 6: return [4, deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context)];
|
|
809
|
+
case 7: throw _d.sent();
|
|
918
810
|
case 8:
|
|
919
811
|
parsedBody = parsedOutput.body;
|
|
920
|
-
|
|
921
|
-
|
|
922
|
-
|
|
923
|
-
|
|
924
|
-
|
|
925
|
-
response
|
|
926
|
-
delete response.Message;
|
|
927
|
-
return [2, Promise.reject(Object.assign(new Error(message), response))];
|
|
812
|
+
response = new __BaseException({
|
|
813
|
+
name: parsedBody.code || parsedBody.Code || errorCode,
|
|
814
|
+
$fault: "client",
|
|
815
|
+
$metadata: deserializeMetadata(output),
|
|
816
|
+
});
|
|
817
|
+
throw __decorateServiceException(response, parsedBody);
|
|
928
818
|
}
|
|
929
819
|
});
|
|
930
820
|
}); };
|
|
931
821
|
var deserializeAws_restJson1InternalServerExceptionResponse = function (parsedOutput, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
932
|
-
var contents, data;
|
|
822
|
+
var contents, data, exception;
|
|
933
823
|
return __generator(this, function (_a) {
|
|
934
|
-
contents = {
|
|
935
|
-
name: "InternalServerException",
|
|
936
|
-
$fault: "server",
|
|
937
|
-
$metadata: deserializeMetadata(parsedOutput),
|
|
938
|
-
Message: undefined,
|
|
939
|
-
};
|
|
824
|
+
contents = {};
|
|
940
825
|
data = parsedOutput.body;
|
|
941
826
|
if (data.Message !== undefined && data.Message !== null) {
|
|
942
827
|
contents.Message = __expectString(data.Message);
|
|
943
828
|
}
|
|
944
|
-
|
|
829
|
+
exception = new InternalServerException(__assign({ $metadata: deserializeMetadata(parsedOutput) }, contents));
|
|
830
|
+
return [2, __decorateServiceException(exception, parsedOutput.body)];
|
|
945
831
|
});
|
|
946
832
|
}); };
|
|
947
833
|
var deserializeAws_restJson1ResourceNotFoundExceptionResponse = function (parsedOutput, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
948
|
-
var contents, data;
|
|
834
|
+
var contents, data, exception;
|
|
949
835
|
return __generator(this, function (_a) {
|
|
950
|
-
contents = {
|
|
951
|
-
name: "ResourceNotFoundException",
|
|
952
|
-
$fault: "client",
|
|
953
|
-
$metadata: deserializeMetadata(parsedOutput),
|
|
954
|
-
Message: undefined,
|
|
955
|
-
Reason: undefined,
|
|
956
|
-
};
|
|
836
|
+
contents = {};
|
|
957
837
|
data = parsedOutput.body;
|
|
958
838
|
if (data.Message !== undefined && data.Message !== null) {
|
|
959
839
|
contents.Message = __expectString(data.Message);
|
|
@@ -961,19 +841,14 @@ var deserializeAws_restJson1ResourceNotFoundExceptionResponse = function (parsed
|
|
|
961
841
|
if (data.Reason !== undefined && data.Reason !== null) {
|
|
962
842
|
contents.Reason = __expectString(data.Reason);
|
|
963
843
|
}
|
|
964
|
-
|
|
844
|
+
exception = new ResourceNotFoundException(__assign({ $metadata: deserializeMetadata(parsedOutput) }, contents));
|
|
845
|
+
return [2, __decorateServiceException(exception, parsedOutput.body)];
|
|
965
846
|
});
|
|
966
847
|
}); };
|
|
967
848
|
var deserializeAws_restJson1ServiceQuotaExceededExceptionResponse = function (parsedOutput, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
968
|
-
var contents, data;
|
|
849
|
+
var contents, data, exception;
|
|
969
850
|
return __generator(this, function (_a) {
|
|
970
|
-
contents = {
|
|
971
|
-
name: "ServiceQuotaExceededException",
|
|
972
|
-
$fault: "client",
|
|
973
|
-
$metadata: deserializeMetadata(parsedOutput),
|
|
974
|
-
Message: undefined,
|
|
975
|
-
Reason: undefined,
|
|
976
|
-
};
|
|
851
|
+
contents = {};
|
|
977
852
|
data = parsedOutput.body;
|
|
978
853
|
if (data.Message !== undefined && data.Message !== null) {
|
|
979
854
|
contents.Message = __expectString(data.Message);
|
|
@@ -981,19 +856,14 @@ var deserializeAws_restJson1ServiceQuotaExceededExceptionResponse = function (pa
|
|
|
981
856
|
if (data.Reason !== undefined && data.Reason !== null) {
|
|
982
857
|
contents.Reason = __expectString(data.Reason);
|
|
983
858
|
}
|
|
984
|
-
|
|
859
|
+
exception = new ServiceQuotaExceededException(__assign({ $metadata: deserializeMetadata(parsedOutput) }, contents));
|
|
860
|
+
return [2, __decorateServiceException(exception, parsedOutput.body)];
|
|
985
861
|
});
|
|
986
862
|
}); };
|
|
987
863
|
var deserializeAws_restJson1ValidationExceptionResponse = function (parsedOutput, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
988
|
-
var contents, data;
|
|
864
|
+
var contents, data, exception;
|
|
989
865
|
return __generator(this, function (_a) {
|
|
990
|
-
contents = {
|
|
991
|
-
name: "ValidationException",
|
|
992
|
-
$fault: "client",
|
|
993
|
-
$metadata: deserializeMetadata(parsedOutput),
|
|
994
|
-
Message: undefined,
|
|
995
|
-
Reason: undefined,
|
|
996
|
-
};
|
|
866
|
+
contents = {};
|
|
997
867
|
data = parsedOutput.body;
|
|
998
868
|
if (data.Message !== undefined && data.Message !== null) {
|
|
999
869
|
contents.Message = __expectString(data.Message);
|
|
@@ -1001,7 +871,8 @@ var deserializeAws_restJson1ValidationExceptionResponse = function (parsedOutput
|
|
|
1001
871
|
if (data.Reason !== undefined && data.Reason !== null) {
|
|
1002
872
|
contents.Reason = __expectString(data.Reason);
|
|
1003
873
|
}
|
|
1004
|
-
|
|
874
|
+
exception = new ValidationException(__assign({ $metadata: deserializeMetadata(parsedOutput) }, contents));
|
|
875
|
+
return [2, __decorateServiceException(exception, parsedOutput.body)];
|
|
1005
876
|
});
|
|
1006
877
|
}); };
|
|
1007
878
|
var serializeAws_restJson1ResourceTag = function (input, context) {
|
|
@@ -1044,7 +915,7 @@ var deserializeAws_restJson1ResourceTag = function (output, context) {
|
|
|
1044
915
|
};
|
|
1045
916
|
};
|
|
1046
917
|
var deserializeAws_restJson1ResourceTags = function (output, context) {
|
|
1047
|
-
|
|
918
|
+
var retVal = (output || [])
|
|
1048
919
|
.filter(function (e) { return e != null; })
|
|
1049
920
|
.map(function (entry) {
|
|
1050
921
|
if (entry === null) {
|
|
@@ -1052,6 +923,7 @@ var deserializeAws_restJson1ResourceTags = function (output, context) {
|
|
|
1052
923
|
}
|
|
1053
924
|
return deserializeAws_restJson1ResourceTag(entry, context);
|
|
1054
925
|
});
|
|
926
|
+
return retVal;
|
|
1055
927
|
};
|
|
1056
928
|
var deserializeAws_restJson1RetentionPeriod = function (output, context) {
|
|
1057
929
|
return {
|
|
@@ -1069,7 +941,7 @@ var deserializeAws_restJson1RuleSummary = function (output, context) {
|
|
|
1069
941
|
};
|
|
1070
942
|
};
|
|
1071
943
|
var deserializeAws_restJson1RuleSummaryList = function (output, context) {
|
|
1072
|
-
|
|
944
|
+
var retVal = (output || [])
|
|
1073
945
|
.filter(function (e) { return e != null; })
|
|
1074
946
|
.map(function (entry) {
|
|
1075
947
|
if (entry === null) {
|
|
@@ -1077,6 +949,7 @@ var deserializeAws_restJson1RuleSummaryList = function (output, context) {
|
|
|
1077
949
|
}
|
|
1078
950
|
return deserializeAws_restJson1RuleSummary(entry, context);
|
|
1079
951
|
});
|
|
952
|
+
return retVal;
|
|
1080
953
|
};
|
|
1081
954
|
var deserializeAws_restJson1Tag = function (output, context) {
|
|
1082
955
|
return {
|
|
@@ -1085,7 +958,7 @@ var deserializeAws_restJson1Tag = function (output, context) {
|
|
|
1085
958
|
};
|
|
1086
959
|
};
|
|
1087
960
|
var deserializeAws_restJson1TagList = function (output, context) {
|
|
1088
|
-
|
|
961
|
+
var retVal = (output || [])
|
|
1089
962
|
.filter(function (e) { return e != null; })
|
|
1090
963
|
.map(function (entry) {
|
|
1091
964
|
if (entry === null) {
|
|
@@ -1093,6 +966,7 @@ var deserializeAws_restJson1TagList = function (output, context) {
|
|
|
1093
966
|
}
|
|
1094
967
|
return deserializeAws_restJson1Tag(entry, context);
|
|
1095
968
|
});
|
|
969
|
+
return retVal;
|
|
1096
970
|
};
|
|
1097
971
|
var deserializeMetadata = function (output) {
|
|
1098
972
|
var _a;
|