@aws-sdk/client-cloudwatch-events 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.
package/dist-cjs/index.js CHANGED
@@ -941,7 +941,7 @@ var se_UpdateConnectionCommand = /* @__PURE__ */ __name(async (input, context) =
941
941
  }, "se_UpdateConnectionCommand");
942
942
  var de_ActivateEventSourceCommand = /* @__PURE__ */ __name(async (output, context) => {
943
943
  if (output.statusCode >= 300) {
944
- return de_ActivateEventSourceCommandError(output, context);
944
+ return de_CommandError(output, context);
945
945
  }
946
946
  await (0, import_smithy_client.collectBody)(output.body, context);
947
947
  const response = {
@@ -949,40 +949,9 @@ var de_ActivateEventSourceCommand = /* @__PURE__ */ __name(async (output, contex
949
949
  };
950
950
  return response;
951
951
  }, "de_ActivateEventSourceCommand");
952
- var de_ActivateEventSourceCommandError = /* @__PURE__ */ __name(async (output, context) => {
953
- const parsedOutput = {
954
- ...output,
955
- body: await parseErrorBody(output.body, context)
956
- };
957
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
958
- switch (errorCode) {
959
- case "ConcurrentModificationException":
960
- case "com.amazonaws.cloudwatchevents#ConcurrentModificationException":
961
- throw await de_ConcurrentModificationExceptionRes(parsedOutput, context);
962
- case "InternalException":
963
- case "com.amazonaws.cloudwatchevents#InternalException":
964
- throw await de_InternalExceptionRes(parsedOutput, context);
965
- case "InvalidStateException":
966
- case "com.amazonaws.cloudwatchevents#InvalidStateException":
967
- throw await de_InvalidStateExceptionRes(parsedOutput, context);
968
- case "OperationDisabledException":
969
- case "com.amazonaws.cloudwatchevents#OperationDisabledException":
970
- throw await de_OperationDisabledExceptionRes(parsedOutput, context);
971
- case "ResourceNotFoundException":
972
- case "com.amazonaws.cloudwatchevents#ResourceNotFoundException":
973
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
974
- default:
975
- const parsedBody = parsedOutput.body;
976
- return throwDefaultError({
977
- output,
978
- parsedBody,
979
- errorCode
980
- });
981
- }
982
- }, "de_ActivateEventSourceCommandError");
983
952
  var de_CancelReplayCommand = /* @__PURE__ */ __name(async (output, context) => {
984
953
  if (output.statusCode >= 300) {
985
- return de_CancelReplayCommandError(output, context);
954
+ return de_CommandError(output, context);
986
955
  }
987
956
  const data = await parseBody(output.body, context);
988
957
  let contents = {};
@@ -993,37 +962,9 @@ var de_CancelReplayCommand = /* @__PURE__ */ __name(async (output, context) => {
993
962
  };
994
963
  return response;
995
964
  }, "de_CancelReplayCommand");
996
- var de_CancelReplayCommandError = /* @__PURE__ */ __name(async (output, context) => {
997
- const parsedOutput = {
998
- ...output,
999
- body: await parseErrorBody(output.body, context)
1000
- };
1001
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1002
- switch (errorCode) {
1003
- case "ConcurrentModificationException":
1004
- case "com.amazonaws.cloudwatchevents#ConcurrentModificationException":
1005
- throw await de_ConcurrentModificationExceptionRes(parsedOutput, context);
1006
- case "IllegalStatusException":
1007
- case "com.amazonaws.cloudwatchevents#IllegalStatusException":
1008
- throw await de_IllegalStatusExceptionRes(parsedOutput, context);
1009
- case "InternalException":
1010
- case "com.amazonaws.cloudwatchevents#InternalException":
1011
- throw await de_InternalExceptionRes(parsedOutput, context);
1012
- case "ResourceNotFoundException":
1013
- case "com.amazonaws.cloudwatchevents#ResourceNotFoundException":
1014
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
1015
- default:
1016
- const parsedBody = parsedOutput.body;
1017
- return throwDefaultError({
1018
- output,
1019
- parsedBody,
1020
- errorCode
1021
- });
1022
- }
1023
- }, "de_CancelReplayCommandError");
1024
965
  var de_CreateApiDestinationCommand = /* @__PURE__ */ __name(async (output, context) => {
1025
966
  if (output.statusCode >= 300) {
1026
- return de_CreateApiDestinationCommandError(output, context);
967
+ return de_CommandError(output, context);
1027
968
  }
1028
969
  const data = await parseBody(output.body, context);
1029
970
  let contents = {};
@@ -1034,37 +975,9 @@ var de_CreateApiDestinationCommand = /* @__PURE__ */ __name(async (output, conte
1034
975
  };
1035
976
  return response;
1036
977
  }, "de_CreateApiDestinationCommand");
1037
- var de_CreateApiDestinationCommandError = /* @__PURE__ */ __name(async (output, context) => {
1038
- const parsedOutput = {
1039
- ...output,
1040
- body: await parseErrorBody(output.body, context)
1041
- };
1042
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1043
- switch (errorCode) {
1044
- case "InternalException":
1045
- case "com.amazonaws.cloudwatchevents#InternalException":
1046
- throw await de_InternalExceptionRes(parsedOutput, context);
1047
- case "LimitExceededException":
1048
- case "com.amazonaws.cloudwatchevents#LimitExceededException":
1049
- throw await de_LimitExceededExceptionRes(parsedOutput, context);
1050
- case "ResourceAlreadyExistsException":
1051
- case "com.amazonaws.cloudwatchevents#ResourceAlreadyExistsException":
1052
- throw await de_ResourceAlreadyExistsExceptionRes(parsedOutput, context);
1053
- case "ResourceNotFoundException":
1054
- case "com.amazonaws.cloudwatchevents#ResourceNotFoundException":
1055
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
1056
- default:
1057
- const parsedBody = parsedOutput.body;
1058
- return throwDefaultError({
1059
- output,
1060
- parsedBody,
1061
- errorCode
1062
- });
1063
- }
1064
- }, "de_CreateApiDestinationCommandError");
1065
978
  var de_CreateArchiveCommand = /* @__PURE__ */ __name(async (output, context) => {
1066
979
  if (output.statusCode >= 300) {
1067
- return de_CreateArchiveCommandError(output, context);
980
+ return de_CommandError(output, context);
1068
981
  }
1069
982
  const data = await parseBody(output.body, context);
1070
983
  let contents = {};
@@ -1075,43 +988,9 @@ var de_CreateArchiveCommand = /* @__PURE__ */ __name(async (output, context) =>
1075
988
  };
1076
989
  return response;
1077
990
  }, "de_CreateArchiveCommand");
1078
- var de_CreateArchiveCommandError = /* @__PURE__ */ __name(async (output, context) => {
1079
- const parsedOutput = {
1080
- ...output,
1081
- body: await parseErrorBody(output.body, context)
1082
- };
1083
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1084
- switch (errorCode) {
1085
- case "ConcurrentModificationException":
1086
- case "com.amazonaws.cloudwatchevents#ConcurrentModificationException":
1087
- throw await de_ConcurrentModificationExceptionRes(parsedOutput, context);
1088
- case "InternalException":
1089
- case "com.amazonaws.cloudwatchevents#InternalException":
1090
- throw await de_InternalExceptionRes(parsedOutput, context);
1091
- case "InvalidEventPatternException":
1092
- case "com.amazonaws.cloudwatchevents#InvalidEventPatternException":
1093
- throw await de_InvalidEventPatternExceptionRes(parsedOutput, context);
1094
- case "LimitExceededException":
1095
- case "com.amazonaws.cloudwatchevents#LimitExceededException":
1096
- throw await de_LimitExceededExceptionRes(parsedOutput, context);
1097
- case "ResourceAlreadyExistsException":
1098
- case "com.amazonaws.cloudwatchevents#ResourceAlreadyExistsException":
1099
- throw await de_ResourceAlreadyExistsExceptionRes(parsedOutput, context);
1100
- case "ResourceNotFoundException":
1101
- case "com.amazonaws.cloudwatchevents#ResourceNotFoundException":
1102
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
1103
- default:
1104
- const parsedBody = parsedOutput.body;
1105
- return throwDefaultError({
1106
- output,
1107
- parsedBody,
1108
- errorCode
1109
- });
1110
- }
1111
- }, "de_CreateArchiveCommandError");
1112
991
  var de_CreateConnectionCommand = /* @__PURE__ */ __name(async (output, context) => {
1113
992
  if (output.statusCode >= 300) {
1114
- return de_CreateConnectionCommandError(output, context);
993
+ return de_CommandError(output, context);
1115
994
  }
1116
995
  const data = await parseBody(output.body, context);
1117
996
  let contents = {};
@@ -1122,34 +1001,9 @@ var de_CreateConnectionCommand = /* @__PURE__ */ __name(async (output, context)
1122
1001
  };
1123
1002
  return response;
1124
1003
  }, "de_CreateConnectionCommand");
1125
- var de_CreateConnectionCommandError = /* @__PURE__ */ __name(async (output, context) => {
1126
- const parsedOutput = {
1127
- ...output,
1128
- body: await parseErrorBody(output.body, context)
1129
- };
1130
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1131
- switch (errorCode) {
1132
- case "InternalException":
1133
- case "com.amazonaws.cloudwatchevents#InternalException":
1134
- throw await de_InternalExceptionRes(parsedOutput, context);
1135
- case "LimitExceededException":
1136
- case "com.amazonaws.cloudwatchevents#LimitExceededException":
1137
- throw await de_LimitExceededExceptionRes(parsedOutput, context);
1138
- case "ResourceAlreadyExistsException":
1139
- case "com.amazonaws.cloudwatchevents#ResourceAlreadyExistsException":
1140
- throw await de_ResourceAlreadyExistsExceptionRes(parsedOutput, context);
1141
- default:
1142
- const parsedBody = parsedOutput.body;
1143
- return throwDefaultError({
1144
- output,
1145
- parsedBody,
1146
- errorCode
1147
- });
1148
- }
1149
- }, "de_CreateConnectionCommandError");
1150
1004
  var de_CreateEventBusCommand = /* @__PURE__ */ __name(async (output, context) => {
1151
1005
  if (output.statusCode >= 300) {
1152
- return de_CreateEventBusCommandError(output, context);
1006
+ return de_CommandError(output, context);
1153
1007
  }
1154
1008
  const data = await parseBody(output.body, context);
1155
1009
  let contents = {};
@@ -1160,46 +1014,9 @@ var de_CreateEventBusCommand = /* @__PURE__ */ __name(async (output, context) =>
1160
1014
  };
1161
1015
  return response;
1162
1016
  }, "de_CreateEventBusCommand");
1163
- var de_CreateEventBusCommandError = /* @__PURE__ */ __name(async (output, context) => {
1164
- const parsedOutput = {
1165
- ...output,
1166
- body: await parseErrorBody(output.body, context)
1167
- };
1168
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1169
- switch (errorCode) {
1170
- case "ConcurrentModificationException":
1171
- case "com.amazonaws.cloudwatchevents#ConcurrentModificationException":
1172
- throw await de_ConcurrentModificationExceptionRes(parsedOutput, context);
1173
- case "InternalException":
1174
- case "com.amazonaws.cloudwatchevents#InternalException":
1175
- throw await de_InternalExceptionRes(parsedOutput, context);
1176
- case "InvalidStateException":
1177
- case "com.amazonaws.cloudwatchevents#InvalidStateException":
1178
- throw await de_InvalidStateExceptionRes(parsedOutput, context);
1179
- case "LimitExceededException":
1180
- case "com.amazonaws.cloudwatchevents#LimitExceededException":
1181
- throw await de_LimitExceededExceptionRes(parsedOutput, context);
1182
- case "OperationDisabledException":
1183
- case "com.amazonaws.cloudwatchevents#OperationDisabledException":
1184
- throw await de_OperationDisabledExceptionRes(parsedOutput, context);
1185
- case "ResourceAlreadyExistsException":
1186
- case "com.amazonaws.cloudwatchevents#ResourceAlreadyExistsException":
1187
- throw await de_ResourceAlreadyExistsExceptionRes(parsedOutput, context);
1188
- case "ResourceNotFoundException":
1189
- case "com.amazonaws.cloudwatchevents#ResourceNotFoundException":
1190
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
1191
- default:
1192
- const parsedBody = parsedOutput.body;
1193
- return throwDefaultError({
1194
- output,
1195
- parsedBody,
1196
- errorCode
1197
- });
1198
- }
1199
- }, "de_CreateEventBusCommandError");
1200
1017
  var de_CreatePartnerEventSourceCommand = /* @__PURE__ */ __name(async (output, context) => {
1201
1018
  if (output.statusCode >= 300) {
1202
- return de_CreatePartnerEventSourceCommandError(output, context);
1019
+ return de_CommandError(output, context);
1203
1020
  }
1204
1021
  const data = await parseBody(output.body, context);
1205
1022
  let contents = {};
@@ -1210,40 +1027,9 @@ var de_CreatePartnerEventSourceCommand = /* @__PURE__ */ __name(async (output, c
1210
1027
  };
1211
1028
  return response;
1212
1029
  }, "de_CreatePartnerEventSourceCommand");
1213
- var de_CreatePartnerEventSourceCommandError = /* @__PURE__ */ __name(async (output, context) => {
1214
- const parsedOutput = {
1215
- ...output,
1216
- body: await parseErrorBody(output.body, context)
1217
- };
1218
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1219
- switch (errorCode) {
1220
- case "ConcurrentModificationException":
1221
- case "com.amazonaws.cloudwatchevents#ConcurrentModificationException":
1222
- throw await de_ConcurrentModificationExceptionRes(parsedOutput, context);
1223
- case "InternalException":
1224
- case "com.amazonaws.cloudwatchevents#InternalException":
1225
- throw await de_InternalExceptionRes(parsedOutput, context);
1226
- case "LimitExceededException":
1227
- case "com.amazonaws.cloudwatchevents#LimitExceededException":
1228
- throw await de_LimitExceededExceptionRes(parsedOutput, context);
1229
- case "OperationDisabledException":
1230
- case "com.amazonaws.cloudwatchevents#OperationDisabledException":
1231
- throw await de_OperationDisabledExceptionRes(parsedOutput, context);
1232
- case "ResourceAlreadyExistsException":
1233
- case "com.amazonaws.cloudwatchevents#ResourceAlreadyExistsException":
1234
- throw await de_ResourceAlreadyExistsExceptionRes(parsedOutput, context);
1235
- default:
1236
- const parsedBody = parsedOutput.body;
1237
- return throwDefaultError({
1238
- output,
1239
- parsedBody,
1240
- errorCode
1241
- });
1242
- }
1243
- }, "de_CreatePartnerEventSourceCommandError");
1244
1030
  var de_DeactivateEventSourceCommand = /* @__PURE__ */ __name(async (output, context) => {
1245
1031
  if (output.statusCode >= 300) {
1246
- return de_DeactivateEventSourceCommandError(output, context);
1032
+ return de_CommandError(output, context);
1247
1033
  }
1248
1034
  await (0, import_smithy_client.collectBody)(output.body, context);
1249
1035
  const response = {
@@ -1251,40 +1037,9 @@ var de_DeactivateEventSourceCommand = /* @__PURE__ */ __name(async (output, cont
1251
1037
  };
1252
1038
  return response;
1253
1039
  }, "de_DeactivateEventSourceCommand");
1254
- var de_DeactivateEventSourceCommandError = /* @__PURE__ */ __name(async (output, context) => {
1255
- const parsedOutput = {
1256
- ...output,
1257
- body: await parseErrorBody(output.body, context)
1258
- };
1259
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1260
- switch (errorCode) {
1261
- case "ConcurrentModificationException":
1262
- case "com.amazonaws.cloudwatchevents#ConcurrentModificationException":
1263
- throw await de_ConcurrentModificationExceptionRes(parsedOutput, context);
1264
- case "InternalException":
1265
- case "com.amazonaws.cloudwatchevents#InternalException":
1266
- throw await de_InternalExceptionRes(parsedOutput, context);
1267
- case "InvalidStateException":
1268
- case "com.amazonaws.cloudwatchevents#InvalidStateException":
1269
- throw await de_InvalidStateExceptionRes(parsedOutput, context);
1270
- case "OperationDisabledException":
1271
- case "com.amazonaws.cloudwatchevents#OperationDisabledException":
1272
- throw await de_OperationDisabledExceptionRes(parsedOutput, context);
1273
- case "ResourceNotFoundException":
1274
- case "com.amazonaws.cloudwatchevents#ResourceNotFoundException":
1275
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
1276
- default:
1277
- const parsedBody = parsedOutput.body;
1278
- return throwDefaultError({
1279
- output,
1280
- parsedBody,
1281
- errorCode
1282
- });
1283
- }
1284
- }, "de_DeactivateEventSourceCommandError");
1285
1040
  var de_DeauthorizeConnectionCommand = /* @__PURE__ */ __name(async (output, context) => {
1286
1041
  if (output.statusCode >= 300) {
1287
- return de_DeauthorizeConnectionCommandError(output, context);
1042
+ return de_CommandError(output, context);
1288
1043
  }
1289
1044
  const data = await parseBody(output.body, context);
1290
1045
  let contents = {};
@@ -1295,34 +1050,9 @@ var de_DeauthorizeConnectionCommand = /* @__PURE__ */ __name(async (output, cont
1295
1050
  };
1296
1051
  return response;
1297
1052
  }, "de_DeauthorizeConnectionCommand");
1298
- var de_DeauthorizeConnectionCommandError = /* @__PURE__ */ __name(async (output, context) => {
1299
- const parsedOutput = {
1300
- ...output,
1301
- body: await parseErrorBody(output.body, context)
1302
- };
1303
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1304
- switch (errorCode) {
1305
- case "ConcurrentModificationException":
1306
- case "com.amazonaws.cloudwatchevents#ConcurrentModificationException":
1307
- throw await de_ConcurrentModificationExceptionRes(parsedOutput, context);
1308
- case "InternalException":
1309
- case "com.amazonaws.cloudwatchevents#InternalException":
1310
- throw await de_InternalExceptionRes(parsedOutput, context);
1311
- case "ResourceNotFoundException":
1312
- case "com.amazonaws.cloudwatchevents#ResourceNotFoundException":
1313
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
1314
- default:
1315
- const parsedBody = parsedOutput.body;
1316
- return throwDefaultError({
1317
- output,
1318
- parsedBody,
1319
- errorCode
1320
- });
1321
- }
1322
- }, "de_DeauthorizeConnectionCommandError");
1323
1053
  var de_DeleteApiDestinationCommand = /* @__PURE__ */ __name(async (output, context) => {
1324
1054
  if (output.statusCode >= 300) {
1325
- return de_DeleteApiDestinationCommandError(output, context);
1055
+ return de_CommandError(output, context);
1326
1056
  }
1327
1057
  const data = await parseBody(output.body, context);
1328
1058
  let contents = {};
@@ -1333,34 +1063,9 @@ var de_DeleteApiDestinationCommand = /* @__PURE__ */ __name(async (output, conte
1333
1063
  };
1334
1064
  return response;
1335
1065
  }, "de_DeleteApiDestinationCommand");
1336
- var de_DeleteApiDestinationCommandError = /* @__PURE__ */ __name(async (output, context) => {
1337
- const parsedOutput = {
1338
- ...output,
1339
- body: await parseErrorBody(output.body, context)
1340
- };
1341
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1342
- switch (errorCode) {
1343
- case "ConcurrentModificationException":
1344
- case "com.amazonaws.cloudwatchevents#ConcurrentModificationException":
1345
- throw await de_ConcurrentModificationExceptionRes(parsedOutput, context);
1346
- case "InternalException":
1347
- case "com.amazonaws.cloudwatchevents#InternalException":
1348
- throw await de_InternalExceptionRes(parsedOutput, context);
1349
- case "ResourceNotFoundException":
1350
- case "com.amazonaws.cloudwatchevents#ResourceNotFoundException":
1351
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
1352
- default:
1353
- const parsedBody = parsedOutput.body;
1354
- return throwDefaultError({
1355
- output,
1356
- parsedBody,
1357
- errorCode
1358
- });
1359
- }
1360
- }, "de_DeleteApiDestinationCommandError");
1361
1066
  var de_DeleteArchiveCommand = /* @__PURE__ */ __name(async (output, context) => {
1362
1067
  if (output.statusCode >= 300) {
1363
- return de_DeleteArchiveCommandError(output, context);
1068
+ return de_CommandError(output, context);
1364
1069
  }
1365
1070
  const data = await parseBody(output.body, context);
1366
1071
  let contents = {};
@@ -1371,34 +1076,9 @@ var de_DeleteArchiveCommand = /* @__PURE__ */ __name(async (output, context) =>
1371
1076
  };
1372
1077
  return response;
1373
1078
  }, "de_DeleteArchiveCommand");
1374
- var de_DeleteArchiveCommandError = /* @__PURE__ */ __name(async (output, context) => {
1375
- const parsedOutput = {
1376
- ...output,
1377
- body: await parseErrorBody(output.body, context)
1378
- };
1379
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1380
- switch (errorCode) {
1381
- case "ConcurrentModificationException":
1382
- case "com.amazonaws.cloudwatchevents#ConcurrentModificationException":
1383
- throw await de_ConcurrentModificationExceptionRes(parsedOutput, context);
1384
- case "InternalException":
1385
- case "com.amazonaws.cloudwatchevents#InternalException":
1386
- throw await de_InternalExceptionRes(parsedOutput, context);
1387
- case "ResourceNotFoundException":
1388
- case "com.amazonaws.cloudwatchevents#ResourceNotFoundException":
1389
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
1390
- default:
1391
- const parsedBody = parsedOutput.body;
1392
- return throwDefaultError({
1393
- output,
1394
- parsedBody,
1395
- errorCode
1396
- });
1397
- }
1398
- }, "de_DeleteArchiveCommandError");
1399
1079
  var de_DeleteConnectionCommand = /* @__PURE__ */ __name(async (output, context) => {
1400
1080
  if (output.statusCode >= 300) {
1401
- return de_DeleteConnectionCommandError(output, context);
1081
+ return de_CommandError(output, context);
1402
1082
  }
1403
1083
  const data = await parseBody(output.body, context);
1404
1084
  let contents = {};
@@ -1409,34 +1089,9 @@ var de_DeleteConnectionCommand = /* @__PURE__ */ __name(async (output, context)
1409
1089
  };
1410
1090
  return response;
1411
1091
  }, "de_DeleteConnectionCommand");
1412
- var de_DeleteConnectionCommandError = /* @__PURE__ */ __name(async (output, context) => {
1413
- const parsedOutput = {
1414
- ...output,
1415
- body: await parseErrorBody(output.body, context)
1416
- };
1417
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1418
- switch (errorCode) {
1419
- case "ConcurrentModificationException":
1420
- case "com.amazonaws.cloudwatchevents#ConcurrentModificationException":
1421
- throw await de_ConcurrentModificationExceptionRes(parsedOutput, context);
1422
- case "InternalException":
1423
- case "com.amazonaws.cloudwatchevents#InternalException":
1424
- throw await de_InternalExceptionRes(parsedOutput, context);
1425
- case "ResourceNotFoundException":
1426
- case "com.amazonaws.cloudwatchevents#ResourceNotFoundException":
1427
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
1428
- default:
1429
- const parsedBody = parsedOutput.body;
1430
- return throwDefaultError({
1431
- output,
1432
- parsedBody,
1433
- errorCode
1434
- });
1435
- }
1436
- }, "de_DeleteConnectionCommandError");
1437
1092
  var de_DeleteEventBusCommand = /* @__PURE__ */ __name(async (output, context) => {
1438
1093
  if (output.statusCode >= 300) {
1439
- return de_DeleteEventBusCommandError(output, context);
1094
+ return de_CommandError(output, context);
1440
1095
  }
1441
1096
  await (0, import_smithy_client.collectBody)(output.body, context);
1442
1097
  const response = {
@@ -1444,31 +1099,9 @@ var de_DeleteEventBusCommand = /* @__PURE__ */ __name(async (output, context) =>
1444
1099
  };
1445
1100
  return response;
1446
1101
  }, "de_DeleteEventBusCommand");
1447
- var de_DeleteEventBusCommandError = /* @__PURE__ */ __name(async (output, context) => {
1448
- const parsedOutput = {
1449
- ...output,
1450
- body: await parseErrorBody(output.body, context)
1451
- };
1452
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1453
- switch (errorCode) {
1454
- case "ConcurrentModificationException":
1455
- case "com.amazonaws.cloudwatchevents#ConcurrentModificationException":
1456
- throw await de_ConcurrentModificationExceptionRes(parsedOutput, context);
1457
- case "InternalException":
1458
- case "com.amazonaws.cloudwatchevents#InternalException":
1459
- throw await de_InternalExceptionRes(parsedOutput, context);
1460
- default:
1461
- const parsedBody = parsedOutput.body;
1462
- return throwDefaultError({
1463
- output,
1464
- parsedBody,
1465
- errorCode
1466
- });
1467
- }
1468
- }, "de_DeleteEventBusCommandError");
1469
1102
  var de_DeletePartnerEventSourceCommand = /* @__PURE__ */ __name(async (output, context) => {
1470
1103
  if (output.statusCode >= 300) {
1471
- return de_DeletePartnerEventSourceCommandError(output, context);
1104
+ return de_CommandError(output, context);
1472
1105
  }
1473
1106
  await (0, import_smithy_client.collectBody)(output.body, context);
1474
1107
  const response = {
@@ -1476,34 +1109,9 @@ var de_DeletePartnerEventSourceCommand = /* @__PURE__ */ __name(async (output, c
1476
1109
  };
1477
1110
  return response;
1478
1111
  }, "de_DeletePartnerEventSourceCommand");
1479
- var de_DeletePartnerEventSourceCommandError = /* @__PURE__ */ __name(async (output, context) => {
1480
- const parsedOutput = {
1481
- ...output,
1482
- body: await parseErrorBody(output.body, context)
1483
- };
1484
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1485
- switch (errorCode) {
1486
- case "ConcurrentModificationException":
1487
- case "com.amazonaws.cloudwatchevents#ConcurrentModificationException":
1488
- throw await de_ConcurrentModificationExceptionRes(parsedOutput, context);
1489
- case "InternalException":
1490
- case "com.amazonaws.cloudwatchevents#InternalException":
1491
- throw await de_InternalExceptionRes(parsedOutput, context);
1492
- case "OperationDisabledException":
1493
- case "com.amazonaws.cloudwatchevents#OperationDisabledException":
1494
- throw await de_OperationDisabledExceptionRes(parsedOutput, context);
1495
- default:
1496
- const parsedBody = parsedOutput.body;
1497
- return throwDefaultError({
1498
- output,
1499
- parsedBody,
1500
- errorCode
1501
- });
1502
- }
1503
- }, "de_DeletePartnerEventSourceCommandError");
1504
1112
  var de_DeleteRuleCommand = /* @__PURE__ */ __name(async (output, context) => {
1505
1113
  if (output.statusCode >= 300) {
1506
- return de_DeleteRuleCommandError(output, context);
1114
+ return de_CommandError(output, context);
1507
1115
  }
1508
1116
  await (0, import_smithy_client.collectBody)(output.body, context);
1509
1117
  const response = {
@@ -1511,37 +1119,9 @@ var de_DeleteRuleCommand = /* @__PURE__ */ __name(async (output, context) => {
1511
1119
  };
1512
1120
  return response;
1513
1121
  }, "de_DeleteRuleCommand");
1514
- var de_DeleteRuleCommandError = /* @__PURE__ */ __name(async (output, context) => {
1515
- const parsedOutput = {
1516
- ...output,
1517
- body: await parseErrorBody(output.body, context)
1518
- };
1519
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1520
- switch (errorCode) {
1521
- case "ConcurrentModificationException":
1522
- case "com.amazonaws.cloudwatchevents#ConcurrentModificationException":
1523
- throw await de_ConcurrentModificationExceptionRes(parsedOutput, context);
1524
- case "InternalException":
1525
- case "com.amazonaws.cloudwatchevents#InternalException":
1526
- throw await de_InternalExceptionRes(parsedOutput, context);
1527
- case "ManagedRuleException":
1528
- case "com.amazonaws.cloudwatchevents#ManagedRuleException":
1529
- throw await de_ManagedRuleExceptionRes(parsedOutput, context);
1530
- case "ResourceNotFoundException":
1531
- case "com.amazonaws.cloudwatchevents#ResourceNotFoundException":
1532
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
1533
- default:
1534
- const parsedBody = parsedOutput.body;
1535
- return throwDefaultError({
1536
- output,
1537
- parsedBody,
1538
- errorCode
1539
- });
1540
- }
1541
- }, "de_DeleteRuleCommandError");
1542
1122
  var de_DescribeApiDestinationCommand = /* @__PURE__ */ __name(async (output, context) => {
1543
1123
  if (output.statusCode >= 300) {
1544
- return de_DescribeApiDestinationCommandError(output, context);
1124
+ return de_CommandError(output, context);
1545
1125
  }
1546
1126
  const data = await parseBody(output.body, context);
1547
1127
  let contents = {};
@@ -1552,31 +1132,9 @@ var de_DescribeApiDestinationCommand = /* @__PURE__ */ __name(async (output, con
1552
1132
  };
1553
1133
  return response;
1554
1134
  }, "de_DescribeApiDestinationCommand");
1555
- var de_DescribeApiDestinationCommandError = /* @__PURE__ */ __name(async (output, context) => {
1556
- const parsedOutput = {
1557
- ...output,
1558
- body: await parseErrorBody(output.body, context)
1559
- };
1560
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1561
- switch (errorCode) {
1562
- case "InternalException":
1563
- case "com.amazonaws.cloudwatchevents#InternalException":
1564
- throw await de_InternalExceptionRes(parsedOutput, context);
1565
- case "ResourceNotFoundException":
1566
- case "com.amazonaws.cloudwatchevents#ResourceNotFoundException":
1567
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
1568
- default:
1569
- const parsedBody = parsedOutput.body;
1570
- return throwDefaultError({
1571
- output,
1572
- parsedBody,
1573
- errorCode
1574
- });
1575
- }
1576
- }, "de_DescribeApiDestinationCommandError");
1577
1135
  var de_DescribeArchiveCommand = /* @__PURE__ */ __name(async (output, context) => {
1578
1136
  if (output.statusCode >= 300) {
1579
- return de_DescribeArchiveCommandError(output, context);
1137
+ return de_CommandError(output, context);
1580
1138
  }
1581
1139
  const data = await parseBody(output.body, context);
1582
1140
  let contents = {};
@@ -1587,34 +1145,9 @@ var de_DescribeArchiveCommand = /* @__PURE__ */ __name(async (output, context) =
1587
1145
  };
1588
1146
  return response;
1589
1147
  }, "de_DescribeArchiveCommand");
1590
- var de_DescribeArchiveCommandError = /* @__PURE__ */ __name(async (output, context) => {
1591
- const parsedOutput = {
1592
- ...output,
1593
- body: await parseErrorBody(output.body, context)
1594
- };
1595
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1596
- switch (errorCode) {
1597
- case "InternalException":
1598
- case "com.amazonaws.cloudwatchevents#InternalException":
1599
- throw await de_InternalExceptionRes(parsedOutput, context);
1600
- case "ResourceAlreadyExistsException":
1601
- case "com.amazonaws.cloudwatchevents#ResourceAlreadyExistsException":
1602
- throw await de_ResourceAlreadyExistsExceptionRes(parsedOutput, context);
1603
- case "ResourceNotFoundException":
1604
- case "com.amazonaws.cloudwatchevents#ResourceNotFoundException":
1605
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
1606
- default:
1607
- const parsedBody = parsedOutput.body;
1608
- return throwDefaultError({
1609
- output,
1610
- parsedBody,
1611
- errorCode
1612
- });
1613
- }
1614
- }, "de_DescribeArchiveCommandError");
1615
1148
  var de_DescribeConnectionCommand = /* @__PURE__ */ __name(async (output, context) => {
1616
1149
  if (output.statusCode >= 300) {
1617
- return de_DescribeConnectionCommandError(output, context);
1150
+ return de_CommandError(output, context);
1618
1151
  }
1619
1152
  const data = await parseBody(output.body, context);
1620
1153
  let contents = {};
@@ -1625,31 +1158,9 @@ var de_DescribeConnectionCommand = /* @__PURE__ */ __name(async (output, context
1625
1158
  };
1626
1159
  return response;
1627
1160
  }, "de_DescribeConnectionCommand");
1628
- var de_DescribeConnectionCommandError = /* @__PURE__ */ __name(async (output, context) => {
1629
- const parsedOutput = {
1630
- ...output,
1631
- body: await parseErrorBody(output.body, context)
1632
- };
1633
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1634
- switch (errorCode) {
1635
- case "InternalException":
1636
- case "com.amazonaws.cloudwatchevents#InternalException":
1637
- throw await de_InternalExceptionRes(parsedOutput, context);
1638
- case "ResourceNotFoundException":
1639
- case "com.amazonaws.cloudwatchevents#ResourceNotFoundException":
1640
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
1641
- default:
1642
- const parsedBody = parsedOutput.body;
1643
- return throwDefaultError({
1644
- output,
1645
- parsedBody,
1646
- errorCode
1647
- });
1648
- }
1649
- }, "de_DescribeConnectionCommandError");
1650
1161
  var de_DescribeEventBusCommand = /* @__PURE__ */ __name(async (output, context) => {
1651
1162
  if (output.statusCode >= 300) {
1652
- return de_DescribeEventBusCommandError(output, context);
1163
+ return de_CommandError(output, context);
1653
1164
  }
1654
1165
  const data = await parseBody(output.body, context);
1655
1166
  let contents = {};
@@ -1660,31 +1171,9 @@ var de_DescribeEventBusCommand = /* @__PURE__ */ __name(async (output, context)
1660
1171
  };
1661
1172
  return response;
1662
1173
  }, "de_DescribeEventBusCommand");
1663
- var de_DescribeEventBusCommandError = /* @__PURE__ */ __name(async (output, context) => {
1664
- const parsedOutput = {
1665
- ...output,
1666
- body: await parseErrorBody(output.body, context)
1667
- };
1668
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1669
- switch (errorCode) {
1670
- case "InternalException":
1671
- case "com.amazonaws.cloudwatchevents#InternalException":
1672
- throw await de_InternalExceptionRes(parsedOutput, context);
1673
- case "ResourceNotFoundException":
1674
- case "com.amazonaws.cloudwatchevents#ResourceNotFoundException":
1675
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
1676
- default:
1677
- const parsedBody = parsedOutput.body;
1678
- return throwDefaultError({
1679
- output,
1680
- parsedBody,
1681
- errorCode
1682
- });
1683
- }
1684
- }, "de_DescribeEventBusCommandError");
1685
1174
  var de_DescribeEventSourceCommand = /* @__PURE__ */ __name(async (output, context) => {
1686
1175
  if (output.statusCode >= 300) {
1687
- return de_DescribeEventSourceCommandError(output, context);
1176
+ return de_CommandError(output, context);
1688
1177
  }
1689
1178
  const data = await parseBody(output.body, context);
1690
1179
  let contents = {};
@@ -1695,34 +1184,9 @@ var de_DescribeEventSourceCommand = /* @__PURE__ */ __name(async (output, contex
1695
1184
  };
1696
1185
  return response;
1697
1186
  }, "de_DescribeEventSourceCommand");
1698
- var de_DescribeEventSourceCommandError = /* @__PURE__ */ __name(async (output, context) => {
1699
- const parsedOutput = {
1700
- ...output,
1701
- body: await parseErrorBody(output.body, context)
1702
- };
1703
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1704
- switch (errorCode) {
1705
- case "InternalException":
1706
- case "com.amazonaws.cloudwatchevents#InternalException":
1707
- throw await de_InternalExceptionRes(parsedOutput, context);
1708
- case "OperationDisabledException":
1709
- case "com.amazonaws.cloudwatchevents#OperationDisabledException":
1710
- throw await de_OperationDisabledExceptionRes(parsedOutput, context);
1711
- case "ResourceNotFoundException":
1712
- case "com.amazonaws.cloudwatchevents#ResourceNotFoundException":
1713
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
1714
- default:
1715
- const parsedBody = parsedOutput.body;
1716
- return throwDefaultError({
1717
- output,
1718
- parsedBody,
1719
- errorCode
1720
- });
1721
- }
1722
- }, "de_DescribeEventSourceCommandError");
1723
1187
  var de_DescribePartnerEventSourceCommand = /* @__PURE__ */ __name(async (output, context) => {
1724
1188
  if (output.statusCode >= 300) {
1725
- return de_DescribePartnerEventSourceCommandError(output, context);
1189
+ return de_CommandError(output, context);
1726
1190
  }
1727
1191
  const data = await parseBody(output.body, context);
1728
1192
  let contents = {};
@@ -1733,69 +1197,22 @@ var de_DescribePartnerEventSourceCommand = /* @__PURE__ */ __name(async (output,
1733
1197
  };
1734
1198
  return response;
1735
1199
  }, "de_DescribePartnerEventSourceCommand");
1736
- var de_DescribePartnerEventSourceCommandError = /* @__PURE__ */ __name(async (output, context) => {
1737
- const parsedOutput = {
1738
- ...output,
1739
- body: await parseErrorBody(output.body, context)
1740
- };
1741
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1742
- switch (errorCode) {
1743
- case "InternalException":
1744
- case "com.amazonaws.cloudwatchevents#InternalException":
1745
- throw await de_InternalExceptionRes(parsedOutput, context);
1746
- case "OperationDisabledException":
1747
- case "com.amazonaws.cloudwatchevents#OperationDisabledException":
1748
- throw await de_OperationDisabledExceptionRes(parsedOutput, context);
1749
- case "ResourceNotFoundException":
1750
- case "com.amazonaws.cloudwatchevents#ResourceNotFoundException":
1751
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
1752
- default:
1753
- const parsedBody = parsedOutput.body;
1754
- return throwDefaultError({
1755
- output,
1756
- parsedBody,
1757
- errorCode
1758
- });
1759
- }
1760
- }, "de_DescribePartnerEventSourceCommandError");
1761
- var de_DescribeReplayCommand = /* @__PURE__ */ __name(async (output, context) => {
1762
- if (output.statusCode >= 300) {
1763
- return de_DescribeReplayCommandError(output, context);
1764
- }
1765
- const data = await parseBody(output.body, context);
1766
- let contents = {};
1767
- contents = de_DescribeReplayResponse(data, context);
1768
- const response = {
1769
- $metadata: deserializeMetadata(output),
1770
- ...contents
1200
+ var de_DescribeReplayCommand = /* @__PURE__ */ __name(async (output, context) => {
1201
+ if (output.statusCode >= 300) {
1202
+ return de_CommandError(output, context);
1203
+ }
1204
+ const data = await parseBody(output.body, context);
1205
+ let contents = {};
1206
+ contents = de_DescribeReplayResponse(data, context);
1207
+ const response = {
1208
+ $metadata: deserializeMetadata(output),
1209
+ ...contents
1771
1210
  };
1772
1211
  return response;
1773
1212
  }, "de_DescribeReplayCommand");
1774
- var de_DescribeReplayCommandError = /* @__PURE__ */ __name(async (output, context) => {
1775
- const parsedOutput = {
1776
- ...output,
1777
- body: await parseErrorBody(output.body, context)
1778
- };
1779
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1780
- switch (errorCode) {
1781
- case "InternalException":
1782
- case "com.amazonaws.cloudwatchevents#InternalException":
1783
- throw await de_InternalExceptionRes(parsedOutput, context);
1784
- case "ResourceNotFoundException":
1785
- case "com.amazonaws.cloudwatchevents#ResourceNotFoundException":
1786
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
1787
- default:
1788
- const parsedBody = parsedOutput.body;
1789
- return throwDefaultError({
1790
- output,
1791
- parsedBody,
1792
- errorCode
1793
- });
1794
- }
1795
- }, "de_DescribeReplayCommandError");
1796
1213
  var de_DescribeRuleCommand = /* @__PURE__ */ __name(async (output, context) => {
1797
1214
  if (output.statusCode >= 300) {
1798
- return de_DescribeRuleCommandError(output, context);
1215
+ return de_CommandError(output, context);
1799
1216
  }
1800
1217
  const data = await parseBody(output.body, context);
1801
1218
  let contents = {};
@@ -1806,31 +1223,9 @@ var de_DescribeRuleCommand = /* @__PURE__ */ __name(async (output, context) => {
1806
1223
  };
1807
1224
  return response;
1808
1225
  }, "de_DescribeRuleCommand");
1809
- var de_DescribeRuleCommandError = /* @__PURE__ */ __name(async (output, context) => {
1810
- const parsedOutput = {
1811
- ...output,
1812
- body: await parseErrorBody(output.body, context)
1813
- };
1814
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1815
- switch (errorCode) {
1816
- case "InternalException":
1817
- case "com.amazonaws.cloudwatchevents#InternalException":
1818
- throw await de_InternalExceptionRes(parsedOutput, context);
1819
- case "ResourceNotFoundException":
1820
- case "com.amazonaws.cloudwatchevents#ResourceNotFoundException":
1821
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
1822
- default:
1823
- const parsedBody = parsedOutput.body;
1824
- return throwDefaultError({
1825
- output,
1826
- parsedBody,
1827
- errorCode
1828
- });
1829
- }
1830
- }, "de_DescribeRuleCommandError");
1831
1226
  var de_DisableRuleCommand = /* @__PURE__ */ __name(async (output, context) => {
1832
1227
  if (output.statusCode >= 300) {
1833
- return de_DisableRuleCommandError(output, context);
1228
+ return de_CommandError(output, context);
1834
1229
  }
1835
1230
  await (0, import_smithy_client.collectBody)(output.body, context);
1836
1231
  const response = {
@@ -1838,37 +1233,9 @@ var de_DisableRuleCommand = /* @__PURE__ */ __name(async (output, context) => {
1838
1233
  };
1839
1234
  return response;
1840
1235
  }, "de_DisableRuleCommand");
1841
- var de_DisableRuleCommandError = /* @__PURE__ */ __name(async (output, context) => {
1842
- const parsedOutput = {
1843
- ...output,
1844
- body: await parseErrorBody(output.body, context)
1845
- };
1846
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1847
- switch (errorCode) {
1848
- case "ConcurrentModificationException":
1849
- case "com.amazonaws.cloudwatchevents#ConcurrentModificationException":
1850
- throw await de_ConcurrentModificationExceptionRes(parsedOutput, context);
1851
- case "InternalException":
1852
- case "com.amazonaws.cloudwatchevents#InternalException":
1853
- throw await de_InternalExceptionRes(parsedOutput, context);
1854
- case "ManagedRuleException":
1855
- case "com.amazonaws.cloudwatchevents#ManagedRuleException":
1856
- throw await de_ManagedRuleExceptionRes(parsedOutput, context);
1857
- case "ResourceNotFoundException":
1858
- case "com.amazonaws.cloudwatchevents#ResourceNotFoundException":
1859
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
1860
- default:
1861
- const parsedBody = parsedOutput.body;
1862
- return throwDefaultError({
1863
- output,
1864
- parsedBody,
1865
- errorCode
1866
- });
1867
- }
1868
- }, "de_DisableRuleCommandError");
1869
1236
  var de_EnableRuleCommand = /* @__PURE__ */ __name(async (output, context) => {
1870
1237
  if (output.statusCode >= 300) {
1871
- return de_EnableRuleCommandError(output, context);
1238
+ return de_CommandError(output, context);
1872
1239
  }
1873
1240
  await (0, import_smithy_client.collectBody)(output.body, context);
1874
1241
  const response = {
@@ -1876,37 +1243,9 @@ var de_EnableRuleCommand = /* @__PURE__ */ __name(async (output, context) => {
1876
1243
  };
1877
1244
  return response;
1878
1245
  }, "de_EnableRuleCommand");
1879
- var de_EnableRuleCommandError = /* @__PURE__ */ __name(async (output, context) => {
1880
- const parsedOutput = {
1881
- ...output,
1882
- body: await parseErrorBody(output.body, context)
1883
- };
1884
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1885
- switch (errorCode) {
1886
- case "ConcurrentModificationException":
1887
- case "com.amazonaws.cloudwatchevents#ConcurrentModificationException":
1888
- throw await de_ConcurrentModificationExceptionRes(parsedOutput, context);
1889
- case "InternalException":
1890
- case "com.amazonaws.cloudwatchevents#InternalException":
1891
- throw await de_InternalExceptionRes(parsedOutput, context);
1892
- case "ManagedRuleException":
1893
- case "com.amazonaws.cloudwatchevents#ManagedRuleException":
1894
- throw await de_ManagedRuleExceptionRes(parsedOutput, context);
1895
- case "ResourceNotFoundException":
1896
- case "com.amazonaws.cloudwatchevents#ResourceNotFoundException":
1897
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
1898
- default:
1899
- const parsedBody = parsedOutput.body;
1900
- return throwDefaultError({
1901
- output,
1902
- parsedBody,
1903
- errorCode
1904
- });
1905
- }
1906
- }, "de_EnableRuleCommandError");
1907
1246
  var de_ListApiDestinationsCommand = /* @__PURE__ */ __name(async (output, context) => {
1908
1247
  if (output.statusCode >= 300) {
1909
- return de_ListApiDestinationsCommandError(output, context);
1248
+ return de_CommandError(output, context);
1910
1249
  }
1911
1250
  const data = await parseBody(output.body, context);
1912
1251
  let contents = {};
@@ -1917,28 +1256,9 @@ var de_ListApiDestinationsCommand = /* @__PURE__ */ __name(async (output, contex
1917
1256
  };
1918
1257
  return response;
1919
1258
  }, "de_ListApiDestinationsCommand");
1920
- var de_ListApiDestinationsCommandError = /* @__PURE__ */ __name(async (output, context) => {
1921
- const parsedOutput = {
1922
- ...output,
1923
- body: await parseErrorBody(output.body, context)
1924
- };
1925
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1926
- switch (errorCode) {
1927
- case "InternalException":
1928
- case "com.amazonaws.cloudwatchevents#InternalException":
1929
- throw await de_InternalExceptionRes(parsedOutput, context);
1930
- default:
1931
- const parsedBody = parsedOutput.body;
1932
- return throwDefaultError({
1933
- output,
1934
- parsedBody,
1935
- errorCode
1936
- });
1937
- }
1938
- }, "de_ListApiDestinationsCommandError");
1939
1259
  var de_ListArchivesCommand = /* @__PURE__ */ __name(async (output, context) => {
1940
1260
  if (output.statusCode >= 300) {
1941
- return de_ListArchivesCommandError(output, context);
1261
+ return de_CommandError(output, context);
1942
1262
  }
1943
1263
  const data = await parseBody(output.body, context);
1944
1264
  let contents = {};
@@ -1949,31 +1269,9 @@ var de_ListArchivesCommand = /* @__PURE__ */ __name(async (output, context) => {
1949
1269
  };
1950
1270
  return response;
1951
1271
  }, "de_ListArchivesCommand");
1952
- var de_ListArchivesCommandError = /* @__PURE__ */ __name(async (output, context) => {
1953
- const parsedOutput = {
1954
- ...output,
1955
- body: await parseErrorBody(output.body, context)
1956
- };
1957
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1958
- switch (errorCode) {
1959
- case "InternalException":
1960
- case "com.amazonaws.cloudwatchevents#InternalException":
1961
- throw await de_InternalExceptionRes(parsedOutput, context);
1962
- case "ResourceNotFoundException":
1963
- case "com.amazonaws.cloudwatchevents#ResourceNotFoundException":
1964
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
1965
- default:
1966
- const parsedBody = parsedOutput.body;
1967
- return throwDefaultError({
1968
- output,
1969
- parsedBody,
1970
- errorCode
1971
- });
1972
- }
1973
- }, "de_ListArchivesCommandError");
1974
1272
  var de_ListConnectionsCommand = /* @__PURE__ */ __name(async (output, context) => {
1975
1273
  if (output.statusCode >= 300) {
1976
- return de_ListConnectionsCommandError(output, context);
1274
+ return de_CommandError(output, context);
1977
1275
  }
1978
1276
  const data = await parseBody(output.body, context);
1979
1277
  let contents = {};
@@ -1984,28 +1282,9 @@ var de_ListConnectionsCommand = /* @__PURE__ */ __name(async (output, context) =
1984
1282
  };
1985
1283
  return response;
1986
1284
  }, "de_ListConnectionsCommand");
1987
- var de_ListConnectionsCommandError = /* @__PURE__ */ __name(async (output, context) => {
1988
- const parsedOutput = {
1989
- ...output,
1990
- body: await parseErrorBody(output.body, context)
1991
- };
1992
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1993
- switch (errorCode) {
1994
- case "InternalException":
1995
- case "com.amazonaws.cloudwatchevents#InternalException":
1996
- throw await de_InternalExceptionRes(parsedOutput, context);
1997
- default:
1998
- const parsedBody = parsedOutput.body;
1999
- return throwDefaultError({
2000
- output,
2001
- parsedBody,
2002
- errorCode
2003
- });
2004
- }
2005
- }, "de_ListConnectionsCommandError");
2006
1285
  var de_ListEventBusesCommand = /* @__PURE__ */ __name(async (output, context) => {
2007
1286
  if (output.statusCode >= 300) {
2008
- return de_ListEventBusesCommandError(output, context);
1287
+ return de_CommandError(output, context);
2009
1288
  }
2010
1289
  const data = await parseBody(output.body, context);
2011
1290
  let contents = {};
@@ -2016,28 +1295,9 @@ var de_ListEventBusesCommand = /* @__PURE__ */ __name(async (output, context) =>
2016
1295
  };
2017
1296
  return response;
2018
1297
  }, "de_ListEventBusesCommand");
2019
- var de_ListEventBusesCommandError = /* @__PURE__ */ __name(async (output, context) => {
2020
- const parsedOutput = {
2021
- ...output,
2022
- body: await parseErrorBody(output.body, context)
2023
- };
2024
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2025
- switch (errorCode) {
2026
- case "InternalException":
2027
- case "com.amazonaws.cloudwatchevents#InternalException":
2028
- throw await de_InternalExceptionRes(parsedOutput, context);
2029
- default:
2030
- const parsedBody = parsedOutput.body;
2031
- return throwDefaultError({
2032
- output,
2033
- parsedBody,
2034
- errorCode
2035
- });
2036
- }
2037
- }, "de_ListEventBusesCommandError");
2038
1298
  var de_ListEventSourcesCommand = /* @__PURE__ */ __name(async (output, context) => {
2039
1299
  if (output.statusCode >= 300) {
2040
- return de_ListEventSourcesCommandError(output, context);
1300
+ return de_CommandError(output, context);
2041
1301
  }
2042
1302
  const data = await parseBody(output.body, context);
2043
1303
  let contents = {};
@@ -2048,31 +1308,9 @@ var de_ListEventSourcesCommand = /* @__PURE__ */ __name(async (output, context)
2048
1308
  };
2049
1309
  return response;
2050
1310
  }, "de_ListEventSourcesCommand");
2051
- var de_ListEventSourcesCommandError = /* @__PURE__ */ __name(async (output, context) => {
2052
- const parsedOutput = {
2053
- ...output,
2054
- body: await parseErrorBody(output.body, context)
2055
- };
2056
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2057
- switch (errorCode) {
2058
- case "InternalException":
2059
- case "com.amazonaws.cloudwatchevents#InternalException":
2060
- throw await de_InternalExceptionRes(parsedOutput, context);
2061
- case "OperationDisabledException":
2062
- case "com.amazonaws.cloudwatchevents#OperationDisabledException":
2063
- throw await de_OperationDisabledExceptionRes(parsedOutput, context);
2064
- default:
2065
- const parsedBody = parsedOutput.body;
2066
- return throwDefaultError({
2067
- output,
2068
- parsedBody,
2069
- errorCode
2070
- });
2071
- }
2072
- }, "de_ListEventSourcesCommandError");
2073
1311
  var de_ListPartnerEventSourceAccountsCommand = /* @__PURE__ */ __name(async (output, context) => {
2074
1312
  if (output.statusCode >= 300) {
2075
- return de_ListPartnerEventSourceAccountsCommandError(output, context);
1313
+ return de_CommandError(output, context);
2076
1314
  }
2077
1315
  const data = await parseBody(output.body, context);
2078
1316
  let contents = {};
@@ -2083,34 +1321,9 @@ var de_ListPartnerEventSourceAccountsCommand = /* @__PURE__ */ __name(async (out
2083
1321
  };
2084
1322
  return response;
2085
1323
  }, "de_ListPartnerEventSourceAccountsCommand");
2086
- var de_ListPartnerEventSourceAccountsCommandError = /* @__PURE__ */ __name(async (output, context) => {
2087
- const parsedOutput = {
2088
- ...output,
2089
- body: await parseErrorBody(output.body, context)
2090
- };
2091
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2092
- switch (errorCode) {
2093
- case "InternalException":
2094
- case "com.amazonaws.cloudwatchevents#InternalException":
2095
- throw await de_InternalExceptionRes(parsedOutput, context);
2096
- case "OperationDisabledException":
2097
- case "com.amazonaws.cloudwatchevents#OperationDisabledException":
2098
- throw await de_OperationDisabledExceptionRes(parsedOutput, context);
2099
- case "ResourceNotFoundException":
2100
- case "com.amazonaws.cloudwatchevents#ResourceNotFoundException":
2101
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
2102
- default:
2103
- const parsedBody = parsedOutput.body;
2104
- return throwDefaultError({
2105
- output,
2106
- parsedBody,
2107
- errorCode
2108
- });
2109
- }
2110
- }, "de_ListPartnerEventSourceAccountsCommandError");
2111
1324
  var de_ListPartnerEventSourcesCommand = /* @__PURE__ */ __name(async (output, context) => {
2112
1325
  if (output.statusCode >= 300) {
2113
- return de_ListPartnerEventSourcesCommandError(output, context);
1326
+ return de_CommandError(output, context);
2114
1327
  }
2115
1328
  const data = await parseBody(output.body, context);
2116
1329
  let contents = {};
@@ -2121,31 +1334,9 @@ var de_ListPartnerEventSourcesCommand = /* @__PURE__ */ __name(async (output, co
2121
1334
  };
2122
1335
  return response;
2123
1336
  }, "de_ListPartnerEventSourcesCommand");
2124
- var de_ListPartnerEventSourcesCommandError = /* @__PURE__ */ __name(async (output, context) => {
2125
- const parsedOutput = {
2126
- ...output,
2127
- body: await parseErrorBody(output.body, context)
2128
- };
2129
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2130
- switch (errorCode) {
2131
- case "InternalException":
2132
- case "com.amazonaws.cloudwatchevents#InternalException":
2133
- throw await de_InternalExceptionRes(parsedOutput, context);
2134
- case "OperationDisabledException":
2135
- case "com.amazonaws.cloudwatchevents#OperationDisabledException":
2136
- throw await de_OperationDisabledExceptionRes(parsedOutput, context);
2137
- default:
2138
- const parsedBody = parsedOutput.body;
2139
- return throwDefaultError({
2140
- output,
2141
- parsedBody,
2142
- errorCode
2143
- });
2144
- }
2145
- }, "de_ListPartnerEventSourcesCommandError");
2146
1337
  var de_ListReplaysCommand = /* @__PURE__ */ __name(async (output, context) => {
2147
1338
  if (output.statusCode >= 300) {
2148
- return de_ListReplaysCommandError(output, context);
1339
+ return de_CommandError(output, context);
2149
1340
  }
2150
1341
  const data = await parseBody(output.body, context);
2151
1342
  let contents = {};
@@ -2156,28 +1347,9 @@ var de_ListReplaysCommand = /* @__PURE__ */ __name(async (output, context) => {
2156
1347
  };
2157
1348
  return response;
2158
1349
  }, "de_ListReplaysCommand");
2159
- var de_ListReplaysCommandError = /* @__PURE__ */ __name(async (output, context) => {
2160
- const parsedOutput = {
2161
- ...output,
2162
- body: await parseErrorBody(output.body, context)
2163
- };
2164
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2165
- switch (errorCode) {
2166
- case "InternalException":
2167
- case "com.amazonaws.cloudwatchevents#InternalException":
2168
- throw await de_InternalExceptionRes(parsedOutput, context);
2169
- default:
2170
- const parsedBody = parsedOutput.body;
2171
- return throwDefaultError({
2172
- output,
2173
- parsedBody,
2174
- errorCode
2175
- });
2176
- }
2177
- }, "de_ListReplaysCommandError");
2178
1350
  var de_ListRuleNamesByTargetCommand = /* @__PURE__ */ __name(async (output, context) => {
2179
1351
  if (output.statusCode >= 300) {
2180
- return de_ListRuleNamesByTargetCommandError(output, context);
1352
+ return de_CommandError(output, context);
2181
1353
  }
2182
1354
  const data = await parseBody(output.body, context);
2183
1355
  let contents = {};
@@ -2188,31 +1360,9 @@ var de_ListRuleNamesByTargetCommand = /* @__PURE__ */ __name(async (output, cont
2188
1360
  };
2189
1361
  return response;
2190
1362
  }, "de_ListRuleNamesByTargetCommand");
2191
- var de_ListRuleNamesByTargetCommandError = /* @__PURE__ */ __name(async (output, context) => {
2192
- const parsedOutput = {
2193
- ...output,
2194
- body: await parseErrorBody(output.body, context)
2195
- };
2196
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2197
- switch (errorCode) {
2198
- case "InternalException":
2199
- case "com.amazonaws.cloudwatchevents#InternalException":
2200
- throw await de_InternalExceptionRes(parsedOutput, context);
2201
- case "ResourceNotFoundException":
2202
- case "com.amazonaws.cloudwatchevents#ResourceNotFoundException":
2203
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
2204
- default:
2205
- const parsedBody = parsedOutput.body;
2206
- return throwDefaultError({
2207
- output,
2208
- parsedBody,
2209
- errorCode
2210
- });
2211
- }
2212
- }, "de_ListRuleNamesByTargetCommandError");
2213
1363
  var de_ListRulesCommand = /* @__PURE__ */ __name(async (output, context) => {
2214
1364
  if (output.statusCode >= 300) {
2215
- return de_ListRulesCommandError(output, context);
1365
+ return de_CommandError(output, context);
2216
1366
  }
2217
1367
  const data = await parseBody(output.body, context);
2218
1368
  let contents = {};
@@ -2223,31 +1373,9 @@ var de_ListRulesCommand = /* @__PURE__ */ __name(async (output, context) => {
2223
1373
  };
2224
1374
  return response;
2225
1375
  }, "de_ListRulesCommand");
2226
- var de_ListRulesCommandError = /* @__PURE__ */ __name(async (output, context) => {
2227
- const parsedOutput = {
2228
- ...output,
2229
- body: await parseErrorBody(output.body, context)
2230
- };
2231
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2232
- switch (errorCode) {
2233
- case "InternalException":
2234
- case "com.amazonaws.cloudwatchevents#InternalException":
2235
- throw await de_InternalExceptionRes(parsedOutput, context);
2236
- case "ResourceNotFoundException":
2237
- case "com.amazonaws.cloudwatchevents#ResourceNotFoundException":
2238
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
2239
- default:
2240
- const parsedBody = parsedOutput.body;
2241
- return throwDefaultError({
2242
- output,
2243
- parsedBody,
2244
- errorCode
2245
- });
2246
- }
2247
- }, "de_ListRulesCommandError");
2248
1376
  var de_ListTagsForResourceCommand = /* @__PURE__ */ __name(async (output, context) => {
2249
1377
  if (output.statusCode >= 300) {
2250
- return de_ListTagsForResourceCommandError(output, context);
1378
+ return de_CommandError(output, context);
2251
1379
  }
2252
1380
  const data = await parseBody(output.body, context);
2253
1381
  let contents = {};
@@ -2258,31 +1386,9 @@ var de_ListTagsForResourceCommand = /* @__PURE__ */ __name(async (output, contex
2258
1386
  };
2259
1387
  return response;
2260
1388
  }, "de_ListTagsForResourceCommand");
2261
- var de_ListTagsForResourceCommandError = /* @__PURE__ */ __name(async (output, context) => {
2262
- const parsedOutput = {
2263
- ...output,
2264
- body: await parseErrorBody(output.body, context)
2265
- };
2266
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2267
- switch (errorCode) {
2268
- case "InternalException":
2269
- case "com.amazonaws.cloudwatchevents#InternalException":
2270
- throw await de_InternalExceptionRes(parsedOutput, context);
2271
- case "ResourceNotFoundException":
2272
- case "com.amazonaws.cloudwatchevents#ResourceNotFoundException":
2273
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
2274
- default:
2275
- const parsedBody = parsedOutput.body;
2276
- return throwDefaultError({
2277
- output,
2278
- parsedBody,
2279
- errorCode
2280
- });
2281
- }
2282
- }, "de_ListTagsForResourceCommandError");
2283
1389
  var de_ListTargetsByRuleCommand = /* @__PURE__ */ __name(async (output, context) => {
2284
1390
  if (output.statusCode >= 300) {
2285
- return de_ListTargetsByRuleCommandError(output, context);
1391
+ return de_CommandError(output, context);
2286
1392
  }
2287
1393
  const data = await parseBody(output.body, context);
2288
1394
  let contents = {};
@@ -2293,31 +1399,9 @@ var de_ListTargetsByRuleCommand = /* @__PURE__ */ __name(async (output, context)
2293
1399
  };
2294
1400
  return response;
2295
1401
  }, "de_ListTargetsByRuleCommand");
2296
- var de_ListTargetsByRuleCommandError = /* @__PURE__ */ __name(async (output, context) => {
2297
- const parsedOutput = {
2298
- ...output,
2299
- body: await parseErrorBody(output.body, context)
2300
- };
2301
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2302
- switch (errorCode) {
2303
- case "InternalException":
2304
- case "com.amazonaws.cloudwatchevents#InternalException":
2305
- throw await de_InternalExceptionRes(parsedOutput, context);
2306
- case "ResourceNotFoundException":
2307
- case "com.amazonaws.cloudwatchevents#ResourceNotFoundException":
2308
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
2309
- default:
2310
- const parsedBody = parsedOutput.body;
2311
- return throwDefaultError({
2312
- output,
2313
- parsedBody,
2314
- errorCode
2315
- });
2316
- }
2317
- }, "de_ListTargetsByRuleCommandError");
2318
1402
  var de_PutEventsCommand = /* @__PURE__ */ __name(async (output, context) => {
2319
1403
  if (output.statusCode >= 300) {
2320
- return de_PutEventsCommandError(output, context);
1404
+ return de_CommandError(output, context);
2321
1405
  }
2322
1406
  const data = await parseBody(output.body, context);
2323
1407
  let contents = {};
@@ -2328,28 +1412,9 @@ var de_PutEventsCommand = /* @__PURE__ */ __name(async (output, context) => {
2328
1412
  };
2329
1413
  return response;
2330
1414
  }, "de_PutEventsCommand");
2331
- var de_PutEventsCommandError = /* @__PURE__ */ __name(async (output, context) => {
2332
- const parsedOutput = {
2333
- ...output,
2334
- body: await parseErrorBody(output.body, context)
2335
- };
2336
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2337
- switch (errorCode) {
2338
- case "InternalException":
2339
- case "com.amazonaws.cloudwatchevents#InternalException":
2340
- throw await de_InternalExceptionRes(parsedOutput, context);
2341
- default:
2342
- const parsedBody = parsedOutput.body;
2343
- return throwDefaultError({
2344
- output,
2345
- parsedBody,
2346
- errorCode
2347
- });
2348
- }
2349
- }, "de_PutEventsCommandError");
2350
1415
  var de_PutPartnerEventsCommand = /* @__PURE__ */ __name(async (output, context) => {
2351
1416
  if (output.statusCode >= 300) {
2352
- return de_PutPartnerEventsCommandError(output, context);
1417
+ return de_CommandError(output, context);
2353
1418
  }
2354
1419
  const data = await parseBody(output.body, context);
2355
1420
  let contents = {};
@@ -2360,31 +1425,9 @@ var de_PutPartnerEventsCommand = /* @__PURE__ */ __name(async (output, context)
2360
1425
  };
2361
1426
  return response;
2362
1427
  }, "de_PutPartnerEventsCommand");
2363
- var de_PutPartnerEventsCommandError = /* @__PURE__ */ __name(async (output, context) => {
2364
- const parsedOutput = {
2365
- ...output,
2366
- body: await parseErrorBody(output.body, context)
2367
- };
2368
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2369
- switch (errorCode) {
2370
- case "InternalException":
2371
- case "com.amazonaws.cloudwatchevents#InternalException":
2372
- throw await de_InternalExceptionRes(parsedOutput, context);
2373
- case "OperationDisabledException":
2374
- case "com.amazonaws.cloudwatchevents#OperationDisabledException":
2375
- throw await de_OperationDisabledExceptionRes(parsedOutput, context);
2376
- default:
2377
- const parsedBody = parsedOutput.body;
2378
- return throwDefaultError({
2379
- output,
2380
- parsedBody,
2381
- errorCode
2382
- });
2383
- }
2384
- }, "de_PutPartnerEventsCommandError");
2385
1428
  var de_PutPermissionCommand = /* @__PURE__ */ __name(async (output, context) => {
2386
1429
  if (output.statusCode >= 300) {
2387
- return de_PutPermissionCommandError(output, context);
1430
+ return de_CommandError(output, context);
2388
1431
  }
2389
1432
  await (0, import_smithy_client.collectBody)(output.body, context);
2390
1433
  const response = {
@@ -2392,131 +1435,35 @@ var de_PutPermissionCommand = /* @__PURE__ */ __name(async (output, context) =>
2392
1435
  };
2393
1436
  return response;
2394
1437
  }, "de_PutPermissionCommand");
2395
- var de_PutPermissionCommandError = /* @__PURE__ */ __name(async (output, context) => {
2396
- const parsedOutput = {
2397
- ...output,
2398
- body: await parseErrorBody(output.body, context)
2399
- };
2400
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2401
- switch (errorCode) {
2402
- case "ConcurrentModificationException":
2403
- case "com.amazonaws.cloudwatchevents#ConcurrentModificationException":
2404
- throw await de_ConcurrentModificationExceptionRes(parsedOutput, context);
2405
- case "InternalException":
2406
- case "com.amazonaws.cloudwatchevents#InternalException":
2407
- throw await de_InternalExceptionRes(parsedOutput, context);
2408
- case "OperationDisabledException":
2409
- case "com.amazonaws.cloudwatchevents#OperationDisabledException":
2410
- throw await de_OperationDisabledExceptionRes(parsedOutput, context);
2411
- case "PolicyLengthExceededException":
2412
- case "com.amazonaws.cloudwatchevents#PolicyLengthExceededException":
2413
- throw await de_PolicyLengthExceededExceptionRes(parsedOutput, context);
2414
- case "ResourceNotFoundException":
2415
- case "com.amazonaws.cloudwatchevents#ResourceNotFoundException":
2416
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
2417
- default:
2418
- const parsedBody = parsedOutput.body;
2419
- return throwDefaultError({
2420
- output,
2421
- parsedBody,
2422
- errorCode
2423
- });
2424
- }
2425
- }, "de_PutPermissionCommandError");
2426
1438
  var de_PutRuleCommand = /* @__PURE__ */ __name(async (output, context) => {
2427
1439
  if (output.statusCode >= 300) {
2428
- return de_PutRuleCommandError(output, context);
2429
- }
2430
- const data = await parseBody(output.body, context);
2431
- let contents = {};
2432
- contents = (0, import_smithy_client._json)(data);
2433
- const response = {
2434
- $metadata: deserializeMetadata(output),
2435
- ...contents
2436
- };
2437
- return response;
2438
- }, "de_PutRuleCommand");
2439
- var de_PutRuleCommandError = /* @__PURE__ */ __name(async (output, context) => {
2440
- const parsedOutput = {
2441
- ...output,
2442
- body: await parseErrorBody(output.body, context)
2443
- };
2444
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2445
- switch (errorCode) {
2446
- case "ConcurrentModificationException":
2447
- case "com.amazonaws.cloudwatchevents#ConcurrentModificationException":
2448
- throw await de_ConcurrentModificationExceptionRes(parsedOutput, context);
2449
- case "InternalException":
2450
- case "com.amazonaws.cloudwatchevents#InternalException":
2451
- throw await de_InternalExceptionRes(parsedOutput, context);
2452
- case "InvalidEventPatternException":
2453
- case "com.amazonaws.cloudwatchevents#InvalidEventPatternException":
2454
- throw await de_InvalidEventPatternExceptionRes(parsedOutput, context);
2455
- case "LimitExceededException":
2456
- case "com.amazonaws.cloudwatchevents#LimitExceededException":
2457
- throw await de_LimitExceededExceptionRes(parsedOutput, context);
2458
- case "ManagedRuleException":
2459
- case "com.amazonaws.cloudwatchevents#ManagedRuleException":
2460
- throw await de_ManagedRuleExceptionRes(parsedOutput, context);
2461
- case "ResourceNotFoundException":
2462
- case "com.amazonaws.cloudwatchevents#ResourceNotFoundException":
2463
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
2464
- default:
2465
- const parsedBody = parsedOutput.body;
2466
- return throwDefaultError({
2467
- output,
2468
- parsedBody,
2469
- errorCode
2470
- });
2471
- }
2472
- }, "de_PutRuleCommandError");
2473
- var de_PutTargetsCommand = /* @__PURE__ */ __name(async (output, context) => {
2474
- if (output.statusCode >= 300) {
2475
- return de_PutTargetsCommandError(output, context);
2476
- }
2477
- const data = await parseBody(output.body, context);
2478
- let contents = {};
2479
- contents = (0, import_smithy_client._json)(data);
2480
- const response = {
2481
- $metadata: deserializeMetadata(output),
2482
- ...contents
2483
- };
2484
- return response;
2485
- }, "de_PutTargetsCommand");
2486
- var de_PutTargetsCommandError = /* @__PURE__ */ __name(async (output, context) => {
2487
- const parsedOutput = {
2488
- ...output,
2489
- body: await parseErrorBody(output.body, context)
2490
- };
2491
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2492
- switch (errorCode) {
2493
- case "ConcurrentModificationException":
2494
- case "com.amazonaws.cloudwatchevents#ConcurrentModificationException":
2495
- throw await de_ConcurrentModificationExceptionRes(parsedOutput, context);
2496
- case "InternalException":
2497
- case "com.amazonaws.cloudwatchevents#InternalException":
2498
- throw await de_InternalExceptionRes(parsedOutput, context);
2499
- case "LimitExceededException":
2500
- case "com.amazonaws.cloudwatchevents#LimitExceededException":
2501
- throw await de_LimitExceededExceptionRes(parsedOutput, context);
2502
- case "ManagedRuleException":
2503
- case "com.amazonaws.cloudwatchevents#ManagedRuleException":
2504
- throw await de_ManagedRuleExceptionRes(parsedOutput, context);
2505
- case "ResourceNotFoundException":
2506
- case "com.amazonaws.cloudwatchevents#ResourceNotFoundException":
2507
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
2508
- default:
2509
- const parsedBody = parsedOutput.body;
2510
- return throwDefaultError({
2511
- output,
2512
- parsedBody,
2513
- errorCode
2514
- });
1440
+ return de_CommandError(output, context);
2515
1441
  }
2516
- }, "de_PutTargetsCommandError");
1442
+ const data = await parseBody(output.body, context);
1443
+ let contents = {};
1444
+ contents = (0, import_smithy_client._json)(data);
1445
+ const response = {
1446
+ $metadata: deserializeMetadata(output),
1447
+ ...contents
1448
+ };
1449
+ return response;
1450
+ }, "de_PutRuleCommand");
1451
+ var de_PutTargetsCommand = /* @__PURE__ */ __name(async (output, context) => {
1452
+ if (output.statusCode >= 300) {
1453
+ return de_CommandError(output, context);
1454
+ }
1455
+ const data = await parseBody(output.body, context);
1456
+ let contents = {};
1457
+ contents = (0, import_smithy_client._json)(data);
1458
+ const response = {
1459
+ $metadata: deserializeMetadata(output),
1460
+ ...contents
1461
+ };
1462
+ return response;
1463
+ }, "de_PutTargetsCommand");
2517
1464
  var de_RemovePermissionCommand = /* @__PURE__ */ __name(async (output, context) => {
2518
1465
  if (output.statusCode >= 300) {
2519
- return de_RemovePermissionCommandError(output, context);
1466
+ return de_CommandError(output, context);
2520
1467
  }
2521
1468
  await (0, import_smithy_client.collectBody)(output.body, context);
2522
1469
  const response = {
@@ -2524,37 +1471,9 @@ var de_RemovePermissionCommand = /* @__PURE__ */ __name(async (output, context)
2524
1471
  };
2525
1472
  return response;
2526
1473
  }, "de_RemovePermissionCommand");
2527
- var de_RemovePermissionCommandError = /* @__PURE__ */ __name(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 "ConcurrentModificationException":
2535
- case "com.amazonaws.cloudwatchevents#ConcurrentModificationException":
2536
- throw await de_ConcurrentModificationExceptionRes(parsedOutput, context);
2537
- case "InternalException":
2538
- case "com.amazonaws.cloudwatchevents#InternalException":
2539
- throw await de_InternalExceptionRes(parsedOutput, context);
2540
- case "OperationDisabledException":
2541
- case "com.amazonaws.cloudwatchevents#OperationDisabledException":
2542
- throw await de_OperationDisabledExceptionRes(parsedOutput, context);
2543
- case "ResourceNotFoundException":
2544
- case "com.amazonaws.cloudwatchevents#ResourceNotFoundException":
2545
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
2546
- default:
2547
- const parsedBody = parsedOutput.body;
2548
- return throwDefaultError({
2549
- output,
2550
- parsedBody,
2551
- errorCode
2552
- });
2553
- }
2554
- }, "de_RemovePermissionCommandError");
2555
1474
  var de_RemoveTargetsCommand = /* @__PURE__ */ __name(async (output, context) => {
2556
1475
  if (output.statusCode >= 300) {
2557
- return de_RemoveTargetsCommandError(output, context);
1476
+ return de_CommandError(output, context);
2558
1477
  }
2559
1478
  const data = await parseBody(output.body, context);
2560
1479
  let contents = {};
@@ -2565,37 +1484,9 @@ var de_RemoveTargetsCommand = /* @__PURE__ */ __name(async (output, context) =>
2565
1484
  };
2566
1485
  return response;
2567
1486
  }, "de_RemoveTargetsCommand");
2568
- var de_RemoveTargetsCommandError = /* @__PURE__ */ __name(async (output, context) => {
2569
- const parsedOutput = {
2570
- ...output,
2571
- body: await parseErrorBody(output.body, context)
2572
- };
2573
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2574
- switch (errorCode) {
2575
- case "ConcurrentModificationException":
2576
- case "com.amazonaws.cloudwatchevents#ConcurrentModificationException":
2577
- throw await de_ConcurrentModificationExceptionRes(parsedOutput, context);
2578
- case "InternalException":
2579
- case "com.amazonaws.cloudwatchevents#InternalException":
2580
- throw await de_InternalExceptionRes(parsedOutput, context);
2581
- case "ManagedRuleException":
2582
- case "com.amazonaws.cloudwatchevents#ManagedRuleException":
2583
- throw await de_ManagedRuleExceptionRes(parsedOutput, context);
2584
- case "ResourceNotFoundException":
2585
- case "com.amazonaws.cloudwatchevents#ResourceNotFoundException":
2586
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
2587
- default:
2588
- const parsedBody = parsedOutput.body;
2589
- return throwDefaultError({
2590
- output,
2591
- parsedBody,
2592
- errorCode
2593
- });
2594
- }
2595
- }, "de_RemoveTargetsCommandError");
2596
1487
  var de_StartReplayCommand = /* @__PURE__ */ __name(async (output, context) => {
2597
1488
  if (output.statusCode >= 300) {
2598
- return de_StartReplayCommandError(output, context);
1489
+ return de_CommandError(output, context);
2599
1490
  }
2600
1491
  const data = await parseBody(output.body, context);
2601
1492
  let contents = {};
@@ -2606,40 +1497,9 @@ var de_StartReplayCommand = /* @__PURE__ */ __name(async (output, context) => {
2606
1497
  };
2607
1498
  return response;
2608
1499
  }, "de_StartReplayCommand");
2609
- var de_StartReplayCommandError = /* @__PURE__ */ __name(async (output, context) => {
2610
- const parsedOutput = {
2611
- ...output,
2612
- body: await parseErrorBody(output.body, context)
2613
- };
2614
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2615
- switch (errorCode) {
2616
- case "InternalException":
2617
- case "com.amazonaws.cloudwatchevents#InternalException":
2618
- throw await de_InternalExceptionRes(parsedOutput, context);
2619
- case "InvalidEventPatternException":
2620
- case "com.amazonaws.cloudwatchevents#InvalidEventPatternException":
2621
- throw await de_InvalidEventPatternExceptionRes(parsedOutput, context);
2622
- case "LimitExceededException":
2623
- case "com.amazonaws.cloudwatchevents#LimitExceededException":
2624
- throw await de_LimitExceededExceptionRes(parsedOutput, context);
2625
- case "ResourceAlreadyExistsException":
2626
- case "com.amazonaws.cloudwatchevents#ResourceAlreadyExistsException":
2627
- throw await de_ResourceAlreadyExistsExceptionRes(parsedOutput, context);
2628
- case "ResourceNotFoundException":
2629
- case "com.amazonaws.cloudwatchevents#ResourceNotFoundException":
2630
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
2631
- default:
2632
- const parsedBody = parsedOutput.body;
2633
- return throwDefaultError({
2634
- output,
2635
- parsedBody,
2636
- errorCode
2637
- });
2638
- }
2639
- }, "de_StartReplayCommandError");
2640
1500
  var de_TagResourceCommand = /* @__PURE__ */ __name(async (output, context) => {
2641
1501
  if (output.statusCode >= 300) {
2642
- return de_TagResourceCommandError(output, context);
1502
+ return de_CommandError(output, context);
2643
1503
  }
2644
1504
  const data = await parseBody(output.body, context);
2645
1505
  let contents = {};
@@ -2650,37 +1510,9 @@ var de_TagResourceCommand = /* @__PURE__ */ __name(async (output, context) => {
2650
1510
  };
2651
1511
  return response;
2652
1512
  }, "de_TagResourceCommand");
2653
- var de_TagResourceCommandError = /* @__PURE__ */ __name(async (output, context) => {
2654
- const parsedOutput = {
2655
- ...output,
2656
- body: await parseErrorBody(output.body, context)
2657
- };
2658
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2659
- switch (errorCode) {
2660
- case "ConcurrentModificationException":
2661
- case "com.amazonaws.cloudwatchevents#ConcurrentModificationException":
2662
- throw await de_ConcurrentModificationExceptionRes(parsedOutput, context);
2663
- case "InternalException":
2664
- case "com.amazonaws.cloudwatchevents#InternalException":
2665
- throw await de_InternalExceptionRes(parsedOutput, context);
2666
- case "ManagedRuleException":
2667
- case "com.amazonaws.cloudwatchevents#ManagedRuleException":
2668
- throw await de_ManagedRuleExceptionRes(parsedOutput, context);
2669
- case "ResourceNotFoundException":
2670
- case "com.amazonaws.cloudwatchevents#ResourceNotFoundException":
2671
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
2672
- default:
2673
- const parsedBody = parsedOutput.body;
2674
- return throwDefaultError({
2675
- output,
2676
- parsedBody,
2677
- errorCode
2678
- });
2679
- }
2680
- }, "de_TagResourceCommandError");
2681
1513
  var de_TestEventPatternCommand = /* @__PURE__ */ __name(async (output, context) => {
2682
1514
  if (output.statusCode >= 300) {
2683
- return de_TestEventPatternCommandError(output, context);
1515
+ return de_CommandError(output, context);
2684
1516
  }
2685
1517
  const data = await parseBody(output.body, context);
2686
1518
  let contents = {};
@@ -2691,31 +1523,9 @@ var de_TestEventPatternCommand = /* @__PURE__ */ __name(async (output, context)
2691
1523
  };
2692
1524
  return response;
2693
1525
  }, "de_TestEventPatternCommand");
2694
- var de_TestEventPatternCommandError = /* @__PURE__ */ __name(async (output, context) => {
2695
- const parsedOutput = {
2696
- ...output,
2697
- body: await parseErrorBody(output.body, context)
2698
- };
2699
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2700
- switch (errorCode) {
2701
- case "InternalException":
2702
- case "com.amazonaws.cloudwatchevents#InternalException":
2703
- throw await de_InternalExceptionRes(parsedOutput, context);
2704
- case "InvalidEventPatternException":
2705
- case "com.amazonaws.cloudwatchevents#InvalidEventPatternException":
2706
- throw await de_InvalidEventPatternExceptionRes(parsedOutput, context);
2707
- default:
2708
- const parsedBody = parsedOutput.body;
2709
- return throwDefaultError({
2710
- output,
2711
- parsedBody,
2712
- errorCode
2713
- });
2714
- }
2715
- }, "de_TestEventPatternCommandError");
2716
1526
  var de_UntagResourceCommand = /* @__PURE__ */ __name(async (output, context) => {
2717
1527
  if (output.statusCode >= 300) {
2718
- return de_UntagResourceCommandError(output, context);
1528
+ return de_CommandError(output, context);
2719
1529
  }
2720
1530
  const data = await parseBody(output.body, context);
2721
1531
  let contents = {};
@@ -2726,37 +1536,9 @@ var de_UntagResourceCommand = /* @__PURE__ */ __name(async (output, context) =>
2726
1536
  };
2727
1537
  return response;
2728
1538
  }, "de_UntagResourceCommand");
2729
- var de_UntagResourceCommandError = /* @__PURE__ */ __name(async (output, context) => {
2730
- const parsedOutput = {
2731
- ...output,
2732
- body: await parseErrorBody(output.body, context)
2733
- };
2734
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2735
- switch (errorCode) {
2736
- case "ConcurrentModificationException":
2737
- case "com.amazonaws.cloudwatchevents#ConcurrentModificationException":
2738
- throw await de_ConcurrentModificationExceptionRes(parsedOutput, context);
2739
- case "InternalException":
2740
- case "com.amazonaws.cloudwatchevents#InternalException":
2741
- throw await de_InternalExceptionRes(parsedOutput, context);
2742
- case "ManagedRuleException":
2743
- case "com.amazonaws.cloudwatchevents#ManagedRuleException":
2744
- throw await de_ManagedRuleExceptionRes(parsedOutput, context);
2745
- case "ResourceNotFoundException":
2746
- case "com.amazonaws.cloudwatchevents#ResourceNotFoundException":
2747
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
2748
- default:
2749
- const parsedBody = parsedOutput.body;
2750
- return throwDefaultError({
2751
- output,
2752
- parsedBody,
2753
- errorCode
2754
- });
2755
- }
2756
- }, "de_UntagResourceCommandError");
2757
1539
  var de_UpdateApiDestinationCommand = /* @__PURE__ */ __name(async (output, context) => {
2758
1540
  if (output.statusCode >= 300) {
2759
- return de_UpdateApiDestinationCommandError(output, context);
1541
+ return de_CommandError(output, context);
2760
1542
  }
2761
1543
  const data = await parseBody(output.body, context);
2762
1544
  let contents = {};
@@ -2767,37 +1549,9 @@ var de_UpdateApiDestinationCommand = /* @__PURE__ */ __name(async (output, conte
2767
1549
  };
2768
1550
  return response;
2769
1551
  }, "de_UpdateApiDestinationCommand");
2770
- var de_UpdateApiDestinationCommandError = /* @__PURE__ */ __name(async (output, context) => {
2771
- const parsedOutput = {
2772
- ...output,
2773
- body: await parseErrorBody(output.body, context)
2774
- };
2775
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2776
- switch (errorCode) {
2777
- case "ConcurrentModificationException":
2778
- case "com.amazonaws.cloudwatchevents#ConcurrentModificationException":
2779
- throw await de_ConcurrentModificationExceptionRes(parsedOutput, context);
2780
- case "InternalException":
2781
- case "com.amazonaws.cloudwatchevents#InternalException":
2782
- throw await de_InternalExceptionRes(parsedOutput, context);
2783
- case "LimitExceededException":
2784
- case "com.amazonaws.cloudwatchevents#LimitExceededException":
2785
- throw await de_LimitExceededExceptionRes(parsedOutput, context);
2786
- case "ResourceNotFoundException":
2787
- case "com.amazonaws.cloudwatchevents#ResourceNotFoundException":
2788
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
2789
- default:
2790
- const parsedBody = parsedOutput.body;
2791
- return throwDefaultError({
2792
- output,
2793
- parsedBody,
2794
- errorCode
2795
- });
2796
- }
2797
- }, "de_UpdateApiDestinationCommandError");
2798
1552
  var de_UpdateArchiveCommand = /* @__PURE__ */ __name(async (output, context) => {
2799
1553
  if (output.statusCode >= 300) {
2800
- return de_UpdateArchiveCommandError(output, context);
1554
+ return de_CommandError(output, context);
2801
1555
  }
2802
1556
  const data = await parseBody(output.body, context);
2803
1557
  let contents = {};
@@ -2808,40 +1562,9 @@ var de_UpdateArchiveCommand = /* @__PURE__ */ __name(async (output, context) =>
2808
1562
  };
2809
1563
  return response;
2810
1564
  }, "de_UpdateArchiveCommand");
2811
- var de_UpdateArchiveCommandError = /* @__PURE__ */ __name(async (output, context) => {
2812
- const parsedOutput = {
2813
- ...output,
2814
- body: await parseErrorBody(output.body, context)
2815
- };
2816
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2817
- switch (errorCode) {
2818
- case "ConcurrentModificationException":
2819
- case "com.amazonaws.cloudwatchevents#ConcurrentModificationException":
2820
- throw await de_ConcurrentModificationExceptionRes(parsedOutput, context);
2821
- case "InternalException":
2822
- case "com.amazonaws.cloudwatchevents#InternalException":
2823
- throw await de_InternalExceptionRes(parsedOutput, context);
2824
- case "InvalidEventPatternException":
2825
- case "com.amazonaws.cloudwatchevents#InvalidEventPatternException":
2826
- throw await de_InvalidEventPatternExceptionRes(parsedOutput, context);
2827
- case "LimitExceededException":
2828
- case "com.amazonaws.cloudwatchevents#LimitExceededException":
2829
- throw await de_LimitExceededExceptionRes(parsedOutput, context);
2830
- case "ResourceNotFoundException":
2831
- case "com.amazonaws.cloudwatchevents#ResourceNotFoundException":
2832
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
2833
- default:
2834
- const parsedBody = parsedOutput.body;
2835
- return throwDefaultError({
2836
- output,
2837
- parsedBody,
2838
- errorCode
2839
- });
2840
- }
2841
- }, "de_UpdateArchiveCommandError");
2842
1565
  var de_UpdateConnectionCommand = /* @__PURE__ */ __name(async (output, context) => {
2843
1566
  if (output.statusCode >= 300) {
2844
- return de_UpdateConnectionCommandError(output, context);
1567
+ return de_CommandError(output, context);
2845
1568
  }
2846
1569
  const data = await parseBody(output.body, context);
2847
1570
  let contents = {};
@@ -2852,7 +1575,7 @@ var de_UpdateConnectionCommand = /* @__PURE__ */ __name(async (output, context)
2852
1575
  };
2853
1576
  return response;
2854
1577
  }, "de_UpdateConnectionCommand");
2855
- var de_UpdateConnectionCommandError = /* @__PURE__ */ __name(async (output, context) => {
1578
+ var de_CommandError = /* @__PURE__ */ __name(async (output, context) => {
2856
1579
  const parsedOutput = {
2857
1580
  ...output,
2858
1581
  body: await parseErrorBody(output.body, context)
@@ -2865,12 +1588,33 @@ var de_UpdateConnectionCommandError = /* @__PURE__ */ __name(async (output, cont
2865
1588
  case "InternalException":
2866
1589
  case "com.amazonaws.cloudwatchevents#InternalException":
2867
1590
  throw await de_InternalExceptionRes(parsedOutput, context);
2868
- case "LimitExceededException":
2869
- case "com.amazonaws.cloudwatchevents#LimitExceededException":
2870
- throw await de_LimitExceededExceptionRes(parsedOutput, context);
1591
+ case "InvalidStateException":
1592
+ case "com.amazonaws.cloudwatchevents#InvalidStateException":
1593
+ throw await de_InvalidStateExceptionRes(parsedOutput, context);
1594
+ case "OperationDisabledException":
1595
+ case "com.amazonaws.cloudwatchevents#OperationDisabledException":
1596
+ throw await de_OperationDisabledExceptionRes(parsedOutput, context);
2871
1597
  case "ResourceNotFoundException":
2872
1598
  case "com.amazonaws.cloudwatchevents#ResourceNotFoundException":
2873
1599
  throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
1600
+ case "IllegalStatusException":
1601
+ case "com.amazonaws.cloudwatchevents#IllegalStatusException":
1602
+ throw await de_IllegalStatusExceptionRes(parsedOutput, context);
1603
+ case "LimitExceededException":
1604
+ case "com.amazonaws.cloudwatchevents#LimitExceededException":
1605
+ throw await de_LimitExceededExceptionRes(parsedOutput, context);
1606
+ case "ResourceAlreadyExistsException":
1607
+ case "com.amazonaws.cloudwatchevents#ResourceAlreadyExistsException":
1608
+ throw await de_ResourceAlreadyExistsExceptionRes(parsedOutput, context);
1609
+ case "InvalidEventPatternException":
1610
+ case "com.amazonaws.cloudwatchevents#InvalidEventPatternException":
1611
+ throw await de_InvalidEventPatternExceptionRes(parsedOutput, context);
1612
+ case "ManagedRuleException":
1613
+ case "com.amazonaws.cloudwatchevents#ManagedRuleException":
1614
+ throw await de_ManagedRuleExceptionRes(parsedOutput, context);
1615
+ case "PolicyLengthExceededException":
1616
+ case "com.amazonaws.cloudwatchevents#PolicyLengthExceededException":
1617
+ throw await de_PolicyLengthExceededExceptionRes(parsedOutput, context);
2874
1618
  default:
2875
1619
  const parsedBody = parsedOutput.body;
2876
1620
  return throwDefaultError({
@@ -2879,7 +1623,7 @@ var de_UpdateConnectionCommandError = /* @__PURE__ */ __name(async (output, cont
2879
1623
  errorCode
2880
1624
  });
2881
1625
  }
2882
- }, "de_UpdateConnectionCommandError");
1626
+ }, "de_CommandError");
2883
1627
  var de_ConcurrentModificationExceptionRes = /* @__PURE__ */ __name(async (parsedOutput, context) => {
2884
1628
  const body = parsedOutput.body;
2885
1629
  const deserialized = (0, import_smithy_client._json)(body);