@aws-sdk/client-devops-guru 3.503.1 → 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.
@@ -429,7 +429,7 @@ export const se_UpdateServiceIntegrationCommand = async (input, context) => {
429
429
  };
430
430
  export const de_AddNotificationChannelCommand = async (output, context) => {
431
431
  if (output.statusCode !== 200 && output.statusCode >= 300) {
432
- return de_AddNotificationChannelCommandError(output, context);
432
+ return de_CommandError(output, context);
433
433
  }
434
434
  const contents = map({
435
435
  $metadata: deserializeMetadata(output),
@@ -441,46 +441,9 @@ export const de_AddNotificationChannelCommand = async (output, context) => {
441
441
  Object.assign(contents, doc);
442
442
  return contents;
443
443
  };
444
- const de_AddNotificationChannelCommandError = async (output, context) => {
445
- const parsedOutput = {
446
- ...output,
447
- body: await parseErrorBody(output.body, context),
448
- };
449
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
450
- switch (errorCode) {
451
- case "AccessDeniedException":
452
- case "com.amazonaws.devopsguru#AccessDeniedException":
453
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
454
- case "ConflictException":
455
- case "com.amazonaws.devopsguru#ConflictException":
456
- throw await de_ConflictExceptionRes(parsedOutput, context);
457
- case "InternalServerException":
458
- case "com.amazonaws.devopsguru#InternalServerException":
459
- throw await de_InternalServerExceptionRes(parsedOutput, context);
460
- case "ResourceNotFoundException":
461
- case "com.amazonaws.devopsguru#ResourceNotFoundException":
462
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
463
- case "ServiceQuotaExceededException":
464
- case "com.amazonaws.devopsguru#ServiceQuotaExceededException":
465
- throw await de_ServiceQuotaExceededExceptionRes(parsedOutput, context);
466
- case "ThrottlingException":
467
- case "com.amazonaws.devopsguru#ThrottlingException":
468
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
469
- case "ValidationException":
470
- case "com.amazonaws.devopsguru#ValidationException":
471
- throw await de_ValidationExceptionRes(parsedOutput, context);
472
- default:
473
- const parsedBody = parsedOutput.body;
474
- return throwDefaultError({
475
- output,
476
- parsedBody,
477
- errorCode,
478
- });
479
- }
480
- };
481
444
  export const de_DeleteInsightCommand = async (output, context) => {
482
445
  if (output.statusCode !== 200 && output.statusCode >= 300) {
483
- return de_DeleteInsightCommandError(output, context);
446
+ return de_CommandError(output, context);
484
447
  }
485
448
  const contents = map({
486
449
  $metadata: deserializeMetadata(output),
@@ -488,43 +451,9 @@ export const de_DeleteInsightCommand = async (output, context) => {
488
451
  await collectBody(output.body, context);
489
452
  return contents;
490
453
  };
491
- const de_DeleteInsightCommandError = async (output, context) => {
492
- const parsedOutput = {
493
- ...output,
494
- body: await parseErrorBody(output.body, context),
495
- };
496
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
497
- switch (errorCode) {
498
- case "AccessDeniedException":
499
- case "com.amazonaws.devopsguru#AccessDeniedException":
500
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
501
- case "ConflictException":
502
- case "com.amazonaws.devopsguru#ConflictException":
503
- throw await de_ConflictExceptionRes(parsedOutput, context);
504
- case "InternalServerException":
505
- case "com.amazonaws.devopsguru#InternalServerException":
506
- throw await de_InternalServerExceptionRes(parsedOutput, context);
507
- case "ResourceNotFoundException":
508
- case "com.amazonaws.devopsguru#ResourceNotFoundException":
509
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
510
- case "ThrottlingException":
511
- case "com.amazonaws.devopsguru#ThrottlingException":
512
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
513
- case "ValidationException":
514
- case "com.amazonaws.devopsguru#ValidationException":
515
- throw await de_ValidationExceptionRes(parsedOutput, context);
516
- default:
517
- const parsedBody = parsedOutput.body;
518
- return throwDefaultError({
519
- output,
520
- parsedBody,
521
- errorCode,
522
- });
523
- }
524
- };
525
454
  export const de_DescribeAccountHealthCommand = async (output, context) => {
526
455
  if (output.statusCode !== 200 && output.statusCode >= 300) {
527
- return de_DescribeAccountHealthCommandError(output, context);
456
+ return de_CommandError(output, context);
528
457
  }
529
458
  const contents = map({
530
459
  $metadata: deserializeMetadata(output),
@@ -540,37 +469,9 @@ export const de_DescribeAccountHealthCommand = async (output, context) => {
540
469
  Object.assign(contents, doc);
541
470
  return contents;
542
471
  };
543
- const de_DescribeAccountHealthCommandError = async (output, context) => {
544
- const parsedOutput = {
545
- ...output,
546
- body: await parseErrorBody(output.body, context),
547
- };
548
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
549
- switch (errorCode) {
550
- case "AccessDeniedException":
551
- case "com.amazonaws.devopsguru#AccessDeniedException":
552
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
553
- case "InternalServerException":
554
- case "com.amazonaws.devopsguru#InternalServerException":
555
- throw await de_InternalServerExceptionRes(parsedOutput, context);
556
- case "ThrottlingException":
557
- case "com.amazonaws.devopsguru#ThrottlingException":
558
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
559
- case "ValidationException":
560
- case "com.amazonaws.devopsguru#ValidationException":
561
- throw await de_ValidationExceptionRes(parsedOutput, context);
562
- default:
563
- const parsedBody = parsedOutput.body;
564
- return throwDefaultError({
565
- output,
566
- parsedBody,
567
- errorCode,
568
- });
569
- }
570
- };
571
472
  export const de_DescribeAccountOverviewCommand = async (output, context) => {
572
473
  if (output.statusCode !== 200 && output.statusCode >= 300) {
573
- return de_DescribeAccountOverviewCommandError(output, context);
474
+ return de_CommandError(output, context);
574
475
  }
575
476
  const contents = map({
576
477
  $metadata: deserializeMetadata(output),
@@ -584,37 +485,9 @@ export const de_DescribeAccountOverviewCommand = async (output, context) => {
584
485
  Object.assign(contents, doc);
585
486
  return contents;
586
487
  };
587
- const de_DescribeAccountOverviewCommandError = async (output, context) => {
588
- const parsedOutput = {
589
- ...output,
590
- body: await parseErrorBody(output.body, context),
591
- };
592
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
593
- switch (errorCode) {
594
- case "AccessDeniedException":
595
- case "com.amazonaws.devopsguru#AccessDeniedException":
596
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
597
- case "InternalServerException":
598
- case "com.amazonaws.devopsguru#InternalServerException":
599
- throw await de_InternalServerExceptionRes(parsedOutput, context);
600
- case "ThrottlingException":
601
- case "com.amazonaws.devopsguru#ThrottlingException":
602
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
603
- case "ValidationException":
604
- case "com.amazonaws.devopsguru#ValidationException":
605
- throw await de_ValidationExceptionRes(parsedOutput, context);
606
- default:
607
- const parsedBody = parsedOutput.body;
608
- return throwDefaultError({
609
- output,
610
- parsedBody,
611
- errorCode,
612
- });
613
- }
614
- };
615
488
  export const de_DescribeAnomalyCommand = async (output, context) => {
616
489
  if (output.statusCode !== 200 && output.statusCode >= 300) {
617
- return de_DescribeAnomalyCommandError(output, context);
490
+ return de_CommandError(output, context);
618
491
  }
619
492
  const contents = map({
620
493
  $metadata: deserializeMetadata(output),
@@ -627,40 +500,9 @@ export const de_DescribeAnomalyCommand = async (output, context) => {
627
500
  Object.assign(contents, doc);
628
501
  return contents;
629
502
  };
630
- const de_DescribeAnomalyCommandError = async (output, context) => {
631
- const parsedOutput = {
632
- ...output,
633
- body: await parseErrorBody(output.body, context),
634
- };
635
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
636
- switch (errorCode) {
637
- case "AccessDeniedException":
638
- case "com.amazonaws.devopsguru#AccessDeniedException":
639
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
640
- case "InternalServerException":
641
- case "com.amazonaws.devopsguru#InternalServerException":
642
- throw await de_InternalServerExceptionRes(parsedOutput, context);
643
- case "ResourceNotFoundException":
644
- case "com.amazonaws.devopsguru#ResourceNotFoundException":
645
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
646
- case "ThrottlingException":
647
- case "com.amazonaws.devopsguru#ThrottlingException":
648
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
649
- case "ValidationException":
650
- case "com.amazonaws.devopsguru#ValidationException":
651
- throw await de_ValidationExceptionRes(parsedOutput, context);
652
- default:
653
- const parsedBody = parsedOutput.body;
654
- return throwDefaultError({
655
- output,
656
- parsedBody,
657
- errorCode,
658
- });
659
- }
660
- };
661
503
  export const de_DescribeEventSourcesConfigCommand = async (output, context) => {
662
504
  if (output.statusCode !== 200 && output.statusCode >= 300) {
663
- return de_DescribeEventSourcesConfigCommandError(output, context);
505
+ return de_CommandError(output, context);
664
506
  }
665
507
  const contents = map({
666
508
  $metadata: deserializeMetadata(output),
@@ -672,37 +514,9 @@ export const de_DescribeEventSourcesConfigCommand = async (output, context) => {
672
514
  Object.assign(contents, doc);
673
515
  return contents;
674
516
  };
675
- const de_DescribeEventSourcesConfigCommandError = async (output, context) => {
676
- const parsedOutput = {
677
- ...output,
678
- body: await parseErrorBody(output.body, context),
679
- };
680
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
681
- switch (errorCode) {
682
- case "AccessDeniedException":
683
- case "com.amazonaws.devopsguru#AccessDeniedException":
684
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
685
- case "InternalServerException":
686
- case "com.amazonaws.devopsguru#InternalServerException":
687
- throw await de_InternalServerExceptionRes(parsedOutput, context);
688
- case "ThrottlingException":
689
- case "com.amazonaws.devopsguru#ThrottlingException":
690
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
691
- case "ValidationException":
692
- case "com.amazonaws.devopsguru#ValidationException":
693
- throw await de_ValidationExceptionRes(parsedOutput, context);
694
- default:
695
- const parsedBody = parsedOutput.body;
696
- return throwDefaultError({
697
- output,
698
- parsedBody,
699
- errorCode,
700
- });
701
- }
702
- };
703
517
  export const de_DescribeFeedbackCommand = async (output, context) => {
704
518
  if (output.statusCode !== 200 && output.statusCode >= 300) {
705
- return de_DescribeFeedbackCommandError(output, context);
519
+ return de_CommandError(output, context);
706
520
  }
707
521
  const contents = map({
708
522
  $metadata: deserializeMetadata(output),
@@ -714,40 +528,9 @@ export const de_DescribeFeedbackCommand = async (output, context) => {
714
528
  Object.assign(contents, doc);
715
529
  return contents;
716
530
  };
717
- const de_DescribeFeedbackCommandError = async (output, context) => {
718
- const parsedOutput = {
719
- ...output,
720
- body: await parseErrorBody(output.body, context),
721
- };
722
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
723
- switch (errorCode) {
724
- case "AccessDeniedException":
725
- case "com.amazonaws.devopsguru#AccessDeniedException":
726
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
727
- case "InternalServerException":
728
- case "com.amazonaws.devopsguru#InternalServerException":
729
- throw await de_InternalServerExceptionRes(parsedOutput, context);
730
- case "ResourceNotFoundException":
731
- case "com.amazonaws.devopsguru#ResourceNotFoundException":
732
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
733
- case "ThrottlingException":
734
- case "com.amazonaws.devopsguru#ThrottlingException":
735
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
736
- case "ValidationException":
737
- case "com.amazonaws.devopsguru#ValidationException":
738
- throw await de_ValidationExceptionRes(parsedOutput, context);
739
- default:
740
- const parsedBody = parsedOutput.body;
741
- return throwDefaultError({
742
- output,
743
- parsedBody,
744
- errorCode,
745
- });
746
- }
747
- };
748
531
  export const de_DescribeInsightCommand = async (output, context) => {
749
532
  if (output.statusCode !== 200 && output.statusCode >= 300) {
750
- return de_DescribeInsightCommandError(output, context);
533
+ return de_CommandError(output, context);
751
534
  }
752
535
  const contents = map({
753
536
  $metadata: deserializeMetadata(output),
@@ -760,40 +543,9 @@ export const de_DescribeInsightCommand = async (output, context) => {
760
543
  Object.assign(contents, doc);
761
544
  return contents;
762
545
  };
763
- const de_DescribeInsightCommandError = async (output, context) => {
764
- const parsedOutput = {
765
- ...output,
766
- body: await parseErrorBody(output.body, context),
767
- };
768
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
769
- switch (errorCode) {
770
- case "AccessDeniedException":
771
- case "com.amazonaws.devopsguru#AccessDeniedException":
772
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
773
- case "InternalServerException":
774
- case "com.amazonaws.devopsguru#InternalServerException":
775
- throw await de_InternalServerExceptionRes(parsedOutput, context);
776
- case "ResourceNotFoundException":
777
- case "com.amazonaws.devopsguru#ResourceNotFoundException":
778
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
779
- case "ThrottlingException":
780
- case "com.amazonaws.devopsguru#ThrottlingException":
781
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
782
- case "ValidationException":
783
- case "com.amazonaws.devopsguru#ValidationException":
784
- throw await de_ValidationExceptionRes(parsedOutput, context);
785
- default:
786
- const parsedBody = parsedOutput.body;
787
- return throwDefaultError({
788
- output,
789
- parsedBody,
790
- errorCode,
791
- });
792
- }
793
- };
794
546
  export const de_DescribeOrganizationHealthCommand = async (output, context) => {
795
547
  if (output.statusCode !== 200 && output.statusCode >= 300) {
796
- return de_DescribeOrganizationHealthCommandError(output, context);
548
+ return de_CommandError(output, context);
797
549
  }
798
550
  const contents = map({
799
551
  $metadata: deserializeMetadata(output),
@@ -808,37 +560,9 @@ export const de_DescribeOrganizationHealthCommand = async (output, context) => {
808
560
  Object.assign(contents, doc);
809
561
  return contents;
810
562
  };
811
- const de_DescribeOrganizationHealthCommandError = async (output, context) => {
812
- const parsedOutput = {
813
- ...output,
814
- body: await parseErrorBody(output.body, context),
815
- };
816
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
817
- switch (errorCode) {
818
- case "AccessDeniedException":
819
- case "com.amazonaws.devopsguru#AccessDeniedException":
820
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
821
- case "InternalServerException":
822
- case "com.amazonaws.devopsguru#InternalServerException":
823
- throw await de_InternalServerExceptionRes(parsedOutput, context);
824
- case "ThrottlingException":
825
- case "com.amazonaws.devopsguru#ThrottlingException":
826
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
827
- case "ValidationException":
828
- case "com.amazonaws.devopsguru#ValidationException":
829
- throw await de_ValidationExceptionRes(parsedOutput, context);
830
- default:
831
- const parsedBody = parsedOutput.body;
832
- return throwDefaultError({
833
- output,
834
- parsedBody,
835
- errorCode,
836
- });
837
- }
838
- };
839
563
  export const de_DescribeOrganizationOverviewCommand = async (output, context) => {
840
564
  if (output.statusCode !== 200 && output.statusCode >= 300) {
841
- return de_DescribeOrganizationOverviewCommandError(output, context);
565
+ return de_CommandError(output, context);
842
566
  }
843
567
  const contents = map({
844
568
  $metadata: deserializeMetadata(output),
@@ -851,37 +575,9 @@ export const de_DescribeOrganizationOverviewCommand = async (output, context) =>
851
575
  Object.assign(contents, doc);
852
576
  return contents;
853
577
  };
854
- const de_DescribeOrganizationOverviewCommandError = async (output, context) => {
855
- const parsedOutput = {
856
- ...output,
857
- body: await parseErrorBody(output.body, context),
858
- };
859
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
860
- switch (errorCode) {
861
- case "AccessDeniedException":
862
- case "com.amazonaws.devopsguru#AccessDeniedException":
863
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
864
- case "InternalServerException":
865
- case "com.amazonaws.devopsguru#InternalServerException":
866
- throw await de_InternalServerExceptionRes(parsedOutput, context);
867
- case "ThrottlingException":
868
- case "com.amazonaws.devopsguru#ThrottlingException":
869
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
870
- case "ValidationException":
871
- case "com.amazonaws.devopsguru#ValidationException":
872
- throw await de_ValidationExceptionRes(parsedOutput, context);
873
- default:
874
- const parsedBody = parsedOutput.body;
875
- return throwDefaultError({
876
- output,
877
- parsedBody,
878
- errorCode,
879
- });
880
- }
881
- };
882
578
  export const de_DescribeOrganizationResourceCollectionHealthCommand = async (output, context) => {
883
579
  if (output.statusCode !== 200 && output.statusCode >= 300) {
884
- return de_DescribeOrganizationResourceCollectionHealthCommandError(output, context);
580
+ return de_CommandError(output, context);
885
581
  }
886
582
  const contents = map({
887
583
  $metadata: deserializeMetadata(output),
@@ -897,37 +593,9 @@ export const de_DescribeOrganizationResourceCollectionHealthCommand = async (out
897
593
  Object.assign(contents, doc);
898
594
  return contents;
899
595
  };
900
- const de_DescribeOrganizationResourceCollectionHealthCommandError = async (output, context) => {
901
- const parsedOutput = {
902
- ...output,
903
- body: await parseErrorBody(output.body, context),
904
- };
905
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
906
- switch (errorCode) {
907
- case "AccessDeniedException":
908
- case "com.amazonaws.devopsguru#AccessDeniedException":
909
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
910
- case "InternalServerException":
911
- case "com.amazonaws.devopsguru#InternalServerException":
912
- throw await de_InternalServerExceptionRes(parsedOutput, context);
913
- case "ThrottlingException":
914
- case "com.amazonaws.devopsguru#ThrottlingException":
915
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
916
- case "ValidationException":
917
- case "com.amazonaws.devopsguru#ValidationException":
918
- throw await de_ValidationExceptionRes(parsedOutput, context);
919
- default:
920
- const parsedBody = parsedOutput.body;
921
- return throwDefaultError({
922
- output,
923
- parsedBody,
924
- errorCode,
925
- });
926
- }
927
- };
928
596
  export const de_DescribeResourceCollectionHealthCommand = async (output, context) => {
929
597
  if (output.statusCode !== 200 && output.statusCode >= 300) {
930
- return de_DescribeResourceCollectionHealthCommandError(output, context);
598
+ return de_CommandError(output, context);
931
599
  }
932
600
  const contents = map({
933
601
  $metadata: deserializeMetadata(output),
@@ -942,37 +610,9 @@ export const de_DescribeResourceCollectionHealthCommand = async (output, context
942
610
  Object.assign(contents, doc);
943
611
  return contents;
944
612
  };
945
- const de_DescribeResourceCollectionHealthCommandError = async (output, context) => {
946
- const parsedOutput = {
947
- ...output,
948
- body: await parseErrorBody(output.body, context),
949
- };
950
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
951
- switch (errorCode) {
952
- case "AccessDeniedException":
953
- case "com.amazonaws.devopsguru#AccessDeniedException":
954
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
955
- case "InternalServerException":
956
- case "com.amazonaws.devopsguru#InternalServerException":
957
- throw await de_InternalServerExceptionRes(parsedOutput, context);
958
- case "ThrottlingException":
959
- case "com.amazonaws.devopsguru#ThrottlingException":
960
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
961
- case "ValidationException":
962
- case "com.amazonaws.devopsguru#ValidationException":
963
- throw await de_ValidationExceptionRes(parsedOutput, context);
964
- default:
965
- const parsedBody = parsedOutput.body;
966
- return throwDefaultError({
967
- output,
968
- parsedBody,
969
- errorCode,
970
- });
971
- }
972
- };
973
613
  export const de_DescribeServiceIntegrationCommand = async (output, context) => {
974
614
  if (output.statusCode !== 200 && output.statusCode >= 300) {
975
- return de_DescribeServiceIntegrationCommandError(output, context);
615
+ return de_CommandError(output, context);
976
616
  }
977
617
  const contents = map({
978
618
  $metadata: deserializeMetadata(output),
@@ -984,40 +624,9 @@ export const de_DescribeServiceIntegrationCommand = async (output, context) => {
984
624
  Object.assign(contents, doc);
985
625
  return contents;
986
626
  };
987
- const de_DescribeServiceIntegrationCommandError = async (output, context) => {
988
- const parsedOutput = {
989
- ...output,
990
- body: await parseErrorBody(output.body, context),
991
- };
992
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
993
- switch (errorCode) {
994
- case "AccessDeniedException":
995
- case "com.amazonaws.devopsguru#AccessDeniedException":
996
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
997
- case "InternalServerException":
998
- case "com.amazonaws.devopsguru#InternalServerException":
999
- throw await de_InternalServerExceptionRes(parsedOutput, context);
1000
- case "ResourceNotFoundException":
1001
- case "com.amazonaws.devopsguru#ResourceNotFoundException":
1002
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
1003
- case "ThrottlingException":
1004
- case "com.amazonaws.devopsguru#ThrottlingException":
1005
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
1006
- case "ValidationException":
1007
- case "com.amazonaws.devopsguru#ValidationException":
1008
- throw await de_ValidationExceptionRes(parsedOutput, context);
1009
- default:
1010
- const parsedBody = parsedOutput.body;
1011
- return throwDefaultError({
1012
- output,
1013
- parsedBody,
1014
- errorCode,
1015
- });
1016
- }
1017
- };
1018
627
  export const de_GetCostEstimationCommand = async (output, context) => {
1019
628
  if (output.statusCode !== 200 && output.statusCode >= 300) {
1020
- return de_GetCostEstimationCommandError(output, context);
629
+ return de_CommandError(output, context);
1021
630
  }
1022
631
  const contents = map({
1023
632
  $metadata: deserializeMetadata(output),
@@ -1034,40 +643,9 @@ export const de_GetCostEstimationCommand = async (output, context) => {
1034
643
  Object.assign(contents, doc);
1035
644
  return contents;
1036
645
  };
1037
- const de_GetCostEstimationCommandError = async (output, context) => {
1038
- const parsedOutput = {
1039
- ...output,
1040
- body: await parseErrorBody(output.body, context),
1041
- };
1042
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1043
- switch (errorCode) {
1044
- case "AccessDeniedException":
1045
- case "com.amazonaws.devopsguru#AccessDeniedException":
1046
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
1047
- case "InternalServerException":
1048
- case "com.amazonaws.devopsguru#InternalServerException":
1049
- throw await de_InternalServerExceptionRes(parsedOutput, context);
1050
- case "ResourceNotFoundException":
1051
- case "com.amazonaws.devopsguru#ResourceNotFoundException":
1052
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
1053
- case "ThrottlingException":
1054
- case "com.amazonaws.devopsguru#ThrottlingException":
1055
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
1056
- case "ValidationException":
1057
- case "com.amazonaws.devopsguru#ValidationException":
1058
- throw await de_ValidationExceptionRes(parsedOutput, context);
1059
- default:
1060
- const parsedBody = parsedOutput.body;
1061
- return throwDefaultError({
1062
- output,
1063
- parsedBody,
1064
- errorCode,
1065
- });
1066
- }
1067
- };
1068
646
  export const de_GetResourceCollectionCommand = async (output, context) => {
1069
647
  if (output.statusCode !== 200 && output.statusCode >= 300) {
1070
- return de_GetResourceCollectionCommandError(output, context);
648
+ return de_CommandError(output, context);
1071
649
  }
1072
650
  const contents = map({
1073
651
  $metadata: deserializeMetadata(output),
@@ -1080,40 +658,9 @@ export const de_GetResourceCollectionCommand = async (output, context) => {
1080
658
  Object.assign(contents, doc);
1081
659
  return contents;
1082
660
  };
1083
- const de_GetResourceCollectionCommandError = async (output, context) => {
1084
- const parsedOutput = {
1085
- ...output,
1086
- body: await parseErrorBody(output.body, context),
1087
- };
1088
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1089
- switch (errorCode) {
1090
- case "AccessDeniedException":
1091
- case "com.amazonaws.devopsguru#AccessDeniedException":
1092
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
1093
- case "InternalServerException":
1094
- case "com.amazonaws.devopsguru#InternalServerException":
1095
- throw await de_InternalServerExceptionRes(parsedOutput, context);
1096
- case "ResourceNotFoundException":
1097
- case "com.amazonaws.devopsguru#ResourceNotFoundException":
1098
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
1099
- case "ThrottlingException":
1100
- case "com.amazonaws.devopsguru#ThrottlingException":
1101
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
1102
- case "ValidationException":
1103
- case "com.amazonaws.devopsguru#ValidationException":
1104
- throw await de_ValidationExceptionRes(parsedOutput, context);
1105
- default:
1106
- const parsedBody = parsedOutput.body;
1107
- return throwDefaultError({
1108
- output,
1109
- parsedBody,
1110
- errorCode,
1111
- });
1112
- }
1113
- };
1114
661
  export const de_ListAnomaliesForInsightCommand = async (output, context) => {
1115
662
  if (output.statusCode !== 200 && output.statusCode >= 300) {
1116
- return de_ListAnomaliesForInsightCommandError(output, context);
663
+ return de_CommandError(output, context);
1117
664
  }
1118
665
  const contents = map({
1119
666
  $metadata: deserializeMetadata(output),
@@ -1127,40 +674,9 @@ export const de_ListAnomaliesForInsightCommand = async (output, context) => {
1127
674
  Object.assign(contents, doc);
1128
675
  return contents;
1129
676
  };
1130
- const de_ListAnomaliesForInsightCommandError = async (output, context) => {
1131
- const parsedOutput = {
1132
- ...output,
1133
- body: await parseErrorBody(output.body, context),
1134
- };
1135
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1136
- switch (errorCode) {
1137
- case "AccessDeniedException":
1138
- case "com.amazonaws.devopsguru#AccessDeniedException":
1139
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
1140
- case "InternalServerException":
1141
- case "com.amazonaws.devopsguru#InternalServerException":
1142
- throw await de_InternalServerExceptionRes(parsedOutput, context);
1143
- case "ResourceNotFoundException":
1144
- case "com.amazonaws.devopsguru#ResourceNotFoundException":
1145
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
1146
- case "ThrottlingException":
1147
- case "com.amazonaws.devopsguru#ThrottlingException":
1148
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
1149
- case "ValidationException":
1150
- case "com.amazonaws.devopsguru#ValidationException":
1151
- throw await de_ValidationExceptionRes(parsedOutput, context);
1152
- default:
1153
- const parsedBody = parsedOutput.body;
1154
- return throwDefaultError({
1155
- output,
1156
- parsedBody,
1157
- errorCode,
1158
- });
1159
- }
1160
- };
1161
677
  export const de_ListAnomalousLogGroupsCommand = async (output, context) => {
1162
678
  if (output.statusCode !== 200 && output.statusCode >= 300) {
1163
- return de_ListAnomalousLogGroupsCommandError(output, context);
679
+ return de_CommandError(output, context);
1164
680
  }
1165
681
  const contents = map({
1166
682
  $metadata: deserializeMetadata(output),
@@ -1174,40 +690,9 @@ export const de_ListAnomalousLogGroupsCommand = async (output, context) => {
1174
690
  Object.assign(contents, doc);
1175
691
  return contents;
1176
692
  };
1177
- const de_ListAnomalousLogGroupsCommandError = async (output, context) => {
1178
- const parsedOutput = {
1179
- ...output,
1180
- body: await parseErrorBody(output.body, context),
1181
- };
1182
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1183
- switch (errorCode) {
1184
- case "AccessDeniedException":
1185
- case "com.amazonaws.devopsguru#AccessDeniedException":
1186
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
1187
- case "InternalServerException":
1188
- case "com.amazonaws.devopsguru#InternalServerException":
1189
- throw await de_InternalServerExceptionRes(parsedOutput, context);
1190
- case "ResourceNotFoundException":
1191
- case "com.amazonaws.devopsguru#ResourceNotFoundException":
1192
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
1193
- case "ThrottlingException":
1194
- case "com.amazonaws.devopsguru#ThrottlingException":
1195
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
1196
- case "ValidationException":
1197
- case "com.amazonaws.devopsguru#ValidationException":
1198
- throw await de_ValidationExceptionRes(parsedOutput, context);
1199
- default:
1200
- const parsedBody = parsedOutput.body;
1201
- return throwDefaultError({
1202
- output,
1203
- parsedBody,
1204
- errorCode,
1205
- });
1206
- }
1207
- };
1208
693
  export const de_ListEventsCommand = async (output, context) => {
1209
694
  if (output.statusCode !== 200 && output.statusCode >= 300) {
1210
- return de_ListEventsCommandError(output, context);
695
+ return de_CommandError(output, context);
1211
696
  }
1212
697
  const contents = map({
1213
698
  $metadata: deserializeMetadata(output),
@@ -1220,40 +705,9 @@ export const de_ListEventsCommand = async (output, context) => {
1220
705
  Object.assign(contents, doc);
1221
706
  return contents;
1222
707
  };
1223
- const de_ListEventsCommandError = async (output, context) => {
1224
- const parsedOutput = {
1225
- ...output,
1226
- body: await parseErrorBody(output.body, context),
1227
- };
1228
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1229
- switch (errorCode) {
1230
- case "AccessDeniedException":
1231
- case "com.amazonaws.devopsguru#AccessDeniedException":
1232
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
1233
- case "InternalServerException":
1234
- case "com.amazonaws.devopsguru#InternalServerException":
1235
- throw await de_InternalServerExceptionRes(parsedOutput, context);
1236
- case "ResourceNotFoundException":
1237
- case "com.amazonaws.devopsguru#ResourceNotFoundException":
1238
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
1239
- case "ThrottlingException":
1240
- case "com.amazonaws.devopsguru#ThrottlingException":
1241
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
1242
- case "ValidationException":
1243
- case "com.amazonaws.devopsguru#ValidationException":
1244
- throw await de_ValidationExceptionRes(parsedOutput, context);
1245
- default:
1246
- const parsedBody = parsedOutput.body;
1247
- return throwDefaultError({
1248
- output,
1249
- parsedBody,
1250
- errorCode,
1251
- });
1252
- }
1253
- };
1254
708
  export const de_ListInsightsCommand = async (output, context) => {
1255
709
  if (output.statusCode !== 200 && output.statusCode >= 300) {
1256
- return de_ListInsightsCommandError(output, context);
710
+ return de_CommandError(output, context);
1257
711
  }
1258
712
  const contents = map({
1259
713
  $metadata: deserializeMetadata(output),
@@ -1267,37 +721,9 @@ export const de_ListInsightsCommand = async (output, context) => {
1267
721
  Object.assign(contents, doc);
1268
722
  return contents;
1269
723
  };
1270
- const de_ListInsightsCommandError = async (output, context) => {
1271
- const parsedOutput = {
1272
- ...output,
1273
- body: await parseErrorBody(output.body, context),
1274
- };
1275
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1276
- switch (errorCode) {
1277
- case "AccessDeniedException":
1278
- case "com.amazonaws.devopsguru#AccessDeniedException":
1279
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
1280
- case "InternalServerException":
1281
- case "com.amazonaws.devopsguru#InternalServerException":
1282
- throw await de_InternalServerExceptionRes(parsedOutput, context);
1283
- case "ThrottlingException":
1284
- case "com.amazonaws.devopsguru#ThrottlingException":
1285
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
1286
- case "ValidationException":
1287
- case "com.amazonaws.devopsguru#ValidationException":
1288
- throw await de_ValidationExceptionRes(parsedOutput, context);
1289
- default:
1290
- const parsedBody = parsedOutput.body;
1291
- return throwDefaultError({
1292
- output,
1293
- parsedBody,
1294
- errorCode,
1295
- });
1296
- }
1297
- };
1298
724
  export const de_ListMonitoredResourcesCommand = async (output, context) => {
1299
725
  if (output.statusCode !== 200 && output.statusCode >= 300) {
1300
- return de_ListMonitoredResourcesCommandError(output, context);
726
+ return de_CommandError(output, context);
1301
727
  }
1302
728
  const contents = map({
1303
729
  $metadata: deserializeMetadata(output),
@@ -1310,37 +736,9 @@ export const de_ListMonitoredResourcesCommand = async (output, context) => {
1310
736
  Object.assign(contents, doc);
1311
737
  return contents;
1312
738
  };
1313
- const de_ListMonitoredResourcesCommandError = async (output, context) => {
1314
- const parsedOutput = {
1315
- ...output,
1316
- body: await parseErrorBody(output.body, context),
1317
- };
1318
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1319
- switch (errorCode) {
1320
- case "InternalServerException":
1321
- case "com.amazonaws.devopsguru#InternalServerException":
1322
- throw await de_InternalServerExceptionRes(parsedOutput, context);
1323
- case "ResourceNotFoundException":
1324
- case "com.amazonaws.devopsguru#ResourceNotFoundException":
1325
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
1326
- case "ThrottlingException":
1327
- case "com.amazonaws.devopsguru#ThrottlingException":
1328
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
1329
- case "ValidationException":
1330
- case "com.amazonaws.devopsguru#ValidationException":
1331
- throw await de_ValidationExceptionRes(parsedOutput, context);
1332
- default:
1333
- const parsedBody = parsedOutput.body;
1334
- return throwDefaultError({
1335
- output,
1336
- parsedBody,
1337
- errorCode,
1338
- });
1339
- }
1340
- };
1341
739
  export const de_ListNotificationChannelsCommand = async (output, context) => {
1342
740
  if (output.statusCode !== 200 && output.statusCode >= 300) {
1343
- return de_ListNotificationChannelsCommandError(output, context);
741
+ return de_CommandError(output, context);
1344
742
  }
1345
743
  const contents = map({
1346
744
  $metadata: deserializeMetadata(output),
@@ -1353,81 +751,25 @@ export const de_ListNotificationChannelsCommand = async (output, context) => {
1353
751
  Object.assign(contents, doc);
1354
752
  return contents;
1355
753
  };
1356
- const de_ListNotificationChannelsCommandError = async (output, context) => {
1357
- const parsedOutput = {
1358
- ...output,
1359
- body: await parseErrorBody(output.body, context),
1360
- };
1361
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1362
- switch (errorCode) {
1363
- case "AccessDeniedException":
1364
- case "com.amazonaws.devopsguru#AccessDeniedException":
1365
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
1366
- case "InternalServerException":
1367
- case "com.amazonaws.devopsguru#InternalServerException":
1368
- throw await de_InternalServerExceptionRes(parsedOutput, context);
1369
- case "ThrottlingException":
1370
- case "com.amazonaws.devopsguru#ThrottlingException":
1371
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
1372
- case "ValidationException":
1373
- case "com.amazonaws.devopsguru#ValidationException":
1374
- throw await de_ValidationExceptionRes(parsedOutput, context);
1375
- default:
1376
- const parsedBody = parsedOutput.body;
1377
- return throwDefaultError({
1378
- output,
1379
- parsedBody,
1380
- errorCode,
1381
- });
1382
- }
1383
- };
1384
754
  export const de_ListOrganizationInsightsCommand = async (output, context) => {
1385
755
  if (output.statusCode !== 200 && output.statusCode >= 300) {
1386
- return de_ListOrganizationInsightsCommandError(output, context);
756
+ return de_CommandError(output, context);
1387
757
  }
1388
758
  const contents = map({
1389
- $metadata: deserializeMetadata(output),
1390
- });
1391
- const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
1392
- const doc = take(data, {
1393
- NextToken: __expectString,
1394
- ProactiveInsights: (_) => de_ProactiveOrganizationInsights(_, context),
1395
- ReactiveInsights: (_) => de_ReactiveOrganizationInsights(_, context),
1396
- });
1397
- Object.assign(contents, doc);
1398
- return contents;
1399
- };
1400
- const de_ListOrganizationInsightsCommandError = async (output, context) => {
1401
- const parsedOutput = {
1402
- ...output,
1403
- body: await parseErrorBody(output.body, context),
1404
- };
1405
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1406
- switch (errorCode) {
1407
- case "AccessDeniedException":
1408
- case "com.amazonaws.devopsguru#AccessDeniedException":
1409
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
1410
- case "InternalServerException":
1411
- case "com.amazonaws.devopsguru#InternalServerException":
1412
- throw await de_InternalServerExceptionRes(parsedOutput, context);
1413
- case "ThrottlingException":
1414
- case "com.amazonaws.devopsguru#ThrottlingException":
1415
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
1416
- case "ValidationException":
1417
- case "com.amazonaws.devopsguru#ValidationException":
1418
- throw await de_ValidationExceptionRes(parsedOutput, context);
1419
- default:
1420
- const parsedBody = parsedOutput.body;
1421
- return throwDefaultError({
1422
- output,
1423
- parsedBody,
1424
- errorCode,
1425
- });
1426
- }
759
+ $metadata: deserializeMetadata(output),
760
+ });
761
+ const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
762
+ const doc = take(data, {
763
+ NextToken: __expectString,
764
+ ProactiveInsights: (_) => de_ProactiveOrganizationInsights(_, context),
765
+ ReactiveInsights: (_) => de_ReactiveOrganizationInsights(_, context),
766
+ });
767
+ Object.assign(contents, doc);
768
+ return contents;
1427
769
  };
1428
770
  export const de_ListRecommendationsCommand = async (output, context) => {
1429
771
  if (output.statusCode !== 200 && output.statusCode >= 300) {
1430
- return de_ListRecommendationsCommandError(output, context);
772
+ return de_CommandError(output, context);
1431
773
  }
1432
774
  const contents = map({
1433
775
  $metadata: deserializeMetadata(output),
@@ -1440,40 +782,9 @@ export const de_ListRecommendationsCommand = async (output, context) => {
1440
782
  Object.assign(contents, doc);
1441
783
  return contents;
1442
784
  };
1443
- const de_ListRecommendationsCommandError = async (output, context) => {
1444
- const parsedOutput = {
1445
- ...output,
1446
- body: await parseErrorBody(output.body, context),
1447
- };
1448
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1449
- switch (errorCode) {
1450
- case "AccessDeniedException":
1451
- case "com.amazonaws.devopsguru#AccessDeniedException":
1452
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
1453
- case "InternalServerException":
1454
- case "com.amazonaws.devopsguru#InternalServerException":
1455
- throw await de_InternalServerExceptionRes(parsedOutput, context);
1456
- case "ResourceNotFoundException":
1457
- case "com.amazonaws.devopsguru#ResourceNotFoundException":
1458
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
1459
- case "ThrottlingException":
1460
- case "com.amazonaws.devopsguru#ThrottlingException":
1461
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
1462
- case "ValidationException":
1463
- case "com.amazonaws.devopsguru#ValidationException":
1464
- throw await de_ValidationExceptionRes(parsedOutput, context);
1465
- default:
1466
- const parsedBody = parsedOutput.body;
1467
- return throwDefaultError({
1468
- output,
1469
- parsedBody,
1470
- errorCode,
1471
- });
1472
- }
1473
- };
1474
785
  export const de_PutFeedbackCommand = async (output, context) => {
1475
786
  if (output.statusCode !== 200 && output.statusCode >= 300) {
1476
- return de_PutFeedbackCommandError(output, context);
787
+ return de_CommandError(output, context);
1477
788
  }
1478
789
  const contents = map({
1479
790
  $metadata: deserializeMetadata(output),
@@ -1481,43 +792,9 @@ export const de_PutFeedbackCommand = async (output, context) => {
1481
792
  await collectBody(output.body, context);
1482
793
  return contents;
1483
794
  };
1484
- const de_PutFeedbackCommandError = async (output, context) => {
1485
- const parsedOutput = {
1486
- ...output,
1487
- body: await parseErrorBody(output.body, context),
1488
- };
1489
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1490
- switch (errorCode) {
1491
- case "AccessDeniedException":
1492
- case "com.amazonaws.devopsguru#AccessDeniedException":
1493
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
1494
- case "ConflictException":
1495
- case "com.amazonaws.devopsguru#ConflictException":
1496
- throw await de_ConflictExceptionRes(parsedOutput, context);
1497
- case "InternalServerException":
1498
- case "com.amazonaws.devopsguru#InternalServerException":
1499
- throw await de_InternalServerExceptionRes(parsedOutput, context);
1500
- case "ResourceNotFoundException":
1501
- case "com.amazonaws.devopsguru#ResourceNotFoundException":
1502
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
1503
- case "ThrottlingException":
1504
- case "com.amazonaws.devopsguru#ThrottlingException":
1505
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
1506
- case "ValidationException":
1507
- case "com.amazonaws.devopsguru#ValidationException":
1508
- throw await de_ValidationExceptionRes(parsedOutput, context);
1509
- default:
1510
- const parsedBody = parsedOutput.body;
1511
- return throwDefaultError({
1512
- output,
1513
- parsedBody,
1514
- errorCode,
1515
- });
1516
- }
1517
- };
1518
795
  export const de_RemoveNotificationChannelCommand = async (output, context) => {
1519
796
  if (output.statusCode !== 200 && output.statusCode >= 300) {
1520
- return de_RemoveNotificationChannelCommandError(output, context);
797
+ return de_CommandError(output, context);
1521
798
  }
1522
799
  const contents = map({
1523
800
  $metadata: deserializeMetadata(output),
@@ -1525,43 +802,9 @@ export const de_RemoveNotificationChannelCommand = async (output, context) => {
1525
802
  await collectBody(output.body, context);
1526
803
  return contents;
1527
804
  };
1528
- const de_RemoveNotificationChannelCommandError = async (output, context) => {
1529
- const parsedOutput = {
1530
- ...output,
1531
- body: await parseErrorBody(output.body, context),
1532
- };
1533
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1534
- switch (errorCode) {
1535
- case "AccessDeniedException":
1536
- case "com.amazonaws.devopsguru#AccessDeniedException":
1537
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
1538
- case "ConflictException":
1539
- case "com.amazonaws.devopsguru#ConflictException":
1540
- throw await de_ConflictExceptionRes(parsedOutput, context);
1541
- case "InternalServerException":
1542
- case "com.amazonaws.devopsguru#InternalServerException":
1543
- throw await de_InternalServerExceptionRes(parsedOutput, context);
1544
- case "ResourceNotFoundException":
1545
- case "com.amazonaws.devopsguru#ResourceNotFoundException":
1546
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
1547
- case "ThrottlingException":
1548
- case "com.amazonaws.devopsguru#ThrottlingException":
1549
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
1550
- case "ValidationException":
1551
- case "com.amazonaws.devopsguru#ValidationException":
1552
- throw await de_ValidationExceptionRes(parsedOutput, context);
1553
- default:
1554
- const parsedBody = parsedOutput.body;
1555
- return throwDefaultError({
1556
- output,
1557
- parsedBody,
1558
- errorCode,
1559
- });
1560
- }
1561
- };
1562
805
  export const de_SearchInsightsCommand = async (output, context) => {
1563
806
  if (output.statusCode !== 200 && output.statusCode >= 300) {
1564
- return de_SearchInsightsCommandError(output, context);
807
+ return de_CommandError(output, context);
1565
808
  }
1566
809
  const contents = map({
1567
810
  $metadata: deserializeMetadata(output),
@@ -1575,37 +818,9 @@ export const de_SearchInsightsCommand = async (output, context) => {
1575
818
  Object.assign(contents, doc);
1576
819
  return contents;
1577
820
  };
1578
- const de_SearchInsightsCommandError = async (output, context) => {
1579
- const parsedOutput = {
1580
- ...output,
1581
- body: await parseErrorBody(output.body, context),
1582
- };
1583
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1584
- switch (errorCode) {
1585
- case "AccessDeniedException":
1586
- case "com.amazonaws.devopsguru#AccessDeniedException":
1587
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
1588
- case "InternalServerException":
1589
- case "com.amazonaws.devopsguru#InternalServerException":
1590
- throw await de_InternalServerExceptionRes(parsedOutput, context);
1591
- case "ThrottlingException":
1592
- case "com.amazonaws.devopsguru#ThrottlingException":
1593
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
1594
- case "ValidationException":
1595
- case "com.amazonaws.devopsguru#ValidationException":
1596
- throw await de_ValidationExceptionRes(parsedOutput, context);
1597
- default:
1598
- const parsedBody = parsedOutput.body;
1599
- return throwDefaultError({
1600
- output,
1601
- parsedBody,
1602
- errorCode,
1603
- });
1604
- }
1605
- };
1606
821
  export const de_SearchOrganizationInsightsCommand = async (output, context) => {
1607
822
  if (output.statusCode !== 200 && output.statusCode >= 300) {
1608
- return de_SearchOrganizationInsightsCommandError(output, context);
823
+ return de_CommandError(output, context);
1609
824
  }
1610
825
  const contents = map({
1611
826
  $metadata: deserializeMetadata(output),
@@ -1619,37 +834,9 @@ export const de_SearchOrganizationInsightsCommand = async (output, context) => {
1619
834
  Object.assign(contents, doc);
1620
835
  return contents;
1621
836
  };
1622
- const de_SearchOrganizationInsightsCommandError = async (output, context) => {
1623
- const parsedOutput = {
1624
- ...output,
1625
- body: await parseErrorBody(output.body, context),
1626
- };
1627
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1628
- switch (errorCode) {
1629
- case "AccessDeniedException":
1630
- case "com.amazonaws.devopsguru#AccessDeniedException":
1631
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
1632
- case "InternalServerException":
1633
- case "com.amazonaws.devopsguru#InternalServerException":
1634
- throw await de_InternalServerExceptionRes(parsedOutput, context);
1635
- case "ThrottlingException":
1636
- case "com.amazonaws.devopsguru#ThrottlingException":
1637
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
1638
- case "ValidationException":
1639
- case "com.amazonaws.devopsguru#ValidationException":
1640
- throw await de_ValidationExceptionRes(parsedOutput, context);
1641
- default:
1642
- const parsedBody = parsedOutput.body;
1643
- return throwDefaultError({
1644
- output,
1645
- parsedBody,
1646
- errorCode,
1647
- });
1648
- }
1649
- };
1650
837
  export const de_StartCostEstimationCommand = async (output, context) => {
1651
838
  if (output.statusCode !== 200 && output.statusCode >= 300) {
1652
- return de_StartCostEstimationCommandError(output, context);
839
+ return de_CommandError(output, context);
1653
840
  }
1654
841
  const contents = map({
1655
842
  $metadata: deserializeMetadata(output),
@@ -1657,43 +844,9 @@ export const de_StartCostEstimationCommand = async (output, context) => {
1657
844
  await collectBody(output.body, context);
1658
845
  return contents;
1659
846
  };
1660
- const de_StartCostEstimationCommandError = async (output, context) => {
1661
- const parsedOutput = {
1662
- ...output,
1663
- body: await parseErrorBody(output.body, context),
1664
- };
1665
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1666
- switch (errorCode) {
1667
- case "AccessDeniedException":
1668
- case "com.amazonaws.devopsguru#AccessDeniedException":
1669
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
1670
- case "ConflictException":
1671
- case "com.amazonaws.devopsguru#ConflictException":
1672
- throw await de_ConflictExceptionRes(parsedOutput, context);
1673
- case "InternalServerException":
1674
- case "com.amazonaws.devopsguru#InternalServerException":
1675
- throw await de_InternalServerExceptionRes(parsedOutput, context);
1676
- case "ResourceNotFoundException":
1677
- case "com.amazonaws.devopsguru#ResourceNotFoundException":
1678
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
1679
- case "ThrottlingException":
1680
- case "com.amazonaws.devopsguru#ThrottlingException":
1681
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
1682
- case "ValidationException":
1683
- case "com.amazonaws.devopsguru#ValidationException":
1684
- throw await de_ValidationExceptionRes(parsedOutput, context);
1685
- default:
1686
- const parsedBody = parsedOutput.body;
1687
- return throwDefaultError({
1688
- output,
1689
- parsedBody,
1690
- errorCode,
1691
- });
1692
- }
1693
- };
1694
847
  export const de_UpdateEventSourcesConfigCommand = async (output, context) => {
1695
848
  if (output.statusCode !== 200 && output.statusCode >= 300) {
1696
- return de_UpdateEventSourcesConfigCommandError(output, context);
849
+ return de_CommandError(output, context);
1697
850
  }
1698
851
  const contents = map({
1699
852
  $metadata: deserializeMetadata(output),
@@ -1701,37 +854,9 @@ export const de_UpdateEventSourcesConfigCommand = async (output, context) => {
1701
854
  await collectBody(output.body, context);
1702
855
  return contents;
1703
856
  };
1704
- const de_UpdateEventSourcesConfigCommandError = async (output, context) => {
1705
- const parsedOutput = {
1706
- ...output,
1707
- body: await parseErrorBody(output.body, context),
1708
- };
1709
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1710
- switch (errorCode) {
1711
- case "AccessDeniedException":
1712
- case "com.amazonaws.devopsguru#AccessDeniedException":
1713
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
1714
- case "InternalServerException":
1715
- case "com.amazonaws.devopsguru#InternalServerException":
1716
- throw await de_InternalServerExceptionRes(parsedOutput, context);
1717
- case "ThrottlingException":
1718
- case "com.amazonaws.devopsguru#ThrottlingException":
1719
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
1720
- case "ValidationException":
1721
- case "com.amazonaws.devopsguru#ValidationException":
1722
- throw await de_ValidationExceptionRes(parsedOutput, context);
1723
- default:
1724
- const parsedBody = parsedOutput.body;
1725
- return throwDefaultError({
1726
- output,
1727
- parsedBody,
1728
- errorCode,
1729
- });
1730
- }
1731
- };
1732
857
  export const de_UpdateResourceCollectionCommand = async (output, context) => {
1733
858
  if (output.statusCode !== 200 && output.statusCode >= 300) {
1734
- return de_UpdateResourceCollectionCommandError(output, context);
859
+ return de_CommandError(output, context);
1735
860
  }
1736
861
  const contents = map({
1737
862
  $metadata: deserializeMetadata(output),
@@ -1739,40 +864,9 @@ export const de_UpdateResourceCollectionCommand = async (output, context) => {
1739
864
  await collectBody(output.body, context);
1740
865
  return contents;
1741
866
  };
1742
- const de_UpdateResourceCollectionCommandError = async (output, context) => {
1743
- const parsedOutput = {
1744
- ...output,
1745
- body: await parseErrorBody(output.body, context),
1746
- };
1747
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1748
- switch (errorCode) {
1749
- case "AccessDeniedException":
1750
- case "com.amazonaws.devopsguru#AccessDeniedException":
1751
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
1752
- case "ConflictException":
1753
- case "com.amazonaws.devopsguru#ConflictException":
1754
- throw await de_ConflictExceptionRes(parsedOutput, context);
1755
- case "InternalServerException":
1756
- case "com.amazonaws.devopsguru#InternalServerException":
1757
- throw await de_InternalServerExceptionRes(parsedOutput, context);
1758
- case "ThrottlingException":
1759
- case "com.amazonaws.devopsguru#ThrottlingException":
1760
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
1761
- case "ValidationException":
1762
- case "com.amazonaws.devopsguru#ValidationException":
1763
- throw await de_ValidationExceptionRes(parsedOutput, context);
1764
- default:
1765
- const parsedBody = parsedOutput.body;
1766
- return throwDefaultError({
1767
- output,
1768
- parsedBody,
1769
- errorCode,
1770
- });
1771
- }
1772
- };
1773
867
  export const de_UpdateServiceIntegrationCommand = async (output, context) => {
1774
868
  if (output.statusCode !== 200 && output.statusCode >= 300) {
1775
- return de_UpdateServiceIntegrationCommandError(output, context);
869
+ return de_CommandError(output, context);
1776
870
  }
1777
871
  const contents = map({
1778
872
  $metadata: deserializeMetadata(output),
@@ -1780,7 +874,7 @@ export const de_UpdateServiceIntegrationCommand = async (output, context) => {
1780
874
  await collectBody(output.body, context);
1781
875
  return contents;
1782
876
  };
1783
- const de_UpdateServiceIntegrationCommandError = async (output, context) => {
877
+ const de_CommandError = async (output, context) => {
1784
878
  const parsedOutput = {
1785
879
  ...output,
1786
880
  body: await parseErrorBody(output.body, context),
@@ -1796,6 +890,12 @@ const de_UpdateServiceIntegrationCommandError = async (output, context) => {
1796
890
  case "InternalServerException":
1797
891
  case "com.amazonaws.devopsguru#InternalServerException":
1798
892
  throw await de_InternalServerExceptionRes(parsedOutput, context);
893
+ case "ResourceNotFoundException":
894
+ case "com.amazonaws.devopsguru#ResourceNotFoundException":
895
+ throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
896
+ case "ServiceQuotaExceededException":
897
+ case "com.amazonaws.devopsguru#ServiceQuotaExceededException":
898
+ throw await de_ServiceQuotaExceededExceptionRes(parsedOutput, context);
1799
899
  case "ThrottlingException":
1800
900
  case "com.amazonaws.devopsguru#ThrottlingException":
1801
901
  throw await de_ThrottlingExceptionRes(parsedOutput, context);