@aws-sdk/client-inspector2 3.503.1 → 3.507.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -848,7 +848,7 @@ export const se_UpdateOrgEc2DeepInspectionConfigurationCommand = async (input, c
848
848
  };
849
849
  export const de_AssociateMemberCommand = async (output, context) => {
850
850
  if (output.statusCode !== 200 && output.statusCode >= 300) {
851
- return de_AssociateMemberCommandError(output, context);
851
+ return de_CommandError(output, context);
852
852
  }
853
853
  const contents = map({
854
854
  $metadata: deserializeMetadata(output),
@@ -860,37 +860,9 @@ export const de_AssociateMemberCommand = async (output, context) => {
860
860
  Object.assign(contents, doc);
861
861
  return contents;
862
862
  };
863
- const de_AssociateMemberCommandError = async (output, context) => {
864
- const parsedOutput = {
865
- ...output,
866
- body: await parseErrorBody(output.body, context),
867
- };
868
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
869
- switch (errorCode) {
870
- case "AccessDeniedException":
871
- case "com.amazonaws.inspector2#AccessDeniedException":
872
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
873
- case "InternalServerException":
874
- case "com.amazonaws.inspector2#InternalServerException":
875
- throw await de_InternalServerExceptionRes(parsedOutput, context);
876
- case "ThrottlingException":
877
- case "com.amazonaws.inspector2#ThrottlingException":
878
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
879
- case "ValidationException":
880
- case "com.amazonaws.inspector2#ValidationException":
881
- throw await de_ValidationExceptionRes(parsedOutput, context);
882
- default:
883
- const parsedBody = parsedOutput.body;
884
- return throwDefaultError({
885
- output,
886
- parsedBody,
887
- errorCode,
888
- });
889
- }
890
- };
891
863
  export const de_BatchGetAccountStatusCommand = async (output, context) => {
892
864
  if (output.statusCode !== 200 && output.statusCode >= 300) {
893
- return de_BatchGetAccountStatusCommandError(output, context);
865
+ return de_CommandError(output, context);
894
866
  }
895
867
  const contents = map({
896
868
  $metadata: deserializeMetadata(output),
@@ -903,40 +875,9 @@ export const de_BatchGetAccountStatusCommand = async (output, context) => {
903
875
  Object.assign(contents, doc);
904
876
  return contents;
905
877
  };
906
- const de_BatchGetAccountStatusCommandError = async (output, context) => {
907
- const parsedOutput = {
908
- ...output,
909
- body: await parseErrorBody(output.body, context),
910
- };
911
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
912
- switch (errorCode) {
913
- case "AccessDeniedException":
914
- case "com.amazonaws.inspector2#AccessDeniedException":
915
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
916
- case "InternalServerException":
917
- case "com.amazonaws.inspector2#InternalServerException":
918
- throw await de_InternalServerExceptionRes(parsedOutput, context);
919
- case "ResourceNotFoundException":
920
- case "com.amazonaws.inspector2#ResourceNotFoundException":
921
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
922
- case "ThrottlingException":
923
- case "com.amazonaws.inspector2#ThrottlingException":
924
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
925
- case "ValidationException":
926
- case "com.amazonaws.inspector2#ValidationException":
927
- throw await de_ValidationExceptionRes(parsedOutput, context);
928
- default:
929
- const parsedBody = parsedOutput.body;
930
- return throwDefaultError({
931
- output,
932
- parsedBody,
933
- errorCode,
934
- });
935
- }
936
- };
937
878
  export const de_BatchGetCodeSnippetCommand = async (output, context) => {
938
879
  if (output.statusCode !== 200 && output.statusCode >= 300) {
939
- return de_BatchGetCodeSnippetCommandError(output, context);
880
+ return de_CommandError(output, context);
940
881
  }
941
882
  const contents = map({
942
883
  $metadata: deserializeMetadata(output),
@@ -949,37 +890,9 @@ export const de_BatchGetCodeSnippetCommand = async (output, context) => {
949
890
  Object.assign(contents, doc);
950
891
  return contents;
951
892
  };
952
- const de_BatchGetCodeSnippetCommandError = async (output, context) => {
953
- const parsedOutput = {
954
- ...output,
955
- body: await parseErrorBody(output.body, context),
956
- };
957
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
958
- switch (errorCode) {
959
- case "AccessDeniedException":
960
- case "com.amazonaws.inspector2#AccessDeniedException":
961
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
962
- case "InternalServerException":
963
- case "com.amazonaws.inspector2#InternalServerException":
964
- throw await de_InternalServerExceptionRes(parsedOutput, context);
965
- case "ThrottlingException":
966
- case "com.amazonaws.inspector2#ThrottlingException":
967
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
968
- case "ValidationException":
969
- case "com.amazonaws.inspector2#ValidationException":
970
- throw await de_ValidationExceptionRes(parsedOutput, context);
971
- default:
972
- const parsedBody = parsedOutput.body;
973
- return throwDefaultError({
974
- output,
975
- parsedBody,
976
- errorCode,
977
- });
978
- }
979
- };
980
893
  export const de_BatchGetFindingDetailsCommand = async (output, context) => {
981
894
  if (output.statusCode !== 200 && output.statusCode >= 300) {
982
- return de_BatchGetFindingDetailsCommandError(output, context);
895
+ return de_CommandError(output, context);
983
896
  }
984
897
  const contents = map({
985
898
  $metadata: deserializeMetadata(output),
@@ -992,37 +905,9 @@ export const de_BatchGetFindingDetailsCommand = async (output, context) => {
992
905
  Object.assign(contents, doc);
993
906
  return contents;
994
907
  };
995
- const de_BatchGetFindingDetailsCommandError = async (output, context) => {
996
- const parsedOutput = {
997
- ...output,
998
- body: await parseErrorBody(output.body, context),
999
- };
1000
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1001
- switch (errorCode) {
1002
- case "AccessDeniedException":
1003
- case "com.amazonaws.inspector2#AccessDeniedException":
1004
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
1005
- case "InternalServerException":
1006
- case "com.amazonaws.inspector2#InternalServerException":
1007
- throw await de_InternalServerExceptionRes(parsedOutput, context);
1008
- case "ThrottlingException":
1009
- case "com.amazonaws.inspector2#ThrottlingException":
1010
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
1011
- case "ValidationException":
1012
- case "com.amazonaws.inspector2#ValidationException":
1013
- throw await de_ValidationExceptionRes(parsedOutput, context);
1014
- default:
1015
- const parsedBody = parsedOutput.body;
1016
- return throwDefaultError({
1017
- output,
1018
- parsedBody,
1019
- errorCode,
1020
- });
1021
- }
1022
- };
1023
908
  export const de_BatchGetFreeTrialInfoCommand = async (output, context) => {
1024
909
  if (output.statusCode !== 200 && output.statusCode >= 300) {
1025
- return de_BatchGetFreeTrialInfoCommandError(output, context);
910
+ return de_CommandError(output, context);
1026
911
  }
1027
912
  const contents = map({
1028
913
  $metadata: deserializeMetadata(output),
@@ -1035,37 +920,9 @@ export const de_BatchGetFreeTrialInfoCommand = async (output, context) => {
1035
920
  Object.assign(contents, doc);
1036
921
  return contents;
1037
922
  };
1038
- const de_BatchGetFreeTrialInfoCommandError = async (output, context) => {
1039
- const parsedOutput = {
1040
- ...output,
1041
- body: await parseErrorBody(output.body, context),
1042
- };
1043
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1044
- switch (errorCode) {
1045
- case "AccessDeniedException":
1046
- case "com.amazonaws.inspector2#AccessDeniedException":
1047
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
1048
- case "InternalServerException":
1049
- case "com.amazonaws.inspector2#InternalServerException":
1050
- throw await de_InternalServerExceptionRes(parsedOutput, context);
1051
- case "ThrottlingException":
1052
- case "com.amazonaws.inspector2#ThrottlingException":
1053
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
1054
- case "ValidationException":
1055
- case "com.amazonaws.inspector2#ValidationException":
1056
- throw await de_ValidationExceptionRes(parsedOutput, context);
1057
- default:
1058
- const parsedBody = parsedOutput.body;
1059
- return throwDefaultError({
1060
- output,
1061
- parsedBody,
1062
- errorCode,
1063
- });
1064
- }
1065
- };
1066
923
  export const de_BatchGetMemberEc2DeepInspectionStatusCommand = async (output, context) => {
1067
924
  if (output.statusCode !== 200 && output.statusCode >= 300) {
1068
- return de_BatchGetMemberEc2DeepInspectionStatusCommandError(output, context);
925
+ return de_CommandError(output, context);
1069
926
  }
1070
927
  const contents = map({
1071
928
  $metadata: deserializeMetadata(output),
@@ -1078,37 +935,9 @@ export const de_BatchGetMemberEc2DeepInspectionStatusCommand = async (output, co
1078
935
  Object.assign(contents, doc);
1079
936
  return contents;
1080
937
  };
1081
- const de_BatchGetMemberEc2DeepInspectionStatusCommandError = async (output, context) => {
1082
- const parsedOutput = {
1083
- ...output,
1084
- body: await parseErrorBody(output.body, context),
1085
- };
1086
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1087
- switch (errorCode) {
1088
- case "AccessDeniedException":
1089
- case "com.amazonaws.inspector2#AccessDeniedException":
1090
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
1091
- case "InternalServerException":
1092
- case "com.amazonaws.inspector2#InternalServerException":
1093
- throw await de_InternalServerExceptionRes(parsedOutput, context);
1094
- case "ThrottlingException":
1095
- case "com.amazonaws.inspector2#ThrottlingException":
1096
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
1097
- case "ValidationException":
1098
- case "com.amazonaws.inspector2#ValidationException":
1099
- throw await de_ValidationExceptionRes(parsedOutput, context);
1100
- default:
1101
- const parsedBody = parsedOutput.body;
1102
- return throwDefaultError({
1103
- output,
1104
- parsedBody,
1105
- errorCode,
1106
- });
1107
- }
1108
- };
1109
938
  export const de_BatchUpdateMemberEc2DeepInspectionStatusCommand = async (output, context) => {
1110
939
  if (output.statusCode !== 200 && output.statusCode >= 300) {
1111
- return de_BatchUpdateMemberEc2DeepInspectionStatusCommandError(output, context);
940
+ return de_CommandError(output, context);
1112
941
  }
1113
942
  const contents = map({
1114
943
  $metadata: deserializeMetadata(output),
@@ -1121,37 +950,9 @@ export const de_BatchUpdateMemberEc2DeepInspectionStatusCommand = async (output,
1121
950
  Object.assign(contents, doc);
1122
951
  return contents;
1123
952
  };
1124
- const de_BatchUpdateMemberEc2DeepInspectionStatusCommandError = async (output, context) => {
1125
- const parsedOutput = {
1126
- ...output,
1127
- body: await parseErrorBody(output.body, context),
1128
- };
1129
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1130
- switch (errorCode) {
1131
- case "AccessDeniedException":
1132
- case "com.amazonaws.inspector2#AccessDeniedException":
1133
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
1134
- case "InternalServerException":
1135
- case "com.amazonaws.inspector2#InternalServerException":
1136
- throw await de_InternalServerExceptionRes(parsedOutput, context);
1137
- case "ThrottlingException":
1138
- case "com.amazonaws.inspector2#ThrottlingException":
1139
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
1140
- case "ValidationException":
1141
- case "com.amazonaws.inspector2#ValidationException":
1142
- throw await de_ValidationExceptionRes(parsedOutput, context);
1143
- default:
1144
- const parsedBody = parsedOutput.body;
1145
- return throwDefaultError({
1146
- output,
1147
- parsedBody,
1148
- errorCode,
1149
- });
1150
- }
1151
- };
1152
953
  export const de_CancelFindingsReportCommand = async (output, context) => {
1153
954
  if (output.statusCode !== 200 && output.statusCode >= 300) {
1154
- return de_CancelFindingsReportCommandError(output, context);
955
+ return de_CommandError(output, context);
1155
956
  }
1156
957
  const contents = map({
1157
958
  $metadata: deserializeMetadata(output),
@@ -1163,40 +964,9 @@ export const de_CancelFindingsReportCommand = async (output, context) => {
1163
964
  Object.assign(contents, doc);
1164
965
  return contents;
1165
966
  };
1166
- const de_CancelFindingsReportCommandError = async (output, context) => {
1167
- const parsedOutput = {
1168
- ...output,
1169
- body: await parseErrorBody(output.body, context),
1170
- };
1171
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1172
- switch (errorCode) {
1173
- case "AccessDeniedException":
1174
- case "com.amazonaws.inspector2#AccessDeniedException":
1175
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
1176
- case "InternalServerException":
1177
- case "com.amazonaws.inspector2#InternalServerException":
1178
- throw await de_InternalServerExceptionRes(parsedOutput, context);
1179
- case "ResourceNotFoundException":
1180
- case "com.amazonaws.inspector2#ResourceNotFoundException":
1181
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
1182
- case "ThrottlingException":
1183
- case "com.amazonaws.inspector2#ThrottlingException":
1184
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
1185
- case "ValidationException":
1186
- case "com.amazonaws.inspector2#ValidationException":
1187
- throw await de_ValidationExceptionRes(parsedOutput, context);
1188
- default:
1189
- const parsedBody = parsedOutput.body;
1190
- return throwDefaultError({
1191
- output,
1192
- parsedBody,
1193
- errorCode,
1194
- });
1195
- }
1196
- };
1197
967
  export const de_CancelSbomExportCommand = async (output, context) => {
1198
968
  if (output.statusCode !== 200 && output.statusCode >= 300) {
1199
- return de_CancelSbomExportCommandError(output, context);
969
+ return de_CommandError(output, context);
1200
970
  }
1201
971
  const contents = map({
1202
972
  $metadata: deserializeMetadata(output),
@@ -1208,40 +978,9 @@ export const de_CancelSbomExportCommand = async (output, context) => {
1208
978
  Object.assign(contents, doc);
1209
979
  return contents;
1210
980
  };
1211
- const de_CancelSbomExportCommandError = async (output, context) => {
1212
- const parsedOutput = {
1213
- ...output,
1214
- body: await parseErrorBody(output.body, context),
1215
- };
1216
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1217
- switch (errorCode) {
1218
- case "AccessDeniedException":
1219
- case "com.amazonaws.inspector2#AccessDeniedException":
1220
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
1221
- case "InternalServerException":
1222
- case "com.amazonaws.inspector2#InternalServerException":
1223
- throw await de_InternalServerExceptionRes(parsedOutput, context);
1224
- case "ResourceNotFoundException":
1225
- case "com.amazonaws.inspector2#ResourceNotFoundException":
1226
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
1227
- case "ThrottlingException":
1228
- case "com.amazonaws.inspector2#ThrottlingException":
1229
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
1230
- case "ValidationException":
1231
- case "com.amazonaws.inspector2#ValidationException":
1232
- throw await de_ValidationExceptionRes(parsedOutput, context);
1233
- default:
1234
- const parsedBody = parsedOutput.body;
1235
- return throwDefaultError({
1236
- output,
1237
- parsedBody,
1238
- errorCode,
1239
- });
1240
- }
1241
- };
1242
981
  export const de_CreateCisScanConfigurationCommand = async (output, context) => {
1243
982
  if (output.statusCode !== 200 && output.statusCode >= 300) {
1244
- return de_CreateCisScanConfigurationCommandError(output, context);
983
+ return de_CommandError(output, context);
1245
984
  }
1246
985
  const contents = map({
1247
986
  $metadata: deserializeMetadata(output),
@@ -1253,37 +992,9 @@ export const de_CreateCisScanConfigurationCommand = async (output, context) => {
1253
992
  Object.assign(contents, doc);
1254
993
  return contents;
1255
994
  };
1256
- const de_CreateCisScanConfigurationCommandError = async (output, context) => {
1257
- const parsedOutput = {
1258
- ...output,
1259
- body: await parseErrorBody(output.body, context),
1260
- };
1261
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1262
- switch (errorCode) {
1263
- case "AccessDeniedException":
1264
- case "com.amazonaws.inspector2#AccessDeniedException":
1265
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
1266
- case "InternalServerException":
1267
- case "com.amazonaws.inspector2#InternalServerException":
1268
- throw await de_InternalServerExceptionRes(parsedOutput, context);
1269
- case "ThrottlingException":
1270
- case "com.amazonaws.inspector2#ThrottlingException":
1271
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
1272
- case "ValidationException":
1273
- case "com.amazonaws.inspector2#ValidationException":
1274
- throw await de_ValidationExceptionRes(parsedOutput, context);
1275
- default:
1276
- const parsedBody = parsedOutput.body;
1277
- return throwDefaultError({
1278
- output,
1279
- parsedBody,
1280
- errorCode,
1281
- });
1282
- }
1283
- };
1284
995
  export const de_CreateFilterCommand = async (output, context) => {
1285
996
  if (output.statusCode !== 200 && output.statusCode >= 300) {
1286
- return de_CreateFilterCommandError(output, context);
997
+ return de_CommandError(output, context);
1287
998
  }
1288
999
  const contents = map({
1289
1000
  $metadata: deserializeMetadata(output),
@@ -1295,43 +1006,9 @@ export const de_CreateFilterCommand = async (output, context) => {
1295
1006
  Object.assign(contents, doc);
1296
1007
  return contents;
1297
1008
  };
1298
- const de_CreateFilterCommandError = async (output, context) => {
1299
- const parsedOutput = {
1300
- ...output,
1301
- body: await parseErrorBody(output.body, context),
1302
- };
1303
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1304
- switch (errorCode) {
1305
- case "AccessDeniedException":
1306
- case "com.amazonaws.inspector2#AccessDeniedException":
1307
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
1308
- case "BadRequestException":
1309
- case "com.amazonaws.inspector2#BadRequestException":
1310
- throw await de_BadRequestExceptionRes(parsedOutput, context);
1311
- case "InternalServerException":
1312
- case "com.amazonaws.inspector2#InternalServerException":
1313
- throw await de_InternalServerExceptionRes(parsedOutput, context);
1314
- case "ServiceQuotaExceededException":
1315
- case "com.amazonaws.inspector2#ServiceQuotaExceededException":
1316
- throw await de_ServiceQuotaExceededExceptionRes(parsedOutput, context);
1317
- case "ThrottlingException":
1318
- case "com.amazonaws.inspector2#ThrottlingException":
1319
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
1320
- case "ValidationException":
1321
- case "com.amazonaws.inspector2#ValidationException":
1322
- throw await de_ValidationExceptionRes(parsedOutput, context);
1323
- default:
1324
- const parsedBody = parsedOutput.body;
1325
- return throwDefaultError({
1326
- output,
1327
- parsedBody,
1328
- errorCode,
1329
- });
1330
- }
1331
- };
1332
1009
  export const de_CreateFindingsReportCommand = async (output, context) => {
1333
1010
  if (output.statusCode !== 200 && output.statusCode >= 300) {
1334
- return de_CreateFindingsReportCommandError(output, context);
1011
+ return de_CommandError(output, context);
1335
1012
  }
1336
1013
  const contents = map({
1337
1014
  $metadata: deserializeMetadata(output),
@@ -1343,40 +1020,9 @@ export const de_CreateFindingsReportCommand = async (output, context) => {
1343
1020
  Object.assign(contents, doc);
1344
1021
  return contents;
1345
1022
  };
1346
- const de_CreateFindingsReportCommandError = async (output, context) => {
1347
- const parsedOutput = {
1348
- ...output,
1349
- body: await parseErrorBody(output.body, context),
1350
- };
1351
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1352
- switch (errorCode) {
1353
- case "AccessDeniedException":
1354
- case "com.amazonaws.inspector2#AccessDeniedException":
1355
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
1356
- case "InternalServerException":
1357
- case "com.amazonaws.inspector2#InternalServerException":
1358
- throw await de_InternalServerExceptionRes(parsedOutput, context);
1359
- case "ResourceNotFoundException":
1360
- case "com.amazonaws.inspector2#ResourceNotFoundException":
1361
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
1362
- case "ThrottlingException":
1363
- case "com.amazonaws.inspector2#ThrottlingException":
1364
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
1365
- case "ValidationException":
1366
- case "com.amazonaws.inspector2#ValidationException":
1367
- throw await de_ValidationExceptionRes(parsedOutput, context);
1368
- default:
1369
- const parsedBody = parsedOutput.body;
1370
- return throwDefaultError({
1371
- output,
1372
- parsedBody,
1373
- errorCode,
1374
- });
1375
- }
1376
- };
1377
1023
  export const de_CreateSbomExportCommand = async (output, context) => {
1378
1024
  if (output.statusCode !== 200 && output.statusCode >= 300) {
1379
- return de_CreateSbomExportCommandError(output, context);
1025
+ return de_CommandError(output, context);
1380
1026
  }
1381
1027
  const contents = map({
1382
1028
  $metadata: deserializeMetadata(output),
@@ -1388,40 +1034,9 @@ export const de_CreateSbomExportCommand = async (output, context) => {
1388
1034
  Object.assign(contents, doc);
1389
1035
  return contents;
1390
1036
  };
1391
- const de_CreateSbomExportCommandError = 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.inspector2#AccessDeniedException":
1400
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
1401
- case "InternalServerException":
1402
- case "com.amazonaws.inspector2#InternalServerException":
1403
- throw await de_InternalServerExceptionRes(parsedOutput, context);
1404
- case "ResourceNotFoundException":
1405
- case "com.amazonaws.inspector2#ResourceNotFoundException":
1406
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
1407
- case "ThrottlingException":
1408
- case "com.amazonaws.inspector2#ThrottlingException":
1409
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
1410
- case "ValidationException":
1411
- case "com.amazonaws.inspector2#ValidationException":
1412
- throw await de_ValidationExceptionRes(parsedOutput, context);
1413
- default:
1414
- const parsedBody = parsedOutput.body;
1415
- return throwDefaultError({
1416
- output,
1417
- parsedBody,
1418
- errorCode,
1419
- });
1420
- }
1421
- };
1422
1037
  export const de_DeleteCisScanConfigurationCommand = async (output, context) => {
1423
1038
  if (output.statusCode !== 200 && output.statusCode >= 300) {
1424
- return de_DeleteCisScanConfigurationCommandError(output, context);
1039
+ return de_CommandError(output, context);
1425
1040
  }
1426
1041
  const contents = map({
1427
1042
  $metadata: deserializeMetadata(output),
@@ -1433,40 +1048,9 @@ export const de_DeleteCisScanConfigurationCommand = async (output, context) => {
1433
1048
  Object.assign(contents, doc);
1434
1049
  return contents;
1435
1050
  };
1436
- const de_DeleteCisScanConfigurationCommandError = async (output, context) => {
1437
- const parsedOutput = {
1438
- ...output,
1439
- body: await parseErrorBody(output.body, context),
1440
- };
1441
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1442
- switch (errorCode) {
1443
- case "AccessDeniedException":
1444
- case "com.amazonaws.inspector2#AccessDeniedException":
1445
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
1446
- case "InternalServerException":
1447
- case "com.amazonaws.inspector2#InternalServerException":
1448
- throw await de_InternalServerExceptionRes(parsedOutput, context);
1449
- case "ResourceNotFoundException":
1450
- case "com.amazonaws.inspector2#ResourceNotFoundException":
1451
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
1452
- case "ThrottlingException":
1453
- case "com.amazonaws.inspector2#ThrottlingException":
1454
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
1455
- case "ValidationException":
1456
- case "com.amazonaws.inspector2#ValidationException":
1457
- throw await de_ValidationExceptionRes(parsedOutput, context);
1458
- default:
1459
- const parsedBody = parsedOutput.body;
1460
- return throwDefaultError({
1461
- output,
1462
- parsedBody,
1463
- errorCode,
1464
- });
1465
- }
1466
- };
1467
1051
  export const de_DeleteFilterCommand = async (output, context) => {
1468
1052
  if (output.statusCode !== 200 && output.statusCode >= 300) {
1469
- return de_DeleteFilterCommandError(output, context);
1053
+ return de_CommandError(output, context);
1470
1054
  }
1471
1055
  const contents = map({
1472
1056
  $metadata: deserializeMetadata(output),
@@ -1478,40 +1062,9 @@ export const de_DeleteFilterCommand = async (output, context) => {
1478
1062
  Object.assign(contents, doc);
1479
1063
  return contents;
1480
1064
  };
1481
- const de_DeleteFilterCommandError = async (output, context) => {
1482
- const parsedOutput = {
1483
- ...output,
1484
- body: await parseErrorBody(output.body, context),
1485
- };
1486
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1487
- switch (errorCode) {
1488
- case "AccessDeniedException":
1489
- case "com.amazonaws.inspector2#AccessDeniedException":
1490
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
1491
- case "InternalServerException":
1492
- case "com.amazonaws.inspector2#InternalServerException":
1493
- throw await de_InternalServerExceptionRes(parsedOutput, context);
1494
- case "ResourceNotFoundException":
1495
- case "com.amazonaws.inspector2#ResourceNotFoundException":
1496
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
1497
- case "ThrottlingException":
1498
- case "com.amazonaws.inspector2#ThrottlingException":
1499
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
1500
- case "ValidationException":
1501
- case "com.amazonaws.inspector2#ValidationException":
1502
- throw await de_ValidationExceptionRes(parsedOutput, context);
1503
- default:
1504
- const parsedBody = parsedOutput.body;
1505
- return throwDefaultError({
1506
- output,
1507
- parsedBody,
1508
- errorCode,
1509
- });
1510
- }
1511
- };
1512
1065
  export const de_DescribeOrganizationConfigurationCommand = async (output, context) => {
1513
1066
  if (output.statusCode !== 200 && output.statusCode >= 300) {
1514
- return de_DescribeOrganizationConfigurationCommandError(output, context);
1067
+ return de_CommandError(output, context);
1515
1068
  }
1516
1069
  const contents = map({
1517
1070
  $metadata: deserializeMetadata(output),
@@ -1524,37 +1077,9 @@ export const de_DescribeOrganizationConfigurationCommand = async (output, contex
1524
1077
  Object.assign(contents, doc);
1525
1078
  return contents;
1526
1079
  };
1527
- const de_DescribeOrganizationConfigurationCommandError = async (output, context) => {
1528
- const parsedOutput = {
1529
- ...output,
1530
- body: await parseErrorBody(output.body, context),
1531
- };
1532
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1533
- switch (errorCode) {
1534
- case "AccessDeniedException":
1535
- case "com.amazonaws.inspector2#AccessDeniedException":
1536
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
1537
- case "InternalServerException":
1538
- case "com.amazonaws.inspector2#InternalServerException":
1539
- throw await de_InternalServerExceptionRes(parsedOutput, context);
1540
- case "ThrottlingException":
1541
- case "com.amazonaws.inspector2#ThrottlingException":
1542
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
1543
- case "ValidationException":
1544
- case "com.amazonaws.inspector2#ValidationException":
1545
- throw await de_ValidationExceptionRes(parsedOutput, context);
1546
- default:
1547
- const parsedBody = parsedOutput.body;
1548
- return throwDefaultError({
1549
- output,
1550
- parsedBody,
1551
- errorCode,
1552
- });
1553
- }
1554
- };
1555
1080
  export const de_DisableCommand = async (output, context) => {
1556
1081
  if (output.statusCode !== 200 && output.statusCode >= 300) {
1557
- return de_DisableCommandError(output, context);
1082
+ return de_CommandError(output, context);
1558
1083
  }
1559
1084
  const contents = map({
1560
1085
  $metadata: deserializeMetadata(output),
@@ -1567,40 +1092,9 @@ export const de_DisableCommand = async (output, context) => {
1567
1092
  Object.assign(contents, doc);
1568
1093
  return contents;
1569
1094
  };
1570
- const de_DisableCommandError = async (output, context) => {
1571
- const parsedOutput = {
1572
- ...output,
1573
- body: await parseErrorBody(output.body, context),
1574
- };
1575
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1576
- switch (errorCode) {
1577
- case "AccessDeniedException":
1578
- case "com.amazonaws.inspector2#AccessDeniedException":
1579
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
1580
- case "InternalServerException":
1581
- case "com.amazonaws.inspector2#InternalServerException":
1582
- throw await de_InternalServerExceptionRes(parsedOutput, context);
1583
- case "ResourceNotFoundException":
1584
- case "com.amazonaws.inspector2#ResourceNotFoundException":
1585
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
1586
- case "ThrottlingException":
1587
- case "com.amazonaws.inspector2#ThrottlingException":
1588
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
1589
- case "ValidationException":
1590
- case "com.amazonaws.inspector2#ValidationException":
1591
- throw await de_ValidationExceptionRes(parsedOutput, context);
1592
- default:
1593
- const parsedBody = parsedOutput.body;
1594
- return throwDefaultError({
1595
- output,
1596
- parsedBody,
1597
- errorCode,
1598
- });
1599
- }
1600
- };
1601
1095
  export const de_DisableDelegatedAdminAccountCommand = async (output, context) => {
1602
1096
  if (output.statusCode !== 200 && output.statusCode >= 300) {
1603
- return de_DisableDelegatedAdminAccountCommandError(output, context);
1097
+ return de_CommandError(output, context);
1604
1098
  }
1605
1099
  const contents = map({
1606
1100
  $metadata: deserializeMetadata(output),
@@ -1612,43 +1106,9 @@ export const de_DisableDelegatedAdminAccountCommand = async (output, context) =>
1612
1106
  Object.assign(contents, doc);
1613
1107
  return contents;
1614
1108
  };
1615
- const de_DisableDelegatedAdminAccountCommandError = async (output, context) => {
1616
- const parsedOutput = {
1617
- ...output,
1618
- body: await parseErrorBody(output.body, context),
1619
- };
1620
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1621
- switch (errorCode) {
1622
- case "AccessDeniedException":
1623
- case "com.amazonaws.inspector2#AccessDeniedException":
1624
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
1625
- case "ConflictException":
1626
- case "com.amazonaws.inspector2#ConflictException":
1627
- throw await de_ConflictExceptionRes(parsedOutput, context);
1628
- case "InternalServerException":
1629
- case "com.amazonaws.inspector2#InternalServerException":
1630
- throw await de_InternalServerExceptionRes(parsedOutput, context);
1631
- case "ResourceNotFoundException":
1632
- case "com.amazonaws.inspector2#ResourceNotFoundException":
1633
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
1634
- case "ThrottlingException":
1635
- case "com.amazonaws.inspector2#ThrottlingException":
1636
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
1637
- case "ValidationException":
1638
- case "com.amazonaws.inspector2#ValidationException":
1639
- throw await de_ValidationExceptionRes(parsedOutput, context);
1640
- default:
1641
- const parsedBody = parsedOutput.body;
1642
- return throwDefaultError({
1643
- output,
1644
- parsedBody,
1645
- errorCode,
1646
- });
1647
- }
1648
- };
1649
1109
  export const de_DisassociateMemberCommand = async (output, context) => {
1650
1110
  if (output.statusCode !== 200 && output.statusCode >= 300) {
1651
- return de_DisassociateMemberCommandError(output, context);
1111
+ return de_CommandError(output, context);
1652
1112
  }
1653
1113
  const contents = map({
1654
1114
  $metadata: deserializeMetadata(output),
@@ -1660,37 +1120,9 @@ export const de_DisassociateMemberCommand = async (output, context) => {
1660
1120
  Object.assign(contents, doc);
1661
1121
  return contents;
1662
1122
  };
1663
- const de_DisassociateMemberCommandError = async (output, context) => {
1664
- const parsedOutput = {
1665
- ...output,
1666
- body: await parseErrorBody(output.body, context),
1667
- };
1668
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1669
- switch (errorCode) {
1670
- case "AccessDeniedException":
1671
- case "com.amazonaws.inspector2#AccessDeniedException":
1672
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
1673
- case "InternalServerException":
1674
- case "com.amazonaws.inspector2#InternalServerException":
1675
- throw await de_InternalServerExceptionRes(parsedOutput, context);
1676
- case "ThrottlingException":
1677
- case "com.amazonaws.inspector2#ThrottlingException":
1678
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
1679
- case "ValidationException":
1680
- case "com.amazonaws.inspector2#ValidationException":
1681
- throw await de_ValidationExceptionRes(parsedOutput, context);
1682
- default:
1683
- const parsedBody = parsedOutput.body;
1684
- return throwDefaultError({
1685
- output,
1686
- parsedBody,
1687
- errorCode,
1688
- });
1689
- }
1690
- };
1691
1123
  export const de_EnableCommand = async (output, context) => {
1692
1124
  if (output.statusCode !== 200 && output.statusCode >= 300) {
1693
- return de_EnableCommandError(output, context);
1125
+ return de_CommandError(output, context);
1694
1126
  }
1695
1127
  const contents = map({
1696
1128
  $metadata: deserializeMetadata(output),
@@ -1703,40 +1135,9 @@ export const de_EnableCommand = async (output, context) => {
1703
1135
  Object.assign(contents, doc);
1704
1136
  return contents;
1705
1137
  };
1706
- const de_EnableCommandError = async (output, context) => {
1707
- const parsedOutput = {
1708
- ...output,
1709
- body: await parseErrorBody(output.body, context),
1710
- };
1711
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1712
- switch (errorCode) {
1713
- case "AccessDeniedException":
1714
- case "com.amazonaws.inspector2#AccessDeniedException":
1715
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
1716
- case "InternalServerException":
1717
- case "com.amazonaws.inspector2#InternalServerException":
1718
- throw await de_InternalServerExceptionRes(parsedOutput, context);
1719
- case "ResourceNotFoundException":
1720
- case "com.amazonaws.inspector2#ResourceNotFoundException":
1721
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
1722
- case "ThrottlingException":
1723
- case "com.amazonaws.inspector2#ThrottlingException":
1724
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
1725
- case "ValidationException":
1726
- case "com.amazonaws.inspector2#ValidationException":
1727
- throw await de_ValidationExceptionRes(parsedOutput, context);
1728
- default:
1729
- const parsedBody = parsedOutput.body;
1730
- return throwDefaultError({
1731
- output,
1732
- parsedBody,
1733
- errorCode,
1734
- });
1735
- }
1736
- };
1737
1138
  export const de_EnableDelegatedAdminAccountCommand = async (output, context) => {
1738
1139
  if (output.statusCode !== 200 && output.statusCode >= 300) {
1739
- return de_EnableDelegatedAdminAccountCommandError(output, context);
1140
+ return de_CommandError(output, context);
1740
1141
  }
1741
1142
  const contents = map({
1742
1143
  $metadata: deserializeMetadata(output),
@@ -1748,43 +1149,9 @@ export const de_EnableDelegatedAdminAccountCommand = async (output, context) =>
1748
1149
  Object.assign(contents, doc);
1749
1150
  return contents;
1750
1151
  };
1751
- const de_EnableDelegatedAdminAccountCommandError = async (output, context) => {
1752
- const parsedOutput = {
1753
- ...output,
1754
- body: await parseErrorBody(output.body, context),
1755
- };
1756
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1757
- switch (errorCode) {
1758
- case "AccessDeniedException":
1759
- case "com.amazonaws.inspector2#AccessDeniedException":
1760
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
1761
- case "ConflictException":
1762
- case "com.amazonaws.inspector2#ConflictException":
1763
- throw await de_ConflictExceptionRes(parsedOutput, context);
1764
- case "InternalServerException":
1765
- case "com.amazonaws.inspector2#InternalServerException":
1766
- throw await de_InternalServerExceptionRes(parsedOutput, context);
1767
- case "ResourceNotFoundException":
1768
- case "com.amazonaws.inspector2#ResourceNotFoundException":
1769
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
1770
- case "ThrottlingException":
1771
- case "com.amazonaws.inspector2#ThrottlingException":
1772
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
1773
- case "ValidationException":
1774
- case "com.amazonaws.inspector2#ValidationException":
1775
- throw await de_ValidationExceptionRes(parsedOutput, context);
1776
- default:
1777
- const parsedBody = parsedOutput.body;
1778
- return throwDefaultError({
1779
- output,
1780
- parsedBody,
1781
- errorCode,
1782
- });
1783
- }
1784
- };
1785
1152
  export const de_GetCisScanReportCommand = async (output, context) => {
1786
1153
  if (output.statusCode !== 200 && output.statusCode >= 300) {
1787
- return de_GetCisScanReportCommandError(output, context);
1154
+ return de_CommandError(output, context);
1788
1155
  }
1789
1156
  const contents = map({
1790
1157
  $metadata: deserializeMetadata(output),
@@ -1797,37 +1164,9 @@ export const de_GetCisScanReportCommand = async (output, context) => {
1797
1164
  Object.assign(contents, doc);
1798
1165
  return contents;
1799
1166
  };
1800
- const de_GetCisScanReportCommandError = async (output, context) => {
1801
- const parsedOutput = {
1802
- ...output,
1803
- body: await parseErrorBody(output.body, context),
1804
- };
1805
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1806
- switch (errorCode) {
1807
- case "AccessDeniedException":
1808
- case "com.amazonaws.inspector2#AccessDeniedException":
1809
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
1810
- case "InternalServerException":
1811
- case "com.amazonaws.inspector2#InternalServerException":
1812
- throw await de_InternalServerExceptionRes(parsedOutput, context);
1813
- case "ThrottlingException":
1814
- case "com.amazonaws.inspector2#ThrottlingException":
1815
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
1816
- case "ValidationException":
1817
- case "com.amazonaws.inspector2#ValidationException":
1818
- throw await de_ValidationExceptionRes(parsedOutput, context);
1819
- default:
1820
- const parsedBody = parsedOutput.body;
1821
- return throwDefaultError({
1822
- output,
1823
- parsedBody,
1824
- errorCode,
1825
- });
1826
- }
1827
- };
1828
1167
  export const de_GetCisScanResultDetailsCommand = async (output, context) => {
1829
1168
  if (output.statusCode !== 200 && output.statusCode >= 300) {
1830
- return de_GetCisScanResultDetailsCommandError(output, context);
1169
+ return de_CommandError(output, context);
1831
1170
  }
1832
1171
  const contents = map({
1833
1172
  $metadata: deserializeMetadata(output),
@@ -1840,37 +1179,9 @@ export const de_GetCisScanResultDetailsCommand = async (output, context) => {
1840
1179
  Object.assign(contents, doc);
1841
1180
  return contents;
1842
1181
  };
1843
- const de_GetCisScanResultDetailsCommandError = async (output, context) => {
1844
- const parsedOutput = {
1845
- ...output,
1846
- body: await parseErrorBody(output.body, context),
1847
- };
1848
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1849
- switch (errorCode) {
1850
- case "AccessDeniedException":
1851
- case "com.amazonaws.inspector2#AccessDeniedException":
1852
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
1853
- case "InternalServerException":
1854
- case "com.amazonaws.inspector2#InternalServerException":
1855
- throw await de_InternalServerExceptionRes(parsedOutput, context);
1856
- case "ThrottlingException":
1857
- case "com.amazonaws.inspector2#ThrottlingException":
1858
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
1859
- case "ValidationException":
1860
- case "com.amazonaws.inspector2#ValidationException":
1861
- throw await de_ValidationExceptionRes(parsedOutput, context);
1862
- default:
1863
- const parsedBody = parsedOutput.body;
1864
- return throwDefaultError({
1865
- output,
1866
- parsedBody,
1867
- errorCode,
1868
- });
1869
- }
1870
- };
1871
1182
  export const de_GetConfigurationCommand = async (output, context) => {
1872
1183
  if (output.statusCode !== 200 && output.statusCode >= 300) {
1873
- return de_GetConfigurationCommandError(output, context);
1184
+ return de_CommandError(output, context);
1874
1185
  }
1875
1186
  const contents = map({
1876
1187
  $metadata: deserializeMetadata(output),
@@ -1882,34 +1193,9 @@ export const de_GetConfigurationCommand = async (output, context) => {
1882
1193
  Object.assign(contents, doc);
1883
1194
  return contents;
1884
1195
  };
1885
- const de_GetConfigurationCommandError = 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 "InternalServerException":
1893
- case "com.amazonaws.inspector2#InternalServerException":
1894
- throw await de_InternalServerExceptionRes(parsedOutput, context);
1895
- case "ResourceNotFoundException":
1896
- case "com.amazonaws.inspector2#ResourceNotFoundException":
1897
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
1898
- case "ThrottlingException":
1899
- case "com.amazonaws.inspector2#ThrottlingException":
1900
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
1901
- default:
1902
- const parsedBody = parsedOutput.body;
1903
- return throwDefaultError({
1904
- output,
1905
- parsedBody,
1906
- errorCode,
1907
- });
1908
- }
1909
- };
1910
1196
  export const de_GetDelegatedAdminAccountCommand = async (output, context) => {
1911
1197
  if (output.statusCode !== 200 && output.statusCode >= 300) {
1912
- return de_GetDelegatedAdminAccountCommandError(output, context);
1198
+ return de_CommandError(output, context);
1913
1199
  }
1914
1200
  const contents = map({
1915
1201
  $metadata: deserializeMetadata(output),
@@ -1921,40 +1207,9 @@ export const de_GetDelegatedAdminAccountCommand = async (output, context) => {
1921
1207
  Object.assign(contents, doc);
1922
1208
  return contents;
1923
1209
  };
1924
- const de_GetDelegatedAdminAccountCommandError = async (output, context) => {
1925
- const parsedOutput = {
1926
- ...output,
1927
- body: await parseErrorBody(output.body, context),
1928
- };
1929
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1930
- switch (errorCode) {
1931
- case "AccessDeniedException":
1932
- case "com.amazonaws.inspector2#AccessDeniedException":
1933
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
1934
- case "InternalServerException":
1935
- case "com.amazonaws.inspector2#InternalServerException":
1936
- throw await de_InternalServerExceptionRes(parsedOutput, context);
1937
- case "ResourceNotFoundException":
1938
- case "com.amazonaws.inspector2#ResourceNotFoundException":
1939
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
1940
- case "ThrottlingException":
1941
- case "com.amazonaws.inspector2#ThrottlingException":
1942
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
1943
- case "ValidationException":
1944
- case "com.amazonaws.inspector2#ValidationException":
1945
- throw await de_ValidationExceptionRes(parsedOutput, context);
1946
- default:
1947
- const parsedBody = parsedOutput.body;
1948
- return throwDefaultError({
1949
- output,
1950
- parsedBody,
1951
- errorCode,
1952
- });
1953
- }
1954
- };
1955
1210
  export const de_GetEc2DeepInspectionConfigurationCommand = async (output, context) => {
1956
1211
  if (output.statusCode !== 200 && output.statusCode >= 300) {
1957
- return de_GetEc2DeepInspectionConfigurationCommandError(output, context);
1212
+ return de_CommandError(output, context);
1958
1213
  }
1959
1214
  const contents = map({
1960
1215
  $metadata: deserializeMetadata(output),
@@ -1969,37 +1224,9 @@ export const de_GetEc2DeepInspectionConfigurationCommand = async (output, contex
1969
1224
  Object.assign(contents, doc);
1970
1225
  return contents;
1971
1226
  };
1972
- const de_GetEc2DeepInspectionConfigurationCommandError = async (output, context) => {
1973
- const parsedOutput = {
1974
- ...output,
1975
- body: await parseErrorBody(output.body, context),
1976
- };
1977
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1978
- switch (errorCode) {
1979
- case "AccessDeniedException":
1980
- case "com.amazonaws.inspector2#AccessDeniedException":
1981
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
1982
- case "InternalServerException":
1983
- case "com.amazonaws.inspector2#InternalServerException":
1984
- throw await de_InternalServerExceptionRes(parsedOutput, context);
1985
- case "ResourceNotFoundException":
1986
- case "com.amazonaws.inspector2#ResourceNotFoundException":
1987
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
1988
- case "ThrottlingException":
1989
- case "com.amazonaws.inspector2#ThrottlingException":
1990
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
1991
- default:
1992
- const parsedBody = parsedOutput.body;
1993
- return throwDefaultError({
1994
- output,
1995
- parsedBody,
1996
- errorCode,
1997
- });
1998
- }
1999
- };
2000
1227
  export const de_GetEncryptionKeyCommand = async (output, context) => {
2001
1228
  if (output.statusCode !== 200 && output.statusCode >= 300) {
2002
- return de_GetEncryptionKeyCommandError(output, context);
1229
+ return de_CommandError(output, context);
2003
1230
  }
2004
1231
  const contents = map({
2005
1232
  $metadata: deserializeMetadata(output),
@@ -2011,40 +1238,9 @@ export const de_GetEncryptionKeyCommand = async (output, context) => {
2011
1238
  Object.assign(contents, doc);
2012
1239
  return contents;
2013
1240
  };
2014
- const de_GetEncryptionKeyCommandError = async (output, context) => {
2015
- const parsedOutput = {
2016
- ...output,
2017
- body: await parseErrorBody(output.body, context),
2018
- };
2019
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2020
- switch (errorCode) {
2021
- case "AccessDeniedException":
2022
- case "com.amazonaws.inspector2#AccessDeniedException":
2023
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
2024
- case "InternalServerException":
2025
- case "com.amazonaws.inspector2#InternalServerException":
2026
- throw await de_InternalServerExceptionRes(parsedOutput, context);
2027
- case "ResourceNotFoundException":
2028
- case "com.amazonaws.inspector2#ResourceNotFoundException":
2029
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
2030
- case "ThrottlingException":
2031
- case "com.amazonaws.inspector2#ThrottlingException":
2032
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
2033
- case "ValidationException":
2034
- case "com.amazonaws.inspector2#ValidationException":
2035
- throw await de_ValidationExceptionRes(parsedOutput, context);
2036
- default:
2037
- const parsedBody = parsedOutput.body;
2038
- return throwDefaultError({
2039
- output,
2040
- parsedBody,
2041
- errorCode,
2042
- });
2043
- }
2044
- };
2045
1241
  export const de_GetFindingsReportStatusCommand = async (output, context) => {
2046
1242
  if (output.statusCode !== 200 && output.statusCode >= 300) {
2047
- return de_GetFindingsReportStatusCommandError(output, context);
1243
+ return de_CommandError(output, context);
2048
1244
  }
2049
1245
  const contents = map({
2050
1246
  $metadata: deserializeMetadata(output),
@@ -2061,40 +1257,9 @@ export const de_GetFindingsReportStatusCommand = async (output, context) => {
2061
1257
  Object.assign(contents, doc);
2062
1258
  return contents;
2063
1259
  };
2064
- const de_GetFindingsReportStatusCommandError = async (output, context) => {
2065
- const parsedOutput = {
2066
- ...output,
2067
- body: await parseErrorBody(output.body, context),
2068
- };
2069
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2070
- switch (errorCode) {
2071
- case "AccessDeniedException":
2072
- case "com.amazonaws.inspector2#AccessDeniedException":
2073
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
2074
- case "InternalServerException":
2075
- case "com.amazonaws.inspector2#InternalServerException":
2076
- throw await de_InternalServerExceptionRes(parsedOutput, context);
2077
- case "ResourceNotFoundException":
2078
- case "com.amazonaws.inspector2#ResourceNotFoundException":
2079
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
2080
- case "ThrottlingException":
2081
- case "com.amazonaws.inspector2#ThrottlingException":
2082
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
2083
- case "ValidationException":
2084
- case "com.amazonaws.inspector2#ValidationException":
2085
- throw await de_ValidationExceptionRes(parsedOutput, context);
2086
- default:
2087
- const parsedBody = parsedOutput.body;
2088
- return throwDefaultError({
2089
- output,
2090
- parsedBody,
2091
- errorCode,
2092
- });
2093
- }
2094
- };
2095
1260
  export const de_GetMemberCommand = async (output, context) => {
2096
1261
  if (output.statusCode !== 200 && output.statusCode >= 300) {
2097
- return de_GetMemberCommandError(output, context);
1262
+ return de_CommandError(output, context);
2098
1263
  }
2099
1264
  const contents = map({
2100
1265
  $metadata: deserializeMetadata(output),
@@ -2106,40 +1271,9 @@ export const de_GetMemberCommand = async (output, context) => {
2106
1271
  Object.assign(contents, doc);
2107
1272
  return contents;
2108
1273
  };
2109
- const de_GetMemberCommandError = 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.inspector2#AccessDeniedException":
2118
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
2119
- case "InternalServerException":
2120
- case "com.amazonaws.inspector2#InternalServerException":
2121
- throw await de_InternalServerExceptionRes(parsedOutput, context);
2122
- case "ResourceNotFoundException":
2123
- case "com.amazonaws.inspector2#ResourceNotFoundException":
2124
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
2125
- case "ThrottlingException":
2126
- case "com.amazonaws.inspector2#ThrottlingException":
2127
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
2128
- case "ValidationException":
2129
- case "com.amazonaws.inspector2#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
1274
  export const de_GetSbomExportCommand = async (output, context) => {
2141
1275
  if (output.statusCode !== 200 && output.statusCode >= 300) {
2142
- return de_GetSbomExportCommandError(output, context);
1276
+ return de_CommandError(output, context);
2143
1277
  }
2144
1278
  const contents = map({
2145
1279
  $metadata: deserializeMetadata(output),
@@ -2157,40 +1291,9 @@ export const de_GetSbomExportCommand = async (output, context) => {
2157
1291
  Object.assign(contents, doc);
2158
1292
  return contents;
2159
1293
  };
2160
- const de_GetSbomExportCommandError = async (output, context) => {
2161
- const parsedOutput = {
2162
- ...output,
2163
- body: await parseErrorBody(output.body, context),
2164
- };
2165
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2166
- switch (errorCode) {
2167
- case "AccessDeniedException":
2168
- case "com.amazonaws.inspector2#AccessDeniedException":
2169
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
2170
- case "InternalServerException":
2171
- case "com.amazonaws.inspector2#InternalServerException":
2172
- throw await de_InternalServerExceptionRes(parsedOutput, context);
2173
- case "ResourceNotFoundException":
2174
- case "com.amazonaws.inspector2#ResourceNotFoundException":
2175
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
2176
- case "ThrottlingException":
2177
- case "com.amazonaws.inspector2#ThrottlingException":
2178
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
2179
- case "ValidationException":
2180
- case "com.amazonaws.inspector2#ValidationException":
2181
- throw await de_ValidationExceptionRes(parsedOutput, context);
2182
- default:
2183
- const parsedBody = parsedOutput.body;
2184
- return throwDefaultError({
2185
- output,
2186
- parsedBody,
2187
- errorCode,
2188
- });
2189
- }
2190
- };
2191
1294
  export const de_ListAccountPermissionsCommand = async (output, context) => {
2192
1295
  if (output.statusCode !== 200 && output.statusCode >= 300) {
2193
- return de_ListAccountPermissionsCommandError(output, context);
1296
+ return de_CommandError(output, context);
2194
1297
  }
2195
1298
  const contents = map({
2196
1299
  $metadata: deserializeMetadata(output),
@@ -2203,37 +1306,9 @@ export const de_ListAccountPermissionsCommand = async (output, context) => {
2203
1306
  Object.assign(contents, doc);
2204
1307
  return contents;
2205
1308
  };
2206
- const de_ListAccountPermissionsCommandError = async (output, context) => {
2207
- const parsedOutput = {
2208
- ...output,
2209
- body: await parseErrorBody(output.body, context),
2210
- };
2211
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2212
- switch (errorCode) {
2213
- case "AccessDeniedException":
2214
- case "com.amazonaws.inspector2#AccessDeniedException":
2215
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
2216
- case "InternalServerException":
2217
- case "com.amazonaws.inspector2#InternalServerException":
2218
- throw await de_InternalServerExceptionRes(parsedOutput, context);
2219
- case "ThrottlingException":
2220
- case "com.amazonaws.inspector2#ThrottlingException":
2221
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
2222
- case "ValidationException":
2223
- case "com.amazonaws.inspector2#ValidationException":
2224
- throw await de_ValidationExceptionRes(parsedOutput, context);
2225
- default:
2226
- const parsedBody = parsedOutput.body;
2227
- return throwDefaultError({
2228
- output,
2229
- parsedBody,
2230
- errorCode,
2231
- });
2232
- }
2233
- };
2234
1309
  export const de_ListCisScanConfigurationsCommand = async (output, context) => {
2235
1310
  if (output.statusCode !== 200 && output.statusCode >= 300) {
2236
- return de_ListCisScanConfigurationsCommandError(output, context);
1311
+ return de_CommandError(output, context);
2237
1312
  }
2238
1313
  const contents = map({
2239
1314
  $metadata: deserializeMetadata(output),
@@ -2246,37 +1321,9 @@ export const de_ListCisScanConfigurationsCommand = async (output, context) => {
2246
1321
  Object.assign(contents, doc);
2247
1322
  return contents;
2248
1323
  };
2249
- const de_ListCisScanConfigurationsCommandError = async (output, context) => {
2250
- const parsedOutput = {
2251
- ...output,
2252
- body: await parseErrorBody(output.body, context),
2253
- };
2254
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2255
- switch (errorCode) {
2256
- case "AccessDeniedException":
2257
- case "com.amazonaws.inspector2#AccessDeniedException":
2258
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
2259
- case "InternalServerException":
2260
- case "com.amazonaws.inspector2#InternalServerException":
2261
- throw await de_InternalServerExceptionRes(parsedOutput, context);
2262
- case "ThrottlingException":
2263
- case "com.amazonaws.inspector2#ThrottlingException":
2264
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
2265
- case "ValidationException":
2266
- case "com.amazonaws.inspector2#ValidationException":
2267
- throw await de_ValidationExceptionRes(parsedOutput, context);
2268
- default:
2269
- const parsedBody = parsedOutput.body;
2270
- return throwDefaultError({
2271
- output,
2272
- parsedBody,
2273
- errorCode,
2274
- });
2275
- }
2276
- };
2277
1324
  export const de_ListCisScanResultsAggregatedByChecksCommand = async (output, context) => {
2278
1325
  if (output.statusCode !== 200 && output.statusCode >= 300) {
2279
- return de_ListCisScanResultsAggregatedByChecksCommandError(output, context);
1326
+ return de_CommandError(output, context);
2280
1327
  }
2281
1328
  const contents = map({
2282
1329
  $metadata: deserializeMetadata(output),
@@ -2289,37 +1336,9 @@ export const de_ListCisScanResultsAggregatedByChecksCommand = async (output, con
2289
1336
  Object.assign(contents, doc);
2290
1337
  return contents;
2291
1338
  };
2292
- const de_ListCisScanResultsAggregatedByChecksCommandError = async (output, context) => {
2293
- const parsedOutput = {
2294
- ...output,
2295
- body: await parseErrorBody(output.body, context),
2296
- };
2297
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2298
- switch (errorCode) {
2299
- case "AccessDeniedException":
2300
- case "com.amazonaws.inspector2#AccessDeniedException":
2301
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
2302
- case "InternalServerException":
2303
- case "com.amazonaws.inspector2#InternalServerException":
2304
- throw await de_InternalServerExceptionRes(parsedOutput, context);
2305
- case "ThrottlingException":
2306
- case "com.amazonaws.inspector2#ThrottlingException":
2307
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
2308
- case "ValidationException":
2309
- case "com.amazonaws.inspector2#ValidationException":
2310
- throw await de_ValidationExceptionRes(parsedOutput, context);
2311
- default:
2312
- const parsedBody = parsedOutput.body;
2313
- return throwDefaultError({
2314
- output,
2315
- parsedBody,
2316
- errorCode,
2317
- });
2318
- }
2319
- };
2320
1339
  export const de_ListCisScanResultsAggregatedByTargetResourceCommand = async (output, context) => {
2321
1340
  if (output.statusCode !== 200 && output.statusCode >= 300) {
2322
- return de_ListCisScanResultsAggregatedByTargetResourceCommandError(output, context);
1341
+ return de_CommandError(output, context);
2323
1342
  }
2324
1343
  const contents = map({
2325
1344
  $metadata: deserializeMetadata(output),
@@ -2332,37 +1351,9 @@ export const de_ListCisScanResultsAggregatedByTargetResourceCommand = async (out
2332
1351
  Object.assign(contents, doc);
2333
1352
  return contents;
2334
1353
  };
2335
- const de_ListCisScanResultsAggregatedByTargetResourceCommandError = async (output, context) => {
2336
- const parsedOutput = {
2337
- ...output,
2338
- body: await parseErrorBody(output.body, context),
2339
- };
2340
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2341
- switch (errorCode) {
2342
- case "AccessDeniedException":
2343
- case "com.amazonaws.inspector2#AccessDeniedException":
2344
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
2345
- case "InternalServerException":
2346
- case "com.amazonaws.inspector2#InternalServerException":
2347
- throw await de_InternalServerExceptionRes(parsedOutput, context);
2348
- case "ThrottlingException":
2349
- case "com.amazonaws.inspector2#ThrottlingException":
2350
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
2351
- case "ValidationException":
2352
- case "com.amazonaws.inspector2#ValidationException":
2353
- throw await de_ValidationExceptionRes(parsedOutput, context);
2354
- default:
2355
- const parsedBody = parsedOutput.body;
2356
- return throwDefaultError({
2357
- output,
2358
- parsedBody,
2359
- errorCode,
2360
- });
2361
- }
2362
- };
2363
1354
  export const de_ListCisScansCommand = async (output, context) => {
2364
1355
  if (output.statusCode !== 200 && output.statusCode >= 300) {
2365
- return de_ListCisScansCommandError(output, context);
1356
+ return de_CommandError(output, context);
2366
1357
  }
2367
1358
  const contents = map({
2368
1359
  $metadata: deserializeMetadata(output),
@@ -2375,37 +1366,9 @@ export const de_ListCisScansCommand = async (output, context) => {
2375
1366
  Object.assign(contents, doc);
2376
1367
  return contents;
2377
1368
  };
2378
- const de_ListCisScansCommandError = async (output, context) => {
2379
- const parsedOutput = {
2380
- ...output,
2381
- body: await parseErrorBody(output.body, context),
2382
- };
2383
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2384
- switch (errorCode) {
2385
- case "AccessDeniedException":
2386
- case "com.amazonaws.inspector2#AccessDeniedException":
2387
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
2388
- case "InternalServerException":
2389
- case "com.amazonaws.inspector2#InternalServerException":
2390
- throw await de_InternalServerExceptionRes(parsedOutput, context);
2391
- case "ThrottlingException":
2392
- case "com.amazonaws.inspector2#ThrottlingException":
2393
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
2394
- case "ValidationException":
2395
- case "com.amazonaws.inspector2#ValidationException":
2396
- throw await de_ValidationExceptionRes(parsedOutput, context);
2397
- default:
2398
- const parsedBody = parsedOutput.body;
2399
- return throwDefaultError({
2400
- output,
2401
- parsedBody,
2402
- errorCode,
2403
- });
2404
- }
2405
- };
2406
1369
  export const de_ListCoverageCommand = async (output, context) => {
2407
1370
  if (output.statusCode !== 200 && output.statusCode >= 300) {
2408
- return de_ListCoverageCommandError(output, context);
1371
+ return de_CommandError(output, context);
2409
1372
  }
2410
1373
  const contents = map({
2411
1374
  $metadata: deserializeMetadata(output),
@@ -2418,34 +1381,9 @@ export const de_ListCoverageCommand = async (output, context) => {
2418
1381
  Object.assign(contents, doc);
2419
1382
  return contents;
2420
1383
  };
2421
- const de_ListCoverageCommandError = async (output, context) => {
2422
- const parsedOutput = {
2423
- ...output,
2424
- body: await parseErrorBody(output.body, context),
2425
- };
2426
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2427
- switch (errorCode) {
2428
- case "InternalServerException":
2429
- case "com.amazonaws.inspector2#InternalServerException":
2430
- throw await de_InternalServerExceptionRes(parsedOutput, context);
2431
- case "ThrottlingException":
2432
- case "com.amazonaws.inspector2#ThrottlingException":
2433
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
2434
- case "ValidationException":
2435
- case "com.amazonaws.inspector2#ValidationException":
2436
- throw await de_ValidationExceptionRes(parsedOutput, context);
2437
- default:
2438
- const parsedBody = parsedOutput.body;
2439
- return throwDefaultError({
2440
- output,
2441
- parsedBody,
2442
- errorCode,
2443
- });
2444
- }
2445
- };
2446
1384
  export const de_ListCoverageStatisticsCommand = async (output, context) => {
2447
1385
  if (output.statusCode !== 200 && output.statusCode >= 300) {
2448
- return de_ListCoverageStatisticsCommandError(output, context);
1386
+ return de_CommandError(output, context);
2449
1387
  }
2450
1388
  const contents = map({
2451
1389
  $metadata: deserializeMetadata(output),
@@ -2459,34 +1397,9 @@ export const de_ListCoverageStatisticsCommand = async (output, context) => {
2459
1397
  Object.assign(contents, doc);
2460
1398
  return contents;
2461
1399
  };
2462
- const de_ListCoverageStatisticsCommandError = async (output, context) => {
2463
- const parsedOutput = {
2464
- ...output,
2465
- body: await parseErrorBody(output.body, context),
2466
- };
2467
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2468
- switch (errorCode) {
2469
- case "InternalServerException":
2470
- case "com.amazonaws.inspector2#InternalServerException":
2471
- throw await de_InternalServerExceptionRes(parsedOutput, context);
2472
- case "ThrottlingException":
2473
- case "com.amazonaws.inspector2#ThrottlingException":
2474
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
2475
- case "ValidationException":
2476
- case "com.amazonaws.inspector2#ValidationException":
2477
- throw await de_ValidationExceptionRes(parsedOutput, context);
2478
- default:
2479
- const parsedBody = parsedOutput.body;
2480
- return throwDefaultError({
2481
- output,
2482
- parsedBody,
2483
- errorCode,
2484
- });
2485
- }
2486
- };
2487
1400
  export const de_ListDelegatedAdminAccountsCommand = async (output, context) => {
2488
1401
  if (output.statusCode !== 200 && output.statusCode >= 300) {
2489
- return de_ListDelegatedAdminAccountsCommandError(output, context);
1402
+ return de_CommandError(output, context);
2490
1403
  }
2491
1404
  const contents = map({
2492
1405
  $metadata: deserializeMetadata(output),
@@ -2499,37 +1412,9 @@ export const de_ListDelegatedAdminAccountsCommand = async (output, context) => {
2499
1412
  Object.assign(contents, doc);
2500
1413
  return contents;
2501
1414
  };
2502
- const de_ListDelegatedAdminAccountsCommandError = async (output, context) => {
2503
- const parsedOutput = {
2504
- ...output,
2505
- body: await parseErrorBody(output.body, context),
2506
- };
2507
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2508
- switch (errorCode) {
2509
- case "AccessDeniedException":
2510
- case "com.amazonaws.inspector2#AccessDeniedException":
2511
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
2512
- case "InternalServerException":
2513
- case "com.amazonaws.inspector2#InternalServerException":
2514
- throw await de_InternalServerExceptionRes(parsedOutput, context);
2515
- case "ThrottlingException":
2516
- case "com.amazonaws.inspector2#ThrottlingException":
2517
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
2518
- case "ValidationException":
2519
- case "com.amazonaws.inspector2#ValidationException":
2520
- throw await de_ValidationExceptionRes(parsedOutput, context);
2521
- default:
2522
- const parsedBody = parsedOutput.body;
2523
- return throwDefaultError({
2524
- output,
2525
- parsedBody,
2526
- errorCode,
2527
- });
2528
- }
2529
- };
2530
1415
  export const de_ListFiltersCommand = async (output, context) => {
2531
1416
  if (output.statusCode !== 200 && output.statusCode >= 300) {
2532
- return de_ListFiltersCommandError(output, context);
1417
+ return de_CommandError(output, context);
2533
1418
  }
2534
1419
  const contents = map({
2535
1420
  $metadata: deserializeMetadata(output),
@@ -2542,37 +1427,9 @@ export const de_ListFiltersCommand = async (output, context) => {
2542
1427
  Object.assign(contents, doc);
2543
1428
  return contents;
2544
1429
  };
2545
- const de_ListFiltersCommandError = async (output, context) => {
2546
- const parsedOutput = {
2547
- ...output,
2548
- body: await parseErrorBody(output.body, context),
2549
- };
2550
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2551
- switch (errorCode) {
2552
- case "AccessDeniedException":
2553
- case "com.amazonaws.inspector2#AccessDeniedException":
2554
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
2555
- case "InternalServerException":
2556
- case "com.amazonaws.inspector2#InternalServerException":
2557
- throw await de_InternalServerExceptionRes(parsedOutput, context);
2558
- case "ThrottlingException":
2559
- case "com.amazonaws.inspector2#ThrottlingException":
2560
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
2561
- case "ValidationException":
2562
- case "com.amazonaws.inspector2#ValidationException":
2563
- throw await de_ValidationExceptionRes(parsedOutput, context);
2564
- default:
2565
- const parsedBody = parsedOutput.body;
2566
- return throwDefaultError({
2567
- output,
2568
- parsedBody,
2569
- errorCode,
2570
- });
2571
- }
2572
- };
2573
1430
  export const de_ListFindingAggregationsCommand = async (output, context) => {
2574
1431
  if (output.statusCode !== 200 && output.statusCode >= 300) {
2575
- return de_ListFindingAggregationsCommandError(output, context);
1432
+ return de_CommandError(output, context);
2576
1433
  }
2577
1434
  const contents = map({
2578
1435
  $metadata: deserializeMetadata(output),
@@ -2586,34 +1443,9 @@ export const de_ListFindingAggregationsCommand = async (output, context) => {
2586
1443
  Object.assign(contents, doc);
2587
1444
  return contents;
2588
1445
  };
2589
- const de_ListFindingAggregationsCommandError = async (output, context) => {
2590
- const parsedOutput = {
2591
- ...output,
2592
- body: await parseErrorBody(output.body, context),
2593
- };
2594
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2595
- switch (errorCode) {
2596
- case "InternalServerException":
2597
- case "com.amazonaws.inspector2#InternalServerException":
2598
- throw await de_InternalServerExceptionRes(parsedOutput, context);
2599
- case "ThrottlingException":
2600
- case "com.amazonaws.inspector2#ThrottlingException":
2601
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
2602
- case "ValidationException":
2603
- case "com.amazonaws.inspector2#ValidationException":
2604
- throw await de_ValidationExceptionRes(parsedOutput, context);
2605
- default:
2606
- const parsedBody = parsedOutput.body;
2607
- return throwDefaultError({
2608
- output,
2609
- parsedBody,
2610
- errorCode,
2611
- });
2612
- }
2613
- };
2614
1446
  export const de_ListFindingsCommand = async (output, context) => {
2615
1447
  if (output.statusCode !== 200 && output.statusCode >= 300) {
2616
- return de_ListFindingsCommandError(output, context);
1448
+ return de_CommandError(output, context);
2617
1449
  }
2618
1450
  const contents = map({
2619
1451
  $metadata: deserializeMetadata(output),
@@ -2626,34 +1458,9 @@ export const de_ListFindingsCommand = async (output, context) => {
2626
1458
  Object.assign(contents, doc);
2627
1459
  return contents;
2628
1460
  };
2629
- const de_ListFindingsCommandError = async (output, context) => {
2630
- const parsedOutput = {
2631
- ...output,
2632
- body: await parseErrorBody(output.body, context),
2633
- };
2634
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2635
- switch (errorCode) {
2636
- case "InternalServerException":
2637
- case "com.amazonaws.inspector2#InternalServerException":
2638
- throw await de_InternalServerExceptionRes(parsedOutput, context);
2639
- case "ThrottlingException":
2640
- case "com.amazonaws.inspector2#ThrottlingException":
2641
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
2642
- case "ValidationException":
2643
- case "com.amazonaws.inspector2#ValidationException":
2644
- throw await de_ValidationExceptionRes(parsedOutput, context);
2645
- default:
2646
- const parsedBody = parsedOutput.body;
2647
- return throwDefaultError({
2648
- output,
2649
- parsedBody,
2650
- errorCode,
2651
- });
2652
- }
2653
- };
2654
1461
  export const de_ListMembersCommand = async (output, context) => {
2655
1462
  if (output.statusCode !== 200 && output.statusCode >= 300) {
2656
- return de_ListMembersCommandError(output, context);
1463
+ return de_CommandError(output, context);
2657
1464
  }
2658
1465
  const contents = map({
2659
1466
  $metadata: deserializeMetadata(output),
@@ -2666,37 +1473,9 @@ export const de_ListMembersCommand = async (output, context) => {
2666
1473
  Object.assign(contents, doc);
2667
1474
  return contents;
2668
1475
  };
2669
- const de_ListMembersCommandError = async (output, context) => {
2670
- const parsedOutput = {
2671
- ...output,
2672
- body: await parseErrorBody(output.body, context),
2673
- };
2674
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2675
- switch (errorCode) {
2676
- case "AccessDeniedException":
2677
- case "com.amazonaws.inspector2#AccessDeniedException":
2678
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
2679
- case "InternalServerException":
2680
- case "com.amazonaws.inspector2#InternalServerException":
2681
- throw await de_InternalServerExceptionRes(parsedOutput, context);
2682
- case "ThrottlingException":
2683
- case "com.amazonaws.inspector2#ThrottlingException":
2684
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
2685
- case "ValidationException":
2686
- case "com.amazonaws.inspector2#ValidationException":
2687
- throw await de_ValidationExceptionRes(parsedOutput, context);
2688
- default:
2689
- const parsedBody = parsedOutput.body;
2690
- return throwDefaultError({
2691
- output,
2692
- parsedBody,
2693
- errorCode,
2694
- });
2695
- }
2696
- };
2697
1476
  export const de_ListTagsForResourceCommand = async (output, context) => {
2698
1477
  if (output.statusCode !== 200 && output.statusCode >= 300) {
2699
- return de_ListTagsForResourceCommandError(output, context);
1478
+ return de_CommandError(output, context);
2700
1479
  }
2701
1480
  const contents = map({
2702
1481
  $metadata: deserializeMetadata(output),
@@ -2708,37 +1487,9 @@ export const de_ListTagsForResourceCommand = async (output, context) => {
2708
1487
  Object.assign(contents, doc);
2709
1488
  return contents;
2710
1489
  };
2711
- const de_ListTagsForResourceCommandError = async (output, context) => {
2712
- const parsedOutput = {
2713
- ...output,
2714
- body: await parseErrorBody(output.body, context),
2715
- };
2716
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2717
- switch (errorCode) {
2718
- case "InternalServerException":
2719
- case "com.amazonaws.inspector2#InternalServerException":
2720
- throw await de_InternalServerExceptionRes(parsedOutput, context);
2721
- case "ResourceNotFoundException":
2722
- case "com.amazonaws.inspector2#ResourceNotFoundException":
2723
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
2724
- case "ThrottlingException":
2725
- case "com.amazonaws.inspector2#ThrottlingException":
2726
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
2727
- case "ValidationException":
2728
- case "com.amazonaws.inspector2#ValidationException":
2729
- throw await de_ValidationExceptionRes(parsedOutput, context);
2730
- default:
2731
- const parsedBody = parsedOutput.body;
2732
- return throwDefaultError({
2733
- output,
2734
- parsedBody,
2735
- errorCode,
2736
- });
2737
- }
2738
- };
2739
1490
  export const de_ListUsageTotalsCommand = async (output, context) => {
2740
1491
  if (output.statusCode !== 200 && output.statusCode >= 300) {
2741
- return de_ListUsageTotalsCommandError(output, context);
1492
+ return de_CommandError(output, context);
2742
1493
  }
2743
1494
  const contents = map({
2744
1495
  $metadata: deserializeMetadata(output),
@@ -2751,37 +1502,9 @@ export const de_ListUsageTotalsCommand = async (output, context) => {
2751
1502
  Object.assign(contents, doc);
2752
1503
  return contents;
2753
1504
  };
2754
- const de_ListUsageTotalsCommandError = async (output, context) => {
2755
- const parsedOutput = {
2756
- ...output,
2757
- body: await parseErrorBody(output.body, context),
2758
- };
2759
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2760
- switch (errorCode) {
2761
- case "AccessDeniedException":
2762
- case "com.amazonaws.inspector2#AccessDeniedException":
2763
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
2764
- case "InternalServerException":
2765
- case "com.amazonaws.inspector2#InternalServerException":
2766
- throw await de_InternalServerExceptionRes(parsedOutput, context);
2767
- case "ThrottlingException":
2768
- case "com.amazonaws.inspector2#ThrottlingException":
2769
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
2770
- case "ValidationException":
2771
- case "com.amazonaws.inspector2#ValidationException":
2772
- throw await de_ValidationExceptionRes(parsedOutput, context);
2773
- default:
2774
- const parsedBody = parsedOutput.body;
2775
- return throwDefaultError({
2776
- output,
2777
- parsedBody,
2778
- errorCode,
2779
- });
2780
- }
2781
- };
2782
1505
  export const de_ResetEncryptionKeyCommand = async (output, context) => {
2783
1506
  if (output.statusCode !== 200 && output.statusCode >= 300) {
2784
- return de_ResetEncryptionKeyCommandError(output, context);
1507
+ return de_CommandError(output, context);
2785
1508
  }
2786
1509
  const contents = map({
2787
1510
  $metadata: deserializeMetadata(output),
@@ -2789,40 +1512,9 @@ export const de_ResetEncryptionKeyCommand = async (output, context) => {
2789
1512
  await collectBody(output.body, context);
2790
1513
  return contents;
2791
1514
  };
2792
- const de_ResetEncryptionKeyCommandError = async (output, context) => {
2793
- const parsedOutput = {
2794
- ...output,
2795
- body: await parseErrorBody(output.body, context),
2796
- };
2797
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2798
- switch (errorCode) {
2799
- case "AccessDeniedException":
2800
- case "com.amazonaws.inspector2#AccessDeniedException":
2801
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
2802
- case "InternalServerException":
2803
- case "com.amazonaws.inspector2#InternalServerException":
2804
- throw await de_InternalServerExceptionRes(parsedOutput, context);
2805
- case "ResourceNotFoundException":
2806
- case "com.amazonaws.inspector2#ResourceNotFoundException":
2807
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
2808
- case "ThrottlingException":
2809
- case "com.amazonaws.inspector2#ThrottlingException":
2810
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
2811
- case "ValidationException":
2812
- case "com.amazonaws.inspector2#ValidationException":
2813
- throw await de_ValidationExceptionRes(parsedOutput, context);
2814
- default:
2815
- const parsedBody = parsedOutput.body;
2816
- return throwDefaultError({
2817
- output,
2818
- parsedBody,
2819
- errorCode,
2820
- });
2821
- }
2822
- };
2823
1515
  export const de_SearchVulnerabilitiesCommand = async (output, context) => {
2824
1516
  if (output.statusCode !== 200 && output.statusCode >= 300) {
2825
- return de_SearchVulnerabilitiesCommandError(output, context);
1517
+ return de_CommandError(output, context);
2826
1518
  }
2827
1519
  const contents = map({
2828
1520
  $metadata: deserializeMetadata(output),
@@ -2835,37 +1527,9 @@ export const de_SearchVulnerabilitiesCommand = async (output, context) => {
2835
1527
  Object.assign(contents, doc);
2836
1528
  return contents;
2837
1529
  };
2838
- const de_SearchVulnerabilitiesCommandError = async (output, context) => {
2839
- const parsedOutput = {
2840
- ...output,
2841
- body: await parseErrorBody(output.body, context),
2842
- };
2843
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2844
- switch (errorCode) {
2845
- case "AccessDeniedException":
2846
- case "com.amazonaws.inspector2#AccessDeniedException":
2847
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
2848
- case "InternalServerException":
2849
- case "com.amazonaws.inspector2#InternalServerException":
2850
- throw await de_InternalServerExceptionRes(parsedOutput, context);
2851
- case "ThrottlingException":
2852
- case "com.amazonaws.inspector2#ThrottlingException":
2853
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
2854
- case "ValidationException":
2855
- case "com.amazonaws.inspector2#ValidationException":
2856
- throw await de_ValidationExceptionRes(parsedOutput, context);
2857
- default:
2858
- const parsedBody = parsedOutput.body;
2859
- return throwDefaultError({
2860
- output,
2861
- parsedBody,
2862
- errorCode,
2863
- });
2864
- }
2865
- };
2866
1530
  export const de_SendCisSessionHealthCommand = async (output, context) => {
2867
1531
  if (output.statusCode !== 200 && output.statusCode >= 300) {
2868
- return de_SendCisSessionHealthCommandError(output, context);
1532
+ return de_CommandError(output, context);
2869
1533
  }
2870
1534
  const contents = map({
2871
1535
  $metadata: deserializeMetadata(output),
@@ -2873,163 +1537,19 @@ export const de_SendCisSessionHealthCommand = async (output, context) => {
2873
1537
  await collectBody(output.body, context);
2874
1538
  return contents;
2875
1539
  };
2876
- const de_SendCisSessionHealthCommandError = async (output, context) => {
2877
- const parsedOutput = {
2878
- ...output,
2879
- body: await parseErrorBody(output.body, context),
2880
- };
2881
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2882
- switch (errorCode) {
2883
- case "AccessDeniedException":
2884
- case "com.amazonaws.inspector2#AccessDeniedException":
2885
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
2886
- case "ConflictException":
2887
- case "com.amazonaws.inspector2#ConflictException":
2888
- throw await de_ConflictExceptionRes(parsedOutput, context);
2889
- case "InternalServerException":
2890
- case "com.amazonaws.inspector2#InternalServerException":
2891
- throw await de_InternalServerExceptionRes(parsedOutput, context);
2892
- case "ThrottlingException":
2893
- case "com.amazonaws.inspector2#ThrottlingException":
2894
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
2895
- case "ValidationException":
2896
- case "com.amazonaws.inspector2#ValidationException":
2897
- throw await de_ValidationExceptionRes(parsedOutput, context);
2898
- default:
2899
- const parsedBody = parsedOutput.body;
2900
- return throwDefaultError({
2901
- output,
2902
- parsedBody,
2903
- errorCode,
2904
- });
2905
- }
2906
- };
2907
1540
  export const de_SendCisSessionTelemetryCommand = async (output, context) => {
2908
1541
  if (output.statusCode !== 200 && output.statusCode >= 300) {
2909
- return de_SendCisSessionTelemetryCommandError(output, context);
1542
+ return de_CommandError(output, context);
2910
1543
  }
2911
1544
  const contents = map({
2912
1545
  $metadata: deserializeMetadata(output),
2913
1546
  });
2914
- await collectBody(output.body, context);
2915
- return contents;
2916
- };
2917
- const de_SendCisSessionTelemetryCommandError = async (output, context) => {
2918
- const parsedOutput = {
2919
- ...output,
2920
- body: await parseErrorBody(output.body, context),
2921
- };
2922
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2923
- switch (errorCode) {
2924
- case "AccessDeniedException":
2925
- case "com.amazonaws.inspector2#AccessDeniedException":
2926
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
2927
- case "ConflictException":
2928
- case "com.amazonaws.inspector2#ConflictException":
2929
- throw await de_ConflictExceptionRes(parsedOutput, context);
2930
- case "InternalServerException":
2931
- case "com.amazonaws.inspector2#InternalServerException":
2932
- throw await de_InternalServerExceptionRes(parsedOutput, context);
2933
- case "ThrottlingException":
2934
- case "com.amazonaws.inspector2#ThrottlingException":
2935
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
2936
- case "ValidationException":
2937
- case "com.amazonaws.inspector2#ValidationException":
2938
- throw await de_ValidationExceptionRes(parsedOutput, context);
2939
- default:
2940
- const parsedBody = parsedOutput.body;
2941
- return throwDefaultError({
2942
- output,
2943
- parsedBody,
2944
- errorCode,
2945
- });
2946
- }
2947
- };
2948
- export const de_StartCisSessionCommand = async (output, context) => {
2949
- if (output.statusCode !== 200 && output.statusCode >= 300) {
2950
- return de_StartCisSessionCommandError(output, context);
2951
- }
2952
- const contents = map({
2953
- $metadata: deserializeMetadata(output),
2954
- });
2955
- await collectBody(output.body, context);
2956
- return contents;
2957
- };
2958
- const de_StartCisSessionCommandError = async (output, context) => {
2959
- const parsedOutput = {
2960
- ...output,
2961
- body: await parseErrorBody(output.body, context),
2962
- };
2963
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2964
- switch (errorCode) {
2965
- case "AccessDeniedException":
2966
- case "com.amazonaws.inspector2#AccessDeniedException":
2967
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
2968
- case "ConflictException":
2969
- case "com.amazonaws.inspector2#ConflictException":
2970
- throw await de_ConflictExceptionRes(parsedOutput, context);
2971
- case "InternalServerException":
2972
- case "com.amazonaws.inspector2#InternalServerException":
2973
- throw await de_InternalServerExceptionRes(parsedOutput, context);
2974
- case "ThrottlingException":
2975
- case "com.amazonaws.inspector2#ThrottlingException":
2976
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
2977
- case "ValidationException":
2978
- case "com.amazonaws.inspector2#ValidationException":
2979
- throw await de_ValidationExceptionRes(parsedOutput, context);
2980
- default:
2981
- const parsedBody = parsedOutput.body;
2982
- return throwDefaultError({
2983
- output,
2984
- parsedBody,
2985
- errorCode,
2986
- });
2987
- }
2988
- };
2989
- export const de_StopCisSessionCommand = async (output, context) => {
2990
- if (output.statusCode !== 200 && output.statusCode >= 300) {
2991
- return de_StopCisSessionCommandError(output, context);
2992
- }
2993
- const contents = map({
2994
- $metadata: deserializeMetadata(output),
2995
- });
2996
- await collectBody(output.body, context);
2997
- return contents;
2998
- };
2999
- const de_StopCisSessionCommandError = async (output, context) => {
3000
- const parsedOutput = {
3001
- ...output,
3002
- body: await parseErrorBody(output.body, context),
3003
- };
3004
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
3005
- switch (errorCode) {
3006
- case "AccessDeniedException":
3007
- case "com.amazonaws.inspector2#AccessDeniedException":
3008
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
3009
- case "ConflictException":
3010
- case "com.amazonaws.inspector2#ConflictException":
3011
- throw await de_ConflictExceptionRes(parsedOutput, context);
3012
- case "InternalServerException":
3013
- case "com.amazonaws.inspector2#InternalServerException":
3014
- throw await de_InternalServerExceptionRes(parsedOutput, context);
3015
- case "ThrottlingException":
3016
- case "com.amazonaws.inspector2#ThrottlingException":
3017
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
3018
- case "ValidationException":
3019
- case "com.amazonaws.inspector2#ValidationException":
3020
- throw await de_ValidationExceptionRes(parsedOutput, context);
3021
- default:
3022
- const parsedBody = parsedOutput.body;
3023
- return throwDefaultError({
3024
- output,
3025
- parsedBody,
3026
- errorCode,
3027
- });
3028
- }
1547
+ await collectBody(output.body, context);
1548
+ return contents;
3029
1549
  };
3030
- export const de_TagResourceCommand = async (output, context) => {
1550
+ export const de_StartCisSessionCommand = async (output, context) => {
3031
1551
  if (output.statusCode !== 200 && output.statusCode >= 300) {
3032
- return de_TagResourceCommandError(output, context);
1552
+ return de_CommandError(output, context);
3033
1553
  }
3034
1554
  const contents = map({
3035
1555
  $metadata: deserializeMetadata(output),
@@ -3037,40 +1557,19 @@ export const de_TagResourceCommand = async (output, context) => {
3037
1557
  await collectBody(output.body, context);
3038
1558
  return contents;
3039
1559
  };
3040
- const de_TagResourceCommandError = async (output, context) => {
3041
- const parsedOutput = {
3042
- ...output,
3043
- body: await parseErrorBody(output.body, context),
3044
- };
3045
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
3046
- switch (errorCode) {
3047
- case "BadRequestException":
3048
- case "com.amazonaws.inspector2#BadRequestException":
3049
- throw await de_BadRequestExceptionRes(parsedOutput, context);
3050
- case "InternalServerException":
3051
- case "com.amazonaws.inspector2#InternalServerException":
3052
- throw await de_InternalServerExceptionRes(parsedOutput, context);
3053
- case "ResourceNotFoundException":
3054
- case "com.amazonaws.inspector2#ResourceNotFoundException":
3055
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
3056
- case "ThrottlingException":
3057
- case "com.amazonaws.inspector2#ThrottlingException":
3058
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
3059
- case "ValidationException":
3060
- case "com.amazonaws.inspector2#ValidationException":
3061
- throw await de_ValidationExceptionRes(parsedOutput, context);
3062
- default:
3063
- const parsedBody = parsedOutput.body;
3064
- return throwDefaultError({
3065
- output,
3066
- parsedBody,
3067
- errorCode,
3068
- });
1560
+ export const de_StopCisSessionCommand = async (output, context) => {
1561
+ if (output.statusCode !== 200 && output.statusCode >= 300) {
1562
+ return de_CommandError(output, context);
3069
1563
  }
1564
+ const contents = map({
1565
+ $metadata: deserializeMetadata(output),
1566
+ });
1567
+ await collectBody(output.body, context);
1568
+ return contents;
3070
1569
  };
3071
- export const de_UntagResourceCommand = async (output, context) => {
1570
+ export const de_TagResourceCommand = async (output, context) => {
3072
1571
  if (output.statusCode !== 200 && output.statusCode >= 300) {
3073
- return de_UntagResourceCommandError(output, context);
1572
+ return de_CommandError(output, context);
3074
1573
  }
3075
1574
  const contents = map({
3076
1575
  $metadata: deserializeMetadata(output),
@@ -3078,37 +1577,19 @@ export const de_UntagResourceCommand = async (output, context) => {
3078
1577
  await collectBody(output.body, context);
3079
1578
  return contents;
3080
1579
  };
3081
- const de_UntagResourceCommandError = async (output, context) => {
3082
- const parsedOutput = {
3083
- ...output,
3084
- body: await parseErrorBody(output.body, context),
3085
- };
3086
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
3087
- switch (errorCode) {
3088
- case "InternalServerException":
3089
- case "com.amazonaws.inspector2#InternalServerException":
3090
- throw await de_InternalServerExceptionRes(parsedOutput, context);
3091
- case "ResourceNotFoundException":
3092
- case "com.amazonaws.inspector2#ResourceNotFoundException":
3093
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
3094
- case "ThrottlingException":
3095
- case "com.amazonaws.inspector2#ThrottlingException":
3096
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
3097
- case "ValidationException":
3098
- case "com.amazonaws.inspector2#ValidationException":
3099
- throw await de_ValidationExceptionRes(parsedOutput, context);
3100
- default:
3101
- const parsedBody = parsedOutput.body;
3102
- return throwDefaultError({
3103
- output,
3104
- parsedBody,
3105
- errorCode,
3106
- });
1580
+ export const de_UntagResourceCommand = async (output, context) => {
1581
+ if (output.statusCode !== 200 && output.statusCode >= 300) {
1582
+ return de_CommandError(output, context);
3107
1583
  }
1584
+ const contents = map({
1585
+ $metadata: deserializeMetadata(output),
1586
+ });
1587
+ await collectBody(output.body, context);
1588
+ return contents;
3108
1589
  };
3109
1590
  export const de_UpdateCisScanConfigurationCommand = async (output, context) => {
3110
1591
  if (output.statusCode !== 200 && output.statusCode >= 300) {
3111
- return de_UpdateCisScanConfigurationCommandError(output, context);
1592
+ return de_CommandError(output, context);
3112
1593
  }
3113
1594
  const contents = map({
3114
1595
  $metadata: deserializeMetadata(output),
@@ -3120,40 +1601,9 @@ export const de_UpdateCisScanConfigurationCommand = async (output, context) => {
3120
1601
  Object.assign(contents, doc);
3121
1602
  return contents;
3122
1603
  };
3123
- const de_UpdateCisScanConfigurationCommandError = async (output, context) => {
3124
- const parsedOutput = {
3125
- ...output,
3126
- body: await parseErrorBody(output.body, context),
3127
- };
3128
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
3129
- switch (errorCode) {
3130
- case "AccessDeniedException":
3131
- case "com.amazonaws.inspector2#AccessDeniedException":
3132
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
3133
- case "InternalServerException":
3134
- case "com.amazonaws.inspector2#InternalServerException":
3135
- throw await de_InternalServerExceptionRes(parsedOutput, context);
3136
- case "ResourceNotFoundException":
3137
- case "com.amazonaws.inspector2#ResourceNotFoundException":
3138
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
3139
- case "ThrottlingException":
3140
- case "com.amazonaws.inspector2#ThrottlingException":
3141
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
3142
- case "ValidationException":
3143
- case "com.amazonaws.inspector2#ValidationException":
3144
- throw await de_ValidationExceptionRes(parsedOutput, context);
3145
- default:
3146
- const parsedBody = parsedOutput.body;
3147
- return throwDefaultError({
3148
- output,
3149
- parsedBody,
3150
- errorCode,
3151
- });
3152
- }
3153
- };
3154
1604
  export const de_UpdateConfigurationCommand = async (output, context) => {
3155
1605
  if (output.statusCode !== 200 && output.statusCode >= 300) {
3156
- return de_UpdateConfigurationCommandError(output, context);
1606
+ return de_CommandError(output, context);
3157
1607
  }
3158
1608
  const contents = map({
3159
1609
  $metadata: deserializeMetadata(output),
@@ -3161,37 +1611,9 @@ export const de_UpdateConfigurationCommand = async (output, context) => {
3161
1611
  await collectBody(output.body, context);
3162
1612
  return contents;
3163
1613
  };
3164
- const de_UpdateConfigurationCommandError = async (output, context) => {
3165
- const parsedOutput = {
3166
- ...output,
3167
- body: await parseErrorBody(output.body, context),
3168
- };
3169
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
3170
- switch (errorCode) {
3171
- case "AccessDeniedException":
3172
- case "com.amazonaws.inspector2#AccessDeniedException":
3173
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
3174
- case "InternalServerException":
3175
- case "com.amazonaws.inspector2#InternalServerException":
3176
- throw await de_InternalServerExceptionRes(parsedOutput, context);
3177
- case "ThrottlingException":
3178
- case "com.amazonaws.inspector2#ThrottlingException":
3179
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
3180
- case "ValidationException":
3181
- case "com.amazonaws.inspector2#ValidationException":
3182
- throw await de_ValidationExceptionRes(parsedOutput, context);
3183
- default:
3184
- const parsedBody = parsedOutput.body;
3185
- return throwDefaultError({
3186
- output,
3187
- parsedBody,
3188
- errorCode,
3189
- });
3190
- }
3191
- };
3192
1614
  export const de_UpdateEc2DeepInspectionConfigurationCommand = async (output, context) => {
3193
1615
  if (output.statusCode !== 200 && output.statusCode >= 300) {
3194
- return de_UpdateEc2DeepInspectionConfigurationCommandError(output, context);
1616
+ return de_CommandError(output, context);
3195
1617
  }
3196
1618
  const contents = map({
3197
1619
  $metadata: deserializeMetadata(output),
@@ -3206,37 +1628,9 @@ export const de_UpdateEc2DeepInspectionConfigurationCommand = async (output, con
3206
1628
  Object.assign(contents, doc);
3207
1629
  return contents;
3208
1630
  };
3209
- const de_UpdateEc2DeepInspectionConfigurationCommandError = async (output, context) => {
3210
- const parsedOutput = {
3211
- ...output,
3212
- body: await parseErrorBody(output.body, context),
3213
- };
3214
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
3215
- switch (errorCode) {
3216
- case "AccessDeniedException":
3217
- case "com.amazonaws.inspector2#AccessDeniedException":
3218
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
3219
- case "InternalServerException":
3220
- case "com.amazonaws.inspector2#InternalServerException":
3221
- throw await de_InternalServerExceptionRes(parsedOutput, context);
3222
- case "ThrottlingException":
3223
- case "com.amazonaws.inspector2#ThrottlingException":
3224
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
3225
- case "ValidationException":
3226
- case "com.amazonaws.inspector2#ValidationException":
3227
- throw await de_ValidationExceptionRes(parsedOutput, context);
3228
- default:
3229
- const parsedBody = parsedOutput.body;
3230
- return throwDefaultError({
3231
- output,
3232
- parsedBody,
3233
- errorCode,
3234
- });
3235
- }
3236
- };
3237
1631
  export const de_UpdateEncryptionKeyCommand = async (output, context) => {
3238
1632
  if (output.statusCode !== 200 && output.statusCode >= 300) {
3239
- return de_UpdateEncryptionKeyCommandError(output, context);
1633
+ return de_CommandError(output, context);
3240
1634
  }
3241
1635
  const contents = map({
3242
1636
  $metadata: deserializeMetadata(output),
@@ -3244,40 +1638,9 @@ export const de_UpdateEncryptionKeyCommand = async (output, context) => {
3244
1638
  await collectBody(output.body, context);
3245
1639
  return contents;
3246
1640
  };
3247
- const de_UpdateEncryptionKeyCommandError = async (output, context) => {
3248
- const parsedOutput = {
3249
- ...output,
3250
- body: await parseErrorBody(output.body, context),
3251
- };
3252
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
3253
- switch (errorCode) {
3254
- case "AccessDeniedException":
3255
- case "com.amazonaws.inspector2#AccessDeniedException":
3256
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
3257
- case "InternalServerException":
3258
- case "com.amazonaws.inspector2#InternalServerException":
3259
- throw await de_InternalServerExceptionRes(parsedOutput, context);
3260
- case "ResourceNotFoundException":
3261
- case "com.amazonaws.inspector2#ResourceNotFoundException":
3262
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
3263
- case "ThrottlingException":
3264
- case "com.amazonaws.inspector2#ThrottlingException":
3265
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
3266
- case "ValidationException":
3267
- case "com.amazonaws.inspector2#ValidationException":
3268
- throw await de_ValidationExceptionRes(parsedOutput, context);
3269
- default:
3270
- const parsedBody = parsedOutput.body;
3271
- return throwDefaultError({
3272
- output,
3273
- parsedBody,
3274
- errorCode,
3275
- });
3276
- }
3277
- };
3278
1641
  export const de_UpdateFilterCommand = async (output, context) => {
3279
1642
  if (output.statusCode !== 200 && output.statusCode >= 300) {
3280
- return de_UpdateFilterCommandError(output, context);
1643
+ return de_CommandError(output, context);
3281
1644
  }
3282
1645
  const contents = map({
3283
1646
  $metadata: deserializeMetadata(output),
@@ -3289,40 +1652,9 @@ export const de_UpdateFilterCommand = async (output, context) => {
3289
1652
  Object.assign(contents, doc);
3290
1653
  return contents;
3291
1654
  };
3292
- const de_UpdateFilterCommandError = async (output, context) => {
3293
- const parsedOutput = {
3294
- ...output,
3295
- body: await parseErrorBody(output.body, context),
3296
- };
3297
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
3298
- switch (errorCode) {
3299
- case "AccessDeniedException":
3300
- case "com.amazonaws.inspector2#AccessDeniedException":
3301
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
3302
- case "InternalServerException":
3303
- case "com.amazonaws.inspector2#InternalServerException":
3304
- throw await de_InternalServerExceptionRes(parsedOutput, context);
3305
- case "ResourceNotFoundException":
3306
- case "com.amazonaws.inspector2#ResourceNotFoundException":
3307
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
3308
- case "ThrottlingException":
3309
- case "com.amazonaws.inspector2#ThrottlingException":
3310
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
3311
- case "ValidationException":
3312
- case "com.amazonaws.inspector2#ValidationException":
3313
- throw await de_ValidationExceptionRes(parsedOutput, context);
3314
- default:
3315
- const parsedBody = parsedOutput.body;
3316
- return throwDefaultError({
3317
- output,
3318
- parsedBody,
3319
- errorCode,
3320
- });
3321
- }
3322
- };
3323
1655
  export const de_UpdateOrganizationConfigurationCommand = async (output, context) => {
3324
1656
  if (output.statusCode !== 200 && output.statusCode >= 300) {
3325
- return de_UpdateOrganizationConfigurationCommandError(output, context);
1657
+ return de_CommandError(output, context);
3326
1658
  }
3327
1659
  const contents = map({
3328
1660
  $metadata: deserializeMetadata(output),
@@ -3334,37 +1666,9 @@ export const de_UpdateOrganizationConfigurationCommand = async (output, context)
3334
1666
  Object.assign(contents, doc);
3335
1667
  return contents;
3336
1668
  };
3337
- const de_UpdateOrganizationConfigurationCommandError = async (output, context) => {
3338
- const parsedOutput = {
3339
- ...output,
3340
- body: await parseErrorBody(output.body, context),
3341
- };
3342
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
3343
- switch (errorCode) {
3344
- case "AccessDeniedException":
3345
- case "com.amazonaws.inspector2#AccessDeniedException":
3346
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
3347
- case "InternalServerException":
3348
- case "com.amazonaws.inspector2#InternalServerException":
3349
- throw await de_InternalServerExceptionRes(parsedOutput, context);
3350
- case "ThrottlingException":
3351
- case "com.amazonaws.inspector2#ThrottlingException":
3352
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
3353
- case "ValidationException":
3354
- case "com.amazonaws.inspector2#ValidationException":
3355
- throw await de_ValidationExceptionRes(parsedOutput, context);
3356
- default:
3357
- const parsedBody = parsedOutput.body;
3358
- return throwDefaultError({
3359
- output,
3360
- parsedBody,
3361
- errorCode,
3362
- });
3363
- }
3364
- };
3365
1669
  export const de_UpdateOrgEc2DeepInspectionConfigurationCommand = async (output, context) => {
3366
1670
  if (output.statusCode !== 200 && output.statusCode >= 300) {
3367
- return de_UpdateOrgEc2DeepInspectionConfigurationCommandError(output, context);
1671
+ return de_CommandError(output, context);
3368
1672
  }
3369
1673
  const contents = map({
3370
1674
  $metadata: deserializeMetadata(output),
@@ -3372,7 +1676,7 @@ export const de_UpdateOrgEc2DeepInspectionConfigurationCommand = async (output,
3372
1676
  await collectBody(output.body, context);
3373
1677
  return contents;
3374
1678
  };
3375
- const de_UpdateOrgEc2DeepInspectionConfigurationCommandError = async (output, context) => {
1679
+ const de_CommandError = async (output, context) => {
3376
1680
  const parsedOutput = {
3377
1681
  ...output,
3378
1682
  body: await parseErrorBody(output.body, context),
@@ -3391,6 +1695,18 @@ const de_UpdateOrgEc2DeepInspectionConfigurationCommandError = async (output, co
3391
1695
  case "ValidationException":
3392
1696
  case "com.amazonaws.inspector2#ValidationException":
3393
1697
  throw await de_ValidationExceptionRes(parsedOutput, context);
1698
+ case "ResourceNotFoundException":
1699
+ case "com.amazonaws.inspector2#ResourceNotFoundException":
1700
+ throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
1701
+ case "BadRequestException":
1702
+ case "com.amazonaws.inspector2#BadRequestException":
1703
+ throw await de_BadRequestExceptionRes(parsedOutput, context);
1704
+ case "ServiceQuotaExceededException":
1705
+ case "com.amazonaws.inspector2#ServiceQuotaExceededException":
1706
+ throw await de_ServiceQuotaExceededExceptionRes(parsedOutput, context);
1707
+ case "ConflictException":
1708
+ case "com.amazonaws.inspector2#ConflictException":
1709
+ throw await de_ConflictExceptionRes(parsedOutput, context);
3394
1710
  default:
3395
1711
  const parsedBody = parsedOutput.body;
3396
1712
  return throwDefaultError({