@aws-sdk/client-mgn 3.504.0 → 3.509.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.
@@ -1115,7 +1115,7 @@ export const se_UpdateWaveCommand = async (input, context) => {
1115
1115
  };
1116
1116
  export const de_ArchiveApplicationCommand = async (output, context) => {
1117
1117
  if (output.statusCode !== 200 && output.statusCode >= 300) {
1118
- return de_ArchiveApplicationCommandError(output, context);
1118
+ return de_CommandError(output, context);
1119
1119
  }
1120
1120
  const contents = map({
1121
1121
  $metadata: deserializeMetadata(output),
@@ -1136,37 +1136,9 @@ export const de_ArchiveApplicationCommand = async (output, context) => {
1136
1136
  Object.assign(contents, doc);
1137
1137
  return contents;
1138
1138
  };
1139
- const de_ArchiveApplicationCommandError = async (output, context) => {
1140
- const parsedOutput = {
1141
- ...output,
1142
- body: await parseErrorBody(output.body, context),
1143
- };
1144
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1145
- switch (errorCode) {
1146
- case "ConflictException":
1147
- case "com.amazonaws.mgn#ConflictException":
1148
- throw await de_ConflictExceptionRes(parsedOutput, context);
1149
- case "ResourceNotFoundException":
1150
- case "com.amazonaws.mgn#ResourceNotFoundException":
1151
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
1152
- case "ServiceQuotaExceededException":
1153
- case "com.amazonaws.mgn#ServiceQuotaExceededException":
1154
- throw await de_ServiceQuotaExceededExceptionRes(parsedOutput, context);
1155
- case "UninitializedAccountException":
1156
- case "com.amazonaws.mgn#UninitializedAccountException":
1157
- throw await de_UninitializedAccountExceptionRes(parsedOutput, context);
1158
- default:
1159
- const parsedBody = parsedOutput.body;
1160
- return throwDefaultError({
1161
- output,
1162
- parsedBody,
1163
- errorCode,
1164
- });
1165
- }
1166
- };
1167
1139
  export const de_ArchiveWaveCommand = async (output, context) => {
1168
1140
  if (output.statusCode !== 200 && output.statusCode >= 300) {
1169
- return de_ArchiveWaveCommandError(output, context);
1141
+ return de_CommandError(output, context);
1170
1142
  }
1171
1143
  const contents = map({
1172
1144
  $metadata: deserializeMetadata(output),
@@ -1186,37 +1158,9 @@ export const de_ArchiveWaveCommand = async (output, context) => {
1186
1158
  Object.assign(contents, doc);
1187
1159
  return contents;
1188
1160
  };
1189
- const de_ArchiveWaveCommandError = async (output, context) => {
1190
- const parsedOutput = {
1191
- ...output,
1192
- body: await parseErrorBody(output.body, context),
1193
- };
1194
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1195
- switch (errorCode) {
1196
- case "ConflictException":
1197
- case "com.amazonaws.mgn#ConflictException":
1198
- throw await de_ConflictExceptionRes(parsedOutput, context);
1199
- case "ResourceNotFoundException":
1200
- case "com.amazonaws.mgn#ResourceNotFoundException":
1201
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
1202
- case "ServiceQuotaExceededException":
1203
- case "com.amazonaws.mgn#ServiceQuotaExceededException":
1204
- throw await de_ServiceQuotaExceededExceptionRes(parsedOutput, context);
1205
- case "UninitializedAccountException":
1206
- case "com.amazonaws.mgn#UninitializedAccountException":
1207
- throw await de_UninitializedAccountExceptionRes(parsedOutput, context);
1208
- default:
1209
- const parsedBody = parsedOutput.body;
1210
- return throwDefaultError({
1211
- output,
1212
- parsedBody,
1213
- errorCode,
1214
- });
1215
- }
1216
- };
1217
1161
  export const de_AssociateApplicationsCommand = async (output, context) => {
1218
1162
  if (output.statusCode !== 200 && output.statusCode >= 300) {
1219
- return de_AssociateApplicationsCommandError(output, context);
1163
+ return de_CommandError(output, context);
1220
1164
  }
1221
1165
  const contents = map({
1222
1166
  $metadata: deserializeMetadata(output),
@@ -1224,37 +1168,9 @@ export const de_AssociateApplicationsCommand = async (output, context) => {
1224
1168
  await collectBody(output.body, context);
1225
1169
  return contents;
1226
1170
  };
1227
- const de_AssociateApplicationsCommandError = async (output, context) => {
1228
- const parsedOutput = {
1229
- ...output,
1230
- body: await parseErrorBody(output.body, context),
1231
- };
1232
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1233
- switch (errorCode) {
1234
- case "ConflictException":
1235
- case "com.amazonaws.mgn#ConflictException":
1236
- throw await de_ConflictExceptionRes(parsedOutput, context);
1237
- case "ResourceNotFoundException":
1238
- case "com.amazonaws.mgn#ResourceNotFoundException":
1239
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
1240
- case "ServiceQuotaExceededException":
1241
- case "com.amazonaws.mgn#ServiceQuotaExceededException":
1242
- throw await de_ServiceQuotaExceededExceptionRes(parsedOutput, context);
1243
- case "UninitializedAccountException":
1244
- case "com.amazonaws.mgn#UninitializedAccountException":
1245
- throw await de_UninitializedAccountExceptionRes(parsedOutput, context);
1246
- default:
1247
- const parsedBody = parsedOutput.body;
1248
- return throwDefaultError({
1249
- output,
1250
- parsedBody,
1251
- errorCode,
1252
- });
1253
- }
1254
- };
1255
1171
  export const de_AssociateSourceServersCommand = async (output, context) => {
1256
1172
  if (output.statusCode !== 200 && output.statusCode >= 300) {
1257
- return de_AssociateSourceServersCommandError(output, context);
1173
+ return de_CommandError(output, context);
1258
1174
  }
1259
1175
  const contents = map({
1260
1176
  $metadata: deserializeMetadata(output),
@@ -1262,37 +1178,9 @@ export const de_AssociateSourceServersCommand = async (output, context) => {
1262
1178
  await collectBody(output.body, context);
1263
1179
  return contents;
1264
1180
  };
1265
- const de_AssociateSourceServersCommandError = async (output, context) => {
1266
- const parsedOutput = {
1267
- ...output,
1268
- body: await parseErrorBody(output.body, context),
1269
- };
1270
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1271
- switch (errorCode) {
1272
- case "ConflictException":
1273
- case "com.amazonaws.mgn#ConflictException":
1274
- throw await de_ConflictExceptionRes(parsedOutput, context);
1275
- case "ResourceNotFoundException":
1276
- case "com.amazonaws.mgn#ResourceNotFoundException":
1277
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
1278
- case "ServiceQuotaExceededException":
1279
- case "com.amazonaws.mgn#ServiceQuotaExceededException":
1280
- throw await de_ServiceQuotaExceededExceptionRes(parsedOutput, context);
1281
- case "UninitializedAccountException":
1282
- case "com.amazonaws.mgn#UninitializedAccountException":
1283
- throw await de_UninitializedAccountExceptionRes(parsedOutput, context);
1284
- default:
1285
- const parsedBody = parsedOutput.body;
1286
- return throwDefaultError({
1287
- output,
1288
- parsedBody,
1289
- errorCode,
1290
- });
1291
- }
1292
- };
1293
1181
  export const de_ChangeServerLifeCycleStateCommand = async (output, context) => {
1294
1182
  if (output.statusCode !== 200 && output.statusCode >= 300) {
1295
- return de_ChangeServerLifeCycleStateCommandError(output, context);
1183
+ return de_CommandError(output, context);
1296
1184
  }
1297
1185
  const contents = map({
1298
1186
  $metadata: deserializeMetadata(output),
@@ -1317,37 +1205,9 @@ export const de_ChangeServerLifeCycleStateCommand = async (output, context) => {
1317
1205
  Object.assign(contents, doc);
1318
1206
  return contents;
1319
1207
  };
1320
- const de_ChangeServerLifeCycleStateCommandError = async (output, context) => {
1321
- const parsedOutput = {
1322
- ...output,
1323
- body: await parseErrorBody(output.body, context),
1324
- };
1325
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1326
- switch (errorCode) {
1327
- case "ConflictException":
1328
- case "com.amazonaws.mgn#ConflictException":
1329
- throw await de_ConflictExceptionRes(parsedOutput, context);
1330
- case "ResourceNotFoundException":
1331
- case "com.amazonaws.mgn#ResourceNotFoundException":
1332
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
1333
- case "UninitializedAccountException":
1334
- case "com.amazonaws.mgn#UninitializedAccountException":
1335
- throw await de_UninitializedAccountExceptionRes(parsedOutput, context);
1336
- case "ValidationException":
1337
- case "com.amazonaws.mgn#ValidationException":
1338
- throw await de_ValidationExceptionRes(parsedOutput, context);
1339
- default:
1340
- const parsedBody = parsedOutput.body;
1341
- return throwDefaultError({
1342
- output,
1343
- parsedBody,
1344
- errorCode,
1345
- });
1346
- }
1347
- };
1348
1208
  export const de_CreateApplicationCommand = async (output, context) => {
1349
1209
  if (output.statusCode !== 201 && output.statusCode >= 300) {
1350
- return de_CreateApplicationCommandError(output, context);
1210
+ return de_CommandError(output, context);
1351
1211
  }
1352
1212
  const contents = map({
1353
1213
  $metadata: deserializeMetadata(output),
@@ -1368,34 +1228,9 @@ export const de_CreateApplicationCommand = async (output, context) => {
1368
1228
  Object.assign(contents, doc);
1369
1229
  return contents;
1370
1230
  };
1371
- const de_CreateApplicationCommandError = async (output, context) => {
1372
- const parsedOutput = {
1373
- ...output,
1374
- body: await parseErrorBody(output.body, context),
1375
- };
1376
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1377
- switch (errorCode) {
1378
- case "ConflictException":
1379
- case "com.amazonaws.mgn#ConflictException":
1380
- throw await de_ConflictExceptionRes(parsedOutput, context);
1381
- case "ServiceQuotaExceededException":
1382
- case "com.amazonaws.mgn#ServiceQuotaExceededException":
1383
- throw await de_ServiceQuotaExceededExceptionRes(parsedOutput, context);
1384
- case "UninitializedAccountException":
1385
- case "com.amazonaws.mgn#UninitializedAccountException":
1386
- throw await de_UninitializedAccountExceptionRes(parsedOutput, context);
1387
- default:
1388
- const parsedBody = parsedOutput.body;
1389
- return throwDefaultError({
1390
- output,
1391
- parsedBody,
1392
- errorCode,
1393
- });
1394
- }
1395
- };
1396
1231
  export const de_CreateConnectorCommand = async (output, context) => {
1397
1232
  if (output.statusCode !== 201 && output.statusCode >= 300) {
1398
- return de_CreateConnectorCommandError(output, context);
1233
+ return de_CommandError(output, context);
1399
1234
  }
1400
1235
  const contents = map({
1401
1236
  $metadata: deserializeMetadata(output),
@@ -1412,31 +1247,9 @@ export const de_CreateConnectorCommand = async (output, context) => {
1412
1247
  Object.assign(contents, doc);
1413
1248
  return contents;
1414
1249
  };
1415
- const de_CreateConnectorCommandError = async (output, context) => {
1416
- const parsedOutput = {
1417
- ...output,
1418
- body: await parseErrorBody(output.body, context),
1419
- };
1420
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1421
- switch (errorCode) {
1422
- case "UninitializedAccountException":
1423
- case "com.amazonaws.mgn#UninitializedAccountException":
1424
- throw await de_UninitializedAccountExceptionRes(parsedOutput, context);
1425
- case "ValidationException":
1426
- case "com.amazonaws.mgn#ValidationException":
1427
- throw await de_ValidationExceptionRes(parsedOutput, context);
1428
- default:
1429
- const parsedBody = parsedOutput.body;
1430
- return throwDefaultError({
1431
- output,
1432
- parsedBody,
1433
- errorCode,
1434
- });
1435
- }
1436
- };
1437
1250
  export const de_CreateLaunchConfigurationTemplateCommand = async (output, context) => {
1438
1251
  if (output.statusCode !== 201 && output.statusCode >= 300) {
1439
- return de_CreateLaunchConfigurationTemplateCommandError(output, context);
1252
+ return de_CommandError(output, context);
1440
1253
  }
1441
1254
  const contents = map({
1442
1255
  $metadata: deserializeMetadata(output),
@@ -1464,34 +1277,9 @@ export const de_CreateLaunchConfigurationTemplateCommand = async (output, contex
1464
1277
  Object.assign(contents, doc);
1465
1278
  return contents;
1466
1279
  };
1467
- const de_CreateLaunchConfigurationTemplateCommandError = async (output, context) => {
1468
- const parsedOutput = {
1469
- ...output,
1470
- body: await parseErrorBody(output.body, context),
1471
- };
1472
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1473
- switch (errorCode) {
1474
- case "AccessDeniedException":
1475
- case "com.amazonaws.mgn#AccessDeniedException":
1476
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
1477
- case "UninitializedAccountException":
1478
- case "com.amazonaws.mgn#UninitializedAccountException":
1479
- throw await de_UninitializedAccountExceptionRes(parsedOutput, context);
1480
- case "ValidationException":
1481
- case "com.amazonaws.mgn#ValidationException":
1482
- throw await de_ValidationExceptionRes(parsedOutput, context);
1483
- default:
1484
- const parsedBody = parsedOutput.body;
1485
- return throwDefaultError({
1486
- output,
1487
- parsedBody,
1488
- errorCode,
1489
- });
1490
- }
1491
- };
1492
1280
  export const de_CreateReplicationConfigurationTemplateCommand = async (output, context) => {
1493
1281
  if (output.statusCode !== 201 && output.statusCode >= 300) {
1494
- return de_CreateReplicationConfigurationTemplateCommandError(output, context);
1282
+ return de_CommandError(output, context);
1495
1283
  }
1496
1284
  const contents = map({
1497
1285
  $metadata: deserializeMetadata(output),
@@ -1518,34 +1306,9 @@ export const de_CreateReplicationConfigurationTemplateCommand = async (output, c
1518
1306
  Object.assign(contents, doc);
1519
1307
  return contents;
1520
1308
  };
1521
- const de_CreateReplicationConfigurationTemplateCommandError = async (output, context) => {
1522
- const parsedOutput = {
1523
- ...output,
1524
- body: await parseErrorBody(output.body, context),
1525
- };
1526
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1527
- switch (errorCode) {
1528
- case "AccessDeniedException":
1529
- case "com.amazonaws.mgn#AccessDeniedException":
1530
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
1531
- case "UninitializedAccountException":
1532
- case "com.amazonaws.mgn#UninitializedAccountException":
1533
- throw await de_UninitializedAccountExceptionRes(parsedOutput, context);
1534
- case "ValidationException":
1535
- case "com.amazonaws.mgn#ValidationException":
1536
- throw await de_ValidationExceptionRes(parsedOutput, context);
1537
- default:
1538
- const parsedBody = parsedOutput.body;
1539
- return throwDefaultError({
1540
- output,
1541
- parsedBody,
1542
- errorCode,
1543
- });
1544
- }
1545
- };
1546
1309
  export const de_CreateWaveCommand = async (output, context) => {
1547
1310
  if (output.statusCode !== 201 && output.statusCode >= 300) {
1548
- return de_CreateWaveCommandError(output, context);
1311
+ return de_CommandError(output, context);
1549
1312
  }
1550
1313
  const contents = map({
1551
1314
  $metadata: deserializeMetadata(output),
@@ -1565,34 +1328,9 @@ export const de_CreateWaveCommand = async (output, context) => {
1565
1328
  Object.assign(contents, doc);
1566
1329
  return contents;
1567
1330
  };
1568
- const de_CreateWaveCommandError = async (output, context) => {
1569
- const parsedOutput = {
1570
- ...output,
1571
- body: await parseErrorBody(output.body, context),
1572
- };
1573
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1574
- switch (errorCode) {
1575
- case "ConflictException":
1576
- case "com.amazonaws.mgn#ConflictException":
1577
- throw await de_ConflictExceptionRes(parsedOutput, context);
1578
- case "ServiceQuotaExceededException":
1579
- case "com.amazonaws.mgn#ServiceQuotaExceededException":
1580
- throw await de_ServiceQuotaExceededExceptionRes(parsedOutput, context);
1581
- case "UninitializedAccountException":
1582
- case "com.amazonaws.mgn#UninitializedAccountException":
1583
- throw await de_UninitializedAccountExceptionRes(parsedOutput, context);
1584
- default:
1585
- const parsedBody = parsedOutput.body;
1586
- return throwDefaultError({
1587
- output,
1588
- parsedBody,
1589
- errorCode,
1590
- });
1591
- }
1592
- };
1593
1331
  export const de_DeleteApplicationCommand = async (output, context) => {
1594
1332
  if (output.statusCode !== 204 && output.statusCode >= 300) {
1595
- return de_DeleteApplicationCommandError(output, context);
1333
+ return de_CommandError(output, context);
1596
1334
  }
1597
1335
  const contents = map({
1598
1336
  $metadata: deserializeMetadata(output),
@@ -1600,34 +1338,9 @@ export const de_DeleteApplicationCommand = async (output, context) => {
1600
1338
  await collectBody(output.body, context);
1601
1339
  return contents;
1602
1340
  };
1603
- const de_DeleteApplicationCommandError = async (output, context) => {
1604
- const parsedOutput = {
1605
- ...output,
1606
- body: await parseErrorBody(output.body, context),
1607
- };
1608
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1609
- switch (errorCode) {
1610
- case "ConflictException":
1611
- case "com.amazonaws.mgn#ConflictException":
1612
- throw await de_ConflictExceptionRes(parsedOutput, context);
1613
- case "ResourceNotFoundException":
1614
- case "com.amazonaws.mgn#ResourceNotFoundException":
1615
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
1616
- case "UninitializedAccountException":
1617
- case "com.amazonaws.mgn#UninitializedAccountException":
1618
- throw await de_UninitializedAccountExceptionRes(parsedOutput, context);
1619
- default:
1620
- const parsedBody = parsedOutput.body;
1621
- return throwDefaultError({
1622
- output,
1623
- parsedBody,
1624
- errorCode,
1625
- });
1626
- }
1627
- };
1628
1341
  export const de_DeleteConnectorCommand = async (output, context) => {
1629
1342
  if (output.statusCode !== 204 && output.statusCode >= 300) {
1630
- return de_DeleteConnectorCommandError(output, context);
1343
+ return de_CommandError(output, context);
1631
1344
  }
1632
1345
  const contents = map({
1633
1346
  $metadata: deserializeMetadata(output),
@@ -1635,34 +1348,9 @@ export const de_DeleteConnectorCommand = async (output, context) => {
1635
1348
  await collectBody(output.body, context);
1636
1349
  return contents;
1637
1350
  };
1638
- const de_DeleteConnectorCommandError = async (output, context) => {
1639
- const parsedOutput = {
1640
- ...output,
1641
- body: await parseErrorBody(output.body, context),
1642
- };
1643
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1644
- switch (errorCode) {
1645
- case "ResourceNotFoundException":
1646
- case "com.amazonaws.mgn#ResourceNotFoundException":
1647
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
1648
- case "UninitializedAccountException":
1649
- case "com.amazonaws.mgn#UninitializedAccountException":
1650
- throw await de_UninitializedAccountExceptionRes(parsedOutput, context);
1651
- case "ValidationException":
1652
- case "com.amazonaws.mgn#ValidationException":
1653
- throw await de_ValidationExceptionRes(parsedOutput, context);
1654
- default:
1655
- const parsedBody = parsedOutput.body;
1656
- return throwDefaultError({
1657
- output,
1658
- parsedBody,
1659
- errorCode,
1660
- });
1661
- }
1662
- };
1663
1351
  export const de_DeleteJobCommand = async (output, context) => {
1664
1352
  if (output.statusCode !== 204 && output.statusCode >= 300) {
1665
- return de_DeleteJobCommandError(output, context);
1353
+ return de_CommandError(output, context);
1666
1354
  }
1667
1355
  const contents = map({
1668
1356
  $metadata: deserializeMetadata(output),
@@ -1670,34 +1358,9 @@ export const de_DeleteJobCommand = async (output, context) => {
1670
1358
  await collectBody(output.body, context);
1671
1359
  return contents;
1672
1360
  };
1673
- const de_DeleteJobCommandError = async (output, context) => {
1674
- const parsedOutput = {
1675
- ...output,
1676
- body: await parseErrorBody(output.body, context),
1677
- };
1678
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1679
- switch (errorCode) {
1680
- case "ConflictException":
1681
- case "com.amazonaws.mgn#ConflictException":
1682
- throw await de_ConflictExceptionRes(parsedOutput, context);
1683
- case "ResourceNotFoundException":
1684
- case "com.amazonaws.mgn#ResourceNotFoundException":
1685
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
1686
- case "UninitializedAccountException":
1687
- case "com.amazonaws.mgn#UninitializedAccountException":
1688
- throw await de_UninitializedAccountExceptionRes(parsedOutput, context);
1689
- default:
1690
- const parsedBody = parsedOutput.body;
1691
- return throwDefaultError({
1692
- output,
1693
- parsedBody,
1694
- errorCode,
1695
- });
1696
- }
1697
- };
1698
1361
  export const de_DeleteLaunchConfigurationTemplateCommand = async (output, context) => {
1699
1362
  if (output.statusCode !== 204 && output.statusCode >= 300) {
1700
- return de_DeleteLaunchConfigurationTemplateCommandError(output, context);
1363
+ return de_CommandError(output, context);
1701
1364
  }
1702
1365
  const contents = map({
1703
1366
  $metadata: deserializeMetadata(output),
@@ -1705,34 +1368,9 @@ export const de_DeleteLaunchConfigurationTemplateCommand = async (output, contex
1705
1368
  await collectBody(output.body, context);
1706
1369
  return contents;
1707
1370
  };
1708
- const de_DeleteLaunchConfigurationTemplateCommandError = async (output, context) => {
1709
- const parsedOutput = {
1710
- ...output,
1711
- body: await parseErrorBody(output.body, context),
1712
- };
1713
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1714
- switch (errorCode) {
1715
- case "ConflictException":
1716
- case "com.amazonaws.mgn#ConflictException":
1717
- throw await de_ConflictExceptionRes(parsedOutput, context);
1718
- case "ResourceNotFoundException":
1719
- case "com.amazonaws.mgn#ResourceNotFoundException":
1720
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
1721
- case "UninitializedAccountException":
1722
- case "com.amazonaws.mgn#UninitializedAccountException":
1723
- throw await de_UninitializedAccountExceptionRes(parsedOutput, context);
1724
- default:
1725
- const parsedBody = parsedOutput.body;
1726
- return throwDefaultError({
1727
- output,
1728
- parsedBody,
1729
- errorCode,
1730
- });
1731
- }
1732
- };
1733
1371
  export const de_DeleteReplicationConfigurationTemplateCommand = async (output, context) => {
1734
1372
  if (output.statusCode !== 204 && output.statusCode >= 300) {
1735
- return de_DeleteReplicationConfigurationTemplateCommandError(output, context);
1373
+ return de_CommandError(output, context);
1736
1374
  }
1737
1375
  const contents = map({
1738
1376
  $metadata: deserializeMetadata(output),
@@ -1740,34 +1378,9 @@ export const de_DeleteReplicationConfigurationTemplateCommand = async (output, c
1740
1378
  await collectBody(output.body, context);
1741
1379
  return contents;
1742
1380
  };
1743
- const de_DeleteReplicationConfigurationTemplateCommandError = async (output, context) => {
1744
- const parsedOutput = {
1745
- ...output,
1746
- body: await parseErrorBody(output.body, context),
1747
- };
1748
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1749
- switch (errorCode) {
1750
- case "ConflictException":
1751
- case "com.amazonaws.mgn#ConflictException":
1752
- throw await de_ConflictExceptionRes(parsedOutput, context);
1753
- case "ResourceNotFoundException":
1754
- case "com.amazonaws.mgn#ResourceNotFoundException":
1755
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
1756
- case "UninitializedAccountException":
1757
- case "com.amazonaws.mgn#UninitializedAccountException":
1758
- throw await de_UninitializedAccountExceptionRes(parsedOutput, context);
1759
- default:
1760
- const parsedBody = parsedOutput.body;
1761
- return throwDefaultError({
1762
- output,
1763
- parsedBody,
1764
- errorCode,
1765
- });
1766
- }
1767
- };
1768
1381
  export const de_DeleteSourceServerCommand = async (output, context) => {
1769
1382
  if (output.statusCode !== 204 && output.statusCode >= 300) {
1770
- return de_DeleteSourceServerCommandError(output, context);
1383
+ return de_CommandError(output, context);
1771
1384
  }
1772
1385
  const contents = map({
1773
1386
  $metadata: deserializeMetadata(output),
@@ -1775,34 +1388,9 @@ export const de_DeleteSourceServerCommand = async (output, context) => {
1775
1388
  await collectBody(output.body, context);
1776
1389
  return contents;
1777
1390
  };
1778
- const de_DeleteSourceServerCommandError = 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 "ConflictException":
1786
- case "com.amazonaws.mgn#ConflictException":
1787
- throw await de_ConflictExceptionRes(parsedOutput, context);
1788
- case "ResourceNotFoundException":
1789
- case "com.amazonaws.mgn#ResourceNotFoundException":
1790
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
1791
- case "UninitializedAccountException":
1792
- case "com.amazonaws.mgn#UninitializedAccountException":
1793
- throw await de_UninitializedAccountExceptionRes(parsedOutput, context);
1794
- default:
1795
- const parsedBody = parsedOutput.body;
1796
- return throwDefaultError({
1797
- output,
1798
- parsedBody,
1799
- errorCode,
1800
- });
1801
- }
1802
- };
1803
1391
  export const de_DeleteVcenterClientCommand = async (output, context) => {
1804
1392
  if (output.statusCode !== 204 && output.statusCode >= 300) {
1805
- return de_DeleteVcenterClientCommandError(output, context);
1393
+ return de_CommandError(output, context);
1806
1394
  }
1807
1395
  const contents = map({
1808
1396
  $metadata: deserializeMetadata(output),
@@ -1810,34 +1398,9 @@ export const de_DeleteVcenterClientCommand = async (output, context) => {
1810
1398
  await collectBody(output.body, context);
1811
1399
  return contents;
1812
1400
  };
1813
- const de_DeleteVcenterClientCommandError = async (output, context) => {
1814
- const parsedOutput = {
1815
- ...output,
1816
- body: await parseErrorBody(output.body, context),
1817
- };
1818
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1819
- switch (errorCode) {
1820
- case "ResourceNotFoundException":
1821
- case "com.amazonaws.mgn#ResourceNotFoundException":
1822
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
1823
- case "UninitializedAccountException":
1824
- case "com.amazonaws.mgn#UninitializedAccountException":
1825
- throw await de_UninitializedAccountExceptionRes(parsedOutput, context);
1826
- case "ValidationException":
1827
- case "com.amazonaws.mgn#ValidationException":
1828
- throw await de_ValidationExceptionRes(parsedOutput, context);
1829
- default:
1830
- const parsedBody = parsedOutput.body;
1831
- return throwDefaultError({
1832
- output,
1833
- parsedBody,
1834
- errorCode,
1835
- });
1836
- }
1837
- };
1838
1401
  export const de_DeleteWaveCommand = async (output, context) => {
1839
1402
  if (output.statusCode !== 204 && output.statusCode >= 300) {
1840
- return de_DeleteWaveCommandError(output, context);
1403
+ return de_CommandError(output, context);
1841
1404
  }
1842
1405
  const contents = map({
1843
1406
  $metadata: deserializeMetadata(output),
@@ -1845,34 +1408,9 @@ export const de_DeleteWaveCommand = async (output, context) => {
1845
1408
  await collectBody(output.body, context);
1846
1409
  return contents;
1847
1410
  };
1848
- const de_DeleteWaveCommandError = async (output, context) => {
1849
- const parsedOutput = {
1850
- ...output,
1851
- body: await parseErrorBody(output.body, context),
1852
- };
1853
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1854
- switch (errorCode) {
1855
- case "ConflictException":
1856
- case "com.amazonaws.mgn#ConflictException":
1857
- throw await de_ConflictExceptionRes(parsedOutput, context);
1858
- case "ResourceNotFoundException":
1859
- case "com.amazonaws.mgn#ResourceNotFoundException":
1860
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
1861
- case "UninitializedAccountException":
1862
- case "com.amazonaws.mgn#UninitializedAccountException":
1863
- throw await de_UninitializedAccountExceptionRes(parsedOutput, context);
1864
- default:
1865
- const parsedBody = parsedOutput.body;
1866
- return throwDefaultError({
1867
- output,
1868
- parsedBody,
1869
- errorCode,
1870
- });
1871
- }
1872
- };
1873
1411
  export const de_DescribeJobLogItemsCommand = async (output, context) => {
1874
1412
  if (output.statusCode !== 200 && output.statusCode >= 300) {
1875
- return de_DescribeJobLogItemsCommandError(output, context);
1413
+ return de_CommandError(output, context);
1876
1414
  }
1877
1415
  const contents = map({
1878
1416
  $metadata: deserializeMetadata(output),
@@ -1885,31 +1423,9 @@ export const de_DescribeJobLogItemsCommand = async (output, context) => {
1885
1423
  Object.assign(contents, doc);
1886
1424
  return contents;
1887
1425
  };
1888
- const de_DescribeJobLogItemsCommandError = async (output, context) => {
1889
- const parsedOutput = {
1890
- ...output,
1891
- body: await parseErrorBody(output.body, context),
1892
- };
1893
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1894
- switch (errorCode) {
1895
- case "UninitializedAccountException":
1896
- case "com.amazonaws.mgn#UninitializedAccountException":
1897
- throw await de_UninitializedAccountExceptionRes(parsedOutput, context);
1898
- case "ValidationException":
1899
- case "com.amazonaws.mgn#ValidationException":
1900
- throw await de_ValidationExceptionRes(parsedOutput, context);
1901
- default:
1902
- const parsedBody = parsedOutput.body;
1903
- return throwDefaultError({
1904
- output,
1905
- parsedBody,
1906
- errorCode,
1907
- });
1908
- }
1909
- };
1910
1426
  export const de_DescribeJobsCommand = async (output, context) => {
1911
1427
  if (output.statusCode !== 200 && output.statusCode >= 300) {
1912
- return de_DescribeJobsCommandError(output, context);
1428
+ return de_CommandError(output, context);
1913
1429
  }
1914
1430
  const contents = map({
1915
1431
  $metadata: deserializeMetadata(output),
@@ -1922,31 +1438,9 @@ export const de_DescribeJobsCommand = async (output, context) => {
1922
1438
  Object.assign(contents, doc);
1923
1439
  return contents;
1924
1440
  };
1925
- const de_DescribeJobsCommandError = 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 "UninitializedAccountException":
1933
- case "com.amazonaws.mgn#UninitializedAccountException":
1934
- throw await de_UninitializedAccountExceptionRes(parsedOutput, context);
1935
- case "ValidationException":
1936
- case "com.amazonaws.mgn#ValidationException":
1937
- throw await de_ValidationExceptionRes(parsedOutput, context);
1938
- default:
1939
- const parsedBody = parsedOutput.body;
1940
- return throwDefaultError({
1941
- output,
1942
- parsedBody,
1943
- errorCode,
1944
- });
1945
- }
1946
- };
1947
1441
  export const de_DescribeLaunchConfigurationTemplatesCommand = async (output, context) => {
1948
1442
  if (output.statusCode !== 200 && output.statusCode >= 300) {
1949
- return de_DescribeLaunchConfigurationTemplatesCommandError(output, context);
1443
+ return de_CommandError(output, context);
1950
1444
  }
1951
1445
  const contents = map({
1952
1446
  $metadata: deserializeMetadata(output),
@@ -1959,34 +1453,9 @@ export const de_DescribeLaunchConfigurationTemplatesCommand = async (output, con
1959
1453
  Object.assign(contents, doc);
1960
1454
  return contents;
1961
1455
  };
1962
- const de_DescribeLaunchConfigurationTemplatesCommandError = async (output, context) => {
1963
- const parsedOutput = {
1964
- ...output,
1965
- body: await parseErrorBody(output.body, context),
1966
- };
1967
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1968
- switch (errorCode) {
1969
- case "ResourceNotFoundException":
1970
- case "com.amazonaws.mgn#ResourceNotFoundException":
1971
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
1972
- case "UninitializedAccountException":
1973
- case "com.amazonaws.mgn#UninitializedAccountException":
1974
- throw await de_UninitializedAccountExceptionRes(parsedOutput, context);
1975
- case "ValidationException":
1976
- case "com.amazonaws.mgn#ValidationException":
1977
- throw await de_ValidationExceptionRes(parsedOutput, context);
1978
- default:
1979
- const parsedBody = parsedOutput.body;
1980
- return throwDefaultError({
1981
- output,
1982
- parsedBody,
1983
- errorCode,
1984
- });
1985
- }
1986
- };
1987
1456
  export const de_DescribeReplicationConfigurationTemplatesCommand = async (output, context) => {
1988
1457
  if (output.statusCode !== 200 && output.statusCode >= 300) {
1989
- return de_DescribeReplicationConfigurationTemplatesCommandError(output, context);
1458
+ return de_CommandError(output, context);
1990
1459
  }
1991
1460
  const contents = map({
1992
1461
  $metadata: deserializeMetadata(output),
@@ -1999,34 +1468,9 @@ export const de_DescribeReplicationConfigurationTemplatesCommand = async (output
1999
1468
  Object.assign(contents, doc);
2000
1469
  return contents;
2001
1470
  };
2002
- const de_DescribeReplicationConfigurationTemplatesCommandError = async (output, context) => {
2003
- const parsedOutput = {
2004
- ...output,
2005
- body: await parseErrorBody(output.body, context),
2006
- };
2007
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2008
- switch (errorCode) {
2009
- case "ResourceNotFoundException":
2010
- case "com.amazonaws.mgn#ResourceNotFoundException":
2011
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
2012
- case "UninitializedAccountException":
2013
- case "com.amazonaws.mgn#UninitializedAccountException":
2014
- throw await de_UninitializedAccountExceptionRes(parsedOutput, context);
2015
- case "ValidationException":
2016
- case "com.amazonaws.mgn#ValidationException":
2017
- throw await de_ValidationExceptionRes(parsedOutput, context);
2018
- default:
2019
- const parsedBody = parsedOutput.body;
2020
- return throwDefaultError({
2021
- output,
2022
- parsedBody,
2023
- errorCode,
2024
- });
2025
- }
2026
- };
2027
1471
  export const de_DescribeSourceServersCommand = async (output, context) => {
2028
1472
  if (output.statusCode !== 200 && output.statusCode >= 300) {
2029
- return de_DescribeSourceServersCommandError(output, context);
1473
+ return de_CommandError(output, context);
2030
1474
  }
2031
1475
  const contents = map({
2032
1476
  $metadata: deserializeMetadata(output),
@@ -2039,31 +1483,9 @@ export const de_DescribeSourceServersCommand = async (output, context) => {
2039
1483
  Object.assign(contents, doc);
2040
1484
  return contents;
2041
1485
  };
2042
- const de_DescribeSourceServersCommandError = async (output, context) => {
2043
- const parsedOutput = {
2044
- ...output,
2045
- body: await parseErrorBody(output.body, context),
2046
- };
2047
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2048
- switch (errorCode) {
2049
- case "UninitializedAccountException":
2050
- case "com.amazonaws.mgn#UninitializedAccountException":
2051
- throw await de_UninitializedAccountExceptionRes(parsedOutput, context);
2052
- case "ValidationException":
2053
- case "com.amazonaws.mgn#ValidationException":
2054
- throw await de_ValidationExceptionRes(parsedOutput, context);
2055
- default:
2056
- const parsedBody = parsedOutput.body;
2057
- return throwDefaultError({
2058
- output,
2059
- parsedBody,
2060
- errorCode,
2061
- });
2062
- }
2063
- };
2064
1486
  export const de_DescribeVcenterClientsCommand = async (output, context) => {
2065
1487
  if (output.statusCode !== 200 && output.statusCode >= 300) {
2066
- return de_DescribeVcenterClientsCommandError(output, context);
1488
+ return de_CommandError(output, context);
2067
1489
  }
2068
1490
  const contents = map({
2069
1491
  $metadata: deserializeMetadata(output),
@@ -2076,34 +1498,9 @@ export const de_DescribeVcenterClientsCommand = async (output, context) => {
2076
1498
  Object.assign(contents, doc);
2077
1499
  return contents;
2078
1500
  };
2079
- const de_DescribeVcenterClientsCommandError = async (output, context) => {
2080
- const parsedOutput = {
2081
- ...output,
2082
- body: await parseErrorBody(output.body, context),
2083
- };
2084
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2085
- switch (errorCode) {
2086
- case "ResourceNotFoundException":
2087
- case "com.amazonaws.mgn#ResourceNotFoundException":
2088
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
2089
- case "UninitializedAccountException":
2090
- case "com.amazonaws.mgn#UninitializedAccountException":
2091
- throw await de_UninitializedAccountExceptionRes(parsedOutput, context);
2092
- case "ValidationException":
2093
- case "com.amazonaws.mgn#ValidationException":
2094
- throw await de_ValidationExceptionRes(parsedOutput, context);
2095
- default:
2096
- const parsedBody = parsedOutput.body;
2097
- return throwDefaultError({
2098
- output,
2099
- parsedBody,
2100
- errorCode,
2101
- });
2102
- }
2103
- };
2104
1501
  export const de_DisassociateApplicationsCommand = async (output, context) => {
2105
1502
  if (output.statusCode !== 200 && output.statusCode >= 300) {
2106
- return de_DisassociateApplicationsCommandError(output, context);
1503
+ return de_CommandError(output, context);
2107
1504
  }
2108
1505
  const contents = map({
2109
1506
  $metadata: deserializeMetadata(output),
@@ -2111,34 +1508,9 @@ export const de_DisassociateApplicationsCommand = async (output, context) => {
2111
1508
  await collectBody(output.body, context);
2112
1509
  return contents;
2113
1510
  };
2114
- const de_DisassociateApplicationsCommandError = async (output, context) => {
2115
- const parsedOutput = {
2116
- ...output,
2117
- body: await parseErrorBody(output.body, context),
2118
- };
2119
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2120
- switch (errorCode) {
2121
- case "ConflictException":
2122
- case "com.amazonaws.mgn#ConflictException":
2123
- throw await de_ConflictExceptionRes(parsedOutput, context);
2124
- case "ResourceNotFoundException":
2125
- case "com.amazonaws.mgn#ResourceNotFoundException":
2126
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
2127
- case "UninitializedAccountException":
2128
- case "com.amazonaws.mgn#UninitializedAccountException":
2129
- throw await de_UninitializedAccountExceptionRes(parsedOutput, context);
2130
- default:
2131
- const parsedBody = parsedOutput.body;
2132
- return throwDefaultError({
2133
- output,
2134
- parsedBody,
2135
- errorCode,
2136
- });
2137
- }
2138
- };
2139
1511
  export const de_DisassociateSourceServersCommand = async (output, context) => {
2140
1512
  if (output.statusCode !== 200 && output.statusCode >= 300) {
2141
- return de_DisassociateSourceServersCommandError(output, context);
1513
+ return de_CommandError(output, context);
2142
1514
  }
2143
1515
  const contents = map({
2144
1516
  $metadata: deserializeMetadata(output),
@@ -2146,34 +1518,9 @@ export const de_DisassociateSourceServersCommand = async (output, context) => {
2146
1518
  await collectBody(output.body, context);
2147
1519
  return contents;
2148
1520
  };
2149
- const de_DisassociateSourceServersCommandError = async (output, context) => {
2150
- const parsedOutput = {
2151
- ...output,
2152
- body: await parseErrorBody(output.body, context),
2153
- };
2154
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2155
- switch (errorCode) {
2156
- case "ConflictException":
2157
- case "com.amazonaws.mgn#ConflictException":
2158
- throw await de_ConflictExceptionRes(parsedOutput, context);
2159
- case "ResourceNotFoundException":
2160
- case "com.amazonaws.mgn#ResourceNotFoundException":
2161
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
2162
- case "UninitializedAccountException":
2163
- case "com.amazonaws.mgn#UninitializedAccountException":
2164
- throw await de_UninitializedAccountExceptionRes(parsedOutput, context);
2165
- default:
2166
- const parsedBody = parsedOutput.body;
2167
- return throwDefaultError({
2168
- output,
2169
- parsedBody,
2170
- errorCode,
2171
- });
2172
- }
2173
- };
2174
1521
  export const de_DisconnectFromServiceCommand = async (output, context) => {
2175
1522
  if (output.statusCode !== 200 && output.statusCode >= 300) {
2176
- return de_DisconnectFromServiceCommandError(output, context);
1523
+ return de_CommandError(output, context);
2177
1524
  }
2178
1525
  const contents = map({
2179
1526
  $metadata: deserializeMetadata(output),
@@ -2198,34 +1545,9 @@ export const de_DisconnectFromServiceCommand = async (output, context) => {
2198
1545
  Object.assign(contents, doc);
2199
1546
  return contents;
2200
1547
  };
2201
- const de_DisconnectFromServiceCommandError = async (output, context) => {
2202
- const parsedOutput = {
2203
- ...output,
2204
- body: await parseErrorBody(output.body, context),
2205
- };
2206
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2207
- switch (errorCode) {
2208
- case "ConflictException":
2209
- case "com.amazonaws.mgn#ConflictException":
2210
- throw await de_ConflictExceptionRes(parsedOutput, context);
2211
- case "ResourceNotFoundException":
2212
- case "com.amazonaws.mgn#ResourceNotFoundException":
2213
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
2214
- case "UninitializedAccountException":
2215
- case "com.amazonaws.mgn#UninitializedAccountException":
2216
- throw await de_UninitializedAccountExceptionRes(parsedOutput, context);
2217
- default:
2218
- const parsedBody = parsedOutput.body;
2219
- return throwDefaultError({
2220
- output,
2221
- parsedBody,
2222
- errorCode,
2223
- });
2224
- }
2225
- };
2226
1548
  export const de_FinalizeCutoverCommand = async (output, context) => {
2227
1549
  if (output.statusCode !== 200 && output.statusCode >= 300) {
2228
- return de_FinalizeCutoverCommandError(output, context);
1550
+ return de_CommandError(output, context);
2229
1551
  }
2230
1552
  const contents = map({
2231
1553
  $metadata: deserializeMetadata(output),
@@ -2250,37 +1572,9 @@ export const de_FinalizeCutoverCommand = async (output, context) => {
2250
1572
  Object.assign(contents, doc);
2251
1573
  return contents;
2252
1574
  };
2253
- const de_FinalizeCutoverCommandError = async (output, context) => {
2254
- const parsedOutput = {
2255
- ...output,
2256
- body: await parseErrorBody(output.body, context),
2257
- };
2258
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2259
- switch (errorCode) {
2260
- case "ConflictException":
2261
- case "com.amazonaws.mgn#ConflictException":
2262
- throw await de_ConflictExceptionRes(parsedOutput, context);
2263
- case "ResourceNotFoundException":
2264
- case "com.amazonaws.mgn#ResourceNotFoundException":
2265
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
2266
- case "UninitializedAccountException":
2267
- case "com.amazonaws.mgn#UninitializedAccountException":
2268
- throw await de_UninitializedAccountExceptionRes(parsedOutput, context);
2269
- case "ValidationException":
2270
- case "com.amazonaws.mgn#ValidationException":
2271
- throw await de_ValidationExceptionRes(parsedOutput, context);
2272
- default:
2273
- const parsedBody = parsedOutput.body;
2274
- return throwDefaultError({
2275
- output,
2276
- parsedBody,
2277
- errorCode,
2278
- });
2279
- }
2280
- };
2281
1575
  export const de_GetLaunchConfigurationCommand = async (output, context) => {
2282
1576
  if (output.statusCode !== 200 && output.statusCode >= 300) {
2283
- return de_GetLaunchConfigurationCommandError(output, context);
1577
+ return de_CommandError(output, context);
2284
1578
  }
2285
1579
  const contents = map({
2286
1580
  $metadata: deserializeMetadata(output),
@@ -2303,31 +1597,9 @@ export const de_GetLaunchConfigurationCommand = async (output, context) => {
2303
1597
  Object.assign(contents, doc);
2304
1598
  return contents;
2305
1599
  };
2306
- const de_GetLaunchConfigurationCommandError = async (output, context) => {
2307
- const parsedOutput = {
2308
- ...output,
2309
- body: await parseErrorBody(output.body, context),
2310
- };
2311
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2312
- switch (errorCode) {
2313
- case "ResourceNotFoundException":
2314
- case "com.amazonaws.mgn#ResourceNotFoundException":
2315
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
2316
- case "UninitializedAccountException":
2317
- case "com.amazonaws.mgn#UninitializedAccountException":
2318
- throw await de_UninitializedAccountExceptionRes(parsedOutput, context);
2319
- default:
2320
- const parsedBody = parsedOutput.body;
2321
- return throwDefaultError({
2322
- output,
2323
- parsedBody,
2324
- errorCode,
2325
- });
2326
- }
2327
- };
2328
1600
  export const de_GetReplicationConfigurationCommand = async (output, context) => {
2329
1601
  if (output.statusCode !== 200 && output.statusCode >= 300) {
2330
- return de_GetReplicationConfigurationCommandError(output, context);
1602
+ return de_CommandError(output, context);
2331
1603
  }
2332
1604
  const contents = map({
2333
1605
  $metadata: deserializeMetadata(output),
@@ -2343,74 +1615,30 @@ export const de_GetReplicationConfigurationCommand = async (output, context) =>
2343
1615
  ebsEncryptionKeyArn: __expectString,
2344
1616
  name: __expectString,
2345
1617
  replicatedDisks: _json,
2346
- replicationServerInstanceType: __expectString,
2347
- replicationServersSecurityGroupsIDs: _json,
2348
- sourceServerID: __expectString,
2349
- stagingAreaSubnetId: __expectString,
2350
- stagingAreaTags: _json,
2351
- useDedicatedReplicationServer: __expectBoolean,
2352
- useFipsEndpoint: __expectBoolean,
2353
- });
2354
- Object.assign(contents, doc);
2355
- return contents;
2356
- };
2357
- const de_GetReplicationConfigurationCommandError = 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 "ResourceNotFoundException":
2365
- case "com.amazonaws.mgn#ResourceNotFoundException":
2366
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
2367
- case "UninitializedAccountException":
2368
- case "com.amazonaws.mgn#UninitializedAccountException":
2369
- throw await de_UninitializedAccountExceptionRes(parsedOutput, context);
2370
- default:
2371
- const parsedBody = parsedOutput.body;
2372
- return throwDefaultError({
2373
- output,
2374
- parsedBody,
2375
- errorCode,
2376
- });
2377
- }
2378
- };
2379
- export const de_InitializeServiceCommand = async (output, context) => {
2380
- if (output.statusCode !== 204 && output.statusCode >= 300) {
2381
- return de_InitializeServiceCommandError(output, context);
2382
- }
2383
- const contents = map({
2384
- $metadata: deserializeMetadata(output),
2385
- });
2386
- await collectBody(output.body, context);
2387
- return contents;
2388
- };
2389
- const de_InitializeServiceCommandError = async (output, context) => {
2390
- const parsedOutput = {
2391
- ...output,
2392
- body: await parseErrorBody(output.body, context),
2393
- };
2394
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2395
- switch (errorCode) {
2396
- case "AccessDeniedException":
2397
- case "com.amazonaws.mgn#AccessDeniedException":
2398
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
2399
- case "ValidationException":
2400
- case "com.amazonaws.mgn#ValidationException":
2401
- throw await de_ValidationExceptionRes(parsedOutput, context);
2402
- default:
2403
- const parsedBody = parsedOutput.body;
2404
- return throwDefaultError({
2405
- output,
2406
- parsedBody,
2407
- errorCode,
2408
- });
1618
+ replicationServerInstanceType: __expectString,
1619
+ replicationServersSecurityGroupsIDs: _json,
1620
+ sourceServerID: __expectString,
1621
+ stagingAreaSubnetId: __expectString,
1622
+ stagingAreaTags: _json,
1623
+ useDedicatedReplicationServer: __expectBoolean,
1624
+ useFipsEndpoint: __expectBoolean,
1625
+ });
1626
+ Object.assign(contents, doc);
1627
+ return contents;
1628
+ };
1629
+ export const de_InitializeServiceCommand = async (output, context) => {
1630
+ if (output.statusCode !== 204 && output.statusCode >= 300) {
1631
+ return de_CommandError(output, context);
2409
1632
  }
1633
+ const contents = map({
1634
+ $metadata: deserializeMetadata(output),
1635
+ });
1636
+ await collectBody(output.body, context);
1637
+ return contents;
2410
1638
  };
2411
1639
  export const de_ListApplicationsCommand = async (output, context) => {
2412
1640
  if (output.statusCode !== 200 && output.statusCode >= 300) {
2413
- return de_ListApplicationsCommandError(output, context);
1641
+ return de_CommandError(output, context);
2414
1642
  }
2415
1643
  const contents = map({
2416
1644
  $metadata: deserializeMetadata(output),
@@ -2423,28 +1651,9 @@ export const de_ListApplicationsCommand = async (output, context) => {
2423
1651
  Object.assign(contents, doc);
2424
1652
  return contents;
2425
1653
  };
2426
- const de_ListApplicationsCommandError = async (output, context) => {
2427
- const parsedOutput = {
2428
- ...output,
2429
- body: await parseErrorBody(output.body, context),
2430
- };
2431
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2432
- switch (errorCode) {
2433
- case "UninitializedAccountException":
2434
- case "com.amazonaws.mgn#UninitializedAccountException":
2435
- throw await de_UninitializedAccountExceptionRes(parsedOutput, context);
2436
- default:
2437
- const parsedBody = parsedOutput.body;
2438
- return throwDefaultError({
2439
- output,
2440
- parsedBody,
2441
- errorCode,
2442
- });
2443
- }
2444
- };
2445
1654
  export const de_ListConnectorsCommand = async (output, context) => {
2446
1655
  if (output.statusCode !== 200 && output.statusCode >= 300) {
2447
- return de_ListConnectorsCommandError(output, context);
1656
+ return de_CommandError(output, context);
2448
1657
  }
2449
1658
  const contents = map({
2450
1659
  $metadata: deserializeMetadata(output),
@@ -2457,31 +1666,9 @@ export const de_ListConnectorsCommand = async (output, context) => {
2457
1666
  Object.assign(contents, doc);
2458
1667
  return contents;
2459
1668
  };
2460
- const de_ListConnectorsCommandError = async (output, context) => {
2461
- const parsedOutput = {
2462
- ...output,
2463
- body: await parseErrorBody(output.body, context),
2464
- };
2465
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2466
- switch (errorCode) {
2467
- case "UninitializedAccountException":
2468
- case "com.amazonaws.mgn#UninitializedAccountException":
2469
- throw await de_UninitializedAccountExceptionRes(parsedOutput, context);
2470
- case "ValidationException":
2471
- case "com.amazonaws.mgn#ValidationException":
2472
- throw await de_ValidationExceptionRes(parsedOutput, context);
2473
- default:
2474
- const parsedBody = parsedOutput.body;
2475
- return throwDefaultError({
2476
- output,
2477
- parsedBody,
2478
- errorCode,
2479
- });
2480
- }
2481
- };
2482
1669
  export const de_ListExportErrorsCommand = async (output, context) => {
2483
1670
  if (output.statusCode !== 200 && output.statusCode >= 300) {
2484
- return de_ListExportErrorsCommandError(output, context);
1671
+ return de_CommandError(output, context);
2485
1672
  }
2486
1673
  const contents = map({
2487
1674
  $metadata: deserializeMetadata(output),
@@ -2494,31 +1681,9 @@ export const de_ListExportErrorsCommand = async (output, context) => {
2494
1681
  Object.assign(contents, doc);
2495
1682
  return contents;
2496
1683
  };
2497
- const de_ListExportErrorsCommandError = async (output, context) => {
2498
- const parsedOutput = {
2499
- ...output,
2500
- body: await parseErrorBody(output.body, context),
2501
- };
2502
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2503
- switch (errorCode) {
2504
- case "UninitializedAccountException":
2505
- case "com.amazonaws.mgn#UninitializedAccountException":
2506
- throw await de_UninitializedAccountExceptionRes(parsedOutput, context);
2507
- case "ValidationException":
2508
- case "com.amazonaws.mgn#ValidationException":
2509
- throw await de_ValidationExceptionRes(parsedOutput, context);
2510
- default:
2511
- const parsedBody = parsedOutput.body;
2512
- return throwDefaultError({
2513
- output,
2514
- parsedBody,
2515
- errorCode,
2516
- });
2517
- }
2518
- };
2519
1684
  export const de_ListExportsCommand = async (output, context) => {
2520
1685
  if (output.statusCode !== 200 && output.statusCode >= 300) {
2521
- return de_ListExportsCommandError(output, context);
1686
+ return de_CommandError(output, context);
2522
1687
  }
2523
1688
  const contents = map({
2524
1689
  $metadata: deserializeMetadata(output),
@@ -2531,28 +1696,9 @@ export const de_ListExportsCommand = async (output, context) => {
2531
1696
  Object.assign(contents, doc);
2532
1697
  return contents;
2533
1698
  };
2534
- const de_ListExportsCommandError = async (output, context) => {
2535
- const parsedOutput = {
2536
- ...output,
2537
- body: await parseErrorBody(output.body, context),
2538
- };
2539
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2540
- switch (errorCode) {
2541
- case "UninitializedAccountException":
2542
- case "com.amazonaws.mgn#UninitializedAccountException":
2543
- throw await de_UninitializedAccountExceptionRes(parsedOutput, context);
2544
- default:
2545
- const parsedBody = parsedOutput.body;
2546
- return throwDefaultError({
2547
- output,
2548
- parsedBody,
2549
- errorCode,
2550
- });
2551
- }
2552
- };
2553
1699
  export const de_ListImportErrorsCommand = async (output, context) => {
2554
1700
  if (output.statusCode !== 200 && output.statusCode >= 300) {
2555
- return de_ListImportErrorsCommandError(output, context);
1701
+ return de_CommandError(output, context);
2556
1702
  }
2557
1703
  const contents = map({
2558
1704
  $metadata: deserializeMetadata(output),
@@ -2565,31 +1711,9 @@ export const de_ListImportErrorsCommand = async (output, context) => {
2565
1711
  Object.assign(contents, doc);
2566
1712
  return contents;
2567
1713
  };
2568
- const de_ListImportErrorsCommandError = async (output, context) => {
2569
- const parsedOutput = {
2570
- ...output,
2571
- body: await parseErrorBody(output.body, context),
2572
- };
2573
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2574
- switch (errorCode) {
2575
- case "UninitializedAccountException":
2576
- case "com.amazonaws.mgn#UninitializedAccountException":
2577
- throw await de_UninitializedAccountExceptionRes(parsedOutput, context);
2578
- case "ValidationException":
2579
- case "com.amazonaws.mgn#ValidationException":
2580
- throw await de_ValidationExceptionRes(parsedOutput, context);
2581
- default:
2582
- const parsedBody = parsedOutput.body;
2583
- return throwDefaultError({
2584
- output,
2585
- parsedBody,
2586
- errorCode,
2587
- });
2588
- }
2589
- };
2590
1714
  export const de_ListImportsCommand = async (output, context) => {
2591
1715
  if (output.statusCode !== 200 && output.statusCode >= 300) {
2592
- return de_ListImportsCommandError(output, context);
1716
+ return de_CommandError(output, context);
2593
1717
  }
2594
1718
  const contents = map({
2595
1719
  $metadata: deserializeMetadata(output),
@@ -2602,31 +1726,9 @@ export const de_ListImportsCommand = async (output, context) => {
2602
1726
  Object.assign(contents, doc);
2603
1727
  return contents;
2604
1728
  };
2605
- const de_ListImportsCommandError = async (output, context) => {
2606
- const parsedOutput = {
2607
- ...output,
2608
- body: await parseErrorBody(output.body, context),
2609
- };
2610
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2611
- switch (errorCode) {
2612
- case "UninitializedAccountException":
2613
- case "com.amazonaws.mgn#UninitializedAccountException":
2614
- throw await de_UninitializedAccountExceptionRes(parsedOutput, context);
2615
- case "ValidationException":
2616
- case "com.amazonaws.mgn#ValidationException":
2617
- throw await de_ValidationExceptionRes(parsedOutput, context);
2618
- default:
2619
- const parsedBody = parsedOutput.body;
2620
- return throwDefaultError({
2621
- output,
2622
- parsedBody,
2623
- errorCode,
2624
- });
2625
- }
2626
- };
2627
1729
  export const de_ListManagedAccountsCommand = async (output, context) => {
2628
1730
  if (output.statusCode !== 200 && output.statusCode >= 300) {
2629
- return de_ListManagedAccountsCommandError(output, context);
1731
+ return de_CommandError(output, context);
2630
1732
  }
2631
1733
  const contents = map({
2632
1734
  $metadata: deserializeMetadata(output),
@@ -2639,31 +1741,9 @@ export const de_ListManagedAccountsCommand = async (output, context) => {
2639
1741
  Object.assign(contents, doc);
2640
1742
  return contents;
2641
1743
  };
2642
- const de_ListManagedAccountsCommandError = async (output, context) => {
2643
- const parsedOutput = {
2644
- ...output,
2645
- body: await parseErrorBody(output.body, context),
2646
- };
2647
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2648
- switch (errorCode) {
2649
- case "UninitializedAccountException":
2650
- case "com.amazonaws.mgn#UninitializedAccountException":
2651
- throw await de_UninitializedAccountExceptionRes(parsedOutput, context);
2652
- case "ValidationException":
2653
- case "com.amazonaws.mgn#ValidationException":
2654
- throw await de_ValidationExceptionRes(parsedOutput, context);
2655
- default:
2656
- const parsedBody = parsedOutput.body;
2657
- return throwDefaultError({
2658
- output,
2659
- parsedBody,
2660
- errorCode,
2661
- });
2662
- }
2663
- };
2664
1744
  export const de_ListSourceServerActionsCommand = async (output, context) => {
2665
1745
  if (output.statusCode !== 200 && output.statusCode >= 300) {
2666
- return de_ListSourceServerActionsCommandError(output, context);
1746
+ return de_CommandError(output, context);
2667
1747
  }
2668
1748
  const contents = map({
2669
1749
  $metadata: deserializeMetadata(output),
@@ -2676,31 +1756,9 @@ export const de_ListSourceServerActionsCommand = async (output, context) => {
2676
1756
  Object.assign(contents, doc);
2677
1757
  return contents;
2678
1758
  };
2679
- const de_ListSourceServerActionsCommandError = async (output, context) => {
2680
- const parsedOutput = {
2681
- ...output,
2682
- body: await parseErrorBody(output.body, context),
2683
- };
2684
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2685
- switch (errorCode) {
2686
- case "ResourceNotFoundException":
2687
- case "com.amazonaws.mgn#ResourceNotFoundException":
2688
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
2689
- case "UninitializedAccountException":
2690
- case "com.amazonaws.mgn#UninitializedAccountException":
2691
- throw await de_UninitializedAccountExceptionRes(parsedOutput, context);
2692
- default:
2693
- const parsedBody = parsedOutput.body;
2694
- return throwDefaultError({
2695
- output,
2696
- parsedBody,
2697
- errorCode,
2698
- });
2699
- }
2700
- };
2701
1759
  export const de_ListTagsForResourceCommand = async (output, context) => {
2702
1760
  if (output.statusCode !== 200 && output.statusCode >= 300) {
2703
- return de_ListTagsForResourceCommandError(output, context);
1761
+ return de_CommandError(output, context);
2704
1762
  }
2705
1763
  const contents = map({
2706
1764
  $metadata: deserializeMetadata(output),
@@ -2712,40 +1770,9 @@ export const de_ListTagsForResourceCommand = async (output, context) => {
2712
1770
  Object.assign(contents, doc);
2713
1771
  return contents;
2714
1772
  };
2715
- const de_ListTagsForResourceCommandError = async (output, context) => {
2716
- const parsedOutput = {
2717
- ...output,
2718
- body: await parseErrorBody(output.body, context),
2719
- };
2720
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2721
- switch (errorCode) {
2722
- case "AccessDeniedException":
2723
- case "com.amazonaws.mgn#AccessDeniedException":
2724
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
2725
- case "InternalServerException":
2726
- case "com.amazonaws.mgn#InternalServerException":
2727
- throw await de_InternalServerExceptionRes(parsedOutput, context);
2728
- case "ResourceNotFoundException":
2729
- case "com.amazonaws.mgn#ResourceNotFoundException":
2730
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
2731
- case "ThrottlingException":
2732
- case "com.amazonaws.mgn#ThrottlingException":
2733
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
2734
- case "ValidationException":
2735
- case "com.amazonaws.mgn#ValidationException":
2736
- throw await de_ValidationExceptionRes(parsedOutput, context);
2737
- default:
2738
- const parsedBody = parsedOutput.body;
2739
- return throwDefaultError({
2740
- output,
2741
- parsedBody,
2742
- errorCode,
2743
- });
2744
- }
2745
- };
2746
1773
  export const de_ListTemplateActionsCommand = async (output, context) => {
2747
1774
  if (output.statusCode !== 200 && output.statusCode >= 300) {
2748
- return de_ListTemplateActionsCommandError(output, context);
1775
+ return de_CommandError(output, context);
2749
1776
  }
2750
1777
  const contents = map({
2751
1778
  $metadata: deserializeMetadata(output),
@@ -2758,65 +1785,24 @@ export const de_ListTemplateActionsCommand = async (output, context) => {
2758
1785
  Object.assign(contents, doc);
2759
1786
  return contents;
2760
1787
  };
2761
- const de_ListTemplateActionsCommandError = async (output, context) => {
2762
- const parsedOutput = {
2763
- ...output,
2764
- body: await parseErrorBody(output.body, context),
2765
- };
2766
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2767
- switch (errorCode) {
2768
- case "ResourceNotFoundException":
2769
- case "com.amazonaws.mgn#ResourceNotFoundException":
2770
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
2771
- case "UninitializedAccountException":
2772
- case "com.amazonaws.mgn#UninitializedAccountException":
2773
- throw await de_UninitializedAccountExceptionRes(parsedOutput, context);
2774
- default:
2775
- const parsedBody = parsedOutput.body;
2776
- return throwDefaultError({
2777
- output,
2778
- parsedBody,
2779
- errorCode,
2780
- });
2781
- }
2782
- };
2783
1788
  export const de_ListWavesCommand = async (output, context) => {
2784
1789
  if (output.statusCode !== 200 && output.statusCode >= 300) {
2785
- return de_ListWavesCommandError(output, context);
1790
+ return de_CommandError(output, context);
2786
1791
  }
2787
1792
  const contents = map({
2788
1793
  $metadata: deserializeMetadata(output),
2789
1794
  });
2790
- const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
2791
- const doc = take(data, {
2792
- items: _json,
2793
- nextToken: __expectString,
2794
- });
2795
- Object.assign(contents, doc);
2796
- return contents;
2797
- };
2798
- const de_ListWavesCommandError = async (output, context) => {
2799
- const parsedOutput = {
2800
- ...output,
2801
- body: await parseErrorBody(output.body, context),
2802
- };
2803
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2804
- switch (errorCode) {
2805
- case "UninitializedAccountException":
2806
- case "com.amazonaws.mgn#UninitializedAccountException":
2807
- throw await de_UninitializedAccountExceptionRes(parsedOutput, context);
2808
- default:
2809
- const parsedBody = parsedOutput.body;
2810
- return throwDefaultError({
2811
- output,
2812
- parsedBody,
2813
- errorCode,
2814
- });
2815
- }
1795
+ const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
1796
+ const doc = take(data, {
1797
+ items: _json,
1798
+ nextToken: __expectString,
1799
+ });
1800
+ Object.assign(contents, doc);
1801
+ return contents;
2816
1802
  };
2817
1803
  export const de_MarkAsArchivedCommand = async (output, context) => {
2818
1804
  if (output.statusCode !== 200 && output.statusCode >= 300) {
2819
- return de_MarkAsArchivedCommandError(output, context);
1805
+ return de_CommandError(output, context);
2820
1806
  }
2821
1807
  const contents = map({
2822
1808
  $metadata: deserializeMetadata(output),
@@ -2841,34 +1827,9 @@ export const de_MarkAsArchivedCommand = async (output, context) => {
2841
1827
  Object.assign(contents, doc);
2842
1828
  return contents;
2843
1829
  };
2844
- const de_MarkAsArchivedCommandError = async (output, context) => {
2845
- const parsedOutput = {
2846
- ...output,
2847
- body: await parseErrorBody(output.body, context),
2848
- };
2849
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2850
- switch (errorCode) {
2851
- case "ConflictException":
2852
- case "com.amazonaws.mgn#ConflictException":
2853
- throw await de_ConflictExceptionRes(parsedOutput, context);
2854
- case "ResourceNotFoundException":
2855
- case "com.amazonaws.mgn#ResourceNotFoundException":
2856
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
2857
- case "UninitializedAccountException":
2858
- case "com.amazonaws.mgn#UninitializedAccountException":
2859
- throw await de_UninitializedAccountExceptionRes(parsedOutput, context);
2860
- default:
2861
- const parsedBody = parsedOutput.body;
2862
- return throwDefaultError({
2863
- output,
2864
- parsedBody,
2865
- errorCode,
2866
- });
2867
- }
2868
- };
2869
1830
  export const de_PauseReplicationCommand = async (output, context) => {
2870
1831
  if (output.statusCode !== 200 && output.statusCode >= 300) {
2871
- return de_PauseReplicationCommandError(output, context);
1832
+ return de_CommandError(output, context);
2872
1833
  }
2873
1834
  const contents = map({
2874
1835
  $metadata: deserializeMetadata(output),
@@ -2893,40 +1854,9 @@ export const de_PauseReplicationCommand = async (output, context) => {
2893
1854
  Object.assign(contents, doc);
2894
1855
  return contents;
2895
1856
  };
2896
- const de_PauseReplicationCommandError = async (output, context) => {
2897
- const parsedOutput = {
2898
- ...output,
2899
- body: await parseErrorBody(output.body, context),
2900
- };
2901
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2902
- switch (errorCode) {
2903
- case "ConflictException":
2904
- case "com.amazonaws.mgn#ConflictException":
2905
- throw await de_ConflictExceptionRes(parsedOutput, context);
2906
- case "ResourceNotFoundException":
2907
- case "com.amazonaws.mgn#ResourceNotFoundException":
2908
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
2909
- case "ServiceQuotaExceededException":
2910
- case "com.amazonaws.mgn#ServiceQuotaExceededException":
2911
- throw await de_ServiceQuotaExceededExceptionRes(parsedOutput, context);
2912
- case "UninitializedAccountException":
2913
- case "com.amazonaws.mgn#UninitializedAccountException":
2914
- throw await de_UninitializedAccountExceptionRes(parsedOutput, context);
2915
- case "ValidationException":
2916
- case "com.amazonaws.mgn#ValidationException":
2917
- throw await de_ValidationExceptionRes(parsedOutput, context);
2918
- default:
2919
- const parsedBody = parsedOutput.body;
2920
- return throwDefaultError({
2921
- output,
2922
- parsedBody,
2923
- errorCode,
2924
- });
2925
- }
2926
- };
2927
1857
  export const de_PutSourceServerActionCommand = async (output, context) => {
2928
1858
  if (output.statusCode !== 200 && output.statusCode >= 300) {
2929
- return de_PutSourceServerActionCommandError(output, context);
1859
+ return de_CommandError(output, context);
2930
1860
  }
2931
1861
  const contents = map({
2932
1862
  $metadata: deserializeMetadata(output),
@@ -2949,37 +1879,9 @@ export const de_PutSourceServerActionCommand = async (output, context) => {
2949
1879
  Object.assign(contents, doc);
2950
1880
  return contents;
2951
1881
  };
2952
- const de_PutSourceServerActionCommandError = async (output, context) => {
2953
- const parsedOutput = {
2954
- ...output,
2955
- body: await parseErrorBody(output.body, context),
2956
- };
2957
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2958
- switch (errorCode) {
2959
- case "ConflictException":
2960
- case "com.amazonaws.mgn#ConflictException":
2961
- throw await de_ConflictExceptionRes(parsedOutput, context);
2962
- case "ResourceNotFoundException":
2963
- case "com.amazonaws.mgn#ResourceNotFoundException":
2964
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
2965
- case "UninitializedAccountException":
2966
- case "com.amazonaws.mgn#UninitializedAccountException":
2967
- throw await de_UninitializedAccountExceptionRes(parsedOutput, context);
2968
- case "ValidationException":
2969
- case "com.amazonaws.mgn#ValidationException":
2970
- throw await de_ValidationExceptionRes(parsedOutput, context);
2971
- default:
2972
- const parsedBody = parsedOutput.body;
2973
- return throwDefaultError({
2974
- output,
2975
- parsedBody,
2976
- errorCode,
2977
- });
2978
- }
2979
- };
2980
1882
  export const de_PutTemplateActionCommand = async (output, context) => {
2981
1883
  if (output.statusCode !== 200 && output.statusCode >= 300) {
2982
- return de_PutTemplateActionCommandError(output, context);
1884
+ return de_CommandError(output, context);
2983
1885
  }
2984
1886
  const contents = map({
2985
1887
  $metadata: deserializeMetadata(output),
@@ -3003,37 +1905,9 @@ export const de_PutTemplateActionCommand = async (output, context) => {
3003
1905
  Object.assign(contents, doc);
3004
1906
  return contents;
3005
1907
  };
3006
- const de_PutTemplateActionCommandError = async (output, context) => {
3007
- const parsedOutput = {
3008
- ...output,
3009
- body: await parseErrorBody(output.body, context),
3010
- };
3011
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
3012
- switch (errorCode) {
3013
- case "ConflictException":
3014
- case "com.amazonaws.mgn#ConflictException":
3015
- throw await de_ConflictExceptionRes(parsedOutput, context);
3016
- case "ResourceNotFoundException":
3017
- case "com.amazonaws.mgn#ResourceNotFoundException":
3018
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
3019
- case "UninitializedAccountException":
3020
- case "com.amazonaws.mgn#UninitializedAccountException":
3021
- throw await de_UninitializedAccountExceptionRes(parsedOutput, context);
3022
- case "ValidationException":
3023
- case "com.amazonaws.mgn#ValidationException":
3024
- throw await de_ValidationExceptionRes(parsedOutput, context);
3025
- default:
3026
- const parsedBody = parsedOutput.body;
3027
- return throwDefaultError({
3028
- output,
3029
- parsedBody,
3030
- errorCode,
3031
- });
3032
- }
3033
- };
3034
1908
  export const de_RemoveSourceServerActionCommand = async (output, context) => {
3035
1909
  if (output.statusCode !== 204 && output.statusCode >= 300) {
3036
- return de_RemoveSourceServerActionCommandError(output, context);
1910
+ return de_CommandError(output, context);
3037
1911
  }
3038
1912
  const contents = map({
3039
1913
  $metadata: deserializeMetadata(output),
@@ -3041,34 +1915,9 @@ export const de_RemoveSourceServerActionCommand = async (output, context) => {
3041
1915
  await collectBody(output.body, context);
3042
1916
  return contents;
3043
1917
  };
3044
- const de_RemoveSourceServerActionCommandError = async (output, context) => {
3045
- const parsedOutput = {
3046
- ...output,
3047
- body: await parseErrorBody(output.body, context),
3048
- };
3049
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
3050
- switch (errorCode) {
3051
- case "ResourceNotFoundException":
3052
- case "com.amazonaws.mgn#ResourceNotFoundException":
3053
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
3054
- case "UninitializedAccountException":
3055
- case "com.amazonaws.mgn#UninitializedAccountException":
3056
- throw await de_UninitializedAccountExceptionRes(parsedOutput, context);
3057
- case "ValidationException":
3058
- case "com.amazonaws.mgn#ValidationException":
3059
- throw await de_ValidationExceptionRes(parsedOutput, context);
3060
- default:
3061
- const parsedBody = parsedOutput.body;
3062
- return throwDefaultError({
3063
- output,
3064
- parsedBody,
3065
- errorCode,
3066
- });
3067
- }
3068
- };
3069
1918
  export const de_RemoveTemplateActionCommand = async (output, context) => {
3070
1919
  if (output.statusCode !== 204 && output.statusCode >= 300) {
3071
- return de_RemoveTemplateActionCommandError(output, context);
1920
+ return de_CommandError(output, context);
3072
1921
  }
3073
1922
  const contents = map({
3074
1923
  $metadata: deserializeMetadata(output),
@@ -3076,34 +1925,9 @@ export const de_RemoveTemplateActionCommand = async (output, context) => {
3076
1925
  await collectBody(output.body, context);
3077
1926
  return contents;
3078
1927
  };
3079
- const de_RemoveTemplateActionCommandError = async (output, context) => {
3080
- const parsedOutput = {
3081
- ...output,
3082
- body: await parseErrorBody(output.body, context),
3083
- };
3084
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
3085
- switch (errorCode) {
3086
- case "ResourceNotFoundException":
3087
- case "com.amazonaws.mgn#ResourceNotFoundException":
3088
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
3089
- case "UninitializedAccountException":
3090
- case "com.amazonaws.mgn#UninitializedAccountException":
3091
- throw await de_UninitializedAccountExceptionRes(parsedOutput, context);
3092
- case "ValidationException":
3093
- case "com.amazonaws.mgn#ValidationException":
3094
- throw await de_ValidationExceptionRes(parsedOutput, context);
3095
- default:
3096
- const parsedBody = parsedOutput.body;
3097
- return throwDefaultError({
3098
- output,
3099
- parsedBody,
3100
- errorCode,
3101
- });
3102
- }
3103
- };
3104
1928
  export const de_ResumeReplicationCommand = async (output, context) => {
3105
1929
  if (output.statusCode !== 200 && output.statusCode >= 300) {
3106
- return de_ResumeReplicationCommandError(output, context);
1930
+ return de_CommandError(output, context);
3107
1931
  }
3108
1932
  const contents = map({
3109
1933
  $metadata: deserializeMetadata(output),
@@ -3128,40 +1952,9 @@ export const de_ResumeReplicationCommand = async (output, context) => {
3128
1952
  Object.assign(contents, doc);
3129
1953
  return contents;
3130
1954
  };
3131
- const de_ResumeReplicationCommandError = async (output, context) => {
3132
- const parsedOutput = {
3133
- ...output,
3134
- body: await parseErrorBody(output.body, context),
3135
- };
3136
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
3137
- switch (errorCode) {
3138
- case "ConflictException":
3139
- case "com.amazonaws.mgn#ConflictException":
3140
- throw await de_ConflictExceptionRes(parsedOutput, context);
3141
- case "ResourceNotFoundException":
3142
- case "com.amazonaws.mgn#ResourceNotFoundException":
3143
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
3144
- case "ServiceQuotaExceededException":
3145
- case "com.amazonaws.mgn#ServiceQuotaExceededException":
3146
- throw await de_ServiceQuotaExceededExceptionRes(parsedOutput, context);
3147
- case "UninitializedAccountException":
3148
- case "com.amazonaws.mgn#UninitializedAccountException":
3149
- throw await de_UninitializedAccountExceptionRes(parsedOutput, context);
3150
- case "ValidationException":
3151
- case "com.amazonaws.mgn#ValidationException":
3152
- throw await de_ValidationExceptionRes(parsedOutput, context);
3153
- default:
3154
- const parsedBody = parsedOutput.body;
3155
- return throwDefaultError({
3156
- output,
3157
- parsedBody,
3158
- errorCode,
3159
- });
3160
- }
3161
- };
3162
1955
  export const de_RetryDataReplicationCommand = async (output, context) => {
3163
1956
  if (output.statusCode !== 200 && output.statusCode >= 300) {
3164
- return de_RetryDataReplicationCommandError(output, context);
1957
+ return de_CommandError(output, context);
3165
1958
  }
3166
1959
  const contents = map({
3167
1960
  $metadata: deserializeMetadata(output),
@@ -3182,77 +1975,27 @@ export const de_RetryDataReplicationCommand = async (output, context) => {
3182
1975
  tags: _json,
3183
1976
  userProvidedID: __expectString,
3184
1977
  vcenterClientID: __expectString,
3185
- });
3186
- Object.assign(contents, doc);
3187
- return contents;
3188
- };
3189
- const de_RetryDataReplicationCommandError = async (output, context) => {
3190
- const parsedOutput = {
3191
- ...output,
3192
- body: await parseErrorBody(output.body, context),
3193
- };
3194
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
3195
- switch (errorCode) {
3196
- case "ResourceNotFoundException":
3197
- case "com.amazonaws.mgn#ResourceNotFoundException":
3198
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
3199
- case "UninitializedAccountException":
3200
- case "com.amazonaws.mgn#UninitializedAccountException":
3201
- throw await de_UninitializedAccountExceptionRes(parsedOutput, context);
3202
- case "ValidationException":
3203
- case "com.amazonaws.mgn#ValidationException":
3204
- throw await de_ValidationExceptionRes(parsedOutput, context);
3205
- default:
3206
- const parsedBody = parsedOutput.body;
3207
- return throwDefaultError({
3208
- output,
3209
- parsedBody,
3210
- errorCode,
3211
- });
3212
- }
3213
- };
3214
- export const de_StartCutoverCommand = async (output, context) => {
3215
- if (output.statusCode !== 202 && output.statusCode >= 300) {
3216
- return de_StartCutoverCommandError(output, context);
3217
- }
3218
- const contents = map({
3219
- $metadata: deserializeMetadata(output),
3220
- });
3221
- const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
3222
- const doc = take(data, {
3223
- job: _json,
3224
- });
3225
- Object.assign(contents, doc);
3226
- return contents;
3227
- };
3228
- const de_StartCutoverCommandError = async (output, context) => {
3229
- const parsedOutput = {
3230
- ...output,
3231
- body: await parseErrorBody(output.body, context),
3232
- };
3233
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
3234
- switch (errorCode) {
3235
- case "ConflictException":
3236
- case "com.amazonaws.mgn#ConflictException":
3237
- throw await de_ConflictExceptionRes(parsedOutput, context);
3238
- case "UninitializedAccountException":
3239
- case "com.amazonaws.mgn#UninitializedAccountException":
3240
- throw await de_UninitializedAccountExceptionRes(parsedOutput, context);
3241
- case "ValidationException":
3242
- case "com.amazonaws.mgn#ValidationException":
3243
- throw await de_ValidationExceptionRes(parsedOutput, context);
3244
- default:
3245
- const parsedBody = parsedOutput.body;
3246
- return throwDefaultError({
3247
- output,
3248
- parsedBody,
3249
- errorCode,
3250
- });
1978
+ });
1979
+ Object.assign(contents, doc);
1980
+ return contents;
1981
+ };
1982
+ export const de_StartCutoverCommand = async (output, context) => {
1983
+ if (output.statusCode !== 202 && output.statusCode >= 300) {
1984
+ return de_CommandError(output, context);
3251
1985
  }
1986
+ const contents = map({
1987
+ $metadata: deserializeMetadata(output),
1988
+ });
1989
+ const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
1990
+ const doc = take(data, {
1991
+ job: _json,
1992
+ });
1993
+ Object.assign(contents, doc);
1994
+ return contents;
3252
1995
  };
3253
1996
  export const de_StartExportCommand = async (output, context) => {
3254
1997
  if (output.statusCode !== 202 && output.statusCode >= 300) {
3255
- return de_StartExportCommandError(output, context);
1998
+ return de_CommandError(output, context);
3256
1999
  }
3257
2000
  const contents = map({
3258
2001
  $metadata: deserializeMetadata(output),
@@ -3264,34 +2007,9 @@ export const de_StartExportCommand = async (output, context) => {
3264
2007
  Object.assign(contents, doc);
3265
2008
  return contents;
3266
2009
  };
3267
- const de_StartExportCommandError = async (output, context) => {
3268
- const parsedOutput = {
3269
- ...output,
3270
- body: await parseErrorBody(output.body, context),
3271
- };
3272
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
3273
- switch (errorCode) {
3274
- case "ServiceQuotaExceededException":
3275
- case "com.amazonaws.mgn#ServiceQuotaExceededException":
3276
- throw await de_ServiceQuotaExceededExceptionRes(parsedOutput, context);
3277
- case "UninitializedAccountException":
3278
- case "com.amazonaws.mgn#UninitializedAccountException":
3279
- throw await de_UninitializedAccountExceptionRes(parsedOutput, context);
3280
- case "ValidationException":
3281
- case "com.amazonaws.mgn#ValidationException":
3282
- throw await de_ValidationExceptionRes(parsedOutput, context);
3283
- default:
3284
- const parsedBody = parsedOutput.body;
3285
- return throwDefaultError({
3286
- output,
3287
- parsedBody,
3288
- errorCode,
3289
- });
3290
- }
3291
- };
3292
2010
  export const de_StartImportCommand = async (output, context) => {
3293
2011
  if (output.statusCode !== 202 && output.statusCode >= 300) {
3294
- return de_StartImportCommandError(output, context);
2012
+ return de_CommandError(output, context);
3295
2013
  }
3296
2014
  const contents = map({
3297
2015
  $metadata: deserializeMetadata(output),
@@ -3303,40 +2021,9 @@ export const de_StartImportCommand = async (output, context) => {
3303
2021
  Object.assign(contents, doc);
3304
2022
  return contents;
3305
2023
  };
3306
- const de_StartImportCommandError = async (output, context) => {
3307
- const parsedOutput = {
3308
- ...output,
3309
- body: await parseErrorBody(output.body, context),
3310
- };
3311
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
3312
- switch (errorCode) {
3313
- case "ConflictException":
3314
- case "com.amazonaws.mgn#ConflictException":
3315
- throw await de_ConflictExceptionRes(parsedOutput, context);
3316
- case "ResourceNotFoundException":
3317
- case "com.amazonaws.mgn#ResourceNotFoundException":
3318
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
3319
- case "ServiceQuotaExceededException":
3320
- case "com.amazonaws.mgn#ServiceQuotaExceededException":
3321
- throw await de_ServiceQuotaExceededExceptionRes(parsedOutput, context);
3322
- case "UninitializedAccountException":
3323
- case "com.amazonaws.mgn#UninitializedAccountException":
3324
- throw await de_UninitializedAccountExceptionRes(parsedOutput, context);
3325
- case "ValidationException":
3326
- case "com.amazonaws.mgn#ValidationException":
3327
- throw await de_ValidationExceptionRes(parsedOutput, context);
3328
- default:
3329
- const parsedBody = parsedOutput.body;
3330
- return throwDefaultError({
3331
- output,
3332
- parsedBody,
3333
- errorCode,
3334
- });
3335
- }
3336
- };
3337
2024
  export const de_StartReplicationCommand = async (output, context) => {
3338
2025
  if (output.statusCode !== 200 && output.statusCode >= 300) {
3339
- return de_StartReplicationCommandError(output, context);
2026
+ return de_CommandError(output, context);
3340
2027
  }
3341
2028
  const contents = map({
3342
2029
  $metadata: deserializeMetadata(output),
@@ -3361,40 +2048,9 @@ export const de_StartReplicationCommand = async (output, context) => {
3361
2048
  Object.assign(contents, doc);
3362
2049
  return contents;
3363
2050
  };
3364
- const de_StartReplicationCommandError = async (output, context) => {
3365
- const parsedOutput = {
3366
- ...output,
3367
- body: await parseErrorBody(output.body, context),
3368
- };
3369
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
3370
- switch (errorCode) {
3371
- case "ConflictException":
3372
- case "com.amazonaws.mgn#ConflictException":
3373
- throw await de_ConflictExceptionRes(parsedOutput, context);
3374
- case "ResourceNotFoundException":
3375
- case "com.amazonaws.mgn#ResourceNotFoundException":
3376
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
3377
- case "ServiceQuotaExceededException":
3378
- case "com.amazonaws.mgn#ServiceQuotaExceededException":
3379
- throw await de_ServiceQuotaExceededExceptionRes(parsedOutput, context);
3380
- case "UninitializedAccountException":
3381
- case "com.amazonaws.mgn#UninitializedAccountException":
3382
- throw await de_UninitializedAccountExceptionRes(parsedOutput, context);
3383
- case "ValidationException":
3384
- case "com.amazonaws.mgn#ValidationException":
3385
- throw await de_ValidationExceptionRes(parsedOutput, context);
3386
- default:
3387
- const parsedBody = parsedOutput.body;
3388
- return throwDefaultError({
3389
- output,
3390
- parsedBody,
3391
- errorCode,
3392
- });
3393
- }
3394
- };
3395
2051
  export const de_StartTestCommand = async (output, context) => {
3396
2052
  if (output.statusCode !== 202 && output.statusCode >= 300) {
3397
- return de_StartTestCommandError(output, context);
2053
+ return de_CommandError(output, context);
3398
2054
  }
3399
2055
  const contents = map({
3400
2056
  $metadata: deserializeMetadata(output),
@@ -3406,34 +2062,9 @@ export const de_StartTestCommand = async (output, context) => {
3406
2062
  Object.assign(contents, doc);
3407
2063
  return contents;
3408
2064
  };
3409
- const de_StartTestCommandError = async (output, context) => {
3410
- const parsedOutput = {
3411
- ...output,
3412
- body: await parseErrorBody(output.body, context),
3413
- };
3414
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
3415
- switch (errorCode) {
3416
- case "ConflictException":
3417
- case "com.amazonaws.mgn#ConflictException":
3418
- throw await de_ConflictExceptionRes(parsedOutput, context);
3419
- case "UninitializedAccountException":
3420
- case "com.amazonaws.mgn#UninitializedAccountException":
3421
- throw await de_UninitializedAccountExceptionRes(parsedOutput, context);
3422
- case "ValidationException":
3423
- case "com.amazonaws.mgn#ValidationException":
3424
- throw await de_ValidationExceptionRes(parsedOutput, context);
3425
- default:
3426
- const parsedBody = parsedOutput.body;
3427
- return throwDefaultError({
3428
- output,
3429
- parsedBody,
3430
- errorCode,
3431
- });
3432
- }
3433
- };
3434
2065
  export const de_StopReplicationCommand = async (output, context) => {
3435
2066
  if (output.statusCode !== 200 && output.statusCode >= 300) {
3436
- return de_StopReplicationCommandError(output, context);
2067
+ return de_CommandError(output, context);
3437
2068
  }
3438
2069
  const contents = map({
3439
2070
  $metadata: deserializeMetadata(output),
@@ -3458,40 +2089,9 @@ export const de_StopReplicationCommand = async (output, context) => {
3458
2089
  Object.assign(contents, doc);
3459
2090
  return contents;
3460
2091
  };
3461
- const de_StopReplicationCommandError = async (output, context) => {
3462
- const parsedOutput = {
3463
- ...output,
3464
- body: await parseErrorBody(output.body, context),
3465
- };
3466
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
3467
- switch (errorCode) {
3468
- case "ConflictException":
3469
- case "com.amazonaws.mgn#ConflictException":
3470
- throw await de_ConflictExceptionRes(parsedOutput, context);
3471
- case "ResourceNotFoundException":
3472
- case "com.amazonaws.mgn#ResourceNotFoundException":
3473
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
3474
- case "ServiceQuotaExceededException":
3475
- case "com.amazonaws.mgn#ServiceQuotaExceededException":
3476
- throw await de_ServiceQuotaExceededExceptionRes(parsedOutput, context);
3477
- case "UninitializedAccountException":
3478
- case "com.amazonaws.mgn#UninitializedAccountException":
3479
- throw await de_UninitializedAccountExceptionRes(parsedOutput, context);
3480
- case "ValidationException":
3481
- case "com.amazonaws.mgn#ValidationException":
3482
- throw await de_ValidationExceptionRes(parsedOutput, context);
3483
- default:
3484
- const parsedBody = parsedOutput.body;
3485
- return throwDefaultError({
3486
- output,
3487
- parsedBody,
3488
- errorCode,
3489
- });
3490
- }
3491
- };
3492
2092
  export const de_TagResourceCommand = async (output, context) => {
3493
2093
  if (output.statusCode !== 200 && output.statusCode >= 300) {
3494
- return de_TagResourceCommandError(output, context);
2094
+ return de_CommandError(output, context);
3495
2095
  }
3496
2096
  const contents = map({
3497
2097
  $metadata: deserializeMetadata(output),
@@ -3499,40 +2099,9 @@ export const de_TagResourceCommand = async (output, context) => {
3499
2099
  await collectBody(output.body, context);
3500
2100
  return contents;
3501
2101
  };
3502
- const de_TagResourceCommandError = async (output, context) => {
3503
- const parsedOutput = {
3504
- ...output,
3505
- body: await parseErrorBody(output.body, context),
3506
- };
3507
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
3508
- switch (errorCode) {
3509
- case "AccessDeniedException":
3510
- case "com.amazonaws.mgn#AccessDeniedException":
3511
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
3512
- case "InternalServerException":
3513
- case "com.amazonaws.mgn#InternalServerException":
3514
- throw await de_InternalServerExceptionRes(parsedOutput, context);
3515
- case "ResourceNotFoundException":
3516
- case "com.amazonaws.mgn#ResourceNotFoundException":
3517
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
3518
- case "ThrottlingException":
3519
- case "com.amazonaws.mgn#ThrottlingException":
3520
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
3521
- case "ValidationException":
3522
- case "com.amazonaws.mgn#ValidationException":
3523
- throw await de_ValidationExceptionRes(parsedOutput, context);
3524
- default:
3525
- const parsedBody = parsedOutput.body;
3526
- return throwDefaultError({
3527
- output,
3528
- parsedBody,
3529
- errorCode,
3530
- });
3531
- }
3532
- };
3533
2102
  export const de_TerminateTargetInstancesCommand = async (output, context) => {
3534
2103
  if (output.statusCode !== 202 && output.statusCode >= 300) {
3535
- return de_TerminateTargetInstancesCommandError(output, context);
2104
+ return de_CommandError(output, context);
3536
2105
  }
3537
2106
  const contents = map({
3538
2107
  $metadata: deserializeMetadata(output),
@@ -3544,34 +2113,9 @@ export const de_TerminateTargetInstancesCommand = async (output, context) => {
3544
2113
  Object.assign(contents, doc);
3545
2114
  return contents;
3546
2115
  };
3547
- const de_TerminateTargetInstancesCommandError = async (output, context) => {
3548
- const parsedOutput = {
3549
- ...output,
3550
- body: await parseErrorBody(output.body, context),
3551
- };
3552
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
3553
- switch (errorCode) {
3554
- case "ConflictException":
3555
- case "com.amazonaws.mgn#ConflictException":
3556
- throw await de_ConflictExceptionRes(parsedOutput, context);
3557
- case "UninitializedAccountException":
3558
- case "com.amazonaws.mgn#UninitializedAccountException":
3559
- throw await de_UninitializedAccountExceptionRes(parsedOutput, context);
3560
- case "ValidationException":
3561
- case "com.amazonaws.mgn#ValidationException":
3562
- throw await de_ValidationExceptionRes(parsedOutput, context);
3563
- default:
3564
- const parsedBody = parsedOutput.body;
3565
- return throwDefaultError({
3566
- output,
3567
- parsedBody,
3568
- errorCode,
3569
- });
3570
- }
3571
- };
3572
2116
  export const de_UnarchiveApplicationCommand = async (output, context) => {
3573
2117
  if (output.statusCode !== 200 && output.statusCode >= 300) {
3574
- return de_UnarchiveApplicationCommandError(output, context);
2118
+ return de_CommandError(output, context);
3575
2119
  }
3576
2120
  const contents = map({
3577
2121
  $metadata: deserializeMetadata(output),
@@ -3592,34 +2136,9 @@ export const de_UnarchiveApplicationCommand = async (output, context) => {
3592
2136
  Object.assign(contents, doc);
3593
2137
  return contents;
3594
2138
  };
3595
- const de_UnarchiveApplicationCommandError = async (output, context) => {
3596
- const parsedOutput = {
3597
- ...output,
3598
- body: await parseErrorBody(output.body, context),
3599
- };
3600
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
3601
- switch (errorCode) {
3602
- case "ResourceNotFoundException":
3603
- case "com.amazonaws.mgn#ResourceNotFoundException":
3604
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
3605
- case "ServiceQuotaExceededException":
3606
- case "com.amazonaws.mgn#ServiceQuotaExceededException":
3607
- throw await de_ServiceQuotaExceededExceptionRes(parsedOutput, context);
3608
- case "UninitializedAccountException":
3609
- case "com.amazonaws.mgn#UninitializedAccountException":
3610
- throw await de_UninitializedAccountExceptionRes(parsedOutput, context);
3611
- default:
3612
- const parsedBody = parsedOutput.body;
3613
- return throwDefaultError({
3614
- output,
3615
- parsedBody,
3616
- errorCode,
3617
- });
3618
- }
3619
- };
3620
2139
  export const de_UnarchiveWaveCommand = async (output, context) => {
3621
2140
  if (output.statusCode !== 200 && output.statusCode >= 300) {
3622
- return de_UnarchiveWaveCommandError(output, context);
2141
+ return de_CommandError(output, context);
3623
2142
  }
3624
2143
  const contents = map({
3625
2144
  $metadata: deserializeMetadata(output),
@@ -3637,36 +2156,11 @@ export const de_UnarchiveWaveCommand = async (output, context) => {
3637
2156
  waveID: __expectString,
3638
2157
  });
3639
2158
  Object.assign(contents, doc);
3640
- return contents;
3641
- };
3642
- const de_UnarchiveWaveCommandError = async (output, context) => {
3643
- const parsedOutput = {
3644
- ...output,
3645
- body: await parseErrorBody(output.body, context),
3646
- };
3647
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
3648
- switch (errorCode) {
3649
- case "ResourceNotFoundException":
3650
- case "com.amazonaws.mgn#ResourceNotFoundException":
3651
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
3652
- case "ServiceQuotaExceededException":
3653
- case "com.amazonaws.mgn#ServiceQuotaExceededException":
3654
- throw await de_ServiceQuotaExceededExceptionRes(parsedOutput, context);
3655
- case "UninitializedAccountException":
3656
- case "com.amazonaws.mgn#UninitializedAccountException":
3657
- throw await de_UninitializedAccountExceptionRes(parsedOutput, context);
3658
- default:
3659
- const parsedBody = parsedOutput.body;
3660
- return throwDefaultError({
3661
- output,
3662
- parsedBody,
3663
- errorCode,
3664
- });
3665
- }
2159
+ return contents;
3666
2160
  };
3667
2161
  export const de_UntagResourceCommand = async (output, context) => {
3668
2162
  if (output.statusCode !== 200 && output.statusCode >= 300) {
3669
- return de_UntagResourceCommandError(output, context);
2163
+ return de_CommandError(output, context);
3670
2164
  }
3671
2165
  const contents = map({
3672
2166
  $metadata: deserializeMetadata(output),
@@ -3674,40 +2168,9 @@ export const de_UntagResourceCommand = async (output, context) => {
3674
2168
  await collectBody(output.body, context);
3675
2169
  return contents;
3676
2170
  };
3677
- const de_UntagResourceCommandError = async (output, context) => {
3678
- const parsedOutput = {
3679
- ...output,
3680
- body: await parseErrorBody(output.body, context),
3681
- };
3682
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
3683
- switch (errorCode) {
3684
- case "AccessDeniedException":
3685
- case "com.amazonaws.mgn#AccessDeniedException":
3686
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
3687
- case "InternalServerException":
3688
- case "com.amazonaws.mgn#InternalServerException":
3689
- throw await de_InternalServerExceptionRes(parsedOutput, context);
3690
- case "ResourceNotFoundException":
3691
- case "com.amazonaws.mgn#ResourceNotFoundException":
3692
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
3693
- case "ThrottlingException":
3694
- case "com.amazonaws.mgn#ThrottlingException":
3695
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
3696
- case "ValidationException":
3697
- case "com.amazonaws.mgn#ValidationException":
3698
- throw await de_ValidationExceptionRes(parsedOutput, context);
3699
- default:
3700
- const parsedBody = parsedOutput.body;
3701
- return throwDefaultError({
3702
- output,
3703
- parsedBody,
3704
- errorCode,
3705
- });
3706
- }
3707
- };
3708
2171
  export const de_UpdateApplicationCommand = async (output, context) => {
3709
2172
  if (output.statusCode !== 200 && output.statusCode >= 300) {
3710
- return de_UpdateApplicationCommandError(output, context);
2173
+ return de_CommandError(output, context);
3711
2174
  }
3712
2175
  const contents = map({
3713
2176
  $metadata: deserializeMetadata(output),
@@ -3728,34 +2191,9 @@ export const de_UpdateApplicationCommand = async (output, context) => {
3728
2191
  Object.assign(contents, doc);
3729
2192
  return contents;
3730
2193
  };
3731
- const de_UpdateApplicationCommandError = async (output, context) => {
3732
- const parsedOutput = {
3733
- ...output,
3734
- body: await parseErrorBody(output.body, context),
3735
- };
3736
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
3737
- switch (errorCode) {
3738
- case "ConflictException":
3739
- case "com.amazonaws.mgn#ConflictException":
3740
- throw await de_ConflictExceptionRes(parsedOutput, context);
3741
- case "ResourceNotFoundException":
3742
- case "com.amazonaws.mgn#ResourceNotFoundException":
3743
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
3744
- case "UninitializedAccountException":
3745
- case "com.amazonaws.mgn#UninitializedAccountException":
3746
- throw await de_UninitializedAccountExceptionRes(parsedOutput, context);
3747
- default:
3748
- const parsedBody = parsedOutput.body;
3749
- return throwDefaultError({
3750
- output,
3751
- parsedBody,
3752
- errorCode,
3753
- });
3754
- }
3755
- };
3756
2194
  export const de_UpdateConnectorCommand = async (output, context) => {
3757
2195
  if (output.statusCode !== 200 && output.statusCode >= 300) {
3758
- return de_UpdateConnectorCommandError(output, context);
2196
+ return de_CommandError(output, context);
3759
2197
  }
3760
2198
  const contents = map({
3761
2199
  $metadata: deserializeMetadata(output),
@@ -3772,34 +2210,9 @@ export const de_UpdateConnectorCommand = async (output, context) => {
3772
2210
  Object.assign(contents, doc);
3773
2211
  return contents;
3774
2212
  };
3775
- const de_UpdateConnectorCommandError = async (output, context) => {
3776
- const parsedOutput = {
3777
- ...output,
3778
- body: await parseErrorBody(output.body, context),
3779
- };
3780
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
3781
- switch (errorCode) {
3782
- case "ResourceNotFoundException":
3783
- case "com.amazonaws.mgn#ResourceNotFoundException":
3784
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
3785
- case "UninitializedAccountException":
3786
- case "com.amazonaws.mgn#UninitializedAccountException":
3787
- throw await de_UninitializedAccountExceptionRes(parsedOutput, context);
3788
- case "ValidationException":
3789
- case "com.amazonaws.mgn#ValidationException":
3790
- throw await de_ValidationExceptionRes(parsedOutput, context);
3791
- default:
3792
- const parsedBody = parsedOutput.body;
3793
- return throwDefaultError({
3794
- output,
3795
- parsedBody,
3796
- errorCode,
3797
- });
3798
- }
3799
- };
3800
2213
  export const de_UpdateLaunchConfigurationCommand = async (output, context) => {
3801
2214
  if (output.statusCode !== 200 && output.statusCode >= 300) {
3802
- return de_UpdateLaunchConfigurationCommandError(output, context);
2215
+ return de_CommandError(output, context);
3803
2216
  }
3804
2217
  const contents = map({
3805
2218
  $metadata: deserializeMetadata(output),
@@ -3822,37 +2235,9 @@ export const de_UpdateLaunchConfigurationCommand = async (output, context) => {
3822
2235
  Object.assign(contents, doc);
3823
2236
  return contents;
3824
2237
  };
3825
- const de_UpdateLaunchConfigurationCommandError = async (output, context) => {
3826
- const parsedOutput = {
3827
- ...output,
3828
- body: await parseErrorBody(output.body, context),
3829
- };
3830
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
3831
- switch (errorCode) {
3832
- case "ConflictException":
3833
- case "com.amazonaws.mgn#ConflictException":
3834
- throw await de_ConflictExceptionRes(parsedOutput, context);
3835
- case "ResourceNotFoundException":
3836
- case "com.amazonaws.mgn#ResourceNotFoundException":
3837
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
3838
- case "UninitializedAccountException":
3839
- case "com.amazonaws.mgn#UninitializedAccountException":
3840
- throw await de_UninitializedAccountExceptionRes(parsedOutput, context);
3841
- case "ValidationException":
3842
- case "com.amazonaws.mgn#ValidationException":
3843
- throw await de_ValidationExceptionRes(parsedOutput, context);
3844
- default:
3845
- const parsedBody = parsedOutput.body;
3846
- return throwDefaultError({
3847
- output,
3848
- parsedBody,
3849
- errorCode,
3850
- });
3851
- }
3852
- };
3853
2238
  export const de_UpdateLaunchConfigurationTemplateCommand = async (output, context) => {
3854
2239
  if (output.statusCode !== 200 && output.statusCode >= 300) {
3855
- return de_UpdateLaunchConfigurationTemplateCommandError(output, context);
2240
+ return de_CommandError(output, context);
3856
2241
  }
3857
2242
  const contents = map({
3858
2243
  $metadata: deserializeMetadata(output),
@@ -3880,37 +2265,9 @@ export const de_UpdateLaunchConfigurationTemplateCommand = async (output, contex
3880
2265
  Object.assign(contents, doc);
3881
2266
  return contents;
3882
2267
  };
3883
- const de_UpdateLaunchConfigurationTemplateCommandError = 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.mgn#AccessDeniedException":
3892
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
3893
- case "ResourceNotFoundException":
3894
- case "com.amazonaws.mgn#ResourceNotFoundException":
3895
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
3896
- case "UninitializedAccountException":
3897
- case "com.amazonaws.mgn#UninitializedAccountException":
3898
- throw await de_UninitializedAccountExceptionRes(parsedOutput, context);
3899
- case "ValidationException":
3900
- case "com.amazonaws.mgn#ValidationException":
3901
- throw await de_ValidationExceptionRes(parsedOutput, context);
3902
- default:
3903
- const parsedBody = parsedOutput.body;
3904
- return throwDefaultError({
3905
- output,
3906
- parsedBody,
3907
- errorCode,
3908
- });
3909
- }
3910
- };
3911
2268
  export const de_UpdateReplicationConfigurationCommand = async (output, context) => {
3912
2269
  if (output.statusCode !== 200 && output.statusCode >= 300) {
3913
- return de_UpdateReplicationConfigurationCommandError(output, context);
2270
+ return de_CommandError(output, context);
3914
2271
  }
3915
2272
  const contents = map({
3916
2273
  $metadata: deserializeMetadata(output),
@@ -3937,40 +2294,9 @@ export const de_UpdateReplicationConfigurationCommand = async (output, context)
3937
2294
  Object.assign(contents, doc);
3938
2295
  return contents;
3939
2296
  };
3940
- const de_UpdateReplicationConfigurationCommandError = async (output, context) => {
3941
- const parsedOutput = {
3942
- ...output,
3943
- body: await parseErrorBody(output.body, context),
3944
- };
3945
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
3946
- switch (errorCode) {
3947
- case "AccessDeniedException":
3948
- case "com.amazonaws.mgn#AccessDeniedException":
3949
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
3950
- case "ConflictException":
3951
- case "com.amazonaws.mgn#ConflictException":
3952
- throw await de_ConflictExceptionRes(parsedOutput, context);
3953
- case "ResourceNotFoundException":
3954
- case "com.amazonaws.mgn#ResourceNotFoundException":
3955
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
3956
- case "UninitializedAccountException":
3957
- case "com.amazonaws.mgn#UninitializedAccountException":
3958
- throw await de_UninitializedAccountExceptionRes(parsedOutput, context);
3959
- case "ValidationException":
3960
- case "com.amazonaws.mgn#ValidationException":
3961
- throw await de_ValidationExceptionRes(parsedOutput, context);
3962
- default:
3963
- const parsedBody = parsedOutput.body;
3964
- return throwDefaultError({
3965
- output,
3966
- parsedBody,
3967
- errorCode,
3968
- });
3969
- }
3970
- };
3971
2297
  export const de_UpdateReplicationConfigurationTemplateCommand = async (output, context) => {
3972
2298
  if (output.statusCode !== 200 && output.statusCode >= 300) {
3973
- return de_UpdateReplicationConfigurationTemplateCommandError(output, context);
2299
+ return de_CommandError(output, context);
3974
2300
  }
3975
2301
  const contents = map({
3976
2302
  $metadata: deserializeMetadata(output),
@@ -3997,37 +2323,9 @@ export const de_UpdateReplicationConfigurationTemplateCommand = async (output, c
3997
2323
  Object.assign(contents, doc);
3998
2324
  return contents;
3999
2325
  };
4000
- const de_UpdateReplicationConfigurationTemplateCommandError = async (output, context) => {
4001
- const parsedOutput = {
4002
- ...output,
4003
- body: await parseErrorBody(output.body, context),
4004
- };
4005
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
4006
- switch (errorCode) {
4007
- case "AccessDeniedException":
4008
- case "com.amazonaws.mgn#AccessDeniedException":
4009
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
4010
- case "ResourceNotFoundException":
4011
- case "com.amazonaws.mgn#ResourceNotFoundException":
4012
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
4013
- case "UninitializedAccountException":
4014
- case "com.amazonaws.mgn#UninitializedAccountException":
4015
- throw await de_UninitializedAccountExceptionRes(parsedOutput, context);
4016
- case "ValidationException":
4017
- case "com.amazonaws.mgn#ValidationException":
4018
- throw await de_ValidationExceptionRes(parsedOutput, context);
4019
- default:
4020
- const parsedBody = parsedOutput.body;
4021
- return throwDefaultError({
4022
- output,
4023
- parsedBody,
4024
- errorCode,
4025
- });
4026
- }
4027
- };
4028
2326
  export const de_UpdateSourceServerCommand = async (output, context) => {
4029
2327
  if (output.statusCode !== 200 && output.statusCode >= 300) {
4030
- return de_UpdateSourceServerCommandError(output, context);
2328
+ return de_CommandError(output, context);
4031
2329
  }
4032
2330
  const contents = map({
4033
2331
  $metadata: deserializeMetadata(output),
@@ -4052,34 +2350,9 @@ export const de_UpdateSourceServerCommand = async (output, context) => {
4052
2350
  Object.assign(contents, doc);
4053
2351
  return contents;
4054
2352
  };
4055
- const de_UpdateSourceServerCommandError = async (output, context) => {
4056
- const parsedOutput = {
4057
- ...output,
4058
- body: await parseErrorBody(output.body, context),
4059
- };
4060
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
4061
- switch (errorCode) {
4062
- case "ConflictException":
4063
- case "com.amazonaws.mgn#ConflictException":
4064
- throw await de_ConflictExceptionRes(parsedOutput, context);
4065
- case "ResourceNotFoundException":
4066
- case "com.amazonaws.mgn#ResourceNotFoundException":
4067
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
4068
- case "UninitializedAccountException":
4069
- case "com.amazonaws.mgn#UninitializedAccountException":
4070
- throw await de_UninitializedAccountExceptionRes(parsedOutput, context);
4071
- default:
4072
- const parsedBody = parsedOutput.body;
4073
- return throwDefaultError({
4074
- output,
4075
- parsedBody,
4076
- errorCode,
4077
- });
4078
- }
4079
- };
4080
2353
  export const de_UpdateSourceServerReplicationTypeCommand = async (output, context) => {
4081
2354
  if (output.statusCode !== 200 && output.statusCode >= 300) {
4082
- return de_UpdateSourceServerReplicationTypeCommandError(output, context);
2355
+ return de_CommandError(output, context);
4083
2356
  }
4084
2357
  const contents = map({
4085
2358
  $metadata: deserializeMetadata(output),
@@ -4104,37 +2377,9 @@ export const de_UpdateSourceServerReplicationTypeCommand = async (output, contex
4104
2377
  Object.assign(contents, doc);
4105
2378
  return contents;
4106
2379
  };
4107
- const de_UpdateSourceServerReplicationTypeCommandError = async (output, context) => {
4108
- const parsedOutput = {
4109
- ...output,
4110
- body: await parseErrorBody(output.body, context),
4111
- };
4112
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
4113
- switch (errorCode) {
4114
- case "ConflictException":
4115
- case "com.amazonaws.mgn#ConflictException":
4116
- throw await de_ConflictExceptionRes(parsedOutput, context);
4117
- case "ResourceNotFoundException":
4118
- case "com.amazonaws.mgn#ResourceNotFoundException":
4119
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
4120
- case "UninitializedAccountException":
4121
- case "com.amazonaws.mgn#UninitializedAccountException":
4122
- throw await de_UninitializedAccountExceptionRes(parsedOutput, context);
4123
- case "ValidationException":
4124
- case "com.amazonaws.mgn#ValidationException":
4125
- throw await de_ValidationExceptionRes(parsedOutput, context);
4126
- default:
4127
- const parsedBody = parsedOutput.body;
4128
- return throwDefaultError({
4129
- output,
4130
- parsedBody,
4131
- errorCode,
4132
- });
4133
- }
4134
- };
4135
2380
  export const de_UpdateWaveCommand = async (output, context) => {
4136
2381
  if (output.statusCode !== 200 && output.statusCode >= 300) {
4137
- return de_UpdateWaveCommandError(output, context);
2382
+ return de_CommandError(output, context);
4138
2383
  }
4139
2384
  const contents = map({
4140
2385
  $metadata: deserializeMetadata(output),
@@ -4154,7 +2399,7 @@ export const de_UpdateWaveCommand = async (output, context) => {
4154
2399
  Object.assign(contents, doc);
4155
2400
  return contents;
4156
2401
  };
4157
- const de_UpdateWaveCommandError = async (output, context) => {
2402
+ const de_CommandError = async (output, context) => {
4158
2403
  const parsedOutput = {
4159
2404
  ...output,
4160
2405
  body: await parseErrorBody(output.body, context),
@@ -4167,9 +2412,24 @@ const de_UpdateWaveCommandError = async (output, context) => {
4167
2412
  case "ResourceNotFoundException":
4168
2413
  case "com.amazonaws.mgn#ResourceNotFoundException":
4169
2414
  throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
2415
+ case "ServiceQuotaExceededException":
2416
+ case "com.amazonaws.mgn#ServiceQuotaExceededException":
2417
+ throw await de_ServiceQuotaExceededExceptionRes(parsedOutput, context);
4170
2418
  case "UninitializedAccountException":
4171
2419
  case "com.amazonaws.mgn#UninitializedAccountException":
4172
2420
  throw await de_UninitializedAccountExceptionRes(parsedOutput, context);
2421
+ case "ValidationException":
2422
+ case "com.amazonaws.mgn#ValidationException":
2423
+ throw await de_ValidationExceptionRes(parsedOutput, context);
2424
+ case "AccessDeniedException":
2425
+ case "com.amazonaws.mgn#AccessDeniedException":
2426
+ throw await de_AccessDeniedExceptionRes(parsedOutput, context);
2427
+ case "InternalServerException":
2428
+ case "com.amazonaws.mgn#InternalServerException":
2429
+ throw await de_InternalServerExceptionRes(parsedOutput, context);
2430
+ case "ThrottlingException":
2431
+ case "com.amazonaws.mgn#ThrottlingException":
2432
+ throw await de_ThrottlingExceptionRes(parsedOutput, context);
4173
2433
  default:
4174
2434
  const parsedBody = parsedOutput.body;
4175
2435
  return throwDefaultError({