@aws-sdk/client-wellarchitected 3.503.1 → 3.507.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1039,7 +1039,7 @@ export const se_UpgradeReviewTemplateLensReviewCommand = async (input, context)
1039
1039
  };
1040
1040
  export const de_AssociateLensesCommand = async (output, context) => {
1041
1041
  if (output.statusCode !== 200 && output.statusCode >= 300) {
1042
- return de_AssociateLensesCommandError(output, context);
1042
+ return de_CommandError(output, context);
1043
1043
  }
1044
1044
  const contents = map({
1045
1045
  $metadata: deserializeMetadata(output),
@@ -1047,43 +1047,9 @@ export const de_AssociateLensesCommand = async (output, context) => {
1047
1047
  await collectBody(output.body, context);
1048
1048
  return contents;
1049
1049
  };
1050
- const de_AssociateLensesCommandError = async (output, context) => {
1051
- const parsedOutput = {
1052
- ...output,
1053
- body: await parseErrorBody(output.body, context),
1054
- };
1055
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1056
- switch (errorCode) {
1057
- case "AccessDeniedException":
1058
- case "com.amazonaws.wellarchitected#AccessDeniedException":
1059
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
1060
- case "ConflictException":
1061
- case "com.amazonaws.wellarchitected#ConflictException":
1062
- throw await de_ConflictExceptionRes(parsedOutput, context);
1063
- case "InternalServerException":
1064
- case "com.amazonaws.wellarchitected#InternalServerException":
1065
- throw await de_InternalServerExceptionRes(parsedOutput, context);
1066
- case "ResourceNotFoundException":
1067
- case "com.amazonaws.wellarchitected#ResourceNotFoundException":
1068
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
1069
- case "ThrottlingException":
1070
- case "com.amazonaws.wellarchitected#ThrottlingException":
1071
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
1072
- case "ValidationException":
1073
- case "com.amazonaws.wellarchitected#ValidationException":
1074
- throw await de_ValidationExceptionRes(parsedOutput, context);
1075
- default:
1076
- const parsedBody = parsedOutput.body;
1077
- return throwDefaultError({
1078
- output,
1079
- parsedBody,
1080
- errorCode,
1081
- });
1082
- }
1083
- };
1084
1050
  export const de_AssociateProfilesCommand = async (output, context) => {
1085
1051
  if (output.statusCode !== 200 && output.statusCode >= 300) {
1086
- return de_AssociateProfilesCommandError(output, context);
1052
+ return de_CommandError(output, context);
1087
1053
  }
1088
1054
  const contents = map({
1089
1055
  $metadata: deserializeMetadata(output),
@@ -1091,43 +1057,9 @@ export const de_AssociateProfilesCommand = async (output, context) => {
1091
1057
  await collectBody(output.body, context);
1092
1058
  return contents;
1093
1059
  };
1094
- const de_AssociateProfilesCommandError = async (output, context) => {
1095
- const parsedOutput = {
1096
- ...output,
1097
- body: await parseErrorBody(output.body, context),
1098
- };
1099
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1100
- switch (errorCode) {
1101
- case "AccessDeniedException":
1102
- case "com.amazonaws.wellarchitected#AccessDeniedException":
1103
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
1104
- case "ConflictException":
1105
- case "com.amazonaws.wellarchitected#ConflictException":
1106
- throw await de_ConflictExceptionRes(parsedOutput, context);
1107
- case "InternalServerException":
1108
- case "com.amazonaws.wellarchitected#InternalServerException":
1109
- throw await de_InternalServerExceptionRes(parsedOutput, context);
1110
- case "ResourceNotFoundException":
1111
- case "com.amazonaws.wellarchitected#ResourceNotFoundException":
1112
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
1113
- case "ThrottlingException":
1114
- case "com.amazonaws.wellarchitected#ThrottlingException":
1115
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
1116
- case "ValidationException":
1117
- case "com.amazonaws.wellarchitected#ValidationException":
1118
- throw await de_ValidationExceptionRes(parsedOutput, context);
1119
- default:
1120
- const parsedBody = parsedOutput.body;
1121
- return throwDefaultError({
1122
- output,
1123
- parsedBody,
1124
- errorCode,
1125
- });
1126
- }
1127
- };
1128
1060
  export const de_CreateLensShareCommand = async (output, context) => {
1129
1061
  if (output.statusCode !== 200 && output.statusCode >= 300) {
1130
- return de_CreateLensShareCommandError(output, context);
1062
+ return de_CommandError(output, context);
1131
1063
  }
1132
1064
  const contents = map({
1133
1065
  $metadata: deserializeMetadata(output),
@@ -1139,46 +1071,9 @@ export const de_CreateLensShareCommand = async (output, context) => {
1139
1071
  Object.assign(contents, doc);
1140
1072
  return contents;
1141
1073
  };
1142
- const de_CreateLensShareCommandError = async (output, context) => {
1143
- const parsedOutput = {
1144
- ...output,
1145
- body: await parseErrorBody(output.body, context),
1146
- };
1147
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1148
- switch (errorCode) {
1149
- case "AccessDeniedException":
1150
- case "com.amazonaws.wellarchitected#AccessDeniedException":
1151
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
1152
- case "ConflictException":
1153
- case "com.amazonaws.wellarchitected#ConflictException":
1154
- throw await de_ConflictExceptionRes(parsedOutput, context);
1155
- case "InternalServerException":
1156
- case "com.amazonaws.wellarchitected#InternalServerException":
1157
- throw await de_InternalServerExceptionRes(parsedOutput, context);
1158
- case "ResourceNotFoundException":
1159
- case "com.amazonaws.wellarchitected#ResourceNotFoundException":
1160
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
1161
- case "ServiceQuotaExceededException":
1162
- case "com.amazonaws.wellarchitected#ServiceQuotaExceededException":
1163
- throw await de_ServiceQuotaExceededExceptionRes(parsedOutput, context);
1164
- case "ThrottlingException":
1165
- case "com.amazonaws.wellarchitected#ThrottlingException":
1166
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
1167
- case "ValidationException":
1168
- case "com.amazonaws.wellarchitected#ValidationException":
1169
- throw await de_ValidationExceptionRes(parsedOutput, context);
1170
- default:
1171
- const parsedBody = parsedOutput.body;
1172
- return throwDefaultError({
1173
- output,
1174
- parsedBody,
1175
- errorCode,
1176
- });
1177
- }
1178
- };
1179
1074
  export const de_CreateLensVersionCommand = async (output, context) => {
1180
1075
  if (output.statusCode !== 200 && output.statusCode >= 300) {
1181
- return de_CreateLensVersionCommandError(output, context);
1076
+ return de_CommandError(output, context);
1182
1077
  }
1183
1078
  const contents = map({
1184
1079
  $metadata: deserializeMetadata(output),
@@ -1191,46 +1086,9 @@ export const de_CreateLensVersionCommand = async (output, context) => {
1191
1086
  Object.assign(contents, doc);
1192
1087
  return contents;
1193
1088
  };
1194
- const de_CreateLensVersionCommandError = async (output, context) => {
1195
- const parsedOutput = {
1196
- ...output,
1197
- body: await parseErrorBody(output.body, context),
1198
- };
1199
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1200
- switch (errorCode) {
1201
- case "AccessDeniedException":
1202
- case "com.amazonaws.wellarchitected#AccessDeniedException":
1203
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
1204
- case "ConflictException":
1205
- case "com.amazonaws.wellarchitected#ConflictException":
1206
- throw await de_ConflictExceptionRes(parsedOutput, context);
1207
- case "InternalServerException":
1208
- case "com.amazonaws.wellarchitected#InternalServerException":
1209
- throw await de_InternalServerExceptionRes(parsedOutput, context);
1210
- case "ResourceNotFoundException":
1211
- case "com.amazonaws.wellarchitected#ResourceNotFoundException":
1212
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
1213
- case "ServiceQuotaExceededException":
1214
- case "com.amazonaws.wellarchitected#ServiceQuotaExceededException":
1215
- throw await de_ServiceQuotaExceededExceptionRes(parsedOutput, context);
1216
- case "ThrottlingException":
1217
- case "com.amazonaws.wellarchitected#ThrottlingException":
1218
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
1219
- case "ValidationException":
1220
- case "com.amazonaws.wellarchitected#ValidationException":
1221
- throw await de_ValidationExceptionRes(parsedOutput, context);
1222
- default:
1223
- const parsedBody = parsedOutput.body;
1224
- return throwDefaultError({
1225
- output,
1226
- parsedBody,
1227
- errorCode,
1228
- });
1229
- }
1230
- };
1231
1089
  export const de_CreateMilestoneCommand = async (output, context) => {
1232
1090
  if (output.statusCode !== 200 && output.statusCode >= 300) {
1233
- return de_CreateMilestoneCommandError(output, context);
1091
+ return de_CommandError(output, context);
1234
1092
  }
1235
1093
  const contents = map({
1236
1094
  $metadata: deserializeMetadata(output),
@@ -1243,46 +1101,9 @@ export const de_CreateMilestoneCommand = async (output, context) => {
1243
1101
  Object.assign(contents, doc);
1244
1102
  return contents;
1245
1103
  };
1246
- const de_CreateMilestoneCommandError = async (output, context) => {
1247
- const parsedOutput = {
1248
- ...output,
1249
- body: await parseErrorBody(output.body, context),
1250
- };
1251
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1252
- switch (errorCode) {
1253
- case "AccessDeniedException":
1254
- case "com.amazonaws.wellarchitected#AccessDeniedException":
1255
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
1256
- case "ConflictException":
1257
- case "com.amazonaws.wellarchitected#ConflictException":
1258
- throw await de_ConflictExceptionRes(parsedOutput, context);
1259
- case "InternalServerException":
1260
- case "com.amazonaws.wellarchitected#InternalServerException":
1261
- throw await de_InternalServerExceptionRes(parsedOutput, context);
1262
- case "ResourceNotFoundException":
1263
- case "com.amazonaws.wellarchitected#ResourceNotFoundException":
1264
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
1265
- case "ServiceQuotaExceededException":
1266
- case "com.amazonaws.wellarchitected#ServiceQuotaExceededException":
1267
- throw await de_ServiceQuotaExceededExceptionRes(parsedOutput, context);
1268
- case "ThrottlingException":
1269
- case "com.amazonaws.wellarchitected#ThrottlingException":
1270
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
1271
- case "ValidationException":
1272
- case "com.amazonaws.wellarchitected#ValidationException":
1273
- throw await de_ValidationExceptionRes(parsedOutput, context);
1274
- default:
1275
- const parsedBody = parsedOutput.body;
1276
- return throwDefaultError({
1277
- output,
1278
- parsedBody,
1279
- errorCode,
1280
- });
1281
- }
1282
- };
1283
1104
  export const de_CreateProfileCommand = async (output, context) => {
1284
1105
  if (output.statusCode !== 200 && output.statusCode >= 300) {
1285
- return de_CreateProfileCommandError(output, context);
1106
+ return de_CommandError(output, context);
1286
1107
  }
1287
1108
  const contents = map({
1288
1109
  $metadata: deserializeMetadata(output),
@@ -1295,43 +1116,9 @@ export const de_CreateProfileCommand = async (output, context) => {
1295
1116
  Object.assign(contents, doc);
1296
1117
  return contents;
1297
1118
  };
1298
- const de_CreateProfileCommandError = async (output, context) => {
1299
- const parsedOutput = {
1300
- ...output,
1301
- body: await parseErrorBody(output.body, context),
1302
- };
1303
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1304
- switch (errorCode) {
1305
- case "AccessDeniedException":
1306
- case "com.amazonaws.wellarchitected#AccessDeniedException":
1307
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
1308
- case "ConflictException":
1309
- case "com.amazonaws.wellarchitected#ConflictException":
1310
- throw await de_ConflictExceptionRes(parsedOutput, context);
1311
- case "InternalServerException":
1312
- case "com.amazonaws.wellarchitected#InternalServerException":
1313
- throw await de_InternalServerExceptionRes(parsedOutput, context);
1314
- case "ServiceQuotaExceededException":
1315
- case "com.amazonaws.wellarchitected#ServiceQuotaExceededException":
1316
- throw await de_ServiceQuotaExceededExceptionRes(parsedOutput, context);
1317
- case "ThrottlingException":
1318
- case "com.amazonaws.wellarchitected#ThrottlingException":
1319
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
1320
- case "ValidationException":
1321
- case "com.amazonaws.wellarchitected#ValidationException":
1322
- throw await de_ValidationExceptionRes(parsedOutput, context);
1323
- default:
1324
- const parsedBody = parsedOutput.body;
1325
- return throwDefaultError({
1326
- output,
1327
- parsedBody,
1328
- errorCode,
1329
- });
1330
- }
1331
- };
1332
1119
  export const de_CreateProfileShareCommand = async (output, context) => {
1333
1120
  if (output.statusCode !== 200 && output.statusCode >= 300) {
1334
- return de_CreateProfileShareCommandError(output, context);
1121
+ return de_CommandError(output, context);
1335
1122
  }
1336
1123
  const contents = map({
1337
1124
  $metadata: deserializeMetadata(output),
@@ -1344,149 +1131,38 @@ export const de_CreateProfileShareCommand = async (output, context) => {
1344
1131
  Object.assign(contents, doc);
1345
1132
  return contents;
1346
1133
  };
1347
- const de_CreateProfileShareCommandError = async (output, context) => {
1348
- const parsedOutput = {
1349
- ...output,
1350
- body: await parseErrorBody(output.body, context),
1351
- };
1352
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1353
- switch (errorCode) {
1354
- case "AccessDeniedException":
1355
- case "com.amazonaws.wellarchitected#AccessDeniedException":
1356
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
1357
- case "ConflictException":
1358
- case "com.amazonaws.wellarchitected#ConflictException":
1359
- throw await de_ConflictExceptionRes(parsedOutput, context);
1360
- case "InternalServerException":
1361
- case "com.amazonaws.wellarchitected#InternalServerException":
1362
- throw await de_InternalServerExceptionRes(parsedOutput, context);
1363
- case "ResourceNotFoundException":
1364
- case "com.amazonaws.wellarchitected#ResourceNotFoundException":
1365
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
1366
- case "ServiceQuotaExceededException":
1367
- case "com.amazonaws.wellarchitected#ServiceQuotaExceededException":
1368
- throw await de_ServiceQuotaExceededExceptionRes(parsedOutput, context);
1369
- case "ThrottlingException":
1370
- case "com.amazonaws.wellarchitected#ThrottlingException":
1371
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
1372
- case "ValidationException":
1373
- case "com.amazonaws.wellarchitected#ValidationException":
1374
- throw await de_ValidationExceptionRes(parsedOutput, context);
1375
- default:
1376
- const parsedBody = parsedOutput.body;
1377
- return throwDefaultError({
1378
- output,
1379
- parsedBody,
1380
- errorCode,
1381
- });
1134
+ export const de_CreateReviewTemplateCommand = async (output, context) => {
1135
+ if (output.statusCode !== 200 && output.statusCode >= 300) {
1136
+ return de_CommandError(output, context);
1382
1137
  }
1138
+ const contents = map({
1139
+ $metadata: deserializeMetadata(output),
1140
+ });
1141
+ const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
1142
+ const doc = take(data, {
1143
+ TemplateArn: __expectString,
1144
+ });
1145
+ Object.assign(contents, doc);
1146
+ return contents;
1383
1147
  };
1384
- export const de_CreateReviewTemplateCommand = async (output, context) => {
1148
+ export const de_CreateTemplateShareCommand = async (output, context) => {
1385
1149
  if (output.statusCode !== 200 && output.statusCode >= 300) {
1386
- return de_CreateReviewTemplateCommandError(output, context);
1150
+ return de_CommandError(output, context);
1387
1151
  }
1388
1152
  const contents = map({
1389
1153
  $metadata: deserializeMetadata(output),
1390
1154
  });
1391
1155
  const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
1392
1156
  const doc = take(data, {
1157
+ ShareId: __expectString,
1393
1158
  TemplateArn: __expectString,
1394
1159
  });
1395
1160
  Object.assign(contents, doc);
1396
1161
  return contents;
1397
1162
  };
1398
- const de_CreateReviewTemplateCommandError = async (output, context) => {
1399
- const parsedOutput = {
1400
- ...output,
1401
- body: await parseErrorBody(output.body, context),
1402
- };
1403
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1404
- switch (errorCode) {
1405
- case "AccessDeniedException":
1406
- case "com.amazonaws.wellarchitected#AccessDeniedException":
1407
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
1408
- case "ConflictException":
1409
- case "com.amazonaws.wellarchitected#ConflictException":
1410
- throw await de_ConflictExceptionRes(parsedOutput, context);
1411
- case "InternalServerException":
1412
- case "com.amazonaws.wellarchitected#InternalServerException":
1413
- throw await de_InternalServerExceptionRes(parsedOutput, context);
1414
- case "ResourceNotFoundException":
1415
- case "com.amazonaws.wellarchitected#ResourceNotFoundException":
1416
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
1417
- case "ServiceQuotaExceededException":
1418
- case "com.amazonaws.wellarchitected#ServiceQuotaExceededException":
1419
- throw await de_ServiceQuotaExceededExceptionRes(parsedOutput, context);
1420
- case "ThrottlingException":
1421
- case "com.amazonaws.wellarchitected#ThrottlingException":
1422
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
1423
- case "ValidationException":
1424
- case "com.amazonaws.wellarchitected#ValidationException":
1425
- throw await de_ValidationExceptionRes(parsedOutput, context);
1426
- default:
1427
- const parsedBody = parsedOutput.body;
1428
- return throwDefaultError({
1429
- output,
1430
- parsedBody,
1431
- errorCode,
1432
- });
1433
- }
1434
- };
1435
- export const de_CreateTemplateShareCommand = async (output, context) => {
1436
- if (output.statusCode !== 200 && output.statusCode >= 300) {
1437
- return de_CreateTemplateShareCommandError(output, context);
1438
- }
1439
- const contents = map({
1440
- $metadata: deserializeMetadata(output),
1441
- });
1442
- const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
1443
- const doc = take(data, {
1444
- ShareId: __expectString,
1445
- TemplateArn: __expectString,
1446
- });
1447
- Object.assign(contents, doc);
1448
- return contents;
1449
- };
1450
- const de_CreateTemplateShareCommandError = async (output, context) => {
1451
- const parsedOutput = {
1452
- ...output,
1453
- body: await parseErrorBody(output.body, context),
1454
- };
1455
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1456
- switch (errorCode) {
1457
- case "AccessDeniedException":
1458
- case "com.amazonaws.wellarchitected#AccessDeniedException":
1459
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
1460
- case "ConflictException":
1461
- case "com.amazonaws.wellarchitected#ConflictException":
1462
- throw await de_ConflictExceptionRes(parsedOutput, context);
1463
- case "InternalServerException":
1464
- case "com.amazonaws.wellarchitected#InternalServerException":
1465
- throw await de_InternalServerExceptionRes(parsedOutput, context);
1466
- case "ResourceNotFoundException":
1467
- case "com.amazonaws.wellarchitected#ResourceNotFoundException":
1468
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
1469
- case "ServiceQuotaExceededException":
1470
- case "com.amazonaws.wellarchitected#ServiceQuotaExceededException":
1471
- throw await de_ServiceQuotaExceededExceptionRes(parsedOutput, context);
1472
- case "ThrottlingException":
1473
- case "com.amazonaws.wellarchitected#ThrottlingException":
1474
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
1475
- case "ValidationException":
1476
- case "com.amazonaws.wellarchitected#ValidationException":
1477
- throw await de_ValidationExceptionRes(parsedOutput, context);
1478
- default:
1479
- const parsedBody = parsedOutput.body;
1480
- return throwDefaultError({
1481
- output,
1482
- parsedBody,
1483
- errorCode,
1484
- });
1485
- }
1486
- };
1487
1163
  export const de_CreateWorkloadCommand = async (output, context) => {
1488
1164
  if (output.statusCode !== 200 && output.statusCode >= 300) {
1489
- return de_CreateWorkloadCommandError(output, context);
1165
+ return de_CommandError(output, context);
1490
1166
  }
1491
1167
  const contents = map({
1492
1168
  $metadata: deserializeMetadata(output),
@@ -1499,46 +1175,9 @@ export const de_CreateWorkloadCommand = async (output, context) => {
1499
1175
  Object.assign(contents, doc);
1500
1176
  return contents;
1501
1177
  };
1502
- const de_CreateWorkloadCommandError = async (output, context) => {
1503
- const parsedOutput = {
1504
- ...output,
1505
- body: await parseErrorBody(output.body, context),
1506
- };
1507
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1508
- switch (errorCode) {
1509
- case "AccessDeniedException":
1510
- case "com.amazonaws.wellarchitected#AccessDeniedException":
1511
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
1512
- case "ConflictException":
1513
- case "com.amazonaws.wellarchitected#ConflictException":
1514
- throw await de_ConflictExceptionRes(parsedOutput, context);
1515
- case "InternalServerException":
1516
- case "com.amazonaws.wellarchitected#InternalServerException":
1517
- throw await de_InternalServerExceptionRes(parsedOutput, context);
1518
- case "ResourceNotFoundException":
1519
- case "com.amazonaws.wellarchitected#ResourceNotFoundException":
1520
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
1521
- case "ServiceQuotaExceededException":
1522
- case "com.amazonaws.wellarchitected#ServiceQuotaExceededException":
1523
- throw await de_ServiceQuotaExceededExceptionRes(parsedOutput, context);
1524
- case "ThrottlingException":
1525
- case "com.amazonaws.wellarchitected#ThrottlingException":
1526
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
1527
- case "ValidationException":
1528
- case "com.amazonaws.wellarchitected#ValidationException":
1529
- throw await de_ValidationExceptionRes(parsedOutput, context);
1530
- default:
1531
- const parsedBody = parsedOutput.body;
1532
- return throwDefaultError({
1533
- output,
1534
- parsedBody,
1535
- errorCode,
1536
- });
1537
- }
1538
- };
1539
1178
  export const de_CreateWorkloadShareCommand = async (output, context) => {
1540
1179
  if (output.statusCode !== 200 && output.statusCode >= 300) {
1541
- return de_CreateWorkloadShareCommandError(output, context);
1180
+ return de_CommandError(output, context);
1542
1181
  }
1543
1182
  const contents = map({
1544
1183
  $metadata: deserializeMetadata(output),
@@ -1551,46 +1190,9 @@ export const de_CreateWorkloadShareCommand = async (output, context) => {
1551
1190
  Object.assign(contents, doc);
1552
1191
  return contents;
1553
1192
  };
1554
- const de_CreateWorkloadShareCommandError = async (output, context) => {
1555
- const parsedOutput = {
1556
- ...output,
1557
- body: await parseErrorBody(output.body, context),
1558
- };
1559
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1560
- switch (errorCode) {
1561
- case "AccessDeniedException":
1562
- case "com.amazonaws.wellarchitected#AccessDeniedException":
1563
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
1564
- case "ConflictException":
1565
- case "com.amazonaws.wellarchitected#ConflictException":
1566
- throw await de_ConflictExceptionRes(parsedOutput, context);
1567
- case "InternalServerException":
1568
- case "com.amazonaws.wellarchitected#InternalServerException":
1569
- throw await de_InternalServerExceptionRes(parsedOutput, context);
1570
- case "ResourceNotFoundException":
1571
- case "com.amazonaws.wellarchitected#ResourceNotFoundException":
1572
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
1573
- case "ServiceQuotaExceededException":
1574
- case "com.amazonaws.wellarchitected#ServiceQuotaExceededException":
1575
- throw await de_ServiceQuotaExceededExceptionRes(parsedOutput, context);
1576
- case "ThrottlingException":
1577
- case "com.amazonaws.wellarchitected#ThrottlingException":
1578
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
1579
- case "ValidationException":
1580
- case "com.amazonaws.wellarchitected#ValidationException":
1581
- throw await de_ValidationExceptionRes(parsedOutput, context);
1582
- default:
1583
- const parsedBody = parsedOutput.body;
1584
- return throwDefaultError({
1585
- output,
1586
- parsedBody,
1587
- errorCode,
1588
- });
1589
- }
1590
- };
1591
1193
  export const de_DeleteLensCommand = async (output, context) => {
1592
1194
  if (output.statusCode !== 200 && output.statusCode >= 300) {
1593
- return de_DeleteLensCommandError(output, context);
1195
+ return de_CommandError(output, context);
1594
1196
  }
1595
1197
  const contents = map({
1596
1198
  $metadata: deserializeMetadata(output),
@@ -1598,43 +1200,9 @@ export const de_DeleteLensCommand = async (output, context) => {
1598
1200
  await collectBody(output.body, context);
1599
1201
  return contents;
1600
1202
  };
1601
- const de_DeleteLensCommandError = async (output, context) => {
1602
- const parsedOutput = {
1603
- ...output,
1604
- body: await parseErrorBody(output.body, context),
1605
- };
1606
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1607
- switch (errorCode) {
1608
- case "AccessDeniedException":
1609
- case "com.amazonaws.wellarchitected#AccessDeniedException":
1610
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
1611
- case "ConflictException":
1612
- case "com.amazonaws.wellarchitected#ConflictException":
1613
- throw await de_ConflictExceptionRes(parsedOutput, context);
1614
- case "InternalServerException":
1615
- case "com.amazonaws.wellarchitected#InternalServerException":
1616
- throw await de_InternalServerExceptionRes(parsedOutput, context);
1617
- case "ResourceNotFoundException":
1618
- case "com.amazonaws.wellarchitected#ResourceNotFoundException":
1619
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
1620
- case "ThrottlingException":
1621
- case "com.amazonaws.wellarchitected#ThrottlingException":
1622
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
1623
- case "ValidationException":
1624
- case "com.amazonaws.wellarchitected#ValidationException":
1625
- throw await de_ValidationExceptionRes(parsedOutput, context);
1626
- default:
1627
- const parsedBody = parsedOutput.body;
1628
- return throwDefaultError({
1629
- output,
1630
- parsedBody,
1631
- errorCode,
1632
- });
1633
- }
1634
- };
1635
1203
  export const de_DeleteLensShareCommand = async (output, context) => {
1636
1204
  if (output.statusCode !== 200 && output.statusCode >= 300) {
1637
- return de_DeleteLensShareCommandError(output, context);
1205
+ return de_CommandError(output, context);
1638
1206
  }
1639
1207
  const contents = map({
1640
1208
  $metadata: deserializeMetadata(output),
@@ -1642,43 +1210,9 @@ export const de_DeleteLensShareCommand = async (output, context) => {
1642
1210
  await collectBody(output.body, context);
1643
1211
  return contents;
1644
1212
  };
1645
- const de_DeleteLensShareCommandError = async (output, context) => {
1646
- const parsedOutput = {
1647
- ...output,
1648
- body: await parseErrorBody(output.body, context),
1649
- };
1650
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1651
- switch (errorCode) {
1652
- case "AccessDeniedException":
1653
- case "com.amazonaws.wellarchitected#AccessDeniedException":
1654
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
1655
- case "ConflictException":
1656
- case "com.amazonaws.wellarchitected#ConflictException":
1657
- throw await de_ConflictExceptionRes(parsedOutput, context);
1658
- case "InternalServerException":
1659
- case "com.amazonaws.wellarchitected#InternalServerException":
1660
- throw await de_InternalServerExceptionRes(parsedOutput, context);
1661
- case "ResourceNotFoundException":
1662
- case "com.amazonaws.wellarchitected#ResourceNotFoundException":
1663
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
1664
- case "ThrottlingException":
1665
- case "com.amazonaws.wellarchitected#ThrottlingException":
1666
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
1667
- case "ValidationException":
1668
- case "com.amazonaws.wellarchitected#ValidationException":
1669
- throw await de_ValidationExceptionRes(parsedOutput, context);
1670
- default:
1671
- const parsedBody = parsedOutput.body;
1672
- return throwDefaultError({
1673
- output,
1674
- parsedBody,
1675
- errorCode,
1676
- });
1677
- }
1678
- };
1679
1213
  export const de_DeleteProfileCommand = async (output, context) => {
1680
1214
  if (output.statusCode !== 200 && output.statusCode >= 300) {
1681
- return de_DeleteProfileCommandError(output, context);
1215
+ return de_CommandError(output, context);
1682
1216
  }
1683
1217
  const contents = map({
1684
1218
  $metadata: deserializeMetadata(output),
@@ -1686,43 +1220,9 @@ export const de_DeleteProfileCommand = async (output, context) => {
1686
1220
  await collectBody(output.body, context);
1687
1221
  return contents;
1688
1222
  };
1689
- const de_DeleteProfileCommandError = async (output, context) => {
1690
- const parsedOutput = {
1691
- ...output,
1692
- body: await parseErrorBody(output.body, context),
1693
- };
1694
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1695
- switch (errorCode) {
1696
- case "AccessDeniedException":
1697
- case "com.amazonaws.wellarchitected#AccessDeniedException":
1698
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
1699
- case "ConflictException":
1700
- case "com.amazonaws.wellarchitected#ConflictException":
1701
- throw await de_ConflictExceptionRes(parsedOutput, context);
1702
- case "InternalServerException":
1703
- case "com.amazonaws.wellarchitected#InternalServerException":
1704
- throw await de_InternalServerExceptionRes(parsedOutput, context);
1705
- case "ResourceNotFoundException":
1706
- case "com.amazonaws.wellarchitected#ResourceNotFoundException":
1707
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
1708
- case "ThrottlingException":
1709
- case "com.amazonaws.wellarchitected#ThrottlingException":
1710
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
1711
- case "ValidationException":
1712
- case "com.amazonaws.wellarchitected#ValidationException":
1713
- throw await de_ValidationExceptionRes(parsedOutput, context);
1714
- default:
1715
- const parsedBody = parsedOutput.body;
1716
- return throwDefaultError({
1717
- output,
1718
- parsedBody,
1719
- errorCode,
1720
- });
1721
- }
1722
- };
1723
1223
  export const de_DeleteProfileShareCommand = async (output, context) => {
1724
1224
  if (output.statusCode !== 200 && output.statusCode >= 300) {
1725
- return de_DeleteProfileShareCommandError(output, context);
1225
+ return de_CommandError(output, context);
1726
1226
  }
1727
1227
  const contents = map({
1728
1228
  $metadata: deserializeMetadata(output),
@@ -1730,43 +1230,9 @@ export const de_DeleteProfileShareCommand = async (output, context) => {
1730
1230
  await collectBody(output.body, context);
1731
1231
  return contents;
1732
1232
  };
1733
- const de_DeleteProfileShareCommandError = async (output, context) => {
1734
- const parsedOutput = {
1735
- ...output,
1736
- body: await parseErrorBody(output.body, context),
1737
- };
1738
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1739
- switch (errorCode) {
1740
- case "AccessDeniedException":
1741
- case "com.amazonaws.wellarchitected#AccessDeniedException":
1742
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
1743
- case "ConflictException":
1744
- case "com.amazonaws.wellarchitected#ConflictException":
1745
- throw await de_ConflictExceptionRes(parsedOutput, context);
1746
- case "InternalServerException":
1747
- case "com.amazonaws.wellarchitected#InternalServerException":
1748
- throw await de_InternalServerExceptionRes(parsedOutput, context);
1749
- case "ResourceNotFoundException":
1750
- case "com.amazonaws.wellarchitected#ResourceNotFoundException":
1751
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
1752
- case "ThrottlingException":
1753
- case "com.amazonaws.wellarchitected#ThrottlingException":
1754
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
1755
- case "ValidationException":
1756
- case "com.amazonaws.wellarchitected#ValidationException":
1757
- throw await de_ValidationExceptionRes(parsedOutput, context);
1758
- default:
1759
- const parsedBody = parsedOutput.body;
1760
- return throwDefaultError({
1761
- output,
1762
- parsedBody,
1763
- errorCode,
1764
- });
1765
- }
1766
- };
1767
1233
  export const de_DeleteReviewTemplateCommand = async (output, context) => {
1768
1234
  if (output.statusCode !== 200 && output.statusCode >= 300) {
1769
- return de_DeleteReviewTemplateCommandError(output, context);
1235
+ return de_CommandError(output, context);
1770
1236
  }
1771
1237
  const contents = map({
1772
1238
  $metadata: deserializeMetadata(output),
@@ -1774,43 +1240,9 @@ export const de_DeleteReviewTemplateCommand = async (output, context) => {
1774
1240
  await collectBody(output.body, context);
1775
1241
  return contents;
1776
1242
  };
1777
- const de_DeleteReviewTemplateCommandError = async (output, context) => {
1778
- const parsedOutput = {
1779
- ...output,
1780
- body: await parseErrorBody(output.body, context),
1781
- };
1782
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1783
- switch (errorCode) {
1784
- case "AccessDeniedException":
1785
- case "com.amazonaws.wellarchitected#AccessDeniedException":
1786
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
1787
- case "ConflictException":
1788
- case "com.amazonaws.wellarchitected#ConflictException":
1789
- throw await de_ConflictExceptionRes(parsedOutput, context);
1790
- case "InternalServerException":
1791
- case "com.amazonaws.wellarchitected#InternalServerException":
1792
- throw await de_InternalServerExceptionRes(parsedOutput, context);
1793
- case "ResourceNotFoundException":
1794
- case "com.amazonaws.wellarchitected#ResourceNotFoundException":
1795
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
1796
- case "ThrottlingException":
1797
- case "com.amazonaws.wellarchitected#ThrottlingException":
1798
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
1799
- case "ValidationException":
1800
- case "com.amazonaws.wellarchitected#ValidationException":
1801
- throw await de_ValidationExceptionRes(parsedOutput, context);
1802
- default:
1803
- const parsedBody = parsedOutput.body;
1804
- return throwDefaultError({
1805
- output,
1806
- parsedBody,
1807
- errorCode,
1808
- });
1809
- }
1810
- };
1811
1243
  export const de_DeleteTemplateShareCommand = async (output, context) => {
1812
1244
  if (output.statusCode !== 200 && output.statusCode >= 300) {
1813
- return de_DeleteTemplateShareCommandError(output, context);
1245
+ return de_CommandError(output, context);
1814
1246
  }
1815
1247
  const contents = map({
1816
1248
  $metadata: deserializeMetadata(output),
@@ -1818,43 +1250,9 @@ export const de_DeleteTemplateShareCommand = async (output, context) => {
1818
1250
  await collectBody(output.body, context);
1819
1251
  return contents;
1820
1252
  };
1821
- const de_DeleteTemplateShareCommandError = async (output, context) => {
1822
- const parsedOutput = {
1823
- ...output,
1824
- body: await parseErrorBody(output.body, context),
1825
- };
1826
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1827
- switch (errorCode) {
1828
- case "AccessDeniedException":
1829
- case "com.amazonaws.wellarchitected#AccessDeniedException":
1830
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
1831
- case "ConflictException":
1832
- case "com.amazonaws.wellarchitected#ConflictException":
1833
- throw await de_ConflictExceptionRes(parsedOutput, context);
1834
- case "InternalServerException":
1835
- case "com.amazonaws.wellarchitected#InternalServerException":
1836
- throw await de_InternalServerExceptionRes(parsedOutput, context);
1837
- case "ResourceNotFoundException":
1838
- case "com.amazonaws.wellarchitected#ResourceNotFoundException":
1839
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
1840
- case "ThrottlingException":
1841
- case "com.amazonaws.wellarchitected#ThrottlingException":
1842
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
1843
- case "ValidationException":
1844
- case "com.amazonaws.wellarchitected#ValidationException":
1845
- throw await de_ValidationExceptionRes(parsedOutput, context);
1846
- default:
1847
- const parsedBody = parsedOutput.body;
1848
- return throwDefaultError({
1849
- output,
1850
- parsedBody,
1851
- errorCode,
1852
- });
1853
- }
1854
- };
1855
1253
  export const de_DeleteWorkloadCommand = async (output, context) => {
1856
1254
  if (output.statusCode !== 200 && output.statusCode >= 300) {
1857
- return de_DeleteWorkloadCommandError(output, context);
1255
+ return de_CommandError(output, context);
1858
1256
  }
1859
1257
  const contents = map({
1860
1258
  $metadata: deserializeMetadata(output),
@@ -1862,43 +1260,9 @@ export const de_DeleteWorkloadCommand = async (output, context) => {
1862
1260
  await collectBody(output.body, context);
1863
1261
  return contents;
1864
1262
  };
1865
- const de_DeleteWorkloadCommandError = async (output, context) => {
1866
- const parsedOutput = {
1867
- ...output,
1868
- body: await parseErrorBody(output.body, context),
1869
- };
1870
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1871
- switch (errorCode) {
1872
- case "AccessDeniedException":
1873
- case "com.amazonaws.wellarchitected#AccessDeniedException":
1874
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
1875
- case "ConflictException":
1876
- case "com.amazonaws.wellarchitected#ConflictException":
1877
- throw await de_ConflictExceptionRes(parsedOutput, context);
1878
- case "InternalServerException":
1879
- case "com.amazonaws.wellarchitected#InternalServerException":
1880
- throw await de_InternalServerExceptionRes(parsedOutput, context);
1881
- case "ResourceNotFoundException":
1882
- case "com.amazonaws.wellarchitected#ResourceNotFoundException":
1883
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
1884
- case "ThrottlingException":
1885
- case "com.amazonaws.wellarchitected#ThrottlingException":
1886
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
1887
- case "ValidationException":
1888
- case "com.amazonaws.wellarchitected#ValidationException":
1889
- throw await de_ValidationExceptionRes(parsedOutput, context);
1890
- default:
1891
- const parsedBody = parsedOutput.body;
1892
- return throwDefaultError({
1893
- output,
1894
- parsedBody,
1895
- errorCode,
1896
- });
1897
- }
1898
- };
1899
1263
  export const de_DeleteWorkloadShareCommand = async (output, context) => {
1900
1264
  if (output.statusCode !== 200 && output.statusCode >= 300) {
1901
- return de_DeleteWorkloadShareCommandError(output, context);
1265
+ return de_CommandError(output, context);
1902
1266
  }
1903
1267
  const contents = map({
1904
1268
  $metadata: deserializeMetadata(output),
@@ -1906,43 +1270,9 @@ export const de_DeleteWorkloadShareCommand = async (output, context) => {
1906
1270
  await collectBody(output.body, context);
1907
1271
  return contents;
1908
1272
  };
1909
- const de_DeleteWorkloadShareCommandError = async (output, context) => {
1910
- const parsedOutput = {
1911
- ...output,
1912
- body: await parseErrorBody(output.body, context),
1913
- };
1914
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1915
- switch (errorCode) {
1916
- case "AccessDeniedException":
1917
- case "com.amazonaws.wellarchitected#AccessDeniedException":
1918
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
1919
- case "ConflictException":
1920
- case "com.amazonaws.wellarchitected#ConflictException":
1921
- throw await de_ConflictExceptionRes(parsedOutput, context);
1922
- case "InternalServerException":
1923
- case "com.amazonaws.wellarchitected#InternalServerException":
1924
- throw await de_InternalServerExceptionRes(parsedOutput, context);
1925
- case "ResourceNotFoundException":
1926
- case "com.amazonaws.wellarchitected#ResourceNotFoundException":
1927
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
1928
- case "ThrottlingException":
1929
- case "com.amazonaws.wellarchitected#ThrottlingException":
1930
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
1931
- case "ValidationException":
1932
- case "com.amazonaws.wellarchitected#ValidationException":
1933
- throw await de_ValidationExceptionRes(parsedOutput, context);
1934
- default:
1935
- const parsedBody = parsedOutput.body;
1936
- return throwDefaultError({
1937
- output,
1938
- parsedBody,
1939
- errorCode,
1940
- });
1941
- }
1942
- };
1943
1273
  export const de_DisassociateLensesCommand = async (output, context) => {
1944
1274
  if (output.statusCode !== 200 && output.statusCode >= 300) {
1945
- return de_DisassociateLensesCommandError(output, context);
1275
+ return de_CommandError(output, context);
1946
1276
  }
1947
1277
  const contents = map({
1948
1278
  $metadata: deserializeMetadata(output),
@@ -1950,43 +1280,9 @@ export const de_DisassociateLensesCommand = async (output, context) => {
1950
1280
  await collectBody(output.body, context);
1951
1281
  return contents;
1952
1282
  };
1953
- const de_DisassociateLensesCommandError = async (output, context) => {
1954
- const parsedOutput = {
1955
- ...output,
1956
- body: await parseErrorBody(output.body, context),
1957
- };
1958
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1959
- switch (errorCode) {
1960
- case "AccessDeniedException":
1961
- case "com.amazonaws.wellarchitected#AccessDeniedException":
1962
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
1963
- case "ConflictException":
1964
- case "com.amazonaws.wellarchitected#ConflictException":
1965
- throw await de_ConflictExceptionRes(parsedOutput, context);
1966
- case "InternalServerException":
1967
- case "com.amazonaws.wellarchitected#InternalServerException":
1968
- throw await de_InternalServerExceptionRes(parsedOutput, context);
1969
- case "ResourceNotFoundException":
1970
- case "com.amazonaws.wellarchitected#ResourceNotFoundException":
1971
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
1972
- case "ThrottlingException":
1973
- case "com.amazonaws.wellarchitected#ThrottlingException":
1974
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
1975
- case "ValidationException":
1976
- case "com.amazonaws.wellarchitected#ValidationException":
1977
- throw await de_ValidationExceptionRes(parsedOutput, context);
1978
- default:
1979
- const parsedBody = parsedOutput.body;
1980
- return throwDefaultError({
1981
- output,
1982
- parsedBody,
1983
- errorCode,
1984
- });
1985
- }
1986
- };
1987
1283
  export const de_DisassociateProfilesCommand = async (output, context) => {
1988
1284
  if (output.statusCode !== 200 && output.statusCode >= 300) {
1989
- return de_DisassociateProfilesCommandError(output, context);
1285
+ return de_CommandError(output, context);
1990
1286
  }
1991
1287
  const contents = map({
1992
1288
  $metadata: deserializeMetadata(output),
@@ -1994,43 +1290,9 @@ export const de_DisassociateProfilesCommand = async (output, context) => {
1994
1290
  await collectBody(output.body, context);
1995
1291
  return contents;
1996
1292
  };
1997
- const de_DisassociateProfilesCommandError = async (output, context) => {
1998
- const parsedOutput = {
1999
- ...output,
2000
- body: await parseErrorBody(output.body, context),
2001
- };
2002
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2003
- switch (errorCode) {
2004
- case "AccessDeniedException":
2005
- case "com.amazonaws.wellarchitected#AccessDeniedException":
2006
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
2007
- case "ConflictException":
2008
- case "com.amazonaws.wellarchitected#ConflictException":
2009
- throw await de_ConflictExceptionRes(parsedOutput, context);
2010
- case "InternalServerException":
2011
- case "com.amazonaws.wellarchitected#InternalServerException":
2012
- throw await de_InternalServerExceptionRes(parsedOutput, context);
2013
- case "ResourceNotFoundException":
2014
- case "com.amazonaws.wellarchitected#ResourceNotFoundException":
2015
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
2016
- case "ThrottlingException":
2017
- case "com.amazonaws.wellarchitected#ThrottlingException":
2018
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
2019
- case "ValidationException":
2020
- case "com.amazonaws.wellarchitected#ValidationException":
2021
- throw await de_ValidationExceptionRes(parsedOutput, context);
2022
- default:
2023
- const parsedBody = parsedOutput.body;
2024
- return throwDefaultError({
2025
- output,
2026
- parsedBody,
2027
- errorCode,
2028
- });
2029
- }
2030
- };
2031
1293
  export const de_ExportLensCommand = async (output, context) => {
2032
1294
  if (output.statusCode !== 200 && output.statusCode >= 300) {
2033
- return de_ExportLensCommandError(output, context);
1295
+ return de_CommandError(output, context);
2034
1296
  }
2035
1297
  const contents = map({
2036
1298
  $metadata: deserializeMetadata(output),
@@ -2039,92 +1301,30 @@ export const de_ExportLensCommand = async (output, context) => {
2039
1301
  const doc = take(data, {
2040
1302
  LensJSON: __expectString,
2041
1303
  });
2042
- Object.assign(contents, doc);
2043
- return contents;
2044
- };
2045
- const de_ExportLensCommandError = async (output, context) => {
2046
- const parsedOutput = {
2047
- ...output,
2048
- body: await parseErrorBody(output.body, context),
2049
- };
2050
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2051
- switch (errorCode) {
2052
- case "AccessDeniedException":
2053
- case "com.amazonaws.wellarchitected#AccessDeniedException":
2054
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
2055
- case "InternalServerException":
2056
- case "com.amazonaws.wellarchitected#InternalServerException":
2057
- throw await de_InternalServerExceptionRes(parsedOutput, context);
2058
- case "ResourceNotFoundException":
2059
- case "com.amazonaws.wellarchitected#ResourceNotFoundException":
2060
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
2061
- case "ThrottlingException":
2062
- case "com.amazonaws.wellarchitected#ThrottlingException":
2063
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
2064
- case "ValidationException":
2065
- case "com.amazonaws.wellarchitected#ValidationException":
2066
- throw await de_ValidationExceptionRes(parsedOutput, context);
2067
- default:
2068
- const parsedBody = parsedOutput.body;
2069
- return throwDefaultError({
2070
- output,
2071
- parsedBody,
2072
- errorCode,
2073
- });
2074
- }
2075
- };
2076
- export const de_GetAnswerCommand = async (output, context) => {
2077
- if (output.statusCode !== 200 && output.statusCode >= 300) {
2078
- return de_GetAnswerCommandError(output, context);
2079
- }
2080
- const contents = map({
2081
- $metadata: deserializeMetadata(output),
2082
- });
2083
- const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
2084
- const doc = take(data, {
2085
- Answer: _json,
2086
- LensAlias: __expectString,
2087
- LensArn: __expectString,
2088
- MilestoneNumber: __expectInt32,
2089
- WorkloadId: __expectString,
2090
- });
2091
- Object.assign(contents, doc);
2092
- return contents;
2093
- };
2094
- const de_GetAnswerCommandError = async (output, context) => {
2095
- const parsedOutput = {
2096
- ...output,
2097
- body: await parseErrorBody(output.body, context),
2098
- };
2099
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2100
- switch (errorCode) {
2101
- case "AccessDeniedException":
2102
- case "com.amazonaws.wellarchitected#AccessDeniedException":
2103
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
2104
- case "InternalServerException":
2105
- case "com.amazonaws.wellarchitected#InternalServerException":
2106
- throw await de_InternalServerExceptionRes(parsedOutput, context);
2107
- case "ResourceNotFoundException":
2108
- case "com.amazonaws.wellarchitected#ResourceNotFoundException":
2109
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
2110
- case "ThrottlingException":
2111
- case "com.amazonaws.wellarchitected#ThrottlingException":
2112
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
2113
- case "ValidationException":
2114
- case "com.amazonaws.wellarchitected#ValidationException":
2115
- throw await de_ValidationExceptionRes(parsedOutput, context);
2116
- default:
2117
- const parsedBody = parsedOutput.body;
2118
- return throwDefaultError({
2119
- output,
2120
- parsedBody,
2121
- errorCode,
2122
- });
1304
+ Object.assign(contents, doc);
1305
+ return contents;
1306
+ };
1307
+ export const de_GetAnswerCommand = async (output, context) => {
1308
+ if (output.statusCode !== 200 && output.statusCode >= 300) {
1309
+ return de_CommandError(output, context);
2123
1310
  }
1311
+ const contents = map({
1312
+ $metadata: deserializeMetadata(output),
1313
+ });
1314
+ const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
1315
+ const doc = take(data, {
1316
+ Answer: _json,
1317
+ LensAlias: __expectString,
1318
+ LensArn: __expectString,
1319
+ MilestoneNumber: __expectInt32,
1320
+ WorkloadId: __expectString,
1321
+ });
1322
+ Object.assign(contents, doc);
1323
+ return contents;
2124
1324
  };
2125
1325
  export const de_GetConsolidatedReportCommand = async (output, context) => {
2126
1326
  if (output.statusCode !== 200 && output.statusCode >= 300) {
2127
- return de_GetConsolidatedReportCommandError(output, context);
1327
+ return de_CommandError(output, context);
2128
1328
  }
2129
1329
  const contents = map({
2130
1330
  $metadata: deserializeMetadata(output),
@@ -2138,40 +1338,9 @@ export const de_GetConsolidatedReportCommand = async (output, context) => {
2138
1338
  Object.assign(contents, doc);
2139
1339
  return contents;
2140
1340
  };
2141
- const de_GetConsolidatedReportCommandError = async (output, context) => {
2142
- const parsedOutput = {
2143
- ...output,
2144
- body: await parseErrorBody(output.body, context),
2145
- };
2146
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2147
- switch (errorCode) {
2148
- case "AccessDeniedException":
2149
- case "com.amazonaws.wellarchitected#AccessDeniedException":
2150
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
2151
- case "ConflictException":
2152
- case "com.amazonaws.wellarchitected#ConflictException":
2153
- throw await de_ConflictExceptionRes(parsedOutput, context);
2154
- case "InternalServerException":
2155
- case "com.amazonaws.wellarchitected#InternalServerException":
2156
- throw await de_InternalServerExceptionRes(parsedOutput, context);
2157
- case "ThrottlingException":
2158
- case "com.amazonaws.wellarchitected#ThrottlingException":
2159
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
2160
- case "ValidationException":
2161
- case "com.amazonaws.wellarchitected#ValidationException":
2162
- throw await de_ValidationExceptionRes(parsedOutput, context);
2163
- default:
2164
- const parsedBody = parsedOutput.body;
2165
- return throwDefaultError({
2166
- output,
2167
- parsedBody,
2168
- errorCode,
2169
- });
2170
- }
2171
- };
2172
1341
  export const de_GetLensCommand = async (output, context) => {
2173
1342
  if (output.statusCode !== 200 && output.statusCode >= 300) {
2174
- return de_GetLensCommandError(output, context);
1343
+ return de_CommandError(output, context);
2175
1344
  }
2176
1345
  const contents = map({
2177
1346
  $metadata: deserializeMetadata(output),
@@ -2183,40 +1352,9 @@ export const de_GetLensCommand = async (output, context) => {
2183
1352
  Object.assign(contents, doc);
2184
1353
  return contents;
2185
1354
  };
2186
- const de_GetLensCommandError = async (output, context) => {
2187
- const parsedOutput = {
2188
- ...output,
2189
- body: await parseErrorBody(output.body, context),
2190
- };
2191
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2192
- switch (errorCode) {
2193
- case "AccessDeniedException":
2194
- case "com.amazonaws.wellarchitected#AccessDeniedException":
2195
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
2196
- case "InternalServerException":
2197
- case "com.amazonaws.wellarchitected#InternalServerException":
2198
- throw await de_InternalServerExceptionRes(parsedOutput, context);
2199
- case "ResourceNotFoundException":
2200
- case "com.amazonaws.wellarchitected#ResourceNotFoundException":
2201
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
2202
- case "ThrottlingException":
2203
- case "com.amazonaws.wellarchitected#ThrottlingException":
2204
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
2205
- case "ValidationException":
2206
- case "com.amazonaws.wellarchitected#ValidationException":
2207
- throw await de_ValidationExceptionRes(parsedOutput, context);
2208
- default:
2209
- const parsedBody = parsedOutput.body;
2210
- return throwDefaultError({
2211
- output,
2212
- parsedBody,
2213
- errorCode,
2214
- });
2215
- }
2216
- };
2217
1355
  export const de_GetLensReviewCommand = async (output, context) => {
2218
1356
  if (output.statusCode !== 200 && output.statusCode >= 300) {
2219
- return de_GetLensReviewCommandError(output, context);
1357
+ return de_CommandError(output, context);
2220
1358
  }
2221
1359
  const contents = map({
2222
1360
  $metadata: deserializeMetadata(output),
@@ -2230,40 +1368,9 @@ export const de_GetLensReviewCommand = async (output, context) => {
2230
1368
  Object.assign(contents, doc);
2231
1369
  return contents;
2232
1370
  };
2233
- const de_GetLensReviewCommandError = async (output, context) => {
2234
- const parsedOutput = {
2235
- ...output,
2236
- body: await parseErrorBody(output.body, context),
2237
- };
2238
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2239
- switch (errorCode) {
2240
- case "AccessDeniedException":
2241
- case "com.amazonaws.wellarchitected#AccessDeniedException":
2242
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
2243
- case "InternalServerException":
2244
- case "com.amazonaws.wellarchitected#InternalServerException":
2245
- throw await de_InternalServerExceptionRes(parsedOutput, context);
2246
- case "ResourceNotFoundException":
2247
- case "com.amazonaws.wellarchitected#ResourceNotFoundException":
2248
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
2249
- case "ThrottlingException":
2250
- case "com.amazonaws.wellarchitected#ThrottlingException":
2251
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
2252
- case "ValidationException":
2253
- case "com.amazonaws.wellarchitected#ValidationException":
2254
- throw await de_ValidationExceptionRes(parsedOutput, context);
2255
- default:
2256
- const parsedBody = parsedOutput.body;
2257
- return throwDefaultError({
2258
- output,
2259
- parsedBody,
2260
- errorCode,
2261
- });
2262
- }
2263
- };
2264
1371
  export const de_GetLensReviewReportCommand = async (output, context) => {
2265
1372
  if (output.statusCode !== 200 && output.statusCode >= 300) {
2266
- return de_GetLensReviewReportCommandError(output, context);
1373
+ return de_CommandError(output, context);
2267
1374
  }
2268
1375
  const contents = map({
2269
1376
  $metadata: deserializeMetadata(output),
@@ -2277,40 +1384,9 @@ export const de_GetLensReviewReportCommand = async (output, context) => {
2277
1384
  Object.assign(contents, doc);
2278
1385
  return contents;
2279
1386
  };
2280
- const de_GetLensReviewReportCommandError = async (output, context) => {
2281
- const parsedOutput = {
2282
- ...output,
2283
- body: await parseErrorBody(output.body, context),
2284
- };
2285
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2286
- switch (errorCode) {
2287
- case "AccessDeniedException":
2288
- case "com.amazonaws.wellarchitected#AccessDeniedException":
2289
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
2290
- case "InternalServerException":
2291
- case "com.amazonaws.wellarchitected#InternalServerException":
2292
- throw await de_InternalServerExceptionRes(parsedOutput, context);
2293
- case "ResourceNotFoundException":
2294
- case "com.amazonaws.wellarchitected#ResourceNotFoundException":
2295
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
2296
- case "ThrottlingException":
2297
- case "com.amazonaws.wellarchitected#ThrottlingException":
2298
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
2299
- case "ValidationException":
2300
- case "com.amazonaws.wellarchitected#ValidationException":
2301
- throw await de_ValidationExceptionRes(parsedOutput, context);
2302
- default:
2303
- const parsedBody = parsedOutput.body;
2304
- return throwDefaultError({
2305
- output,
2306
- parsedBody,
2307
- errorCode,
2308
- });
2309
- }
2310
- };
2311
1387
  export const de_GetLensVersionDifferenceCommand = async (output, context) => {
2312
1388
  if (output.statusCode !== 200 && output.statusCode >= 300) {
2313
- return de_GetLensVersionDifferenceCommandError(output, context);
1389
+ return de_CommandError(output, context);
2314
1390
  }
2315
1391
  const contents = map({
2316
1392
  $metadata: deserializeMetadata(output),
@@ -2324,179 +1400,55 @@ export const de_GetLensVersionDifferenceCommand = async (output, context) => {
2324
1400
  TargetLensVersion: __expectString,
2325
1401
  VersionDifferences: _json,
2326
1402
  });
2327
- Object.assign(contents, doc);
2328
- return contents;
2329
- };
2330
- const de_GetLensVersionDifferenceCommandError = async (output, context) => {
2331
- const parsedOutput = {
2332
- ...output,
2333
- body: await parseErrorBody(output.body, context),
2334
- };
2335
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2336
- switch (errorCode) {
2337
- case "AccessDeniedException":
2338
- case "com.amazonaws.wellarchitected#AccessDeniedException":
2339
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
2340
- case "InternalServerException":
2341
- case "com.amazonaws.wellarchitected#InternalServerException":
2342
- throw await de_InternalServerExceptionRes(parsedOutput, context);
2343
- case "ResourceNotFoundException":
2344
- case "com.amazonaws.wellarchitected#ResourceNotFoundException":
2345
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
2346
- case "ThrottlingException":
2347
- case "com.amazonaws.wellarchitected#ThrottlingException":
2348
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
2349
- case "ValidationException":
2350
- case "com.amazonaws.wellarchitected#ValidationException":
2351
- throw await de_ValidationExceptionRes(parsedOutput, context);
2352
- default:
2353
- const parsedBody = parsedOutput.body;
2354
- return throwDefaultError({
2355
- output,
2356
- parsedBody,
2357
- errorCode,
2358
- });
2359
- }
2360
- };
2361
- export const de_GetMilestoneCommand = async (output, context) => {
2362
- if (output.statusCode !== 200 && output.statusCode >= 300) {
2363
- return de_GetMilestoneCommandError(output, context);
2364
- }
2365
- const contents = map({
2366
- $metadata: deserializeMetadata(output),
2367
- });
2368
- const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
2369
- const doc = take(data, {
2370
- Milestone: (_) => de_Milestone(_, context),
2371
- WorkloadId: __expectString,
2372
- });
2373
- Object.assign(contents, doc);
2374
- return contents;
2375
- };
2376
- const de_GetMilestoneCommandError = async (output, context) => {
2377
- const parsedOutput = {
2378
- ...output,
2379
- body: await parseErrorBody(output.body, context),
2380
- };
2381
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2382
- switch (errorCode) {
2383
- case "AccessDeniedException":
2384
- case "com.amazonaws.wellarchitected#AccessDeniedException":
2385
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
2386
- case "InternalServerException":
2387
- case "com.amazonaws.wellarchitected#InternalServerException":
2388
- throw await de_InternalServerExceptionRes(parsedOutput, context);
2389
- case "ResourceNotFoundException":
2390
- case "com.amazonaws.wellarchitected#ResourceNotFoundException":
2391
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
2392
- case "ThrottlingException":
2393
- case "com.amazonaws.wellarchitected#ThrottlingException":
2394
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
2395
- case "ValidationException":
2396
- case "com.amazonaws.wellarchitected#ValidationException":
2397
- throw await de_ValidationExceptionRes(parsedOutput, context);
2398
- default:
2399
- const parsedBody = parsedOutput.body;
2400
- return throwDefaultError({
2401
- output,
2402
- parsedBody,
2403
- errorCode,
2404
- });
2405
- }
2406
- };
2407
- export const de_GetProfileCommand = async (output, context) => {
2408
- if (output.statusCode !== 200 && output.statusCode >= 300) {
2409
- return de_GetProfileCommandError(output, context);
2410
- }
2411
- const contents = map({
2412
- $metadata: deserializeMetadata(output),
2413
- });
2414
- const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
2415
- const doc = take(data, {
2416
- Profile: (_) => de_Profile(_, context),
2417
- });
2418
- Object.assign(contents, doc);
2419
- return contents;
2420
- };
2421
- const de_GetProfileCommandError = async (output, context) => {
2422
- const parsedOutput = {
2423
- ...output,
2424
- body: await parseErrorBody(output.body, context),
2425
- };
2426
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2427
- switch (errorCode) {
2428
- case "AccessDeniedException":
2429
- case "com.amazonaws.wellarchitected#AccessDeniedException":
2430
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
2431
- case "InternalServerException":
2432
- case "com.amazonaws.wellarchitected#InternalServerException":
2433
- throw await de_InternalServerExceptionRes(parsedOutput, context);
2434
- case "ResourceNotFoundException":
2435
- case "com.amazonaws.wellarchitected#ResourceNotFoundException":
2436
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
2437
- case "ThrottlingException":
2438
- case "com.amazonaws.wellarchitected#ThrottlingException":
2439
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
2440
- case "ValidationException":
2441
- case "com.amazonaws.wellarchitected#ValidationException":
2442
- throw await de_ValidationExceptionRes(parsedOutput, context);
2443
- default:
2444
- const parsedBody = parsedOutput.body;
2445
- return throwDefaultError({
2446
- output,
2447
- parsedBody,
2448
- errorCode,
2449
- });
1403
+ Object.assign(contents, doc);
1404
+ return contents;
1405
+ };
1406
+ export const de_GetMilestoneCommand = async (output, context) => {
1407
+ if (output.statusCode !== 200 && output.statusCode >= 300) {
1408
+ return de_CommandError(output, context);
2450
1409
  }
1410
+ const contents = map({
1411
+ $metadata: deserializeMetadata(output),
1412
+ });
1413
+ const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
1414
+ const doc = take(data, {
1415
+ Milestone: (_) => de_Milestone(_, context),
1416
+ WorkloadId: __expectString,
1417
+ });
1418
+ Object.assign(contents, doc);
1419
+ return contents;
2451
1420
  };
2452
- export const de_GetProfileTemplateCommand = async (output, context) => {
1421
+ export const de_GetProfileCommand = async (output, context) => {
2453
1422
  if (output.statusCode !== 200 && output.statusCode >= 300) {
2454
- return de_GetProfileTemplateCommandError(output, context);
1423
+ return de_CommandError(output, context);
2455
1424
  }
2456
1425
  const contents = map({
2457
1426
  $metadata: deserializeMetadata(output),
2458
1427
  });
2459
1428
  const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
2460
1429
  const doc = take(data, {
2461
- ProfileTemplate: (_) => de_ProfileTemplate(_, context),
1430
+ Profile: (_) => de_Profile(_, context),
2462
1431
  });
2463
1432
  Object.assign(contents, doc);
2464
1433
  return contents;
2465
1434
  };
2466
- const de_GetProfileTemplateCommandError = async (output, context) => {
2467
- const parsedOutput = {
2468
- ...output,
2469
- body: await parseErrorBody(output.body, context),
2470
- };
2471
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2472
- switch (errorCode) {
2473
- case "AccessDeniedException":
2474
- case "com.amazonaws.wellarchitected#AccessDeniedException":
2475
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
2476
- case "InternalServerException":
2477
- case "com.amazonaws.wellarchitected#InternalServerException":
2478
- throw await de_InternalServerExceptionRes(parsedOutput, context);
2479
- case "ResourceNotFoundException":
2480
- case "com.amazonaws.wellarchitected#ResourceNotFoundException":
2481
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
2482
- case "ThrottlingException":
2483
- case "com.amazonaws.wellarchitected#ThrottlingException":
2484
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
2485
- case "ValidationException":
2486
- case "com.amazonaws.wellarchitected#ValidationException":
2487
- throw await de_ValidationExceptionRes(parsedOutput, context);
2488
- default:
2489
- const parsedBody = parsedOutput.body;
2490
- return throwDefaultError({
2491
- output,
2492
- parsedBody,
2493
- errorCode,
2494
- });
1435
+ export const de_GetProfileTemplateCommand = async (output, context) => {
1436
+ if (output.statusCode !== 200 && output.statusCode >= 300) {
1437
+ return de_CommandError(output, context);
2495
1438
  }
1439
+ const contents = map({
1440
+ $metadata: deserializeMetadata(output),
1441
+ });
1442
+ const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
1443
+ const doc = take(data, {
1444
+ ProfileTemplate: (_) => de_ProfileTemplate(_, context),
1445
+ });
1446
+ Object.assign(contents, doc);
1447
+ return contents;
2496
1448
  };
2497
1449
  export const de_GetReviewTemplateCommand = async (output, context) => {
2498
1450
  if (output.statusCode !== 200 && output.statusCode >= 300) {
2499
- return de_GetReviewTemplateCommandError(output, context);
1451
+ return de_CommandError(output, context);
2500
1452
  }
2501
1453
  const contents = map({
2502
1454
  $metadata: deserializeMetadata(output),
@@ -2508,40 +1460,9 @@ export const de_GetReviewTemplateCommand = async (output, context) => {
2508
1460
  Object.assign(contents, doc);
2509
1461
  return contents;
2510
1462
  };
2511
- const de_GetReviewTemplateCommandError = async (output, context) => {
2512
- const parsedOutput = {
2513
- ...output,
2514
- body: await parseErrorBody(output.body, context),
2515
- };
2516
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2517
- switch (errorCode) {
2518
- case "AccessDeniedException":
2519
- case "com.amazonaws.wellarchitected#AccessDeniedException":
2520
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
2521
- case "InternalServerException":
2522
- case "com.amazonaws.wellarchitected#InternalServerException":
2523
- throw await de_InternalServerExceptionRes(parsedOutput, context);
2524
- case "ResourceNotFoundException":
2525
- case "com.amazonaws.wellarchitected#ResourceNotFoundException":
2526
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
2527
- case "ThrottlingException":
2528
- case "com.amazonaws.wellarchitected#ThrottlingException":
2529
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
2530
- case "ValidationException":
2531
- case "com.amazonaws.wellarchitected#ValidationException":
2532
- throw await de_ValidationExceptionRes(parsedOutput, context);
2533
- default:
2534
- const parsedBody = parsedOutput.body;
2535
- return throwDefaultError({
2536
- output,
2537
- parsedBody,
2538
- errorCode,
2539
- });
2540
- }
2541
- };
2542
1463
  export const de_GetReviewTemplateAnswerCommand = async (output, context) => {
2543
1464
  if (output.statusCode !== 200 && output.statusCode >= 300) {
2544
- return de_GetReviewTemplateAnswerCommandError(output, context);
1465
+ return de_CommandError(output, context);
2545
1466
  }
2546
1467
  const contents = map({
2547
1468
  $metadata: deserializeMetadata(output),
@@ -2555,40 +1476,9 @@ export const de_GetReviewTemplateAnswerCommand = async (output, context) => {
2555
1476
  Object.assign(contents, doc);
2556
1477
  return contents;
2557
1478
  };
2558
- const de_GetReviewTemplateAnswerCommandError = async (output, context) => {
2559
- const parsedOutput = {
2560
- ...output,
2561
- body: await parseErrorBody(output.body, context),
2562
- };
2563
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2564
- switch (errorCode) {
2565
- case "AccessDeniedException":
2566
- case "com.amazonaws.wellarchitected#AccessDeniedException":
2567
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
2568
- case "InternalServerException":
2569
- case "com.amazonaws.wellarchitected#InternalServerException":
2570
- throw await de_InternalServerExceptionRes(parsedOutput, context);
2571
- case "ResourceNotFoundException":
2572
- case "com.amazonaws.wellarchitected#ResourceNotFoundException":
2573
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
2574
- case "ThrottlingException":
2575
- case "com.amazonaws.wellarchitected#ThrottlingException":
2576
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
2577
- case "ValidationException":
2578
- case "com.amazonaws.wellarchitected#ValidationException":
2579
- throw await de_ValidationExceptionRes(parsedOutput, context);
2580
- default:
2581
- const parsedBody = parsedOutput.body;
2582
- return throwDefaultError({
2583
- output,
2584
- parsedBody,
2585
- errorCode,
2586
- });
2587
- }
2588
- };
2589
1479
  export const de_GetReviewTemplateLensReviewCommand = async (output, context) => {
2590
1480
  if (output.statusCode !== 200 && output.statusCode >= 300) {
2591
- return de_GetReviewTemplateLensReviewCommandError(output, context);
1481
+ return de_CommandError(output, context);
2592
1482
  }
2593
1483
  const contents = map({
2594
1484
  $metadata: deserializeMetadata(output),
@@ -2601,40 +1491,9 @@ export const de_GetReviewTemplateLensReviewCommand = async (output, context) =>
2601
1491
  Object.assign(contents, doc);
2602
1492
  return contents;
2603
1493
  };
2604
- const de_GetReviewTemplateLensReviewCommandError = async (output, context) => {
2605
- const parsedOutput = {
2606
- ...output,
2607
- body: await parseErrorBody(output.body, context),
2608
- };
2609
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2610
- switch (errorCode) {
2611
- case "AccessDeniedException":
2612
- case "com.amazonaws.wellarchitected#AccessDeniedException":
2613
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
2614
- case "InternalServerException":
2615
- case "com.amazonaws.wellarchitected#InternalServerException":
2616
- throw await de_InternalServerExceptionRes(parsedOutput, context);
2617
- case "ResourceNotFoundException":
2618
- case "com.amazonaws.wellarchitected#ResourceNotFoundException":
2619
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
2620
- case "ThrottlingException":
2621
- case "com.amazonaws.wellarchitected#ThrottlingException":
2622
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
2623
- case "ValidationException":
2624
- case "com.amazonaws.wellarchitected#ValidationException":
2625
- throw await de_ValidationExceptionRes(parsedOutput, context);
2626
- default:
2627
- const parsedBody = parsedOutput.body;
2628
- return throwDefaultError({
2629
- output,
2630
- parsedBody,
2631
- errorCode,
2632
- });
2633
- }
2634
- };
2635
1494
  export const de_GetWorkloadCommand = async (output, context) => {
2636
1495
  if (output.statusCode !== 200 && output.statusCode >= 300) {
2637
- return de_GetWorkloadCommandError(output, context);
1496
+ return de_CommandError(output, context);
2638
1497
  }
2639
1498
  const contents = map({
2640
1499
  $metadata: deserializeMetadata(output),
@@ -2646,40 +1505,9 @@ export const de_GetWorkloadCommand = async (output, context) => {
2646
1505
  Object.assign(contents, doc);
2647
1506
  return contents;
2648
1507
  };
2649
- const de_GetWorkloadCommandError = async (output, context) => {
2650
- const parsedOutput = {
2651
- ...output,
2652
- body: await parseErrorBody(output.body, context),
2653
- };
2654
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2655
- switch (errorCode) {
2656
- case "AccessDeniedException":
2657
- case "com.amazonaws.wellarchitected#AccessDeniedException":
2658
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
2659
- case "InternalServerException":
2660
- case "com.amazonaws.wellarchitected#InternalServerException":
2661
- throw await de_InternalServerExceptionRes(parsedOutput, context);
2662
- case "ResourceNotFoundException":
2663
- case "com.amazonaws.wellarchitected#ResourceNotFoundException":
2664
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
2665
- case "ThrottlingException":
2666
- case "com.amazonaws.wellarchitected#ThrottlingException":
2667
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
2668
- case "ValidationException":
2669
- case "com.amazonaws.wellarchitected#ValidationException":
2670
- throw await de_ValidationExceptionRes(parsedOutput, context);
2671
- default:
2672
- const parsedBody = parsedOutput.body;
2673
- return throwDefaultError({
2674
- output,
2675
- parsedBody,
2676
- errorCode,
2677
- });
2678
- }
2679
- };
2680
1508
  export const de_ImportLensCommand = async (output, context) => {
2681
1509
  if (output.statusCode !== 200 && output.statusCode >= 300) {
2682
- return de_ImportLensCommandError(output, context);
1510
+ return de_CommandError(output, context);
2683
1511
  }
2684
1512
  const contents = map({
2685
1513
  $metadata: deserializeMetadata(output),
@@ -2692,96 +1520,28 @@ export const de_ImportLensCommand = async (output, context) => {
2692
1520
  Object.assign(contents, doc);
2693
1521
  return contents;
2694
1522
  };
2695
- const de_ImportLensCommandError = async (output, context) => {
2696
- const parsedOutput = {
2697
- ...output,
2698
- body: await parseErrorBody(output.body, context),
2699
- };
2700
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2701
- switch (errorCode) {
2702
- case "AccessDeniedException":
2703
- case "com.amazonaws.wellarchitected#AccessDeniedException":
2704
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
2705
- case "ConflictException":
2706
- case "com.amazonaws.wellarchitected#ConflictException":
2707
- throw await de_ConflictExceptionRes(parsedOutput, context);
2708
- case "InternalServerException":
2709
- case "com.amazonaws.wellarchitected#InternalServerException":
2710
- throw await de_InternalServerExceptionRes(parsedOutput, context);
2711
- case "ResourceNotFoundException":
2712
- case "com.amazonaws.wellarchitected#ResourceNotFoundException":
2713
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
2714
- case "ServiceQuotaExceededException":
2715
- case "com.amazonaws.wellarchitected#ServiceQuotaExceededException":
2716
- throw await de_ServiceQuotaExceededExceptionRes(parsedOutput, context);
2717
- case "ThrottlingException":
2718
- case "com.amazonaws.wellarchitected#ThrottlingException":
2719
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
2720
- case "ValidationException":
2721
- case "com.amazonaws.wellarchitected#ValidationException":
2722
- throw await de_ValidationExceptionRes(parsedOutput, context);
2723
- default:
2724
- const parsedBody = parsedOutput.body;
2725
- return throwDefaultError({
2726
- output,
2727
- parsedBody,
2728
- errorCode,
2729
- });
2730
- }
2731
- };
2732
1523
  export const de_ListAnswersCommand = async (output, context) => {
2733
1524
  if (output.statusCode !== 200 && output.statusCode >= 300) {
2734
- return de_ListAnswersCommandError(output, context);
1525
+ return de_CommandError(output, context);
2735
1526
  }
2736
1527
  const contents = map({
2737
1528
  $metadata: deserializeMetadata(output),
2738
- });
2739
- const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
2740
- const doc = take(data, {
2741
- AnswerSummaries: _json,
2742
- LensAlias: __expectString,
2743
- LensArn: __expectString,
2744
- MilestoneNumber: __expectInt32,
2745
- NextToken: __expectString,
2746
- WorkloadId: __expectString,
2747
- });
2748
- Object.assign(contents, doc);
2749
- return contents;
2750
- };
2751
- const de_ListAnswersCommandError = async (output, context) => {
2752
- const parsedOutput = {
2753
- ...output,
2754
- body: await parseErrorBody(output.body, context),
2755
- };
2756
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2757
- switch (errorCode) {
2758
- case "AccessDeniedException":
2759
- case "com.amazonaws.wellarchitected#AccessDeniedException":
2760
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
2761
- case "InternalServerException":
2762
- case "com.amazonaws.wellarchitected#InternalServerException":
2763
- throw await de_InternalServerExceptionRes(parsedOutput, context);
2764
- case "ResourceNotFoundException":
2765
- case "com.amazonaws.wellarchitected#ResourceNotFoundException":
2766
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
2767
- case "ThrottlingException":
2768
- case "com.amazonaws.wellarchitected#ThrottlingException":
2769
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
2770
- case "ValidationException":
2771
- case "com.amazonaws.wellarchitected#ValidationException":
2772
- throw await de_ValidationExceptionRes(parsedOutput, context);
2773
- default:
2774
- const parsedBody = parsedOutput.body;
2775
- return throwDefaultError({
2776
- output,
2777
- parsedBody,
2778
- errorCode,
2779
- });
2780
- }
1529
+ });
1530
+ const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
1531
+ const doc = take(data, {
1532
+ AnswerSummaries: _json,
1533
+ LensAlias: __expectString,
1534
+ LensArn: __expectString,
1535
+ MilestoneNumber: __expectInt32,
1536
+ NextToken: __expectString,
1537
+ WorkloadId: __expectString,
1538
+ });
1539
+ Object.assign(contents, doc);
1540
+ return contents;
2781
1541
  };
2782
1542
  export const de_ListCheckDetailsCommand = async (output, context) => {
2783
1543
  if (output.statusCode !== 200 && output.statusCode >= 300) {
2784
- return de_ListCheckDetailsCommandError(output, context);
1544
+ return de_CommandError(output, context);
2785
1545
  }
2786
1546
  const contents = map({
2787
1547
  $metadata: deserializeMetadata(output),
@@ -2794,40 +1554,9 @@ export const de_ListCheckDetailsCommand = async (output, context) => {
2794
1554
  Object.assign(contents, doc);
2795
1555
  return contents;
2796
1556
  };
2797
- const de_ListCheckDetailsCommandError = async (output, context) => {
2798
- const parsedOutput = {
2799
- ...output,
2800
- body: await parseErrorBody(output.body, context),
2801
- };
2802
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2803
- switch (errorCode) {
2804
- case "AccessDeniedException":
2805
- case "com.amazonaws.wellarchitected#AccessDeniedException":
2806
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
2807
- case "InternalServerException":
2808
- case "com.amazonaws.wellarchitected#InternalServerException":
2809
- throw await de_InternalServerExceptionRes(parsedOutput, context);
2810
- case "ResourceNotFoundException":
2811
- case "com.amazonaws.wellarchitected#ResourceNotFoundException":
2812
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
2813
- case "ThrottlingException":
2814
- case "com.amazonaws.wellarchitected#ThrottlingException":
2815
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
2816
- case "ValidationException":
2817
- case "com.amazonaws.wellarchitected#ValidationException":
2818
- throw await de_ValidationExceptionRes(parsedOutput, context);
2819
- default:
2820
- const parsedBody = parsedOutput.body;
2821
- return throwDefaultError({
2822
- output,
2823
- parsedBody,
2824
- errorCode,
2825
- });
2826
- }
2827
- };
2828
1557
  export const de_ListCheckSummariesCommand = async (output, context) => {
2829
1558
  if (output.statusCode !== 200 && output.statusCode >= 300) {
2830
- return de_ListCheckSummariesCommandError(output, context);
1559
+ return de_CommandError(output, context);
2831
1560
  }
2832
1561
  const contents = map({
2833
1562
  $metadata: deserializeMetadata(output),
@@ -2840,40 +1569,9 @@ export const de_ListCheckSummariesCommand = async (output, context) => {
2840
1569
  Object.assign(contents, doc);
2841
1570
  return contents;
2842
1571
  };
2843
- const de_ListCheckSummariesCommandError = async (output, context) => {
2844
- const parsedOutput = {
2845
- ...output,
2846
- body: await parseErrorBody(output.body, context),
2847
- };
2848
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2849
- switch (errorCode) {
2850
- case "AccessDeniedException":
2851
- case "com.amazonaws.wellarchitected#AccessDeniedException":
2852
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
2853
- case "InternalServerException":
2854
- case "com.amazonaws.wellarchitected#InternalServerException":
2855
- throw await de_InternalServerExceptionRes(parsedOutput, context);
2856
- case "ResourceNotFoundException":
2857
- case "com.amazonaws.wellarchitected#ResourceNotFoundException":
2858
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
2859
- case "ThrottlingException":
2860
- case "com.amazonaws.wellarchitected#ThrottlingException":
2861
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
2862
- case "ValidationException":
2863
- case "com.amazonaws.wellarchitected#ValidationException":
2864
- throw await de_ValidationExceptionRes(parsedOutput, context);
2865
- default:
2866
- const parsedBody = parsedOutput.body;
2867
- return throwDefaultError({
2868
- output,
2869
- parsedBody,
2870
- errorCode,
2871
- });
2872
- }
2873
- };
2874
1572
  export const de_ListLensesCommand = async (output, context) => {
2875
1573
  if (output.statusCode !== 200 && output.statusCode >= 300) {
2876
- return de_ListLensesCommandError(output, context);
1574
+ return de_CommandError(output, context);
2877
1575
  }
2878
1576
  const contents = map({
2879
1577
  $metadata: deserializeMetadata(output),
@@ -2886,37 +1584,9 @@ export const de_ListLensesCommand = async (output, context) => {
2886
1584
  Object.assign(contents, doc);
2887
1585
  return contents;
2888
1586
  };
2889
- const de_ListLensesCommandError = async (output, context) => {
2890
- const parsedOutput = {
2891
- ...output,
2892
- body: await parseErrorBody(output.body, context),
2893
- };
2894
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2895
- switch (errorCode) {
2896
- case "AccessDeniedException":
2897
- case "com.amazonaws.wellarchitected#AccessDeniedException":
2898
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
2899
- case "InternalServerException":
2900
- case "com.amazonaws.wellarchitected#InternalServerException":
2901
- throw await de_InternalServerExceptionRes(parsedOutput, context);
2902
- case "ThrottlingException":
2903
- case "com.amazonaws.wellarchitected#ThrottlingException":
2904
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
2905
- case "ValidationException":
2906
- case "com.amazonaws.wellarchitected#ValidationException":
2907
- throw await de_ValidationExceptionRes(parsedOutput, context);
2908
- default:
2909
- const parsedBody = parsedOutput.body;
2910
- return throwDefaultError({
2911
- output,
2912
- parsedBody,
2913
- errorCode,
2914
- });
2915
- }
2916
- };
2917
1587
  export const de_ListLensReviewImprovementsCommand = async (output, context) => {
2918
1588
  if (output.statusCode !== 200 && output.statusCode >= 300) {
2919
- return de_ListLensReviewImprovementsCommandError(output, context);
1589
+ return de_CommandError(output, context);
2920
1590
  }
2921
1591
  const contents = map({
2922
1592
  $metadata: deserializeMetadata(output),
@@ -2933,40 +1603,9 @@ export const de_ListLensReviewImprovementsCommand = async (output, context) => {
2933
1603
  Object.assign(contents, doc);
2934
1604
  return contents;
2935
1605
  };
2936
- const de_ListLensReviewImprovementsCommandError = async (output, context) => {
2937
- const parsedOutput = {
2938
- ...output,
2939
- body: await parseErrorBody(output.body, context),
2940
- };
2941
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2942
- switch (errorCode) {
2943
- case "AccessDeniedException":
2944
- case "com.amazonaws.wellarchitected#AccessDeniedException":
2945
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
2946
- case "InternalServerException":
2947
- case "com.amazonaws.wellarchitected#InternalServerException":
2948
- throw await de_InternalServerExceptionRes(parsedOutput, context);
2949
- case "ResourceNotFoundException":
2950
- case "com.amazonaws.wellarchitected#ResourceNotFoundException":
2951
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
2952
- case "ThrottlingException":
2953
- case "com.amazonaws.wellarchitected#ThrottlingException":
2954
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
2955
- case "ValidationException":
2956
- case "com.amazonaws.wellarchitected#ValidationException":
2957
- throw await de_ValidationExceptionRes(parsedOutput, context);
2958
- default:
2959
- const parsedBody = parsedOutput.body;
2960
- return throwDefaultError({
2961
- output,
2962
- parsedBody,
2963
- errorCode,
2964
- });
2965
- }
2966
- };
2967
1606
  export const de_ListLensReviewsCommand = async (output, context) => {
2968
1607
  if (output.statusCode !== 200 && output.statusCode >= 300) {
2969
- return de_ListLensReviewsCommandError(output, context);
1608
+ return de_CommandError(output, context);
2970
1609
  }
2971
1610
  const contents = map({
2972
1611
  $metadata: deserializeMetadata(output),
@@ -2981,40 +1620,9 @@ export const de_ListLensReviewsCommand = async (output, context) => {
2981
1620
  Object.assign(contents, doc);
2982
1621
  return contents;
2983
1622
  };
2984
- const de_ListLensReviewsCommandError = async (output, context) => {
2985
- const parsedOutput = {
2986
- ...output,
2987
- body: await parseErrorBody(output.body, context),
2988
- };
2989
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2990
- switch (errorCode) {
2991
- case "AccessDeniedException":
2992
- case "com.amazonaws.wellarchitected#AccessDeniedException":
2993
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
2994
- case "InternalServerException":
2995
- case "com.amazonaws.wellarchitected#InternalServerException":
2996
- throw await de_InternalServerExceptionRes(parsedOutput, context);
2997
- case "ResourceNotFoundException":
2998
- case "com.amazonaws.wellarchitected#ResourceNotFoundException":
2999
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
3000
- case "ThrottlingException":
3001
- case "com.amazonaws.wellarchitected#ThrottlingException":
3002
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
3003
- case "ValidationException":
3004
- case "com.amazonaws.wellarchitected#ValidationException":
3005
- throw await de_ValidationExceptionRes(parsedOutput, context);
3006
- default:
3007
- const parsedBody = parsedOutput.body;
3008
- return throwDefaultError({
3009
- output,
3010
- parsedBody,
3011
- errorCode,
3012
- });
3013
- }
3014
- };
3015
1623
  export const de_ListLensSharesCommand = async (output, context) => {
3016
1624
  if (output.statusCode !== 200 && output.statusCode >= 300) {
3017
- return de_ListLensSharesCommandError(output, context);
1625
+ return de_CommandError(output, context);
3018
1626
  }
3019
1627
  const contents = map({
3020
1628
  $metadata: deserializeMetadata(output),
@@ -3027,40 +1635,9 @@ export const de_ListLensSharesCommand = async (output, context) => {
3027
1635
  Object.assign(contents, doc);
3028
1636
  return contents;
3029
1637
  };
3030
- const de_ListLensSharesCommandError = async (output, context) => {
3031
- const parsedOutput = {
3032
- ...output,
3033
- body: await parseErrorBody(output.body, context),
3034
- };
3035
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
3036
- switch (errorCode) {
3037
- case "AccessDeniedException":
3038
- case "com.amazonaws.wellarchitected#AccessDeniedException":
3039
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
3040
- case "InternalServerException":
3041
- case "com.amazonaws.wellarchitected#InternalServerException":
3042
- throw await de_InternalServerExceptionRes(parsedOutput, context);
3043
- case "ResourceNotFoundException":
3044
- case "com.amazonaws.wellarchitected#ResourceNotFoundException":
3045
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
3046
- case "ThrottlingException":
3047
- case "com.amazonaws.wellarchitected#ThrottlingException":
3048
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
3049
- case "ValidationException":
3050
- case "com.amazonaws.wellarchitected#ValidationException":
3051
- throw await de_ValidationExceptionRes(parsedOutput, context);
3052
- default:
3053
- const parsedBody = parsedOutput.body;
3054
- return throwDefaultError({
3055
- output,
3056
- parsedBody,
3057
- errorCode,
3058
- });
3059
- }
3060
- };
3061
1638
  export const de_ListMilestonesCommand = async (output, context) => {
3062
1639
  if (output.statusCode !== 200 && output.statusCode >= 300) {
3063
- return de_ListMilestonesCommandError(output, context);
1640
+ return de_CommandError(output, context);
3064
1641
  }
3065
1642
  const contents = map({
3066
1643
  $metadata: deserializeMetadata(output),
@@ -3074,83 +1651,24 @@ export const de_ListMilestonesCommand = async (output, context) => {
3074
1651
  Object.assign(contents, doc);
3075
1652
  return contents;
3076
1653
  };
3077
- const de_ListMilestonesCommandError = async (output, context) => {
3078
- const parsedOutput = {
3079
- ...output,
3080
- body: await parseErrorBody(output.body, context),
3081
- };
3082
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
3083
- switch (errorCode) {
3084
- case "AccessDeniedException":
3085
- case "com.amazonaws.wellarchitected#AccessDeniedException":
3086
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
3087
- case "InternalServerException":
3088
- case "com.amazonaws.wellarchitected#InternalServerException":
3089
- throw await de_InternalServerExceptionRes(parsedOutput, context);
3090
- case "ResourceNotFoundException":
3091
- case "com.amazonaws.wellarchitected#ResourceNotFoundException":
3092
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
3093
- case "ThrottlingException":
3094
- case "com.amazonaws.wellarchitected#ThrottlingException":
3095
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
3096
- case "ValidationException":
3097
- case "com.amazonaws.wellarchitected#ValidationException":
3098
- throw await de_ValidationExceptionRes(parsedOutput, context);
3099
- default:
3100
- const parsedBody = parsedOutput.body;
3101
- return throwDefaultError({
3102
- output,
3103
- parsedBody,
3104
- errorCode,
3105
- });
3106
- }
3107
- };
3108
1654
  export const de_ListNotificationsCommand = async (output, context) => {
3109
1655
  if (output.statusCode !== 200 && output.statusCode >= 300) {
3110
- return de_ListNotificationsCommandError(output, context);
3111
- }
3112
- const contents = map({
3113
- $metadata: deserializeMetadata(output),
3114
- });
3115
- const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
3116
- const doc = take(data, {
3117
- NextToken: __expectString,
3118
- NotificationSummaries: _json,
3119
- });
3120
- Object.assign(contents, doc);
3121
- return contents;
3122
- };
3123
- const de_ListNotificationsCommandError = async (output, context) => {
3124
- const parsedOutput = {
3125
- ...output,
3126
- body: await parseErrorBody(output.body, context),
3127
- };
3128
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
3129
- switch (errorCode) {
3130
- case "AccessDeniedException":
3131
- case "com.amazonaws.wellarchitected#AccessDeniedException":
3132
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
3133
- case "InternalServerException":
3134
- case "com.amazonaws.wellarchitected#InternalServerException":
3135
- throw await de_InternalServerExceptionRes(parsedOutput, context);
3136
- case "ThrottlingException":
3137
- case "com.amazonaws.wellarchitected#ThrottlingException":
3138
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
3139
- case "ValidationException":
3140
- case "com.amazonaws.wellarchitected#ValidationException":
3141
- throw await de_ValidationExceptionRes(parsedOutput, context);
3142
- default:
3143
- const parsedBody = parsedOutput.body;
3144
- return throwDefaultError({
3145
- output,
3146
- parsedBody,
3147
- errorCode,
3148
- });
1656
+ return de_CommandError(output, context);
3149
1657
  }
1658
+ const contents = map({
1659
+ $metadata: deserializeMetadata(output),
1660
+ });
1661
+ const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
1662
+ const doc = take(data, {
1663
+ NextToken: __expectString,
1664
+ NotificationSummaries: _json,
1665
+ });
1666
+ Object.assign(contents, doc);
1667
+ return contents;
3150
1668
  };
3151
1669
  export const de_ListProfileNotificationsCommand = async (output, context) => {
3152
1670
  if (output.statusCode !== 200 && output.statusCode >= 300) {
3153
- return de_ListProfileNotificationsCommandError(output, context);
1671
+ return de_CommandError(output, context);
3154
1672
  }
3155
1673
  const contents = map({
3156
1674
  $metadata: deserializeMetadata(output),
@@ -3163,37 +1681,9 @@ export const de_ListProfileNotificationsCommand = async (output, context) => {
3163
1681
  Object.assign(contents, doc);
3164
1682
  return contents;
3165
1683
  };
3166
- const de_ListProfileNotificationsCommandError = async (output, context) => {
3167
- const parsedOutput = {
3168
- ...output,
3169
- body: await parseErrorBody(output.body, context),
3170
- };
3171
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
3172
- switch (errorCode) {
3173
- case "AccessDeniedException":
3174
- case "com.amazonaws.wellarchitected#AccessDeniedException":
3175
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
3176
- case "InternalServerException":
3177
- case "com.amazonaws.wellarchitected#InternalServerException":
3178
- throw await de_InternalServerExceptionRes(parsedOutput, context);
3179
- case "ThrottlingException":
3180
- case "com.amazonaws.wellarchitected#ThrottlingException":
3181
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
3182
- case "ValidationException":
3183
- case "com.amazonaws.wellarchitected#ValidationException":
3184
- throw await de_ValidationExceptionRes(parsedOutput, context);
3185
- default:
3186
- const parsedBody = parsedOutput.body;
3187
- return throwDefaultError({
3188
- output,
3189
- parsedBody,
3190
- errorCode,
3191
- });
3192
- }
3193
- };
3194
1684
  export const de_ListProfilesCommand = async (output, context) => {
3195
1685
  if (output.statusCode !== 200 && output.statusCode >= 300) {
3196
- return de_ListProfilesCommandError(output, context);
1686
+ return de_CommandError(output, context);
3197
1687
  }
3198
1688
  const contents = map({
3199
1689
  $metadata: deserializeMetadata(output),
@@ -3206,37 +1696,9 @@ export const de_ListProfilesCommand = async (output, context) => {
3206
1696
  Object.assign(contents, doc);
3207
1697
  return contents;
3208
1698
  };
3209
- const de_ListProfilesCommandError = async (output, context) => {
3210
- const parsedOutput = {
3211
- ...output,
3212
- body: await parseErrorBody(output.body, context),
3213
- };
3214
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
3215
- switch (errorCode) {
3216
- case "AccessDeniedException":
3217
- case "com.amazonaws.wellarchitected#AccessDeniedException":
3218
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
3219
- case "InternalServerException":
3220
- case "com.amazonaws.wellarchitected#InternalServerException":
3221
- throw await de_InternalServerExceptionRes(parsedOutput, context);
3222
- case "ThrottlingException":
3223
- case "com.amazonaws.wellarchitected#ThrottlingException":
3224
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
3225
- case "ValidationException":
3226
- case "com.amazonaws.wellarchitected#ValidationException":
3227
- throw await de_ValidationExceptionRes(parsedOutput, context);
3228
- default:
3229
- const parsedBody = parsedOutput.body;
3230
- return throwDefaultError({
3231
- output,
3232
- parsedBody,
3233
- errorCode,
3234
- });
3235
- }
3236
- };
3237
1699
  export const de_ListProfileSharesCommand = async (output, context) => {
3238
1700
  if (output.statusCode !== 200 && output.statusCode >= 300) {
3239
- return de_ListProfileSharesCommandError(output, context);
1701
+ return de_CommandError(output, context);
3240
1702
  }
3241
1703
  const contents = map({
3242
1704
  $metadata: deserializeMetadata(output),
@@ -3249,40 +1711,9 @@ export const de_ListProfileSharesCommand = async (output, context) => {
3249
1711
  Object.assign(contents, doc);
3250
1712
  return contents;
3251
1713
  };
3252
- const de_ListProfileSharesCommandError = async (output, context) => {
3253
- const parsedOutput = {
3254
- ...output,
3255
- body: await parseErrorBody(output.body, context),
3256
- };
3257
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
3258
- switch (errorCode) {
3259
- case "AccessDeniedException":
3260
- case "com.amazonaws.wellarchitected#AccessDeniedException":
3261
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
3262
- case "InternalServerException":
3263
- case "com.amazonaws.wellarchitected#InternalServerException":
3264
- throw await de_InternalServerExceptionRes(parsedOutput, context);
3265
- case "ResourceNotFoundException":
3266
- case "com.amazonaws.wellarchitected#ResourceNotFoundException":
3267
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
3268
- case "ThrottlingException":
3269
- case "com.amazonaws.wellarchitected#ThrottlingException":
3270
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
3271
- case "ValidationException":
3272
- case "com.amazonaws.wellarchitected#ValidationException":
3273
- throw await de_ValidationExceptionRes(parsedOutput, context);
3274
- default:
3275
- const parsedBody = parsedOutput.body;
3276
- return throwDefaultError({
3277
- output,
3278
- parsedBody,
3279
- errorCode,
3280
- });
3281
- }
3282
- };
3283
1714
  export const de_ListReviewTemplateAnswersCommand = async (output, context) => {
3284
1715
  if (output.statusCode !== 200 && output.statusCode >= 300) {
3285
- return de_ListReviewTemplateAnswersCommandError(output, context);
1716
+ return de_CommandError(output, context);
3286
1717
  }
3287
1718
  const contents = map({
3288
1719
  $metadata: deserializeMetadata(output),
@@ -3297,40 +1728,9 @@ export const de_ListReviewTemplateAnswersCommand = async (output, context) => {
3297
1728
  Object.assign(contents, doc);
3298
1729
  return contents;
3299
1730
  };
3300
- const de_ListReviewTemplateAnswersCommandError = async (output, context) => {
3301
- const parsedOutput = {
3302
- ...output,
3303
- body: await parseErrorBody(output.body, context),
3304
- };
3305
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
3306
- switch (errorCode) {
3307
- case "AccessDeniedException":
3308
- case "com.amazonaws.wellarchitected#AccessDeniedException":
3309
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
3310
- case "InternalServerException":
3311
- case "com.amazonaws.wellarchitected#InternalServerException":
3312
- throw await de_InternalServerExceptionRes(parsedOutput, context);
3313
- case "ResourceNotFoundException":
3314
- case "com.amazonaws.wellarchitected#ResourceNotFoundException":
3315
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
3316
- case "ThrottlingException":
3317
- case "com.amazonaws.wellarchitected#ThrottlingException":
3318
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
3319
- case "ValidationException":
3320
- case "com.amazonaws.wellarchitected#ValidationException":
3321
- throw await de_ValidationExceptionRes(parsedOutput, context);
3322
- default:
3323
- const parsedBody = parsedOutput.body;
3324
- return throwDefaultError({
3325
- output,
3326
- parsedBody,
3327
- errorCode,
3328
- });
3329
- }
3330
- };
3331
1731
  export const de_ListReviewTemplatesCommand = async (output, context) => {
3332
1732
  if (output.statusCode !== 200 && output.statusCode >= 300) {
3333
- return de_ListReviewTemplatesCommandError(output, context);
1733
+ return de_CommandError(output, context);
3334
1734
  }
3335
1735
  const contents = map({
3336
1736
  $metadata: deserializeMetadata(output),
@@ -3343,37 +1743,9 @@ export const de_ListReviewTemplatesCommand = async (output, context) => {
3343
1743
  Object.assign(contents, doc);
3344
1744
  return contents;
3345
1745
  };
3346
- const de_ListReviewTemplatesCommandError = async (output, context) => {
3347
- const parsedOutput = {
3348
- ...output,
3349
- body: await parseErrorBody(output.body, context),
3350
- };
3351
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
3352
- switch (errorCode) {
3353
- case "AccessDeniedException":
3354
- case "com.amazonaws.wellarchitected#AccessDeniedException":
3355
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
3356
- case "InternalServerException":
3357
- case "com.amazonaws.wellarchitected#InternalServerException":
3358
- throw await de_InternalServerExceptionRes(parsedOutput, context);
3359
- case "ThrottlingException":
3360
- case "com.amazonaws.wellarchitected#ThrottlingException":
3361
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
3362
- case "ValidationException":
3363
- case "com.amazonaws.wellarchitected#ValidationException":
3364
- throw await de_ValidationExceptionRes(parsedOutput, context);
3365
- default:
3366
- const parsedBody = parsedOutput.body;
3367
- return throwDefaultError({
3368
- output,
3369
- parsedBody,
3370
- errorCode,
3371
- });
3372
- }
3373
- };
3374
1746
  export const de_ListShareInvitationsCommand = async (output, context) => {
3375
1747
  if (output.statusCode !== 200 && output.statusCode >= 300) {
3376
- return de_ListShareInvitationsCommandError(output, context);
1748
+ return de_CommandError(output, context);
3377
1749
  }
3378
1750
  const contents = map({
3379
1751
  $metadata: deserializeMetadata(output),
@@ -3386,37 +1758,9 @@ export const de_ListShareInvitationsCommand = async (output, context) => {
3386
1758
  Object.assign(contents, doc);
3387
1759
  return contents;
3388
1760
  };
3389
- const de_ListShareInvitationsCommandError = async (output, context) => {
3390
- const parsedOutput = {
3391
- ...output,
3392
- body: await parseErrorBody(output.body, context),
3393
- };
3394
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
3395
- switch (errorCode) {
3396
- case "AccessDeniedException":
3397
- case "com.amazonaws.wellarchitected#AccessDeniedException":
3398
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
3399
- case "InternalServerException":
3400
- case "com.amazonaws.wellarchitected#InternalServerException":
3401
- throw await de_InternalServerExceptionRes(parsedOutput, context);
3402
- case "ThrottlingException":
3403
- case "com.amazonaws.wellarchitected#ThrottlingException":
3404
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
3405
- case "ValidationException":
3406
- case "com.amazonaws.wellarchitected#ValidationException":
3407
- throw await de_ValidationExceptionRes(parsedOutput, context);
3408
- default:
3409
- const parsedBody = parsedOutput.body;
3410
- return throwDefaultError({
3411
- output,
3412
- parsedBody,
3413
- errorCode,
3414
- });
3415
- }
3416
- };
3417
1761
  export const de_ListTagsForResourceCommand = async (output, context) => {
3418
1762
  if (output.statusCode !== 200 && output.statusCode >= 300) {
3419
- return de_ListTagsForResourceCommandError(output, context);
1763
+ return de_CommandError(output, context);
3420
1764
  }
3421
1765
  const contents = map({
3422
1766
  $metadata: deserializeMetadata(output),
@@ -3428,31 +1772,9 @@ export const de_ListTagsForResourceCommand = async (output, context) => {
3428
1772
  Object.assign(contents, doc);
3429
1773
  return contents;
3430
1774
  };
3431
- const de_ListTagsForResourceCommandError = async (output, context) => {
3432
- const parsedOutput = {
3433
- ...output,
3434
- body: await parseErrorBody(output.body, context),
3435
- };
3436
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
3437
- switch (errorCode) {
3438
- case "InternalServerException":
3439
- case "com.amazonaws.wellarchitected#InternalServerException":
3440
- throw await de_InternalServerExceptionRes(parsedOutput, context);
3441
- case "ResourceNotFoundException":
3442
- case "com.amazonaws.wellarchitected#ResourceNotFoundException":
3443
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
3444
- default:
3445
- const parsedBody = parsedOutput.body;
3446
- return throwDefaultError({
3447
- output,
3448
- parsedBody,
3449
- errorCode,
3450
- });
3451
- }
3452
- };
3453
1775
  export const de_ListTemplateSharesCommand = async (output, context) => {
3454
1776
  if (output.statusCode !== 200 && output.statusCode >= 300) {
3455
- return de_ListTemplateSharesCommandError(output, context);
1777
+ return de_CommandError(output, context);
3456
1778
  }
3457
1779
  const contents = map({
3458
1780
  $metadata: deserializeMetadata(output),
@@ -3466,40 +1788,9 @@ export const de_ListTemplateSharesCommand = async (output, context) => {
3466
1788
  Object.assign(contents, doc);
3467
1789
  return contents;
3468
1790
  };
3469
- const de_ListTemplateSharesCommandError = async (output, context) => {
3470
- const parsedOutput = {
3471
- ...output,
3472
- body: await parseErrorBody(output.body, context),
3473
- };
3474
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
3475
- switch (errorCode) {
3476
- case "AccessDeniedException":
3477
- case "com.amazonaws.wellarchitected#AccessDeniedException":
3478
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
3479
- case "InternalServerException":
3480
- case "com.amazonaws.wellarchitected#InternalServerException":
3481
- throw await de_InternalServerExceptionRes(parsedOutput, context);
3482
- case "ResourceNotFoundException":
3483
- case "com.amazonaws.wellarchitected#ResourceNotFoundException":
3484
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
3485
- case "ThrottlingException":
3486
- case "com.amazonaws.wellarchitected#ThrottlingException":
3487
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
3488
- case "ValidationException":
3489
- case "com.amazonaws.wellarchitected#ValidationException":
3490
- throw await de_ValidationExceptionRes(parsedOutput, context);
3491
- default:
3492
- const parsedBody = parsedOutput.body;
3493
- return throwDefaultError({
3494
- output,
3495
- parsedBody,
3496
- errorCode,
3497
- });
3498
- }
3499
- };
3500
1791
  export const de_ListWorkloadsCommand = async (output, context) => {
3501
1792
  if (output.statusCode !== 200 && output.statusCode >= 300) {
3502
- return de_ListWorkloadsCommandError(output, context);
1793
+ return de_CommandError(output, context);
3503
1794
  }
3504
1795
  const contents = map({
3505
1796
  $metadata: deserializeMetadata(output),
@@ -3512,37 +1803,9 @@ export const de_ListWorkloadsCommand = async (output, context) => {
3512
1803
  Object.assign(contents, doc);
3513
1804
  return contents;
3514
1805
  };
3515
- const de_ListWorkloadsCommandError = async (output, context) => {
3516
- const parsedOutput = {
3517
- ...output,
3518
- body: await parseErrorBody(output.body, context),
3519
- };
3520
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
3521
- switch (errorCode) {
3522
- case "AccessDeniedException":
3523
- case "com.amazonaws.wellarchitected#AccessDeniedException":
3524
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
3525
- case "InternalServerException":
3526
- case "com.amazonaws.wellarchitected#InternalServerException":
3527
- throw await de_InternalServerExceptionRes(parsedOutput, context);
3528
- case "ThrottlingException":
3529
- case "com.amazonaws.wellarchitected#ThrottlingException":
3530
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
3531
- case "ValidationException":
3532
- case "com.amazonaws.wellarchitected#ValidationException":
3533
- throw await de_ValidationExceptionRes(parsedOutput, context);
3534
- default:
3535
- const parsedBody = parsedOutput.body;
3536
- return throwDefaultError({
3537
- output,
3538
- parsedBody,
3539
- errorCode,
3540
- });
3541
- }
3542
- };
3543
1806
  export const de_ListWorkloadSharesCommand = async (output, context) => {
3544
1807
  if (output.statusCode !== 200 && output.statusCode >= 300) {
3545
- return de_ListWorkloadSharesCommandError(output, context);
1808
+ return de_CommandError(output, context);
3546
1809
  }
3547
1810
  const contents = map({
3548
1811
  $metadata: deserializeMetadata(output),
@@ -3556,40 +1819,9 @@ export const de_ListWorkloadSharesCommand = async (output, context) => {
3556
1819
  Object.assign(contents, doc);
3557
1820
  return contents;
3558
1821
  };
3559
- const de_ListWorkloadSharesCommandError = async (output, context) => {
3560
- const parsedOutput = {
3561
- ...output,
3562
- body: await parseErrorBody(output.body, context),
3563
- };
3564
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
3565
- switch (errorCode) {
3566
- case "AccessDeniedException":
3567
- case "com.amazonaws.wellarchitected#AccessDeniedException":
3568
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
3569
- case "InternalServerException":
3570
- case "com.amazonaws.wellarchitected#InternalServerException":
3571
- throw await de_InternalServerExceptionRes(parsedOutput, context);
3572
- case "ResourceNotFoundException":
3573
- case "com.amazonaws.wellarchitected#ResourceNotFoundException":
3574
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
3575
- case "ThrottlingException":
3576
- case "com.amazonaws.wellarchitected#ThrottlingException":
3577
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
3578
- case "ValidationException":
3579
- case "com.amazonaws.wellarchitected#ValidationException":
3580
- throw await de_ValidationExceptionRes(parsedOutput, context);
3581
- default:
3582
- const parsedBody = parsedOutput.body;
3583
- return throwDefaultError({
3584
- output,
3585
- parsedBody,
3586
- errorCode,
3587
- });
3588
- }
3589
- };
3590
1822
  export const de_TagResourceCommand = async (output, context) => {
3591
1823
  if (output.statusCode !== 200 && output.statusCode >= 300) {
3592
- return de_TagResourceCommandError(output, context);
1824
+ return de_CommandError(output, context);
3593
1825
  }
3594
1826
  const contents = map({
3595
1827
  $metadata: deserializeMetadata(output),
@@ -3597,31 +1829,9 @@ export const de_TagResourceCommand = async (output, context) => {
3597
1829
  await collectBody(output.body, context);
3598
1830
  return contents;
3599
1831
  };
3600
- const de_TagResourceCommandError = async (output, context) => {
3601
- const parsedOutput = {
3602
- ...output,
3603
- body: await parseErrorBody(output.body, context),
3604
- };
3605
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
3606
- switch (errorCode) {
3607
- case "InternalServerException":
3608
- case "com.amazonaws.wellarchitected#InternalServerException":
3609
- throw await de_InternalServerExceptionRes(parsedOutput, context);
3610
- case "ResourceNotFoundException":
3611
- case "com.amazonaws.wellarchitected#ResourceNotFoundException":
3612
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
3613
- default:
3614
- const parsedBody = parsedOutput.body;
3615
- return throwDefaultError({
3616
- output,
3617
- parsedBody,
3618
- errorCode,
3619
- });
3620
- }
3621
- };
3622
1832
  export const de_UntagResourceCommand = async (output, context) => {
3623
1833
  if (output.statusCode !== 200 && output.statusCode >= 300) {
3624
- return de_UntagResourceCommandError(output, context);
1834
+ return de_CommandError(output, context);
3625
1835
  }
3626
1836
  const contents = map({
3627
1837
  $metadata: deserializeMetadata(output),
@@ -3629,31 +1839,9 @@ export const de_UntagResourceCommand = async (output, context) => {
3629
1839
  await collectBody(output.body, context);
3630
1840
  return contents;
3631
1841
  };
3632
- const de_UntagResourceCommandError = async (output, context) => {
3633
- const parsedOutput = {
3634
- ...output,
3635
- body: await parseErrorBody(output.body, context),
3636
- };
3637
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
3638
- switch (errorCode) {
3639
- case "InternalServerException":
3640
- case "com.amazonaws.wellarchitected#InternalServerException":
3641
- throw await de_InternalServerExceptionRes(parsedOutput, context);
3642
- case "ResourceNotFoundException":
3643
- case "com.amazonaws.wellarchitected#ResourceNotFoundException":
3644
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
3645
- default:
3646
- const parsedBody = parsedOutput.body;
3647
- return throwDefaultError({
3648
- output,
3649
- parsedBody,
3650
- errorCode,
3651
- });
3652
- }
3653
- };
3654
1842
  export const de_UpdateAnswerCommand = async (output, context) => {
3655
1843
  if (output.statusCode !== 200 && output.statusCode >= 300) {
3656
- return de_UpdateAnswerCommandError(output, context);
1844
+ return de_CommandError(output, context);
3657
1845
  }
3658
1846
  const contents = map({
3659
1847
  $metadata: deserializeMetadata(output),
@@ -3668,43 +1856,9 @@ export const de_UpdateAnswerCommand = async (output, context) => {
3668
1856
  Object.assign(contents, doc);
3669
1857
  return contents;
3670
1858
  };
3671
- const de_UpdateAnswerCommandError = async (output, context) => {
3672
- const parsedOutput = {
3673
- ...output,
3674
- body: await parseErrorBody(output.body, context),
3675
- };
3676
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
3677
- switch (errorCode) {
3678
- case "AccessDeniedException":
3679
- case "com.amazonaws.wellarchitected#AccessDeniedException":
3680
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
3681
- case "ConflictException":
3682
- case "com.amazonaws.wellarchitected#ConflictException":
3683
- throw await de_ConflictExceptionRes(parsedOutput, context);
3684
- case "InternalServerException":
3685
- case "com.amazonaws.wellarchitected#InternalServerException":
3686
- throw await de_InternalServerExceptionRes(parsedOutput, context);
3687
- case "ResourceNotFoundException":
3688
- case "com.amazonaws.wellarchitected#ResourceNotFoundException":
3689
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
3690
- case "ThrottlingException":
3691
- case "com.amazonaws.wellarchitected#ThrottlingException":
3692
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
3693
- case "ValidationException":
3694
- case "com.amazonaws.wellarchitected#ValidationException":
3695
- throw await de_ValidationExceptionRes(parsedOutput, context);
3696
- default:
3697
- const parsedBody = parsedOutput.body;
3698
- return throwDefaultError({
3699
- output,
3700
- parsedBody,
3701
- errorCode,
3702
- });
3703
- }
3704
- };
3705
1859
  export const de_UpdateGlobalSettingsCommand = async (output, context) => {
3706
1860
  if (output.statusCode !== 200 && output.statusCode >= 300) {
3707
- return de_UpdateGlobalSettingsCommandError(output, context);
1861
+ return de_CommandError(output, context);
3708
1862
  }
3709
1863
  const contents = map({
3710
1864
  $metadata: deserializeMetadata(output),
@@ -3712,40 +1866,9 @@ export const de_UpdateGlobalSettingsCommand = async (output, context) => {
3712
1866
  await collectBody(output.body, context);
3713
1867
  return contents;
3714
1868
  };
3715
- const de_UpdateGlobalSettingsCommandError = async (output, context) => {
3716
- const parsedOutput = {
3717
- ...output,
3718
- body: await parseErrorBody(output.body, context),
3719
- };
3720
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
3721
- switch (errorCode) {
3722
- case "AccessDeniedException":
3723
- case "com.amazonaws.wellarchitected#AccessDeniedException":
3724
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
3725
- case "ConflictException":
3726
- case "com.amazonaws.wellarchitected#ConflictException":
3727
- throw await de_ConflictExceptionRes(parsedOutput, context);
3728
- case "InternalServerException":
3729
- case "com.amazonaws.wellarchitected#InternalServerException":
3730
- throw await de_InternalServerExceptionRes(parsedOutput, context);
3731
- case "ThrottlingException":
3732
- case "com.amazonaws.wellarchitected#ThrottlingException":
3733
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
3734
- case "ValidationException":
3735
- case "com.amazonaws.wellarchitected#ValidationException":
3736
- throw await de_ValidationExceptionRes(parsedOutput, context);
3737
- default:
3738
- const parsedBody = parsedOutput.body;
3739
- return throwDefaultError({
3740
- output,
3741
- parsedBody,
3742
- errorCode,
3743
- });
3744
- }
3745
- };
3746
1869
  export const de_UpdateLensReviewCommand = async (output, context) => {
3747
1870
  if (output.statusCode !== 200 && output.statusCode >= 300) {
3748
- return de_UpdateLensReviewCommandError(output, context);
1871
+ return de_CommandError(output, context);
3749
1872
  }
3750
1873
  const contents = map({
3751
1874
  $metadata: deserializeMetadata(output),
@@ -3758,139 +1881,37 @@ export const de_UpdateLensReviewCommand = async (output, context) => {
3758
1881
  Object.assign(contents, doc);
3759
1882
  return contents;
3760
1883
  };
3761
- const de_UpdateLensReviewCommandError = async (output, context) => {
3762
- const parsedOutput = {
3763
- ...output,
3764
- body: await parseErrorBody(output.body, context),
3765
- };
3766
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
3767
- switch (errorCode) {
3768
- case "AccessDeniedException":
3769
- case "com.amazonaws.wellarchitected#AccessDeniedException":
3770
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
3771
- case "ConflictException":
3772
- case "com.amazonaws.wellarchitected#ConflictException":
3773
- throw await de_ConflictExceptionRes(parsedOutput, context);
3774
- case "InternalServerException":
3775
- case "com.amazonaws.wellarchitected#InternalServerException":
3776
- throw await de_InternalServerExceptionRes(parsedOutput, context);
3777
- case "ResourceNotFoundException":
3778
- case "com.amazonaws.wellarchitected#ResourceNotFoundException":
3779
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
3780
- case "ThrottlingException":
3781
- case "com.amazonaws.wellarchitected#ThrottlingException":
3782
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
3783
- case "ValidationException":
3784
- case "com.amazonaws.wellarchitected#ValidationException":
3785
- throw await de_ValidationExceptionRes(parsedOutput, context);
3786
- default:
3787
- const parsedBody = parsedOutput.body;
3788
- return throwDefaultError({
3789
- output,
3790
- parsedBody,
3791
- errorCode,
3792
- });
3793
- }
3794
- };
3795
1884
  export const de_UpdateProfileCommand = async (output, context) => {
3796
1885
  if (output.statusCode !== 200 && output.statusCode >= 300) {
3797
- return de_UpdateProfileCommandError(output, context);
3798
- }
3799
- const contents = map({
3800
- $metadata: deserializeMetadata(output),
3801
- });
3802
- const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
3803
- const doc = take(data, {
3804
- Profile: (_) => de_Profile(_, context),
3805
- });
3806
- Object.assign(contents, doc);
3807
- return contents;
3808
- };
3809
- const de_UpdateProfileCommandError = async (output, context) => {
3810
- const parsedOutput = {
3811
- ...output,
3812
- body: await parseErrorBody(output.body, context),
3813
- };
3814
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
3815
- switch (errorCode) {
3816
- case "AccessDeniedException":
3817
- case "com.amazonaws.wellarchitected#AccessDeniedException":
3818
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
3819
- case "ConflictException":
3820
- case "com.amazonaws.wellarchitected#ConflictException":
3821
- throw await de_ConflictExceptionRes(parsedOutput, context);
3822
- case "InternalServerException":
3823
- case "com.amazonaws.wellarchitected#InternalServerException":
3824
- throw await de_InternalServerExceptionRes(parsedOutput, context);
3825
- case "ResourceNotFoundException":
3826
- case "com.amazonaws.wellarchitected#ResourceNotFoundException":
3827
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
3828
- case "ThrottlingException":
3829
- case "com.amazonaws.wellarchitected#ThrottlingException":
3830
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
3831
- case "ValidationException":
3832
- case "com.amazonaws.wellarchitected#ValidationException":
3833
- throw await de_ValidationExceptionRes(parsedOutput, context);
3834
- default:
3835
- const parsedBody = parsedOutput.body;
3836
- return throwDefaultError({
3837
- output,
3838
- parsedBody,
3839
- errorCode,
3840
- });
3841
- }
3842
- };
3843
- export const de_UpdateReviewTemplateCommand = async (output, context) => {
3844
- if (output.statusCode !== 200 && output.statusCode >= 300) {
3845
- return de_UpdateReviewTemplateCommandError(output, context);
3846
- }
3847
- const contents = map({
3848
- $metadata: deserializeMetadata(output),
3849
- });
3850
- const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
3851
- const doc = take(data, {
3852
- ReviewTemplate: (_) => de_ReviewTemplate(_, context),
3853
- });
3854
- Object.assign(contents, doc);
3855
- return contents;
3856
- };
3857
- const de_UpdateReviewTemplateCommandError = async (output, context) => {
3858
- const parsedOutput = {
3859
- ...output,
3860
- body: await parseErrorBody(output.body, context),
3861
- };
3862
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
3863
- switch (errorCode) {
3864
- case "AccessDeniedException":
3865
- case "com.amazonaws.wellarchitected#AccessDeniedException":
3866
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
3867
- case "ConflictException":
3868
- case "com.amazonaws.wellarchitected#ConflictException":
3869
- throw await de_ConflictExceptionRes(parsedOutput, context);
3870
- case "InternalServerException":
3871
- case "com.amazonaws.wellarchitected#InternalServerException":
3872
- throw await de_InternalServerExceptionRes(parsedOutput, context);
3873
- case "ResourceNotFoundException":
3874
- case "com.amazonaws.wellarchitected#ResourceNotFoundException":
3875
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
3876
- case "ThrottlingException":
3877
- case "com.amazonaws.wellarchitected#ThrottlingException":
3878
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
3879
- case "ValidationException":
3880
- case "com.amazonaws.wellarchitected#ValidationException":
3881
- throw await de_ValidationExceptionRes(parsedOutput, context);
3882
- default:
3883
- const parsedBody = parsedOutput.body;
3884
- return throwDefaultError({
3885
- output,
3886
- parsedBody,
3887
- errorCode,
3888
- });
1886
+ return de_CommandError(output, context);
3889
1887
  }
1888
+ const contents = map({
1889
+ $metadata: deserializeMetadata(output),
1890
+ });
1891
+ const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
1892
+ const doc = take(data, {
1893
+ Profile: (_) => de_Profile(_, context),
1894
+ });
1895
+ Object.assign(contents, doc);
1896
+ return contents;
1897
+ };
1898
+ export const de_UpdateReviewTemplateCommand = async (output, context) => {
1899
+ if (output.statusCode !== 200 && output.statusCode >= 300) {
1900
+ return de_CommandError(output, context);
1901
+ }
1902
+ const contents = map({
1903
+ $metadata: deserializeMetadata(output),
1904
+ });
1905
+ const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
1906
+ const doc = take(data, {
1907
+ ReviewTemplate: (_) => de_ReviewTemplate(_, context),
1908
+ });
1909
+ Object.assign(contents, doc);
1910
+ return contents;
3890
1911
  };
3891
1912
  export const de_UpdateReviewTemplateAnswerCommand = async (output, context) => {
3892
1913
  if (output.statusCode !== 200 && output.statusCode >= 300) {
3893
- return de_UpdateReviewTemplateAnswerCommandError(output, context);
1914
+ return de_CommandError(output, context);
3894
1915
  }
3895
1916
  const contents = map({
3896
1917
  $metadata: deserializeMetadata(output),
@@ -3904,43 +1925,9 @@ export const de_UpdateReviewTemplateAnswerCommand = async (output, context) => {
3904
1925
  Object.assign(contents, doc);
3905
1926
  return contents;
3906
1927
  };
3907
- const de_UpdateReviewTemplateAnswerCommandError = async (output, context) => {
3908
- const parsedOutput = {
3909
- ...output,
3910
- body: await parseErrorBody(output.body, context),
3911
- };
3912
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
3913
- switch (errorCode) {
3914
- case "AccessDeniedException":
3915
- case "com.amazonaws.wellarchitected#AccessDeniedException":
3916
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
3917
- case "ConflictException":
3918
- case "com.amazonaws.wellarchitected#ConflictException":
3919
- throw await de_ConflictExceptionRes(parsedOutput, context);
3920
- case "InternalServerException":
3921
- case "com.amazonaws.wellarchitected#InternalServerException":
3922
- throw await de_InternalServerExceptionRes(parsedOutput, context);
3923
- case "ResourceNotFoundException":
3924
- case "com.amazonaws.wellarchitected#ResourceNotFoundException":
3925
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
3926
- case "ThrottlingException":
3927
- case "com.amazonaws.wellarchitected#ThrottlingException":
3928
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
3929
- case "ValidationException":
3930
- case "com.amazonaws.wellarchitected#ValidationException":
3931
- throw await de_ValidationExceptionRes(parsedOutput, context);
3932
- default:
3933
- const parsedBody = parsedOutput.body;
3934
- return throwDefaultError({
3935
- output,
3936
- parsedBody,
3937
- errorCode,
3938
- });
3939
- }
3940
- };
3941
1928
  export const de_UpdateReviewTemplateLensReviewCommand = async (output, context) => {
3942
1929
  if (output.statusCode !== 200 && output.statusCode >= 300) {
3943
- return de_UpdateReviewTemplateLensReviewCommandError(output, context);
1930
+ return de_CommandError(output, context);
3944
1931
  }
3945
1932
  const contents = map({
3946
1933
  $metadata: deserializeMetadata(output),
@@ -3953,43 +1940,9 @@ export const de_UpdateReviewTemplateLensReviewCommand = async (output, context)
3953
1940
  Object.assign(contents, doc);
3954
1941
  return contents;
3955
1942
  };
3956
- const de_UpdateReviewTemplateLensReviewCommandError = async (output, context) => {
3957
- const parsedOutput = {
3958
- ...output,
3959
- body: await parseErrorBody(output.body, context),
3960
- };
3961
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
3962
- switch (errorCode) {
3963
- case "AccessDeniedException":
3964
- case "com.amazonaws.wellarchitected#AccessDeniedException":
3965
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
3966
- case "ConflictException":
3967
- case "com.amazonaws.wellarchitected#ConflictException":
3968
- throw await de_ConflictExceptionRes(parsedOutput, context);
3969
- case "InternalServerException":
3970
- case "com.amazonaws.wellarchitected#InternalServerException":
3971
- throw await de_InternalServerExceptionRes(parsedOutput, context);
3972
- case "ResourceNotFoundException":
3973
- case "com.amazonaws.wellarchitected#ResourceNotFoundException":
3974
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
3975
- case "ThrottlingException":
3976
- case "com.amazonaws.wellarchitected#ThrottlingException":
3977
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
3978
- case "ValidationException":
3979
- case "com.amazonaws.wellarchitected#ValidationException":
3980
- throw await de_ValidationExceptionRes(parsedOutput, context);
3981
- default:
3982
- const parsedBody = parsedOutput.body;
3983
- return throwDefaultError({
3984
- output,
3985
- parsedBody,
3986
- errorCode,
3987
- });
3988
- }
3989
- };
3990
1943
  export const de_UpdateShareInvitationCommand = async (output, context) => {
3991
1944
  if (output.statusCode !== 200 && output.statusCode >= 300) {
3992
- return de_UpdateShareInvitationCommandError(output, context);
1945
+ return de_CommandError(output, context);
3993
1946
  }
3994
1947
  const contents = map({
3995
1948
  $metadata: deserializeMetadata(output),
@@ -4001,43 +1954,9 @@ export const de_UpdateShareInvitationCommand = async (output, context) => {
4001
1954
  Object.assign(contents, doc);
4002
1955
  return contents;
4003
1956
  };
4004
- const de_UpdateShareInvitationCommandError = async (output, context) => {
4005
- const parsedOutput = {
4006
- ...output,
4007
- body: await parseErrorBody(output.body, context),
4008
- };
4009
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
4010
- switch (errorCode) {
4011
- case "AccessDeniedException":
4012
- case "com.amazonaws.wellarchitected#AccessDeniedException":
4013
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
4014
- case "ConflictException":
4015
- case "com.amazonaws.wellarchitected#ConflictException":
4016
- throw await de_ConflictExceptionRes(parsedOutput, context);
4017
- case "InternalServerException":
4018
- case "com.amazonaws.wellarchitected#InternalServerException":
4019
- throw await de_InternalServerExceptionRes(parsedOutput, context);
4020
- case "ResourceNotFoundException":
4021
- case "com.amazonaws.wellarchitected#ResourceNotFoundException":
4022
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
4023
- case "ThrottlingException":
4024
- case "com.amazonaws.wellarchitected#ThrottlingException":
4025
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
4026
- case "ValidationException":
4027
- case "com.amazonaws.wellarchitected#ValidationException":
4028
- throw await de_ValidationExceptionRes(parsedOutput, context);
4029
- default:
4030
- const parsedBody = parsedOutput.body;
4031
- return throwDefaultError({
4032
- output,
4033
- parsedBody,
4034
- errorCode,
4035
- });
4036
- }
4037
- };
4038
1957
  export const de_UpdateWorkloadCommand = async (output, context) => {
4039
1958
  if (output.statusCode !== 200 && output.statusCode >= 300) {
4040
- return de_UpdateWorkloadCommandError(output, context);
1959
+ return de_CommandError(output, context);
4041
1960
  }
4042
1961
  const contents = map({
4043
1962
  $metadata: deserializeMetadata(output),
@@ -4049,43 +1968,9 @@ export const de_UpdateWorkloadCommand = async (output, context) => {
4049
1968
  Object.assign(contents, doc);
4050
1969
  return contents;
4051
1970
  };
4052
- const de_UpdateWorkloadCommandError = async (output, context) => {
4053
- const parsedOutput = {
4054
- ...output,
4055
- body: await parseErrorBody(output.body, context),
4056
- };
4057
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
4058
- switch (errorCode) {
4059
- case "AccessDeniedException":
4060
- case "com.amazonaws.wellarchitected#AccessDeniedException":
4061
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
4062
- case "ConflictException":
4063
- case "com.amazonaws.wellarchitected#ConflictException":
4064
- throw await de_ConflictExceptionRes(parsedOutput, context);
4065
- case "InternalServerException":
4066
- case "com.amazonaws.wellarchitected#InternalServerException":
4067
- throw await de_InternalServerExceptionRes(parsedOutput, context);
4068
- case "ResourceNotFoundException":
4069
- case "com.amazonaws.wellarchitected#ResourceNotFoundException":
4070
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
4071
- case "ThrottlingException":
4072
- case "com.amazonaws.wellarchitected#ThrottlingException":
4073
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
4074
- case "ValidationException":
4075
- case "com.amazonaws.wellarchitected#ValidationException":
4076
- throw await de_ValidationExceptionRes(parsedOutput, context);
4077
- default:
4078
- const parsedBody = parsedOutput.body;
4079
- return throwDefaultError({
4080
- output,
4081
- parsedBody,
4082
- errorCode,
4083
- });
4084
- }
4085
- };
4086
1971
  export const de_UpdateWorkloadShareCommand = async (output, context) => {
4087
1972
  if (output.statusCode !== 200 && output.statusCode >= 300) {
4088
- return de_UpdateWorkloadShareCommandError(output, context);
1973
+ return de_CommandError(output, context);
4089
1974
  }
4090
1975
  const contents = map({
4091
1976
  $metadata: deserializeMetadata(output),
@@ -4098,43 +1983,9 @@ export const de_UpdateWorkloadShareCommand = async (output, context) => {
4098
1983
  Object.assign(contents, doc);
4099
1984
  return contents;
4100
1985
  };
4101
- const de_UpdateWorkloadShareCommandError = async (output, context) => {
4102
- const parsedOutput = {
4103
- ...output,
4104
- body: await parseErrorBody(output.body, context),
4105
- };
4106
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
4107
- switch (errorCode) {
4108
- case "AccessDeniedException":
4109
- case "com.amazonaws.wellarchitected#AccessDeniedException":
4110
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
4111
- case "ConflictException":
4112
- case "com.amazonaws.wellarchitected#ConflictException":
4113
- throw await de_ConflictExceptionRes(parsedOutput, context);
4114
- case "InternalServerException":
4115
- case "com.amazonaws.wellarchitected#InternalServerException":
4116
- throw await de_InternalServerExceptionRes(parsedOutput, context);
4117
- case "ResourceNotFoundException":
4118
- case "com.amazonaws.wellarchitected#ResourceNotFoundException":
4119
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
4120
- case "ThrottlingException":
4121
- case "com.amazonaws.wellarchitected#ThrottlingException":
4122
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
4123
- case "ValidationException":
4124
- case "com.amazonaws.wellarchitected#ValidationException":
4125
- throw await de_ValidationExceptionRes(parsedOutput, context);
4126
- default:
4127
- const parsedBody = parsedOutput.body;
4128
- return throwDefaultError({
4129
- output,
4130
- parsedBody,
4131
- errorCode,
4132
- });
4133
- }
4134
- };
4135
1986
  export const de_UpgradeLensReviewCommand = async (output, context) => {
4136
1987
  if (output.statusCode !== 200 && output.statusCode >= 300) {
4137
- return de_UpgradeLensReviewCommandError(output, context);
1988
+ return de_CommandError(output, context);
4138
1989
  }
4139
1990
  const contents = map({
4140
1991
  $metadata: deserializeMetadata(output),
@@ -4142,43 +1993,9 @@ export const de_UpgradeLensReviewCommand = async (output, context) => {
4142
1993
  await collectBody(output.body, context);
4143
1994
  return contents;
4144
1995
  };
4145
- const de_UpgradeLensReviewCommandError = async (output, context) => {
4146
- const parsedOutput = {
4147
- ...output,
4148
- body: await parseErrorBody(output.body, context),
4149
- };
4150
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
4151
- switch (errorCode) {
4152
- case "AccessDeniedException":
4153
- case "com.amazonaws.wellarchitected#AccessDeniedException":
4154
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
4155
- case "ConflictException":
4156
- case "com.amazonaws.wellarchitected#ConflictException":
4157
- throw await de_ConflictExceptionRes(parsedOutput, context);
4158
- case "InternalServerException":
4159
- case "com.amazonaws.wellarchitected#InternalServerException":
4160
- throw await de_InternalServerExceptionRes(parsedOutput, context);
4161
- case "ResourceNotFoundException":
4162
- case "com.amazonaws.wellarchitected#ResourceNotFoundException":
4163
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
4164
- case "ThrottlingException":
4165
- case "com.amazonaws.wellarchitected#ThrottlingException":
4166
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
4167
- case "ValidationException":
4168
- case "com.amazonaws.wellarchitected#ValidationException":
4169
- throw await de_ValidationExceptionRes(parsedOutput, context);
4170
- default:
4171
- const parsedBody = parsedOutput.body;
4172
- return throwDefaultError({
4173
- output,
4174
- parsedBody,
4175
- errorCode,
4176
- });
4177
- }
4178
- };
4179
1996
  export const de_UpgradeProfileVersionCommand = async (output, context) => {
4180
1997
  if (output.statusCode !== 200 && output.statusCode >= 300) {
4181
- return de_UpgradeProfileVersionCommandError(output, context);
1998
+ return de_CommandError(output, context);
4182
1999
  }
4183
2000
  const contents = map({
4184
2001
  $metadata: deserializeMetadata(output),
@@ -4186,43 +2003,9 @@ export const de_UpgradeProfileVersionCommand = async (output, context) => {
4186
2003
  await collectBody(output.body, context);
4187
2004
  return contents;
4188
2005
  };
4189
- const de_UpgradeProfileVersionCommandError = async (output, context) => {
4190
- const parsedOutput = {
4191
- ...output,
4192
- body: await parseErrorBody(output.body, context),
4193
- };
4194
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
4195
- switch (errorCode) {
4196
- case "AccessDeniedException":
4197
- case "com.amazonaws.wellarchitected#AccessDeniedException":
4198
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
4199
- case "ConflictException":
4200
- case "com.amazonaws.wellarchitected#ConflictException":
4201
- throw await de_ConflictExceptionRes(parsedOutput, context);
4202
- case "InternalServerException":
4203
- case "com.amazonaws.wellarchitected#InternalServerException":
4204
- throw await de_InternalServerExceptionRes(parsedOutput, context);
4205
- case "ResourceNotFoundException":
4206
- case "com.amazonaws.wellarchitected#ResourceNotFoundException":
4207
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
4208
- case "ThrottlingException":
4209
- case "com.amazonaws.wellarchitected#ThrottlingException":
4210
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
4211
- case "ValidationException":
4212
- case "com.amazonaws.wellarchitected#ValidationException":
4213
- throw await de_ValidationExceptionRes(parsedOutput, context);
4214
- default:
4215
- const parsedBody = parsedOutput.body;
4216
- return throwDefaultError({
4217
- output,
4218
- parsedBody,
4219
- errorCode,
4220
- });
4221
- }
4222
- };
4223
2006
  export const de_UpgradeReviewTemplateLensReviewCommand = async (output, context) => {
4224
2007
  if (output.statusCode !== 200 && output.statusCode >= 300) {
4225
- return de_UpgradeReviewTemplateLensReviewCommandError(output, context);
2008
+ return de_CommandError(output, context);
4226
2009
  }
4227
2010
  const contents = map({
4228
2011
  $metadata: deserializeMetadata(output),
@@ -4230,7 +2013,7 @@ export const de_UpgradeReviewTemplateLensReviewCommand = async (output, context)
4230
2013
  await collectBody(output.body, context);
4231
2014
  return contents;
4232
2015
  };
4233
- const de_UpgradeReviewTemplateLensReviewCommandError = async (output, context) => {
2016
+ const de_CommandError = async (output, context) => {
4234
2017
  const parsedOutput = {
4235
2018
  ...output,
4236
2019
  body: await parseErrorBody(output.body, context),
@@ -4255,6 +2038,9 @@ const de_UpgradeReviewTemplateLensReviewCommandError = async (output, context) =
4255
2038
  case "ValidationException":
4256
2039
  case "com.amazonaws.wellarchitected#ValidationException":
4257
2040
  throw await de_ValidationExceptionRes(parsedOutput, context);
2041
+ case "ServiceQuotaExceededException":
2042
+ case "com.amazonaws.wellarchitected#ServiceQuotaExceededException":
2043
+ throw await de_ServiceQuotaExceededExceptionRes(parsedOutput, context);
4258
2044
  default:
4259
2045
  const parsedBody = parsedOutput.body;
4260
2046
  return throwDefaultError({