@aws-sdk/client-iot-events-data 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/IoTEventsDataServiceException.js +11 -0
- package/dist-cjs/models/models_0.js +68 -2
- package/dist-cjs/protocols/Aws_restJson1.js +138 -440
- package/dist-es/index.js +1 -0
- package/dist-es/models/IoTEventsDataServiceException.js +12 -0
- package/dist-es/models/models_0.js +62 -1
- package/dist-es/protocols/Aws_restJson1.js +265 -490
- package/dist-types/index.d.ts +1 -0
- package/dist-types/models/IoTEventsDataServiceException.d.ts +10 -0
- package/dist-types/models/models_0.d.ts +27 -26
- package/dist-types/ts3.4/index.d.ts +1 -0
- package/dist-types/ts3.4/models/IoTEventsDataServiceException.d.ts +6 -0
- package/dist-types/ts3.4/models/models_0.d.ts +22 -21
- 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, expectNumber as __expectNumber, expectObject as __expectObject, expectString as __expectString, extendedEncodeURIComponent as __extendedEncodeURIComponent, parseEpochTimestamp as __parseEpochTimestamp, } 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, } from "@aws-sdk/smithy-client";
|
|
4
|
+
import { IoTEventsDataServiceException as __BaseException } from "../models/IoTEventsDataServiceException";
|
|
5
|
+
import { InternalFailureException, InvalidRequestException, ResourceNotFoundException, ServiceUnavailableException, ThrottlingException, } from "../models/models_0";
|
|
4
6
|
export var serializeAws_restJson1BatchAcknowledgeAlarmCommand = 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) {
|
|
@@ -345,16 +347,16 @@ export var deserializeAws_restJson1BatchAcknowledgeAlarmCommand = function (outp
|
|
|
345
347
|
});
|
|
346
348
|
}); };
|
|
347
349
|
var deserializeAws_restJson1BatchAcknowledgeAlarmCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
348
|
-
var parsedOutput, _a, response, errorCode, _b,
|
|
349
|
-
var
|
|
350
|
-
return __generator(this, function (
|
|
351
|
-
switch (
|
|
350
|
+
var parsedOutput, _a, response, errorCode, _b, parsedBody;
|
|
351
|
+
var _c;
|
|
352
|
+
return __generator(this, function (_d) {
|
|
353
|
+
switch (_d.label) {
|
|
352
354
|
case 0:
|
|
353
355
|
_a = [__assign({}, output)];
|
|
354
|
-
|
|
356
|
+
_c = {};
|
|
355
357
|
return [4, parseBody(output.body, context)];
|
|
356
358
|
case 1:
|
|
357
|
-
parsedOutput = __assign.apply(void 0, _a.concat([(
|
|
359
|
+
parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
|
|
358
360
|
errorCode = "UnknownError";
|
|
359
361
|
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
360
362
|
_b = errorCode;
|
|
@@ -369,40 +371,22 @@ var deserializeAws_restJson1BatchAcknowledgeAlarmCommandError = function (output
|
|
|
369
371
|
case "com.amazonaws.ioteventsdata#ThrottlingException": return [3, 8];
|
|
370
372
|
}
|
|
371
373
|
return [3, 10];
|
|
372
|
-
case 2:
|
|
373
|
-
|
|
374
|
-
|
|
375
|
-
case
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
case 4
|
|
379
|
-
|
|
380
|
-
return [4, deserializeAws_restJson1InvalidRequestExceptionResponse(parsedOutput, context)];
|
|
381
|
-
case 5:
|
|
382
|
-
response = __assign.apply(void 0, [__assign.apply(void 0, _d.concat([(_h.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
|
|
383
|
-
return [3, 11];
|
|
384
|
-
case 6:
|
|
385
|
-
_e = [{}];
|
|
386
|
-
return [4, deserializeAws_restJson1ServiceUnavailableExceptionResponse(parsedOutput, context)];
|
|
387
|
-
case 7:
|
|
388
|
-
response = __assign.apply(void 0, [__assign.apply(void 0, _e.concat([(_h.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
|
|
389
|
-
return [3, 11];
|
|
390
|
-
case 8:
|
|
391
|
-
_f = [{}];
|
|
392
|
-
return [4, deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context)];
|
|
393
|
-
case 9:
|
|
394
|
-
response = __assign.apply(void 0, [__assign.apply(void 0, _f.concat([(_h.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
|
|
395
|
-
return [3, 11];
|
|
374
|
+
case 2: return [4, deserializeAws_restJson1InternalFailureExceptionResponse(parsedOutput, context)];
|
|
375
|
+
case 3: throw _d.sent();
|
|
376
|
+
case 4: return [4, deserializeAws_restJson1InvalidRequestExceptionResponse(parsedOutput, context)];
|
|
377
|
+
case 5: throw _d.sent();
|
|
378
|
+
case 6: return [4, deserializeAws_restJson1ServiceUnavailableExceptionResponse(parsedOutput, context)];
|
|
379
|
+
case 7: throw _d.sent();
|
|
380
|
+
case 8: return [4, deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context)];
|
|
381
|
+
case 9: throw _d.sent();
|
|
396
382
|
case 10:
|
|
397
383
|
parsedBody = parsedOutput.body;
|
|
398
|
-
|
|
399
|
-
|
|
400
|
-
|
|
401
|
-
|
|
402
|
-
|
|
403
|
-
response
|
|
404
|
-
delete response.Message;
|
|
405
|
-
return [2, Promise.reject(Object.assign(new Error(message), response))];
|
|
384
|
+
response = new __BaseException({
|
|
385
|
+
name: parsedBody.code || parsedBody.Code || errorCode,
|
|
386
|
+
$fault: "client",
|
|
387
|
+
$metadata: deserializeMetadata(output),
|
|
388
|
+
});
|
|
389
|
+
throw __decorateServiceException(response, parsedBody);
|
|
406
390
|
}
|
|
407
391
|
});
|
|
408
392
|
}); };
|
|
@@ -431,16 +415,16 @@ export var deserializeAws_restJson1BatchDisableAlarmCommand = function (output,
|
|
|
431
415
|
});
|
|
432
416
|
}); };
|
|
433
417
|
var deserializeAws_restJson1BatchDisableAlarmCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
434
|
-
var parsedOutput, _a, response, errorCode, _b,
|
|
435
|
-
var
|
|
436
|
-
return __generator(this, function (
|
|
437
|
-
switch (
|
|
418
|
+
var parsedOutput, _a, response, errorCode, _b, parsedBody;
|
|
419
|
+
var _c;
|
|
420
|
+
return __generator(this, function (_d) {
|
|
421
|
+
switch (_d.label) {
|
|
438
422
|
case 0:
|
|
439
423
|
_a = [__assign({}, output)];
|
|
440
|
-
|
|
424
|
+
_c = {};
|
|
441
425
|
return [4, parseBody(output.body, context)];
|
|
442
426
|
case 1:
|
|
443
|
-
parsedOutput = __assign.apply(void 0, _a.concat([(
|
|
427
|
+
parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
|
|
444
428
|
errorCode = "UnknownError";
|
|
445
429
|
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
446
430
|
_b = errorCode;
|
|
@@ -455,40 +439,22 @@ var deserializeAws_restJson1BatchDisableAlarmCommandError = function (output, co
|
|
|
455
439
|
case "com.amazonaws.ioteventsdata#ThrottlingException": return [3, 8];
|
|
456
440
|
}
|
|
457
441
|
return [3, 10];
|
|
458
|
-
case 2:
|
|
459
|
-
|
|
460
|
-
|
|
461
|
-
case
|
|
462
|
-
|
|
463
|
-
|
|
464
|
-
case 4
|
|
465
|
-
|
|
466
|
-
return [4, deserializeAws_restJson1InvalidRequestExceptionResponse(parsedOutput, context)];
|
|
467
|
-
case 5:
|
|
468
|
-
response = __assign.apply(void 0, [__assign.apply(void 0, _d.concat([(_h.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
|
|
469
|
-
return [3, 11];
|
|
470
|
-
case 6:
|
|
471
|
-
_e = [{}];
|
|
472
|
-
return [4, deserializeAws_restJson1ServiceUnavailableExceptionResponse(parsedOutput, context)];
|
|
473
|
-
case 7:
|
|
474
|
-
response = __assign.apply(void 0, [__assign.apply(void 0, _e.concat([(_h.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
|
|
475
|
-
return [3, 11];
|
|
476
|
-
case 8:
|
|
477
|
-
_f = [{}];
|
|
478
|
-
return [4, deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context)];
|
|
479
|
-
case 9:
|
|
480
|
-
response = __assign.apply(void 0, [__assign.apply(void 0, _f.concat([(_h.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
|
|
481
|
-
return [3, 11];
|
|
442
|
+
case 2: return [4, deserializeAws_restJson1InternalFailureExceptionResponse(parsedOutput, context)];
|
|
443
|
+
case 3: throw _d.sent();
|
|
444
|
+
case 4: return [4, deserializeAws_restJson1InvalidRequestExceptionResponse(parsedOutput, context)];
|
|
445
|
+
case 5: throw _d.sent();
|
|
446
|
+
case 6: return [4, deserializeAws_restJson1ServiceUnavailableExceptionResponse(parsedOutput, context)];
|
|
447
|
+
case 7: throw _d.sent();
|
|
448
|
+
case 8: return [4, deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context)];
|
|
449
|
+
case 9: throw _d.sent();
|
|
482
450
|
case 10:
|
|
483
451
|
parsedBody = parsedOutput.body;
|
|
484
|
-
|
|
485
|
-
|
|
486
|
-
|
|
487
|
-
|
|
488
|
-
|
|
489
|
-
response
|
|
490
|
-
delete response.Message;
|
|
491
|
-
return [2, Promise.reject(Object.assign(new Error(message), response))];
|
|
452
|
+
response = new __BaseException({
|
|
453
|
+
name: parsedBody.code || parsedBody.Code || errorCode,
|
|
454
|
+
$fault: "client",
|
|
455
|
+
$metadata: deserializeMetadata(output),
|
|
456
|
+
});
|
|
457
|
+
throw __decorateServiceException(response, parsedBody);
|
|
492
458
|
}
|
|
493
459
|
});
|
|
494
460
|
}); };
|
|
@@ -517,16 +483,16 @@ export var deserializeAws_restJson1BatchEnableAlarmCommand = function (output, c
|
|
|
517
483
|
});
|
|
518
484
|
}); };
|
|
519
485
|
var deserializeAws_restJson1BatchEnableAlarmCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
520
|
-
var parsedOutput, _a, response, errorCode, _b,
|
|
521
|
-
var
|
|
522
|
-
return __generator(this, function (
|
|
523
|
-
switch (
|
|
486
|
+
var parsedOutput, _a, response, errorCode, _b, parsedBody;
|
|
487
|
+
var _c;
|
|
488
|
+
return __generator(this, function (_d) {
|
|
489
|
+
switch (_d.label) {
|
|
524
490
|
case 0:
|
|
525
491
|
_a = [__assign({}, output)];
|
|
526
|
-
|
|
492
|
+
_c = {};
|
|
527
493
|
return [4, parseBody(output.body, context)];
|
|
528
494
|
case 1:
|
|
529
|
-
parsedOutput = __assign.apply(void 0, _a.concat([(
|
|
495
|
+
parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
|
|
530
496
|
errorCode = "UnknownError";
|
|
531
497
|
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
532
498
|
_b = errorCode;
|
|
@@ -541,40 +507,22 @@ var deserializeAws_restJson1BatchEnableAlarmCommandError = function (output, con
|
|
|
541
507
|
case "com.amazonaws.ioteventsdata#ThrottlingException": return [3, 8];
|
|
542
508
|
}
|
|
543
509
|
return [3, 10];
|
|
544
|
-
case 2:
|
|
545
|
-
|
|
546
|
-
|
|
547
|
-
case
|
|
548
|
-
|
|
549
|
-
|
|
550
|
-
case 4
|
|
551
|
-
|
|
552
|
-
return [4, deserializeAws_restJson1InvalidRequestExceptionResponse(parsedOutput, context)];
|
|
553
|
-
case 5:
|
|
554
|
-
response = __assign.apply(void 0, [__assign.apply(void 0, _d.concat([(_h.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
|
|
555
|
-
return [3, 11];
|
|
556
|
-
case 6:
|
|
557
|
-
_e = [{}];
|
|
558
|
-
return [4, deserializeAws_restJson1ServiceUnavailableExceptionResponse(parsedOutput, context)];
|
|
559
|
-
case 7:
|
|
560
|
-
response = __assign.apply(void 0, [__assign.apply(void 0, _e.concat([(_h.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
|
|
561
|
-
return [3, 11];
|
|
562
|
-
case 8:
|
|
563
|
-
_f = [{}];
|
|
564
|
-
return [4, deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context)];
|
|
565
|
-
case 9:
|
|
566
|
-
response = __assign.apply(void 0, [__assign.apply(void 0, _f.concat([(_h.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
|
|
567
|
-
return [3, 11];
|
|
510
|
+
case 2: return [4, deserializeAws_restJson1InternalFailureExceptionResponse(parsedOutput, context)];
|
|
511
|
+
case 3: throw _d.sent();
|
|
512
|
+
case 4: return [4, deserializeAws_restJson1InvalidRequestExceptionResponse(parsedOutput, context)];
|
|
513
|
+
case 5: throw _d.sent();
|
|
514
|
+
case 6: return [4, deserializeAws_restJson1ServiceUnavailableExceptionResponse(parsedOutput, context)];
|
|
515
|
+
case 7: throw _d.sent();
|
|
516
|
+
case 8: return [4, deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context)];
|
|
517
|
+
case 9: throw _d.sent();
|
|
568
518
|
case 10:
|
|
569
519
|
parsedBody = parsedOutput.body;
|
|
570
|
-
|
|
571
|
-
|
|
572
|
-
|
|
573
|
-
|
|
574
|
-
|
|
575
|
-
response
|
|
576
|
-
delete response.Message;
|
|
577
|
-
return [2, Promise.reject(Object.assign(new Error(message), response))];
|
|
520
|
+
response = new __BaseException({
|
|
521
|
+
name: parsedBody.code || parsedBody.Code || errorCode,
|
|
522
|
+
$fault: "client",
|
|
523
|
+
$metadata: deserializeMetadata(output),
|
|
524
|
+
});
|
|
525
|
+
throw __decorateServiceException(response, parsedBody);
|
|
578
526
|
}
|
|
579
527
|
});
|
|
580
528
|
}); };
|
|
@@ -603,16 +551,16 @@ export var deserializeAws_restJson1BatchPutMessageCommand = function (output, co
|
|
|
603
551
|
});
|
|
604
552
|
}); };
|
|
605
553
|
var deserializeAws_restJson1BatchPutMessageCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
606
|
-
var parsedOutput, _a, response, errorCode, _b,
|
|
607
|
-
var
|
|
608
|
-
return __generator(this, function (
|
|
609
|
-
switch (
|
|
554
|
+
var parsedOutput, _a, response, errorCode, _b, parsedBody;
|
|
555
|
+
var _c;
|
|
556
|
+
return __generator(this, function (_d) {
|
|
557
|
+
switch (_d.label) {
|
|
610
558
|
case 0:
|
|
611
559
|
_a = [__assign({}, output)];
|
|
612
|
-
|
|
560
|
+
_c = {};
|
|
613
561
|
return [4, parseBody(output.body, context)];
|
|
614
562
|
case 1:
|
|
615
|
-
parsedOutput = __assign.apply(void 0, _a.concat([(
|
|
563
|
+
parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
|
|
616
564
|
errorCode = "UnknownError";
|
|
617
565
|
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
618
566
|
_b = errorCode;
|
|
@@ -627,40 +575,22 @@ var deserializeAws_restJson1BatchPutMessageCommandError = function (output, cont
|
|
|
627
575
|
case "com.amazonaws.ioteventsdata#ThrottlingException": return [3, 8];
|
|
628
576
|
}
|
|
629
577
|
return [3, 10];
|
|
630
|
-
case 2:
|
|
631
|
-
|
|
632
|
-
|
|
633
|
-
case
|
|
634
|
-
|
|
635
|
-
|
|
636
|
-
case 4
|
|
637
|
-
|
|
638
|
-
return [4, deserializeAws_restJson1InvalidRequestExceptionResponse(parsedOutput, context)];
|
|
639
|
-
case 5:
|
|
640
|
-
response = __assign.apply(void 0, [__assign.apply(void 0, _d.concat([(_h.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
|
|
641
|
-
return [3, 11];
|
|
642
|
-
case 6:
|
|
643
|
-
_e = [{}];
|
|
644
|
-
return [4, deserializeAws_restJson1ServiceUnavailableExceptionResponse(parsedOutput, context)];
|
|
645
|
-
case 7:
|
|
646
|
-
response = __assign.apply(void 0, [__assign.apply(void 0, _e.concat([(_h.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
|
|
647
|
-
return [3, 11];
|
|
648
|
-
case 8:
|
|
649
|
-
_f = [{}];
|
|
650
|
-
return [4, deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context)];
|
|
651
|
-
case 9:
|
|
652
|
-
response = __assign.apply(void 0, [__assign.apply(void 0, _f.concat([(_h.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
|
|
653
|
-
return [3, 11];
|
|
578
|
+
case 2: return [4, deserializeAws_restJson1InternalFailureExceptionResponse(parsedOutput, context)];
|
|
579
|
+
case 3: throw _d.sent();
|
|
580
|
+
case 4: return [4, deserializeAws_restJson1InvalidRequestExceptionResponse(parsedOutput, context)];
|
|
581
|
+
case 5: throw _d.sent();
|
|
582
|
+
case 6: return [4, deserializeAws_restJson1ServiceUnavailableExceptionResponse(parsedOutput, context)];
|
|
583
|
+
case 7: throw _d.sent();
|
|
584
|
+
case 8: return [4, deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context)];
|
|
585
|
+
case 9: throw _d.sent();
|
|
654
586
|
case 10:
|
|
655
587
|
parsedBody = parsedOutput.body;
|
|
656
|
-
|
|
657
|
-
|
|
658
|
-
|
|
659
|
-
|
|
660
|
-
|
|
661
|
-
response
|
|
662
|
-
delete response.Message;
|
|
663
|
-
return [2, Promise.reject(Object.assign(new Error(message), response))];
|
|
588
|
+
response = new __BaseException({
|
|
589
|
+
name: parsedBody.code || parsedBody.Code || errorCode,
|
|
590
|
+
$fault: "client",
|
|
591
|
+
$metadata: deserializeMetadata(output),
|
|
592
|
+
});
|
|
593
|
+
throw __decorateServiceException(response, parsedBody);
|
|
664
594
|
}
|
|
665
595
|
});
|
|
666
596
|
}); };
|
|
@@ -689,16 +619,16 @@ export var deserializeAws_restJson1BatchResetAlarmCommand = function (output, co
|
|
|
689
619
|
});
|
|
690
620
|
}); };
|
|
691
621
|
var deserializeAws_restJson1BatchResetAlarmCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
692
|
-
var parsedOutput, _a, response, errorCode, _b,
|
|
693
|
-
var
|
|
694
|
-
return __generator(this, function (
|
|
695
|
-
switch (
|
|
622
|
+
var parsedOutput, _a, response, errorCode, _b, parsedBody;
|
|
623
|
+
var _c;
|
|
624
|
+
return __generator(this, function (_d) {
|
|
625
|
+
switch (_d.label) {
|
|
696
626
|
case 0:
|
|
697
627
|
_a = [__assign({}, output)];
|
|
698
|
-
|
|
628
|
+
_c = {};
|
|
699
629
|
return [4, parseBody(output.body, context)];
|
|
700
630
|
case 1:
|
|
701
|
-
parsedOutput = __assign.apply(void 0, _a.concat([(
|
|
631
|
+
parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
|
|
702
632
|
errorCode = "UnknownError";
|
|
703
633
|
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
704
634
|
_b = errorCode;
|
|
@@ -713,40 +643,22 @@ var deserializeAws_restJson1BatchResetAlarmCommandError = function (output, cont
|
|
|
713
643
|
case "com.amazonaws.ioteventsdata#ThrottlingException": return [3, 8];
|
|
714
644
|
}
|
|
715
645
|
return [3, 10];
|
|
716
|
-
case 2:
|
|
717
|
-
|
|
718
|
-
|
|
719
|
-
case
|
|
720
|
-
|
|
721
|
-
|
|
722
|
-
case 4
|
|
723
|
-
|
|
724
|
-
return [4, deserializeAws_restJson1InvalidRequestExceptionResponse(parsedOutput, context)];
|
|
725
|
-
case 5:
|
|
726
|
-
response = __assign.apply(void 0, [__assign.apply(void 0, _d.concat([(_h.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
|
|
727
|
-
return [3, 11];
|
|
728
|
-
case 6:
|
|
729
|
-
_e = [{}];
|
|
730
|
-
return [4, deserializeAws_restJson1ServiceUnavailableExceptionResponse(parsedOutput, context)];
|
|
731
|
-
case 7:
|
|
732
|
-
response = __assign.apply(void 0, [__assign.apply(void 0, _e.concat([(_h.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
|
|
733
|
-
return [3, 11];
|
|
734
|
-
case 8:
|
|
735
|
-
_f = [{}];
|
|
736
|
-
return [4, deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context)];
|
|
737
|
-
case 9:
|
|
738
|
-
response = __assign.apply(void 0, [__assign.apply(void 0, _f.concat([(_h.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
|
|
739
|
-
return [3, 11];
|
|
646
|
+
case 2: return [4, deserializeAws_restJson1InternalFailureExceptionResponse(parsedOutput, context)];
|
|
647
|
+
case 3: throw _d.sent();
|
|
648
|
+
case 4: return [4, deserializeAws_restJson1InvalidRequestExceptionResponse(parsedOutput, context)];
|
|
649
|
+
case 5: throw _d.sent();
|
|
650
|
+
case 6: return [4, deserializeAws_restJson1ServiceUnavailableExceptionResponse(parsedOutput, context)];
|
|
651
|
+
case 7: throw _d.sent();
|
|
652
|
+
case 8: return [4, deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context)];
|
|
653
|
+
case 9: throw _d.sent();
|
|
740
654
|
case 10:
|
|
741
655
|
parsedBody = parsedOutput.body;
|
|
742
|
-
|
|
743
|
-
|
|
744
|
-
|
|
745
|
-
|
|
746
|
-
|
|
747
|
-
response
|
|
748
|
-
delete response.Message;
|
|
749
|
-
return [2, Promise.reject(Object.assign(new Error(message), response))];
|
|
656
|
+
response = new __BaseException({
|
|
657
|
+
name: parsedBody.code || parsedBody.Code || errorCode,
|
|
658
|
+
$fault: "client",
|
|
659
|
+
$metadata: deserializeMetadata(output),
|
|
660
|
+
});
|
|
661
|
+
throw __decorateServiceException(response, parsedBody);
|
|
750
662
|
}
|
|
751
663
|
});
|
|
752
664
|
}); };
|
|
@@ -775,16 +687,16 @@ export var deserializeAws_restJson1BatchSnoozeAlarmCommand = function (output, c
|
|
|
775
687
|
});
|
|
776
688
|
}); };
|
|
777
689
|
var deserializeAws_restJson1BatchSnoozeAlarmCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
778
|
-
var parsedOutput, _a, response, errorCode, _b,
|
|
779
|
-
var
|
|
780
|
-
return __generator(this, function (
|
|
781
|
-
switch (
|
|
690
|
+
var parsedOutput, _a, response, errorCode, _b, parsedBody;
|
|
691
|
+
var _c;
|
|
692
|
+
return __generator(this, function (_d) {
|
|
693
|
+
switch (_d.label) {
|
|
782
694
|
case 0:
|
|
783
695
|
_a = [__assign({}, output)];
|
|
784
|
-
|
|
696
|
+
_c = {};
|
|
785
697
|
return [4, parseBody(output.body, context)];
|
|
786
698
|
case 1:
|
|
787
|
-
parsedOutput = __assign.apply(void 0, _a.concat([(
|
|
699
|
+
parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
|
|
788
700
|
errorCode = "UnknownError";
|
|
789
701
|
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
790
702
|
_b = errorCode;
|
|
@@ -799,40 +711,22 @@ var deserializeAws_restJson1BatchSnoozeAlarmCommandError = function (output, con
|
|
|
799
711
|
case "com.amazonaws.ioteventsdata#ThrottlingException": return [3, 8];
|
|
800
712
|
}
|
|
801
713
|
return [3, 10];
|
|
802
|
-
case 2:
|
|
803
|
-
|
|
804
|
-
|
|
805
|
-
case
|
|
806
|
-
|
|
807
|
-
|
|
808
|
-
case 4
|
|
809
|
-
|
|
810
|
-
return [4, deserializeAws_restJson1InvalidRequestExceptionResponse(parsedOutput, context)];
|
|
811
|
-
case 5:
|
|
812
|
-
response = __assign.apply(void 0, [__assign.apply(void 0, _d.concat([(_h.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
|
|
813
|
-
return [3, 11];
|
|
814
|
-
case 6:
|
|
815
|
-
_e = [{}];
|
|
816
|
-
return [4, deserializeAws_restJson1ServiceUnavailableExceptionResponse(parsedOutput, context)];
|
|
817
|
-
case 7:
|
|
818
|
-
response = __assign.apply(void 0, [__assign.apply(void 0, _e.concat([(_h.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
|
|
819
|
-
return [3, 11];
|
|
820
|
-
case 8:
|
|
821
|
-
_f = [{}];
|
|
822
|
-
return [4, deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context)];
|
|
823
|
-
case 9:
|
|
824
|
-
response = __assign.apply(void 0, [__assign.apply(void 0, _f.concat([(_h.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
|
|
825
|
-
return [3, 11];
|
|
714
|
+
case 2: return [4, deserializeAws_restJson1InternalFailureExceptionResponse(parsedOutput, context)];
|
|
715
|
+
case 3: throw _d.sent();
|
|
716
|
+
case 4: return [4, deserializeAws_restJson1InvalidRequestExceptionResponse(parsedOutput, context)];
|
|
717
|
+
case 5: throw _d.sent();
|
|
718
|
+
case 6: return [4, deserializeAws_restJson1ServiceUnavailableExceptionResponse(parsedOutput, context)];
|
|
719
|
+
case 7: throw _d.sent();
|
|
720
|
+
case 8: return [4, deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context)];
|
|
721
|
+
case 9: throw _d.sent();
|
|
826
722
|
case 10:
|
|
827
723
|
parsedBody = parsedOutput.body;
|
|
828
|
-
|
|
829
|
-
|
|
830
|
-
|
|
831
|
-
|
|
832
|
-
|
|
833
|
-
response
|
|
834
|
-
delete response.Message;
|
|
835
|
-
return [2, Promise.reject(Object.assign(new Error(message), response))];
|
|
724
|
+
response = new __BaseException({
|
|
725
|
+
name: parsedBody.code || parsedBody.Code || errorCode,
|
|
726
|
+
$fault: "client",
|
|
727
|
+
$metadata: deserializeMetadata(output),
|
|
728
|
+
});
|
|
729
|
+
throw __decorateServiceException(response, parsedBody);
|
|
836
730
|
}
|
|
837
731
|
});
|
|
838
732
|
}); };
|
|
@@ -861,16 +755,16 @@ export var deserializeAws_restJson1BatchUpdateDetectorCommand = function (output
|
|
|
861
755
|
});
|
|
862
756
|
}); };
|
|
863
757
|
var deserializeAws_restJson1BatchUpdateDetectorCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
864
|
-
var parsedOutput, _a, response, errorCode, _b,
|
|
865
|
-
var
|
|
866
|
-
return __generator(this, function (
|
|
867
|
-
switch (
|
|
758
|
+
var parsedOutput, _a, response, errorCode, _b, parsedBody;
|
|
759
|
+
var _c;
|
|
760
|
+
return __generator(this, function (_d) {
|
|
761
|
+
switch (_d.label) {
|
|
868
762
|
case 0:
|
|
869
763
|
_a = [__assign({}, output)];
|
|
870
|
-
|
|
764
|
+
_c = {};
|
|
871
765
|
return [4, parseBody(output.body, context)];
|
|
872
766
|
case 1:
|
|
873
|
-
parsedOutput = __assign.apply(void 0, _a.concat([(
|
|
767
|
+
parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
|
|
874
768
|
errorCode = "UnknownError";
|
|
875
769
|
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
876
770
|
_b = errorCode;
|
|
@@ -885,40 +779,22 @@ var deserializeAws_restJson1BatchUpdateDetectorCommandError = function (output,
|
|
|
885
779
|
case "com.amazonaws.ioteventsdata#ThrottlingException": return [3, 8];
|
|
886
780
|
}
|
|
887
781
|
return [3, 10];
|
|
888
|
-
case 2:
|
|
889
|
-
|
|
890
|
-
|
|
891
|
-
case
|
|
892
|
-
|
|
893
|
-
|
|
894
|
-
case 4
|
|
895
|
-
|
|
896
|
-
return [4, deserializeAws_restJson1InvalidRequestExceptionResponse(parsedOutput, context)];
|
|
897
|
-
case 5:
|
|
898
|
-
response = __assign.apply(void 0, [__assign.apply(void 0, _d.concat([(_h.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
|
|
899
|
-
return [3, 11];
|
|
900
|
-
case 6:
|
|
901
|
-
_e = [{}];
|
|
902
|
-
return [4, deserializeAws_restJson1ServiceUnavailableExceptionResponse(parsedOutput, context)];
|
|
903
|
-
case 7:
|
|
904
|
-
response = __assign.apply(void 0, [__assign.apply(void 0, _e.concat([(_h.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
|
|
905
|
-
return [3, 11];
|
|
906
|
-
case 8:
|
|
907
|
-
_f = [{}];
|
|
908
|
-
return [4, deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context)];
|
|
909
|
-
case 9:
|
|
910
|
-
response = __assign.apply(void 0, [__assign.apply(void 0, _f.concat([(_h.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
|
|
911
|
-
return [3, 11];
|
|
782
|
+
case 2: return [4, deserializeAws_restJson1InternalFailureExceptionResponse(parsedOutput, context)];
|
|
783
|
+
case 3: throw _d.sent();
|
|
784
|
+
case 4: return [4, deserializeAws_restJson1InvalidRequestExceptionResponse(parsedOutput, context)];
|
|
785
|
+
case 5: throw _d.sent();
|
|
786
|
+
case 6: return [4, deserializeAws_restJson1ServiceUnavailableExceptionResponse(parsedOutput, context)];
|
|
787
|
+
case 7: throw _d.sent();
|
|
788
|
+
case 8: return [4, deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context)];
|
|
789
|
+
case 9: throw _d.sent();
|
|
912
790
|
case 10:
|
|
913
791
|
parsedBody = parsedOutput.body;
|
|
914
|
-
|
|
915
|
-
|
|
916
|
-
|
|
917
|
-
|
|
918
|
-
|
|
919
|
-
response
|
|
920
|
-
delete response.Message;
|
|
921
|
-
return [2, Promise.reject(Object.assign(new Error(message), response))];
|
|
792
|
+
response = new __BaseException({
|
|
793
|
+
name: parsedBody.code || parsedBody.Code || errorCode,
|
|
794
|
+
$fault: "client",
|
|
795
|
+
$metadata: deserializeMetadata(output),
|
|
796
|
+
});
|
|
797
|
+
throw __decorateServiceException(response, parsedBody);
|
|
922
798
|
}
|
|
923
799
|
});
|
|
924
800
|
}); };
|
|
@@ -947,16 +823,16 @@ export var deserializeAws_restJson1DescribeAlarmCommand = function (output, cont
|
|
|
947
823
|
});
|
|
948
824
|
}); };
|
|
949
825
|
var deserializeAws_restJson1DescribeAlarmCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
950
|
-
var parsedOutput, _a, response, errorCode, _b,
|
|
951
|
-
var
|
|
952
|
-
return __generator(this, function (
|
|
953
|
-
switch (
|
|
826
|
+
var parsedOutput, _a, response, errorCode, _b, parsedBody;
|
|
827
|
+
var _c;
|
|
828
|
+
return __generator(this, function (_d) {
|
|
829
|
+
switch (_d.label) {
|
|
954
830
|
case 0:
|
|
955
831
|
_a = [__assign({}, output)];
|
|
956
|
-
|
|
832
|
+
_c = {};
|
|
957
833
|
return [4, parseBody(output.body, context)];
|
|
958
834
|
case 1:
|
|
959
|
-
parsedOutput = __assign.apply(void 0, _a.concat([(
|
|
835
|
+
parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
|
|
960
836
|
errorCode = "UnknownError";
|
|
961
837
|
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
962
838
|
_b = errorCode;
|
|
@@ -973,46 +849,24 @@ var deserializeAws_restJson1DescribeAlarmCommandError = function (output, contex
|
|
|
973
849
|
case "com.amazonaws.ioteventsdata#ThrottlingException": return [3, 10];
|
|
974
850
|
}
|
|
975
851
|
return [3, 12];
|
|
976
|
-
case 2:
|
|
977
|
-
|
|
978
|
-
|
|
979
|
-
case
|
|
980
|
-
|
|
981
|
-
|
|
982
|
-
case 4
|
|
983
|
-
|
|
984
|
-
|
|
985
|
-
case
|
|
986
|
-
response = __assign.apply(void 0, [__assign.apply(void 0, _d.concat([(_j.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
|
|
987
|
-
return [3, 13];
|
|
988
|
-
case 6:
|
|
989
|
-
_e = [{}];
|
|
990
|
-
return [4, deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context)];
|
|
991
|
-
case 7:
|
|
992
|
-
response = __assign.apply(void 0, [__assign.apply(void 0, _e.concat([(_j.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
|
|
993
|
-
return [3, 13];
|
|
994
|
-
case 8:
|
|
995
|
-
_f = [{}];
|
|
996
|
-
return [4, deserializeAws_restJson1ServiceUnavailableExceptionResponse(parsedOutput, context)];
|
|
997
|
-
case 9:
|
|
998
|
-
response = __assign.apply(void 0, [__assign.apply(void 0, _f.concat([(_j.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
|
|
999
|
-
return [3, 13];
|
|
1000
|
-
case 10:
|
|
1001
|
-
_g = [{}];
|
|
1002
|
-
return [4, deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context)];
|
|
1003
|
-
case 11:
|
|
1004
|
-
response = __assign.apply(void 0, [__assign.apply(void 0, _g.concat([(_j.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
|
|
1005
|
-
return [3, 13];
|
|
852
|
+
case 2: return [4, deserializeAws_restJson1InternalFailureExceptionResponse(parsedOutput, context)];
|
|
853
|
+
case 3: throw _d.sent();
|
|
854
|
+
case 4: return [4, deserializeAws_restJson1InvalidRequestExceptionResponse(parsedOutput, context)];
|
|
855
|
+
case 5: throw _d.sent();
|
|
856
|
+
case 6: return [4, deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context)];
|
|
857
|
+
case 7: throw _d.sent();
|
|
858
|
+
case 8: return [4, deserializeAws_restJson1ServiceUnavailableExceptionResponse(parsedOutput, context)];
|
|
859
|
+
case 9: throw _d.sent();
|
|
860
|
+
case 10: return [4, deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context)];
|
|
861
|
+
case 11: throw _d.sent();
|
|
1006
862
|
case 12:
|
|
1007
863
|
parsedBody = parsedOutput.body;
|
|
1008
|
-
|
|
1009
|
-
|
|
1010
|
-
|
|
1011
|
-
|
|
1012
|
-
|
|
1013
|
-
response
|
|
1014
|
-
delete response.Message;
|
|
1015
|
-
return [2, Promise.reject(Object.assign(new Error(message), response))];
|
|
864
|
+
response = new __BaseException({
|
|
865
|
+
name: parsedBody.code || parsedBody.Code || errorCode,
|
|
866
|
+
$fault: "client",
|
|
867
|
+
$metadata: deserializeMetadata(output),
|
|
868
|
+
});
|
|
869
|
+
throw __decorateServiceException(response, parsedBody);
|
|
1016
870
|
}
|
|
1017
871
|
});
|
|
1018
872
|
}); };
|
|
@@ -1041,16 +895,16 @@ export var deserializeAws_restJson1DescribeDetectorCommand = function (output, c
|
|
|
1041
895
|
});
|
|
1042
896
|
}); };
|
|
1043
897
|
var deserializeAws_restJson1DescribeDetectorCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
1044
|
-
var parsedOutput, _a, response, errorCode, _b,
|
|
1045
|
-
var
|
|
1046
|
-
return __generator(this, function (
|
|
1047
|
-
switch (
|
|
898
|
+
var parsedOutput, _a, response, errorCode, _b, parsedBody;
|
|
899
|
+
var _c;
|
|
900
|
+
return __generator(this, function (_d) {
|
|
901
|
+
switch (_d.label) {
|
|
1048
902
|
case 0:
|
|
1049
903
|
_a = [__assign({}, output)];
|
|
1050
|
-
|
|
904
|
+
_c = {};
|
|
1051
905
|
return [4, parseBody(output.body, context)];
|
|
1052
906
|
case 1:
|
|
1053
|
-
parsedOutput = __assign.apply(void 0, _a.concat([(
|
|
907
|
+
parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
|
|
1054
908
|
errorCode = "UnknownError";
|
|
1055
909
|
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1056
910
|
_b = errorCode;
|
|
@@ -1067,46 +921,24 @@ var deserializeAws_restJson1DescribeDetectorCommandError = function (output, con
|
|
|
1067
921
|
case "com.amazonaws.ioteventsdata#ThrottlingException": return [3, 10];
|
|
1068
922
|
}
|
|
1069
923
|
return [3, 12];
|
|
1070
|
-
case 2:
|
|
1071
|
-
|
|
1072
|
-
|
|
1073
|
-
case
|
|
1074
|
-
|
|
1075
|
-
|
|
1076
|
-
case 4
|
|
1077
|
-
|
|
1078
|
-
|
|
1079
|
-
case
|
|
1080
|
-
response = __assign.apply(void 0, [__assign.apply(void 0, _d.concat([(_j.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
|
|
1081
|
-
return [3, 13];
|
|
1082
|
-
case 6:
|
|
1083
|
-
_e = [{}];
|
|
1084
|
-
return [4, deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context)];
|
|
1085
|
-
case 7:
|
|
1086
|
-
response = __assign.apply(void 0, [__assign.apply(void 0, _e.concat([(_j.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
|
|
1087
|
-
return [3, 13];
|
|
1088
|
-
case 8:
|
|
1089
|
-
_f = [{}];
|
|
1090
|
-
return [4, deserializeAws_restJson1ServiceUnavailableExceptionResponse(parsedOutput, context)];
|
|
1091
|
-
case 9:
|
|
1092
|
-
response = __assign.apply(void 0, [__assign.apply(void 0, _f.concat([(_j.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
|
|
1093
|
-
return [3, 13];
|
|
1094
|
-
case 10:
|
|
1095
|
-
_g = [{}];
|
|
1096
|
-
return [4, deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context)];
|
|
1097
|
-
case 11:
|
|
1098
|
-
response = __assign.apply(void 0, [__assign.apply(void 0, _g.concat([(_j.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
|
|
1099
|
-
return [3, 13];
|
|
924
|
+
case 2: return [4, deserializeAws_restJson1InternalFailureExceptionResponse(parsedOutput, context)];
|
|
925
|
+
case 3: throw _d.sent();
|
|
926
|
+
case 4: return [4, deserializeAws_restJson1InvalidRequestExceptionResponse(parsedOutput, context)];
|
|
927
|
+
case 5: throw _d.sent();
|
|
928
|
+
case 6: return [4, deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context)];
|
|
929
|
+
case 7: throw _d.sent();
|
|
930
|
+
case 8: return [4, deserializeAws_restJson1ServiceUnavailableExceptionResponse(parsedOutput, context)];
|
|
931
|
+
case 9: throw _d.sent();
|
|
932
|
+
case 10: return [4, deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context)];
|
|
933
|
+
case 11: throw _d.sent();
|
|
1100
934
|
case 12:
|
|
1101
935
|
parsedBody = parsedOutput.body;
|
|
1102
|
-
|
|
1103
|
-
|
|
1104
|
-
|
|
1105
|
-
|
|
1106
|
-
|
|
1107
|
-
response
|
|
1108
|
-
delete response.Message;
|
|
1109
|
-
return [2, Promise.reject(Object.assign(new Error(message), response))];
|
|
936
|
+
response = new __BaseException({
|
|
937
|
+
name: parsedBody.code || parsedBody.Code || errorCode,
|
|
938
|
+
$fault: "client",
|
|
939
|
+
$metadata: deserializeMetadata(output),
|
|
940
|
+
});
|
|
941
|
+
throw __decorateServiceException(response, parsedBody);
|
|
1110
942
|
}
|
|
1111
943
|
});
|
|
1112
944
|
}); };
|
|
@@ -1139,16 +971,16 @@ export var deserializeAws_restJson1ListAlarmsCommand = function (output, context
|
|
|
1139
971
|
});
|
|
1140
972
|
}); };
|
|
1141
973
|
var deserializeAws_restJson1ListAlarmsCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
1142
|
-
var parsedOutput, _a, response, errorCode, _b,
|
|
1143
|
-
var
|
|
1144
|
-
return __generator(this, function (
|
|
1145
|
-
switch (
|
|
974
|
+
var parsedOutput, _a, response, errorCode, _b, parsedBody;
|
|
975
|
+
var _c;
|
|
976
|
+
return __generator(this, function (_d) {
|
|
977
|
+
switch (_d.label) {
|
|
1146
978
|
case 0:
|
|
1147
979
|
_a = [__assign({}, output)];
|
|
1148
|
-
|
|
980
|
+
_c = {};
|
|
1149
981
|
return [4, parseBody(output.body, context)];
|
|
1150
982
|
case 1:
|
|
1151
|
-
parsedOutput = __assign.apply(void 0, _a.concat([(
|
|
983
|
+
parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
|
|
1152
984
|
errorCode = "UnknownError";
|
|
1153
985
|
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1154
986
|
_b = errorCode;
|
|
@@ -1165,46 +997,24 @@ var deserializeAws_restJson1ListAlarmsCommandError = function (output, context)
|
|
|
1165
997
|
case "com.amazonaws.ioteventsdata#ThrottlingException": return [3, 10];
|
|
1166
998
|
}
|
|
1167
999
|
return [3, 12];
|
|
1168
|
-
case 2:
|
|
1169
|
-
|
|
1170
|
-
|
|
1171
|
-
case
|
|
1172
|
-
|
|
1173
|
-
|
|
1174
|
-
case 4
|
|
1175
|
-
|
|
1176
|
-
|
|
1177
|
-
case
|
|
1178
|
-
response = __assign.apply(void 0, [__assign.apply(void 0, _d.concat([(_j.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
|
|
1179
|
-
return [3, 13];
|
|
1180
|
-
case 6:
|
|
1181
|
-
_e = [{}];
|
|
1182
|
-
return [4, deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context)];
|
|
1183
|
-
case 7:
|
|
1184
|
-
response = __assign.apply(void 0, [__assign.apply(void 0, _e.concat([(_j.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
|
|
1185
|
-
return [3, 13];
|
|
1186
|
-
case 8:
|
|
1187
|
-
_f = [{}];
|
|
1188
|
-
return [4, deserializeAws_restJson1ServiceUnavailableExceptionResponse(parsedOutput, context)];
|
|
1189
|
-
case 9:
|
|
1190
|
-
response = __assign.apply(void 0, [__assign.apply(void 0, _f.concat([(_j.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
|
|
1191
|
-
return [3, 13];
|
|
1192
|
-
case 10:
|
|
1193
|
-
_g = [{}];
|
|
1194
|
-
return [4, deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context)];
|
|
1195
|
-
case 11:
|
|
1196
|
-
response = __assign.apply(void 0, [__assign.apply(void 0, _g.concat([(_j.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
|
|
1197
|
-
return [3, 13];
|
|
1000
|
+
case 2: return [4, deserializeAws_restJson1InternalFailureExceptionResponse(parsedOutput, context)];
|
|
1001
|
+
case 3: throw _d.sent();
|
|
1002
|
+
case 4: return [4, deserializeAws_restJson1InvalidRequestExceptionResponse(parsedOutput, context)];
|
|
1003
|
+
case 5: throw _d.sent();
|
|
1004
|
+
case 6: return [4, deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context)];
|
|
1005
|
+
case 7: throw _d.sent();
|
|
1006
|
+
case 8: return [4, deserializeAws_restJson1ServiceUnavailableExceptionResponse(parsedOutput, context)];
|
|
1007
|
+
case 9: throw _d.sent();
|
|
1008
|
+
case 10: return [4, deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context)];
|
|
1009
|
+
case 11: throw _d.sent();
|
|
1198
1010
|
case 12:
|
|
1199
1011
|
parsedBody = parsedOutput.body;
|
|
1200
|
-
|
|
1201
|
-
|
|
1202
|
-
|
|
1203
|
-
|
|
1204
|
-
|
|
1205
|
-
response
|
|
1206
|
-
delete response.Message;
|
|
1207
|
-
return [2, Promise.reject(Object.assign(new Error(message), response))];
|
|
1012
|
+
response = new __BaseException({
|
|
1013
|
+
name: parsedBody.code || parsedBody.Code || errorCode,
|
|
1014
|
+
$fault: "client",
|
|
1015
|
+
$metadata: deserializeMetadata(output),
|
|
1016
|
+
});
|
|
1017
|
+
throw __decorateServiceException(response, parsedBody);
|
|
1208
1018
|
}
|
|
1209
1019
|
});
|
|
1210
1020
|
}); };
|
|
@@ -1237,16 +1047,16 @@ export var deserializeAws_restJson1ListDetectorsCommand = function (output, cont
|
|
|
1237
1047
|
});
|
|
1238
1048
|
}); };
|
|
1239
1049
|
var deserializeAws_restJson1ListDetectorsCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
1240
|
-
var parsedOutput, _a, response, errorCode, _b,
|
|
1241
|
-
var
|
|
1242
|
-
return __generator(this, function (
|
|
1243
|
-
switch (
|
|
1050
|
+
var parsedOutput, _a, response, errorCode, _b, parsedBody;
|
|
1051
|
+
var _c;
|
|
1052
|
+
return __generator(this, function (_d) {
|
|
1053
|
+
switch (_d.label) {
|
|
1244
1054
|
case 0:
|
|
1245
1055
|
_a = [__assign({}, output)];
|
|
1246
|
-
|
|
1056
|
+
_c = {};
|
|
1247
1057
|
return [4, parseBody(output.body, context)];
|
|
1248
1058
|
case 1:
|
|
1249
|
-
parsedOutput = __assign.apply(void 0, _a.concat([(
|
|
1059
|
+
parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
|
|
1250
1060
|
errorCode = "UnknownError";
|
|
1251
1061
|
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1252
1062
|
_b = errorCode;
|
|
@@ -1263,127 +1073,85 @@ var deserializeAws_restJson1ListDetectorsCommandError = function (output, contex
|
|
|
1263
1073
|
case "com.amazonaws.ioteventsdata#ThrottlingException": return [3, 10];
|
|
1264
1074
|
}
|
|
1265
1075
|
return [3, 12];
|
|
1266
|
-
case 2:
|
|
1267
|
-
|
|
1268
|
-
|
|
1269
|
-
case
|
|
1270
|
-
|
|
1271
|
-
|
|
1272
|
-
case 4
|
|
1273
|
-
|
|
1274
|
-
|
|
1275
|
-
case
|
|
1276
|
-
response = __assign.apply(void 0, [__assign.apply(void 0, _d.concat([(_j.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
|
|
1277
|
-
return [3, 13];
|
|
1278
|
-
case 6:
|
|
1279
|
-
_e = [{}];
|
|
1280
|
-
return [4, deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context)];
|
|
1281
|
-
case 7:
|
|
1282
|
-
response = __assign.apply(void 0, [__assign.apply(void 0, _e.concat([(_j.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
|
|
1283
|
-
return [3, 13];
|
|
1284
|
-
case 8:
|
|
1285
|
-
_f = [{}];
|
|
1286
|
-
return [4, deserializeAws_restJson1ServiceUnavailableExceptionResponse(parsedOutput, context)];
|
|
1287
|
-
case 9:
|
|
1288
|
-
response = __assign.apply(void 0, [__assign.apply(void 0, _f.concat([(_j.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
|
|
1289
|
-
return [3, 13];
|
|
1290
|
-
case 10:
|
|
1291
|
-
_g = [{}];
|
|
1292
|
-
return [4, deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context)];
|
|
1293
|
-
case 11:
|
|
1294
|
-
response = __assign.apply(void 0, [__assign.apply(void 0, _g.concat([(_j.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
|
|
1295
|
-
return [3, 13];
|
|
1076
|
+
case 2: return [4, deserializeAws_restJson1InternalFailureExceptionResponse(parsedOutput, context)];
|
|
1077
|
+
case 3: throw _d.sent();
|
|
1078
|
+
case 4: return [4, deserializeAws_restJson1InvalidRequestExceptionResponse(parsedOutput, context)];
|
|
1079
|
+
case 5: throw _d.sent();
|
|
1080
|
+
case 6: return [4, deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context)];
|
|
1081
|
+
case 7: throw _d.sent();
|
|
1082
|
+
case 8: return [4, deserializeAws_restJson1ServiceUnavailableExceptionResponse(parsedOutput, context)];
|
|
1083
|
+
case 9: throw _d.sent();
|
|
1084
|
+
case 10: return [4, deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context)];
|
|
1085
|
+
case 11: throw _d.sent();
|
|
1296
1086
|
case 12:
|
|
1297
1087
|
parsedBody = parsedOutput.body;
|
|
1298
|
-
|
|
1299
|
-
|
|
1300
|
-
|
|
1301
|
-
|
|
1302
|
-
|
|
1303
|
-
response
|
|
1304
|
-
delete response.Message;
|
|
1305
|
-
return [2, Promise.reject(Object.assign(new Error(message), response))];
|
|
1088
|
+
response = new __BaseException({
|
|
1089
|
+
name: parsedBody.code || parsedBody.Code || errorCode,
|
|
1090
|
+
$fault: "client",
|
|
1091
|
+
$metadata: deserializeMetadata(output),
|
|
1092
|
+
});
|
|
1093
|
+
throw __decorateServiceException(response, parsedBody);
|
|
1306
1094
|
}
|
|
1307
1095
|
});
|
|
1308
1096
|
}); };
|
|
1309
1097
|
var deserializeAws_restJson1InternalFailureExceptionResponse = function (parsedOutput, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
1310
|
-
var contents, data;
|
|
1098
|
+
var contents, data, exception;
|
|
1311
1099
|
return __generator(this, function (_a) {
|
|
1312
|
-
contents = {
|
|
1313
|
-
name: "InternalFailureException",
|
|
1314
|
-
$fault: "server",
|
|
1315
|
-
$metadata: deserializeMetadata(parsedOutput),
|
|
1316
|
-
message: undefined,
|
|
1317
|
-
};
|
|
1100
|
+
contents = {};
|
|
1318
1101
|
data = parsedOutput.body;
|
|
1319
1102
|
if (data.message !== undefined && data.message !== null) {
|
|
1320
1103
|
contents.message = __expectString(data.message);
|
|
1321
1104
|
}
|
|
1322
|
-
|
|
1105
|
+
exception = new InternalFailureException(__assign({ $metadata: deserializeMetadata(parsedOutput) }, contents));
|
|
1106
|
+
return [2, __decorateServiceException(exception, parsedOutput.body)];
|
|
1323
1107
|
});
|
|
1324
1108
|
}); };
|
|
1325
1109
|
var deserializeAws_restJson1InvalidRequestExceptionResponse = function (parsedOutput, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
1326
|
-
var contents, data;
|
|
1110
|
+
var contents, data, exception;
|
|
1327
1111
|
return __generator(this, function (_a) {
|
|
1328
|
-
contents = {
|
|
1329
|
-
name: "InvalidRequestException",
|
|
1330
|
-
$fault: "client",
|
|
1331
|
-
$metadata: deserializeMetadata(parsedOutput),
|
|
1332
|
-
message: undefined,
|
|
1333
|
-
};
|
|
1112
|
+
contents = {};
|
|
1334
1113
|
data = parsedOutput.body;
|
|
1335
1114
|
if (data.message !== undefined && data.message !== null) {
|
|
1336
1115
|
contents.message = __expectString(data.message);
|
|
1337
1116
|
}
|
|
1338
|
-
|
|
1117
|
+
exception = new InvalidRequestException(__assign({ $metadata: deserializeMetadata(parsedOutput) }, contents));
|
|
1118
|
+
return [2, __decorateServiceException(exception, parsedOutput.body)];
|
|
1339
1119
|
});
|
|
1340
1120
|
}); };
|
|
1341
1121
|
var deserializeAws_restJson1ResourceNotFoundExceptionResponse = function (parsedOutput, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
1342
|
-
var contents, data;
|
|
1122
|
+
var contents, data, exception;
|
|
1343
1123
|
return __generator(this, function (_a) {
|
|
1344
|
-
contents = {
|
|
1345
|
-
name: "ResourceNotFoundException",
|
|
1346
|
-
$fault: "client",
|
|
1347
|
-
$metadata: deserializeMetadata(parsedOutput),
|
|
1348
|
-
message: undefined,
|
|
1349
|
-
};
|
|
1124
|
+
contents = {};
|
|
1350
1125
|
data = parsedOutput.body;
|
|
1351
1126
|
if (data.message !== undefined && data.message !== null) {
|
|
1352
1127
|
contents.message = __expectString(data.message);
|
|
1353
1128
|
}
|
|
1354
|
-
|
|
1129
|
+
exception = new ResourceNotFoundException(__assign({ $metadata: deserializeMetadata(parsedOutput) }, contents));
|
|
1130
|
+
return [2, __decorateServiceException(exception, parsedOutput.body)];
|
|
1355
1131
|
});
|
|
1356
1132
|
}); };
|
|
1357
1133
|
var deserializeAws_restJson1ServiceUnavailableExceptionResponse = function (parsedOutput, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
1358
|
-
var contents, data;
|
|
1134
|
+
var contents, data, exception;
|
|
1359
1135
|
return __generator(this, function (_a) {
|
|
1360
|
-
contents = {
|
|
1361
|
-
name: "ServiceUnavailableException",
|
|
1362
|
-
$fault: "server",
|
|
1363
|
-
$metadata: deserializeMetadata(parsedOutput),
|
|
1364
|
-
message: undefined,
|
|
1365
|
-
};
|
|
1136
|
+
contents = {};
|
|
1366
1137
|
data = parsedOutput.body;
|
|
1367
1138
|
if (data.message !== undefined && data.message !== null) {
|
|
1368
1139
|
contents.message = __expectString(data.message);
|
|
1369
1140
|
}
|
|
1370
|
-
|
|
1141
|
+
exception = new ServiceUnavailableException(__assign({ $metadata: deserializeMetadata(parsedOutput) }, contents));
|
|
1142
|
+
return [2, __decorateServiceException(exception, parsedOutput.body)];
|
|
1371
1143
|
});
|
|
1372
1144
|
}); };
|
|
1373
1145
|
var deserializeAws_restJson1ThrottlingExceptionResponse = function (parsedOutput, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
1374
|
-
var contents, data;
|
|
1146
|
+
var contents, data, exception;
|
|
1375
1147
|
return __generator(this, function (_a) {
|
|
1376
|
-
contents = {
|
|
1377
|
-
name: "ThrottlingException",
|
|
1378
|
-
$fault: "client",
|
|
1379
|
-
$metadata: deserializeMetadata(parsedOutput),
|
|
1380
|
-
message: undefined,
|
|
1381
|
-
};
|
|
1148
|
+
contents = {};
|
|
1382
1149
|
data = parsedOutput.body;
|
|
1383
1150
|
if (data.message !== undefined && data.message !== null) {
|
|
1384
1151
|
contents.message = __expectString(data.message);
|
|
1385
1152
|
}
|
|
1386
|
-
|
|
1153
|
+
exception = new ThrottlingException(__assign({ $metadata: deserializeMetadata(parsedOutput) }, contents));
|
|
1154
|
+
return [2, __decorateServiceException(exception, parsedOutput.body)];
|
|
1387
1155
|
});
|
|
1388
1156
|
}); };
|
|
1389
1157
|
var serializeAws_restJson1AcknowledgeAlarmActionRequest = function (input, context) {
|
|
@@ -1557,7 +1325,7 @@ var deserializeAws_restJson1AlarmState = function (output, context) {
|
|
|
1557
1325
|
};
|
|
1558
1326
|
};
|
|
1559
1327
|
var deserializeAws_restJson1AlarmSummaries = function (output, context) {
|
|
1560
|
-
|
|
1328
|
+
var retVal = (output || [])
|
|
1561
1329
|
.filter(function (e) { return e != null; })
|
|
1562
1330
|
.map(function (entry) {
|
|
1563
1331
|
if (entry === null) {
|
|
@@ -1565,6 +1333,7 @@ var deserializeAws_restJson1AlarmSummaries = function (output, context) {
|
|
|
1565
1333
|
}
|
|
1566
1334
|
return deserializeAws_restJson1AlarmSummary(entry, context);
|
|
1567
1335
|
});
|
|
1336
|
+
return retVal;
|
|
1568
1337
|
};
|
|
1569
1338
|
var deserializeAws_restJson1AlarmSummary = function (output, context) {
|
|
1570
1339
|
return {
|
|
@@ -1581,7 +1350,7 @@ var deserializeAws_restJson1AlarmSummary = function (output, context) {
|
|
|
1581
1350
|
};
|
|
1582
1351
|
};
|
|
1583
1352
|
var deserializeAws_restJson1BatchAlarmActionErrorEntries = function (output, context) {
|
|
1584
|
-
|
|
1353
|
+
var retVal = (output || [])
|
|
1585
1354
|
.filter(function (e) { return e != null; })
|
|
1586
1355
|
.map(function (entry) {
|
|
1587
1356
|
if (entry === null) {
|
|
@@ -1589,6 +1358,7 @@ var deserializeAws_restJson1BatchAlarmActionErrorEntries = function (output, con
|
|
|
1589
1358
|
}
|
|
1590
1359
|
return deserializeAws_restJson1BatchAlarmActionErrorEntry(entry, context);
|
|
1591
1360
|
});
|
|
1361
|
+
return retVal;
|
|
1592
1362
|
};
|
|
1593
1363
|
var deserializeAws_restJson1BatchAlarmActionErrorEntry = function (output, context) {
|
|
1594
1364
|
return {
|
|
@@ -1598,7 +1368,7 @@ var deserializeAws_restJson1BatchAlarmActionErrorEntry = function (output, conte
|
|
|
1598
1368
|
};
|
|
1599
1369
|
};
|
|
1600
1370
|
var deserializeAws_restJson1BatchPutMessageErrorEntries = function (output, context) {
|
|
1601
|
-
|
|
1371
|
+
var retVal = (output || [])
|
|
1602
1372
|
.filter(function (e) { return e != null; })
|
|
1603
1373
|
.map(function (entry) {
|
|
1604
1374
|
if (entry === null) {
|
|
@@ -1606,6 +1376,7 @@ var deserializeAws_restJson1BatchPutMessageErrorEntries = function (output, cont
|
|
|
1606
1376
|
}
|
|
1607
1377
|
return deserializeAws_restJson1BatchPutMessageErrorEntry(entry, context);
|
|
1608
1378
|
});
|
|
1379
|
+
return retVal;
|
|
1609
1380
|
};
|
|
1610
1381
|
var deserializeAws_restJson1BatchPutMessageErrorEntry = function (output, context) {
|
|
1611
1382
|
return {
|
|
@@ -1615,7 +1386,7 @@ var deserializeAws_restJson1BatchPutMessageErrorEntry = function (output, contex
|
|
|
1615
1386
|
};
|
|
1616
1387
|
};
|
|
1617
1388
|
var deserializeAws_restJson1BatchUpdateDetectorErrorEntries = function (output, context) {
|
|
1618
|
-
|
|
1389
|
+
var retVal = (output || [])
|
|
1619
1390
|
.filter(function (e) { return e != null; })
|
|
1620
1391
|
.map(function (entry) {
|
|
1621
1392
|
if (entry === null) {
|
|
@@ -1623,6 +1394,7 @@ var deserializeAws_restJson1BatchUpdateDetectorErrorEntries = function (output,
|
|
|
1623
1394
|
}
|
|
1624
1395
|
return deserializeAws_restJson1BatchUpdateDetectorErrorEntry(entry, context);
|
|
1625
1396
|
});
|
|
1397
|
+
return retVal;
|
|
1626
1398
|
};
|
|
1627
1399
|
var deserializeAws_restJson1BatchUpdateDetectorErrorEntry = function (output, context) {
|
|
1628
1400
|
return {
|
|
@@ -1684,7 +1456,7 @@ var deserializeAws_restJson1DetectorStateSummary = function (output, context) {
|
|
|
1684
1456
|
};
|
|
1685
1457
|
};
|
|
1686
1458
|
var deserializeAws_restJson1DetectorSummaries = function (output, context) {
|
|
1687
|
-
|
|
1459
|
+
var retVal = (output || [])
|
|
1688
1460
|
.filter(function (e) { return e != null; })
|
|
1689
1461
|
.map(function (entry) {
|
|
1690
1462
|
if (entry === null) {
|
|
@@ -1692,6 +1464,7 @@ var deserializeAws_restJson1DetectorSummaries = function (output, context) {
|
|
|
1692
1464
|
}
|
|
1693
1465
|
return deserializeAws_restJson1DetectorSummary(entry, context);
|
|
1694
1466
|
});
|
|
1467
|
+
return retVal;
|
|
1695
1468
|
};
|
|
1696
1469
|
var deserializeAws_restJson1DetectorSummary = function (output, context) {
|
|
1697
1470
|
return {
|
|
@@ -1766,7 +1539,7 @@ var deserializeAws_restJson1Timer = function (output, context) {
|
|
|
1766
1539
|
};
|
|
1767
1540
|
};
|
|
1768
1541
|
var deserializeAws_restJson1Timers = function (output, context) {
|
|
1769
|
-
|
|
1542
|
+
var retVal = (output || [])
|
|
1770
1543
|
.filter(function (e) { return e != null; })
|
|
1771
1544
|
.map(function (entry) {
|
|
1772
1545
|
if (entry === null) {
|
|
@@ -1774,6 +1547,7 @@ var deserializeAws_restJson1Timers = function (output, context) {
|
|
|
1774
1547
|
}
|
|
1775
1548
|
return deserializeAws_restJson1Timer(entry, context);
|
|
1776
1549
|
});
|
|
1550
|
+
return retVal;
|
|
1777
1551
|
};
|
|
1778
1552
|
var deserializeAws_restJson1Variable = function (output, context) {
|
|
1779
1553
|
return {
|
|
@@ -1782,7 +1556,7 @@ var deserializeAws_restJson1Variable = function (output, context) {
|
|
|
1782
1556
|
};
|
|
1783
1557
|
};
|
|
1784
1558
|
var deserializeAws_restJson1Variables = function (output, context) {
|
|
1785
|
-
|
|
1559
|
+
var retVal = (output || [])
|
|
1786
1560
|
.filter(function (e) { return e != null; })
|
|
1787
1561
|
.map(function (entry) {
|
|
1788
1562
|
if (entry === null) {
|
|
@@ -1790,6 +1564,7 @@ var deserializeAws_restJson1Variables = function (output, context) {
|
|
|
1790
1564
|
}
|
|
1791
1565
|
return deserializeAws_restJson1Variable(entry, context);
|
|
1792
1566
|
});
|
|
1567
|
+
return retVal;
|
|
1793
1568
|
};
|
|
1794
1569
|
var deserializeMetadata = function (output) {
|
|
1795
1570
|
var _a;
|