@aws-sdk/client-mgn 3.51.0 → 3.54.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.
Files changed (35) hide show
  1. package/CHANGELOG.md +30 -0
  2. package/dist-cjs/index.js +3 -0
  3. package/dist-cjs/models/MgnServiceException.js +11 -0
  4. package/dist-cjs/models/models_0.js +136 -2
  5. package/dist-cjs/protocols/Aws_restJson1.js +303 -957
  6. package/dist-es/index.js +1 -0
  7. package/dist-es/models/MgnServiceException.js +12 -0
  8. package/dist-es/models/models_0.js +126 -1
  9. package/dist-es/protocols/Aws_restJson1.js +617 -1085
  10. package/dist-types/Mgn.d.ts +10 -10
  11. package/dist-types/MgnClient.d.ts +2 -2
  12. package/dist-types/commands/DeleteVcenterClientCommand.d.ts +1 -1
  13. package/dist-types/commands/DescribeJobLogItemsCommand.d.ts +1 -1
  14. package/dist-types/commands/DescribeJobsCommand.d.ts +1 -1
  15. package/dist-types/commands/DescribeVcenterClientsCommand.d.ts +1 -1
  16. package/dist-types/commands/DisconnectFromServiceCommand.d.ts +1 -1
  17. package/dist-types/commands/FinalizeCutoverCommand.d.ts +1 -1
  18. package/dist-types/commands/MarkAsArchivedCommand.d.ts +1 -1
  19. package/dist-types/commands/StartReplicationCommand.d.ts +1 -1
  20. package/dist-types/commands/StartTestCommand.d.ts +1 -1
  21. package/dist-types/commands/UpdateSourceServerReplicationTypeCommand.d.ts +1 -1
  22. package/dist-types/index.d.ts +1 -0
  23. package/dist-types/models/MgnServiceException.d.ts +10 -0
  24. package/dist-types/models/models_0.d.ts +109 -65
  25. package/dist-types/runtimeConfig.browser.d.ts +1 -1
  26. package/dist-types/runtimeConfig.d.ts +1 -1
  27. package/dist-types/runtimeConfig.native.d.ts +1 -1
  28. package/dist-types/ts3.4/MgnClient.d.ts +2 -2
  29. package/dist-types/ts3.4/index.d.ts +1 -0
  30. package/dist-types/ts3.4/models/MgnServiceException.d.ts +6 -0
  31. package/dist-types/ts3.4/models/models_0.d.ts +55 -33
  32. package/dist-types/ts3.4/runtimeConfig.browser.d.ts +1 -1
  33. package/dist-types/ts3.4/runtimeConfig.d.ts +1 -1
  34. package/dist-types/ts3.4/runtimeConfig.native.d.ts +1 -1
  35. package/package.json +33 -33
@@ -4,6 +4,8 @@ exports.deserializeAws_restJson1StartReplicationCommand = exports.deserializeAws
4
4
  exports.deserializeAws_restJson1UpdateSourceServerReplicationTypeCommand = exports.deserializeAws_restJson1UpdateReplicationConfigurationTemplateCommand = exports.deserializeAws_restJson1UpdateReplicationConfigurationCommand = exports.deserializeAws_restJson1UpdateLaunchConfigurationCommand = exports.deserializeAws_restJson1UntagResourceCommand = exports.deserializeAws_restJson1TerminateTargetInstancesCommand = exports.deserializeAws_restJson1TagResourceCommand = exports.deserializeAws_restJson1StartTestCommand = void 0;
5
5
  const protocol_http_1 = require("@aws-sdk/protocol-http");
6
6
  const smithy_client_1 = require("@aws-sdk/smithy-client");
