@aws-sdk/client-pinpoint-sms-voice-v2 3.504.0 → 3.507.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist-cjs/index.js CHANGED
@@ -1242,7 +1242,7 @@ var se_VerifyDestinationNumberCommand = /* @__PURE__ */ __name(async (input, con
1242
1242
  }, "se_VerifyDestinationNumberCommand");
1243
1243
  var de_AssociateOriginationIdentityCommand = /* @__PURE__ */ __name(async (output, context) => {
1244
1244
  if (output.statusCode >= 300) {
1245
- return de_AssociateOriginationIdentityCommandError(output, context);
1245
+ return de_CommandError(output, context);
1246
1246
  }
1247
1247
  const data = await parseBody(output.body, context);
1248
1248
  let contents = {};
@@ -1253,46 +1253,9 @@ var de_AssociateOriginationIdentityCommand = /* @__PURE__ */ __name(async (outpu
1253
1253
  };
1254
1254
  return response;
1255
1255
  }, "de_AssociateOriginationIdentityCommand");
1256
- var de_AssociateOriginationIdentityCommandError = /* @__PURE__ */ __name(async (output, context) => {
1257
- const parsedOutput = {
1258
- ...output,
1259
- body: await parseErrorBody(output.body, context)
1260
- };
1261
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1262
- switch (errorCode) {
1263
- case "AccessDeniedException":
1264
- case "com.amazonaws.pinpointsmsvoicev2#AccessDeniedException":
1265
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
1266
- case "ConflictException":
1267
- case "com.amazonaws.pinpointsmsvoicev2#ConflictException":
1268
- throw await de_ConflictExceptionRes(parsedOutput, context);
1269
- case "InternalServerException":
1270
- case "com.amazonaws.pinpointsmsvoicev2#InternalServerException":
1271
- throw await de_InternalServerExceptionRes(parsedOutput, context);
1272
- case "ResourceNotFoundException":
1273
- case "com.amazonaws.pinpointsmsvoicev2#ResourceNotFoundException":
1274
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
1275
- case "ServiceQuotaExceededException":
1276
- case "com.amazonaws.pinpointsmsvoicev2#ServiceQuotaExceededException":
1277
- throw await de_ServiceQuotaExceededExceptionRes(parsedOutput, context);
1278
- case "ThrottlingException":
1279
- case "com.amazonaws.pinpointsmsvoicev2#ThrottlingException":
1280
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
1281
- case "ValidationException":
1282
- case "com.amazonaws.pinpointsmsvoicev2#ValidationException":
1283
- throw await de_ValidationExceptionRes(parsedOutput, context);
1284
- default:
1285
- const parsedBody = parsedOutput.body;
1286
- return throwDefaultError({
1287
- output,
1288
- parsedBody,
1289
- errorCode
1290
- });
1291
- }
1292
- }, "de_AssociateOriginationIdentityCommandError");
1293
1256
  var de_CreateConfigurationSetCommand = /* @__PURE__ */ __name(async (output, context) => {
1294
1257
  if (output.statusCode >= 300) {
1295
- return de_CreateConfigurationSetCommandError(output, context);
1258
+ return de_CommandError(output, context);
1296
1259
  }
1297
1260
  const data = await parseBody(output.body, context);
1298
1261
  let contents = {};
@@ -1303,43 +1266,9 @@ var de_CreateConfigurationSetCommand = /* @__PURE__ */ __name(async (output, con
1303
1266
  };
1304
1267
  return response;
1305
1268
  }, "de_CreateConfigurationSetCommand");
1306
- var de_CreateConfigurationSetCommandError = /* @__PURE__ */ __name(async (output, context) => {
1307
- const parsedOutput = {
1308
- ...output,
1309
- body: await parseErrorBody(output.body, context)
1310
- };
1311
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1312
- switch (errorCode) {
1313
- case "AccessDeniedException":
1314
- case "com.amazonaws.pinpointsmsvoicev2#AccessDeniedException":
1315
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
1316
- case "ConflictException":
1317
- case "com.amazonaws.pinpointsmsvoicev2#ConflictException":
1318
- throw await de_ConflictExceptionRes(parsedOutput, context);
1319
- case "InternalServerException":
1320
- case "com.amazonaws.pinpointsmsvoicev2#InternalServerException":
1321
- throw await de_InternalServerExceptionRes(parsedOutput, context);
1322
- case "ServiceQuotaExceededException":
1323
- case "com.amazonaws.pinpointsmsvoicev2#ServiceQuotaExceededException":
1324
- throw await de_ServiceQuotaExceededExceptionRes(parsedOutput, context);
1325
- case "ThrottlingException":
1326
- case "com.amazonaws.pinpointsmsvoicev2#ThrottlingException":
1327
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
1328
- case "ValidationException":
1329
- case "com.amazonaws.pinpointsmsvoicev2#ValidationException":
1330
- throw await de_ValidationExceptionRes(parsedOutput, context);
1331
- default:
1332
- const parsedBody = parsedOutput.body;
1333
- return throwDefaultError({
1334
- output,
1335
- parsedBody,
1336
- errorCode
1337
- });
1338
- }
1339
- }, "de_CreateConfigurationSetCommandError");
1340
1269
  var de_CreateEventDestinationCommand = /* @__PURE__ */ __name(async (output, context) => {
1341
1270
  if (output.statusCode >= 300) {
1342
- return de_CreateEventDestinationCommandError(output, context);
1271
+ return de_CommandError(output, context);
1343
1272
  }
1344
1273
  const data = await parseBody(output.body, context);
1345
1274
  let contents = {};
@@ -1350,46 +1279,9 @@ var de_CreateEventDestinationCommand = /* @__PURE__ */ __name(async (output, con
1350
1279
  };
1351
1280
  return response;
1352
1281
  }, "de_CreateEventDestinationCommand");
1353
- var de_CreateEventDestinationCommandError = /* @__PURE__ */ __name(async (output, context) => {
1354
- const parsedOutput = {
1355
- ...output,
1356
- body: await parseErrorBody(output.body, context)
1357
- };
1358
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1359
- switch (errorCode) {
1360
- case "AccessDeniedException":
1361
- case "com.amazonaws.pinpointsmsvoicev2#AccessDeniedException":
1362
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
1363
- case "ConflictException":
1364
- case "com.amazonaws.pinpointsmsvoicev2#ConflictException":
1365
- throw await de_ConflictExceptionRes(parsedOutput, context);
1366
- case "InternalServerException":
1367
- case "com.amazonaws.pinpointsmsvoicev2#InternalServerException":
1368
- throw await de_InternalServerExceptionRes(parsedOutput, context);
1369
- case "ResourceNotFoundException":
1370
- case "com.amazonaws.pinpointsmsvoicev2#ResourceNotFoundException":
1371
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
1372
- case "ServiceQuotaExceededException":
1373
- case "com.amazonaws.pinpointsmsvoicev2#ServiceQuotaExceededException":
1374
- throw await de_ServiceQuotaExceededExceptionRes(parsedOutput, context);
1375
- case "ThrottlingException":
1376
- case "com.amazonaws.pinpointsmsvoicev2#ThrottlingException":
1377
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
1378
- case "ValidationException":
1379
- case "com.amazonaws.pinpointsmsvoicev2#ValidationException":
1380
- throw await de_ValidationExceptionRes(parsedOutput, context);
1381
- default:
1382
- const parsedBody = parsedOutput.body;
1383
- return throwDefaultError({
1384
- output,
1385
- parsedBody,
1386
- errorCode
1387
- });
1388
- }
1389
- }, "de_CreateEventDestinationCommandError");
1390
1282
  var de_CreateOptOutListCommand = /* @__PURE__ */ __name(async (output, context) => {
1391
1283
  if (output.statusCode >= 300) {
1392
- return de_CreateOptOutListCommandError(output, context);
1284
+ return de_CommandError(output, context);
1393
1285
  }
1394
1286
  const data = await parseBody(output.body, context);
1395
1287
  let contents = {};
@@ -1400,43 +1292,9 @@ var de_CreateOptOutListCommand = /* @__PURE__ */ __name(async (output, context)
1400
1292
  };
1401
1293
  return response;
1402
1294
  }, "de_CreateOptOutListCommand");
1403
- var de_CreateOptOutListCommandError = /* @__PURE__ */ __name(async (output, context) => {
1404
- const parsedOutput = {
1405
- ...output,
1406
- body: await parseErrorBody(output.body, context)
1407
- };
1408
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1409
- switch (errorCode) {
1410
- case "AccessDeniedException":
1411
- case "com.amazonaws.pinpointsmsvoicev2#AccessDeniedException":
1412
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
1413
- case "ConflictException":
1414
- case "com.amazonaws.pinpointsmsvoicev2#ConflictException":
1415
- throw await de_ConflictExceptionRes(parsedOutput, context);
1416
- case "InternalServerException":
1417
- case "com.amazonaws.pinpointsmsvoicev2#InternalServerException":
1418
- throw await de_InternalServerExceptionRes(parsedOutput, context);
1419
- case "ServiceQuotaExceededException":
1420
- case "com.amazonaws.pinpointsmsvoicev2#ServiceQuotaExceededException":
1421
- throw await de_ServiceQuotaExceededExceptionRes(parsedOutput, context);
1422
- case "ThrottlingException":
1423
- case "com.amazonaws.pinpointsmsvoicev2#ThrottlingException":
1424
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
1425
- case "ValidationException":
1426
- case "com.amazonaws.pinpointsmsvoicev2#ValidationException":
1427
- throw await de_ValidationExceptionRes(parsedOutput, context);
1428
- default:
1429
- const parsedBody = parsedOutput.body;
1430
- return throwDefaultError({
1431
- output,
1432
- parsedBody,
1433
- errorCode
1434
- });
1435
- }
1436
- }, "de_CreateOptOutListCommandError");
1437
1295
  var de_CreatePoolCommand = /* @__PURE__ */ __name(async (output, context) => {
1438
1296
  if (output.statusCode >= 300) {
1439
- return de_CreatePoolCommandError(output, context);
1297
+ return de_CommandError(output, context);
1440
1298
  }
1441
1299
  const data = await parseBody(output.body, context);
1442
1300
  let contents = {};
@@ -1447,46 +1305,9 @@ var de_CreatePoolCommand = /* @__PURE__ */ __name(async (output, context) => {
1447
1305
  };
1448
1306
  return response;
1449
1307
  }, "de_CreatePoolCommand");
1450
- var de_CreatePoolCommandError = /* @__PURE__ */ __name(async (output, context) => {
1451
- const parsedOutput = {
1452
- ...output,
1453
- body: await parseErrorBody(output.body, context)
1454
- };
1455
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1456
- switch (errorCode) {
1457
- case "AccessDeniedException":
1458
- case "com.amazonaws.pinpointsmsvoicev2#AccessDeniedException":
1459
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
1460
- case "ConflictException":
1461
- case "com.amazonaws.pinpointsmsvoicev2#ConflictException":
1462
- throw await de_ConflictExceptionRes(parsedOutput, context);
1463
- case "InternalServerException":
1464
- case "com.amazonaws.pinpointsmsvoicev2#InternalServerException":
1465
- throw await de_InternalServerExceptionRes(parsedOutput, context);
1466
- case "ResourceNotFoundException":
1467
- case "com.amazonaws.pinpointsmsvoicev2#ResourceNotFoundException":
1468
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
1469
- case "ServiceQuotaExceededException":
1470
- case "com.amazonaws.pinpointsmsvoicev2#ServiceQuotaExceededException":
1471
- throw await de_ServiceQuotaExceededExceptionRes(parsedOutput, context);
1472
- case "ThrottlingException":
1473
- case "com.amazonaws.pinpointsmsvoicev2#ThrottlingException":
1474
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
1475
- case "ValidationException":
1476
- case "com.amazonaws.pinpointsmsvoicev2#ValidationException":
1477
- throw await de_ValidationExceptionRes(parsedOutput, context);
1478
- default:
1479
- const parsedBody = parsedOutput.body;
1480
- return throwDefaultError({
1481
- output,
1482
- parsedBody,
1483
- errorCode
1484
- });
1485
- }
1486
- }, "de_CreatePoolCommandError");
1487
1308
  var de_CreateRegistrationCommand = /* @__PURE__ */ __name(async (output, context) => {
1488
1309
  if (output.statusCode >= 300) {
1489
- return de_CreateRegistrationCommandError(output, context);
1310
+ return de_CommandError(output, context);
1490
1311
  }
1491
1312
  const data = await parseBody(output.body, context);
1492
1313
  let contents = {};
@@ -1497,43 +1318,9 @@ var de_CreateRegistrationCommand = /* @__PURE__ */ __name(async (output, context
1497
1318
  };
1498
1319
  return response;
1499
1320
  }, "de_CreateRegistrationCommand");
1500
- var de_CreateRegistrationCommandError = /* @__PURE__ */ __name(async (output, context) => {
1501
- const parsedOutput = {
1502
- ...output,
1503
- body: await parseErrorBody(output.body, context)
1504
- };
1505
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1506
- switch (errorCode) {
1507
- case "AccessDeniedException":
1508
- case "com.amazonaws.pinpointsmsvoicev2#AccessDeniedException":
1509
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
1510
- case "ConflictException":
1511
- case "com.amazonaws.pinpointsmsvoicev2#ConflictException":
1512
- throw await de_ConflictExceptionRes(parsedOutput, context);
1513
- case "InternalServerException":
1514
- case "com.amazonaws.pinpointsmsvoicev2#InternalServerException":
1515
- throw await de_InternalServerExceptionRes(parsedOutput, context);
1516
- case "ServiceQuotaExceededException":
1517
- case "com.amazonaws.pinpointsmsvoicev2#ServiceQuotaExceededException":
1518
- throw await de_ServiceQuotaExceededExceptionRes(parsedOutput, context);
1519
- case "ThrottlingException":
1520
- case "com.amazonaws.pinpointsmsvoicev2#ThrottlingException":
1521
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
1522
- case "ValidationException":
1523
- case "com.amazonaws.pinpointsmsvoicev2#ValidationException":
1524
- throw await de_ValidationExceptionRes(parsedOutput, context);
1525
- default:
1526
- const parsedBody = parsedOutput.body;
1527
- return throwDefaultError({
1528
- output,
1529
- parsedBody,
1530
- errorCode
1531
- });
1532
- }
1533
- }, "de_CreateRegistrationCommandError");
1534
1321
  var de_CreateRegistrationAssociationCommand = /* @__PURE__ */ __name(async (output, context) => {
1535
1322
  if (output.statusCode >= 300) {
1536
- return de_CreateRegistrationAssociationCommandError(output, context);
1323
+ return de_CommandError(output, context);
1537
1324
  }
1538
1325
  const data = await parseBody(output.body, context);
1539
1326
  let contents = {};
@@ -1544,46 +1331,9 @@ var de_CreateRegistrationAssociationCommand = /* @__PURE__ */ __name(async (outp
1544
1331
  };
1545
1332
  return response;
1546
1333
  }, "de_CreateRegistrationAssociationCommand");
1547
- var de_CreateRegistrationAssociationCommandError = /* @__PURE__ */ __name(async (output, context) => {
1548
- const parsedOutput = {
1549
- ...output,
1550
- body: await parseErrorBody(output.body, context)
1551
- };
1552
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1553
- switch (errorCode) {
1554
- case "AccessDeniedException":
1555
- case "com.amazonaws.pinpointsmsvoicev2#AccessDeniedException":
1556
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
1557
- case "ConflictException":
1558
- case "com.amazonaws.pinpointsmsvoicev2#ConflictException":
1559
- throw await de_ConflictExceptionRes(parsedOutput, context);
1560
- case "InternalServerException":
1561
- case "com.amazonaws.pinpointsmsvoicev2#InternalServerException":
1562
- throw await de_InternalServerExceptionRes(parsedOutput, context);
1563
- case "ResourceNotFoundException":
1564
- case "com.amazonaws.pinpointsmsvoicev2#ResourceNotFoundException":
1565
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
1566
- case "ServiceQuotaExceededException":
1567
- case "com.amazonaws.pinpointsmsvoicev2#ServiceQuotaExceededException":
1568
- throw await de_ServiceQuotaExceededExceptionRes(parsedOutput, context);
1569
- case "ThrottlingException":
1570
- case "com.amazonaws.pinpointsmsvoicev2#ThrottlingException":
1571
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
1572
- case "ValidationException":
1573
- case "com.amazonaws.pinpointsmsvoicev2#ValidationException":
1574
- throw await de_ValidationExceptionRes(parsedOutput, context);
1575
- default:
1576
- const parsedBody = parsedOutput.body;
1577
- return throwDefaultError({
1578
- output,
1579
- parsedBody,
1580
- errorCode
1581
- });
1582
- }
1583
- }, "de_CreateRegistrationAssociationCommandError");
1584
1334
  var de_CreateRegistrationAttachmentCommand = /* @__PURE__ */ __name(async (output, context) => {
1585
1335
  if (output.statusCode >= 300) {
1586
- return de_CreateRegistrationAttachmentCommandError(output, context);
1336
+ return de_CommandError(output, context);
1587
1337
  }
1588
1338
  const data = await parseBody(output.body, context);
1589
1339
  let contents = {};
@@ -1594,93 +1344,22 @@ var de_CreateRegistrationAttachmentCommand = /* @__PURE__ */ __name(async (outpu
1594
1344
  };
1595
1345
  return response;
1596
1346
  }, "de_CreateRegistrationAttachmentCommand");
1597
- var de_CreateRegistrationAttachmentCommandError = /* @__PURE__ */ __name(async (output, context) => {
1598
- const parsedOutput = {
1599
- ...output,
1600
- body: await parseErrorBody(output.body, context)
1601
- };
1602
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1603
- switch (errorCode) {
1604
- case "AccessDeniedException":
1605
- case "com.amazonaws.pinpointsmsvoicev2#AccessDeniedException":
1606
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
1607
- case "ConflictException":
1608
- case "com.amazonaws.pinpointsmsvoicev2#ConflictException":
1609
- throw await de_ConflictExceptionRes(parsedOutput, context);
1610
- case "InternalServerException":
1611
- case "com.amazonaws.pinpointsmsvoicev2#InternalServerException":
1612
- throw await de_InternalServerExceptionRes(parsedOutput, context);
1613
- case "ServiceQuotaExceededException":
1614
- case "com.amazonaws.pinpointsmsvoicev2#ServiceQuotaExceededException":
1615
- throw await de_ServiceQuotaExceededExceptionRes(parsedOutput, context);
1616
- case "ThrottlingException":
1617
- case "com.amazonaws.pinpointsmsvoicev2#ThrottlingException":
1618
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
1619
- case "ValidationException":
1620
- case "com.amazonaws.pinpointsmsvoicev2#ValidationException":
1621
- throw await de_ValidationExceptionRes(parsedOutput, context);
1622
- default:
1623
- const parsedBody = parsedOutput.body;
1624
- return throwDefaultError({
1625
- output,
1626
- parsedBody,
1627
- errorCode
1628
- });
1629
- }
1630
- }, "de_CreateRegistrationAttachmentCommandError");
1631
- var de_CreateRegistrationVersionCommand = /* @__PURE__ */ __name(async (output, context) => {
1632
- if (output.statusCode >= 300) {
1633
- return de_CreateRegistrationVersionCommandError(output, context);
1634
- }
1635
- const data = await parseBody(output.body, context);
1636
- let contents = {};
1637
- contents = de_CreateRegistrationVersionResult(data, context);
1638
- const response = {
1639
- $metadata: deserializeMetadata(output),
1640
- ...contents
1347
+ var de_CreateRegistrationVersionCommand = /* @__PURE__ */ __name(async (output, context) => {
1348
+ if (output.statusCode >= 300) {
1349
+ return de_CommandError(output, context);
1350
+ }
1351
+ const data = await parseBody(output.body, context);
1352
+ let contents = {};
1353
+ contents = de_CreateRegistrationVersionResult(data, context);
1354
+ const response = {
1355
+ $metadata: deserializeMetadata(output),
1356
+ ...contents
1641
1357
  };
1642
1358
  return response;
1643
1359
  }, "de_CreateRegistrationVersionCommand");
1644
- var de_CreateRegistrationVersionCommandError = /* @__PURE__ */ __name(async (output, context) => {
1645
- const parsedOutput = {
1646
- ...output,
1647
- body: await parseErrorBody(output.body, context)
1648
- };
1649
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1650
- switch (errorCode) {
1651
- case "AccessDeniedException":
1652
- case "com.amazonaws.pinpointsmsvoicev2#AccessDeniedException":
1653
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
1654
- case "ConflictException":
1655
- case "com.amazonaws.pinpointsmsvoicev2#ConflictException":
1656
- throw await de_ConflictExceptionRes(parsedOutput, context);
1657
- case "InternalServerException":
1658
- case "com.amazonaws.pinpointsmsvoicev2#InternalServerException":
1659
- throw await de_InternalServerExceptionRes(parsedOutput, context);
1660
- case "ResourceNotFoundException":
1661
- case "com.amazonaws.pinpointsmsvoicev2#ResourceNotFoundException":
1662
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
1663
- case "ServiceQuotaExceededException":
1664
- case "com.amazonaws.pinpointsmsvoicev2#ServiceQuotaExceededException":
1665
- throw await de_ServiceQuotaExceededExceptionRes(parsedOutput, context);
1666
- case "ThrottlingException":
1667
- case "com.amazonaws.pinpointsmsvoicev2#ThrottlingException":
1668
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
1669
- case "ValidationException":
1670
- case "com.amazonaws.pinpointsmsvoicev2#ValidationException":
1671
- throw await de_ValidationExceptionRes(parsedOutput, context);
1672
- default:
1673
- const parsedBody = parsedOutput.body;
1674
- return throwDefaultError({
1675
- output,
1676
- parsedBody,
1677
- errorCode
1678
- });
1679
- }
1680
- }, "de_CreateRegistrationVersionCommandError");
1681
1360
  var de_CreateVerifiedDestinationNumberCommand = /* @__PURE__ */ __name(async (output, context) => {
1682
1361
  if (output.statusCode >= 300) {
1683
- return de_CreateVerifiedDestinationNumberCommandError(output, context);
1362
+ return de_CommandError(output, context);
1684
1363
  }
1685
1364
  const data = await parseBody(output.body, context);
1686
1365
  let contents = {};
@@ -1691,43 +1370,9 @@ var de_CreateVerifiedDestinationNumberCommand = /* @__PURE__ */ __name(async (ou
1691
1370
  };
1692
1371
  return response;
1693
1372
  }, "de_CreateVerifiedDestinationNumberCommand");
1694
- var de_CreateVerifiedDestinationNumberCommandError = /* @__PURE__ */ __name(async (output, context) => {
1695
- const parsedOutput = {
1696
- ...output,
1697
- body: await parseErrorBody(output.body, context)
1698
- };
1699
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1700
- switch (errorCode) {
1701
- case "AccessDeniedException":
1702
- case "com.amazonaws.pinpointsmsvoicev2#AccessDeniedException":
1703
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
1704
- case "ConflictException":
1705
- case "com.amazonaws.pinpointsmsvoicev2#ConflictException":
1706
- throw await de_ConflictExceptionRes(parsedOutput, context);
1707
- case "InternalServerException":
1708
- case "com.amazonaws.pinpointsmsvoicev2#InternalServerException":
1709
- throw await de_InternalServerExceptionRes(parsedOutput, context);
1710
- case "ServiceQuotaExceededException":
1711
- case "com.amazonaws.pinpointsmsvoicev2#ServiceQuotaExceededException":
1712
- throw await de_ServiceQuotaExceededExceptionRes(parsedOutput, context);
1713
- case "ThrottlingException":
1714
- case "com.amazonaws.pinpointsmsvoicev2#ThrottlingException":
1715
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
1716
- case "ValidationException":
1717
- case "com.amazonaws.pinpointsmsvoicev2#ValidationException":
1718
- throw await de_ValidationExceptionRes(parsedOutput, context);
1719
- default:
1720
- const parsedBody = parsedOutput.body;
1721
- return throwDefaultError({
1722
- output,
1723
- parsedBody,
1724
- errorCode
1725
- });
1726
- }
1727
- }, "de_CreateVerifiedDestinationNumberCommandError");
1728
1373
  var de_DeleteConfigurationSetCommand = /* @__PURE__ */ __name(async (output, context) => {
1729
1374
  if (output.statusCode >= 300) {
1730
- return de_DeleteConfigurationSetCommandError(output, context);
1375
+ return de_CommandError(output, context);
1731
1376
  }
1732
1377
  const data = await parseBody(output.body, context);
1733
1378
  let contents = {};
@@ -1738,40 +1383,9 @@ var de_DeleteConfigurationSetCommand = /* @__PURE__ */ __name(async (output, con
1738
1383
  };
1739
1384
  return response;
1740
1385
  }, "de_DeleteConfigurationSetCommand");
1741
- var de_DeleteConfigurationSetCommandError = /* @__PURE__ */ __name(async (output, context) => {
1742
- const parsedOutput = {
1743
- ...output,
1744
- body: await parseErrorBody(output.body, context)
1745
- };
1746
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1747
- switch (errorCode) {
1748
- case "AccessDeniedException":
1749
- case "com.amazonaws.pinpointsmsvoicev2#AccessDeniedException":
1750
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
1751
- case "InternalServerException":
1752
- case "com.amazonaws.pinpointsmsvoicev2#InternalServerException":
1753
- throw await de_InternalServerExceptionRes(parsedOutput, context);
1754
- case "ResourceNotFoundException":
1755
- case "com.amazonaws.pinpointsmsvoicev2#ResourceNotFoundException":
1756
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
1757
- case "ThrottlingException":
1758
- case "com.amazonaws.pinpointsmsvoicev2#ThrottlingException":
1759
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
1760
- case "ValidationException":
1761
- case "com.amazonaws.pinpointsmsvoicev2#ValidationException":
1762
- throw await de_ValidationExceptionRes(parsedOutput, context);
1763
- default:
1764
- const parsedBody = parsedOutput.body;
1765
- return throwDefaultError({
1766
- output,
1767
- parsedBody,
1768
- errorCode
1769
- });
1770
- }
1771
- }, "de_DeleteConfigurationSetCommandError");
1772
1386
  var de_DeleteDefaultMessageTypeCommand = /* @__PURE__ */ __name(async (output, context) => {
1773
1387
  if (output.statusCode >= 300) {
1774
- return de_DeleteDefaultMessageTypeCommandError(output, context);
1388
+ return de_CommandError(output, context);
1775
1389
  }
1776
1390
  const data = await parseBody(output.body, context);
1777
1391
  let contents = {};
@@ -1782,40 +1396,9 @@ var de_DeleteDefaultMessageTypeCommand = /* @__PURE__ */ __name(async (output, c
1782
1396
  };
1783
1397
  return response;
1784
1398
  }, "de_DeleteDefaultMessageTypeCommand");
1785
- var de_DeleteDefaultMessageTypeCommandError = /* @__PURE__ */ __name(async (output, context) => {
1786
- const parsedOutput = {
1787
- ...output,
1788
- body: await parseErrorBody(output.body, context)
1789
- };
1790
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1791
- switch (errorCode) {
1792
- case "AccessDeniedException":
1793
- case "com.amazonaws.pinpointsmsvoicev2#AccessDeniedException":
1794
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
1795
- case "InternalServerException":
1796
- case "com.amazonaws.pinpointsmsvoicev2#InternalServerException":
1797
- throw await de_InternalServerExceptionRes(parsedOutput, context);
1798
- case "ResourceNotFoundException":
1799
- case "com.amazonaws.pinpointsmsvoicev2#ResourceNotFoundException":
1800
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
1801
- case "ThrottlingException":
1802
- case "com.amazonaws.pinpointsmsvoicev2#ThrottlingException":
1803
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
1804
- case "ValidationException":
1805
- case "com.amazonaws.pinpointsmsvoicev2#ValidationException":
1806
- throw await de_ValidationExceptionRes(parsedOutput, context);
1807
- default:
1808
- const parsedBody = parsedOutput.body;
1809
- return throwDefaultError({
1810
- output,
1811
- parsedBody,
1812
- errorCode
1813
- });
1814
- }
1815
- }, "de_DeleteDefaultMessageTypeCommandError");
1816
1399
  var de_DeleteDefaultSenderIdCommand = /* @__PURE__ */ __name(async (output, context) => {
1817
1400
  if (output.statusCode >= 300) {
1818
- return de_DeleteDefaultSenderIdCommandError(output, context);
1401
+ return de_CommandError(output, context);
1819
1402
  }
1820
1403
  const data = await parseBody(output.body, context);
1821
1404
  let contents = {};
@@ -1826,40 +1409,9 @@ var de_DeleteDefaultSenderIdCommand = /* @__PURE__ */ __name(async (output, cont
1826
1409
  };
1827
1410
  return response;
1828
1411
  }, "de_DeleteDefaultSenderIdCommand");
1829
- var de_DeleteDefaultSenderIdCommandError = /* @__PURE__ */ __name(async (output, context) => {
1830
- const parsedOutput = {
1831
- ...output,
1832
- body: await parseErrorBody(output.body, context)
1833
- };
1834
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1835
- switch (errorCode) {
1836
- case "AccessDeniedException":
1837
- case "com.amazonaws.pinpointsmsvoicev2#AccessDeniedException":
1838
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
1839
- case "InternalServerException":
1840
- case "com.amazonaws.pinpointsmsvoicev2#InternalServerException":
1841
- throw await de_InternalServerExceptionRes(parsedOutput, context);
1842
- case "ResourceNotFoundException":
1843
- case "com.amazonaws.pinpointsmsvoicev2#ResourceNotFoundException":
1844
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
1845
- case "ThrottlingException":
1846
- case "com.amazonaws.pinpointsmsvoicev2#ThrottlingException":
1847
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
1848
- case "ValidationException":
1849
- case "com.amazonaws.pinpointsmsvoicev2#ValidationException":
1850
- throw await de_ValidationExceptionRes(parsedOutput, context);
1851
- default:
1852
- const parsedBody = parsedOutput.body;
1853
- return throwDefaultError({
1854
- output,
1855
- parsedBody,
1856
- errorCode
1857
- });
1858
- }
1859
- }, "de_DeleteDefaultSenderIdCommandError");
1860
1412
  var de_DeleteEventDestinationCommand = /* @__PURE__ */ __name(async (output, context) => {
1861
1413
  if (output.statusCode >= 300) {
1862
- return de_DeleteEventDestinationCommandError(output, context);
1414
+ return de_CommandError(output, context);
1863
1415
  }
1864
1416
  const data = await parseBody(output.body, context);
1865
1417
  let contents = {};
@@ -1870,40 +1422,9 @@ var de_DeleteEventDestinationCommand = /* @__PURE__ */ __name(async (output, con
1870
1422
  };
1871
1423
  return response;
1872
1424
  }, "de_DeleteEventDestinationCommand");
1873
- var de_DeleteEventDestinationCommandError = /* @__PURE__ */ __name(async (output, context) => {
1874
- const parsedOutput = {
1875
- ...output,
1876
- body: await parseErrorBody(output.body, context)
1877
- };
1878
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1879
- switch (errorCode) {
1880
- case "AccessDeniedException":
1881
- case "com.amazonaws.pinpointsmsvoicev2#AccessDeniedException":
1882
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
1883
- case "InternalServerException":
1884
- case "com.amazonaws.pinpointsmsvoicev2#InternalServerException":
1885
- throw await de_InternalServerExceptionRes(parsedOutput, context);
1886
- case "ResourceNotFoundException":
1887
- case "com.amazonaws.pinpointsmsvoicev2#ResourceNotFoundException":
1888
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
1889
- case "ThrottlingException":
1890
- case "com.amazonaws.pinpointsmsvoicev2#ThrottlingException":
1891
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
1892
- case "ValidationException":
1893
- case "com.amazonaws.pinpointsmsvoicev2#ValidationException":
1894
- throw await de_ValidationExceptionRes(parsedOutput, context);
1895
- default:
1896
- const parsedBody = parsedOutput.body;
1897
- return throwDefaultError({
1898
- output,
1899
- parsedBody,
1900
- errorCode
1901
- });
1902
- }
1903
- }, "de_DeleteEventDestinationCommandError");
1904
1425
  var de_DeleteKeywordCommand = /* @__PURE__ */ __name(async (output, context) => {
1905
1426
  if (output.statusCode >= 300) {
1906
- return de_DeleteKeywordCommandError(output, context);
1427
+ return de_CommandError(output, context);
1907
1428
  }
1908
1429
  const data = await parseBody(output.body, context);
1909
1430
  let contents = {};
@@ -1914,43 +1435,9 @@ var de_DeleteKeywordCommand = /* @__PURE__ */ __name(async (output, context) =>
1914
1435
  };
1915
1436
  return response;
1916
1437
  }, "de_DeleteKeywordCommand");
1917
- var de_DeleteKeywordCommandError = /* @__PURE__ */ __name(async (output, context) => {
1918
- const parsedOutput = {
1919
- ...output,
1920
- body: await parseErrorBody(output.body, context)
1921
- };
1922
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1923
- switch (errorCode) {
1924
- case "AccessDeniedException":
1925
- case "com.amazonaws.pinpointsmsvoicev2#AccessDeniedException":
1926
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
1927
- case "ConflictException":
1928
- case "com.amazonaws.pinpointsmsvoicev2#ConflictException":
1929
- throw await de_ConflictExceptionRes(parsedOutput, context);
1930
- case "InternalServerException":
1931
- case "com.amazonaws.pinpointsmsvoicev2#InternalServerException":
1932
- throw await de_InternalServerExceptionRes(parsedOutput, context);
1933
- case "ResourceNotFoundException":
1934
- case "com.amazonaws.pinpointsmsvoicev2#ResourceNotFoundException":
1935
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
1936
- case "ThrottlingException":
1937
- case "com.amazonaws.pinpointsmsvoicev2#ThrottlingException":
1938
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
1939
- case "ValidationException":
1940
- case "com.amazonaws.pinpointsmsvoicev2#ValidationException":
1941
- throw await de_ValidationExceptionRes(parsedOutput, context);
1942
- default:
1943
- const parsedBody = parsedOutput.body;
1944
- return throwDefaultError({
1945
- output,
1946
- parsedBody,
1947
- errorCode
1948
- });
1949
- }
1950
- }, "de_DeleteKeywordCommandError");
1951
1438
  var de_DeleteOptedOutNumberCommand = /* @__PURE__ */ __name(async (output, context) => {
1952
1439
  if (output.statusCode >= 300) {
1953
- return de_DeleteOptedOutNumberCommandError(output, context);
1440
+ return de_CommandError(output, context);
1954
1441
  }
1955
1442
  const data = await parseBody(output.body, context);
1956
1443
  let contents = {};
@@ -1961,43 +1448,9 @@ var de_DeleteOptedOutNumberCommand = /* @__PURE__ */ __name(async (output, conte
1961
1448
  };
1962
1449
  return response;
1963
1450
  }, "de_DeleteOptedOutNumberCommand");
1964
- var de_DeleteOptedOutNumberCommandError = /* @__PURE__ */ __name(async (output, context) => {
1965
- const parsedOutput = {
1966
- ...output,
1967
- body: await parseErrorBody(output.body, context)
1968
- };
1969
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1970
- switch (errorCode) {
1971
- case "AccessDeniedException":
1972
- case "com.amazonaws.pinpointsmsvoicev2#AccessDeniedException":
1973
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
1974
- case "ConflictException":
1975
- case "com.amazonaws.pinpointsmsvoicev2#ConflictException":
1976
- throw await de_ConflictExceptionRes(parsedOutput, context);
1977
- case "InternalServerException":
1978
- case "com.amazonaws.pinpointsmsvoicev2#InternalServerException":
1979
- throw await de_InternalServerExceptionRes(parsedOutput, context);
1980
- case "ResourceNotFoundException":
1981
- case "com.amazonaws.pinpointsmsvoicev2#ResourceNotFoundException":
1982
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
1983
- case "ThrottlingException":
1984
- case "com.amazonaws.pinpointsmsvoicev2#ThrottlingException":
1985
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
1986
- case "ValidationException":
1987
- case "com.amazonaws.pinpointsmsvoicev2#ValidationException":
1988
- throw await de_ValidationExceptionRes(parsedOutput, context);
1989
- default:
1990
- const parsedBody = parsedOutput.body;
1991
- return throwDefaultError({
1992
- output,
1993
- parsedBody,
1994
- errorCode
1995
- });
1996
- }
1997
- }, "de_DeleteOptedOutNumberCommandError");
1998
1451
  var de_DeleteOptOutListCommand = /* @__PURE__ */ __name(async (output, context) => {
1999
1452
  if (output.statusCode >= 300) {
2000
- return de_DeleteOptOutListCommandError(output, context);
1453
+ return de_CommandError(output, context);
2001
1454
  }
2002
1455
  const data = await parseBody(output.body, context);
2003
1456
  let contents = {};
@@ -2008,43 +1461,9 @@ var de_DeleteOptOutListCommand = /* @__PURE__ */ __name(async (output, context)
2008
1461
  };
2009
1462
  return response;
2010
1463
  }, "de_DeleteOptOutListCommand");
2011
- var de_DeleteOptOutListCommandError = /* @__PURE__ */ __name(async (output, context) => {
2012
- const parsedOutput = {
2013
- ...output,
2014
- body: await parseErrorBody(output.body, context)
2015
- };
2016
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2017
- switch (errorCode) {
2018
- case "AccessDeniedException":
2019
- case "com.amazonaws.pinpointsmsvoicev2#AccessDeniedException":
2020
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
2021
- case "ConflictException":
2022
- case "com.amazonaws.pinpointsmsvoicev2#ConflictException":
2023
- throw await de_ConflictExceptionRes(parsedOutput, context);
2024
- case "InternalServerException":
2025
- case "com.amazonaws.pinpointsmsvoicev2#InternalServerException":
2026
- throw await de_InternalServerExceptionRes(parsedOutput, context);
2027
- case "ResourceNotFoundException":
2028
- case "com.amazonaws.pinpointsmsvoicev2#ResourceNotFoundException":
2029
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
2030
- case "ThrottlingException":
2031
- case "com.amazonaws.pinpointsmsvoicev2#ThrottlingException":
2032
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
2033
- case "ValidationException":
2034
- case "com.amazonaws.pinpointsmsvoicev2#ValidationException":
2035
- throw await de_ValidationExceptionRes(parsedOutput, context);
2036
- default:
2037
- const parsedBody = parsedOutput.body;
2038
- return throwDefaultError({
2039
- output,
2040
- parsedBody,
2041
- errorCode
2042
- });
2043
- }
2044
- }, "de_DeleteOptOutListCommandError");
2045
1464
  var de_DeletePoolCommand = /* @__PURE__ */ __name(async (output, context) => {
2046
1465
  if (output.statusCode >= 300) {
2047
- return de_DeletePoolCommandError(output, context);
1466
+ return de_CommandError(output, context);
2048
1467
  }
2049
1468
  const data = await parseBody(output.body, context);
2050
1469
  let contents = {};
@@ -2055,43 +1474,9 @@ var de_DeletePoolCommand = /* @__PURE__ */ __name(async (output, context) => {
2055
1474
  };
2056
1475
  return response;
2057
1476
  }, "de_DeletePoolCommand");
2058
- var de_DeletePoolCommandError = /* @__PURE__ */ __name(async (output, context) => {
2059
- const parsedOutput = {
2060
- ...output,
2061
- body: await parseErrorBody(output.body, context)
2062
- };
2063
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2064
- switch (errorCode) {
2065
- case "AccessDeniedException":
2066
- case "com.amazonaws.pinpointsmsvoicev2#AccessDeniedException":
2067
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
2068
- case "ConflictException":
2069
- case "com.amazonaws.pinpointsmsvoicev2#ConflictException":
2070
- throw await de_ConflictExceptionRes(parsedOutput, context);
2071
- case "InternalServerException":
2072
- case "com.amazonaws.pinpointsmsvoicev2#InternalServerException":
2073
- throw await de_InternalServerExceptionRes(parsedOutput, context);
2074
- case "ResourceNotFoundException":
2075
- case "com.amazonaws.pinpointsmsvoicev2#ResourceNotFoundException":
2076
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
2077
- case "ThrottlingException":
2078
- case "com.amazonaws.pinpointsmsvoicev2#ThrottlingException":
2079
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
2080
- case "ValidationException":
2081
- case "com.amazonaws.pinpointsmsvoicev2#ValidationException":
2082
- throw await de_ValidationExceptionRes(parsedOutput, context);
2083
- default:
2084
- const parsedBody = parsedOutput.body;
2085
- return throwDefaultError({
2086
- output,
2087
- parsedBody,
2088
- errorCode
2089
- });
2090
- }
2091
- }, "de_DeletePoolCommandError");
2092
1477
  var de_DeleteRegistrationCommand = /* @__PURE__ */ __name(async (output, context) => {
2093
1478
  if (output.statusCode >= 300) {
2094
- return de_DeleteRegistrationCommandError(output, context);
1479
+ return de_CommandError(output, context);
2095
1480
  }
2096
1481
  const data = await parseBody(output.body, context);
2097
1482
  let contents = {};
@@ -2102,43 +1487,9 @@ var de_DeleteRegistrationCommand = /* @__PURE__ */ __name(async (output, context
2102
1487
  };
2103
1488
  return response;
2104
1489
  }, "de_DeleteRegistrationCommand");
2105
- var de_DeleteRegistrationCommandError = /* @__PURE__ */ __name(async (output, context) => {
2106
- const parsedOutput = {
2107
- ...output,
2108
- body: await parseErrorBody(output.body, context)
2109
- };
2110
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2111
- switch (errorCode) {
2112
- case "AccessDeniedException":
2113
- case "com.amazonaws.pinpointsmsvoicev2#AccessDeniedException":
2114
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
2115
- case "ConflictException":
2116
- case "com.amazonaws.pinpointsmsvoicev2#ConflictException":
2117
- throw await de_ConflictExceptionRes(parsedOutput, context);
2118
- case "InternalServerException":
2119
- case "com.amazonaws.pinpointsmsvoicev2#InternalServerException":
2120
- throw await de_InternalServerExceptionRes(parsedOutput, context);
2121
- case "ResourceNotFoundException":
2122
- case "com.amazonaws.pinpointsmsvoicev2#ResourceNotFoundException":
2123
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
2124
- case "ThrottlingException":
2125
- case "com.amazonaws.pinpointsmsvoicev2#ThrottlingException":
2126
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
2127
- case "ValidationException":
2128
- case "com.amazonaws.pinpointsmsvoicev2#ValidationException":
2129
- throw await de_ValidationExceptionRes(parsedOutput, context);
2130
- default:
2131
- const parsedBody = parsedOutput.body;
2132
- return throwDefaultError({
2133
- output,
2134
- parsedBody,
2135
- errorCode
2136
- });
2137
- }
2138
- }, "de_DeleteRegistrationCommandError");
2139
1490
  var de_DeleteRegistrationAttachmentCommand = /* @__PURE__ */ __name(async (output, context) => {
2140
1491
  if (output.statusCode >= 300) {
2141
- return de_DeleteRegistrationAttachmentCommandError(output, context);
1492
+ return de_CommandError(output, context);
2142
1493
  }
2143
1494
  const data = await parseBody(output.body, context);
2144
1495
  let contents = {};
@@ -2149,43 +1500,9 @@ var de_DeleteRegistrationAttachmentCommand = /* @__PURE__ */ __name(async (outpu
2149
1500
  };
2150
1501
  return response;
2151
1502
  }, "de_DeleteRegistrationAttachmentCommand");
2152
- var de_DeleteRegistrationAttachmentCommandError = /* @__PURE__ */ __name(async (output, context) => {
2153
- const parsedOutput = {
2154
- ...output,
2155
- body: await parseErrorBody(output.body, context)
2156
- };
2157
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2158
- switch (errorCode) {
2159
- case "AccessDeniedException":
2160
- case "com.amazonaws.pinpointsmsvoicev2#AccessDeniedException":
2161
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
2162
- case "ConflictException":
2163
- case "com.amazonaws.pinpointsmsvoicev2#ConflictException":
2164
- throw await de_ConflictExceptionRes(parsedOutput, context);
2165
- case "InternalServerException":
2166
- case "com.amazonaws.pinpointsmsvoicev2#InternalServerException":
2167
- throw await de_InternalServerExceptionRes(parsedOutput, context);
2168
- case "ResourceNotFoundException":
2169
- case "com.amazonaws.pinpointsmsvoicev2#ResourceNotFoundException":
2170
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
2171
- case "ThrottlingException":
2172
- case "com.amazonaws.pinpointsmsvoicev2#ThrottlingException":
2173
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
2174
- case "ValidationException":
2175
- case "com.amazonaws.pinpointsmsvoicev2#ValidationException":
2176
- throw await de_ValidationExceptionRes(parsedOutput, context);
2177
- default:
2178
- const parsedBody = parsedOutput.body;
2179
- return throwDefaultError({
2180
- output,
2181
- parsedBody,
2182
- errorCode
2183
- });
2184
- }
2185
- }, "de_DeleteRegistrationAttachmentCommandError");
2186
1503
  var de_DeleteRegistrationFieldValueCommand = /* @__PURE__ */ __name(async (output, context) => {
2187
1504
  if (output.statusCode >= 300) {
2188
- return de_DeleteRegistrationFieldValueCommandError(output, context);
1505
+ return de_CommandError(output, context);
2189
1506
  }
2190
1507
  const data = await parseBody(output.body, context);
2191
1508
  let contents = {};
@@ -2196,43 +1513,9 @@ var de_DeleteRegistrationFieldValueCommand = /* @__PURE__ */ __name(async (outpu
2196
1513
  };
2197
1514
  return response;
2198
1515
  }, "de_DeleteRegistrationFieldValueCommand");
2199
- var de_DeleteRegistrationFieldValueCommandError = /* @__PURE__ */ __name(async (output, context) => {
2200
- const parsedOutput = {
2201
- ...output,
2202
- body: await parseErrorBody(output.body, context)
2203
- };
2204
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2205
- switch (errorCode) {
2206
- case "AccessDeniedException":
2207
- case "com.amazonaws.pinpointsmsvoicev2#AccessDeniedException":
2208
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
2209
- case "ConflictException":
2210
- case "com.amazonaws.pinpointsmsvoicev2#ConflictException":
2211
- throw await de_ConflictExceptionRes(parsedOutput, context);
2212
- case "InternalServerException":
2213
- case "com.amazonaws.pinpointsmsvoicev2#InternalServerException":
2214
- throw await de_InternalServerExceptionRes(parsedOutput, context);
2215
- case "ResourceNotFoundException":
2216
- case "com.amazonaws.pinpointsmsvoicev2#ResourceNotFoundException":
2217
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
2218
- case "ThrottlingException":
2219
- case "com.amazonaws.pinpointsmsvoicev2#ThrottlingException":
2220
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
2221
- case "ValidationException":
2222
- case "com.amazonaws.pinpointsmsvoicev2#ValidationException":
2223
- throw await de_ValidationExceptionRes(parsedOutput, context);
2224
- default:
2225
- const parsedBody = parsedOutput.body;
2226
- return throwDefaultError({
2227
- output,
2228
- parsedBody,
2229
- errorCode
2230
- });
2231
- }
2232
- }, "de_DeleteRegistrationFieldValueCommandError");
2233
1516
  var de_DeleteTextMessageSpendLimitOverrideCommand = /* @__PURE__ */ __name(async (output, context) => {
2234
1517
  if (output.statusCode >= 300) {
2235
- return de_DeleteTextMessageSpendLimitOverrideCommandError(output, context);
1518
+ return de_CommandError(output, context);
2236
1519
  }
2237
1520
  const data = await parseBody(output.body, context);
2238
1521
  let contents = {};
@@ -2243,37 +1526,9 @@ var de_DeleteTextMessageSpendLimitOverrideCommand = /* @__PURE__ */ __name(async
2243
1526
  };
2244
1527
  return response;
2245
1528
  }, "de_DeleteTextMessageSpendLimitOverrideCommand");
2246
- var de_DeleteTextMessageSpendLimitOverrideCommandError = /* @__PURE__ */ __name(async (output, context) => {
2247
- const parsedOutput = {
2248
- ...output,
2249
- body: await parseErrorBody(output.body, context)
2250
- };
2251
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2252
- switch (errorCode) {
2253
- case "AccessDeniedException":
2254
- case "com.amazonaws.pinpointsmsvoicev2#AccessDeniedException":
2255
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
2256
- case "InternalServerException":
2257
- case "com.amazonaws.pinpointsmsvoicev2#InternalServerException":
2258
- throw await de_InternalServerExceptionRes(parsedOutput, context);
2259
- case "ThrottlingException":
2260
- case "com.amazonaws.pinpointsmsvoicev2#ThrottlingException":
2261
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
2262
- case "ValidationException":
2263
- case "com.amazonaws.pinpointsmsvoicev2#ValidationException":
2264
- throw await de_ValidationExceptionRes(parsedOutput, context);
2265
- default:
2266
- const parsedBody = parsedOutput.body;
2267
- return throwDefaultError({
2268
- output,
2269
- parsedBody,
2270
- errorCode
2271
- });
2272
- }
2273
- }, "de_DeleteTextMessageSpendLimitOverrideCommandError");
2274
1529
  var de_DeleteVerifiedDestinationNumberCommand = /* @__PURE__ */ __name(async (output, context) => {
2275
1530
  if (output.statusCode >= 300) {
2276
- return de_DeleteVerifiedDestinationNumberCommandError(output, context);
1531
+ return de_CommandError(output, context);
2277
1532
  }
2278
1533
  const data = await parseBody(output.body, context);
2279
1534
  let contents = {};
@@ -2284,43 +1539,9 @@ var de_DeleteVerifiedDestinationNumberCommand = /* @__PURE__ */ __name(async (ou
2284
1539
  };
2285
1540
  return response;
2286
1541
  }, "de_DeleteVerifiedDestinationNumberCommand");
2287
- var de_DeleteVerifiedDestinationNumberCommandError = /* @__PURE__ */ __name(async (output, context) => {
2288
- const parsedOutput = {
2289
- ...output,
2290
- body: await parseErrorBody(output.body, context)
2291
- };
2292
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2293
- switch (errorCode) {
2294
- case "AccessDeniedException":
2295
- case "com.amazonaws.pinpointsmsvoicev2#AccessDeniedException":
2296
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
2297
- case "ConflictException":
2298
- case "com.amazonaws.pinpointsmsvoicev2#ConflictException":
2299
- throw await de_ConflictExceptionRes(parsedOutput, context);
2300
- case "InternalServerException":
2301
- case "com.amazonaws.pinpointsmsvoicev2#InternalServerException":
2302
- throw await de_InternalServerExceptionRes(parsedOutput, context);
2303
- case "ResourceNotFoundException":
2304
- case "com.amazonaws.pinpointsmsvoicev2#ResourceNotFoundException":
2305
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
2306
- case "ThrottlingException":
2307
- case "com.amazonaws.pinpointsmsvoicev2#ThrottlingException":
2308
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
2309
- case "ValidationException":
2310
- case "com.amazonaws.pinpointsmsvoicev2#ValidationException":
2311
- throw await de_ValidationExceptionRes(parsedOutput, context);
2312
- default:
2313
- const parsedBody = parsedOutput.body;
2314
- return throwDefaultError({
2315
- output,
2316
- parsedBody,
2317
- errorCode
2318
- });
2319
- }
2320
- }, "de_DeleteVerifiedDestinationNumberCommandError");
2321
1542
  var de_DeleteVoiceMessageSpendLimitOverrideCommand = /* @__PURE__ */ __name(async (output, context) => {
2322
1543
  if (output.statusCode >= 300) {
2323
- return de_DeleteVoiceMessageSpendLimitOverrideCommandError(output, context);
1544
+ return de_CommandError(output, context);
2324
1545
  }
2325
1546
  const data = await parseBody(output.body, context);
2326
1547
  let contents = {};
@@ -2331,78 +1552,22 @@ var de_DeleteVoiceMessageSpendLimitOverrideCommand = /* @__PURE__ */ __name(asyn
2331
1552
  };
2332
1553
  return response;
2333
1554
  }, "de_DeleteVoiceMessageSpendLimitOverrideCommand");
2334
- var de_DeleteVoiceMessageSpendLimitOverrideCommandError = /* @__PURE__ */ __name(async (output, context) => {
2335
- const parsedOutput = {
2336
- ...output,
2337
- body: await parseErrorBody(output.body, context)
2338
- };
2339
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2340
- switch (errorCode) {
2341
- case "AccessDeniedException":
2342
- case "com.amazonaws.pinpointsmsvoicev2#AccessDeniedException":
2343
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
2344
- case "InternalServerException":
2345
- case "com.amazonaws.pinpointsmsvoicev2#InternalServerException":
2346
- throw await de_InternalServerExceptionRes(parsedOutput, context);
2347
- case "ThrottlingException":
2348
- case "com.amazonaws.pinpointsmsvoicev2#ThrottlingException":
2349
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
2350
- case "ValidationException":
2351
- case "com.amazonaws.pinpointsmsvoicev2#ValidationException":
2352
- throw await de_ValidationExceptionRes(parsedOutput, context);
2353
- default:
2354
- const parsedBody = parsedOutput.body;
2355
- return throwDefaultError({
2356
- output,
2357
- parsedBody,
2358
- errorCode
2359
- });
2360
- }
2361
- }, "de_DeleteVoiceMessageSpendLimitOverrideCommandError");
2362
- var de_DescribeAccountAttributesCommand = /* @__PURE__ */ __name(async (output, context) => {
2363
- if (output.statusCode >= 300) {
2364
- return de_DescribeAccountAttributesCommandError(output, context);
2365
- }
2366
- const data = await parseBody(output.body, context);
2367
- let contents = {};
2368
- contents = (0, import_smithy_client._json)(data);
2369
- const response = {
2370
- $metadata: deserializeMetadata(output),
2371
- ...contents
1555
+ var de_DescribeAccountAttributesCommand = /* @__PURE__ */ __name(async (output, context) => {
1556
+ if (output.statusCode >= 300) {
1557
+ return de_CommandError(output, context);
1558
+ }
1559
+ const data = await parseBody(output.body, context);
1560
+ let contents = {};
1561
+ contents = (0, import_smithy_client._json)(data);
1562
+ const response = {
1563
+ $metadata: deserializeMetadata(output),
1564
+ ...contents
2372
1565
  };
2373
1566
  return response;
2374
1567
  }, "de_DescribeAccountAttributesCommand");
2375
- var de_DescribeAccountAttributesCommandError = /* @__PURE__ */ __name(async (output, context) => {
2376
- const parsedOutput = {
2377
- ...output,
2378
- body: await parseErrorBody(output.body, context)
2379
- };
2380
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2381
- switch (errorCode) {
2382
- case "AccessDeniedException":
2383
- case "com.amazonaws.pinpointsmsvoicev2#AccessDeniedException":
2384
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
2385
- case "InternalServerException":
2386
- case "com.amazonaws.pinpointsmsvoicev2#InternalServerException":
2387
- throw await de_InternalServerExceptionRes(parsedOutput, context);
2388
- case "ThrottlingException":
2389
- case "com.amazonaws.pinpointsmsvoicev2#ThrottlingException":
2390
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
2391
- case "ValidationException":
2392
- case "com.amazonaws.pinpointsmsvoicev2#ValidationException":
2393
- throw await de_ValidationExceptionRes(parsedOutput, context);
2394
- default:
2395
- const parsedBody = parsedOutput.body;
2396
- return throwDefaultError({
2397
- output,
2398
- parsedBody,
2399
- errorCode
2400
- });
2401
- }
2402
- }, "de_DescribeAccountAttributesCommandError");
2403
1568
  var de_DescribeAccountLimitsCommand = /* @__PURE__ */ __name(async (output, context) => {
2404
1569
  if (output.statusCode >= 300) {
2405
- return de_DescribeAccountLimitsCommandError(output, context);
1570
+ return de_CommandError(output, context);
2406
1571
  }
2407
1572
  const data = await parseBody(output.body, context);
2408
1573
  let contents = {};
@@ -2413,37 +1578,9 @@ var de_DescribeAccountLimitsCommand = /* @__PURE__ */ __name(async (output, cont
2413
1578
  };
2414
1579
  return response;
2415
1580
  }, "de_DescribeAccountLimitsCommand");
2416
- var de_DescribeAccountLimitsCommandError = /* @__PURE__ */ __name(async (output, context) => {
2417
- const parsedOutput = {
2418
- ...output,
2419
- body: await parseErrorBody(output.body, context)
2420
- };
2421
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2422
- switch (errorCode) {
2423
- case "AccessDeniedException":
2424
- case "com.amazonaws.pinpointsmsvoicev2#AccessDeniedException":
2425
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
2426
- case "InternalServerException":
2427
- case "com.amazonaws.pinpointsmsvoicev2#InternalServerException":
2428
- throw await de_InternalServerExceptionRes(parsedOutput, context);
2429
- case "ThrottlingException":
2430
- case "com.amazonaws.pinpointsmsvoicev2#ThrottlingException":
2431
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
2432
- case "ValidationException":
2433
- case "com.amazonaws.pinpointsmsvoicev2#ValidationException":
2434
- throw await de_ValidationExceptionRes(parsedOutput, context);
2435
- default:
2436
- const parsedBody = parsedOutput.body;
2437
- return throwDefaultError({
2438
- output,
2439
- parsedBody,
2440
- errorCode
2441
- });
2442
- }
2443
- }, "de_DescribeAccountLimitsCommandError");
2444
1581
  var de_DescribeConfigurationSetsCommand = /* @__PURE__ */ __name(async (output, context) => {
2445
1582
  if (output.statusCode >= 300) {
2446
- return de_DescribeConfigurationSetsCommandError(output, context);
1583
+ return de_CommandError(output, context);
2447
1584
  }
2448
1585
  const data = await parseBody(output.body, context);
2449
1586
  let contents = {};
@@ -2454,40 +1591,9 @@ var de_DescribeConfigurationSetsCommand = /* @__PURE__ */ __name(async (output,
2454
1591
  };
2455
1592
  return response;
2456
1593
  }, "de_DescribeConfigurationSetsCommand");
2457
- var de_DescribeConfigurationSetsCommandError = /* @__PURE__ */ __name(async (output, context) => {
2458
- const parsedOutput = {
2459
- ...output,
2460
- body: await parseErrorBody(output.body, context)
2461
- };
2462
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2463
- switch (errorCode) {
2464
- case "AccessDeniedException":
2465
- case "com.amazonaws.pinpointsmsvoicev2#AccessDeniedException":
2466
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
2467
- case "InternalServerException":
2468
- case "com.amazonaws.pinpointsmsvoicev2#InternalServerException":
2469
- throw await de_InternalServerExceptionRes(parsedOutput, context);
2470
- case "ResourceNotFoundException":
2471
- case "com.amazonaws.pinpointsmsvoicev2#ResourceNotFoundException":
2472
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
2473
- case "ThrottlingException":
2474
- case "com.amazonaws.pinpointsmsvoicev2#ThrottlingException":
2475
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
2476
- case "ValidationException":
2477
- case "com.amazonaws.pinpointsmsvoicev2#ValidationException":
2478
- throw await de_ValidationExceptionRes(parsedOutput, context);
2479
- default:
2480
- const parsedBody = parsedOutput.body;
2481
- return throwDefaultError({
2482
- output,
2483
- parsedBody,
2484
- errorCode
2485
- });
2486
- }
2487
- }, "de_DescribeConfigurationSetsCommandError");
2488
1594
  var de_DescribeKeywordsCommand = /* @__PURE__ */ __name(async (output, context) => {
2489
1595
  if (output.statusCode >= 300) {
2490
- return de_DescribeKeywordsCommandError(output, context);
1596
+ return de_CommandError(output, context);
2491
1597
  }
2492
1598
  const data = await parseBody(output.body, context);
2493
1599
  let contents = {};
@@ -2498,40 +1604,9 @@ var de_DescribeKeywordsCommand = /* @__PURE__ */ __name(async (output, context)
2498
1604
  };
2499
1605
  return response;
2500
1606
  }, "de_DescribeKeywordsCommand");
2501
- var de_DescribeKeywordsCommandError = /* @__PURE__ */ __name(async (output, context) => {
2502
- const parsedOutput = {
2503
- ...output,
2504
- body: await parseErrorBody(output.body, context)
2505
- };
2506
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2507
- switch (errorCode) {
2508
- case "AccessDeniedException":
2509
- case "com.amazonaws.pinpointsmsvoicev2#AccessDeniedException":
2510
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
2511
- case "InternalServerException":
2512
- case "com.amazonaws.pinpointsmsvoicev2#InternalServerException":
2513
- throw await de_InternalServerExceptionRes(parsedOutput, context);
2514
- case "ResourceNotFoundException":
2515
- case "com.amazonaws.pinpointsmsvoicev2#ResourceNotFoundException":
2516
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
2517
- case "ThrottlingException":
2518
- case "com.amazonaws.pinpointsmsvoicev2#ThrottlingException":
2519
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
2520
- case "ValidationException":
2521
- case "com.amazonaws.pinpointsmsvoicev2#ValidationException":
2522
- throw await de_ValidationExceptionRes(parsedOutput, context);
2523
- default:
2524
- const parsedBody = parsedOutput.body;
2525
- return throwDefaultError({
2526
- output,
2527
- parsedBody,
2528
- errorCode
2529
- });
2530
- }
2531
- }, "de_DescribeKeywordsCommandError");
2532
1607
  var de_DescribeOptedOutNumbersCommand = /* @__PURE__ */ __name(async (output, context) => {
2533
1608
  if (output.statusCode >= 300) {
2534
- return de_DescribeOptedOutNumbersCommandError(output, context);
1609
+ return de_CommandError(output, context);
2535
1610
  }
2536
1611
  const data = await parseBody(output.body, context);
2537
1612
  let contents = {};
@@ -2542,40 +1617,9 @@ var de_DescribeOptedOutNumbersCommand = /* @__PURE__ */ __name(async (output, co
2542
1617
  };
2543
1618
  return response;
2544
1619
  }, "de_DescribeOptedOutNumbersCommand");
2545
- var de_DescribeOptedOutNumbersCommandError = /* @__PURE__ */ __name(async (output, context) => {
2546
- const parsedOutput = {
2547
- ...output,
2548
- body: await parseErrorBody(output.body, context)
2549
- };
2550
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2551
- switch (errorCode) {
2552
- case "AccessDeniedException":
2553
- case "com.amazonaws.pinpointsmsvoicev2#AccessDeniedException":
2554
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
2555
- case "InternalServerException":
2556
- case "com.amazonaws.pinpointsmsvoicev2#InternalServerException":
2557
- throw await de_InternalServerExceptionRes(parsedOutput, context);
2558
- case "ResourceNotFoundException":
2559
- case "com.amazonaws.pinpointsmsvoicev2#ResourceNotFoundException":
2560
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
2561
- case "ThrottlingException":
2562
- case "com.amazonaws.pinpointsmsvoicev2#ThrottlingException":
2563
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
2564
- case "ValidationException":
2565
- case "com.amazonaws.pinpointsmsvoicev2#ValidationException":
2566
- throw await de_ValidationExceptionRes(parsedOutput, context);
2567
- default:
2568
- const parsedBody = parsedOutput.body;
2569
- return throwDefaultError({
2570
- output,
2571
- parsedBody,
2572
- errorCode
2573
- });
2574
- }
2575
- }, "de_DescribeOptedOutNumbersCommandError");
2576
1620
  var de_DescribeOptOutListsCommand = /* @__PURE__ */ __name(async (output, context) => {
2577
1621
  if (output.statusCode >= 300) {
2578
- return de_DescribeOptOutListsCommandError(output, context);
1622
+ return de_CommandError(output, context);
2579
1623
  }
2580
1624
  const data = await parseBody(output.body, context);
2581
1625
  let contents = {};
@@ -2586,40 +1630,9 @@ var de_DescribeOptOutListsCommand = /* @__PURE__ */ __name(async (output, contex
2586
1630
  };
2587
1631
  return response;
2588
1632
  }, "de_DescribeOptOutListsCommand");
2589
- var de_DescribeOptOutListsCommandError = /* @__PURE__ */ __name(async (output, context) => {
2590
- const parsedOutput = {
2591
- ...output,
2592
- body: await parseErrorBody(output.body, context)
2593
- };
2594
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2595
- switch (errorCode) {
2596
- case "AccessDeniedException":
2597
- case "com.amazonaws.pinpointsmsvoicev2#AccessDeniedException":
2598
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
2599
- case "InternalServerException":
2600
- case "com.amazonaws.pinpointsmsvoicev2#InternalServerException":
2601
- throw await de_InternalServerExceptionRes(parsedOutput, context);
2602
- case "ResourceNotFoundException":
2603
- case "com.amazonaws.pinpointsmsvoicev2#ResourceNotFoundException":
2604
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
2605
- case "ThrottlingException":
2606
- case "com.amazonaws.pinpointsmsvoicev2#ThrottlingException":
2607
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
2608
- case "ValidationException":
2609
- case "com.amazonaws.pinpointsmsvoicev2#ValidationException":
2610
- throw await de_ValidationExceptionRes(parsedOutput, context);
2611
- default:
2612
- const parsedBody = parsedOutput.body;
2613
- return throwDefaultError({
2614
- output,
2615
- parsedBody,
2616
- errorCode
2617
- });
2618
- }
2619
- }, "de_DescribeOptOutListsCommandError");
2620
1633
  var de_DescribePhoneNumbersCommand = /* @__PURE__ */ __name(async (output, context) => {
2621
1634
  if (output.statusCode >= 300) {
2622
- return de_DescribePhoneNumbersCommandError(output, context);
1635
+ return de_CommandError(output, context);
2623
1636
  }
2624
1637
  const data = await parseBody(output.body, context);
2625
1638
  let contents = {};
@@ -2630,40 +1643,9 @@ var de_DescribePhoneNumbersCommand = /* @__PURE__ */ __name(async (output, conte
2630
1643
  };
2631
1644
  return response;
2632
1645
  }, "de_DescribePhoneNumbersCommand");
2633
- var de_DescribePhoneNumbersCommandError = /* @__PURE__ */ __name(async (output, context) => {
2634
- const parsedOutput = {
2635
- ...output,
2636
- body: await parseErrorBody(output.body, context)
2637
- };
2638
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2639
- switch (errorCode) {
2640
- case "AccessDeniedException":
2641
- case "com.amazonaws.pinpointsmsvoicev2#AccessDeniedException":
2642
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
2643
- case "InternalServerException":
2644
- case "com.amazonaws.pinpointsmsvoicev2#InternalServerException":
2645
- throw await de_InternalServerExceptionRes(parsedOutput, context);
2646
- case "ResourceNotFoundException":
2647
- case "com.amazonaws.pinpointsmsvoicev2#ResourceNotFoundException":
2648
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
2649
- case "ThrottlingException":
2650
- case "com.amazonaws.pinpointsmsvoicev2#ThrottlingException":
2651
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
2652
- case "ValidationException":
2653
- case "com.amazonaws.pinpointsmsvoicev2#ValidationException":
2654
- throw await de_ValidationExceptionRes(parsedOutput, context);
2655
- default:
2656
- const parsedBody = parsedOutput.body;
2657
- return throwDefaultError({
2658
- output,
2659
- parsedBody,
2660
- errorCode
2661
- });
2662
- }
2663
- }, "de_DescribePhoneNumbersCommandError");
2664
1646
  var de_DescribePoolsCommand = /* @__PURE__ */ __name(async (output, context) => {
2665
1647
  if (output.statusCode >= 300) {
2666
- return de_DescribePoolsCommandError(output, context);
1648
+ return de_CommandError(output, context);
2667
1649
  }
2668
1650
  const data = await parseBody(output.body, context);
2669
1651
  let contents = {};
@@ -2674,40 +1656,9 @@ var de_DescribePoolsCommand = /* @__PURE__ */ __name(async (output, context) =>
2674
1656
  };
2675
1657
  return response;
2676
1658
  }, "de_DescribePoolsCommand");
2677
- var de_DescribePoolsCommandError = /* @__PURE__ */ __name(async (output, context) => {
2678
- const parsedOutput = {
2679
- ...output,
2680
- body: await parseErrorBody(output.body, context)
2681
- };
2682
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2683
- switch (errorCode) {
2684
- case "AccessDeniedException":
2685
- case "com.amazonaws.pinpointsmsvoicev2#AccessDeniedException":
2686
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
2687
- case "InternalServerException":
2688
- case "com.amazonaws.pinpointsmsvoicev2#InternalServerException":
2689
- throw await de_InternalServerExceptionRes(parsedOutput, context);
2690
- case "ResourceNotFoundException":
2691
- case "com.amazonaws.pinpointsmsvoicev2#ResourceNotFoundException":
2692
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
2693
- case "ThrottlingException":
2694
- case "com.amazonaws.pinpointsmsvoicev2#ThrottlingException":
2695
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
2696
- case "ValidationException":
2697
- case "com.amazonaws.pinpointsmsvoicev2#ValidationException":
2698
- throw await de_ValidationExceptionRes(parsedOutput, context);
2699
- default:
2700
- const parsedBody = parsedOutput.body;
2701
- return throwDefaultError({
2702
- output,
2703
- parsedBody,
2704
- errorCode
2705
- });
2706
- }
2707
- }, "de_DescribePoolsCommandError");
2708
1659
  var de_DescribeRegistrationAttachmentsCommand = /* @__PURE__ */ __name(async (output, context) => {
2709
1660
  if (output.statusCode >= 300) {
2710
- return de_DescribeRegistrationAttachmentsCommandError(output, context);
1661
+ return de_CommandError(output, context);
2711
1662
  }
2712
1663
  const data = await parseBody(output.body, context);
2713
1664
  let contents = {};
@@ -2718,40 +1669,9 @@ var de_DescribeRegistrationAttachmentsCommand = /* @__PURE__ */ __name(async (ou
2718
1669
  };
2719
1670
  return response;
2720
1671
  }, "de_DescribeRegistrationAttachmentsCommand");
2721
- var de_DescribeRegistrationAttachmentsCommandError = /* @__PURE__ */ __name(async (output, context) => {
2722
- const parsedOutput = {
2723
- ...output,
2724
- body: await parseErrorBody(output.body, context)
2725
- };
2726
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2727
- switch (errorCode) {
2728
- case "AccessDeniedException":
2729
- case "com.amazonaws.pinpointsmsvoicev2#AccessDeniedException":
2730
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
2731
- case "InternalServerException":
2732
- case "com.amazonaws.pinpointsmsvoicev2#InternalServerException":
2733
- throw await de_InternalServerExceptionRes(parsedOutput, context);
2734
- case "ResourceNotFoundException":
2735
- case "com.amazonaws.pinpointsmsvoicev2#ResourceNotFoundException":
2736
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
2737
- case "ThrottlingException":
2738
- case "com.amazonaws.pinpointsmsvoicev2#ThrottlingException":
2739
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
2740
- case "ValidationException":
2741
- case "com.amazonaws.pinpointsmsvoicev2#ValidationException":
2742
- throw await de_ValidationExceptionRes(parsedOutput, context);
2743
- default:
2744
- const parsedBody = parsedOutput.body;
2745
- return throwDefaultError({
2746
- output,
2747
- parsedBody,
2748
- errorCode
2749
- });
2750
- }
2751
- }, "de_DescribeRegistrationAttachmentsCommandError");
2752
1672
  var de_DescribeRegistrationFieldDefinitionsCommand = /* @__PURE__ */ __name(async (output, context) => {
2753
1673
  if (output.statusCode >= 300) {
2754
- return de_DescribeRegistrationFieldDefinitionsCommandError(output, context);
1674
+ return de_CommandError(output, context);
2755
1675
  }
2756
1676
  const data = await parseBody(output.body, context);
2757
1677
  let contents = {};
@@ -2762,37 +1682,9 @@ var de_DescribeRegistrationFieldDefinitionsCommand = /* @__PURE__ */ __name(asyn
2762
1682
  };
2763
1683
  return response;
2764
1684
  }, "de_DescribeRegistrationFieldDefinitionsCommand");
2765
- var de_DescribeRegistrationFieldDefinitionsCommandError = /* @__PURE__ */ __name(async (output, context) => {
2766
- const parsedOutput = {
2767
- ...output,
2768
- body: await parseErrorBody(output.body, context)
2769
- };
2770
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2771
- switch (errorCode) {
2772
- case "AccessDeniedException":
2773
- case "com.amazonaws.pinpointsmsvoicev2#AccessDeniedException":
2774
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
2775
- case "InternalServerException":
2776
- case "com.amazonaws.pinpointsmsvoicev2#InternalServerException":
2777
- throw await de_InternalServerExceptionRes(parsedOutput, context);
2778
- case "ThrottlingException":
2779
- case "com.amazonaws.pinpointsmsvoicev2#ThrottlingException":
2780
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
2781
- case "ValidationException":
2782
- case "com.amazonaws.pinpointsmsvoicev2#ValidationException":
2783
- throw await de_ValidationExceptionRes(parsedOutput, context);
2784
- default:
2785
- const parsedBody = parsedOutput.body;
2786
- return throwDefaultError({
2787
- output,
2788
- parsedBody,
2789
- errorCode
2790
- });
2791
- }
2792
- }, "de_DescribeRegistrationFieldDefinitionsCommandError");
2793
1685
  var de_DescribeRegistrationFieldValuesCommand = /* @__PURE__ */ __name(async (output, context) => {
2794
1686
  if (output.statusCode >= 300) {
2795
- return de_DescribeRegistrationFieldValuesCommandError(output, context);
1687
+ return de_CommandError(output, context);
2796
1688
  }
2797
1689
  const data = await parseBody(output.body, context);
2798
1690
  let contents = {};
@@ -2803,40 +1695,9 @@ var de_DescribeRegistrationFieldValuesCommand = /* @__PURE__ */ __name(async (ou
2803
1695
  };
2804
1696
  return response;
2805
1697
  }, "de_DescribeRegistrationFieldValuesCommand");
2806
- var de_DescribeRegistrationFieldValuesCommandError = /* @__PURE__ */ __name(async (output, context) => {
2807
- const parsedOutput = {
2808
- ...output,
2809
- body: await parseErrorBody(output.body, context)
2810
- };
2811
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2812
- switch (errorCode) {
2813
- case "AccessDeniedException":
2814
- case "com.amazonaws.pinpointsmsvoicev2#AccessDeniedException":
2815
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
2816
- case "InternalServerException":
2817
- case "com.amazonaws.pinpointsmsvoicev2#InternalServerException":
2818
- throw await de_InternalServerExceptionRes(parsedOutput, context);
2819
- case "ResourceNotFoundException":
2820
- case "com.amazonaws.pinpointsmsvoicev2#ResourceNotFoundException":
2821
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
2822
- case "ThrottlingException":
2823
- case "com.amazonaws.pinpointsmsvoicev2#ThrottlingException":
2824
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
2825
- case "ValidationException":
2826
- case "com.amazonaws.pinpointsmsvoicev2#ValidationException":
2827
- throw await de_ValidationExceptionRes(parsedOutput, context);
2828
- default:
2829
- const parsedBody = parsedOutput.body;
2830
- return throwDefaultError({
2831
- output,
2832
- parsedBody,
2833
- errorCode
2834
- });
2835
- }
2836
- }, "de_DescribeRegistrationFieldValuesCommandError");
2837
1698
  var de_DescribeRegistrationsCommand = /* @__PURE__ */ __name(async (output, context) => {
2838
1699
  if (output.statusCode >= 300) {
2839
- return de_DescribeRegistrationsCommandError(output, context);
1700
+ return de_CommandError(output, context);
2840
1701
  }
2841
1702
  const data = await parseBody(output.body, context);
2842
1703
  let contents = {};
@@ -2847,40 +1708,9 @@ var de_DescribeRegistrationsCommand = /* @__PURE__ */ __name(async (output, cont
2847
1708
  };
2848
1709
  return response;
2849
1710
  }, "de_DescribeRegistrationsCommand");
2850
- var de_DescribeRegistrationsCommandError = /* @__PURE__ */ __name(async (output, context) => {
2851
- const parsedOutput = {
2852
- ...output,
2853
- body: await parseErrorBody(output.body, context)
2854
- };
2855
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2856
- switch (errorCode) {
2857
- case "AccessDeniedException":
2858
- case "com.amazonaws.pinpointsmsvoicev2#AccessDeniedException":
2859
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
2860
- case "InternalServerException":
2861
- case "com.amazonaws.pinpointsmsvoicev2#InternalServerException":
2862
- throw await de_InternalServerExceptionRes(parsedOutput, context);
2863
- case "ResourceNotFoundException":
2864
- case "com.amazonaws.pinpointsmsvoicev2#ResourceNotFoundException":
2865
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
2866
- case "ThrottlingException":
2867
- case "com.amazonaws.pinpointsmsvoicev2#ThrottlingException":
2868
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
2869
- case "ValidationException":
2870
- case "com.amazonaws.pinpointsmsvoicev2#ValidationException":
2871
- throw await de_ValidationExceptionRes(parsedOutput, context);
2872
- default:
2873
- const parsedBody = parsedOutput.body;
2874
- return throwDefaultError({
2875
- output,
2876
- parsedBody,
2877
- errorCode
2878
- });
2879
- }
2880
- }, "de_DescribeRegistrationsCommandError");
2881
1711
  var de_DescribeRegistrationSectionDefinitionsCommand = /* @__PURE__ */ __name(async (output, context) => {
2882
1712
  if (output.statusCode >= 300) {
2883
- return de_DescribeRegistrationSectionDefinitionsCommandError(output, context);
1713
+ return de_CommandError(output, context);
2884
1714
  }
2885
1715
  const data = await parseBody(output.body, context);
2886
1716
  let contents = {};
@@ -2891,37 +1721,9 @@ var de_DescribeRegistrationSectionDefinitionsCommand = /* @__PURE__ */ __name(as
2891
1721
  };
2892
1722
  return response;
2893
1723
  }, "de_DescribeRegistrationSectionDefinitionsCommand");
2894
- var de_DescribeRegistrationSectionDefinitionsCommandError = /* @__PURE__ */ __name(async (output, context) => {
2895
- const parsedOutput = {
2896
- ...output,
2897
- body: await parseErrorBody(output.body, context)
2898
- };
2899
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2900
- switch (errorCode) {
2901
- case "AccessDeniedException":
2902
- case "com.amazonaws.pinpointsmsvoicev2#AccessDeniedException":
2903
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
2904
- case "InternalServerException":
2905
- case "com.amazonaws.pinpointsmsvoicev2#InternalServerException":
2906
- throw await de_InternalServerExceptionRes(parsedOutput, context);
2907
- case "ThrottlingException":
2908
- case "com.amazonaws.pinpointsmsvoicev2#ThrottlingException":
2909
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
2910
- case "ValidationException":
2911
- case "com.amazonaws.pinpointsmsvoicev2#ValidationException":
2912
- throw await de_ValidationExceptionRes(parsedOutput, context);
2913
- default:
2914
- const parsedBody = parsedOutput.body;
2915
- return throwDefaultError({
2916
- output,
2917
- parsedBody,
2918
- errorCode
2919
- });
2920
- }
2921
- }, "de_DescribeRegistrationSectionDefinitionsCommandError");
2922
1724
  var de_DescribeRegistrationTypeDefinitionsCommand = /* @__PURE__ */ __name(async (output, context) => {
2923
1725
  if (output.statusCode >= 300) {
2924
- return de_DescribeRegistrationTypeDefinitionsCommandError(output, context);
1726
+ return de_CommandError(output, context);
2925
1727
  }
2926
1728
  const data = await parseBody(output.body, context);
2927
1729
  let contents = {};
@@ -2932,37 +1734,9 @@ var de_DescribeRegistrationTypeDefinitionsCommand = /* @__PURE__ */ __name(async
2932
1734
  };
2933
1735
  return response;
2934
1736
  }, "de_DescribeRegistrationTypeDefinitionsCommand");
2935
- var de_DescribeRegistrationTypeDefinitionsCommandError = /* @__PURE__ */ __name(async (output, context) => {
2936
- const parsedOutput = {
2937
- ...output,
2938
- body: await parseErrorBody(output.body, context)
2939
- };
2940
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2941
- switch (errorCode) {
2942
- case "AccessDeniedException":
2943
- case "com.amazonaws.pinpointsmsvoicev2#AccessDeniedException":
2944
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
2945
- case "InternalServerException":
2946
- case "com.amazonaws.pinpointsmsvoicev2#InternalServerException":
2947
- throw await de_InternalServerExceptionRes(parsedOutput, context);
2948
- case "ThrottlingException":
2949
- case "com.amazonaws.pinpointsmsvoicev2#ThrottlingException":
2950
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
2951
- case "ValidationException":
2952
- case "com.amazonaws.pinpointsmsvoicev2#ValidationException":
2953
- throw await de_ValidationExceptionRes(parsedOutput, context);
2954
- default:
2955
- const parsedBody = parsedOutput.body;
2956
- return throwDefaultError({
2957
- output,
2958
- parsedBody,
2959
- errorCode
2960
- });
2961
- }
2962
- }, "de_DescribeRegistrationTypeDefinitionsCommandError");
2963
1737
  var de_DescribeRegistrationVersionsCommand = /* @__PURE__ */ __name(async (output, context) => {
2964
1738
  if (output.statusCode >= 300) {
2965
- return de_DescribeRegistrationVersionsCommandError(output, context);
1739
+ return de_CommandError(output, context);
2966
1740
  }
2967
1741
  const data = await parseBody(output.body, context);
2968
1742
  let contents = {};
@@ -2973,40 +1747,9 @@ var de_DescribeRegistrationVersionsCommand = /* @__PURE__ */ __name(async (outpu
2973
1747
  };
2974
1748
  return response;
2975
1749
  }, "de_DescribeRegistrationVersionsCommand");
2976
- var de_DescribeRegistrationVersionsCommandError = /* @__PURE__ */ __name(async (output, context) => {
2977
- const parsedOutput = {
2978
- ...output,
2979
- body: await parseErrorBody(output.body, context)
2980
- };
2981
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2982
- switch (errorCode) {
2983
- case "AccessDeniedException":
2984
- case "com.amazonaws.pinpointsmsvoicev2#AccessDeniedException":
2985
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
2986
- case "InternalServerException":
2987
- case "com.amazonaws.pinpointsmsvoicev2#InternalServerException":
2988
- throw await de_InternalServerExceptionRes(parsedOutput, context);
2989
- case "ResourceNotFoundException":
2990
- case "com.amazonaws.pinpointsmsvoicev2#ResourceNotFoundException":
2991
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
2992
- case "ThrottlingException":
2993
- case "com.amazonaws.pinpointsmsvoicev2#ThrottlingException":
2994
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
2995
- case "ValidationException":
2996
- case "com.amazonaws.pinpointsmsvoicev2#ValidationException":
2997
- throw await de_ValidationExceptionRes(parsedOutput, context);
2998
- default:
2999
- const parsedBody = parsedOutput.body;
3000
- return throwDefaultError({
3001
- output,
3002
- parsedBody,
3003
- errorCode
3004
- });
3005
- }
3006
- }, "de_DescribeRegistrationVersionsCommandError");
3007
1750
  var de_DescribeSenderIdsCommand = /* @__PURE__ */ __name(async (output, context) => {
3008
1751
  if (output.statusCode >= 300) {
3009
- return de_DescribeSenderIdsCommandError(output, context);
1752
+ return de_CommandError(output, context);
3010
1753
  }
3011
1754
  const data = await parseBody(output.body, context);
3012
1755
  let contents = {};
@@ -3017,40 +1760,9 @@ var de_DescribeSenderIdsCommand = /* @__PURE__ */ __name(async (output, context)
3017
1760
  };
3018
1761
  return response;
3019
1762
  }, "de_DescribeSenderIdsCommand");
3020
- var de_DescribeSenderIdsCommandError = /* @__PURE__ */ __name(async (output, context) => {
3021
- const parsedOutput = {
3022
- ...output,
3023
- body: await parseErrorBody(output.body, context)
3024
- };
3025
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
3026
- switch (errorCode) {
3027
- case "AccessDeniedException":
3028
- case "com.amazonaws.pinpointsmsvoicev2#AccessDeniedException":
3029
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
3030
- case "InternalServerException":
3031
- case "com.amazonaws.pinpointsmsvoicev2#InternalServerException":
3032
- throw await de_InternalServerExceptionRes(parsedOutput, context);
3033
- case "ResourceNotFoundException":
3034
- case "com.amazonaws.pinpointsmsvoicev2#ResourceNotFoundException":
3035
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
3036
- case "ThrottlingException":
3037
- case "com.amazonaws.pinpointsmsvoicev2#ThrottlingException":
3038
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
3039
- case "ValidationException":
3040
- case "com.amazonaws.pinpointsmsvoicev2#ValidationException":
3041
- throw await de_ValidationExceptionRes(parsedOutput, context);
3042
- default:
3043
- const parsedBody = parsedOutput.body;
3044
- return throwDefaultError({
3045
- output,
3046
- parsedBody,
3047
- errorCode
3048
- });
3049
- }
3050
- }, "de_DescribeSenderIdsCommandError");
3051
1763
  var de_DescribeSpendLimitsCommand = /* @__PURE__ */ __name(async (output, context) => {
3052
1764
  if (output.statusCode >= 300) {
3053
- return de_DescribeSpendLimitsCommandError(output, context);
1765
+ return de_CommandError(output, context);
3054
1766
  }
3055
1767
  const data = await parseBody(output.body, context);
3056
1768
  let contents = {};
@@ -3061,37 +1773,9 @@ var de_DescribeSpendLimitsCommand = /* @__PURE__ */ __name(async (output, contex
3061
1773
  };
3062
1774
  return response;
3063
1775
  }, "de_DescribeSpendLimitsCommand");
3064
- var de_DescribeSpendLimitsCommandError = /* @__PURE__ */ __name(async (output, context) => {
3065
- const parsedOutput = {
3066
- ...output,
3067
- body: await parseErrorBody(output.body, context)
3068
- };
3069
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
3070
- switch (errorCode) {
3071
- case "AccessDeniedException":
3072
- case "com.amazonaws.pinpointsmsvoicev2#AccessDeniedException":
3073
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
3074
- case "InternalServerException":
3075
- case "com.amazonaws.pinpointsmsvoicev2#InternalServerException":
3076
- throw await de_InternalServerExceptionRes(parsedOutput, context);
3077
- case "ThrottlingException":
3078
- case "com.amazonaws.pinpointsmsvoicev2#ThrottlingException":
3079
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
3080
- case "ValidationException":
3081
- case "com.amazonaws.pinpointsmsvoicev2#ValidationException":
3082
- throw await de_ValidationExceptionRes(parsedOutput, context);
3083
- default:
3084
- const parsedBody = parsedOutput.body;
3085
- return throwDefaultError({
3086
- output,
3087
- parsedBody,
3088
- errorCode
3089
- });
3090
- }
3091
- }, "de_DescribeSpendLimitsCommandError");
3092
1776
  var de_DescribeVerifiedDestinationNumbersCommand = /* @__PURE__ */ __name(async (output, context) => {
3093
1777
  if (output.statusCode >= 300) {
3094
- return de_DescribeVerifiedDestinationNumbersCommandError(output, context);
1778
+ return de_CommandError(output, context);
3095
1779
  }
3096
1780
  const data = await parseBody(output.body, context);
3097
1781
  let contents = {};
@@ -3102,40 +1786,9 @@ var de_DescribeVerifiedDestinationNumbersCommand = /* @__PURE__ */ __name(async
3102
1786
  };
3103
1787
  return response;
3104
1788
  }, "de_DescribeVerifiedDestinationNumbersCommand");
3105
- var de_DescribeVerifiedDestinationNumbersCommandError = /* @__PURE__ */ __name(async (output, context) => {
3106
- const parsedOutput = {
3107
- ...output,
3108
- body: await parseErrorBody(output.body, context)
3109
- };
3110
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
3111
- switch (errorCode) {
3112
- case "AccessDeniedException":
3113
- case "com.amazonaws.pinpointsmsvoicev2#AccessDeniedException":
3114
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
3115
- case "InternalServerException":
3116
- case "com.amazonaws.pinpointsmsvoicev2#InternalServerException":
3117
- throw await de_InternalServerExceptionRes(parsedOutput, context);
3118
- case "ResourceNotFoundException":
3119
- case "com.amazonaws.pinpointsmsvoicev2#ResourceNotFoundException":
3120
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
3121
- case "ThrottlingException":
3122
- case "com.amazonaws.pinpointsmsvoicev2#ThrottlingException":
3123
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
3124
- case "ValidationException":
3125
- case "com.amazonaws.pinpointsmsvoicev2#ValidationException":
3126
- throw await de_ValidationExceptionRes(parsedOutput, context);
3127
- default:
3128
- const parsedBody = parsedOutput.body;
3129
- return throwDefaultError({
3130
- output,
3131
- parsedBody,
3132
- errorCode
3133
- });
3134
- }
3135
- }, "de_DescribeVerifiedDestinationNumbersCommandError");
3136
1789
  var de_DisassociateOriginationIdentityCommand = /* @__PURE__ */ __name(async (output, context) => {
3137
1790
  if (output.statusCode >= 300) {
3138
- return de_DisassociateOriginationIdentityCommandError(output, context);
1791
+ return de_CommandError(output, context);
3139
1792
  }
3140
1793
  const data = await parseBody(output.body, context);
3141
1794
  let contents = {};
@@ -3146,43 +1799,9 @@ var de_DisassociateOriginationIdentityCommand = /* @__PURE__ */ __name(async (ou
3146
1799
  };
3147
1800
  return response;
3148
1801
  }, "de_DisassociateOriginationIdentityCommand");
3149
- var de_DisassociateOriginationIdentityCommandError = /* @__PURE__ */ __name(async (output, context) => {
3150
- const parsedOutput = {
3151
- ...output,
3152
- body: await parseErrorBody(output.body, context)
3153
- };
3154
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
3155
- switch (errorCode) {
3156
- case "AccessDeniedException":
3157
- case "com.amazonaws.pinpointsmsvoicev2#AccessDeniedException":
3158
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
3159
- case "ConflictException":
3160
- case "com.amazonaws.pinpointsmsvoicev2#ConflictException":
3161
- throw await de_ConflictExceptionRes(parsedOutput, context);
3162
- case "InternalServerException":
3163
- case "com.amazonaws.pinpointsmsvoicev2#InternalServerException":
3164
- throw await de_InternalServerExceptionRes(parsedOutput, context);
3165
- case "ResourceNotFoundException":
3166
- case "com.amazonaws.pinpointsmsvoicev2#ResourceNotFoundException":
3167
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
3168
- case "ThrottlingException":
3169
- case "com.amazonaws.pinpointsmsvoicev2#ThrottlingException":
3170
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
3171
- case "ValidationException":
3172
- case "com.amazonaws.pinpointsmsvoicev2#ValidationException":
3173
- throw await de_ValidationExceptionRes(parsedOutput, context);
3174
- default:
3175
- const parsedBody = parsedOutput.body;
3176
- return throwDefaultError({
3177
- output,
3178
- parsedBody,
3179
- errorCode
3180
- });
3181
- }
3182
- }, "de_DisassociateOriginationIdentityCommandError");
3183
1802
  var de_DiscardRegistrationVersionCommand = /* @__PURE__ */ __name(async (output, context) => {
3184
1803
  if (output.statusCode >= 300) {
3185
- return de_DiscardRegistrationVersionCommandError(output, context);
1804
+ return de_CommandError(output, context);
3186
1805
  }
3187
1806
  const data = await parseBody(output.body, context);
3188
1807
  let contents = {};
@@ -3193,43 +1812,9 @@ var de_DiscardRegistrationVersionCommand = /* @__PURE__ */ __name(async (output,
3193
1812
  };
3194
1813
  return response;
3195
1814
  }, "de_DiscardRegistrationVersionCommand");
3196
- var de_DiscardRegistrationVersionCommandError = /* @__PURE__ */ __name(async (output, context) => {
3197
- const parsedOutput = {
3198
- ...output,
3199
- body: await parseErrorBody(output.body, context)
3200
- };
3201
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
3202
- switch (errorCode) {
3203
- case "AccessDeniedException":
3204
- case "com.amazonaws.pinpointsmsvoicev2#AccessDeniedException":
3205
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
3206
- case "ConflictException":
3207
- case "com.amazonaws.pinpointsmsvoicev2#ConflictException":
3208
- throw await de_ConflictExceptionRes(parsedOutput, context);
3209
- case "InternalServerException":
3210
- case "com.amazonaws.pinpointsmsvoicev2#InternalServerException":
3211
- throw await de_InternalServerExceptionRes(parsedOutput, context);
3212
- case "ResourceNotFoundException":
3213
- case "com.amazonaws.pinpointsmsvoicev2#ResourceNotFoundException":
3214
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
3215
- case "ThrottlingException":
3216
- case "com.amazonaws.pinpointsmsvoicev2#ThrottlingException":
3217
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
3218
- case "ValidationException":
3219
- case "com.amazonaws.pinpointsmsvoicev2#ValidationException":
3220
- throw await de_ValidationExceptionRes(parsedOutput, context);
3221
- default:
3222
- const parsedBody = parsedOutput.body;
3223
- return throwDefaultError({
3224
- output,
3225
- parsedBody,
3226
- errorCode
3227
- });
3228
- }
3229
- }, "de_DiscardRegistrationVersionCommandError");
3230
1815
  var de_ListPoolOriginationIdentitiesCommand = /* @__PURE__ */ __name(async (output, context) => {
3231
1816
  if (output.statusCode >= 300) {
3232
- return de_ListPoolOriginationIdentitiesCommandError(output, context);
1817
+ return de_CommandError(output, context);
3233
1818
  }
3234
1819
  const data = await parseBody(output.body, context);
3235
1820
  let contents = {};
@@ -3240,40 +1825,9 @@ var de_ListPoolOriginationIdentitiesCommand = /* @__PURE__ */ __name(async (outp
3240
1825
  };
3241
1826
  return response;
3242
1827
  }, "de_ListPoolOriginationIdentitiesCommand");
3243
- var de_ListPoolOriginationIdentitiesCommandError = /* @__PURE__ */ __name(async (output, context) => {
3244
- const parsedOutput = {
3245
- ...output,
3246
- body: await parseErrorBody(output.body, context)
3247
- };
3248
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
3249
- switch (errorCode) {
3250
- case "AccessDeniedException":
3251
- case "com.amazonaws.pinpointsmsvoicev2#AccessDeniedException":
3252
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
3253
- case "InternalServerException":
3254
- case "com.amazonaws.pinpointsmsvoicev2#InternalServerException":
3255
- throw await de_InternalServerExceptionRes(parsedOutput, context);
3256
- case "ResourceNotFoundException":
3257
- case "com.amazonaws.pinpointsmsvoicev2#ResourceNotFoundException":
3258
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
3259
- case "ThrottlingException":
3260
- case "com.amazonaws.pinpointsmsvoicev2#ThrottlingException":
3261
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
3262
- case "ValidationException":
3263
- case "com.amazonaws.pinpointsmsvoicev2#ValidationException":
3264
- throw await de_ValidationExceptionRes(parsedOutput, context);
3265
- default:
3266
- const parsedBody = parsedOutput.body;
3267
- return throwDefaultError({
3268
- output,
3269
- parsedBody,
3270
- errorCode
3271
- });
3272
- }
3273
- }, "de_ListPoolOriginationIdentitiesCommandError");
3274
1828
  var de_ListRegistrationAssociationsCommand = /* @__PURE__ */ __name(async (output, context) => {
3275
1829
  if (output.statusCode >= 300) {
3276
- return de_ListRegistrationAssociationsCommandError(output, context);
1830
+ return de_CommandError(output, context);
3277
1831
  }
3278
1832
  const data = await parseBody(output.body, context);
3279
1833
  let contents = {};
@@ -3284,40 +1838,9 @@ var de_ListRegistrationAssociationsCommand = /* @__PURE__ */ __name(async (outpu
3284
1838
  };
3285
1839
  return response;
3286
1840
  }, "de_ListRegistrationAssociationsCommand");
3287
- var de_ListRegistrationAssociationsCommandError = /* @__PURE__ */ __name(async (output, context) => {
3288
- const parsedOutput = {
3289
- ...output,
3290
- body: await parseErrorBody(output.body, context)
3291
- };
3292
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
3293
- switch (errorCode) {
3294
- case "AccessDeniedException":
3295
- case "com.amazonaws.pinpointsmsvoicev2#AccessDeniedException":
3296
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
3297
- case "InternalServerException":
3298
- case "com.amazonaws.pinpointsmsvoicev2#InternalServerException":
3299
- throw await de_InternalServerExceptionRes(parsedOutput, context);
3300
- case "ResourceNotFoundException":
3301
- case "com.amazonaws.pinpointsmsvoicev2#ResourceNotFoundException":
3302
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
3303
- case "ThrottlingException":
3304
- case "com.amazonaws.pinpointsmsvoicev2#ThrottlingException":
3305
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
3306
- case "ValidationException":
3307
- case "com.amazonaws.pinpointsmsvoicev2#ValidationException":
3308
- throw await de_ValidationExceptionRes(parsedOutput, context);
3309
- default:
3310
- const parsedBody = parsedOutput.body;
3311
- return throwDefaultError({
3312
- output,
3313
- parsedBody,
3314
- errorCode
3315
- });
3316
- }
3317
- }, "de_ListRegistrationAssociationsCommandError");
3318
1841
  var de_ListTagsForResourceCommand = /* @__PURE__ */ __name(async (output, context) => {
3319
1842
  if (output.statusCode >= 300) {
3320
- return de_ListTagsForResourceCommandError(output, context);
1843
+ return de_CommandError(output, context);
3321
1844
  }
3322
1845
  const data = await parseBody(output.body, context);
3323
1846
  let contents = {};
@@ -3328,40 +1851,9 @@ var de_ListTagsForResourceCommand = /* @__PURE__ */ __name(async (output, contex
3328
1851
  };
3329
1852
  return response;
3330
1853
  }, "de_ListTagsForResourceCommand");
3331
- var de_ListTagsForResourceCommandError = /* @__PURE__ */ __name(async (output, context) => {
3332
- const parsedOutput = {
3333
- ...output,
3334
- body: await parseErrorBody(output.body, context)
3335
- };
3336
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
3337
- switch (errorCode) {
3338
- case "AccessDeniedException":
3339
- case "com.amazonaws.pinpointsmsvoicev2#AccessDeniedException":
3340
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
3341
- case "InternalServerException":
3342
- case "com.amazonaws.pinpointsmsvoicev2#InternalServerException":
3343
- throw await de_InternalServerExceptionRes(parsedOutput, context);
3344
- case "ResourceNotFoundException":
3345
- case "com.amazonaws.pinpointsmsvoicev2#ResourceNotFoundException":
3346
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
3347
- case "ThrottlingException":
3348
- case "com.amazonaws.pinpointsmsvoicev2#ThrottlingException":
3349
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
3350
- case "ValidationException":
3351
- case "com.amazonaws.pinpointsmsvoicev2#ValidationException":
3352
- throw await de_ValidationExceptionRes(parsedOutput, context);
3353
- default:
3354
- const parsedBody = parsedOutput.body;
3355
- return throwDefaultError({
3356
- output,
3357
- parsedBody,
3358
- errorCode
3359
- });
3360
- }
3361
- }, "de_ListTagsForResourceCommandError");
3362
1854
  var de_PutKeywordCommand = /* @__PURE__ */ __name(async (output, context) => {
3363
1855
  if (output.statusCode >= 300) {
3364
- return de_PutKeywordCommandError(output, context);
1856
+ return de_CommandError(output, context);
3365
1857
  }
3366
1858
  const data = await parseBody(output.body, context);
3367
1859
  let contents = {};
@@ -3372,46 +1864,9 @@ var de_PutKeywordCommand = /* @__PURE__ */ __name(async (output, context) => {
3372
1864
  };
3373
1865
  return response;
3374
1866
  }, "de_PutKeywordCommand");
3375
- var de_PutKeywordCommandError = /* @__PURE__ */ __name(async (output, context) => {
3376
- const parsedOutput = {
3377
- ...output,
3378
- body: await parseErrorBody(output.body, context)
3379
- };
3380
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
3381
- switch (errorCode) {
3382
- case "AccessDeniedException":
3383
- case "com.amazonaws.pinpointsmsvoicev2#AccessDeniedException":
3384
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
3385
- case "ConflictException":
3386
- case "com.amazonaws.pinpointsmsvoicev2#ConflictException":
3387
- throw await de_ConflictExceptionRes(parsedOutput, context);
3388
- case "InternalServerException":
3389
- case "com.amazonaws.pinpointsmsvoicev2#InternalServerException":
3390
- throw await de_InternalServerExceptionRes(parsedOutput, context);
3391
- case "ResourceNotFoundException":
3392
- case "com.amazonaws.pinpointsmsvoicev2#ResourceNotFoundException":
3393
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
3394
- case "ServiceQuotaExceededException":
3395
- case "com.amazonaws.pinpointsmsvoicev2#ServiceQuotaExceededException":
3396
- throw await de_ServiceQuotaExceededExceptionRes(parsedOutput, context);
3397
- case "ThrottlingException":
3398
- case "com.amazonaws.pinpointsmsvoicev2#ThrottlingException":
3399
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
3400
- case "ValidationException":
3401
- case "com.amazonaws.pinpointsmsvoicev2#ValidationException":
3402
- throw await de_ValidationExceptionRes(parsedOutput, context);
3403
- default:
3404
- const parsedBody = parsedOutput.body;
3405
- return throwDefaultError({
3406
- output,
3407
- parsedBody,
3408
- errorCode
3409
- });
3410
- }
3411
- }, "de_PutKeywordCommandError");
3412
1867
  var de_PutOptedOutNumberCommand = /* @__PURE__ */ __name(async (output, context) => {
3413
1868
  if (output.statusCode >= 300) {
3414
- return de_PutOptedOutNumberCommandError(output, context);
1869
+ return de_CommandError(output, context);
3415
1870
  }
3416
1871
  const data = await parseBody(output.body, context);
3417
1872
  let contents = {};
@@ -3422,40 +1877,9 @@ var de_PutOptedOutNumberCommand = /* @__PURE__ */ __name(async (output, context)
3422
1877
  };
3423
1878
  return response;
3424
1879
  }, "de_PutOptedOutNumberCommand");
3425
- var de_PutOptedOutNumberCommandError = /* @__PURE__ */ __name(async (output, context) => {
3426
- const parsedOutput = {
3427
- ...output,
3428
- body: await parseErrorBody(output.body, context)
3429
- };
3430
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
3431
- switch (errorCode) {
3432
- case "AccessDeniedException":
3433
- case "com.amazonaws.pinpointsmsvoicev2#AccessDeniedException":
3434
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
3435
- case "InternalServerException":
3436
- case "com.amazonaws.pinpointsmsvoicev2#InternalServerException":
3437
- throw await de_InternalServerExceptionRes(parsedOutput, context);
3438
- case "ResourceNotFoundException":
3439
- case "com.amazonaws.pinpointsmsvoicev2#ResourceNotFoundException":
3440
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
3441
- case "ThrottlingException":
3442
- case "com.amazonaws.pinpointsmsvoicev2#ThrottlingException":
3443
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
3444
- case "ValidationException":
3445
- case "com.amazonaws.pinpointsmsvoicev2#ValidationException":
3446
- throw await de_ValidationExceptionRes(parsedOutput, context);
3447
- default:
3448
- const parsedBody = parsedOutput.body;
3449
- return throwDefaultError({
3450
- output,
3451
- parsedBody,
3452
- errorCode
3453
- });
3454
- }
3455
- }, "de_PutOptedOutNumberCommandError");
3456
1880
  var de_PutRegistrationFieldValueCommand = /* @__PURE__ */ __name(async (output, context) => {
3457
1881
  if (output.statusCode >= 300) {
3458
- return de_PutRegistrationFieldValueCommandError(output, context);
1882
+ return de_CommandError(output, context);
3459
1883
  }
3460
1884
  const data = await parseBody(output.body, context);
3461
1885
  let contents = {};
@@ -3466,90 +1890,22 @@ var de_PutRegistrationFieldValueCommand = /* @__PURE__ */ __name(async (output,
3466
1890
  };
3467
1891
  return response;
3468
1892
  }, "de_PutRegistrationFieldValueCommand");
3469
- var de_PutRegistrationFieldValueCommandError = /* @__PURE__ */ __name(async (output, context) => {
3470
- const parsedOutput = {
3471
- ...output,
3472
- body: await parseErrorBody(output.body, context)
3473
- };
3474
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
3475
- switch (errorCode) {
3476
- case "AccessDeniedException":
3477
- case "com.amazonaws.pinpointsmsvoicev2#AccessDeniedException":
3478
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
3479
- case "ConflictException":
3480
- case "com.amazonaws.pinpointsmsvoicev2#ConflictException":
3481
- throw await de_ConflictExceptionRes(parsedOutput, context);
3482
- case "InternalServerException":
3483
- case "com.amazonaws.pinpointsmsvoicev2#InternalServerException":
3484
- throw await de_InternalServerExceptionRes(parsedOutput, context);
3485
- case "ResourceNotFoundException":
3486
- case "com.amazonaws.pinpointsmsvoicev2#ResourceNotFoundException":
3487
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
3488
- case "ThrottlingException":
3489
- case "com.amazonaws.pinpointsmsvoicev2#ThrottlingException":
3490
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
3491
- case "ValidationException":
3492
- case "com.amazonaws.pinpointsmsvoicev2#ValidationException":
3493
- throw await de_ValidationExceptionRes(parsedOutput, context);
3494
- default:
3495
- const parsedBody = parsedOutput.body;
3496
- return throwDefaultError({
3497
- output,
3498
- parsedBody,
3499
- errorCode
3500
- });
3501
- }
3502
- }, "de_PutRegistrationFieldValueCommandError");
3503
- var de_ReleasePhoneNumberCommand = /* @__PURE__ */ __name(async (output, context) => {
3504
- if (output.statusCode >= 300) {
3505
- return de_ReleasePhoneNumberCommandError(output, context);
3506
- }
3507
- const data = await parseBody(output.body, context);
3508
- let contents = {};
3509
- contents = de_ReleasePhoneNumberResult(data, context);
3510
- const response = {
3511
- $metadata: deserializeMetadata(output),
3512
- ...contents
1893
+ var de_ReleasePhoneNumberCommand = /* @__PURE__ */ __name(async (output, context) => {
1894
+ if (output.statusCode >= 300) {
1895
+ return de_CommandError(output, context);
1896
+ }
1897
+ const data = await parseBody(output.body, context);
1898
+ let contents = {};
1899
+ contents = de_ReleasePhoneNumberResult(data, context);
1900
+ const response = {
1901
+ $metadata: deserializeMetadata(output),
1902
+ ...contents
3513
1903
  };
3514
1904
  return response;
3515
1905
  }, "de_ReleasePhoneNumberCommand");
3516
- var de_ReleasePhoneNumberCommandError = /* @__PURE__ */ __name(async (output, context) => {
3517
- const parsedOutput = {
3518
- ...output,
3519
- body: await parseErrorBody(output.body, context)
3520
- };
3521
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
3522
- switch (errorCode) {
3523
- case "AccessDeniedException":
3524
- case "com.amazonaws.pinpointsmsvoicev2#AccessDeniedException":
3525
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
3526
- case "ConflictException":
3527
- case "com.amazonaws.pinpointsmsvoicev2#ConflictException":
3528
- throw await de_ConflictExceptionRes(parsedOutput, context);
3529
- case "InternalServerException":
3530
- case "com.amazonaws.pinpointsmsvoicev2#InternalServerException":
3531
- throw await de_InternalServerExceptionRes(parsedOutput, context);
3532
- case "ResourceNotFoundException":
3533
- case "com.amazonaws.pinpointsmsvoicev2#ResourceNotFoundException":
3534
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
3535
- case "ThrottlingException":
3536
- case "com.amazonaws.pinpointsmsvoicev2#ThrottlingException":
3537
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
3538
- case "ValidationException":
3539
- case "com.amazonaws.pinpointsmsvoicev2#ValidationException":
3540
- throw await de_ValidationExceptionRes(parsedOutput, context);
3541
- default:
3542
- const parsedBody = parsedOutput.body;
3543
- return throwDefaultError({
3544
- output,
3545
- parsedBody,
3546
- errorCode
3547
- });
3548
- }
3549
- }, "de_ReleasePhoneNumberCommandError");
3550
1906
  var de_ReleaseSenderIdCommand = /* @__PURE__ */ __name(async (output, context) => {
3551
1907
  if (output.statusCode >= 300) {
3552
- return de_ReleaseSenderIdCommandError(output, context);
1908
+ return de_CommandError(output, context);
3553
1909
  }
3554
1910
  const data = await parseBody(output.body, context);
3555
1911
  let contents = {};
@@ -3560,43 +1916,9 @@ var de_ReleaseSenderIdCommand = /* @__PURE__ */ __name(async (output, context) =
3560
1916
  };
3561
1917
  return response;
3562
1918
  }, "de_ReleaseSenderIdCommand");
3563
- var de_ReleaseSenderIdCommandError = /* @__PURE__ */ __name(async (output, context) => {
3564
- const parsedOutput = {
3565
- ...output,
3566
- body: await parseErrorBody(output.body, context)
3567
- };
3568
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
3569
- switch (errorCode) {
3570
- case "AccessDeniedException":
3571
- case "com.amazonaws.pinpointsmsvoicev2#AccessDeniedException":
3572
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
3573
- case "ConflictException":
3574
- case "com.amazonaws.pinpointsmsvoicev2#ConflictException":
3575
- throw await de_ConflictExceptionRes(parsedOutput, context);
3576
- case "InternalServerException":
3577
- case "com.amazonaws.pinpointsmsvoicev2#InternalServerException":
3578
- throw await de_InternalServerExceptionRes(parsedOutput, context);
3579
- case "ResourceNotFoundException":
3580
- case "com.amazonaws.pinpointsmsvoicev2#ResourceNotFoundException":
3581
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
3582
- case "ThrottlingException":
3583
- case "com.amazonaws.pinpointsmsvoicev2#ThrottlingException":
3584
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
3585
- case "ValidationException":
3586
- case "com.amazonaws.pinpointsmsvoicev2#ValidationException":
3587
- throw await de_ValidationExceptionRes(parsedOutput, context);
3588
- default:
3589
- const parsedBody = parsedOutput.body;
3590
- return throwDefaultError({
3591
- output,
3592
- parsedBody,
3593
- errorCode
3594
- });
3595
- }
3596
- }, "de_ReleaseSenderIdCommandError");
3597
1919
  var de_RequestPhoneNumberCommand = /* @__PURE__ */ __name(async (output, context) => {
3598
1920
  if (output.statusCode >= 300) {
3599
- return de_RequestPhoneNumberCommandError(output, context);
1921
+ return de_CommandError(output, context);
3600
1922
  }
3601
1923
  const data = await parseBody(output.body, context);
3602
1924
  let contents = {};
@@ -3607,46 +1929,9 @@ var de_RequestPhoneNumberCommand = /* @__PURE__ */ __name(async (output, context
3607
1929
  };
3608
1930
  return response;
3609
1931
  }, "de_RequestPhoneNumberCommand");
3610
- var de_RequestPhoneNumberCommandError = /* @__PURE__ */ __name(async (output, context) => {
3611
- const parsedOutput = {
3612
- ...output,
3613
- body: await parseErrorBody(output.body, context)
3614
- };
3615
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
3616
- switch (errorCode) {
3617
- case "AccessDeniedException":
3618
- case "com.amazonaws.pinpointsmsvoicev2#AccessDeniedException":
3619
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
3620
- case "ConflictException":
3621
- case "com.amazonaws.pinpointsmsvoicev2#ConflictException":
3622
- throw await de_ConflictExceptionRes(parsedOutput, context);
3623
- case "InternalServerException":
3624
- case "com.amazonaws.pinpointsmsvoicev2#InternalServerException":
3625
- throw await de_InternalServerExceptionRes(parsedOutput, context);
3626
- case "ResourceNotFoundException":
3627
- case "com.amazonaws.pinpointsmsvoicev2#ResourceNotFoundException":
3628
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
3629
- case "ServiceQuotaExceededException":
3630
- case "com.amazonaws.pinpointsmsvoicev2#ServiceQuotaExceededException":
3631
- throw await de_ServiceQuotaExceededExceptionRes(parsedOutput, context);
3632
- case "ThrottlingException":
3633
- case "com.amazonaws.pinpointsmsvoicev2#ThrottlingException":
3634
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
3635
- case "ValidationException":
3636
- case "com.amazonaws.pinpointsmsvoicev2#ValidationException":
3637
- throw await de_ValidationExceptionRes(parsedOutput, context);
3638
- default:
3639
- const parsedBody = parsedOutput.body;
3640
- return throwDefaultError({
3641
- output,
3642
- parsedBody,
3643
- errorCode
3644
- });
3645
- }
3646
- }, "de_RequestPhoneNumberCommandError");
3647
1932
  var de_RequestSenderIdCommand = /* @__PURE__ */ __name(async (output, context) => {
3648
1933
  if (output.statusCode >= 300) {
3649
- return de_RequestSenderIdCommandError(output, context);
1934
+ return de_CommandError(output, context);
3650
1935
  }
3651
1936
  const data = await parseBody(output.body, context);
3652
1937
  let contents = {};
@@ -3657,43 +1942,9 @@ var de_RequestSenderIdCommand = /* @__PURE__ */ __name(async (output, context) =
3657
1942
  };
3658
1943
  return response;
3659
1944
  }, "de_RequestSenderIdCommand");
3660
- var de_RequestSenderIdCommandError = /* @__PURE__ */ __name(async (output, context) => {
3661
- const parsedOutput = {
3662
- ...output,
3663
- body: await parseErrorBody(output.body, context)
3664
- };
3665
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
3666
- switch (errorCode) {
3667
- case "AccessDeniedException":
3668
- case "com.amazonaws.pinpointsmsvoicev2#AccessDeniedException":
3669
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
3670
- case "ConflictException":
3671
- case "com.amazonaws.pinpointsmsvoicev2#ConflictException":
3672
- throw await de_ConflictExceptionRes(parsedOutput, context);
3673
- case "InternalServerException":
3674
- case "com.amazonaws.pinpointsmsvoicev2#InternalServerException":
3675
- throw await de_InternalServerExceptionRes(parsedOutput, context);
3676
- case "ServiceQuotaExceededException":
3677
- case "com.amazonaws.pinpointsmsvoicev2#ServiceQuotaExceededException":
3678
- throw await de_ServiceQuotaExceededExceptionRes(parsedOutput, context);
3679
- case "ThrottlingException":
3680
- case "com.amazonaws.pinpointsmsvoicev2#ThrottlingException":
3681
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
3682
- case "ValidationException":
3683
- case "com.amazonaws.pinpointsmsvoicev2#ValidationException":
3684
- throw await de_ValidationExceptionRes(parsedOutput, context);
3685
- default:
3686
- const parsedBody = parsedOutput.body;
3687
- return throwDefaultError({
3688
- output,
3689
- parsedBody,
3690
- errorCode
3691
- });
3692
- }
3693
- }, "de_RequestSenderIdCommandError");
3694
1945
  var de_SendDestinationNumberVerificationCodeCommand = /* @__PURE__ */ __name(async (output, context) => {
3695
1946
  if (output.statusCode >= 300) {
3696
- return de_SendDestinationNumberVerificationCodeCommandError(output, context);
1947
+ return de_CommandError(output, context);
3697
1948
  }
3698
1949
  const data = await parseBody(output.body, context);
3699
1950
  let contents = {};
@@ -3704,46 +1955,9 @@ var de_SendDestinationNumberVerificationCodeCommand = /* @__PURE__ */ __name(asy
3704
1955
  };
3705
1956
  return response;
3706
1957
  }, "de_SendDestinationNumberVerificationCodeCommand");
3707
- var de_SendDestinationNumberVerificationCodeCommandError = /* @__PURE__ */ __name(async (output, context) => {
3708
- const parsedOutput = {
3709
- ...output,
3710
- body: await parseErrorBody(output.body, context)
3711
- };
3712
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
3713
- switch (errorCode) {
3714
- case "AccessDeniedException":
3715
- case "com.amazonaws.pinpointsmsvoicev2#AccessDeniedException":
3716
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
3717
- case "ConflictException":
3718
- case "com.amazonaws.pinpointsmsvoicev2#ConflictException":
3719
- throw await de_ConflictExceptionRes(parsedOutput, context);
3720
- case "InternalServerException":
3721
- case "com.amazonaws.pinpointsmsvoicev2#InternalServerException":
3722
- throw await de_InternalServerExceptionRes(parsedOutput, context);
3723
- case "ResourceNotFoundException":
3724
- case "com.amazonaws.pinpointsmsvoicev2#ResourceNotFoundException":
3725
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
3726
- case "ServiceQuotaExceededException":
3727
- case "com.amazonaws.pinpointsmsvoicev2#ServiceQuotaExceededException":
3728
- throw await de_ServiceQuotaExceededExceptionRes(parsedOutput, context);
3729
- case "ThrottlingException":
3730
- case "com.amazonaws.pinpointsmsvoicev2#ThrottlingException":
3731
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
3732
- case "ValidationException":
3733
- case "com.amazonaws.pinpointsmsvoicev2#ValidationException":
3734
- throw await de_ValidationExceptionRes(parsedOutput, context);
3735
- default:
3736
- const parsedBody = parsedOutput.body;
3737
- return throwDefaultError({
3738
- output,
3739
- parsedBody,
3740
- errorCode
3741
- });
3742
- }
3743
- }, "de_SendDestinationNumberVerificationCodeCommandError");
3744
1958
  var de_SendTextMessageCommand = /* @__PURE__ */ __name(async (output, context) => {
3745
1959
  if (output.statusCode >= 300) {
3746
- return de_SendTextMessageCommandError(output, context);
1960
+ return de_CommandError(output, context);
3747
1961
  }
3748
1962
  const data = await parseBody(output.body, context);
3749
1963
  let contents = {};
@@ -3754,46 +1968,9 @@ var de_SendTextMessageCommand = /* @__PURE__ */ __name(async (output, context) =
3754
1968
  };
3755
1969
  return response;
3756
1970
  }, "de_SendTextMessageCommand");
3757
- var de_SendTextMessageCommandError = /* @__PURE__ */ __name(async (output, context) => {
3758
- const parsedOutput = {
3759
- ...output,
3760
- body: await parseErrorBody(output.body, context)
3761
- };
3762
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
3763
- switch (errorCode) {
3764
- case "AccessDeniedException":
3765
- case "com.amazonaws.pinpointsmsvoicev2#AccessDeniedException":
3766
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
3767
- case "ConflictException":
3768
- case "com.amazonaws.pinpointsmsvoicev2#ConflictException":
3769
- throw await de_ConflictExceptionRes(parsedOutput, context);
3770
- case "InternalServerException":
3771
- case "com.amazonaws.pinpointsmsvoicev2#InternalServerException":
3772
- throw await de_InternalServerExceptionRes(parsedOutput, context);
3773
- case "ResourceNotFoundException":
3774
- case "com.amazonaws.pinpointsmsvoicev2#ResourceNotFoundException":
3775
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
3776
- case "ServiceQuotaExceededException":
3777
- case "com.amazonaws.pinpointsmsvoicev2#ServiceQuotaExceededException":
3778
- throw await de_ServiceQuotaExceededExceptionRes(parsedOutput, context);
3779
- case "ThrottlingException":
3780
- case "com.amazonaws.pinpointsmsvoicev2#ThrottlingException":
3781
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
3782
- case "ValidationException":
3783
- case "com.amazonaws.pinpointsmsvoicev2#ValidationException":
3784
- throw await de_ValidationExceptionRes(parsedOutput, context);
3785
- default:
3786
- const parsedBody = parsedOutput.body;
3787
- return throwDefaultError({
3788
- output,
3789
- parsedBody,
3790
- errorCode
3791
- });
3792
- }
3793
- }, "de_SendTextMessageCommandError");
3794
1971
  var de_SendVoiceMessageCommand = /* @__PURE__ */ __name(async (output, context) => {
3795
1972
  if (output.statusCode >= 300) {
3796
- return de_SendVoiceMessageCommandError(output, context);
1973
+ return de_CommandError(output, context);
3797
1974
  }
3798
1975
  const data = await parseBody(output.body, context);
3799
1976
  let contents = {};
@@ -3804,46 +1981,9 @@ var de_SendVoiceMessageCommand = /* @__PURE__ */ __name(async (output, context)
3804
1981
  };
3805
1982
  return response;
3806
1983
  }, "de_SendVoiceMessageCommand");
3807
- var de_SendVoiceMessageCommandError = /* @__PURE__ */ __name(async (output, context) => {
3808
- const parsedOutput = {
3809
- ...output,
3810
- body: await parseErrorBody(output.body, context)
3811
- };
3812
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
3813
- switch (errorCode) {
3814
- case "AccessDeniedException":
3815
- case "com.amazonaws.pinpointsmsvoicev2#AccessDeniedException":
3816
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
3817
- case "ConflictException":
3818
- case "com.amazonaws.pinpointsmsvoicev2#ConflictException":
3819
- throw await de_ConflictExceptionRes(parsedOutput, context);
3820
- case "InternalServerException":
3821
- case "com.amazonaws.pinpointsmsvoicev2#InternalServerException":
3822
- throw await de_InternalServerExceptionRes(parsedOutput, context);
3823
- case "ResourceNotFoundException":
3824
- case "com.amazonaws.pinpointsmsvoicev2#ResourceNotFoundException":
3825
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
3826
- case "ServiceQuotaExceededException":
3827
- case "com.amazonaws.pinpointsmsvoicev2#ServiceQuotaExceededException":
3828
- throw await de_ServiceQuotaExceededExceptionRes(parsedOutput, context);
3829
- case "ThrottlingException":
3830
- case "com.amazonaws.pinpointsmsvoicev2#ThrottlingException":
3831
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
3832
- case "ValidationException":
3833
- case "com.amazonaws.pinpointsmsvoicev2#ValidationException":
3834
- throw await de_ValidationExceptionRes(parsedOutput, context);
3835
- default:
3836
- const parsedBody = parsedOutput.body;
3837
- return throwDefaultError({
3838
- output,
3839
- parsedBody,
3840
- errorCode
3841
- });
3842
- }
3843
- }, "de_SendVoiceMessageCommandError");
3844
1984
  var de_SetDefaultMessageTypeCommand = /* @__PURE__ */ __name(async (output, context) => {
3845
1985
  if (output.statusCode >= 300) {
3846
- return de_SetDefaultMessageTypeCommandError(output, context);
1986
+ return de_CommandError(output, context);
3847
1987
  }
3848
1988
  const data = await parseBody(output.body, context);
3849
1989
  let contents = {};
@@ -3854,40 +1994,9 @@ var de_SetDefaultMessageTypeCommand = /* @__PURE__ */ __name(async (output, cont
3854
1994
  };
3855
1995
  return response;
3856
1996
  }, "de_SetDefaultMessageTypeCommand");
3857
- var de_SetDefaultMessageTypeCommandError = /* @__PURE__ */ __name(async (output, context) => {
3858
- const parsedOutput = {
3859
- ...output,
3860
- body: await parseErrorBody(output.body, context)
3861
- };
3862
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
3863
- switch (errorCode) {
3864
- case "AccessDeniedException":
3865
- case "com.amazonaws.pinpointsmsvoicev2#AccessDeniedException":
3866
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
3867
- case "InternalServerException":
3868
- case "com.amazonaws.pinpointsmsvoicev2#InternalServerException":
3869
- throw await de_InternalServerExceptionRes(parsedOutput, context);
3870
- case "ResourceNotFoundException":
3871
- case "com.amazonaws.pinpointsmsvoicev2#ResourceNotFoundException":
3872
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
3873
- case "ThrottlingException":
3874
- case "com.amazonaws.pinpointsmsvoicev2#ThrottlingException":
3875
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
3876
- case "ValidationException":
3877
- case "com.amazonaws.pinpointsmsvoicev2#ValidationException":
3878
- throw await de_ValidationExceptionRes(parsedOutput, context);
3879
- default:
3880
- const parsedBody = parsedOutput.body;
3881
- return throwDefaultError({
3882
- output,
3883
- parsedBody,
3884
- errorCode
3885
- });
3886
- }
3887
- }, "de_SetDefaultMessageTypeCommandError");
3888
1997
  var de_SetDefaultSenderIdCommand = /* @__PURE__ */ __name(async (output, context) => {
3889
1998
  if (output.statusCode >= 300) {
3890
- return de_SetDefaultSenderIdCommandError(output, context);
1999
+ return de_CommandError(output, context);
3891
2000
  }
3892
2001
  const data = await parseBody(output.body, context);
3893
2002
  let contents = {};
@@ -3898,81 +2007,22 @@ var de_SetDefaultSenderIdCommand = /* @__PURE__ */ __name(async (output, context
3898
2007
  };
3899
2008
  return response;
3900
2009
  }, "de_SetDefaultSenderIdCommand");
3901
- var de_SetDefaultSenderIdCommandError = /* @__PURE__ */ __name(async (output, context) => {
3902
- const parsedOutput = {
3903
- ...output,
3904
- body: await parseErrorBody(output.body, context)
3905
- };
3906
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
3907
- switch (errorCode) {
3908
- case "AccessDeniedException":
3909
- case "com.amazonaws.pinpointsmsvoicev2#AccessDeniedException":
3910
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
3911
- case "InternalServerException":
3912
- case "com.amazonaws.pinpointsmsvoicev2#InternalServerException":
3913
- throw await de_InternalServerExceptionRes(parsedOutput, context);
3914
- case "ResourceNotFoundException":
3915
- case "com.amazonaws.pinpointsmsvoicev2#ResourceNotFoundException":
3916
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
3917
- case "ThrottlingException":
3918
- case "com.amazonaws.pinpointsmsvoicev2#ThrottlingException":
3919
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
3920
- case "ValidationException":
3921
- case "com.amazonaws.pinpointsmsvoicev2#ValidationException":
3922
- throw await de_ValidationExceptionRes(parsedOutput, context);
3923
- default:
3924
- const parsedBody = parsedOutput.body;
3925
- return throwDefaultError({
3926
- output,
3927
- parsedBody,
3928
- errorCode
3929
- });
3930
- }
3931
- }, "de_SetDefaultSenderIdCommandError");
3932
2010
  var de_SetTextMessageSpendLimitOverrideCommand = /* @__PURE__ */ __name(async (output, context) => {
3933
2011
  if (output.statusCode >= 300) {
3934
- return de_SetTextMessageSpendLimitOverrideCommandError(output, context);
3935
- }
3936
- const data = await parseBody(output.body, context);
3937
- let contents = {};
3938
- contents = (0, import_smithy_client._json)(data);
3939
- const response = {
3940
- $metadata: deserializeMetadata(output),
3941
- ...contents
3942
- };
3943
- return response;
3944
- }, "de_SetTextMessageSpendLimitOverrideCommand");
3945
- var de_SetTextMessageSpendLimitOverrideCommandError = /* @__PURE__ */ __name(async (output, context) => {
3946
- const parsedOutput = {
3947
- ...output,
3948
- body: await parseErrorBody(output.body, context)
3949
- };
3950
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
3951
- switch (errorCode) {
3952
- case "AccessDeniedException":
3953
- case "com.amazonaws.pinpointsmsvoicev2#AccessDeniedException":
3954
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
3955
- case "InternalServerException":
3956
- case "com.amazonaws.pinpointsmsvoicev2#InternalServerException":
3957
- throw await de_InternalServerExceptionRes(parsedOutput, context);
3958
- case "ThrottlingException":
3959
- case "com.amazonaws.pinpointsmsvoicev2#ThrottlingException":
3960
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
3961
- case "ValidationException":
3962
- case "com.amazonaws.pinpointsmsvoicev2#ValidationException":
3963
- throw await de_ValidationExceptionRes(parsedOutput, context);
3964
- default:
3965
- const parsedBody = parsedOutput.body;
3966
- return throwDefaultError({
3967
- output,
3968
- parsedBody,
3969
- errorCode
3970
- });
2012
+ return de_CommandError(output, context);
3971
2013
  }
3972
- }, "de_SetTextMessageSpendLimitOverrideCommandError");
2014
+ const data = await parseBody(output.body, context);
2015
+ let contents = {};
2016
+ contents = (0, import_smithy_client._json)(data);
2017
+ const response = {
2018
+ $metadata: deserializeMetadata(output),
2019
+ ...contents
2020
+ };
2021
+ return response;
2022
+ }, "de_SetTextMessageSpendLimitOverrideCommand");
3973
2023
  var de_SetVoiceMessageSpendLimitOverrideCommand = /* @__PURE__ */ __name(async (output, context) => {
3974
2024
  if (output.statusCode >= 300) {
3975
- return de_SetVoiceMessageSpendLimitOverrideCommandError(output, context);
2025
+ return de_CommandError(output, context);
3976
2026
  }
3977
2027
  const data = await parseBody(output.body, context);
3978
2028
  let contents = {};
@@ -3983,37 +2033,9 @@ var de_SetVoiceMessageSpendLimitOverrideCommand = /* @__PURE__ */ __name(async (
3983
2033
  };
3984
2034
  return response;
3985
2035
  }, "de_SetVoiceMessageSpendLimitOverrideCommand");
3986
- var de_SetVoiceMessageSpendLimitOverrideCommandError = /* @__PURE__ */ __name(async (output, context) => {
3987
- const parsedOutput = {
3988
- ...output,
3989
- body: await parseErrorBody(output.body, context)
3990
- };
3991
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
3992
- switch (errorCode) {
3993
- case "AccessDeniedException":
3994
- case "com.amazonaws.pinpointsmsvoicev2#AccessDeniedException":
3995
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
3996
- case "InternalServerException":
3997
- case "com.amazonaws.pinpointsmsvoicev2#InternalServerException":
3998
- throw await de_InternalServerExceptionRes(parsedOutput, context);
3999
- case "ThrottlingException":
4000
- case "com.amazonaws.pinpointsmsvoicev2#ThrottlingException":
4001
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
4002
- case "ValidationException":
4003
- case "com.amazonaws.pinpointsmsvoicev2#ValidationException":
4004
- throw await de_ValidationExceptionRes(parsedOutput, context);
4005
- default:
4006
- const parsedBody = parsedOutput.body;
4007
- return throwDefaultError({
4008
- output,
4009
- parsedBody,
4010
- errorCode
4011
- });
4012
- }
4013
- }, "de_SetVoiceMessageSpendLimitOverrideCommandError");
4014
2036
  var de_SubmitRegistrationVersionCommand = /* @__PURE__ */ __name(async (output, context) => {
4015
2037
  if (output.statusCode >= 300) {
4016
- return de_SubmitRegistrationVersionCommandError(output, context);
2038
+ return de_CommandError(output, context);
4017
2039
  }
4018
2040
  const data = await parseBody(output.body, context);
4019
2041
  let contents = {};
@@ -4024,43 +2046,9 @@ var de_SubmitRegistrationVersionCommand = /* @__PURE__ */ __name(async (output,
4024
2046
  };
4025
2047
  return response;
4026
2048
  }, "de_SubmitRegistrationVersionCommand");
4027
- var de_SubmitRegistrationVersionCommandError = /* @__PURE__ */ __name(async (output, context) => {
4028
- const parsedOutput = {
4029
- ...output,
4030
- body: await parseErrorBody(output.body, context)
4031
- };
4032
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
4033
- switch (errorCode) {
4034
- case "AccessDeniedException":
4035
- case "com.amazonaws.pinpointsmsvoicev2#AccessDeniedException":
4036
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
4037
- case "ConflictException":
4038
- case "com.amazonaws.pinpointsmsvoicev2#ConflictException":
4039
- throw await de_ConflictExceptionRes(parsedOutput, context);
4040
- case "InternalServerException":
4041
- case "com.amazonaws.pinpointsmsvoicev2#InternalServerException":
4042
- throw await de_InternalServerExceptionRes(parsedOutput, context);
4043
- case "ResourceNotFoundException":
4044
- case "com.amazonaws.pinpointsmsvoicev2#ResourceNotFoundException":
4045
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
4046
- case "ThrottlingException":
4047
- case "com.amazonaws.pinpointsmsvoicev2#ThrottlingException":
4048
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
4049
- case "ValidationException":
4050
- case "com.amazonaws.pinpointsmsvoicev2#ValidationException":
4051
- throw await de_ValidationExceptionRes(parsedOutput, context);
4052
- default:
4053
- const parsedBody = parsedOutput.body;
4054
- return throwDefaultError({
4055
- output,
4056
- parsedBody,
4057
- errorCode
4058
- });
4059
- }
4060
- }, "de_SubmitRegistrationVersionCommandError");
4061
2049
  var de_TagResourceCommand = /* @__PURE__ */ __name(async (output, context) => {
4062
2050
  if (output.statusCode >= 300) {
4063
- return de_TagResourceCommandError(output, context);
2051
+ return de_CommandError(output, context);
4064
2052
  }
4065
2053
  const data = await parseBody(output.body, context);
4066
2054
  let contents = {};
@@ -4071,43 +2059,9 @@ var de_TagResourceCommand = /* @__PURE__ */ __name(async (output, context) => {
4071
2059
  };
4072
2060
  return response;
4073
2061
  }, "de_TagResourceCommand");
4074
- var de_TagResourceCommandError = /* @__PURE__ */ __name(async (output, context) => {
4075
- const parsedOutput = {
4076
- ...output,
4077
- body: await parseErrorBody(output.body, context)
4078
- };
4079
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
4080
- switch (errorCode) {
4081
- case "AccessDeniedException":
4082
- case "com.amazonaws.pinpointsmsvoicev2#AccessDeniedException":
4083
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
4084
- case "InternalServerException":
4085
- case "com.amazonaws.pinpointsmsvoicev2#InternalServerException":
4086
- throw await de_InternalServerExceptionRes(parsedOutput, context);
4087
- case "ResourceNotFoundException":
4088
- case "com.amazonaws.pinpointsmsvoicev2#ResourceNotFoundException":
4089
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
4090
- case "ServiceQuotaExceededException":
4091
- case "com.amazonaws.pinpointsmsvoicev2#ServiceQuotaExceededException":
4092
- throw await de_ServiceQuotaExceededExceptionRes(parsedOutput, context);
4093
- case "ThrottlingException":
4094
- case "com.amazonaws.pinpointsmsvoicev2#ThrottlingException":
4095
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
4096
- case "ValidationException":
4097
- case "com.amazonaws.pinpointsmsvoicev2#ValidationException":
4098
- throw await de_ValidationExceptionRes(parsedOutput, context);
4099
- default:
4100
- const parsedBody = parsedOutput.body;
4101
- return throwDefaultError({
4102
- output,
4103
- parsedBody,
4104
- errorCode
4105
- });
4106
- }
4107
- }, "de_TagResourceCommandError");
4108
2062
  var de_UntagResourceCommand = /* @__PURE__ */ __name(async (output, context) => {
4109
2063
  if (output.statusCode >= 300) {
4110
- return de_UntagResourceCommandError(output, context);
2064
+ return de_CommandError(output, context);
4111
2065
  }
4112
2066
  const data = await parseBody(output.body, context);
4113
2067
  let contents = {};
@@ -4118,40 +2072,9 @@ var de_UntagResourceCommand = /* @__PURE__ */ __name(async (output, context) =>
4118
2072
  };
4119
2073
  return response;
4120
2074
  }, "de_UntagResourceCommand");
4121
- var de_UntagResourceCommandError = /* @__PURE__ */ __name(async (output, context) => {
4122
- const parsedOutput = {
4123
- ...output,
4124
- body: await parseErrorBody(output.body, context)
4125
- };
4126
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
4127
- switch (errorCode) {
4128
- case "AccessDeniedException":
4129
- case "com.amazonaws.pinpointsmsvoicev2#AccessDeniedException":
4130
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
4131
- case "InternalServerException":
4132
- case "com.amazonaws.pinpointsmsvoicev2#InternalServerException":
4133
- throw await de_InternalServerExceptionRes(parsedOutput, context);
4134
- case "ResourceNotFoundException":
4135
- case "com.amazonaws.pinpointsmsvoicev2#ResourceNotFoundException":
4136
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
4137
- case "ThrottlingException":
4138
- case "com.amazonaws.pinpointsmsvoicev2#ThrottlingException":
4139
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
4140
- case "ValidationException":
4141
- case "com.amazonaws.pinpointsmsvoicev2#ValidationException":
4142
- throw await de_ValidationExceptionRes(parsedOutput, context);
4143
- default:
4144
- const parsedBody = parsedOutput.body;
4145
- return throwDefaultError({
4146
- output,
4147
- parsedBody,
4148
- errorCode
4149
- });
4150
- }
4151
- }, "de_UntagResourceCommandError");
4152
2075
  var de_UpdateEventDestinationCommand = /* @__PURE__ */ __name(async (output, context) => {
4153
2076
  if (output.statusCode >= 300) {
4154
- return de_UpdateEventDestinationCommandError(output, context);
2077
+ return de_CommandError(output, context);
4155
2078
  }
4156
2079
  const data = await parseBody(output.body, context);
4157
2080
  let contents = {};
@@ -4162,43 +2085,9 @@ var de_UpdateEventDestinationCommand = /* @__PURE__ */ __name(async (output, con
4162
2085
  };
4163
2086
  return response;
4164
2087
  }, "de_UpdateEventDestinationCommand");
4165
- var de_UpdateEventDestinationCommandError = /* @__PURE__ */ __name(async (output, context) => {
4166
- const parsedOutput = {
4167
- ...output,
4168
- body: await parseErrorBody(output.body, context)
4169
- };
4170
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
4171
- switch (errorCode) {
4172
- case "AccessDeniedException":
4173
- case "com.amazonaws.pinpointsmsvoicev2#AccessDeniedException":
4174
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
4175
- case "ConflictException":
4176
- case "com.amazonaws.pinpointsmsvoicev2#ConflictException":
4177
- throw await de_ConflictExceptionRes(parsedOutput, context);
4178
- case "InternalServerException":
4179
- case "com.amazonaws.pinpointsmsvoicev2#InternalServerException":
4180
- throw await de_InternalServerExceptionRes(parsedOutput, context);
4181
- case "ResourceNotFoundException":
4182
- case "com.amazonaws.pinpointsmsvoicev2#ResourceNotFoundException":
4183
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
4184
- case "ThrottlingException":
4185
- case "com.amazonaws.pinpointsmsvoicev2#ThrottlingException":
4186
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
4187
- case "ValidationException":
4188
- case "com.amazonaws.pinpointsmsvoicev2#ValidationException":
4189
- throw await de_ValidationExceptionRes(parsedOutput, context);
4190
- default:
4191
- const parsedBody = parsedOutput.body;
4192
- return throwDefaultError({
4193
- output,
4194
- parsedBody,
4195
- errorCode
4196
- });
4197
- }
4198
- }, "de_UpdateEventDestinationCommandError");
4199
2088
  var de_UpdatePhoneNumberCommand = /* @__PURE__ */ __name(async (output, context) => {
4200
2089
  if (output.statusCode >= 300) {
4201
- return de_UpdatePhoneNumberCommandError(output, context);
2090
+ return de_CommandError(output, context);
4202
2091
  }
4203
2092
  const data = await parseBody(output.body, context);
4204
2093
  let contents = {};
@@ -4209,43 +2098,9 @@ var de_UpdatePhoneNumberCommand = /* @__PURE__ */ __name(async (output, context)
4209
2098
  };
4210
2099
  return response;
4211
2100
  }, "de_UpdatePhoneNumberCommand");
4212
- var de_UpdatePhoneNumberCommandError = /* @__PURE__ */ __name(async (output, context) => {
4213
- const parsedOutput = {
4214
- ...output,
4215
- body: await parseErrorBody(output.body, context)
4216
- };
4217
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
4218
- switch (errorCode) {
4219
- case "AccessDeniedException":
4220
- case "com.amazonaws.pinpointsmsvoicev2#AccessDeniedException":
4221
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
4222
- case "ConflictException":
4223
- case "com.amazonaws.pinpointsmsvoicev2#ConflictException":
4224
- throw await de_ConflictExceptionRes(parsedOutput, context);
4225
- case "InternalServerException":
4226
- case "com.amazonaws.pinpointsmsvoicev2#InternalServerException":
4227
- throw await de_InternalServerExceptionRes(parsedOutput, context);
4228
- case "ResourceNotFoundException":
4229
- case "com.amazonaws.pinpointsmsvoicev2#ResourceNotFoundException":
4230
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
4231
- case "ThrottlingException":
4232
- case "com.amazonaws.pinpointsmsvoicev2#ThrottlingException":
4233
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
4234
- case "ValidationException":
4235
- case "com.amazonaws.pinpointsmsvoicev2#ValidationException":
4236
- throw await de_ValidationExceptionRes(parsedOutput, context);
4237
- default:
4238
- const parsedBody = parsedOutput.body;
4239
- return throwDefaultError({
4240
- output,
4241
- parsedBody,
4242
- errorCode
4243
- });
4244
- }
4245
- }, "de_UpdatePhoneNumberCommandError");
4246
2101
  var de_UpdatePoolCommand = /* @__PURE__ */ __name(async (output, context) => {
4247
2102
  if (output.statusCode >= 300) {
4248
- return de_UpdatePoolCommandError(output, context);
2103
+ return de_CommandError(output, context);
4249
2104
  }
4250
2105
  const data = await parseBody(output.body, context);
4251
2106
  let contents = {};
@@ -4256,43 +2111,9 @@ var de_UpdatePoolCommand = /* @__PURE__ */ __name(async (output, context) => {
4256
2111
  };
4257
2112
  return response;
4258
2113
  }, "de_UpdatePoolCommand");
4259
- var de_UpdatePoolCommandError = /* @__PURE__ */ __name(async (output, context) => {
4260
- const parsedOutput = {
4261
- ...output,
4262
- body: await parseErrorBody(output.body, context)
4263
- };
4264
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
4265
- switch (errorCode) {
4266
- case "AccessDeniedException":
4267
- case "com.amazonaws.pinpointsmsvoicev2#AccessDeniedException":
4268
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
4269
- case "ConflictException":
4270
- case "com.amazonaws.pinpointsmsvoicev2#ConflictException":
4271
- throw await de_ConflictExceptionRes(parsedOutput, context);
4272
- case "InternalServerException":
4273
- case "com.amazonaws.pinpointsmsvoicev2#InternalServerException":
4274
- throw await de_InternalServerExceptionRes(parsedOutput, context);
4275
- case "ResourceNotFoundException":
4276
- case "com.amazonaws.pinpointsmsvoicev2#ResourceNotFoundException":
4277
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
4278
- case "ThrottlingException":
4279
- case "com.amazonaws.pinpointsmsvoicev2#ThrottlingException":
4280
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
4281
- case "ValidationException":
4282
- case "com.amazonaws.pinpointsmsvoicev2#ValidationException":
4283
- throw await de_ValidationExceptionRes(parsedOutput, context);
4284
- default:
4285
- const parsedBody = parsedOutput.body;
4286
- return throwDefaultError({
4287
- output,
4288
- parsedBody,
4289
- errorCode
4290
- });
4291
- }
4292
- }, "de_UpdatePoolCommandError");
4293
2114
  var de_UpdateSenderIdCommand = /* @__PURE__ */ __name(async (output, context) => {
4294
2115
  if (output.statusCode >= 300) {
4295
- return de_UpdateSenderIdCommandError(output, context);
2116
+ return de_CommandError(output, context);
4296
2117
  }
4297
2118
  const data = await parseBody(output.body, context);
4298
2119
  let contents = {};
@@ -4303,40 +2124,9 @@ var de_UpdateSenderIdCommand = /* @__PURE__ */ __name(async (output, context) =>
4303
2124
  };
4304
2125
  return response;
4305
2126
  }, "de_UpdateSenderIdCommand");
4306
- var de_UpdateSenderIdCommandError = /* @__PURE__ */ __name(async (output, context) => {
4307
- const parsedOutput = {
4308
- ...output,
4309
- body: await parseErrorBody(output.body, context)
4310
- };
4311
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
4312
- switch (errorCode) {
4313
- case "AccessDeniedException":
4314
- case "com.amazonaws.pinpointsmsvoicev2#AccessDeniedException":
4315
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
4316
- case "InternalServerException":
4317
- case "com.amazonaws.pinpointsmsvoicev2#InternalServerException":
4318
- throw await de_InternalServerExceptionRes(parsedOutput, context);
4319
- case "ResourceNotFoundException":
4320
- case "com.amazonaws.pinpointsmsvoicev2#ResourceNotFoundException":
4321
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
4322
- case "ThrottlingException":
4323
- case "com.amazonaws.pinpointsmsvoicev2#ThrottlingException":
4324
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
4325
- case "ValidationException":
4326
- case "com.amazonaws.pinpointsmsvoicev2#ValidationException":
4327
- throw await de_ValidationExceptionRes(parsedOutput, context);
4328
- default:
4329
- const parsedBody = parsedOutput.body;
4330
- return throwDefaultError({
4331
- output,
4332
- parsedBody,
4333
- errorCode
4334
- });
4335
- }
4336
- }, "de_UpdateSenderIdCommandError");
4337
2127
  var de_VerifyDestinationNumberCommand = /* @__PURE__ */ __name(async (output, context) => {
4338
2128
  if (output.statusCode >= 300) {
4339
- return de_VerifyDestinationNumberCommandError(output, context);
2129
+ return de_CommandError(output, context);
4340
2130
  }
4341
2131
  const data = await parseBody(output.body, context);
4342
2132
  let contents = {};
@@ -4347,7 +2137,7 @@ var de_VerifyDestinationNumberCommand = /* @__PURE__ */ __name(async (output, co
4347
2137
  };
4348
2138
  return response;
4349
2139
  }, "de_VerifyDestinationNumberCommand");
4350
- var de_VerifyDestinationNumberCommandError = /* @__PURE__ */ __name(async (output, context) => {
2140
+ var de_CommandError = /* @__PURE__ */ __name(async (output, context) => {
4351
2141
  const parsedOutput = {
4352
2142
  ...output,
4353
2143
  body: await parseErrorBody(output.body, context)
@@ -4366,6 +2156,9 @@ var de_VerifyDestinationNumberCommandError = /* @__PURE__ */ __name(async (outpu
4366
2156
  case "ResourceNotFoundException":
4367
2157
  case "com.amazonaws.pinpointsmsvoicev2#ResourceNotFoundException":
4368
2158
  throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
2159
+ case "ServiceQuotaExceededException":
2160
+ case "com.amazonaws.pinpointsmsvoicev2#ServiceQuotaExceededException":
2161
+ throw await de_ServiceQuotaExceededExceptionRes(parsedOutput, context);
4369
2162
  case "ThrottlingException":
4370
2163
  case "com.amazonaws.pinpointsmsvoicev2#ThrottlingException":
4371
2164
  throw await de_ThrottlingExceptionRes(parsedOutput, context);
@@ -4380,7 +2173,7 @@ var de_VerifyDestinationNumberCommandError = /* @__PURE__ */ __name(async (outpu
4380
2173
  errorCode
4381
2174
  });
4382
2175
  }
4383
- }, "de_VerifyDestinationNumberCommandError");
2176
+ }, "de_CommandError");
4384
2177
  var de_AccessDeniedExceptionRes = /* @__PURE__ */ __name(async (parsedOutput, context) => {
4385
2178
  const body = parsedOutput.body;
4386
2179
  const deserialized = (0, import_smithy_client._json)(body);