@aws-sdk/client-ssm-incidents 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.
@@ -471,7 +471,7 @@ export const se_UpdateTimelineEventCommand = async (input, context) => {
471
471
  };
472
472
  export const de_BatchGetIncidentFindingsCommand = async (output, context) => {
473
473
  if (output.statusCode !== 200 && output.statusCode >= 300) {
474
- return de_BatchGetIncidentFindingsCommandError(output, context);
474
+ return de_CommandError(output, context);
475
475
  }
476
476
  const contents = map({
477
477
  $metadata: deserializeMetadata(output),
@@ -484,40 +484,9 @@ export const de_BatchGetIncidentFindingsCommand = async (output, context) => {
484
484
  Object.assign(contents, doc);
485
485
  return contents;
486
486
  };
487
- const de_BatchGetIncidentFindingsCommandError = async (output, context) => {
488
- const parsedOutput = {
489
- ...output,
490
- body: await parseErrorBody(output.body, context),
491
- };
492
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
493
- switch (errorCode) {
494
- case "AccessDeniedException":
495
- case "com.amazonaws.ssmincidents#AccessDeniedException":
496
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
497
- case "InternalServerException":
498
- case "com.amazonaws.ssmincidents#InternalServerException":
499
- throw await de_InternalServerExceptionRes(parsedOutput, context);
500
- case "ResourceNotFoundException":
501
- case "com.amazonaws.ssmincidents#ResourceNotFoundException":
502
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
503
- case "ThrottlingException":
504
- case "com.amazonaws.ssmincidents#ThrottlingException":
505
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
506
- case "ValidationException":
507
- case "com.amazonaws.ssmincidents#ValidationException":
508
- throw await de_ValidationExceptionRes(parsedOutput, context);
509
- default:
510
- const parsedBody = parsedOutput.body;
511
- return throwDefaultError({
512
- output,
513
- parsedBody,
514
- errorCode,
515
- });
516
- }
517
- };
518
487
  export const de_CreateReplicationSetCommand = async (output, context) => {
519
488
  if (output.statusCode !== 201 && output.statusCode >= 300) {
520
- return de_CreateReplicationSetCommandError(output, context);
489
+ return de_CommandError(output, context);
521
490
  }
522
491
  const contents = map({
523
492
  $metadata: deserializeMetadata(output),
@@ -529,43 +498,9 @@ export const de_CreateReplicationSetCommand = async (output, context) => {
529
498
  Object.assign(contents, doc);
530
499
  return contents;
531
500
  };
532
- const de_CreateReplicationSetCommandError = async (output, context) => {
533
- const parsedOutput = {
534
- ...output,
535
- body: await parseErrorBody(output.body, context),
536
- };
537
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
538
- switch (errorCode) {
539
- case "AccessDeniedException":
540
- case "com.amazonaws.ssmincidents#AccessDeniedException":
541
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
542
- case "ConflictException":
543
- case "com.amazonaws.ssmincidents#ConflictException":
544
- throw await de_ConflictExceptionRes(parsedOutput, context);
545
- case "InternalServerException":
546
- case "com.amazonaws.ssmincidents#InternalServerException":
547
- throw await de_InternalServerExceptionRes(parsedOutput, context);
548
- case "ServiceQuotaExceededException":
549
- case "com.amazonaws.ssmincidents#ServiceQuotaExceededException":
550
- throw await de_ServiceQuotaExceededExceptionRes(parsedOutput, context);
551
- case "ThrottlingException":
552
- case "com.amazonaws.ssmincidents#ThrottlingException":
553
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
554
- case "ValidationException":
555
- case "com.amazonaws.ssmincidents#ValidationException":
556
- throw await de_ValidationExceptionRes(parsedOutput, context);
557
- default:
558
- const parsedBody = parsedOutput.body;
559
- return throwDefaultError({
560
- output,
561
- parsedBody,
562
- errorCode,
563
- });
564
- }
565
- };
566
501
  export const de_CreateResponsePlanCommand = async (output, context) => {
567
502
  if (output.statusCode !== 201 && output.statusCode >= 300) {
568
- return de_CreateResponsePlanCommandError(output, context);
503
+ return de_CommandError(output, context);
569
504
  }
570
505
  const contents = map({
571
506
  $metadata: deserializeMetadata(output),
@@ -577,43 +512,9 @@ export const de_CreateResponsePlanCommand = async (output, context) => {
577
512
  Object.assign(contents, doc);
578
513
  return contents;
579
514
  };
580
- const de_CreateResponsePlanCommandError = async (output, context) => {
581
- const parsedOutput = {
582
- ...output,
583
- body: await parseErrorBody(output.body, context),
584
- };
585
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
586
- switch (errorCode) {
587
- case "AccessDeniedException":
588
- case "com.amazonaws.ssmincidents#AccessDeniedException":
589
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
590
- case "ConflictException":
591
- case "com.amazonaws.ssmincidents#ConflictException":
592
- throw await de_ConflictExceptionRes(parsedOutput, context);
593
- case "InternalServerException":
594
- case "com.amazonaws.ssmincidents#InternalServerException":
595
- throw await de_InternalServerExceptionRes(parsedOutput, context);
596
- case "ResourceNotFoundException":
597
- case "com.amazonaws.ssmincidents#ResourceNotFoundException":
598
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
599
- case "ThrottlingException":
600
- case "com.amazonaws.ssmincidents#ThrottlingException":
601
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
602
- case "ValidationException":
603
- case "com.amazonaws.ssmincidents#ValidationException":
604
- throw await de_ValidationExceptionRes(parsedOutput, context);
605
- default:
606
- const parsedBody = parsedOutput.body;
607
- return throwDefaultError({
608
- output,
609
- parsedBody,
610
- errorCode,
611
- });
612
- }
613
- };
614
515
  export const de_CreateTimelineEventCommand = async (output, context) => {
615
516
  if (output.statusCode !== 201 && output.statusCode >= 300) {
616
- return de_CreateTimelineEventCommandError(output, context);
517
+ return de_CommandError(output, context);
617
518
  }
618
519
  const contents = map({
619
520
  $metadata: deserializeMetadata(output),
@@ -626,43 +527,9 @@ export const de_CreateTimelineEventCommand = async (output, context) => {
626
527
  Object.assign(contents, doc);
627
528
  return contents;
628
529
  };
629
- const de_CreateTimelineEventCommandError = async (output, context) => {
630
- const parsedOutput = {
631
- ...output,
632
- body: await parseErrorBody(output.body, context),
633
- };
634
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
635
- switch (errorCode) {
636
- case "AccessDeniedException":
637
- case "com.amazonaws.ssmincidents#AccessDeniedException":
638
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
639
- case "ConflictException":
640
- case "com.amazonaws.ssmincidents#ConflictException":
641
- throw await de_ConflictExceptionRes(parsedOutput, context);
642
- case "InternalServerException":
643
- case "com.amazonaws.ssmincidents#InternalServerException":
644
- throw await de_InternalServerExceptionRes(parsedOutput, context);
645
- case "ResourceNotFoundException":
646
- case "com.amazonaws.ssmincidents#ResourceNotFoundException":
647
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
648
- case "ThrottlingException":
649
- case "com.amazonaws.ssmincidents#ThrottlingException":
650
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
651
- case "ValidationException":
652
- case "com.amazonaws.ssmincidents#ValidationException":
653
- throw await de_ValidationExceptionRes(parsedOutput, context);
654
- default:
655
- const parsedBody = parsedOutput.body;
656
- return throwDefaultError({
657
- output,
658
- parsedBody,
659
- errorCode,
660
- });
661
- }
662
- };
663
530
  export const de_DeleteIncidentRecordCommand = async (output, context) => {
664
531
  if (output.statusCode !== 204 && output.statusCode >= 300) {
665
- return de_DeleteIncidentRecordCommandError(output, context);
532
+ return de_CommandError(output, context);
666
533
  }
667
534
  const contents = map({
668
535
  $metadata: deserializeMetadata(output),
@@ -670,37 +537,9 @@ export const de_DeleteIncidentRecordCommand = async (output, context) => {
670
537
  await collectBody(output.body, context);
671
538
  return contents;
672
539
  };
673
- const de_DeleteIncidentRecordCommandError = async (output, context) => {
674
- const parsedOutput = {
675
- ...output,
676
- body: await parseErrorBody(output.body, context),
677
- };
678
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
679
- switch (errorCode) {
680
- case "AccessDeniedException":
681
- case "com.amazonaws.ssmincidents#AccessDeniedException":
682
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
683
- case "InternalServerException":
684
- case "com.amazonaws.ssmincidents#InternalServerException":
685
- throw await de_InternalServerExceptionRes(parsedOutput, context);
686
- case "ThrottlingException":
687
- case "com.amazonaws.ssmincidents#ThrottlingException":
688
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
689
- case "ValidationException":
690
- case "com.amazonaws.ssmincidents#ValidationException":
691
- throw await de_ValidationExceptionRes(parsedOutput, context);
692
- default:
693
- const parsedBody = parsedOutput.body;
694
- return throwDefaultError({
695
- output,
696
- parsedBody,
697
- errorCode,
698
- });
699
- }
700
- };
701
540
  export const de_DeleteReplicationSetCommand = async (output, context) => {
702
541
  if (output.statusCode !== 204 && output.statusCode >= 300) {
703
- return de_DeleteReplicationSetCommandError(output, context);
542
+ return de_CommandError(output, context);
704
543
  }
705
544
  const contents = map({
706
545
  $metadata: deserializeMetadata(output),
@@ -708,40 +547,9 @@ export const de_DeleteReplicationSetCommand = async (output, context) => {
708
547
  await collectBody(output.body, context);
709
548
  return contents;
710
549
  };
711
- const de_DeleteReplicationSetCommandError = async (output, context) => {
712
- const parsedOutput = {
713
- ...output,
714
- body: await parseErrorBody(output.body, context),
715
- };
716
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
717
- switch (errorCode) {
718
- case "AccessDeniedException":
719
- case "com.amazonaws.ssmincidents#AccessDeniedException":
720
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
721
- case "InternalServerException":
722
- case "com.amazonaws.ssmincidents#InternalServerException":
723
- throw await de_InternalServerExceptionRes(parsedOutput, context);
724
- case "ResourceNotFoundException":
725
- case "com.amazonaws.ssmincidents#ResourceNotFoundException":
726
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
727
- case "ThrottlingException":
728
- case "com.amazonaws.ssmincidents#ThrottlingException":
729
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
730
- case "ValidationException":
731
- case "com.amazonaws.ssmincidents#ValidationException":
732
- throw await de_ValidationExceptionRes(parsedOutput, context);
733
- default:
734
- const parsedBody = parsedOutput.body;
735
- return throwDefaultError({
736
- output,
737
- parsedBody,
738
- errorCode,
739
- });
740
- }
741
- };
742
550
  export const de_DeleteResourcePolicyCommand = async (output, context) => {
743
551
  if (output.statusCode !== 200 && output.statusCode >= 300) {
744
- return de_DeleteResourcePolicyCommandError(output, context);
552
+ return de_CommandError(output, context);
745
553
  }
746
554
  const contents = map({
747
555
  $metadata: deserializeMetadata(output),
@@ -749,40 +557,9 @@ export const de_DeleteResourcePolicyCommand = async (output, context) => {
749
557
  await collectBody(output.body, context);
750
558
  return contents;
751
559
  };
752
- const de_DeleteResourcePolicyCommandError = async (output, context) => {
753
- const parsedOutput = {
754
- ...output,
755
- body: await parseErrorBody(output.body, context),
756
- };
757
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
758
- switch (errorCode) {
759
- case "AccessDeniedException":
760
- case "com.amazonaws.ssmincidents#AccessDeniedException":
761
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
762
- case "InternalServerException":
763
- case "com.amazonaws.ssmincidents#InternalServerException":
764
- throw await de_InternalServerExceptionRes(parsedOutput, context);
765
- case "ResourceNotFoundException":
766
- case "com.amazonaws.ssmincidents#ResourceNotFoundException":
767
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
768
- case "ThrottlingException":
769
- case "com.amazonaws.ssmincidents#ThrottlingException":
770
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
771
- case "ValidationException":
772
- case "com.amazonaws.ssmincidents#ValidationException":
773
- throw await de_ValidationExceptionRes(parsedOutput, context);
774
- default:
775
- const parsedBody = parsedOutput.body;
776
- return throwDefaultError({
777
- output,
778
- parsedBody,
779
- errorCode,
780
- });
781
- }
782
- };
783
560
  export const de_DeleteResponsePlanCommand = async (output, context) => {
784
561
  if (output.statusCode !== 204 && output.statusCode >= 300) {
785
- return de_DeleteResponsePlanCommandError(output, context);
562
+ return de_CommandError(output, context);
786
563
  }
787
564
  const contents = map({
788
565
  $metadata: deserializeMetadata(output),
@@ -790,37 +567,9 @@ export const de_DeleteResponsePlanCommand = async (output, context) => {
790
567
  await collectBody(output.body, context);
791
568
  return contents;
792
569
  };
793
- const de_DeleteResponsePlanCommandError = async (output, context) => {
794
- const parsedOutput = {
795
- ...output,
796
- body: await parseErrorBody(output.body, context),
797
- };
798
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
799
- switch (errorCode) {
800
- case "AccessDeniedException":
801
- case "com.amazonaws.ssmincidents#AccessDeniedException":
802
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
803
- case "InternalServerException":
804
- case "com.amazonaws.ssmincidents#InternalServerException":
805
- throw await de_InternalServerExceptionRes(parsedOutput, context);
806
- case "ThrottlingException":
807
- case "com.amazonaws.ssmincidents#ThrottlingException":
808
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
809
- case "ValidationException":
810
- case "com.amazonaws.ssmincidents#ValidationException":
811
- throw await de_ValidationExceptionRes(parsedOutput, context);
812
- default:
813
- const parsedBody = parsedOutput.body;
814
- return throwDefaultError({
815
- output,
816
- parsedBody,
817
- errorCode,
818
- });
819
- }
820
- };
821
570
  export const de_DeleteTimelineEventCommand = async (output, context) => {
822
571
  if (output.statusCode !== 204 && output.statusCode >= 300) {
823
- return de_DeleteTimelineEventCommandError(output, context);
572
+ return de_CommandError(output, context);
824
573
  }
825
574
  const contents = map({
826
575
  $metadata: deserializeMetadata(output),
@@ -828,37 +577,9 @@ export const de_DeleteTimelineEventCommand = async (output, context) => {
828
577
  await collectBody(output.body, context);
829
578
  return contents;
830
579
  };
831
- const de_DeleteTimelineEventCommandError = async (output, context) => {
832
- const parsedOutput = {
833
- ...output,
834
- body: await parseErrorBody(output.body, context),
835
- };
836
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
837
- switch (errorCode) {
838
- case "AccessDeniedException":
839
- case "com.amazonaws.ssmincidents#AccessDeniedException":
840
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
841
- case "InternalServerException":
842
- case "com.amazonaws.ssmincidents#InternalServerException":
843
- throw await de_InternalServerExceptionRes(parsedOutput, context);
844
- case "ThrottlingException":
845
- case "com.amazonaws.ssmincidents#ThrottlingException":
846
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
847
- case "ValidationException":
848
- case "com.amazonaws.ssmincidents#ValidationException":
849
- throw await de_ValidationExceptionRes(parsedOutput, context);
850
- default:
851
- const parsedBody = parsedOutput.body;
852
- return throwDefaultError({
853
- output,
854
- parsedBody,
855
- errorCode,
856
- });
857
- }
858
- };
859
580
  export const de_GetIncidentRecordCommand = async (output, context) => {
860
581
  if (output.statusCode !== 200 && output.statusCode >= 300) {
861
- return de_GetIncidentRecordCommandError(output, context);
582
+ return de_CommandError(output, context);
862
583
  }
863
584
  const contents = map({
864
585
  $metadata: deserializeMetadata(output),
@@ -870,40 +591,9 @@ export const de_GetIncidentRecordCommand = async (output, context) => {
870
591
  Object.assign(contents, doc);
871
592
  return contents;
872
593
  };
873
- const de_GetIncidentRecordCommandError = async (output, context) => {
874
- const parsedOutput = {
875
- ...output,
876
- body: await parseErrorBody(output.body, context),
877
- };
878
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
879
- switch (errorCode) {
880
- case "AccessDeniedException":
881
- case "com.amazonaws.ssmincidents#AccessDeniedException":
882
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
883
- case "InternalServerException":
884
- case "com.amazonaws.ssmincidents#InternalServerException":
885
- throw await de_InternalServerExceptionRes(parsedOutput, context);
886
- case "ResourceNotFoundException":
887
- case "com.amazonaws.ssmincidents#ResourceNotFoundException":
888
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
889
- case "ThrottlingException":
890
- case "com.amazonaws.ssmincidents#ThrottlingException":
891
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
892
- case "ValidationException":
893
- case "com.amazonaws.ssmincidents#ValidationException":
894
- throw await de_ValidationExceptionRes(parsedOutput, context);
895
- default:
896
- const parsedBody = parsedOutput.body;
897
- return throwDefaultError({
898
- output,
899
- parsedBody,
900
- errorCode,
901
- });
902
- }
903
- };
904
594
  export const de_GetReplicationSetCommand = async (output, context) => {
905
595
  if (output.statusCode !== 200 && output.statusCode >= 300) {
906
- return de_GetReplicationSetCommandError(output, context);
596
+ return de_CommandError(output, context);
907
597
  }
908
598
  const contents = map({
909
599
  $metadata: deserializeMetadata(output),
@@ -915,40 +605,9 @@ export const de_GetReplicationSetCommand = async (output, context) => {
915
605
  Object.assign(contents, doc);
916
606
  return contents;
917
607
  };
918
- const de_GetReplicationSetCommandError = async (output, context) => {
919
- const parsedOutput = {
920
- ...output,
921
- body: await parseErrorBody(output.body, context),
922
- };
923
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
924
- switch (errorCode) {
925
- case "AccessDeniedException":
926
- case "com.amazonaws.ssmincidents#AccessDeniedException":
927
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
928
- case "InternalServerException":
929
- case "com.amazonaws.ssmincidents#InternalServerException":
930
- throw await de_InternalServerExceptionRes(parsedOutput, context);
931
- case "ResourceNotFoundException":
932
- case "com.amazonaws.ssmincidents#ResourceNotFoundException":
933
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
934
- case "ThrottlingException":
935
- case "com.amazonaws.ssmincidents#ThrottlingException":
936
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
937
- case "ValidationException":
938
- case "com.amazonaws.ssmincidents#ValidationException":
939
- throw await de_ValidationExceptionRes(parsedOutput, context);
940
- default:
941
- const parsedBody = parsedOutput.body;
942
- return throwDefaultError({
943
- output,
944
- parsedBody,
945
- errorCode,
946
- });
947
- }
948
- };
949
608
  export const de_GetResourcePoliciesCommand = async (output, context) => {
950
609
  if (output.statusCode !== 200 && output.statusCode >= 300) {
951
- return de_GetResourcePoliciesCommandError(output, context);
610
+ return de_CommandError(output, context);
952
611
  }
953
612
  const contents = map({
954
613
  $metadata: deserializeMetadata(output),
@@ -961,40 +620,9 @@ export const de_GetResourcePoliciesCommand = async (output, context) => {
961
620
  Object.assign(contents, doc);
962
621
  return contents;
963
622
  };
964
- const de_GetResourcePoliciesCommandError = async (output, context) => {
965
- const parsedOutput = {
966
- ...output,
967
- body: await parseErrorBody(output.body, context),
968
- };
969
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
970
- switch (errorCode) {
971
- case "AccessDeniedException":
972
- case "com.amazonaws.ssmincidents#AccessDeniedException":
973
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
974
- case "InternalServerException":
975
- case "com.amazonaws.ssmincidents#InternalServerException":
976
- throw await de_InternalServerExceptionRes(parsedOutput, context);
977
- case "ResourceNotFoundException":
978
- case "com.amazonaws.ssmincidents#ResourceNotFoundException":
979
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
980
- case "ThrottlingException":
981
- case "com.amazonaws.ssmincidents#ThrottlingException":
982
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
983
- case "ValidationException":
984
- case "com.amazonaws.ssmincidents#ValidationException":
985
- throw await de_ValidationExceptionRes(parsedOutput, context);
986
- default:
987
- const parsedBody = parsedOutput.body;
988
- return throwDefaultError({
989
- output,
990
- parsedBody,
991
- errorCode,
992
- });
993
- }
994
- };
995
623
  export const de_GetResponsePlanCommand = async (output, context) => {
996
624
  if (output.statusCode !== 200 && output.statusCode >= 300) {
997
- return de_GetResponsePlanCommandError(output, context);
625
+ return de_CommandError(output, context);
998
626
  }
999
627
  const contents = map({
1000
628
  $metadata: deserializeMetadata(output),
@@ -1013,40 +641,9 @@ export const de_GetResponsePlanCommand = async (output, context) => {
1013
641
  Object.assign(contents, doc);
1014
642
  return contents;
1015
643
  };
1016
- const de_GetResponsePlanCommandError = async (output, context) => {
1017
- const parsedOutput = {
1018
- ...output,
1019
- body: await parseErrorBody(output.body, context),
1020
- };
1021
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1022
- switch (errorCode) {
1023
- case "AccessDeniedException":
1024
- case "com.amazonaws.ssmincidents#AccessDeniedException":
1025
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
1026
- case "InternalServerException":
1027
- case "com.amazonaws.ssmincidents#InternalServerException":
1028
- throw await de_InternalServerExceptionRes(parsedOutput, context);
1029
- case "ResourceNotFoundException":
1030
- case "com.amazonaws.ssmincidents#ResourceNotFoundException":
1031
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
1032
- case "ThrottlingException":
1033
- case "com.amazonaws.ssmincidents#ThrottlingException":
1034
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
1035
- case "ValidationException":
1036
- case "com.amazonaws.ssmincidents#ValidationException":
1037
- throw await de_ValidationExceptionRes(parsedOutput, context);
1038
- default:
1039
- const parsedBody = parsedOutput.body;
1040
- return throwDefaultError({
1041
- output,
1042
- parsedBody,
1043
- errorCode,
1044
- });
1045
- }
1046
- };
1047
644
  export const de_GetTimelineEventCommand = async (output, context) => {
1048
645
  if (output.statusCode !== 200 && output.statusCode >= 300) {
1049
- return de_GetTimelineEventCommandError(output, context);
646
+ return de_CommandError(output, context);
1050
647
  }
1051
648
  const contents = map({
1052
649
  $metadata: deserializeMetadata(output),
@@ -1058,86 +655,24 @@ export const de_GetTimelineEventCommand = async (output, context) => {
1058
655
  Object.assign(contents, doc);
1059
656
  return contents;
1060
657
  };
1061
- const de_GetTimelineEventCommandError = async (output, context) => {
1062
- const parsedOutput = {
1063
- ...output,
1064
- body: await parseErrorBody(output.body, context),
1065
- };
1066
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1067
- switch (errorCode) {
1068
- case "AccessDeniedException":
1069
- case "com.amazonaws.ssmincidents#AccessDeniedException":
1070
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
1071
- case "InternalServerException":
1072
- case "com.amazonaws.ssmincidents#InternalServerException":
1073
- throw await de_InternalServerExceptionRes(parsedOutput, context);
1074
- case "ResourceNotFoundException":
1075
- case "com.amazonaws.ssmincidents#ResourceNotFoundException":
1076
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
1077
- case "ThrottlingException":
1078
- case "com.amazonaws.ssmincidents#ThrottlingException":
1079
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
1080
- case "ValidationException":
1081
- case "com.amazonaws.ssmincidents#ValidationException":
1082
- throw await de_ValidationExceptionRes(parsedOutput, context);
1083
- default:
1084
- const parsedBody = parsedOutput.body;
1085
- return throwDefaultError({
1086
- output,
1087
- parsedBody,
1088
- errorCode,
1089
- });
1090
- }
1091
- };
1092
- export const de_ListIncidentFindingsCommand = async (output, context) => {
1093
- if (output.statusCode !== 200 && output.statusCode >= 300) {
1094
- return de_ListIncidentFindingsCommandError(output, context);
1095
- }
1096
- const contents = map({
1097
- $metadata: deserializeMetadata(output),
1098
- });
1099
- const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
1100
- const doc = take(data, {
1101
- findings: (_) => de_FindingSummaryList(_, context),
1102
- nextToken: __expectString,
1103
- });
1104
- Object.assign(contents, doc);
1105
- return contents;
1106
- };
1107
- const de_ListIncidentFindingsCommandError = async (output, context) => {
1108
- const parsedOutput = {
1109
- ...output,
1110
- body: await parseErrorBody(output.body, context),
1111
- };
1112
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1113
- switch (errorCode) {
1114
- case "AccessDeniedException":
1115
- case "com.amazonaws.ssmincidents#AccessDeniedException":
1116
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
1117
- case "InternalServerException":
1118
- case "com.amazonaws.ssmincidents#InternalServerException":
1119
- throw await de_InternalServerExceptionRes(parsedOutput, context);
1120
- case "ResourceNotFoundException":
1121
- case "com.amazonaws.ssmincidents#ResourceNotFoundException":
1122
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
1123
- case "ThrottlingException":
1124
- case "com.amazonaws.ssmincidents#ThrottlingException":
1125
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
1126
- case "ValidationException":
1127
- case "com.amazonaws.ssmincidents#ValidationException":
1128
- throw await de_ValidationExceptionRes(parsedOutput, context);
1129
- default:
1130
- const parsedBody = parsedOutput.body;
1131
- return throwDefaultError({
1132
- output,
1133
- parsedBody,
1134
- errorCode,
1135
- });
658
+ export const de_ListIncidentFindingsCommand = async (output, context) => {
659
+ if (output.statusCode !== 200 && output.statusCode >= 300) {
660
+ return de_CommandError(output, context);
1136
661
  }
662
+ const contents = map({
663
+ $metadata: deserializeMetadata(output),
664
+ });
665
+ const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
666
+ const doc = take(data, {
667
+ findings: (_) => de_FindingSummaryList(_, context),
668
+ nextToken: __expectString,
669
+ });
670
+ Object.assign(contents, doc);
671
+ return contents;
1137
672
  };
1138
673
  export const de_ListIncidentRecordsCommand = async (output, context) => {
1139
674
  if (output.statusCode !== 200 && output.statusCode >= 300) {
1140
- return de_ListIncidentRecordsCommandError(output, context);
675
+ return de_CommandError(output, context);
1141
676
  }
1142
677
  const contents = map({
1143
678
  $metadata: deserializeMetadata(output),
@@ -1150,37 +685,9 @@ export const de_ListIncidentRecordsCommand = async (output, context) => {
1150
685
  Object.assign(contents, doc);
1151
686
  return contents;
1152
687
  };
1153
- const de_ListIncidentRecordsCommandError = async (output, context) => {
1154
- const parsedOutput = {
1155
- ...output,
1156
- body: await parseErrorBody(output.body, context),
1157
- };
1158
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1159
- switch (errorCode) {
1160
- case "AccessDeniedException":
1161
- case "com.amazonaws.ssmincidents#AccessDeniedException":
1162
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
1163
- case "InternalServerException":
1164
- case "com.amazonaws.ssmincidents#InternalServerException":
1165
- throw await de_InternalServerExceptionRes(parsedOutput, context);
1166
- case "ThrottlingException":
1167
- case "com.amazonaws.ssmincidents#ThrottlingException":
1168
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
1169
- case "ValidationException":
1170
- case "com.amazonaws.ssmincidents#ValidationException":
1171
- throw await de_ValidationExceptionRes(parsedOutput, context);
1172
- default:
1173
- const parsedBody = parsedOutput.body;
1174
- return throwDefaultError({
1175
- output,
1176
- parsedBody,
1177
- errorCode,
1178
- });
1179
- }
1180
- };
1181
688
  export const de_ListRelatedItemsCommand = async (output, context) => {
1182
689
  if (output.statusCode !== 200 && output.statusCode >= 300) {
1183
- return de_ListRelatedItemsCommandError(output, context);
690
+ return de_CommandError(output, context);
1184
691
  }
1185
692
  const contents = map({
1186
693
  $metadata: deserializeMetadata(output),
@@ -1193,37 +700,9 @@ export const de_ListRelatedItemsCommand = async (output, context) => {
1193
700
  Object.assign(contents, doc);
1194
701
  return contents;
1195
702
  };
1196
- const de_ListRelatedItemsCommandError = async (output, context) => {
1197
- const parsedOutput = {
1198
- ...output,
1199
- body: await parseErrorBody(output.body, context),
1200
- };
1201
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1202
- switch (errorCode) {
1203
- case "AccessDeniedException":
1204
- case "com.amazonaws.ssmincidents#AccessDeniedException":
1205
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
1206
- case "InternalServerException":
1207
- case "com.amazonaws.ssmincidents#InternalServerException":
1208
- throw await de_InternalServerExceptionRes(parsedOutput, context);
1209
- case "ThrottlingException":
1210
- case "com.amazonaws.ssmincidents#ThrottlingException":
1211
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
1212
- case "ValidationException":
1213
- case "com.amazonaws.ssmincidents#ValidationException":
1214
- throw await de_ValidationExceptionRes(parsedOutput, context);
1215
- default:
1216
- const parsedBody = parsedOutput.body;
1217
- return throwDefaultError({
1218
- output,
1219
- parsedBody,
1220
- errorCode,
1221
- });
1222
- }
1223
- };
1224
703
  export const de_ListReplicationSetsCommand = async (output, context) => {
1225
704
  if (output.statusCode !== 200 && output.statusCode >= 300) {
1226
- return de_ListReplicationSetsCommandError(output, context);
705
+ return de_CommandError(output, context);
1227
706
  }
1228
707
  const contents = map({
1229
708
  $metadata: deserializeMetadata(output),
@@ -1236,37 +715,9 @@ export const de_ListReplicationSetsCommand = async (output, context) => {
1236
715
  Object.assign(contents, doc);
1237
716
  return contents;
1238
717
  };
1239
- const de_ListReplicationSetsCommandError = async (output, context) => {
1240
- const parsedOutput = {
1241
- ...output,
1242
- body: await parseErrorBody(output.body, context),
1243
- };
1244
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1245
- switch (errorCode) {
1246
- case "AccessDeniedException":
1247
- case "com.amazonaws.ssmincidents#AccessDeniedException":
1248
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
1249
- case "InternalServerException":
1250
- case "com.amazonaws.ssmincidents#InternalServerException":
1251
- throw await de_InternalServerExceptionRes(parsedOutput, context);
1252
- case "ThrottlingException":
1253
- case "com.amazonaws.ssmincidents#ThrottlingException":
1254
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
1255
- case "ValidationException":
1256
- case "com.amazonaws.ssmincidents#ValidationException":
1257
- throw await de_ValidationExceptionRes(parsedOutput, context);
1258
- default:
1259
- const parsedBody = parsedOutput.body;
1260
- return throwDefaultError({
1261
- output,
1262
- parsedBody,
1263
- errorCode,
1264
- });
1265
- }
1266
- };
1267
718
  export const de_ListResponsePlansCommand = async (output, context) => {
1268
719
  if (output.statusCode !== 200 && output.statusCode >= 300) {
1269
- return de_ListResponsePlansCommandError(output, context);
720
+ return de_CommandError(output, context);
1270
721
  }
1271
722
  const contents = map({
1272
723
  $metadata: deserializeMetadata(output),
@@ -1279,37 +730,9 @@ export const de_ListResponsePlansCommand = async (output, context) => {
1279
730
  Object.assign(contents, doc);
1280
731
  return contents;
1281
732
  };
1282
- const de_ListResponsePlansCommandError = async (output, context) => {
1283
- const parsedOutput = {
1284
- ...output,
1285
- body: await parseErrorBody(output.body, context),
1286
- };
1287
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1288
- switch (errorCode) {
1289
- case "AccessDeniedException":
1290
- case "com.amazonaws.ssmincidents#AccessDeniedException":
1291
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
1292
- case "InternalServerException":
1293
- case "com.amazonaws.ssmincidents#InternalServerException":
1294
- throw await de_InternalServerExceptionRes(parsedOutput, context);
1295
- case "ThrottlingException":
1296
- case "com.amazonaws.ssmincidents#ThrottlingException":
1297
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
1298
- case "ValidationException":
1299
- case "com.amazonaws.ssmincidents#ValidationException":
1300
- throw await de_ValidationExceptionRes(parsedOutput, context);
1301
- default:
1302
- const parsedBody = parsedOutput.body;
1303
- return throwDefaultError({
1304
- output,
1305
- parsedBody,
1306
- errorCode,
1307
- });
1308
- }
1309
- };
1310
733
  export const de_ListTagsForResourceCommand = async (output, context) => {
1311
734
  if (output.statusCode !== 200 && output.statusCode >= 300) {
1312
- return de_ListTagsForResourceCommandError(output, context);
735
+ return de_CommandError(output, context);
1313
736
  }
1314
737
  const contents = map({
1315
738
  $metadata: deserializeMetadata(output),
@@ -1321,40 +744,9 @@ export const de_ListTagsForResourceCommand = async (output, context) => {
1321
744
  Object.assign(contents, doc);
1322
745
  return contents;
1323
746
  };
1324
- const de_ListTagsForResourceCommandError = async (output, context) => {
1325
- const parsedOutput = {
1326
- ...output,
1327
- body: await parseErrorBody(output.body, context),
1328
- };
1329
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1330
- switch (errorCode) {
1331
- case "AccessDeniedException":
1332
- case "com.amazonaws.ssmincidents#AccessDeniedException":
1333
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
1334
- case "InternalServerException":
1335
- case "com.amazonaws.ssmincidents#InternalServerException":
1336
- throw await de_InternalServerExceptionRes(parsedOutput, context);
1337
- case "ResourceNotFoundException":
1338
- case "com.amazonaws.ssmincidents#ResourceNotFoundException":
1339
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
1340
- case "ThrottlingException":
1341
- case "com.amazonaws.ssmincidents#ThrottlingException":
1342
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
1343
- case "ValidationException":
1344
- case "com.amazonaws.ssmincidents#ValidationException":
1345
- throw await de_ValidationExceptionRes(parsedOutput, context);
1346
- default:
1347
- const parsedBody = parsedOutput.body;
1348
- return throwDefaultError({
1349
- output,
1350
- parsedBody,
1351
- errorCode,
1352
- });
1353
- }
1354
- };
1355
747
  export const de_ListTimelineEventsCommand = async (output, context) => {
1356
748
  if (output.statusCode !== 200 && output.statusCode >= 300) {
1357
- return de_ListTimelineEventsCommandError(output, context);
749
+ return de_CommandError(output, context);
1358
750
  }
1359
751
  const contents = map({
1360
752
  $metadata: deserializeMetadata(output),
@@ -1367,130 +759,37 @@ export const de_ListTimelineEventsCommand = async (output, context) => {
1367
759
  Object.assign(contents, doc);
1368
760
  return contents;
1369
761
  };
1370
- const de_ListTimelineEventsCommandError = async (output, context) => {
1371
- const parsedOutput = {
1372
- ...output,
1373
- body: await parseErrorBody(output.body, context),
1374
- };
1375
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1376
- switch (errorCode) {
1377
- case "AccessDeniedException":
1378
- case "com.amazonaws.ssmincidents#AccessDeniedException":
1379
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
1380
- case "InternalServerException":
1381
- case "com.amazonaws.ssmincidents#InternalServerException":
1382
- throw await de_InternalServerExceptionRes(parsedOutput, context);
1383
- case "ThrottlingException":
1384
- case "com.amazonaws.ssmincidents#ThrottlingException":
1385
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
1386
- case "ValidationException":
1387
- case "com.amazonaws.ssmincidents#ValidationException":
1388
- throw await de_ValidationExceptionRes(parsedOutput, context);
1389
- default:
1390
- const parsedBody = parsedOutput.body;
1391
- return throwDefaultError({
1392
- output,
1393
- parsedBody,
1394
- errorCode,
1395
- });
1396
- }
1397
- };
1398
762
  export const de_PutResourcePolicyCommand = async (output, context) => {
1399
763
  if (output.statusCode !== 200 && output.statusCode >= 300) {
1400
- return de_PutResourcePolicyCommandError(output, context);
1401
- }
1402
- const contents = map({
1403
- $metadata: deserializeMetadata(output),
1404
- });
1405
- const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
1406
- const doc = take(data, {
1407
- policyId: __expectString,
1408
- });
1409
- Object.assign(contents, doc);
1410
- return contents;
1411
- };
1412
- const de_PutResourcePolicyCommandError = async (output, context) => {
1413
- const parsedOutput = {
1414
- ...output,
1415
- body: await parseErrorBody(output.body, context),
1416
- };
1417
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1418
- switch (errorCode) {
1419
- case "AccessDeniedException":
1420
- case "com.amazonaws.ssmincidents#AccessDeniedException":
1421
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
1422
- case "InternalServerException":
1423
- case "com.amazonaws.ssmincidents#InternalServerException":
1424
- throw await de_InternalServerExceptionRes(parsedOutput, context);
1425
- case "ResourceNotFoundException":
1426
- case "com.amazonaws.ssmincidents#ResourceNotFoundException":
1427
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
1428
- case "ThrottlingException":
1429
- case "com.amazonaws.ssmincidents#ThrottlingException":
1430
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
1431
- case "ValidationException":
1432
- case "com.amazonaws.ssmincidents#ValidationException":
1433
- throw await de_ValidationExceptionRes(parsedOutput, context);
1434
- default:
1435
- const parsedBody = parsedOutput.body;
1436
- return throwDefaultError({
1437
- output,
1438
- parsedBody,
1439
- errorCode,
1440
- });
1441
- }
1442
- };
1443
- export const de_StartIncidentCommand = async (output, context) => {
1444
- if (output.statusCode !== 200 && output.statusCode >= 300) {
1445
- return de_StartIncidentCommandError(output, context);
764
+ return de_CommandError(output, context);
1446
765
  }
1447
766
  const contents = map({
1448
767
  $metadata: deserializeMetadata(output),
1449
768
  });
1450
769
  const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
1451
770
  const doc = take(data, {
1452
- incidentRecordArn: __expectString,
1453
- });
1454
- Object.assign(contents, doc);
1455
- return contents;
1456
- };
1457
- const de_StartIncidentCommandError = async (output, context) => {
1458
- const parsedOutput = {
1459
- ...output,
1460
- body: await parseErrorBody(output.body, context),
1461
- };
1462
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1463
- switch (errorCode) {
1464
- case "AccessDeniedException":
1465
- case "com.amazonaws.ssmincidents#AccessDeniedException":
1466
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
1467
- case "ConflictException":
1468
- case "com.amazonaws.ssmincidents#ConflictException":
1469
- throw await de_ConflictExceptionRes(parsedOutput, context);
1470
- case "InternalServerException":
1471
- case "com.amazonaws.ssmincidents#InternalServerException":
1472
- throw await de_InternalServerExceptionRes(parsedOutput, context);
1473
- case "ResourceNotFoundException":
1474
- case "com.amazonaws.ssmincidents#ResourceNotFoundException":
1475
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
1476
- case "ThrottlingException":
1477
- case "com.amazonaws.ssmincidents#ThrottlingException":
1478
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
1479
- case "ValidationException":
1480
- case "com.amazonaws.ssmincidents#ValidationException":
1481
- throw await de_ValidationExceptionRes(parsedOutput, context);
1482
- default:
1483
- const parsedBody = parsedOutput.body;
1484
- return throwDefaultError({
1485
- output,
1486
- parsedBody,
1487
- errorCode,
1488
- });
771
+ policyId: __expectString,
772
+ });
773
+ Object.assign(contents, doc);
774
+ return contents;
775
+ };
776
+ export const de_StartIncidentCommand = async (output, context) => {
777
+ if (output.statusCode !== 200 && output.statusCode >= 300) {
778
+ return de_CommandError(output, context);
1489
779
  }
780
+ const contents = map({
781
+ $metadata: deserializeMetadata(output),
782
+ });
783
+ const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
784
+ const doc = take(data, {
785
+ incidentRecordArn: __expectString,
786
+ });
787
+ Object.assign(contents, doc);
788
+ return contents;
1490
789
  };
1491
790
  export const de_TagResourceCommand = async (output, context) => {
1492
791
  if (output.statusCode !== 204 && output.statusCode >= 300) {
1493
- return de_TagResourceCommandError(output, context);
792
+ return de_CommandError(output, context);
1494
793
  }
1495
794
  const contents = map({
1496
795
  $metadata: deserializeMetadata(output),
@@ -1498,46 +797,9 @@ export const de_TagResourceCommand = async (output, context) => {
1498
797
  await collectBody(output.body, context);
1499
798
  return contents;
1500
799
  };
1501
- const de_TagResourceCommandError = async (output, context) => {
1502
- const parsedOutput = {
1503
- ...output,
1504
- body: await parseErrorBody(output.body, context),
1505
- };
1506
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1507
- switch (errorCode) {
1508
- case "AccessDeniedException":
1509
- case "com.amazonaws.ssmincidents#AccessDeniedException":
1510
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
1511
- case "ConflictException":
1512
- case "com.amazonaws.ssmincidents#ConflictException":
1513
- throw await de_ConflictExceptionRes(parsedOutput, context);
1514
- case "InternalServerException":
1515
- case "com.amazonaws.ssmincidents#InternalServerException":
1516
- throw await de_InternalServerExceptionRes(parsedOutput, context);
1517
- case "ResourceNotFoundException":
1518
- case "com.amazonaws.ssmincidents#ResourceNotFoundException":
1519
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
1520
- case "ServiceQuotaExceededException":
1521
- case "com.amazonaws.ssmincidents#ServiceQuotaExceededException":
1522
- throw await de_ServiceQuotaExceededExceptionRes(parsedOutput, context);
1523
- case "ThrottlingException":
1524
- case "com.amazonaws.ssmincidents#ThrottlingException":
1525
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
1526
- case "ValidationException":
1527
- case "com.amazonaws.ssmincidents#ValidationException":
1528
- throw await de_ValidationExceptionRes(parsedOutput, context);
1529
- default:
1530
- const parsedBody = parsedOutput.body;
1531
- return throwDefaultError({
1532
- output,
1533
- parsedBody,
1534
- errorCode,
1535
- });
1536
- }
1537
- };
1538
800
  export const de_UntagResourceCommand = async (output, context) => {
1539
801
  if (output.statusCode !== 204 && output.statusCode >= 300) {
1540
- return de_UntagResourceCommandError(output, context);
802
+ return de_CommandError(output, context);
1541
803
  }
1542
804
  const contents = map({
1543
805
  $metadata: deserializeMetadata(output),
@@ -1545,43 +807,9 @@ export const de_UntagResourceCommand = async (output, context) => {
1545
807
  await collectBody(output.body, context);
1546
808
  return contents;
1547
809
  };
1548
- const de_UntagResourceCommandError = async (output, context) => {
1549
- const parsedOutput = {
1550
- ...output,
1551
- body: await parseErrorBody(output.body, context),
1552
- };
1553
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1554
- switch (errorCode) {
1555
- case "AccessDeniedException":
1556
- case "com.amazonaws.ssmincidents#AccessDeniedException":
1557
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
1558
- case "ConflictException":
1559
- case "com.amazonaws.ssmincidents#ConflictException":
1560
- throw await de_ConflictExceptionRes(parsedOutput, context);
1561
- case "InternalServerException":
1562
- case "com.amazonaws.ssmincidents#InternalServerException":
1563
- throw await de_InternalServerExceptionRes(parsedOutput, context);
1564
- case "ResourceNotFoundException":
1565
- case "com.amazonaws.ssmincidents#ResourceNotFoundException":
1566
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
1567
- case "ThrottlingException":
1568
- case "com.amazonaws.ssmincidents#ThrottlingException":
1569
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
1570
- case "ValidationException":
1571
- case "com.amazonaws.ssmincidents#ValidationException":
1572
- throw await de_ValidationExceptionRes(parsedOutput, context);
1573
- default:
1574
- const parsedBody = parsedOutput.body;
1575
- return throwDefaultError({
1576
- output,
1577
- parsedBody,
1578
- errorCode,
1579
- });
1580
- }
1581
- };
1582
810
  export const de_UpdateDeletionProtectionCommand = async (output, context) => {
1583
811
  if (output.statusCode !== 204 && output.statusCode >= 300) {
1584
- return de_UpdateDeletionProtectionCommandError(output, context);
812
+ return de_CommandError(output, context);
1585
813
  }
1586
814
  const contents = map({
1587
815
  $metadata: deserializeMetadata(output),
@@ -1589,40 +817,9 @@ export const de_UpdateDeletionProtectionCommand = async (output, context) => {
1589
817
  await collectBody(output.body, context);
1590
818
  return contents;
1591
819
  };
1592
- const de_UpdateDeletionProtectionCommandError = async (output, context) => {
1593
- const parsedOutput = {
1594
- ...output,
1595
- body: await parseErrorBody(output.body, context),
1596
- };
1597
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1598
- switch (errorCode) {
1599
- case "AccessDeniedException":
1600
- case "com.amazonaws.ssmincidents#AccessDeniedException":
1601
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
1602
- case "InternalServerException":
1603
- case "com.amazonaws.ssmincidents#InternalServerException":
1604
- throw await de_InternalServerExceptionRes(parsedOutput, context);
1605
- case "ResourceNotFoundException":
1606
- case "com.amazonaws.ssmincidents#ResourceNotFoundException":
1607
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
1608
- case "ThrottlingException":
1609
- case "com.amazonaws.ssmincidents#ThrottlingException":
1610
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
1611
- case "ValidationException":
1612
- case "com.amazonaws.ssmincidents#ValidationException":
1613
- throw await de_ValidationExceptionRes(parsedOutput, context);
1614
- default:
1615
- const parsedBody = parsedOutput.body;
1616
- return throwDefaultError({
1617
- output,
1618
- parsedBody,
1619
- errorCode,
1620
- });
1621
- }
1622
- };
1623
820
  export const de_UpdateIncidentRecordCommand = async (output, context) => {
1624
821
  if (output.statusCode !== 204 && output.statusCode >= 300) {
1625
- return de_UpdateIncidentRecordCommandError(output, context);
822
+ return de_CommandError(output, context);
1626
823
  }
1627
824
  const contents = map({
1628
825
  $metadata: deserializeMetadata(output),
@@ -1630,43 +827,9 @@ export const de_UpdateIncidentRecordCommand = async (output, context) => {
1630
827
  await collectBody(output.body, context);
1631
828
  return contents;
1632
829
  };
1633
- const de_UpdateIncidentRecordCommandError = async (output, context) => {
1634
- const parsedOutput = {
1635
- ...output,
1636
- body: await parseErrorBody(output.body, context),
1637
- };
1638
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1639
- switch (errorCode) {
1640
- case "AccessDeniedException":
1641
- case "com.amazonaws.ssmincidents#AccessDeniedException":
1642
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
1643
- case "ConflictException":
1644
- case "com.amazonaws.ssmincidents#ConflictException":
1645
- throw await de_ConflictExceptionRes(parsedOutput, context);
1646
- case "InternalServerException":
1647
- case "com.amazonaws.ssmincidents#InternalServerException":
1648
- throw await de_InternalServerExceptionRes(parsedOutput, context);
1649
- case "ResourceNotFoundException":
1650
- case "com.amazonaws.ssmincidents#ResourceNotFoundException":
1651
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
1652
- case "ThrottlingException":
1653
- case "com.amazonaws.ssmincidents#ThrottlingException":
1654
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
1655
- case "ValidationException":
1656
- case "com.amazonaws.ssmincidents#ValidationException":
1657
- throw await de_ValidationExceptionRes(parsedOutput, context);
1658
- default:
1659
- const parsedBody = parsedOutput.body;
1660
- return throwDefaultError({
1661
- output,
1662
- parsedBody,
1663
- errorCode,
1664
- });
1665
- }
1666
- };
1667
830
  export const de_UpdateRelatedItemsCommand = async (output, context) => {
1668
831
  if (output.statusCode !== 204 && output.statusCode >= 300) {
1669
- return de_UpdateRelatedItemsCommandError(output, context);
832
+ return de_CommandError(output, context);
1670
833
  }
1671
834
  const contents = map({
1672
835
  $metadata: deserializeMetadata(output),
@@ -1674,43 +837,9 @@ export const de_UpdateRelatedItemsCommand = async (output, context) => {
1674
837
  await collectBody(output.body, context);
1675
838
  return contents;
1676
839
  };
1677
- const de_UpdateRelatedItemsCommandError = async (output, context) => {
1678
- const parsedOutput = {
1679
- ...output,
1680
- body: await parseErrorBody(output.body, context),
1681
- };
1682
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1683
- switch (errorCode) {
1684
- case "AccessDeniedException":
1685
- case "com.amazonaws.ssmincidents#AccessDeniedException":
1686
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
1687
- case "ConflictException":
1688
- case "com.amazonaws.ssmincidents#ConflictException":
1689
- throw await de_ConflictExceptionRes(parsedOutput, context);
1690
- case "InternalServerException":
1691
- case "com.amazonaws.ssmincidents#InternalServerException":
1692
- throw await de_InternalServerExceptionRes(parsedOutput, context);
1693
- case "ResourceNotFoundException":
1694
- case "com.amazonaws.ssmincidents#ResourceNotFoundException":
1695
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
1696
- case "ThrottlingException":
1697
- case "com.amazonaws.ssmincidents#ThrottlingException":
1698
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
1699
- case "ValidationException":
1700
- case "com.amazonaws.ssmincidents#ValidationException":
1701
- throw await de_ValidationExceptionRes(parsedOutput, context);
1702
- default:
1703
- const parsedBody = parsedOutput.body;
1704
- return throwDefaultError({
1705
- output,
1706
- parsedBody,
1707
- errorCode,
1708
- });
1709
- }
1710
- };
1711
840
  export const de_UpdateReplicationSetCommand = async (output, context) => {
1712
841
  if (output.statusCode !== 204 && output.statusCode >= 300) {
1713
- return de_UpdateReplicationSetCommandError(output, context);
842
+ return de_CommandError(output, context);
1714
843
  }
1715
844
  const contents = map({
1716
845
  $metadata: deserializeMetadata(output),
@@ -1718,43 +847,9 @@ export const de_UpdateReplicationSetCommand = async (output, context) => {
1718
847
  await collectBody(output.body, context);
1719
848
  return contents;
1720
849
  };
1721
- const de_UpdateReplicationSetCommandError = async (output, context) => {
1722
- const parsedOutput = {
1723
- ...output,
1724
- body: await parseErrorBody(output.body, context),
1725
- };
1726
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1727
- switch (errorCode) {
1728
- case "AccessDeniedException":
1729
- case "com.amazonaws.ssmincidents#AccessDeniedException":
1730
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
1731
- case "ConflictException":
1732
- case "com.amazonaws.ssmincidents#ConflictException":
1733
- throw await de_ConflictExceptionRes(parsedOutput, context);
1734
- case "InternalServerException":
1735
- case "com.amazonaws.ssmincidents#InternalServerException":
1736
- throw await de_InternalServerExceptionRes(parsedOutput, context);
1737
- case "ResourceNotFoundException":
1738
- case "com.amazonaws.ssmincidents#ResourceNotFoundException":
1739
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
1740
- case "ThrottlingException":
1741
- case "com.amazonaws.ssmincidents#ThrottlingException":
1742
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
1743
- case "ValidationException":
1744
- case "com.amazonaws.ssmincidents#ValidationException":
1745
- throw await de_ValidationExceptionRes(parsedOutput, context);
1746
- default:
1747
- const parsedBody = parsedOutput.body;
1748
- return throwDefaultError({
1749
- output,
1750
- parsedBody,
1751
- errorCode,
1752
- });
1753
- }
1754
- };
1755
850
  export const de_UpdateResponsePlanCommand = async (output, context) => {
1756
851
  if (output.statusCode !== 204 && output.statusCode >= 300) {
1757
- return de_UpdateResponsePlanCommandError(output, context);
852
+ return de_CommandError(output, context);
1758
853
  }
1759
854
  const contents = map({
1760
855
  $metadata: deserializeMetadata(output),
@@ -1762,43 +857,9 @@ export const de_UpdateResponsePlanCommand = async (output, context) => {
1762
857
  await collectBody(output.body, context);
1763
858
  return contents;
1764
859
  };
1765
- const de_UpdateResponsePlanCommandError = async (output, context) => {
1766
- const parsedOutput = {
1767
- ...output,
1768
- body: await parseErrorBody(output.body, context),
1769
- };
1770
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1771
- switch (errorCode) {
1772
- case "AccessDeniedException":
1773
- case "com.amazonaws.ssmincidents#AccessDeniedException":
1774
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
1775
- case "ConflictException":
1776
- case "com.amazonaws.ssmincidents#ConflictException":
1777
- throw await de_ConflictExceptionRes(parsedOutput, context);
1778
- case "InternalServerException":
1779
- case "com.amazonaws.ssmincidents#InternalServerException":
1780
- throw await de_InternalServerExceptionRes(parsedOutput, context);
1781
- case "ResourceNotFoundException":
1782
- case "com.amazonaws.ssmincidents#ResourceNotFoundException":
1783
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
1784
- case "ThrottlingException":
1785
- case "com.amazonaws.ssmincidents#ThrottlingException":
1786
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
1787
- case "ValidationException":
1788
- case "com.amazonaws.ssmincidents#ValidationException":
1789
- throw await de_ValidationExceptionRes(parsedOutput, context);
1790
- default:
1791
- const parsedBody = parsedOutput.body;
1792
- return throwDefaultError({
1793
- output,
1794
- parsedBody,
1795
- errorCode,
1796
- });
1797
- }
1798
- };
1799
860
  export const de_UpdateTimelineEventCommand = async (output, context) => {
1800
861
  if (output.statusCode !== 204 && output.statusCode >= 300) {
1801
- return de_UpdateTimelineEventCommandError(output, context);
862
+ return de_CommandError(output, context);
1802
863
  }
1803
864
  const contents = map({
1804
865
  $metadata: deserializeMetadata(output),
@@ -1806,7 +867,7 @@ export const de_UpdateTimelineEventCommand = async (output, context) => {
1806
867
  await collectBody(output.body, context);
1807
868
  return contents;
1808
869
  };
1809
- const de_UpdateTimelineEventCommandError = async (output, context) => {
870
+ const de_CommandError = async (output, context) => {
1810
871
  const parsedOutput = {
1811
872
  ...output,
1812
873
  body: await parseErrorBody(output.body, context),
@@ -1816,9 +877,6 @@ const de_UpdateTimelineEventCommandError = async (output, context) => {
1816
877
  case "AccessDeniedException":
1817
878
  case "com.amazonaws.ssmincidents#AccessDeniedException":
1818
879
  throw await de_AccessDeniedExceptionRes(parsedOutput, context);
1819
- case "ConflictException":
1820
- case "com.amazonaws.ssmincidents#ConflictException":
1821
- throw await de_ConflictExceptionRes(parsedOutput, context);
1822
880
  case "InternalServerException":
1823
881
  case "com.amazonaws.ssmincidents#InternalServerException":
1824
882
  throw await de_InternalServerExceptionRes(parsedOutput, context);
@@ -1831,6 +889,12 @@ const de_UpdateTimelineEventCommandError = async (output, context) => {
1831
889
  case "ValidationException":
1832
890
  case "com.amazonaws.ssmincidents#ValidationException":
1833
891
  throw await de_ValidationExceptionRes(parsedOutput, context);
892
+ case "ConflictException":
893
+ case "com.amazonaws.ssmincidents#ConflictException":
894
+ throw await de_ConflictExceptionRes(parsedOutput, context);
895
+ case "ServiceQuotaExceededException":
896
+ case "com.amazonaws.ssmincidents#ServiceQuotaExceededException":
897
+ throw await de_ServiceQuotaExceededExceptionRes(parsedOutput, context);
1834
898
  default:
1835
899
  const parsedBody = parsedOutput.body;
1836
900
  return throwDefaultError({