@aws-sdk/client-pinpoint-email 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.
@@ -551,7 +551,7 @@ export const se_UpdateConfigurationSetEventDestinationCommand = async (input, co
551
551
  };
552
552
  export const de_CreateConfigurationSetCommand = async (output, context) => {
553
553
  if (output.statusCode !== 200 && output.statusCode >= 300) {
554
- return de_CreateConfigurationSetCommandError(output, context);
554
+ return de_CommandError(output, context);
555
555
  }
556
556
  const contents = map({
557
557
  $metadata: deserializeMetadata(output),
@@ -559,43 +559,9 @@ export const de_CreateConfigurationSetCommand = async (output, context) => {
559
559
  await collectBody(output.body, context);
560
560
  return contents;
561
561
  };
562
- const de_CreateConfigurationSetCommandError = async (output, context) => {
563
- const parsedOutput = {
564
- ...output,
565
- body: await parseErrorBody(output.body, context),
566
- };
567
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
568
- switch (errorCode) {
569
- case "AlreadyExistsException":
570
- case "com.amazonaws.pinpointemail#AlreadyExistsException":
571
- throw await de_AlreadyExistsExceptionRes(parsedOutput, context);
572
- case "BadRequestException":
573
- case "com.amazonaws.pinpointemail#BadRequestException":
574
- throw await de_BadRequestExceptionRes(parsedOutput, context);
575
- case "ConcurrentModificationException":
576
- case "com.amazonaws.pinpointemail#ConcurrentModificationException":
577
- throw await de_ConcurrentModificationExceptionRes(parsedOutput, context);
578
- case "LimitExceededException":
579
- case "com.amazonaws.pinpointemail#LimitExceededException":
580
- throw await de_LimitExceededExceptionRes(parsedOutput, context);
581
- case "NotFoundException":
582
- case "com.amazonaws.pinpointemail#NotFoundException":
583
- throw await de_NotFoundExceptionRes(parsedOutput, context);
584
- case "TooManyRequestsException":
585
- case "com.amazonaws.pinpointemail#TooManyRequestsException":
586
- throw await de_TooManyRequestsExceptionRes(parsedOutput, context);
587
- default:
588
- const parsedBody = parsedOutput.body;
589
- return throwDefaultError({
590
- output,
591
- parsedBody,
592
- errorCode,
593
- });
594
- }
595
- };
596
562
  export const de_CreateConfigurationSetEventDestinationCommand = async (output, context) => {
597
563
  if (output.statusCode !== 200 && output.statusCode >= 300) {
598
- return de_CreateConfigurationSetEventDestinationCommandError(output, context);
564
+ return de_CommandError(output, context);
599
565
  }
600
566
  const contents = map({
601
567
  $metadata: deserializeMetadata(output),
@@ -603,40 +569,9 @@ export const de_CreateConfigurationSetEventDestinationCommand = async (output, c
603
569
  await collectBody(output.body, context);
604
570
  return contents;
605
571
  };
606
- const de_CreateConfigurationSetEventDestinationCommandError = async (output, context) => {
607
- const parsedOutput = {
608
- ...output,
609
- body: await parseErrorBody(output.body, context),
610
- };
611
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
612
- switch (errorCode) {
613
- case "AlreadyExistsException":
614
- case "com.amazonaws.pinpointemail#AlreadyExistsException":
615
- throw await de_AlreadyExistsExceptionRes(parsedOutput, context);
616
- case "BadRequestException":
617
- case "com.amazonaws.pinpointemail#BadRequestException":
618
- throw await de_BadRequestExceptionRes(parsedOutput, context);
619
- case "LimitExceededException":
620
- case "com.amazonaws.pinpointemail#LimitExceededException":
621
- throw await de_LimitExceededExceptionRes(parsedOutput, context);
622
- case "NotFoundException":
623
- case "com.amazonaws.pinpointemail#NotFoundException":
624
- throw await de_NotFoundExceptionRes(parsedOutput, context);
625
- case "TooManyRequestsException":
626
- case "com.amazonaws.pinpointemail#TooManyRequestsException":
627
- throw await de_TooManyRequestsExceptionRes(parsedOutput, context);
628
- default:
629
- const parsedBody = parsedOutput.body;
630
- return throwDefaultError({
631
- output,
632
- parsedBody,
633
- errorCode,
634
- });
635
- }
636
- };
637
572
  export const de_CreateDedicatedIpPoolCommand = async (output, context) => {
638
573
  if (output.statusCode !== 200 && output.statusCode >= 300) {
639
- return de_CreateDedicatedIpPoolCommandError(output, context);
574
+ return de_CommandError(output, context);
640
575
  }
641
576
  const contents = map({
642
577
  $metadata: deserializeMetadata(output),
@@ -644,40 +579,9 @@ export const de_CreateDedicatedIpPoolCommand = async (output, context) => {
644
579
  await collectBody(output.body, context);
645
580
  return contents;
646
581
  };
647
- const de_CreateDedicatedIpPoolCommandError = async (output, context) => {
648
- const parsedOutput = {
649
- ...output,
650
- body: await parseErrorBody(output.body, context),
651
- };
652
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
653
- switch (errorCode) {
654
- case "AlreadyExistsException":
655
- case "com.amazonaws.pinpointemail#AlreadyExistsException":
656
- throw await de_AlreadyExistsExceptionRes(parsedOutput, context);
657
- case "BadRequestException":
658
- case "com.amazonaws.pinpointemail#BadRequestException":
659
- throw await de_BadRequestExceptionRes(parsedOutput, context);
660
- case "ConcurrentModificationException":
661
- case "com.amazonaws.pinpointemail#ConcurrentModificationException":
662
- throw await de_ConcurrentModificationExceptionRes(parsedOutput, context);
663
- case "LimitExceededException":
664
- case "com.amazonaws.pinpointemail#LimitExceededException":
665
- throw await de_LimitExceededExceptionRes(parsedOutput, context);
666
- case "TooManyRequestsException":
667
- case "com.amazonaws.pinpointemail#TooManyRequestsException":
668
- throw await de_TooManyRequestsExceptionRes(parsedOutput, context);
669
- default:
670
- const parsedBody = parsedOutput.body;
671
- return throwDefaultError({
672
- output,
673
- parsedBody,
674
- errorCode,
675
- });
676
- }
677
- };
678
582
  export const de_CreateDeliverabilityTestReportCommand = async (output, context) => {
679
583
  if (output.statusCode !== 200 && output.statusCode >= 300) {
680
- return de_CreateDeliverabilityTestReportCommandError(output, context);
584
+ return de_CommandError(output, context);
681
585
  }
682
586
  const contents = map({
683
587
  $metadata: deserializeMetadata(output),
@@ -690,52 +594,9 @@ export const de_CreateDeliverabilityTestReportCommand = async (output, context)
690
594
  Object.assign(contents, doc);
691
595
  return contents;
692
596
  };
693
- const de_CreateDeliverabilityTestReportCommandError = async (output, context) => {
694
- const parsedOutput = {
695
- ...output,
696
- body: await parseErrorBody(output.body, context),
697
- };
698
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
699
- switch (errorCode) {
700
- case "AccountSuspendedException":
701
- case "com.amazonaws.pinpointemail#AccountSuspendedException":
702
- throw await de_AccountSuspendedExceptionRes(parsedOutput, context);
703
- case "BadRequestException":
704
- case "com.amazonaws.pinpointemail#BadRequestException":
705
- throw await de_BadRequestExceptionRes(parsedOutput, context);
706
- case "ConcurrentModificationException":
707
- case "com.amazonaws.pinpointemail#ConcurrentModificationException":
708
- throw await de_ConcurrentModificationExceptionRes(parsedOutput, context);
709
- case "LimitExceededException":
710
- case "com.amazonaws.pinpointemail#LimitExceededException":
711
- throw await de_LimitExceededExceptionRes(parsedOutput, context);
712
- case "MailFromDomainNotVerifiedException":
713
- case "com.amazonaws.pinpointemail#MailFromDomainNotVerifiedException":
714
- throw await de_MailFromDomainNotVerifiedExceptionRes(parsedOutput, context);
715
- case "MessageRejected":
716
- case "com.amazonaws.pinpointemail#MessageRejected":
717
- throw await de_MessageRejectedRes(parsedOutput, context);
718
- case "NotFoundException":
719
- case "com.amazonaws.pinpointemail#NotFoundException":
720
- throw await de_NotFoundExceptionRes(parsedOutput, context);
721
- case "SendingPausedException":
722
- case "com.amazonaws.pinpointemail#SendingPausedException":
723
- throw await de_SendingPausedExceptionRes(parsedOutput, context);
724
- case "TooManyRequestsException":
725
- case "com.amazonaws.pinpointemail#TooManyRequestsException":
726
- throw await de_TooManyRequestsExceptionRes(parsedOutput, context);
727
- default:
728
- const parsedBody = parsedOutput.body;
729
- return throwDefaultError({
730
- output,
731
- parsedBody,
732
- errorCode,
733
- });
734
- }
735
- };
736
597
  export const de_CreateEmailIdentityCommand = async (output, context) => {
737
598
  if (output.statusCode !== 200 && output.statusCode >= 300) {
738
- return de_CreateEmailIdentityCommandError(output, context);
599
+ return de_CommandError(output, context);
739
600
  }
740
601
  const contents = map({
741
602
  $metadata: deserializeMetadata(output),
@@ -749,37 +610,9 @@ export const de_CreateEmailIdentityCommand = async (output, context) => {
749
610
  Object.assign(contents, doc);
750
611
  return contents;
751
612
  };
752
- const de_CreateEmailIdentityCommandError = 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 "BadRequestException":
760
- case "com.amazonaws.pinpointemail#BadRequestException":
761
- throw await de_BadRequestExceptionRes(parsedOutput, context);
762
- case "ConcurrentModificationException":
763
- case "com.amazonaws.pinpointemail#ConcurrentModificationException":
764
- throw await de_ConcurrentModificationExceptionRes(parsedOutput, context);
765
- case "LimitExceededException":
766
- case "com.amazonaws.pinpointemail#LimitExceededException":
767
- throw await de_LimitExceededExceptionRes(parsedOutput, context);
768
- case "TooManyRequestsException":
769
- case "com.amazonaws.pinpointemail#TooManyRequestsException":
770
- throw await de_TooManyRequestsExceptionRes(parsedOutput, context);
771
- default:
772
- const parsedBody = parsedOutput.body;
773
- return throwDefaultError({
774
- output,
775
- parsedBody,
776
- errorCode,
777
- });
778
- }
779
- };
780
613
  export const de_DeleteConfigurationSetCommand = async (output, context) => {
781
614
  if (output.statusCode !== 200 && output.statusCode >= 300) {
782
- return de_DeleteConfigurationSetCommandError(output, context);
615
+ return de_CommandError(output, context);
783
616
  }
784
617
  const contents = map({
785
618
  $metadata: deserializeMetadata(output),
@@ -787,37 +620,9 @@ export const de_DeleteConfigurationSetCommand = async (output, context) => {
787
620
  await collectBody(output.body, context);
788
621
  return contents;
789
622
  };
790
- const de_DeleteConfigurationSetCommandError = async (output, context) => {
791
- const parsedOutput = {
792
- ...output,
793
- body: await parseErrorBody(output.body, context),
794
- };
795
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
796
- switch (errorCode) {
797
- case "BadRequestException":
798
- case "com.amazonaws.pinpointemail#BadRequestException":
799
- throw await de_BadRequestExceptionRes(parsedOutput, context);
800
- case "ConcurrentModificationException":
801
- case "com.amazonaws.pinpointemail#ConcurrentModificationException":
802
- throw await de_ConcurrentModificationExceptionRes(parsedOutput, context);
803
- case "NotFoundException":
804
- case "com.amazonaws.pinpointemail#NotFoundException":
805
- throw await de_NotFoundExceptionRes(parsedOutput, context);
806
- case "TooManyRequestsException":
807
- case "com.amazonaws.pinpointemail#TooManyRequestsException":
808
- throw await de_TooManyRequestsExceptionRes(parsedOutput, context);
809
- default:
810
- const parsedBody = parsedOutput.body;
811
- return throwDefaultError({
812
- output,
813
- parsedBody,
814
- errorCode,
815
- });
816
- }
817
- };
818
623
  export const de_DeleteConfigurationSetEventDestinationCommand = async (output, context) => {
819
624
  if (output.statusCode !== 200 && output.statusCode >= 300) {
820
- return de_DeleteConfigurationSetEventDestinationCommandError(output, context);
625
+ return de_CommandError(output, context);
821
626
  }
822
627
  const contents = map({
823
628
  $metadata: deserializeMetadata(output),
@@ -825,34 +630,9 @@ export const de_DeleteConfigurationSetEventDestinationCommand = async (output, c
825
630
  await collectBody(output.body, context);
826
631
  return contents;
827
632
  };
828
- const de_DeleteConfigurationSetEventDestinationCommandError = async (output, context) => {
829
- const parsedOutput = {
830
- ...output,
831
- body: await parseErrorBody(output.body, context),
832
- };
833
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
834
- switch (errorCode) {
835
- case "BadRequestException":
836
- case "com.amazonaws.pinpointemail#BadRequestException":
837
- throw await de_BadRequestExceptionRes(parsedOutput, context);
838
- case "NotFoundException":
839
- case "com.amazonaws.pinpointemail#NotFoundException":
840
- throw await de_NotFoundExceptionRes(parsedOutput, context);
841
- case "TooManyRequestsException":
842
- case "com.amazonaws.pinpointemail#TooManyRequestsException":
843
- throw await de_TooManyRequestsExceptionRes(parsedOutput, context);
844
- default:
845
- const parsedBody = parsedOutput.body;
846
- return throwDefaultError({
847
- output,
848
- parsedBody,
849
- errorCode,
850
- });
851
- }
852
- };
853
633
  export const de_DeleteDedicatedIpPoolCommand = async (output, context) => {
854
634
  if (output.statusCode !== 200 && output.statusCode >= 300) {
855
- return de_DeleteDedicatedIpPoolCommandError(output, context);
635
+ return de_CommandError(output, context);
856
636
  }
857
637
  const contents = map({
858
638
  $metadata: deserializeMetadata(output),
@@ -860,37 +640,9 @@ export const de_DeleteDedicatedIpPoolCommand = async (output, context) => {
860
640
  await collectBody(output.body, context);
861
641
  return contents;
862
642
  };
863
- const de_DeleteDedicatedIpPoolCommandError = async (output, context) => {
864
- const parsedOutput = {
865
- ...output,
866
- body: await parseErrorBody(output.body, context),
867
- };
868
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
869
- switch (errorCode) {
870
- case "BadRequestException":
871
- case "com.amazonaws.pinpointemail#BadRequestException":
872
- throw await de_BadRequestExceptionRes(parsedOutput, context);
873
- case "ConcurrentModificationException":
874
- case "com.amazonaws.pinpointemail#ConcurrentModificationException":
875
- throw await de_ConcurrentModificationExceptionRes(parsedOutput, context);
876
- case "NotFoundException":
877
- case "com.amazonaws.pinpointemail#NotFoundException":
878
- throw await de_NotFoundExceptionRes(parsedOutput, context);
879
- case "TooManyRequestsException":
880
- case "com.amazonaws.pinpointemail#TooManyRequestsException":
881
- throw await de_TooManyRequestsExceptionRes(parsedOutput, context);
882
- default:
883
- const parsedBody = parsedOutput.body;
884
- return throwDefaultError({
885
- output,
886
- parsedBody,
887
- errorCode,
888
- });
889
- }
890
- };
891
643
  export const de_DeleteEmailIdentityCommand = async (output, context) => {
892
644
  if (output.statusCode !== 200 && output.statusCode >= 300) {
893
- return de_DeleteEmailIdentityCommandError(output, context);
645
+ return de_CommandError(output, context);
894
646
  }
895
647
  const contents = map({
896
648
  $metadata: deserializeMetadata(output),
@@ -898,37 +650,9 @@ export const de_DeleteEmailIdentityCommand = async (output, context) => {
898
650
  await collectBody(output.body, context);
899
651
  return contents;
900
652
  };
901
- const de_DeleteEmailIdentityCommandError = async (output, context) => {
902
- const parsedOutput = {
903
- ...output,
904
- body: await parseErrorBody(output.body, context),
905
- };
906
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
907
- switch (errorCode) {
908
- case "BadRequestException":
909
- case "com.amazonaws.pinpointemail#BadRequestException":
910
- throw await de_BadRequestExceptionRes(parsedOutput, context);
911
- case "ConcurrentModificationException":
912
- case "com.amazonaws.pinpointemail#ConcurrentModificationException":
913
- throw await de_ConcurrentModificationExceptionRes(parsedOutput, context);
914
- case "NotFoundException":
915
- case "com.amazonaws.pinpointemail#NotFoundException":
916
- throw await de_NotFoundExceptionRes(parsedOutput, context);
917
- case "TooManyRequestsException":
918
- case "com.amazonaws.pinpointemail#TooManyRequestsException":
919
- throw await de_TooManyRequestsExceptionRes(parsedOutput, context);
920
- default:
921
- const parsedBody = parsedOutput.body;
922
- return throwDefaultError({
923
- output,
924
- parsedBody,
925
- errorCode,
926
- });
927
- }
928
- };
929
653
  export const de_GetAccountCommand = async (output, context) => {
930
654
  if (output.statusCode !== 200 && output.statusCode >= 300) {
931
- return de_GetAccountCommandError(output, context);
655
+ return de_CommandError(output, context);
932
656
  }
933
657
  const contents = map({
934
658
  $metadata: deserializeMetadata(output),
@@ -944,31 +668,9 @@ export const de_GetAccountCommand = async (output, context) => {
944
668
  Object.assign(contents, doc);
945
669
  return contents;
946
670
  };
947
- const de_GetAccountCommandError = async (output, context) => {
948
- const parsedOutput = {
949
- ...output,
950
- body: await parseErrorBody(output.body, context),
951
- };
952
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
953
- switch (errorCode) {
954
- case "BadRequestException":
955
- case "com.amazonaws.pinpointemail#BadRequestException":
956
- throw await de_BadRequestExceptionRes(parsedOutput, context);
957
- case "TooManyRequestsException":
958
- case "com.amazonaws.pinpointemail#TooManyRequestsException":
959
- throw await de_TooManyRequestsExceptionRes(parsedOutput, context);
960
- default:
961
- const parsedBody = parsedOutput.body;
962
- return throwDefaultError({
963
- output,
964
- parsedBody,
965
- errorCode,
966
- });
967
- }
968
- };
969
671
  export const de_GetBlacklistReportsCommand = async (output, context) => {
970
672
  if (output.statusCode !== 200 && output.statusCode >= 300) {
971
- return de_GetBlacklistReportsCommandError(output, context);
673
+ return de_CommandError(output, context);
972
674
  }
973
675
  const contents = map({
974
676
  $metadata: deserializeMetadata(output),
@@ -980,34 +682,9 @@ export const de_GetBlacklistReportsCommand = async (output, context) => {
980
682
  Object.assign(contents, doc);
981
683
  return contents;
982
684
  };
983
- const de_GetBlacklistReportsCommandError = async (output, context) => {
984
- const parsedOutput = {
985
- ...output,
986
- body: await parseErrorBody(output.body, context),
987
- };
988
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
989
- switch (errorCode) {
990
- case "BadRequestException":
991
- case "com.amazonaws.pinpointemail#BadRequestException":
992
- throw await de_BadRequestExceptionRes(parsedOutput, context);
993
- case "NotFoundException":
994
- case "com.amazonaws.pinpointemail#NotFoundException":
995
- throw await de_NotFoundExceptionRes(parsedOutput, context);
996
- case "TooManyRequestsException":
997
- case "com.amazonaws.pinpointemail#TooManyRequestsException":
998
- throw await de_TooManyRequestsExceptionRes(parsedOutput, context);
999
- default:
1000
- const parsedBody = parsedOutput.body;
1001
- return throwDefaultError({
1002
- output,
1003
- parsedBody,
1004
- errorCode,
1005
- });
1006
- }
1007
- };
1008
685
  export const de_GetConfigurationSetCommand = async (output, context) => {
1009
686
  if (output.statusCode !== 200 && output.statusCode >= 300) {
1010
- return de_GetConfigurationSetCommandError(output, context);
687
+ return de_CommandError(output, context);
1011
688
  }
1012
689
  const contents = map({
1013
690
  $metadata: deserializeMetadata(output),
@@ -1018,79 +695,29 @@ export const de_GetConfigurationSetCommand = async (output, context) => {
1018
695
  DeliveryOptions: _json,
1019
696
  ReputationOptions: (_) => de_ReputationOptions(_, context),
1020
697
  SendingOptions: _json,
1021
- Tags: _json,
1022
- TrackingOptions: _json,
1023
- });
1024
- Object.assign(contents, doc);
1025
- return contents;
1026
- };
1027
- const de_GetConfigurationSetCommandError = async (output, context) => {
1028
- const parsedOutput = {
1029
- ...output,
1030
- body: await parseErrorBody(output.body, context),
1031
- };
1032
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1033
- switch (errorCode) {
1034
- case "BadRequestException":
1035
- case "com.amazonaws.pinpointemail#BadRequestException":
1036
- throw await de_BadRequestExceptionRes(parsedOutput, context);
1037
- case "NotFoundException":
1038
- case "com.amazonaws.pinpointemail#NotFoundException":
1039
- throw await de_NotFoundExceptionRes(parsedOutput, context);
1040
- case "TooManyRequestsException":
1041
- case "com.amazonaws.pinpointemail#TooManyRequestsException":
1042
- throw await de_TooManyRequestsExceptionRes(parsedOutput, context);
1043
- default:
1044
- const parsedBody = parsedOutput.body;
1045
- return throwDefaultError({
1046
- output,
1047
- parsedBody,
1048
- errorCode,
1049
- });
1050
- }
1051
- };
1052
- export const de_GetConfigurationSetEventDestinationsCommand = async (output, context) => {
1053
- if (output.statusCode !== 200 && output.statusCode >= 300) {
1054
- return de_GetConfigurationSetEventDestinationsCommandError(output, context);
1055
- }
1056
- const contents = map({
1057
- $metadata: deserializeMetadata(output),
1058
- });
1059
- const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
1060
- const doc = take(data, {
1061
- EventDestinations: _json,
1062
- });
1063
- Object.assign(contents, doc);
1064
- return contents;
1065
- };
1066
- const de_GetConfigurationSetEventDestinationsCommandError = async (output, context) => {
1067
- const parsedOutput = {
1068
- ...output,
1069
- body: await parseErrorBody(output.body, context),
1070
- };
1071
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1072
- switch (errorCode) {
1073
- case "BadRequestException":
1074
- case "com.amazonaws.pinpointemail#BadRequestException":
1075
- throw await de_BadRequestExceptionRes(parsedOutput, context);
1076
- case "NotFoundException":
1077
- case "com.amazonaws.pinpointemail#NotFoundException":
1078
- throw await de_NotFoundExceptionRes(parsedOutput, context);
1079
- case "TooManyRequestsException":
1080
- case "com.amazonaws.pinpointemail#TooManyRequestsException":
1081
- throw await de_TooManyRequestsExceptionRes(parsedOutput, context);
1082
- default:
1083
- const parsedBody = parsedOutput.body;
1084
- return throwDefaultError({
1085
- output,
1086
- parsedBody,
1087
- errorCode,
1088
- });
698
+ Tags: _json,
699
+ TrackingOptions: _json,
700
+ });
701
+ Object.assign(contents, doc);
702
+ return contents;
703
+ };
704
+ export const de_GetConfigurationSetEventDestinationsCommand = async (output, context) => {
705
+ if (output.statusCode !== 200 && output.statusCode >= 300) {
706
+ return de_CommandError(output, context);
1089
707
  }
708
+ const contents = map({
709
+ $metadata: deserializeMetadata(output),
710
+ });
711
+ const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
712
+ const doc = take(data, {
713
+ EventDestinations: _json,
714
+ });
715
+ Object.assign(contents, doc);
716
+ return contents;
1090
717
  };
1091
718
  export const de_GetDedicatedIpCommand = async (output, context) => {
1092
719
  if (output.statusCode !== 200 && output.statusCode >= 300) {
1093
- return de_GetDedicatedIpCommandError(output, context);
720
+ return de_CommandError(output, context);
1094
721
  }
1095
722
  const contents = map({
1096
723
  $metadata: deserializeMetadata(output),
@@ -1102,34 +729,9 @@ export const de_GetDedicatedIpCommand = async (output, context) => {
1102
729
  Object.assign(contents, doc);
1103
730
  return contents;
1104
731
  };
1105
- const de_GetDedicatedIpCommandError = async (output, context) => {
1106
- const parsedOutput = {
1107
- ...output,
1108
- body: await parseErrorBody(output.body, context),
1109
- };
1110
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1111
- switch (errorCode) {
1112
- case "BadRequestException":
1113
- case "com.amazonaws.pinpointemail#BadRequestException":
1114
- throw await de_BadRequestExceptionRes(parsedOutput, context);
1115
- case "NotFoundException":
1116
- case "com.amazonaws.pinpointemail#NotFoundException":
1117
- throw await de_NotFoundExceptionRes(parsedOutput, context);
1118
- case "TooManyRequestsException":
1119
- case "com.amazonaws.pinpointemail#TooManyRequestsException":
1120
- throw await de_TooManyRequestsExceptionRes(parsedOutput, context);
1121
- default:
1122
- const parsedBody = parsedOutput.body;
1123
- return throwDefaultError({
1124
- output,
1125
- parsedBody,
1126
- errorCode,
1127
- });
1128
- }
1129
- };
1130
732
  export const de_GetDedicatedIpsCommand = async (output, context) => {
1131
733
  if (output.statusCode !== 200 && output.statusCode >= 300) {
1132
- return de_GetDedicatedIpsCommandError(output, context);
734
+ return de_CommandError(output, context);
1133
735
  }
1134
736
  const contents = map({
1135
737
  $metadata: deserializeMetadata(output),
@@ -1142,34 +744,9 @@ export const de_GetDedicatedIpsCommand = async (output, context) => {
1142
744
  Object.assign(contents, doc);
1143
745
  return contents;
1144
746
  };
1145
- const de_GetDedicatedIpsCommandError = async (output, context) => {
1146
- const parsedOutput = {
1147
- ...output,
1148
- body: await parseErrorBody(output.body, context),
1149
- };
1150
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1151
- switch (errorCode) {
1152
- case "BadRequestException":
1153
- case "com.amazonaws.pinpointemail#BadRequestException":
1154
- throw await de_BadRequestExceptionRes(parsedOutput, context);
1155
- case "NotFoundException":
1156
- case "com.amazonaws.pinpointemail#NotFoundException":
1157
- throw await de_NotFoundExceptionRes(parsedOutput, context);
1158
- case "TooManyRequestsException":
1159
- case "com.amazonaws.pinpointemail#TooManyRequestsException":
1160
- throw await de_TooManyRequestsExceptionRes(parsedOutput, context);
1161
- default:
1162
- const parsedBody = parsedOutput.body;
1163
- return throwDefaultError({
1164
- output,
1165
- parsedBody,
1166
- errorCode,
1167
- });
1168
- }
1169
- };
1170
747
  export const de_GetDeliverabilityDashboardOptionsCommand = async (output, context) => {
1171
748
  if (output.statusCode !== 200 && output.statusCode >= 300) {
1172
- return de_GetDeliverabilityDashboardOptionsCommandError(output, context);
749
+ return de_CommandError(output, context);
1173
750
  }
1174
751
  const contents = map({
1175
752
  $metadata: deserializeMetadata(output),
@@ -1185,34 +762,9 @@ export const de_GetDeliverabilityDashboardOptionsCommand = async (output, contex
1185
762
  Object.assign(contents, doc);
1186
763
  return contents;
1187
764
  };
1188
- const de_GetDeliverabilityDashboardOptionsCommandError = async (output, context) => {
1189
- const parsedOutput = {
1190
- ...output,
1191
- body: await parseErrorBody(output.body, context),
1192
- };
1193
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1194
- switch (errorCode) {
1195
- case "BadRequestException":
1196
- case "com.amazonaws.pinpointemail#BadRequestException":
1197
- throw await de_BadRequestExceptionRes(parsedOutput, context);
1198
- case "LimitExceededException":
1199
- case "com.amazonaws.pinpointemail#LimitExceededException":
1200
- throw await de_LimitExceededExceptionRes(parsedOutput, context);
1201
- case "TooManyRequestsException":
1202
- case "com.amazonaws.pinpointemail#TooManyRequestsException":
1203
- throw await de_TooManyRequestsExceptionRes(parsedOutput, context);
1204
- default:
1205
- const parsedBody = parsedOutput.body;
1206
- return throwDefaultError({
1207
- output,
1208
- parsedBody,
1209
- errorCode,
1210
- });
1211
- }
1212
- };
1213
765
  export const de_GetDeliverabilityTestReportCommand = async (output, context) => {
1214
766
  if (output.statusCode !== 200 && output.statusCode >= 300) {
1215
- return de_GetDeliverabilityTestReportCommandError(output, context);
767
+ return de_CommandError(output, context);
1216
768
  }
1217
769
  const contents = map({
1218
770
  $metadata: deserializeMetadata(output),
@@ -1228,34 +780,9 @@ export const de_GetDeliverabilityTestReportCommand = async (output, context) =>
1228
780
  Object.assign(contents, doc);
1229
781
  return contents;
1230
782
  };
1231
- const de_GetDeliverabilityTestReportCommandError = async (output, context) => {
1232
- const parsedOutput = {
1233
- ...output,
1234
- body: await parseErrorBody(output.body, context),
1235
- };
1236
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1237
- switch (errorCode) {
1238
- case "BadRequestException":
1239
- case "com.amazonaws.pinpointemail#BadRequestException":
1240
- throw await de_BadRequestExceptionRes(parsedOutput, context);
1241
- case "NotFoundException":
1242
- case "com.amazonaws.pinpointemail#NotFoundException":
1243
- throw await de_NotFoundExceptionRes(parsedOutput, context);
1244
- case "TooManyRequestsException":
1245
- case "com.amazonaws.pinpointemail#TooManyRequestsException":
1246
- throw await de_TooManyRequestsExceptionRes(parsedOutput, context);
1247
- default:
1248
- const parsedBody = parsedOutput.body;
1249
- return throwDefaultError({
1250
- output,
1251
- parsedBody,
1252
- errorCode,
1253
- });
1254
- }
1255
- };
1256
783
  export const de_GetDomainDeliverabilityCampaignCommand = async (output, context) => {
1257
784
  if (output.statusCode !== 200 && output.statusCode >= 300) {
1258
- return de_GetDomainDeliverabilityCampaignCommandError(output, context);
785
+ return de_CommandError(output, context);
1259
786
  }
1260
787
  const contents = map({
1261
788
  $metadata: deserializeMetadata(output),
@@ -1267,34 +794,9 @@ export const de_GetDomainDeliverabilityCampaignCommand = async (output, context)
1267
794
  Object.assign(contents, doc);
1268
795
  return contents;
1269
796
  };
1270
- const de_GetDomainDeliverabilityCampaignCommandError = 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 "BadRequestException":
1278
- case "com.amazonaws.pinpointemail#BadRequestException":
1279
- throw await de_BadRequestExceptionRes(parsedOutput, context);
1280
- case "NotFoundException":
1281
- case "com.amazonaws.pinpointemail#NotFoundException":
1282
- throw await de_NotFoundExceptionRes(parsedOutput, context);
1283
- case "TooManyRequestsException":
1284
- case "com.amazonaws.pinpointemail#TooManyRequestsException":
1285
- throw await de_TooManyRequestsExceptionRes(parsedOutput, context);
1286
- default:
1287
- const parsedBody = parsedOutput.body;
1288
- return throwDefaultError({
1289
- output,
1290
- parsedBody,
1291
- errorCode,
1292
- });
1293
- }
1294
- };
1295
797
  export const de_GetDomainStatisticsReportCommand = async (output, context) => {
1296
798
  if (output.statusCode !== 200 && output.statusCode >= 300) {
1297
- return de_GetDomainStatisticsReportCommandError(output, context);
799
+ return de_CommandError(output, context);
1298
800
  }
1299
801
  const contents = map({
1300
802
  $metadata: deserializeMetadata(output),
@@ -1307,34 +809,9 @@ export const de_GetDomainStatisticsReportCommand = async (output, context) => {
1307
809
  Object.assign(contents, doc);
1308
810
  return contents;
1309
811
  };
1310
- const de_GetDomainStatisticsReportCommandError = async (output, context) => {
1311
- const parsedOutput = {
1312
- ...output,
1313
- body: await parseErrorBody(output.body, context),
1314
- };
1315
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1316
- switch (errorCode) {
1317
- case "BadRequestException":
1318
- case "com.amazonaws.pinpointemail#BadRequestException":
1319
- throw await de_BadRequestExceptionRes(parsedOutput, context);
1320
- case "NotFoundException":
1321
- case "com.amazonaws.pinpointemail#NotFoundException":
1322
- throw await de_NotFoundExceptionRes(parsedOutput, context);
1323
- case "TooManyRequestsException":
1324
- case "com.amazonaws.pinpointemail#TooManyRequestsException":
1325
- throw await de_TooManyRequestsExceptionRes(parsedOutput, context);
1326
- default:
1327
- const parsedBody = parsedOutput.body;
1328
- return throwDefaultError({
1329
- output,
1330
- parsedBody,
1331
- errorCode,
1332
- });
1333
- }
1334
- };
1335
812
  export const de_GetEmailIdentityCommand = async (output, context) => {
1336
813
  if (output.statusCode !== 200 && output.statusCode >= 300) {
1337
- return de_GetEmailIdentityCommandError(output, context);
814
+ return de_CommandError(output, context);
1338
815
  }
1339
816
  const contents = map({
1340
817
  $metadata: deserializeMetadata(output),
@@ -1351,34 +828,9 @@ export const de_GetEmailIdentityCommand = async (output, context) => {
1351
828
  Object.assign(contents, doc);
1352
829
  return contents;
1353
830
  };
1354
- const de_GetEmailIdentityCommandError = async (output, context) => {
1355
- const parsedOutput = {
1356
- ...output,
1357
- body: await parseErrorBody(output.body, context),
1358
- };
1359
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1360
- switch (errorCode) {
1361
- case "BadRequestException":
1362
- case "com.amazonaws.pinpointemail#BadRequestException":
1363
- throw await de_BadRequestExceptionRes(parsedOutput, context);
1364
- case "NotFoundException":
1365
- case "com.amazonaws.pinpointemail#NotFoundException":
1366
- throw await de_NotFoundExceptionRes(parsedOutput, context);
1367
- case "TooManyRequestsException":
1368
- case "com.amazonaws.pinpointemail#TooManyRequestsException":
1369
- throw await de_TooManyRequestsExceptionRes(parsedOutput, context);
1370
- default:
1371
- const parsedBody = parsedOutput.body;
1372
- return throwDefaultError({
1373
- output,
1374
- parsedBody,
1375
- errorCode,
1376
- });
1377
- }
1378
- };
1379
831
  export const de_ListConfigurationSetsCommand = async (output, context) => {
1380
832
  if (output.statusCode !== 200 && output.statusCode >= 300) {
1381
- return de_ListConfigurationSetsCommandError(output, context);
833
+ return de_CommandError(output, context);
1382
834
  }
1383
835
  const contents = map({
1384
836
  $metadata: deserializeMetadata(output),
@@ -1391,31 +843,9 @@ export const de_ListConfigurationSetsCommand = async (output, context) => {
1391
843
  Object.assign(contents, doc);
1392
844
  return contents;
1393
845
  };
1394
- const de_ListConfigurationSetsCommandError = async (output, context) => {
1395
- const parsedOutput = {
1396
- ...output,
1397
- body: await parseErrorBody(output.body, context),
1398
- };
1399
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1400
- switch (errorCode) {
1401
- case "BadRequestException":
1402
- case "com.amazonaws.pinpointemail#BadRequestException":
1403
- throw await de_BadRequestExceptionRes(parsedOutput, context);
1404
- case "TooManyRequestsException":
1405
- case "com.amazonaws.pinpointemail#TooManyRequestsException":
1406
- throw await de_TooManyRequestsExceptionRes(parsedOutput, context);
1407
- default:
1408
- const parsedBody = parsedOutput.body;
1409
- return throwDefaultError({
1410
- output,
1411
- parsedBody,
1412
- errorCode,
1413
- });
1414
- }
1415
- };
1416
846
  export const de_ListDedicatedIpPoolsCommand = async (output, context) => {
1417
847
  if (output.statusCode !== 200 && output.statusCode >= 300) {
1418
- return de_ListDedicatedIpPoolsCommandError(output, context);
848
+ return de_CommandError(output, context);
1419
849
  }
1420
850
  const contents = map({
1421
851
  $metadata: deserializeMetadata(output),
@@ -1428,71 +858,24 @@ export const de_ListDedicatedIpPoolsCommand = async (output, context) => {
1428
858
  Object.assign(contents, doc);
1429
859
  return contents;
1430
860
  };
1431
- const de_ListDedicatedIpPoolsCommandError = async (output, context) => {
1432
- const parsedOutput = {
1433
- ...output,
1434
- body: await parseErrorBody(output.body, context),
1435
- };
1436
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1437
- switch (errorCode) {
1438
- case "BadRequestException":
1439
- case "com.amazonaws.pinpointemail#BadRequestException":
1440
- throw await de_BadRequestExceptionRes(parsedOutput, context);
1441
- case "TooManyRequestsException":
1442
- case "com.amazonaws.pinpointemail#TooManyRequestsException":
1443
- throw await de_TooManyRequestsExceptionRes(parsedOutput, context);
1444
- default:
1445
- const parsedBody = parsedOutput.body;
1446
- return throwDefaultError({
1447
- output,
1448
- parsedBody,
1449
- errorCode,
1450
- });
1451
- }
1452
- };
1453
861
  export const de_ListDeliverabilityTestReportsCommand = async (output, context) => {
1454
862
  if (output.statusCode !== 200 && output.statusCode >= 300) {
1455
- return de_ListDeliverabilityTestReportsCommandError(output, context);
863
+ return de_CommandError(output, context);
1456
864
  }
1457
865
  const contents = map({
1458
866
  $metadata: deserializeMetadata(output),
1459
867
  });
1460
868
  const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
1461
869
  const doc = take(data, {
1462
- DeliverabilityTestReports: (_) => de_DeliverabilityTestReports(_, context),
1463
- NextToken: __expectString,
1464
- });
1465
- Object.assign(contents, doc);
1466
- return contents;
1467
- };
1468
- const de_ListDeliverabilityTestReportsCommandError = async (output, context) => {
1469
- const parsedOutput = {
1470
- ...output,
1471
- body: await parseErrorBody(output.body, context),
1472
- };
1473
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1474
- switch (errorCode) {
1475
- case "BadRequestException":
1476
- case "com.amazonaws.pinpointemail#BadRequestException":
1477
- throw await de_BadRequestExceptionRes(parsedOutput, context);
1478
- case "NotFoundException":
1479
- case "com.amazonaws.pinpointemail#NotFoundException":
1480
- throw await de_NotFoundExceptionRes(parsedOutput, context);
1481
- case "TooManyRequestsException":
1482
- case "com.amazonaws.pinpointemail#TooManyRequestsException":
1483
- throw await de_TooManyRequestsExceptionRes(parsedOutput, context);
1484
- default:
1485
- const parsedBody = parsedOutput.body;
1486
- return throwDefaultError({
1487
- output,
1488
- parsedBody,
1489
- errorCode,
1490
- });
1491
- }
870
+ DeliverabilityTestReports: (_) => de_DeliverabilityTestReports(_, context),
871
+ NextToken: __expectString,
872
+ });
873
+ Object.assign(contents, doc);
874
+ return contents;
1492
875
  };
1493
876
  export const de_ListDomainDeliverabilityCampaignsCommand = async (output, context) => {
1494
877
  if (output.statusCode !== 200 && output.statusCode >= 300) {
1495
- return de_ListDomainDeliverabilityCampaignsCommandError(output, context);
878
+ return de_CommandError(output, context);
1496
879
  }
1497
880
  const contents = map({
1498
881
  $metadata: deserializeMetadata(output),
@@ -1505,34 +888,9 @@ export const de_ListDomainDeliverabilityCampaignsCommand = async (output, contex
1505
888
  Object.assign(contents, doc);
1506
889
  return contents;
1507
890
  };
1508
- const de_ListDomainDeliverabilityCampaignsCommandError = async (output, context) => {
1509
- const parsedOutput = {
1510
- ...output,
1511
- body: await parseErrorBody(output.body, context),
1512
- };
1513
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1514
- switch (errorCode) {
1515
- case "BadRequestException":
1516
- case "com.amazonaws.pinpointemail#BadRequestException":
1517
- throw await de_BadRequestExceptionRes(parsedOutput, context);
1518
- case "NotFoundException":
1519
- case "com.amazonaws.pinpointemail#NotFoundException":
1520
- throw await de_NotFoundExceptionRes(parsedOutput, context);
1521
- case "TooManyRequestsException":
1522
- case "com.amazonaws.pinpointemail#TooManyRequestsException":
1523
- throw await de_TooManyRequestsExceptionRes(parsedOutput, context);
1524
- default:
1525
- const parsedBody = parsedOutput.body;
1526
- return throwDefaultError({
1527
- output,
1528
- parsedBody,
1529
- errorCode,
1530
- });
1531
- }
1532
- };
1533
891
  export const de_ListEmailIdentitiesCommand = async (output, context) => {
1534
892
  if (output.statusCode !== 200 && output.statusCode >= 300) {
1535
- return de_ListEmailIdentitiesCommandError(output, context);
893
+ return de_CommandError(output, context);
1536
894
  }
1537
895
  const contents = map({
1538
896
  $metadata: deserializeMetadata(output),
@@ -1545,31 +903,9 @@ export const de_ListEmailIdentitiesCommand = async (output, context) => {
1545
903
  Object.assign(contents, doc);
1546
904
  return contents;
1547
905
  };
1548
- const de_ListEmailIdentitiesCommandError = 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 "BadRequestException":
1556
- case "com.amazonaws.pinpointemail#BadRequestException":
1557
- throw await de_BadRequestExceptionRes(parsedOutput, context);
1558
- case "TooManyRequestsException":
1559
- case "com.amazonaws.pinpointemail#TooManyRequestsException":
1560
- throw await de_TooManyRequestsExceptionRes(parsedOutput, context);
1561
- default:
1562
- const parsedBody = parsedOutput.body;
1563
- return throwDefaultError({
1564
- output,
1565
- parsedBody,
1566
- errorCode,
1567
- });
1568
- }
1569
- };
1570
906
  export const de_ListTagsForResourceCommand = async (output, context) => {
1571
907
  if (output.statusCode !== 200 && output.statusCode >= 300) {
1572
- return de_ListTagsForResourceCommandError(output, context);
908
+ return de_CommandError(output, context);
1573
909
  }
1574
910
  const contents = map({
1575
911
  $metadata: deserializeMetadata(output),
@@ -1581,34 +917,9 @@ export const de_ListTagsForResourceCommand = async (output, context) => {
1581
917
  Object.assign(contents, doc);
1582
918
  return contents;
1583
919
  };
1584
- const de_ListTagsForResourceCommandError = async (output, context) => {
1585
- const parsedOutput = {
1586
- ...output,
1587
- body: await parseErrorBody(output.body, context),
1588
- };
1589
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1590
- switch (errorCode) {
1591
- case "BadRequestException":
1592
- case "com.amazonaws.pinpointemail#BadRequestException":
1593
- throw await de_BadRequestExceptionRes(parsedOutput, context);
1594
- case "NotFoundException":
1595
- case "com.amazonaws.pinpointemail#NotFoundException":
1596
- throw await de_NotFoundExceptionRes(parsedOutput, context);
1597
- case "TooManyRequestsException":
1598
- case "com.amazonaws.pinpointemail#TooManyRequestsException":
1599
- throw await de_TooManyRequestsExceptionRes(parsedOutput, context);
1600
- default:
1601
- const parsedBody = parsedOutput.body;
1602
- return throwDefaultError({
1603
- output,
1604
- parsedBody,
1605
- errorCode,
1606
- });
1607
- }
1608
- };
1609
920
  export const de_PutAccountDedicatedIpWarmupAttributesCommand = async (output, context) => {
1610
921
  if (output.statusCode !== 200 && output.statusCode >= 300) {
1611
- return de_PutAccountDedicatedIpWarmupAttributesCommandError(output, context);
922
+ return de_CommandError(output, context);
1612
923
  }
1613
924
  const contents = map({
1614
925
  $metadata: deserializeMetadata(output),
@@ -1616,31 +927,9 @@ export const de_PutAccountDedicatedIpWarmupAttributesCommand = async (output, co
1616
927
  await collectBody(output.body, context);
1617
928
  return contents;
1618
929
  };
1619
- const de_PutAccountDedicatedIpWarmupAttributesCommandError = async (output, context) => {
1620
- const parsedOutput = {
1621
- ...output,
1622
- body: await parseErrorBody(output.body, context),
1623
- };
1624
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1625
- switch (errorCode) {
1626
- case "BadRequestException":
1627
- case "com.amazonaws.pinpointemail#BadRequestException":
1628
- throw await de_BadRequestExceptionRes(parsedOutput, context);
1629
- case "TooManyRequestsException":
1630
- case "com.amazonaws.pinpointemail#TooManyRequestsException":
1631
- throw await de_TooManyRequestsExceptionRes(parsedOutput, context);
1632
- default:
1633
- const parsedBody = parsedOutput.body;
1634
- return throwDefaultError({
1635
- output,
1636
- parsedBody,
1637
- errorCode,
1638
- });
1639
- }
1640
- };
1641
930
  export const de_PutAccountSendingAttributesCommand = async (output, context) => {
1642
931
  if (output.statusCode !== 200 && output.statusCode >= 300) {
1643
- return de_PutAccountSendingAttributesCommandError(output, context);
932
+ return de_CommandError(output, context);
1644
933
  }
1645
934
  const contents = map({
1646
935
  $metadata: deserializeMetadata(output),
@@ -1648,31 +937,9 @@ export const de_PutAccountSendingAttributesCommand = async (output, context) =>
1648
937
  await collectBody(output.body, context);
1649
938
  return contents;
1650
939
  };
1651
- const de_PutAccountSendingAttributesCommandError = async (output, context) => {
1652
- const parsedOutput = {
1653
- ...output,
1654
- body: await parseErrorBody(output.body, context),
1655
- };
1656
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1657
- switch (errorCode) {
1658
- case "BadRequestException":
1659
- case "com.amazonaws.pinpointemail#BadRequestException":
1660
- throw await de_BadRequestExceptionRes(parsedOutput, context);
1661
- case "TooManyRequestsException":
1662
- case "com.amazonaws.pinpointemail#TooManyRequestsException":
1663
- throw await de_TooManyRequestsExceptionRes(parsedOutput, context);
1664
- default:
1665
- const parsedBody = parsedOutput.body;
1666
- return throwDefaultError({
1667
- output,
1668
- parsedBody,
1669
- errorCode,
1670
- });
1671
- }
1672
- };
1673
940
  export const de_PutConfigurationSetDeliveryOptionsCommand = async (output, context) => {
1674
941
  if (output.statusCode !== 200 && output.statusCode >= 300) {
1675
- return de_PutConfigurationSetDeliveryOptionsCommandError(output, context);
942
+ return de_CommandError(output, context);
1676
943
  }
1677
944
  const contents = map({
1678
945
  $metadata: deserializeMetadata(output),
@@ -1680,34 +947,9 @@ export const de_PutConfigurationSetDeliveryOptionsCommand = async (output, conte
1680
947
  await collectBody(output.body, context);
1681
948
  return contents;
1682
949
  };
1683
- const de_PutConfigurationSetDeliveryOptionsCommandError = async (output, context) => {
1684
- const parsedOutput = {
1685
- ...output,
1686
- body: await parseErrorBody(output.body, context),
1687
- };
1688
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1689
- switch (errorCode) {
1690
- case "BadRequestException":
1691
- case "com.amazonaws.pinpointemail#BadRequestException":
1692
- throw await de_BadRequestExceptionRes(parsedOutput, context);
1693
- case "NotFoundException":
1694
- case "com.amazonaws.pinpointemail#NotFoundException":
1695
- throw await de_NotFoundExceptionRes(parsedOutput, context);
1696
- case "TooManyRequestsException":
1697
- case "com.amazonaws.pinpointemail#TooManyRequestsException":
1698
- throw await de_TooManyRequestsExceptionRes(parsedOutput, context);
1699
- default:
1700
- const parsedBody = parsedOutput.body;
1701
- return throwDefaultError({
1702
- output,
1703
- parsedBody,
1704
- errorCode,
1705
- });
1706
- }
1707
- };
1708
950
  export const de_PutConfigurationSetReputationOptionsCommand = async (output, context) => {
1709
951
  if (output.statusCode !== 200 && output.statusCode >= 300) {
1710
- return de_PutConfigurationSetReputationOptionsCommandError(output, context);
952
+ return de_CommandError(output, context);
1711
953
  }
1712
954
  const contents = map({
1713
955
  $metadata: deserializeMetadata(output),
@@ -1715,139 +957,19 @@ export const de_PutConfigurationSetReputationOptionsCommand = async (output, con
1715
957
  await collectBody(output.body, context);
1716
958
  return contents;
1717
959
  };
1718
- const de_PutConfigurationSetReputationOptionsCommandError = async (output, context) => {
1719
- const parsedOutput = {
1720
- ...output,
1721
- body: await parseErrorBody(output.body, context),
1722
- };
1723
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1724
- switch (errorCode) {
1725
- case "BadRequestException":
1726
- case "com.amazonaws.pinpointemail#BadRequestException":
1727
- throw await de_BadRequestExceptionRes(parsedOutput, context);
1728
- case "NotFoundException":
1729
- case "com.amazonaws.pinpointemail#NotFoundException":
1730
- throw await de_NotFoundExceptionRes(parsedOutput, context);
1731
- case "TooManyRequestsException":
1732
- case "com.amazonaws.pinpointemail#TooManyRequestsException":
1733
- throw await de_TooManyRequestsExceptionRes(parsedOutput, context);
1734
- default:
1735
- const parsedBody = parsedOutput.body;
1736
- return throwDefaultError({
1737
- output,
1738
- parsedBody,
1739
- errorCode,
1740
- });
1741
- }
1742
- };
1743
960
  export const de_PutConfigurationSetSendingOptionsCommand = async (output, context) => {
1744
961
  if (output.statusCode !== 200 && output.statusCode >= 300) {
1745
- return de_PutConfigurationSetSendingOptionsCommandError(output, context);
1746
- }
1747
- const contents = map({
1748
- $metadata: deserializeMetadata(output),
1749
- });
1750
- await collectBody(output.body, context);
1751
- return contents;
1752
- };
1753
- const de_PutConfigurationSetSendingOptionsCommandError = async (output, context) => {
1754
- const parsedOutput = {
1755
- ...output,
1756
- body: await parseErrorBody(output.body, context),
1757
- };
1758
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1759
- switch (errorCode) {
1760
- case "BadRequestException":
1761
- case "com.amazonaws.pinpointemail#BadRequestException":
1762
- throw await de_BadRequestExceptionRes(parsedOutput, context);
1763
- case "NotFoundException":
1764
- case "com.amazonaws.pinpointemail#NotFoundException":
1765
- throw await de_NotFoundExceptionRes(parsedOutput, context);
1766
- case "TooManyRequestsException":
1767
- case "com.amazonaws.pinpointemail#TooManyRequestsException":
1768
- throw await de_TooManyRequestsExceptionRes(parsedOutput, context);
1769
- default:
1770
- const parsedBody = parsedOutput.body;
1771
- return throwDefaultError({
1772
- output,
1773
- parsedBody,
1774
- errorCode,
1775
- });
1776
- }
1777
- };
1778
- export const de_PutConfigurationSetTrackingOptionsCommand = async (output, context) => {
1779
- if (output.statusCode !== 200 && output.statusCode >= 300) {
1780
- return de_PutConfigurationSetTrackingOptionsCommandError(output, context);
1781
- }
1782
- const contents = map({
1783
- $metadata: deserializeMetadata(output),
1784
- });
1785
- await collectBody(output.body, context);
1786
- return contents;
1787
- };
1788
- const de_PutConfigurationSetTrackingOptionsCommandError = async (output, context) => {
1789
- const parsedOutput = {
1790
- ...output,
1791
- body: await parseErrorBody(output.body, context),
1792
- };
1793
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1794
- switch (errorCode) {
1795
- case "BadRequestException":
1796
- case "com.amazonaws.pinpointemail#BadRequestException":
1797
- throw await de_BadRequestExceptionRes(parsedOutput, context);
1798
- case "NotFoundException":
1799
- case "com.amazonaws.pinpointemail#NotFoundException":
1800
- throw await de_NotFoundExceptionRes(parsedOutput, context);
1801
- case "TooManyRequestsException":
1802
- case "com.amazonaws.pinpointemail#TooManyRequestsException":
1803
- throw await de_TooManyRequestsExceptionRes(parsedOutput, context);
1804
- default:
1805
- const parsedBody = parsedOutput.body;
1806
- return throwDefaultError({
1807
- output,
1808
- parsedBody,
1809
- errorCode,
1810
- });
1811
- }
1812
- };
1813
- export const de_PutDedicatedIpInPoolCommand = async (output, context) => {
1814
- if (output.statusCode !== 200 && output.statusCode >= 300) {
1815
- return de_PutDedicatedIpInPoolCommandError(output, context);
962
+ return de_CommandError(output, context);
1816
963
  }
1817
964
  const contents = map({
1818
965
  $metadata: deserializeMetadata(output),
1819
966
  });
1820
- await collectBody(output.body, context);
1821
- return contents;
1822
- };
1823
- const de_PutDedicatedIpInPoolCommandError = async (output, context) => {
1824
- const parsedOutput = {
1825
- ...output,
1826
- body: await parseErrorBody(output.body, context),
1827
- };
1828
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1829
- switch (errorCode) {
1830
- case "BadRequestException":
1831
- case "com.amazonaws.pinpointemail#BadRequestException":
1832
- throw await de_BadRequestExceptionRes(parsedOutput, context);
1833
- case "NotFoundException":
1834
- case "com.amazonaws.pinpointemail#NotFoundException":
1835
- throw await de_NotFoundExceptionRes(parsedOutput, context);
1836
- case "TooManyRequestsException":
1837
- case "com.amazonaws.pinpointemail#TooManyRequestsException":
1838
- throw await de_TooManyRequestsExceptionRes(parsedOutput, context);
1839
- default:
1840
- const parsedBody = parsedOutput.body;
1841
- return throwDefaultError({
1842
- output,
1843
- parsedBody,
1844
- errorCode,
1845
- });
1846
- }
967
+ await collectBody(output.body, context);
968
+ return contents;
1847
969
  };
1848
- export const de_PutDedicatedIpWarmupAttributesCommand = async (output, context) => {
970
+ export const de_PutConfigurationSetTrackingOptionsCommand = async (output, context) => {
1849
971
  if (output.statusCode !== 200 && output.statusCode >= 300) {
1850
- return de_PutDedicatedIpWarmupAttributesCommandError(output, context);
972
+ return de_CommandError(output, context);
1851
973
  }
1852
974
  const contents = map({
1853
975
  $metadata: deserializeMetadata(output),
@@ -1855,34 +977,19 @@ export const de_PutDedicatedIpWarmupAttributesCommand = async (output, context)
1855
977
  await collectBody(output.body, context);
1856
978
  return contents;
1857
979
  };
1858
- const de_PutDedicatedIpWarmupAttributesCommandError = async (output, context) => {
1859
- const parsedOutput = {
1860
- ...output,
1861
- body: await parseErrorBody(output.body, context),
1862
- };
1863
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1864
- switch (errorCode) {
1865
- case "BadRequestException":
1866
- case "com.amazonaws.pinpointemail#BadRequestException":
1867
- throw await de_BadRequestExceptionRes(parsedOutput, context);
1868
- case "NotFoundException":
1869
- case "com.amazonaws.pinpointemail#NotFoundException":
1870
- throw await de_NotFoundExceptionRes(parsedOutput, context);
1871
- case "TooManyRequestsException":
1872
- case "com.amazonaws.pinpointemail#TooManyRequestsException":
1873
- throw await de_TooManyRequestsExceptionRes(parsedOutput, context);
1874
- default:
1875
- const parsedBody = parsedOutput.body;
1876
- return throwDefaultError({
1877
- output,
1878
- parsedBody,
1879
- errorCode,
1880
- });
980
+ export const de_PutDedicatedIpInPoolCommand = async (output, context) => {
981
+ if (output.statusCode !== 200 && output.statusCode >= 300) {
982
+ return de_CommandError(output, context);
1881
983
  }
984
+ const contents = map({
985
+ $metadata: deserializeMetadata(output),
986
+ });
987
+ await collectBody(output.body, context);
988
+ return contents;
1882
989
  };
1883
- export const de_PutDeliverabilityDashboardOptionCommand = async (output, context) => {
990
+ export const de_PutDedicatedIpWarmupAttributesCommand = async (output, context) => {
1884
991
  if (output.statusCode !== 200 && output.statusCode >= 300) {
1885
- return de_PutDeliverabilityDashboardOptionCommandError(output, context);
992
+ return de_CommandError(output, context);
1886
993
  }
1887
994
  const contents = map({
1888
995
  $metadata: deserializeMetadata(output),
@@ -1890,40 +997,19 @@ export const de_PutDeliverabilityDashboardOptionCommand = async (output, context
1890
997
  await collectBody(output.body, context);
1891
998
  return contents;
1892
999
  };
1893
- const de_PutDeliverabilityDashboardOptionCommandError = async (output, context) => {
1894
- const parsedOutput = {
1895
- ...output,
1896
- body: await parseErrorBody(output.body, context),
1897
- };
1898
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1899
- switch (errorCode) {
1900
- case "AlreadyExistsException":
1901
- case "com.amazonaws.pinpointemail#AlreadyExistsException":
1902
- throw await de_AlreadyExistsExceptionRes(parsedOutput, context);
1903
- case "BadRequestException":
1904
- case "com.amazonaws.pinpointemail#BadRequestException":
1905
- throw await de_BadRequestExceptionRes(parsedOutput, context);
1906
- case "LimitExceededException":
1907
- case "com.amazonaws.pinpointemail#LimitExceededException":
1908
- throw await de_LimitExceededExceptionRes(parsedOutput, context);
1909
- case "NotFoundException":
1910
- case "com.amazonaws.pinpointemail#NotFoundException":
1911
- throw await de_NotFoundExceptionRes(parsedOutput, context);
1912
- case "TooManyRequestsException":
1913
- case "com.amazonaws.pinpointemail#TooManyRequestsException":
1914
- throw await de_TooManyRequestsExceptionRes(parsedOutput, context);
1915
- default:
1916
- const parsedBody = parsedOutput.body;
1917
- return throwDefaultError({
1918
- output,
1919
- parsedBody,
1920
- errorCode,
1921
- });
1000
+ export const de_PutDeliverabilityDashboardOptionCommand = async (output, context) => {
1001
+ if (output.statusCode !== 200 && output.statusCode >= 300) {
1002
+ return de_CommandError(output, context);
1922
1003
  }
1004
+ const contents = map({
1005
+ $metadata: deserializeMetadata(output),
1006
+ });
1007
+ await collectBody(output.body, context);
1008
+ return contents;
1923
1009
  };
1924
1010
  export const de_PutEmailIdentityDkimAttributesCommand = async (output, context) => {
1925
1011
  if (output.statusCode !== 200 && output.statusCode >= 300) {
1926
- return de_PutEmailIdentityDkimAttributesCommandError(output, context);
1012
+ return de_CommandError(output, context);
1927
1013
  }
1928
1014
  const contents = map({
1929
1015
  $metadata: deserializeMetadata(output),
@@ -1931,34 +1017,9 @@ export const de_PutEmailIdentityDkimAttributesCommand = async (output, context)
1931
1017
  await collectBody(output.body, context);
1932
1018
  return contents;
1933
1019
  };
1934
- const de_PutEmailIdentityDkimAttributesCommandError = async (output, context) => {
1935
- const parsedOutput = {
1936
- ...output,
1937
- body: await parseErrorBody(output.body, context),
1938
- };
1939
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1940
- switch (errorCode) {
1941
- case "BadRequestException":
1942
- case "com.amazonaws.pinpointemail#BadRequestException":
1943
- throw await de_BadRequestExceptionRes(parsedOutput, context);
1944
- case "NotFoundException":
1945
- case "com.amazonaws.pinpointemail#NotFoundException":
1946
- throw await de_NotFoundExceptionRes(parsedOutput, context);
1947
- case "TooManyRequestsException":
1948
- case "com.amazonaws.pinpointemail#TooManyRequestsException":
1949
- throw await de_TooManyRequestsExceptionRes(parsedOutput, context);
1950
- default:
1951
- const parsedBody = parsedOutput.body;
1952
- return throwDefaultError({
1953
- output,
1954
- parsedBody,
1955
- errorCode,
1956
- });
1957
- }
1958
- };
1959
1020
  export const de_PutEmailIdentityFeedbackAttributesCommand = async (output, context) => {
1960
1021
  if (output.statusCode !== 200 && output.statusCode >= 300) {
1961
- return de_PutEmailIdentityFeedbackAttributesCommandError(output, context);
1022
+ return de_CommandError(output, context);
1962
1023
  }
1963
1024
  const contents = map({
1964
1025
  $metadata: deserializeMetadata(output),
@@ -1966,34 +1027,9 @@ export const de_PutEmailIdentityFeedbackAttributesCommand = async (output, conte
1966
1027
  await collectBody(output.body, context);
1967
1028
  return contents;
1968
1029
  };
1969
- const de_PutEmailIdentityFeedbackAttributesCommandError = async (output, context) => {
1970
- const parsedOutput = {
1971
- ...output,
1972
- body: await parseErrorBody(output.body, context),
1973
- };
1974
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1975
- switch (errorCode) {
1976
- case "BadRequestException":
1977
- case "com.amazonaws.pinpointemail#BadRequestException":
1978
- throw await de_BadRequestExceptionRes(parsedOutput, context);
1979
- case "NotFoundException":
1980
- case "com.amazonaws.pinpointemail#NotFoundException":
1981
- throw await de_NotFoundExceptionRes(parsedOutput, context);
1982
- case "TooManyRequestsException":
1983
- case "com.amazonaws.pinpointemail#TooManyRequestsException":
1984
- throw await de_TooManyRequestsExceptionRes(parsedOutput, context);
1985
- default:
1986
- const parsedBody = parsedOutput.body;
1987
- return throwDefaultError({
1988
- output,
1989
- parsedBody,
1990
- errorCode,
1991
- });
1992
- }
1993
- };
1994
1030
  export const de_PutEmailIdentityMailFromAttributesCommand = async (output, context) => {
1995
1031
  if (output.statusCode !== 200 && output.statusCode >= 300) {
1996
- return de_PutEmailIdentityMailFromAttributesCommandError(output, context);
1032
+ return de_CommandError(output, context);
1997
1033
  }
1998
1034
  const contents = map({
1999
1035
  $metadata: deserializeMetadata(output),
@@ -2001,34 +1037,9 @@ export const de_PutEmailIdentityMailFromAttributesCommand = async (output, conte
2001
1037
  await collectBody(output.body, context);
2002
1038
  return contents;
2003
1039
  };
2004
- const de_PutEmailIdentityMailFromAttributesCommandError = async (output, context) => {
2005
- const parsedOutput = {
2006
- ...output,
2007
- body: await parseErrorBody(output.body, context),
2008
- };
2009
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2010
- switch (errorCode) {
2011
- case "BadRequestException":
2012
- case "com.amazonaws.pinpointemail#BadRequestException":
2013
- throw await de_BadRequestExceptionRes(parsedOutput, context);
2014
- case "NotFoundException":
2015
- case "com.amazonaws.pinpointemail#NotFoundException":
2016
- throw await de_NotFoundExceptionRes(parsedOutput, context);
2017
- case "TooManyRequestsException":
2018
- case "com.amazonaws.pinpointemail#TooManyRequestsException":
2019
- throw await de_TooManyRequestsExceptionRes(parsedOutput, context);
2020
- default:
2021
- const parsedBody = parsedOutput.body;
2022
- return throwDefaultError({
2023
- output,
2024
- parsedBody,
2025
- errorCode,
2026
- });
2027
- }
2028
- };
2029
1040
  export const de_SendEmailCommand = async (output, context) => {
2030
1041
  if (output.statusCode !== 200 && output.statusCode >= 300) {
2031
- return de_SendEmailCommandError(output, context);
1042
+ return de_CommandError(output, context);
2032
1043
  }
2033
1044
  const contents = map({
2034
1045
  $metadata: deserializeMetadata(output),
@@ -2040,49 +1051,9 @@ export const de_SendEmailCommand = async (output, context) => {
2040
1051
  Object.assign(contents, doc);
2041
1052
  return contents;
2042
1053
  };
2043
- const de_SendEmailCommandError = async (output, context) => {
2044
- const parsedOutput = {
2045
- ...output,
2046
- body: await parseErrorBody(output.body, context),
2047
- };
2048
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2049
- switch (errorCode) {
2050
- case "AccountSuspendedException":
2051
- case "com.amazonaws.pinpointemail#AccountSuspendedException":
2052
- throw await de_AccountSuspendedExceptionRes(parsedOutput, context);
2053
- case "BadRequestException":
2054
- case "com.amazonaws.pinpointemail#BadRequestException":
2055
- throw await de_BadRequestExceptionRes(parsedOutput, context);
2056
- case "LimitExceededException":
2057
- case "com.amazonaws.pinpointemail#LimitExceededException":
2058
- throw await de_LimitExceededExceptionRes(parsedOutput, context);
2059
- case "MailFromDomainNotVerifiedException":
2060
- case "com.amazonaws.pinpointemail#MailFromDomainNotVerifiedException":
2061
- throw await de_MailFromDomainNotVerifiedExceptionRes(parsedOutput, context);
2062
- case "MessageRejected":
2063
- case "com.amazonaws.pinpointemail#MessageRejected":
2064
- throw await de_MessageRejectedRes(parsedOutput, context);
2065
- case "NotFoundException":
2066
- case "com.amazonaws.pinpointemail#NotFoundException":
2067
- throw await de_NotFoundExceptionRes(parsedOutput, context);
2068
- case "SendingPausedException":
2069
- case "com.amazonaws.pinpointemail#SendingPausedException":
2070
- throw await de_SendingPausedExceptionRes(parsedOutput, context);
2071
- case "TooManyRequestsException":
2072
- case "com.amazonaws.pinpointemail#TooManyRequestsException":
2073
- throw await de_TooManyRequestsExceptionRes(parsedOutput, context);
2074
- default:
2075
- const parsedBody = parsedOutput.body;
2076
- return throwDefaultError({
2077
- output,
2078
- parsedBody,
2079
- errorCode,
2080
- });
2081
- }
2082
- };
2083
1054
  export const de_TagResourceCommand = async (output, context) => {
2084
1055
  if (output.statusCode !== 200 && output.statusCode >= 300) {
2085
- return de_TagResourceCommandError(output, context);
1056
+ return de_CommandError(output, context);
2086
1057
  }
2087
1058
  const contents = map({
2088
1059
  $metadata: deserializeMetadata(output),
@@ -2090,37 +1061,9 @@ export const de_TagResourceCommand = async (output, context) => {
2090
1061
  await collectBody(output.body, context);
2091
1062
  return contents;
2092
1063
  };
2093
- const de_TagResourceCommandError = async (output, context) => {
2094
- const parsedOutput = {
2095
- ...output,
2096
- body: await parseErrorBody(output.body, context),
2097
- };
2098
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2099
- switch (errorCode) {
2100
- case "BadRequestException":
2101
- case "com.amazonaws.pinpointemail#BadRequestException":
2102
- throw await de_BadRequestExceptionRes(parsedOutput, context);
2103
- case "ConcurrentModificationException":
2104
- case "com.amazonaws.pinpointemail#ConcurrentModificationException":
2105
- throw await de_ConcurrentModificationExceptionRes(parsedOutput, context);
2106
- case "NotFoundException":
2107
- case "com.amazonaws.pinpointemail#NotFoundException":
2108
- throw await de_NotFoundExceptionRes(parsedOutput, context);
2109
- case "TooManyRequestsException":
2110
- case "com.amazonaws.pinpointemail#TooManyRequestsException":
2111
- throw await de_TooManyRequestsExceptionRes(parsedOutput, context);
2112
- default:
2113
- const parsedBody = parsedOutput.body;
2114
- return throwDefaultError({
2115
- output,
2116
- parsedBody,
2117
- errorCode,
2118
- });
2119
- }
2120
- };
2121
1064
  export const de_UntagResourceCommand = async (output, context) => {
2122
1065
  if (output.statusCode !== 200 && output.statusCode >= 300) {
2123
- return de_UntagResourceCommandError(output, context);
1066
+ return de_CommandError(output, context);
2124
1067
  }
2125
1068
  const contents = map({
2126
1069
  $metadata: deserializeMetadata(output),
@@ -2128,37 +1071,9 @@ export const de_UntagResourceCommand = async (output, context) => {
2128
1071
  await collectBody(output.body, context);
2129
1072
  return contents;
2130
1073
  };
2131
- const de_UntagResourceCommandError = async (output, context) => {
2132
- const parsedOutput = {
2133
- ...output,
2134
- body: await parseErrorBody(output.body, context),
2135
- };
2136
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2137
- switch (errorCode) {
2138
- case "BadRequestException":
2139
- case "com.amazonaws.pinpointemail#BadRequestException":
2140
- throw await de_BadRequestExceptionRes(parsedOutput, context);
2141
- case "ConcurrentModificationException":
2142
- case "com.amazonaws.pinpointemail#ConcurrentModificationException":
2143
- throw await de_ConcurrentModificationExceptionRes(parsedOutput, context);
2144
- case "NotFoundException":
2145
- case "com.amazonaws.pinpointemail#NotFoundException":
2146
- throw await de_NotFoundExceptionRes(parsedOutput, context);
2147
- case "TooManyRequestsException":
2148
- case "com.amazonaws.pinpointemail#TooManyRequestsException":
2149
- throw await de_TooManyRequestsExceptionRes(parsedOutput, context);
2150
- default:
2151
- const parsedBody = parsedOutput.body;
2152
- return throwDefaultError({
2153
- output,
2154
- parsedBody,
2155
- errorCode,
2156
- });
2157
- }
2158
- };
2159
1074
  export const de_UpdateConfigurationSetEventDestinationCommand = async (output, context) => {
2160
1075
  if (output.statusCode !== 200 && output.statusCode >= 300) {
2161
- return de_UpdateConfigurationSetEventDestinationCommandError(output, context);
1076
+ return de_CommandError(output, context);
2162
1077
  }
2163
1078
  const contents = map({
2164
1079
  $metadata: deserializeMetadata(output),
@@ -2166,22 +1081,43 @@ export const de_UpdateConfigurationSetEventDestinationCommand = async (output, c
2166
1081
  await collectBody(output.body, context);
2167
1082
  return contents;
2168
1083
  };
2169
- const de_UpdateConfigurationSetEventDestinationCommandError = async (output, context) => {
1084
+ const de_CommandError = async (output, context) => {
2170
1085
  const parsedOutput = {
2171
1086
  ...output,
2172
1087
  body: await parseErrorBody(output.body, context),
2173
1088
  };
2174
1089
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2175
1090
  switch (errorCode) {
1091
+ case "AlreadyExistsException":
1092
+ case "com.amazonaws.pinpointemail#AlreadyExistsException":
1093
+ throw await de_AlreadyExistsExceptionRes(parsedOutput, context);
2176
1094
  case "BadRequestException":
2177
1095
  case "com.amazonaws.pinpointemail#BadRequestException":
2178
1096
  throw await de_BadRequestExceptionRes(parsedOutput, context);
1097
+ case "ConcurrentModificationException":
1098
+ case "com.amazonaws.pinpointemail#ConcurrentModificationException":
1099
+ throw await de_ConcurrentModificationExceptionRes(parsedOutput, context);
1100
+ case "LimitExceededException":
1101
+ case "com.amazonaws.pinpointemail#LimitExceededException":
1102
+ throw await de_LimitExceededExceptionRes(parsedOutput, context);
2179
1103
  case "NotFoundException":
2180
1104
  case "com.amazonaws.pinpointemail#NotFoundException":
2181
1105
  throw await de_NotFoundExceptionRes(parsedOutput, context);
2182
1106
  case "TooManyRequestsException":
2183
1107
  case "com.amazonaws.pinpointemail#TooManyRequestsException":
2184
1108
  throw await de_TooManyRequestsExceptionRes(parsedOutput, context);
1109
+ case "AccountSuspendedException":
1110
+ case "com.amazonaws.pinpointemail#AccountSuspendedException":
1111
+ throw await de_AccountSuspendedExceptionRes(parsedOutput, context);
1112
+ case "MailFromDomainNotVerifiedException":
1113
+ case "com.amazonaws.pinpointemail#MailFromDomainNotVerifiedException":
1114
+ throw await de_MailFromDomainNotVerifiedExceptionRes(parsedOutput, context);
1115
+ case "MessageRejected":
1116
+ case "com.amazonaws.pinpointemail#MessageRejected":
1117
+ throw await de_MessageRejectedRes(parsedOutput, context);
1118
+ case "SendingPausedException":
1119
+ case "com.amazonaws.pinpointemail#SendingPausedException":
1120
+ throw await de_SendingPausedExceptionRes(parsedOutput, context);
2185
1121
  default:
2186
1122
  const parsedBody = parsedOutput.body;
2187
1123
  return throwDefaultError({