@aws-sdk/client-sesv2 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.
@@ -1211,7 +1211,7 @@ export const se_UpdateEmailTemplateCommand = async (input, context) => {
1211
1211
  };
1212
1212
  export const de_BatchGetMetricDataCommand = async (output, context) => {
1213
1213
  if (output.statusCode !== 200 && output.statusCode >= 300) {
1214
- return de_BatchGetMetricDataCommandError(output, context);
1214
+ return de_CommandError(output, context);
1215
1215
  }
1216
1216
  const contents = map({
1217
1217
  $metadata: deserializeMetadata(output),
@@ -1224,37 +1224,9 @@ export const de_BatchGetMetricDataCommand = async (output, context) => {
1224
1224
  Object.assign(contents, doc);
1225
1225
  return contents;
1226
1226
  };
1227
- const de_BatchGetMetricDataCommandError = async (output, context) => {
1228
- const parsedOutput = {
1229
- ...output,
1230
- body: await parseErrorBody(output.body, context),
1231
- };
1232
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1233
- switch (errorCode) {
1234
- case "BadRequestException":
1235
- case "com.amazonaws.sesv2#BadRequestException":
1236
- throw await de_BadRequestExceptionRes(parsedOutput, context);
1237
- case "InternalServiceErrorException":
1238
- case "com.amazonaws.sesv2#InternalServiceErrorException":
1239
- throw await de_InternalServiceErrorExceptionRes(parsedOutput, context);
1240
- case "NotFoundException":
1241
- case "com.amazonaws.sesv2#NotFoundException":
1242
- throw await de_NotFoundExceptionRes(parsedOutput, context);
1243
- case "TooManyRequestsException":
1244
- case "com.amazonaws.sesv2#TooManyRequestsException":
1245
- throw await de_TooManyRequestsExceptionRes(parsedOutput, context);
1246
- default:
1247
- const parsedBody = parsedOutput.body;
1248
- return throwDefaultError({
1249
- output,
1250
- parsedBody,
1251
- errorCode,
1252
- });
1253
- }
1254
- };
1255
1227
  export const de_CancelExportJobCommand = async (output, context) => {
1256
1228
  if (output.statusCode !== 200 && output.statusCode >= 300) {
1257
- return de_CancelExportJobCommandError(output, context);
1229
+ return de_CommandError(output, context);
1258
1230
  }
1259
1231
  const contents = map({
1260
1232
  $metadata: deserializeMetadata(output),
@@ -1262,34 +1234,9 @@ export const de_CancelExportJobCommand = async (output, context) => {
1262
1234
  await collectBody(output.body, context);
1263
1235
  return contents;
1264
1236
  };
1265
- const de_CancelExportJobCommandError = async (output, context) => {
1266
- const parsedOutput = {
1267
- ...output,
1268
- body: await parseErrorBody(output.body, context),
1269
- };
1270
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1271
- switch (errorCode) {
1272
- case "BadRequestException":
1273
- case "com.amazonaws.sesv2#BadRequestException":
1274
- throw await de_BadRequestExceptionRes(parsedOutput, context);
1275
- case "NotFoundException":
1276
- case "com.amazonaws.sesv2#NotFoundException":
1277
- throw await de_NotFoundExceptionRes(parsedOutput, context);
1278
- case "TooManyRequestsException":
1279
- case "com.amazonaws.sesv2#TooManyRequestsException":
1280
- throw await de_TooManyRequestsExceptionRes(parsedOutput, context);
1281
- default:
1282
- const parsedBody = parsedOutput.body;
1283
- return throwDefaultError({
1284
- output,
1285
- parsedBody,
1286
- errorCode,
1287
- });
1288
- }
1289
- };
1290
1237
  export const de_CreateConfigurationSetCommand = async (output, context) => {
1291
1238
  if (output.statusCode !== 200 && output.statusCode >= 300) {
1292
- return de_CreateConfigurationSetCommandError(output, context);
1239
+ return de_CommandError(output, context);
1293
1240
  }
1294
1241
  const contents = map({
1295
1242
  $metadata: deserializeMetadata(output),
@@ -1297,43 +1244,9 @@ export const de_CreateConfigurationSetCommand = async (output, context) => {
1297
1244
  await collectBody(output.body, context);
1298
1245
  return contents;
1299
1246
  };
1300
- const de_CreateConfigurationSetCommandError = async (output, context) => {
1301
- const parsedOutput = {
1302
- ...output,
1303
- body: await parseErrorBody(output.body, context),
1304
- };
1305
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1306
- switch (errorCode) {
1307
- case "AlreadyExistsException":
1308
- case "com.amazonaws.sesv2#AlreadyExistsException":
1309
- throw await de_AlreadyExistsExceptionRes(parsedOutput, context);
1310
- case "BadRequestException":
1311
- case "com.amazonaws.sesv2#BadRequestException":
1312
- throw await de_BadRequestExceptionRes(parsedOutput, context);
1313
- case "ConcurrentModificationException":
1314
- case "com.amazonaws.sesv2#ConcurrentModificationException":
1315
- throw await de_ConcurrentModificationExceptionRes(parsedOutput, context);
1316
- case "LimitExceededException":
1317
- case "com.amazonaws.sesv2#LimitExceededException":
1318
- throw await de_LimitExceededExceptionRes(parsedOutput, context);
1319
- case "NotFoundException":
1320
- case "com.amazonaws.sesv2#NotFoundException":
1321
- throw await de_NotFoundExceptionRes(parsedOutput, context);
1322
- case "TooManyRequestsException":
1323
- case "com.amazonaws.sesv2#TooManyRequestsException":
1324
- throw await de_TooManyRequestsExceptionRes(parsedOutput, context);
1325
- default:
1326
- const parsedBody = parsedOutput.body;
1327
- return throwDefaultError({
1328
- output,
1329
- parsedBody,
1330
- errorCode,
1331
- });
1332
- }
1333
- };
1334
1247
  export const de_CreateConfigurationSetEventDestinationCommand = async (output, context) => {
1335
1248
  if (output.statusCode !== 200 && output.statusCode >= 300) {
1336
- return de_CreateConfigurationSetEventDestinationCommandError(output, context);
1249
+ return de_CommandError(output, context);
1337
1250
  }
1338
1251
  const contents = map({
1339
1252
  $metadata: deserializeMetadata(output),
@@ -1341,40 +1254,9 @@ export const de_CreateConfigurationSetEventDestinationCommand = async (output, c
1341
1254
  await collectBody(output.body, context);
1342
1255
  return contents;
1343
1256
  };
1344
- const de_CreateConfigurationSetEventDestinationCommandError = async (output, context) => {
1345
- const parsedOutput = {
1346
- ...output,
1347
- body: await parseErrorBody(output.body, context),
1348
- };
1349
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1350
- switch (errorCode) {
1351
- case "AlreadyExistsException":
1352
- case "com.amazonaws.sesv2#AlreadyExistsException":
1353
- throw await de_AlreadyExistsExceptionRes(parsedOutput, context);
1354
- case "BadRequestException":
1355
- case "com.amazonaws.sesv2#BadRequestException":
1356
- throw await de_BadRequestExceptionRes(parsedOutput, context);
1357
- case "LimitExceededException":
1358
- case "com.amazonaws.sesv2#LimitExceededException":
1359
- throw await de_LimitExceededExceptionRes(parsedOutput, context);
1360
- case "NotFoundException":
1361
- case "com.amazonaws.sesv2#NotFoundException":
1362
- throw await de_NotFoundExceptionRes(parsedOutput, context);
1363
- case "TooManyRequestsException":
1364
- case "com.amazonaws.sesv2#TooManyRequestsException":
1365
- throw await de_TooManyRequestsExceptionRes(parsedOutput, context);
1366
- default:
1367
- const parsedBody = parsedOutput.body;
1368
- return throwDefaultError({
1369
- output,
1370
- parsedBody,
1371
- errorCode,
1372
- });
1373
- }
1374
- };
1375
1257
  export const de_CreateContactCommand = async (output, context) => {
1376
1258
  if (output.statusCode !== 200 && output.statusCode >= 300) {
1377
- return de_CreateContactCommandError(output, context);
1259
+ return de_CommandError(output, context);
1378
1260
  }
1379
1261
  const contents = map({
1380
1262
  $metadata: deserializeMetadata(output),
@@ -1382,37 +1264,9 @@ export const de_CreateContactCommand = async (output, context) => {
1382
1264
  await collectBody(output.body, context);
1383
1265
  return contents;
1384
1266
  };
1385
- const de_CreateContactCommandError = async (output, context) => {
1386
- const parsedOutput = {
1387
- ...output,
1388
- body: await parseErrorBody(output.body, context),
1389
- };
1390
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1391
- switch (errorCode) {
1392
- case "AlreadyExistsException":
1393
- case "com.amazonaws.sesv2#AlreadyExistsException":
1394
- throw await de_AlreadyExistsExceptionRes(parsedOutput, context);
1395
- case "BadRequestException":
1396
- case "com.amazonaws.sesv2#BadRequestException":
1397
- throw await de_BadRequestExceptionRes(parsedOutput, context);
1398
- case "NotFoundException":
1399
- case "com.amazonaws.sesv2#NotFoundException":
1400
- throw await de_NotFoundExceptionRes(parsedOutput, context);
1401
- case "TooManyRequestsException":
1402
- case "com.amazonaws.sesv2#TooManyRequestsException":
1403
- throw await de_TooManyRequestsExceptionRes(parsedOutput, context);
1404
- default:
1405
- const parsedBody = parsedOutput.body;
1406
- return throwDefaultError({
1407
- output,
1408
- parsedBody,
1409
- errorCode,
1410
- });
1411
- }
1412
- };
1413
1267
  export const de_CreateContactListCommand = async (output, context) => {
1414
1268
  if (output.statusCode !== 200 && output.statusCode >= 300) {
1415
- return de_CreateContactListCommandError(output, context);
1269
+ return de_CommandError(output, context);
1416
1270
  }
1417
1271
  const contents = map({
1418
1272
  $metadata: deserializeMetadata(output),
@@ -1420,37 +1274,9 @@ export const de_CreateContactListCommand = async (output, context) => {
1420
1274
  await collectBody(output.body, context);
1421
1275
  return contents;
1422
1276
  };
1423
- const de_CreateContactListCommandError = async (output, context) => {
1424
- const parsedOutput = {
1425
- ...output,
1426
- body: await parseErrorBody(output.body, context),
1427
- };
1428
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1429
- switch (errorCode) {
1430
- case "AlreadyExistsException":
1431
- case "com.amazonaws.sesv2#AlreadyExistsException":
1432
- throw await de_AlreadyExistsExceptionRes(parsedOutput, context);
1433
- case "BadRequestException":
1434
- case "com.amazonaws.sesv2#BadRequestException":
1435
- throw await de_BadRequestExceptionRes(parsedOutput, context);
1436
- case "LimitExceededException":
1437
- case "com.amazonaws.sesv2#LimitExceededException":
1438
- throw await de_LimitExceededExceptionRes(parsedOutput, context);
1439
- case "TooManyRequestsException":
1440
- case "com.amazonaws.sesv2#TooManyRequestsException":
1441
- throw await de_TooManyRequestsExceptionRes(parsedOutput, context);
1442
- default:
1443
- const parsedBody = parsedOutput.body;
1444
- return throwDefaultError({
1445
- output,
1446
- parsedBody,
1447
- errorCode,
1448
- });
1449
- }
1450
- };
1451
1277
  export const de_CreateCustomVerificationEmailTemplateCommand = async (output, context) => {
1452
1278
  if (output.statusCode !== 200 && output.statusCode >= 300) {
1453
- return de_CreateCustomVerificationEmailTemplateCommandError(output, context);
1279
+ return de_CommandError(output, context);
1454
1280
  }
1455
1281
  const contents = map({
1456
1282
  $metadata: deserializeMetadata(output),
@@ -1458,40 +1284,9 @@ export const de_CreateCustomVerificationEmailTemplateCommand = async (output, co
1458
1284
  await collectBody(output.body, context);
1459
1285
  return contents;
1460
1286
  };
1461
- const de_CreateCustomVerificationEmailTemplateCommandError = async (output, context) => {
1462
- const parsedOutput = {
1463
- ...output,
1464
- body: await parseErrorBody(output.body, context),
1465
- };
1466
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1467
- switch (errorCode) {
1468
- case "AlreadyExistsException":
1469
- case "com.amazonaws.sesv2#AlreadyExistsException":
1470
- throw await de_AlreadyExistsExceptionRes(parsedOutput, context);
1471
- case "BadRequestException":
1472
- case "com.amazonaws.sesv2#BadRequestException":
1473
- throw await de_BadRequestExceptionRes(parsedOutput, context);
1474
- case "LimitExceededException":
1475
- case "com.amazonaws.sesv2#LimitExceededException":
1476
- throw await de_LimitExceededExceptionRes(parsedOutput, context);
1477
- case "NotFoundException":
1478
- case "com.amazonaws.sesv2#NotFoundException":
1479
- throw await de_NotFoundExceptionRes(parsedOutput, context);
1480
- case "TooManyRequestsException":
1481
- case "com.amazonaws.sesv2#TooManyRequestsException":
1482
- throw await de_TooManyRequestsExceptionRes(parsedOutput, context);
1483
- default:
1484
- const parsedBody = parsedOutput.body;
1485
- return throwDefaultError({
1486
- output,
1487
- parsedBody,
1488
- errorCode,
1489
- });
1490
- }
1491
- };
1492
1287
  export const de_CreateDedicatedIpPoolCommand = async (output, context) => {
1493
1288
  if (output.statusCode !== 200 && output.statusCode >= 300) {
1494
- return de_CreateDedicatedIpPoolCommandError(output, context);
1289
+ return de_CommandError(output, context);
1495
1290
  }
1496
1291
  const contents = map({
1497
1292
  $metadata: deserializeMetadata(output),
@@ -1499,40 +1294,9 @@ export const de_CreateDedicatedIpPoolCommand = async (output, context) => {
1499
1294
  await collectBody(output.body, context);
1500
1295
  return contents;
1501
1296
  };
1502
- const de_CreateDedicatedIpPoolCommandError = 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 "AlreadyExistsException":
1510
- case "com.amazonaws.sesv2#AlreadyExistsException":
1511
- throw await de_AlreadyExistsExceptionRes(parsedOutput, context);
1512
- case "BadRequestException":
1513
- case "com.amazonaws.sesv2#BadRequestException":
1514
- throw await de_BadRequestExceptionRes(parsedOutput, context);
1515
- case "ConcurrentModificationException":
1516
- case "com.amazonaws.sesv2#ConcurrentModificationException":
1517
- throw await de_ConcurrentModificationExceptionRes(parsedOutput, context);
1518
- case "LimitExceededException":
1519
- case "com.amazonaws.sesv2#LimitExceededException":
1520
- throw await de_LimitExceededExceptionRes(parsedOutput, context);
1521
- case "TooManyRequestsException":
1522
- case "com.amazonaws.sesv2#TooManyRequestsException":
1523
- throw await de_TooManyRequestsExceptionRes(parsedOutput, context);
1524
- default:
1525
- const parsedBody = parsedOutput.body;
1526
- return throwDefaultError({
1527
- output,
1528
- parsedBody,
1529
- errorCode,
1530
- });
1531
- }
1532
- };
1533
1297
  export const de_CreateDeliverabilityTestReportCommand = async (output, context) => {
1534
1298
  if (output.statusCode !== 200 && output.statusCode >= 300) {
1535
- return de_CreateDeliverabilityTestReportCommandError(output, context);
1299
+ return de_CommandError(output, context);
1536
1300
  }
1537
1301
  const contents = map({
1538
1302
  $metadata: deserializeMetadata(output),
@@ -1545,52 +1309,9 @@ export const de_CreateDeliverabilityTestReportCommand = async (output, context)
1545
1309
  Object.assign(contents, doc);
1546
1310
  return contents;
1547
1311
  };
1548
- const de_CreateDeliverabilityTestReportCommandError = async (output, context) => {
1549
- const parsedOutput = {
1550
- ...output,
1551
- body: await parseErrorBody(output.body, context),
1552
- };
1553
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1554
- switch (errorCode) {
1555
- case "AccountSuspendedException":
1556
- case "com.amazonaws.sesv2#AccountSuspendedException":
1557
- throw await de_AccountSuspendedExceptionRes(parsedOutput, context);
1558
- case "BadRequestException":
1559
- case "com.amazonaws.sesv2#BadRequestException":
1560
- throw await de_BadRequestExceptionRes(parsedOutput, context);
1561
- case "ConcurrentModificationException":
1562
- case "com.amazonaws.sesv2#ConcurrentModificationException":
1563
- throw await de_ConcurrentModificationExceptionRes(parsedOutput, context);
1564
- case "LimitExceededException":
1565
- case "com.amazonaws.sesv2#LimitExceededException":
1566
- throw await de_LimitExceededExceptionRes(parsedOutput, context);
1567
- case "MailFromDomainNotVerifiedException":
1568
- case "com.amazonaws.sesv2#MailFromDomainNotVerifiedException":
1569
- throw await de_MailFromDomainNotVerifiedExceptionRes(parsedOutput, context);
1570
- case "MessageRejected":
1571
- case "com.amazonaws.sesv2#MessageRejected":
1572
- throw await de_MessageRejectedRes(parsedOutput, context);
1573
- case "NotFoundException":
1574
- case "com.amazonaws.sesv2#NotFoundException":
1575
- throw await de_NotFoundExceptionRes(parsedOutput, context);
1576
- case "SendingPausedException":
1577
- case "com.amazonaws.sesv2#SendingPausedException":
1578
- throw await de_SendingPausedExceptionRes(parsedOutput, context);
1579
- case "TooManyRequestsException":
1580
- case "com.amazonaws.sesv2#TooManyRequestsException":
1581
- throw await de_TooManyRequestsExceptionRes(parsedOutput, context);
1582
- default:
1583
- const parsedBody = parsedOutput.body;
1584
- return throwDefaultError({
1585
- output,
1586
- parsedBody,
1587
- errorCode,
1588
- });
1589
- }
1590
- };
1591
1312
  export const de_CreateEmailIdentityCommand = async (output, context) => {
1592
1313
  if (output.statusCode !== 200 && output.statusCode >= 300) {
1593
- return de_CreateEmailIdentityCommandError(output, context);
1314
+ return de_CommandError(output, context);
1594
1315
  }
1595
1316
  const contents = map({
1596
1317
  $metadata: deserializeMetadata(output),
@@ -1604,43 +1325,9 @@ export const de_CreateEmailIdentityCommand = async (output, context) => {
1604
1325
  Object.assign(contents, doc);
1605
1326
  return contents;
1606
1327
  };
1607
- const de_CreateEmailIdentityCommandError = async (output, context) => {
1608
- const parsedOutput = {
1609
- ...output,
1610
- body: await parseErrorBody(output.body, context),
1611
- };
1612
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1613
- switch (errorCode) {
1614
- case "AlreadyExistsException":
1615
- case "com.amazonaws.sesv2#AlreadyExistsException":
1616
- throw await de_AlreadyExistsExceptionRes(parsedOutput, context);
1617
- case "BadRequestException":
1618
- case "com.amazonaws.sesv2#BadRequestException":
1619
- throw await de_BadRequestExceptionRes(parsedOutput, context);
1620
- case "ConcurrentModificationException":
1621
- case "com.amazonaws.sesv2#ConcurrentModificationException":
1622
- throw await de_ConcurrentModificationExceptionRes(parsedOutput, context);
1623
- case "LimitExceededException":
1624
- case "com.amazonaws.sesv2#LimitExceededException":
1625
- throw await de_LimitExceededExceptionRes(parsedOutput, context);
1626
- case "NotFoundException":
1627
- case "com.amazonaws.sesv2#NotFoundException":
1628
- throw await de_NotFoundExceptionRes(parsedOutput, context);
1629
- case "TooManyRequestsException":
1630
- case "com.amazonaws.sesv2#TooManyRequestsException":
1631
- throw await de_TooManyRequestsExceptionRes(parsedOutput, context);
1632
- default:
1633
- const parsedBody = parsedOutput.body;
1634
- return throwDefaultError({
1635
- output,
1636
- parsedBody,
1637
- errorCode,
1638
- });
1639
- }
1640
- };
1641
1328
  export const de_CreateEmailIdentityPolicyCommand = async (output, context) => {
1642
1329
  if (output.statusCode !== 200 && output.statusCode >= 300) {
1643
- return de_CreateEmailIdentityPolicyCommandError(output, context);
1330
+ return de_CommandError(output, context);
1644
1331
  }
1645
1332
  const contents = map({
1646
1333
  $metadata: deserializeMetadata(output),
@@ -1648,40 +1335,9 @@ export const de_CreateEmailIdentityPolicyCommand = async (output, context) => {
1648
1335
  await collectBody(output.body, context);
1649
1336
  return contents;
1650
1337
  };
1651
- const de_CreateEmailIdentityPolicyCommandError = async (output, context) => {
1652
- const parsedOutput = {
1653
- ...output,
1654
- body: await parseErrorBody(output.body, context),
1655
- };
1656
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1657
- switch (errorCode) {
1658
- case "AlreadyExistsException":
1659
- case "com.amazonaws.sesv2#AlreadyExistsException":
1660
- throw await de_AlreadyExistsExceptionRes(parsedOutput, context);
1661
- case "BadRequestException":
1662
- case "com.amazonaws.sesv2#BadRequestException":
1663
- throw await de_BadRequestExceptionRes(parsedOutput, context);
1664
- case "LimitExceededException":
1665
- case "com.amazonaws.sesv2#LimitExceededException":
1666
- throw await de_LimitExceededExceptionRes(parsedOutput, context);
1667
- case "NotFoundException":
1668
- case "com.amazonaws.sesv2#NotFoundException":
1669
- throw await de_NotFoundExceptionRes(parsedOutput, context);
1670
- case "TooManyRequestsException":
1671
- case "com.amazonaws.sesv2#TooManyRequestsException":
1672
- throw await de_TooManyRequestsExceptionRes(parsedOutput, context);
1673
- default:
1674
- const parsedBody = parsedOutput.body;
1675
- return throwDefaultError({
1676
- output,
1677
- parsedBody,
1678
- errorCode,
1679
- });
1680
- }
1681
- };
1682
1338
  export const de_CreateEmailTemplateCommand = async (output, context) => {
1683
1339
  if (output.statusCode !== 200 && output.statusCode >= 300) {
1684
- return de_CreateEmailTemplateCommandError(output, context);
1340
+ return de_CommandError(output, context);
1685
1341
  }
1686
1342
  const contents = map({
1687
1343
  $metadata: deserializeMetadata(output),
@@ -1689,37 +1345,9 @@ export const de_CreateEmailTemplateCommand = async (output, context) => {
1689
1345
  await collectBody(output.body, context);
1690
1346
  return contents;
1691
1347
  };
1692
- const de_CreateEmailTemplateCommandError = async (output, context) => {
1693
- const parsedOutput = {
1694
- ...output,
1695
- body: await parseErrorBody(output.body, context),
1696
- };
1697
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1698
- switch (errorCode) {
1699
- case "AlreadyExistsException":
1700
- case "com.amazonaws.sesv2#AlreadyExistsException":
1701
- throw await de_AlreadyExistsExceptionRes(parsedOutput, context);
1702
- case "BadRequestException":
1703
- case "com.amazonaws.sesv2#BadRequestException":
1704
- throw await de_BadRequestExceptionRes(parsedOutput, context);
1705
- case "LimitExceededException":
1706
- case "com.amazonaws.sesv2#LimitExceededException":
1707
- throw await de_LimitExceededExceptionRes(parsedOutput, context);
1708
- case "TooManyRequestsException":
1709
- case "com.amazonaws.sesv2#TooManyRequestsException":
1710
- throw await de_TooManyRequestsExceptionRes(parsedOutput, context);
1711
- default:
1712
- const parsedBody = parsedOutput.body;
1713
- return throwDefaultError({
1714
- output,
1715
- parsedBody,
1716
- errorCode,
1717
- });
1718
- }
1719
- };
1720
1348
  export const de_CreateExportJobCommand = async (output, context) => {
1721
1349
  if (output.statusCode !== 200 && output.statusCode >= 300) {
1722
- return de_CreateExportJobCommandError(output, context);
1350
+ return de_CommandError(output, context);
1723
1351
  }
1724
1352
  const contents = map({
1725
1353
  $metadata: deserializeMetadata(output),
@@ -1731,37 +1359,9 @@ export const de_CreateExportJobCommand = async (output, context) => {
1731
1359
  Object.assign(contents, doc);
1732
1360
  return contents;
1733
1361
  };
1734
- const de_CreateExportJobCommandError = async (output, context) => {
1735
- const parsedOutput = {
1736
- ...output,
1737
- body: await parseErrorBody(output.body, context),
1738
- };
1739
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1740
- switch (errorCode) {
1741
- case "BadRequestException":
1742
- case "com.amazonaws.sesv2#BadRequestException":
1743
- throw await de_BadRequestExceptionRes(parsedOutput, context);
1744
- case "LimitExceededException":
1745
- case "com.amazonaws.sesv2#LimitExceededException":
1746
- throw await de_LimitExceededExceptionRes(parsedOutput, context);
1747
- case "NotFoundException":
1748
- case "com.amazonaws.sesv2#NotFoundException":
1749
- throw await de_NotFoundExceptionRes(parsedOutput, context);
1750
- case "TooManyRequestsException":
1751
- case "com.amazonaws.sesv2#TooManyRequestsException":
1752
- throw await de_TooManyRequestsExceptionRes(parsedOutput, context);
1753
- default:
1754
- const parsedBody = parsedOutput.body;
1755
- return throwDefaultError({
1756
- output,
1757
- parsedBody,
1758
- errorCode,
1759
- });
1760
- }
1761
- };
1762
1362
  export const de_CreateImportJobCommand = async (output, context) => {
1763
1363
  if (output.statusCode !== 200 && output.statusCode >= 300) {
1764
- return de_CreateImportJobCommandError(output, context);
1364
+ return de_CommandError(output, context);
1765
1365
  }
1766
1366
  const contents = map({
1767
1367
  $metadata: deserializeMetadata(output),
@@ -1773,34 +1373,9 @@ export const de_CreateImportJobCommand = async (output, context) => {
1773
1373
  Object.assign(contents, doc);
1774
1374
  return contents;
1775
1375
  };
1776
- const de_CreateImportJobCommandError = async (output, context) => {
1777
- const parsedOutput = {
1778
- ...output,
1779
- body: await parseErrorBody(output.body, context),
1780
- };
1781
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1782
- switch (errorCode) {
1783
- case "BadRequestException":
1784
- case "com.amazonaws.sesv2#BadRequestException":
1785
- throw await de_BadRequestExceptionRes(parsedOutput, context);
1786
- case "LimitExceededException":
1787
- case "com.amazonaws.sesv2#LimitExceededException":
1788
- throw await de_LimitExceededExceptionRes(parsedOutput, context);
1789
- case "TooManyRequestsException":
1790
- case "com.amazonaws.sesv2#TooManyRequestsException":
1791
- throw await de_TooManyRequestsExceptionRes(parsedOutput, context);
1792
- default:
1793
- const parsedBody = parsedOutput.body;
1794
- return throwDefaultError({
1795
- output,
1796
- parsedBody,
1797
- errorCode,
1798
- });
1799
- }
1800
- };
1801
1376
  export const de_DeleteConfigurationSetCommand = async (output, context) => {
1802
1377
  if (output.statusCode !== 200 && output.statusCode >= 300) {
1803
- return de_DeleteConfigurationSetCommandError(output, context);
1378
+ return de_CommandError(output, context);
1804
1379
  }
1805
1380
  const contents = map({
1806
1381
  $metadata: deserializeMetadata(output),
@@ -1808,37 +1383,19 @@ export const de_DeleteConfigurationSetCommand = async (output, context) => {
1808
1383
  await collectBody(output.body, context);
1809
1384
  return contents;
1810
1385
  };
1811
- const de_DeleteConfigurationSetCommandError = async (output, context) => {
1812
- const parsedOutput = {
1813
- ...output,
1814
- body: await parseErrorBody(output.body, context),
1815
- };
1816
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1817
- switch (errorCode) {
1818
- case "BadRequestException":
1819
- case "com.amazonaws.sesv2#BadRequestException":
1820
- throw await de_BadRequestExceptionRes(parsedOutput, context);
1821
- case "ConcurrentModificationException":
1822
- case "com.amazonaws.sesv2#ConcurrentModificationException":
1823
- throw await de_ConcurrentModificationExceptionRes(parsedOutput, context);
1824
- case "NotFoundException":
1825
- case "com.amazonaws.sesv2#NotFoundException":
1826
- throw await de_NotFoundExceptionRes(parsedOutput, context);
1827
- case "TooManyRequestsException":
1828
- case "com.amazonaws.sesv2#TooManyRequestsException":
1829
- throw await de_TooManyRequestsExceptionRes(parsedOutput, context);
1830
- default:
1831
- const parsedBody = parsedOutput.body;
1832
- return throwDefaultError({
1833
- output,
1834
- parsedBody,
1835
- errorCode,
1836
- });
1386
+ export const de_DeleteConfigurationSetEventDestinationCommand = async (output, context) => {
1387
+ if (output.statusCode !== 200 && output.statusCode >= 300) {
1388
+ return de_CommandError(output, context);
1837
1389
  }
1390
+ const contents = map({
1391
+ $metadata: deserializeMetadata(output),
1392
+ });
1393
+ await collectBody(output.body, context);
1394
+ return contents;
1838
1395
  };
1839
- export const de_DeleteConfigurationSetEventDestinationCommand = async (output, context) => {
1396
+ export const de_DeleteContactCommand = async (output, context) => {
1840
1397
  if (output.statusCode !== 200 && output.statusCode >= 300) {
1841
- return de_DeleteConfigurationSetEventDestinationCommandError(output, context);
1398
+ return de_CommandError(output, context);
1842
1399
  }
1843
1400
  const contents = map({
1844
1401
  $metadata: deserializeMetadata(output),
@@ -1846,34 +1403,19 @@ export const de_DeleteConfigurationSetEventDestinationCommand = async (output, c
1846
1403
  await collectBody(output.body, context);
1847
1404
  return contents;
1848
1405
  };
1849
- const de_DeleteConfigurationSetEventDestinationCommandError = async (output, context) => {
1850
- const parsedOutput = {
1851
- ...output,
1852
- body: await parseErrorBody(output.body, context),
1853
- };
1854
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1855
- switch (errorCode) {
1856
- case "BadRequestException":
1857
- case "com.amazonaws.sesv2#BadRequestException":
1858
- throw await de_BadRequestExceptionRes(parsedOutput, context);
1859
- case "NotFoundException":
1860
- case "com.amazonaws.sesv2#NotFoundException":
1861
- throw await de_NotFoundExceptionRes(parsedOutput, context);
1862
- case "TooManyRequestsException":
1863
- case "com.amazonaws.sesv2#TooManyRequestsException":
1864
- throw await de_TooManyRequestsExceptionRes(parsedOutput, context);
1865
- default:
1866
- const parsedBody = parsedOutput.body;
1867
- return throwDefaultError({
1868
- output,
1869
- parsedBody,
1870
- errorCode,
1871
- });
1406
+ export const de_DeleteContactListCommand = async (output, context) => {
1407
+ if (output.statusCode !== 200 && output.statusCode >= 300) {
1408
+ return de_CommandError(output, context);
1872
1409
  }
1410
+ const contents = map({
1411
+ $metadata: deserializeMetadata(output),
1412
+ });
1413
+ await collectBody(output.body, context);
1414
+ return contents;
1873
1415
  };
1874
- export const de_DeleteContactCommand = async (output, context) => {
1416
+ export const de_DeleteCustomVerificationEmailTemplateCommand = async (output, context) => {
1875
1417
  if (output.statusCode !== 200 && output.statusCode >= 300) {
1876
- return de_DeleteContactCommandError(output, context);
1418
+ return de_CommandError(output, context);
1877
1419
  }
1878
1420
  const contents = map({
1879
1421
  $metadata: deserializeMetadata(output),
@@ -1881,34 +1423,19 @@ export const de_DeleteContactCommand = async (output, context) => {
1881
1423
  await collectBody(output.body, context);
1882
1424
  return contents;
1883
1425
  };
1884
- const de_DeleteContactCommandError = async (output, context) => {
1885
- const parsedOutput = {
1886
- ...output,
1887
- body: await parseErrorBody(output.body, context),
1888
- };
1889
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1890
- switch (errorCode) {
1891
- case "BadRequestException":
1892
- case "com.amazonaws.sesv2#BadRequestException":
1893
- throw await de_BadRequestExceptionRes(parsedOutput, context);
1894
- case "NotFoundException":
1895
- case "com.amazonaws.sesv2#NotFoundException":
1896
- throw await de_NotFoundExceptionRes(parsedOutput, context);
1897
- case "TooManyRequestsException":
1898
- case "com.amazonaws.sesv2#TooManyRequestsException":
1899
- throw await de_TooManyRequestsExceptionRes(parsedOutput, context);
1900
- default:
1901
- const parsedBody = parsedOutput.body;
1902
- return throwDefaultError({
1903
- output,
1904
- parsedBody,
1905
- errorCode,
1906
- });
1426
+ export const de_DeleteDedicatedIpPoolCommand = async (output, context) => {
1427
+ if (output.statusCode !== 200 && output.statusCode >= 300) {
1428
+ return de_CommandError(output, context);
1907
1429
  }
1430
+ const contents = map({
1431
+ $metadata: deserializeMetadata(output),
1432
+ });
1433
+ await collectBody(output.body, context);
1434
+ return contents;
1908
1435
  };
1909
- export const de_DeleteContactListCommand = async (output, context) => {
1436
+ export const de_DeleteEmailIdentityCommand = async (output, context) => {
1910
1437
  if (output.statusCode !== 200 && output.statusCode >= 300) {
1911
- return de_DeleteContactListCommandError(output, context);
1438
+ return de_CommandError(output, context);
1912
1439
  }
1913
1440
  const contents = map({
1914
1441
  $metadata: deserializeMetadata(output),
@@ -1916,148 +1443,9 @@ export const de_DeleteContactListCommand = async (output, context) => {
1916
1443
  await collectBody(output.body, context);
1917
1444
  return contents;
1918
1445
  };
1919
- const de_DeleteContactListCommandError = async (output, context) => {
1920
- const parsedOutput = {
1921
- ...output,
1922
- body: await parseErrorBody(output.body, context),
1923
- };
1924
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1925
- switch (errorCode) {
1926
- case "BadRequestException":
1927
- case "com.amazonaws.sesv2#BadRequestException":
1928
- throw await de_BadRequestExceptionRes(parsedOutput, context);
1929
- case "ConcurrentModificationException":
1930
- case "com.amazonaws.sesv2#ConcurrentModificationException":
1931
- throw await de_ConcurrentModificationExceptionRes(parsedOutput, context);
1932
- case "NotFoundException":
1933
- case "com.amazonaws.sesv2#NotFoundException":
1934
- throw await de_NotFoundExceptionRes(parsedOutput, context);
1935
- case "TooManyRequestsException":
1936
- case "com.amazonaws.sesv2#TooManyRequestsException":
1937
- throw await de_TooManyRequestsExceptionRes(parsedOutput, context);
1938
- default:
1939
- const parsedBody = parsedOutput.body;
1940
- return throwDefaultError({
1941
- output,
1942
- parsedBody,
1943
- errorCode,
1944
- });
1945
- }
1946
- };
1947
- export const de_DeleteCustomVerificationEmailTemplateCommand = async (output, context) => {
1948
- if (output.statusCode !== 200 && output.statusCode >= 300) {
1949
- return de_DeleteCustomVerificationEmailTemplateCommandError(output, context);
1950
- }
1951
- const contents = map({
1952
- $metadata: deserializeMetadata(output),
1953
- });
1954
- await collectBody(output.body, context);
1955
- return contents;
1956
- };
1957
- const de_DeleteCustomVerificationEmailTemplateCommandError = async (output, context) => {
1958
- const parsedOutput = {
1959
- ...output,
1960
- body: await parseErrorBody(output.body, context),
1961
- };
1962
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1963
- switch (errorCode) {
1964
- case "BadRequestException":
1965
- case "com.amazonaws.sesv2#BadRequestException":
1966
- throw await de_BadRequestExceptionRes(parsedOutput, context);
1967
- case "NotFoundException":
1968
- case "com.amazonaws.sesv2#NotFoundException":
1969
- throw await de_NotFoundExceptionRes(parsedOutput, context);
1970
- case "TooManyRequestsException":
1971
- case "com.amazonaws.sesv2#TooManyRequestsException":
1972
- throw await de_TooManyRequestsExceptionRes(parsedOutput, context);
1973
- default:
1974
- const parsedBody = parsedOutput.body;
1975
- return throwDefaultError({
1976
- output,
1977
- parsedBody,
1978
- errorCode,
1979
- });
1980
- }
1981
- };
1982
- export const de_DeleteDedicatedIpPoolCommand = async (output, context) => {
1983
- if (output.statusCode !== 200 && output.statusCode >= 300) {
1984
- return de_DeleteDedicatedIpPoolCommandError(output, context);
1985
- }
1986
- const contents = map({
1987
- $metadata: deserializeMetadata(output),
1988
- });
1989
- await collectBody(output.body, context);
1990
- return contents;
1991
- };
1992
- const de_DeleteDedicatedIpPoolCommandError = async (output, context) => {
1993
- const parsedOutput = {
1994
- ...output,
1995
- body: await parseErrorBody(output.body, context),
1996
- };
1997
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1998
- switch (errorCode) {
1999
- case "BadRequestException":
2000
- case "com.amazonaws.sesv2#BadRequestException":
2001
- throw await de_BadRequestExceptionRes(parsedOutput, context);
2002
- case "ConcurrentModificationException":
2003
- case "com.amazonaws.sesv2#ConcurrentModificationException":
2004
- throw await de_ConcurrentModificationExceptionRes(parsedOutput, context);
2005
- case "NotFoundException":
2006
- case "com.amazonaws.sesv2#NotFoundException":
2007
- throw await de_NotFoundExceptionRes(parsedOutput, context);
2008
- case "TooManyRequestsException":
2009
- case "com.amazonaws.sesv2#TooManyRequestsException":
2010
- throw await de_TooManyRequestsExceptionRes(parsedOutput, context);
2011
- default:
2012
- const parsedBody = parsedOutput.body;
2013
- return throwDefaultError({
2014
- output,
2015
- parsedBody,
2016
- errorCode,
2017
- });
2018
- }
2019
- };
2020
- export const de_DeleteEmailIdentityCommand = async (output, context) => {
2021
- if (output.statusCode !== 200 && output.statusCode >= 300) {
2022
- return de_DeleteEmailIdentityCommandError(output, context);
2023
- }
2024
- const contents = map({
2025
- $metadata: deserializeMetadata(output),
2026
- });
2027
- await collectBody(output.body, context);
2028
- return contents;
2029
- };
2030
- const de_DeleteEmailIdentityCommandError = async (output, context) => {
2031
- const parsedOutput = {
2032
- ...output,
2033
- body: await parseErrorBody(output.body, context),
2034
- };
2035
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2036
- switch (errorCode) {
2037
- case "BadRequestException":
2038
- case "com.amazonaws.sesv2#BadRequestException":
2039
- throw await de_BadRequestExceptionRes(parsedOutput, context);
2040
- case "ConcurrentModificationException":
2041
- case "com.amazonaws.sesv2#ConcurrentModificationException":
2042
- throw await de_ConcurrentModificationExceptionRes(parsedOutput, context);
2043
- case "NotFoundException":
2044
- case "com.amazonaws.sesv2#NotFoundException":
2045
- throw await de_NotFoundExceptionRes(parsedOutput, context);
2046
- case "TooManyRequestsException":
2047
- case "com.amazonaws.sesv2#TooManyRequestsException":
2048
- throw await de_TooManyRequestsExceptionRes(parsedOutput, context);
2049
- default:
2050
- const parsedBody = parsedOutput.body;
2051
- return throwDefaultError({
2052
- output,
2053
- parsedBody,
2054
- errorCode,
2055
- });
2056
- }
2057
- };
2058
1446
  export const de_DeleteEmailIdentityPolicyCommand = async (output, context) => {
2059
1447
  if (output.statusCode !== 200 && output.statusCode >= 300) {
2060
- return de_DeleteEmailIdentityPolicyCommandError(output, context);
1448
+ return de_CommandError(output, context);
2061
1449
  }
2062
1450
  const contents = map({
2063
1451
  $metadata: deserializeMetadata(output),
@@ -2065,34 +1453,9 @@ export const de_DeleteEmailIdentityPolicyCommand = async (output, context) => {
2065
1453
  await collectBody(output.body, context);
2066
1454
  return contents;
2067
1455
  };
2068
- const de_DeleteEmailIdentityPolicyCommandError = async (output, context) => {
2069
- const parsedOutput = {
2070
- ...output,
2071
- body: await parseErrorBody(output.body, context),
2072
- };
2073
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2074
- switch (errorCode) {
2075
- case "BadRequestException":
2076
- case "com.amazonaws.sesv2#BadRequestException":
2077
- throw await de_BadRequestExceptionRes(parsedOutput, context);
2078
- case "NotFoundException":
2079
- case "com.amazonaws.sesv2#NotFoundException":
2080
- throw await de_NotFoundExceptionRes(parsedOutput, context);
2081
- case "TooManyRequestsException":
2082
- case "com.amazonaws.sesv2#TooManyRequestsException":
2083
- throw await de_TooManyRequestsExceptionRes(parsedOutput, context);
2084
- default:
2085
- const parsedBody = parsedOutput.body;
2086
- return throwDefaultError({
2087
- output,
2088
- parsedBody,
2089
- errorCode,
2090
- });
2091
- }
2092
- };
2093
1456
  export const de_DeleteEmailTemplateCommand = async (output, context) => {
2094
1457
  if (output.statusCode !== 200 && output.statusCode >= 300) {
2095
- return de_DeleteEmailTemplateCommandError(output, context);
1458
+ return de_CommandError(output, context);
2096
1459
  }
2097
1460
  const contents = map({
2098
1461
  $metadata: deserializeMetadata(output),
@@ -2100,34 +1463,9 @@ export const de_DeleteEmailTemplateCommand = async (output, context) => {
2100
1463
  await collectBody(output.body, context);
2101
1464
  return contents;
2102
1465
  };
2103
- const de_DeleteEmailTemplateCommandError = async (output, context) => {
2104
- const parsedOutput = {
2105
- ...output,
2106
- body: await parseErrorBody(output.body, context),
2107
- };
2108
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2109
- switch (errorCode) {
2110
- case "BadRequestException":
2111
- case "com.amazonaws.sesv2#BadRequestException":
2112
- throw await de_BadRequestExceptionRes(parsedOutput, context);
2113
- case "NotFoundException":
2114
- case "com.amazonaws.sesv2#NotFoundException":
2115
- throw await de_NotFoundExceptionRes(parsedOutput, context);
2116
- case "TooManyRequestsException":
2117
- case "com.amazonaws.sesv2#TooManyRequestsException":
2118
- throw await de_TooManyRequestsExceptionRes(parsedOutput, context);
2119
- default:
2120
- const parsedBody = parsedOutput.body;
2121
- return throwDefaultError({
2122
- output,
2123
- parsedBody,
2124
- errorCode,
2125
- });
2126
- }
2127
- };
2128
1466
  export const de_DeleteSuppressedDestinationCommand = async (output, context) => {
2129
1467
  if (output.statusCode !== 200 && output.statusCode >= 300) {
2130
- return de_DeleteSuppressedDestinationCommandError(output, context);
1468
+ return de_CommandError(output, context);
2131
1469
  }
2132
1470
  const contents = map({
2133
1471
  $metadata: deserializeMetadata(output),
@@ -2135,34 +1473,9 @@ export const de_DeleteSuppressedDestinationCommand = async (output, context) =>
2135
1473
  await collectBody(output.body, context);
2136
1474
  return contents;
2137
1475
  };
2138
- const de_DeleteSuppressedDestinationCommandError = async (output, context) => {
2139
- const parsedOutput = {
2140
- ...output,
2141
- body: await parseErrorBody(output.body, context),
2142
- };
2143
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2144
- switch (errorCode) {
2145
- case "BadRequestException":
2146
- case "com.amazonaws.sesv2#BadRequestException":
2147
- throw await de_BadRequestExceptionRes(parsedOutput, context);
2148
- case "NotFoundException":
2149
- case "com.amazonaws.sesv2#NotFoundException":
2150
- throw await de_NotFoundExceptionRes(parsedOutput, context);
2151
- case "TooManyRequestsException":
2152
- case "com.amazonaws.sesv2#TooManyRequestsException":
2153
- throw await de_TooManyRequestsExceptionRes(parsedOutput, context);
2154
- default:
2155
- const parsedBody = parsedOutput.body;
2156
- return throwDefaultError({
2157
- output,
2158
- parsedBody,
2159
- errorCode,
2160
- });
2161
- }
2162
- };
2163
1476
  export const de_GetAccountCommand = async (output, context) => {
2164
1477
  if (output.statusCode !== 200 && output.statusCode >= 300) {
2165
- return de_GetAccountCommandError(output, context);
1478
+ return de_CommandError(output, context);
2166
1479
  }
2167
1480
  const contents = map({
2168
1481
  $metadata: deserializeMetadata(output),
@@ -2181,31 +1494,9 @@ export const de_GetAccountCommand = async (output, context) => {
2181
1494
  Object.assign(contents, doc);
2182
1495
  return contents;
2183
1496
  };
2184
- const de_GetAccountCommandError = async (output, context) => {
2185
- const parsedOutput = {
2186
- ...output,
2187
- body: await parseErrorBody(output.body, context),
2188
- };
2189
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2190
- switch (errorCode) {
2191
- case "BadRequestException":
2192
- case "com.amazonaws.sesv2#BadRequestException":
2193
- throw await de_BadRequestExceptionRes(parsedOutput, context);
2194
- case "TooManyRequestsException":
2195
- case "com.amazonaws.sesv2#TooManyRequestsException":
2196
- throw await de_TooManyRequestsExceptionRes(parsedOutput, context);
2197
- default:
2198
- const parsedBody = parsedOutput.body;
2199
- return throwDefaultError({
2200
- output,
2201
- parsedBody,
2202
- errorCode,
2203
- });
2204
- }
2205
- };
2206
1497
  export const de_GetBlacklistReportsCommand = async (output, context) => {
2207
1498
  if (output.statusCode !== 200 && output.statusCode >= 300) {
2208
- return de_GetBlacklistReportsCommandError(output, context);
1499
+ return de_CommandError(output, context);
2209
1500
  }
2210
1501
  const contents = map({
2211
1502
  $metadata: deserializeMetadata(output),
@@ -2217,34 +1508,9 @@ export const de_GetBlacklistReportsCommand = async (output, context) => {
2217
1508
  Object.assign(contents, doc);
2218
1509
  return contents;
2219
1510
  };
2220
- const de_GetBlacklistReportsCommandError = async (output, context) => {
2221
- const parsedOutput = {
2222
- ...output,
2223
- body: await parseErrorBody(output.body, context),
2224
- };
2225
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2226
- switch (errorCode) {
2227
- case "BadRequestException":
2228
- case "com.amazonaws.sesv2#BadRequestException":
2229
- throw await de_BadRequestExceptionRes(parsedOutput, context);
2230
- case "NotFoundException":
2231
- case "com.amazonaws.sesv2#NotFoundException":
2232
- throw await de_NotFoundExceptionRes(parsedOutput, context);
2233
- case "TooManyRequestsException":
2234
- case "com.amazonaws.sesv2#TooManyRequestsException":
2235
- throw await de_TooManyRequestsExceptionRes(parsedOutput, context);
2236
- default:
2237
- const parsedBody = parsedOutput.body;
2238
- return throwDefaultError({
2239
- output,
2240
- parsedBody,
2241
- errorCode,
2242
- });
2243
- }
2244
- };
2245
1511
  export const de_GetConfigurationSetCommand = async (output, context) => {
2246
1512
  if (output.statusCode !== 200 && output.statusCode >= 300) {
2247
- return de_GetConfigurationSetCommandError(output, context);
1513
+ return de_CommandError(output, context);
2248
1514
  }
2249
1515
  const contents = map({
2250
1516
  $metadata: deserializeMetadata(output),
@@ -2263,34 +1529,9 @@ export const de_GetConfigurationSetCommand = async (output, context) => {
2263
1529
  Object.assign(contents, doc);
2264
1530
  return contents;
2265
1531
  };
2266
- const de_GetConfigurationSetCommandError = async (output, context) => {
2267
- const parsedOutput = {
2268
- ...output,
2269
- body: await parseErrorBody(output.body, context),
2270
- };
2271
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2272
- switch (errorCode) {
2273
- case "BadRequestException":
2274
- case "com.amazonaws.sesv2#BadRequestException":
2275
- throw await de_BadRequestExceptionRes(parsedOutput, context);
2276
- case "NotFoundException":
2277
- case "com.amazonaws.sesv2#NotFoundException":
2278
- throw await de_NotFoundExceptionRes(parsedOutput, context);
2279
- case "TooManyRequestsException":
2280
- case "com.amazonaws.sesv2#TooManyRequestsException":
2281
- throw await de_TooManyRequestsExceptionRes(parsedOutput, context);
2282
- default:
2283
- const parsedBody = parsedOutput.body;
2284
- return throwDefaultError({
2285
- output,
2286
- parsedBody,
2287
- errorCode,
2288
- });
2289
- }
2290
- };
2291
1532
  export const de_GetConfigurationSetEventDestinationsCommand = async (output, context) => {
2292
1533
  if (output.statusCode !== 200 && output.statusCode >= 300) {
2293
- return de_GetConfigurationSetEventDestinationsCommandError(output, context);
1534
+ return de_CommandError(output, context);
2294
1535
  }
2295
1536
  const contents = map({
2296
1537
  $metadata: deserializeMetadata(output),
@@ -2302,34 +1543,9 @@ export const de_GetConfigurationSetEventDestinationsCommand = async (output, con
2302
1543
  Object.assign(contents, doc);
2303
1544
  return contents;
2304
1545
  };
2305
- const de_GetConfigurationSetEventDestinationsCommandError = async (output, context) => {
2306
- const parsedOutput = {
2307
- ...output,
2308
- body: await parseErrorBody(output.body, context),
2309
- };
2310
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2311
- switch (errorCode) {
2312
- case "BadRequestException":
2313
- case "com.amazonaws.sesv2#BadRequestException":
2314
- throw await de_BadRequestExceptionRes(parsedOutput, context);
2315
- case "NotFoundException":
2316
- case "com.amazonaws.sesv2#NotFoundException":
2317
- throw await de_NotFoundExceptionRes(parsedOutput, context);
2318
- case "TooManyRequestsException":
2319
- case "com.amazonaws.sesv2#TooManyRequestsException":
2320
- throw await de_TooManyRequestsExceptionRes(parsedOutput, context);
2321
- default:
2322
- const parsedBody = parsedOutput.body;
2323
- return throwDefaultError({
2324
- output,
2325
- parsedBody,
2326
- errorCode,
2327
- });
2328
- }
2329
- };
2330
1546
  export const de_GetContactCommand = async (output, context) => {
2331
1547
  if (output.statusCode !== 200 && output.statusCode >= 300) {
2332
- return de_GetContactCommandError(output, context);
1548
+ return de_CommandError(output, context);
2333
1549
  }
2334
1550
  const contents = map({
2335
1551
  $metadata: deserializeMetadata(output),
@@ -2348,34 +1564,9 @@ export const de_GetContactCommand = async (output, context) => {
2348
1564
  Object.assign(contents, doc);
2349
1565
  return contents;
2350
1566
  };
2351
- const de_GetContactCommandError = async (output, context) => {
2352
- const parsedOutput = {
2353
- ...output,
2354
- body: await parseErrorBody(output.body, context),
2355
- };
2356
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2357
- switch (errorCode) {
2358
- case "BadRequestException":
2359
- case "com.amazonaws.sesv2#BadRequestException":
2360
- throw await de_BadRequestExceptionRes(parsedOutput, context);
2361
- case "NotFoundException":
2362
- case "com.amazonaws.sesv2#NotFoundException":
2363
- throw await de_NotFoundExceptionRes(parsedOutput, context);
2364
- case "TooManyRequestsException":
2365
- case "com.amazonaws.sesv2#TooManyRequestsException":
2366
- throw await de_TooManyRequestsExceptionRes(parsedOutput, context);
2367
- default:
2368
- const parsedBody = parsedOutput.body;
2369
- return throwDefaultError({
2370
- output,
2371
- parsedBody,
2372
- errorCode,
2373
- });
2374
- }
2375
- };
2376
1567
  export const de_GetContactListCommand = async (output, context) => {
2377
1568
  if (output.statusCode !== 200 && output.statusCode >= 300) {
2378
- return de_GetContactListCommandError(output, context);
1569
+ return de_CommandError(output, context);
2379
1570
  }
2380
1571
  const contents = map({
2381
1572
  $metadata: deserializeMetadata(output),
@@ -2392,34 +1583,9 @@ export const de_GetContactListCommand = async (output, context) => {
2392
1583
  Object.assign(contents, doc);
2393
1584
  return contents;
2394
1585
  };
2395
- const de_GetContactListCommandError = 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 "BadRequestException":
2403
- case "com.amazonaws.sesv2#BadRequestException":
2404
- throw await de_BadRequestExceptionRes(parsedOutput, context);
2405
- case "NotFoundException":
2406
- case "com.amazonaws.sesv2#NotFoundException":
2407
- throw await de_NotFoundExceptionRes(parsedOutput, context);
2408
- case "TooManyRequestsException":
2409
- case "com.amazonaws.sesv2#TooManyRequestsException":
2410
- throw await de_TooManyRequestsExceptionRes(parsedOutput, context);
2411
- default:
2412
- const parsedBody = parsedOutput.body;
2413
- return throwDefaultError({
2414
- output,
2415
- parsedBody,
2416
- errorCode,
2417
- });
2418
- }
2419
- };
2420
1586
  export const de_GetCustomVerificationEmailTemplateCommand = async (output, context) => {
2421
1587
  if (output.statusCode !== 200 && output.statusCode >= 300) {
2422
- return de_GetCustomVerificationEmailTemplateCommandError(output, context);
1588
+ return de_CommandError(output, context);
2423
1589
  }
2424
1590
  const contents = map({
2425
1591
  $metadata: deserializeMetadata(output),
@@ -2436,34 +1602,9 @@ export const de_GetCustomVerificationEmailTemplateCommand = async (output, conte
2436
1602
  Object.assign(contents, doc);
2437
1603
  return contents;
2438
1604
  };
2439
- const de_GetCustomVerificationEmailTemplateCommandError = 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 "BadRequestException":
2447
- case "com.amazonaws.sesv2#BadRequestException":
2448
- throw await de_BadRequestExceptionRes(parsedOutput, context);
2449
- case "NotFoundException":
2450
- case "com.amazonaws.sesv2#NotFoundException":
2451
- throw await de_NotFoundExceptionRes(parsedOutput, context);
2452
- case "TooManyRequestsException":
2453
- case "com.amazonaws.sesv2#TooManyRequestsException":
2454
- throw await de_TooManyRequestsExceptionRes(parsedOutput, context);
2455
- default:
2456
- const parsedBody = parsedOutput.body;
2457
- return throwDefaultError({
2458
- output,
2459
- parsedBody,
2460
- errorCode,
2461
- });
2462
- }
2463
- };
2464
1605
  export const de_GetDedicatedIpCommand = async (output, context) => {
2465
1606
  if (output.statusCode !== 200 && output.statusCode >= 300) {
2466
- return de_GetDedicatedIpCommandError(output, context);
1607
+ return de_CommandError(output, context);
2467
1608
  }
2468
1609
  const contents = map({
2469
1610
  $metadata: deserializeMetadata(output),
@@ -2475,34 +1616,9 @@ export const de_GetDedicatedIpCommand = async (output, context) => {
2475
1616
  Object.assign(contents, doc);
2476
1617
  return contents;
2477
1618
  };
2478
- const de_GetDedicatedIpCommandError = async (output, context) => {
2479
- const parsedOutput = {
2480
- ...output,
2481
- body: await parseErrorBody(output.body, context),
2482
- };
2483
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2484
- switch (errorCode) {
2485
- case "BadRequestException":
2486
- case "com.amazonaws.sesv2#BadRequestException":
2487
- throw await de_BadRequestExceptionRes(parsedOutput, context);
2488
- case "NotFoundException":
2489
- case "com.amazonaws.sesv2#NotFoundException":
2490
- throw await de_NotFoundExceptionRes(parsedOutput, context);
2491
- case "TooManyRequestsException":
2492
- case "com.amazonaws.sesv2#TooManyRequestsException":
2493
- throw await de_TooManyRequestsExceptionRes(parsedOutput, context);
2494
- default:
2495
- const parsedBody = parsedOutput.body;
2496
- return throwDefaultError({
2497
- output,
2498
- parsedBody,
2499
- errorCode,
2500
- });
2501
- }
2502
- };
2503
1619
  export const de_GetDedicatedIpPoolCommand = async (output, context) => {
2504
1620
  if (output.statusCode !== 200 && output.statusCode >= 300) {
2505
- return de_GetDedicatedIpPoolCommandError(output, context);
1621
+ return de_CommandError(output, context);
2506
1622
  }
2507
1623
  const contents = map({
2508
1624
  $metadata: deserializeMetadata(output),
@@ -2514,34 +1630,9 @@ export const de_GetDedicatedIpPoolCommand = async (output, context) => {
2514
1630
  Object.assign(contents, doc);
2515
1631
  return contents;
2516
1632
  };
2517
- const de_GetDedicatedIpPoolCommandError = async (output, context) => {
2518
- const parsedOutput = {
2519
- ...output,
2520
- body: await parseErrorBody(output.body, context),
2521
- };
2522
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2523
- switch (errorCode) {
2524
- case "BadRequestException":
2525
- case "com.amazonaws.sesv2#BadRequestException":
2526
- throw await de_BadRequestExceptionRes(parsedOutput, context);
2527
- case "NotFoundException":
2528
- case "com.amazonaws.sesv2#NotFoundException":
2529
- throw await de_NotFoundExceptionRes(parsedOutput, context);
2530
- case "TooManyRequestsException":
2531
- case "com.amazonaws.sesv2#TooManyRequestsException":
2532
- throw await de_TooManyRequestsExceptionRes(parsedOutput, context);
2533
- default:
2534
- const parsedBody = parsedOutput.body;
2535
- return throwDefaultError({
2536
- output,
2537
- parsedBody,
2538
- errorCode,
2539
- });
2540
- }
2541
- };
2542
1633
  export const de_GetDedicatedIpsCommand = async (output, context) => {
2543
1634
  if (output.statusCode !== 200 && output.statusCode >= 300) {
2544
- return de_GetDedicatedIpsCommandError(output, context);
1635
+ return de_CommandError(output, context);
2545
1636
  }
2546
1637
  const contents = map({
2547
1638
  $metadata: deserializeMetadata(output),
@@ -2554,34 +1645,9 @@ export const de_GetDedicatedIpsCommand = async (output, context) => {
2554
1645
  Object.assign(contents, doc);
2555
1646
  return contents;
2556
1647
  };
2557
- const de_GetDedicatedIpsCommandError = async (output, context) => {
2558
- const parsedOutput = {
2559
- ...output,
2560
- body: await parseErrorBody(output.body, context),
2561
- };
2562
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2563
- switch (errorCode) {
2564
- case "BadRequestException":
2565
- case "com.amazonaws.sesv2#BadRequestException":
2566
- throw await de_BadRequestExceptionRes(parsedOutput, context);
2567
- case "NotFoundException":
2568
- case "com.amazonaws.sesv2#NotFoundException":
2569
- throw await de_NotFoundExceptionRes(parsedOutput, context);
2570
- case "TooManyRequestsException":
2571
- case "com.amazonaws.sesv2#TooManyRequestsException":
2572
- throw await de_TooManyRequestsExceptionRes(parsedOutput, context);
2573
- default:
2574
- const parsedBody = parsedOutput.body;
2575
- return throwDefaultError({
2576
- output,
2577
- parsedBody,
2578
- errorCode,
2579
- });
2580
- }
2581
- };
2582
1648
  export const de_GetDeliverabilityDashboardOptionsCommand = async (output, context) => {
2583
1649
  if (output.statusCode !== 200 && output.statusCode >= 300) {
2584
- return de_GetDeliverabilityDashboardOptionsCommandError(output, context);
1650
+ return de_CommandError(output, context);
2585
1651
  }
2586
1652
  const contents = map({
2587
1653
  $metadata: deserializeMetadata(output),
@@ -2597,34 +1663,9 @@ export const de_GetDeliverabilityDashboardOptionsCommand = async (output, contex
2597
1663
  Object.assign(contents, doc);
2598
1664
  return contents;
2599
1665
  };
2600
- const de_GetDeliverabilityDashboardOptionsCommandError = async (output, context) => {
2601
- const parsedOutput = {
2602
- ...output,
2603
- body: await parseErrorBody(output.body, context),
2604
- };
2605
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2606
- switch (errorCode) {
2607
- case "BadRequestException":
2608
- case "com.amazonaws.sesv2#BadRequestException":
2609
- throw await de_BadRequestExceptionRes(parsedOutput, context);
2610
- case "LimitExceededException":
2611
- case "com.amazonaws.sesv2#LimitExceededException":
2612
- throw await de_LimitExceededExceptionRes(parsedOutput, context);
2613
- case "TooManyRequestsException":
2614
- case "com.amazonaws.sesv2#TooManyRequestsException":
2615
- throw await de_TooManyRequestsExceptionRes(parsedOutput, context);
2616
- default:
2617
- const parsedBody = parsedOutput.body;
2618
- return throwDefaultError({
2619
- output,
2620
- parsedBody,
2621
- errorCode,
2622
- });
2623
- }
2624
- };
2625
1666
  export const de_GetDeliverabilityTestReportCommand = async (output, context) => {
2626
1667
  if (output.statusCode !== 200 && output.statusCode >= 300) {
2627
- return de_GetDeliverabilityTestReportCommandError(output, context);
1668
+ return de_CommandError(output, context);
2628
1669
  }
2629
1670
  const contents = map({
2630
1671
  $metadata: deserializeMetadata(output),
@@ -2640,34 +1681,9 @@ export const de_GetDeliverabilityTestReportCommand = async (output, context) =>
2640
1681
  Object.assign(contents, doc);
2641
1682
  return contents;
2642
1683
  };
2643
- const de_GetDeliverabilityTestReportCommandError = async (output, context) => {
2644
- const parsedOutput = {
2645
- ...output,
2646
- body: await parseErrorBody(output.body, context),
2647
- };
2648
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2649
- switch (errorCode) {
2650
- case "BadRequestException":
2651
- case "com.amazonaws.sesv2#BadRequestException":
2652
- throw await de_BadRequestExceptionRes(parsedOutput, context);
2653
- case "NotFoundException":
2654
- case "com.amazonaws.sesv2#NotFoundException":
2655
- throw await de_NotFoundExceptionRes(parsedOutput, context);
2656
- case "TooManyRequestsException":
2657
- case "com.amazonaws.sesv2#TooManyRequestsException":
2658
- throw await de_TooManyRequestsExceptionRes(parsedOutput, context);
2659
- default:
2660
- const parsedBody = parsedOutput.body;
2661
- return throwDefaultError({
2662
- output,
2663
- parsedBody,
2664
- errorCode,
2665
- });
2666
- }
2667
- };
2668
1684
  export const de_GetDomainDeliverabilityCampaignCommand = async (output, context) => {
2669
1685
  if (output.statusCode !== 200 && output.statusCode >= 300) {
2670
- return de_GetDomainDeliverabilityCampaignCommandError(output, context);
1686
+ return de_CommandError(output, context);
2671
1687
  }
2672
1688
  const contents = map({
2673
1689
  $metadata: deserializeMetadata(output),
@@ -2679,34 +1695,9 @@ export const de_GetDomainDeliverabilityCampaignCommand = async (output, context)
2679
1695
  Object.assign(contents, doc);
2680
1696
  return contents;
2681
1697
  };
2682
- const de_GetDomainDeliverabilityCampaignCommandError = async (output, context) => {
2683
- const parsedOutput = {
2684
- ...output,
2685
- body: await parseErrorBody(output.body, context),
2686
- };
2687
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2688
- switch (errorCode) {
2689
- case "BadRequestException":
2690
- case "com.amazonaws.sesv2#BadRequestException":
2691
- throw await de_BadRequestExceptionRes(parsedOutput, context);
2692
- case "NotFoundException":
2693
- case "com.amazonaws.sesv2#NotFoundException":
2694
- throw await de_NotFoundExceptionRes(parsedOutput, context);
2695
- case "TooManyRequestsException":
2696
- case "com.amazonaws.sesv2#TooManyRequestsException":
2697
- throw await de_TooManyRequestsExceptionRes(parsedOutput, context);
2698
- default:
2699
- const parsedBody = parsedOutput.body;
2700
- return throwDefaultError({
2701
- output,
2702
- parsedBody,
2703
- errorCode,
2704
- });
2705
- }
2706
- };
2707
1698
  export const de_GetDomainStatisticsReportCommand = async (output, context) => {
2708
1699
  if (output.statusCode !== 200 && output.statusCode >= 300) {
2709
- return de_GetDomainStatisticsReportCommandError(output, context);
1700
+ return de_CommandError(output, context);
2710
1701
  }
2711
1702
  const contents = map({
2712
1703
  $metadata: deserializeMetadata(output),
@@ -2719,34 +1710,9 @@ export const de_GetDomainStatisticsReportCommand = async (output, context) => {
2719
1710
  Object.assign(contents, doc);
2720
1711
  return contents;
2721
1712
  };
2722
- const de_GetDomainStatisticsReportCommandError = async (output, context) => {
2723
- const parsedOutput = {
2724
- ...output,
2725
- body: await parseErrorBody(output.body, context),
2726
- };
2727
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2728
- switch (errorCode) {
2729
- case "BadRequestException":
2730
- case "com.amazonaws.sesv2#BadRequestException":
2731
- throw await de_BadRequestExceptionRes(parsedOutput, context);
2732
- case "NotFoundException":
2733
- case "com.amazonaws.sesv2#NotFoundException":
2734
- throw await de_NotFoundExceptionRes(parsedOutput, context);
2735
- case "TooManyRequestsException":
2736
- case "com.amazonaws.sesv2#TooManyRequestsException":
2737
- throw await de_TooManyRequestsExceptionRes(parsedOutput, context);
2738
- default:
2739
- const parsedBody = parsedOutput.body;
2740
- return throwDefaultError({
2741
- output,
2742
- parsedBody,
2743
- errorCode,
2744
- });
2745
- }
2746
- };
2747
1713
  export const de_GetEmailIdentityCommand = async (output, context) => {
2748
1714
  if (output.statusCode !== 200 && output.statusCode >= 300) {
2749
- return de_GetEmailIdentityCommandError(output, context);
1715
+ return de_CommandError(output, context);
2750
1716
  }
2751
1717
  const contents = map({
2752
1718
  $metadata: deserializeMetadata(output),
@@ -2767,34 +1733,9 @@ export const de_GetEmailIdentityCommand = async (output, context) => {
2767
1733
  Object.assign(contents, doc);
2768
1734
  return contents;
2769
1735
  };
2770
- const de_GetEmailIdentityCommandError = 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 "BadRequestException":
2778
- case "com.amazonaws.sesv2#BadRequestException":
2779
- throw await de_BadRequestExceptionRes(parsedOutput, context);
2780
- case "NotFoundException":
2781
- case "com.amazonaws.sesv2#NotFoundException":
2782
- throw await de_NotFoundExceptionRes(parsedOutput, context);
2783
- case "TooManyRequestsException":
2784
- case "com.amazonaws.sesv2#TooManyRequestsException":
2785
- throw await de_TooManyRequestsExceptionRes(parsedOutput, context);
2786
- default:
2787
- const parsedBody = parsedOutput.body;
2788
- return throwDefaultError({
2789
- output,
2790
- parsedBody,
2791
- errorCode,
2792
- });
2793
- }
2794
- };
2795
1736
  export const de_GetEmailIdentityPoliciesCommand = async (output, context) => {
2796
1737
  if (output.statusCode !== 200 && output.statusCode >= 300) {
2797
- return de_GetEmailIdentityPoliciesCommandError(output, context);
1738
+ return de_CommandError(output, context);
2798
1739
  }
2799
1740
  const contents = map({
2800
1741
  $metadata: deserializeMetadata(output),
@@ -2806,34 +1747,9 @@ export const de_GetEmailIdentityPoliciesCommand = async (output, context) => {
2806
1747
  Object.assign(contents, doc);
2807
1748
  return contents;
2808
1749
  };
2809
- const de_GetEmailIdentityPoliciesCommandError = async (output, context) => {
2810
- const parsedOutput = {
2811
- ...output,
2812
- body: await parseErrorBody(output.body, context),
2813
- };
2814
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2815
- switch (errorCode) {
2816
- case "BadRequestException":
2817
- case "com.amazonaws.sesv2#BadRequestException":
2818
- throw await de_BadRequestExceptionRes(parsedOutput, context);
2819
- case "NotFoundException":
2820
- case "com.amazonaws.sesv2#NotFoundException":
2821
- throw await de_NotFoundExceptionRes(parsedOutput, context);
2822
- case "TooManyRequestsException":
2823
- case "com.amazonaws.sesv2#TooManyRequestsException":
2824
- throw await de_TooManyRequestsExceptionRes(parsedOutput, context);
2825
- default:
2826
- const parsedBody = parsedOutput.body;
2827
- return throwDefaultError({
2828
- output,
2829
- parsedBody,
2830
- errorCode,
2831
- });
2832
- }
2833
- };
2834
1750
  export const de_GetEmailTemplateCommand = async (output, context) => {
2835
1751
  if (output.statusCode !== 200 && output.statusCode >= 300) {
2836
- return de_GetEmailTemplateCommandError(output, context);
1752
+ return de_CommandError(output, context);
2837
1753
  }
2838
1754
  const contents = map({
2839
1755
  $metadata: deserializeMetadata(output),
@@ -2846,34 +1762,9 @@ export const de_GetEmailTemplateCommand = async (output, context) => {
2846
1762
  Object.assign(contents, doc);
2847
1763
  return contents;
2848
1764
  };
2849
- const de_GetEmailTemplateCommandError = async (output, context) => {
2850
- const parsedOutput = {
2851
- ...output,
2852
- body: await parseErrorBody(output.body, context),
2853
- };
2854
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2855
- switch (errorCode) {
2856
- case "BadRequestException":
2857
- case "com.amazonaws.sesv2#BadRequestException":
2858
- throw await de_BadRequestExceptionRes(parsedOutput, context);
2859
- case "NotFoundException":
2860
- case "com.amazonaws.sesv2#NotFoundException":
2861
- throw await de_NotFoundExceptionRes(parsedOutput, context);
2862
- case "TooManyRequestsException":
2863
- case "com.amazonaws.sesv2#TooManyRequestsException":
2864
- throw await de_TooManyRequestsExceptionRes(parsedOutput, context);
2865
- default:
2866
- const parsedBody = parsedOutput.body;
2867
- return throwDefaultError({
2868
- output,
2869
- parsedBody,
2870
- errorCode,
2871
- });
2872
- }
2873
- };
2874
1765
  export const de_GetExportJobCommand = async (output, context) => {
2875
1766
  if (output.statusCode !== 200 && output.statusCode >= 300) {
2876
- return de_GetExportJobCommandError(output, context);
1767
+ return de_CommandError(output, context);
2877
1768
  }
2878
1769
  const contents = map({
2879
1770
  $metadata: deserializeMetadata(output),
@@ -2893,34 +1784,9 @@ export const de_GetExportJobCommand = async (output, context) => {
2893
1784
  Object.assign(contents, doc);
2894
1785
  return contents;
2895
1786
  };
2896
- const de_GetExportJobCommandError = async (output, context) => {
2897
- const parsedOutput = {
2898
- ...output,
2899
- body: await parseErrorBody(output.body, context),
2900
- };
2901
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2902
- switch (errorCode) {
2903
- case "BadRequestException":
2904
- case "com.amazonaws.sesv2#BadRequestException":
2905
- throw await de_BadRequestExceptionRes(parsedOutput, context);
2906
- case "NotFoundException":
2907
- case "com.amazonaws.sesv2#NotFoundException":
2908
- throw await de_NotFoundExceptionRes(parsedOutput, context);
2909
- case "TooManyRequestsException":
2910
- case "com.amazonaws.sesv2#TooManyRequestsException":
2911
- throw await de_TooManyRequestsExceptionRes(parsedOutput, context);
2912
- default:
2913
- const parsedBody = parsedOutput.body;
2914
- return throwDefaultError({
2915
- output,
2916
- parsedBody,
2917
- errorCode,
2918
- });
2919
- }
2920
- };
2921
1787
  export const de_GetImportJobCommand = async (output, context) => {
2922
1788
  if (output.statusCode !== 200 && output.statusCode >= 300) {
2923
- return de_GetImportJobCommandError(output, context);
1789
+ return de_CommandError(output, context);
2924
1790
  }
2925
1791
  const contents = map({
2926
1792
  $metadata: deserializeMetadata(output),
@@ -2940,34 +1806,9 @@ export const de_GetImportJobCommand = async (output, context) => {
2940
1806
  Object.assign(contents, doc);
2941
1807
  return contents;
2942
1808
  };
2943
- const de_GetImportJobCommandError = async (output, context) => {
2944
- const parsedOutput = {
2945
- ...output,
2946
- body: await parseErrorBody(output.body, context),
2947
- };
2948
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2949
- switch (errorCode) {
2950
- case "BadRequestException":
2951
- case "com.amazonaws.sesv2#BadRequestException":
2952
- throw await de_BadRequestExceptionRes(parsedOutput, context);
2953
- case "NotFoundException":
2954
- case "com.amazonaws.sesv2#NotFoundException":
2955
- throw await de_NotFoundExceptionRes(parsedOutput, context);
2956
- case "TooManyRequestsException":
2957
- case "com.amazonaws.sesv2#TooManyRequestsException":
2958
- throw await de_TooManyRequestsExceptionRes(parsedOutput, context);
2959
- default:
2960
- const parsedBody = parsedOutput.body;
2961
- return throwDefaultError({
2962
- output,
2963
- parsedBody,
2964
- errorCode,
2965
- });
2966
- }
2967
- };
2968
1809
  export const de_GetMessageInsightsCommand = async (output, context) => {
2969
1810
  if (output.statusCode !== 200 && output.statusCode >= 300) {
2970
- return de_GetMessageInsightsCommandError(output, context);
1811
+ return de_CommandError(output, context);
2971
1812
  }
2972
1813
  const contents = map({
2973
1814
  $metadata: deserializeMetadata(output),
@@ -2983,34 +1824,9 @@ export const de_GetMessageInsightsCommand = async (output, context) => {
2983
1824
  Object.assign(contents, doc);
2984
1825
  return contents;
2985
1826
  };
2986
- const de_GetMessageInsightsCommandError = async (output, context) => {
2987
- const parsedOutput = {
2988
- ...output,
2989
- body: await parseErrorBody(output.body, context),
2990
- };
2991
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2992
- switch (errorCode) {
2993
- case "BadRequestException":
2994
- case "com.amazonaws.sesv2#BadRequestException":
2995
- throw await de_BadRequestExceptionRes(parsedOutput, context);
2996
- case "NotFoundException":
2997
- case "com.amazonaws.sesv2#NotFoundException":
2998
- throw await de_NotFoundExceptionRes(parsedOutput, context);
2999
- case "TooManyRequestsException":
3000
- case "com.amazonaws.sesv2#TooManyRequestsException":
3001
- throw await de_TooManyRequestsExceptionRes(parsedOutput, context);
3002
- default:
3003
- const parsedBody = parsedOutput.body;
3004
- return throwDefaultError({
3005
- output,
3006
- parsedBody,
3007
- errorCode,
3008
- });
3009
- }
3010
- };
3011
1827
  export const de_GetSuppressedDestinationCommand = async (output, context) => {
3012
1828
  if (output.statusCode !== 200 && output.statusCode >= 300) {
3013
- return de_GetSuppressedDestinationCommandError(output, context);
1829
+ return de_CommandError(output, context);
3014
1830
  }
3015
1831
  const contents = map({
3016
1832
  $metadata: deserializeMetadata(output),
@@ -3022,34 +1838,9 @@ export const de_GetSuppressedDestinationCommand = async (output, context) => {
3022
1838
  Object.assign(contents, doc);
3023
1839
  return contents;
3024
1840
  };
3025
- const de_GetSuppressedDestinationCommandError = async (output, context) => {
3026
- const parsedOutput = {
3027
- ...output,
3028
- body: await parseErrorBody(output.body, context),
3029
- };
3030
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
3031
- switch (errorCode) {
3032
- case "BadRequestException":
3033
- case "com.amazonaws.sesv2#BadRequestException":
3034
- throw await de_BadRequestExceptionRes(parsedOutput, context);
3035
- case "NotFoundException":
3036
- case "com.amazonaws.sesv2#NotFoundException":
3037
- throw await de_NotFoundExceptionRes(parsedOutput, context);
3038
- case "TooManyRequestsException":
3039
- case "com.amazonaws.sesv2#TooManyRequestsException":
3040
- throw await de_TooManyRequestsExceptionRes(parsedOutput, context);
3041
- default:
3042
- const parsedBody = parsedOutput.body;
3043
- return throwDefaultError({
3044
- output,
3045
- parsedBody,
3046
- errorCode,
3047
- });
3048
- }
3049
- };
3050
1841
  export const de_ListConfigurationSetsCommand = async (output, context) => {
3051
1842
  if (output.statusCode !== 200 && output.statusCode >= 300) {
3052
- return de_ListConfigurationSetsCommandError(output, context);
1843
+ return de_CommandError(output, context);
3053
1844
  }
3054
1845
  const contents = map({
3055
1846
  $metadata: deserializeMetadata(output),
@@ -3062,31 +1853,9 @@ export const de_ListConfigurationSetsCommand = async (output, context) => {
3062
1853
  Object.assign(contents, doc);
3063
1854
  return contents;
3064
1855
  };
3065
- const de_ListConfigurationSetsCommandError = async (output, context) => {
3066
- const parsedOutput = {
3067
- ...output,
3068
- body: await parseErrorBody(output.body, context),
3069
- };
3070
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
3071
- switch (errorCode) {
3072
- case "BadRequestException":
3073
- case "com.amazonaws.sesv2#BadRequestException":
3074
- throw await de_BadRequestExceptionRes(parsedOutput, context);
3075
- case "TooManyRequestsException":
3076
- case "com.amazonaws.sesv2#TooManyRequestsException":
3077
- throw await de_TooManyRequestsExceptionRes(parsedOutput, context);
3078
- default:
3079
- const parsedBody = parsedOutput.body;
3080
- return throwDefaultError({
3081
- output,
3082
- parsedBody,
3083
- errorCode,
3084
- });
3085
- }
3086
- };
3087
1856
  export const de_ListContactListsCommand = async (output, context) => {
3088
1857
  if (output.statusCode !== 200 && output.statusCode >= 300) {
3089
- return de_ListContactListsCommandError(output, context);
1858
+ return de_CommandError(output, context);
3090
1859
  }
3091
1860
  const contents = map({
3092
1861
  $metadata: deserializeMetadata(output),
@@ -3099,31 +1868,9 @@ export const de_ListContactListsCommand = async (output, context) => {
3099
1868
  Object.assign(contents, doc);
3100
1869
  return contents;
3101
1870
  };
3102
- const de_ListContactListsCommandError = async (output, context) => {
3103
- const parsedOutput = {
3104
- ...output,
3105
- body: await parseErrorBody(output.body, context),
3106
- };
3107
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
3108
- switch (errorCode) {
3109
- case "BadRequestException":
3110
- case "com.amazonaws.sesv2#BadRequestException":
3111
- throw await de_BadRequestExceptionRes(parsedOutput, context);
3112
- case "TooManyRequestsException":
3113
- case "com.amazonaws.sesv2#TooManyRequestsException":
3114
- throw await de_TooManyRequestsExceptionRes(parsedOutput, context);
3115
- default:
3116
- const parsedBody = parsedOutput.body;
3117
- return throwDefaultError({
3118
- output,
3119
- parsedBody,
3120
- errorCode,
3121
- });
3122
- }
3123
- };
3124
1871
  export const de_ListContactsCommand = async (output, context) => {
3125
1872
  if (output.statusCode !== 200 && output.statusCode >= 300) {
3126
- return de_ListContactsCommandError(output, context);
1873
+ return de_CommandError(output, context);
3127
1874
  }
3128
1875
  const contents = map({
3129
1876
  $metadata: deserializeMetadata(output),
@@ -3136,34 +1883,9 @@ export const de_ListContactsCommand = async (output, context) => {
3136
1883
  Object.assign(contents, doc);
3137
1884
  return contents;
3138
1885
  };
3139
- const de_ListContactsCommandError = async (output, context) => {
3140
- const parsedOutput = {
3141
- ...output,
3142
- body: await parseErrorBody(output.body, context),
3143
- };
3144
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
3145
- switch (errorCode) {
3146
- case "BadRequestException":
3147
- case "com.amazonaws.sesv2#BadRequestException":
3148
- throw await de_BadRequestExceptionRes(parsedOutput, context);
3149
- case "NotFoundException":
3150
- case "com.amazonaws.sesv2#NotFoundException":
3151
- throw await de_NotFoundExceptionRes(parsedOutput, context);
3152
- case "TooManyRequestsException":
3153
- case "com.amazonaws.sesv2#TooManyRequestsException":
3154
- throw await de_TooManyRequestsExceptionRes(parsedOutput, context);
3155
- default:
3156
- const parsedBody = parsedOutput.body;
3157
- return throwDefaultError({
3158
- output,
3159
- parsedBody,
3160
- errorCode,
3161
- });
3162
- }
3163
- };
3164
1886
  export const de_ListCustomVerificationEmailTemplatesCommand = async (output, context) => {
3165
1887
  if (output.statusCode !== 200 && output.statusCode >= 300) {
3166
- return de_ListCustomVerificationEmailTemplatesCommandError(output, context);
1888
+ return de_CommandError(output, context);
3167
1889
  }
3168
1890
  const contents = map({
3169
1891
  $metadata: deserializeMetadata(output),
@@ -3176,31 +1898,9 @@ export const de_ListCustomVerificationEmailTemplatesCommand = async (output, con
3176
1898
  Object.assign(contents, doc);
3177
1899
  return contents;
3178
1900
  };
3179
- const de_ListCustomVerificationEmailTemplatesCommandError = async (output, context) => {
3180
- const parsedOutput = {
3181
- ...output,
3182
- body: await parseErrorBody(output.body, context),
3183
- };
3184
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
3185
- switch (errorCode) {
3186
- case "BadRequestException":
3187
- case "com.amazonaws.sesv2#BadRequestException":
3188
- throw await de_BadRequestExceptionRes(parsedOutput, context);
3189
- case "TooManyRequestsException":
3190
- case "com.amazonaws.sesv2#TooManyRequestsException":
3191
- throw await de_TooManyRequestsExceptionRes(parsedOutput, context);
3192
- default:
3193
- const parsedBody = parsedOutput.body;
3194
- return throwDefaultError({
3195
- output,
3196
- parsedBody,
3197
- errorCode,
3198
- });
3199
- }
3200
- };
3201
1901
  export const de_ListDedicatedIpPoolsCommand = async (output, context) => {
3202
1902
  if (output.statusCode !== 200 && output.statusCode >= 300) {
3203
- return de_ListDedicatedIpPoolsCommandError(output, context);
1903
+ return de_CommandError(output, context);
3204
1904
  }
3205
1905
  const contents = map({
3206
1906
  $metadata: deserializeMetadata(output),
@@ -3213,31 +1913,9 @@ export const de_ListDedicatedIpPoolsCommand = async (output, context) => {
3213
1913
  Object.assign(contents, doc);
3214
1914
  return contents;
3215
1915
  };
3216
- const de_ListDedicatedIpPoolsCommandError = async (output, context) => {
3217
- const parsedOutput = {
3218
- ...output,
3219
- body: await parseErrorBody(output.body, context),
3220
- };
3221
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
3222
- switch (errorCode) {
3223
- case "BadRequestException":
3224
- case "com.amazonaws.sesv2#BadRequestException":
3225
- throw await de_BadRequestExceptionRes(parsedOutput, context);
3226
- case "TooManyRequestsException":
3227
- case "com.amazonaws.sesv2#TooManyRequestsException":
3228
- throw await de_TooManyRequestsExceptionRes(parsedOutput, context);
3229
- default:
3230
- const parsedBody = parsedOutput.body;
3231
- return throwDefaultError({
3232
- output,
3233
- parsedBody,
3234
- errorCode,
3235
- });
3236
- }
3237
- };
3238
1916
  export const de_ListDeliverabilityTestReportsCommand = async (output, context) => {
3239
1917
  if (output.statusCode !== 200 && output.statusCode >= 300) {
3240
- return de_ListDeliverabilityTestReportsCommandError(output, context);
1918
+ return de_CommandError(output, context);
3241
1919
  }
3242
1920
  const contents = map({
3243
1921
  $metadata: deserializeMetadata(output),
@@ -3250,34 +1928,9 @@ export const de_ListDeliverabilityTestReportsCommand = async (output, context) =
3250
1928
  Object.assign(contents, doc);
3251
1929
  return contents;
3252
1930
  };
3253
- const de_ListDeliverabilityTestReportsCommandError = async (output, context) => {
3254
- const parsedOutput = {
3255
- ...output,
3256
- body: await parseErrorBody(output.body, context),
3257
- };
3258
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
3259
- switch (errorCode) {
3260
- case "BadRequestException":
3261
- case "com.amazonaws.sesv2#BadRequestException":
3262
- throw await de_BadRequestExceptionRes(parsedOutput, context);
3263
- case "NotFoundException":
3264
- case "com.amazonaws.sesv2#NotFoundException":
3265
- throw await de_NotFoundExceptionRes(parsedOutput, context);
3266
- case "TooManyRequestsException":
3267
- case "com.amazonaws.sesv2#TooManyRequestsException":
3268
- throw await de_TooManyRequestsExceptionRes(parsedOutput, context);
3269
- default:
3270
- const parsedBody = parsedOutput.body;
3271
- return throwDefaultError({
3272
- output,
3273
- parsedBody,
3274
- errorCode,
3275
- });
3276
- }
3277
- };
3278
1931
  export const de_ListDomainDeliverabilityCampaignsCommand = async (output, context) => {
3279
1932
  if (output.statusCode !== 200 && output.statusCode >= 300) {
3280
- return de_ListDomainDeliverabilityCampaignsCommandError(output, context);
1933
+ return de_CommandError(output, context);
3281
1934
  }
3282
1935
  const contents = map({
3283
1936
  $metadata: deserializeMetadata(output),
@@ -3290,34 +1943,9 @@ export const de_ListDomainDeliverabilityCampaignsCommand = async (output, contex
3290
1943
  Object.assign(contents, doc);
3291
1944
  return contents;
3292
1945
  };
3293
- const de_ListDomainDeliverabilityCampaignsCommandError = async (output, context) => {
3294
- const parsedOutput = {
3295
- ...output,
3296
- body: await parseErrorBody(output.body, context),
3297
- };
3298
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
3299
- switch (errorCode) {
3300
- case "BadRequestException":
3301
- case "com.amazonaws.sesv2#BadRequestException":
3302
- throw await de_BadRequestExceptionRes(parsedOutput, context);
3303
- case "NotFoundException":
3304
- case "com.amazonaws.sesv2#NotFoundException":
3305
- throw await de_NotFoundExceptionRes(parsedOutput, context);
3306
- case "TooManyRequestsException":
3307
- case "com.amazonaws.sesv2#TooManyRequestsException":
3308
- throw await de_TooManyRequestsExceptionRes(parsedOutput, context);
3309
- default:
3310
- const parsedBody = parsedOutput.body;
3311
- return throwDefaultError({
3312
- output,
3313
- parsedBody,
3314
- errorCode,
3315
- });
3316
- }
3317
- };
3318
1946
  export const de_ListEmailIdentitiesCommand = async (output, context) => {
3319
1947
  if (output.statusCode !== 200 && output.statusCode >= 300) {
3320
- return de_ListEmailIdentitiesCommandError(output, context);
1948
+ return de_CommandError(output, context);
3321
1949
  }
3322
1950
  const contents = map({
3323
1951
  $metadata: deserializeMetadata(output),
@@ -3330,31 +1958,9 @@ export const de_ListEmailIdentitiesCommand = async (output, context) => {
3330
1958
  Object.assign(contents, doc);
3331
1959
  return contents;
3332
1960
  };
3333
- const de_ListEmailIdentitiesCommandError = async (output, context) => {
3334
- const parsedOutput = {
3335
- ...output,
3336
- body: await parseErrorBody(output.body, context),
3337
- };
3338
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
3339
- switch (errorCode) {
3340
- case "BadRequestException":
3341
- case "com.amazonaws.sesv2#BadRequestException":
3342
- throw await de_BadRequestExceptionRes(parsedOutput, context);
3343
- case "TooManyRequestsException":
3344
- case "com.amazonaws.sesv2#TooManyRequestsException":
3345
- throw await de_TooManyRequestsExceptionRes(parsedOutput, context);
3346
- default:
3347
- const parsedBody = parsedOutput.body;
3348
- return throwDefaultError({
3349
- output,
3350
- parsedBody,
3351
- errorCode,
3352
- });
3353
- }
3354
- };
3355
1961
  export const de_ListEmailTemplatesCommand = async (output, context) => {
3356
1962
  if (output.statusCode !== 200 && output.statusCode >= 300) {
3357
- return de_ListEmailTemplatesCommandError(output, context);
1963
+ return de_CommandError(output, context);
3358
1964
  }
3359
1965
  const contents = map({
3360
1966
  $metadata: deserializeMetadata(output),
@@ -3367,31 +1973,9 @@ export const de_ListEmailTemplatesCommand = async (output, context) => {
3367
1973
  Object.assign(contents, doc);
3368
1974
  return contents;
3369
1975
  };
3370
- const de_ListEmailTemplatesCommandError = async (output, context) => {
3371
- const parsedOutput = {
3372
- ...output,
3373
- body: await parseErrorBody(output.body, context),
3374
- };
3375
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
3376
- switch (errorCode) {
3377
- case "BadRequestException":
3378
- case "com.amazonaws.sesv2#BadRequestException":
3379
- throw await de_BadRequestExceptionRes(parsedOutput, context);
3380
- case "TooManyRequestsException":
3381
- case "com.amazonaws.sesv2#TooManyRequestsException":
3382
- throw await de_TooManyRequestsExceptionRes(parsedOutput, context);
3383
- default:
3384
- const parsedBody = parsedOutput.body;
3385
- return throwDefaultError({
3386
- output,
3387
- parsedBody,
3388
- errorCode,
3389
- });
3390
- }
3391
- };
3392
1976
  export const de_ListExportJobsCommand = async (output, context) => {
3393
1977
  if (output.statusCode !== 200 && output.statusCode >= 300) {
3394
- return de_ListExportJobsCommandError(output, context);
1978
+ return de_CommandError(output, context);
3395
1979
  }
3396
1980
  const contents = map({
3397
1981
  $metadata: deserializeMetadata(output),
@@ -3404,31 +1988,9 @@ export const de_ListExportJobsCommand = async (output, context) => {
3404
1988
  Object.assign(contents, doc);
3405
1989
  return contents;
3406
1990
  };
3407
- const de_ListExportJobsCommandError = async (output, context) => {
3408
- const parsedOutput = {
3409
- ...output,
3410
- body: await parseErrorBody(output.body, context),
3411
- };
3412
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
3413
- switch (errorCode) {
3414
- case "BadRequestException":
3415
- case "com.amazonaws.sesv2#BadRequestException":
3416
- throw await de_BadRequestExceptionRes(parsedOutput, context);
3417
- case "TooManyRequestsException":
3418
- case "com.amazonaws.sesv2#TooManyRequestsException":
3419
- throw await de_TooManyRequestsExceptionRes(parsedOutput, context);
3420
- default:
3421
- const parsedBody = parsedOutput.body;
3422
- return throwDefaultError({
3423
- output,
3424
- parsedBody,
3425
- errorCode,
3426
- });
3427
- }
3428
- };
3429
1991
  export const de_ListImportJobsCommand = async (output, context) => {
3430
1992
  if (output.statusCode !== 200 && output.statusCode >= 300) {
3431
- return de_ListImportJobsCommandError(output, context);
1993
+ return de_CommandError(output, context);
3432
1994
  }
3433
1995
  const contents = map({
3434
1996
  $metadata: deserializeMetadata(output),
@@ -3441,31 +2003,9 @@ export const de_ListImportJobsCommand = async (output, context) => {
3441
2003
  Object.assign(contents, doc);
3442
2004
  return contents;
3443
2005
  };
3444
- const de_ListImportJobsCommandError = async (output, context) => {
3445
- const parsedOutput = {
3446
- ...output,
3447
- body: await parseErrorBody(output.body, context),
3448
- };
3449
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
3450
- switch (errorCode) {
3451
- case "BadRequestException":
3452
- case "com.amazonaws.sesv2#BadRequestException":
3453
- throw await de_BadRequestExceptionRes(parsedOutput, context);
3454
- case "TooManyRequestsException":
3455
- case "com.amazonaws.sesv2#TooManyRequestsException":
3456
- throw await de_TooManyRequestsExceptionRes(parsedOutput, context);
3457
- default:
3458
- const parsedBody = parsedOutput.body;
3459
- return throwDefaultError({
3460
- output,
3461
- parsedBody,
3462
- errorCode,
3463
- });
3464
- }
3465
- };
3466
2006
  export const de_ListRecommendationsCommand = async (output, context) => {
3467
2007
  if (output.statusCode !== 200 && output.statusCode >= 300) {
3468
- return de_ListRecommendationsCommandError(output, context);
2008
+ return de_CommandError(output, context);
3469
2009
  }
3470
2010
  const contents = map({
3471
2011
  $metadata: deserializeMetadata(output),
@@ -3478,34 +2018,9 @@ export const de_ListRecommendationsCommand = async (output, context) => {
3478
2018
  Object.assign(contents, doc);
3479
2019
  return contents;
3480
2020
  };
3481
- const de_ListRecommendationsCommandError = async (output, context) => {
3482
- const parsedOutput = {
3483
- ...output,
3484
- body: await parseErrorBody(output.body, context),
3485
- };
3486
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
3487
- switch (errorCode) {
3488
- case "BadRequestException":
3489
- case "com.amazonaws.sesv2#BadRequestException":
3490
- throw await de_BadRequestExceptionRes(parsedOutput, context);
3491
- case "NotFoundException":
3492
- case "com.amazonaws.sesv2#NotFoundException":
3493
- throw await de_NotFoundExceptionRes(parsedOutput, context);
3494
- case "TooManyRequestsException":
3495
- case "com.amazonaws.sesv2#TooManyRequestsException":
3496
- throw await de_TooManyRequestsExceptionRes(parsedOutput, context);
3497
- default:
3498
- const parsedBody = parsedOutput.body;
3499
- return throwDefaultError({
3500
- output,
3501
- parsedBody,
3502
- errorCode,
3503
- });
3504
- }
3505
- };
3506
2021
  export const de_ListSuppressedDestinationsCommand = async (output, context) => {
3507
2022
  if (output.statusCode !== 200 && output.statusCode >= 300) {
3508
- return de_ListSuppressedDestinationsCommandError(output, context);
2023
+ return de_CommandError(output, context);
3509
2024
  }
3510
2025
  const contents = map({
3511
2026
  $metadata: deserializeMetadata(output),
@@ -3518,34 +2033,9 @@ export const de_ListSuppressedDestinationsCommand = async (output, context) => {
3518
2033
  Object.assign(contents, doc);
3519
2034
  return contents;
3520
2035
  };
3521
- const de_ListSuppressedDestinationsCommandError = async (output, context) => {
3522
- const parsedOutput = {
3523
- ...output,
3524
- body: await parseErrorBody(output.body, context),
3525
- };
3526
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
3527
- switch (errorCode) {
3528
- case "BadRequestException":
3529
- case "com.amazonaws.sesv2#BadRequestException":
3530
- throw await de_BadRequestExceptionRes(parsedOutput, context);
3531
- case "InvalidNextTokenException":
3532
- case "com.amazonaws.sesv2#InvalidNextTokenException":
3533
- throw await de_InvalidNextTokenExceptionRes(parsedOutput, context);
3534
- case "TooManyRequestsException":
3535
- case "com.amazonaws.sesv2#TooManyRequestsException":
3536
- throw await de_TooManyRequestsExceptionRes(parsedOutput, context);
3537
- default:
3538
- const parsedBody = parsedOutput.body;
3539
- return throwDefaultError({
3540
- output,
3541
- parsedBody,
3542
- errorCode,
3543
- });
3544
- }
3545
- };
3546
2036
  export const de_ListTagsForResourceCommand = async (output, context) => {
3547
2037
  if (output.statusCode !== 200 && output.statusCode >= 300) {
3548
- return de_ListTagsForResourceCommandError(output, context);
2038
+ return de_CommandError(output, context);
3549
2039
  }
3550
2040
  const contents = map({
3551
2041
  $metadata: deserializeMetadata(output),
@@ -3557,34 +2047,19 @@ export const de_ListTagsForResourceCommand = async (output, context) => {
3557
2047
  Object.assign(contents, doc);
3558
2048
  return contents;
3559
2049
  };
3560
- const de_ListTagsForResourceCommandError = async (output, context) => {
3561
- const parsedOutput = {
3562
- ...output,
3563
- body: await parseErrorBody(output.body, context),
3564
- };
3565
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
3566
- switch (errorCode) {
3567
- case "BadRequestException":
3568
- case "com.amazonaws.sesv2#BadRequestException":
3569
- throw await de_BadRequestExceptionRes(parsedOutput, context);
3570
- case "NotFoundException":
3571
- case "com.amazonaws.sesv2#NotFoundException":
3572
- throw await de_NotFoundExceptionRes(parsedOutput, context);
3573
- case "TooManyRequestsException":
3574
- case "com.amazonaws.sesv2#TooManyRequestsException":
3575
- throw await de_TooManyRequestsExceptionRes(parsedOutput, context);
3576
- default:
3577
- const parsedBody = parsedOutput.body;
3578
- return throwDefaultError({
3579
- output,
3580
- parsedBody,
3581
- errorCode,
3582
- });
2050
+ export const de_PutAccountDedicatedIpWarmupAttributesCommand = async (output, context) => {
2051
+ if (output.statusCode !== 200 && output.statusCode >= 300) {
2052
+ return de_CommandError(output, context);
3583
2053
  }
2054
+ const contents = map({
2055
+ $metadata: deserializeMetadata(output),
2056
+ });
2057
+ await collectBody(output.body, context);
2058
+ return contents;
3584
2059
  };
3585
- export const de_PutAccountDedicatedIpWarmupAttributesCommand = async (output, context) => {
2060
+ export const de_PutAccountDetailsCommand = async (output, context) => {
3586
2061
  if (output.statusCode !== 200 && output.statusCode >= 300) {
3587
- return de_PutAccountDedicatedIpWarmupAttributesCommandError(output, context);
2062
+ return de_CommandError(output, context);
3588
2063
  }
3589
2064
  const contents = map({
3590
2065
  $metadata: deserializeMetadata(output),
@@ -3592,66 +2067,9 @@ export const de_PutAccountDedicatedIpWarmupAttributesCommand = async (output, co
3592
2067
  await collectBody(output.body, context);
3593
2068
  return contents;
3594
2069
  };
3595
- const de_PutAccountDedicatedIpWarmupAttributesCommandError = async (output, context) => {
3596
- const parsedOutput = {
3597
- ...output,
3598
- body: await parseErrorBody(output.body, context),
3599
- };
3600
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
3601
- switch (errorCode) {
3602
- case "BadRequestException":
3603
- case "com.amazonaws.sesv2#BadRequestException":
3604
- throw await de_BadRequestExceptionRes(parsedOutput, context);
3605
- case "TooManyRequestsException":
3606
- case "com.amazonaws.sesv2#TooManyRequestsException":
3607
- throw await de_TooManyRequestsExceptionRes(parsedOutput, context);
3608
- default:
3609
- const parsedBody = parsedOutput.body;
3610
- return throwDefaultError({
3611
- output,
3612
- parsedBody,
3613
- errorCode,
3614
- });
3615
- }
3616
- };
3617
- export const de_PutAccountDetailsCommand = async (output, context) => {
3618
- if (output.statusCode !== 200 && output.statusCode >= 300) {
3619
- return de_PutAccountDetailsCommandError(output, context);
3620
- }
3621
- const contents = map({
3622
- $metadata: deserializeMetadata(output),
3623
- });
3624
- await collectBody(output.body, context);
3625
- return contents;
3626
- };
3627
- const de_PutAccountDetailsCommandError = async (output, context) => {
3628
- const parsedOutput = {
3629
- ...output,
3630
- body: await parseErrorBody(output.body, context),
3631
- };
3632
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
3633
- switch (errorCode) {
3634
- case "BadRequestException":
3635
- case "com.amazonaws.sesv2#BadRequestException":
3636
- throw await de_BadRequestExceptionRes(parsedOutput, context);
3637
- case "ConflictException":
3638
- case "com.amazonaws.sesv2#ConflictException":
3639
- throw await de_ConflictExceptionRes(parsedOutput, context);
3640
- case "TooManyRequestsException":
3641
- case "com.amazonaws.sesv2#TooManyRequestsException":
3642
- throw await de_TooManyRequestsExceptionRes(parsedOutput, context);
3643
- default:
3644
- const parsedBody = parsedOutput.body;
3645
- return throwDefaultError({
3646
- output,
3647
- parsedBody,
3648
- errorCode,
3649
- });
3650
- }
3651
- };
3652
2070
  export const de_PutAccountSendingAttributesCommand = async (output, context) => {
3653
2071
  if (output.statusCode !== 200 && output.statusCode >= 300) {
3654
- return de_PutAccountSendingAttributesCommandError(output, context);
2072
+ return de_CommandError(output, context);
3655
2073
  }
3656
2074
  const contents = map({
3657
2075
  $metadata: deserializeMetadata(output),
@@ -3659,31 +2077,9 @@ export const de_PutAccountSendingAttributesCommand = async (output, context) =>
3659
2077
  await collectBody(output.body, context);
3660
2078
  return contents;
3661
2079
  };
3662
- const de_PutAccountSendingAttributesCommandError = async (output, context) => {
3663
- const parsedOutput = {
3664
- ...output,
3665
- body: await parseErrorBody(output.body, context),
3666
- };
3667
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
3668
- switch (errorCode) {
3669
- case "BadRequestException":
3670
- case "com.amazonaws.sesv2#BadRequestException":
3671
- throw await de_BadRequestExceptionRes(parsedOutput, context);
3672
- case "TooManyRequestsException":
3673
- case "com.amazonaws.sesv2#TooManyRequestsException":
3674
- throw await de_TooManyRequestsExceptionRes(parsedOutput, context);
3675
- default:
3676
- const parsedBody = parsedOutput.body;
3677
- return throwDefaultError({
3678
- output,
3679
- parsedBody,
3680
- errorCode,
3681
- });
3682
- }
3683
- };
3684
2080
  export const de_PutAccountSuppressionAttributesCommand = async (output, context) => {
3685
2081
  if (output.statusCode !== 200 && output.statusCode >= 300) {
3686
- return de_PutAccountSuppressionAttributesCommandError(output, context);
2082
+ return de_CommandError(output, context);
3687
2083
  }
3688
2084
  const contents = map({
3689
2085
  $metadata: deserializeMetadata(output),
@@ -3691,31 +2087,9 @@ export const de_PutAccountSuppressionAttributesCommand = async (output, context)
3691
2087
  await collectBody(output.body, context);
3692
2088
  return contents;
3693
2089
  };
3694
- const de_PutAccountSuppressionAttributesCommandError = async (output, context) => {
3695
- const parsedOutput = {
3696
- ...output,
3697
- body: await parseErrorBody(output.body, context),
3698
- };
3699
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
3700
- switch (errorCode) {
3701
- case "BadRequestException":
3702
- case "com.amazonaws.sesv2#BadRequestException":
3703
- throw await de_BadRequestExceptionRes(parsedOutput, context);
3704
- case "TooManyRequestsException":
3705
- case "com.amazonaws.sesv2#TooManyRequestsException":
3706
- throw await de_TooManyRequestsExceptionRes(parsedOutput, context);
3707
- default:
3708
- const parsedBody = parsedOutput.body;
3709
- return throwDefaultError({
3710
- output,
3711
- parsedBody,
3712
- errorCode,
3713
- });
3714
- }
3715
- };
3716
2090
  export const de_PutAccountVdmAttributesCommand = async (output, context) => {
3717
2091
  if (output.statusCode !== 200 && output.statusCode >= 300) {
3718
- return de_PutAccountVdmAttributesCommandError(output, context);
2092
+ return de_CommandError(output, context);
3719
2093
  }
3720
2094
  const contents = map({
3721
2095
  $metadata: deserializeMetadata(output),
@@ -3723,31 +2097,9 @@ export const de_PutAccountVdmAttributesCommand = async (output, context) => {
3723
2097
  await collectBody(output.body, context);
3724
2098
  return contents;
3725
2099
  };
3726
- const de_PutAccountVdmAttributesCommandError = async (output, context) => {
3727
- const parsedOutput = {
3728
- ...output,
3729
- body: await parseErrorBody(output.body, context),
3730
- };
3731
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
3732
- switch (errorCode) {
3733
- case "BadRequestException":
3734
- case "com.amazonaws.sesv2#BadRequestException":
3735
- throw await de_BadRequestExceptionRes(parsedOutput, context);
3736
- case "TooManyRequestsException":
3737
- case "com.amazonaws.sesv2#TooManyRequestsException":
3738
- throw await de_TooManyRequestsExceptionRes(parsedOutput, context);
3739
- default:
3740
- const parsedBody = parsedOutput.body;
3741
- return throwDefaultError({
3742
- output,
3743
- parsedBody,
3744
- errorCode,
3745
- });
3746
- }
3747
- };
3748
2100
  export const de_PutConfigurationSetDeliveryOptionsCommand = async (output, context) => {
3749
2101
  if (output.statusCode !== 200 && output.statusCode >= 300) {
3750
- return de_PutConfigurationSetDeliveryOptionsCommandError(output, context);
2102
+ return de_CommandError(output, context);
3751
2103
  }
3752
2104
  const contents = map({
3753
2105
  $metadata: deserializeMetadata(output),
@@ -3755,34 +2107,9 @@ export const de_PutConfigurationSetDeliveryOptionsCommand = async (output, conte
3755
2107
  await collectBody(output.body, context);
3756
2108
  return contents;
3757
2109
  };
3758
- const de_PutConfigurationSetDeliveryOptionsCommandError = async (output, context) => {
3759
- const parsedOutput = {
3760
- ...output,
3761
- body: await parseErrorBody(output.body, context),
3762
- };
3763
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
3764
- switch (errorCode) {
3765
- case "BadRequestException":
3766
- case "com.amazonaws.sesv2#BadRequestException":
3767
- throw await de_BadRequestExceptionRes(parsedOutput, context);
3768
- case "NotFoundException":
3769
- case "com.amazonaws.sesv2#NotFoundException":
3770
- throw await de_NotFoundExceptionRes(parsedOutput, context);
3771
- case "TooManyRequestsException":
3772
- case "com.amazonaws.sesv2#TooManyRequestsException":
3773
- throw await de_TooManyRequestsExceptionRes(parsedOutput, context);
3774
- default:
3775
- const parsedBody = parsedOutput.body;
3776
- return throwDefaultError({
3777
- output,
3778
- parsedBody,
3779
- errorCode,
3780
- });
3781
- }
3782
- };
3783
2110
  export const de_PutConfigurationSetReputationOptionsCommand = async (output, context) => {
3784
2111
  if (output.statusCode !== 200 && output.statusCode >= 300) {
3785
- return de_PutConfigurationSetReputationOptionsCommandError(output, context);
2112
+ return de_CommandError(output, context);
3786
2113
  }
3787
2114
  const contents = map({
3788
2115
  $metadata: deserializeMetadata(output),
@@ -3790,34 +2117,9 @@ export const de_PutConfigurationSetReputationOptionsCommand = async (output, con
3790
2117
  await collectBody(output.body, context);
3791
2118
  return contents;
3792
2119
  };
3793
- const de_PutConfigurationSetReputationOptionsCommandError = async (output, context) => {
3794
- const parsedOutput = {
3795
- ...output,
3796
- body: await parseErrorBody(output.body, context),
3797
- };
3798
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
3799
- switch (errorCode) {
3800
- case "BadRequestException":
3801
- case "com.amazonaws.sesv2#BadRequestException":
3802
- throw await de_BadRequestExceptionRes(parsedOutput, context);
3803
- case "NotFoundException":
3804
- case "com.amazonaws.sesv2#NotFoundException":
3805
- throw await de_NotFoundExceptionRes(parsedOutput, context);
3806
- case "TooManyRequestsException":
3807
- case "com.amazonaws.sesv2#TooManyRequestsException":
3808
- throw await de_TooManyRequestsExceptionRes(parsedOutput, context);
3809
- default:
3810
- const parsedBody = parsedOutput.body;
3811
- return throwDefaultError({
3812
- output,
3813
- parsedBody,
3814
- errorCode,
3815
- });
3816
- }
3817
- };
3818
2120
  export const de_PutConfigurationSetSendingOptionsCommand = async (output, context) => {
3819
2121
  if (output.statusCode !== 200 && output.statusCode >= 300) {
3820
- return de_PutConfigurationSetSendingOptionsCommandError(output, context);
2122
+ return de_CommandError(output, context);
3821
2123
  }
3822
2124
  const contents = map({
3823
2125
  $metadata: deserializeMetadata(output),
@@ -3825,34 +2127,9 @@ export const de_PutConfigurationSetSendingOptionsCommand = async (output, contex
3825
2127
  await collectBody(output.body, context);
3826
2128
  return contents;
3827
2129
  };
3828
- const de_PutConfigurationSetSendingOptionsCommandError = async (output, context) => {
3829
- const parsedOutput = {
3830
- ...output,
3831
- body: await parseErrorBody(output.body, context),
3832
- };
3833
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
3834
- switch (errorCode) {
3835
- case "BadRequestException":
3836
- case "com.amazonaws.sesv2#BadRequestException":
3837
- throw await de_BadRequestExceptionRes(parsedOutput, context);
3838
- case "NotFoundException":
3839
- case "com.amazonaws.sesv2#NotFoundException":
3840
- throw await de_NotFoundExceptionRes(parsedOutput, context);
3841
- case "TooManyRequestsException":
3842
- case "com.amazonaws.sesv2#TooManyRequestsException":
3843
- throw await de_TooManyRequestsExceptionRes(parsedOutput, context);
3844
- default:
3845
- const parsedBody = parsedOutput.body;
3846
- return throwDefaultError({
3847
- output,
3848
- parsedBody,
3849
- errorCode,
3850
- });
3851
- }
3852
- };
3853
2130
  export const de_PutConfigurationSetSuppressionOptionsCommand = async (output, context) => {
3854
2131
  if (output.statusCode !== 200 && output.statusCode >= 300) {
3855
- return de_PutConfigurationSetSuppressionOptionsCommandError(output, context);
2132
+ return de_CommandError(output, context);
3856
2133
  }
3857
2134
  const contents = map({
3858
2135
  $metadata: deserializeMetadata(output),
@@ -3860,34 +2137,9 @@ export const de_PutConfigurationSetSuppressionOptionsCommand = async (output, co
3860
2137
  await collectBody(output.body, context);
3861
2138
  return contents;
3862
2139
  };
3863
- const de_PutConfigurationSetSuppressionOptionsCommandError = async (output, context) => {
3864
- const parsedOutput = {
3865
- ...output,
3866
- body: await parseErrorBody(output.body, context),
3867
- };
3868
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
3869
- switch (errorCode) {
3870
- case "BadRequestException":
3871
- case "com.amazonaws.sesv2#BadRequestException":
3872
- throw await de_BadRequestExceptionRes(parsedOutput, context);
3873
- case "NotFoundException":
3874
- case "com.amazonaws.sesv2#NotFoundException":
3875
- throw await de_NotFoundExceptionRes(parsedOutput, context);
3876
- case "TooManyRequestsException":
3877
- case "com.amazonaws.sesv2#TooManyRequestsException":
3878
- throw await de_TooManyRequestsExceptionRes(parsedOutput, context);
3879
- default:
3880
- const parsedBody = parsedOutput.body;
3881
- return throwDefaultError({
3882
- output,
3883
- parsedBody,
3884
- errorCode,
3885
- });
3886
- }
3887
- };
3888
2140
  export const de_PutConfigurationSetTrackingOptionsCommand = async (output, context) => {
3889
2141
  if (output.statusCode !== 200 && output.statusCode >= 300) {
3890
- return de_PutConfigurationSetTrackingOptionsCommandError(output, context);
2142
+ return de_CommandError(output, context);
3891
2143
  }
3892
2144
  const contents = map({
3893
2145
  $metadata: deserializeMetadata(output),
@@ -3895,34 +2147,9 @@ export const de_PutConfigurationSetTrackingOptionsCommand = async (output, conte
3895
2147
  await collectBody(output.body, context);
3896
2148
  return contents;
3897
2149
  };
3898
- const de_PutConfigurationSetTrackingOptionsCommandError = async (output, context) => {
3899
- const parsedOutput = {
3900
- ...output,
3901
- body: await parseErrorBody(output.body, context),
3902
- };
3903
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
3904
- switch (errorCode) {
3905
- case "BadRequestException":
3906
- case "com.amazonaws.sesv2#BadRequestException":
3907
- throw await de_BadRequestExceptionRes(parsedOutput, context);
3908
- case "NotFoundException":
3909
- case "com.amazonaws.sesv2#NotFoundException":
3910
- throw await de_NotFoundExceptionRes(parsedOutput, context);
3911
- case "TooManyRequestsException":
3912
- case "com.amazonaws.sesv2#TooManyRequestsException":
3913
- throw await de_TooManyRequestsExceptionRes(parsedOutput, context);
3914
- default:
3915
- const parsedBody = parsedOutput.body;
3916
- return throwDefaultError({
3917
- output,
3918
- parsedBody,
3919
- errorCode,
3920
- });
3921
- }
3922
- };
3923
2150
  export const de_PutConfigurationSetVdmOptionsCommand = async (output, context) => {
3924
2151
  if (output.statusCode !== 200 && output.statusCode >= 300) {
3925
- return de_PutConfigurationSetVdmOptionsCommandError(output, context);
2152
+ return de_CommandError(output, context);
3926
2153
  }
3927
2154
  const contents = map({
3928
2155
  $metadata: deserializeMetadata(output),
@@ -3930,34 +2157,9 @@ export const de_PutConfigurationSetVdmOptionsCommand = async (output, context) =
3930
2157
  await collectBody(output.body, context);
3931
2158
  return contents;
3932
2159
  };
3933
- const de_PutConfigurationSetVdmOptionsCommandError = async (output, context) => {
3934
- const parsedOutput = {
3935
- ...output,
3936
- body: await parseErrorBody(output.body, context),
3937
- };
3938
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
3939
- switch (errorCode) {
3940
- case "BadRequestException":
3941
- case "com.amazonaws.sesv2#BadRequestException":
3942
- throw await de_BadRequestExceptionRes(parsedOutput, context);
3943
- case "NotFoundException":
3944
- case "com.amazonaws.sesv2#NotFoundException":
3945
- throw await de_NotFoundExceptionRes(parsedOutput, context);
3946
- case "TooManyRequestsException":
3947
- case "com.amazonaws.sesv2#TooManyRequestsException":
3948
- throw await de_TooManyRequestsExceptionRes(parsedOutput, context);
3949
- default:
3950
- const parsedBody = parsedOutput.body;
3951
- return throwDefaultError({
3952
- output,
3953
- parsedBody,
3954
- errorCode,
3955
- });
3956
- }
3957
- };
3958
2160
  export const de_PutDedicatedIpInPoolCommand = async (output, context) => {
3959
2161
  if (output.statusCode !== 200 && output.statusCode >= 300) {
3960
- return de_PutDedicatedIpInPoolCommandError(output, context);
2162
+ return de_CommandError(output, context);
3961
2163
  }
3962
2164
  const contents = map({
3963
2165
  $metadata: deserializeMetadata(output),
@@ -3965,34 +2167,9 @@ export const de_PutDedicatedIpInPoolCommand = async (output, context) => {
3965
2167
  await collectBody(output.body, context);
3966
2168
  return contents;
3967
2169
  };
3968
- const de_PutDedicatedIpInPoolCommandError = async (output, context) => {
3969
- const parsedOutput = {
3970
- ...output,
3971
- body: await parseErrorBody(output.body, context),
3972
- };
3973
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
3974
- switch (errorCode) {
3975
- case "BadRequestException":
3976
- case "com.amazonaws.sesv2#BadRequestException":
3977
- throw await de_BadRequestExceptionRes(parsedOutput, context);
3978
- case "NotFoundException":
3979
- case "com.amazonaws.sesv2#NotFoundException":
3980
- throw await de_NotFoundExceptionRes(parsedOutput, context);
3981
- case "TooManyRequestsException":
3982
- case "com.amazonaws.sesv2#TooManyRequestsException":
3983
- throw await de_TooManyRequestsExceptionRes(parsedOutput, context);
3984
- default:
3985
- const parsedBody = parsedOutput.body;
3986
- return throwDefaultError({
3987
- output,
3988
- parsedBody,
3989
- errorCode,
3990
- });
3991
- }
3992
- };
3993
2170
  export const de_PutDedicatedIpPoolScalingAttributesCommand = async (output, context) => {
3994
2171
  if (output.statusCode !== 200 && output.statusCode >= 300) {
3995
- return de_PutDedicatedIpPoolScalingAttributesCommandError(output, context);
2172
+ return de_CommandError(output, context);
3996
2173
  }
3997
2174
  const contents = map({
3998
2175
  $metadata: deserializeMetadata(output),
@@ -4000,37 +2177,9 @@ export const de_PutDedicatedIpPoolScalingAttributesCommand = async (output, cont
4000
2177
  await collectBody(output.body, context);
4001
2178
  return contents;
4002
2179
  };
4003
- const de_PutDedicatedIpPoolScalingAttributesCommandError = async (output, context) => {
4004
- const parsedOutput = {
4005
- ...output,
4006
- body: await parseErrorBody(output.body, context),
4007
- };
4008
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
4009
- switch (errorCode) {
4010
- case "BadRequestException":
4011
- case "com.amazonaws.sesv2#BadRequestException":
4012
- throw await de_BadRequestExceptionRes(parsedOutput, context);
4013
- case "ConcurrentModificationException":
4014
- case "com.amazonaws.sesv2#ConcurrentModificationException":
4015
- throw await de_ConcurrentModificationExceptionRes(parsedOutput, context);
4016
- case "NotFoundException":
4017
- case "com.amazonaws.sesv2#NotFoundException":
4018
- throw await de_NotFoundExceptionRes(parsedOutput, context);
4019
- case "TooManyRequestsException":
4020
- case "com.amazonaws.sesv2#TooManyRequestsException":
4021
- throw await de_TooManyRequestsExceptionRes(parsedOutput, context);
4022
- default:
4023
- const parsedBody = parsedOutput.body;
4024
- return throwDefaultError({
4025
- output,
4026
- parsedBody,
4027
- errorCode,
4028
- });
4029
- }
4030
- };
4031
2180
  export const de_PutDedicatedIpWarmupAttributesCommand = async (output, context) => {
4032
2181
  if (output.statusCode !== 200 && output.statusCode >= 300) {
4033
- return de_PutDedicatedIpWarmupAttributesCommandError(output, context);
2182
+ return de_CommandError(output, context);
4034
2183
  }
4035
2184
  const contents = map({
4036
2185
  $metadata: deserializeMetadata(output),
@@ -4038,34 +2187,9 @@ export const de_PutDedicatedIpWarmupAttributesCommand = async (output, context)
4038
2187
  await collectBody(output.body, context);
4039
2188
  return contents;
4040
2189
  };
4041
- const de_PutDedicatedIpWarmupAttributesCommandError = async (output, context) => {
4042
- const parsedOutput = {
4043
- ...output,
4044
- body: await parseErrorBody(output.body, context),
4045
- };
4046
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
4047
- switch (errorCode) {
4048
- case "BadRequestException":
4049
- case "com.amazonaws.sesv2#BadRequestException":
4050
- throw await de_BadRequestExceptionRes(parsedOutput, context);
4051
- case "NotFoundException":
4052
- case "com.amazonaws.sesv2#NotFoundException":
4053
- throw await de_NotFoundExceptionRes(parsedOutput, context);
4054
- case "TooManyRequestsException":
4055
- case "com.amazonaws.sesv2#TooManyRequestsException":
4056
- throw await de_TooManyRequestsExceptionRes(parsedOutput, context);
4057
- default:
4058
- const parsedBody = parsedOutput.body;
4059
- return throwDefaultError({
4060
- output,
4061
- parsedBody,
4062
- errorCode,
4063
- });
4064
- }
4065
- };
4066
2190
  export const de_PutDeliverabilityDashboardOptionCommand = async (output, context) => {
4067
2191
  if (output.statusCode !== 200 && output.statusCode >= 300) {
4068
- return de_PutDeliverabilityDashboardOptionCommandError(output, context);
2192
+ return de_CommandError(output, context);
4069
2193
  }
4070
2194
  const contents = map({
4071
2195
  $metadata: deserializeMetadata(output),
@@ -4073,40 +2197,9 @@ export const de_PutDeliverabilityDashboardOptionCommand = async (output, context
4073
2197
  await collectBody(output.body, context);
4074
2198
  return contents;
4075
2199
  };
4076
- const de_PutDeliverabilityDashboardOptionCommandError = async (output, context) => {
4077
- const parsedOutput = {
4078
- ...output,
4079
- body: await parseErrorBody(output.body, context),
4080
- };
4081
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
4082
- switch (errorCode) {
4083
- case "AlreadyExistsException":
4084
- case "com.amazonaws.sesv2#AlreadyExistsException":
4085
- throw await de_AlreadyExistsExceptionRes(parsedOutput, context);
4086
- case "BadRequestException":
4087
- case "com.amazonaws.sesv2#BadRequestException":
4088
- throw await de_BadRequestExceptionRes(parsedOutput, context);
4089
- case "LimitExceededException":
4090
- case "com.amazonaws.sesv2#LimitExceededException":
4091
- throw await de_LimitExceededExceptionRes(parsedOutput, context);
4092
- case "NotFoundException":
4093
- case "com.amazonaws.sesv2#NotFoundException":
4094
- throw await de_NotFoundExceptionRes(parsedOutput, context);
4095
- case "TooManyRequestsException":
4096
- case "com.amazonaws.sesv2#TooManyRequestsException":
4097
- throw await de_TooManyRequestsExceptionRes(parsedOutput, context);
4098
- default:
4099
- const parsedBody = parsedOutput.body;
4100
- return throwDefaultError({
4101
- output,
4102
- parsedBody,
4103
- errorCode,
4104
- });
4105
- }
4106
- };
4107
2200
  export const de_PutEmailIdentityConfigurationSetAttributesCommand = async (output, context) => {
4108
2201
  if (output.statusCode !== 200 && output.statusCode >= 300) {
4109
- return de_PutEmailIdentityConfigurationSetAttributesCommandError(output, context);
2202
+ return de_CommandError(output, context);
4110
2203
  }
4111
2204
  const contents = map({
4112
2205
  $metadata: deserializeMetadata(output),
@@ -4114,34 +2207,9 @@ export const de_PutEmailIdentityConfigurationSetAttributesCommand = async (outpu
4114
2207
  await collectBody(output.body, context);
4115
2208
  return contents;
4116
2209
  };
4117
- const de_PutEmailIdentityConfigurationSetAttributesCommandError = async (output, context) => {
4118
- const parsedOutput = {
4119
- ...output,
4120
- body: await parseErrorBody(output.body, context),
4121
- };
4122
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
4123
- switch (errorCode) {
4124
- case "BadRequestException":
4125
- case "com.amazonaws.sesv2#BadRequestException":
4126
- throw await de_BadRequestExceptionRes(parsedOutput, context);
4127
- case "NotFoundException":
4128
- case "com.amazonaws.sesv2#NotFoundException":
4129
- throw await de_NotFoundExceptionRes(parsedOutput, context);
4130
- case "TooManyRequestsException":
4131
- case "com.amazonaws.sesv2#TooManyRequestsException":
4132
- throw await de_TooManyRequestsExceptionRes(parsedOutput, context);
4133
- default:
4134
- const parsedBody = parsedOutput.body;
4135
- return throwDefaultError({
4136
- output,
4137
- parsedBody,
4138
- errorCode,
4139
- });
4140
- }
4141
- };
4142
2210
  export const de_PutEmailIdentityDkimAttributesCommand = async (output, context) => {
4143
2211
  if (output.statusCode !== 200 && output.statusCode >= 300) {
4144
- return de_PutEmailIdentityDkimAttributesCommandError(output, context);
2212
+ return de_CommandError(output, context);
4145
2213
  }
4146
2214
  const contents = map({
4147
2215
  $metadata: deserializeMetadata(output),
@@ -4149,34 +2217,9 @@ export const de_PutEmailIdentityDkimAttributesCommand = async (output, context)
4149
2217
  await collectBody(output.body, context);
4150
2218
  return contents;
4151
2219
  };
4152
- const de_PutEmailIdentityDkimAttributesCommandError = async (output, context) => {
4153
- const parsedOutput = {
4154
- ...output,
4155
- body: await parseErrorBody(output.body, context),
4156
- };
4157
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
4158
- switch (errorCode) {
4159
- case "BadRequestException":
4160
- case "com.amazonaws.sesv2#BadRequestException":
4161
- throw await de_BadRequestExceptionRes(parsedOutput, context);
4162
- case "NotFoundException":
4163
- case "com.amazonaws.sesv2#NotFoundException":
4164
- throw await de_NotFoundExceptionRes(parsedOutput, context);
4165
- case "TooManyRequestsException":
4166
- case "com.amazonaws.sesv2#TooManyRequestsException":
4167
- throw await de_TooManyRequestsExceptionRes(parsedOutput, context);
4168
- default:
4169
- const parsedBody = parsedOutput.body;
4170
- return throwDefaultError({
4171
- output,
4172
- parsedBody,
4173
- errorCode,
4174
- });
4175
- }
4176
- };
4177
2220
  export const de_PutEmailIdentityDkimSigningAttributesCommand = async (output, context) => {
4178
2221
  if (output.statusCode !== 200 && output.statusCode >= 300) {
4179
- return de_PutEmailIdentityDkimSigningAttributesCommandError(output, context);
2222
+ return de_CommandError(output, context);
4180
2223
  }
4181
2224
  const contents = map({
4182
2225
  $metadata: deserializeMetadata(output),
@@ -4189,34 +2232,9 @@ export const de_PutEmailIdentityDkimSigningAttributesCommand = async (output, co
4189
2232
  Object.assign(contents, doc);
4190
2233
  return contents;
4191
2234
  };
4192
- const de_PutEmailIdentityDkimSigningAttributesCommandError = async (output, context) => {
4193
- const parsedOutput = {
4194
- ...output,
4195
- body: await parseErrorBody(output.body, context),
4196
- };
4197
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
4198
- switch (errorCode) {
4199
- case "BadRequestException":
4200
- case "com.amazonaws.sesv2#BadRequestException":
4201
- throw await de_BadRequestExceptionRes(parsedOutput, context);
4202
- case "NotFoundException":
4203
- case "com.amazonaws.sesv2#NotFoundException":
4204
- throw await de_NotFoundExceptionRes(parsedOutput, context);
4205
- case "TooManyRequestsException":
4206
- case "com.amazonaws.sesv2#TooManyRequestsException":
4207
- throw await de_TooManyRequestsExceptionRes(parsedOutput, context);
4208
- default:
4209
- const parsedBody = parsedOutput.body;
4210
- return throwDefaultError({
4211
- output,
4212
- parsedBody,
4213
- errorCode,
4214
- });
4215
- }
4216
- };
4217
2235
  export const de_PutEmailIdentityFeedbackAttributesCommand = async (output, context) => {
4218
2236
  if (output.statusCode !== 200 && output.statusCode >= 300) {
4219
- return de_PutEmailIdentityFeedbackAttributesCommandError(output, context);
2237
+ return de_CommandError(output, context);
4220
2238
  }
4221
2239
  const contents = map({
4222
2240
  $metadata: deserializeMetadata(output),
@@ -4224,34 +2242,9 @@ export const de_PutEmailIdentityFeedbackAttributesCommand = async (output, conte
4224
2242
  await collectBody(output.body, context);
4225
2243
  return contents;
4226
2244
  };
4227
- const de_PutEmailIdentityFeedbackAttributesCommandError = async (output, context) => {
4228
- const parsedOutput = {
4229
- ...output,
4230
- body: await parseErrorBody(output.body, context),
4231
- };
4232
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
4233
- switch (errorCode) {
4234
- case "BadRequestException":
4235
- case "com.amazonaws.sesv2#BadRequestException":
4236
- throw await de_BadRequestExceptionRes(parsedOutput, context);
4237
- case "NotFoundException":
4238
- case "com.amazonaws.sesv2#NotFoundException":
4239
- throw await de_NotFoundExceptionRes(parsedOutput, context);
4240
- case "TooManyRequestsException":
4241
- case "com.amazonaws.sesv2#TooManyRequestsException":
4242
- throw await de_TooManyRequestsExceptionRes(parsedOutput, context);
4243
- default:
4244
- const parsedBody = parsedOutput.body;
4245
- return throwDefaultError({
4246
- output,
4247
- parsedBody,
4248
- errorCode,
4249
- });
4250
- }
4251
- };
4252
2245
  export const de_PutEmailIdentityMailFromAttributesCommand = async (output, context) => {
4253
2246
  if (output.statusCode !== 200 && output.statusCode >= 300) {
4254
- return de_PutEmailIdentityMailFromAttributesCommandError(output, context);
2247
+ return de_CommandError(output, context);
4255
2248
  }
4256
2249
  const contents = map({
4257
2250
  $metadata: deserializeMetadata(output),
@@ -4259,34 +2252,9 @@ export const de_PutEmailIdentityMailFromAttributesCommand = async (output, conte
4259
2252
  await collectBody(output.body, context);
4260
2253
  return contents;
4261
2254
  };
4262
- const de_PutEmailIdentityMailFromAttributesCommandError = async (output, context) => {
4263
- const parsedOutput = {
4264
- ...output,
4265
- body: await parseErrorBody(output.body, context),
4266
- };
4267
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
4268
- switch (errorCode) {
4269
- case "BadRequestException":
4270
- case "com.amazonaws.sesv2#BadRequestException":
4271
- throw await de_BadRequestExceptionRes(parsedOutput, context);
4272
- case "NotFoundException":
4273
- case "com.amazonaws.sesv2#NotFoundException":
4274
- throw await de_NotFoundExceptionRes(parsedOutput, context);
4275
- case "TooManyRequestsException":
4276
- case "com.amazonaws.sesv2#TooManyRequestsException":
4277
- throw await de_TooManyRequestsExceptionRes(parsedOutput, context);
4278
- default:
4279
- const parsedBody = parsedOutput.body;
4280
- return throwDefaultError({
4281
- output,
4282
- parsedBody,
4283
- errorCode,
4284
- });
4285
- }
4286
- };
4287
2255
  export const de_PutSuppressedDestinationCommand = async (output, context) => {
4288
2256
  if (output.statusCode !== 200 && output.statusCode >= 300) {
4289
- return de_PutSuppressedDestinationCommandError(output, context);
2257
+ return de_CommandError(output, context);
4290
2258
  }
4291
2259
  const contents = map({
4292
2260
  $metadata: deserializeMetadata(output),
@@ -4294,31 +2262,9 @@ export const de_PutSuppressedDestinationCommand = async (output, context) => {
4294
2262
  await collectBody(output.body, context);
4295
2263
  return contents;
4296
2264
  };
4297
- const de_PutSuppressedDestinationCommandError = async (output, context) => {
4298
- const parsedOutput = {
4299
- ...output,
4300
- body: await parseErrorBody(output.body, context),
4301
- };
4302
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
4303
- switch (errorCode) {
4304
- case "BadRequestException":
4305
- case "com.amazonaws.sesv2#BadRequestException":
4306
- throw await de_BadRequestExceptionRes(parsedOutput, context);
4307
- case "TooManyRequestsException":
4308
- case "com.amazonaws.sesv2#TooManyRequestsException":
4309
- throw await de_TooManyRequestsExceptionRes(parsedOutput, context);
4310
- default:
4311
- const parsedBody = parsedOutput.body;
4312
- return throwDefaultError({
4313
- output,
4314
- parsedBody,
4315
- errorCode,
4316
- });
4317
- }
4318
- };
4319
2265
  export const de_SendBulkEmailCommand = async (output, context) => {
4320
2266
  if (output.statusCode !== 200 && output.statusCode >= 300) {
4321
- return de_SendBulkEmailCommandError(output, context);
2267
+ return de_CommandError(output, context);
4322
2268
  }
4323
2269
  const contents = map({
4324
2270
  $metadata: deserializeMetadata(output),
@@ -4330,192 +2276,47 @@ export const de_SendBulkEmailCommand = async (output, context) => {
4330
2276
  Object.assign(contents, doc);
4331
2277
  return contents;
4332
2278
  };
4333
- const de_SendBulkEmailCommandError = async (output, context) => {
4334
- const parsedOutput = {
4335
- ...output,
4336
- body: await parseErrorBody(output.body, context),
4337
- };
4338
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
4339
- switch (errorCode) {
4340
- case "AccountSuspendedException":
4341
- case "com.amazonaws.sesv2#AccountSuspendedException":
4342
- throw await de_AccountSuspendedExceptionRes(parsedOutput, context);
4343
- case "BadRequestException":
4344
- case "com.amazonaws.sesv2#BadRequestException":
4345
- throw await de_BadRequestExceptionRes(parsedOutput, context);
4346
- case "LimitExceededException":
4347
- case "com.amazonaws.sesv2#LimitExceededException":
4348
- throw await de_LimitExceededExceptionRes(parsedOutput, context);
4349
- case "MailFromDomainNotVerifiedException":
4350
- case "com.amazonaws.sesv2#MailFromDomainNotVerifiedException":
4351
- throw await de_MailFromDomainNotVerifiedExceptionRes(parsedOutput, context);
4352
- case "MessageRejected":
4353
- case "com.amazonaws.sesv2#MessageRejected":
4354
- throw await de_MessageRejectedRes(parsedOutput, context);
4355
- case "NotFoundException":
4356
- case "com.amazonaws.sesv2#NotFoundException":
4357
- throw await de_NotFoundExceptionRes(parsedOutput, context);
4358
- case "SendingPausedException":
4359
- case "com.amazonaws.sesv2#SendingPausedException":
4360
- throw await de_SendingPausedExceptionRes(parsedOutput, context);
4361
- case "TooManyRequestsException":
4362
- case "com.amazonaws.sesv2#TooManyRequestsException":
4363
- throw await de_TooManyRequestsExceptionRes(parsedOutput, context);
4364
- default:
4365
- const parsedBody = parsedOutput.body;
4366
- return throwDefaultError({
4367
- output,
4368
- parsedBody,
4369
- errorCode,
4370
- });
4371
- }
4372
- };
4373
2279
  export const de_SendCustomVerificationEmailCommand = async (output, context) => {
4374
2280
  if (output.statusCode !== 200 && output.statusCode >= 300) {
4375
- return de_SendCustomVerificationEmailCommandError(output, context);
4376
- }
4377
- const contents = map({
4378
- $metadata: deserializeMetadata(output),
4379
- });
4380
- const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
4381
- const doc = take(data, {
4382
- MessageId: __expectString,
4383
- });
4384
- Object.assign(contents, doc);
4385
- return contents;
4386
- };
4387
- const de_SendCustomVerificationEmailCommandError = async (output, context) => {
4388
- const parsedOutput = {
4389
- ...output,
4390
- body: await parseErrorBody(output.body, context),
4391
- };
4392
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
4393
- switch (errorCode) {
4394
- case "BadRequestException":
4395
- case "com.amazonaws.sesv2#BadRequestException":
4396
- throw await de_BadRequestExceptionRes(parsedOutput, context);
4397
- case "LimitExceededException":
4398
- case "com.amazonaws.sesv2#LimitExceededException":
4399
- throw await de_LimitExceededExceptionRes(parsedOutput, context);
4400
- case "MailFromDomainNotVerifiedException":
4401
- case "com.amazonaws.sesv2#MailFromDomainNotVerifiedException":
4402
- throw await de_MailFromDomainNotVerifiedExceptionRes(parsedOutput, context);
4403
- case "MessageRejected":
4404
- case "com.amazonaws.sesv2#MessageRejected":
4405
- throw await de_MessageRejectedRes(parsedOutput, context);
4406
- case "NotFoundException":
4407
- case "com.amazonaws.sesv2#NotFoundException":
4408
- throw await de_NotFoundExceptionRes(parsedOutput, context);
4409
- case "SendingPausedException":
4410
- case "com.amazonaws.sesv2#SendingPausedException":
4411
- throw await de_SendingPausedExceptionRes(parsedOutput, context);
4412
- case "TooManyRequestsException":
4413
- case "com.amazonaws.sesv2#TooManyRequestsException":
4414
- throw await de_TooManyRequestsExceptionRes(parsedOutput, context);
4415
- default:
4416
- const parsedBody = parsedOutput.body;
4417
- return throwDefaultError({
4418
- output,
4419
- parsedBody,
4420
- errorCode,
4421
- });
4422
- }
4423
- };
4424
- export const de_SendEmailCommand = async (output, context) => {
4425
- if (output.statusCode !== 200 && output.statusCode >= 300) {
4426
- return de_SendEmailCommandError(output, context);
4427
- }
4428
- const contents = map({
4429
- $metadata: deserializeMetadata(output),
4430
- });
4431
- const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
4432
- const doc = take(data, {
4433
- MessageId: __expectString,
4434
- });
4435
- Object.assign(contents, doc);
4436
- return contents;
4437
- };
4438
- const de_SendEmailCommandError = async (output, context) => {
4439
- const parsedOutput = {
4440
- ...output,
4441
- body: await parseErrorBody(output.body, context),
4442
- };
4443
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
4444
- switch (errorCode) {
4445
- case "AccountSuspendedException":
4446
- case "com.amazonaws.sesv2#AccountSuspendedException":
4447
- throw await de_AccountSuspendedExceptionRes(parsedOutput, context);
4448
- case "BadRequestException":
4449
- case "com.amazonaws.sesv2#BadRequestException":
4450
- throw await de_BadRequestExceptionRes(parsedOutput, context);
4451
- case "LimitExceededException":
4452
- case "com.amazonaws.sesv2#LimitExceededException":
4453
- throw await de_LimitExceededExceptionRes(parsedOutput, context);
4454
- case "MailFromDomainNotVerifiedException":
4455
- case "com.amazonaws.sesv2#MailFromDomainNotVerifiedException":
4456
- throw await de_MailFromDomainNotVerifiedExceptionRes(parsedOutput, context);
4457
- case "MessageRejected":
4458
- case "com.amazonaws.sesv2#MessageRejected":
4459
- throw await de_MessageRejectedRes(parsedOutput, context);
4460
- case "NotFoundException":
4461
- case "com.amazonaws.sesv2#NotFoundException":
4462
- throw await de_NotFoundExceptionRes(parsedOutput, context);
4463
- case "SendingPausedException":
4464
- case "com.amazonaws.sesv2#SendingPausedException":
4465
- throw await de_SendingPausedExceptionRes(parsedOutput, context);
4466
- case "TooManyRequestsException":
4467
- case "com.amazonaws.sesv2#TooManyRequestsException":
4468
- throw await de_TooManyRequestsExceptionRes(parsedOutput, context);
4469
- default:
4470
- const parsedBody = parsedOutput.body;
4471
- return throwDefaultError({
4472
- output,
4473
- parsedBody,
4474
- errorCode,
4475
- });
2281
+ return de_CommandError(output, context);
4476
2282
  }
2283
+ const contents = map({
2284
+ $metadata: deserializeMetadata(output),
2285
+ });
2286
+ const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
2287
+ const doc = take(data, {
2288
+ MessageId: __expectString,
2289
+ });
2290
+ Object.assign(contents, doc);
2291
+ return contents;
4477
2292
  };
4478
- export const de_TagResourceCommand = async (output, context) => {
2293
+ export const de_SendEmailCommand = async (output, context) => {
4479
2294
  if (output.statusCode !== 200 && output.statusCode >= 300) {
4480
- return de_TagResourceCommandError(output, context);
2295
+ return de_CommandError(output, context);
4481
2296
  }
4482
2297
  const contents = map({
4483
2298
  $metadata: deserializeMetadata(output),
4484
2299
  });
4485
- await collectBody(output.body, context);
2300
+ const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
2301
+ const doc = take(data, {
2302
+ MessageId: __expectString,
2303
+ });
2304
+ Object.assign(contents, doc);
4486
2305
  return contents;
4487
2306
  };
4488
- const de_TagResourceCommandError = async (output, context) => {
4489
- const parsedOutput = {
4490
- ...output,
4491
- body: await parseErrorBody(output.body, context),
4492
- };
4493
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
4494
- switch (errorCode) {
4495
- case "BadRequestException":
4496
- case "com.amazonaws.sesv2#BadRequestException":
4497
- throw await de_BadRequestExceptionRes(parsedOutput, context);
4498
- case "ConcurrentModificationException":
4499
- case "com.amazonaws.sesv2#ConcurrentModificationException":
4500
- throw await de_ConcurrentModificationExceptionRes(parsedOutput, context);
4501
- case "NotFoundException":
4502
- case "com.amazonaws.sesv2#NotFoundException":
4503
- throw await de_NotFoundExceptionRes(parsedOutput, context);
4504
- case "TooManyRequestsException":
4505
- case "com.amazonaws.sesv2#TooManyRequestsException":
4506
- throw await de_TooManyRequestsExceptionRes(parsedOutput, context);
4507
- default:
4508
- const parsedBody = parsedOutput.body;
4509
- return throwDefaultError({
4510
- output,
4511
- parsedBody,
4512
- errorCode,
4513
- });
2307
+ export const de_TagResourceCommand = async (output, context) => {
2308
+ if (output.statusCode !== 200 && output.statusCode >= 300) {
2309
+ return de_CommandError(output, context);
4514
2310
  }
2311
+ const contents = map({
2312
+ $metadata: deserializeMetadata(output),
2313
+ });
2314
+ await collectBody(output.body, context);
2315
+ return contents;
4515
2316
  };
4516
2317
  export const de_TestRenderEmailTemplateCommand = async (output, context) => {
4517
2318
  if (output.statusCode !== 200 && output.statusCode >= 300) {
4518
- return de_TestRenderEmailTemplateCommandError(output, context);
2319
+ return de_CommandError(output, context);
4519
2320
  }
4520
2321
  const contents = map({
4521
2322
  $metadata: deserializeMetadata(output),
@@ -4527,34 +2328,9 @@ export const de_TestRenderEmailTemplateCommand = async (output, context) => {
4527
2328
  Object.assign(contents, doc);
4528
2329
  return contents;
4529
2330
  };
4530
- const de_TestRenderEmailTemplateCommandError = async (output, context) => {
4531
- const parsedOutput = {
4532
- ...output,
4533
- body: await parseErrorBody(output.body, context),
4534
- };
4535
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
4536
- switch (errorCode) {
4537
- case "BadRequestException":
4538
- case "com.amazonaws.sesv2#BadRequestException":
4539
- throw await de_BadRequestExceptionRes(parsedOutput, context);
4540
- case "NotFoundException":
4541
- case "com.amazonaws.sesv2#NotFoundException":
4542
- throw await de_NotFoundExceptionRes(parsedOutput, context);
4543
- case "TooManyRequestsException":
4544
- case "com.amazonaws.sesv2#TooManyRequestsException":
4545
- throw await de_TooManyRequestsExceptionRes(parsedOutput, context);
4546
- default:
4547
- const parsedBody = parsedOutput.body;
4548
- return throwDefaultError({
4549
- output,
4550
- parsedBody,
4551
- errorCode,
4552
- });
4553
- }
4554
- };
4555
2331
  export const de_UntagResourceCommand = async (output, context) => {
4556
2332
  if (output.statusCode !== 200 && output.statusCode >= 300) {
4557
- return de_UntagResourceCommandError(output, context);
2333
+ return de_CommandError(output, context);
4558
2334
  }
4559
2335
  const contents = map({
4560
2336
  $metadata: deserializeMetadata(output),
@@ -4562,37 +2338,9 @@ export const de_UntagResourceCommand = async (output, context) => {
4562
2338
  await collectBody(output.body, context);
4563
2339
  return contents;
4564
2340
  };
4565
- const de_UntagResourceCommandError = async (output, context) => {
4566
- const parsedOutput = {
4567
- ...output,
4568
- body: await parseErrorBody(output.body, context),
4569
- };
4570
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
4571
- switch (errorCode) {
4572
- case "BadRequestException":
4573
- case "com.amazonaws.sesv2#BadRequestException":
4574
- throw await de_BadRequestExceptionRes(parsedOutput, context);
4575
- case "ConcurrentModificationException":
4576
- case "com.amazonaws.sesv2#ConcurrentModificationException":
4577
- throw await de_ConcurrentModificationExceptionRes(parsedOutput, context);
4578
- case "NotFoundException":
4579
- case "com.amazonaws.sesv2#NotFoundException":
4580
- throw await de_NotFoundExceptionRes(parsedOutput, context);
4581
- case "TooManyRequestsException":
4582
- case "com.amazonaws.sesv2#TooManyRequestsException":
4583
- throw await de_TooManyRequestsExceptionRes(parsedOutput, context);
4584
- default:
4585
- const parsedBody = parsedOutput.body;
4586
- return throwDefaultError({
4587
- output,
4588
- parsedBody,
4589
- errorCode,
4590
- });
4591
- }
4592
- };
4593
2341
  export const de_UpdateConfigurationSetEventDestinationCommand = async (output, context) => {
4594
2342
  if (output.statusCode !== 200 && output.statusCode >= 300) {
4595
- return de_UpdateConfigurationSetEventDestinationCommandError(output, context);
2343
+ return de_CommandError(output, context);
4596
2344
  }
4597
2345
  const contents = map({
4598
2346
  $metadata: deserializeMetadata(output),
@@ -4600,34 +2348,9 @@ export const de_UpdateConfigurationSetEventDestinationCommand = async (output, c
4600
2348
  await collectBody(output.body, context);
4601
2349
  return contents;
4602
2350
  };
4603
- const de_UpdateConfigurationSetEventDestinationCommandError = async (output, context) => {
4604
- const parsedOutput = {
4605
- ...output,
4606
- body: await parseErrorBody(output.body, context),
4607
- };
4608
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
4609
- switch (errorCode) {
4610
- case "BadRequestException":
4611
- case "com.amazonaws.sesv2#BadRequestException":
4612
- throw await de_BadRequestExceptionRes(parsedOutput, context);
4613
- case "NotFoundException":
4614
- case "com.amazonaws.sesv2#NotFoundException":
4615
- throw await de_NotFoundExceptionRes(parsedOutput, context);
4616
- case "TooManyRequestsException":
4617
- case "com.amazonaws.sesv2#TooManyRequestsException":
4618
- throw await de_TooManyRequestsExceptionRes(parsedOutput, context);
4619
- default:
4620
- const parsedBody = parsedOutput.body;
4621
- return throwDefaultError({
4622
- output,
4623
- parsedBody,
4624
- errorCode,
4625
- });
4626
- }
4627
- };
4628
2351
  export const de_UpdateContactCommand = async (output, context) => {
4629
2352
  if (output.statusCode !== 200 && output.statusCode >= 300) {
4630
- return de_UpdateContactCommandError(output, context);
2353
+ return de_CommandError(output, context);
4631
2354
  }
4632
2355
  const contents = map({
4633
2356
  $metadata: deserializeMetadata(output),
@@ -4635,37 +2358,9 @@ export const de_UpdateContactCommand = async (output, context) => {
4635
2358
  await collectBody(output.body, context);
4636
2359
  return contents;
4637
2360
  };
4638
- const de_UpdateContactCommandError = async (output, context) => {
4639
- const parsedOutput = {
4640
- ...output,
4641
- body: await parseErrorBody(output.body, context),
4642
- };
4643
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
4644
- switch (errorCode) {
4645
- case "BadRequestException":
4646
- case "com.amazonaws.sesv2#BadRequestException":
4647
- throw await de_BadRequestExceptionRes(parsedOutput, context);
4648
- case "ConcurrentModificationException":
4649
- case "com.amazonaws.sesv2#ConcurrentModificationException":
4650
- throw await de_ConcurrentModificationExceptionRes(parsedOutput, context);
4651
- case "NotFoundException":
4652
- case "com.amazonaws.sesv2#NotFoundException":
4653
- throw await de_NotFoundExceptionRes(parsedOutput, context);
4654
- case "TooManyRequestsException":
4655
- case "com.amazonaws.sesv2#TooManyRequestsException":
4656
- throw await de_TooManyRequestsExceptionRes(parsedOutput, context);
4657
- default:
4658
- const parsedBody = parsedOutput.body;
4659
- return throwDefaultError({
4660
- output,
4661
- parsedBody,
4662
- errorCode,
4663
- });
4664
- }
4665
- };
4666
2361
  export const de_UpdateContactListCommand = async (output, context) => {
4667
2362
  if (output.statusCode !== 200 && output.statusCode >= 300) {
4668
- return de_UpdateContactListCommandError(output, context);
2363
+ return de_CommandError(output, context);
4669
2364
  }
4670
2365
  const contents = map({
4671
2366
  $metadata: deserializeMetadata(output),
@@ -4673,37 +2368,9 @@ export const de_UpdateContactListCommand = async (output, context) => {
4673
2368
  await collectBody(output.body, context);
4674
2369
  return contents;
4675
2370
  };
4676
- const de_UpdateContactListCommandError = async (output, context) => {
4677
- const parsedOutput = {
4678
- ...output,
4679
- body: await parseErrorBody(output.body, context),
4680
- };
4681
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
4682
- switch (errorCode) {
4683
- case "BadRequestException":
4684
- case "com.amazonaws.sesv2#BadRequestException":
4685
- throw await de_BadRequestExceptionRes(parsedOutput, context);
4686
- case "ConcurrentModificationException":
4687
- case "com.amazonaws.sesv2#ConcurrentModificationException":
4688
- throw await de_ConcurrentModificationExceptionRes(parsedOutput, context);
4689
- case "NotFoundException":
4690
- case "com.amazonaws.sesv2#NotFoundException":
4691
- throw await de_NotFoundExceptionRes(parsedOutput, context);
4692
- case "TooManyRequestsException":
4693
- case "com.amazonaws.sesv2#TooManyRequestsException":
4694
- throw await de_TooManyRequestsExceptionRes(parsedOutput, context);
4695
- default:
4696
- const parsedBody = parsedOutput.body;
4697
- return throwDefaultError({
4698
- output,
4699
- parsedBody,
4700
- errorCode,
4701
- });
4702
- }
4703
- };
4704
2371
  export const de_UpdateCustomVerificationEmailTemplateCommand = async (output, context) => {
4705
2372
  if (output.statusCode !== 200 && output.statusCode >= 300) {
4706
- return de_UpdateCustomVerificationEmailTemplateCommandError(output, context);
2373
+ return de_CommandError(output, context);
4707
2374
  }
4708
2375
  const contents = map({
4709
2376
  $metadata: deserializeMetadata(output),
@@ -4711,34 +2378,9 @@ export const de_UpdateCustomVerificationEmailTemplateCommand = async (output, co
4711
2378
  await collectBody(output.body, context);
4712
2379
  return contents;
4713
2380
  };
4714
- const de_UpdateCustomVerificationEmailTemplateCommandError = async (output, context) => {
4715
- const parsedOutput = {
4716
- ...output,
4717
- body: await parseErrorBody(output.body, context),
4718
- };
4719
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
4720
- switch (errorCode) {
4721
- case "BadRequestException":
4722
- case "com.amazonaws.sesv2#BadRequestException":
4723
- throw await de_BadRequestExceptionRes(parsedOutput, context);
4724
- case "NotFoundException":
4725
- case "com.amazonaws.sesv2#NotFoundException":
4726
- throw await de_NotFoundExceptionRes(parsedOutput, context);
4727
- case "TooManyRequestsException":
4728
- case "com.amazonaws.sesv2#TooManyRequestsException":
4729
- throw await de_TooManyRequestsExceptionRes(parsedOutput, context);
4730
- default:
4731
- const parsedBody = parsedOutput.body;
4732
- return throwDefaultError({
4733
- output,
4734
- parsedBody,
4735
- errorCode,
4736
- });
4737
- }
4738
- };
4739
2381
  export const de_UpdateEmailIdentityPolicyCommand = async (output, context) => {
4740
2382
  if (output.statusCode !== 200 && output.statusCode >= 300) {
4741
- return de_UpdateEmailIdentityPolicyCommandError(output, context);
2383
+ return de_CommandError(output, context);
4742
2384
  }
4743
2385
  const contents = map({
4744
2386
  $metadata: deserializeMetadata(output),
@@ -4746,34 +2388,9 @@ export const de_UpdateEmailIdentityPolicyCommand = async (output, context) => {
4746
2388
  await collectBody(output.body, context);
4747
2389
  return contents;
4748
2390
  };
4749
- const de_UpdateEmailIdentityPolicyCommandError = async (output, context) => {
4750
- const parsedOutput = {
4751
- ...output,
4752
- body: await parseErrorBody(output.body, context),
4753
- };
4754
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
4755
- switch (errorCode) {
4756
- case "BadRequestException":
4757
- case "com.amazonaws.sesv2#BadRequestException":
4758
- throw await de_BadRequestExceptionRes(parsedOutput, context);
4759
- case "NotFoundException":
4760
- case "com.amazonaws.sesv2#NotFoundException":
4761
- throw await de_NotFoundExceptionRes(parsedOutput, context);
4762
- case "TooManyRequestsException":
4763
- case "com.amazonaws.sesv2#TooManyRequestsException":
4764
- throw await de_TooManyRequestsExceptionRes(parsedOutput, context);
4765
- default:
4766
- const parsedBody = parsedOutput.body;
4767
- return throwDefaultError({
4768
- output,
4769
- parsedBody,
4770
- errorCode,
4771
- });
4772
- }
4773
- };
4774
2391
  export const de_UpdateEmailTemplateCommand = async (output, context) => {
4775
2392
  if (output.statusCode !== 200 && output.statusCode >= 300) {
4776
- return de_UpdateEmailTemplateCommandError(output, context);
2393
+ return de_CommandError(output, context);
4777
2394
  }
4778
2395
  const contents = map({
4779
2396
  $metadata: deserializeMetadata(output),
@@ -4781,7 +2398,7 @@ export const de_UpdateEmailTemplateCommand = async (output, context) => {
4781
2398
  await collectBody(output.body, context);
4782
2399
  return contents;
4783
2400
  };
4784
- const de_UpdateEmailTemplateCommandError = async (output, context) => {
2401
+ const de_CommandError = async (output, context) => {
4785
2402
  const parsedOutput = {
4786
2403
  ...output,
4787
2404
  body: await parseErrorBody(output.body, context),
@@ -4791,12 +2408,42 @@ const de_UpdateEmailTemplateCommandError = async (output, context) => {
4791
2408
  case "BadRequestException":
4792
2409
  case "com.amazonaws.sesv2#BadRequestException":
4793
2410
  throw await de_BadRequestExceptionRes(parsedOutput, context);
2411
+ case "InternalServiceErrorException":
2412
+ case "com.amazonaws.sesv2#InternalServiceErrorException":
2413
+ throw await de_InternalServiceErrorExceptionRes(parsedOutput, context);
4794
2414
  case "NotFoundException":
4795
2415
  case "com.amazonaws.sesv2#NotFoundException":
4796
2416
  throw await de_NotFoundExceptionRes(parsedOutput, context);
4797
2417
  case "TooManyRequestsException":
4798
2418
  case "com.amazonaws.sesv2#TooManyRequestsException":
4799
2419
  throw await de_TooManyRequestsExceptionRes(parsedOutput, context);
2420
+ case "AlreadyExistsException":
2421
+ case "com.amazonaws.sesv2#AlreadyExistsException":
2422
+ throw await de_AlreadyExistsExceptionRes(parsedOutput, context);
2423
+ case "ConcurrentModificationException":
2424
+ case "com.amazonaws.sesv2#ConcurrentModificationException":
2425
+ throw await de_ConcurrentModificationExceptionRes(parsedOutput, context);
2426
+ case "LimitExceededException":
2427
+ case "com.amazonaws.sesv2#LimitExceededException":
2428
+ throw await de_LimitExceededExceptionRes(parsedOutput, context);
2429
+ case "AccountSuspendedException":
2430
+ case "com.amazonaws.sesv2#AccountSuspendedException":
2431
+ throw await de_AccountSuspendedExceptionRes(parsedOutput, context);
2432
+ case "MailFromDomainNotVerifiedException":
2433
+ case "com.amazonaws.sesv2#MailFromDomainNotVerifiedException":
2434
+ throw await de_MailFromDomainNotVerifiedExceptionRes(parsedOutput, context);
2435
+ case "MessageRejected":
2436
+ case "com.amazonaws.sesv2#MessageRejected":
2437
+ throw await de_MessageRejectedRes(parsedOutput, context);
2438
+ case "SendingPausedException":
2439
+ case "com.amazonaws.sesv2#SendingPausedException":
2440
+ throw await de_SendingPausedExceptionRes(parsedOutput, context);
2441
+ case "InvalidNextTokenException":
2442
+ case "com.amazonaws.sesv2#InvalidNextTokenException":
2443
+ throw await de_InvalidNextTokenExceptionRes(parsedOutput, context);
2444
+ case "ConflictException":
2445
+ case "com.amazonaws.sesv2#ConflictException":
2446
+ throw await de_ConflictExceptionRes(parsedOutput, context);
4800
2447
  default:
4801
2448
  const parsedBody = parsedOutput.body;
4802
2449
  return throwDefaultError({