@aws-sdk/client-vpc-lattice 3.504.0 → 3.509.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.
@@ -668,7 +668,7 @@ export const se_UpdateTargetGroupCommand = async (input, context) => {
668
668
  };
669
669
  export const de_BatchUpdateRuleCommand = async (output, context) => {
670
670
  if (output.statusCode !== 200 && output.statusCode >= 300) {
671
- return de_BatchUpdateRuleCommandError(output, context);
671
+ return de_CommandError(output, context);
672
672
  }
673
673
  const contents = map({
674
674
  $metadata: deserializeMetadata(output),
@@ -681,43 +681,9 @@ export const de_BatchUpdateRuleCommand = async (output, context) => {
681
681
  Object.assign(contents, doc);
682
682
  return contents;
683
683
  };
684
- const de_BatchUpdateRuleCommandError = async (output, context) => {
685
- const parsedOutput = {
686
- ...output,
687
- body: await parseErrorBody(output.body, context),
688
- };
689
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
690
- switch (errorCode) {
691
- case "AccessDeniedException":
692
- case "com.amazonaws.vpclattice#AccessDeniedException":
693
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
694
- case "ConflictException":
695
- case "com.amazonaws.vpclattice#ConflictException":
696
- throw await de_ConflictExceptionRes(parsedOutput, context);
697
- case "InternalServerException":
698
- case "com.amazonaws.vpclattice#InternalServerException":
699
- throw await de_InternalServerExceptionRes(parsedOutput, context);
700
- case "ResourceNotFoundException":
701
- case "com.amazonaws.vpclattice#ResourceNotFoundException":
702
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
703
- case "ThrottlingException":
704
- case "com.amazonaws.vpclattice#ThrottlingException":
705
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
706
- case "ValidationException":
707
- case "com.amazonaws.vpclattice#ValidationException":
708
- throw await de_ValidationExceptionRes(parsedOutput, context);
709
- default:
710
- const parsedBody = parsedOutput.body;
711
- return throwDefaultError({
712
- output,
713
- parsedBody,
714
- errorCode,
715
- });
716
- }
717
- };
718
684
  export const de_CreateAccessLogSubscriptionCommand = async (output, context) => {
719
685
  if (output.statusCode !== 201 && output.statusCode >= 300) {
720
- return de_CreateAccessLogSubscriptionCommandError(output, context);
686
+ return de_CommandError(output, context);
721
687
  }
722
688
  const contents = map({
723
689
  $metadata: deserializeMetadata(output),
@@ -733,43 +699,9 @@ export const de_CreateAccessLogSubscriptionCommand = async (output, context) =>
733
699
  Object.assign(contents, doc);
734
700
  return contents;
735
701
  };
736
- const de_CreateAccessLogSubscriptionCommandError = async (output, context) => {
737
- const parsedOutput = {
738
- ...output,
739
- body: await parseErrorBody(output.body, context),
740
- };
741
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
742
- switch (errorCode) {
743
- case "AccessDeniedException":
744
- case "com.amazonaws.vpclattice#AccessDeniedException":
745
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
746
- case "ConflictException":
747
- case "com.amazonaws.vpclattice#ConflictException":
748
- throw await de_ConflictExceptionRes(parsedOutput, context);
749
- case "InternalServerException":
750
- case "com.amazonaws.vpclattice#InternalServerException":
751
- throw await de_InternalServerExceptionRes(parsedOutput, context);
752
- case "ResourceNotFoundException":
753
- case "com.amazonaws.vpclattice#ResourceNotFoundException":
754
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
755
- case "ThrottlingException":
756
- case "com.amazonaws.vpclattice#ThrottlingException":
757
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
758
- case "ValidationException":
759
- case "com.amazonaws.vpclattice#ValidationException":
760
- throw await de_ValidationExceptionRes(parsedOutput, context);
761
- default:
762
- const parsedBody = parsedOutput.body;
763
- return throwDefaultError({
764
- output,
765
- parsedBody,
766
- errorCode,
767
- });
768
- }
769
- };
770
702
  export const de_CreateListenerCommand = async (output, context) => {
771
703
  if (output.statusCode !== 201 && output.statusCode >= 300) {
772
- return de_CreateListenerCommandError(output, context);
704
+ return de_CommandError(output, context);
773
705
  }
774
706
  const contents = map({
775
707
  $metadata: deserializeMetadata(output),
@@ -788,46 +720,9 @@ export const de_CreateListenerCommand = async (output, context) => {
788
720
  Object.assign(contents, doc);
789
721
  return contents;
790
722
  };
791
- const de_CreateListenerCommandError = async (output, context) => {
792
- const parsedOutput = {
793
- ...output,
794
- body: await parseErrorBody(output.body, context),
795
- };
796
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
797
- switch (errorCode) {
798
- case "AccessDeniedException":
799
- case "com.amazonaws.vpclattice#AccessDeniedException":
800
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
801
- case "ConflictException":
802
- case "com.amazonaws.vpclattice#ConflictException":
803
- throw await de_ConflictExceptionRes(parsedOutput, context);
804
- case "InternalServerException":
805
- case "com.amazonaws.vpclattice#InternalServerException":
806
- throw await de_InternalServerExceptionRes(parsedOutput, context);
807
- case "ResourceNotFoundException":
808
- case "com.amazonaws.vpclattice#ResourceNotFoundException":
809
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
810
- case "ServiceQuotaExceededException":
811
- case "com.amazonaws.vpclattice#ServiceQuotaExceededException":
812
- throw await de_ServiceQuotaExceededExceptionRes(parsedOutput, context);
813
- case "ThrottlingException":
814
- case "com.amazonaws.vpclattice#ThrottlingException":
815
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
816
- case "ValidationException":
817
- case "com.amazonaws.vpclattice#ValidationException":
818
- throw await de_ValidationExceptionRes(parsedOutput, context);
819
- default:
820
- const parsedBody = parsedOutput.body;
821
- return throwDefaultError({
822
- output,
823
- parsedBody,
824
- errorCode,
825
- });
826
- }
827
- };
828
723
  export const de_CreateRuleCommand = async (output, context) => {
829
724
  if (output.statusCode !== 201 && output.statusCode >= 300) {
830
- return de_CreateRuleCommandError(output, context);
725
+ return de_CommandError(output, context);
831
726
  }
832
727
  const contents = map({
833
728
  $metadata: deserializeMetadata(output),
@@ -844,46 +739,9 @@ export const de_CreateRuleCommand = async (output, context) => {
844
739
  Object.assign(contents, doc);
845
740
  return contents;
846
741
  };
847
- const de_CreateRuleCommandError = async (output, context) => {
848
- const parsedOutput = {
849
- ...output,
850
- body: await parseErrorBody(output.body, context),
851
- };
852
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
853
- switch (errorCode) {
854
- case "AccessDeniedException":
855
- case "com.amazonaws.vpclattice#AccessDeniedException":
856
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
857
- case "ConflictException":
858
- case "com.amazonaws.vpclattice#ConflictException":
859
- throw await de_ConflictExceptionRes(parsedOutput, context);
860
- case "InternalServerException":
861
- case "com.amazonaws.vpclattice#InternalServerException":
862
- throw await de_InternalServerExceptionRes(parsedOutput, context);
863
- case "ResourceNotFoundException":
864
- case "com.amazonaws.vpclattice#ResourceNotFoundException":
865
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
866
- case "ServiceQuotaExceededException":
867
- case "com.amazonaws.vpclattice#ServiceQuotaExceededException":
868
- throw await de_ServiceQuotaExceededExceptionRes(parsedOutput, context);
869
- case "ThrottlingException":
870
- case "com.amazonaws.vpclattice#ThrottlingException":
871
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
872
- case "ValidationException":
873
- case "com.amazonaws.vpclattice#ValidationException":
874
- throw await de_ValidationExceptionRes(parsedOutput, context);
875
- default:
876
- const parsedBody = parsedOutput.body;
877
- return throwDefaultError({
878
- output,
879
- parsedBody,
880
- errorCode,
881
- });
882
- }
883
- };
884
742
  export const de_CreateServiceCommand = async (output, context) => {
885
743
  if (output.statusCode !== 201 && output.statusCode >= 300) {
886
- return de_CreateServiceCommandError(output, context);
744
+ return de_CommandError(output, context);
887
745
  }
888
746
  const contents = map({
889
747
  $metadata: deserializeMetadata(output),
@@ -902,46 +760,9 @@ export const de_CreateServiceCommand = async (output, context) => {
902
760
  Object.assign(contents, doc);
903
761
  return contents;
904
762
  };
905
- const de_CreateServiceCommandError = async (output, context) => {
906
- const parsedOutput = {
907
- ...output,
908
- body: await parseErrorBody(output.body, context),
909
- };
910
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
911
- switch (errorCode) {
912
- case "AccessDeniedException":
913
- case "com.amazonaws.vpclattice#AccessDeniedException":
914
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
915
- case "ConflictException":
916
- case "com.amazonaws.vpclattice#ConflictException":
917
- throw await de_ConflictExceptionRes(parsedOutput, context);
918
- case "InternalServerException":
919
- case "com.amazonaws.vpclattice#InternalServerException":
920
- throw await de_InternalServerExceptionRes(parsedOutput, context);
921
- case "ResourceNotFoundException":
922
- case "com.amazonaws.vpclattice#ResourceNotFoundException":
923
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
924
- case "ServiceQuotaExceededException":
925
- case "com.amazonaws.vpclattice#ServiceQuotaExceededException":
926
- throw await de_ServiceQuotaExceededExceptionRes(parsedOutput, context);
927
- case "ThrottlingException":
928
- case "com.amazonaws.vpclattice#ThrottlingException":
929
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
930
- case "ValidationException":
931
- case "com.amazonaws.vpclattice#ValidationException":
932
- throw await de_ValidationExceptionRes(parsedOutput, context);
933
- default:
934
- const parsedBody = parsedOutput.body;
935
- return throwDefaultError({
936
- output,
937
- parsedBody,
938
- errorCode,
939
- });
940
- }
941
- };
942
763
  export const de_CreateServiceNetworkCommand = async (output, context) => {
943
764
  if (output.statusCode !== 201 && output.statusCode >= 300) {
944
- return de_CreateServiceNetworkCommandError(output, context);
765
+ return de_CommandError(output, context);
945
766
  }
946
767
  const contents = map({
947
768
  $metadata: deserializeMetadata(output),
@@ -956,46 +777,9 @@ export const de_CreateServiceNetworkCommand = async (output, context) => {
956
777
  Object.assign(contents, doc);
957
778
  return contents;
958
779
  };
959
- const de_CreateServiceNetworkCommandError = async (output, context) => {
960
- const parsedOutput = {
961
- ...output,
962
- body: await parseErrorBody(output.body, context),
963
- };
964
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
965
- switch (errorCode) {
966
- case "AccessDeniedException":
967
- case "com.amazonaws.vpclattice#AccessDeniedException":
968
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
969
- case "ConflictException":
970
- case "com.amazonaws.vpclattice#ConflictException":
971
- throw await de_ConflictExceptionRes(parsedOutput, context);
972
- case "InternalServerException":
973
- case "com.amazonaws.vpclattice#InternalServerException":
974
- throw await de_InternalServerExceptionRes(parsedOutput, context);
975
- case "ResourceNotFoundException":
976
- case "com.amazonaws.vpclattice#ResourceNotFoundException":
977
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
978
- case "ServiceQuotaExceededException":
979
- case "com.amazonaws.vpclattice#ServiceQuotaExceededException":
980
- throw await de_ServiceQuotaExceededExceptionRes(parsedOutput, context);
981
- case "ThrottlingException":
982
- case "com.amazonaws.vpclattice#ThrottlingException":
983
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
984
- case "ValidationException":
985
- case "com.amazonaws.vpclattice#ValidationException":
986
- throw await de_ValidationExceptionRes(parsedOutput, context);
987
- default:
988
- const parsedBody = parsedOutput.body;
989
- return throwDefaultError({
990
- output,
991
- parsedBody,
992
- errorCode,
993
- });
994
- }
995
- };
996
780
  export const de_CreateServiceNetworkServiceAssociationCommand = async (output, context) => {
997
781
  if (output.statusCode !== 200 && output.statusCode >= 300) {
998
- return de_CreateServiceNetworkServiceAssociationCommandError(output, context);
782
+ return de_CommandError(output, context);
999
783
  }
1000
784
  const contents = map({
1001
785
  $metadata: deserializeMetadata(output),
@@ -1012,46 +796,9 @@ export const de_CreateServiceNetworkServiceAssociationCommand = async (output, c
1012
796
  Object.assign(contents, doc);
1013
797
  return contents;
1014
798
  };
1015
- const de_CreateServiceNetworkServiceAssociationCommandError = async (output, context) => {
1016
- const parsedOutput = {
1017
- ...output,
1018
- body: await parseErrorBody(output.body, context),
1019
- };
1020
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1021
- switch (errorCode) {
1022
- case "AccessDeniedException":
1023
- case "com.amazonaws.vpclattice#AccessDeniedException":
1024
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
1025
- case "ConflictException":
1026
- case "com.amazonaws.vpclattice#ConflictException":
1027
- throw await de_ConflictExceptionRes(parsedOutput, context);
1028
- case "InternalServerException":
1029
- case "com.amazonaws.vpclattice#InternalServerException":
1030
- throw await de_InternalServerExceptionRes(parsedOutput, context);
1031
- case "ResourceNotFoundException":
1032
- case "com.amazonaws.vpclattice#ResourceNotFoundException":
1033
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
1034
- case "ServiceQuotaExceededException":
1035
- case "com.amazonaws.vpclattice#ServiceQuotaExceededException":
1036
- throw await de_ServiceQuotaExceededExceptionRes(parsedOutput, context);
1037
- case "ThrottlingException":
1038
- case "com.amazonaws.vpclattice#ThrottlingException":
1039
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
1040
- case "ValidationException":
1041
- case "com.amazonaws.vpclattice#ValidationException":
1042
- throw await de_ValidationExceptionRes(parsedOutput, context);
1043
- default:
1044
- const parsedBody = parsedOutput.body;
1045
- return throwDefaultError({
1046
- output,
1047
- parsedBody,
1048
- errorCode,
1049
- });
1050
- }
1051
- };
1052
799
  export const de_CreateServiceNetworkVpcAssociationCommand = async (output, context) => {
1053
800
  if (output.statusCode !== 200 && output.statusCode >= 300) {
1054
- return de_CreateServiceNetworkVpcAssociationCommandError(output, context);
801
+ return de_CommandError(output, context);
1055
802
  }
1056
803
  const contents = map({
1057
804
  $metadata: deserializeMetadata(output),
@@ -1067,46 +814,9 @@ export const de_CreateServiceNetworkVpcAssociationCommand = async (output, conte
1067
814
  Object.assign(contents, doc);
1068
815
  return contents;
1069
816
  };
1070
- const de_CreateServiceNetworkVpcAssociationCommandError = async (output, context) => {
1071
- const parsedOutput = {
1072
- ...output,
1073
- body: await parseErrorBody(output.body, context),
1074
- };
1075
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1076
- switch (errorCode) {
1077
- case "AccessDeniedException":
1078
- case "com.amazonaws.vpclattice#AccessDeniedException":
1079
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
1080
- case "ConflictException":
1081
- case "com.amazonaws.vpclattice#ConflictException":
1082
- throw await de_ConflictExceptionRes(parsedOutput, context);
1083
- case "InternalServerException":
1084
- case "com.amazonaws.vpclattice#InternalServerException":
1085
- throw await de_InternalServerExceptionRes(parsedOutput, context);
1086
- case "ResourceNotFoundException":
1087
- case "com.amazonaws.vpclattice#ResourceNotFoundException":
1088
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
1089
- case "ServiceQuotaExceededException":
1090
- case "com.amazonaws.vpclattice#ServiceQuotaExceededException":
1091
- throw await de_ServiceQuotaExceededExceptionRes(parsedOutput, context);
1092
- case "ThrottlingException":
1093
- case "com.amazonaws.vpclattice#ThrottlingException":
1094
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
1095
- case "ValidationException":
1096
- case "com.amazonaws.vpclattice#ValidationException":
1097
- throw await de_ValidationExceptionRes(parsedOutput, context);
1098
- default:
1099
- const parsedBody = parsedOutput.body;
1100
- return throwDefaultError({
1101
- output,
1102
- parsedBody,
1103
- errorCode,
1104
- });
1105
- }
1106
- };
1107
817
  export const de_CreateTargetGroupCommand = async (output, context) => {
1108
818
  if (output.statusCode !== 201 && output.statusCode >= 300) {
1109
- return de_CreateTargetGroupCommandError(output, context);
819
+ return de_CommandError(output, context);
1110
820
  }
1111
821
  const contents = map({
1112
822
  $metadata: deserializeMetadata(output),
@@ -1123,46 +833,9 @@ export const de_CreateTargetGroupCommand = async (output, context) => {
1123
833
  Object.assign(contents, doc);
1124
834
  return contents;
1125
835
  };
1126
- const de_CreateTargetGroupCommandError = async (output, context) => {
1127
- const parsedOutput = {
1128
- ...output,
1129
- body: await parseErrorBody(output.body, context),
1130
- };
1131
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1132
- switch (errorCode) {
1133
- case "AccessDeniedException":
1134
- case "com.amazonaws.vpclattice#AccessDeniedException":
1135
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
1136
- case "ConflictException":
1137
- case "com.amazonaws.vpclattice#ConflictException":
1138
- throw await de_ConflictExceptionRes(parsedOutput, context);
1139
- case "InternalServerException":
1140
- case "com.amazonaws.vpclattice#InternalServerException":
1141
- throw await de_InternalServerExceptionRes(parsedOutput, context);
1142
- case "ResourceNotFoundException":
1143
- case "com.amazonaws.vpclattice#ResourceNotFoundException":
1144
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
1145
- case "ServiceQuotaExceededException":
1146
- case "com.amazonaws.vpclattice#ServiceQuotaExceededException":
1147
- throw await de_ServiceQuotaExceededExceptionRes(parsedOutput, context);
1148
- case "ThrottlingException":
1149
- case "com.amazonaws.vpclattice#ThrottlingException":
1150
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
1151
- case "ValidationException":
1152
- case "com.amazonaws.vpclattice#ValidationException":
1153
- throw await de_ValidationExceptionRes(parsedOutput, context);
1154
- default:
1155
- const parsedBody = parsedOutput.body;
1156
- return throwDefaultError({
1157
- output,
1158
- parsedBody,
1159
- errorCode,
1160
- });
1161
- }
1162
- };
1163
836
  export const de_DeleteAccessLogSubscriptionCommand = async (output, context) => {
1164
837
  if (output.statusCode !== 204 && output.statusCode >= 300) {
1165
- return de_DeleteAccessLogSubscriptionCommandError(output, context);
838
+ return de_CommandError(output, context);
1166
839
  }
1167
840
  const contents = map({
1168
841
  $metadata: deserializeMetadata(output),
@@ -1170,40 +843,9 @@ export const de_DeleteAccessLogSubscriptionCommand = async (output, context) =>
1170
843
  await collectBody(output.body, context);
1171
844
  return contents;
1172
845
  };
1173
- const de_DeleteAccessLogSubscriptionCommandError = async (output, context) => {
1174
- const parsedOutput = {
1175
- ...output,
1176
- body: await parseErrorBody(output.body, context),
1177
- };
1178
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1179
- switch (errorCode) {
1180
- case "AccessDeniedException":
1181
- case "com.amazonaws.vpclattice#AccessDeniedException":
1182
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
1183
- case "InternalServerException":
1184
- case "com.amazonaws.vpclattice#InternalServerException":
1185
- throw await de_InternalServerExceptionRes(parsedOutput, context);
1186
- case "ResourceNotFoundException":
1187
- case "com.amazonaws.vpclattice#ResourceNotFoundException":
1188
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
1189
- case "ThrottlingException":
1190
- case "com.amazonaws.vpclattice#ThrottlingException":
1191
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
1192
- case "ValidationException":
1193
- case "com.amazonaws.vpclattice#ValidationException":
1194
- throw await de_ValidationExceptionRes(parsedOutput, context);
1195
- default:
1196
- const parsedBody = parsedOutput.body;
1197
- return throwDefaultError({
1198
- output,
1199
- parsedBody,
1200
- errorCode,
1201
- });
1202
- }
1203
- };
1204
846
  export const de_DeleteAuthPolicyCommand = async (output, context) => {
1205
847
  if (output.statusCode !== 204 && output.statusCode >= 300) {
1206
- return de_DeleteAuthPolicyCommandError(output, context);
848
+ return de_CommandError(output, context);
1207
849
  }
1208
850
  const contents = map({
1209
851
  $metadata: deserializeMetadata(output),
@@ -1211,40 +853,9 @@ export const de_DeleteAuthPolicyCommand = async (output, context) => {
1211
853
  await collectBody(output.body, context);
1212
854
  return contents;
1213
855
  };
1214
- const de_DeleteAuthPolicyCommandError = async (output, context) => {
1215
- const parsedOutput = {
1216
- ...output,
1217
- body: await parseErrorBody(output.body, context),
1218
- };
1219
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1220
- switch (errorCode) {
1221
- case "AccessDeniedException":
1222
- case "com.amazonaws.vpclattice#AccessDeniedException":
1223
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
1224
- case "InternalServerException":
1225
- case "com.amazonaws.vpclattice#InternalServerException":
1226
- throw await de_InternalServerExceptionRes(parsedOutput, context);
1227
- case "ResourceNotFoundException":
1228
- case "com.amazonaws.vpclattice#ResourceNotFoundException":
1229
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
1230
- case "ThrottlingException":
1231
- case "com.amazonaws.vpclattice#ThrottlingException":
1232
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
1233
- case "ValidationException":
1234
- case "com.amazonaws.vpclattice#ValidationException":
1235
- throw await de_ValidationExceptionRes(parsedOutput, context);
1236
- default:
1237
- const parsedBody = parsedOutput.body;
1238
- return throwDefaultError({
1239
- output,
1240
- parsedBody,
1241
- errorCode,
1242
- });
1243
- }
1244
- };
1245
856
  export const de_DeleteListenerCommand = async (output, context) => {
1246
857
  if (output.statusCode !== 204 && output.statusCode >= 300) {
1247
- return de_DeleteListenerCommandError(output, context);
858
+ return de_CommandError(output, context);
1248
859
  }
1249
860
  const contents = map({
1250
861
  $metadata: deserializeMetadata(output),
@@ -1252,43 +863,9 @@ export const de_DeleteListenerCommand = async (output, context) => {
1252
863
  await collectBody(output.body, context);
1253
864
  return contents;
1254
865
  };
1255
- const de_DeleteListenerCommandError = async (output, context) => {
1256
- const parsedOutput = {
1257
- ...output,
1258
- body: await parseErrorBody(output.body, context),
1259
- };
1260
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1261
- switch (errorCode) {
1262
- case "AccessDeniedException":
1263
- case "com.amazonaws.vpclattice#AccessDeniedException":
1264
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
1265
- case "ConflictException":
1266
- case "com.amazonaws.vpclattice#ConflictException":
1267
- throw await de_ConflictExceptionRes(parsedOutput, context);
1268
- case "InternalServerException":
1269
- case "com.amazonaws.vpclattice#InternalServerException":
1270
- throw await de_InternalServerExceptionRes(parsedOutput, context);
1271
- case "ResourceNotFoundException":
1272
- case "com.amazonaws.vpclattice#ResourceNotFoundException":
1273
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
1274
- case "ThrottlingException":
1275
- case "com.amazonaws.vpclattice#ThrottlingException":
1276
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
1277
- case "ValidationException":
1278
- case "com.amazonaws.vpclattice#ValidationException":
1279
- throw await de_ValidationExceptionRes(parsedOutput, context);
1280
- default:
1281
- const parsedBody = parsedOutput.body;
1282
- return throwDefaultError({
1283
- output,
1284
- parsedBody,
1285
- errorCode,
1286
- });
1287
- }
1288
- };
1289
866
  export const de_DeleteResourcePolicyCommand = async (output, context) => {
1290
867
  if (output.statusCode !== 204 && output.statusCode >= 300) {
1291
- return de_DeleteResourcePolicyCommandError(output, context);
868
+ return de_CommandError(output, context);
1292
869
  }
1293
870
  const contents = map({
1294
871
  $metadata: deserializeMetadata(output),
@@ -1296,40 +873,9 @@ export const de_DeleteResourcePolicyCommand = async (output, context) => {
1296
873
  await collectBody(output.body, context);
1297
874
  return contents;
1298
875
  };
1299
- const de_DeleteResourcePolicyCommandError = async (output, context) => {
1300
- const parsedOutput = {
1301
- ...output,
1302
- body: await parseErrorBody(output.body, context),
1303
- };
1304
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1305
- switch (errorCode) {
1306
- case "AccessDeniedException":
1307
- case "com.amazonaws.vpclattice#AccessDeniedException":
1308
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
1309
- case "InternalServerException":
1310
- case "com.amazonaws.vpclattice#InternalServerException":
1311
- throw await de_InternalServerExceptionRes(parsedOutput, context);
1312
- case "ResourceNotFoundException":
1313
- case "com.amazonaws.vpclattice#ResourceNotFoundException":
1314
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
1315
- case "ThrottlingException":
1316
- case "com.amazonaws.vpclattice#ThrottlingException":
1317
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
1318
- case "ValidationException":
1319
- case "com.amazonaws.vpclattice#ValidationException":
1320
- throw await de_ValidationExceptionRes(parsedOutput, context);
1321
- default:
1322
- const parsedBody = parsedOutput.body;
1323
- return throwDefaultError({
1324
- output,
1325
- parsedBody,
1326
- errorCode,
1327
- });
1328
- }
1329
- };
1330
876
  export const de_DeleteRuleCommand = async (output, context) => {
1331
877
  if (output.statusCode !== 204 && output.statusCode >= 300) {
1332
- return de_DeleteRuleCommandError(output, context);
878
+ return de_CommandError(output, context);
1333
879
  }
1334
880
  const contents = map({
1335
881
  $metadata: deserializeMetadata(output),
@@ -1337,43 +883,9 @@ export const de_DeleteRuleCommand = async (output, context) => {
1337
883
  await collectBody(output.body, context);
1338
884
  return contents;
1339
885
  };
1340
- const de_DeleteRuleCommandError = async (output, context) => {
1341
- const parsedOutput = {
1342
- ...output,
1343
- body: await parseErrorBody(output.body, context),
1344
- };
1345
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1346
- switch (errorCode) {
1347
- case "AccessDeniedException":
1348
- case "com.amazonaws.vpclattice#AccessDeniedException":
1349
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
1350
- case "ConflictException":
1351
- case "com.amazonaws.vpclattice#ConflictException":
1352
- throw await de_ConflictExceptionRes(parsedOutput, context);
1353
- case "InternalServerException":
1354
- case "com.amazonaws.vpclattice#InternalServerException":
1355
- throw await de_InternalServerExceptionRes(parsedOutput, context);
1356
- case "ResourceNotFoundException":
1357
- case "com.amazonaws.vpclattice#ResourceNotFoundException":
1358
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
1359
- case "ThrottlingException":
1360
- case "com.amazonaws.vpclattice#ThrottlingException":
1361
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
1362
- case "ValidationException":
1363
- case "com.amazonaws.vpclattice#ValidationException":
1364
- throw await de_ValidationExceptionRes(parsedOutput, context);
1365
- default:
1366
- const parsedBody = parsedOutput.body;
1367
- return throwDefaultError({
1368
- output,
1369
- parsedBody,
1370
- errorCode,
1371
- });
1372
- }
1373
- };
1374
886
  export const de_DeleteServiceCommand = async (output, context) => {
1375
887
  if (output.statusCode !== 200 && output.statusCode >= 300) {
1376
- return de_DeleteServiceCommandError(output, context);
888
+ return de_CommandError(output, context);
1377
889
  }
1378
890
  const contents = map({
1379
891
  $metadata: deserializeMetadata(output),
@@ -1388,43 +900,9 @@ export const de_DeleteServiceCommand = async (output, context) => {
1388
900
  Object.assign(contents, doc);
1389
901
  return contents;
1390
902
  };
1391
- const de_DeleteServiceCommandError = async (output, context) => {
1392
- const parsedOutput = {
1393
- ...output,
1394
- body: await parseErrorBody(output.body, context),
1395
- };
1396
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1397
- switch (errorCode) {
1398
- case "AccessDeniedException":
1399
- case "com.amazonaws.vpclattice#AccessDeniedException":
1400
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
1401
- case "ConflictException":
1402
- case "com.amazonaws.vpclattice#ConflictException":
1403
- throw await de_ConflictExceptionRes(parsedOutput, context);
1404
- case "InternalServerException":
1405
- case "com.amazonaws.vpclattice#InternalServerException":
1406
- throw await de_InternalServerExceptionRes(parsedOutput, context);
1407
- case "ResourceNotFoundException":
1408
- case "com.amazonaws.vpclattice#ResourceNotFoundException":
1409
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
1410
- case "ThrottlingException":
1411
- case "com.amazonaws.vpclattice#ThrottlingException":
1412
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
1413
- case "ValidationException":
1414
- case "com.amazonaws.vpclattice#ValidationException":
1415
- throw await de_ValidationExceptionRes(parsedOutput, context);
1416
- default:
1417
- const parsedBody = parsedOutput.body;
1418
- return throwDefaultError({
1419
- output,
1420
- parsedBody,
1421
- errorCode,
1422
- });
1423
- }
1424
- };
1425
903
  export const de_DeleteServiceNetworkCommand = async (output, context) => {
1426
904
  if (output.statusCode !== 204 && output.statusCode >= 300) {
1427
- return de_DeleteServiceNetworkCommandError(output, context);
905
+ return de_CommandError(output, context);
1428
906
  }
1429
907
  const contents = map({
1430
908
  $metadata: deserializeMetadata(output),
@@ -1432,43 +910,9 @@ export const de_DeleteServiceNetworkCommand = async (output, context) => {
1432
910
  await collectBody(output.body, context);
1433
911
  return contents;
1434
912
  };
1435
- const de_DeleteServiceNetworkCommandError = async (output, context) => {
1436
- const parsedOutput = {
1437
- ...output,
1438
- body: await parseErrorBody(output.body, context),
1439
- };
1440
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1441
- switch (errorCode) {
1442
- case "AccessDeniedException":
1443
- case "com.amazonaws.vpclattice#AccessDeniedException":
1444
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
1445
- case "ConflictException":
1446
- case "com.amazonaws.vpclattice#ConflictException":
1447
- throw await de_ConflictExceptionRes(parsedOutput, context);
1448
- case "InternalServerException":
1449
- case "com.amazonaws.vpclattice#InternalServerException":
1450
- throw await de_InternalServerExceptionRes(parsedOutput, context);
1451
- case "ResourceNotFoundException":
1452
- case "com.amazonaws.vpclattice#ResourceNotFoundException":
1453
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
1454
- case "ThrottlingException":
1455
- case "com.amazonaws.vpclattice#ThrottlingException":
1456
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
1457
- case "ValidationException":
1458
- case "com.amazonaws.vpclattice#ValidationException":
1459
- throw await de_ValidationExceptionRes(parsedOutput, context);
1460
- default:
1461
- const parsedBody = parsedOutput.body;
1462
- return throwDefaultError({
1463
- output,
1464
- parsedBody,
1465
- errorCode,
1466
- });
1467
- }
1468
- };
1469
913
  export const de_DeleteServiceNetworkServiceAssociationCommand = async (output, context) => {
1470
914
  if (output.statusCode !== 200 && output.statusCode >= 300) {
1471
- return de_DeleteServiceNetworkServiceAssociationCommandError(output, context);
915
+ return de_CommandError(output, context);
1472
916
  }
1473
917
  const contents = map({
1474
918
  $metadata: deserializeMetadata(output),
@@ -1482,43 +926,9 @@ export const de_DeleteServiceNetworkServiceAssociationCommand = async (output, c
1482
926
  Object.assign(contents, doc);
1483
927
  return contents;
1484
928
  };
1485
- const de_DeleteServiceNetworkServiceAssociationCommandError = async (output, context) => {
1486
- const parsedOutput = {
1487
- ...output,
1488
- body: await parseErrorBody(output.body, context),
1489
- };
1490
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1491
- switch (errorCode) {
1492
- case "AccessDeniedException":
1493
- case "com.amazonaws.vpclattice#AccessDeniedException":
1494
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
1495
- case "ConflictException":
1496
- case "com.amazonaws.vpclattice#ConflictException":
1497
- throw await de_ConflictExceptionRes(parsedOutput, context);
1498
- case "InternalServerException":
1499
- case "com.amazonaws.vpclattice#InternalServerException":
1500
- throw await de_InternalServerExceptionRes(parsedOutput, context);
1501
- case "ResourceNotFoundException":
1502
- case "com.amazonaws.vpclattice#ResourceNotFoundException":
1503
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
1504
- case "ThrottlingException":
1505
- case "com.amazonaws.vpclattice#ThrottlingException":
1506
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
1507
- case "ValidationException":
1508
- case "com.amazonaws.vpclattice#ValidationException":
1509
- throw await de_ValidationExceptionRes(parsedOutput, context);
1510
- default:
1511
- const parsedBody = parsedOutput.body;
1512
- return throwDefaultError({
1513
- output,
1514
- parsedBody,
1515
- errorCode,
1516
- });
1517
- }
1518
- };
1519
929
  export const de_DeleteServiceNetworkVpcAssociationCommand = async (output, context) => {
1520
930
  if (output.statusCode !== 200 && output.statusCode >= 300) {
1521
- return de_DeleteServiceNetworkVpcAssociationCommandError(output, context);
931
+ return de_CommandError(output, context);
1522
932
  }
1523
933
  const contents = map({
1524
934
  $metadata: deserializeMetadata(output),
@@ -1532,43 +942,9 @@ export const de_DeleteServiceNetworkVpcAssociationCommand = async (output, conte
1532
942
  Object.assign(contents, doc);
1533
943
  return contents;
1534
944
  };
1535
- const de_DeleteServiceNetworkVpcAssociationCommandError = async (output, context) => {
1536
- const parsedOutput = {
1537
- ...output,
1538
- body: await parseErrorBody(output.body, context),
1539
- };
1540
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1541
- switch (errorCode) {
1542
- case "AccessDeniedException":
1543
- case "com.amazonaws.vpclattice#AccessDeniedException":
1544
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
1545
- case "ConflictException":
1546
- case "com.amazonaws.vpclattice#ConflictException":
1547
- throw await de_ConflictExceptionRes(parsedOutput, context);
1548
- case "InternalServerException":
1549
- case "com.amazonaws.vpclattice#InternalServerException":
1550
- throw await de_InternalServerExceptionRes(parsedOutput, context);
1551
- case "ResourceNotFoundException":
1552
- case "com.amazonaws.vpclattice#ResourceNotFoundException":
1553
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
1554
- case "ThrottlingException":
1555
- case "com.amazonaws.vpclattice#ThrottlingException":
1556
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
1557
- case "ValidationException":
1558
- case "com.amazonaws.vpclattice#ValidationException":
1559
- throw await de_ValidationExceptionRes(parsedOutput, context);
1560
- default:
1561
- const parsedBody = parsedOutput.body;
1562
- return throwDefaultError({
1563
- output,
1564
- parsedBody,
1565
- errorCode,
1566
- });
1567
- }
1568
- };
1569
945
  export const de_DeleteTargetGroupCommand = async (output, context) => {
1570
946
  if (output.statusCode !== 200 && output.statusCode >= 300) {
1571
- return de_DeleteTargetGroupCommandError(output, context);
947
+ return de_CommandError(output, context);
1572
948
  }
1573
949
  const contents = map({
1574
950
  $metadata: deserializeMetadata(output),
@@ -1582,40 +958,9 @@ export const de_DeleteTargetGroupCommand = async (output, context) => {
1582
958
  Object.assign(contents, doc);
1583
959
  return contents;
1584
960
  };
1585
- const de_DeleteTargetGroupCommandError = async (output, context) => {
1586
- const parsedOutput = {
1587
- ...output,
1588
- body: await parseErrorBody(output.body, context),
1589
- };
1590
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1591
- switch (errorCode) {
1592
- case "ConflictException":
1593
- case "com.amazonaws.vpclattice#ConflictException":
1594
- throw await de_ConflictExceptionRes(parsedOutput, context);
1595
- case "InternalServerException":
1596
- case "com.amazonaws.vpclattice#InternalServerException":
1597
- throw await de_InternalServerExceptionRes(parsedOutput, context);
1598
- case "ResourceNotFoundException":
1599
- case "com.amazonaws.vpclattice#ResourceNotFoundException":
1600
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
1601
- case "ThrottlingException":
1602
- case "com.amazonaws.vpclattice#ThrottlingException":
1603
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
1604
- case "ValidationException":
1605
- case "com.amazonaws.vpclattice#ValidationException":
1606
- throw await de_ValidationExceptionRes(parsedOutput, context);
1607
- default:
1608
- const parsedBody = parsedOutput.body;
1609
- return throwDefaultError({
1610
- output,
1611
- parsedBody,
1612
- errorCode,
1613
- });
1614
- }
1615
- };
1616
961
  export const de_DeregisterTargetsCommand = async (output, context) => {
1617
962
  if (output.statusCode !== 200 && output.statusCode >= 300) {
1618
- return de_DeregisterTargetsCommandError(output, context);
963
+ return de_CommandError(output, context);
1619
964
  }
1620
965
  const contents = map({
1621
966
  $metadata: deserializeMetadata(output),
@@ -1628,43 +973,9 @@ export const de_DeregisterTargetsCommand = async (output, context) => {
1628
973
  Object.assign(contents, doc);
1629
974
  return contents;
1630
975
  };
1631
- const de_DeregisterTargetsCommandError = async (output, context) => {
1632
- const parsedOutput = {
1633
- ...output,
1634
- body: await parseErrorBody(output.body, context),
1635
- };
1636
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1637
- switch (errorCode) {
1638
- case "AccessDeniedException":
1639
- case "com.amazonaws.vpclattice#AccessDeniedException":
1640
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
1641
- case "ConflictException":
1642
- case "com.amazonaws.vpclattice#ConflictException":
1643
- throw await de_ConflictExceptionRes(parsedOutput, context);
1644
- case "InternalServerException":
1645
- case "com.amazonaws.vpclattice#InternalServerException":
1646
- throw await de_InternalServerExceptionRes(parsedOutput, context);
1647
- case "ResourceNotFoundException":
1648
- case "com.amazonaws.vpclattice#ResourceNotFoundException":
1649
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
1650
- case "ThrottlingException":
1651
- case "com.amazonaws.vpclattice#ThrottlingException":
1652
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
1653
- case "ValidationException":
1654
- case "com.amazonaws.vpclattice#ValidationException":
1655
- throw await de_ValidationExceptionRes(parsedOutput, context);
1656
- default:
1657
- const parsedBody = parsedOutput.body;
1658
- return throwDefaultError({
1659
- output,
1660
- parsedBody,
1661
- errorCode,
1662
- });
1663
- }
1664
- };
1665
976
  export const de_GetAccessLogSubscriptionCommand = async (output, context) => {
1666
977
  if (output.statusCode !== 200 && output.statusCode >= 300) {
1667
- return de_GetAccessLogSubscriptionCommandError(output, context);
978
+ return de_CommandError(output, context);
1668
979
  }
1669
980
  const contents = map({
1670
981
  $metadata: deserializeMetadata(output),
@@ -1682,40 +993,9 @@ export const de_GetAccessLogSubscriptionCommand = async (output, context) => {
1682
993
  Object.assign(contents, doc);
1683
994
  return contents;
1684
995
  };
1685
- const de_GetAccessLogSubscriptionCommandError = async (output, context) => {
1686
- const parsedOutput = {
1687
- ...output,
1688
- body: await parseErrorBody(output.body, context),
1689
- };
1690
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1691
- switch (errorCode) {
1692
- case "AccessDeniedException":
1693
- case "com.amazonaws.vpclattice#AccessDeniedException":
1694
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
1695
- case "InternalServerException":
1696
- case "com.amazonaws.vpclattice#InternalServerException":
1697
- throw await de_InternalServerExceptionRes(parsedOutput, context);
1698
- case "ResourceNotFoundException":
1699
- case "com.amazonaws.vpclattice#ResourceNotFoundException":
1700
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
1701
- case "ThrottlingException":
1702
- case "com.amazonaws.vpclattice#ThrottlingException":
1703
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
1704
- case "ValidationException":
1705
- case "com.amazonaws.vpclattice#ValidationException":
1706
- throw await de_ValidationExceptionRes(parsedOutput, context);
1707
- default:
1708
- const parsedBody = parsedOutput.body;
1709
- return throwDefaultError({
1710
- output,
1711
- parsedBody,
1712
- errorCode,
1713
- });
1714
- }
1715
- };
1716
996
  export const de_GetAuthPolicyCommand = async (output, context) => {
1717
997
  if (output.statusCode !== 200 && output.statusCode >= 300) {
1718
- return de_GetAuthPolicyCommandError(output, context);
998
+ return de_CommandError(output, context);
1719
999
  }
1720
1000
  const contents = map({
1721
1001
  $metadata: deserializeMetadata(output),
@@ -1730,40 +1010,9 @@ export const de_GetAuthPolicyCommand = async (output, context) => {
1730
1010
  Object.assign(contents, doc);
1731
1011
  return contents;
1732
1012
  };
1733
- const de_GetAuthPolicyCommandError = async (output, context) => {
1734
- const parsedOutput = {
1735
- ...output,
1736
- body: await parseErrorBody(output.body, context),
1737
- };
1738
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1739
- switch (errorCode) {
1740
- case "AccessDeniedException":
1741
- case "com.amazonaws.vpclattice#AccessDeniedException":
1742
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
1743
- case "InternalServerException":
1744
- case "com.amazonaws.vpclattice#InternalServerException":
1745
- throw await de_InternalServerExceptionRes(parsedOutput, context);
1746
- case "ResourceNotFoundException":
1747
- case "com.amazonaws.vpclattice#ResourceNotFoundException":
1748
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
1749
- case "ThrottlingException":
1750
- case "com.amazonaws.vpclattice#ThrottlingException":
1751
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
1752
- case "ValidationException":
1753
- case "com.amazonaws.vpclattice#ValidationException":
1754
- throw await de_ValidationExceptionRes(parsedOutput, context);
1755
- default:
1756
- const parsedBody = parsedOutput.body;
1757
- return throwDefaultError({
1758
- output,
1759
- parsedBody,
1760
- errorCode,
1761
- });
1762
- }
1763
- };
1764
1013
  export const de_GetListenerCommand = async (output, context) => {
1765
1014
  if (output.statusCode !== 200 && output.statusCode >= 300) {
1766
- return de_GetListenerCommandError(output, context);
1015
+ return de_CommandError(output, context);
1767
1016
  }
1768
1017
  const contents = map({
1769
1018
  $metadata: deserializeMetadata(output),
@@ -1784,40 +1033,9 @@ export const de_GetListenerCommand = async (output, context) => {
1784
1033
  Object.assign(contents, doc);
1785
1034
  return contents;
1786
1035
  };
1787
- const de_GetListenerCommandError = async (output, context) => {
1788
- const parsedOutput = {
1789
- ...output,
1790
- body: await parseErrorBody(output.body, context),
1791
- };
1792
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1793
- switch (errorCode) {
1794
- case "AccessDeniedException":
1795
- case "com.amazonaws.vpclattice#AccessDeniedException":
1796
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
1797
- case "InternalServerException":
1798
- case "com.amazonaws.vpclattice#InternalServerException":
1799
- throw await de_InternalServerExceptionRes(parsedOutput, context);
1800
- case "ResourceNotFoundException":
1801
- case "com.amazonaws.vpclattice#ResourceNotFoundException":
1802
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
1803
- case "ThrottlingException":
1804
- case "com.amazonaws.vpclattice#ThrottlingException":
1805
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
1806
- case "ValidationException":
1807
- case "com.amazonaws.vpclattice#ValidationException":
1808
- throw await de_ValidationExceptionRes(parsedOutput, context);
1809
- default:
1810
- const parsedBody = parsedOutput.body;
1811
- return throwDefaultError({
1812
- output,
1813
- parsedBody,
1814
- errorCode,
1815
- });
1816
- }
1817
- };
1818
1036
  export const de_GetResourcePolicyCommand = async (output, context) => {
1819
1037
  if (output.statusCode !== 200 && output.statusCode >= 300) {
1820
- return de_GetResourcePolicyCommandError(output, context);
1038
+ return de_CommandError(output, context);
1821
1039
  }
1822
1040
  const contents = map({
1823
1041
  $metadata: deserializeMetadata(output),
@@ -1829,40 +1047,9 @@ export const de_GetResourcePolicyCommand = async (output, context) => {
1829
1047
  Object.assign(contents, doc);
1830
1048
  return contents;
1831
1049
  };
1832
- const de_GetResourcePolicyCommandError = async (output, context) => {
1833
- const parsedOutput = {
1834
- ...output,
1835
- body: await parseErrorBody(output.body, context),
1836
- };
1837
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1838
- switch (errorCode) {
1839
- case "AccessDeniedException":
1840
- case "com.amazonaws.vpclattice#AccessDeniedException":
1841
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
1842
- case "InternalServerException":
1843
- case "com.amazonaws.vpclattice#InternalServerException":
1844
- throw await de_InternalServerExceptionRes(parsedOutput, context);
1845
- case "ResourceNotFoundException":
1846
- case "com.amazonaws.vpclattice#ResourceNotFoundException":
1847
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
1848
- case "ThrottlingException":
1849
- case "com.amazonaws.vpclattice#ThrottlingException":
1850
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
1851
- case "ValidationException":
1852
- case "com.amazonaws.vpclattice#ValidationException":
1853
- throw await de_ValidationExceptionRes(parsedOutput, context);
1854
- default:
1855
- const parsedBody = parsedOutput.body;
1856
- return throwDefaultError({
1857
- output,
1858
- parsedBody,
1859
- errorCode,
1860
- });
1861
- }
1862
- };
1863
1050
  export const de_GetRuleCommand = async (output, context) => {
1864
1051
  if (output.statusCode !== 200 && output.statusCode >= 300) {
1865
- return de_GetRuleCommandError(output, context);
1052
+ return de_CommandError(output, context);
1866
1053
  }
1867
1054
  const contents = map({
1868
1055
  $metadata: deserializeMetadata(output),
@@ -1882,40 +1069,9 @@ export const de_GetRuleCommand = async (output, context) => {
1882
1069
  Object.assign(contents, doc);
1883
1070
  return contents;
1884
1071
  };
1885
- const de_GetRuleCommandError = async (output, context) => {
1886
- const parsedOutput = {
1887
- ...output,
1888
- body: await parseErrorBody(output.body, context),
1889
- };
1890
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1891
- switch (errorCode) {
1892
- case "AccessDeniedException":
1893
- case "com.amazonaws.vpclattice#AccessDeniedException":
1894
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
1895
- case "InternalServerException":
1896
- case "com.amazonaws.vpclattice#InternalServerException":
1897
- throw await de_InternalServerExceptionRes(parsedOutput, context);
1898
- case "ResourceNotFoundException":
1899
- case "com.amazonaws.vpclattice#ResourceNotFoundException":
1900
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
1901
- case "ThrottlingException":
1902
- case "com.amazonaws.vpclattice#ThrottlingException":
1903
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
1904
- case "ValidationException":
1905
- case "com.amazonaws.vpclattice#ValidationException":
1906
- throw await de_ValidationExceptionRes(parsedOutput, context);
1907
- default:
1908
- const parsedBody = parsedOutput.body;
1909
- return throwDefaultError({
1910
- output,
1911
- parsedBody,
1912
- errorCode,
1913
- });
1914
- }
1915
- };
1916
1072
  export const de_GetServiceCommand = async (output, context) => {
1917
1073
  if (output.statusCode !== 200 && output.statusCode >= 300) {
1918
- return de_GetServiceCommandError(output, context);
1074
+ return de_CommandError(output, context);
1919
1075
  }
1920
1076
  const contents = map({
1921
1077
  $metadata: deserializeMetadata(output),
@@ -1938,40 +1094,9 @@ export const de_GetServiceCommand = async (output, context) => {
1938
1094
  Object.assign(contents, doc);
1939
1095
  return contents;
1940
1096
  };
1941
- const de_GetServiceCommandError = async (output, context) => {
1942
- const parsedOutput = {
1943
- ...output,
1944
- body: await parseErrorBody(output.body, context),
1945
- };
1946
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1947
- switch (errorCode) {
1948
- case "AccessDeniedException":
1949
- case "com.amazonaws.vpclattice#AccessDeniedException":
1950
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
1951
- case "InternalServerException":
1952
- case "com.amazonaws.vpclattice#InternalServerException":
1953
- throw await de_InternalServerExceptionRes(parsedOutput, context);
1954
- case "ResourceNotFoundException":
1955
- case "com.amazonaws.vpclattice#ResourceNotFoundException":
1956
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
1957
- case "ThrottlingException":
1958
- case "com.amazonaws.vpclattice#ThrottlingException":
1959
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
1960
- case "ValidationException":
1961
- case "com.amazonaws.vpclattice#ValidationException":
1962
- throw await de_ValidationExceptionRes(parsedOutput, context);
1963
- default:
1964
- const parsedBody = parsedOutput.body;
1965
- return throwDefaultError({
1966
- output,
1967
- parsedBody,
1968
- errorCode,
1969
- });
1970
- }
1971
- };
1972
1097
  export const de_GetServiceNetworkCommand = async (output, context) => {
1973
1098
  if (output.statusCode !== 200 && output.statusCode >= 300) {
1974
- return de_GetServiceNetworkCommandError(output, context);
1099
+ return de_CommandError(output, context);
1975
1100
  }
1976
1101
  const contents = map({
1977
1102
  $metadata: deserializeMetadata(output),
@@ -1990,40 +1115,9 @@ export const de_GetServiceNetworkCommand = async (output, context) => {
1990
1115
  Object.assign(contents, doc);
1991
1116
  return contents;
1992
1117
  };
1993
- const de_GetServiceNetworkCommandError = async (output, context) => {
1994
- const parsedOutput = {
1995
- ...output,
1996
- body: await parseErrorBody(output.body, context),
1997
- };
1998
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1999
- switch (errorCode) {
2000
- case "AccessDeniedException":
2001
- case "com.amazonaws.vpclattice#AccessDeniedException":
2002
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
2003
- case "InternalServerException":
2004
- case "com.amazonaws.vpclattice#InternalServerException":
2005
- throw await de_InternalServerExceptionRes(parsedOutput, context);
2006
- case "ResourceNotFoundException":
2007
- case "com.amazonaws.vpclattice#ResourceNotFoundException":
2008
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
2009
- case "ThrottlingException":
2010
- case "com.amazonaws.vpclattice#ThrottlingException":
2011
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
2012
- case "ValidationException":
2013
- case "com.amazonaws.vpclattice#ValidationException":
2014
- throw await de_ValidationExceptionRes(parsedOutput, context);
2015
- default:
2016
- const parsedBody = parsedOutput.body;
2017
- return throwDefaultError({
2018
- output,
2019
- parsedBody,
2020
- errorCode,
2021
- });
2022
- }
2023
- };
2024
1118
  export const de_GetServiceNetworkServiceAssociationCommand = async (output, context) => {
2025
1119
  if (output.statusCode !== 200 && output.statusCode >= 300) {
2026
- return de_GetServiceNetworkServiceAssociationCommandError(output, context);
1120
+ return de_CommandError(output, context);
2027
1121
  }
2028
1122
  const contents = map({
2029
1123
  $metadata: deserializeMetadata(output),
@@ -2049,40 +1143,9 @@ export const de_GetServiceNetworkServiceAssociationCommand = async (output, cont
2049
1143
  Object.assign(contents, doc);
2050
1144
  return contents;
2051
1145
  };
2052
- const de_GetServiceNetworkServiceAssociationCommandError = async (output, context) => {
2053
- const parsedOutput = {
2054
- ...output,
2055
- body: await parseErrorBody(output.body, context),
2056
- };
2057
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2058
- switch (errorCode) {
2059
- case "AccessDeniedException":
2060
- case "com.amazonaws.vpclattice#AccessDeniedException":
2061
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
2062
- case "InternalServerException":
2063
- case "com.amazonaws.vpclattice#InternalServerException":
2064
- throw await de_InternalServerExceptionRes(parsedOutput, context);
2065
- case "ResourceNotFoundException":
2066
- case "com.amazonaws.vpclattice#ResourceNotFoundException":
2067
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
2068
- case "ThrottlingException":
2069
- case "com.amazonaws.vpclattice#ThrottlingException":
2070
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
2071
- case "ValidationException":
2072
- case "com.amazonaws.vpclattice#ValidationException":
2073
- throw await de_ValidationExceptionRes(parsedOutput, context);
2074
- default:
2075
- const parsedBody = parsedOutput.body;
2076
- return throwDefaultError({
2077
- output,
2078
- parsedBody,
2079
- errorCode,
2080
- });
2081
- }
2082
- };
2083
1146
  export const de_GetServiceNetworkVpcAssociationCommand = async (output, context) => {
2084
1147
  if (output.statusCode !== 200 && output.statusCode >= 300) {
2085
- return de_GetServiceNetworkVpcAssociationCommandError(output, context);
1148
+ return de_CommandError(output, context);
2086
1149
  }
2087
1150
  const contents = map({
2088
1151
  $metadata: deserializeMetadata(output),
@@ -2106,40 +1169,9 @@ export const de_GetServiceNetworkVpcAssociationCommand = async (output, context)
2106
1169
  Object.assign(contents, doc);
2107
1170
  return contents;
2108
1171
  };
2109
- const de_GetServiceNetworkVpcAssociationCommandError = async (output, context) => {
2110
- const parsedOutput = {
2111
- ...output,
2112
- body: await parseErrorBody(output.body, context),
2113
- };
2114
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2115
- switch (errorCode) {
2116
- case "AccessDeniedException":
2117
- case "com.amazonaws.vpclattice#AccessDeniedException":
2118
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
2119
- case "InternalServerException":
2120
- case "com.amazonaws.vpclattice#InternalServerException":
2121
- throw await de_InternalServerExceptionRes(parsedOutput, context);
2122
- case "ResourceNotFoundException":
2123
- case "com.amazonaws.vpclattice#ResourceNotFoundException":
2124
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
2125
- case "ThrottlingException":
2126
- case "com.amazonaws.vpclattice#ThrottlingException":
2127
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
2128
- case "ValidationException":
2129
- case "com.amazonaws.vpclattice#ValidationException":
2130
- throw await de_ValidationExceptionRes(parsedOutput, context);
2131
- default:
2132
- const parsedBody = parsedOutput.body;
2133
- return throwDefaultError({
2134
- output,
2135
- parsedBody,
2136
- errorCode,
2137
- });
2138
- }
2139
- };
2140
1172
  export const de_GetTargetGroupCommand = async (output, context) => {
2141
1173
  if (output.statusCode !== 200 && output.statusCode >= 300) {
2142
- return de_GetTargetGroupCommandError(output, context);
1174
+ return de_CommandError(output, context);
2143
1175
  }
2144
1176
  const contents = map({
2145
1177
  $metadata: deserializeMetadata(output),
@@ -2161,40 +1193,9 @@ export const de_GetTargetGroupCommand = async (output, context) => {
2161
1193
  Object.assign(contents, doc);
2162
1194
  return contents;
2163
1195
  };
2164
- const de_GetTargetGroupCommandError = async (output, context) => {
2165
- const parsedOutput = {
2166
- ...output,
2167
- body: await parseErrorBody(output.body, context),
2168
- };
2169
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2170
- switch (errorCode) {
2171
- case "AccessDeniedException":
2172
- case "com.amazonaws.vpclattice#AccessDeniedException":
2173
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
2174
- case "InternalServerException":
2175
- case "com.amazonaws.vpclattice#InternalServerException":
2176
- throw await de_InternalServerExceptionRes(parsedOutput, context);
2177
- case "ResourceNotFoundException":
2178
- case "com.amazonaws.vpclattice#ResourceNotFoundException":
2179
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
2180
- case "ThrottlingException":
2181
- case "com.amazonaws.vpclattice#ThrottlingException":
2182
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
2183
- case "ValidationException":
2184
- case "com.amazonaws.vpclattice#ValidationException":
2185
- throw await de_ValidationExceptionRes(parsedOutput, context);
2186
- default:
2187
- const parsedBody = parsedOutput.body;
2188
- return throwDefaultError({
2189
- output,
2190
- parsedBody,
2191
- errorCode,
2192
- });
2193
- }
2194
- };
2195
1196
  export const de_ListAccessLogSubscriptionsCommand = async (output, context) => {
2196
1197
  if (output.statusCode !== 200 && output.statusCode >= 300) {
2197
- return de_ListAccessLogSubscriptionsCommandError(output, context);
1198
+ return de_CommandError(output, context);
2198
1199
  }
2199
1200
  const contents = map({
2200
1201
  $metadata: deserializeMetadata(output),
@@ -2207,37 +1208,9 @@ export const de_ListAccessLogSubscriptionsCommand = async (output, context) => {
2207
1208
  Object.assign(contents, doc);
2208
1209
  return contents;
2209
1210
  };
2210
- const de_ListAccessLogSubscriptionsCommandError = async (output, context) => {
2211
- const parsedOutput = {
2212
- ...output,
2213
- body: await parseErrorBody(output.body, context),
2214
- };
2215
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2216
- switch (errorCode) {
2217
- case "AccessDeniedException":
2218
- case "com.amazonaws.vpclattice#AccessDeniedException":
2219
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
2220
- case "InternalServerException":
2221
- case "com.amazonaws.vpclattice#InternalServerException":
2222
- throw await de_InternalServerExceptionRes(parsedOutput, context);
2223
- case "ThrottlingException":
2224
- case "com.amazonaws.vpclattice#ThrottlingException":
2225
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
2226
- case "ValidationException":
2227
- case "com.amazonaws.vpclattice#ValidationException":
2228
- throw await de_ValidationExceptionRes(parsedOutput, context);
2229
- default:
2230
- const parsedBody = parsedOutput.body;
2231
- return throwDefaultError({
2232
- output,
2233
- parsedBody,
2234
- errorCode,
2235
- });
2236
- }
2237
- };
2238
1211
  export const de_ListListenersCommand = async (output, context) => {
2239
1212
  if (output.statusCode !== 200 && output.statusCode >= 300) {
2240
- return de_ListListenersCommandError(output, context);
1213
+ return de_CommandError(output, context);
2241
1214
  }
2242
1215
  const contents = map({
2243
1216
  $metadata: deserializeMetadata(output),
@@ -2250,40 +1223,9 @@ export const de_ListListenersCommand = async (output, context) => {
2250
1223
  Object.assign(contents, doc);
2251
1224
  return contents;
2252
1225
  };
2253
- const de_ListListenersCommandError = async (output, context) => {
2254
- const parsedOutput = {
2255
- ...output,
2256
- body: await parseErrorBody(output.body, context),
2257
- };
2258
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2259
- switch (errorCode) {
2260
- case "AccessDeniedException":
2261
- case "com.amazonaws.vpclattice#AccessDeniedException":
2262
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
2263
- case "InternalServerException":
2264
- case "com.amazonaws.vpclattice#InternalServerException":
2265
- throw await de_InternalServerExceptionRes(parsedOutput, context);
2266
- case "ResourceNotFoundException":
2267
- case "com.amazonaws.vpclattice#ResourceNotFoundException":
2268
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
2269
- case "ThrottlingException":
2270
- case "com.amazonaws.vpclattice#ThrottlingException":
2271
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
2272
- case "ValidationException":
2273
- case "com.amazonaws.vpclattice#ValidationException":
2274
- throw await de_ValidationExceptionRes(parsedOutput, context);
2275
- default:
2276
- const parsedBody = parsedOutput.body;
2277
- return throwDefaultError({
2278
- output,
2279
- parsedBody,
2280
- errorCode,
2281
- });
2282
- }
2283
- };
2284
1226
  export const de_ListRulesCommand = async (output, context) => {
2285
1227
  if (output.statusCode !== 200 && output.statusCode >= 300) {
2286
- return de_ListRulesCommandError(output, context);
1228
+ return de_CommandError(output, context);
2287
1229
  }
2288
1230
  const contents = map({
2289
1231
  $metadata: deserializeMetadata(output),
@@ -2296,40 +1238,9 @@ export const de_ListRulesCommand = async (output, context) => {
2296
1238
  Object.assign(contents, doc);
2297
1239
  return contents;
2298
1240
  };
2299
- const de_ListRulesCommandError = async (output, context) => {
2300
- const parsedOutput = {
2301
- ...output,
2302
- body: await parseErrorBody(output.body, context),
2303
- };
2304
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2305
- switch (errorCode) {
2306
- case "AccessDeniedException":
2307
- case "com.amazonaws.vpclattice#AccessDeniedException":
2308
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
2309
- case "InternalServerException":
2310
- case "com.amazonaws.vpclattice#InternalServerException":
2311
- throw await de_InternalServerExceptionRes(parsedOutput, context);
2312
- case "ResourceNotFoundException":
2313
- case "com.amazonaws.vpclattice#ResourceNotFoundException":
2314
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
2315
- case "ThrottlingException":
2316
- case "com.amazonaws.vpclattice#ThrottlingException":
2317
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
2318
- case "ValidationException":
2319
- case "com.amazonaws.vpclattice#ValidationException":
2320
- throw await de_ValidationExceptionRes(parsedOutput, context);
2321
- default:
2322
- const parsedBody = parsedOutput.body;
2323
- return throwDefaultError({
2324
- output,
2325
- parsedBody,
2326
- errorCode,
2327
- });
2328
- }
2329
- };
2330
1241
  export const de_ListServiceNetworksCommand = async (output, context) => {
2331
1242
  if (output.statusCode !== 200 && output.statusCode >= 300) {
2332
- return de_ListServiceNetworksCommandError(output, context);
1243
+ return de_CommandError(output, context);
2333
1244
  }
2334
1245
  const contents = map({
2335
1246
  $metadata: deserializeMetadata(output),
@@ -2342,37 +1253,9 @@ export const de_ListServiceNetworksCommand = async (output, context) => {
2342
1253
  Object.assign(contents, doc);
2343
1254
  return contents;
2344
1255
  };
2345
- const de_ListServiceNetworksCommandError = async (output, context) => {
2346
- const parsedOutput = {
2347
- ...output,
2348
- body: await parseErrorBody(output.body, context),
2349
- };
2350
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2351
- switch (errorCode) {
2352
- case "AccessDeniedException":
2353
- case "com.amazonaws.vpclattice#AccessDeniedException":
2354
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
2355
- case "InternalServerException":
2356
- case "com.amazonaws.vpclattice#InternalServerException":
2357
- throw await de_InternalServerExceptionRes(parsedOutput, context);
2358
- case "ThrottlingException":
2359
- case "com.amazonaws.vpclattice#ThrottlingException":
2360
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
2361
- case "ValidationException":
2362
- case "com.amazonaws.vpclattice#ValidationException":
2363
- throw await de_ValidationExceptionRes(parsedOutput, context);
2364
- default:
2365
- const parsedBody = parsedOutput.body;
2366
- return throwDefaultError({
2367
- output,
2368
- parsedBody,
2369
- errorCode,
2370
- });
2371
- }
2372
- };
2373
1256
  export const de_ListServiceNetworkServiceAssociationsCommand = async (output, context) => {
2374
1257
  if (output.statusCode !== 200 && output.statusCode >= 300) {
2375
- return de_ListServiceNetworkServiceAssociationsCommandError(output, context);
1258
+ return de_CommandError(output, context);
2376
1259
  }
2377
1260
  const contents = map({
2378
1261
  $metadata: deserializeMetadata(output),
@@ -2385,37 +1268,9 @@ export const de_ListServiceNetworkServiceAssociationsCommand = async (output, co
2385
1268
  Object.assign(contents, doc);
2386
1269
  return contents;
2387
1270
  };
2388
- const de_ListServiceNetworkServiceAssociationsCommandError = async (output, context) => {
2389
- const parsedOutput = {
2390
- ...output,
2391
- body: await parseErrorBody(output.body, context),
2392
- };
2393
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2394
- switch (errorCode) {
2395
- case "AccessDeniedException":
2396
- case "com.amazonaws.vpclattice#AccessDeniedException":
2397
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
2398
- case "InternalServerException":
2399
- case "com.amazonaws.vpclattice#InternalServerException":
2400
- throw await de_InternalServerExceptionRes(parsedOutput, context);
2401
- case "ThrottlingException":
2402
- case "com.amazonaws.vpclattice#ThrottlingException":
2403
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
2404
- case "ValidationException":
2405
- case "com.amazonaws.vpclattice#ValidationException":
2406
- throw await de_ValidationExceptionRes(parsedOutput, context);
2407
- default:
2408
- const parsedBody = parsedOutput.body;
2409
- return throwDefaultError({
2410
- output,
2411
- parsedBody,
2412
- errorCode,
2413
- });
2414
- }
2415
- };
2416
1271
  export const de_ListServiceNetworkVpcAssociationsCommand = async (output, context) => {
2417
1272
  if (output.statusCode !== 200 && output.statusCode >= 300) {
2418
- return de_ListServiceNetworkVpcAssociationsCommandError(output, context);
1273
+ return de_CommandError(output, context);
2419
1274
  }
2420
1275
  const contents = map({
2421
1276
  $metadata: deserializeMetadata(output),
@@ -2428,37 +1283,9 @@ export const de_ListServiceNetworkVpcAssociationsCommand = async (output, contex
2428
1283
  Object.assign(contents, doc);
2429
1284
  return contents;
2430
1285
  };
2431
- const de_ListServiceNetworkVpcAssociationsCommandError = async (output, context) => {
2432
- const parsedOutput = {
2433
- ...output,
2434
- body: await parseErrorBody(output.body, context),
2435
- };
2436
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2437
- switch (errorCode) {
2438
- case "AccessDeniedException":
2439
- case "com.amazonaws.vpclattice#AccessDeniedException":
2440
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
2441
- case "InternalServerException":
2442
- case "com.amazonaws.vpclattice#InternalServerException":
2443
- throw await de_InternalServerExceptionRes(parsedOutput, context);
2444
- case "ThrottlingException":
2445
- case "com.amazonaws.vpclattice#ThrottlingException":
2446
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
2447
- case "ValidationException":
2448
- case "com.amazonaws.vpclattice#ValidationException":
2449
- throw await de_ValidationExceptionRes(parsedOutput, context);
2450
- default:
2451
- const parsedBody = parsedOutput.body;
2452
- return throwDefaultError({
2453
- output,
2454
- parsedBody,
2455
- errorCode,
2456
- });
2457
- }
2458
- };
2459
1286
  export const de_ListServicesCommand = async (output, context) => {
2460
1287
  if (output.statusCode !== 200 && output.statusCode >= 300) {
2461
- return de_ListServicesCommandError(output, context);
1288
+ return de_CommandError(output, context);
2462
1289
  }
2463
1290
  const contents = map({
2464
1291
  $metadata: deserializeMetadata(output),
@@ -2471,37 +1298,9 @@ export const de_ListServicesCommand = async (output, context) => {
2471
1298
  Object.assign(contents, doc);
2472
1299
  return contents;
2473
1300
  };
2474
- const de_ListServicesCommandError = async (output, context) => {
2475
- const parsedOutput = {
2476
- ...output,
2477
- body: await parseErrorBody(output.body, context),
2478
- };
2479
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2480
- switch (errorCode) {
2481
- case "AccessDeniedException":
2482
- case "com.amazonaws.vpclattice#AccessDeniedException":
2483
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
2484
- case "InternalServerException":
2485
- case "com.amazonaws.vpclattice#InternalServerException":
2486
- throw await de_InternalServerExceptionRes(parsedOutput, context);
2487
- case "ThrottlingException":
2488
- case "com.amazonaws.vpclattice#ThrottlingException":
2489
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
2490
- case "ValidationException":
2491
- case "com.amazonaws.vpclattice#ValidationException":
2492
- throw await de_ValidationExceptionRes(parsedOutput, context);
2493
- default:
2494
- const parsedBody = parsedOutput.body;
2495
- return throwDefaultError({
2496
- output,
2497
- parsedBody,
2498
- errorCode,
2499
- });
2500
- }
2501
- };
2502
1301
  export const de_ListTagsForResourceCommand = async (output, context) => {
2503
1302
  if (output.statusCode !== 200 && output.statusCode >= 300) {
2504
- return de_ListTagsForResourceCommandError(output, context);
1303
+ return de_CommandError(output, context);
2505
1304
  }
2506
1305
  const contents = map({
2507
1306
  $metadata: deserializeMetadata(output),
@@ -2513,37 +1312,9 @@ export const de_ListTagsForResourceCommand = async (output, context) => {
2513
1312
  Object.assign(contents, doc);
2514
1313
  return contents;
2515
1314
  };
2516
- const de_ListTagsForResourceCommandError = async (output, context) => {
2517
- const parsedOutput = {
2518
- ...output,
2519
- body: await parseErrorBody(output.body, context),
2520
- };
2521
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2522
- switch (errorCode) {
2523
- case "AccessDeniedException":
2524
- case "com.amazonaws.vpclattice#AccessDeniedException":
2525
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
2526
- case "InternalServerException":
2527
- case "com.amazonaws.vpclattice#InternalServerException":
2528
- throw await de_InternalServerExceptionRes(parsedOutput, context);
2529
- case "ResourceNotFoundException":
2530
- case "com.amazonaws.vpclattice#ResourceNotFoundException":
2531
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
2532
- case "ValidationException":
2533
- case "com.amazonaws.vpclattice#ValidationException":
2534
- throw await de_ValidationExceptionRes(parsedOutput, context);
2535
- default:
2536
- const parsedBody = parsedOutput.body;
2537
- return throwDefaultError({
2538
- output,
2539
- parsedBody,
2540
- errorCode,
2541
- });
2542
- }
2543
- };
2544
1315
  export const de_ListTargetGroupsCommand = async (output, context) => {
2545
1316
  if (output.statusCode !== 200 && output.statusCode >= 300) {
2546
- return de_ListTargetGroupsCommandError(output, context);
1317
+ return de_CommandError(output, context);
2547
1318
  }
2548
1319
  const contents = map({
2549
1320
  $metadata: deserializeMetadata(output),
@@ -2556,37 +1327,9 @@ export const de_ListTargetGroupsCommand = async (output, context) => {
2556
1327
  Object.assign(contents, doc);
2557
1328
  return contents;
2558
1329
  };
2559
- const de_ListTargetGroupsCommandError = async (output, context) => {
2560
- const parsedOutput = {
2561
- ...output,
2562
- body: await parseErrorBody(output.body, context),
2563
- };
2564
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2565
- switch (errorCode) {
2566
- case "AccessDeniedException":
2567
- case "com.amazonaws.vpclattice#AccessDeniedException":
2568
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
2569
- case "InternalServerException":
2570
- case "com.amazonaws.vpclattice#InternalServerException":
2571
- throw await de_InternalServerExceptionRes(parsedOutput, context);
2572
- case "ThrottlingException":
2573
- case "com.amazonaws.vpclattice#ThrottlingException":
2574
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
2575
- case "ValidationException":
2576
- case "com.amazonaws.vpclattice#ValidationException":
2577
- throw await de_ValidationExceptionRes(parsedOutput, context);
2578
- default:
2579
- const parsedBody = parsedOutput.body;
2580
- return throwDefaultError({
2581
- output,
2582
- parsedBody,
2583
- errorCode,
2584
- });
2585
- }
2586
- };
2587
1330
  export const de_ListTargetsCommand = async (output, context) => {
2588
1331
  if (output.statusCode !== 200 && output.statusCode >= 300) {
2589
- return de_ListTargetsCommandError(output, context);
1332
+ return de_CommandError(output, context);
2590
1333
  }
2591
1334
  const contents = map({
2592
1335
  $metadata: deserializeMetadata(output),
@@ -2599,40 +1342,9 @@ export const de_ListTargetsCommand = async (output, context) => {
2599
1342
  Object.assign(contents, doc);
2600
1343
  return contents;
2601
1344
  };
2602
- const de_ListTargetsCommandError = async (output, context) => {
2603
- const parsedOutput = {
2604
- ...output,
2605
- body: await parseErrorBody(output.body, context),
2606
- };
2607
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2608
- switch (errorCode) {
2609
- case "AccessDeniedException":
2610
- case "com.amazonaws.vpclattice#AccessDeniedException":
2611
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
2612
- case "InternalServerException":
2613
- case "com.amazonaws.vpclattice#InternalServerException":
2614
- throw await de_InternalServerExceptionRes(parsedOutput, context);
2615
- case "ResourceNotFoundException":
2616
- case "com.amazonaws.vpclattice#ResourceNotFoundException":
2617
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
2618
- case "ThrottlingException":
2619
- case "com.amazonaws.vpclattice#ThrottlingException":
2620
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
2621
- case "ValidationException":
2622
- case "com.amazonaws.vpclattice#ValidationException":
2623
- throw await de_ValidationExceptionRes(parsedOutput, context);
2624
- default:
2625
- const parsedBody = parsedOutput.body;
2626
- return throwDefaultError({
2627
- output,
2628
- parsedBody,
2629
- errorCode,
2630
- });
2631
- }
2632
- };
2633
1345
  export const de_PutAuthPolicyCommand = async (output, context) => {
2634
1346
  if (output.statusCode !== 200 && output.statusCode >= 300) {
2635
- return de_PutAuthPolicyCommandError(output, context);
1347
+ return de_CommandError(output, context);
2636
1348
  }
2637
1349
  const contents = map({
2638
1350
  $metadata: deserializeMetadata(output),
@@ -2645,174 +1357,34 @@ export const de_PutAuthPolicyCommand = async (output, context) => {
2645
1357
  Object.assign(contents, doc);
2646
1358
  return contents;
2647
1359
  };
2648
- const de_PutAuthPolicyCommandError = async (output, context) => {
2649
- const parsedOutput = {
2650
- ...output,
2651
- body: await parseErrorBody(output.body, context),
2652
- };
2653
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2654
- switch (errorCode) {
2655
- case "AccessDeniedException":
2656
- case "com.amazonaws.vpclattice#AccessDeniedException":
2657
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
2658
- case "InternalServerException":
2659
- case "com.amazonaws.vpclattice#InternalServerException":
2660
- throw await de_InternalServerExceptionRes(parsedOutput, context);
2661
- case "ResourceNotFoundException":
2662
- case "com.amazonaws.vpclattice#ResourceNotFoundException":
2663
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
2664
- case "ThrottlingException":
2665
- case "com.amazonaws.vpclattice#ThrottlingException":
2666
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
2667
- case "ValidationException":
2668
- case "com.amazonaws.vpclattice#ValidationException":
2669
- throw await de_ValidationExceptionRes(parsedOutput, context);
2670
- default:
2671
- const parsedBody = parsedOutput.body;
2672
- return throwDefaultError({
2673
- output,
2674
- parsedBody,
2675
- errorCode,
2676
- });
2677
- }
2678
- };
2679
- export const de_PutResourcePolicyCommand = async (output, context) => {
2680
- if (output.statusCode !== 200 && output.statusCode >= 300) {
2681
- return de_PutResourcePolicyCommandError(output, context);
2682
- }
2683
- const contents = map({
2684
- $metadata: deserializeMetadata(output),
2685
- });
2686
- await collectBody(output.body, context);
2687
- return contents;
2688
- };
2689
- const de_PutResourcePolicyCommandError = async (output, context) => {
2690
- const parsedOutput = {
2691
- ...output,
2692
- body: await parseErrorBody(output.body, context),
2693
- };
2694
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2695
- switch (errorCode) {
2696
- case "AccessDeniedException":
2697
- case "com.amazonaws.vpclattice#AccessDeniedException":
2698
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
2699
- case "InternalServerException":
2700
- case "com.amazonaws.vpclattice#InternalServerException":
2701
- throw await de_InternalServerExceptionRes(parsedOutput, context);
2702
- case "ResourceNotFoundException":
2703
- case "com.amazonaws.vpclattice#ResourceNotFoundException":
2704
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
2705
- case "ThrottlingException":
2706
- case "com.amazonaws.vpclattice#ThrottlingException":
2707
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
2708
- case "ValidationException":
2709
- case "com.amazonaws.vpclattice#ValidationException":
2710
- throw await de_ValidationExceptionRes(parsedOutput, context);
2711
- default:
2712
- const parsedBody = parsedOutput.body;
2713
- return throwDefaultError({
2714
- output,
2715
- parsedBody,
2716
- errorCode,
2717
- });
2718
- }
2719
- };
2720
- export const de_RegisterTargetsCommand = async (output, context) => {
2721
- if (output.statusCode !== 200 && output.statusCode >= 300) {
2722
- return de_RegisterTargetsCommandError(output, context);
2723
- }
2724
- const contents = map({
2725
- $metadata: deserializeMetadata(output),
2726
- });
2727
- const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
2728
- const doc = take(data, {
2729
- successful: _json,
2730
- unsuccessful: _json,
2731
- });
2732
- Object.assign(contents, doc);
2733
- return contents;
2734
- };
2735
- const de_RegisterTargetsCommandError = async (output, context) => {
2736
- const parsedOutput = {
2737
- ...output,
2738
- body: await parseErrorBody(output.body, context),
2739
- };
2740
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2741
- switch (errorCode) {
2742
- case "AccessDeniedException":
2743
- case "com.amazonaws.vpclattice#AccessDeniedException":
2744
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
2745
- case "ConflictException":
2746
- case "com.amazonaws.vpclattice#ConflictException":
2747
- throw await de_ConflictExceptionRes(parsedOutput, context);
2748
- case "InternalServerException":
2749
- case "com.amazonaws.vpclattice#InternalServerException":
2750
- throw await de_InternalServerExceptionRes(parsedOutput, context);
2751
- case "ResourceNotFoundException":
2752
- case "com.amazonaws.vpclattice#ResourceNotFoundException":
2753
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
2754
- case "ServiceQuotaExceededException":
2755
- case "com.amazonaws.vpclattice#ServiceQuotaExceededException":
2756
- throw await de_ServiceQuotaExceededExceptionRes(parsedOutput, context);
2757
- case "ThrottlingException":
2758
- case "com.amazonaws.vpclattice#ThrottlingException":
2759
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
2760
- case "ValidationException":
2761
- case "com.amazonaws.vpclattice#ValidationException":
2762
- throw await de_ValidationExceptionRes(parsedOutput, context);
2763
- default:
2764
- const parsedBody = parsedOutput.body;
2765
- return throwDefaultError({
2766
- output,
2767
- parsedBody,
2768
- errorCode,
2769
- });
2770
- }
2771
- };
2772
- export const de_TagResourceCommand = async (output, context) => {
2773
- if (output.statusCode !== 200 && output.statusCode >= 300) {
2774
- return de_TagResourceCommandError(output, context);
2775
- }
2776
- const contents = map({
2777
- $metadata: deserializeMetadata(output),
2778
- });
2779
- await collectBody(output.body, context);
2780
- return contents;
2781
- };
2782
- const de_TagResourceCommandError = async (output, context) => {
2783
- const parsedOutput = {
2784
- ...output,
2785
- body: await parseErrorBody(output.body, context),
2786
- };
2787
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2788
- switch (errorCode) {
2789
- case "AccessDeniedException":
2790
- case "com.amazonaws.vpclattice#AccessDeniedException":
2791
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
2792
- case "InternalServerException":
2793
- case "com.amazonaws.vpclattice#InternalServerException":
2794
- throw await de_InternalServerExceptionRes(parsedOutput, context);
2795
- case "ResourceNotFoundException":
2796
- case "com.amazonaws.vpclattice#ResourceNotFoundException":
2797
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
2798
- case "ThrottlingException":
2799
- case "com.amazonaws.vpclattice#ThrottlingException":
2800
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
2801
- case "ValidationException":
2802
- case "com.amazonaws.vpclattice#ValidationException":
2803
- throw await de_ValidationExceptionRes(parsedOutput, context);
2804
- default:
2805
- const parsedBody = parsedOutput.body;
2806
- return throwDefaultError({
2807
- output,
2808
- parsedBody,
2809
- errorCode,
2810
- });
1360
+ export const de_PutResourcePolicyCommand = async (output, context) => {
1361
+ if (output.statusCode !== 200 && output.statusCode >= 300) {
1362
+ return de_CommandError(output, context);
2811
1363
  }
1364
+ const contents = map({
1365
+ $metadata: deserializeMetadata(output),
1366
+ });
1367
+ await collectBody(output.body, context);
1368
+ return contents;
2812
1369
  };
2813
- export const de_UntagResourceCommand = async (output, context) => {
1370
+ export const de_RegisterTargetsCommand = async (output, context) => {
1371
+ if (output.statusCode !== 200 && output.statusCode >= 300) {
1372
+ return de_CommandError(output, context);
1373
+ }
1374
+ const contents = map({
1375
+ $metadata: deserializeMetadata(output),
1376
+ });
1377
+ const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
1378
+ const doc = take(data, {
1379
+ successful: _json,
1380
+ unsuccessful: _json,
1381
+ });
1382
+ Object.assign(contents, doc);
1383
+ return contents;
1384
+ };
1385
+ export const de_TagResourceCommand = async (output, context) => {
2814
1386
  if (output.statusCode !== 200 && output.statusCode >= 300) {
2815
- return de_UntagResourceCommandError(output, context);
1387
+ return de_CommandError(output, context);
2816
1388
  }
2817
1389
  const contents = map({
2818
1390
  $metadata: deserializeMetadata(output),
@@ -2820,37 +1392,19 @@ export const de_UntagResourceCommand = async (output, context) => {
2820
1392
  await collectBody(output.body, context);
2821
1393
  return contents;
2822
1394
  };
2823
- const de_UntagResourceCommandError = async (output, context) => {
2824
- const parsedOutput = {
2825
- ...output,
2826
- body: await parseErrorBody(output.body, context),
2827
- };
2828
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2829
- switch (errorCode) {
2830
- case "AccessDeniedException":
2831
- case "com.amazonaws.vpclattice#AccessDeniedException":
2832
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
2833
- case "InternalServerException":
2834
- case "com.amazonaws.vpclattice#InternalServerException":
2835
- throw await de_InternalServerExceptionRes(parsedOutput, context);
2836
- case "ResourceNotFoundException":
2837
- case "com.amazonaws.vpclattice#ResourceNotFoundException":
2838
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
2839
- case "ValidationException":
2840
- case "com.amazonaws.vpclattice#ValidationException":
2841
- throw await de_ValidationExceptionRes(parsedOutput, context);
2842
- default:
2843
- const parsedBody = parsedOutput.body;
2844
- return throwDefaultError({
2845
- output,
2846
- parsedBody,
2847
- errorCode,
2848
- });
1395
+ export const de_UntagResourceCommand = async (output, context) => {
1396
+ if (output.statusCode !== 200 && output.statusCode >= 300) {
1397
+ return de_CommandError(output, context);
2849
1398
  }
1399
+ const contents = map({
1400
+ $metadata: deserializeMetadata(output),
1401
+ });
1402
+ await collectBody(output.body, context);
1403
+ return contents;
2850
1404
  };
2851
1405
  export const de_UpdateAccessLogSubscriptionCommand = async (output, context) => {
2852
1406
  if (output.statusCode !== 200 && output.statusCode >= 300) {
2853
- return de_UpdateAccessLogSubscriptionCommandError(output, context);
1407
+ return de_CommandError(output, context);
2854
1408
  }
2855
1409
  const contents = map({
2856
1410
  $metadata: deserializeMetadata(output),
@@ -2866,43 +1420,9 @@ export const de_UpdateAccessLogSubscriptionCommand = async (output, context) =>
2866
1420
  Object.assign(contents, doc);
2867
1421
  return contents;
2868
1422
  };
2869
- const de_UpdateAccessLogSubscriptionCommandError = async (output, context) => {
2870
- const parsedOutput = {
2871
- ...output,
2872
- body: await parseErrorBody(output.body, context),
2873
- };
2874
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2875
- switch (errorCode) {
2876
- case "AccessDeniedException":
2877
- case "com.amazonaws.vpclattice#AccessDeniedException":
2878
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
2879
- case "ConflictException":
2880
- case "com.amazonaws.vpclattice#ConflictException":
2881
- throw await de_ConflictExceptionRes(parsedOutput, context);
2882
- case "InternalServerException":
2883
- case "com.amazonaws.vpclattice#InternalServerException":
2884
- throw await de_InternalServerExceptionRes(parsedOutput, context);
2885
- case "ResourceNotFoundException":
2886
- case "com.amazonaws.vpclattice#ResourceNotFoundException":
2887
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
2888
- case "ThrottlingException":
2889
- case "com.amazonaws.vpclattice#ThrottlingException":
2890
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
2891
- case "ValidationException":
2892
- case "com.amazonaws.vpclattice#ValidationException":
2893
- throw await de_ValidationExceptionRes(parsedOutput, context);
2894
- default:
2895
- const parsedBody = parsedOutput.body;
2896
- return throwDefaultError({
2897
- output,
2898
- parsedBody,
2899
- errorCode,
2900
- });
2901
- }
2902
- };
2903
1423
  export const de_UpdateListenerCommand = async (output, context) => {
2904
1424
  if (output.statusCode !== 200 && output.statusCode >= 300) {
2905
- return de_UpdateListenerCommandError(output, context);
1425
+ return de_CommandError(output, context);
2906
1426
  }
2907
1427
  const contents = map({
2908
1428
  $metadata: deserializeMetadata(output),
@@ -2921,43 +1441,9 @@ export const de_UpdateListenerCommand = async (output, context) => {
2921
1441
  Object.assign(contents, doc);
2922
1442
  return contents;
2923
1443
  };
2924
- const de_UpdateListenerCommandError = async (output, context) => {
2925
- const parsedOutput = {
2926
- ...output,
2927
- body: await parseErrorBody(output.body, context),
2928
- };
2929
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2930
- switch (errorCode) {
2931
- case "AccessDeniedException":
2932
- case "com.amazonaws.vpclattice#AccessDeniedException":
2933
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
2934
- case "ConflictException":
2935
- case "com.amazonaws.vpclattice#ConflictException":
2936
- throw await de_ConflictExceptionRes(parsedOutput, context);
2937
- case "InternalServerException":
2938
- case "com.amazonaws.vpclattice#InternalServerException":
2939
- throw await de_InternalServerExceptionRes(parsedOutput, context);
2940
- case "ResourceNotFoundException":
2941
- case "com.amazonaws.vpclattice#ResourceNotFoundException":
2942
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
2943
- case "ThrottlingException":
2944
- case "com.amazonaws.vpclattice#ThrottlingException":
2945
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
2946
- case "ValidationException":
2947
- case "com.amazonaws.vpclattice#ValidationException":
2948
- throw await de_ValidationExceptionRes(parsedOutput, context);
2949
- default:
2950
- const parsedBody = parsedOutput.body;
2951
- return throwDefaultError({
2952
- output,
2953
- parsedBody,
2954
- errorCode,
2955
- });
2956
- }
2957
- };
2958
1444
  export const de_UpdateRuleCommand = async (output, context) => {
2959
1445
  if (output.statusCode !== 200 && output.statusCode >= 300) {
2960
- return de_UpdateRuleCommandError(output, context);
1446
+ return de_CommandError(output, context);
2961
1447
  }
2962
1448
  const contents = map({
2963
1449
  $metadata: deserializeMetadata(output),
@@ -2975,43 +1461,9 @@ export const de_UpdateRuleCommand = async (output, context) => {
2975
1461
  Object.assign(contents, doc);
2976
1462
  return contents;
2977
1463
  };
2978
- const de_UpdateRuleCommandError = async (output, context) => {
2979
- const parsedOutput = {
2980
- ...output,
2981
- body: await parseErrorBody(output.body, context),
2982
- };
2983
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2984
- switch (errorCode) {
2985
- case "AccessDeniedException":
2986
- case "com.amazonaws.vpclattice#AccessDeniedException":
2987
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
2988
- case "ConflictException":
2989
- case "com.amazonaws.vpclattice#ConflictException":
2990
- throw await de_ConflictExceptionRes(parsedOutput, context);
2991
- case "InternalServerException":
2992
- case "com.amazonaws.vpclattice#InternalServerException":
2993
- throw await de_InternalServerExceptionRes(parsedOutput, context);
2994
- case "ResourceNotFoundException":
2995
- case "com.amazonaws.vpclattice#ResourceNotFoundException":
2996
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
2997
- case "ThrottlingException":
2998
- case "com.amazonaws.vpclattice#ThrottlingException":
2999
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
3000
- case "ValidationException":
3001
- case "com.amazonaws.vpclattice#ValidationException":
3002
- throw await de_ValidationExceptionRes(parsedOutput, context);
3003
- default:
3004
- const parsedBody = parsedOutput.body;
3005
- return throwDefaultError({
3006
- output,
3007
- parsedBody,
3008
- errorCode,
3009
- });
3010
- }
3011
- };
3012
1464
  export const de_UpdateServiceCommand = async (output, context) => {
3013
1465
  if (output.statusCode !== 200 && output.statusCode >= 300) {
3014
- return de_UpdateServiceCommandError(output, context);
1466
+ return de_CommandError(output, context);
3015
1467
  }
3016
1468
  const contents = map({
3017
1469
  $metadata: deserializeMetadata(output),
@@ -3028,43 +1480,9 @@ export const de_UpdateServiceCommand = async (output, context) => {
3028
1480
  Object.assign(contents, doc);
3029
1481
  return contents;
3030
1482
  };
3031
- const de_UpdateServiceCommandError = async (output, context) => {
3032
- const parsedOutput = {
3033
- ...output,
3034
- body: await parseErrorBody(output.body, context),
3035
- };
3036
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
3037
- switch (errorCode) {
3038
- case "AccessDeniedException":
3039
- case "com.amazonaws.vpclattice#AccessDeniedException":
3040
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
3041
- case "ConflictException":
3042
- case "com.amazonaws.vpclattice#ConflictException":
3043
- throw await de_ConflictExceptionRes(parsedOutput, context);
3044
- case "InternalServerException":
3045
- case "com.amazonaws.vpclattice#InternalServerException":
3046
- throw await de_InternalServerExceptionRes(parsedOutput, context);
3047
- case "ResourceNotFoundException":
3048
- case "com.amazonaws.vpclattice#ResourceNotFoundException":
3049
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
3050
- case "ThrottlingException":
3051
- case "com.amazonaws.vpclattice#ThrottlingException":
3052
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
3053
- case "ValidationException":
3054
- case "com.amazonaws.vpclattice#ValidationException":
3055
- throw await de_ValidationExceptionRes(parsedOutput, context);
3056
- default:
3057
- const parsedBody = parsedOutput.body;
3058
- return throwDefaultError({
3059
- output,
3060
- parsedBody,
3061
- errorCode,
3062
- });
3063
- }
3064
- };
3065
1483
  export const de_UpdateServiceNetworkCommand = async (output, context) => {
3066
1484
  if (output.statusCode !== 200 && output.statusCode >= 300) {
3067
- return de_UpdateServiceNetworkCommandError(output, context);
1485
+ return de_CommandError(output, context);
3068
1486
  }
3069
1487
  const contents = map({
3070
1488
  $metadata: deserializeMetadata(output),
@@ -3079,43 +1497,9 @@ export const de_UpdateServiceNetworkCommand = async (output, context) => {
3079
1497
  Object.assign(contents, doc);
3080
1498
  return contents;
3081
1499
  };
3082
- const de_UpdateServiceNetworkCommandError = async (output, context) => {
3083
- const parsedOutput = {
3084
- ...output,
3085
- body: await parseErrorBody(output.body, context),
3086
- };
3087
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
3088
- switch (errorCode) {
3089
- case "AccessDeniedException":
3090
- case "com.amazonaws.vpclattice#AccessDeniedException":
3091
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
3092
- case "ConflictException":
3093
- case "com.amazonaws.vpclattice#ConflictException":
3094
- throw await de_ConflictExceptionRes(parsedOutput, context);
3095
- case "InternalServerException":
3096
- case "com.amazonaws.vpclattice#InternalServerException":
3097
- throw await de_InternalServerExceptionRes(parsedOutput, context);
3098
- case "ResourceNotFoundException":
3099
- case "com.amazonaws.vpclattice#ResourceNotFoundException":
3100
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
3101
- case "ThrottlingException":
3102
- case "com.amazonaws.vpclattice#ThrottlingException":
3103
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
3104
- case "ValidationException":
3105
- case "com.amazonaws.vpclattice#ValidationException":
3106
- throw await de_ValidationExceptionRes(parsedOutput, context);
3107
- default:
3108
- const parsedBody = parsedOutput.body;
3109
- return throwDefaultError({
3110
- output,
3111
- parsedBody,
3112
- errorCode,
3113
- });
3114
- }
3115
- };
3116
1500
  export const de_UpdateServiceNetworkVpcAssociationCommand = async (output, context) => {
3117
1501
  if (output.statusCode !== 200 && output.statusCode >= 300) {
3118
- return de_UpdateServiceNetworkVpcAssociationCommandError(output, context);
1502
+ return de_CommandError(output, context);
3119
1503
  }
3120
1504
  const contents = map({
3121
1505
  $metadata: deserializeMetadata(output),
@@ -3131,43 +1515,9 @@ export const de_UpdateServiceNetworkVpcAssociationCommand = async (output, conte
3131
1515
  Object.assign(contents, doc);
3132
1516
  return contents;
3133
1517
  };
3134
- const de_UpdateServiceNetworkVpcAssociationCommandError = async (output, context) => {
3135
- const parsedOutput = {
3136
- ...output,
3137
- body: await parseErrorBody(output.body, context),
3138
- };
3139
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
3140
- switch (errorCode) {
3141
- case "AccessDeniedException":
3142
- case "com.amazonaws.vpclattice#AccessDeniedException":
3143
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
3144
- case "ConflictException":
3145
- case "com.amazonaws.vpclattice#ConflictException":
3146
- throw await de_ConflictExceptionRes(parsedOutput, context);
3147
- case "InternalServerException":
3148
- case "com.amazonaws.vpclattice#InternalServerException":
3149
- throw await de_InternalServerExceptionRes(parsedOutput, context);
3150
- case "ResourceNotFoundException":
3151
- case "com.amazonaws.vpclattice#ResourceNotFoundException":
3152
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
3153
- case "ThrottlingException":
3154
- case "com.amazonaws.vpclattice#ThrottlingException":
3155
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
3156
- case "ValidationException":
3157
- case "com.amazonaws.vpclattice#ValidationException":
3158
- throw await de_ValidationExceptionRes(parsedOutput, context);
3159
- default:
3160
- const parsedBody = parsedOutput.body;
3161
- return throwDefaultError({
3162
- output,
3163
- parsedBody,
3164
- errorCode,
3165
- });
3166
- }
3167
- };
3168
1518
  export const de_UpdateTargetGroupCommand = async (output, context) => {
3169
1519
  if (output.statusCode !== 200 && output.statusCode >= 300) {
3170
- return de_UpdateTargetGroupCommandError(output, context);
1520
+ return de_CommandError(output, context);
3171
1521
  }
3172
1522
  const contents = map({
3173
1523
  $metadata: deserializeMetadata(output),
@@ -3184,7 +1534,7 @@ export const de_UpdateTargetGroupCommand = async (output, context) => {
3184
1534
  Object.assign(contents, doc);
3185
1535
  return contents;
3186
1536
  };
3187
- const de_UpdateTargetGroupCommandError = async (output, context) => {
1537
+ const de_CommandError = async (output, context) => {
3188
1538
  const parsedOutput = {
3189
1539
  ...output,
3190
1540
  body: await parseErrorBody(output.body, context),
@@ -3209,6 +1559,9 @@ const de_UpdateTargetGroupCommandError = async (output, context) => {
3209
1559
  case "ValidationException":
3210
1560
  case "com.amazonaws.vpclattice#ValidationException":
3211
1561
  throw await de_ValidationExceptionRes(parsedOutput, context);
1562
+ case "ServiceQuotaExceededException":
1563
+ case "com.amazonaws.vpclattice#ServiceQuotaExceededException":
1564
+ throw await de_ServiceQuotaExceededExceptionRes(parsedOutput, context);
3212
1565
  default:
3213
1566
  const parsedBody = parsedOutput.body;
3214
1567
  return throwDefaultError({