7
+ const MgnServiceException_1 = require("../models/MgnServiceException");
8
+ const models_0_1 = require("../models/models_0");
7
9
  const serializeAws_restJson1ChangeServerLifeCycleStateCommand = async (input, context) => {
8
10
  const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
9
11
  const headers = {
@@ -642,6 +644,7 @@ const serializeAws_restJson1UpdateLaunchConfigurationCommand = async (input, con
642
644
  const resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` + "/UpdateLaunchConfiguration";
643
645
  let body;
644
646
  body = JSON.stringify({
647
+ ...(input.bootMode !== undefined && input.bootMode !== null && { bootMode: input.bootMode }),
645
648
  ...(input.copyPrivateIp !== undefined && input.copyPrivateIp !== null && { copyPrivateIp: input.copyPrivateIp }),
646
649
  ...(input.copyTags !== undefined && input.copyTags !== null && { copyTags: input.copyTags }),
647
650
  ...(input.launchDisposition !== undefined &&
@@ -871,51 +874,25 @@ const deserializeAws_restJson1ChangeServerLifeCycleStateCommandError = async (ou
871
874
  switch (errorCode) {
872
875
  case "ConflictException":
873
876
  case "com.amazonaws.mgn#ConflictException":
874
- response = {
875
- ...(await deserializeAws_restJson1ConflictExceptionResponse(parsedOutput, context)),
876
- name: errorCode,
877
- $metadata: deserializeMetadata(output),
878
- };
879
- break;
877
+ throw await deserializeAws_restJson1ConflictExceptionResponse(parsedOutput, context);
880
878
  case "ResourceNotFoundException":
881
879
  case "com.amazonaws.mgn#ResourceNotFoundException":
882
- response = {
883
- ...(await deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context)),
884
- name: errorCode,
885
- $metadata: deserializeMetadata(output),
886
- };
887
- break;
880
+ throw await deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context);
888
881
  case "UninitializedAccountException":
889
882
  case "com.amazonaws.mgn#UninitializedAccountException":
890
- response = {
891
- ...(await deserializeAws_restJson1UninitializedAccountExceptionResponse(parsedOutput, context)),
892
- name: errorCode,
893
- $metadata: deserializeMetadata(output),
894
- };
895
- break;
883
+ throw await deserializeAws_restJson1UninitializedAccountExceptionResponse(parsedOutput, context);
896
884
  case "ValidationException":
897
885
  case "com.amazonaws.mgn#ValidationException":
898
- response = {
899
- ...(await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context)),
900
- name: errorCode,
901
- $metadata: deserializeMetadata(output),
902
- };
903
- break;
886
+ throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);
904
887
  default:
905
888
  const parsedBody = parsedOutput.body;
906
- errorCode = parsedBody.code || parsedBody.Code || errorCode;
907
- response = {
908
- ...parsedBody,
909
- name: `${errorCode}`,
910
- message: parsedBody.message || parsedBody.Message || errorCode,
889
+ response = new MgnServiceException_1.MgnServiceException({
890
+ name: parsedBody.code || parsedBody.Code || errorCode,
911
891
  $fault: "client",
912
892
  $metadata: deserializeMetadata(output),
913
- };
893
+ });
894
+ throw smithy_client_1.decorateServiceException(response, parsedBody);
914
895
  }
915
- const message = response.message || response.Message || errorCode;
916
- response.message = message;
917
- delete response.Message;
918
- return Promise.reject(Object.assign(new Error(message), response));
919
896
  };
920
897
  const deserializeAws_restJson1CreateReplicationConfigurationTemplateCommand = async (output, context) => {
921
898
  if (output.statusCode !== 201 && output.statusCode >= 300) {
@@ -999,43 +976,22 @@ const deserializeAws_restJson1CreateReplicationConfigurationTemplateCommandError
999
976
  switch (errorCode) {
1000
977
  case "AccessDeniedException":
1001
978
  case "com.amazonaws.mgn#AccessDeniedException":
1002
- response = {
1003
- ...(await deserializeAws_restJson1AccessDeniedExceptionResponse(parsedOutput, context)),
1004
- name: errorCode,
1005
- $metadata: deserializeMetadata(output),
1006
- };
1007
- break;
979
+ throw await deserializeAws_restJson1AccessDeniedExceptionResponse(parsedOutput, context);
1008
980
  case "UninitializedAccountException":
1009
981
  case "com.amazonaws.mgn#UninitializedAccountException":
1010
- response = {
1011
- ...(await deserializeAws_restJson1UninitializedAccountExceptionResponse(parsedOutput, context)),
1012
- name: errorCode,
1013
- $metadata: deserializeMetadata(output),
1014
- };
1015
- break;
982
+ throw await deserializeAws_restJson1UninitializedAccountExceptionResponse(parsedOutput, context);
1016
983
  case "ValidationException":
1017
984
  case "com.amazonaws.mgn#ValidationException":
1018
- response = {
1019
- ...(await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context)),
1020
- name: errorCode,
1021
- $metadata: deserializeMetadata(output),
1022
- };
1023
- break;
985
+ throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);
1024
986
  default:
1025
987
  const parsedBody = parsedOutput.body;
1026
- errorCode = parsedBody.code || parsedBody.Code || errorCode;
1027
- response = {
1028
- ...parsedBody,
1029
- name: `${errorCode}`,
1030
- message: parsedBody.message || parsedBody.Message || errorCode,
988
+ response = new MgnServiceException_1.MgnServiceException({
989
+ name: parsedBody.code || parsedBody.Code || errorCode,
1031
990
  $fault: "client",
1032
991
  $metadata: deserializeMetadata(output),
1033
- };
992
+ });
993
+ throw smithy_client_1.decorateServiceException(response, parsedBody);
1034
994
  }
1035
- const message = response.message || response.Message || errorCode;
1036
- response.message = message;
1037
- delete response.Message;
1038
- return Promise.reject(Object.assign(new Error(message), response));
1039
995
  };
1040
996
  const deserializeAws_restJson1DeleteJobCommand = async (output, context) => {
1041
997
  if (output.statusCode !== 204 && output.statusCode >= 300) {
@@ -1059,43 +1015,22 @@ const deserializeAws_restJson1DeleteJobCommandError = async (output, context) =>
1059
1015
  switch (errorCode) {
1060
1016
  case "ConflictException":
1061
1017
  case "com.amazonaws.mgn#ConflictException":
1062
- response = {
1063
- ...(await deserializeAws_restJson1ConflictExceptionResponse(parsedOutput, context)),
1064
- name: errorCode,
1065
- $metadata: deserializeMetadata(output),
1066
- };
1067
- break;
1018
+ throw await deserializeAws_restJson1ConflictExceptionResponse(parsedOutput, context);
1068
1019
  case "ResourceNotFoundException":
1069
1020
  case "com.amazonaws.mgn#ResourceNotFoundException":
1070
- response = {
1071
- ...(await deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context)),
1072
- name: errorCode,
1073
- $metadata: deserializeMetadata(output),
1074
- };
1075
- break;
1021
+ throw await deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context);
1076
1022
  case "UninitializedAccountException":
1077
1023
  case "com.amazonaws.mgn#UninitializedAccountException":
1078
- response = {
1079
- ...(await deserializeAws_restJson1UninitializedAccountExceptionResponse(parsedOutput, context)),
1080
- name: errorCode,
1081
- $metadata: deserializeMetadata(output),
1082
- };
1083
- break;
1024
+ throw await deserializeAws_restJson1UninitializedAccountExceptionResponse(parsedOutput, context);
1084
1025
  default:
1085
1026
  const parsedBody = parsedOutput.body;
1086
- errorCode = parsedBody.code || parsedBody.Code || errorCode;
1087
- response = {
1088
- ...parsedBody,
1089
- name: `${errorCode}`,
1090
- message: parsedBody.message || parsedBody.Message || errorCode,
1027
+ response = new MgnServiceException_1.MgnServiceException({
1028
+ name: parsedBody.code || parsedBody.Code || errorCode,
1091
1029
  $fault: "client",
1092
1030
  $metadata: deserializeMetadata(output),
1093
- };
1031
+ });
1032
+ throw smithy_client_1.decorateServiceException(response, parsedBody);
1094
1033
  }
1095
- const message = response.message || response.Message || errorCode;
1096
- response.message = message;
1097
- delete response.Message;
1098
- return Promise.reject(Object.assign(new Error(message), response));
1099
1034
  };
1100
1035
  const deserializeAws_restJson1DeleteReplicationConfigurationTemplateCommand = async (output, context) => {
1101
1036
  if (output.statusCode !== 204 && output.statusCode >= 300) {
@@ -1119,43 +1054,22 @@ const deserializeAws_restJson1DeleteReplicationConfigurationTemplateCommandError
1119
1054
  switch (errorCode) {
1120
1055
  case "ConflictException":
1121
1056
  case "com.amazonaws.mgn#ConflictException":
1122
- response = {
1123
- ...(await deserializeAws_restJson1ConflictExceptionResponse(parsedOutput, context)),
1124
- name: errorCode,
1125
- $metadata: deserializeMetadata(output),
1126
- };
1127
- break;
1057
+ throw await deserializeAws_restJson1ConflictExceptionResponse(parsedOutput, context);
1128
1058
  case "ResourceNotFoundException":
1129
1059
  case "com.amazonaws.mgn#ResourceNotFoundException":
1130
- response = {
1131
- ...(await deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context)),
1132
- name: errorCode,
1133
- $metadata: deserializeMetadata(output),
1134
- };
1135
- break;
1060
+ throw await deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context);
1136
1061
  case "UninitializedAccountException":
1137
1062
  case "com.amazonaws.mgn#UninitializedAccountException":
1138
- response = {
1139
- ...(await deserializeAws_restJson1UninitializedAccountExceptionResponse(parsedOutput, context)),
1140
- name: errorCode,
1141
- $metadata: deserializeMetadata(output),
1142
- };
1143
- break;
1063
+ throw await deserializeAws_restJson1UninitializedAccountExceptionResponse(parsedOutput, context);
1144
1064
  default:
1145
1065
  const parsedBody = parsedOutput.body;
1146
- errorCode = parsedBody.code || parsedBody.Code || errorCode;
1147
- response = {
1148
- ...parsedBody,
1149
- name: `${errorCode}`,
1150
- message: parsedBody.message || parsedBody.Message || errorCode,
1066
+ response = new MgnServiceException_1.MgnServiceException({
1067
+ name: parsedBody.code || parsedBody.Code || errorCode,
1151
1068
  $fault: "client",
1152
1069
  $metadata: deserializeMetadata(output),
1153
- };
1070
+ });
1071
+ throw smithy_client_1.decorateServiceException(response, parsedBody);
1154
1072
  }
1155
- const message = response.message || response.Message || errorCode;
1156
- response.message = message;
1157
- delete response.Message;
1158
- return Promise.reject(Object.assign(new Error(message), response));
1159
1073
  };
1160
1074
  const deserializeAws_restJson1DeleteSourceServerCommand = async (output, context) => {
1161
1075
  if (output.statusCode !== 204 && output.statusCode >= 300) {
@@ -1179,43 +1093,22 @@ const deserializeAws_restJson1DeleteSourceServerCommandError = async (output, co
1179
1093
  switch (errorCode) {
1180
1094
  case "ConflictException":
1181
1095
  case "com.amazonaws.mgn#ConflictException":
1182
- response = {
1183
- ...(await deserializeAws_restJson1ConflictExceptionResponse(parsedOutput, context)),
1184
- name: errorCode,
1185
- $metadata: deserializeMetadata(output),
1186
- };
1187
- break;
1096
+ throw await deserializeAws_restJson1ConflictExceptionResponse(parsedOutput, context);
1188
1097
  case "ResourceNotFoundException":
1189
1098
  case "com.amazonaws.mgn#ResourceNotFoundException":
1190
- response = {
1191
- ...(await deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context)),
1192
- name: errorCode,
1193
- $metadata: deserializeMetadata(output),
1194
- };
1195
- break;
1099
+ throw await deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context);
1196
1100
  case "UninitializedAccountException":
1197
1101
  case "com.amazonaws.mgn#UninitializedAccountException":
1198
- response = {
1199
- ...(await deserializeAws_restJson1UninitializedAccountExceptionResponse(parsedOutput, context)),
1200
- name: errorCode,
1201
- $metadata: deserializeMetadata(output),
1202
- };
1203
- break;
1102
+ throw await deserializeAws_restJson1UninitializedAccountExceptionResponse(parsedOutput, context);
1204
1103
  default:
1205
1104
  const parsedBody = parsedOutput.body;
1206
- errorCode = parsedBody.code || parsedBody.Code || errorCode;
1207
- response = {
1208
- ...parsedBody,
1209
- name: `${errorCode}`,
1210
- message: parsedBody.message || parsedBody.Message || errorCode,
1105
+ response = new MgnServiceException_1.MgnServiceException({
1106
+ name: parsedBody.code || parsedBody.Code || errorCode,
1211
1107
  $fault: "client",
1212
1108
  $metadata: deserializeMetadata(output),
1213
- };
1109
+ });
1110
+ throw smithy_client_1.decorateServiceException(response, parsedBody);
1214
1111
  }
1215
- const message = response.message || response.Message || errorCode;
1216
- response.message = message;
1217
- delete response.Message;
1218
- return Promise.reject(Object.assign(new Error(message), response));
1219
1112
  };
1220
1113
  const deserializeAws_restJson1DeleteVcenterClientCommand = async (output, context) => {
1221
1114
  if (output.statusCode !== 204 && output.statusCode >= 300) {
@@ -1239,43 +1132,22 @@ const deserializeAws_restJson1DeleteVcenterClientCommandError = async (output, c
1239
1132
  switch (errorCode) {
1240
1133
  case "ResourceNotFoundException":
1241
1134
  case "com.amazonaws.mgn#ResourceNotFoundException":
1242
- response = {
1243
- ...(await deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context)),
1244
- name: errorCode,
1245
- $metadata: deserializeMetadata(output),
1246
- };
1247
- break;
1135
+ throw await deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context);
1248
1136
  case "UninitializedAccountException":
1249
1137
  case "com.amazonaws.mgn#UninitializedAccountException":
1250
- response = {
1251
- ...(await deserializeAws_restJson1UninitializedAccountExceptionResponse(parsedOutput, context)),
1252
- name: errorCode,
1253
- $metadata: deserializeMetadata(output),
1254
- };
1255
- break;
1138
+ throw await deserializeAws_restJson1UninitializedAccountExceptionResponse(parsedOutput, context);
1256
1139
  case "ValidationException":
1257
1140
  case "com.amazonaws.mgn#ValidationException":
1258
- response = {
1259
- ...(await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context)),
1260
- name: errorCode,
1261
- $metadata: deserializeMetadata(output),
1262
- };
1263
- break;
1141
+ throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);
1264
1142
  default:
1265
1143
  const parsedBody = parsedOutput.body;
1266
- errorCode = parsedBody.code || parsedBody.Code || errorCode;
1267
- response = {
1268
- ...parsedBody,
1269
- name: `${errorCode}`,
1270
- message: parsedBody.message || parsedBody.Message || errorCode,
1144
+ response = new MgnServiceException_1.MgnServiceException({
1145
+ name: parsedBody.code || parsedBody.Code || errorCode,
1271
1146
  $fault: "client",
1272
1147
  $metadata: deserializeMetadata(output),
1273
- };
1148
+ });
1149
+ throw smithy_client_1.decorateServiceException(response, parsedBody);
1274
1150
  }
1275
- const message = response.message || response.Message || errorCode;
1276
- response.message = message;
1277
- delete response.Message;
1278
- return Promise.reject(Object.assign(new Error(message), response));
1279
1151
  };
1280
1152
  const deserializeAws_restJson1DescribeJobLogItemsCommand = async (output, context) => {
1281
1153
  if (output.statusCode !== 200 && output.statusCode >= 300) {
@@ -1307,35 +1179,19 @@ const deserializeAws_restJson1DescribeJobLogItemsCommandError = async (output, c
1307
1179
  switch (errorCode) {
1308
1180
  case "UninitializedAccountException":
1309
1181
  case "com.amazonaws.mgn#UninitializedAccountException":
1310
- response = {
1311
- ...(await deserializeAws_restJson1UninitializedAccountExceptionResponse(parsedOutput, context)),
1312
- name: errorCode,
1313
- $metadata: deserializeMetadata(output),
1314
- };
1315
- break;
1182
+ throw await deserializeAws_restJson1UninitializedAccountExceptionResponse(parsedOutput, context);
1316
1183
  case "ValidationException":
1317
1184
  case "com.amazonaws.mgn#ValidationException":
1318
- response = {
1319
- ...(await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context)),
1320
- name: errorCode,
1321
- $metadata: deserializeMetadata(output),
1322
- };
1323
- break;
1185
+ throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);
1324
1186
  default:
1325
1187
  const parsedBody = parsedOutput.body;
1326
- errorCode = parsedBody.code || parsedBody.Code || errorCode;
1327
- response = {
1328
- ...parsedBody,
1329
- name: `${errorCode}`,
1330
- message: parsedBody.message || parsedBody.Message || errorCode,
1188
+ response = new MgnServiceException_1.MgnServiceException({
1189
+ name: parsedBody.code || parsedBody.Code || errorCode,
1331
1190
  $fault: "client",
1332
1191
  $metadata: deserializeMetadata(output),
1333
- };
1192
+ });
1193
+ throw smithy_client_1.decorateServiceException(response, parsedBody);
1334
1194
  }
1335
- const message = response.message || response.Message || errorCode;
1336
- response.message = message;
1337
- delete response.Message;
1338
- return Promise.reject(Object.assign(new Error(message), response));
1339
1195
  };
1340
1196
  const deserializeAws_restJson1DescribeJobsCommand = async (output, context) => {
1341
1197
  if (output.statusCode !== 200 && output.statusCode >= 300) {
@@ -1367,35 +1223,19 @@ const deserializeAws_restJson1DescribeJobsCommandError = async (output, context)
1367
1223
  switch (errorCode) {
1368
1224
  case "UninitializedAccountException":
1369
1225
  case "com.amazonaws.mgn#UninitializedAccountException":
1370
- response = {
1371
- ...(await deserializeAws_restJson1UninitializedAccountExceptionResponse(parsedOutput, context)),
1372
- name: errorCode,
1373
- $metadata: deserializeMetadata(output),
1374
- };
1375
- break;
1226
+ throw await deserializeAws_restJson1UninitializedAccountExceptionResponse(parsedOutput, context);
1376
1227
  case "ValidationException":
1377
1228
  case "com.amazonaws.mgn#ValidationException":
1378
- response = {
1379
- ...(await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context)),
1380
- name: errorCode,
1381
- $metadata: deserializeMetadata(output),
1382
- };
1383
- break;
1229
+ throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);
1384
1230
  default:
1385
1231
  const parsedBody = parsedOutput.body;
1386
- errorCode = parsedBody.code || parsedBody.Code || errorCode;
1387
- response = {
1388
- ...parsedBody,
1389
- name: `${errorCode}`,
1390
- message: parsedBody.message || parsedBody.Message || errorCode,
1232
+ response = new MgnServiceException_1.MgnServiceException({
1233
+ name: parsedBody.code || parsedBody.Code || errorCode,
1391
1234
  $fault: "client",
1392
1235
  $metadata: deserializeMetadata(output),
1393
- };
1236
+ });
1237
+ throw smithy_client_1.decorateServiceException(response, parsedBody);
1394
1238
  }
1395
- const message = response.message || response.Message || errorCode;
1396
- response.message = message;
1397
- delete response.Message;
1398
- return Promise.reject(Object.assign(new Error(message), response));
1399
1239
  };
1400
1240
  const deserializeAws_restJson1DescribeReplicationConfigurationTemplatesCommand = async (output, context) => {
1401
1241
  if (output.statusCode !== 200 && output.statusCode >= 300) {
@@ -1427,43 +1267,22 @@ const deserializeAws_restJson1DescribeReplicationConfigurationTemplatesCommandEr
1427
1267
  switch (errorCode) {
1428
1268
  case "ResourceNotFoundException":
1429
1269
  case "com.amazonaws.mgn#ResourceNotFoundException":
1430
- response = {
1431
- ...(await deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context)),
1432
- name: errorCode,
1433
- $metadata: deserializeMetadata(output),
1434
- };
1435
- break;
1270
+ throw await deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context);
1436
1271
  case "UninitializedAccountException":
1437
1272
  case "com.amazonaws.mgn#UninitializedAccountException":
1438
- response = {
1439
- ...(await deserializeAws_restJson1UninitializedAccountExceptionResponse(parsedOutput, context)),
1440
- name: errorCode,
1441
- $metadata: deserializeMetadata(output),
1442
- };
1443
- break;
1273
+ throw await deserializeAws_restJson1UninitializedAccountExceptionResponse(parsedOutput, context);
1444
1274
  case "ValidationException":
1445
1275
  case "com.amazonaws.mgn#ValidationException":
1446
- response = {
1447
- ...(await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context)),
1448
- name: errorCode,
1449
- $metadata: deserializeMetadata(output),
1450
- };
1451
- break;
1276
+ throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);
1452
1277
  default:
1453
1278
  const parsedBody = parsedOutput.body;
1454
- errorCode = parsedBody.code || parsedBody.Code || errorCode;
1455
- response = {
1456
- ...parsedBody,
1457
- name: `${errorCode}`,
1458
- message: parsedBody.message || parsedBody.Message || errorCode,
1279
+ response = new MgnServiceException_1.MgnServiceException({
1280
+ name: parsedBody.code || parsedBody.Code || errorCode,
1459
1281
  $fault: "client",
1460
1282
  $metadata: deserializeMetadata(output),
1461
- };
1283
+ });
1284
+ throw smithy_client_1.decorateServiceException(response, parsedBody);
1462
1285
  }
1463
- const message = response.message || response.Message || errorCode;
1464
- response.message = message;
1465
- delete response.Message;
1466
- return Promise.reject(Object.assign(new Error(message), response));
1467
1286
  };
1468
1287
  const deserializeAws_restJson1DescribeSourceServersCommand = async (output, context) => {
1469
1288
  if (output.statusCode !== 200 && output.statusCode >= 300) {
@@ -1495,35 +1314,19 @@ const deserializeAws_restJson1DescribeSourceServersCommandError = async (output,
1495
1314
  switch (errorCode) {
1496
1315
  case "UninitializedAccountException":
1497
1316
  case "com.amazonaws.mgn#UninitializedAccountException":
1498
- response = {
1499
- ...(await deserializeAws_restJson1UninitializedAccountExceptionResponse(parsedOutput, context)),
1500
- name: errorCode,
1501
- $metadata: deserializeMetadata(output),
1502
- };
1503
- break;
1317
+ throw await deserializeAws_restJson1UninitializedAccountExceptionResponse(parsedOutput, context);
1504
1318
  case "ValidationException":
1505
1319
  case "com.amazonaws.mgn#ValidationException":
1506
- response = {
1507
- ...(await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context)),
1508
- name: errorCode,
1509
- $metadata: deserializeMetadata(output),
1510
- };
1511
- break;
1320
+ throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);
1512
1321
  default:
1513
1322
  const parsedBody = parsedOutput.body;
1514
- errorCode = parsedBody.code || parsedBody.Code || errorCode;
1515
- response = {
1516
- ...parsedBody,
1517
- name: `${errorCode}`,
1518
- message: parsedBody.message || parsedBody.Message || errorCode,
1323
+ response = new MgnServiceException_1.MgnServiceException({
1324
+ name: parsedBody.code || parsedBody.Code || errorCode,
1519
1325
  $fault: "client",
1520
1326
  $metadata: deserializeMetadata(output),
1521
- };
1327
+ });
1328
+ throw smithy_client_1.decorateServiceException(response, parsedBody);
1522
1329
  }
1523
- const message = response.message || response.Message || errorCode;
1524
- response.message = message;
1525
- delete response.Message;
1526
- return Promise.reject(Object.assign(new Error(message), response));
1527
1330
  };
1528
1331
  const deserializeAws_restJson1DescribeVcenterClientsCommand = async (output, context) => {
1529
1332
  if (output.statusCode !== 200 && output.statusCode >= 300) {
@@ -1555,43 +1358,22 @@ const deserializeAws_restJson1DescribeVcenterClientsCommandError = async (output
1555
1358
  switch (errorCode) {
1556
1359
  case "ResourceNotFoundException":
1557
1360
  case "com.amazonaws.mgn#ResourceNotFoundException":
1558
- response = {
1559
- ...(await deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context)),
1560
- name: errorCode,
1561
- $metadata: deserializeMetadata(output),
1562
- };
1563
- break;
1361
+ throw await deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context);
1564
1362
  case "UninitializedAccountException":
1565
1363
  case "com.amazonaws.mgn#UninitializedAccountException":
1566
- response = {
1567
- ...(await deserializeAws_restJson1UninitializedAccountExceptionResponse(parsedOutput, context)),
1568
- name: errorCode,
1569
- $metadata: deserializeMetadata(output),
1570
- };
1571
- break;
1364
+ throw await deserializeAws_restJson1UninitializedAccountExceptionResponse(parsedOutput, context);
1572
1365
  case "ValidationException":
1573
1366
  case "com.amazonaws.mgn#ValidationException":
1574
- response = {
1575
- ...(await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context)),
1576
- name: errorCode,
1577
- $metadata: deserializeMetadata(output),
1578
- };
1579
- break;
1367
+ throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);
1580
1368
  default:
1581
1369
  const parsedBody = parsedOutput.body;
1582
- errorCode = parsedBody.code || parsedBody.Code || errorCode;
1583
- response = {
1584
- ...parsedBody,
1585
- name: `${errorCode}`,
1586
- message: parsedBody.message || parsedBody.Message || errorCode,
1370
+ response = new MgnServiceException_1.MgnServiceException({
1371
+ name: parsedBody.code || parsedBody.Code || errorCode,
1587
1372
  $fault: "client",
1588
1373
  $metadata: deserializeMetadata(output),
1589
- };
1374
+ });
1375
+ throw smithy_client_1.decorateServiceException(response, parsedBody);
1590
1376
  }
1591
- const message = response.message || response.Message || errorCode;
1592
- response.message = message;
1593
- delete response.Message;
1594
- return Promise.reject(Object.assign(new Error(message), response));
1595
1377
  };
1596
1378
  const deserializeAws_restJson1DisconnectFromServiceCommand = async (output, context) => {
1597
1379
  if (output.statusCode !== 200 && output.statusCode >= 300) {
@@ -1655,43 +1437,22 @@ const deserializeAws_restJson1DisconnectFromServiceCommandError = async (output,
1655
1437
  switch (errorCode) {
1656
1438
  case "ConflictException":
1657
1439
  case "com.amazonaws.mgn#ConflictException":
1658
- response = {
1659
- ...(await deserializeAws_restJson1ConflictExceptionResponse(parsedOutput, context)),
1660
- name: errorCode,
1661
- $metadata: deserializeMetadata(output),
1662
- };
1663
- break;
1440
+ throw await deserializeAws_restJson1ConflictExceptionResponse(parsedOutput, context);
1664
1441
  case "ResourceNotFoundException":
1665
1442
  case "com.amazonaws.mgn#ResourceNotFoundException":
1666
- response = {
1667
- ...(await deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context)),
1668
- name: errorCode,
1669
- $metadata: deserializeMetadata(output),
1670
- };
1671
- break;
1443
+ throw await deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context);
1672
1444
  case "UninitializedAccountException":
1673
1445
  case "com.amazonaws.mgn#UninitializedAccountException":
1674
- response = {
1675
- ...(await deserializeAws_restJson1UninitializedAccountExceptionResponse(parsedOutput, context)),
1676
- name: errorCode,
1677
- $metadata: deserializeMetadata(output),
1678
- };
1679
- break;
1446
+ throw await deserializeAws_restJson1UninitializedAccountExceptionResponse(parsedOutput, context);
1680
1447
  default:
1681
1448
  const parsedBody = parsedOutput.body;
1682
- errorCode = parsedBody.code || parsedBody.Code || errorCode;
1683
- response = {
1684
- ...parsedBody,
1685
- name: `${errorCode}`,
1686
- message: parsedBody.message || parsedBody.Message || errorCode,
1449
+ response = new MgnServiceException_1.MgnServiceException({
1450
+ name: parsedBody.code || parsedBody.Code || errorCode,
1687
1451
  $fault: "client",
1688
1452
  $metadata: deserializeMetadata(output),
1689
- };
1453
+ });
1454
+ throw smithy_client_1.decorateServiceException(response, parsedBody);
1690
1455
  }
1691
- const message = response.message || response.Message || errorCode;
1692
- response.message = message;
1693
- delete response.Message;
1694
- return Promise.reject(Object.assign(new Error(message), response));
1695
1456
  };
1696
1457
  const deserializeAws_restJson1FinalizeCutoverCommand = async (output, context) => {
1697
1458
  if (output.statusCode !== 200 && output.statusCode >= 300) {
@@ -1755,51 +1516,25 @@ const deserializeAws_restJson1FinalizeCutoverCommandError = async (output, conte
1755
1516
  switch (errorCode) {
1756
1517
  case "ConflictException":
1757
1518
  case "com.amazonaws.mgn#ConflictException":
1758
- response = {
1759
- ...(await deserializeAws_restJson1ConflictExceptionResponse(parsedOutput, context)),
1760
- name: errorCode,
1761
- $metadata: deserializeMetadata(output),
1762
- };
1763
- break;
1519
+ throw await deserializeAws_restJson1ConflictExceptionResponse(parsedOutput, context);
1764
1520
  case "ResourceNotFoundException":
1765
1521
  case "com.amazonaws.mgn#ResourceNotFoundException":
1766
- response = {
1767
- ...(await deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context)),
1768
- name: errorCode,
1769
- $metadata: deserializeMetadata(output),
1770
- };
1771
- break;
1522
+ throw await deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context);
1772
1523
  case "UninitializedAccountException":
1773
1524
  case "com.amazonaws.mgn#UninitializedAccountException":
1774
- response = {
1775
- ...(await deserializeAws_restJson1UninitializedAccountExceptionResponse(parsedOutput, context)),
1776
- name: errorCode,
1777
- $metadata: deserializeMetadata(output),
1778
- };
1779
- break;
1525
+ throw await deserializeAws_restJson1UninitializedAccountExceptionResponse(parsedOutput, context);
1780
1526
  case "ValidationException":
1781
1527
  case "com.amazonaws.mgn#ValidationException":
1782
- response = {
1783
- ...(await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context)),
1784
- name: errorCode,
1785
- $metadata: deserializeMetadata(output),
1786
- };
1787
- break;
1528
+ throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);
1788
1529
  default:
1789
1530
  const parsedBody = parsedOutput.body;
1790
- errorCode = parsedBody.code || parsedBody.Code || errorCode;
1791
- response = {
1792
- ...parsedBody,
1793
- name: `${errorCode}`,
1794
- message: parsedBody.message || parsedBody.Message || errorCode,
1531
+ response = new MgnServiceException_1.MgnServiceException({
1532
+ name: parsedBody.code || parsedBody.Code || errorCode,
1795
1533
  $fault: "client",
1796
1534
  $metadata: deserializeMetadata(output),
1797
- };
1535
+ });
1536
+ throw smithy_client_1.decorateServiceException(response, parsedBody);
1798
1537
  }
1799
- const message = response.message || response.Message || errorCode;
1800
- response.message = message;
1801
- delete response.Message;
1802
- return Promise.reject(Object.assign(new Error(message), response));
1803
1538
  };
1804
1539
  const deserializeAws_restJson1GetLaunchConfigurationCommand = async (output, context) => {
1805
1540
  if (output.statusCode !== 200 && output.statusCode >= 300) {
@@ -1807,6 +1542,7 @@ const deserializeAws_restJson1GetLaunchConfigurationCommand = async (output, con
1807
1542
  }
1808
1543
  const contents = {
1809
1544
  $metadata: deserializeMetadata(output),
1545
+ bootMode: undefined,
1810
1546
  copyPrivateIp: undefined,
1811
1547
  copyTags: undefined,
1812
1548
  ec2LaunchTemplateID: undefined,
@@ -1817,6 +1553,9 @@ const deserializeAws_restJson1GetLaunchConfigurationCommand = async (output, con
1817
1553
  targetInstanceTypeRightSizingMethod: undefined,
1818
1554
  };
1819
1555
  const data = smithy_client_1.expectNonNull(smithy_client_1.expectObject(await parseBody(output.body, context)), "body");
1556
+ if (data.bootMode !== undefined && data.bootMode !== null) {
1557
+ contents.bootMode = smithy_client_1.expectString(data.bootMode);
1558
+ }
1820
1559
  if (data.copyPrivateIp !== undefined && data.copyPrivateIp !== null) {
1821
1560
  contents.copyPrivateIp = smithy_client_1.expectBoolean(data.copyPrivateIp);
1822
1561
  }
@@ -1855,35 +1594,19 @@ const deserializeAws_restJson1GetLaunchConfigurationCommandError = async (output
1855
1594
  switch (errorCode) {
1856
1595
  case "ResourceNotFoundException":
1857
1596
  case "com.amazonaws.mgn#ResourceNotFoundException":
1858
- response = {
1859
- ...(await deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context)),
1860
- name: errorCode,
1861
- $metadata: deserializeMetadata(output),
1862
- };
1863
- break;
1597
+ throw await deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context);
1864
1598
  case "UninitializedAccountException":
1865
1599
  case "com.amazonaws.mgn#UninitializedAccountException":
1866
- response = {
1867
- ...(await deserializeAws_restJson1UninitializedAccountExceptionResponse(parsedOutput, context)),
1868
- name: errorCode,
1869
- $metadata: deserializeMetadata(output),
1870
- };
1871
- break;
1600
+ throw await deserializeAws_restJson1UninitializedAccountExceptionResponse(parsedOutput, context);
1872
1601
  default:
1873
1602
  const parsedBody = parsedOutput.body;
1874
- errorCode = parsedBody.code || parsedBody.Code || errorCode;
1875
- response = {
1876
- ...parsedBody,
1877
- name: `${errorCode}`,
1878
- message: parsedBody.message || parsedBody.Message || errorCode,
1603
+ response = new MgnServiceException_1.MgnServiceException({
1604
+ name: parsedBody.code || parsedBody.Code || errorCode,
1879
1605
  $fault: "client",
1880
1606
  $metadata: deserializeMetadata(output),
1881
- };
1607
+ });
1608
+ throw smithy_client_1.decorateServiceException(response, parsedBody);
1882
1609
  }
1883
- const message = response.message || response.Message || errorCode;
1884
- response.message = message;
1885
- delete response.Message;
1886
- return Promise.reject(Object.assign(new Error(message), response));
1887
1610
  };
1888
1611
  const deserializeAws_restJson1GetReplicationConfigurationCommand = async (output, context) => {
1889
1612
  if (output.statusCode !== 200 && output.statusCode >= 300) {
@@ -1967,35 +1690,19 @@ const deserializeAws_restJson1GetReplicationConfigurationCommandError = async (o
1967
1690
  switch (errorCode) {
1968
1691
  case "ResourceNotFoundException":
1969
1692
  case "com.amazonaws.mgn#ResourceNotFoundException":
1970
- response = {
1971
- ...(await deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context)),
1972
- name: errorCode,
1973
- $metadata: deserializeMetadata(output),
1974
- };
1975
- break;
1693
+ throw await deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context);
1976
1694
  case "UninitializedAccountException":
1977
1695
  case "com.amazonaws.mgn#UninitializedAccountException":
1978
- response = {
1979
- ...(await deserializeAws_restJson1UninitializedAccountExceptionResponse(parsedOutput, context)),
1980
- name: errorCode,
1981
- $metadata: deserializeMetadata(output),
1982
- };
1983
- break;
1696
+ throw await deserializeAws_restJson1UninitializedAccountExceptionResponse(parsedOutput, context);
1984
1697
  default:
1985
1698
  const parsedBody = parsedOutput.body;
1986
- errorCode = parsedBody.code || parsedBody.Code || errorCode;
1987
- response = {
1988
- ...parsedBody,
1989
- name: `${errorCode}`,
1990
- message: parsedBody.message || parsedBody.Message || errorCode,
1699
+ response = new MgnServiceException_1.MgnServiceException({
1700
+ name: parsedBody.code || parsedBody.Code || errorCode,
1991
1701
  $fault: "client",
1992
1702
  $metadata: deserializeMetadata(output),
1993
- };
1703
+ });
1704
+ throw smithy_client_1.decorateServiceException(response, parsedBody);
1994
1705
  }
1995
- const message = response.message || response.Message || errorCode;
1996
- response.message = message;
1997
- delete response.Message;
1998
- return Promise.reject(Object.assign(new Error(message), response));
1999
1706
  };
2000
1707
  const deserializeAws_restJson1InitializeServiceCommand = async (output, context) => {
2001
1708
  if (output.statusCode !== 204 && output.statusCode >= 300) {
@@ -2019,35 +1726,19 @@ const deserializeAws_restJson1InitializeServiceCommandError = async (output, con
2019
1726
  switch (errorCode) {
2020
1727
  case "AccessDeniedException":
2021
1728
  case "com.amazonaws.mgn#AccessDeniedException":
2022
- response = {
2023
- ...(await deserializeAws_restJson1AccessDeniedExceptionResponse(parsedOutput, context)),
2024
- name: errorCode,
2025
- $metadata: deserializeMetadata(output),
2026
- };
2027
- break;
1729
+ throw await deserializeAws_restJson1AccessDeniedExceptionResponse(parsedOutput, context);
2028
1730
  case "ValidationException":
2029
1731
  case "com.amazonaws.mgn#ValidationException":
2030
- response = {
2031
- ...(await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context)),
2032
- name: errorCode,
2033
- $metadata: deserializeMetadata(output),
2034
- };
2035
- break;
1732
+ throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);
2036
1733
  default:
2037
1734
  const parsedBody = parsedOutput.body;
2038
- errorCode = parsedBody.code || parsedBody.Code || errorCode;
2039
- response = {
2040
- ...parsedBody,
2041
- name: `${errorCode}`,
2042
- message: parsedBody.message || parsedBody.Message || errorCode,
1735
+ response = new MgnServiceException_1.MgnServiceException({
1736
+ name: parsedBody.code || parsedBody.Code || errorCode,
2043
1737
  $fault: "client",
2044
1738
  $metadata: deserializeMetadata(output),
2045
- };
1739
+ });
1740
+ throw smithy_client_1.decorateServiceException(response, parsedBody);
2046
1741
  }
2047
- const message = response.message || response.Message || errorCode;
2048
- response.message = message;
2049
- delete response.Message;
2050
- return Promise.reject(Object.assign(new Error(message), response));
2051
1742
  };
2052
1743
  const deserializeAws_restJson1ListTagsForResourceCommand = async (output, context) => {
2053
1744
  if (output.statusCode !== 200 && output.statusCode >= 300) {
@@ -2075,59 +1766,28 @@ const deserializeAws_restJson1ListTagsForResourceCommandError = async (output, c
2075
1766
  switch (errorCode) {
2076
1767
  case "AccessDeniedException":
2077
1768
  case "com.amazonaws.mgn#AccessDeniedException":
2078
- response = {
2079
- ...(await deserializeAws_restJson1AccessDeniedExceptionResponse(parsedOutput, context)),
2080
- name: errorCode,
2081
- $metadata: deserializeMetadata(output),
2082
- };
2083
- break;
1769
+ throw await deserializeAws_restJson1AccessDeniedExceptionResponse(parsedOutput, context);
2084
1770
  case "InternalServerException":
2085
1771
  case "com.amazonaws.mgn#InternalServerException":
2086
- response = {
2087
- ...(await deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context)),
2088
- name: errorCode,
2089
- $metadata: deserializeMetadata(output),
2090
- };
2091
- break;
1772
+ throw await deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context);
2092
1773
  case "ResourceNotFoundException":
2093
1774
  case "com.amazonaws.mgn#ResourceNotFoundException":
2094
- response = {
2095
- ...(await deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context)),
2096
- name: errorCode,
2097
- $metadata: deserializeMetadata(output),
2098
- };
2099
- break;
1775
+ throw await deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context);
2100
1776
  case "ThrottlingException":
2101
1777
  case "com.amazonaws.mgn#ThrottlingException":
2102
- response = {
2103
- ...(await deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context)),
2104
- name: errorCode,
2105
- $metadata: deserializeMetadata(output),
2106
- };
2107
- break;
1778
+ throw await deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context);
2108
1779
  case "ValidationException":
2109
1780
  case "com.amazonaws.mgn#ValidationException":
2110
- response = {
2111
- ...(await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context)),
2112
- name: errorCode,
2113
- $metadata: deserializeMetadata(output),
2114
- };
2115
- break;
1781
+ throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);
2116
1782
  default:
2117
1783
  const parsedBody = parsedOutput.body;
2118
- errorCode = parsedBody.code || parsedBody.Code || errorCode;
2119
- response = {
2120
- ...parsedBody,
2121
- name: `${errorCode}`,
2122
- message: parsedBody.message || parsedBody.Message || errorCode,
1784
+ response = new MgnServiceException_1.MgnServiceException({
1785
+ name: parsedBody.code || parsedBody.Code || errorCode,
2123
1786
  $fault: "client",
2124
1787
  $metadata: deserializeMetadata(output),
2125
- };
1788
+ });
1789
+ throw smithy_client_1.decorateServiceException(response, parsedBody);
2126
1790
  }
2127
- const message = response.message || response.Message || errorCode;
2128
- response.message = message;
2129
- delete response.Message;
2130
- return Promise.reject(Object.assign(new Error(message), response));
2131
1791
  };
2132
1792
  const deserializeAws_restJson1MarkAsArchivedCommand = async (output, context) => {
2133
1793
  if (output.statusCode !== 200 && output.statusCode >= 300) {
@@ -2191,43 +1851,22 @@ const deserializeAws_restJson1MarkAsArchivedCommandError = async (output, contex
2191
1851
  switch (errorCode) {
2192
1852
  case "ConflictException":
2193
1853
  case "com.amazonaws.mgn#ConflictException":
2194
- response = {
2195
- ...(await deserializeAws_restJson1ConflictExceptionResponse(parsedOutput, context)),
2196
- name: errorCode,
2197
- $metadata: deserializeMetadata(output),
2198
- };
2199
- break;
1854
+ throw await deserializeAws_restJson1ConflictExceptionResponse(parsedOutput, context);
2200
1855
  case "ResourceNotFoundException":
2201
1856
  case "com.amazonaws.mgn#ResourceNotFoundException":
2202
- response = {
2203
- ...(await deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context)),
2204
- name: errorCode,
2205
- $metadata: deserializeMetadata(output),
2206
- };
2207
- break;
1857
+ throw await deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context);
2208
1858
  case "UninitializedAccountException":
2209
1859
  case "com.amazonaws.mgn#UninitializedAccountException":
2210
- response = {
2211
- ...(await deserializeAws_restJson1UninitializedAccountExceptionResponse(parsedOutput, context)),
2212
- name: errorCode,
2213
- $metadata: deserializeMetadata(output),
2214
- };
2215
- break;
1860
+ throw await deserializeAws_restJson1UninitializedAccountExceptionResponse(parsedOutput, context);
2216
1861
  default:
2217
1862
  const parsedBody = parsedOutput.body;
2218
- errorCode = parsedBody.code || parsedBody.Code || errorCode;
2219
- response = {
2220
- ...parsedBody,
2221
- name: `${errorCode}`,
2222
- message: parsedBody.message || parsedBody.Message || errorCode,
1863
+ response = new MgnServiceException_1.MgnServiceException({
1864
+ name: parsedBody.code || parsedBody.Code || errorCode,
2223
1865
  $fault: "client",
2224
1866
  $metadata: deserializeMetadata(output),
2225
- };
1867
+ });
1868
+ throw smithy_client_1.decorateServiceException(response, parsedBody);
2226
1869
  }
2227
- const message = response.message || response.Message || errorCode;
2228
- response.message = message;
2229
- delete response.Message;
2230
- return Promise.reject(Object.assign(new Error(message), response));
2231
1870
  };
2232
1871
  const deserializeAws_restJson1RetryDataReplicationCommand = async (output, context) => {
2233
1872
  if (output.statusCode !== 200 && output.statusCode >= 300) {
@@ -2291,43 +1930,22 @@ const deserializeAws_restJson1RetryDataReplicationCommandError = async (output,
2291
1930
  switch (errorCode) {
2292
1931
  case "ResourceNotFoundException":
2293
1932
  case "com.amazonaws.mgn#ResourceNotFoundException":
2294
- response = {
2295
- ...(await deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context)),
2296
- name: errorCode,
2297
- $metadata: deserializeMetadata(output),
2298
- };
2299
- break;
1933
+ throw await deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context);
2300
1934
  case "UninitializedAccountException":
2301
1935
  case "com.amazonaws.mgn#UninitializedAccountException":
2302
- response = {
2303
- ...(await deserializeAws_restJson1UninitializedAccountExceptionResponse(parsedOutput, context)),
2304
- name: errorCode,
2305
- $metadata: deserializeMetadata(output),
2306
- };
2307
- break;
1936
+ throw await deserializeAws_restJson1UninitializedAccountExceptionResponse(parsedOutput, context);
2308
1937
  case "ValidationException":
2309
1938
  case "com.amazonaws.mgn#ValidationException":
2310
- response = {
2311
- ...(await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context)),
2312
- name: errorCode,
2313
- $metadata: deserializeMetadata(output),
2314
- };
2315
- break;
1939
+ throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);
2316
1940
  default:
2317
1941
  const parsedBody = parsedOutput.body;
2318
- errorCode = parsedBody.code || parsedBody.Code || errorCode;
2319
- response = {
2320
- ...parsedBody,
2321
- name: `${errorCode}`,
2322
- message: parsedBody.message || parsedBody.Message || errorCode,
1942
+ response = new MgnServiceException_1.MgnServiceException({
1943
+ name: parsedBody.code || parsedBody.Code || errorCode,
2323
1944
  $fault: "client",
2324
1945
  $metadata: deserializeMetadata(output),
2325
- };
1946
+ });
1947
+ throw smithy_client_1.decorateServiceException(response, parsedBody);
2326
1948
  }
2327
- const message = response.message || response.Message || errorCode;
2328
- response.message = message;
2329
- delete response.Message;
2330
- return Promise.reject(Object.assign(new Error(message), response));
2331
1949
  };
2332
1950
  const deserializeAws_restJson1StartCutoverCommand = async (output, context) => {
2333
1951
  if (output.statusCode !== 202 && output.statusCode >= 300) {
@@ -2355,43 +1973,22 @@ const deserializeAws_restJson1StartCutoverCommandError = async (output, context)
2355
1973
  switch (errorCode) {
2356
1974
  case "ConflictException":
2357
1975
  case "com.amazonaws.mgn#ConflictException":
2358
- response = {
2359
- ...(await deserializeAws_restJson1ConflictExceptionResponse(parsedOutput, context)),
2360
- name: errorCode,
2361
- $metadata: deserializeMetadata(output),
2362
- };
2363
- break;
1976
+ throw await deserializeAws_restJson1ConflictExceptionResponse(parsedOutput, context);
2364
1977
  case "UninitializedAccountException":
2365
1978
  case "com.amazonaws.mgn#UninitializedAccountException":
2366
- response = {
2367
- ...(await deserializeAws_restJson1UninitializedAccountExceptionResponse(parsedOutput, context)),
2368
- name: errorCode,
2369
- $metadata: deserializeMetadata(output),
2370
- };
2371
- break;
1979
+ throw await deserializeAws_restJson1UninitializedAccountExceptionResponse(parsedOutput, context);
2372
1980
  case "ValidationException":
2373
1981
  case "com.amazonaws.mgn#ValidationException":
2374
- response = {
2375
- ...(await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context)),
2376
- name: errorCode,
2377
- $metadata: deserializeMetadata(output),
2378
- };
2379
- break;
1982
+ throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);
2380
1983
  default:
2381
1984
  const parsedBody = parsedOutput.body;
2382
- errorCode = parsedBody.code || parsedBody.Code || errorCode;
2383
- response = {
2384
- ...parsedBody,
2385
- name: `${errorCode}`,
2386
- message: parsedBody.message || parsedBody.Message || errorCode,
1985
+ response = new MgnServiceException_1.MgnServiceException({
1986
+ name: parsedBody.code || parsedBody.Code || errorCode,
2387
1987
  $fault: "client",
2388
1988
  $metadata: deserializeMetadata(output),
2389
- };
1989
+ });
1990
+ throw smithy_client_1.decorateServiceException(response, parsedBody);
2390
1991
  }
2391
- const message = response.message || response.Message || errorCode;
2392
- response.message = message;
2393
- delete response.Message;
2394
- return Promise.reject(Object.assign(new Error(message), response));
2395
1992
  };
2396
1993
  const deserializeAws_restJson1StartReplicationCommand = async (output, context) => {
2397
1994
  if (output.statusCode !== 200 && output.statusCode >= 300) {
@@ -2455,59 +2052,28 @@ const deserializeAws_restJson1StartReplicationCommandError = async (output, cont
2455
2052
  switch (errorCode) {
2456
2053
  case "ConflictException":
2457
2054
  case "com.amazonaws.mgn#ConflictException":
2458
- response = {
2459
- ...(await deserializeAws_restJson1ConflictExceptionResponse(parsedOutput, context)),
2460
- name: errorCode,
2461
- $metadata: deserializeMetadata(output),
2462
- };
2463
- break;
2055
+ throw await deserializeAws_restJson1ConflictExceptionResponse(parsedOutput, context);
2464
2056
  case "ResourceNotFoundException":
2465
2057
  case "com.amazonaws.mgn#ResourceNotFoundException":
2466
- response = {
2467
- ...(await deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context)),
2468
- name: errorCode,
2469
- $metadata: deserializeMetadata(output),
2470
- };
2471
- break;
2058
+ throw await deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context);
2472
2059
  case "ServiceQuotaExceededException":
2473
2060
  case "com.amazonaws.mgn#ServiceQuotaExceededException":
2474
- response = {
2475
- ...(await deserializeAws_restJson1ServiceQuotaExceededExceptionResponse(parsedOutput, context)),
2476
- name: errorCode,
2477
- $metadata: deserializeMetadata(output),
2478
- };
2479
- break;
2061
+ throw await deserializeAws_restJson1ServiceQuotaExceededExceptionResponse(parsedOutput, context);
2480
2062
  case "UninitializedAccountException":
2481
2063
  case "com.amazonaws.mgn#UninitializedAccountException":
2482
- response = {
2483
- ...(await deserializeAws_restJson1UninitializedAccountExceptionResponse(parsedOutput, context)),
2484
- name: errorCode,
2485
- $metadata: deserializeMetadata(output),
2486
- };
2487
- break;
2064
+ throw await deserializeAws_restJson1UninitializedAccountExceptionResponse(parsedOutput, context);
2488
2065
  case "ValidationException":
2489
2066
  case "com.amazonaws.mgn#ValidationException":
2490
- response = {
2491
- ...(await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context)),
2492
- name: errorCode,
2493
- $metadata: deserializeMetadata(output),
2494
- };
2495
- break;
2067
+ throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);
2496
2068
  default:
2497
2069
  const parsedBody = parsedOutput.body;
2498
- errorCode = parsedBody.code || parsedBody.Code || errorCode;
2499
- response = {
2500
- ...parsedBody,
2501
- name: `${errorCode}`,
2502
- message: parsedBody.message || parsedBody.Message || errorCode,
2070
+ response = new MgnServiceException_1.MgnServiceException({
2071
+ name: parsedBody.code || parsedBody.Code || errorCode,
2503
2072
  $fault: "client",
2504
2073
  $metadata: deserializeMetadata(output),
2505
- };
2074
+ });
2075
+ throw smithy_client_1.decorateServiceException(response, parsedBody);
2506
2076
  }
2507
- const message = response.message || response.Message || errorCode;
2508
- response.message = message;
2509
- delete response.Message;
2510
- return Promise.reject(Object.assign(new Error(message), response));
2511
2077
  };
2512
2078
  const deserializeAws_restJson1StartTestCommand = async (output, context) => {
2513
2079
  if (output.statusCode !== 202 && output.statusCode >= 300) {
@@ -2535,43 +2101,22 @@ const deserializeAws_restJson1StartTestCommandError = async (output, context) =>
2535
2101
  switch (errorCode) {
2536
2102
  case "ConflictException":
2537
2103
  case "com.amazonaws.mgn#ConflictException":
2538
- response = {
2539
- ...(await deserializeAws_restJson1ConflictExceptionResponse(parsedOutput, context)),
2540
- name: errorCode,
2541
- $metadata: deserializeMetadata(output),
2542
- };
2543
- break;
2104
+ throw await deserializeAws_restJson1ConflictExceptionResponse(parsedOutput, context);
2544
2105
  case "UninitializedAccountException":
2545
2106
  case "com.amazonaws.mgn#UninitializedAccountException":
2546
- response = {
2547
- ...(await deserializeAws_restJson1UninitializedAccountExceptionResponse(parsedOutput, context)),
2548
- name: errorCode,
2549
- $metadata: deserializeMetadata(output),
2550
- };
2551
- break;
2107
+ throw await deserializeAws_restJson1UninitializedAccountExceptionResponse(parsedOutput, context);
2552
2108
  case "ValidationException":
2553
2109
  case "com.amazonaws.mgn#ValidationException":
2554
- response = {
2555
- ...(await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context)),
2556
- name: errorCode,
2557
- $metadata: deserializeMetadata(output),
2558
- };
2559
- break;
2110
+ throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);
2560
2111
  default:
2561
2112
  const parsedBody = parsedOutput.body;
2562
- errorCode = parsedBody.code || parsedBody.Code || errorCode;
2563
- response = {
2564
- ...parsedBody,
2565
- name: `${errorCode}`,
2566
- message: parsedBody.message || parsedBody.Message || errorCode,
2113
+ response = new MgnServiceException_1.MgnServiceException({
2114
+ name: parsedBody.code || parsedBody.Code || errorCode,
2567
2115
  $fault: "client",
2568
2116
  $metadata: deserializeMetadata(output),
2569
- };
2117
+ });
2118
+ throw smithy_client_1.decorateServiceException(response, parsedBody);
2570
2119
  }
2571
- const message = response.message || response.Message || errorCode;
2572
- response.message = message;
2573
- delete response.Message;
2574
- return Promise.reject(Object.assign(new Error(message), response));
2575
2120
  };
2576
2121
  const deserializeAws_restJson1TagResourceCommand = async (output, context) => {
2577
2122
  if (output.statusCode !== 200 && output.statusCode >= 300) {
@@ -2595,59 +2140,28 @@ const deserializeAws_restJson1TagResourceCommandError = async (output, context)
2595
2140
  switch (errorCode) {
2596
2141
  case "AccessDeniedException":
2597
2142
  case "com.amazonaws.mgn#AccessDeniedException":
2598
- response = {
2599
- ...(await deserializeAws_restJson1AccessDeniedExceptionResponse(parsedOutput, context)),
2600
- name: errorCode,
2601
- $metadata: deserializeMetadata(output),
2602
- };
2603
- break;
2143
+ throw await deserializeAws_restJson1AccessDeniedExceptionResponse(parsedOutput, context);
2604
2144
  case "InternalServerException":
2605
2145
  case "com.amazonaws.mgn#InternalServerException":
2606
- response = {
2607
- ...(await deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context)),
2608
- name: errorCode,
2609
- $metadata: deserializeMetadata(output),
2610
- };
2611
- break;
2146
+ throw await deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context);
2612
2147
  case "ResourceNotFoundException":
2613
2148
  case "com.amazonaws.mgn#ResourceNotFoundException":
2614
- response = {
2615
- ...(await deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context)),
2616
- name: errorCode,
2617
- $metadata: deserializeMetadata(output),
2618
- };
2619
- break;
2149
+ throw await deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context);
2620
2150
  case "ThrottlingException":
2621
2151
  case "com.amazonaws.mgn#ThrottlingException":
2622
- response = {
2623
- ...(await deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context)),
2624
- name: errorCode,
2625
- $metadata: deserializeMetadata(output),
2626
- };
2627
- break;
2152
+ throw await deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context);
2628
2153
  case "ValidationException":
2629
2154
  case "com.amazonaws.mgn#ValidationException":
2630
- response = {
2631
- ...(await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context)),
2632
- name: errorCode,
2633
- $metadata: deserializeMetadata(output),
2634
- };
2635
- break;
2155
+ throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);
2636
2156
  default:
2637
2157
  const parsedBody = parsedOutput.body;
2638
- errorCode = parsedBody.code || parsedBody.Code || errorCode;
2639
- response = {
2640
- ...parsedBody,
2641
- name: `${errorCode}`,
2642
- message: parsedBody.message || parsedBody.Message || errorCode,
2158
+ response = new MgnServiceException_1.MgnServiceException({
2159
+ name: parsedBody.code || parsedBody.Code || errorCode,
2643
2160
  $fault: "client",
2644
2161
  $metadata: deserializeMetadata(output),
2645
- };
2162
+ });
2163
+ throw smithy_client_1.decorateServiceException(response, parsedBody);
2646
2164
  }
2647
- const message = response.message || response.Message || errorCode;
2648
- response.message = message;
2649
- delete response.Message;
2650
- return Promise.reject(Object.assign(new Error(message), response));
2651
2165
  };
2652
2166
  const deserializeAws_restJson1TerminateTargetInstancesCommand = async (output, context) => {
2653
2167
  if (output.statusCode !== 202 && output.statusCode >= 300) {
@@ -2675,43 +2189,22 @@ const deserializeAws_restJson1TerminateTargetInstancesCommandError = async (outp
2675
2189
  switch (errorCode) {
2676
2190
  case "ConflictException":
2677
2191
  case "com.amazonaws.mgn#ConflictException":
2678
- response = {
2679
- ...(await deserializeAws_restJson1ConflictExceptionResponse(parsedOutput, context)),
2680
- name: errorCode,
2681
- $metadata: deserializeMetadata(output),
2682
- };
2683
- break;
2192
+ throw await deserializeAws_restJson1ConflictExceptionResponse(parsedOutput, context);
2684
2193
  case "UninitializedAccountException":
2685
2194
  case "com.amazonaws.mgn#UninitializedAccountException":
2686
- response = {
2687
- ...(await deserializeAws_restJson1UninitializedAccountExceptionResponse(parsedOutput, context)),
2688
- name: errorCode,
2689
- $metadata: deserializeMetadata(output),
2690
- };
2691
- break;
2195
+ throw await deserializeAws_restJson1UninitializedAccountExceptionResponse(parsedOutput, context);
2692
2196
  case "ValidationException":
2693
2197
  case "com.amazonaws.mgn#ValidationException":
2694
- response = {
2695
- ...(await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context)),
2696
- name: errorCode,
2697
- $metadata: deserializeMetadata(output),
2698
- };
2699
- break;
2198
+ throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);
2700
2199
  default:
2701
2200
  const parsedBody = parsedOutput.body;
2702
- errorCode = parsedBody.code || parsedBody.Code || errorCode;
2703
- response = {
2704
- ...parsedBody,
2705
- name: `${errorCode}`,
2706
- message: parsedBody.message || parsedBody.Message || errorCode,
2201
+ response = new MgnServiceException_1.MgnServiceException({
2202
+ name: parsedBody.code || parsedBody.Code || errorCode,
2707
2203
  $fault: "client",
2708
2204
  $metadata: deserializeMetadata(output),
2709
- };
2205
+ });
2206
+ throw smithy_client_1.decorateServiceException(response, parsedBody);
2710
2207
  }
2711
- const message = response.message || response.Message || errorCode;
2712
- response.message = message;
2713
- delete response.Message;
2714
- return Promise.reject(Object.assign(new Error(message), response));
2715
2208
  };
2716
2209
  const deserializeAws_restJson1UntagResourceCommand = async (output, context) => {
2717
2210
  if (output.statusCode !== 200 && output.statusCode >= 300) {
@@ -2735,59 +2228,28 @@ const deserializeAws_restJson1UntagResourceCommandError = async (output, context
2735
2228
  switch (errorCode) {
2736
2229
  case "AccessDeniedException":
2737
2230
  case "com.amazonaws.mgn#AccessDeniedException":
2738
- response = {
2739
- ...(await deserializeAws_restJson1AccessDeniedExceptionResponse(parsedOutput, context)),
2740
- name: errorCode,
2741
- $metadata: deserializeMetadata(output),
2742
- };
2743
- break;
2231
+ throw await deserializeAws_restJson1AccessDeniedExceptionResponse(parsedOutput, context);
2744
2232
  case "InternalServerException":
2745
2233
  case "com.amazonaws.mgn#InternalServerException":
2746
- response = {
2747
- ...(await deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context)),
2748
- name: errorCode,
2749
- $metadata: deserializeMetadata(output),
2750
- };
2751
- break;
2234
+ throw await deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context);
2752
2235
  case "ResourceNotFoundException":
2753
2236
  case "com.amazonaws.mgn#ResourceNotFoundException":
2754
- response = {
2755
- ...(await deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context)),
2756
- name: errorCode,
2757
- $metadata: deserializeMetadata(output),
2758
- };
2759
- break;
2237
+ throw await deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context);
2760
2238
  case "ThrottlingException":
2761
2239
  case "com.amazonaws.mgn#ThrottlingException":
2762
- response = {
2763
- ...(await deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context)),
2764
- name: errorCode,
2765
- $metadata: deserializeMetadata(output),
2766
- };
2767
- break;
2240
+ throw await deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context);
2768
2241
  case "ValidationException":
2769
2242
  case "com.amazonaws.mgn#ValidationException":
2770
- response = {
2771
- ...(await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context)),
2772
- name: errorCode,
2773
- $metadata: deserializeMetadata(output),
2774
- };
2775
- break;
2243
+ throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);
2776
2244
  default:
2777
2245
  const parsedBody = parsedOutput.body;
2778
- errorCode = parsedBody.code || parsedBody.Code || errorCode;
2779
- response = {
2780
- ...parsedBody,
2781
- name: `${errorCode}`,
2782
- message: parsedBody.message || parsedBody.Message || errorCode,
2246
+ response = new MgnServiceException_1.MgnServiceException({
2247
+ name: parsedBody.code || parsedBody.Code || errorCode,
2783
2248
  $fault: "client",
2784
2249
  $metadata: deserializeMetadata(output),
2785
- };
2250
+ });
2251
+ throw smithy_client_1.decorateServiceException(response, parsedBody);
2786
2252
  }
2787
- const message = response.message || response.Message || errorCode;
2788
- response.message = message;
2789
- delete response.Message;
2790
- return Promise.reject(Object.assign(new Error(message), response));
2791
2253
  };
2792
2254
  const deserializeAws_restJson1UpdateLaunchConfigurationCommand = async (output, context) => {
2793
2255
  if (output.statusCode !== 200 && output.statusCode >= 300) {
@@ -2795,6 +2257,7 @@ const deserializeAws_restJson1UpdateLaunchConfigurationCommand = async (output,
2795
2257
  }
2796
2258
  const contents = {
2797
2259
  $metadata: deserializeMetadata(output),
2260
+ bootMode: undefined,
2798
2261
  copyPrivateIp: undefined,
2799
2262
  copyTags: undefined,
2800
2263
  ec2LaunchTemplateID: undefined,
@@ -2805,6 +2268,9 @@ const deserializeAws_restJson1UpdateLaunchConfigurationCommand = async (output,
2805
2268
  targetInstanceTypeRightSizingMethod: undefined,
2806
2269
  };
2807
2270
  const data = smithy_client_1.expectNonNull(smithy_client_1.expectObject(await parseBody(output.body, context)), "body");
2271
+ if (data.bootMode !== undefined && data.bootMode !== null) {
2272
+ contents.bootMode = smithy_client_1.expectString(data.bootMode);
2273
+ }
2808
2274
  if (data.copyPrivateIp !== undefined && data.copyPrivateIp !== null) {
2809
2275
  contents.copyPrivateIp = smithy_client_1.expectBoolean(data.copyPrivateIp);
2810
2276
  }
@@ -2843,51 +2309,25 @@ const deserializeAws_restJson1UpdateLaunchConfigurationCommandError = async (out
2843
2309
  switch (errorCode) {
2844
2310
  case "ConflictException":
2845
2311
  case "com.amazonaws.mgn#ConflictException":
2846
- response = {
2847
- ...(await deserializeAws_restJson1ConflictExceptionResponse(parsedOutput, context)),
2848
- name: errorCode,
2849
- $metadata: deserializeMetadata(output),
2850
- };
2851
- break;
2312
+ throw await deserializeAws_restJson1ConflictExceptionResponse(parsedOutput, context);
2852
2313
  case "ResourceNotFoundException":
2853
2314
  case "com.amazonaws.mgn#ResourceNotFoundException":
2854
- response = {
2855
- ...(await deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context)),
2856
- name: errorCode,
2857
- $metadata: deserializeMetadata(output),
2858
- };
2859
- break;
2315
+ throw await deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context);
2860
2316
  case "UninitializedAccountException":
2861
2317
  case "com.amazonaws.mgn#UninitializedAccountException":
2862
- response = {
2863
- ...(await deserializeAws_restJson1UninitializedAccountExceptionResponse(parsedOutput, context)),
2864
- name: errorCode,
2865
- $metadata: deserializeMetadata(output),
2866
- };
2867
- break;
2318
+ throw await deserializeAws_restJson1UninitializedAccountExceptionResponse(parsedOutput, context);
2868
2319
  case "ValidationException":
2869
2320
  case "com.amazonaws.mgn#ValidationException":
2870
- response = {
2871
- ...(await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context)),
2872
- name: errorCode,
2873
- $metadata: deserializeMetadata(output),
2874
- };
2875
- break;
2321
+ throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);
2876
2322
  default:
2877
2323
  const parsedBody = parsedOutput.body;
2878
- errorCode = parsedBody.code || parsedBody.Code || errorCode;
2879
- response = {
2880
- ...parsedBody,
2881
- name: `${errorCode}`,
2882
- message: parsedBody.message || parsedBody.Message || errorCode,
2324
+ response = new MgnServiceException_1.MgnServiceException({
2325
+ name: parsedBody.code || parsedBody.Code || errorCode,
2883
2326
  $fault: "client",
2884
2327
  $metadata: deserializeMetadata(output),
2885
- };
2328
+ });
2329
+ throw smithy_client_1.decorateServiceException(response, parsedBody);
2886
2330
  }
2887
- const message = response.message || response.Message || errorCode;
2888
- response.message = message;
2889
- delete response.Message;
2890
- return Promise.reject(Object.assign(new Error(message), response));
2891
2331
  };
2892
2332
  const deserializeAws_restJson1UpdateReplicationConfigurationCommand = async (output, context) => {
2893
2333
  if (output.statusCode !== 200 && output.statusCode >= 300) {
@@ -2971,59 +2411,28 @@ const deserializeAws_restJson1UpdateReplicationConfigurationCommandError = async
2971
2411
  switch (errorCode) {
2972
2412
  case "AccessDeniedException":
2973
2413
  case "com.amazonaws.mgn#AccessDeniedException":
2974
- response = {
2975
- ...(await deserializeAws_restJson1AccessDeniedExceptionResponse(parsedOutput, context)),
2976
- name: errorCode,
2977
- $metadata: deserializeMetadata(output),
2978
- };
2979
- break;
2414
+ throw await deserializeAws_restJson1AccessDeniedExceptionResponse(parsedOutput, context);
2980
2415
  case "ConflictException":
2981
2416
  case "com.amazonaws.mgn#ConflictException":
2982
- response = {
2983
- ...(await deserializeAws_restJson1ConflictExceptionResponse(parsedOutput, context)),
2984
- name: errorCode,
2985
- $metadata: deserializeMetadata(output),
2986
- };
2987
- break;
2417
+ throw await deserializeAws_restJson1ConflictExceptionResponse(parsedOutput, context);
2988
2418
  case "ResourceNotFoundException":
2989
2419
  case "com.amazonaws.mgn#ResourceNotFoundException":
2990
- response = {
2991
- ...(await deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context)),
2992
- name: errorCode,
2993
- $metadata: deserializeMetadata(output),
2994
- };
2995
- break;
2420
+ throw await deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context);
2996
2421
  case "UninitializedAccountException":
2997
2422
  case "com.amazonaws.mgn#UninitializedAccountException":
2998
- response = {
2999
- ...(await deserializeAws_restJson1UninitializedAccountExceptionResponse(parsedOutput, context)),
3000
- name: errorCode,
3001
- $metadata: deserializeMetadata(output),
3002
- };
3003
- break;
2423
+ throw await deserializeAws_restJson1UninitializedAccountExceptionResponse(parsedOutput, context);
3004
2424
  case "ValidationException":
3005
2425
  case "com.amazonaws.mgn#ValidationException":
3006
- response = {
3007
- ...(await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context)),
3008
- name: errorCode,
3009
- $metadata: deserializeMetadata(output),
3010
- };
3011
- break;
2426
+ throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);
3012
2427
  default:
3013
2428
  const parsedBody = parsedOutput.body;
3014
- errorCode = parsedBody.code || parsedBody.Code || errorCode;
3015
- response = {
3016
- ...parsedBody,
3017
- name: `${errorCode}`,
3018
- message: parsedBody.message || parsedBody.Message || errorCode,
2429
+ response = new MgnServiceException_1.MgnServiceException({
2430
+ name: parsedBody.code || parsedBody.Code || errorCode,
3019
2431
  $fault: "client",
3020
2432
  $metadata: deserializeMetadata(output),
3021
- };
2433
+ });
2434
+ throw smithy_client_1.decorateServiceException(response, parsedBody);
3022
2435
  }
3023
- const message = response.message || response.Message || errorCode;
3024
- response.message = message;
3025
- delete response.Message;
3026
- return Promise.reject(Object.assign(new Error(message), response));
3027
2436
  };
3028
2437
  const deserializeAws_restJson1UpdateReplicationConfigurationTemplateCommand = async (output, context) => {
3029
2438
  if (output.statusCode !== 200 && output.statusCode >= 300) {
@@ -3107,51 +2516,25 @@ const deserializeAws_restJson1UpdateReplicationConfigurationTemplateCommandError
3107
2516
  switch (errorCode) {
3108
2517
  case "AccessDeniedException":
3109
2518
  case "com.amazonaws.mgn#AccessDeniedException":
3110
- response = {
3111
- ...(await deserializeAws_restJson1AccessDeniedExceptionResponse(parsedOutput, context)),
3112
- name: errorCode,
3113
- $metadata: deserializeMetadata(output),
3114
- };
3115
- break;
2519
+ throw await deserializeAws_restJson1AccessDeniedExceptionResponse(parsedOutput, context);
3116
2520
  case "ResourceNotFoundException":
3117
2521
  case "com.amazonaws.mgn#ResourceNotFoundException":
3118
- response = {
3119
- ...(await deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context)),
3120
- name: errorCode,
3121
- $metadata: deserializeMetadata(output),
3122
- };
3123
- break;
2522
+ throw await deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context);
3124
2523
  case "UninitializedAccountException":
3125
2524
  case "com.amazonaws.mgn#UninitializedAccountException":
3126
- response = {
3127
- ...(await deserializeAws_restJson1UninitializedAccountExceptionResponse(parsedOutput, context)),
3128
- name: errorCode,
3129
- $metadata: deserializeMetadata(output),
3130
- };
3131
- break;
2525
+ throw await deserializeAws_restJson1UninitializedAccountExceptionResponse(parsedOutput, context);
3132
2526
  case "ValidationException":
3133
2527
  case "com.amazonaws.mgn#ValidationException":
3134
- response = {
3135
- ...(await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context)),
3136
- name: errorCode,
3137
- $metadata: deserializeMetadata(output),
3138
- };
3139
- break;
2528
+ throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);
3140
2529
  default:
3141
2530
  const parsedBody = parsedOutput.body;
3142
- errorCode = parsedBody.code || parsedBody.Code || errorCode;
3143
- response = {
3144
- ...parsedBody,
3145
- name: `${errorCode}`,
3146
- message: parsedBody.message || parsedBody.Message || errorCode,
2531
+ response = new MgnServiceException_1.MgnServiceException({
2532
+ name: parsedBody.code || parsedBody.Code || errorCode,
3147
2533
  $fault: "client",
3148
2534
  $metadata: deserializeMetadata(output),
3149
- };
2535
+ });
2536
+ throw smithy_client_1.decorateServiceException(response, parsedBody);
3150
2537
  }
3151
- const message = response.message || response.Message || errorCode;
3152
- response.message = message;
3153
- delete response.Message;
3154
- return Promise.reject(Object.assign(new Error(message), response));
3155
2538
  };
3156
2539
  const deserializeAws_restJson1UpdateSourceServerReplicationTypeCommand = async (output, context) => {
3157
2540
  if (output.statusCode !== 200 && output.statusCode >= 300) {
@@ -3215,60 +2598,28 @@ const deserializeAws_restJson1UpdateSourceServerReplicationTypeCommandError = as
3215
2598
  switch (errorCode) {
3216
2599
  case "ConflictException":
3217
2600
  case "com.amazonaws.mgn#ConflictException":
3218
- response = {
3219
- ...(await deserializeAws_restJson1ConflictExceptionResponse(parsedOutput, context)),
3220
- name: errorCode,
3221
- $metadata: deserializeMetadata(output),
3222
- };
3223
- break;
2601
+ throw await deserializeAws_restJson1ConflictExceptionResponse(parsedOutput, context);
3224
2602
  case "ResourceNotFoundException":
3225
2603
  case "com.amazonaws.mgn#ResourceNotFoundException":
3226
- response = {
3227
- ...(await deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context)),
3228
- name: errorCode,
3229
- $metadata: deserializeMetadata(output),
3230
- };
3231
- break;
2604
+ throw await deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context);
3232
2605
  case "UninitializedAccountException":
3233
2606
  case "com.amazonaws.mgn#UninitializedAccountException":
3234
- response = {
3235
- ...(await deserializeAws_restJson1UninitializedAccountExceptionResponse(parsedOutput, context)),
3236
- name: errorCode,
3237
- $metadata: deserializeMetadata(output),
3238
- };
3239
- break;
2607
+ throw await deserializeAws_restJson1UninitializedAccountExceptionResponse(parsedOutput, context);
3240
2608
  case "ValidationException":
3241
2609
  case "com.amazonaws.mgn#ValidationException":
3242
- response = {
3243
- ...(await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context)),
3244
- name: errorCode,
3245
- $metadata: deserializeMetadata(output),
3246
- };
3247
- break;
2610
+ throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);
3248
2611
  default:
3249
2612
  const parsedBody = parsedOutput.body;
3250
- errorCode = parsedBody.code || parsedBody.Code || errorCode;
3251
- response = {
3252
- ...parsedBody,
3253
- name: `${errorCode}`,
3254
- message: parsedBody.message || parsedBody.Message || errorCode,
2613
+ response = new MgnServiceException_1.MgnServiceException({
2614
+ name: parsedBody.code || parsedBody.Code || errorCode,
3255
2615
  $fault: "client",
3256
2616
  $metadata: deserializeMetadata(output),
3257
- };
2617
+ });
2618
+ throw smithy_client_1.decorateServiceException(response, parsedBody);
3258
2619
  }
3259
- const message = response.message || response.Message || errorCode;
3260
- response.message = message;
3261
- delete response.Message;
3262
- return Promise.reject(Object.assign(new Error(message), response));
3263
2620
  };
3264
2621
  const deserializeAws_restJson1AccessDeniedExceptionResponse = async (parsedOutput, context) => {
3265
- const contents = {
3266
- name: "AccessDeniedException",
3267
- $fault: "client",
3268
- $metadata: deserializeMetadata(parsedOutput),
3269
- code: undefined,
3270
- message: undefined,
3271
- };
2622
+ const contents = {};
3272
2623
  const data = parsedOutput.body;
3273
2624
  if (data.code !== undefined && data.code !== null) {
3274
2625
  contents.code = smithy_client_1.expectString(data.code);
@@ -3276,18 +2627,14 @@ const deserializeAws_restJson1AccessDeniedExceptionResponse = async (parsedOutpu
3276
2627
  if (data.message !== undefined && data.message !== null) {
3277
2628
  contents.message = smithy_client_1.expectString(data.message);
3278
2629
  }
3279
- return contents;
2630
+ const exception = new models_0_1.AccessDeniedException({
2631
+ $metadata: deserializeMetadata(parsedOutput),
2632
+ ...contents,
2633
+ });
2634
+ return smithy_client_1.decorateServiceException(exception, parsedOutput.body);
3280
2635
  };
3281
2636
  const deserializeAws_restJson1ConflictExceptionResponse = async (parsedOutput, context) => {
3282
- const contents = {
3283
- name: "ConflictException",
3284
- $fault: "client",
3285
- $metadata: deserializeMetadata(parsedOutput),
3286
- code: undefined,
3287
- message: undefined,
3288
- resourceId: undefined,
3289
- resourceType: undefined,
3290
- };
2637
+ const contents = {};
3291
2638
  const data = parsedOutput.body;
3292
2639
  if (data.code !== undefined && data.code !== null) {
3293
2640
  contents.code = smithy_client_1.expectString(data.code);
@@ -3301,16 +2648,14 @@ const deserializeAws_restJson1ConflictExceptionResponse = async (parsedOutput, c
3301
2648
  if (data.resourceType !== undefined && data.resourceType !== null) {
3302
2649
  contents.resourceType = smithy_client_1.expectString(data.resourceType);
3303
2650
  }
3304
- return contents;
2651
+ const exception = new models_0_1.ConflictException({
2652
+ $metadata: deserializeMetadata(parsedOutput),
2653
+ ...contents,
2654
+ });
2655
+ return smithy_client_1.decorateServiceException(exception, parsedOutput.body);
3305
2656
  };
3306
2657
  const deserializeAws_restJson1InternalServerExceptionResponse = async (parsedOutput, context) => {
3307
- const contents = {
3308
- name: "InternalServerException",
3309
- $fault: "server",
3310
- $metadata: deserializeMetadata(parsedOutput),
3311
- message: undefined,
3312
- retryAfterSeconds: undefined,
3313
- };
2658
+ const contents = {};
3314
2659
  if (parsedOutput.headers["retry-after"] !== undefined) {
3315
2660
  contents.retryAfterSeconds = smithy_client_1.strictParseLong(parsedOutput.headers["retry-after"]);
3316
2661
  }
@@ -3318,18 +2663,14 @@ const deserializeAws_restJson1InternalServerExceptionResponse = async (parsedOut
3318
2663
  if (data.message !== undefined && data.message !== null) {
3319
2664
  contents.message = smithy_client_1.expectString(data.message);
3320
2665
  }
3321
- return contents;
2666
+ const exception = new models_0_1.InternalServerException({
2667
+ $metadata: deserializeMetadata(parsedOutput),
2668
+ ...contents,
2669
+ });
2670
+ return smithy_client_1.decorateServiceException(exception, parsedOutput.body);
3322
2671
  };
3323
2672
  const deserializeAws_restJson1ResourceNotFoundExceptionResponse = async (parsedOutput, context) => {
3324
- const contents = {
3325
- name: "ResourceNotFoundException",
3326
- $fault: "client",
3327
- $metadata: deserializeMetadata(parsedOutput),
3328
- code: undefined,
3329
- message: undefined,
3330
- resourceId: undefined,
3331
- resourceType: undefined,
3332
- };
2673
+ const contents = {};
3333
2674
  const data = parsedOutput.body;
3334
2675
  if (data.code !== undefined && data.code !== null) {
3335
2676
  contents.code = smithy_client_1.expectString(data.code);
@@ -3343,20 +2684,14 @@ const deserializeAws_restJson1ResourceNotFoundExceptionResponse = async (parsedO
3343
2684
  if (data.resourceType !== undefined && data.resourceType !== null) {
3344
2685
  contents.resourceType = smithy_client_1.expectString(data.resourceType);
3345
2686
  }
3346
- return contents;
2687
+ const exception = new models_0_1.ResourceNotFoundException({
2688
+ $metadata: deserializeMetadata(parsedOutput),
2689
+ ...contents,
2690
+ });
2691
+ return smithy_client_1.decorateServiceException(exception, parsedOutput.body);
3347
2692
  };
3348
2693
  const deserializeAws_restJson1ServiceQuotaExceededExceptionResponse = async (parsedOutput, context) => {
3349
- const contents = {
3350
- name: "ServiceQuotaExceededException",
3351
- $fault: "client",
3352
- $metadata: deserializeMetadata(parsedOutput),
3353
- code: undefined,
3354
- message: undefined,
3355
- quotaCode: undefined,
3356
- resourceId: undefined,
3357
- resourceType: undefined,
3358
- serviceCode: undefined,
3359
- };
2694
+ const contents = {};
3360
2695
  const data = parsedOutput.body;
3361
2696
  if (data.code !== undefined && data.code !== null) {
3362
2697
  contents.code = smithy_client_1.expectString(data.code);
@@ -3376,18 +2711,14 @@ const deserializeAws_restJson1ServiceQuotaExceededExceptionResponse = async (par
3376
2711
  if (data.serviceCode !== undefined && data.serviceCode !== null) {
3377
2712
  contents.serviceCode = smithy_client_1.expectString(data.serviceCode);
3378
2713
  }
3379
- return contents;
2714
+ const exception = new models_0_1.ServiceQuotaExceededException({
2715
+ $metadata: deserializeMetadata(parsedOutput),
2716
+ ...contents,
2717
+ });
2718
+ return smithy_client_1.decorateServiceException(exception, parsedOutput.body);
3380
2719
  };
3381
2720
  const deserializeAws_restJson1ThrottlingExceptionResponse = async (parsedOutput, context) => {
3382
- const contents = {
3383
- name: "ThrottlingException",
3384
- $fault: "client",
3385
- $metadata: deserializeMetadata(parsedOutput),
3386
- message: undefined,
3387
- quotaCode: undefined,
3388
- retryAfterSeconds: undefined,
3389
- serviceCode: undefined,
3390
- };
2721
+ const contents = {};
3391
2722
  if (parsedOutput.headers["retry-after"] !== undefined) {
3392
2723
  contents.retryAfterSeconds = parsedOutput.headers["retry-after"];
3393
2724
  }
@@ -3401,16 +2732,14 @@ const deserializeAws_restJson1ThrottlingExceptionResponse = async (parsedOutput,
3401
2732
  if (data.serviceCode !== undefined && data.serviceCode !== null) {
3402
2733
  contents.serviceCode = smithy_client_1.expectString(data.serviceCode);
3403
2734
  }
3404
- return contents;
2735
+ const exception = new models_0_1.ThrottlingException({
2736
+ $metadata: deserializeMetadata(parsedOutput),
2737
+ ...contents,
2738
+ });
2739
+ return smithy_client_1.decorateServiceException(exception, parsedOutput.body);
3405
2740
  };
3406
2741
  const deserializeAws_restJson1UninitializedAccountExceptionResponse = async (parsedOutput, context) => {
3407
- const contents = {
3408
- name: "UninitializedAccountException",
3409
- $fault: "client",
3410
- $metadata: deserializeMetadata(parsedOutput),
3411
- code: undefined,
3412
- message: undefined,
3413
- };
2742
+ const contents = {};
3414
2743
  const data = parsedOutput.body;
3415
2744
  if (data.code !== undefined && data.code !== null) {
3416
2745
  contents.code = smithy_client_1.expectString(data.code);
@@ -3418,18 +2747,14 @@ const deserializeAws_restJson1UninitializedAccountExceptionResponse = async (par
3418
2747
  if (data.message !== undefined && data.message !== null) {
3419
2748
  contents.message = smithy_client_1.expectString(data.message);
3420
2749
  }
3421
- return contents;
2750
+ const exception = new models_0_1.UninitializedAccountException({
2751
+ $metadata: deserializeMetadata(parsedOutput),
2752
+ ...contents,
2753
+ });
2754
+ return smithy_client_1.decorateServiceException(exception, parsedOutput.body);
3422
2755
  };
3423
2756
  const deserializeAws_restJson1ValidationExceptionResponse = async (parsedOutput, context) => {
3424
- const contents = {
3425
- name: "ValidationException",
3426
- $fault: "client",
3427
- $metadata: deserializeMetadata(parsedOutput),
3428
- code: undefined,
3429
- fieldList: undefined,
3430
- message: undefined,
3431
- reason: undefined,
3432
- };
2757
+ const contents = {};
3433
2758
  const data = parsedOutput.body;
3434
2759
  if (data.code !== undefined && data.code !== null) {
3435
2760
  contents.code = smithy_client_1.expectString(data.code);
@@ -3443,7 +2768,11 @@ const deserializeAws_restJson1ValidationExceptionResponse = async (parsedOutput,
3443
2768
  if (data.reason !== undefined && data.reason !== null) {
3444
2769
  contents.reason = smithy_client_1.expectString(data.reason);
3445
2770
  }
3446
- return contents;
2771
+ const exception = new models_0_1.ValidationException({
2772
+ $metadata: deserializeMetadata(parsedOutput),
2773
+ ...contents,
2774
+ });
2775
+ return smithy_client_1.decorateServiceException(exception, parsedOutput.body);
3447
2776
  };
3448
2777
  const serializeAws_restJson1ChangeServerLifeCycleStateSourceServerLifecycle = (input, context) => {
3449
2778
  return {
@@ -3519,6 +2848,7 @@ const serializeAws_restJson1ReplicationConfigurationReplicatedDisk = (input, con
3519
2848
  ...(input.isBootDisk !== undefined && input.isBootDisk !== null && { isBootDisk: input.isBootDisk }),
3520
2849
  ...(input.stagingDiskType !== undefined &&
3521
2850
  input.stagingDiskType !== null && { stagingDiskType: input.stagingDiskType }),
2851
+ ...(input.throughput !== undefined && input.throughput !== null && { throughput: input.throughput }),
3522
2852
  };
3523
2853
  };
3524
2854
  const serializeAws_restJson1ReplicationConfigurationReplicatedDisks = (input, context) => {
@@ -3609,7 +2939,7 @@ const deserializeAws_restJson1CPU = (output, context) => {
3609
2939
  };
3610
2940
  };
3611
2941
  const deserializeAws_restJson1Cpus = (output, context) => {
3612
- return (output || [])
2942
+ const retVal = (output || [])
3613
2943
  .filter((e) => e != null)
3614
2944
  .map((entry) => {
3615
2945
  if (entry === null) {
@@ -3617,6 +2947,7 @@ const deserializeAws_restJson1Cpus = (output, context) => {
3617
2947
  }
3618
2948
  return deserializeAws_restJson1CPU(entry, context);
3619
2949
  });
2950
+ return retVal;
3620
2951
  };
3621
2952
  const deserializeAws_restJson1DataReplicationError = (output, context) => {
3622
2953
  return {
@@ -3651,7 +2982,7 @@ const deserializeAws_restJson1DataReplicationInfoReplicatedDisk = (output, conte
3651
2982
  };
3652
2983
  };
3653
2984
  const deserializeAws_restJson1DataReplicationInfoReplicatedDisks = (output, context) => {
3654
- return (output || [])
2985
+ const retVal = (output || [])
3655
2986
  .filter((e) => e != null)
3656
2987
  .map((entry) => {
3657
2988
  if (entry === null) {
@@ -3659,6 +2990,7 @@ const deserializeAws_restJson1DataReplicationInfoReplicatedDisks = (output, cont
3659
2990
  }
3660
2991
  return deserializeAws_restJson1DataReplicationInfoReplicatedDisk(entry, context);
3661
2992
  });
2993
+ return retVal;
3662
2994
  };
3663
2995
  const deserializeAws_restJson1DataReplicationInitiation = (output, context) => {
3664
2996
  return {
@@ -3676,7 +3008,7 @@ const deserializeAws_restJson1DataReplicationInitiationStep = (output, context)
3676
3008
  };
3677
3009
  };
3678
3010
  const deserializeAws_restJson1DataReplicationInitiationSteps = (output, context) => {
3679
- return (output || [])
3011
+ const retVal = (output || [])
3680
3012
  .filter((e) => e != null)
3681
3013
  .map((entry) => {
3682
3014
  if (entry === null) {
@@ -3684,6 +3016,7 @@ const deserializeAws_restJson1DataReplicationInitiationSteps = (output, context)
3684
3016
  }
3685
3017
  return deserializeAws_restJson1DataReplicationInitiationStep(entry, context);
3686
3018
  });
3019
+ return retVal;
3687
3020
  };
3688
3021
  const deserializeAws_restJson1Disk = (output, context) => {
3689
3022
  return {
@@ -3692,7 +3025,7 @@ const deserializeAws_restJson1Disk = (output, context) => {
3692
3025
  };
3693
3026
  };
3694
3027
  const deserializeAws_restJson1Disks = (output, context) => {
3695
- return (output || [])
3028
+ const retVal = (output || [])
3696
3029
  .filter((e) => e != null)
3697
3030
  .map((entry) => {
3698
3031
  if (entry === null) {
@@ -3700,6 +3033,7 @@ const deserializeAws_restJson1Disks = (output, context) => {
3700
3033
  }
3701
3034
  return deserializeAws_restJson1Disk(entry, context);
3702
3035
  });
3036
+ return retVal;
3703
3037
  };
3704
3038
  const deserializeAws_restJson1IdentificationHints = (output, context) => {
3705
3039
  return {
@@ -3711,7 +3045,7 @@ const deserializeAws_restJson1IdentificationHints = (output, context) => {
3711
3045
  };
3712
3046
  };
3713
3047
  const deserializeAws_restJson1IPsList = (output, context) => {
3714
- return (output || [])
3048
+ const retVal = (output || [])
3715
3049
  .filter((e) => e != null)
3716
3050
  .map((entry) => {
3717
3051
  if (entry === null) {
@@ -3719,6 +3053,7 @@ const deserializeAws_restJson1IPsList = (output, context) => {
3719
3053
  }
3720
3054
  return smithy_client_1.expectString(entry);
3721
3055
  });
3056
+ return retVal;
3722
3057
  };
3723
3058
  const deserializeAws_restJson1Job = (output, context) => {
3724
3059
  return {
@@ -3755,7 +3090,7 @@ const deserializeAws_restJson1JobLogEventData = (output, context) => {
3755
3090
  };
3756
3091
  };
3757
3092
  const deserializeAws_restJson1JobLogs = (output, context) => {
3758
- return (output || [])
3093
+ const retVal = (output || [])
3759
3094
  .filter((e) => e != null)
3760
3095
  .map((entry) => {
3761
3096
  if (entry === null) {
@@ -3763,9 +3098,10 @@ const deserializeAws_restJson1JobLogs = (output, context) => {
3763
3098
  }
3764
3099
  return deserializeAws_restJson1JobLog(entry, context);
3765
3100
  });
3101
+ return retVal;
3766
3102
  };
3767
3103
  const deserializeAws_restJson1JobsList = (output, context) => {
3768
- return (output || [])
3104
+ const retVal = (output || [])
3769
3105
  .filter((e) => e != null)
3770
3106
  .map((entry) => {
3771
3107
  if (entry === null) {
@@ -3773,6 +3109,7 @@ const deserializeAws_restJson1JobsList = (output, context) => {
3773
3109
  }
3774
3110
  return deserializeAws_restJson1Job(entry, context);
3775
3111
  });
3112
+ return retVal;
3776
3113
  };
3777
3114
  const deserializeAws_restJson1LaunchedInstance = (output, context) => {
3778
3115
  return {
@@ -3869,7 +3206,7 @@ const deserializeAws_restJson1NetworkInterface = (output, context) => {
3869
3206
  };
3870
3207
  };
3871
3208
  const deserializeAws_restJson1NetworkInterfaces = (output, context) => {
3872
- return (output || [])
3209
+ const retVal = (output || [])
3873
3210
  .filter((e) => e != null)
3874
3211
  .map((entry) => {
3875
3212
  if (entry === null) {
@@ -3877,6 +3214,7 @@ const deserializeAws_restJson1NetworkInterfaces = (output, context) => {
3877
3214
  }
3878
3215
  return deserializeAws_restJson1NetworkInterface(entry, context);
3879
3216
  });
3217
+ return retVal;
3880
3218
  };
3881
3219
  const deserializeAws_restJson1OS = (output, context) => {
3882
3220
  return {
@@ -3890,7 +3228,7 @@ const deserializeAws_restJson1ParticipatingServer = (output, context) => {
3890
3228
  };
3891
3229
  };
3892
3230
  const deserializeAws_restJson1ParticipatingServers = (output, context) => {
3893
- return (output || [])
3231
+ const retVal = (output || [])
3894
3232
  .filter((e) => e != null)
3895
3233
  .map((entry) => {
3896
3234
  if (entry === null) {
@@ -3898,6 +3236,7 @@ const deserializeAws_restJson1ParticipatingServers = (output, context) => {
3898
3236
  }
3899
3237
  return deserializeAws_restJson1ParticipatingServer(entry, context);
3900
3238
  });
3239
+ return retVal;
3901
3240
  };
3902
3241
  const deserializeAws_restJson1ReplicationConfigurationReplicatedDisk = (output, context) => {
3903
3242
  return {
@@ -3905,10 +3244,11 @@ const deserializeAws_restJson1ReplicationConfigurationReplicatedDisk = (output,
3905
3244
  iops: smithy_client_1.expectLong(output.iops),
3906
3245
  isBootDisk: smithy_client_1.expectBoolean(output.isBootDisk),
3907
3246
  stagingDiskType: smithy_client_1.expectString(output.stagingDiskType),
3247
+ throughput: smithy_client_1.expectLong(output.throughput),
3908
3248
  };
3909
3249
  };
3910
3250
  const deserializeAws_restJson1ReplicationConfigurationReplicatedDisks = (output, context) => {
3911
- return (output || [])
3251
+ const retVal = (output || [])
3912
3252
  .filter((e) => e != null)
3913
3253
  .map((entry) => {
3914
3254
  if (entry === null) {
@@ -3916,6 +3256,7 @@ const deserializeAws_restJson1ReplicationConfigurationReplicatedDisks = (output,
3916
3256
  }
3917
3257
  return deserializeAws_restJson1ReplicationConfigurationReplicatedDisk(entry, context);
3918
3258
  });
3259
+ return retVal;
3919
3260
  };
3920
3261
  const deserializeAws_restJson1ReplicationConfigurationTemplate = (output, context) => {
3921
3262
  return {
@@ -3943,7 +3284,7 @@ const deserializeAws_restJson1ReplicationConfigurationTemplate = (output, contex
3943
3284
  };
3944
3285
  };
3945
3286
  const deserializeAws_restJson1ReplicationConfigurationTemplates = (output, context) => {
3946
- return (output || [])
3287
+ const retVal = (output || [])
3947
3288
  .filter((e) => e != null)
3948
3289
  .map((entry) => {
3949
3290
  if (entry === null) {
@@ -3951,9 +3292,10 @@ const deserializeAws_restJson1ReplicationConfigurationTemplates = (output, conte
3951
3292
  }
3952
3293
  return deserializeAws_restJson1ReplicationConfigurationTemplate(entry, context);
3953
3294
  });
3295
+ return retVal;
3954
3296
  };
3955
3297
  const deserializeAws_restJson1ReplicationServersSecurityGroupsIDs = (output, context) => {
3956
- return (output || [])
3298
+ const retVal = (output || [])
3957
3299
  .filter((e) => e != null)
3958
3300
  .map((entry) => {
3959
3301
  if (entry === null) {
@@ -3961,6 +3303,7 @@ const deserializeAws_restJson1ReplicationServersSecurityGroupsIDs = (output, con
3961
3303
  }
3962
3304
  return smithy_client_1.expectString(entry);
3963
3305
  });
3306
+ return retVal;
3964
3307
  };
3965
3308
  const deserializeAws_restJson1SourceProperties = (output, context) => {
3966
3309
  return {
@@ -4007,7 +3350,7 @@ const deserializeAws_restJson1SourceServer = (output, context) => {
4007
3350
  };
4008
3351
  };
4009
3352
  const deserializeAws_restJson1SourceServersList = (output, context) => {
4010
- return (output || [])
3353
+ const retVal = (output || [])
4011
3354
  .filter((e) => e != null)
4012
3355
  .map((entry) => {
4013
3356
  if (entry === null) {
@@ -4015,6 +3358,7 @@ const deserializeAws_restJson1SourceServersList = (output, context) => {
4015
3358
  }
4016
3359
  return deserializeAws_restJson1SourceServer(entry, context);
4017
3360
  });
3361
+ return retVal;
4018
3362
  };
4019
3363
  const deserializeAws_restJson1TagsMap = (output, context) => {
4020
3364
  return Object.entries(output).reduce((acc, [key, value]) => {
@@ -4034,7 +3378,7 @@ const deserializeAws_restJson1ValidationExceptionField = (output, context) => {
4034
3378
  };
4035
3379
  };
4036
3380
  const deserializeAws_restJson1ValidationExceptionFieldList = (output, context) => {
4037
- return (output || [])
3381
+ const retVal = (output || [])
4038
3382
  .filter((e) => e != null)
4039
3383
  .map((entry) => {
4040
3384
  if (entry === null) {
@@ -4042,6 +3386,7 @@ const deserializeAws_restJson1ValidationExceptionFieldList = (output, context) =
4042
3386
  }
4043
3387
  return deserializeAws_restJson1ValidationExceptionField(entry, context);
4044
3388
  });
3389
+ return retVal;
4045
3390
  };
4046
3391
  const deserializeAws_restJson1VcenterClient = (output, context) => {
4047
3392
  return {
@@ -4060,7 +3405,7 @@ const deserializeAws_restJson1VcenterClient = (output, context) => {
4060
3405
  };
4061
3406
  };
4062
3407
  const deserializeAws_restJson1VcenterClientList = (output, context) => {
4063
- return (output || [])
3408
+ const retVal = (output || [])
4064
3409
  .filter((e) => e != null)
4065
3410
  .map((entry) => {
4066
3411
  if (entry === null) {
@@ -4068,6 +3413,7 @@ const deserializeAws_restJson1VcenterClientList = (output, context) => {
4068
3413
  }
4069
3414
  return deserializeAws_restJson1VcenterClient(entry, context);
4070
3415
  });
3416
+ return retVal;
4071
3417
  };
4072
3418
  const deserializeMetadata = (output) => {
4073
3419
  var _a;