@aws-sdk/client-networkmanager 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.
@@ -1166,7 +1166,7 @@ export const se_UpdateVpcAttachmentCommand = async (input, context) => {
1166
1166
  };
1167
1167
  export const de_AcceptAttachmentCommand = async (output, context) => {
1168
1168
  if (output.statusCode !== 200 && output.statusCode >= 300) {
1169
- return de_AcceptAttachmentCommandError(output, context);
1169
+ return de_CommandError(output, context);
1170
1170
  }
1171
1171
  const contents = map({
1172
1172
  $metadata: deserializeMetadata(output),
@@ -1178,43 +1178,9 @@ export const de_AcceptAttachmentCommand = async (output, context) => {
1178
1178
  Object.assign(contents, doc);
1179
1179
  return contents;
1180
1180
  };
1181
- const de_AcceptAttachmentCommandError = async (output, context) => {
1182
- const parsedOutput = {
1183
- ...output,
1184
- body: await parseErrorBody(output.body, context),
1185
- };
1186
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1187
- switch (errorCode) {
1188
- case "AccessDeniedException":
1189
- case "com.amazonaws.networkmanager#AccessDeniedException":
1190
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
1191
- case "ConflictException":
1192
- case "com.amazonaws.networkmanager#ConflictException":
1193
- throw await de_ConflictExceptionRes(parsedOutput, context);
1194
- case "InternalServerException":
1195
- case "com.amazonaws.networkmanager#InternalServerException":
1196
- throw await de_InternalServerExceptionRes(parsedOutput, context);
1197
- case "ResourceNotFoundException":
1198
- case "com.amazonaws.networkmanager#ResourceNotFoundException":
1199
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
1200
- case "ThrottlingException":
1201
- case "com.amazonaws.networkmanager#ThrottlingException":
1202
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
1203
- case "ValidationException":
1204
- case "com.amazonaws.networkmanager#ValidationException":
1205
- throw await de_ValidationExceptionRes(parsedOutput, context);
1206
- default:
1207
- const parsedBody = parsedOutput.body;
1208
- return throwDefaultError({
1209
- output,
1210
- parsedBody,
1211
- errorCode,
1212
- });
1213
- }
1214
- };
1215
1181
  export const de_AssociateConnectPeerCommand = async (output, context) => {
1216
1182
  if (output.statusCode !== 200 && output.statusCode >= 300) {
1217
- return de_AssociateConnectPeerCommandError(output, context);
1183
+ return de_CommandError(output, context);
1218
1184
  }
1219
1185
  const contents = map({
1220
1186
  $metadata: deserializeMetadata(output),
@@ -1226,46 +1192,9 @@ export const de_AssociateConnectPeerCommand = async (output, context) => {
1226
1192
  Object.assign(contents, doc);
1227
1193
  return contents;
1228
1194
  };
1229
- const de_AssociateConnectPeerCommandError = async (output, context) => {
1230
- const parsedOutput = {
1231
- ...output,
1232
- body: await parseErrorBody(output.body, context),
1233
- };
1234
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1235
- switch (errorCode) {
1236
- case "AccessDeniedException":
1237
- case "com.amazonaws.networkmanager#AccessDeniedException":
1238
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
1239
- case "ConflictException":
1240
- case "com.amazonaws.networkmanager#ConflictException":
1241
- throw await de_ConflictExceptionRes(parsedOutput, context);
1242
- case "InternalServerException":
1243
- case "com.amazonaws.networkmanager#InternalServerException":
1244
- throw await de_InternalServerExceptionRes(parsedOutput, context);
1245
- case "ResourceNotFoundException":
1246
- case "com.amazonaws.networkmanager#ResourceNotFoundException":
1247
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
1248
- case "ServiceQuotaExceededException":
1249
- case "com.amazonaws.networkmanager#ServiceQuotaExceededException":
1250
- throw await de_ServiceQuotaExceededExceptionRes(parsedOutput, context);
1251
- case "ThrottlingException":
1252
- case "com.amazonaws.networkmanager#ThrottlingException":
1253
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
1254
- case "ValidationException":
1255
- case "com.amazonaws.networkmanager#ValidationException":
1256
- throw await de_ValidationExceptionRes(parsedOutput, context);
1257
- default:
1258
- const parsedBody = parsedOutput.body;
1259
- return throwDefaultError({
1260
- output,
1261
- parsedBody,
1262
- errorCode,
1263
- });
1264
- }
1265
- };
1266
1195
  export const de_AssociateCustomerGatewayCommand = async (output, context) => {
1267
1196
  if (output.statusCode !== 200 && output.statusCode >= 300) {
1268
- return de_AssociateCustomerGatewayCommandError(output, context);
1197
+ return de_CommandError(output, context);
1269
1198
  }
1270
1199
  const contents = map({
1271
1200
  $metadata: deserializeMetadata(output),
@@ -1277,46 +1206,9 @@ export const de_AssociateCustomerGatewayCommand = async (output, context) => {
1277
1206
  Object.assign(contents, doc);
1278
1207
  return contents;
1279
1208
  };
1280
- const de_AssociateCustomerGatewayCommandError = async (output, context) => {
1281
- const parsedOutput = {
1282
- ...output,
1283
- body: await parseErrorBody(output.body, context),
1284
- };
1285
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1286
- switch (errorCode) {
1287
- case "AccessDeniedException":
1288
- case "com.amazonaws.networkmanager#AccessDeniedException":
1289
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
1290
- case "ConflictException":
1291
- case "com.amazonaws.networkmanager#ConflictException":
1292
- throw await de_ConflictExceptionRes(parsedOutput, context);
1293
- case "InternalServerException":
1294
- case "com.amazonaws.networkmanager#InternalServerException":
1295
- throw await de_InternalServerExceptionRes(parsedOutput, context);
1296
- case "ResourceNotFoundException":
1297
- case "com.amazonaws.networkmanager#ResourceNotFoundException":
1298
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
1299
- case "ServiceQuotaExceededException":
1300
- case "com.amazonaws.networkmanager#ServiceQuotaExceededException":
1301
- throw await de_ServiceQuotaExceededExceptionRes(parsedOutput, context);
1302
- case "ThrottlingException":
1303
- case "com.amazonaws.networkmanager#ThrottlingException":
1304
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
1305
- case "ValidationException":
1306
- case "com.amazonaws.networkmanager#ValidationException":
1307
- throw await de_ValidationExceptionRes(parsedOutput, context);
1308
- default:
1309
- const parsedBody = parsedOutput.body;
1310
- return throwDefaultError({
1311
- output,
1312
- parsedBody,
1313
- errorCode,
1314
- });
1315
- }
1316
- };
1317
1209
  export const de_AssociateLinkCommand = async (output, context) => {
1318
1210
  if (output.statusCode !== 200 && output.statusCode >= 300) {
1319
- return de_AssociateLinkCommandError(output, context);
1211
+ return de_CommandError(output, context);
1320
1212
  }
1321
1213
  const contents = map({
1322
1214
  $metadata: deserializeMetadata(output),
@@ -1328,46 +1220,9 @@ export const de_AssociateLinkCommand = async (output, context) => {
1328
1220
  Object.assign(contents, doc);
1329
1221
  return contents;
1330
1222
  };
1331
- const de_AssociateLinkCommandError = async (output, context) => {
1332
- const parsedOutput = {
1333
- ...output,
1334
- body: await parseErrorBody(output.body, context),
1335
- };
1336
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1337
- switch (errorCode) {
1338
- case "AccessDeniedException":
1339
- case "com.amazonaws.networkmanager#AccessDeniedException":
1340
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
1341
- case "ConflictException":
1342
- case "com.amazonaws.networkmanager#ConflictException":
1343
- throw await de_ConflictExceptionRes(parsedOutput, context);
1344
- case "InternalServerException":
1345
- case "com.amazonaws.networkmanager#InternalServerException":
1346
- throw await de_InternalServerExceptionRes(parsedOutput, context);
1347
- case "ResourceNotFoundException":
1348
- case "com.amazonaws.networkmanager#ResourceNotFoundException":
1349
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
1350
- case "ServiceQuotaExceededException":
1351
- case "com.amazonaws.networkmanager#ServiceQuotaExceededException":
1352
- throw await de_ServiceQuotaExceededExceptionRes(parsedOutput, context);
1353
- case "ThrottlingException":
1354
- case "com.amazonaws.networkmanager#ThrottlingException":
1355
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
1356
- case "ValidationException":
1357
- case "com.amazonaws.networkmanager#ValidationException":
1358
- throw await de_ValidationExceptionRes(parsedOutput, context);
1359
- default:
1360
- const parsedBody = parsedOutput.body;
1361
- return throwDefaultError({
1362
- output,
1363
- parsedBody,
1364
- errorCode,
1365
- });
1366
- }
1367
- };
1368
1223
  export const de_AssociateTransitGatewayConnectPeerCommand = async (output, context) => {
1369
1224
  if (output.statusCode !== 200 && output.statusCode >= 300) {
1370
- return de_AssociateTransitGatewayConnectPeerCommandError(output, context);
1225
+ return de_CommandError(output, context);
1371
1226
  }
1372
1227
  const contents = map({
1373
1228
  $metadata: deserializeMetadata(output),
@@ -1379,46 +1234,9 @@ export const de_AssociateTransitGatewayConnectPeerCommand = async (output, conte
1379
1234
  Object.assign(contents, doc);
1380
1235
  return contents;
1381
1236
  };
1382
- const de_AssociateTransitGatewayConnectPeerCommandError = async (output, context) => {
1383
- const parsedOutput = {
1384
- ...output,
1385
- body: await parseErrorBody(output.body, context),
1386
- };
1387
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1388
- switch (errorCode) {
1389
- case "AccessDeniedException":
1390
- case "com.amazonaws.networkmanager#AccessDeniedException":
1391
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
1392
- case "ConflictException":
1393
- case "com.amazonaws.networkmanager#ConflictException":
1394
- throw await de_ConflictExceptionRes(parsedOutput, context);
1395
- case "InternalServerException":
1396
- case "com.amazonaws.networkmanager#InternalServerException":
1397
- throw await de_InternalServerExceptionRes(parsedOutput, context);
1398
- case "ResourceNotFoundException":
1399
- case "com.amazonaws.networkmanager#ResourceNotFoundException":
1400
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
1401
- case "ServiceQuotaExceededException":
1402
- case "com.amazonaws.networkmanager#ServiceQuotaExceededException":
1403
- throw await de_ServiceQuotaExceededExceptionRes(parsedOutput, context);
1404
- case "ThrottlingException":
1405
- case "com.amazonaws.networkmanager#ThrottlingException":
1406
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
1407
- case "ValidationException":
1408
- case "com.amazonaws.networkmanager#ValidationException":
1409
- throw await de_ValidationExceptionRes(parsedOutput, context);
1410
- default:
1411
- const parsedBody = parsedOutput.body;
1412
- return throwDefaultError({
1413
- output,
1414
- parsedBody,
1415
- errorCode,
1416
- });
1417
- }
1418
- };
1419
1237
  export const de_CreateConnectAttachmentCommand = async (output, context) => {
1420
1238
  if (output.statusCode !== 200 && output.statusCode >= 300) {
1421
- return de_CreateConnectAttachmentCommandError(output, context);
1239
+ return de_CommandError(output, context);
1422
1240
  }
1423
1241
  const contents = map({
1424
1242
  $metadata: deserializeMetadata(output),
@@ -1430,43 +1248,9 @@ export const de_CreateConnectAttachmentCommand = async (output, context) => {
1430
1248
  Object.assign(contents, doc);
1431
1249
  return contents;
1432
1250
  };
1433
- const de_CreateConnectAttachmentCommandError = async (output, context) => {
1434
- const parsedOutput = {
1435
- ...output,
1436
- body: await parseErrorBody(output.body, context),
1437
- };
1438
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1439
- switch (errorCode) {
1440
- case "AccessDeniedException":
1441
- case "com.amazonaws.networkmanager#AccessDeniedException":
1442
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
1443
- case "ConflictException":
1444
- case "com.amazonaws.networkmanager#ConflictException":
1445
- throw await de_ConflictExceptionRes(parsedOutput, context);
1446
- case "InternalServerException":
1447
- case "com.amazonaws.networkmanager#InternalServerException":
1448
- throw await de_InternalServerExceptionRes(parsedOutput, context);
1449
- case "ResourceNotFoundException":
1450
- case "com.amazonaws.networkmanager#ResourceNotFoundException":
1451
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
1452
- case "ThrottlingException":
1453
- case "com.amazonaws.networkmanager#ThrottlingException":
1454
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
1455
- case "ValidationException":
1456
- case "com.amazonaws.networkmanager#ValidationException":
1457
- throw await de_ValidationExceptionRes(parsedOutput, context);
1458
- default:
1459
- const parsedBody = parsedOutput.body;
1460
- return throwDefaultError({
1461
- output,
1462
- parsedBody,
1463
- errorCode,
1464
- });
1465
- }
1466
- };
1467
1251
  export const de_CreateConnectionCommand = async (output, context) => {
1468
1252
  if (output.statusCode !== 200 && output.statusCode >= 300) {
1469
- return de_CreateConnectionCommandError(output, context);
1253
+ return de_CommandError(output, context);
1470
1254
  }
1471
1255
  const contents = map({
1472
1256
  $metadata: deserializeMetadata(output),
@@ -1478,43 +1262,9 @@ export const de_CreateConnectionCommand = async (output, context) => {
1478
1262
  Object.assign(contents, doc);
1479
1263
  return contents;
1480
1264
  };
1481
- const de_CreateConnectionCommandError = async (output, context) => {
1482
- const parsedOutput = {
1483
- ...output,
1484
- body: await parseErrorBody(output.body, context),
1485
- };
1486
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1487
- switch (errorCode) {
1488
- case "AccessDeniedException":
1489
- case "com.amazonaws.networkmanager#AccessDeniedException":
1490
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
1491
- case "ConflictException":
1492
- case "com.amazonaws.networkmanager#ConflictException":
1493
- throw await de_ConflictExceptionRes(parsedOutput, context);
1494
- case "InternalServerException":
1495
- case "com.amazonaws.networkmanager#InternalServerException":
1496
- throw await de_InternalServerExceptionRes(parsedOutput, context);
1497
- case "ServiceQuotaExceededException":
1498
- case "com.amazonaws.networkmanager#ServiceQuotaExceededException":
1499
- throw await de_ServiceQuotaExceededExceptionRes(parsedOutput, context);
1500
- case "ThrottlingException":
1501
- case "com.amazonaws.networkmanager#ThrottlingException":
1502
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
1503
- case "ValidationException":
1504
- case "com.amazonaws.networkmanager#ValidationException":
1505
- throw await de_ValidationExceptionRes(parsedOutput, context);
1506
- default:
1507
- const parsedBody = parsedOutput.body;
1508
- return throwDefaultError({
1509
- output,
1510
- parsedBody,
1511
- errorCode,
1512
- });
1513
- }
1514
- };
1515
1265
  export const de_CreateConnectPeerCommand = async (output, context) => {
1516
1266
  if (output.statusCode !== 200 && output.statusCode >= 300) {
1517
- return de_CreateConnectPeerCommandError(output, context);
1267
+ return de_CommandError(output, context);
1518
1268
  }
1519
1269
  const contents = map({
1520
1270
  $metadata: deserializeMetadata(output),
@@ -1526,43 +1276,9 @@ export const de_CreateConnectPeerCommand = async (output, context) => {
1526
1276
  Object.assign(contents, doc);
1527
1277
  return contents;
1528
1278
  };
1529
- const de_CreateConnectPeerCommandError = async (output, context) => {
1530
- const parsedOutput = {
1531
- ...output,
1532
- body: await parseErrorBody(output.body, context),
1533
- };
1534
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1535
- switch (errorCode) {
1536
- case "AccessDeniedException":
1537
- case "com.amazonaws.networkmanager#AccessDeniedException":
1538
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
1539
- case "ConflictException":
1540
- case "com.amazonaws.networkmanager#ConflictException":
1541
- throw await de_ConflictExceptionRes(parsedOutput, context);
1542
- case "InternalServerException":
1543
- case "com.amazonaws.networkmanager#InternalServerException":
1544
- throw await de_InternalServerExceptionRes(parsedOutput, context);
1545
- case "ResourceNotFoundException":
1546
- case "com.amazonaws.networkmanager#ResourceNotFoundException":
1547
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
1548
- case "ThrottlingException":
1549
- case "com.amazonaws.networkmanager#ThrottlingException":
1550
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
1551
- case "ValidationException":
1552
- case "com.amazonaws.networkmanager#ValidationException":
1553
- throw await de_ValidationExceptionRes(parsedOutput, context);
1554
- default:
1555
- const parsedBody = parsedOutput.body;
1556
- return throwDefaultError({
1557
- output,
1558
- parsedBody,
1559
- errorCode,
1560
- });
1561
- }
1562
- };
1563
1279
  export const de_CreateCoreNetworkCommand = async (output, context) => {
1564
1280
  if (output.statusCode !== 200 && output.statusCode >= 300) {
1565
- return de_CreateCoreNetworkCommandError(output, context);
1281
+ return de_CommandError(output, context);
1566
1282
  }
1567
1283
  const contents = map({
1568
1284
  $metadata: deserializeMetadata(output),
@@ -1574,46 +1290,9 @@ export const de_CreateCoreNetworkCommand = async (output, context) => {
1574
1290
  Object.assign(contents, doc);
1575
1291
  return contents;
1576
1292
  };
1577
- const de_CreateCoreNetworkCommandError = async (output, context) => {
1578
- const parsedOutput = {
1579
- ...output,
1580
- body: await parseErrorBody(output.body, context),
1581
- };
1582
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1583
- switch (errorCode) {
1584
- case "AccessDeniedException":
1585
- case "com.amazonaws.networkmanager#AccessDeniedException":
1586
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
1587
- case "ConflictException":
1588
- case "com.amazonaws.networkmanager#ConflictException":
1589
- throw await de_ConflictExceptionRes(parsedOutput, context);
1590
- case "CoreNetworkPolicyException":
1591
- case "com.amazonaws.networkmanager#CoreNetworkPolicyException":
1592
- throw await de_CoreNetworkPolicyExceptionRes(parsedOutput, context);
1593
- case "InternalServerException":
1594
- case "com.amazonaws.networkmanager#InternalServerException":
1595
- throw await de_InternalServerExceptionRes(parsedOutput, context);
1596
- case "ServiceQuotaExceededException":
1597
- case "com.amazonaws.networkmanager#ServiceQuotaExceededException":
1598
- throw await de_ServiceQuotaExceededExceptionRes(parsedOutput, context);
1599
- case "ThrottlingException":
1600
- case "com.amazonaws.networkmanager#ThrottlingException":
1601
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
1602
- case "ValidationException":
1603
- case "com.amazonaws.networkmanager#ValidationException":
1604
- throw await de_ValidationExceptionRes(parsedOutput, context);
1605
- default:
1606
- const parsedBody = parsedOutput.body;
1607
- return throwDefaultError({
1608
- output,
1609
- parsedBody,
1610
- errorCode,
1611
- });
1612
- }
1613
- };
1614
1293
  export const de_CreateDeviceCommand = async (output, context) => {
1615
1294
  if (output.statusCode !== 200 && output.statusCode >= 300) {
1616
- return de_CreateDeviceCommandError(output, context);
1295
+ return de_CommandError(output, context);
1617
1296
  }
1618
1297
  const contents = map({
1619
1298
  $metadata: deserializeMetadata(output),
@@ -1625,46 +1304,9 @@ export const de_CreateDeviceCommand = async (output, context) => {
1625
1304
  Object.assign(contents, doc);
1626
1305
  return contents;
1627
1306
  };
1628
- const de_CreateDeviceCommandError = async (output, context) => {
1629
- const parsedOutput = {
1630
- ...output,
1631
- body: await parseErrorBody(output.body, context),
1632
- };
1633
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1634
- switch (errorCode) {
1635
- case "AccessDeniedException":
1636
- case "com.amazonaws.networkmanager#AccessDeniedException":
1637
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
1638
- case "ConflictException":
1639
- case "com.amazonaws.networkmanager#ConflictException":
1640
- throw await de_ConflictExceptionRes(parsedOutput, context);
1641
- case "InternalServerException":
1642
- case "com.amazonaws.networkmanager#InternalServerException":
1643
- throw await de_InternalServerExceptionRes(parsedOutput, context);
1644
- case "ResourceNotFoundException":
1645
- case "com.amazonaws.networkmanager#ResourceNotFoundException":
1646
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
1647
- case "ServiceQuotaExceededException":
1648
- case "com.amazonaws.networkmanager#ServiceQuotaExceededException":
1649
- throw await de_ServiceQuotaExceededExceptionRes(parsedOutput, context);
1650
- case "ThrottlingException":
1651
- case "com.amazonaws.networkmanager#ThrottlingException":
1652
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
1653
- case "ValidationException":
1654
- case "com.amazonaws.networkmanager#ValidationException":
1655
- throw await de_ValidationExceptionRes(parsedOutput, context);
1656
- default:
1657
- const parsedBody = parsedOutput.body;
1658
- return throwDefaultError({
1659
- output,
1660
- parsedBody,
1661
- errorCode,
1662
- });
1663
- }
1664
- };
1665
1307
  export const de_CreateGlobalNetworkCommand = async (output, context) => {
1666
1308
  if (output.statusCode !== 200 && output.statusCode >= 300) {
1667
- return de_CreateGlobalNetworkCommandError(output, context);
1309
+ return de_CommandError(output, context);
1668
1310
  }
1669
1311
  const contents = map({
1670
1312
  $metadata: deserializeMetadata(output),
@@ -1676,43 +1318,9 @@ export const de_CreateGlobalNetworkCommand = async (output, context) => {
1676
1318
  Object.assign(contents, doc);
1677
1319
  return contents;
1678
1320
  };
1679
- const de_CreateGlobalNetworkCommandError = async (output, context) => {
1680
- const parsedOutput = {
1681
- ...output,
1682
- body: await parseErrorBody(output.body, context),
1683
- };
1684
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1685
- switch (errorCode) {
1686
- case "AccessDeniedException":
1687
- case "com.amazonaws.networkmanager#AccessDeniedException":
1688
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
1689
- case "ConflictException":
1690
- case "com.amazonaws.networkmanager#ConflictException":
1691
- throw await de_ConflictExceptionRes(parsedOutput, context);
1692
- case "InternalServerException":
1693
- case "com.amazonaws.networkmanager#InternalServerException":
1694
- throw await de_InternalServerExceptionRes(parsedOutput, context);
1695
- case "ServiceQuotaExceededException":
1696
- case "com.amazonaws.networkmanager#ServiceQuotaExceededException":
1697
- throw await de_ServiceQuotaExceededExceptionRes(parsedOutput, context);
1698
- case "ThrottlingException":
1699
- case "com.amazonaws.networkmanager#ThrottlingException":
1700
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
1701
- case "ValidationException":
1702
- case "com.amazonaws.networkmanager#ValidationException":
1703
- throw await de_ValidationExceptionRes(parsedOutput, context);
1704
- default:
1705
- const parsedBody = parsedOutput.body;
1706
- return throwDefaultError({
1707
- output,
1708
- parsedBody,
1709
- errorCode,
1710
- });
1711
- }
1712
- };
1713
1321
  export const de_CreateLinkCommand = async (output, context) => {
1714
1322
  if (output.statusCode !== 200 && output.statusCode >= 300) {
1715
- return de_CreateLinkCommandError(output, context);
1323
+ return de_CommandError(output, context);
1716
1324
  }
1717
1325
  const contents = map({
1718
1326
  $metadata: deserializeMetadata(output),
@@ -1724,46 +1332,9 @@ export const de_CreateLinkCommand = async (output, context) => {
1724
1332
  Object.assign(contents, doc);
1725
1333
  return contents;
1726
1334
  };
1727
- const de_CreateLinkCommandError = async (output, context) => {
1728
- const parsedOutput = {
1729
- ...output,
1730
- body: await parseErrorBody(output.body, context),
1731
- };
1732
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1733
- switch (errorCode) {
1734
- case "AccessDeniedException":
1735
- case "com.amazonaws.networkmanager#AccessDeniedException":
1736
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
1737
- case "ConflictException":
1738
- case "com.amazonaws.networkmanager#ConflictException":
1739
- throw await de_ConflictExceptionRes(parsedOutput, context);
1740
- case "InternalServerException":
1741
- case "com.amazonaws.networkmanager#InternalServerException":
1742
- throw await de_InternalServerExceptionRes(parsedOutput, context);
1743
- case "ResourceNotFoundException":
1744
- case "com.amazonaws.networkmanager#ResourceNotFoundException":
1745
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
1746
- case "ServiceQuotaExceededException":
1747
- case "com.amazonaws.networkmanager#ServiceQuotaExceededException":
1748
- throw await de_ServiceQuotaExceededExceptionRes(parsedOutput, context);
1749
- case "ThrottlingException":
1750
- case "com.amazonaws.networkmanager#ThrottlingException":
1751
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
1752
- case "ValidationException":
1753
- case "com.amazonaws.networkmanager#ValidationException":
1754
- throw await de_ValidationExceptionRes(parsedOutput, context);
1755
- default:
1756
- const parsedBody = parsedOutput.body;
1757
- return throwDefaultError({
1758
- output,
1759
- parsedBody,
1760
- errorCode,
1761
- });
1762
- }
1763
- };
1764
1335
  export const de_CreateSiteCommand = async (output, context) => {
1765
1336
  if (output.statusCode !== 200 && output.statusCode >= 300) {
1766
- return de_CreateSiteCommandError(output, context);
1337
+ return de_CommandError(output, context);
1767
1338
  }
1768
1339
  const contents = map({
1769
1340
  $metadata: deserializeMetadata(output),
@@ -1775,46 +1346,9 @@ export const de_CreateSiteCommand = async (output, context) => {
1775
1346
  Object.assign(contents, doc);
1776
1347
  return contents;
1777
1348
  };
1778
- const de_CreateSiteCommandError = async (output, context) => {
1779
- const parsedOutput = {
1780
- ...output,
1781
- body: await parseErrorBody(output.body, context),
1782
- };
1783
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1784
- switch (errorCode) {
1785
- case "AccessDeniedException":
1786
- case "com.amazonaws.networkmanager#AccessDeniedException":
1787
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
1788
- case "ConflictException":
1789
- case "com.amazonaws.networkmanager#ConflictException":
1790
- throw await de_ConflictExceptionRes(parsedOutput, context);
1791
- case "InternalServerException":
1792
- case "com.amazonaws.networkmanager#InternalServerException":
1793
- throw await de_InternalServerExceptionRes(parsedOutput, context);
1794
- case "ResourceNotFoundException":
1795
- case "com.amazonaws.networkmanager#ResourceNotFoundException":
1796
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
1797
- case "ServiceQuotaExceededException":
1798
- case "com.amazonaws.networkmanager#ServiceQuotaExceededException":
1799
- throw await de_ServiceQuotaExceededExceptionRes(parsedOutput, context);
1800
- case "ThrottlingException":
1801
- case "com.amazonaws.networkmanager#ThrottlingException":
1802
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
1803
- case "ValidationException":
1804
- case "com.amazonaws.networkmanager#ValidationException":
1805
- throw await de_ValidationExceptionRes(parsedOutput, context);
1806
- default:
1807
- const parsedBody = parsedOutput.body;
1808
- return throwDefaultError({
1809
- output,
1810
- parsedBody,
1811
- errorCode,
1812
- });
1813
- }
1814
- };
1815
1349
  export const de_CreateSiteToSiteVpnAttachmentCommand = async (output, context) => {
1816
1350
  if (output.statusCode !== 200 && output.statusCode >= 300) {
1817
- return de_CreateSiteToSiteVpnAttachmentCommandError(output, context);
1351
+ return de_CommandError(output, context);
1818
1352
  }
1819
1353
  const contents = map({
1820
1354
  $metadata: deserializeMetadata(output),
@@ -1826,43 +1360,9 @@ export const de_CreateSiteToSiteVpnAttachmentCommand = async (output, context) =
1826
1360
  Object.assign(contents, doc);
1827
1361
  return contents;
1828
1362
  };
1829
- const de_CreateSiteToSiteVpnAttachmentCommandError = 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.networkmanager#AccessDeniedException":
1838
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
1839
- case "ConflictException":
1840
- case "com.amazonaws.networkmanager#ConflictException":
1841
- throw await de_ConflictExceptionRes(parsedOutput, context);
1842
- case "InternalServerException":
1843
- case "com.amazonaws.networkmanager#InternalServerException":
1844
- throw await de_InternalServerExceptionRes(parsedOutput, context);
1845
- case "ResourceNotFoundException":
1846
- case "com.amazonaws.networkmanager#ResourceNotFoundException":
1847
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
1848
- case "ThrottlingException":
1849
- case "com.amazonaws.networkmanager#ThrottlingException":
1850
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
1851
- case "ValidationException":
1852
- case "com.amazonaws.networkmanager#ValidationException":
1853
- throw await de_ValidationExceptionRes(parsedOutput, context);
1854
- default:
1855
- const parsedBody = parsedOutput.body;
1856
- return throwDefaultError({
1857
- output,
1858
- parsedBody,
1859
- errorCode,
1860
- });
1861
- }
1862
- };
1863
1363
  export const de_CreateTransitGatewayPeeringCommand = async (output, context) => {
1864
1364
  if (output.statusCode !== 200 && output.statusCode >= 300) {
1865
- return de_CreateTransitGatewayPeeringCommandError(output, context);
1365
+ return de_CommandError(output, context);
1866
1366
  }
1867
1367
  const contents = map({
1868
1368
  $metadata: deserializeMetadata(output),
@@ -1874,43 +1374,9 @@ export const de_CreateTransitGatewayPeeringCommand = async (output, context) =>
1874
1374
  Object.assign(contents, doc);
1875
1375
  return contents;
1876
1376
  };
1877
- const de_CreateTransitGatewayPeeringCommandError = async (output, context) => {
1878
- const parsedOutput = {
1879
- ...output,
1880
- body: await parseErrorBody(output.body, context),
1881
- };
1882
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1883
- switch (errorCode) {
1884
- case "AccessDeniedException":
1885
- case "com.amazonaws.networkmanager#AccessDeniedException":
1886
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
1887
- case "ConflictException":
1888
- case "com.amazonaws.networkmanager#ConflictException":
1889
- throw await de_ConflictExceptionRes(parsedOutput, context);
1890
- case "InternalServerException":
1891
- case "com.amazonaws.networkmanager#InternalServerException":
1892
- throw await de_InternalServerExceptionRes(parsedOutput, context);
1893
- case "ResourceNotFoundException":
1894
- case "com.amazonaws.networkmanager#ResourceNotFoundException":
1895
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
1896
- case "ThrottlingException":
1897
- case "com.amazonaws.networkmanager#ThrottlingException":
1898
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
1899
- case "ValidationException":
1900
- case "com.amazonaws.networkmanager#ValidationException":
1901
- throw await de_ValidationExceptionRes(parsedOutput, context);
1902
- default:
1903
- const parsedBody = parsedOutput.body;
1904
- return throwDefaultError({
1905
- output,
1906
- parsedBody,
1907
- errorCode,
1908
- });
1909
- }
1910
- };
1911
1377
  export const de_CreateTransitGatewayRouteTableAttachmentCommand = async (output, context) => {
1912
1378
  if (output.statusCode !== 200 && output.statusCode >= 300) {
1913
- return de_CreateTransitGatewayRouteTableAttachmentCommandError(output, context);
1379
+ return de_CommandError(output, context);
1914
1380
  }
1915
1381
  const contents = map({
1916
1382
  $metadata: deserializeMetadata(output),
@@ -1922,43 +1388,9 @@ export const de_CreateTransitGatewayRouteTableAttachmentCommand = async (output,
1922
1388
  Object.assign(contents, doc);
1923
1389
  return contents;
1924
1390
  };
1925
- const de_CreateTransitGatewayRouteTableAttachmentCommandError = async (output, context) => {
1926
- const parsedOutput = {
1927
- ...output,
1928
- body: await parseErrorBody(output.body, context),
1929
- };
1930
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1931
- switch (errorCode) {
1932
- case "AccessDeniedException":
1933
- case "com.amazonaws.networkmanager#AccessDeniedException":
1934
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
1935
- case "ConflictException":
1936
- case "com.amazonaws.networkmanager#ConflictException":
1937
- throw await de_ConflictExceptionRes(parsedOutput, context);
1938
- case "InternalServerException":
1939
- case "com.amazonaws.networkmanager#InternalServerException":
1940
- throw await de_InternalServerExceptionRes(parsedOutput, context);
1941
- case "ResourceNotFoundException":
1942
- case "com.amazonaws.networkmanager#ResourceNotFoundException":
1943
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
1944
- case "ThrottlingException":
1945
- case "com.amazonaws.networkmanager#ThrottlingException":
1946
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
1947
- case "ValidationException":
1948
- case "com.amazonaws.networkmanager#ValidationException":
1949
- throw await de_ValidationExceptionRes(parsedOutput, context);
1950
- default:
1951
- const parsedBody = parsedOutput.body;
1952
- return throwDefaultError({
1953
- output,
1954
- parsedBody,
1955
- errorCode,
1956
- });
1957
- }
1958
- };
1959
1391
  export const de_CreateVpcAttachmentCommand = async (output, context) => {
1960
1392
  if (output.statusCode !== 200 && output.statusCode >= 300) {
1961
- return de_CreateVpcAttachmentCommandError(output, context);
1393
+ return de_CommandError(output, context);
1962
1394
  }
1963
1395
  const contents = map({
1964
1396
  $metadata: deserializeMetadata(output),
@@ -1970,43 +1402,9 @@ export const de_CreateVpcAttachmentCommand = async (output, context) => {
1970
1402
  Object.assign(contents, doc);
1971
1403
  return contents;
1972
1404
  };
1973
- const de_CreateVpcAttachmentCommandError = async (output, context) => {
1974
- const parsedOutput = {
1975
- ...output,
1976
- body: await parseErrorBody(output.body, context),
1977
- };
1978
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1979
- switch (errorCode) {
1980
- case "AccessDeniedException":
1981
- case "com.amazonaws.networkmanager#AccessDeniedException":
1982
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
1983
- case "ConflictException":
1984
- case "com.amazonaws.networkmanager#ConflictException":
1985
- throw await de_ConflictExceptionRes(parsedOutput, context);
1986
- case "InternalServerException":
1987
- case "com.amazonaws.networkmanager#InternalServerException":
1988
- throw await de_InternalServerExceptionRes(parsedOutput, context);
1989
- case "ResourceNotFoundException":
1990
- case "com.amazonaws.networkmanager#ResourceNotFoundException":
1991
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
1992
- case "ThrottlingException":
1993
- case "com.amazonaws.networkmanager#ThrottlingException":
1994
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
1995
- case "ValidationException":
1996
- case "com.amazonaws.networkmanager#ValidationException":
1997
- throw await de_ValidationExceptionRes(parsedOutput, context);
1998
- default:
1999
- const parsedBody = parsedOutput.body;
2000
- return throwDefaultError({
2001
- output,
2002
- parsedBody,
2003
- errorCode,
2004
- });
2005
- }
2006
- };
2007
1405
  export const de_DeleteAttachmentCommand = async (output, context) => {
2008
1406
  if (output.statusCode !== 200 && output.statusCode >= 300) {
2009
- return de_DeleteAttachmentCommandError(output, context);
1407
+ return de_CommandError(output, context);
2010
1408
  }
2011
1409
  const contents = map({
2012
1410
  $metadata: deserializeMetadata(output),
@@ -2018,43 +1416,9 @@ export const de_DeleteAttachmentCommand = async (output, context) => {
2018
1416
  Object.assign(contents, doc);
2019
1417
  return contents;
2020
1418
  };
2021
- const de_DeleteAttachmentCommandError = async (output, context) => {
2022
- const parsedOutput = {
2023
- ...output,
2024
- body: await parseErrorBody(output.body, context),
2025
- };
2026
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2027
- switch (errorCode) {
2028
- case "AccessDeniedException":
2029
- case "com.amazonaws.networkmanager#AccessDeniedException":
2030
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
2031
- case "ConflictException":
2032
- case "com.amazonaws.networkmanager#ConflictException":
2033
- throw await de_ConflictExceptionRes(parsedOutput, context);
2034
- case "InternalServerException":
2035
- case "com.amazonaws.networkmanager#InternalServerException":
2036
- throw await de_InternalServerExceptionRes(parsedOutput, context);
2037
- case "ResourceNotFoundException":
2038
- case "com.amazonaws.networkmanager#ResourceNotFoundException":
2039
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
2040
- case "ThrottlingException":
2041
- case "com.amazonaws.networkmanager#ThrottlingException":
2042
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
2043
- case "ValidationException":
2044
- case "com.amazonaws.networkmanager#ValidationException":
2045
- throw await de_ValidationExceptionRes(parsedOutput, context);
2046
- default:
2047
- const parsedBody = parsedOutput.body;
2048
- return throwDefaultError({
2049
- output,
2050
- parsedBody,
2051
- errorCode,
2052
- });
2053
- }
2054
- };
2055
1419
  export const de_DeleteConnectionCommand = async (output, context) => {
2056
1420
  if (output.statusCode !== 200 && output.statusCode >= 300) {
2057
- return de_DeleteConnectionCommandError(output, context);
1421
+ return de_CommandError(output, context);
2058
1422
  }
2059
1423
  const contents = map({
2060
1424
  $metadata: deserializeMetadata(output),
@@ -2066,43 +1430,9 @@ export const de_DeleteConnectionCommand = async (output, context) => {
2066
1430
  Object.assign(contents, doc);
2067
1431
  return contents;
2068
1432
  };
2069
- const de_DeleteConnectionCommandError = async (output, context) => {
2070
- const parsedOutput = {
2071
- ...output,
2072
- body: await parseErrorBody(output.body, context),
2073
- };
2074
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2075
- switch (errorCode) {
2076
- case "AccessDeniedException":
2077
- case "com.amazonaws.networkmanager#AccessDeniedException":
2078
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
2079
- case "ConflictException":
2080
- case "com.amazonaws.networkmanager#ConflictException":
2081
- throw await de_ConflictExceptionRes(parsedOutput, context);
2082
- case "InternalServerException":
2083
- case "com.amazonaws.networkmanager#InternalServerException":
2084
- throw await de_InternalServerExceptionRes(parsedOutput, context);
2085
- case "ResourceNotFoundException":
2086
- case "com.amazonaws.networkmanager#ResourceNotFoundException":
2087
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
2088
- case "ThrottlingException":
2089
- case "com.amazonaws.networkmanager#ThrottlingException":
2090
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
2091
- case "ValidationException":
2092
- case "com.amazonaws.networkmanager#ValidationException":
2093
- throw await de_ValidationExceptionRes(parsedOutput, context);
2094
- default:
2095
- const parsedBody = parsedOutput.body;
2096
- return throwDefaultError({
2097
- output,
2098
- parsedBody,
2099
- errorCode,
2100
- });
2101
- }
2102
- };
2103
1433
  export const de_DeleteConnectPeerCommand = async (output, context) => {
2104
1434
  if (output.statusCode !== 200 && output.statusCode >= 300) {
2105
- return de_DeleteConnectPeerCommandError(output, context);
1435
+ return de_CommandError(output, context);
2106
1436
  }
2107
1437
  const contents = map({
2108
1438
  $metadata: deserializeMetadata(output),
@@ -2114,43 +1444,9 @@ export const de_DeleteConnectPeerCommand = async (output, context) => {
2114
1444
  Object.assign(contents, doc);
2115
1445
  return contents;
2116
1446
  };
2117
- const de_DeleteConnectPeerCommandError = async (output, context) => {
2118
- const parsedOutput = {
2119
- ...output,
2120
- body: await parseErrorBody(output.body, context),
2121
- };
2122
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2123
- switch (errorCode) {
2124
- case "AccessDeniedException":
2125
- case "com.amazonaws.networkmanager#AccessDeniedException":
2126
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
2127
- case "ConflictException":
2128
- case "com.amazonaws.networkmanager#ConflictException":
2129
- throw await de_ConflictExceptionRes(parsedOutput, context);
2130
- case "InternalServerException":
2131
- case "com.amazonaws.networkmanager#InternalServerException":
2132
- throw await de_InternalServerExceptionRes(parsedOutput, context);
2133
- case "ResourceNotFoundException":
2134
- case "com.amazonaws.networkmanager#ResourceNotFoundException":
2135
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
2136
- case "ThrottlingException":
2137
- case "com.amazonaws.networkmanager#ThrottlingException":
2138
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
2139
- case "ValidationException":
2140
- case "com.amazonaws.networkmanager#ValidationException":
2141
- throw await de_ValidationExceptionRes(parsedOutput, context);
2142
- default:
2143
- const parsedBody = parsedOutput.body;
2144
- return throwDefaultError({
2145
- output,
2146
- parsedBody,
2147
- errorCode,
2148
- });
2149
- }
2150
- };
2151
1447
  export const de_DeleteCoreNetworkCommand = async (output, context) => {
2152
1448
  if (output.statusCode !== 200 && output.statusCode >= 300) {
2153
- return de_DeleteCoreNetworkCommandError(output, context);
1449
+ return de_CommandError(output, context);
2154
1450
  }
2155
1451
  const contents = map({
2156
1452
  $metadata: deserializeMetadata(output),
@@ -2162,43 +1458,9 @@ export const de_DeleteCoreNetworkCommand = async (output, context) => {
2162
1458
  Object.assign(contents, doc);
2163
1459
  return contents;
2164
1460
  };
2165
- const de_DeleteCoreNetworkCommandError = async (output, context) => {
2166
- const parsedOutput = {
2167
- ...output,
2168
- body: await parseErrorBody(output.body, context),
2169
- };
2170
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2171
- switch (errorCode) {
2172
- case "AccessDeniedException":
2173
- case "com.amazonaws.networkmanager#AccessDeniedException":
2174
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
2175
- case "ConflictException":
2176
- case "com.amazonaws.networkmanager#ConflictException":
2177
- throw await de_ConflictExceptionRes(parsedOutput, context);
2178
- case "InternalServerException":
2179
- case "com.amazonaws.networkmanager#InternalServerException":
2180
- throw await de_InternalServerExceptionRes(parsedOutput, context);
2181
- case "ResourceNotFoundException":
2182
- case "com.amazonaws.networkmanager#ResourceNotFoundException":
2183
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
2184
- case "ThrottlingException":
2185
- case "com.amazonaws.networkmanager#ThrottlingException":
2186
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
2187
- case "ValidationException":
2188
- case "com.amazonaws.networkmanager#ValidationException":
2189
- throw await de_ValidationExceptionRes(parsedOutput, context);
2190
- default:
2191
- const parsedBody = parsedOutput.body;
2192
- return throwDefaultError({
2193
- output,
2194
- parsedBody,
2195
- errorCode,
2196
- });
2197
- }
2198
- };
2199
1461
  export const de_DeleteCoreNetworkPolicyVersionCommand = async (output, context) => {
2200
1462
  if (output.statusCode !== 200 && output.statusCode >= 300) {
2201
- return de_DeleteCoreNetworkPolicyVersionCommandError(output, context);
1463
+ return de_CommandError(output, context);
2202
1464
  }
2203
1465
  const contents = map({
2204
1466
  $metadata: deserializeMetadata(output),
@@ -2210,43 +1472,9 @@ export const de_DeleteCoreNetworkPolicyVersionCommand = async (output, context)
2210
1472
  Object.assign(contents, doc);
2211
1473
  return contents;
2212
1474
  };
2213
- const de_DeleteCoreNetworkPolicyVersionCommandError = async (output, context) => {
2214
- const parsedOutput = {
2215
- ...output,
2216
- body: await parseErrorBody(output.body, context),
2217
- };
2218
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2219
- switch (errorCode) {
2220
- case "AccessDeniedException":
2221
- case "com.amazonaws.networkmanager#AccessDeniedException":
2222
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
2223
- case "ConflictException":
2224
- case "com.amazonaws.networkmanager#ConflictException":
2225
- throw await de_ConflictExceptionRes(parsedOutput, context);
2226
- case "InternalServerException":
2227
- case "com.amazonaws.networkmanager#InternalServerException":
2228
- throw await de_InternalServerExceptionRes(parsedOutput, context);
2229
- case "ResourceNotFoundException":
2230
- case "com.amazonaws.networkmanager#ResourceNotFoundException":
2231
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
2232
- case "ThrottlingException":
2233
- case "com.amazonaws.networkmanager#ThrottlingException":
2234
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
2235
- case "ValidationException":
2236
- case "com.amazonaws.networkmanager#ValidationException":
2237
- throw await de_ValidationExceptionRes(parsedOutput, context);
2238
- default:
2239
- const parsedBody = parsedOutput.body;
2240
- return throwDefaultError({
2241
- output,
2242
- parsedBody,
2243
- errorCode,
2244
- });
2245
- }
2246
- };
2247
1475
  export const de_DeleteDeviceCommand = async (output, context) => {
2248
1476
  if (output.statusCode !== 200 && output.statusCode >= 300) {
2249
- return de_DeleteDeviceCommandError(output, context);
1477
+ return de_CommandError(output, context);
2250
1478
  }
2251
1479
  const contents = map({
2252
1480
  $metadata: deserializeMetadata(output),
@@ -2258,43 +1486,9 @@ export const de_DeleteDeviceCommand = async (output, context) => {
2258
1486
  Object.assign(contents, doc);
2259
1487
  return contents;
2260
1488
  };
2261
- const de_DeleteDeviceCommandError = async (output, context) => {
2262
- const parsedOutput = {
2263
- ...output,
2264
- body: await parseErrorBody(output.body, context),
2265
- };
2266
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2267
- switch (errorCode) {
2268
- case "AccessDeniedException":
2269
- case "com.amazonaws.networkmanager#AccessDeniedException":
2270
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
2271
- case "ConflictException":
2272
- case "com.amazonaws.networkmanager#ConflictException":
2273
- throw await de_ConflictExceptionRes(parsedOutput, context);
2274
- case "InternalServerException":
2275
- case "com.amazonaws.networkmanager#InternalServerException":
2276
- throw await de_InternalServerExceptionRes(parsedOutput, context);
2277
- case "ResourceNotFoundException":
2278
- case "com.amazonaws.networkmanager#ResourceNotFoundException":
2279
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
2280
- case "ThrottlingException":
2281
- case "com.amazonaws.networkmanager#ThrottlingException":
2282
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
2283
- case "ValidationException":
2284
- case "com.amazonaws.networkmanager#ValidationException":
2285
- throw await de_ValidationExceptionRes(parsedOutput, context);
2286
- default:
2287
- const parsedBody = parsedOutput.body;
2288
- return throwDefaultError({
2289
- output,
2290
- parsedBody,
2291
- errorCode,
2292
- });
2293
- }
2294
- };
2295
1489
  export const de_DeleteGlobalNetworkCommand = async (output, context) => {
2296
1490
  if (output.statusCode !== 200 && output.statusCode >= 300) {
2297
- return de_DeleteGlobalNetworkCommandError(output, context);
1491
+ return de_CommandError(output, context);
2298
1492
  }
2299
1493
  const contents = map({
2300
1494
  $metadata: deserializeMetadata(output),
@@ -2306,43 +1500,9 @@ export const de_DeleteGlobalNetworkCommand = async (output, context) => {
2306
1500
  Object.assign(contents, doc);
2307
1501
  return contents;
2308
1502
  };
2309
- const de_DeleteGlobalNetworkCommandError = async (output, context) => {
2310
- const parsedOutput = {
2311
- ...output,
2312
- body: await parseErrorBody(output.body, context),
2313
- };
2314
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2315
- switch (errorCode) {
2316
- case "AccessDeniedException":
2317
- case "com.amazonaws.networkmanager#AccessDeniedException":
2318
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
2319
- case "ConflictException":
2320
- case "com.amazonaws.networkmanager#ConflictException":
2321
- throw await de_ConflictExceptionRes(parsedOutput, context);
2322
- case "InternalServerException":
2323
- case "com.amazonaws.networkmanager#InternalServerException":
2324
- throw await de_InternalServerExceptionRes(parsedOutput, context);
2325
- case "ResourceNotFoundException":
2326
- case "com.amazonaws.networkmanager#ResourceNotFoundException":
2327
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
2328
- case "ThrottlingException":
2329
- case "com.amazonaws.networkmanager#ThrottlingException":
2330
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
2331
- case "ValidationException":
2332
- case "com.amazonaws.networkmanager#ValidationException":
2333
- throw await de_ValidationExceptionRes(parsedOutput, context);
2334
- default:
2335
- const parsedBody = parsedOutput.body;
2336
- return throwDefaultError({
2337
- output,
2338
- parsedBody,
2339
- errorCode,
2340
- });
2341
- }
2342
- };
2343
1503
  export const de_DeleteLinkCommand = async (output, context) => {
2344
1504
  if (output.statusCode !== 200 && output.statusCode >= 300) {
2345
- return de_DeleteLinkCommandError(output, context);
1505
+ return de_CommandError(output, context);
2346
1506
  }
2347
1507
  const contents = map({
2348
1508
  $metadata: deserializeMetadata(output),
@@ -2354,43 +1514,9 @@ export const de_DeleteLinkCommand = async (output, context) => {
2354
1514
  Object.assign(contents, doc);
2355
1515
  return contents;
2356
1516
  };
2357
- const de_DeleteLinkCommandError = async (output, context) => {
2358
- const parsedOutput = {
2359
- ...output,
2360
- body: await parseErrorBody(output.body, context),
2361
- };
2362
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2363
- switch (errorCode) {
2364
- case "AccessDeniedException":
2365
- case "com.amazonaws.networkmanager#AccessDeniedException":
2366
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
2367
- case "ConflictException":
2368
- case "com.amazonaws.networkmanager#ConflictException":
2369
- throw await de_ConflictExceptionRes(parsedOutput, context);
2370
- case "InternalServerException":
2371
- case "com.amazonaws.networkmanager#InternalServerException":
2372
- throw await de_InternalServerExceptionRes(parsedOutput, context);
2373
- case "ResourceNotFoundException":
2374
- case "com.amazonaws.networkmanager#ResourceNotFoundException":
2375
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
2376
- case "ThrottlingException":
2377
- case "com.amazonaws.networkmanager#ThrottlingException":
2378
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
2379
- case "ValidationException":
2380
- case "com.amazonaws.networkmanager#ValidationException":
2381
- throw await de_ValidationExceptionRes(parsedOutput, context);
2382
- default:
2383
- const parsedBody = parsedOutput.body;
2384
- return throwDefaultError({
2385
- output,
2386
- parsedBody,
2387
- errorCode,
2388
- });
2389
- }
2390
- };
2391
1517
  export const de_DeletePeeringCommand = async (output, context) => {
2392
1518
  if (output.statusCode !== 200 && output.statusCode >= 300) {
2393
- return de_DeletePeeringCommandError(output, context);
1519
+ return de_CommandError(output, context);
2394
1520
  }
2395
1521
  const contents = map({
2396
1522
  $metadata: deserializeMetadata(output),
@@ -2402,43 +1528,9 @@ export const de_DeletePeeringCommand = async (output, context) => {
2402
1528
  Object.assign(contents, doc);
2403
1529
  return contents;
2404
1530
  };
2405
- const de_DeletePeeringCommandError = async (output, context) => {
2406
- const parsedOutput = {
2407
- ...output,
2408
- body: await parseErrorBody(output.body, context),
2409
- };
2410
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2411
- switch (errorCode) {
2412
- case "AccessDeniedException":
2413
- case "com.amazonaws.networkmanager#AccessDeniedException":
2414
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
2415
- case "ConflictException":
2416
- case "com.amazonaws.networkmanager#ConflictException":
2417
- throw await de_ConflictExceptionRes(parsedOutput, context);
2418
- case "InternalServerException":
2419
- case "com.amazonaws.networkmanager#InternalServerException":
2420
- throw await de_InternalServerExceptionRes(parsedOutput, context);
2421
- case "ResourceNotFoundException":
2422
- case "com.amazonaws.networkmanager#ResourceNotFoundException":
2423
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
2424
- case "ThrottlingException":
2425
- case "com.amazonaws.networkmanager#ThrottlingException":
2426
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
2427
- case "ValidationException":
2428
- case "com.amazonaws.networkmanager#ValidationException":
2429
- throw await de_ValidationExceptionRes(parsedOutput, context);
2430
- default:
2431
- const parsedBody = parsedOutput.body;
2432
- return throwDefaultError({
2433
- output,
2434
- parsedBody,
2435
- errorCode,
2436
- });
2437
- }
2438
- };
2439
1531
  export const de_DeleteResourcePolicyCommand = async (output, context) => {
2440
1532
  if (output.statusCode !== 200 && output.statusCode >= 300) {
2441
- return de_DeleteResourcePolicyCommandError(output, context);
1533
+ return de_CommandError(output, context);
2442
1534
  }
2443
1535
  const contents = map({
2444
1536
  $metadata: deserializeMetadata(output),
@@ -2446,40 +1538,9 @@ export const de_DeleteResourcePolicyCommand = async (output, context) => {
2446
1538
  await collectBody(output.body, context);
2447
1539
  return contents;
2448
1540
  };
2449
- const de_DeleteResourcePolicyCommandError = async (output, context) => {
2450
- const parsedOutput = {
2451
- ...output,
2452
- body: await parseErrorBody(output.body, context),
2453
- };
2454
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2455
- switch (errorCode) {
2456
- case "AccessDeniedException":
2457
- case "com.amazonaws.networkmanager#AccessDeniedException":
2458
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
2459
- case "ConflictException":
2460
- case "com.amazonaws.networkmanager#ConflictException":
2461
- throw await de_ConflictExceptionRes(parsedOutput, context);
2462
- case "InternalServerException":
2463
- case "com.amazonaws.networkmanager#InternalServerException":
2464
- throw await de_InternalServerExceptionRes(parsedOutput, context);
2465
- case "ThrottlingException":
2466
- case "com.amazonaws.networkmanager#ThrottlingException":
2467
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
2468
- case "ValidationException":
2469
- case "com.amazonaws.networkmanager#ValidationException":
2470
- throw await de_ValidationExceptionRes(parsedOutput, context);
2471
- default:
2472
- const parsedBody = parsedOutput.body;
2473
- return throwDefaultError({
2474
- output,
2475
- parsedBody,
2476
- errorCode,
2477
- });
2478
- }
2479
- };
2480
1541
  export const de_DeleteSiteCommand = async (output, context) => {
2481
1542
  if (output.statusCode !== 200 && output.statusCode >= 300) {
2482
- return de_DeleteSiteCommandError(output, context);
1543
+ return de_CommandError(output, context);
2483
1544
  }
2484
1545
  const contents = map({
2485
1546
  $metadata: deserializeMetadata(output),
@@ -2491,43 +1552,9 @@ export const de_DeleteSiteCommand = async (output, context) => {
2491
1552
  Object.assign(contents, doc);
2492
1553
  return contents;
2493
1554
  };
2494
- const de_DeleteSiteCommandError = async (output, context) => {
2495
- const parsedOutput = {
2496
- ...output,
2497
- body: await parseErrorBody(output.body, context),
2498
- };
2499
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2500
- switch (errorCode) {
2501
- case "AccessDeniedException":
2502
- case "com.amazonaws.networkmanager#AccessDeniedException":
2503
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
2504
- case "ConflictException":
2505
- case "com.amazonaws.networkmanager#ConflictException":
2506
- throw await de_ConflictExceptionRes(parsedOutput, context);
2507
- case "InternalServerException":
2508
- case "com.amazonaws.networkmanager#InternalServerException":
2509
- throw await de_InternalServerExceptionRes(parsedOutput, context);
2510
- case "ResourceNotFoundException":
2511
- case "com.amazonaws.networkmanager#ResourceNotFoundException":
2512
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
2513
- case "ThrottlingException":
2514
- case "com.amazonaws.networkmanager#ThrottlingException":
2515
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
2516
- case "ValidationException":
2517
- case "com.amazonaws.networkmanager#ValidationException":
2518
- throw await de_ValidationExceptionRes(parsedOutput, context);
2519
- default:
2520
- const parsedBody = parsedOutput.body;
2521
- return throwDefaultError({
2522
- output,
2523
- parsedBody,
2524
- errorCode,
2525
- });
2526
- }
2527
- };
2528
1555
  export const de_DeregisterTransitGatewayCommand = async (output, context) => {
2529
1556
  if (output.statusCode !== 200 && output.statusCode >= 300) {
2530
- return de_DeregisterTransitGatewayCommandError(output, context);
1557
+ return de_CommandError(output, context);
2531
1558
  }
2532
1559
  const contents = map({
2533
1560
  $metadata: deserializeMetadata(output),
@@ -2539,43 +1566,9 @@ export const de_DeregisterTransitGatewayCommand = async (output, context) => {
2539
1566
  Object.assign(contents, doc);
2540
1567
  return contents;
2541
1568
  };
2542
- const de_DeregisterTransitGatewayCommandError = async (output, context) => {
2543
- const parsedOutput = {
2544
- ...output,
2545
- body: await parseErrorBody(output.body, context),
2546
- };
2547
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2548
- switch (errorCode) {
2549
- case "AccessDeniedException":
2550
- case "com.amazonaws.networkmanager#AccessDeniedException":
2551
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
2552
- case "ConflictException":
2553
- case "com.amazonaws.networkmanager#ConflictException":
2554
- throw await de_ConflictExceptionRes(parsedOutput, context);
2555
- case "InternalServerException":
2556
- case "com.amazonaws.networkmanager#InternalServerException":
2557
- throw await de_InternalServerExceptionRes(parsedOutput, context);
2558
- case "ResourceNotFoundException":
2559
- case "com.amazonaws.networkmanager#ResourceNotFoundException":
2560
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
2561
- case "ThrottlingException":
2562
- case "com.amazonaws.networkmanager#ThrottlingException":
2563
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
2564
- case "ValidationException":
2565
- case "com.amazonaws.networkmanager#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
- };
2576
1569
  export const de_DescribeGlobalNetworksCommand = async (output, context) => {
2577
1570
  if (output.statusCode !== 200 && output.statusCode >= 300) {
2578
- return de_DescribeGlobalNetworksCommandError(output, context);
1571
+ return de_CommandError(output, context);
2579
1572
  }
2580
1573
  const contents = map({
2581
1574
  $metadata: deserializeMetadata(output),
@@ -2588,40 +1581,9 @@ export const de_DescribeGlobalNetworksCommand = async (output, context) => {
2588
1581
  Object.assign(contents, doc);
2589
1582
  return contents;
2590
1583
  };
2591
- const de_DescribeGlobalNetworksCommandError = async (output, context) => {
2592
- const parsedOutput = {
2593
- ...output,
2594
- body: await parseErrorBody(output.body, context),
2595
- };
2596
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2597
- switch (errorCode) {
2598
- case "AccessDeniedException":
2599
- case "com.amazonaws.networkmanager#AccessDeniedException":
2600
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
2601
- case "InternalServerException":
2602
- case "com.amazonaws.networkmanager#InternalServerException":
2603
- throw await de_InternalServerExceptionRes(parsedOutput, context);
2604
- case "ResourceNotFoundException":
2605
- case "com.amazonaws.networkmanager#ResourceNotFoundException":
2606
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
2607
- case "ThrottlingException":
2608
- case "com.amazonaws.networkmanager#ThrottlingException":
2609
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
2610
- case "ValidationException":
2611
- case "com.amazonaws.networkmanager#ValidationException":
2612
- throw await de_ValidationExceptionRes(parsedOutput, context);
2613
- default:
2614
- const parsedBody = parsedOutput.body;
2615
- return throwDefaultError({
2616
- output,
2617
- parsedBody,
2618
- errorCode,
2619
- });
2620
- }
2621
- };
2622
1584
  export const de_DisassociateConnectPeerCommand = async (output, context) => {
2623
1585
  if (output.statusCode !== 200 && output.statusCode >= 300) {
2624
- return de_DisassociateConnectPeerCommandError(output, context);
1586
+ return de_CommandError(output, context);
2625
1587
  }
2626
1588
  const contents = map({
2627
1589
  $metadata: deserializeMetadata(output),
@@ -2633,43 +1595,9 @@ export const de_DisassociateConnectPeerCommand = async (output, context) => {
2633
1595
  Object.assign(contents, doc);
2634
1596
  return contents;
2635
1597
  };
2636
- const de_DisassociateConnectPeerCommandError = async (output, context) => {
2637
- const parsedOutput = {
2638
- ...output,
2639
- body: await parseErrorBody(output.body, context),
2640
- };
2641
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2642
- switch (errorCode) {
2643
- case "AccessDeniedException":
2644
- case "com.amazonaws.networkmanager#AccessDeniedException":
2645
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
2646
- case "ConflictException":
2647
- case "com.amazonaws.networkmanager#ConflictException":
2648
- throw await de_ConflictExceptionRes(parsedOutput, context);
2649
- case "InternalServerException":
2650
- case "com.amazonaws.networkmanager#InternalServerException":
2651
- throw await de_InternalServerExceptionRes(parsedOutput, context);
2652
- case "ResourceNotFoundException":
2653
- case "com.amazonaws.networkmanager#ResourceNotFoundException":
2654
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
2655
- case "ThrottlingException":
2656
- case "com.amazonaws.networkmanager#ThrottlingException":
2657
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
2658
- case "ValidationException":
2659
- case "com.amazonaws.networkmanager#ValidationException":
2660
- throw await de_ValidationExceptionRes(parsedOutput, context);
2661
- default:
2662
- const parsedBody = parsedOutput.body;
2663
- return throwDefaultError({
2664
- output,
2665
- parsedBody,
2666
- errorCode,
2667
- });
2668
- }
2669
- };
2670
1598
  export const de_DisassociateCustomerGatewayCommand = async (output, context) => {
2671
1599
  if (output.statusCode !== 200 && output.statusCode >= 300) {
2672
- return de_DisassociateCustomerGatewayCommandError(output, context);
1600
+ return de_CommandError(output, context);
2673
1601
  }
2674
1602
  const contents = map({
2675
1603
  $metadata: deserializeMetadata(output),
@@ -2681,43 +1609,9 @@ export const de_DisassociateCustomerGatewayCommand = async (output, context) =>
2681
1609
  Object.assign(contents, doc);
2682
1610
  return contents;
2683
1611
  };
2684
- const de_DisassociateCustomerGatewayCommandError = async (output, context) => {
2685
- const parsedOutput = {
2686
- ...output,
2687
- body: await parseErrorBody(output.body, context),
2688
- };
2689
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2690
- switch (errorCode) {
2691
- case "AccessDeniedException":
2692
- case "com.amazonaws.networkmanager#AccessDeniedException":
2693
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
2694
- case "ConflictException":
2695
- case "com.amazonaws.networkmanager#ConflictException":
2696
- throw await de_ConflictExceptionRes(parsedOutput, context);
2697
- case "InternalServerException":
2698
- case "com.amazonaws.networkmanager#InternalServerException":
2699
- throw await de_InternalServerExceptionRes(parsedOutput, context);
2700
- case "ResourceNotFoundException":
2701
- case "com.amazonaws.networkmanager#ResourceNotFoundException":
2702
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
2703
- case "ThrottlingException":
2704
- case "com.amazonaws.networkmanager#ThrottlingException":
2705
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
2706
- case "ValidationException":
2707
- case "com.amazonaws.networkmanager#ValidationException":
2708
- throw await de_ValidationExceptionRes(parsedOutput, context);
2709
- default:
2710
- const parsedBody = parsedOutput.body;
2711
- return throwDefaultError({
2712
- output,
2713
- parsedBody,
2714
- errorCode,
2715
- });
2716
- }
2717
- };
2718
1612
  export const de_DisassociateLinkCommand = async (output, context) => {
2719
1613
  if (output.statusCode !== 200 && output.statusCode >= 300) {
2720
- return de_DisassociateLinkCommandError(output, context);
1614
+ return de_CommandError(output, context);
2721
1615
  }
2722
1616
  const contents = map({
2723
1617
  $metadata: deserializeMetadata(output),
@@ -2729,43 +1623,9 @@ export const de_DisassociateLinkCommand = async (output, context) => {
2729
1623
  Object.assign(contents, doc);
2730
1624
  return contents;
2731
1625
  };
2732
- const de_DisassociateLinkCommandError = async (output, context) => {
2733
- const parsedOutput = {
2734
- ...output,
2735
- body: await parseErrorBody(output.body, context),
2736
- };
2737
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2738
- switch (errorCode) {
2739
- case "AccessDeniedException":
2740
- case "com.amazonaws.networkmanager#AccessDeniedException":
2741
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
2742
- case "ConflictException":
2743
- case "com.amazonaws.networkmanager#ConflictException":
2744
- throw await de_ConflictExceptionRes(parsedOutput, context);
2745
- case "InternalServerException":
2746
- case "com.amazonaws.networkmanager#InternalServerException":
2747
- throw await de_InternalServerExceptionRes(parsedOutput, context);
2748
- case "ResourceNotFoundException":
2749
- case "com.amazonaws.networkmanager#ResourceNotFoundException":
2750
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
2751
- case "ThrottlingException":
2752
- case "com.amazonaws.networkmanager#ThrottlingException":
2753
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
2754
- case "ValidationException":
2755
- case "com.amazonaws.networkmanager#ValidationException":
2756
- throw await de_ValidationExceptionRes(parsedOutput, context);
2757
- default:
2758
- const parsedBody = parsedOutput.body;
2759
- return throwDefaultError({
2760
- output,
2761
- parsedBody,
2762
- errorCode,
2763
- });
2764
- }
2765
- };
2766
1626
  export const de_DisassociateTransitGatewayConnectPeerCommand = async (output, context) => {
2767
1627
  if (output.statusCode !== 200 && output.statusCode >= 300) {
2768
- return de_DisassociateTransitGatewayConnectPeerCommandError(output, context);
1628
+ return de_CommandError(output, context);
2769
1629
  }
2770
1630
  const contents = map({
2771
1631
  $metadata: deserializeMetadata(output),
@@ -2777,43 +1637,9 @@ export const de_DisassociateTransitGatewayConnectPeerCommand = async (output, co
2777
1637
  Object.assign(contents, doc);
2778
1638
  return contents;
2779
1639
  };
2780
- const de_DisassociateTransitGatewayConnectPeerCommandError = async (output, context) => {
2781
- const parsedOutput = {
2782
- ...output,
2783
- body: await parseErrorBody(output.body, context),
2784
- };
2785
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2786
- switch (errorCode) {
2787
- case "AccessDeniedException":
2788
- case "com.amazonaws.networkmanager#AccessDeniedException":
2789
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
2790
- case "ConflictException":
2791
- case "com.amazonaws.networkmanager#ConflictException":
2792
- throw await de_ConflictExceptionRes(parsedOutput, context);
2793
- case "InternalServerException":
2794
- case "com.amazonaws.networkmanager#InternalServerException":
2795
- throw await de_InternalServerExceptionRes(parsedOutput, context);
2796
- case "ResourceNotFoundException":
2797
- case "com.amazonaws.networkmanager#ResourceNotFoundException":
2798
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
2799
- case "ThrottlingException":
2800
- case "com.amazonaws.networkmanager#ThrottlingException":
2801
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
2802
- case "ValidationException":
2803
- case "com.amazonaws.networkmanager#ValidationException":
2804
- throw await de_ValidationExceptionRes(parsedOutput, context);
2805
- default:
2806
- const parsedBody = parsedOutput.body;
2807
- return throwDefaultError({
2808
- output,
2809
- parsedBody,
2810
- errorCode,
2811
- });
2812
- }
2813
- };
2814
1640
  export const de_ExecuteCoreNetworkChangeSetCommand = async (output, context) => {
2815
1641
  if (output.statusCode !== 200 && output.statusCode >= 300) {
2816
- return de_ExecuteCoreNetworkChangeSetCommandError(output, context);
1642
+ return de_CommandError(output, context);
2817
1643
  }
2818
1644
  const contents = map({
2819
1645
  $metadata: deserializeMetadata(output),
@@ -2821,43 +1647,9 @@ export const de_ExecuteCoreNetworkChangeSetCommand = async (output, context) =>
2821
1647
  await collectBody(output.body, context);
2822
1648
  return contents;
2823
1649
  };
2824
- const de_ExecuteCoreNetworkChangeSetCommandError = async (output, context) => {
2825
- const parsedOutput = {
2826
- ...output,
2827
- body: await parseErrorBody(output.body, context),
2828
- };
2829
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2830
- switch (errorCode) {
2831
- case "AccessDeniedException":
2832
- case "com.amazonaws.networkmanager#AccessDeniedException":
2833
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
2834
- case "ConflictException":
2835
- case "com.amazonaws.networkmanager#ConflictException":
2836
- throw await de_ConflictExceptionRes(parsedOutput, context);
2837
- case "InternalServerException":
2838
- case "com.amazonaws.networkmanager#InternalServerException":
2839
- throw await de_InternalServerExceptionRes(parsedOutput, context);
2840
- case "ResourceNotFoundException":
2841
- case "com.amazonaws.networkmanager#ResourceNotFoundException":
2842
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
2843
- case "ThrottlingException":
2844
- case "com.amazonaws.networkmanager#ThrottlingException":
2845
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
2846
- case "ValidationException":
2847
- case "com.amazonaws.networkmanager#ValidationException":
2848
- throw await de_ValidationExceptionRes(parsedOutput, context);
2849
- default:
2850
- const parsedBody = parsedOutput.body;
2851
- return throwDefaultError({
2852
- output,
2853
- parsedBody,
2854
- errorCode,
2855
- });
2856
- }
2857
- };
2858
1650
  export const de_GetConnectAttachmentCommand = async (output, context) => {
2859
1651
  if (output.statusCode !== 200 && output.statusCode >= 300) {
2860
- return de_GetConnectAttachmentCommandError(output, context);
1652
+ return de_CommandError(output, context);
2861
1653
  }
2862
1654
  const contents = map({
2863
1655
  $metadata: deserializeMetadata(output),
@@ -2869,40 +1661,9 @@ export const de_GetConnectAttachmentCommand = async (output, context) => {
2869
1661
  Object.assign(contents, doc);
2870
1662
  return contents;
2871
1663
  };
2872
- const de_GetConnectAttachmentCommandError = async (output, context) => {
2873
- const parsedOutput = {
2874
- ...output,
2875
- body: await parseErrorBody(output.body, context),
2876
- };
2877
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2878
- switch (errorCode) {
2879
- case "AccessDeniedException":
2880
- case "com.amazonaws.networkmanager#AccessDeniedException":
2881
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
2882
- case "InternalServerException":
2883
- case "com.amazonaws.networkmanager#InternalServerException":
2884
- throw await de_InternalServerExceptionRes(parsedOutput, context);
2885
- case "ResourceNotFoundException":
2886
- case "com.amazonaws.networkmanager#ResourceNotFoundException":
2887
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
2888
- case "ThrottlingException":
2889
- case "com.amazonaws.networkmanager#ThrottlingException":
2890
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
2891
- case "ValidationException":
2892
- case "com.amazonaws.networkmanager#ValidationException":
2893
- throw await de_ValidationExceptionRes(parsedOutput, context);
2894
- default:
2895
- const parsedBody = parsedOutput.body;
2896
- return throwDefaultError({
2897
- output,
2898
- parsedBody,
2899
- errorCode,
2900
- });
2901
- }
2902
- };
2903
1664
  export const de_GetConnectionsCommand = async (output, context) => {
2904
1665
  if (output.statusCode !== 200 && output.statusCode >= 300) {
2905
- return de_GetConnectionsCommandError(output, context);
1666
+ return de_CommandError(output, context);
2906
1667
  }
2907
1668
  const contents = map({
2908
1669
  $metadata: deserializeMetadata(output),
@@ -2915,40 +1676,9 @@ export const de_GetConnectionsCommand = async (output, context) => {
2915
1676
  Object.assign(contents, doc);
2916
1677
  return contents;
2917
1678
  };
2918
- const de_GetConnectionsCommandError = async (output, context) => {
2919
- const parsedOutput = {
2920
- ...output,
2921
- body: await parseErrorBody(output.body, context),
2922
- };
2923
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2924
- switch (errorCode) {
2925
- case "AccessDeniedException":
2926
- case "com.amazonaws.networkmanager#AccessDeniedException":
2927
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
2928
- case "InternalServerException":
2929
- case "com.amazonaws.networkmanager#InternalServerException":
2930
- throw await de_InternalServerExceptionRes(parsedOutput, context);
2931
- case "ResourceNotFoundException":
2932
- case "com.amazonaws.networkmanager#ResourceNotFoundException":
2933
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
2934
- case "ThrottlingException":
2935
- case "com.amazonaws.networkmanager#ThrottlingException":
2936
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
2937
- case "ValidationException":
2938
- case "com.amazonaws.networkmanager#ValidationException":
2939
- throw await de_ValidationExceptionRes(parsedOutput, context);
2940
- default:
2941
- const parsedBody = parsedOutput.body;
2942
- return throwDefaultError({
2943
- output,
2944
- parsedBody,
2945
- errorCode,
2946
- });
2947
- }
2948
- };
2949
1679
  export const de_GetConnectPeerCommand = async (output, context) => {
2950
1680
  if (output.statusCode !== 200 && output.statusCode >= 300) {
2951
- return de_GetConnectPeerCommandError(output, context);
1681
+ return de_CommandError(output, context);
2952
1682
  }
2953
1683
  const contents = map({
2954
1684
  $metadata: deserializeMetadata(output),
@@ -2960,40 +1690,9 @@ export const de_GetConnectPeerCommand = async (output, context) => {
2960
1690
  Object.assign(contents, doc);
2961
1691
  return contents;
2962
1692
  };
2963
- const de_GetConnectPeerCommandError = async (output, context) => {
2964
- const parsedOutput = {
2965
- ...output,
2966
- body: await parseErrorBody(output.body, context),
2967
- };
2968
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2969
- switch (errorCode) {
2970
- case "AccessDeniedException":
2971
- case "com.amazonaws.networkmanager#AccessDeniedException":
2972
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
2973
- case "InternalServerException":
2974
- case "com.amazonaws.networkmanager#InternalServerException":
2975
- throw await de_InternalServerExceptionRes(parsedOutput, context);
2976
- case "ResourceNotFoundException":
2977
- case "com.amazonaws.networkmanager#ResourceNotFoundException":
2978
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
2979
- case "ThrottlingException":
2980
- case "com.amazonaws.networkmanager#ThrottlingException":
2981
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
2982
- case "ValidationException":
2983
- case "com.amazonaws.networkmanager#ValidationException":
2984
- throw await de_ValidationExceptionRes(parsedOutput, context);
2985
- default:
2986
- const parsedBody = parsedOutput.body;
2987
- return throwDefaultError({
2988
- output,
2989
- parsedBody,
2990
- errorCode,
2991
- });
2992
- }
2993
- };
2994
1693
  export const de_GetConnectPeerAssociationsCommand = async (output, context) => {
2995
1694
  if (output.statusCode !== 200 && output.statusCode >= 300) {
2996
- return de_GetConnectPeerAssociationsCommandError(output, context);
1695
+ return de_CommandError(output, context);
2997
1696
  }
2998
1697
  const contents = map({
2999
1698
  $metadata: deserializeMetadata(output),
@@ -3006,43 +1705,9 @@ export const de_GetConnectPeerAssociationsCommand = async (output, context) => {
3006
1705
  Object.assign(contents, doc);
3007
1706
  return contents;
3008
1707
  };
3009
- const de_GetConnectPeerAssociationsCommandError = async (output, context) => {
3010
- const parsedOutput = {
3011
- ...output,
3012
- body: await parseErrorBody(output.body, context),
3013
- };
3014
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
3015
- switch (errorCode) {
3016
- case "AccessDeniedException":
3017
- case "com.amazonaws.networkmanager#AccessDeniedException":
3018
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
3019
- case "ConflictException":
3020
- case "com.amazonaws.networkmanager#ConflictException":
3021
- throw await de_ConflictExceptionRes(parsedOutput, context);
3022
- case "InternalServerException":
3023
- case "com.amazonaws.networkmanager#InternalServerException":
3024
- throw await de_InternalServerExceptionRes(parsedOutput, context);
3025
- case "ResourceNotFoundException":
3026
- case "com.amazonaws.networkmanager#ResourceNotFoundException":
3027
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
3028
- case "ThrottlingException":
3029
- case "com.amazonaws.networkmanager#ThrottlingException":
3030
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
3031
- case "ValidationException":
3032
- case "com.amazonaws.networkmanager#ValidationException":
3033
- throw await de_ValidationExceptionRes(parsedOutput, context);
3034
- default:
3035
- const parsedBody = parsedOutput.body;
3036
- return throwDefaultError({
3037
- output,
3038
- parsedBody,
3039
- errorCode,
3040
- });
3041
- }
3042
- };
3043
1708
  export const de_GetCoreNetworkCommand = async (output, context) => {
3044
1709
  if (output.statusCode !== 200 && output.statusCode >= 300) {
3045
- return de_GetCoreNetworkCommandError(output, context);
1710
+ return de_CommandError(output, context);
3046
1711
  }
3047
1712
  const contents = map({
3048
1713
  $metadata: deserializeMetadata(output),
@@ -3054,40 +1719,9 @@ export const de_GetCoreNetworkCommand = async (output, context) => {
3054
1719
  Object.assign(contents, doc);
3055
1720
  return contents;
3056
1721
  };
3057
- const de_GetCoreNetworkCommandError = async (output, context) => {
3058
- const parsedOutput = {
3059
- ...output,
3060
- body: await parseErrorBody(output.body, context),
3061
- };
3062
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
3063
- switch (errorCode) {
3064
- case "AccessDeniedException":
3065
- case "com.amazonaws.networkmanager#AccessDeniedException":
3066
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
3067
- case "InternalServerException":
3068
- case "com.amazonaws.networkmanager#InternalServerException":
3069
- throw await de_InternalServerExceptionRes(parsedOutput, context);
3070
- case "ResourceNotFoundException":
3071
- case "com.amazonaws.networkmanager#ResourceNotFoundException":
3072
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
3073
- case "ThrottlingException":
3074
- case "com.amazonaws.networkmanager#ThrottlingException":
3075
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
3076
- case "ValidationException":
3077
- case "com.amazonaws.networkmanager#ValidationException":
3078
- throw await de_ValidationExceptionRes(parsedOutput, context);
3079
- default:
3080
- const parsedBody = parsedOutput.body;
3081
- return throwDefaultError({
3082
- output,
3083
- parsedBody,
3084
- errorCode,
3085
- });
3086
- }
3087
- };
3088
1722
  export const de_GetCoreNetworkChangeEventsCommand = async (output, context) => {
3089
1723
  if (output.statusCode !== 200 && output.statusCode >= 300) {
3090
- return de_GetCoreNetworkChangeEventsCommandError(output, context);
1724
+ return de_CommandError(output, context);
3091
1725
  }
3092
1726
  const contents = map({
3093
1727
  $metadata: deserializeMetadata(output),
@@ -3100,40 +1734,9 @@ export const de_GetCoreNetworkChangeEventsCommand = async (output, context) => {
3100
1734
  Object.assign(contents, doc);
3101
1735
  return contents;
3102
1736
  };
3103
- const de_GetCoreNetworkChangeEventsCommandError = async (output, context) => {
3104
- const parsedOutput = {
3105
- ...output,
3106
- body: await parseErrorBody(output.body, context),
3107
- };
3108
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
3109
- switch (errorCode) {
3110
- case "AccessDeniedException":
3111
- case "com.amazonaws.networkmanager#AccessDeniedException":
3112
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
3113
- case "InternalServerException":
3114
- case "com.amazonaws.networkmanager#InternalServerException":
3115
- throw await de_InternalServerExceptionRes(parsedOutput, context);
3116
- case "ResourceNotFoundException":
3117
- case "com.amazonaws.networkmanager#ResourceNotFoundException":
3118
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
3119
- case "ThrottlingException":
3120
- case "com.amazonaws.networkmanager#ThrottlingException":
3121
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
3122
- case "ValidationException":
3123
- case "com.amazonaws.networkmanager#ValidationException":
3124
- throw await de_ValidationExceptionRes(parsedOutput, context);
3125
- default:
3126
- const parsedBody = parsedOutput.body;
3127
- return throwDefaultError({
3128
- output,
3129
- parsedBody,
3130
- errorCode,
3131
- });
3132
- }
3133
- };
3134
1737
  export const de_GetCoreNetworkChangeSetCommand = async (output, context) => {
3135
1738
  if (output.statusCode !== 200 && output.statusCode >= 300) {
3136
- return de_GetCoreNetworkChangeSetCommandError(output, context);
1739
+ return de_CommandError(output, context);
3137
1740
  }
3138
1741
  const contents = map({
3139
1742
  $metadata: deserializeMetadata(output),
@@ -3146,40 +1749,9 @@ export const de_GetCoreNetworkChangeSetCommand = async (output, context) => {
3146
1749
  Object.assign(contents, doc);
3147
1750
  return contents;
3148
1751
  };
3149
- const de_GetCoreNetworkChangeSetCommandError = 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.networkmanager#AccessDeniedException":
3158
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
3159
- case "InternalServerException":
3160
- case "com.amazonaws.networkmanager#InternalServerException":
3161
- throw await de_InternalServerExceptionRes(parsedOutput, context);
3162
- case "ResourceNotFoundException":
3163
- case "com.amazonaws.networkmanager#ResourceNotFoundException":
3164
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
3165
- case "ThrottlingException":
3166
- case "com.amazonaws.networkmanager#ThrottlingException":
3167
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
3168
- case "ValidationException":
3169
- case "com.amazonaws.networkmanager#ValidationException":
3170
- throw await de_ValidationExceptionRes(parsedOutput, context);
3171
- default:
3172
- const parsedBody = parsedOutput.body;
3173
- return throwDefaultError({
3174
- output,
3175
- parsedBody,
3176
- errorCode,
3177
- });
3178
- }
3179
- };
3180
1752
  export const de_GetCoreNetworkPolicyCommand = async (output, context) => {
3181
1753
  if (output.statusCode !== 200 && output.statusCode >= 300) {
3182
- return de_GetCoreNetworkPolicyCommandError(output, context);
1754
+ return de_CommandError(output, context);
3183
1755
  }
3184
1756
  const contents = map({
3185
1757
  $metadata: deserializeMetadata(output),
@@ -3191,40 +1763,9 @@ export const de_GetCoreNetworkPolicyCommand = async (output, context) => {
3191
1763
  Object.assign(contents, doc);
3192
1764
  return contents;
3193
1765
  };
3194
- const de_GetCoreNetworkPolicyCommandError = async (output, context) => {
3195
- const parsedOutput = {
3196
- ...output,
3197
- body: await parseErrorBody(output.body, context),
3198
- };
3199
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
3200
- switch (errorCode) {
3201
- case "AccessDeniedException":
3202
- case "com.amazonaws.networkmanager#AccessDeniedException":
3203
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
3204
- case "InternalServerException":
3205
- case "com.amazonaws.networkmanager#InternalServerException":
3206
- throw await de_InternalServerExceptionRes(parsedOutput, context);
3207
- case "ResourceNotFoundException":
3208
- case "com.amazonaws.networkmanager#ResourceNotFoundException":
3209
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
3210
- case "ThrottlingException":
3211
- case "com.amazonaws.networkmanager#ThrottlingException":
3212
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
3213
- case "ValidationException":
3214
- case "com.amazonaws.networkmanager#ValidationException":
3215
- throw await de_ValidationExceptionRes(parsedOutput, context);
3216
- default:
3217
- const parsedBody = parsedOutput.body;
3218
- return throwDefaultError({
3219
- output,
3220
- parsedBody,
3221
- errorCode,
3222
- });
3223
- }
3224
- };
3225
1766
  export const de_GetCustomerGatewayAssociationsCommand = async (output, context) => {
3226
1767
  if (output.statusCode !== 200 && output.statusCode >= 300) {
3227
- return de_GetCustomerGatewayAssociationsCommandError(output, context);
1768
+ return de_CommandError(output, context);
3228
1769
  }
3229
1770
  const contents = map({
3230
1771
  $metadata: deserializeMetadata(output),
@@ -3237,43 +1778,9 @@ export const de_GetCustomerGatewayAssociationsCommand = async (output, context)
3237
1778
  Object.assign(contents, doc);
3238
1779
  return contents;
3239
1780
  };
3240
- const de_GetCustomerGatewayAssociationsCommandError = async (output, context) => {
3241
- const parsedOutput = {
3242
- ...output,
3243
- body: await parseErrorBody(output.body, context),
3244
- };
3245
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
3246
- switch (errorCode) {
3247
- case "AccessDeniedException":
3248
- case "com.amazonaws.networkmanager#AccessDeniedException":
3249
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
3250
- case "ConflictException":
3251
- case "com.amazonaws.networkmanager#ConflictException":
3252
- throw await de_ConflictExceptionRes(parsedOutput, context);
3253
- case "InternalServerException":
3254
- case "com.amazonaws.networkmanager#InternalServerException":
3255
- throw await de_InternalServerExceptionRes(parsedOutput, context);
3256
- case "ResourceNotFoundException":
3257
- case "com.amazonaws.networkmanager#ResourceNotFoundException":
3258
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
3259
- case "ThrottlingException":
3260
- case "com.amazonaws.networkmanager#ThrottlingException":
3261
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
3262
- case "ValidationException":
3263
- case "com.amazonaws.networkmanager#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
- };
3274
1781
  export const de_GetDevicesCommand = async (output, context) => {
3275
1782
  if (output.statusCode !== 200 && output.statusCode >= 300) {
3276
- return de_GetDevicesCommandError(output, context);
1783
+ return de_CommandError(output, context);
3277
1784
  }
3278
1785
  const contents = map({
3279
1786
  $metadata: deserializeMetadata(output),
@@ -3286,40 +1793,9 @@ export const de_GetDevicesCommand = async (output, context) => {
3286
1793
  Object.assign(contents, doc);
3287
1794
  return contents;
3288
1795
  };
3289
- const de_GetDevicesCommandError = async (output, context) => {
3290
- const parsedOutput = {
3291
- ...output,
3292
- body: await parseErrorBody(output.body, context),
3293
- };
3294
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
3295
- switch (errorCode) {
3296
- case "AccessDeniedException":
3297
- case "com.amazonaws.networkmanager#AccessDeniedException":
3298
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
3299
- case "InternalServerException":
3300
- case "com.amazonaws.networkmanager#InternalServerException":
3301
- throw await de_InternalServerExceptionRes(parsedOutput, context);
3302
- case "ResourceNotFoundException":
3303
- case "com.amazonaws.networkmanager#ResourceNotFoundException":
3304
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
3305
- case "ThrottlingException":
3306
- case "com.amazonaws.networkmanager#ThrottlingException":
3307
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
3308
- case "ValidationException":
3309
- case "com.amazonaws.networkmanager#ValidationException":
3310
- throw await de_ValidationExceptionRes(parsedOutput, context);
3311
- default:
3312
- const parsedBody = parsedOutput.body;
3313
- return throwDefaultError({
3314
- output,
3315
- parsedBody,
3316
- errorCode,
3317
- });
3318
- }
3319
- };
3320
1796
  export const de_GetLinkAssociationsCommand = async (output, context) => {
3321
1797
  if (output.statusCode !== 200 && output.statusCode >= 300) {
3322
- return de_GetLinkAssociationsCommandError(output, context);
1798
+ return de_CommandError(output, context);
3323
1799
  }
3324
1800
  const contents = map({
3325
1801
  $metadata: deserializeMetadata(output),
@@ -3332,40 +1808,9 @@ export const de_GetLinkAssociationsCommand = async (output, context) => {
3332
1808
  Object.assign(contents, doc);
3333
1809
  return contents;
3334
1810
  };
3335
- const de_GetLinkAssociationsCommandError = async (output, context) => {
3336
- const parsedOutput = {
3337
- ...output,
3338
- body: await parseErrorBody(output.body, context),
3339
- };
3340
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
3341
- switch (errorCode) {
3342
- case "AccessDeniedException":
3343
- case "com.amazonaws.networkmanager#AccessDeniedException":
3344
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
3345
- case "InternalServerException":
3346
- case "com.amazonaws.networkmanager#InternalServerException":
3347
- throw await de_InternalServerExceptionRes(parsedOutput, context);
3348
- case "ResourceNotFoundException":
3349
- case "com.amazonaws.networkmanager#ResourceNotFoundException":
3350
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
3351
- case "ThrottlingException":
3352
- case "com.amazonaws.networkmanager#ThrottlingException":
3353
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
3354
- case "ValidationException":
3355
- case "com.amazonaws.networkmanager#ValidationException":
3356
- throw await de_ValidationExceptionRes(parsedOutput, context);
3357
- default:
3358
- const parsedBody = parsedOutput.body;
3359
- return throwDefaultError({
3360
- output,
3361
- parsedBody,
3362
- errorCode,
3363
- });
3364
- }
3365
- };
3366
1811
  export const de_GetLinksCommand = async (output, context) => {
3367
1812
  if (output.statusCode !== 200 && output.statusCode >= 300) {
3368
- return de_GetLinksCommandError(output, context);
1813
+ return de_CommandError(output, context);
3369
1814
  }
3370
1815
  const contents = map({
3371
1816
  $metadata: deserializeMetadata(output),
@@ -3378,40 +1823,9 @@ export const de_GetLinksCommand = async (output, context) => {
3378
1823
  Object.assign(contents, doc);
3379
1824
  return contents;
3380
1825
  };
3381
- const de_GetLinksCommandError = async (output, context) => {
3382
- const parsedOutput = {
3383
- ...output,
3384
- body: await parseErrorBody(output.body, context),
3385
- };
3386
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
3387
- switch (errorCode) {
3388
- case "AccessDeniedException":
3389
- case "com.amazonaws.networkmanager#AccessDeniedException":
3390
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
3391
- case "InternalServerException":
3392
- case "com.amazonaws.networkmanager#InternalServerException":
3393
- throw await de_InternalServerExceptionRes(parsedOutput, context);
3394
- case "ResourceNotFoundException":
3395
- case "com.amazonaws.networkmanager#ResourceNotFoundException":
3396
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
3397
- case "ThrottlingException":
3398
- case "com.amazonaws.networkmanager#ThrottlingException":
3399
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
3400
- case "ValidationException":
3401
- case "com.amazonaws.networkmanager#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
- };
3412
1826
  export const de_GetNetworkResourceCountsCommand = async (output, context) => {
3413
1827
  if (output.statusCode !== 200 && output.statusCode >= 300) {
3414
- return de_GetNetworkResourceCountsCommandError(output, context);
1828
+ return de_CommandError(output, context);
3415
1829
  }
3416
1830
  const contents = map({
3417
1831
  $metadata: deserializeMetadata(output),
@@ -3424,37 +1838,9 @@ export const de_GetNetworkResourceCountsCommand = async (output, context) => {
3424
1838
  Object.assign(contents, doc);
3425
1839
  return contents;
3426
1840
  };
3427
- const de_GetNetworkResourceCountsCommandError = async (output, context) => {
3428
- const parsedOutput = {
3429
- ...output,
3430
- body: await parseErrorBody(output.body, context),
3431
- };
3432
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
3433
- switch (errorCode) {
3434
- case "AccessDeniedException":
3435
- case "com.amazonaws.networkmanager#AccessDeniedException":
3436
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
3437
- case "InternalServerException":
3438
- case "com.amazonaws.networkmanager#InternalServerException":
3439
- throw await de_InternalServerExceptionRes(parsedOutput, context);
3440
- case "ThrottlingException":
3441
- case "com.amazonaws.networkmanager#ThrottlingException":
3442
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
3443
- case "ValidationException":
3444
- case "com.amazonaws.networkmanager#ValidationException":
3445
- throw await de_ValidationExceptionRes(parsedOutput, context);
3446
- default:
3447
- const parsedBody = parsedOutput.body;
3448
- return throwDefaultError({
3449
- output,
3450
- parsedBody,
3451
- errorCode,
3452
- });
3453
- }
3454
- };
3455
1841
  export const de_GetNetworkResourceRelationshipsCommand = async (output, context) => {
3456
1842
  if (output.statusCode !== 200 && output.statusCode >= 300) {
3457
- return de_GetNetworkResourceRelationshipsCommandError(output, context);
1843
+ return de_CommandError(output, context);
3458
1844
  }
3459
1845
  const contents = map({
3460
1846
  $metadata: deserializeMetadata(output),
@@ -3467,40 +1853,9 @@ export const de_GetNetworkResourceRelationshipsCommand = async (output, context)
3467
1853
  Object.assign(contents, doc);
3468
1854
  return contents;
3469
1855
  };
3470
- const de_GetNetworkResourceRelationshipsCommandError = async (output, context) => {
3471
- const parsedOutput = {
3472
- ...output,
3473
- body: await parseErrorBody(output.body, context),
3474
- };
3475
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
3476
- switch (errorCode) {
3477
- case "AccessDeniedException":
3478
- case "com.amazonaws.networkmanager#AccessDeniedException":
3479
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
3480
- case "InternalServerException":
3481
- case "com.amazonaws.networkmanager#InternalServerException":
3482
- throw await de_InternalServerExceptionRes(parsedOutput, context);
3483
- case "ResourceNotFoundException":
3484
- case "com.amazonaws.networkmanager#ResourceNotFoundException":
3485
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
3486
- case "ThrottlingException":
3487
- case "com.amazonaws.networkmanager#ThrottlingException":
3488
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
3489
- case "ValidationException":
3490
- case "com.amazonaws.networkmanager#ValidationException":
3491
- throw await de_ValidationExceptionRes(parsedOutput, context);
3492
- default:
3493
- const parsedBody = parsedOutput.body;
3494
- return throwDefaultError({
3495
- output,
3496
- parsedBody,
3497
- errorCode,
3498
- });
3499
- }
3500
- };
3501
1856
  export const de_GetNetworkResourcesCommand = async (output, context) => {
3502
1857
  if (output.statusCode !== 200 && output.statusCode >= 300) {
3503
- return de_GetNetworkResourcesCommandError(output, context);
1858
+ return de_CommandError(output, context);
3504
1859
  }
3505
1860
  const contents = map({
3506
1861
  $metadata: deserializeMetadata(output),
@@ -3513,40 +1868,9 @@ export const de_GetNetworkResourcesCommand = async (output, context) => {
3513
1868
  Object.assign(contents, doc);
3514
1869
  return contents;
3515
1870
  };
3516
- const de_GetNetworkResourcesCommandError = 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.networkmanager#AccessDeniedException":
3525
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
3526
- case "InternalServerException":
3527
- case "com.amazonaws.networkmanager#InternalServerException":
3528
- throw await de_InternalServerExceptionRes(parsedOutput, context);
3529
- case "ResourceNotFoundException":
3530
- case "com.amazonaws.networkmanager#ResourceNotFoundException":
3531
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
3532
- case "ThrottlingException":
3533
- case "com.amazonaws.networkmanager#ThrottlingException":
3534
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
3535
- case "ValidationException":
3536
- case "com.amazonaws.networkmanager#ValidationException":
3537
- throw await de_ValidationExceptionRes(parsedOutput, context);
3538
- default:
3539
- const parsedBody = parsedOutput.body;
3540
- return throwDefaultError({
3541
- output,
3542
- parsedBody,
3543
- errorCode,
3544
- });
3545
- }
3546
- };
3547
1871
  export const de_GetNetworkRoutesCommand = async (output, context) => {
3548
1872
  if (output.statusCode !== 200 && output.statusCode >= 300) {
3549
- return de_GetNetworkRoutesCommandError(output, context);
1873
+ return de_CommandError(output, context);
3550
1874
  }
3551
1875
  const contents = map({
3552
1876
  $metadata: deserializeMetadata(output),
@@ -3562,40 +1886,9 @@ export const de_GetNetworkRoutesCommand = async (output, context) => {
3562
1886
  Object.assign(contents, doc);
3563
1887
  return contents;
3564
1888
  };
3565
- const de_GetNetworkRoutesCommandError = async (output, context) => {
3566
- const parsedOutput = {
3567
- ...output,
3568
- body: await parseErrorBody(output.body, context),
3569
- };
3570
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
3571
- switch (errorCode) {
3572
- case "AccessDeniedException":
3573
- case "com.amazonaws.networkmanager#AccessDeniedException":
3574
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
3575
- case "InternalServerException":
3576
- case "com.amazonaws.networkmanager#InternalServerException":
3577
- throw await de_InternalServerExceptionRes(parsedOutput, context);
3578
- case "ResourceNotFoundException":
3579
- case "com.amazonaws.networkmanager#ResourceNotFoundException":
3580
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
3581
- case "ThrottlingException":
3582
- case "com.amazonaws.networkmanager#ThrottlingException":
3583
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
3584
- case "ValidationException":
3585
- case "com.amazonaws.networkmanager#ValidationException":
3586
- throw await de_ValidationExceptionRes(parsedOutput, context);
3587
- default:
3588
- const parsedBody = parsedOutput.body;
3589
- return throwDefaultError({
3590
- output,
3591
- parsedBody,
3592
- errorCode,
3593
- });
3594
- }
3595
- };
3596
1889
  export const de_GetNetworkTelemetryCommand = async (output, context) => {
3597
1890
  if (output.statusCode !== 200 && output.statusCode >= 300) {
3598
- return de_GetNetworkTelemetryCommandError(output, context);
1891
+ return de_CommandError(output, context);
3599
1892
  }
3600
1893
  const contents = map({
3601
1894
  $metadata: deserializeMetadata(output),
@@ -3608,40 +1901,9 @@ export const de_GetNetworkTelemetryCommand = async (output, context) => {
3608
1901
  Object.assign(contents, doc);
3609
1902
  return contents;
3610
1903
  };
3611
- const de_GetNetworkTelemetryCommandError = async (output, context) => {
3612
- const parsedOutput = {
3613
- ...output,
3614
- body: await parseErrorBody(output.body, context),
3615
- };
3616
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
3617
- switch (errorCode) {
3618
- case "AccessDeniedException":
3619
- case "com.amazonaws.networkmanager#AccessDeniedException":
3620
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
3621
- case "InternalServerException":
3622
- case "com.amazonaws.networkmanager#InternalServerException":
3623
- throw await de_InternalServerExceptionRes(parsedOutput, context);
3624
- case "ResourceNotFoundException":
3625
- case "com.amazonaws.networkmanager#ResourceNotFoundException":
3626
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
3627
- case "ThrottlingException":
3628
- case "com.amazonaws.networkmanager#ThrottlingException":
3629
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
3630
- case "ValidationException":
3631
- case "com.amazonaws.networkmanager#ValidationException":
3632
- throw await de_ValidationExceptionRes(parsedOutput, context);
3633
- default:
3634
- const parsedBody = parsedOutput.body;
3635
- return throwDefaultError({
3636
- output,
3637
- parsedBody,
3638
- errorCode,
3639
- });
3640
- }
3641
- };
3642
1904
  export const de_GetResourcePolicyCommand = async (output, context) => {
3643
1905
  if (output.statusCode !== 200 && output.statusCode >= 300) {
3644
- return de_GetResourcePolicyCommandError(output, context);
1906
+ return de_CommandError(output, context);
3645
1907
  }
3646
1908
  const contents = map({
3647
1909
  $metadata: deserializeMetadata(output),
@@ -3653,37 +1915,9 @@ export const de_GetResourcePolicyCommand = async (output, context) => {
3653
1915
  Object.assign(contents, doc);
3654
1916
  return contents;
3655
1917
  };
3656
- const de_GetResourcePolicyCommandError = async (output, context) => {
3657
- const parsedOutput = {
3658
- ...output,
3659
- body: await parseErrorBody(output.body, context),
3660
- };
3661
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
3662
- switch (errorCode) {
3663
- case "AccessDeniedException":
3664
- case "com.amazonaws.networkmanager#AccessDeniedException":
3665
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
3666
- case "InternalServerException":
3667
- case "com.amazonaws.networkmanager#InternalServerException":
3668
- throw await de_InternalServerExceptionRes(parsedOutput, context);
3669
- case "ThrottlingException":
3670
- case "com.amazonaws.networkmanager#ThrottlingException":
3671
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
3672
- case "ValidationException":
3673
- case "com.amazonaws.networkmanager#ValidationException":
3674
- throw await de_ValidationExceptionRes(parsedOutput, context);
3675
- default:
3676
- const parsedBody = parsedOutput.body;
3677
- return throwDefaultError({
3678
- output,
3679
- parsedBody,
3680
- errorCode,
3681
- });
3682
- }
3683
- };
3684
1918
  export const de_GetRouteAnalysisCommand = async (output, context) => {
3685
1919
  if (output.statusCode !== 200 && output.statusCode >= 300) {
3686
- return de_GetRouteAnalysisCommandError(output, context);
1920
+ return de_CommandError(output, context);
3687
1921
  }
3688
1922
  const contents = map({
3689
1923
  $metadata: deserializeMetadata(output),
@@ -3695,40 +1929,9 @@ export const de_GetRouteAnalysisCommand = async (output, context) => {
3695
1929
  Object.assign(contents, doc);
3696
1930
  return contents;
3697
1931
  };
3698
- const de_GetRouteAnalysisCommandError = async (output, context) => {
3699
- const parsedOutput = {
3700
- ...output,
3701
- body: await parseErrorBody(output.body, context),
3702
- };
3703
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
3704
- switch (errorCode) {
3705
- case "AccessDeniedException":
3706
- case "com.amazonaws.networkmanager#AccessDeniedException":
3707
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
3708
- case "InternalServerException":
3709
- case "com.amazonaws.networkmanager#InternalServerException":
3710
- throw await de_InternalServerExceptionRes(parsedOutput, context);
3711
- case "ResourceNotFoundException":
3712
- case "com.amazonaws.networkmanager#ResourceNotFoundException":
3713
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
3714
- case "ThrottlingException":
3715
- case "com.amazonaws.networkmanager#ThrottlingException":
3716
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
3717
- case "ValidationException":
3718
- case "com.amazonaws.networkmanager#ValidationException":
3719
- throw await de_ValidationExceptionRes(parsedOutput, context);
3720
- default:
3721
- const parsedBody = parsedOutput.body;
3722
- return throwDefaultError({
3723
- output,
3724
- parsedBody,
3725
- errorCode,
3726
- });
3727
- }
3728
- };
3729
1932
  export const de_GetSitesCommand = async (output, context) => {
3730
1933
  if (output.statusCode !== 200 && output.statusCode >= 300) {
3731
- return de_GetSitesCommandError(output, context);
1934
+ return de_CommandError(output, context);
3732
1935
  }
3733
1936
  const contents = map({
3734
1937
  $metadata: deserializeMetadata(output),
@@ -3741,40 +1944,9 @@ export const de_GetSitesCommand = async (output, context) => {
3741
1944
  Object.assign(contents, doc);
3742
1945
  return contents;
3743
1946
  };
3744
- const de_GetSitesCommandError = async (output, context) => {
3745
- const parsedOutput = {
3746
- ...output,
3747
- body: await parseErrorBody(output.body, context),
3748
- };
3749
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
3750
- switch (errorCode) {
3751
- case "AccessDeniedException":
3752
- case "com.amazonaws.networkmanager#AccessDeniedException":
3753
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
3754
- case "InternalServerException":
3755
- case "com.amazonaws.networkmanager#InternalServerException":
3756
- throw await de_InternalServerExceptionRes(parsedOutput, context);
3757
- case "ResourceNotFoundException":
3758
- case "com.amazonaws.networkmanager#ResourceNotFoundException":
3759
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
3760
- case "ThrottlingException":
3761
- case "com.amazonaws.networkmanager#ThrottlingException":
3762
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
3763
- case "ValidationException":
3764
- case "com.amazonaws.networkmanager#ValidationException":
3765
- throw await de_ValidationExceptionRes(parsedOutput, context);
3766
- default:
3767
- const parsedBody = parsedOutput.body;
3768
- return throwDefaultError({
3769
- output,
3770
- parsedBody,
3771
- errorCode,
3772
- });
3773
- }
3774
- };
3775
1947
  export const de_GetSiteToSiteVpnAttachmentCommand = async (output, context) => {
3776
1948
  if (output.statusCode !== 200 && output.statusCode >= 300) {
3777
- return de_GetSiteToSiteVpnAttachmentCommandError(output, context);
1949
+ return de_CommandError(output, context);
3778
1950
  }
3779
1951
  const contents = map({
3780
1952
  $metadata: deserializeMetadata(output),
@@ -3786,40 +1958,9 @@ export const de_GetSiteToSiteVpnAttachmentCommand = async (output, context) => {
3786
1958
  Object.assign(contents, doc);
3787
1959
  return contents;
3788
1960
  };
3789
- const de_GetSiteToSiteVpnAttachmentCommandError = async (output, context) => {
3790
- const parsedOutput = {
3791
- ...output,
3792
- body: await parseErrorBody(output.body, context),
3793
- };
3794
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
3795
- switch (errorCode) {
3796
- case "AccessDeniedException":
3797
- case "com.amazonaws.networkmanager#AccessDeniedException":
3798
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
3799
- case "InternalServerException":
3800
- case "com.amazonaws.networkmanager#InternalServerException":
3801
- throw await de_InternalServerExceptionRes(parsedOutput, context);
3802
- case "ResourceNotFoundException":
3803
- case "com.amazonaws.networkmanager#ResourceNotFoundException":
3804
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
3805
- case "ThrottlingException":
3806
- case "com.amazonaws.networkmanager#ThrottlingException":
3807
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
3808
- case "ValidationException":
3809
- case "com.amazonaws.networkmanager#ValidationException":
3810
- throw await de_ValidationExceptionRes(parsedOutput, context);
3811
- default:
3812
- const parsedBody = parsedOutput.body;
3813
- return throwDefaultError({
3814
- output,
3815
- parsedBody,
3816
- errorCode,
3817
- });
3818
- }
3819
- };
3820
1961
  export const de_GetTransitGatewayConnectPeerAssociationsCommand = async (output, context) => {
3821
1962
  if (output.statusCode !== 200 && output.statusCode >= 300) {
3822
- return de_GetTransitGatewayConnectPeerAssociationsCommandError(output, context);
1963
+ return de_CommandError(output, context);
3823
1964
  }
3824
1965
  const contents = map({
3825
1966
  $metadata: deserializeMetadata(output),
@@ -3832,43 +1973,9 @@ export const de_GetTransitGatewayConnectPeerAssociationsCommand = async (output,
3832
1973
  Object.assign(contents, doc);
3833
1974
  return contents;
3834
1975
  };
3835
- const de_GetTransitGatewayConnectPeerAssociationsCommandError = async (output, context) => {
3836
- const parsedOutput = {
3837
- ...output,
3838
- body: await parseErrorBody(output.body, context),
3839
- };
3840
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
3841
- switch (errorCode) {
3842
- case "AccessDeniedException":
3843
- case "com.amazonaws.networkmanager#AccessDeniedException":
3844
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
3845
- case "ConflictException":
3846
- case "com.amazonaws.networkmanager#ConflictException":
3847
- throw await de_ConflictExceptionRes(parsedOutput, context);
3848
- case "InternalServerException":
3849
- case "com.amazonaws.networkmanager#InternalServerException":
3850
- throw await de_InternalServerExceptionRes(parsedOutput, context);
3851
- case "ResourceNotFoundException":
3852
- case "com.amazonaws.networkmanager#ResourceNotFoundException":
3853
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
3854
- case "ThrottlingException":
3855
- case "com.amazonaws.networkmanager#ThrottlingException":
3856
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
3857
- case "ValidationException":
3858
- case "com.amazonaws.networkmanager#ValidationException":
3859
- throw await de_ValidationExceptionRes(parsedOutput, context);
3860
- default:
3861
- const parsedBody = parsedOutput.body;
3862
- return throwDefaultError({
3863
- output,
3864
- parsedBody,
3865
- errorCode,
3866
- });
3867
- }
3868
- };
3869
1976
  export const de_GetTransitGatewayPeeringCommand = async (output, context) => {
3870
1977
  if (output.statusCode !== 200 && output.statusCode >= 300) {
3871
- return de_GetTransitGatewayPeeringCommandError(output, context);
1978
+ return de_CommandError(output, context);
3872
1979
  }
3873
1980
  const contents = map({
3874
1981
  $metadata: deserializeMetadata(output),
@@ -3880,40 +1987,9 @@ export const de_GetTransitGatewayPeeringCommand = async (output, context) => {
3880
1987
  Object.assign(contents, doc);
3881
1988
  return contents;
3882
1989
  };
3883
- const de_GetTransitGatewayPeeringCommandError = async (output, context) => {
3884
- const parsedOutput = {
3885
- ...output,
3886
- body: await parseErrorBody(output.body, context),
3887
- };
3888
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
3889
- switch (errorCode) {
3890
- case "AccessDeniedException":
3891
- case "com.amazonaws.networkmanager#AccessDeniedException":
3892
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
3893
- case "InternalServerException":
3894
- case "com.amazonaws.networkmanager#InternalServerException":
3895
- throw await de_InternalServerExceptionRes(parsedOutput, context);
3896
- case "ResourceNotFoundException":
3897
- case "com.amazonaws.networkmanager#ResourceNotFoundException":
3898
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
3899
- case "ThrottlingException":
3900
- case "com.amazonaws.networkmanager#ThrottlingException":
3901
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
3902
- case "ValidationException":
3903
- case "com.amazonaws.networkmanager#ValidationException":
3904
- throw await de_ValidationExceptionRes(parsedOutput, context);
3905
- default:
3906
- const parsedBody = parsedOutput.body;
3907
- return throwDefaultError({
3908
- output,
3909
- parsedBody,
3910
- errorCode,
3911
- });
3912
- }
3913
- };
3914
1990
  export const de_GetTransitGatewayRegistrationsCommand = async (output, context) => {
3915
1991
  if (output.statusCode !== 200 && output.statusCode >= 300) {
3916
- return de_GetTransitGatewayRegistrationsCommandError(output, context);
1992
+ return de_CommandError(output, context);
3917
1993
  }
3918
1994
  const contents = map({
3919
1995
  $metadata: deserializeMetadata(output),
@@ -3926,40 +2002,9 @@ export const de_GetTransitGatewayRegistrationsCommand = async (output, context)
3926
2002
  Object.assign(contents, doc);
3927
2003
  return contents;
3928
2004
  };
3929
- const de_GetTransitGatewayRegistrationsCommandError = async (output, context) => {
3930
- const parsedOutput = {
3931
- ...output,
3932
- body: await parseErrorBody(output.body, context),
3933
- };
3934
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
3935
- switch (errorCode) {
3936
- case "AccessDeniedException":
3937
- case "com.amazonaws.networkmanager#AccessDeniedException":
3938
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
3939
- case "InternalServerException":
3940
- case "com.amazonaws.networkmanager#InternalServerException":
3941
- throw await de_InternalServerExceptionRes(parsedOutput, context);
3942
- case "ResourceNotFoundException":
3943
- case "com.amazonaws.networkmanager#ResourceNotFoundException":
3944
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
3945
- case "ThrottlingException":
3946
- case "com.amazonaws.networkmanager#ThrottlingException":
3947
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
3948
- case "ValidationException":
3949
- case "com.amazonaws.networkmanager#ValidationException":
3950
- throw await de_ValidationExceptionRes(parsedOutput, context);
3951
- default:
3952
- const parsedBody = parsedOutput.body;
3953
- return throwDefaultError({
3954
- output,
3955
- parsedBody,
3956
- errorCode,
3957
- });
3958
- }
3959
- };
3960
2005
  export const de_GetTransitGatewayRouteTableAttachmentCommand = async (output, context) => {
3961
2006
  if (output.statusCode !== 200 && output.statusCode >= 300) {
3962
- return de_GetTransitGatewayRouteTableAttachmentCommandError(output, context);
2007
+ return de_CommandError(output, context);
3963
2008
  }
3964
2009
  const contents = map({
3965
2010
  $metadata: deserializeMetadata(output),
@@ -3971,40 +2016,9 @@ export const de_GetTransitGatewayRouteTableAttachmentCommand = async (output, co
3971
2016
  Object.assign(contents, doc);
3972
2017
  return contents;
3973
2018
  };
3974
- const de_GetTransitGatewayRouteTableAttachmentCommandError = async (output, context) => {
3975
- const parsedOutput = {
3976
- ...output,
3977
- body: await parseErrorBody(output.body, context),
3978
- };
3979
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
3980
- switch (errorCode) {
3981
- case "AccessDeniedException":
3982
- case "com.amazonaws.networkmanager#AccessDeniedException":
3983
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
3984
- case "InternalServerException":
3985
- case "com.amazonaws.networkmanager#InternalServerException":
3986
- throw await de_InternalServerExceptionRes(parsedOutput, context);
3987
- case "ResourceNotFoundException":
3988
- case "com.amazonaws.networkmanager#ResourceNotFoundException":
3989
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
3990
- case "ThrottlingException":
3991
- case "com.amazonaws.networkmanager#ThrottlingException":
3992
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
3993
- case "ValidationException":
3994
- case "com.amazonaws.networkmanager#ValidationException":
3995
- throw await de_ValidationExceptionRes(parsedOutput, context);
3996
- default:
3997
- const parsedBody = parsedOutput.body;
3998
- return throwDefaultError({
3999
- output,
4000
- parsedBody,
4001
- errorCode,
4002
- });
4003
- }
4004
- };
4005
2019
  export const de_GetVpcAttachmentCommand = async (output, context) => {
4006
2020
  if (output.statusCode !== 200 && output.statusCode >= 300) {
4007
- return de_GetVpcAttachmentCommandError(output, context);
2021
+ return de_CommandError(output, context);
4008
2022
  }
4009
2023
  const contents = map({
4010
2024
  $metadata: deserializeMetadata(output),
@@ -4016,40 +2030,9 @@ export const de_GetVpcAttachmentCommand = async (output, context) => {
4016
2030
  Object.assign(contents, doc);
4017
2031
  return contents;
4018
2032
  };
4019
- const de_GetVpcAttachmentCommandError = async (output, context) => {
4020
- const parsedOutput = {
4021
- ...output,
4022
- body: await parseErrorBody(output.body, context),
4023
- };
4024
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
4025
- switch (errorCode) {
4026
- case "AccessDeniedException":
4027
- case "com.amazonaws.networkmanager#AccessDeniedException":
4028
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
4029
- case "InternalServerException":
4030
- case "com.amazonaws.networkmanager#InternalServerException":
4031
- throw await de_InternalServerExceptionRes(parsedOutput, context);
4032
- case "ResourceNotFoundException":
4033
- case "com.amazonaws.networkmanager#ResourceNotFoundException":
4034
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
4035
- case "ThrottlingException":
4036
- case "com.amazonaws.networkmanager#ThrottlingException":
4037
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
4038
- case "ValidationException":
4039
- case "com.amazonaws.networkmanager#ValidationException":
4040
- throw await de_ValidationExceptionRes(parsedOutput, context);
4041
- default:
4042
- const parsedBody = parsedOutput.body;
4043
- return throwDefaultError({
4044
- output,
4045
- parsedBody,
4046
- errorCode,
4047
- });
4048
- }
4049
- };
4050
2033
  export const de_ListAttachmentsCommand = async (output, context) => {
4051
2034
  if (output.statusCode !== 200 && output.statusCode >= 300) {
4052
- return de_ListAttachmentsCommandError(output, context);
2035
+ return de_CommandError(output, context);
4053
2036
  }
4054
2037
  const contents = map({
4055
2038
  $metadata: deserializeMetadata(output),
@@ -4062,37 +2045,9 @@ export const de_ListAttachmentsCommand = async (output, context) => {
4062
2045
  Object.assign(contents, doc);
4063
2046
  return contents;
4064
2047
  };
4065
- const de_ListAttachmentsCommandError = async (output, context) => {
4066
- const parsedOutput = {
4067
- ...output,
4068
- body: await parseErrorBody(output.body, context),
4069
- };
4070
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
4071
- switch (errorCode) {
4072
- case "AccessDeniedException":
4073
- case "com.amazonaws.networkmanager#AccessDeniedException":
4074
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
4075
- case "InternalServerException":
4076
- case "com.amazonaws.networkmanager#InternalServerException":
4077
- throw await de_InternalServerExceptionRes(parsedOutput, context);
4078
- case "ThrottlingException":
4079
- case "com.amazonaws.networkmanager#ThrottlingException":
4080
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
4081
- case "ValidationException":
4082
- case "com.amazonaws.networkmanager#ValidationException":
4083
- throw await de_ValidationExceptionRes(parsedOutput, context);
4084
- default:
4085
- const parsedBody = parsedOutput.body;
4086
- return throwDefaultError({
4087
- output,
4088
- parsedBody,
4089
- errorCode,
4090
- });
4091
- }
4092
- };
4093
2048
  export const de_ListConnectPeersCommand = async (output, context) => {
4094
2049
  if (output.statusCode !== 200 && output.statusCode >= 300) {
4095
- return de_ListConnectPeersCommandError(output, context);
2050
+ return de_CommandError(output, context);
4096
2051
  }
4097
2052
  const contents = map({
4098
2053
  $metadata: deserializeMetadata(output),
@@ -4105,37 +2060,9 @@ export const de_ListConnectPeersCommand = async (output, context) => {
4105
2060
  Object.assign(contents, doc);
4106
2061
  return contents;
4107
2062
  };
4108
- const de_ListConnectPeersCommandError = async (output, context) => {
4109
- const parsedOutput = {
4110
- ...output,
4111
- body: await parseErrorBody(output.body, context),
4112
- };
4113
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
4114
- switch (errorCode) {
4115
- case "AccessDeniedException":
4116
- case "com.amazonaws.networkmanager#AccessDeniedException":
4117
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
4118
- case "InternalServerException":
4119
- case "com.amazonaws.networkmanager#InternalServerException":
4120
- throw await de_InternalServerExceptionRes(parsedOutput, context);
4121
- case "ThrottlingException":
4122
- case "com.amazonaws.networkmanager#ThrottlingException":
4123
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
4124
- case "ValidationException":
4125
- case "com.amazonaws.networkmanager#ValidationException":
4126
- throw await de_ValidationExceptionRes(parsedOutput, context);
4127
- default:
4128
- const parsedBody = parsedOutput.body;
4129
- return throwDefaultError({
4130
- output,
4131
- parsedBody,
4132
- errorCode,
4133
- });
4134
- }
4135
- };
4136
2063
  export const de_ListCoreNetworkPolicyVersionsCommand = async (output, context) => {
4137
2064
  if (output.statusCode !== 200 && output.statusCode >= 300) {
4138
- return de_ListCoreNetworkPolicyVersionsCommandError(output, context);
2065
+ return de_CommandError(output, context);
4139
2066
  }
4140
2067
  const contents = map({
4141
2068
  $metadata: deserializeMetadata(output),
@@ -4148,40 +2075,9 @@ export const de_ListCoreNetworkPolicyVersionsCommand = async (output, context) =
4148
2075
  Object.assign(contents, doc);
4149
2076
  return contents;
4150
2077
  };
4151
- const de_ListCoreNetworkPolicyVersionsCommandError = async (output, context) => {
4152
- const parsedOutput = {
4153
- ...output,
4154
- body: await parseErrorBody(output.body, context),
4155
- };
4156
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
4157
- switch (errorCode) {
4158
- case "AccessDeniedException":
4159
- case "com.amazonaws.networkmanager#AccessDeniedException":
4160
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
4161
- case "InternalServerException":
4162
- case "com.amazonaws.networkmanager#InternalServerException":
4163
- throw await de_InternalServerExceptionRes(parsedOutput, context);
4164
- case "ResourceNotFoundException":
4165
- case "com.amazonaws.networkmanager#ResourceNotFoundException":
4166
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
4167
- case "ThrottlingException":
4168
- case "com.amazonaws.networkmanager#ThrottlingException":
4169
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
4170
- case "ValidationException":
4171
- case "com.amazonaws.networkmanager#ValidationException":
4172
- throw await de_ValidationExceptionRes(parsedOutput, context);
4173
- default:
4174
- const parsedBody = parsedOutput.body;
4175
- return throwDefaultError({
4176
- output,
4177
- parsedBody,
4178
- errorCode,
4179
- });
4180
- }
4181
- };
4182
2078
  export const de_ListCoreNetworksCommand = async (output, context) => {
4183
2079
  if (output.statusCode !== 200 && output.statusCode >= 300) {
4184
- return de_ListCoreNetworksCommandError(output, context);
2080
+ return de_CommandError(output, context);
4185
2081
  }
4186
2082
  const contents = map({
4187
2083
  $metadata: deserializeMetadata(output),
@@ -4194,37 +2090,9 @@ export const de_ListCoreNetworksCommand = async (output, context) => {
4194
2090
  Object.assign(contents, doc);
4195
2091
  return contents;
4196
2092
  };
4197
- const de_ListCoreNetworksCommandError = async (output, context) => {
4198
- const parsedOutput = {
4199
- ...output,
4200
- body: await parseErrorBody(output.body, context),
4201
- };
4202
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
4203
- switch (errorCode) {
4204
- case "AccessDeniedException":
4205
- case "com.amazonaws.networkmanager#AccessDeniedException":
4206
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
4207
- case "InternalServerException":
4208
- case "com.amazonaws.networkmanager#InternalServerException":
4209
- throw await de_InternalServerExceptionRes(parsedOutput, context);
4210
- case "ThrottlingException":
4211
- case "com.amazonaws.networkmanager#ThrottlingException":
4212
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
4213
- case "ValidationException":
4214
- case "com.amazonaws.networkmanager#ValidationException":
4215
- throw await de_ValidationExceptionRes(parsedOutput, context);
4216
- default:
4217
- const parsedBody = parsedOutput.body;
4218
- return throwDefaultError({
4219
- output,
4220
- parsedBody,
4221
- errorCode,
4222
- });
4223
- }
4224
- };
4225
2093
  export const de_ListOrganizationServiceAccessStatusCommand = async (output, context) => {
4226
2094
  if (output.statusCode !== 200 && output.statusCode >= 300) {
4227
- return de_ListOrganizationServiceAccessStatusCommandError(output, context);
2095
+ return de_CommandError(output, context);
4228
2096
  }
4229
2097
  const contents = map({
4230
2098
  $metadata: deserializeMetadata(output),
@@ -4237,22 +2105,9 @@ export const de_ListOrganizationServiceAccessStatusCommand = async (output, cont
4237
2105
  Object.assign(contents, doc);
4238
2106
  return contents;
4239
2107
  };
4240
- const de_ListOrganizationServiceAccessStatusCommandError = async (output, context) => {
4241
- const parsedOutput = {
4242
- ...output,
4243
- body: await parseErrorBody(output.body, context),
4244
- };
4245
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
4246
- const parsedBody = parsedOutput.body;
4247
- return throwDefaultError({
4248
- output,
4249
- parsedBody,
4250
- errorCode,
4251
- });
4252
- };
4253
2108
  export const de_ListPeeringsCommand = async (output, context) => {
4254
2109
  if (output.statusCode !== 200 && output.statusCode >= 300) {
4255
- return de_ListPeeringsCommandError(output, context);
2110
+ return de_CommandError(output, context);
4256
2111
  }
4257
2112
  const contents = map({
4258
2113
  $metadata: deserializeMetadata(output),
@@ -4265,37 +2120,9 @@ export const de_ListPeeringsCommand = async (output, context) => {
4265
2120
  Object.assign(contents, doc);
4266
2121
  return contents;
4267
2122
  };
4268
- const de_ListPeeringsCommandError = async (output, context) => {
4269
- const parsedOutput = {
4270
- ...output,
4271
- body: await parseErrorBody(output.body, context),
4272
- };
4273
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
4274
- switch (errorCode) {
4275
- case "AccessDeniedException":
4276
- case "com.amazonaws.networkmanager#AccessDeniedException":
4277
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
4278
- case "InternalServerException":
4279
- case "com.amazonaws.networkmanager#InternalServerException":
4280
- throw await de_InternalServerExceptionRes(parsedOutput, context);
4281
- case "ThrottlingException":
4282
- case "com.amazonaws.networkmanager#ThrottlingException":
4283
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
4284
- case "ValidationException":
4285
- case "com.amazonaws.networkmanager#ValidationException":
4286
- throw await de_ValidationExceptionRes(parsedOutput, context);
4287
- default:
4288
- const parsedBody = parsedOutput.body;
4289
- return throwDefaultError({
4290
- output,
4291
- parsedBody,
4292
- errorCode,
4293
- });
4294
- }
4295
- };
4296
2123
  export const de_ListTagsForResourceCommand = async (output, context) => {
4297
2124
  if (output.statusCode !== 200 && output.statusCode >= 300) {
4298
- return de_ListTagsForResourceCommandError(output, context);
2125
+ return de_CommandError(output, context);
4299
2126
  }
4300
2127
  const contents = map({
4301
2128
  $metadata: deserializeMetadata(output),
@@ -4307,40 +2134,9 @@ export const de_ListTagsForResourceCommand = async (output, context) => {
4307
2134
  Object.assign(contents, doc);
4308
2135
  return contents;
4309
2136
  };
4310
- const de_ListTagsForResourceCommandError = async (output, context) => {
4311
- const parsedOutput = {
4312
- ...output,
4313
- body: await parseErrorBody(output.body, context),
4314
- };
4315
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
4316
- switch (errorCode) {
4317
- case "AccessDeniedException":
4318
- case "com.amazonaws.networkmanager#AccessDeniedException":
4319
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
4320
- case "InternalServerException":
4321
- case "com.amazonaws.networkmanager#InternalServerException":
4322
- throw await de_InternalServerExceptionRes(parsedOutput, context);
4323
- case "ResourceNotFoundException":
4324
- case "com.amazonaws.networkmanager#ResourceNotFoundException":
4325
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
4326
- case "ThrottlingException":
4327
- case "com.amazonaws.networkmanager#ThrottlingException":
4328
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
4329
- case "ValidationException":
4330
- case "com.amazonaws.networkmanager#ValidationException":
4331
- throw await de_ValidationExceptionRes(parsedOutput, context);
4332
- default:
4333
- const parsedBody = parsedOutput.body;
4334
- return throwDefaultError({
4335
- output,
4336
- parsedBody,
4337
- errorCode,
4338
- });
4339
- }
4340
- };
4341
2137
  export const de_PutCoreNetworkPolicyCommand = async (output, context) => {
4342
2138
  if (output.statusCode !== 200 && output.statusCode >= 300) {
4343
- return de_PutCoreNetworkPolicyCommandError(output, context);
2139
+ return de_CommandError(output, context);
4344
2140
  }
4345
2141
  const contents = map({
4346
2142
  $metadata: deserializeMetadata(output),
@@ -4352,46 +2148,9 @@ export const de_PutCoreNetworkPolicyCommand = async (output, context) => {
4352
2148
  Object.assign(contents, doc);
4353
2149
  return contents;
4354
2150
  };
4355
- const de_PutCoreNetworkPolicyCommandError = async (output, context) => {
4356
- const parsedOutput = {
4357
- ...output,
4358
- body: await parseErrorBody(output.body, context),
4359
- };
4360
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
4361
- switch (errorCode) {
4362
- case "AccessDeniedException":
4363
- case "com.amazonaws.networkmanager#AccessDeniedException":
4364
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
4365
- case "ConflictException":
4366
- case "com.amazonaws.networkmanager#ConflictException":
4367
- throw await de_ConflictExceptionRes(parsedOutput, context);
4368
- case "CoreNetworkPolicyException":
4369
- case "com.amazonaws.networkmanager#CoreNetworkPolicyException":
4370
- throw await de_CoreNetworkPolicyExceptionRes(parsedOutput, context);
4371
- case "InternalServerException":
4372
- case "com.amazonaws.networkmanager#InternalServerException":
4373
- throw await de_InternalServerExceptionRes(parsedOutput, context);
4374
- case "ResourceNotFoundException":
4375
- case "com.amazonaws.networkmanager#ResourceNotFoundException":
4376
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
4377
- case "ThrottlingException":
4378
- case "com.amazonaws.networkmanager#ThrottlingException":
4379
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
4380
- case "ValidationException":
4381
- case "com.amazonaws.networkmanager#ValidationException":
4382
- throw await de_ValidationExceptionRes(parsedOutput, context);
4383
- default:
4384
- const parsedBody = parsedOutput.body;
4385
- return throwDefaultError({
4386
- output,
4387
- parsedBody,
4388
- errorCode,
4389
- });
4390
- }
4391
- };
4392
2151
  export const de_PutResourcePolicyCommand = async (output, context) => {
4393
2152
  if (output.statusCode !== 200 && output.statusCode >= 300) {
4394
- return de_PutResourcePolicyCommandError(output, context);
2153
+ return de_CommandError(output, context);
4395
2154
  }
4396
2155
  const contents = map({
4397
2156
  $metadata: deserializeMetadata(output),
@@ -4399,43 +2158,9 @@ export const de_PutResourcePolicyCommand = async (output, context) => {
4399
2158
  await collectBody(output.body, context);
4400
2159
  return contents;
4401
2160
  };
4402
- const de_PutResourcePolicyCommandError = async (output, context) => {
4403
- const parsedOutput = {
4404
- ...output,
4405
- body: await parseErrorBody(output.body, context),
4406
- };
4407
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
4408
- switch (errorCode) {
4409
- case "AccessDeniedException":
4410
- case "com.amazonaws.networkmanager#AccessDeniedException":
4411
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
4412
- case "ConflictException":
4413
- case "com.amazonaws.networkmanager#ConflictException":
4414
- throw await de_ConflictExceptionRes(parsedOutput, context);
4415
- case "InternalServerException":
4416
- case "com.amazonaws.networkmanager#InternalServerException":
4417
- throw await de_InternalServerExceptionRes(parsedOutput, context);
4418
- case "ServiceQuotaExceededException":
4419
- case "com.amazonaws.networkmanager#ServiceQuotaExceededException":
4420
- throw await de_ServiceQuotaExceededExceptionRes(parsedOutput, context);
4421
- case "ThrottlingException":
4422
- case "com.amazonaws.networkmanager#ThrottlingException":
4423
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
4424
- case "ValidationException":
4425
- case "com.amazonaws.networkmanager#ValidationException":
4426
- throw await de_ValidationExceptionRes(parsedOutput, context);
4427
- default:
4428
- const parsedBody = parsedOutput.body;
4429
- return throwDefaultError({
4430
- output,
4431
- parsedBody,
4432
- errorCode,
4433
- });
4434
- }
4435
- };
4436
2161
  export const de_RegisterTransitGatewayCommand = async (output, context) => {
4437
2162
  if (output.statusCode !== 200 && output.statusCode >= 300) {
4438
- return de_RegisterTransitGatewayCommandError(output, context);
2163
+ return de_CommandError(output, context);
4439
2164
  }
4440
2165
  const contents = map({
4441
2166
  $metadata: deserializeMetadata(output),
@@ -4447,43 +2172,9 @@ export const de_RegisterTransitGatewayCommand = async (output, context) => {
4447
2172
  Object.assign(contents, doc);
4448
2173
  return contents;
4449
2174
  };
4450
- const de_RegisterTransitGatewayCommandError = async (output, context) => {
4451
- const parsedOutput = {
4452
- ...output,
4453
- body: await parseErrorBody(output.body, context),
4454
- };
4455
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
4456
- switch (errorCode) {
4457
- case "AccessDeniedException":
4458
- case "com.amazonaws.networkmanager#AccessDeniedException":
4459
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
4460
- case "ConflictException":
4461
- case "com.amazonaws.networkmanager#ConflictException":
4462
- throw await de_ConflictExceptionRes(parsedOutput, context);
4463
- case "InternalServerException":
4464
- case "com.amazonaws.networkmanager#InternalServerException":
4465
- throw await de_InternalServerExceptionRes(parsedOutput, context);
4466
- case "ResourceNotFoundException":
4467
- case "com.amazonaws.networkmanager#ResourceNotFoundException":
4468
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
4469
- case "ThrottlingException":
4470
- case "com.amazonaws.networkmanager#ThrottlingException":
4471
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
4472
- case "ValidationException":
4473
- case "com.amazonaws.networkmanager#ValidationException":
4474
- throw await de_ValidationExceptionRes(parsedOutput, context);
4475
- default:
4476
- const parsedBody = parsedOutput.body;
4477
- return throwDefaultError({
4478
- output,
4479
- parsedBody,
4480
- errorCode,
4481
- });
4482
- }
4483
- };
4484
2175
  export const de_RejectAttachmentCommand = async (output, context) => {
4485
2176
  if (output.statusCode !== 200 && output.statusCode >= 300) {
4486
- return de_RejectAttachmentCommandError(output, context);
2177
+ return de_CommandError(output, context);
4487
2178
  }
4488
2179
  const contents = map({
4489
2180
  $metadata: deserializeMetadata(output),
@@ -4495,43 +2186,9 @@ export const de_RejectAttachmentCommand = async (output, context) => {
4495
2186
  Object.assign(contents, doc);
4496
2187
  return contents;
4497
2188
  };
4498
- const de_RejectAttachmentCommandError = async (output, context) => {
4499
- const parsedOutput = {
4500
- ...output,
4501
- body: await parseErrorBody(output.body, context),
4502
- };
4503
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
4504
- switch (errorCode) {
4505
- case "AccessDeniedException":
4506
- case "com.amazonaws.networkmanager#AccessDeniedException":
4507
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
4508
- case "ConflictException":
4509
- case "com.amazonaws.networkmanager#ConflictException":
4510
- throw await de_ConflictExceptionRes(parsedOutput, context);
4511
- case "InternalServerException":
4512
- case "com.amazonaws.networkmanager#InternalServerException":
4513
- throw await de_InternalServerExceptionRes(parsedOutput, context);
4514
- case "ResourceNotFoundException":
4515
- case "com.amazonaws.networkmanager#ResourceNotFoundException":
4516
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
4517
- case "ThrottlingException":
4518
- case "com.amazonaws.networkmanager#ThrottlingException":
4519
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
4520
- case "ValidationException":
4521
- case "com.amazonaws.networkmanager#ValidationException":
4522
- throw await de_ValidationExceptionRes(parsedOutput, context);
4523
- default:
4524
- const parsedBody = parsedOutput.body;
4525
- return throwDefaultError({
4526
- output,
4527
- parsedBody,
4528
- errorCode,
4529
- });
4530
- }
4531
- };
4532
2189
  export const de_RestoreCoreNetworkPolicyVersionCommand = async (output, context) => {
4533
2190
  if (output.statusCode !== 200 && output.statusCode >= 300) {
4534
- return de_RestoreCoreNetworkPolicyVersionCommandError(output, context);
2191
+ return de_CommandError(output, context);
4535
2192
  }
4536
2193
  const contents = map({
4537
2194
  $metadata: deserializeMetadata(output),
@@ -4543,43 +2200,9 @@ export const de_RestoreCoreNetworkPolicyVersionCommand = async (output, context)
4543
2200
  Object.assign(contents, doc);
4544
2201
  return contents;
4545
2202
  };
4546
- const de_RestoreCoreNetworkPolicyVersionCommandError = async (output, context) => {
4547
- const parsedOutput = {
4548
- ...output,
4549
- body: await parseErrorBody(output.body, context),
4550
- };
4551
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
4552
- switch (errorCode) {
4553
- case "AccessDeniedException":
4554
- case "com.amazonaws.networkmanager#AccessDeniedException":
4555
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
4556
- case "ConflictException":
4557
- case "com.amazonaws.networkmanager#ConflictException":
4558
- throw await de_ConflictExceptionRes(parsedOutput, context);
4559
- case "InternalServerException":
4560
- case "com.amazonaws.networkmanager#InternalServerException":
4561
- throw await de_InternalServerExceptionRes(parsedOutput, context);
4562
- case "ResourceNotFoundException":
4563
- case "com.amazonaws.networkmanager#ResourceNotFoundException":
4564
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
4565
- case "ThrottlingException":
4566
- case "com.amazonaws.networkmanager#ThrottlingException":
4567
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
4568
- case "ValidationException":
4569
- case "com.amazonaws.networkmanager#ValidationException":
4570
- throw await de_ValidationExceptionRes(parsedOutput, context);
4571
- default:
4572
- const parsedBody = parsedOutput.body;
4573
- return throwDefaultError({
4574
- output,
4575
- parsedBody,
4576
- errorCode,
4577
- });
4578
- }
4579
- };
4580
2203
  export const de_StartOrganizationServiceAccessUpdateCommand = async (output, context) => {
4581
2204
  if (output.statusCode !== 200 && output.statusCode >= 300) {
4582
- return de_StartOrganizationServiceAccessUpdateCommandError(output, context);
2205
+ return de_CommandError(output, context);
4583
2206
  }
4584
2207
  const contents = map({
4585
2208
  $metadata: deserializeMetadata(output),
@@ -4591,43 +2214,9 @@ export const de_StartOrganizationServiceAccessUpdateCommand = async (output, con
4591
2214
  Object.assign(contents, doc);
4592
2215
  return contents;
4593
2216
  };
4594
- const de_StartOrganizationServiceAccessUpdateCommandError = async (output, context) => {
4595
- const parsedOutput = {
4596
- ...output,
4597
- body: await parseErrorBody(output.body, context),
4598
- };
4599
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
4600
- switch (errorCode) {
4601
- case "AccessDeniedException":
4602
- case "com.amazonaws.networkmanager#AccessDeniedException":
4603
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
4604
- case "ConflictException":
4605
- case "com.amazonaws.networkmanager#ConflictException":
4606
- throw await de_ConflictExceptionRes(parsedOutput, context);
4607
- case "InternalServerException":
4608
- case "com.amazonaws.networkmanager#InternalServerException":
4609
- throw await de_InternalServerExceptionRes(parsedOutput, context);
4610
- case "ServiceQuotaExceededException":
4611
- case "com.amazonaws.networkmanager#ServiceQuotaExceededException":
4612
- throw await de_ServiceQuotaExceededExceptionRes(parsedOutput, context);
4613
- case "ThrottlingException":
4614
- case "com.amazonaws.networkmanager#ThrottlingException":
4615
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
4616
- case "ValidationException":
4617
- case "com.amazonaws.networkmanager#ValidationException":
4618
- throw await de_ValidationExceptionRes(parsedOutput, context);
4619
- default:
4620
- const parsedBody = parsedOutput.body;
4621
- return throwDefaultError({
4622
- output,
4623
- parsedBody,
4624
- errorCode,
4625
- });
4626
- }
4627
- };
4628
2217
  export const de_StartRouteAnalysisCommand = async (output, context) => {
4629
2218
  if (output.statusCode !== 200 && output.statusCode >= 300) {
4630
- return de_StartRouteAnalysisCommandError(output, context);
2219
+ return de_CommandError(output, context);
4631
2220
  }
4632
2221
  const contents = map({
4633
2222
  $metadata: deserializeMetadata(output),
@@ -4639,134 +2228,29 @@ export const de_StartRouteAnalysisCommand = async (output, context) => {
4639
2228
  Object.assign(contents, doc);
4640
2229
  return contents;
4641
2230
  };
4642
- const de_StartRouteAnalysisCommandError = async (output, context) => {
4643
- const parsedOutput = {
4644
- ...output,
4645
- body: await parseErrorBody(output.body, context),
4646
- };
4647
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
4648
- switch (errorCode) {
4649
- case "AccessDeniedException":
4650
- case "com.amazonaws.networkmanager#AccessDeniedException":
4651
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
4652
- case "ConflictException":
4653
- case "com.amazonaws.networkmanager#ConflictException":
4654
- throw await de_ConflictExceptionRes(parsedOutput, context);
4655
- case "InternalServerException":
4656
- case "com.amazonaws.networkmanager#InternalServerException":
4657
- throw await de_InternalServerExceptionRes(parsedOutput, context);
4658
- case "ResourceNotFoundException":
4659
- case "com.amazonaws.networkmanager#ResourceNotFoundException":
4660
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
4661
- case "ThrottlingException":
4662
- case "com.amazonaws.networkmanager#ThrottlingException":
4663
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
4664
- case "ValidationException":
4665
- case "com.amazonaws.networkmanager#ValidationException":
4666
- throw await de_ValidationExceptionRes(parsedOutput, context);
4667
- default:
4668
- const parsedBody = parsedOutput.body;
4669
- return throwDefaultError({
4670
- output,
4671
- parsedBody,
4672
- errorCode,
4673
- });
4674
- }
4675
- };
4676
- export const de_TagResourceCommand = async (output, context) => {
4677
- if (output.statusCode !== 200 && output.statusCode >= 300) {
4678
- return de_TagResourceCommandError(output, context);
4679
- }
4680
- const contents = map({
4681
- $metadata: deserializeMetadata(output),
4682
- });
4683
- await collectBody(output.body, context);
4684
- return contents;
4685
- };
4686
- const de_TagResourceCommandError = async (output, context) => {
4687
- const parsedOutput = {
4688
- ...output,
4689
- body: await parseErrorBody(output.body, context),
4690
- };
4691
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
4692
- switch (errorCode) {
4693
- case "AccessDeniedException":
4694
- case "com.amazonaws.networkmanager#AccessDeniedException":
4695
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
4696
- case "ConflictException":
4697
- case "com.amazonaws.networkmanager#ConflictException":
4698
- throw await de_ConflictExceptionRes(parsedOutput, context);
4699
- case "InternalServerException":
4700
- case "com.amazonaws.networkmanager#InternalServerException":
4701
- throw await de_InternalServerExceptionRes(parsedOutput, context);
4702
- case "ResourceNotFoundException":
4703
- case "com.amazonaws.networkmanager#ResourceNotFoundException":
4704
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
4705
- case "ServiceQuotaExceededException":
4706
- case "com.amazonaws.networkmanager#ServiceQuotaExceededException":
4707
- throw await de_ServiceQuotaExceededExceptionRes(parsedOutput, context);
4708
- case "ThrottlingException":
4709
- case "com.amazonaws.networkmanager#ThrottlingException":
4710
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
4711
- case "ValidationException":
4712
- case "com.amazonaws.networkmanager#ValidationException":
4713
- throw await de_ValidationExceptionRes(parsedOutput, context);
4714
- default:
4715
- const parsedBody = parsedOutput.body;
4716
- return throwDefaultError({
4717
- output,
4718
- parsedBody,
4719
- errorCode,
4720
- });
4721
- }
4722
- };
4723
- export const de_UntagResourceCommand = async (output, context) => {
4724
- if (output.statusCode !== 200 && output.statusCode >= 300) {
4725
- return de_UntagResourceCommandError(output, context);
4726
- }
4727
- const contents = map({
4728
- $metadata: deserializeMetadata(output),
4729
- });
4730
- await collectBody(output.body, context);
4731
- return contents;
4732
- };
4733
- const de_UntagResourceCommandError = async (output, context) => {
4734
- const parsedOutput = {
4735
- ...output,
4736
- body: await parseErrorBody(output.body, context),
4737
- };
4738
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
4739
- switch (errorCode) {
4740
- case "AccessDeniedException":
4741
- case "com.amazonaws.networkmanager#AccessDeniedException":
4742
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
4743
- case "ConflictException":
4744
- case "com.amazonaws.networkmanager#ConflictException":
4745
- throw await de_ConflictExceptionRes(parsedOutput, context);
4746
- case "InternalServerException":
4747
- case "com.amazonaws.networkmanager#InternalServerException":
4748
- throw await de_InternalServerExceptionRes(parsedOutput, context);
4749
- case "ResourceNotFoundException":
4750
- case "com.amazonaws.networkmanager#ResourceNotFoundException":
4751
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
4752
- case "ThrottlingException":
4753
- case "com.amazonaws.networkmanager#ThrottlingException":
4754
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
4755
- case "ValidationException":
4756
- case "com.amazonaws.networkmanager#ValidationException":
4757
- throw await de_ValidationExceptionRes(parsedOutput, context);
4758
- default:
4759
- const parsedBody = parsedOutput.body;
4760
- return throwDefaultError({
4761
- output,
4762
- parsedBody,
4763
- errorCode,
4764
- });
2231
+ export const de_TagResourceCommand = async (output, context) => {
2232
+ if (output.statusCode !== 200 && output.statusCode >= 300) {
2233
+ return de_CommandError(output, context);
2234
+ }
2235
+ const contents = map({
2236
+ $metadata: deserializeMetadata(output),
2237
+ });
2238
+ await collectBody(output.body, context);
2239
+ return contents;
2240
+ };
2241
+ export const de_UntagResourceCommand = async (output, context) => {
2242
+ if (output.statusCode !== 200 && output.statusCode >= 300) {
2243
+ return de_CommandError(output, context);
4765
2244
  }
2245
+ const contents = map({
2246
+ $metadata: deserializeMetadata(output),
2247
+ });
2248
+ await collectBody(output.body, context);
2249
+ return contents;
4766
2250
  };
4767
2251
  export const de_UpdateConnectionCommand = async (output, context) => {
4768
2252
  if (output.statusCode !== 200 && output.statusCode >= 300) {
4769
- return de_UpdateConnectionCommandError(output, context);
2253
+ return de_CommandError(output, context);
4770
2254
  }
4771
2255
  const contents = map({
4772
2256
  $metadata: deserializeMetadata(output),
@@ -4778,43 +2262,9 @@ export const de_UpdateConnectionCommand = async (output, context) => {
4778
2262
  Object.assign(contents, doc);
4779
2263
  return contents;
4780
2264
  };
4781
- const de_UpdateConnectionCommandError = async (output, context) => {
4782
- const parsedOutput = {
4783
- ...output,
4784
- body: await parseErrorBody(output.body, context),
4785
- };
4786
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
4787
- switch (errorCode) {
4788
- case "AccessDeniedException":
4789
- case "com.amazonaws.networkmanager#AccessDeniedException":
4790
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
4791
- case "ConflictException":
4792
- case "com.amazonaws.networkmanager#ConflictException":
4793
- throw await de_ConflictExceptionRes(parsedOutput, context);
4794
- case "InternalServerException":
4795
- case "com.amazonaws.networkmanager#InternalServerException":
4796
- throw await de_InternalServerExceptionRes(parsedOutput, context);
4797
- case "ResourceNotFoundException":
4798
- case "com.amazonaws.networkmanager#ResourceNotFoundException":
4799
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
4800
- case "ThrottlingException":
4801
- case "com.amazonaws.networkmanager#ThrottlingException":
4802
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
4803
- case "ValidationException":
4804
- case "com.amazonaws.networkmanager#ValidationException":
4805
- throw await de_ValidationExceptionRes(parsedOutput, context);
4806
- default:
4807
- const parsedBody = parsedOutput.body;
4808
- return throwDefaultError({
4809
- output,
4810
- parsedBody,
4811
- errorCode,
4812
- });
4813
- }
4814
- };
4815
2265
  export const de_UpdateCoreNetworkCommand = async (output, context) => {
4816
2266
  if (output.statusCode !== 200 && output.statusCode >= 300) {
4817
- return de_UpdateCoreNetworkCommandError(output, context);
2267
+ return de_CommandError(output, context);
4818
2268
  }
4819
2269
  const contents = map({
4820
2270
  $metadata: deserializeMetadata(output),
@@ -4826,43 +2276,9 @@ export const de_UpdateCoreNetworkCommand = async (output, context) => {
4826
2276
  Object.assign(contents, doc);
4827
2277
  return contents;
4828
2278
  };
4829
- const de_UpdateCoreNetworkCommandError = async (output, context) => {
4830
- const parsedOutput = {
4831
- ...output,
4832
- body: await parseErrorBody(output.body, context),
4833
- };
4834
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
4835
- switch (errorCode) {
4836
- case "AccessDeniedException":
4837
- case "com.amazonaws.networkmanager#AccessDeniedException":
4838
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
4839
- case "ConflictException":
4840
- case "com.amazonaws.networkmanager#ConflictException":
4841
- throw await de_ConflictExceptionRes(parsedOutput, context);
4842
- case "InternalServerException":
4843
- case "com.amazonaws.networkmanager#InternalServerException":
4844
- throw await de_InternalServerExceptionRes(parsedOutput, context);
4845
- case "ResourceNotFoundException":
4846
- case "com.amazonaws.networkmanager#ResourceNotFoundException":
4847
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
4848
- case "ThrottlingException":
4849
- case "com.amazonaws.networkmanager#ThrottlingException":
4850
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
4851
- case "ValidationException":
4852
- case "com.amazonaws.networkmanager#ValidationException":
4853
- throw await de_ValidationExceptionRes(parsedOutput, context);
4854
- default:
4855
- const parsedBody = parsedOutput.body;
4856
- return throwDefaultError({
4857
- output,
4858
- parsedBody,
4859
- errorCode,
4860
- });
4861
- }
4862
- };
4863
2279
  export const de_UpdateDeviceCommand = async (output, context) => {
4864
2280
  if (output.statusCode !== 200 && output.statusCode >= 300) {
4865
- return de_UpdateDeviceCommandError(output, context);
2281
+ return de_CommandError(output, context);
4866
2282
  }
4867
2283
  const contents = map({
4868
2284
  $metadata: deserializeMetadata(output),
@@ -4874,43 +2290,9 @@ export const de_UpdateDeviceCommand = async (output, context) => {
4874
2290
  Object.assign(contents, doc);
4875
2291
  return contents;
4876
2292
  };
4877
- const de_UpdateDeviceCommandError = async (output, context) => {
4878
- const parsedOutput = {
4879
- ...output,
4880
- body: await parseErrorBody(output.body, context),
4881
- };
4882
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
4883
- switch (errorCode) {
4884
- case "AccessDeniedException":
4885
- case "com.amazonaws.networkmanager#AccessDeniedException":
4886
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
4887
- case "ConflictException":
4888
- case "com.amazonaws.networkmanager#ConflictException":
4889
- throw await de_ConflictExceptionRes(parsedOutput, context);
4890
- case "InternalServerException":
4891
- case "com.amazonaws.networkmanager#InternalServerException":
4892
- throw await de_InternalServerExceptionRes(parsedOutput, context);
4893
- case "ResourceNotFoundException":
4894
- case "com.amazonaws.networkmanager#ResourceNotFoundException":
4895
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
4896
- case "ThrottlingException":
4897
- case "com.amazonaws.networkmanager#ThrottlingException":
4898
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
4899
- case "ValidationException":
4900
- case "com.amazonaws.networkmanager#ValidationException":
4901
- throw await de_ValidationExceptionRes(parsedOutput, context);
4902
- default:
4903
- const parsedBody = parsedOutput.body;
4904
- return throwDefaultError({
4905
- output,
4906
- parsedBody,
4907
- errorCode,
4908
- });
4909
- }
4910
- };
4911
2293
  export const de_UpdateGlobalNetworkCommand = async (output, context) => {
4912
2294
  if (output.statusCode !== 200 && output.statusCode >= 300) {
4913
- return de_UpdateGlobalNetworkCommandError(output, context);
2295
+ return de_CommandError(output, context);
4914
2296
  }
4915
2297
  const contents = map({
4916
2298
  $metadata: deserializeMetadata(output),
@@ -4922,43 +2304,9 @@ export const de_UpdateGlobalNetworkCommand = async (output, context) => {
4922
2304
  Object.assign(contents, doc);
4923
2305
  return contents;
4924
2306
  };
4925
- const de_UpdateGlobalNetworkCommandError = async (output, context) => {
4926
- const parsedOutput = {
4927
- ...output,
4928
- body: await parseErrorBody(output.body, context),
4929
- };
4930
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
4931
- switch (errorCode) {
4932
- case "AccessDeniedException":
4933
- case "com.amazonaws.networkmanager#AccessDeniedException":
4934
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
4935
- case "ConflictException":
4936
- case "com.amazonaws.networkmanager#ConflictException":
4937
- throw await de_ConflictExceptionRes(parsedOutput, context);
4938
- case "InternalServerException":
4939
- case "com.amazonaws.networkmanager#InternalServerException":
4940
- throw await de_InternalServerExceptionRes(parsedOutput, context);
4941
- case "ResourceNotFoundException":
4942
- case "com.amazonaws.networkmanager#ResourceNotFoundException":
4943
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
4944
- case "ThrottlingException":
4945
- case "com.amazonaws.networkmanager#ThrottlingException":
4946
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
4947
- case "ValidationException":
4948
- case "com.amazonaws.networkmanager#ValidationException":
4949
- throw await de_ValidationExceptionRes(parsedOutput, context);
4950
- default:
4951
- const parsedBody = parsedOutput.body;
4952
- return throwDefaultError({
4953
- output,
4954
- parsedBody,
4955
- errorCode,
4956
- });
4957
- }
4958
- };
4959
2307
  export const de_UpdateLinkCommand = async (output, context) => {
4960
2308
  if (output.statusCode !== 200 && output.statusCode >= 300) {
4961
- return de_UpdateLinkCommandError(output, context);
2309
+ return de_CommandError(output, context);
4962
2310
  }
4963
2311
  const contents = map({
4964
2312
  $metadata: deserializeMetadata(output),
@@ -4970,46 +2318,9 @@ export const de_UpdateLinkCommand = async (output, context) => {
4970
2318
  Object.assign(contents, doc);
4971
2319
  return contents;
4972
2320
  };
4973
- const de_UpdateLinkCommandError = async (output, context) => {
4974
- const parsedOutput = {
4975
- ...output,
4976
- body: await parseErrorBody(output.body, context),
4977
- };
4978
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
4979
- switch (errorCode) {
4980
- case "AccessDeniedException":
4981
- case "com.amazonaws.networkmanager#AccessDeniedException":
4982
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
4983
- case "ConflictException":
4984
- case "com.amazonaws.networkmanager#ConflictException":
4985
- throw await de_ConflictExceptionRes(parsedOutput, context);
4986
- case "InternalServerException":
4987
- case "com.amazonaws.networkmanager#InternalServerException":
4988
- throw await de_InternalServerExceptionRes(parsedOutput, context);
4989
- case "ResourceNotFoundException":
4990
- case "com.amazonaws.networkmanager#ResourceNotFoundException":
4991
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
4992
- case "ServiceQuotaExceededException":
4993
- case "com.amazonaws.networkmanager#ServiceQuotaExceededException":
4994
- throw await de_ServiceQuotaExceededExceptionRes(parsedOutput, context);
4995
- case "ThrottlingException":
4996
- case "com.amazonaws.networkmanager#ThrottlingException":
4997
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
4998
- case "ValidationException":
4999
- case "com.amazonaws.networkmanager#ValidationException":
5000
- throw await de_ValidationExceptionRes(parsedOutput, context);
5001
- default:
5002
- const parsedBody = parsedOutput.body;
5003
- return throwDefaultError({
5004
- output,
5005
- parsedBody,
5006
- errorCode,
5007
- });
5008
- }
5009
- };
5010
2321
  export const de_UpdateNetworkResourceMetadataCommand = async (output, context) => {
5011
2322
  if (output.statusCode !== 200 && output.statusCode >= 300) {
5012
- return de_UpdateNetworkResourceMetadataCommandError(output, context);
2323
+ return de_CommandError(output, context);
5013
2324
  }
5014
2325
  const contents = map({
5015
2326
  $metadata: deserializeMetadata(output),
@@ -5022,43 +2333,9 @@ export const de_UpdateNetworkResourceMetadataCommand = async (output, context) =
5022
2333
  Object.assign(contents, doc);
5023
2334
  return contents;
5024
2335
  };
5025
- const de_UpdateNetworkResourceMetadataCommandError = async (output, context) => {
5026
- const parsedOutput = {
5027
- ...output,
5028
- body: await parseErrorBody(output.body, context),
5029
- };
5030
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
5031
- switch (errorCode) {
5032
- case "AccessDeniedException":
5033
- case "com.amazonaws.networkmanager#AccessDeniedException":
5034
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
5035
- case "ConflictException":
5036
- case "com.amazonaws.networkmanager#ConflictException":
5037
- throw await de_ConflictExceptionRes(parsedOutput, context);
5038
- case "InternalServerException":
5039
- case "com.amazonaws.networkmanager#InternalServerException":
5040
- throw await de_InternalServerExceptionRes(parsedOutput, context);
5041
- case "ResourceNotFoundException":
5042
- case "com.amazonaws.networkmanager#ResourceNotFoundException":
5043
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
5044
- case "ThrottlingException":
5045
- case "com.amazonaws.networkmanager#ThrottlingException":
5046
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
5047
- case "ValidationException":
5048
- case "com.amazonaws.networkmanager#ValidationException":
5049
- throw await de_ValidationExceptionRes(parsedOutput, context);
5050
- default:
5051
- const parsedBody = parsedOutput.body;
5052
- return throwDefaultError({
5053
- output,
5054
- parsedBody,
5055
- errorCode,
5056
- });
5057
- }
5058
- };
5059
2336
  export const de_UpdateSiteCommand = async (output, context) => {
5060
2337
  if (output.statusCode !== 200 && output.statusCode >= 300) {
5061
- return de_UpdateSiteCommandError(output, context);
2338
+ return de_CommandError(output, context);
5062
2339
  }
5063
2340
  const contents = map({
5064
2341
  $metadata: deserializeMetadata(output),
@@ -5070,43 +2347,9 @@ export const de_UpdateSiteCommand = async (output, context) => {
5070
2347
  Object.assign(contents, doc);
5071
2348
  return contents;
5072
2349
  };
5073
- const de_UpdateSiteCommandError = async (output, context) => {
5074
- const parsedOutput = {
5075
- ...output,
5076
- body: await parseErrorBody(output.body, context),
5077
- };
5078
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
5079
- switch (errorCode) {
5080
- case "AccessDeniedException":
5081
- case "com.amazonaws.networkmanager#AccessDeniedException":
5082
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
5083
- case "ConflictException":
5084
- case "com.amazonaws.networkmanager#ConflictException":
5085
- throw await de_ConflictExceptionRes(parsedOutput, context);
5086
- case "InternalServerException":
5087
- case "com.amazonaws.networkmanager#InternalServerException":
5088
- throw await de_InternalServerExceptionRes(parsedOutput, context);
5089
- case "ResourceNotFoundException":
5090
- case "com.amazonaws.networkmanager#ResourceNotFoundException":
5091
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
5092
- case "ThrottlingException":
5093
- case "com.amazonaws.networkmanager#ThrottlingException":
5094
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
5095
- case "ValidationException":
5096
- case "com.amazonaws.networkmanager#ValidationException":
5097
- throw await de_ValidationExceptionRes(parsedOutput, context);
5098
- default:
5099
- const parsedBody = parsedOutput.body;
5100
- return throwDefaultError({
5101
- output,
5102
- parsedBody,
5103
- errorCode,
5104
- });
5105
- }
5106
- };
5107
2350
  export const de_UpdateVpcAttachmentCommand = async (output, context) => {
5108
2351
  if (output.statusCode !== 200 && output.statusCode >= 300) {
5109
- return de_UpdateVpcAttachmentCommandError(output, context);
2352
+ return de_CommandError(output, context);
5110
2353
  }
5111
2354
  const contents = map({
5112
2355
  $metadata: deserializeMetadata(output),
@@ -5118,7 +2361,7 @@ export const de_UpdateVpcAttachmentCommand = async (output, context) => {
5118
2361
  Object.assign(contents, doc);
5119
2362
  return contents;
5120
2363
  };
5121
- const de_UpdateVpcAttachmentCommandError = async (output, context) => {
2364
+ const de_CommandError = async (output, context) => {
5122
2365
  const parsedOutput = {
5123
2366
  ...output,
5124
2367
  body: await parseErrorBody(output.body, context),
@@ -5143,6 +2386,12 @@ const de_UpdateVpcAttachmentCommandError = async (output, context) => {
5143
2386
  case "ValidationException":
5144
2387
  case "com.amazonaws.networkmanager#ValidationException":
5145
2388
  throw await de_ValidationExceptionRes(parsedOutput, context);
2389
+ case "ServiceQuotaExceededException":
2390
+ case "com.amazonaws.networkmanager#ServiceQuotaExceededException":
2391
+ throw await de_ServiceQuotaExceededExceptionRes(parsedOutput, context);
2392
+ case "CoreNetworkPolicyException":
2393
+ case "com.amazonaws.networkmanager#CoreNetworkPolicyException":
2394
+ throw await de_CoreNetworkPolicyExceptionRes(parsedOutput, context);
5146
2395
  default:
5147
2396
  const parsedBody = parsedOutput.body;
5148
2397
  return throwDefaultError({