@aws-sdk/client-iot-events 3.504.0 → 3.507.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.
@@ -351,7 +351,7 @@ export const se_UpdateInputCommand = async (input, context) => {
351
351
  };
352
352
  export const de_CreateAlarmModelCommand = async (output, context) => {
353
353
  if (output.statusCode !== 200 && output.statusCode >= 300) {
354
- return de_CreateAlarmModelCommandError(output, context);
354
+ return de_CommandError(output, context);
355
355
  }
356
356
  const contents = map({
357
357
  $metadata: deserializeMetadata(output),
@@ -367,46 +367,9 @@ export const de_CreateAlarmModelCommand = async (output, context) => {
367
367
  Object.assign(contents, doc);
368
368
  return contents;
369
369
  };
370
- const de_CreateAlarmModelCommandError = async (output, context) => {
371
- const parsedOutput = {
372
- ...output,
373
- body: await parseErrorBody(output.body, context),
374
- };
375
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
376
- switch (errorCode) {
377
- case "InternalFailureException":
378
- case "com.amazonaws.iotevents#InternalFailureException":
379
- throw await de_InternalFailureExceptionRes(parsedOutput, context);
380
- case "InvalidRequestException":
381
- case "com.amazonaws.iotevents#InvalidRequestException":
382
- throw await de_InvalidRequestExceptionRes(parsedOutput, context);
383
- case "LimitExceededException":
384
- case "com.amazonaws.iotevents#LimitExceededException":
385
- throw await de_LimitExceededExceptionRes(parsedOutput, context);
386
- case "ResourceAlreadyExistsException":
387
- case "com.amazonaws.iotevents#ResourceAlreadyExistsException":
388
- throw await de_ResourceAlreadyExistsExceptionRes(parsedOutput, context);
389
- case "ResourceInUseException":
390
- case "com.amazonaws.iotevents#ResourceInUseException":
391
- throw await de_ResourceInUseExceptionRes(parsedOutput, context);
392
- case "ServiceUnavailableException":
393
- case "com.amazonaws.iotevents#ServiceUnavailableException":
394
- throw await de_ServiceUnavailableExceptionRes(parsedOutput, context);
395
- case "ThrottlingException":
396
- case "com.amazonaws.iotevents#ThrottlingException":
397
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
398
- default:
399
- const parsedBody = parsedOutput.body;
400
- return throwDefaultError({
401
- output,
402
- parsedBody,
403
- errorCode,
404
- });
405
- }
406
- };
407
370
  export const de_CreateDetectorModelCommand = async (output, context) => {
408
371
  if (output.statusCode !== 200 && output.statusCode >= 300) {
409
- return de_CreateDetectorModelCommandError(output, context);
372
+ return de_CommandError(output, context);
410
373
  }
411
374
  const contents = map({
412
375
  $metadata: deserializeMetadata(output),
@@ -418,46 +381,9 @@ export const de_CreateDetectorModelCommand = async (output, context) => {
418
381
  Object.assign(contents, doc);
419
382
  return contents;
420
383
  };
421
- const de_CreateDetectorModelCommandError = async (output, context) => {
422
- const parsedOutput = {
423
- ...output,
424
- body: await parseErrorBody(output.body, context),
425
- };
426
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
427
- switch (errorCode) {
428
- case "InternalFailureException":
429
- case "com.amazonaws.iotevents#InternalFailureException":
430
- throw await de_InternalFailureExceptionRes(parsedOutput, context);
431
- case "InvalidRequestException":
432
- case "com.amazonaws.iotevents#InvalidRequestException":
433
- throw await de_InvalidRequestExceptionRes(parsedOutput, context);
434
- case "LimitExceededException":
435
- case "com.amazonaws.iotevents#LimitExceededException":
436
- throw await de_LimitExceededExceptionRes(parsedOutput, context);
437
- case "ResourceAlreadyExistsException":
438
- case "com.amazonaws.iotevents#ResourceAlreadyExistsException":
439
- throw await de_ResourceAlreadyExistsExceptionRes(parsedOutput, context);
440
- case "ResourceInUseException":
441
- case "com.amazonaws.iotevents#ResourceInUseException":
442
- throw await de_ResourceInUseExceptionRes(parsedOutput, context);
443
- case "ServiceUnavailableException":
444
- case "com.amazonaws.iotevents#ServiceUnavailableException":
445
- throw await de_ServiceUnavailableExceptionRes(parsedOutput, context);
446
- case "ThrottlingException":
447
- case "com.amazonaws.iotevents#ThrottlingException":
448
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
449
- default:
450
- const parsedBody = parsedOutput.body;
451
- return throwDefaultError({
452
- output,
453
- parsedBody,
454
- errorCode,
455
- });
456
- }
457
- };
458
384
  export const de_CreateInputCommand = async (output, context) => {
459
385
  if (output.statusCode !== 201 && output.statusCode >= 300) {
460
- return de_CreateInputCommandError(output, context);
386
+ return de_CommandError(output, context);
461
387
  }
462
388
  const contents = map({
463
389
  $metadata: deserializeMetadata(output),
@@ -469,40 +395,9 @@ export const de_CreateInputCommand = async (output, context) => {
469
395
  Object.assign(contents, doc);
470
396
  return contents;
471
397
  };
472
- const de_CreateInputCommandError = async (output, context) => {
473
- const parsedOutput = {
474
- ...output,
475
- body: await parseErrorBody(output.body, context),
476
- };
477
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
478
- switch (errorCode) {
479
- case "InternalFailureException":
480
- case "com.amazonaws.iotevents#InternalFailureException":
481
- throw await de_InternalFailureExceptionRes(parsedOutput, context);
482
- case "InvalidRequestException":
483
- case "com.amazonaws.iotevents#InvalidRequestException":
484
- throw await de_InvalidRequestExceptionRes(parsedOutput, context);
485
- case "ResourceAlreadyExistsException":
486
- case "com.amazonaws.iotevents#ResourceAlreadyExistsException":
487
- throw await de_ResourceAlreadyExistsExceptionRes(parsedOutput, context);
488
- case "ServiceUnavailableException":
489
- case "com.amazonaws.iotevents#ServiceUnavailableException":
490
- throw await de_ServiceUnavailableExceptionRes(parsedOutput, context);
491
- case "ThrottlingException":
492
- case "com.amazonaws.iotevents#ThrottlingException":
493
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
494
- default:
495
- const parsedBody = parsedOutput.body;
496
- return throwDefaultError({
497
- output,
498
- parsedBody,
499
- errorCode,
500
- });
501
- }
502
- };
503
398
  export const de_DeleteAlarmModelCommand = async (output, context) => {
504
399
  if (output.statusCode !== 204 && output.statusCode >= 300) {
505
- return de_DeleteAlarmModelCommandError(output, context);
400
+ return de_CommandError(output, context);
506
401
  }
507
402
  const contents = map({
508
403
  $metadata: deserializeMetadata(output),
@@ -510,43 +405,9 @@ export const de_DeleteAlarmModelCommand = async (output, context) => {
510
405
  await collectBody(output.body, context);
511
406
  return contents;
512
407
  };
513
- const de_DeleteAlarmModelCommandError = async (output, context) => {
514
- const parsedOutput = {
515
- ...output,
516
- body: await parseErrorBody(output.body, context),
517
- };
518
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
519
- switch (errorCode) {
520
- case "InternalFailureException":
521
- case "com.amazonaws.iotevents#InternalFailureException":
522
- throw await de_InternalFailureExceptionRes(parsedOutput, context);
523
- case "InvalidRequestException":
524
- case "com.amazonaws.iotevents#InvalidRequestException":
525
- throw await de_InvalidRequestExceptionRes(parsedOutput, context);
526
- case "ResourceInUseException":
527
- case "com.amazonaws.iotevents#ResourceInUseException":
528
- throw await de_ResourceInUseExceptionRes(parsedOutput, context);
529
- case "ResourceNotFoundException":
530
- case "com.amazonaws.iotevents#ResourceNotFoundException":
531
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
532
- case "ServiceUnavailableException":
533
- case "com.amazonaws.iotevents#ServiceUnavailableException":
534
- throw await de_ServiceUnavailableExceptionRes(parsedOutput, context);
535
- case "ThrottlingException":
536
- case "com.amazonaws.iotevents#ThrottlingException":
537
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
538
- default:
539
- const parsedBody = parsedOutput.body;
540
- return throwDefaultError({
541
- output,
542
- parsedBody,
543
- errorCode,
544
- });
545
- }
546
- };
547
408
  export const de_DeleteDetectorModelCommand = async (output, context) => {
548
409
  if (output.statusCode !== 204 && output.statusCode >= 300) {
549
- return de_DeleteDetectorModelCommandError(output, context);
410
+ return de_CommandError(output, context);
550
411
  }
551
412
  const contents = map({
552
413
  $metadata: deserializeMetadata(output),
@@ -554,43 +415,9 @@ export const de_DeleteDetectorModelCommand = async (output, context) => {
554
415
  await collectBody(output.body, context);
555
416
  return contents;
556
417
  };
557
- const de_DeleteDetectorModelCommandError = async (output, context) => {
558
- const parsedOutput = {
559
- ...output,
560
- body: await parseErrorBody(output.body, context),
561
- };
562
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
563
- switch (errorCode) {
564
- case "InternalFailureException":
565
- case "com.amazonaws.iotevents#InternalFailureException":
566
- throw await de_InternalFailureExceptionRes(parsedOutput, context);
567
- case "InvalidRequestException":
568
- case "com.amazonaws.iotevents#InvalidRequestException":
569
- throw await de_InvalidRequestExceptionRes(parsedOutput, context);
570
- case "ResourceInUseException":
571
- case "com.amazonaws.iotevents#ResourceInUseException":
572
- throw await de_ResourceInUseExceptionRes(parsedOutput, context);
573
- case "ResourceNotFoundException":
574
- case "com.amazonaws.iotevents#ResourceNotFoundException":
575
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
576
- case "ServiceUnavailableException":
577
- case "com.amazonaws.iotevents#ServiceUnavailableException":
578
- throw await de_ServiceUnavailableExceptionRes(parsedOutput, context);
579
- case "ThrottlingException":
580
- case "com.amazonaws.iotevents#ThrottlingException":
581
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
582
- default:
583
- const parsedBody = parsedOutput.body;
584
- return throwDefaultError({
585
- output,
586
- parsedBody,
587
- errorCode,
588
- });
589
- }
590
- };
591
418
  export const de_DeleteInputCommand = async (output, context) => {
592
419
  if (output.statusCode !== 200 && output.statusCode >= 300) {
593
- return de_DeleteInputCommandError(output, context);
420
+ return de_CommandError(output, context);
594
421
  }
595
422
  const contents = map({
596
423
  $metadata: deserializeMetadata(output),
@@ -598,43 +425,9 @@ export const de_DeleteInputCommand = async (output, context) => {
598
425
  await collectBody(output.body, context);
599
426
  return contents;
600
427
  };
601
- const de_DeleteInputCommandError = async (output, context) => {
602
- const parsedOutput = {
603
- ...output,
604
- body: await parseErrorBody(output.body, context),
605
- };
606
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
607
- switch (errorCode) {
608
- case "InternalFailureException":
609
- case "com.amazonaws.iotevents#InternalFailureException":
610
- throw await de_InternalFailureExceptionRes(parsedOutput, context);
611
- case "InvalidRequestException":
612
- case "com.amazonaws.iotevents#InvalidRequestException":
613
- throw await de_InvalidRequestExceptionRes(parsedOutput, context);
614
- case "ResourceInUseException":
615
- case "com.amazonaws.iotevents#ResourceInUseException":
616
- throw await de_ResourceInUseExceptionRes(parsedOutput, context);
617
- case "ResourceNotFoundException":
618
- case "com.amazonaws.iotevents#ResourceNotFoundException":
619
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
620
- case "ServiceUnavailableException":
621
- case "com.amazonaws.iotevents#ServiceUnavailableException":
622
- throw await de_ServiceUnavailableExceptionRes(parsedOutput, context);
623
- case "ThrottlingException":
624
- case "com.amazonaws.iotevents#ThrottlingException":
625
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
626
- default:
627
- const parsedBody = parsedOutput.body;
628
- return throwDefaultError({
629
- output,
630
- parsedBody,
631
- errorCode,
632
- });
633
- }
634
- };
635
428
  export const de_DescribeAlarmModelCommand = async (output, context) => {
636
429
  if (output.statusCode !== 200 && output.statusCode >= 300) {
637
- return de_DescribeAlarmModelCommandError(output, context);
430
+ return de_CommandError(output, context);
638
431
  }
639
432
  const contents = map({
640
433
  $metadata: deserializeMetadata(output),
@@ -660,40 +453,9 @@ export const de_DescribeAlarmModelCommand = async (output, context) => {
660
453
  Object.assign(contents, doc);
661
454
  return contents;
662
455
  };
663
- const de_DescribeAlarmModelCommandError = async (output, context) => {
664
- const parsedOutput = {
665
- ...output,
666
- body: await parseErrorBody(output.body, context),
667
- };
668
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
669
- switch (errorCode) {
670
- case "InternalFailureException":
671
- case "com.amazonaws.iotevents#InternalFailureException":
672
- throw await de_InternalFailureExceptionRes(parsedOutput, context);
673
- case "InvalidRequestException":
674
- case "com.amazonaws.iotevents#InvalidRequestException":
675
- throw await de_InvalidRequestExceptionRes(parsedOutput, context);
676
- case "ResourceNotFoundException":
677
- case "com.amazonaws.iotevents#ResourceNotFoundException":
678
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
679
- case "ServiceUnavailableException":
680
- case "com.amazonaws.iotevents#ServiceUnavailableException":
681
- throw await de_ServiceUnavailableExceptionRes(parsedOutput, context);
682
- case "ThrottlingException":
683
- case "com.amazonaws.iotevents#ThrottlingException":
684
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
685
- default:
686
- const parsedBody = parsedOutput.body;
687
- return throwDefaultError({
688
- output,
689
- parsedBody,
690
- errorCode,
691
- });
692
- }
693
- };
694
456
  export const de_DescribeDetectorModelCommand = async (output, context) => {
695
457
  if (output.statusCode !== 200 && output.statusCode >= 300) {
696
- return de_DescribeDetectorModelCommandError(output, context);
458
+ return de_CommandError(output, context);
697
459
  }
698
460
  const contents = map({
699
461
  $metadata: deserializeMetadata(output),
@@ -705,40 +467,9 @@ export const de_DescribeDetectorModelCommand = async (output, context) => {
705
467
  Object.assign(contents, doc);
706
468
  return contents;
707
469
  };
708
- const de_DescribeDetectorModelCommandError = async (output, context) => {
709
- const parsedOutput = {
710
- ...output,
711
- body: await parseErrorBody(output.body, context),
712
- };
713
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
714
- switch (errorCode) {
715
- case "InternalFailureException":
716
- case "com.amazonaws.iotevents#InternalFailureException":
717
- throw await de_InternalFailureExceptionRes(parsedOutput, context);
718
- case "InvalidRequestException":
719
- case "com.amazonaws.iotevents#InvalidRequestException":
720
- throw await de_InvalidRequestExceptionRes(parsedOutput, context);
721
- case "ResourceNotFoundException":
722
- case "com.amazonaws.iotevents#ResourceNotFoundException":
723
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
724
- case "ServiceUnavailableException":
725
- case "com.amazonaws.iotevents#ServiceUnavailableException":
726
- throw await de_ServiceUnavailableExceptionRes(parsedOutput, context);
727
- case "ThrottlingException":
728
- case "com.amazonaws.iotevents#ThrottlingException":
729
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
730
- default:
731
- const parsedBody = parsedOutput.body;
732
- return throwDefaultError({
733
- output,
734
- parsedBody,
735
- errorCode,
736
- });
737
- }
738
- };
739
470
  export const de_DescribeDetectorModelAnalysisCommand = async (output, context) => {
740
471
  if (output.statusCode !== 200 && output.statusCode >= 300) {
741
- return de_DescribeDetectorModelAnalysisCommandError(output, context);
472
+ return de_CommandError(output, context);
742
473
  }
743
474
  const contents = map({
744
475
  $metadata: deserializeMetadata(output),
@@ -750,40 +481,9 @@ export const de_DescribeDetectorModelAnalysisCommand = async (output, context) =
750
481
  Object.assign(contents, doc);
751
482
  return contents;
752
483
  };
753
- const de_DescribeDetectorModelAnalysisCommandError = async (output, context) => {
754
- const parsedOutput = {
755
- ...output,
756
- body: await parseErrorBody(output.body, context),
757
- };
758
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
759
- switch (errorCode) {
760
- case "InternalFailureException":
761
- case "com.amazonaws.iotevents#InternalFailureException":
762
- throw await de_InternalFailureExceptionRes(parsedOutput, context);
763
- case "InvalidRequestException":
764
- case "com.amazonaws.iotevents#InvalidRequestException":
765
- throw await de_InvalidRequestExceptionRes(parsedOutput, context);
766
- case "ResourceNotFoundException":
767
- case "com.amazonaws.iotevents#ResourceNotFoundException":
768
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
769
- case "ServiceUnavailableException":
770
- case "com.amazonaws.iotevents#ServiceUnavailableException":
771
- throw await de_ServiceUnavailableExceptionRes(parsedOutput, context);
772
- case "ThrottlingException":
773
- case "com.amazonaws.iotevents#ThrottlingException":
774
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
775
- default:
776
- const parsedBody = parsedOutput.body;
777
- return throwDefaultError({
778
- output,
779
- parsedBody,
780
- errorCode,
781
- });
782
- }
783
- };
784
484
  export const de_DescribeInputCommand = async (output, context) => {
785
485
  if (output.statusCode !== 200 && output.statusCode >= 300) {
786
- return de_DescribeInputCommandError(output, context);
486
+ return de_CommandError(output, context);
787
487
  }
788
488
  const contents = map({
789
489
  $metadata: deserializeMetadata(output),
@@ -795,40 +495,9 @@ export const de_DescribeInputCommand = async (output, context) => {
795
495
  Object.assign(contents, doc);
796
496
  return contents;
797
497
  };
798
- const de_DescribeInputCommandError = async (output, context) => {
799
- const parsedOutput = {
800
- ...output,
801
- body: await parseErrorBody(output.body, context),
802
- };
803
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
804
- switch (errorCode) {
805
- case "InternalFailureException":
806
- case "com.amazonaws.iotevents#InternalFailureException":
807
- throw await de_InternalFailureExceptionRes(parsedOutput, context);
808
- case "InvalidRequestException":
809
- case "com.amazonaws.iotevents#InvalidRequestException":
810
- throw await de_InvalidRequestExceptionRes(parsedOutput, context);
811
- case "ResourceNotFoundException":
812
- case "com.amazonaws.iotevents#ResourceNotFoundException":
813
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
814
- case "ServiceUnavailableException":
815
- case "com.amazonaws.iotevents#ServiceUnavailableException":
816
- throw await de_ServiceUnavailableExceptionRes(parsedOutput, context);
817
- case "ThrottlingException":
818
- case "com.amazonaws.iotevents#ThrottlingException":
819
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
820
- default:
821
- const parsedBody = parsedOutput.body;
822
- return throwDefaultError({
823
- output,
824
- parsedBody,
825
- errorCode,
826
- });
827
- }
828
- };
829
498
  export const de_DescribeLoggingOptionsCommand = async (output, context) => {
830
499
  if (output.statusCode !== 200 && output.statusCode >= 300) {
831
- return de_DescribeLoggingOptionsCommandError(output, context);
500
+ return de_CommandError(output, context);
832
501
  }
833
502
  const contents = map({
834
503
  $metadata: deserializeMetadata(output),
@@ -840,43 +509,9 @@ export const de_DescribeLoggingOptionsCommand = async (output, context) => {
840
509
  Object.assign(contents, doc);
841
510
  return contents;
842
511
  };
843
- const de_DescribeLoggingOptionsCommandError = async (output, context) => {
844
- const parsedOutput = {
845
- ...output,
846
- body: await parseErrorBody(output.body, context),
847
- };
848
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
849
- switch (errorCode) {
850
- case "InternalFailureException":
851
- case "com.amazonaws.iotevents#InternalFailureException":
852
- throw await de_InternalFailureExceptionRes(parsedOutput, context);
853
- case "InvalidRequestException":
854
- case "com.amazonaws.iotevents#InvalidRequestException":
855
- throw await de_InvalidRequestExceptionRes(parsedOutput, context);
856
- case "ResourceNotFoundException":
857
- case "com.amazonaws.iotevents#ResourceNotFoundException":
858
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
859
- case "ServiceUnavailableException":
860
- case "com.amazonaws.iotevents#ServiceUnavailableException":
861
- throw await de_ServiceUnavailableExceptionRes(parsedOutput, context);
862
- case "ThrottlingException":
863
- case "com.amazonaws.iotevents#ThrottlingException":
864
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
865
- case "UnsupportedOperationException":
866
- case "com.amazonaws.iotevents#UnsupportedOperationException":
867
- throw await de_UnsupportedOperationExceptionRes(parsedOutput, context);
868
- default:
869
- const parsedBody = parsedOutput.body;
870
- return throwDefaultError({
871
- output,
872
- parsedBody,
873
- errorCode,
874
- });
875
- }
876
- };
877
512
  export const de_GetDetectorModelAnalysisResultsCommand = async (output, context) => {
878
513
  if (output.statusCode !== 200 && output.statusCode >= 300) {
879
- return de_GetDetectorModelAnalysisResultsCommandError(output, context);
514
+ return de_CommandError(output, context);
880
515
  }
881
516
  const contents = map({
882
517
  $metadata: deserializeMetadata(output),
@@ -889,40 +524,9 @@ export const de_GetDetectorModelAnalysisResultsCommand = async (output, context)
889
524
  Object.assign(contents, doc);
890
525
  return contents;
891
526
  };
892
- const de_GetDetectorModelAnalysisResultsCommandError = async (output, context) => {
893
- const parsedOutput = {
894
- ...output,
895
- body: await parseErrorBody(output.body, context),
896
- };
897
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
898
- switch (errorCode) {
899
- case "InternalFailureException":
900
- case "com.amazonaws.iotevents#InternalFailureException":
901
- throw await de_InternalFailureExceptionRes(parsedOutput, context);
902
- case "InvalidRequestException":
903
- case "com.amazonaws.iotevents#InvalidRequestException":
904
- throw await de_InvalidRequestExceptionRes(parsedOutput, context);
905
- case "ResourceNotFoundException":
906
- case "com.amazonaws.iotevents#ResourceNotFoundException":
907
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
908
- case "ServiceUnavailableException":
909
- case "com.amazonaws.iotevents#ServiceUnavailableException":
910
- throw await de_ServiceUnavailableExceptionRes(parsedOutput, context);
911
- case "ThrottlingException":
912
- case "com.amazonaws.iotevents#ThrottlingException":
913
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
914
- default:
915
- const parsedBody = parsedOutput.body;
916
- return throwDefaultError({
917
- output,
918
- parsedBody,
919
- errorCode,
920
- });
921
- }
922
- };
923
527
  export const de_ListAlarmModelsCommand = async (output, context) => {
924
528
  if (output.statusCode !== 200 && output.statusCode >= 300) {
925
- return de_ListAlarmModelsCommandError(output, context);
529
+ return de_CommandError(output, context);
926
530
  }
927
531
  const contents = map({
928
532
  $metadata: deserializeMetadata(output),
@@ -935,37 +539,9 @@ export const de_ListAlarmModelsCommand = async (output, context) => {
935
539
  Object.assign(contents, doc);
936
540
  return contents;
937
541
  };
938
- const de_ListAlarmModelsCommandError = async (output, context) => {
939
- const parsedOutput = {
940
- ...output,
941
- body: await parseErrorBody(output.body, context),
942
- };
943
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
944
- switch (errorCode) {
945
- case "InternalFailureException":
946
- case "com.amazonaws.iotevents#InternalFailureException":
947
- throw await de_InternalFailureExceptionRes(parsedOutput, context);
948
- case "InvalidRequestException":
949
- case "com.amazonaws.iotevents#InvalidRequestException":
950
- throw await de_InvalidRequestExceptionRes(parsedOutput, context);
951
- case "ServiceUnavailableException":
952
- case "com.amazonaws.iotevents#ServiceUnavailableException":
953
- throw await de_ServiceUnavailableExceptionRes(parsedOutput, context);
954
- case "ThrottlingException":
955
- case "com.amazonaws.iotevents#ThrottlingException":
956
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
957
- default:
958
- const parsedBody = parsedOutput.body;
959
- return throwDefaultError({
960
- output,
961
- parsedBody,
962
- errorCode,
963
- });
964
- }
965
- };
966
542
  export const de_ListAlarmModelVersionsCommand = async (output, context) => {
967
543
  if (output.statusCode !== 200 && output.statusCode >= 300) {
968
- return de_ListAlarmModelVersionsCommandError(output, context);
544
+ return de_CommandError(output, context);
969
545
  }
970
546
  const contents = map({
971
547
  $metadata: deserializeMetadata(output),
@@ -978,40 +554,9 @@ export const de_ListAlarmModelVersionsCommand = async (output, context) => {
978
554
  Object.assign(contents, doc);
979
555
  return contents;
980
556
  };
981
- const de_ListAlarmModelVersionsCommandError = async (output, context) => {
982
- const parsedOutput = {
983
- ...output,
984
- body: await parseErrorBody(output.body, context),
985
- };
986
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
987
- switch (errorCode) {
988
- case "InternalFailureException":
989
- case "com.amazonaws.iotevents#InternalFailureException":
990
- throw await de_InternalFailureExceptionRes(parsedOutput, context);
991
- case "InvalidRequestException":
992
- case "com.amazonaws.iotevents#InvalidRequestException":
993
- throw await de_InvalidRequestExceptionRes(parsedOutput, context);
994
- case "ResourceNotFoundException":
995
- case "com.amazonaws.iotevents#ResourceNotFoundException":
996
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
997
- case "ServiceUnavailableException":
998
- case "com.amazonaws.iotevents#ServiceUnavailableException":
999
- throw await de_ServiceUnavailableExceptionRes(parsedOutput, context);
1000
- case "ThrottlingException":
1001
- case "com.amazonaws.iotevents#ThrottlingException":
1002
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
1003
- default:
1004
- const parsedBody = parsedOutput.body;
1005
- return throwDefaultError({
1006
- output,
1007
- parsedBody,
1008
- errorCode,
1009
- });
1010
- }
1011
- };
1012
557
  export const de_ListDetectorModelsCommand = async (output, context) => {
1013
558
  if (output.statusCode !== 200 && output.statusCode >= 300) {
1014
- return de_ListDetectorModelsCommandError(output, context);
559
+ return de_CommandError(output, context);
1015
560
  }
1016
561
  const contents = map({
1017
562
  $metadata: deserializeMetadata(output),
@@ -1024,37 +569,9 @@ export const de_ListDetectorModelsCommand = async (output, context) => {
1024
569
  Object.assign(contents, doc);
1025
570
  return contents;
1026
571
  };
1027
- const de_ListDetectorModelsCommandError = async (output, context) => {
1028
- const parsedOutput = {
1029
- ...output,
1030
- body: await parseErrorBody(output.body, context),
1031
- };
1032
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1033
- switch (errorCode) {
1034
- case "InternalFailureException":
1035
- case "com.amazonaws.iotevents#InternalFailureException":
1036
- throw await de_InternalFailureExceptionRes(parsedOutput, context);
1037
- case "InvalidRequestException":
1038
- case "com.amazonaws.iotevents#InvalidRequestException":
1039
- throw await de_InvalidRequestExceptionRes(parsedOutput, context);
1040
- case "ServiceUnavailableException":
1041
- case "com.amazonaws.iotevents#ServiceUnavailableException":
1042
- throw await de_ServiceUnavailableExceptionRes(parsedOutput, context);
1043
- case "ThrottlingException":
1044
- case "com.amazonaws.iotevents#ThrottlingException":
1045
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
1046
- default:
1047
- const parsedBody = parsedOutput.body;
1048
- return throwDefaultError({
1049
- output,
1050
- parsedBody,
1051
- errorCode,
1052
- });
1053
- }
1054
- };
1055
572
  export const de_ListDetectorModelVersionsCommand = async (output, context) => {
1056
573
  if (output.statusCode !== 200 && output.statusCode >= 300) {
1057
- return de_ListDetectorModelVersionsCommandError(output, context);
574
+ return de_CommandError(output, context);
1058
575
  }
1059
576
  const contents = map({
1060
577
  $metadata: deserializeMetadata(output),
@@ -1067,129 +584,39 @@ export const de_ListDetectorModelVersionsCommand = async (output, context) => {
1067
584
  Object.assign(contents, doc);
1068
585
  return contents;
1069
586
  };
1070
- const de_ListDetectorModelVersionsCommandError = async (output, context) => {
1071
- const parsedOutput = {
1072
- ...output,
1073
- body: await parseErrorBody(output.body, context),
1074
- };
1075
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1076
- switch (errorCode) {
1077
- case "InternalFailureException":
1078
- case "com.amazonaws.iotevents#InternalFailureException":
1079
- throw await de_InternalFailureExceptionRes(parsedOutput, context);
1080
- case "InvalidRequestException":
1081
- case "com.amazonaws.iotevents#InvalidRequestException":
1082
- throw await de_InvalidRequestExceptionRes(parsedOutput, context);
1083
- case "ResourceNotFoundException":
1084
- case "com.amazonaws.iotevents#ResourceNotFoundException":
1085
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
1086
- case "ServiceUnavailableException":
1087
- case "com.amazonaws.iotevents#ServiceUnavailableException":
1088
- throw await de_ServiceUnavailableExceptionRes(parsedOutput, context);
1089
- case "ThrottlingException":
1090
- case "com.amazonaws.iotevents#ThrottlingException":
1091
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
1092
- default:
1093
- const parsedBody = parsedOutput.body;
1094
- return throwDefaultError({
1095
- output,
1096
- parsedBody,
1097
- errorCode,
1098
- });
1099
- }
1100
- };
1101
587
  export const de_ListInputRoutingsCommand = async (output, context) => {
1102
588
  if (output.statusCode !== 200 && output.statusCode >= 300) {
1103
- return de_ListInputRoutingsCommandError(output, context);
589
+ return de_CommandError(output, context);
1104
590
  }
1105
591
  const contents = map({
1106
592
  $metadata: deserializeMetadata(output),
1107
593
  });
1108
594
  const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
1109
- const doc = take(data, {
1110
- nextToken: __expectString,
1111
- routedResources: _json,
1112
- });
1113
- Object.assign(contents, doc);
1114
- return contents;
1115
- };
1116
- const de_ListInputRoutingsCommandError = async (output, context) => {
1117
- const parsedOutput = {
1118
- ...output,
1119
- body: await parseErrorBody(output.body, context),
1120
- };
1121
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1122
- switch (errorCode) {
1123
- case "InternalFailureException":
1124
- case "com.amazonaws.iotevents#InternalFailureException":
1125
- throw await de_InternalFailureExceptionRes(parsedOutput, context);
1126
- case "InvalidRequestException":
1127
- case "com.amazonaws.iotevents#InvalidRequestException":
1128
- throw await de_InvalidRequestExceptionRes(parsedOutput, context);
1129
- case "ResourceNotFoundException":
1130
- case "com.amazonaws.iotevents#ResourceNotFoundException":
1131
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
1132
- case "ServiceUnavailableException":
1133
- case "com.amazonaws.iotevents#ServiceUnavailableException":
1134
- throw await de_ServiceUnavailableExceptionRes(parsedOutput, context);
1135
- case "ThrottlingException":
1136
- case "com.amazonaws.iotevents#ThrottlingException":
1137
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
1138
- default:
1139
- const parsedBody = parsedOutput.body;
1140
- return throwDefaultError({
1141
- output,
1142
- parsedBody,
1143
- errorCode,
1144
- });
1145
- }
1146
- };
1147
- export const de_ListInputsCommand = async (output, context) => {
1148
- if (output.statusCode !== 200 && output.statusCode >= 300) {
1149
- return de_ListInputsCommandError(output, context);
1150
- }
1151
- const contents = map({
1152
- $metadata: deserializeMetadata(output),
1153
- });
1154
- const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
1155
- const doc = take(data, {
1156
- inputSummaries: (_) => de_InputSummaries(_, context),
1157
- nextToken: __expectString,
1158
- });
1159
- Object.assign(contents, doc);
1160
- return contents;
1161
- };
1162
- const de_ListInputsCommandError = async (output, context) => {
1163
- const parsedOutput = {
1164
- ...output,
1165
- body: await parseErrorBody(output.body, context),
1166
- };
1167
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1168
- switch (errorCode) {
1169
- case "InternalFailureException":
1170
- case "com.amazonaws.iotevents#InternalFailureException":
1171
- throw await de_InternalFailureExceptionRes(parsedOutput, context);
1172
- case "InvalidRequestException":
1173
- case "com.amazonaws.iotevents#InvalidRequestException":
1174
- throw await de_InvalidRequestExceptionRes(parsedOutput, context);
1175
- case "ServiceUnavailableException":
1176
- case "com.amazonaws.iotevents#ServiceUnavailableException":
1177
- throw await de_ServiceUnavailableExceptionRes(parsedOutput, context);
1178
- case "ThrottlingException":
1179
- case "com.amazonaws.iotevents#ThrottlingException":
1180
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
1181
- default:
1182
- const parsedBody = parsedOutput.body;
1183
- return throwDefaultError({
1184
- output,
1185
- parsedBody,
1186
- errorCode,
1187
- });
595
+ const doc = take(data, {
596
+ nextToken: __expectString,
597
+ routedResources: _json,
598
+ });
599
+ Object.assign(contents, doc);
600
+ return contents;
601
+ };
602
+ export const de_ListInputsCommand = async (output, context) => {
603
+ if (output.statusCode !== 200 && output.statusCode >= 300) {
604
+ return de_CommandError(output, context);
1188
605
  }
606
+ const contents = map({
607
+ $metadata: deserializeMetadata(output),
608
+ });
609
+ const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
610
+ const doc = take(data, {
611
+ inputSummaries: (_) => de_InputSummaries(_, context),
612
+ nextToken: __expectString,
613
+ });
614
+ Object.assign(contents, doc);
615
+ return contents;
1189
616
  };
1190
617
  export const de_ListTagsForResourceCommand = async (output, context) => {
1191
618
  if (output.statusCode !== 200 && output.statusCode >= 300) {
1192
- return de_ListTagsForResourceCommandError(output, context);
619
+ return de_CommandError(output, context);
1193
620
  }
1194
621
  const contents = map({
1195
622
  $metadata: deserializeMetadata(output),
@@ -1201,40 +628,9 @@ export const de_ListTagsForResourceCommand = async (output, context) => {
1201
628
  Object.assign(contents, doc);
1202
629
  return contents;
1203
630
  };
1204
- const de_ListTagsForResourceCommandError = async (output, context) => {
1205
- const parsedOutput = {
1206
- ...output,
1207
- body: await parseErrorBody(output.body, context),
1208
- };
1209
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1210
- switch (errorCode) {
1211
- case "InternalFailureException":
1212
- case "com.amazonaws.iotevents#InternalFailureException":
1213
- throw await de_InternalFailureExceptionRes(parsedOutput, context);
1214
- case "InvalidRequestException":
1215
- case "com.amazonaws.iotevents#InvalidRequestException":
1216
- throw await de_InvalidRequestExceptionRes(parsedOutput, context);
1217
- case "ResourceInUseException":
1218
- case "com.amazonaws.iotevents#ResourceInUseException":
1219
- throw await de_ResourceInUseExceptionRes(parsedOutput, context);
1220
- case "ResourceNotFoundException":
1221
- case "com.amazonaws.iotevents#ResourceNotFoundException":
1222
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
1223
- case "ThrottlingException":
1224
- case "com.amazonaws.iotevents#ThrottlingException":
1225
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
1226
- default:
1227
- const parsedBody = parsedOutput.body;
1228
- return throwDefaultError({
1229
- output,
1230
- parsedBody,
1231
- errorCode,
1232
- });
1233
- }
1234
- };
1235
631
  export const de_PutLoggingOptionsCommand = async (output, context) => {
1236
632
  if (output.statusCode !== 200 && output.statusCode >= 300) {
1237
- return de_PutLoggingOptionsCommandError(output, context);
633
+ return de_CommandError(output, context);
1238
634
  }
1239
635
  const contents = map({
1240
636
  $metadata: deserializeMetadata(output),
@@ -1242,43 +638,9 @@ export const de_PutLoggingOptionsCommand = async (output, context) => {
1242
638
  await collectBody(output.body, context);
1243
639
  return contents;
1244
640
  };
1245
- const de_PutLoggingOptionsCommandError = async (output, context) => {
1246
- const parsedOutput = {
1247
- ...output,
1248
- body: await parseErrorBody(output.body, context),
1249
- };
1250
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1251
- switch (errorCode) {
1252
- case "InternalFailureException":
1253
- case "com.amazonaws.iotevents#InternalFailureException":
1254
- throw await de_InternalFailureExceptionRes(parsedOutput, context);
1255
- case "InvalidRequestException":
1256
- case "com.amazonaws.iotevents#InvalidRequestException":
1257
- throw await de_InvalidRequestExceptionRes(parsedOutput, context);
1258
- case "ResourceInUseException":
1259
- case "com.amazonaws.iotevents#ResourceInUseException":
1260
- throw await de_ResourceInUseExceptionRes(parsedOutput, context);
1261
- case "ServiceUnavailableException":
1262
- case "com.amazonaws.iotevents#ServiceUnavailableException":
1263
- throw await de_ServiceUnavailableExceptionRes(parsedOutput, context);
1264
- case "ThrottlingException":
1265
- case "com.amazonaws.iotevents#ThrottlingException":
1266
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
1267
- case "UnsupportedOperationException":
1268
- case "com.amazonaws.iotevents#UnsupportedOperationException":
1269
- throw await de_UnsupportedOperationExceptionRes(parsedOutput, context);
1270
- default:
1271
- const parsedBody = parsedOutput.body;
1272
- return throwDefaultError({
1273
- output,
1274
- parsedBody,
1275
- errorCode,
1276
- });
1277
- }
1278
- };
1279
641
  export const de_StartDetectorModelAnalysisCommand = async (output, context) => {
1280
642
  if (output.statusCode !== 200 && output.statusCode >= 300) {
1281
- return de_StartDetectorModelAnalysisCommandError(output, context);
643
+ return de_CommandError(output, context);
1282
644
  }
1283
645
  const contents = map({
1284
646
  $metadata: deserializeMetadata(output),
@@ -1290,40 +652,9 @@ export const de_StartDetectorModelAnalysisCommand = async (output, context) => {
1290
652
  Object.assign(contents, doc);
1291
653
  return contents;
1292
654
  };
1293
- const de_StartDetectorModelAnalysisCommandError = async (output, context) => {
1294
- const parsedOutput = {
1295
- ...output,
1296
- body: await parseErrorBody(output.body, context),
1297
- };
1298
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1299
- switch (errorCode) {
1300
- case "InternalFailureException":
1301
- case "com.amazonaws.iotevents#InternalFailureException":
1302
- throw await de_InternalFailureExceptionRes(parsedOutput, context);
1303
- case "InvalidRequestException":
1304
- case "com.amazonaws.iotevents#InvalidRequestException":
1305
- throw await de_InvalidRequestExceptionRes(parsedOutput, context);
1306
- case "LimitExceededException":
1307
- case "com.amazonaws.iotevents#LimitExceededException":
1308
- throw await de_LimitExceededExceptionRes(parsedOutput, context);
1309
- case "ServiceUnavailableException":
1310
- case "com.amazonaws.iotevents#ServiceUnavailableException":
1311
- throw await de_ServiceUnavailableExceptionRes(parsedOutput, context);
1312
- case "ThrottlingException":
1313
- case "com.amazonaws.iotevents#ThrottlingException":
1314
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
1315
- default:
1316
- const parsedBody = parsedOutput.body;
1317
- return throwDefaultError({
1318
- output,
1319
- parsedBody,
1320
- errorCode,
1321
- });
1322
- }
1323
- };
1324
655
  export const de_TagResourceCommand = async (output, context) => {
1325
656
  if (output.statusCode !== 200 && output.statusCode >= 300) {
1326
- return de_TagResourceCommandError(output, context);
657
+ return de_CommandError(output, context);
1327
658
  }
1328
659
  const contents = map({
1329
660
  $metadata: deserializeMetadata(output),
@@ -1331,43 +662,9 @@ export const de_TagResourceCommand = async (output, context) => {
1331
662
  await collectBody(output.body, context);
1332
663
  return contents;
1333
664
  };
1334
- const de_TagResourceCommandError = async (output, context) => {
1335
- const parsedOutput = {
1336
- ...output,
1337
- body: await parseErrorBody(output.body, context),
1338
- };
1339
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1340
- switch (errorCode) {
1341
- case "InternalFailureException":
1342
- case "com.amazonaws.iotevents#InternalFailureException":
1343
- throw await de_InternalFailureExceptionRes(parsedOutput, context);
1344
- case "InvalidRequestException":
1345
- case "com.amazonaws.iotevents#InvalidRequestException":
1346
- throw await de_InvalidRequestExceptionRes(parsedOutput, context);
1347
- case "LimitExceededException":
1348
- case "com.amazonaws.iotevents#LimitExceededException":
1349
- throw await de_LimitExceededExceptionRes(parsedOutput, context);
1350
- case "ResourceInUseException":
1351
- case "com.amazonaws.iotevents#ResourceInUseException":
1352
- throw await de_ResourceInUseExceptionRes(parsedOutput, context);
1353
- case "ResourceNotFoundException":
1354
- case "com.amazonaws.iotevents#ResourceNotFoundException":
1355
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
1356
- case "ThrottlingException":
1357
- case "com.amazonaws.iotevents#ThrottlingException":
1358
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
1359
- default:
1360
- const parsedBody = parsedOutput.body;
1361
- return throwDefaultError({
1362
- output,
1363
- parsedBody,
1364
- errorCode,
1365
- });
1366
- }
1367
- };
1368
665
  export const de_UntagResourceCommand = async (output, context) => {
1369
666
  if (output.statusCode !== 200 && output.statusCode >= 300) {
1370
- return de_UntagResourceCommandError(output, context);
667
+ return de_CommandError(output, context);
1371
668
  }
1372
669
  const contents = map({
1373
670
  $metadata: deserializeMetadata(output),
@@ -1375,40 +672,9 @@ export const de_UntagResourceCommand = async (output, context) => {
1375
672
  await collectBody(output.body, context);
1376
673
  return contents;
1377
674
  };
1378
- const de_UntagResourceCommandError = async (output, context) => {
1379
- const parsedOutput = {
1380
- ...output,
1381
- body: await parseErrorBody(output.body, context),
1382
- };
1383
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1384
- switch (errorCode) {
1385
- case "InternalFailureException":
1386
- case "com.amazonaws.iotevents#InternalFailureException":
1387
- throw await de_InternalFailureExceptionRes(parsedOutput, context);
1388
- case "InvalidRequestException":
1389
- case "com.amazonaws.iotevents#InvalidRequestException":
1390
- throw await de_InvalidRequestExceptionRes(parsedOutput, context);
1391
- case "ResourceInUseException":
1392
- case "com.amazonaws.iotevents#ResourceInUseException":
1393
- throw await de_ResourceInUseExceptionRes(parsedOutput, context);
1394
- case "ResourceNotFoundException":
1395
- case "com.amazonaws.iotevents#ResourceNotFoundException":
1396
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
1397
- case "ThrottlingException":
1398
- case "com.amazonaws.iotevents#ThrottlingException":
1399
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
1400
- default:
1401
- const parsedBody = parsedOutput.body;
1402
- return throwDefaultError({
1403
- output,
1404
- parsedBody,
1405
- errorCode,
1406
- });
1407
- }
1408
- };
1409
675
  export const de_UpdateAlarmModelCommand = async (output, context) => {
1410
676
  if (output.statusCode !== 200 && output.statusCode >= 300) {
1411
- return de_UpdateAlarmModelCommandError(output, context);
677
+ return de_CommandError(output, context);
1412
678
  }
1413
679
  const contents = map({
1414
680
  $metadata: deserializeMetadata(output),
@@ -1424,43 +690,9 @@ export const de_UpdateAlarmModelCommand = async (output, context) => {
1424
690
  Object.assign(contents, doc);
1425
691
  return contents;
1426
692
  };
1427
- const de_UpdateAlarmModelCommandError = async (output, context) => {
1428
- const parsedOutput = {
1429
- ...output,
1430
- body: await parseErrorBody(output.body, context),
1431
- };
1432
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1433
- switch (errorCode) {
1434
- case "InternalFailureException":
1435
- case "com.amazonaws.iotevents#InternalFailureException":
1436
- throw await de_InternalFailureExceptionRes(parsedOutput, context);
1437
- case "InvalidRequestException":
1438
- case "com.amazonaws.iotevents#InvalidRequestException":
1439
- throw await de_InvalidRequestExceptionRes(parsedOutput, context);
1440
- case "ResourceInUseException":
1441
- case "com.amazonaws.iotevents#ResourceInUseException":
1442
- throw await de_ResourceInUseExceptionRes(parsedOutput, context);
1443
- case "ResourceNotFoundException":
1444
- case "com.amazonaws.iotevents#ResourceNotFoundException":
1445
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
1446
- case "ServiceUnavailableException":
1447
- case "com.amazonaws.iotevents#ServiceUnavailableException":
1448
- throw await de_ServiceUnavailableExceptionRes(parsedOutput, context);
1449
- case "ThrottlingException":
1450
- case "com.amazonaws.iotevents#ThrottlingException":
1451
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
1452
- default:
1453
- const parsedBody = parsedOutput.body;
1454
- return throwDefaultError({
1455
- output,
1456
- parsedBody,
1457
- errorCode,
1458
- });
1459
- }
1460
- };
1461
693
  export const de_UpdateDetectorModelCommand = async (output, context) => {
1462
694
  if (output.statusCode !== 200 && output.statusCode >= 300) {
1463
- return de_UpdateDetectorModelCommandError(output, context);
695
+ return de_CommandError(output, context);
1464
696
  }
1465
697
  const contents = map({
1466
698
  $metadata: deserializeMetadata(output),
@@ -1472,43 +704,9 @@ export const de_UpdateDetectorModelCommand = async (output, context) => {
1472
704
  Object.assign(contents, doc);
1473
705
  return contents;
1474
706
  };
1475
- const de_UpdateDetectorModelCommandError = async (output, context) => {
1476
- const parsedOutput = {
1477
- ...output,
1478
- body: await parseErrorBody(output.body, context),
1479
- };
1480
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1481
- switch (errorCode) {
1482
- case "InternalFailureException":
1483
- case "com.amazonaws.iotevents#InternalFailureException":
1484
- throw await de_InternalFailureExceptionRes(parsedOutput, context);
1485
- case "InvalidRequestException":
1486
- case "com.amazonaws.iotevents#InvalidRequestException":
1487
- throw await de_InvalidRequestExceptionRes(parsedOutput, context);
1488
- case "ResourceInUseException":
1489
- case "com.amazonaws.iotevents#ResourceInUseException":
1490
- throw await de_ResourceInUseExceptionRes(parsedOutput, context);
1491
- case "ResourceNotFoundException":
1492
- case "com.amazonaws.iotevents#ResourceNotFoundException":
1493
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
1494
- case "ServiceUnavailableException":
1495
- case "com.amazonaws.iotevents#ServiceUnavailableException":
1496
- throw await de_ServiceUnavailableExceptionRes(parsedOutput, context);
1497
- case "ThrottlingException":
1498
- case "com.amazonaws.iotevents#ThrottlingException":
1499
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
1500
- default:
1501
- const parsedBody = parsedOutput.body;
1502
- return throwDefaultError({
1503
- output,
1504
- parsedBody,
1505
- errorCode,
1506
- });
1507
- }
1508
- };
1509
707
  export const de_UpdateInputCommand = async (output, context) => {
1510
708
  if (output.statusCode !== 200 && output.statusCode >= 300) {
1511
- return de_UpdateInputCommandError(output, context);
709
+ return de_CommandError(output, context);
1512
710
  }
1513
711
  const contents = map({
1514
712
  $metadata: deserializeMetadata(output),
@@ -1520,7 +718,7 @@ export const de_UpdateInputCommand = async (output, context) => {
1520
718
  Object.assign(contents, doc);
1521
719
  return contents;
1522
720
  };
1523
- const de_UpdateInputCommandError = async (output, context) => {
721
+ const de_CommandError = async (output, context) => {
1524
722
  const parsedOutput = {
1525
723
  ...output,
1526
724
  body: await parseErrorBody(output.body, context),
@@ -1533,18 +731,27 @@ const de_UpdateInputCommandError = async (output, context) => {
1533
731
  case "InvalidRequestException":
1534
732
  case "com.amazonaws.iotevents#InvalidRequestException":
1535
733
  throw await de_InvalidRequestExceptionRes(parsedOutput, context);
734
+ case "LimitExceededException":
735
+ case "com.amazonaws.iotevents#LimitExceededException":
736
+ throw await de_LimitExceededExceptionRes(parsedOutput, context);
737
+ case "ResourceAlreadyExistsException":
738
+ case "com.amazonaws.iotevents#ResourceAlreadyExistsException":
739
+ throw await de_ResourceAlreadyExistsExceptionRes(parsedOutput, context);
1536
740
  case "ResourceInUseException":
1537
741
  case "com.amazonaws.iotevents#ResourceInUseException":
1538
742
  throw await de_ResourceInUseExceptionRes(parsedOutput, context);
1539
- case "ResourceNotFoundException":
1540
- case "com.amazonaws.iotevents#ResourceNotFoundException":
1541
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
1542
743
  case "ServiceUnavailableException":
1543
744
  case "com.amazonaws.iotevents#ServiceUnavailableException":
1544
745
  throw await de_ServiceUnavailableExceptionRes(parsedOutput, context);
1545
746
  case "ThrottlingException":
1546
747
  case "com.amazonaws.iotevents#ThrottlingException":
1547
748
  throw await de_ThrottlingExceptionRes(parsedOutput, context);
749
+ case "ResourceNotFoundException":
750
+ case "com.amazonaws.iotevents#ResourceNotFoundException":
751
+ throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
752
+ case "UnsupportedOperationException":
753
+ case "com.amazonaws.iotevents#UnsupportedOperationException":
754
+ throw await de_UnsupportedOperationExceptionRes(parsedOutput, context);
1548
755
  default:
1549
756
  const parsedBody = parsedOutput.body;
1550
757
  return throwDefaultError({