@aws-sdk/client-guardduty 3.504.0 → 3.507.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -942,7 +942,7 @@ export const se_UpdateThreatIntelSetCommand = async (input, context) => {
942
942
  };
943
943
  export const de_AcceptAdministratorInvitationCommand = async (output, context) => {
944
944
  if (output.statusCode !== 200 && output.statusCode >= 300) {
945
- return de_AcceptAdministratorInvitationCommandError(output, context);
945
+ return de_CommandError(output, context);
946
946
  }
947
947
  const contents = map({
948
948
  $metadata: deserializeMetadata(output),
@@ -950,31 +950,9 @@ export const de_AcceptAdministratorInvitationCommand = async (output, context) =
950
950
  await collectBody(output.body, context);
951
951
  return contents;
952
952
  };
953
- const de_AcceptAdministratorInvitationCommandError = async (output, context) => {
954
- const parsedOutput = {
955
- ...output,
956
- body: await parseErrorBody(output.body, context),
957
- };
958
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
959
- switch (errorCode) {
960
- case "BadRequestException":
961
- case "com.amazonaws.guardduty#BadRequestException":
962
- throw await de_BadRequestExceptionRes(parsedOutput, context);
963
- case "InternalServerErrorException":
964
- case "com.amazonaws.guardduty#InternalServerErrorException":
965
- throw await de_InternalServerErrorExceptionRes(parsedOutput, context);
966
- default:
967
- const parsedBody = parsedOutput.body;
968
- return throwDefaultError({
969
- output,
970
- parsedBody,
971
- errorCode,
972
- });
973
- }
974
- };
975
953
  export const de_AcceptInvitationCommand = async (output, context) => {
976
954
  if (output.statusCode !== 200 && output.statusCode >= 300) {
977
- return de_AcceptInvitationCommandError(output, context);
955
+ return de_CommandError(output, context);
978
956
  }
979
957
  const contents = map({
980
958
  $metadata: deserializeMetadata(output),
@@ -982,31 +960,9 @@ export const de_AcceptInvitationCommand = async (output, context) => {
982
960
  await collectBody(output.body, context);
983
961
  return contents;
984
962
  };
985
- const de_AcceptInvitationCommandError = async (output, context) => {
986
- const parsedOutput = {
987
- ...output,
988
- body: await parseErrorBody(output.body, context),
989
- };
990
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
991
- switch (errorCode) {
992
- case "BadRequestException":
993
- case "com.amazonaws.guardduty#BadRequestException":
994
- throw await de_BadRequestExceptionRes(parsedOutput, context);
995
- case "InternalServerErrorException":
996
- case "com.amazonaws.guardduty#InternalServerErrorException":
997
- throw await de_InternalServerErrorExceptionRes(parsedOutput, context);
998
- default:
999
- const parsedBody = parsedOutput.body;
1000
- return throwDefaultError({
1001
- output,
1002
- parsedBody,
1003
- errorCode,
1004
- });
1005
- }
1006
- };
1007
963
  export const de_ArchiveFindingsCommand = async (output, context) => {
1008
964
  if (output.statusCode !== 200 && output.statusCode >= 300) {
1009
- return de_ArchiveFindingsCommandError(output, context);
965
+ return de_CommandError(output, context);
1010
966
  }
1011
967
  const contents = map({
1012
968
  $metadata: deserializeMetadata(output),
@@ -1014,31 +970,9 @@ export const de_ArchiveFindingsCommand = async (output, context) => {
1014
970
  await collectBody(output.body, context);
1015
971
  return contents;
1016
972
  };
1017
- const de_ArchiveFindingsCommandError = async (output, context) => {
1018
- const parsedOutput = {
1019
- ...output,
1020
- body: await parseErrorBody(output.body, context),
1021
- };
1022
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1023
- switch (errorCode) {
1024
- case "BadRequestException":
1025
- case "com.amazonaws.guardduty#BadRequestException":
1026
- throw await de_BadRequestExceptionRes(parsedOutput, context);
1027
- case "InternalServerErrorException":
1028
- case "com.amazonaws.guardduty#InternalServerErrorException":
1029
- throw await de_InternalServerErrorExceptionRes(parsedOutput, context);
1030
- default:
1031
- const parsedBody = parsedOutput.body;
1032
- return throwDefaultError({
1033
- output,
1034
- parsedBody,
1035
- errorCode,
1036
- });
1037
- }
1038
- };
1039
973
  export const de_CreateDetectorCommand = async (output, context) => {
1040
974
  if (output.statusCode !== 200 && output.statusCode >= 300) {
1041
- return de_CreateDetectorCommandError(output, context);
975
+ return de_CommandError(output, context);
1042
976
  }
1043
977
  const contents = map({
1044
978
  $metadata: deserializeMetadata(output),
@@ -1051,31 +985,9 @@ export const de_CreateDetectorCommand = async (output, context) => {
1051
985
  Object.assign(contents, doc);
1052
986
  return contents;
1053
987
  };
1054
- const de_CreateDetectorCommandError = async (output, context) => {
1055
- const parsedOutput = {
1056
- ...output,
1057
- body: await parseErrorBody(output.body, context),
1058
- };
1059
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1060
- switch (errorCode) {
1061
- case "BadRequestException":
1062
- case "com.amazonaws.guardduty#BadRequestException":
1063
- throw await de_BadRequestExceptionRes(parsedOutput, context);
1064
- case "InternalServerErrorException":
1065
- case "com.amazonaws.guardduty#InternalServerErrorException":
1066
- throw await de_InternalServerErrorExceptionRes(parsedOutput, context);
1067
- default:
1068
- const parsedBody = parsedOutput.body;
1069
- return throwDefaultError({
1070
- output,
1071
- parsedBody,
1072
- errorCode,
1073
- });
1074
- }
1075
- };
1076
988
  export const de_CreateFilterCommand = async (output, context) => {
1077
989
  if (output.statusCode !== 200 && output.statusCode >= 300) {
1078
- return de_CreateFilterCommandError(output, context);
990
+ return de_CommandError(output, context);
1079
991
  }
1080
992
  const contents = map({
1081
993
  $metadata: deserializeMetadata(output),
@@ -1087,31 +999,9 @@ export const de_CreateFilterCommand = async (output, context) => {
1087
999
  Object.assign(contents, doc);
1088
1000
  return contents;
1089
1001
  };
1090
- const de_CreateFilterCommandError = async (output, context) => {
1091
- const parsedOutput = {
1092
- ...output,
1093
- body: await parseErrorBody(output.body, context),
1094
- };
1095
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1096
- switch (errorCode) {
1097
- case "BadRequestException":
1098
- case "com.amazonaws.guardduty#BadRequestException":
1099
- throw await de_BadRequestExceptionRes(parsedOutput, context);
1100
- case "InternalServerErrorException":
1101
- case "com.amazonaws.guardduty#InternalServerErrorException":
1102
- throw await de_InternalServerErrorExceptionRes(parsedOutput, context);
1103
- default:
1104
- const parsedBody = parsedOutput.body;
1105
- return throwDefaultError({
1106
- output,
1107
- parsedBody,
1108
- errorCode,
1109
- });
1110
- }
1111
- };
1112
1002
  export const de_CreateIPSetCommand = async (output, context) => {
1113
1003
  if (output.statusCode !== 200 && output.statusCode >= 300) {
1114
- return de_CreateIPSetCommandError(output, context);
1004
+ return de_CommandError(output, context);
1115
1005
  }
1116
1006
  const contents = map({
1117
1007
  $metadata: deserializeMetadata(output),
@@ -1123,31 +1013,9 @@ export const de_CreateIPSetCommand = async (output, context) => {
1123
1013
  Object.assign(contents, doc);
1124
1014
  return contents;
1125
1015
  };
1126
- const de_CreateIPSetCommandError = async (output, context) => {
1127
- const parsedOutput = {
1128
- ...output,
1129
- body: await parseErrorBody(output.body, context),
1130
- };
1131
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1132
- switch (errorCode) {
1133
- case "BadRequestException":
1134
- case "com.amazonaws.guardduty#BadRequestException":
1135
- throw await de_BadRequestExceptionRes(parsedOutput, context);
1136
- case "InternalServerErrorException":
1137
- case "com.amazonaws.guardduty#InternalServerErrorException":
1138
- throw await de_InternalServerErrorExceptionRes(parsedOutput, context);
1139
- default:
1140
- const parsedBody = parsedOutput.body;
1141
- return throwDefaultError({
1142
- output,
1143
- parsedBody,
1144
- errorCode,
1145
- });
1146
- }
1147
- };
1148
1016
  export const de_CreateMembersCommand = async (output, context) => {
1149
1017
  if (output.statusCode !== 200 && output.statusCode >= 300) {
1150
- return de_CreateMembersCommandError(output, context);
1018
+ return de_CommandError(output, context);
1151
1019
  }
1152
1020
  const contents = map({
1153
1021
  $metadata: deserializeMetadata(output),
@@ -1159,31 +1027,9 @@ export const de_CreateMembersCommand = async (output, context) => {
1159
1027
  Object.assign(contents, doc);
1160
1028
  return contents;
1161
1029
  };
1162
- const de_CreateMembersCommandError = async (output, context) => {
1163
- const parsedOutput = {
1164
- ...output,
1165
- body: await parseErrorBody(output.body, context),
1166
- };
1167
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1168
- switch (errorCode) {
1169
- case "BadRequestException":
1170
- case "com.amazonaws.guardduty#BadRequestException":
1171
- throw await de_BadRequestExceptionRes(parsedOutput, context);
1172
- case "InternalServerErrorException":
1173
- case "com.amazonaws.guardduty#InternalServerErrorException":
1174
- throw await de_InternalServerErrorExceptionRes(parsedOutput, context);
1175
- default:
1176
- const parsedBody = parsedOutput.body;
1177
- return throwDefaultError({
1178
- output,
1179
- parsedBody,
1180
- errorCode,
1181
- });
1182
- }
1183
- };
1184
1030
  export const de_CreatePublishingDestinationCommand = async (output, context) => {
1185
1031
  if (output.statusCode !== 200 && output.statusCode >= 300) {
1186
- return de_CreatePublishingDestinationCommandError(output, context);
1032
+ return de_CommandError(output, context);
1187
1033
  }
1188
1034
  const contents = map({
1189
1035
  $metadata: deserializeMetadata(output),
@@ -1195,31 +1041,9 @@ export const de_CreatePublishingDestinationCommand = async (output, context) =>
1195
1041
  Object.assign(contents, doc);
1196
1042
  return contents;
1197
1043
  };
1198
- const de_CreatePublishingDestinationCommandError = async (output, context) => {
1199
- const parsedOutput = {
1200
- ...output,
1201
- body: await parseErrorBody(output.body, context),
1202
- };
1203
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1204
- switch (errorCode) {
1205
- case "BadRequestException":
1206
- case "com.amazonaws.guardduty#BadRequestException":
1207
- throw await de_BadRequestExceptionRes(parsedOutput, context);
1208
- case "InternalServerErrorException":
1209
- case "com.amazonaws.guardduty#InternalServerErrorException":
1210
- throw await de_InternalServerErrorExceptionRes(parsedOutput, context);
1211
- default:
1212
- const parsedBody = parsedOutput.body;
1213
- return throwDefaultError({
1214
- output,
1215
- parsedBody,
1216
- errorCode,
1217
- });
1218
- }
1219
- };
1220
1044
  export const de_CreateSampleFindingsCommand = async (output, context) => {
1221
1045
  if (output.statusCode !== 200 && output.statusCode >= 300) {
1222
- return de_CreateSampleFindingsCommandError(output, context);
1046
+ return de_CommandError(output, context);
1223
1047
  }
1224
1048
  const contents = map({
1225
1049
  $metadata: deserializeMetadata(output),
@@ -1227,31 +1051,9 @@ export const de_CreateSampleFindingsCommand = async (output, context) => {
1227
1051
  await collectBody(output.body, context);
1228
1052
  return contents;
1229
1053
  };
1230
- const de_CreateSampleFindingsCommandError = async (output, context) => {
1231
- const parsedOutput = {
1232
- ...output,
1233
- body: await parseErrorBody(output.body, context),
1234
- };
1235
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1236
- switch (errorCode) {
1237
- case "BadRequestException":
1238
- case "com.amazonaws.guardduty#BadRequestException":
1239
- throw await de_BadRequestExceptionRes(parsedOutput, context);
1240
- case "InternalServerErrorException":
1241
- case "com.amazonaws.guardduty#InternalServerErrorException":
1242
- throw await de_InternalServerErrorExceptionRes(parsedOutput, context);
1243
- default:
1244
- const parsedBody = parsedOutput.body;
1245
- return throwDefaultError({
1246
- output,
1247
- parsedBody,
1248
- errorCode,
1249
- });
1250
- }
1251
- };
1252
1054
  export const de_CreateThreatIntelSetCommand = async (output, context) => {
1253
1055
  if (output.statusCode !== 200 && output.statusCode >= 300) {
1254
- return de_CreateThreatIntelSetCommandError(output, context);
1056
+ return de_CommandError(output, context);
1255
1057
  }
1256
1058
  const contents = map({
1257
1059
  $metadata: deserializeMetadata(output),
@@ -1263,31 +1065,9 @@ export const de_CreateThreatIntelSetCommand = async (output, context) => {
1263
1065
  Object.assign(contents, doc);
1264
1066
  return contents;
1265
1067
  };
1266
- const de_CreateThreatIntelSetCommandError = async (output, context) => {
1267
- const parsedOutput = {
1268
- ...output,
1269
- body: await parseErrorBody(output.body, context),
1270
- };
1271
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1272
- switch (errorCode) {
1273
- case "BadRequestException":
1274
- case "com.amazonaws.guardduty#BadRequestException":
1275
- throw await de_BadRequestExceptionRes(parsedOutput, context);
1276
- case "InternalServerErrorException":
1277
- case "com.amazonaws.guardduty#InternalServerErrorException":
1278
- throw await de_InternalServerErrorExceptionRes(parsedOutput, context);
1279
- default:
1280
- const parsedBody = parsedOutput.body;
1281
- return throwDefaultError({
1282
- output,
1283
- parsedBody,
1284
- errorCode,
1285
- });
1286
- }
1287
- };
1288
1068
  export const de_DeclineInvitationsCommand = async (output, context) => {
1289
1069
  if (output.statusCode !== 200 && output.statusCode >= 300) {
1290
- return de_DeclineInvitationsCommandError(output, context);
1070
+ return de_CommandError(output, context);
1291
1071
  }
1292
1072
  const contents = map({
1293
1073
  $metadata: deserializeMetadata(output),
@@ -1299,31 +1079,9 @@ export const de_DeclineInvitationsCommand = async (output, context) => {
1299
1079
  Object.assign(contents, doc);
1300
1080
  return contents;
1301
1081
  };
1302
- const de_DeclineInvitationsCommandError = async (output, context) => {
1303
- const parsedOutput = {
1304
- ...output,
1305
- body: await parseErrorBody(output.body, context),
1306
- };
1307
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1308
- switch (errorCode) {
1309
- case "BadRequestException":
1310
- case "com.amazonaws.guardduty#BadRequestException":
1311
- throw await de_BadRequestExceptionRes(parsedOutput, context);
1312
- case "InternalServerErrorException":
1313
- case "com.amazonaws.guardduty#InternalServerErrorException":
1314
- throw await de_InternalServerErrorExceptionRes(parsedOutput, context);
1315
- default:
1316
- const parsedBody = parsedOutput.body;
1317
- return throwDefaultError({
1318
- output,
1319
- parsedBody,
1320
- errorCode,
1321
- });
1322
- }
1323
- };
1324
1082
  export const de_DeleteDetectorCommand = async (output, context) => {
1325
1083
  if (output.statusCode !== 200 && output.statusCode >= 300) {
1326
- return de_DeleteDetectorCommandError(output, context);
1084
+ return de_CommandError(output, context);
1327
1085
  }
1328
1086
  const contents = map({
1329
1087
  $metadata: deserializeMetadata(output),
@@ -1331,31 +1089,9 @@ export const de_DeleteDetectorCommand = async (output, context) => {
1331
1089
  await collectBody(output.body, context);
1332
1090
  return contents;
1333
1091
  };
1334
- const de_DeleteDetectorCommandError = async (output, context) => {
1335
- const parsedOutput = {
1336
- ...output,
1337
- body: await parseErrorBody(output.body, context),
1338
- };
1339
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1340
- switch (errorCode) {
1341
- case "BadRequestException":
1342
- case "com.amazonaws.guardduty#BadRequestException":
1343
- throw await de_BadRequestExceptionRes(parsedOutput, context);
1344
- case "InternalServerErrorException":
1345
- case "com.amazonaws.guardduty#InternalServerErrorException":
1346
- throw await de_InternalServerErrorExceptionRes(parsedOutput, context);
1347
- default:
1348
- const parsedBody = parsedOutput.body;
1349
- return throwDefaultError({
1350
- output,
1351
- parsedBody,
1352
- errorCode,
1353
- });
1354
- }
1355
- };
1356
1092
  export const de_DeleteFilterCommand = async (output, context) => {
1357
1093
  if (output.statusCode !== 200 && output.statusCode >= 300) {
1358
- return de_DeleteFilterCommandError(output, context);
1094
+ return de_CommandError(output, context);
1359
1095
  }
1360
1096
  const contents = map({
1361
1097
  $metadata: deserializeMetadata(output),
@@ -1363,31 +1099,9 @@ export const de_DeleteFilterCommand = async (output, context) => {
1363
1099
  await collectBody(output.body, context);
1364
1100
  return contents;
1365
1101
  };
1366
- const de_DeleteFilterCommandError = async (output, context) => {
1367
- const parsedOutput = {
1368
- ...output,
1369
- body: await parseErrorBody(output.body, context),
1370
- };
1371
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1372
- switch (errorCode) {
1373
- case "BadRequestException":
1374
- case "com.amazonaws.guardduty#BadRequestException":
1375
- throw await de_BadRequestExceptionRes(parsedOutput, context);
1376
- case "InternalServerErrorException":
1377
- case "com.amazonaws.guardduty#InternalServerErrorException":
1378
- throw await de_InternalServerErrorExceptionRes(parsedOutput, context);
1379
- default:
1380
- const parsedBody = parsedOutput.body;
1381
- return throwDefaultError({
1382
- output,
1383
- parsedBody,
1384
- errorCode,
1385
- });
1386
- }
1387
- };
1388
1102
  export const de_DeleteInvitationsCommand = async (output, context) => {
1389
1103
  if (output.statusCode !== 200 && output.statusCode >= 300) {
1390
- return de_DeleteInvitationsCommandError(output, context);
1104
+ return de_CommandError(output, context);
1391
1105
  }
1392
1106
  const contents = map({
1393
1107
  $metadata: deserializeMetadata(output),
@@ -1399,31 +1113,9 @@ export const de_DeleteInvitationsCommand = async (output, context) => {
1399
1113
  Object.assign(contents, doc);
1400
1114
  return contents;
1401
1115
  };
1402
- const de_DeleteInvitationsCommandError = async (output, context) => {
1403
- const parsedOutput = {
1404
- ...output,
1405
- body: await parseErrorBody(output.body, context),
1406
- };
1407
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1408
- switch (errorCode) {
1409
- case "BadRequestException":
1410
- case "com.amazonaws.guardduty#BadRequestException":
1411
- throw await de_BadRequestExceptionRes(parsedOutput, context);
1412
- case "InternalServerErrorException":
1413
- case "com.amazonaws.guardduty#InternalServerErrorException":
1414
- throw await de_InternalServerErrorExceptionRes(parsedOutput, context);
1415
- default:
1416
- const parsedBody = parsedOutput.body;
1417
- return throwDefaultError({
1418
- output,
1419
- parsedBody,
1420
- errorCode,
1421
- });
1422
- }
1423
- };
1424
1116
  export const de_DeleteIPSetCommand = async (output, context) => {
1425
1117
  if (output.statusCode !== 200 && output.statusCode >= 300) {
1426
- return de_DeleteIPSetCommandError(output, context);
1118
+ return de_CommandError(output, context);
1427
1119
  }
1428
1120
  const contents = map({
1429
1121
  $metadata: deserializeMetadata(output),
@@ -1431,31 +1123,9 @@ export const de_DeleteIPSetCommand = async (output, context) => {
1431
1123
  await collectBody(output.body, context);
1432
1124
  return contents;
1433
1125
  };
1434
- const de_DeleteIPSetCommandError = async (output, context) => {
1435
- const parsedOutput = {
1436
- ...output,
1437
- body: await parseErrorBody(output.body, context),
1438
- };
1439
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1440
- switch (errorCode) {
1441
- case "BadRequestException":
1442
- case "com.amazonaws.guardduty#BadRequestException":
1443
- throw await de_BadRequestExceptionRes(parsedOutput, context);
1444
- case "InternalServerErrorException":
1445
- case "com.amazonaws.guardduty#InternalServerErrorException":
1446
- throw await de_InternalServerErrorExceptionRes(parsedOutput, context);
1447
- default:
1448
- const parsedBody = parsedOutput.body;
1449
- return throwDefaultError({
1450
- output,
1451
- parsedBody,
1452
- errorCode,
1453
- });
1454
- }
1455
- };
1456
1126
  export const de_DeleteMembersCommand = async (output, context) => {
1457
1127
  if (output.statusCode !== 200 && output.statusCode >= 300) {
1458
- return de_DeleteMembersCommandError(output, context);
1128
+ return de_CommandError(output, context);
1459
1129
  }
1460
1130
  const contents = map({
1461
1131
  $metadata: deserializeMetadata(output),
@@ -1467,31 +1137,9 @@ export const de_DeleteMembersCommand = async (output, context) => {
1467
1137
  Object.assign(contents, doc);
1468
1138
  return contents;
1469
1139
  };
1470
- const de_DeleteMembersCommandError = async (output, context) => {
1471
- const parsedOutput = {
1472
- ...output,
1473
- body: await parseErrorBody(output.body, context),
1474
- };
1475
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1476
- switch (errorCode) {
1477
- case "BadRequestException":
1478
- case "com.amazonaws.guardduty#BadRequestException":
1479
- throw await de_BadRequestExceptionRes(parsedOutput, context);
1480
- case "InternalServerErrorException":
1481
- case "com.amazonaws.guardduty#InternalServerErrorException":
1482
- throw await de_InternalServerErrorExceptionRes(parsedOutput, context);
1483
- default:
1484
- const parsedBody = parsedOutput.body;
1485
- return throwDefaultError({
1486
- output,
1487
- parsedBody,
1488
- errorCode,
1489
- });
1490
- }
1491
- };
1492
1140
  export const de_DeletePublishingDestinationCommand = async (output, context) => {
1493
1141
  if (output.statusCode !== 200 && output.statusCode >= 300) {
1494
- return de_DeletePublishingDestinationCommandError(output, context);
1142
+ return de_CommandError(output, context);
1495
1143
  }
1496
1144
  const contents = map({
1497
1145
  $metadata: deserializeMetadata(output),
@@ -1499,31 +1147,9 @@ export const de_DeletePublishingDestinationCommand = async (output, context) =>
1499
1147
  await collectBody(output.body, context);
1500
1148
  return contents;
1501
1149
  };
1502
- const de_DeletePublishingDestinationCommandError = async (output, context) => {
1503
- const parsedOutput = {
1504
- ...output,
1505
- body: await parseErrorBody(output.body, context),
1506
- };
1507
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1508
- switch (errorCode) {
1509
- case "BadRequestException":
1510
- case "com.amazonaws.guardduty#BadRequestException":
1511
- throw await de_BadRequestExceptionRes(parsedOutput, context);
1512
- case "InternalServerErrorException":
1513
- case "com.amazonaws.guardduty#InternalServerErrorException":
1514
- throw await de_InternalServerErrorExceptionRes(parsedOutput, context);
1515
- default:
1516
- const parsedBody = parsedOutput.body;
1517
- return throwDefaultError({
1518
- output,
1519
- parsedBody,
1520
- errorCode,
1521
- });
1522
- }
1523
- };
1524
1150
  export const de_DeleteThreatIntelSetCommand = async (output, context) => {
1525
1151
  if (output.statusCode !== 200 && output.statusCode >= 300) {
1526
- return de_DeleteThreatIntelSetCommandError(output, context);
1152
+ return de_CommandError(output, context);
1527
1153
  }
1528
1154
  const contents = map({
1529
1155
  $metadata: deserializeMetadata(output),
@@ -1531,31 +1157,9 @@ export const de_DeleteThreatIntelSetCommand = async (output, context) => {
1531
1157
  await collectBody(output.body, context);
1532
1158
  return contents;
1533
1159
  };
1534
- const de_DeleteThreatIntelSetCommandError = async (output, context) => {
1535
- const parsedOutput = {
1536
- ...output,
1537
- body: await parseErrorBody(output.body, context),
1538
- };
1539
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1540
- switch (errorCode) {
1541
- case "BadRequestException":
1542
- case "com.amazonaws.guardduty#BadRequestException":
1543
- throw await de_BadRequestExceptionRes(parsedOutput, context);
1544
- case "InternalServerErrorException":
1545
- case "com.amazonaws.guardduty#InternalServerErrorException":
1546
- throw await de_InternalServerErrorExceptionRes(parsedOutput, context);
1547
- default:
1548
- const parsedBody = parsedOutput.body;
1549
- return throwDefaultError({
1550
- output,
1551
- parsedBody,
1552
- errorCode,
1553
- });
1554
- }
1555
- };
1556
1160
  export const de_DescribeMalwareScansCommand = async (output, context) => {
1557
1161
  if (output.statusCode !== 200 && output.statusCode >= 300) {
1558
- return de_DescribeMalwareScansCommandError(output, context);
1162
+ return de_CommandError(output, context);
1559
1163
  }
1560
1164
  const contents = map({
1561
1165
  $metadata: deserializeMetadata(output),
@@ -1568,31 +1172,9 @@ export const de_DescribeMalwareScansCommand = async (output, context) => {
1568
1172
  Object.assign(contents, doc);
1569
1173
  return contents;
1570
1174
  };
1571
- const de_DescribeMalwareScansCommandError = async (output, context) => {
1572
- const parsedOutput = {
1573
- ...output,
1574
- body: await parseErrorBody(output.body, context),
1575
- };
1576
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1577
- switch (errorCode) {
1578
- case "BadRequestException":
1579
- case "com.amazonaws.guardduty#BadRequestException":
1580
- throw await de_BadRequestExceptionRes(parsedOutput, context);
1581
- case "InternalServerErrorException":
1582
- case "com.amazonaws.guardduty#InternalServerErrorException":
1583
- throw await de_InternalServerErrorExceptionRes(parsedOutput, context);
1584
- default:
1585
- const parsedBody = parsedOutput.body;
1586
- return throwDefaultError({
1587
- output,
1588
- parsedBody,
1589
- errorCode,
1590
- });
1591
- }
1592
- };
1593
1175
  export const de_DescribeOrganizationConfigurationCommand = async (output, context) => {
1594
1176
  if (output.statusCode !== 200 && output.statusCode >= 300) {
1595
- return de_DescribeOrganizationConfigurationCommandError(output, context);
1177
+ return de_CommandError(output, context);
1596
1178
  }
1597
1179
  const contents = map({
1598
1180
  $metadata: deserializeMetadata(output),
@@ -1609,31 +1191,9 @@ export const de_DescribeOrganizationConfigurationCommand = async (output, contex
1609
1191
  Object.assign(contents, doc);
1610
1192
  return contents;
1611
1193
  };
1612
- const de_DescribeOrganizationConfigurationCommandError = async (output, context) => {
1613
- const parsedOutput = {
1614
- ...output,
1615
- body: await parseErrorBody(output.body, context),
1616
- };
1617
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1618
- switch (errorCode) {
1619
- case "BadRequestException":
1620
- case "com.amazonaws.guardduty#BadRequestException":
1621
- throw await de_BadRequestExceptionRes(parsedOutput, context);
1622
- case "InternalServerErrorException":
1623
- case "com.amazonaws.guardduty#InternalServerErrorException":
1624
- throw await de_InternalServerErrorExceptionRes(parsedOutput, context);
1625
- default:
1626
- const parsedBody = parsedOutput.body;
1627
- return throwDefaultError({
1628
- output,
1629
- parsedBody,
1630
- errorCode,
1631
- });
1632
- }
1633
- };
1634
1194
  export const de_DescribePublishingDestinationCommand = async (output, context) => {
1635
1195
  if (output.statusCode !== 200 && output.statusCode >= 300) {
1636
- return de_DescribePublishingDestinationCommandError(output, context);
1196
+ return de_CommandError(output, context);
1637
1197
  }
1638
1198
  const contents = map({
1639
1199
  $metadata: deserializeMetadata(output),
@@ -1649,31 +1209,9 @@ export const de_DescribePublishingDestinationCommand = async (output, context) =
1649
1209
  Object.assign(contents, doc);
1650
1210
  return contents;
1651
1211
  };
1652
- const de_DescribePublishingDestinationCommandError = async (output, context) => {
1653
- const parsedOutput = {
1654
- ...output,
1655
- body: await parseErrorBody(output.body, context),
1656
- };
1657
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1658
- switch (errorCode) {
1659
- case "BadRequestException":
1660
- case "com.amazonaws.guardduty#BadRequestException":
1661
- throw await de_BadRequestExceptionRes(parsedOutput, context);
1662
- case "InternalServerErrorException":
1663
- case "com.amazonaws.guardduty#InternalServerErrorException":
1664
- throw await de_InternalServerErrorExceptionRes(parsedOutput, context);
1665
- default:
1666
- const parsedBody = parsedOutput.body;
1667
- return throwDefaultError({
1668
- output,
1669
- parsedBody,
1670
- errorCode,
1671
- });
1672
- }
1673
- };
1674
1212
  export const de_DisableOrganizationAdminAccountCommand = async (output, context) => {
1675
1213
  if (output.statusCode !== 200 && output.statusCode >= 300) {
1676
- return de_DisableOrganizationAdminAccountCommandError(output, context);
1214
+ return de_CommandError(output, context);
1677
1215
  }
1678
1216
  const contents = map({
1679
1217
  $metadata: deserializeMetadata(output),
@@ -1681,31 +1219,9 @@ export const de_DisableOrganizationAdminAccountCommand = async (output, context)
1681
1219
  await collectBody(output.body, context);
1682
1220
  return contents;
1683
1221
  };
1684
- const de_DisableOrganizationAdminAccountCommandError = async (output, context) => {
1685
- const parsedOutput = {
1686
- ...output,
1687
- body: await parseErrorBody(output.body, context),
1688
- };
1689
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1690
- switch (errorCode) {
1691
- case "BadRequestException":
1692
- case "com.amazonaws.guardduty#BadRequestException":
1693
- throw await de_BadRequestExceptionRes(parsedOutput, context);
1694
- case "InternalServerErrorException":
1695
- case "com.amazonaws.guardduty#InternalServerErrorException":
1696
- throw await de_InternalServerErrorExceptionRes(parsedOutput, context);
1697
- default:
1698
- const parsedBody = parsedOutput.body;
1699
- return throwDefaultError({
1700
- output,
1701
- parsedBody,
1702
- errorCode,
1703
- });
1704
- }
1705
- };
1706
1222
  export const de_DisassociateFromAdministratorAccountCommand = async (output, context) => {
1707
1223
  if (output.statusCode !== 200 && output.statusCode >= 300) {
1708
- return de_DisassociateFromAdministratorAccountCommandError(output, context);
1224
+ return de_CommandError(output, context);
1709
1225
  }
1710
1226
  const contents = map({
1711
1227
  $metadata: deserializeMetadata(output),
@@ -1713,31 +1229,9 @@ export const de_DisassociateFromAdministratorAccountCommand = async (output, con
1713
1229
  await collectBody(output.body, context);
1714
1230
  return contents;
1715
1231
  };
1716
- const de_DisassociateFromAdministratorAccountCommandError = async (output, context) => {
1717
- const parsedOutput = {
1718
- ...output,
1719
- body: await parseErrorBody(output.body, context),
1720
- };
1721
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1722
- switch (errorCode) {
1723
- case "BadRequestException":
1724
- case "com.amazonaws.guardduty#BadRequestException":
1725
- throw await de_BadRequestExceptionRes(parsedOutput, context);
1726
- case "InternalServerErrorException":
1727
- case "com.amazonaws.guardduty#InternalServerErrorException":
1728
- throw await de_InternalServerErrorExceptionRes(parsedOutput, context);
1729
- default:
1730
- const parsedBody = parsedOutput.body;
1731
- return throwDefaultError({
1732
- output,
1733
- parsedBody,
1734
- errorCode,
1735
- });
1736
- }
1737
- };
1738
1232
  export const de_DisassociateFromMasterAccountCommand = async (output, context) => {
1739
1233
  if (output.statusCode !== 200 && output.statusCode >= 300) {
1740
- return de_DisassociateFromMasterAccountCommandError(output, context);
1234
+ return de_CommandError(output, context);
1741
1235
  }
1742
1236
  const contents = map({
1743
1237
  $metadata: deserializeMetadata(output),
@@ -1745,31 +1239,9 @@ export const de_DisassociateFromMasterAccountCommand = async (output, context) =
1745
1239
  await collectBody(output.body, context);
1746
1240
  return contents;
1747
1241
  };
1748
- const de_DisassociateFromMasterAccountCommandError = async (output, context) => {
1749
- const parsedOutput = {
1750
- ...output,
1751
- body: await parseErrorBody(output.body, context),
1752
- };
1753
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1754
- switch (errorCode) {
1755
- case "BadRequestException":
1756
- case "com.amazonaws.guardduty#BadRequestException":
1757
- throw await de_BadRequestExceptionRes(parsedOutput, context);
1758
- case "InternalServerErrorException":
1759
- case "com.amazonaws.guardduty#InternalServerErrorException":
1760
- throw await de_InternalServerErrorExceptionRes(parsedOutput, context);
1761
- default:
1762
- const parsedBody = parsedOutput.body;
1763
- return throwDefaultError({
1764
- output,
1765
- parsedBody,
1766
- errorCode,
1767
- });
1768
- }
1769
- };
1770
1242
  export const de_DisassociateMembersCommand = async (output, context) => {
1771
1243
  if (output.statusCode !== 200 && output.statusCode >= 300) {
1772
- return de_DisassociateMembersCommandError(output, context);
1244
+ return de_CommandError(output, context);
1773
1245
  }
1774
1246
  const contents = map({
1775
1247
  $metadata: deserializeMetadata(output),
@@ -1781,31 +1253,9 @@ export const de_DisassociateMembersCommand = async (output, context) => {
1781
1253
  Object.assign(contents, doc);
1782
1254
  return contents;
1783
1255
  };
1784
- const de_DisassociateMembersCommandError = async (output, context) => {
1785
- const parsedOutput = {
1786
- ...output,
1787
- body: await parseErrorBody(output.body, context),
1788
- };
1789
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1790
- switch (errorCode) {
1791
- case "BadRequestException":
1792
- case "com.amazonaws.guardduty#BadRequestException":
1793
- throw await de_BadRequestExceptionRes(parsedOutput, context);
1794
- case "InternalServerErrorException":
1795
- case "com.amazonaws.guardduty#InternalServerErrorException":
1796
- throw await de_InternalServerErrorExceptionRes(parsedOutput, context);
1797
- default:
1798
- const parsedBody = parsedOutput.body;
1799
- return throwDefaultError({
1800
- output,
1801
- parsedBody,
1802
- errorCode,
1803
- });
1804
- }
1805
- };
1806
1256
  export const de_EnableOrganizationAdminAccountCommand = async (output, context) => {
1807
1257
  if (output.statusCode !== 200 && output.statusCode >= 300) {
1808
- return de_EnableOrganizationAdminAccountCommandError(output, context);
1258
+ return de_CommandError(output, context);
1809
1259
  }
1810
1260
  const contents = map({
1811
1261
  $metadata: deserializeMetadata(output),
@@ -1813,31 +1263,9 @@ export const de_EnableOrganizationAdminAccountCommand = async (output, context)
1813
1263
  await collectBody(output.body, context);
1814
1264
  return contents;
1815
1265
  };
1816
- const de_EnableOrganizationAdminAccountCommandError = async (output, context) => {
1817
- const parsedOutput = {
1818
- ...output,
1819
- body: await parseErrorBody(output.body, context),
1820
- };
1821
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1822
- switch (errorCode) {
1823
- case "BadRequestException":
1824
- case "com.amazonaws.guardduty#BadRequestException":
1825
- throw await de_BadRequestExceptionRes(parsedOutput, context);
1826
- case "InternalServerErrorException":
1827
- case "com.amazonaws.guardduty#InternalServerErrorException":
1828
- throw await de_InternalServerErrorExceptionRes(parsedOutput, context);
1829
- default:
1830
- const parsedBody = parsedOutput.body;
1831
- return throwDefaultError({
1832
- output,
1833
- parsedBody,
1834
- errorCode,
1835
- });
1836
- }
1837
- };
1838
1266
  export const de_GetAdministratorAccountCommand = async (output, context) => {
1839
1267
  if (output.statusCode !== 200 && output.statusCode >= 300) {
1840
- return de_GetAdministratorAccountCommandError(output, context);
1268
+ return de_CommandError(output, context);
1841
1269
  }
1842
1270
  const contents = map({
1843
1271
  $metadata: deserializeMetadata(output),
@@ -1849,31 +1277,9 @@ export const de_GetAdministratorAccountCommand = async (output, context) => {
1849
1277
  Object.assign(contents, doc);
1850
1278
  return contents;
1851
1279
  };
1852
- const de_GetAdministratorAccountCommandError = async (output, context) => {
1853
- const parsedOutput = {
1854
- ...output,
1855
- body: await parseErrorBody(output.body, context),
1856
- };
1857
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1858
- switch (errorCode) {
1859
- case "BadRequestException":
1860
- case "com.amazonaws.guardduty#BadRequestException":
1861
- throw await de_BadRequestExceptionRes(parsedOutput, context);
1862
- case "InternalServerErrorException":
1863
- case "com.amazonaws.guardduty#InternalServerErrorException":
1864
- throw await de_InternalServerErrorExceptionRes(parsedOutput, context);
1865
- default:
1866
- const parsedBody = parsedOutput.body;
1867
- return throwDefaultError({
1868
- output,
1869
- parsedBody,
1870
- errorCode,
1871
- });
1872
- }
1873
- };
1874
1280
  export const de_GetCoverageStatisticsCommand = async (output, context) => {
1875
1281
  if (output.statusCode !== 200 && output.statusCode >= 300) {
1876
- return de_GetCoverageStatisticsCommandError(output, context);
1282
+ return de_CommandError(output, context);
1877
1283
  }
1878
1284
  const contents = map({
1879
1285
  $metadata: deserializeMetadata(output),
@@ -1885,31 +1291,9 @@ export const de_GetCoverageStatisticsCommand = async (output, context) => {
1885
1291
  Object.assign(contents, doc);
1886
1292
  return contents;
1887
1293
  };
1888
- const de_GetCoverageStatisticsCommandError = async (output, context) => {
1889
- const parsedOutput = {
1890
- ...output,
1891
- body: await parseErrorBody(output.body, context),
1892
- };
1893
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1894
- switch (errorCode) {
1895
- case "BadRequestException":
1896
- case "com.amazonaws.guardduty#BadRequestException":
1897
- throw await de_BadRequestExceptionRes(parsedOutput, context);
1898
- case "InternalServerErrorException":
1899
- case "com.amazonaws.guardduty#InternalServerErrorException":
1900
- throw await de_InternalServerErrorExceptionRes(parsedOutput, context);
1901
- default:
1902
- const parsedBody = parsedOutput.body;
1903
- return throwDefaultError({
1904
- output,
1905
- parsedBody,
1906
- errorCode,
1907
- });
1908
- }
1909
- };
1910
1294
  export const de_GetDetectorCommand = async (output, context) => {
1911
1295
  if (output.statusCode !== 200 && output.statusCode >= 300) {
1912
- return de_GetDetectorCommandError(output, context);
1296
+ return de_CommandError(output, context);
1913
1297
  }
1914
1298
  const contents = map({
1915
1299
  $metadata: deserializeMetadata(output),
@@ -1928,31 +1312,9 @@ export const de_GetDetectorCommand = async (output, context) => {
1928
1312
  Object.assign(contents, doc);
1929
1313
  return contents;
1930
1314
  };
1931
- const de_GetDetectorCommandError = async (output, context) => {
1932
- const parsedOutput = {
1933
- ...output,
1934
- body: await parseErrorBody(output.body, context),
1935
- };
1936
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1937
- switch (errorCode) {
1938
- case "BadRequestException":
1939
- case "com.amazonaws.guardduty#BadRequestException":
1940
- throw await de_BadRequestExceptionRes(parsedOutput, context);
1941
- case "InternalServerErrorException":
1942
- case "com.amazonaws.guardduty#InternalServerErrorException":
1943
- throw await de_InternalServerErrorExceptionRes(parsedOutput, context);
1944
- default:
1945
- const parsedBody = parsedOutput.body;
1946
- return throwDefaultError({
1947
- output,
1948
- parsedBody,
1949
- errorCode,
1950
- });
1951
- }
1952
- };
1953
1315
  export const de_GetFilterCommand = async (output, context) => {
1954
1316
  if (output.statusCode !== 200 && output.statusCode >= 300) {
1955
- return de_GetFilterCommandError(output, context);
1317
+ return de_CommandError(output, context);
1956
1318
  }
1957
1319
  const contents = map({
1958
1320
  $metadata: deserializeMetadata(output),
@@ -1969,31 +1331,9 @@ export const de_GetFilterCommand = async (output, context) => {
1969
1331
  Object.assign(contents, doc);
1970
1332
  return contents;
1971
1333
  };
1972
- const de_GetFilterCommandError = 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 "BadRequestException":
1980
- case "com.amazonaws.guardduty#BadRequestException":
1981
- throw await de_BadRequestExceptionRes(parsedOutput, context);
1982
- case "InternalServerErrorException":
1983
- case "com.amazonaws.guardduty#InternalServerErrorException":
1984
- throw await de_InternalServerErrorExceptionRes(parsedOutput, context);
1985
- default:
1986
- const parsedBody = parsedOutput.body;
1987
- return throwDefaultError({
1988
- output,
1989
- parsedBody,
1990
- errorCode,
1991
- });
1992
- }
1993
- };
1994
1334
  export const de_GetFindingsCommand = async (output, context) => {
1995
1335
  if (output.statusCode !== 200 && output.statusCode >= 300) {
1996
- return de_GetFindingsCommandError(output, context);
1336
+ return de_CommandError(output, context);
1997
1337
  }
1998
1338
  const contents = map({
1999
1339
  $metadata: deserializeMetadata(output),
@@ -2005,31 +1345,9 @@ export const de_GetFindingsCommand = async (output, context) => {
2005
1345
  Object.assign(contents, doc);
2006
1346
  return contents;
2007
1347
  };
2008
- const de_GetFindingsCommandError = async (output, context) => {
2009
- const parsedOutput = {
2010
- ...output,
2011
- body: await parseErrorBody(output.body, context),
2012
- };
2013
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2014
- switch (errorCode) {
2015
- case "BadRequestException":
2016
- case "com.amazonaws.guardduty#BadRequestException":
2017
- throw await de_BadRequestExceptionRes(parsedOutput, context);
2018
- case "InternalServerErrorException":
2019
- case "com.amazonaws.guardduty#InternalServerErrorException":
2020
- throw await de_InternalServerErrorExceptionRes(parsedOutput, context);
2021
- default:
2022
- const parsedBody = parsedOutput.body;
2023
- return throwDefaultError({
2024
- output,
2025
- parsedBody,
2026
- errorCode,
2027
- });
2028
- }
2029
- };
2030
1348
  export const de_GetFindingsStatisticsCommand = async (output, context) => {
2031
1349
  if (output.statusCode !== 200 && output.statusCode >= 300) {
2032
- return de_GetFindingsStatisticsCommandError(output, context);
1350
+ return de_CommandError(output, context);
2033
1351
  }
2034
1352
  const contents = map({
2035
1353
  $metadata: deserializeMetadata(output),
@@ -2041,31 +1359,9 @@ export const de_GetFindingsStatisticsCommand = async (output, context) => {
2041
1359
  Object.assign(contents, doc);
2042
1360
  return contents;
2043
1361
  };
2044
- const de_GetFindingsStatisticsCommandError = async (output, context) => {
2045
- const parsedOutput = {
2046
- ...output,
2047
- body: await parseErrorBody(output.body, context),
2048
- };
2049
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2050
- switch (errorCode) {
2051
- case "BadRequestException":
2052
- case "com.amazonaws.guardduty#BadRequestException":
2053
- throw await de_BadRequestExceptionRes(parsedOutput, context);
2054
- case "InternalServerErrorException":
2055
- case "com.amazonaws.guardduty#InternalServerErrorException":
2056
- throw await de_InternalServerErrorExceptionRes(parsedOutput, context);
2057
- default:
2058
- const parsedBody = parsedOutput.body;
2059
- return throwDefaultError({
2060
- output,
2061
- parsedBody,
2062
- errorCode,
2063
- });
2064
- }
2065
- };
2066
1362
  export const de_GetInvitationsCountCommand = async (output, context) => {
2067
1363
  if (output.statusCode !== 200 && output.statusCode >= 300) {
2068
- return de_GetInvitationsCountCommandError(output, context);
1364
+ return de_CommandError(output, context);
2069
1365
  }
2070
1366
  const contents = map({
2071
1367
  $metadata: deserializeMetadata(output),
@@ -2077,31 +1373,9 @@ export const de_GetInvitationsCountCommand = async (output, context) => {
2077
1373
  Object.assign(contents, doc);
2078
1374
  return contents;
2079
1375
  };
2080
- const de_GetInvitationsCountCommandError = async (output, context) => {
2081
- const parsedOutput = {
2082
- ...output,
2083
- body: await parseErrorBody(output.body, context),
2084
- };
2085
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2086
- switch (errorCode) {
2087
- case "BadRequestException":
2088
- case "com.amazonaws.guardduty#BadRequestException":
2089
- throw await de_BadRequestExceptionRes(parsedOutput, context);
2090
- case "InternalServerErrorException":
2091
- case "com.amazonaws.guardduty#InternalServerErrorException":
2092
- throw await de_InternalServerErrorExceptionRes(parsedOutput, context);
2093
- default:
2094
- const parsedBody = parsedOutput.body;
2095
- return throwDefaultError({
2096
- output,
2097
- parsedBody,
2098
- errorCode,
2099
- });
2100
- }
2101
- };
2102
1376
  export const de_GetIPSetCommand = async (output, context) => {
2103
1377
  if (output.statusCode !== 200 && output.statusCode >= 300) {
2104
- return de_GetIPSetCommandError(output, context);
1378
+ return de_CommandError(output, context);
2105
1379
  }
2106
1380
  const contents = map({
2107
1381
  $metadata: deserializeMetadata(output),
@@ -2117,31 +1391,9 @@ export const de_GetIPSetCommand = async (output, context) => {
2117
1391
  Object.assign(contents, doc);
2118
1392
  return contents;
2119
1393
  };
2120
- const de_GetIPSetCommandError = async (output, context) => {
2121
- const parsedOutput = {
2122
- ...output,
2123
- body: await parseErrorBody(output.body, context),
2124
- };
2125
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2126
- switch (errorCode) {
2127
- case "BadRequestException":
2128
- case "com.amazonaws.guardduty#BadRequestException":
2129
- throw await de_BadRequestExceptionRes(parsedOutput, context);
2130
- case "InternalServerErrorException":
2131
- case "com.amazonaws.guardduty#InternalServerErrorException":
2132
- throw await de_InternalServerErrorExceptionRes(parsedOutput, context);
2133
- default:
2134
- const parsedBody = parsedOutput.body;
2135
- return throwDefaultError({
2136
- output,
2137
- parsedBody,
2138
- errorCode,
2139
- });
2140
- }
2141
- };
2142
1394
  export const de_GetMalwareScanSettingsCommand = async (output, context) => {
2143
1395
  if (output.statusCode !== 200 && output.statusCode >= 300) {
2144
- return de_GetMalwareScanSettingsCommandError(output, context);
1396
+ return de_CommandError(output, context);
2145
1397
  }
2146
1398
  const contents = map({
2147
1399
  $metadata: deserializeMetadata(output),
@@ -2154,31 +1406,9 @@ export const de_GetMalwareScanSettingsCommand = async (output, context) => {
2154
1406
  Object.assign(contents, doc);
2155
1407
  return contents;
2156
1408
  };
2157
- const de_GetMalwareScanSettingsCommandError = async (output, context) => {
2158
- const parsedOutput = {
2159
- ...output,
2160
- body: await parseErrorBody(output.body, context),
2161
- };
2162
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2163
- switch (errorCode) {
2164
- case "BadRequestException":
2165
- case "com.amazonaws.guardduty#BadRequestException":
2166
- throw await de_BadRequestExceptionRes(parsedOutput, context);
2167
- case "InternalServerErrorException":
2168
- case "com.amazonaws.guardduty#InternalServerErrorException":
2169
- throw await de_InternalServerErrorExceptionRes(parsedOutput, context);
2170
- default:
2171
- const parsedBody = parsedOutput.body;
2172
- return throwDefaultError({
2173
- output,
2174
- parsedBody,
2175
- errorCode,
2176
- });
2177
- }
2178
- };
2179
1409
  export const de_GetMasterAccountCommand = async (output, context) => {
2180
1410
  if (output.statusCode !== 200 && output.statusCode >= 300) {
2181
- return de_GetMasterAccountCommandError(output, context);
1411
+ return de_CommandError(output, context);
2182
1412
  }
2183
1413
  const contents = map({
2184
1414
  $metadata: deserializeMetadata(output),
@@ -2190,31 +1420,9 @@ export const de_GetMasterAccountCommand = async (output, context) => {
2190
1420
  Object.assign(contents, doc);
2191
1421
  return contents;
2192
1422
  };
2193
- const de_GetMasterAccountCommandError = async (output, context) => {
2194
- const parsedOutput = {
2195
- ...output,
2196
- body: await parseErrorBody(output.body, context),
2197
- };
2198
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2199
- switch (errorCode) {
2200
- case "BadRequestException":
2201
- case "com.amazonaws.guardduty#BadRequestException":
2202
- throw await de_BadRequestExceptionRes(parsedOutput, context);
2203
- case "InternalServerErrorException":
2204
- case "com.amazonaws.guardduty#InternalServerErrorException":
2205
- throw await de_InternalServerErrorExceptionRes(parsedOutput, context);
2206
- default:
2207
- const parsedBody = parsedOutput.body;
2208
- return throwDefaultError({
2209
- output,
2210
- parsedBody,
2211
- errorCode,
2212
- });
2213
- }
2214
- };
2215
1423
  export const de_GetMemberDetectorsCommand = async (output, context) => {
2216
1424
  if (output.statusCode !== 200 && output.statusCode >= 300) {
2217
- return de_GetMemberDetectorsCommandError(output, context);
1425
+ return de_CommandError(output, context);
2218
1426
  }
2219
1427
  const contents = map({
2220
1428
  $metadata: deserializeMetadata(output),
@@ -2227,31 +1435,9 @@ export const de_GetMemberDetectorsCommand = async (output, context) => {
2227
1435
  Object.assign(contents, doc);
2228
1436
  return contents;
2229
1437
  };
2230
- const de_GetMemberDetectorsCommandError = async (output, context) => {
2231
- const parsedOutput = {
2232
- ...output,
2233
- body: await parseErrorBody(output.body, context),
2234
- };
2235
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2236
- switch (errorCode) {
2237
- case "BadRequestException":
2238
- case "com.amazonaws.guardduty#BadRequestException":
2239
- throw await de_BadRequestExceptionRes(parsedOutput, context);
2240
- case "InternalServerErrorException":
2241
- case "com.amazonaws.guardduty#InternalServerErrorException":
2242
- throw await de_InternalServerErrorExceptionRes(parsedOutput, context);
2243
- default:
2244
- const parsedBody = parsedOutput.body;
2245
- return throwDefaultError({
2246
- output,
2247
- parsedBody,
2248
- errorCode,
2249
- });
2250
- }
2251
- };
2252
1438
  export const de_GetMembersCommand = async (output, context) => {
2253
1439
  if (output.statusCode !== 200 && output.statusCode >= 300) {
2254
- return de_GetMembersCommandError(output, context);
1440
+ return de_CommandError(output, context);
2255
1441
  }
2256
1442
  const contents = map({
2257
1443
  $metadata: deserializeMetadata(output),
@@ -2264,31 +1450,9 @@ export const de_GetMembersCommand = async (output, context) => {
2264
1450
  Object.assign(contents, doc);
2265
1451
  return contents;
2266
1452
  };
2267
- const de_GetMembersCommandError = async (output, context) => {
2268
- const parsedOutput = {
2269
- ...output,
2270
- body: await parseErrorBody(output.body, context),
2271
- };
2272
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2273
- switch (errorCode) {
2274
- case "BadRequestException":
2275
- case "com.amazonaws.guardduty#BadRequestException":
2276
- throw await de_BadRequestExceptionRes(parsedOutput, context);
2277
- case "InternalServerErrorException":
2278
- case "com.amazonaws.guardduty#InternalServerErrorException":
2279
- throw await de_InternalServerErrorExceptionRes(parsedOutput, context);
2280
- default:
2281
- const parsedBody = parsedOutput.body;
2282
- return throwDefaultError({
2283
- output,
2284
- parsedBody,
2285
- errorCode,
2286
- });
2287
- }
2288
- };
2289
1453
  export const de_GetOrganizationStatisticsCommand = async (output, context) => {
2290
1454
  if (output.statusCode !== 200 && output.statusCode >= 300) {
2291
- return de_GetOrganizationStatisticsCommandError(output, context);
1455
+ return de_CommandError(output, context);
2292
1456
  }
2293
1457
  const contents = map({
2294
1458
  $metadata: deserializeMetadata(output),
@@ -2300,31 +1464,9 @@ export const de_GetOrganizationStatisticsCommand = async (output, context) => {
2300
1464
  Object.assign(contents, doc);
2301
1465
  return contents;
2302
1466
  };
2303
- const de_GetOrganizationStatisticsCommandError = async (output, context) => {
2304
- const parsedOutput = {
2305
- ...output,
2306
- body: await parseErrorBody(output.body, context),
2307
- };
2308
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2309
- switch (errorCode) {
2310
- case "BadRequestException":
2311
- case "com.amazonaws.guardduty#BadRequestException":
2312
- throw await de_BadRequestExceptionRes(parsedOutput, context);
2313
- case "InternalServerErrorException":
2314
- case "com.amazonaws.guardduty#InternalServerErrorException":
2315
- throw await de_InternalServerErrorExceptionRes(parsedOutput, context);
2316
- default:
2317
- const parsedBody = parsedOutput.body;
2318
- return throwDefaultError({
2319
- output,
2320
- parsedBody,
2321
- errorCode,
2322
- });
2323
- }
2324
- };
2325
1467
  export const de_GetRemainingFreeTrialDaysCommand = async (output, context) => {
2326
1468
  if (output.statusCode !== 200 && output.statusCode >= 300) {
2327
- return de_GetRemainingFreeTrialDaysCommandError(output, context);
1469
+ return de_CommandError(output, context);
2328
1470
  }
2329
1471
  const contents = map({
2330
1472
  $metadata: deserializeMetadata(output),
@@ -2337,31 +1479,9 @@ export const de_GetRemainingFreeTrialDaysCommand = async (output, context) => {
2337
1479
  Object.assign(contents, doc);
2338
1480
  return contents;
2339
1481
  };
2340
- const de_GetRemainingFreeTrialDaysCommandError = async (output, context) => {
2341
- const parsedOutput = {
2342
- ...output,
2343
- body: await parseErrorBody(output.body, context),
2344
- };
2345
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2346
- switch (errorCode) {
2347
- case "BadRequestException":
2348
- case "com.amazonaws.guardduty#BadRequestException":
2349
- throw await de_BadRequestExceptionRes(parsedOutput, context);
2350
- case "InternalServerErrorException":
2351
- case "com.amazonaws.guardduty#InternalServerErrorException":
2352
- throw await de_InternalServerErrorExceptionRes(parsedOutput, context);
2353
- default:
2354
- const parsedBody = parsedOutput.body;
2355
- return throwDefaultError({
2356
- output,
2357
- parsedBody,
2358
- errorCode,
2359
- });
2360
- }
2361
- };
2362
1482
  export const de_GetThreatIntelSetCommand = async (output, context) => {
2363
1483
  if (output.statusCode !== 200 && output.statusCode >= 300) {
2364
- return de_GetThreatIntelSetCommandError(output, context);
1484
+ return de_CommandError(output, context);
2365
1485
  }
2366
1486
  const contents = map({
2367
1487
  $metadata: deserializeMetadata(output),
@@ -2377,31 +1497,9 @@ export const de_GetThreatIntelSetCommand = async (output, context) => {
2377
1497
  Object.assign(contents, doc);
2378
1498
  return contents;
2379
1499
  };
2380
- const de_GetThreatIntelSetCommandError = async (output, context) => {
2381
- const parsedOutput = {
2382
- ...output,
2383
- body: await parseErrorBody(output.body, context),
2384
- };
2385
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2386
- switch (errorCode) {
2387
- case "BadRequestException":
2388
- case "com.amazonaws.guardduty#BadRequestException":
2389
- throw await de_BadRequestExceptionRes(parsedOutput, context);
2390
- case "InternalServerErrorException":
2391
- case "com.amazonaws.guardduty#InternalServerErrorException":
2392
- throw await de_InternalServerErrorExceptionRes(parsedOutput, context);
2393
- default:
2394
- const parsedBody = parsedOutput.body;
2395
- return throwDefaultError({
2396
- output,
2397
- parsedBody,
2398
- errorCode,
2399
- });
2400
- }
2401
- };
2402
1500
  export const de_GetUsageStatisticsCommand = async (output, context) => {
2403
1501
  if (output.statusCode !== 200 && output.statusCode >= 300) {
2404
- return de_GetUsageStatisticsCommandError(output, context);
1502
+ return de_CommandError(output, context);
2405
1503
  }
2406
1504
  const contents = map({
2407
1505
  $metadata: deserializeMetadata(output),
@@ -2414,31 +1512,9 @@ export const de_GetUsageStatisticsCommand = async (output, context) => {
2414
1512
  Object.assign(contents, doc);
2415
1513
  return contents;
2416
1514
  };
2417
- const de_GetUsageStatisticsCommandError = async (output, context) => {
2418
- const parsedOutput = {
2419
- ...output,
2420
- body: await parseErrorBody(output.body, context),
2421
- };
2422
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2423
- switch (errorCode) {
2424
- case "BadRequestException":
2425
- case "com.amazonaws.guardduty#BadRequestException":
2426
- throw await de_BadRequestExceptionRes(parsedOutput, context);
2427
- case "InternalServerErrorException":
2428
- case "com.amazonaws.guardduty#InternalServerErrorException":
2429
- throw await de_InternalServerErrorExceptionRes(parsedOutput, context);
2430
- default:
2431
- const parsedBody = parsedOutput.body;
2432
- return throwDefaultError({
2433
- output,
2434
- parsedBody,
2435
- errorCode,
2436
- });
2437
- }
2438
- };
2439
1515
  export const de_InviteMembersCommand = async (output, context) => {
2440
1516
  if (output.statusCode !== 200 && output.statusCode >= 300) {
2441
- return de_InviteMembersCommandError(output, context);
1517
+ return de_CommandError(output, context);
2442
1518
  }
2443
1519
  const contents = map({
2444
1520
  $metadata: deserializeMetadata(output),
@@ -2450,31 +1526,9 @@ export const de_InviteMembersCommand = async (output, context) => {
2450
1526
  Object.assign(contents, doc);
2451
1527
  return contents;
2452
1528
  };
2453
- const de_InviteMembersCommandError = async (output, context) => {
2454
- const parsedOutput = {
2455
- ...output,
2456
- body: await parseErrorBody(output.body, context),
2457
- };
2458
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2459
- switch (errorCode) {
2460
- case "BadRequestException":
2461
- case "com.amazonaws.guardduty#BadRequestException":
2462
- throw await de_BadRequestExceptionRes(parsedOutput, context);
2463
- case "InternalServerErrorException":
2464
- case "com.amazonaws.guardduty#InternalServerErrorException":
2465
- throw await de_InternalServerErrorExceptionRes(parsedOutput, context);
2466
- default:
2467
- const parsedBody = parsedOutput.body;
2468
- return throwDefaultError({
2469
- output,
2470
- parsedBody,
2471
- errorCode,
2472
- });
2473
- }
2474
- };
2475
1529
  export const de_ListCoverageCommand = async (output, context) => {
2476
1530
  if (output.statusCode !== 200 && output.statusCode >= 300) {
2477
- return de_ListCoverageCommandError(output, context);
1531
+ return de_CommandError(output, context);
2478
1532
  }
2479
1533
  const contents = map({
2480
1534
  $metadata: deserializeMetadata(output),
@@ -2487,31 +1541,9 @@ export const de_ListCoverageCommand = async (output, context) => {
2487
1541
  Object.assign(contents, doc);
2488
1542
  return contents;
2489
1543
  };
2490
- const de_ListCoverageCommandError = async (output, context) => {
2491
- const parsedOutput = {
2492
- ...output,
2493
- body: await parseErrorBody(output.body, context),
2494
- };
2495
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2496
- switch (errorCode) {
2497
- case "BadRequestException":
2498
- case "com.amazonaws.guardduty#BadRequestException":
2499
- throw await de_BadRequestExceptionRes(parsedOutput, context);
2500
- case "InternalServerErrorException":
2501
- case "com.amazonaws.guardduty#InternalServerErrorException":
2502
- throw await de_InternalServerErrorExceptionRes(parsedOutput, context);
2503
- default:
2504
- const parsedBody = parsedOutput.body;
2505
- return throwDefaultError({
2506
- output,
2507
- parsedBody,
2508
- errorCode,
2509
- });
2510
- }
2511
- };
2512
1544
  export const de_ListDetectorsCommand = async (output, context) => {
2513
1545
  if (output.statusCode !== 200 && output.statusCode >= 300) {
2514
- return de_ListDetectorsCommandError(output, context);
1546
+ return de_CommandError(output, context);
2515
1547
  }
2516
1548
  const contents = map({
2517
1549
  $metadata: deserializeMetadata(output),
@@ -2524,31 +1556,9 @@ export const de_ListDetectorsCommand = async (output, context) => {
2524
1556
  Object.assign(contents, doc);
2525
1557
  return contents;
2526
1558
  };
2527
- const de_ListDetectorsCommandError = async (output, context) => {
2528
- const parsedOutput = {
2529
- ...output,
2530
- body: await parseErrorBody(output.body, context),
2531
- };
2532
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2533
- switch (errorCode) {
2534
- case "BadRequestException":
2535
- case "com.amazonaws.guardduty#BadRequestException":
2536
- throw await de_BadRequestExceptionRes(parsedOutput, context);
2537
- case "InternalServerErrorException":
2538
- case "com.amazonaws.guardduty#InternalServerErrorException":
2539
- throw await de_InternalServerErrorExceptionRes(parsedOutput, context);
2540
- default:
2541
- const parsedBody = parsedOutput.body;
2542
- return throwDefaultError({
2543
- output,
2544
- parsedBody,
2545
- errorCode,
2546
- });
2547
- }
2548
- };
2549
1559
  export const de_ListFiltersCommand = async (output, context) => {
2550
1560
  if (output.statusCode !== 200 && output.statusCode >= 300) {
2551
- return de_ListFiltersCommandError(output, context);
1561
+ return de_CommandError(output, context);
2552
1562
  }
2553
1563
  const contents = map({
2554
1564
  $metadata: deserializeMetadata(output),
@@ -2561,31 +1571,9 @@ export const de_ListFiltersCommand = async (output, context) => {
2561
1571
  Object.assign(contents, doc);
2562
1572
  return contents;
2563
1573
  };
2564
- const de_ListFiltersCommandError = async (output, context) => {
2565
- const parsedOutput = {
2566
- ...output,
2567
- body: await parseErrorBody(output.body, context),
2568
- };
2569
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2570
- switch (errorCode) {
2571
- case "BadRequestException":
2572
- case "com.amazonaws.guardduty#BadRequestException":
2573
- throw await de_BadRequestExceptionRes(parsedOutput, context);
2574
- case "InternalServerErrorException":
2575
- case "com.amazonaws.guardduty#InternalServerErrorException":
2576
- throw await de_InternalServerErrorExceptionRes(parsedOutput, context);
2577
- default:
2578
- const parsedBody = parsedOutput.body;
2579
- return throwDefaultError({
2580
- output,
2581
- parsedBody,
2582
- errorCode,
2583
- });
2584
- }
2585
- };
2586
1574
  export const de_ListFindingsCommand = async (output, context) => {
2587
1575
  if (output.statusCode !== 200 && output.statusCode >= 300) {
2588
- return de_ListFindingsCommandError(output, context);
1576
+ return de_CommandError(output, context);
2589
1577
  }
2590
1578
  const contents = map({
2591
1579
  $metadata: deserializeMetadata(output),
@@ -2598,31 +1586,9 @@ export const de_ListFindingsCommand = async (output, context) => {
2598
1586
  Object.assign(contents, doc);
2599
1587
  return contents;
2600
1588
  };
2601
- const de_ListFindingsCommandError = async (output, context) => {
2602
- const parsedOutput = {
2603
- ...output,
2604
- body: await parseErrorBody(output.body, context),
2605
- };
2606
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2607
- switch (errorCode) {
2608
- case "BadRequestException":
2609
- case "com.amazonaws.guardduty#BadRequestException":
2610
- throw await de_BadRequestExceptionRes(parsedOutput, context);
2611
- case "InternalServerErrorException":
2612
- case "com.amazonaws.guardduty#InternalServerErrorException":
2613
- throw await de_InternalServerErrorExceptionRes(parsedOutput, context);
2614
- default:
2615
- const parsedBody = parsedOutput.body;
2616
- return throwDefaultError({
2617
- output,
2618
- parsedBody,
2619
- errorCode,
2620
- });
2621
- }
2622
- };
2623
1589
  export const de_ListInvitationsCommand = async (output, context) => {
2624
1590
  if (output.statusCode !== 200 && output.statusCode >= 300) {
2625
- return de_ListInvitationsCommandError(output, context);
1591
+ return de_CommandError(output, context);
2626
1592
  }
2627
1593
  const contents = map({
2628
1594
  $metadata: deserializeMetadata(output),
@@ -2635,31 +1601,9 @@ export const de_ListInvitationsCommand = async (output, context) => {
2635
1601
  Object.assign(contents, doc);
2636
1602
  return contents;
2637
1603
  };
2638
- const de_ListInvitationsCommandError = async (output, context) => {
2639
- const parsedOutput = {
2640
- ...output,
2641
- body: await parseErrorBody(output.body, context),
2642
- };
2643
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2644
- switch (errorCode) {
2645
- case "BadRequestException":
2646
- case "com.amazonaws.guardduty#BadRequestException":
2647
- throw await de_BadRequestExceptionRes(parsedOutput, context);
2648
- case "InternalServerErrorException":
2649
- case "com.amazonaws.guardduty#InternalServerErrorException":
2650
- throw await de_InternalServerErrorExceptionRes(parsedOutput, context);
2651
- default:
2652
- const parsedBody = parsedOutput.body;
2653
- return throwDefaultError({
2654
- output,
2655
- parsedBody,
2656
- errorCode,
2657
- });
2658
- }
2659
- };
2660
1604
  export const de_ListIPSetsCommand = async (output, context) => {
2661
1605
  if (output.statusCode !== 200 && output.statusCode >= 300) {
2662
- return de_ListIPSetsCommandError(output, context);
1606
+ return de_CommandError(output, context);
2663
1607
  }
2664
1608
  const contents = map({
2665
1609
  $metadata: deserializeMetadata(output),
@@ -2672,31 +1616,9 @@ export const de_ListIPSetsCommand = async (output, context) => {
2672
1616
  Object.assign(contents, doc);
2673
1617
  return contents;
2674
1618
  };
2675
- const de_ListIPSetsCommandError = async (output, context) => {
2676
- const parsedOutput = {
2677
- ...output,
2678
- body: await parseErrorBody(output.body, context),
2679
- };
2680
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2681
- switch (errorCode) {
2682
- case "BadRequestException":
2683
- case "com.amazonaws.guardduty#BadRequestException":
2684
- throw await de_BadRequestExceptionRes(parsedOutput, context);
2685
- case "InternalServerErrorException":
2686
- case "com.amazonaws.guardduty#InternalServerErrorException":
2687
- throw await de_InternalServerErrorExceptionRes(parsedOutput, context);
2688
- default:
2689
- const parsedBody = parsedOutput.body;
2690
- return throwDefaultError({
2691
- output,
2692
- parsedBody,
2693
- errorCode,
2694
- });
2695
- }
2696
- };
2697
1619
  export const de_ListMembersCommand = async (output, context) => {
2698
1620
  if (output.statusCode !== 200 && output.statusCode >= 300) {
2699
- return de_ListMembersCommandError(output, context);
1621
+ return de_CommandError(output, context);
2700
1622
  }
2701
1623
  const contents = map({
2702
1624
  $metadata: deserializeMetadata(output),
@@ -2709,31 +1631,9 @@ export const de_ListMembersCommand = async (output, context) => {
2709
1631
  Object.assign(contents, doc);
2710
1632
  return contents;
2711
1633
  };
2712
- const de_ListMembersCommandError = async (output, context) => {
2713
- const parsedOutput = {
2714
- ...output,
2715
- body: await parseErrorBody(output.body, context),
2716
- };
2717
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2718
- switch (errorCode) {
2719
- case "BadRequestException":
2720
- case "com.amazonaws.guardduty#BadRequestException":
2721
- throw await de_BadRequestExceptionRes(parsedOutput, context);
2722
- case "InternalServerErrorException":
2723
- case "com.amazonaws.guardduty#InternalServerErrorException":
2724
- throw await de_InternalServerErrorExceptionRes(parsedOutput, context);
2725
- default:
2726
- const parsedBody = parsedOutput.body;
2727
- return throwDefaultError({
2728
- output,
2729
- parsedBody,
2730
- errorCode,
2731
- });
2732
- }
2733
- };
2734
1634
  export const de_ListOrganizationAdminAccountsCommand = async (output, context) => {
2735
1635
  if (output.statusCode !== 200 && output.statusCode >= 300) {
2736
- return de_ListOrganizationAdminAccountsCommandError(output, context);
1636
+ return de_CommandError(output, context);
2737
1637
  }
2738
1638
  const contents = map({
2739
1639
  $metadata: deserializeMetadata(output),
@@ -2746,31 +1646,9 @@ export const de_ListOrganizationAdminAccountsCommand = async (output, context) =
2746
1646
  Object.assign(contents, doc);
2747
1647
  return contents;
2748
1648
  };
2749
- const de_ListOrganizationAdminAccountsCommandError = async (output, context) => {
2750
- const parsedOutput = {
2751
- ...output,
2752
- body: await parseErrorBody(output.body, context),
2753
- };
2754
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2755
- switch (errorCode) {
2756
- case "BadRequestException":
2757
- case "com.amazonaws.guardduty#BadRequestException":
2758
- throw await de_BadRequestExceptionRes(parsedOutput, context);
2759
- case "InternalServerErrorException":
2760
- case "com.amazonaws.guardduty#InternalServerErrorException":
2761
- throw await de_InternalServerErrorExceptionRes(parsedOutput, context);
2762
- default:
2763
- const parsedBody = parsedOutput.body;
2764
- return throwDefaultError({
2765
- output,
2766
- parsedBody,
2767
- errorCode,
2768
- });
2769
- }
2770
- };
2771
1649
  export const de_ListPublishingDestinationsCommand = async (output, context) => {
2772
1650
  if (output.statusCode !== 200 && output.statusCode >= 300) {
2773
- return de_ListPublishingDestinationsCommandError(output, context);
1651
+ return de_CommandError(output, context);
2774
1652
  }
2775
1653
  const contents = map({
2776
1654
  $metadata: deserializeMetadata(output),
@@ -2783,31 +1661,9 @@ export const de_ListPublishingDestinationsCommand = async (output, context) => {
2783
1661
  Object.assign(contents, doc);
2784
1662
  return contents;
2785
1663
  };
2786
- const de_ListPublishingDestinationsCommandError = async (output, context) => {
2787
- const parsedOutput = {
2788
- ...output,
2789
- body: await parseErrorBody(output.body, context),
2790
- };
2791
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2792
- switch (errorCode) {
2793
- case "BadRequestException":
2794
- case "com.amazonaws.guardduty#BadRequestException":
2795
- throw await de_BadRequestExceptionRes(parsedOutput, context);
2796
- case "InternalServerErrorException":
2797
- case "com.amazonaws.guardduty#InternalServerErrorException":
2798
- throw await de_InternalServerErrorExceptionRes(parsedOutput, context);
2799
- default:
2800
- const parsedBody = parsedOutput.body;
2801
- return throwDefaultError({
2802
- output,
2803
- parsedBody,
2804
- errorCode,
2805
- });
2806
- }
2807
- };
2808
1664
  export const de_ListTagsForResourceCommand = async (output, context) => {
2809
1665
  if (output.statusCode !== 200 && output.statusCode >= 300) {
2810
- return de_ListTagsForResourceCommandError(output, context);
1666
+ return de_CommandError(output, context);
2811
1667
  }
2812
1668
  const contents = map({
2813
1669
  $metadata: deserializeMetadata(output),
@@ -2819,34 +1675,9 @@ export const de_ListTagsForResourceCommand = async (output, context) => {
2819
1675
  Object.assign(contents, doc);
2820
1676
  return contents;
2821
1677
  };
2822
- const de_ListTagsForResourceCommandError = async (output, context) => {
2823
- const parsedOutput = {
2824
- ...output,
2825
- body: await parseErrorBody(output.body, context),
2826
- };
2827
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2828
- switch (errorCode) {
2829
- case "AccessDeniedException":
2830
- case "com.amazonaws.guardduty#AccessDeniedException":
2831
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
2832
- case "BadRequestException":
2833
- case "com.amazonaws.guardduty#BadRequestException":
2834
- throw await de_BadRequestExceptionRes(parsedOutput, context);
2835
- case "InternalServerErrorException":
2836
- case "com.amazonaws.guardduty#InternalServerErrorException":
2837
- throw await de_InternalServerErrorExceptionRes(parsedOutput, context);
2838
- default:
2839
- const parsedBody = parsedOutput.body;
2840
- return throwDefaultError({
2841
- output,
2842
- parsedBody,
2843
- errorCode,
2844
- });
2845
- }
2846
- };
2847
1678
  export const de_ListThreatIntelSetsCommand = async (output, context) => {
2848
1679
  if (output.statusCode !== 200 && output.statusCode >= 300) {
2849
- return de_ListThreatIntelSetsCommandError(output, context);
1680
+ return de_CommandError(output, context);
2850
1681
  }
2851
1682
  const contents = map({
2852
1683
  $metadata: deserializeMetadata(output),
@@ -2859,31 +1690,9 @@ export const de_ListThreatIntelSetsCommand = async (output, context) => {
2859
1690
  Object.assign(contents, doc);
2860
1691
  return contents;
2861
1692
  };
2862
- const de_ListThreatIntelSetsCommandError = async (output, context) => {
2863
- const parsedOutput = {
2864
- ...output,
2865
- body: await parseErrorBody(output.body, context),
2866
- };
2867
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2868
- switch (errorCode) {
2869
- case "BadRequestException":
2870
- case "com.amazonaws.guardduty#BadRequestException":
2871
- throw await de_BadRequestExceptionRes(parsedOutput, context);
2872
- case "InternalServerErrorException":
2873
- case "com.amazonaws.guardduty#InternalServerErrorException":
2874
- throw await de_InternalServerErrorExceptionRes(parsedOutput, context);
2875
- default:
2876
- const parsedBody = parsedOutput.body;
2877
- return throwDefaultError({
2878
- output,
2879
- parsedBody,
2880
- errorCode,
2881
- });
2882
- }
2883
- };
2884
1693
  export const de_StartMalwareScanCommand = async (output, context) => {
2885
1694
  if (output.statusCode !== 200 && output.statusCode >= 300) {
2886
- return de_StartMalwareScanCommandError(output, context);
1695
+ return de_CommandError(output, context);
2887
1696
  }
2888
1697
  const contents = map({
2889
1698
  $metadata: deserializeMetadata(output),
@@ -2895,34 +1704,9 @@ export const de_StartMalwareScanCommand = async (output, context) => {
2895
1704
  Object.assign(contents, doc);
2896
1705
  return contents;
2897
1706
  };
2898
- const de_StartMalwareScanCommandError = async (output, context) => {
2899
- const parsedOutput = {
2900
- ...output,
2901
- body: await parseErrorBody(output.body, context),
2902
- };
2903
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2904
- switch (errorCode) {
2905
- case "BadRequestException":
2906
- case "com.amazonaws.guardduty#BadRequestException":
2907
- throw await de_BadRequestExceptionRes(parsedOutput, context);
2908
- case "ConflictException":
2909
- case "com.amazonaws.guardduty#ConflictException":
2910
- throw await de_ConflictExceptionRes(parsedOutput, context);
2911
- case "InternalServerErrorException":
2912
- case "com.amazonaws.guardduty#InternalServerErrorException":
2913
- throw await de_InternalServerErrorExceptionRes(parsedOutput, context);
2914
- default:
2915
- const parsedBody = parsedOutput.body;
2916
- return throwDefaultError({
2917
- output,
2918
- parsedBody,
2919
- errorCode,
2920
- });
2921
- }
2922
- };
2923
1707
  export const de_StartMonitoringMembersCommand = async (output, context) => {
2924
1708
  if (output.statusCode !== 200 && output.statusCode >= 300) {
2925
- return de_StartMonitoringMembersCommandError(output, context);
1709
+ return de_CommandError(output, context);
2926
1710
  }
2927
1711
  const contents = map({
2928
1712
  $metadata: deserializeMetadata(output),
@@ -2934,31 +1718,9 @@ export const de_StartMonitoringMembersCommand = async (output, context) => {
2934
1718
  Object.assign(contents, doc);
2935
1719
  return contents;
2936
1720
  };
2937
- const de_StartMonitoringMembersCommandError = async (output, context) => {
2938
- const parsedOutput = {
2939
- ...output,
2940
- body: await parseErrorBody(output.body, context),
2941
- };
2942
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2943
- switch (errorCode) {
2944
- case "BadRequestException":
2945
- case "com.amazonaws.guardduty#BadRequestException":
2946
- throw await de_BadRequestExceptionRes(parsedOutput, context);
2947
- case "InternalServerErrorException":
2948
- case "com.amazonaws.guardduty#InternalServerErrorException":
2949
- throw await de_InternalServerErrorExceptionRes(parsedOutput, context);
2950
- default:
2951
- const parsedBody = parsedOutput.body;
2952
- return throwDefaultError({
2953
- output,
2954
- parsedBody,
2955
- errorCode,
2956
- });
2957
- }
2958
- };
2959
1721
  export const de_StopMonitoringMembersCommand = async (output, context) => {
2960
1722
  if (output.statusCode !== 200 && output.statusCode >= 300) {
2961
- return de_StopMonitoringMembersCommandError(output, context);
1723
+ return de_CommandError(output, context);
2962
1724
  }
2963
1725
  const contents = map({
2964
1726
  $metadata: deserializeMetadata(output),
@@ -2970,31 +1732,9 @@ export const de_StopMonitoringMembersCommand = async (output, context) => {
2970
1732
  Object.assign(contents, doc);
2971
1733
  return contents;
2972
1734
  };
2973
- const de_StopMonitoringMembersCommandError = async (output, context) => {
2974
- const parsedOutput = {
2975
- ...output,
2976
- body: await parseErrorBody(output.body, context),
2977
- };
2978
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2979
- switch (errorCode) {
2980
- case "BadRequestException":
2981
- case "com.amazonaws.guardduty#BadRequestException":
2982
- throw await de_BadRequestExceptionRes(parsedOutput, context);
2983
- case "InternalServerErrorException":
2984
- case "com.amazonaws.guardduty#InternalServerErrorException":
2985
- throw await de_InternalServerErrorExceptionRes(parsedOutput, context);
2986
- default:
2987
- const parsedBody = parsedOutput.body;
2988
- return throwDefaultError({
2989
- output,
2990
- parsedBody,
2991
- errorCode,
2992
- });
2993
- }
2994
- };
2995
1735
  export const de_TagResourceCommand = async (output, context) => {
2996
1736
  if (output.statusCode !== 204 && output.statusCode >= 300) {
2997
- return de_TagResourceCommandError(output, context);
1737
+ return de_CommandError(output, context);
2998
1738
  }
2999
1739
  const contents = map({
3000
1740
  $metadata: deserializeMetadata(output),
@@ -3002,34 +1742,9 @@ export const de_TagResourceCommand = async (output, context) => {
3002
1742
  await collectBody(output.body, context);
3003
1743
  return contents;
3004
1744
  };
3005
- const de_TagResourceCommandError = async (output, context) => {
3006
- const parsedOutput = {
3007
- ...output,
3008
- body: await parseErrorBody(output.body, context),
3009
- };
3010
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
3011
- switch (errorCode) {
3012
- case "AccessDeniedException":
3013
- case "com.amazonaws.guardduty#AccessDeniedException":
3014
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
3015
- case "BadRequestException":
3016
- case "com.amazonaws.guardduty#BadRequestException":
3017
- throw await de_BadRequestExceptionRes(parsedOutput, context);
3018
- case "InternalServerErrorException":
3019
- case "com.amazonaws.guardduty#InternalServerErrorException":
3020
- throw await de_InternalServerErrorExceptionRes(parsedOutput, context);
3021
- default:
3022
- const parsedBody = parsedOutput.body;
3023
- return throwDefaultError({
3024
- output,
3025
- parsedBody,
3026
- errorCode,
3027
- });
3028
- }
3029
- };
3030
1745
  export const de_UnarchiveFindingsCommand = async (output, context) => {
3031
1746
  if (output.statusCode !== 200 && output.statusCode >= 300) {
3032
- return de_UnarchiveFindingsCommandError(output, context);
1747
+ return de_CommandError(output, context);
3033
1748
  }
3034
1749
  const contents = map({
3035
1750
  $metadata: deserializeMetadata(output),
@@ -3037,31 +1752,9 @@ export const de_UnarchiveFindingsCommand = async (output, context) => {
3037
1752
  await collectBody(output.body, context);
3038
1753
  return contents;
3039
1754
  };
3040
- const de_UnarchiveFindingsCommandError = 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.guardduty#BadRequestException":
3049
- throw await de_BadRequestExceptionRes(parsedOutput, context);
3050
- case "InternalServerErrorException":
3051
- case "com.amazonaws.guardduty#InternalServerErrorException":
3052
- throw await de_InternalServerErrorExceptionRes(parsedOutput, context);
3053
- default:
3054
- const parsedBody = parsedOutput.body;
3055
- return throwDefaultError({
3056
- output,
3057
- parsedBody,
3058
- errorCode,
3059
- });
3060
- }
3061
- };
3062
1755
  export const de_UntagResourceCommand = async (output, context) => {
3063
1756
  if (output.statusCode !== 204 && output.statusCode >= 300) {
3064
- return de_UntagResourceCommandError(output, context);
1757
+ return de_CommandError(output, context);
3065
1758
  }
3066
1759
  const contents = map({
3067
1760
  $metadata: deserializeMetadata(output),
@@ -3069,34 +1762,9 @@ export const de_UntagResourceCommand = async (output, context) => {
3069
1762
  await collectBody(output.body, context);
3070
1763
  return contents;
3071
1764
  };
3072
- const de_UntagResourceCommandError = async (output, context) => {
3073
- const parsedOutput = {
3074
- ...output,
3075
- body: await parseErrorBody(output.body, context),
3076
- };
3077
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
3078
- switch (errorCode) {
3079
- case "AccessDeniedException":
3080
- case "com.amazonaws.guardduty#AccessDeniedException":
3081
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
3082
- case "BadRequestException":
3083
- case "com.amazonaws.guardduty#BadRequestException":
3084
- throw await de_BadRequestExceptionRes(parsedOutput, context);
3085
- case "InternalServerErrorException":
3086
- case "com.amazonaws.guardduty#InternalServerErrorException":
3087
- throw await de_InternalServerErrorExceptionRes(parsedOutput, context);
3088
- default:
3089
- const parsedBody = parsedOutput.body;
3090
- return throwDefaultError({
3091
- output,
3092
- parsedBody,
3093
- errorCode,
3094
- });
3095
- }
3096
- };
3097
1765
  export const de_UpdateDetectorCommand = async (output, context) => {
3098
1766
  if (output.statusCode !== 200 && output.statusCode >= 300) {
3099
- return de_UpdateDetectorCommandError(output, context);
1767
+ return de_CommandError(output, context);
3100
1768
  }
3101
1769
  const contents = map({
3102
1770
  $metadata: deserializeMetadata(output),
@@ -3104,31 +1772,9 @@ export const de_UpdateDetectorCommand = async (output, context) => {
3104
1772
  await collectBody(output.body, context);
3105
1773
  return contents;
3106
1774
  };
3107
- const de_UpdateDetectorCommandError = async (output, context) => {
3108
- const parsedOutput = {
3109
- ...output,
3110
- body: await parseErrorBody(output.body, context),
3111
- };
3112
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
3113
- switch (errorCode) {
3114
- case "BadRequestException":
3115
- case "com.amazonaws.guardduty#BadRequestException":
3116
- throw await de_BadRequestExceptionRes(parsedOutput, context);
3117
- case "InternalServerErrorException":
3118
- case "com.amazonaws.guardduty#InternalServerErrorException":
3119
- throw await de_InternalServerErrorExceptionRes(parsedOutput, context);
3120
- default:
3121
- const parsedBody = parsedOutput.body;
3122
- return throwDefaultError({
3123
- output,
3124
- parsedBody,
3125
- errorCode,
3126
- });
3127
- }
3128
- };
3129
1775
  export const de_UpdateFilterCommand = async (output, context) => {
3130
1776
  if (output.statusCode !== 200 && output.statusCode >= 300) {
3131
- return de_UpdateFilterCommandError(output, context);
1777
+ return de_CommandError(output, context);
3132
1778
  }
3133
1779
  const contents = map({
3134
1780
  $metadata: deserializeMetadata(output),
@@ -3140,31 +1786,9 @@ export const de_UpdateFilterCommand = async (output, context) => {
3140
1786
  Object.assign(contents, doc);
3141
1787
  return contents;
3142
1788
  };
3143
- const de_UpdateFilterCommandError = async (output, context) => {
3144
- const parsedOutput = {
3145
- ...output,
3146
- body: await parseErrorBody(output.body, context),
3147
- };
3148
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
3149
- switch (errorCode) {
3150
- case "BadRequestException":
3151
- case "com.amazonaws.guardduty#BadRequestException":
3152
- throw await de_BadRequestExceptionRes(parsedOutput, context);
3153
- case "InternalServerErrorException":
3154
- case "com.amazonaws.guardduty#InternalServerErrorException":
3155
- throw await de_InternalServerErrorExceptionRes(parsedOutput, context);
3156
- default:
3157
- const parsedBody = parsedOutput.body;
3158
- return throwDefaultError({
3159
- output,
3160
- parsedBody,
3161
- errorCode,
3162
- });
3163
- }
3164
- };
3165
1789
  export const de_UpdateFindingsFeedbackCommand = async (output, context) => {
3166
1790
  if (output.statusCode !== 200 && output.statusCode >= 300) {
3167
- return de_UpdateFindingsFeedbackCommandError(output, context);
1791
+ return de_CommandError(output, context);
3168
1792
  }
3169
1793
  const contents = map({
3170
1794
  $metadata: deserializeMetadata(output),
@@ -3172,31 +1796,9 @@ export const de_UpdateFindingsFeedbackCommand = async (output, context) => {
3172
1796
  await collectBody(output.body, context);
3173
1797
  return contents;
3174
1798
  };
3175
- const de_UpdateFindingsFeedbackCommandError = async (output, context) => {
3176
- const parsedOutput = {
3177
- ...output,
3178
- body: await parseErrorBody(output.body, context),
3179
- };
3180
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
3181
- switch (errorCode) {
3182
- case "BadRequestException":
3183
- case "com.amazonaws.guardduty#BadRequestException":
3184
- throw await de_BadRequestExceptionRes(parsedOutput, context);
3185
- case "InternalServerErrorException":
3186
- case "com.amazonaws.guardduty#InternalServerErrorException":
3187
- throw await de_InternalServerErrorExceptionRes(parsedOutput, context);
3188
- default:
3189
- const parsedBody = parsedOutput.body;
3190
- return throwDefaultError({
3191
- output,
3192
- parsedBody,
3193
- errorCode,
3194
- });
3195
- }
3196
- };
3197
1799
  export const de_UpdateIPSetCommand = async (output, context) => {
3198
1800
  if (output.statusCode !== 200 && output.statusCode >= 300) {
3199
- return de_UpdateIPSetCommandError(output, context);
1801
+ return de_CommandError(output, context);
3200
1802
  }
3201
1803
  const contents = map({
3202
1804
  $metadata: deserializeMetadata(output),
@@ -3204,31 +1806,9 @@ export const de_UpdateIPSetCommand = async (output, context) => {
3204
1806
  await collectBody(output.body, context);
3205
1807
  return contents;
3206
1808
  };
3207
- const de_UpdateIPSetCommandError = async (output, context) => {
3208
- const parsedOutput = {
3209
- ...output,
3210
- body: await parseErrorBody(output.body, context),
3211
- };
3212
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
3213
- switch (errorCode) {
3214
- case "BadRequestException":
3215
- case "com.amazonaws.guardduty#BadRequestException":
3216
- throw await de_BadRequestExceptionRes(parsedOutput, context);
3217
- case "InternalServerErrorException":
3218
- case "com.amazonaws.guardduty#InternalServerErrorException":
3219
- throw await de_InternalServerErrorExceptionRes(parsedOutput, context);
3220
- default:
3221
- const parsedBody = parsedOutput.body;
3222
- return throwDefaultError({
3223
- output,
3224
- parsedBody,
3225
- errorCode,
3226
- });
3227
- }
3228
- };
3229
1809
  export const de_UpdateMalwareScanSettingsCommand = async (output, context) => {
3230
1810
  if (output.statusCode !== 200 && output.statusCode >= 300) {
3231
- return de_UpdateMalwareScanSettingsCommandError(output, context);
1811
+ return de_CommandError(output, context);
3232
1812
  }
3233
1813
  const contents = map({
3234
1814
  $metadata: deserializeMetadata(output),
@@ -3236,31 +1816,9 @@ export const de_UpdateMalwareScanSettingsCommand = async (output, context) => {
3236
1816
  await collectBody(output.body, context);
3237
1817
  return contents;
3238
1818
  };
3239
- const de_UpdateMalwareScanSettingsCommandError = async (output, context) => {
3240
- const parsedOutput = {
3241
- ...output,
3242
- body: await parseErrorBody(output.body, context),
3243
- };
3244
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
3245
- switch (errorCode) {
3246
- case "BadRequestException":
3247
- case "com.amazonaws.guardduty#BadRequestException":
3248
- throw await de_BadRequestExceptionRes(parsedOutput, context);
3249
- case "InternalServerErrorException":
3250
- case "com.amazonaws.guardduty#InternalServerErrorException":
3251
- throw await de_InternalServerErrorExceptionRes(parsedOutput, context);
3252
- default:
3253
- const parsedBody = parsedOutput.body;
3254
- return throwDefaultError({
3255
- output,
3256
- parsedBody,
3257
- errorCode,
3258
- });
3259
- }
3260
- };
3261
1819
  export const de_UpdateMemberDetectorsCommand = async (output, context) => {
3262
1820
  if (output.statusCode !== 200 && output.statusCode >= 300) {
3263
- return de_UpdateMemberDetectorsCommandError(output, context);
1821
+ return de_CommandError(output, context);
3264
1822
  }
3265
1823
  const contents = map({
3266
1824
  $metadata: deserializeMetadata(output),
@@ -3272,31 +1830,9 @@ export const de_UpdateMemberDetectorsCommand = async (output, context) => {
3272
1830
  Object.assign(contents, doc);
3273
1831
  return contents;
3274
1832
  };
3275
- const de_UpdateMemberDetectorsCommandError = async (output, context) => {
3276
- const parsedOutput = {
3277
- ...output,
3278
- body: await parseErrorBody(output.body, context),
3279
- };
3280
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
3281
- switch (errorCode) {
3282
- case "BadRequestException":
3283
- case "com.amazonaws.guardduty#BadRequestException":
3284
- throw await de_BadRequestExceptionRes(parsedOutput, context);
3285
- case "InternalServerErrorException":
3286
- case "com.amazonaws.guardduty#InternalServerErrorException":
3287
- throw await de_InternalServerErrorExceptionRes(parsedOutput, context);
3288
- default:
3289
- const parsedBody = parsedOutput.body;
3290
- return throwDefaultError({
3291
- output,
3292
- parsedBody,
3293
- errorCode,
3294
- });
3295
- }
3296
- };
3297
1833
  export const de_UpdateOrganizationConfigurationCommand = async (output, context) => {
3298
1834
  if (output.statusCode !== 200 && output.statusCode >= 300) {
3299
- return de_UpdateOrganizationConfigurationCommandError(output, context);
1835
+ return de_CommandError(output, context);
3300
1836
  }
3301
1837
  const contents = map({
3302
1838
  $metadata: deserializeMetadata(output),
@@ -3304,31 +1840,9 @@ export const de_UpdateOrganizationConfigurationCommand = async (output, context)
3304
1840
  await collectBody(output.body, context);
3305
1841
  return contents;
3306
1842
  };
3307
- const de_UpdateOrganizationConfigurationCommandError = async (output, context) => {
3308
- const parsedOutput = {
3309
- ...output,
3310
- body: await parseErrorBody(output.body, context),
3311
- };
3312
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
3313
- switch (errorCode) {
3314
- case "BadRequestException":
3315
- case "com.amazonaws.guardduty#BadRequestException":
3316
- throw await de_BadRequestExceptionRes(parsedOutput, context);
3317
- case "InternalServerErrorException":
3318
- case "com.amazonaws.guardduty#InternalServerErrorException":
3319
- throw await de_InternalServerErrorExceptionRes(parsedOutput, context);
3320
- default:
3321
- const parsedBody = parsedOutput.body;
3322
- return throwDefaultError({
3323
- output,
3324
- parsedBody,
3325
- errorCode,
3326
- });
3327
- }
3328
- };
3329
1843
  export const de_UpdatePublishingDestinationCommand = async (output, context) => {
3330
1844
  if (output.statusCode !== 200 && output.statusCode >= 300) {
3331
- return de_UpdatePublishingDestinationCommandError(output, context);
1845
+ return de_CommandError(output, context);
3332
1846
  }
3333
1847
  const contents = map({
3334
1848
  $metadata: deserializeMetadata(output),
@@ -3336,31 +1850,9 @@ export const de_UpdatePublishingDestinationCommand = async (output, context) =>
3336
1850
  await collectBody(output.body, context);
3337
1851
  return contents;
3338
1852
  };
3339
- const de_UpdatePublishingDestinationCommandError = async (output, context) => {
3340
- const parsedOutput = {
3341
- ...output,
3342
- body: await parseErrorBody(output.body, context),
3343
- };
3344
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
3345
- switch (errorCode) {
3346
- case "BadRequestException":
3347
- case "com.amazonaws.guardduty#BadRequestException":
3348
- throw await de_BadRequestExceptionRes(parsedOutput, context);
3349
- case "InternalServerErrorException":
3350
- case "com.amazonaws.guardduty#InternalServerErrorException":
3351
- throw await de_InternalServerErrorExceptionRes(parsedOutput, context);
3352
- default:
3353
- const parsedBody = parsedOutput.body;
3354
- return throwDefaultError({
3355
- output,
3356
- parsedBody,
3357
- errorCode,
3358
- });
3359
- }
3360
- };
3361
1853
  export const de_UpdateThreatIntelSetCommand = async (output, context) => {
3362
1854
  if (output.statusCode !== 200 && output.statusCode >= 300) {
3363
- return de_UpdateThreatIntelSetCommandError(output, context);
1855
+ return de_CommandError(output, context);
3364
1856
  }
3365
1857
  const contents = map({
3366
1858
  $metadata: deserializeMetadata(output),
@@ -3368,7 +1860,7 @@ export const de_UpdateThreatIntelSetCommand = async (output, context) => {
3368
1860
  await collectBody(output.body, context);
3369
1861
  return contents;
3370
1862
  };
3371
- const de_UpdateThreatIntelSetCommandError = async (output, context) => {
1863
+ const de_CommandError = async (output, context) => {
3372
1864
  const parsedOutput = {
3373
1865
  ...output,
3374
1866
  body: await parseErrorBody(output.body, context),
@@ -3381,6 +1873,12 @@ const de_UpdateThreatIntelSetCommandError = async (output, context) => {
3381
1873
  case "InternalServerErrorException":
3382
1874
  case "com.amazonaws.guardduty#InternalServerErrorException":
3383
1875
  throw await de_InternalServerErrorExceptionRes(parsedOutput, context);
1876
+ case "AccessDeniedException":
1877
+ case "com.amazonaws.guardduty#AccessDeniedException":
1878
+ throw await de_AccessDeniedExceptionRes(parsedOutput, context);
1879
+ case "ConflictException":
1880
+ case "com.amazonaws.guardduty#ConflictException":
1881
+ throw await de_ConflictExceptionRes(parsedOutput, context);
3384
1882
  default:
3385
1883
  const parsedBody = parsedOutput.body;
3386
1884
  return throwDefaultError({