@aws-sdk/client-lakeformation 3.131.0 → 3.142.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (97) hide show
  1. package/CHANGELOG.md +33 -0
  2. package/README.md +1 -1
  3. package/dist-cjs/commands/AddLFTagsToResourceCommand.js +2 -2
  4. package/dist-cjs/commands/BatchGrantPermissionsCommand.js +2 -2
  5. package/dist-cjs/commands/BatchRevokePermissionsCommand.js +2 -2
  6. package/dist-cjs/commands/CancelTransactionCommand.js +2 -2
  7. package/dist-cjs/commands/CommitTransactionCommand.js +2 -2
  8. package/dist-cjs/commands/CreateDataCellsFilterCommand.js +2 -2
  9. package/dist-cjs/commands/CreateLFTagCommand.js +2 -2
  10. package/dist-cjs/commands/DeleteDataCellsFilterCommand.js +2 -2
  11. package/dist-cjs/commands/DeleteLFTagCommand.js +2 -2
  12. package/dist-cjs/commands/DeleteObjectsOnCancelCommand.js +2 -2
  13. package/dist-cjs/commands/DeregisterResourceCommand.js +2 -2
  14. package/dist-cjs/commands/DescribeResourceCommand.js +2 -2
  15. package/dist-cjs/commands/DescribeTransactionCommand.js +2 -2
  16. package/dist-cjs/commands/ExtendTransactionCommand.js +2 -2
  17. package/dist-cjs/commands/GetDataLakeSettingsCommand.js +2 -2
  18. package/dist-cjs/commands/GetEffectivePermissionsForPathCommand.js +2 -2
  19. package/dist-cjs/commands/GetLFTagCommand.js +2 -2
  20. package/dist-cjs/commands/GetQueryStateCommand.js +2 -2
  21. package/dist-cjs/commands/GetQueryStatisticsCommand.js +2 -2
  22. package/dist-cjs/commands/GetResourceLFTagsCommand.js +2 -2
  23. package/dist-cjs/commands/GetTableObjectsCommand.js +2 -2
  24. package/dist-cjs/commands/GetTemporaryGluePartitionCredentialsCommand.js +2 -2
  25. package/dist-cjs/commands/GetTemporaryGlueTableCredentialsCommand.js +2 -2
  26. package/dist-cjs/commands/GetWorkUnitResultsCommand.js +2 -2
  27. package/dist-cjs/commands/GetWorkUnitsCommand.js +2 -2
  28. package/dist-cjs/commands/GrantPermissionsCommand.js +2 -2
  29. package/dist-cjs/commands/ListDataCellsFilterCommand.js +2 -2
  30. package/dist-cjs/commands/ListLFTagsCommand.js +2 -2
  31. package/dist-cjs/commands/ListPermissionsCommand.js +2 -2
  32. package/dist-cjs/commands/ListResourcesCommand.js +2 -2
  33. package/dist-cjs/commands/ListTableStorageOptimizersCommand.js +2 -2
  34. package/dist-cjs/commands/ListTransactionsCommand.js +2 -2
  35. package/dist-cjs/commands/PutDataLakeSettingsCommand.js +2 -2
  36. package/dist-cjs/commands/RegisterResourceCommand.js +2 -2
  37. package/dist-cjs/commands/RemoveLFTagsFromResourceCommand.js +2 -2
  38. package/dist-cjs/commands/RevokePermissionsCommand.js +2 -2
  39. package/dist-cjs/commands/SearchDatabasesByLFTagsCommand.js +2 -2
  40. package/dist-cjs/commands/SearchTablesByLFTagsCommand.js +2 -2
  41. package/dist-cjs/commands/StartQueryPlanningCommand.js +2 -2
  42. package/dist-cjs/commands/StartTransactionCommand.js +2 -2
  43. package/dist-cjs/commands/UpdateLFTagCommand.js +2 -2
  44. package/dist-cjs/commands/UpdateResourceCommand.js +2 -2
  45. package/dist-cjs/commands/UpdateTableObjectsCommand.js +2 -2
  46. package/dist-cjs/commands/UpdateTableStorageOptimizerCommand.js +2 -2
  47. package/dist-cjs/models/models_0.js +534 -798
  48. package/dist-cjs/protocols/Aws_restJson1.js +442 -678
  49. package/dist-es/commands/AddLFTagsToResourceCommand.js +3 -3
  50. package/dist-es/commands/BatchGrantPermissionsCommand.js +3 -3
  51. package/dist-es/commands/BatchRevokePermissionsCommand.js +3 -3
  52. package/dist-es/commands/CancelTransactionCommand.js +3 -3
  53. package/dist-es/commands/CommitTransactionCommand.js +3 -3
  54. package/dist-es/commands/CreateDataCellsFilterCommand.js +3 -3
  55. package/dist-es/commands/CreateLFTagCommand.js +3 -3
  56. package/dist-es/commands/DeleteDataCellsFilterCommand.js +3 -3
  57. package/dist-es/commands/DeleteLFTagCommand.js +3 -3
  58. package/dist-es/commands/DeleteObjectsOnCancelCommand.js +3 -3
  59. package/dist-es/commands/DeregisterResourceCommand.js +3 -3
  60. package/dist-es/commands/DescribeResourceCommand.js +3 -3
  61. package/dist-es/commands/DescribeTransactionCommand.js +3 -3
  62. package/dist-es/commands/ExtendTransactionCommand.js +3 -3
  63. package/dist-es/commands/GetDataLakeSettingsCommand.js +3 -3
  64. package/dist-es/commands/GetEffectivePermissionsForPathCommand.js +3 -3
  65. package/dist-es/commands/GetLFTagCommand.js +3 -3
  66. package/dist-es/commands/GetQueryStateCommand.js +3 -3
  67. package/dist-es/commands/GetQueryStatisticsCommand.js +3 -3
  68. package/dist-es/commands/GetResourceLFTagsCommand.js +3 -3
  69. package/dist-es/commands/GetTableObjectsCommand.js +3 -3
  70. package/dist-es/commands/GetTemporaryGluePartitionCredentialsCommand.js +3 -3
  71. package/dist-es/commands/GetTemporaryGlueTableCredentialsCommand.js +3 -3
  72. package/dist-es/commands/GetWorkUnitResultsCommand.js +3 -3
  73. package/dist-es/commands/GetWorkUnitsCommand.js +3 -3
  74. package/dist-es/commands/GrantPermissionsCommand.js +3 -3
  75. package/dist-es/commands/ListDataCellsFilterCommand.js +3 -3
  76. package/dist-es/commands/ListLFTagsCommand.js +3 -3
  77. package/dist-es/commands/ListPermissionsCommand.js +3 -3
  78. package/dist-es/commands/ListResourcesCommand.js +3 -3
  79. package/dist-es/commands/ListTableStorageOptimizersCommand.js +3 -3
  80. package/dist-es/commands/ListTransactionsCommand.js +3 -3
  81. package/dist-es/commands/PutDataLakeSettingsCommand.js +3 -3
  82. package/dist-es/commands/RegisterResourceCommand.js +3 -3
  83. package/dist-es/commands/RemoveLFTagsFromResourceCommand.js +3 -3
  84. package/dist-es/commands/RevokePermissionsCommand.js +3 -3
  85. package/dist-es/commands/SearchDatabasesByLFTagsCommand.js +3 -3
  86. package/dist-es/commands/SearchTablesByLFTagsCommand.js +3 -3
  87. package/dist-es/commands/StartQueryPlanningCommand.js +3 -3
  88. package/dist-es/commands/StartTransactionCommand.js +3 -3
  89. package/dist-es/commands/UpdateLFTagCommand.js +3 -3
  90. package/dist-es/commands/UpdateResourceCommand.js +3 -3
  91. package/dist-es/commands/UpdateTableObjectsCommand.js +3 -3
  92. package/dist-es/commands/UpdateTableStorageOptimizerCommand.js +3 -3
  93. package/dist-es/models/models_0.js +132 -528
  94. package/dist-es/protocols/Aws_restJson1.js +575 -679
  95. package/dist-types/models/models_0.d.ts +528 -792
  96. package/dist-types/ts3.4/models/models_0.d.ts +264 -528
  97. package/package.json +6 -6
@@ -1091,15 +1091,14 @@ const deserializeAws_restJson1AddLFTagsToResourceCommand = async (output, contex
1091
1091
  if (output.statusCode !== 200 && output.statusCode >= 300) {
1092
1092
  return deserializeAws_restJson1AddLFTagsToResourceCommandError(output, context);
1093
1093
  }
1094
- const contents = {
1094
+ const contents = map({
1095
1095
  $metadata: deserializeMetadata(output),
1096
- Failures: undefined,
1097
- };
1096
+ });
1098
1097
  const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
1099
- if (data.Failures !== undefined && data.Failures !== null) {
1098
+ if (data.Failures != null) {
1100
1099
  contents.Failures = deserializeAws_restJson1LFTagErrors(data.Failures, context);
1101
1100
  }
1102
- return Promise.resolve(contents);
1101
+ return contents;
1103
1102
  };
1104
1103
  exports.deserializeAws_restJson1AddLFTagsToResourceCommand = deserializeAws_restJson1AddLFTagsToResourceCommand;
1105
1104
  const deserializeAws_restJson1AddLFTagsToResourceCommandError = async (output, context) => {
@@ -1107,7 +1106,6 @@ const deserializeAws_restJson1AddLFTagsToResourceCommandError = async (output, c
1107
1106
  ...output,
1108
1107
  body: await parseBody(output.body, context),
1109
1108
  };
1110
- let response;
1111
1109
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1112
1110
  switch (errorCode) {
1113
1111
  case "AccessDeniedException":
@@ -1130,29 +1128,26 @@ const deserializeAws_restJson1AddLFTagsToResourceCommandError = async (output, c
1130
1128
  throw await deserializeAws_restJson1OperationTimeoutExceptionResponse(parsedOutput, context);
1131
1129
  default:
1132
1130
  const parsedBody = parsedOutput.body;
1133
- const $metadata = deserializeMetadata(output);
1134
- const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
1135
- response = new LakeFormationServiceException_1.LakeFormationServiceException({
1136
- name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
1137
- $fault: "client",
1138
- $metadata,
1131
+ (0, smithy_client_1.throwDefaultError)({
1132
+ output,
1133
+ parsedBody,
1134
+ exceptionCtor: LakeFormationServiceException_1.LakeFormationServiceException,
1135
+ errorCode,
1139
1136
  });
1140
- throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
1141
1137
  }
1142
1138
  };
1143
1139
  const deserializeAws_restJson1BatchGrantPermissionsCommand = async (output, context) => {
1144
1140
  if (output.statusCode !== 200 && output.statusCode >= 300) {
1145
1141
  return deserializeAws_restJson1BatchGrantPermissionsCommandError(output, context);
1146
1142
  }
1147
- const contents = {
1143
+ const contents = map({
1148
1144
  $metadata: deserializeMetadata(output),
1149
- Failures: undefined,
1150
- };
1145
+ });
1151
1146
  const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
1152
- if (data.Failures !== undefined && data.Failures !== null) {
1147
+ if (data.Failures != null) {
1153
1148
  contents.Failures = deserializeAws_restJson1BatchPermissionsFailureList(data.Failures, context);
1154
1149
  }
1155
- return Promise.resolve(contents);
1150
+ return contents;
1156
1151
  };
1157
1152
  exports.deserializeAws_restJson1BatchGrantPermissionsCommand = deserializeAws_restJson1BatchGrantPermissionsCommand;
1158
1153
  const deserializeAws_restJson1BatchGrantPermissionsCommandError = async (output, context) => {
@@ -1160,7 +1155,6 @@ const deserializeAws_restJson1BatchGrantPermissionsCommandError = async (output,
1160
1155
  ...output,
1161
1156
  body: await parseBody(output.body, context),
1162
1157
  };
1163
- let response;
1164
1158
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1165
1159
  switch (errorCode) {
1166
1160
  case "InvalidInputException":
@@ -1171,29 +1165,26 @@ const deserializeAws_restJson1BatchGrantPermissionsCommandError = async (output,
1171
1165
  throw await deserializeAws_restJson1OperationTimeoutExceptionResponse(parsedOutput, context);
1172
1166
  default:
1173
1167
  const parsedBody = parsedOutput.body;
1174
- const $metadata = deserializeMetadata(output);
1175
- const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
1176
- response = new LakeFormationServiceException_1.LakeFormationServiceException({
1177
- name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
1178
- $fault: "client",
1179
- $metadata,
1168
+ (0, smithy_client_1.throwDefaultError)({
1169
+ output,
1170
+ parsedBody,
1171
+ exceptionCtor: LakeFormationServiceException_1.LakeFormationServiceException,
1172
+ errorCode,
1180
1173
  });
1181
- throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
1182
1174
  }
1183
1175
  };
1184
1176
  const deserializeAws_restJson1BatchRevokePermissionsCommand = async (output, context) => {
1185
1177
  if (output.statusCode !== 200 && output.statusCode >= 300) {
1186
1178
  return deserializeAws_restJson1BatchRevokePermissionsCommandError(output, context);
1187
1179
  }
1188
- const contents = {
1180
+ const contents = map({
1189
1181
  $metadata: deserializeMetadata(output),
1190
- Failures: undefined,
1191
- };
1182
+ });
1192
1183
  const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
1193
- if (data.Failures !== undefined && data.Failures !== null) {
1184
+ if (data.Failures != null) {
1194
1185
  contents.Failures = deserializeAws_restJson1BatchPermissionsFailureList(data.Failures, context);
1195
1186
  }
1196
- return Promise.resolve(contents);
1187
+ return contents;
1197
1188
  };
1198
1189
  exports.deserializeAws_restJson1BatchRevokePermissionsCommand = deserializeAws_restJson1BatchRevokePermissionsCommand;
1199
1190
  const deserializeAws_restJson1BatchRevokePermissionsCommandError = async (output, context) => {
@@ -1201,7 +1192,6 @@ const deserializeAws_restJson1BatchRevokePermissionsCommandError = async (output
1201
1192
  ...output,
1202
1193
  body: await parseBody(output.body, context),
1203
1194
  };
1204
- let response;
1205
1195
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1206
1196
  switch (errorCode) {
1207
1197
  case "InvalidInputException":
@@ -1212,25 +1202,23 @@ const deserializeAws_restJson1BatchRevokePermissionsCommandError = async (output
1212
1202
  throw await deserializeAws_restJson1OperationTimeoutExceptionResponse(parsedOutput, context);
1213
1203
  default:
1214
1204
  const parsedBody = parsedOutput.body;
1215
- const $metadata = deserializeMetadata(output);
1216
- const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
1217
- response = new LakeFormationServiceException_1.LakeFormationServiceException({
1218
- name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
1219
- $fault: "client",
1220
- $metadata,
1205
+ (0, smithy_client_1.throwDefaultError)({
1206
+ output,
1207
+ parsedBody,
1208
+ exceptionCtor: LakeFormationServiceException_1.LakeFormationServiceException,
1209
+ errorCode,
1221
1210
  });
1222
- throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
1223
1211
  }
1224
1212
  };
1225
1213
  const deserializeAws_restJson1CancelTransactionCommand = async (output, context) => {
1226
1214
  if (output.statusCode !== 200 && output.statusCode >= 300) {
1227
1215
  return deserializeAws_restJson1CancelTransactionCommandError(output, context);
1228
1216
  }
1229
- const contents = {
1217
+ const contents = map({
1230
1218
  $metadata: deserializeMetadata(output),
1231
- };
1219
+ });
1232
1220
  await collectBody(output.body, context);
1233
- return Promise.resolve(contents);
1221
+ return contents;
1234
1222
  };
1235
1223
  exports.deserializeAws_restJson1CancelTransactionCommand = deserializeAws_restJson1CancelTransactionCommand;
1236
1224
  const deserializeAws_restJson1CancelTransactionCommandError = async (output, context) => {
@@ -1238,7 +1226,6 @@ const deserializeAws_restJson1CancelTransactionCommandError = async (output, con
1238
1226
  ...output,
1239
1227
  body: await parseBody(output.body, context),
1240
1228
  };
1241
- let response;
1242
1229
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1243
1230
  switch (errorCode) {
1244
1231
  case "ConcurrentModificationException":
@@ -1264,29 +1251,26 @@ const deserializeAws_restJson1CancelTransactionCommandError = async (output, con
1264
1251
  throw await deserializeAws_restJson1TransactionCommittedExceptionResponse(parsedOutput, context);
1265
1252
  default:
1266
1253
  const parsedBody = parsedOutput.body;
1267
- const $metadata = deserializeMetadata(output);
1268
- const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
1269
- response = new LakeFormationServiceException_1.LakeFormationServiceException({
1270
- name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
1271
- $fault: "client",
1272
- $metadata,
1254
+ (0, smithy_client_1.throwDefaultError)({
1255
+ output,
1256
+ parsedBody,
1257
+ exceptionCtor: LakeFormationServiceException_1.LakeFormationServiceException,
1258
+ errorCode,
1273
1259
  });
1274
- throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
1275
1260
  }
1276
1261
  };
1277
1262
  const deserializeAws_restJson1CommitTransactionCommand = async (output, context) => {
1278
1263
  if (output.statusCode !== 200 && output.statusCode >= 300) {
1279
1264
  return deserializeAws_restJson1CommitTransactionCommandError(output, context);
1280
1265
  }
1281
- const contents = {
1266
+ const contents = map({
1282
1267
  $metadata: deserializeMetadata(output),
1283
- TransactionStatus: undefined,
1284
- };
1268
+ });
1285
1269
  const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
1286
- if (data.TransactionStatus !== undefined && data.TransactionStatus !== null) {
1270
+ if (data.TransactionStatus != null) {
1287
1271
  contents.TransactionStatus = (0, smithy_client_1.expectString)(data.TransactionStatus);
1288
1272
  }
1289
- return Promise.resolve(contents);
1273
+ return contents;
1290
1274
  };
1291
1275
  exports.deserializeAws_restJson1CommitTransactionCommand = deserializeAws_restJson1CommitTransactionCommand;
1292
1276
  const deserializeAws_restJson1CommitTransactionCommandError = async (output, context) => {
@@ -1294,7 +1278,6 @@ const deserializeAws_restJson1CommitTransactionCommandError = async (output, con
1294
1278
  ...output,
1295
1279
  body: await parseBody(output.body, context),
1296
1280
  };
1297
- let response;
1298
1281
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1299
1282
  switch (errorCode) {
1300
1283
  case "ConcurrentModificationException":
@@ -1317,25 +1300,23 @@ const deserializeAws_restJson1CommitTransactionCommandError = async (output, con
1317
1300
  throw await deserializeAws_restJson1TransactionCanceledExceptionResponse(parsedOutput, context);
1318
1301
  default:
1319
1302
  const parsedBody = parsedOutput.body;
1320
- const $metadata = deserializeMetadata(output);
1321
- const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
1322
- response = new LakeFormationServiceException_1.LakeFormationServiceException({
1323
- name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
1324
- $fault: "client",
1325
- $metadata,
1303
+ (0, smithy_client_1.throwDefaultError)({
1304
+ output,
1305
+ parsedBody,
1306
+ exceptionCtor: LakeFormationServiceException_1.LakeFormationServiceException,
1307
+ errorCode,
1326
1308
  });
1327
- throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
1328
1309
  }
1329
1310
  };
1330
1311
  const deserializeAws_restJson1CreateDataCellsFilterCommand = async (output, context) => {
1331
1312
  if (output.statusCode !== 200 && output.statusCode >= 300) {
1332
1313
  return deserializeAws_restJson1CreateDataCellsFilterCommandError(output, context);
1333
1314
  }
1334
- const contents = {
1315
+ const contents = map({
1335
1316
  $metadata: deserializeMetadata(output),
1336
- };
1317
+ });
1337
1318
  await collectBody(output.body, context);
1338
- return Promise.resolve(contents);
1319
+ return contents;
1339
1320
  };
1340
1321
  exports.deserializeAws_restJson1CreateDataCellsFilterCommand = deserializeAws_restJson1CreateDataCellsFilterCommand;
1341
1322
  const deserializeAws_restJson1CreateDataCellsFilterCommandError = async (output, context) => {
@@ -1343,7 +1324,6 @@ const deserializeAws_restJson1CreateDataCellsFilterCommandError = async (output,
1343
1324
  ...output,
1344
1325
  body: await parseBody(output.body, context),
1345
1326
  };
1346
- let response;
1347
1327
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1348
1328
  switch (errorCode) {
1349
1329
  case "AccessDeniedException":
@@ -1369,25 +1349,23 @@ const deserializeAws_restJson1CreateDataCellsFilterCommandError = async (output,
1369
1349
  throw await deserializeAws_restJson1ResourceNumberLimitExceededExceptionResponse(parsedOutput, context);
1370
1350
  default:
1371
1351
  const parsedBody = parsedOutput.body;
1372
- const $metadata = deserializeMetadata(output);
1373
- const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
1374
- response = new LakeFormationServiceException_1.LakeFormationServiceException({
1375
- name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
1376
- $fault: "client",
1377
- $metadata,
1352
+ (0, smithy_client_1.throwDefaultError)({
1353
+ output,
1354
+ parsedBody,
1355
+ exceptionCtor: LakeFormationServiceException_1.LakeFormationServiceException,
1356
+ errorCode,
1378
1357
  });
1379
- throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
1380
1358
  }
1381
1359
  };
1382
1360
  const deserializeAws_restJson1CreateLFTagCommand = async (output, context) => {
1383
1361
  if (output.statusCode !== 200 && output.statusCode >= 300) {
1384
1362
  return deserializeAws_restJson1CreateLFTagCommandError(output, context);
1385
1363
  }
1386
- const contents = {
1364
+ const contents = map({
1387
1365
  $metadata: deserializeMetadata(output),
1388
- };
1366
+ });
1389
1367
  await collectBody(output.body, context);
1390
- return Promise.resolve(contents);
1368
+ return contents;
1391
1369
  };
1392
1370
  exports.deserializeAws_restJson1CreateLFTagCommand = deserializeAws_restJson1CreateLFTagCommand;
1393
1371
  const deserializeAws_restJson1CreateLFTagCommandError = async (output, context) => {
@@ -1395,7 +1373,6 @@ const deserializeAws_restJson1CreateLFTagCommandError = async (output, context)
1395
1373
  ...output,
1396
1374
  body: await parseBody(output.body, context),
1397
1375
  };
1398
- let response;
1399
1376
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1400
1377
  switch (errorCode) {
1401
1378
  case "AccessDeniedException":
@@ -1418,25 +1395,23 @@ const deserializeAws_restJson1CreateLFTagCommandError = async (output, context)
1418
1395
  throw await deserializeAws_restJson1ResourceNumberLimitExceededExceptionResponse(parsedOutput, context);
1419
1396
  default:
1420
1397
  const parsedBody = parsedOutput.body;
1421
- const $metadata = deserializeMetadata(output);
1422
- const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
1423
- response = new LakeFormationServiceException_1.LakeFormationServiceException({
1424
- name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
1425
- $fault: "client",
1426
- $metadata,
1398
+ (0, smithy_client_1.throwDefaultError)({
1399
+ output,
1400
+ parsedBody,
1401
+ exceptionCtor: LakeFormationServiceException_1.LakeFormationServiceException,
1402
+ errorCode,
1427
1403
  });
1428
- throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
1429
1404
  }
1430
1405
  };
1431
1406
  const deserializeAws_restJson1DeleteDataCellsFilterCommand = async (output, context) => {
1432
1407
  if (output.statusCode !== 200 && output.statusCode >= 300) {
1433
1408
  return deserializeAws_restJson1DeleteDataCellsFilterCommandError(output, context);
1434
1409
  }
1435
- const contents = {
1410
+ const contents = map({
1436
1411
  $metadata: deserializeMetadata(output),
1437
- };
1412
+ });
1438
1413
  await collectBody(output.body, context);
1439
- return Promise.resolve(contents);
1414
+ return contents;
1440
1415
  };
1441
1416
  exports.deserializeAws_restJson1DeleteDataCellsFilterCommand = deserializeAws_restJson1DeleteDataCellsFilterCommand;
1442
1417
  const deserializeAws_restJson1DeleteDataCellsFilterCommandError = async (output, context) => {
@@ -1444,7 +1419,6 @@ const deserializeAws_restJson1DeleteDataCellsFilterCommandError = async (output,
1444
1419
  ...output,
1445
1420
  body: await parseBody(output.body, context),
1446
1421
  };
1447
- let response;
1448
1422
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1449
1423
  switch (errorCode) {
1450
1424
  case "AccessDeniedException":
@@ -1464,25 +1438,23 @@ const deserializeAws_restJson1DeleteDataCellsFilterCommandError = async (output,
1464
1438
  throw await deserializeAws_restJson1OperationTimeoutExceptionResponse(parsedOutput, context);
1465
1439
  default:
1466
1440
  const parsedBody = parsedOutput.body;
1467
- const $metadata = deserializeMetadata(output);
1468
- const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
1469
- response = new LakeFormationServiceException_1.LakeFormationServiceException({
1470
- name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
1471
- $fault: "client",
1472
- $metadata,
1441
+ (0, smithy_client_1.throwDefaultError)({
1442
+ output,
1443
+ parsedBody,
1444
+ exceptionCtor: LakeFormationServiceException_1.LakeFormationServiceException,
1445
+ errorCode,
1473
1446
  });
1474
- throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
1475
1447
  }
1476
1448
  };
1477
1449
  const deserializeAws_restJson1DeleteLFTagCommand = async (output, context) => {
1478
1450
  if (output.statusCode !== 200 && output.statusCode >= 300) {
1479
1451
  return deserializeAws_restJson1DeleteLFTagCommandError(output, context);
1480
1452
  }
1481
- const contents = {
1453
+ const contents = map({
1482
1454
  $metadata: deserializeMetadata(output),
1483
- };
1455
+ });
1484
1456
  await collectBody(output.body, context);
1485
- return Promise.resolve(contents);
1457
+ return contents;
1486
1458
  };
1487
1459
  exports.deserializeAws_restJson1DeleteLFTagCommand = deserializeAws_restJson1DeleteLFTagCommand;
1488
1460
  const deserializeAws_restJson1DeleteLFTagCommandError = async (output, context) => {
@@ -1490,7 +1462,6 @@ const deserializeAws_restJson1DeleteLFTagCommandError = async (output, context)
1490
1462
  ...output,
1491
1463
  body: await parseBody(output.body, context),
1492
1464
  };
1493
- let response;
1494
1465
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1495
1466
  switch (errorCode) {
1496
1467
  case "AccessDeniedException":
@@ -1510,25 +1481,23 @@ const deserializeAws_restJson1DeleteLFTagCommandError = async (output, context)
1510
1481
  throw await deserializeAws_restJson1OperationTimeoutExceptionResponse(parsedOutput, context);
1511
1482
  default:
1512
1483
  const parsedBody = parsedOutput.body;
1513
- const $metadata = deserializeMetadata(output);
1514
- const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
1515
- response = new LakeFormationServiceException_1.LakeFormationServiceException({
1516
- name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
1517
- $fault: "client",
1518
- $metadata,
1484
+ (0, smithy_client_1.throwDefaultError)({
1485
+ output,
1486
+ parsedBody,
1487
+ exceptionCtor: LakeFormationServiceException_1.LakeFormationServiceException,
1488
+ errorCode,
1519
1489
  });
1520
- throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
1521
1490
  }
1522
1491
  };
1523
1492
  const deserializeAws_restJson1DeleteObjectsOnCancelCommand = async (output, context) => {
1524
1493
  if (output.statusCode !== 200 && output.statusCode >= 300) {
1525
1494
  return deserializeAws_restJson1DeleteObjectsOnCancelCommandError(output, context);
1526
1495
  }
1527
- const contents = {
1496
+ const contents = map({
1528
1497
  $metadata: deserializeMetadata(output),
1529
- };
1498
+ });
1530
1499
  await collectBody(output.body, context);
1531
- return Promise.resolve(contents);
1500
+ return contents;
1532
1501
  };
1533
1502
  exports.deserializeAws_restJson1DeleteObjectsOnCancelCommand = deserializeAws_restJson1DeleteObjectsOnCancelCommand;
1534
1503
  const deserializeAws_restJson1DeleteObjectsOnCancelCommandError = async (output, context) => {
@@ -1536,7 +1505,6 @@ const deserializeAws_restJson1DeleteObjectsOnCancelCommandError = async (output,
1536
1505
  ...output,
1537
1506
  body: await parseBody(output.body, context),
1538
1507
  };
1539
- let response;
1540
1508
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1541
1509
  switch (errorCode) {
1542
1510
  case "ConcurrentModificationException":
@@ -1565,25 +1533,23 @@ const deserializeAws_restJson1DeleteObjectsOnCancelCommandError = async (output,
1565
1533
  throw await deserializeAws_restJson1TransactionCommittedExceptionResponse(parsedOutput, context);
1566
1534
  default:
1567
1535
  const parsedBody = parsedOutput.body;
1568
- const $metadata = deserializeMetadata(output);
1569
- const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
1570
- response = new LakeFormationServiceException_1.LakeFormationServiceException({
1571
- name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
1572
- $fault: "client",
1573
- $metadata,
1536
+ (0, smithy_client_1.throwDefaultError)({
1537
+ output,
1538
+ parsedBody,
1539
+ exceptionCtor: LakeFormationServiceException_1.LakeFormationServiceException,
1540
+ errorCode,
1574
1541
  });
1575
- throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
1576
1542
  }
1577
1543
  };
1578
1544
  const deserializeAws_restJson1DeregisterResourceCommand = async (output, context) => {
1579
1545
  if (output.statusCode !== 200 && output.statusCode >= 300) {
1580
1546
  return deserializeAws_restJson1DeregisterResourceCommandError(output, context);
1581
1547
  }
1582
- const contents = {
1548
+ const contents = map({
1583
1549
  $metadata: deserializeMetadata(output),
1584
- };
1550
+ });
1585
1551
  await collectBody(output.body, context);
1586
- return Promise.resolve(contents);
1552
+ return contents;
1587
1553
  };
1588
1554
  exports.deserializeAws_restJson1DeregisterResourceCommand = deserializeAws_restJson1DeregisterResourceCommand;
1589
1555
  const deserializeAws_restJson1DeregisterResourceCommandError = async (output, context) => {
@@ -1591,7 +1557,6 @@ const deserializeAws_restJson1DeregisterResourceCommandError = async (output, co
1591
1557
  ...output,
1592
1558
  body: await parseBody(output.body, context),
1593
1559
  };
1594
- let response;
1595
1560
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1596
1561
  switch (errorCode) {
1597
1562
  case "EntityNotFoundException":
@@ -1608,29 +1573,26 @@ const deserializeAws_restJson1DeregisterResourceCommandError = async (output, co
1608
1573
  throw await deserializeAws_restJson1OperationTimeoutExceptionResponse(parsedOutput, context);
1609
1574
  default:
1610
1575
  const parsedBody = parsedOutput.body;
1611
- const $metadata = deserializeMetadata(output);
1612
- const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
1613
- response = new LakeFormationServiceException_1.LakeFormationServiceException({
1614
- name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
1615
- $fault: "client",
1616
- $metadata,
1576
+ (0, smithy_client_1.throwDefaultError)({
1577
+ output,
1578
+ parsedBody,
1579
+ exceptionCtor: LakeFormationServiceException_1.LakeFormationServiceException,
1580
+ errorCode,
1617
1581
  });
1618
- throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
1619
1582
  }
1620
1583
  };
1621
1584
  const deserializeAws_restJson1DescribeResourceCommand = async (output, context) => {
1622
1585
  if (output.statusCode !== 200 && output.statusCode >= 300) {
1623
1586
  return deserializeAws_restJson1DescribeResourceCommandError(output, context);
1624
1587
  }
1625
- const contents = {
1588
+ const contents = map({
1626
1589
  $metadata: deserializeMetadata(output),
1627
- ResourceInfo: undefined,
1628
- };
1590
+ });
1629
1591
  const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
1630
- if (data.ResourceInfo !== undefined && data.ResourceInfo !== null) {
1592
+ if (data.ResourceInfo != null) {
1631
1593
  contents.ResourceInfo = deserializeAws_restJson1ResourceInfo(data.ResourceInfo, context);
1632
1594
  }
1633
- return Promise.resolve(contents);
1595
+ return contents;
1634
1596
  };
1635
1597
  exports.deserializeAws_restJson1DescribeResourceCommand = deserializeAws_restJson1DescribeResourceCommand;
1636
1598
  const deserializeAws_restJson1DescribeResourceCommandError = async (output, context) => {
@@ -1638,7 +1600,6 @@ const deserializeAws_restJson1DescribeResourceCommandError = async (output, cont
1638
1600
  ...output,
1639
1601
  body: await parseBody(output.body, context),
1640
1602
  };
1641
- let response;
1642
1603
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1643
1604
  switch (errorCode) {
1644
1605
  case "EntityNotFoundException":
@@ -1655,29 +1616,26 @@ const deserializeAws_restJson1DescribeResourceCommandError = async (output, cont
1655
1616
  throw await deserializeAws_restJson1OperationTimeoutExceptionResponse(parsedOutput, context);
1656
1617
  default:
1657
1618
  const parsedBody = parsedOutput.body;
1658
- const $metadata = deserializeMetadata(output);
1659
- const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
1660
- response = new LakeFormationServiceException_1.LakeFormationServiceException({
1661
- name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
1662
- $fault: "client",
1663
- $metadata,
1619
+ (0, smithy_client_1.throwDefaultError)({
1620
+ output,
1621
+ parsedBody,
1622
+ exceptionCtor: LakeFormationServiceException_1.LakeFormationServiceException,
1623
+ errorCode,
1664
1624
  });
1665
- throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
1666
1625
  }
1667
1626
  };
1668
1627
  const deserializeAws_restJson1DescribeTransactionCommand = async (output, context) => {
1669
1628
  if (output.statusCode !== 200 && output.statusCode >= 300) {
1670
1629
  return deserializeAws_restJson1DescribeTransactionCommandError(output, context);
1671
1630
  }
1672
- const contents = {
1631
+ const contents = map({
1673
1632
  $metadata: deserializeMetadata(output),
1674
- TransactionDescription: undefined,
1675
- };
1633
+ });
1676
1634
  const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
1677
- if (data.TransactionDescription !== undefined && data.TransactionDescription !== null) {
1635
+ if (data.TransactionDescription != null) {
1678
1636
  contents.TransactionDescription = deserializeAws_restJson1TransactionDescription(data.TransactionDescription, context);
1679
1637
  }
1680
- return Promise.resolve(contents);
1638
+ return contents;
1681
1639
  };
1682
1640
  exports.deserializeAws_restJson1DescribeTransactionCommand = deserializeAws_restJson1DescribeTransactionCommand;
1683
1641
  const deserializeAws_restJson1DescribeTransactionCommandError = async (output, context) => {
@@ -1685,7 +1643,6 @@ const deserializeAws_restJson1DescribeTransactionCommandError = async (output, c
1685
1643
  ...output,
1686
1644
  body: await parseBody(output.body, context),
1687
1645
  };
1688
- let response;
1689
1646
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1690
1647
  switch (errorCode) {
1691
1648
  case "EntityNotFoundException":
@@ -1702,25 +1659,23 @@ const deserializeAws_restJson1DescribeTransactionCommandError = async (output, c
1702
1659
  throw await deserializeAws_restJson1OperationTimeoutExceptionResponse(parsedOutput, context);
1703
1660
  default:
1704
1661
  const parsedBody = parsedOutput.body;
1705
- const $metadata = deserializeMetadata(output);
1706
- const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
1707
- response = new LakeFormationServiceException_1.LakeFormationServiceException({
1708
- name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
1709
- $fault: "client",
1710
- $metadata,
1662
+ (0, smithy_client_1.throwDefaultError)({
1663
+ output,
1664
+ parsedBody,
1665
+ exceptionCtor: LakeFormationServiceException_1.LakeFormationServiceException,
1666
+ errorCode,
1711
1667
  });
1712
- throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
1713
1668
  }
1714
1669
  };
1715
1670
  const deserializeAws_restJson1ExtendTransactionCommand = async (output, context) => {
1716
1671
  if (output.statusCode !== 200 && output.statusCode >= 300) {
1717
1672
  return deserializeAws_restJson1ExtendTransactionCommandError(output, context);
1718
1673
  }
1719
- const contents = {
1674
+ const contents = map({
1720
1675
  $metadata: deserializeMetadata(output),
1721
- };
1676
+ });
1722
1677
  await collectBody(output.body, context);
1723
- return Promise.resolve(contents);
1678
+ return contents;
1724
1679
  };
1725
1680
  exports.deserializeAws_restJson1ExtendTransactionCommand = deserializeAws_restJson1ExtendTransactionCommand;
1726
1681
  const deserializeAws_restJson1ExtendTransactionCommandError = async (output, context) => {
@@ -1728,7 +1683,6 @@ const deserializeAws_restJson1ExtendTransactionCommandError = async (output, con
1728
1683
  ...output,
1729
1684
  body: await parseBody(output.body, context),
1730
1685
  };
1731
- let response;
1732
1686
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1733
1687
  switch (errorCode) {
1734
1688
  case "EntityNotFoundException":
@@ -1754,29 +1708,26 @@ const deserializeAws_restJson1ExtendTransactionCommandError = async (output, con
1754
1708
  throw await deserializeAws_restJson1TransactionCommittedExceptionResponse(parsedOutput, context);
1755
1709
  default:
1756
1710
  const parsedBody = parsedOutput.body;
1757
- const $metadata = deserializeMetadata(output);
1758
- const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
1759
- response = new LakeFormationServiceException_1.LakeFormationServiceException({
1760
- name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
1761
- $fault: "client",
1762
- $metadata,
1711
+ (0, smithy_client_1.throwDefaultError)({
1712
+ output,
1713
+ parsedBody,
1714
+ exceptionCtor: LakeFormationServiceException_1.LakeFormationServiceException,
1715
+ errorCode,
1763
1716
  });
1764
- throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
1765
1717
  }
1766
1718
  };
1767
1719
  const deserializeAws_restJson1GetDataLakeSettingsCommand = async (output, context) => {
1768
1720
  if (output.statusCode !== 200 && output.statusCode >= 300) {
1769
1721
  return deserializeAws_restJson1GetDataLakeSettingsCommandError(output, context);
1770
1722
  }
1771
- const contents = {
1723
+ const contents = map({
1772
1724
  $metadata: deserializeMetadata(output),
1773
- DataLakeSettings: undefined,
1774
- };
1725
+ });
1775
1726
  const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
1776
- if (data.DataLakeSettings !== undefined && data.DataLakeSettings !== null) {
1727
+ if (data.DataLakeSettings != null) {
1777
1728
  contents.DataLakeSettings = deserializeAws_restJson1DataLakeSettings(data.DataLakeSettings, context);
1778
1729
  }
1779
- return Promise.resolve(contents);
1730
+ return contents;
1780
1731
  };
1781
1732
  exports.deserializeAws_restJson1GetDataLakeSettingsCommand = deserializeAws_restJson1GetDataLakeSettingsCommand;
1782
1733
  const deserializeAws_restJson1GetDataLakeSettingsCommandError = async (output, context) => {
@@ -1784,7 +1735,6 @@ const deserializeAws_restJson1GetDataLakeSettingsCommandError = async (output, c
1784
1735
  ...output,
1785
1736
  body: await parseBody(output.body, context),
1786
1737
  };
1787
- let response;
1788
1738
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1789
1739
  switch (errorCode) {
1790
1740
  case "EntityNotFoundException":
@@ -1798,33 +1748,29 @@ const deserializeAws_restJson1GetDataLakeSettingsCommandError = async (output, c
1798
1748
  throw await deserializeAws_restJson1InvalidInputExceptionResponse(parsedOutput, context);
1799
1749
  default:
1800
1750
  const parsedBody = parsedOutput.body;
1801
- const $metadata = deserializeMetadata(output);
1802
- const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
1803
- response = new LakeFormationServiceException_1.LakeFormationServiceException({
1804
- name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
1805
- $fault: "client",
1806
- $metadata,
1751
+ (0, smithy_client_1.throwDefaultError)({
1752
+ output,
1753
+ parsedBody,
1754
+ exceptionCtor: LakeFormationServiceException_1.LakeFormationServiceException,
1755
+ errorCode,
1807
1756
  });
1808
- throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
1809
1757
  }
1810
1758
  };
1811
1759
  const deserializeAws_restJson1GetEffectivePermissionsForPathCommand = async (output, context) => {
1812
1760
  if (output.statusCode !== 200 && output.statusCode >= 300) {
1813
1761
  return deserializeAws_restJson1GetEffectivePermissionsForPathCommandError(output, context);
1814
1762
  }
1815
- const contents = {
1763
+ const contents = map({
1816
1764
  $metadata: deserializeMetadata(output),
1817
- NextToken: undefined,
1818
- Permissions: undefined,
1819
- };
1765
+ });
1820
1766
  const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
1821
- if (data.NextToken !== undefined && data.NextToken !== null) {
1767
+ if (data.NextToken != null) {
1822
1768
  contents.NextToken = (0, smithy_client_1.expectString)(data.NextToken);
1823
1769
  }
1824
- if (data.Permissions !== undefined && data.Permissions !== null) {
1770
+ if (data.Permissions != null) {
1825
1771
  contents.Permissions = deserializeAws_restJson1PrincipalResourcePermissionsList(data.Permissions, context);
1826
1772
  }
1827
- return Promise.resolve(contents);
1773
+ return contents;
1828
1774
  };
1829
1775
  exports.deserializeAws_restJson1GetEffectivePermissionsForPathCommand = deserializeAws_restJson1GetEffectivePermissionsForPathCommand;
1830
1776
  const deserializeAws_restJson1GetEffectivePermissionsForPathCommandError = async (output, context) => {
@@ -1832,7 +1778,6 @@ const deserializeAws_restJson1GetEffectivePermissionsForPathCommandError = async
1832
1778
  ...output,
1833
1779
  body: await parseBody(output.body, context),
1834
1780
  };
1835
- let response;
1836
1781
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1837
1782
  switch (errorCode) {
1838
1783
  case "EntityNotFoundException":
@@ -1849,37 +1794,32 @@ const deserializeAws_restJson1GetEffectivePermissionsForPathCommandError = async
1849
1794
  throw await deserializeAws_restJson1OperationTimeoutExceptionResponse(parsedOutput, context);
1850
1795
  default:
1851
1796
  const parsedBody = parsedOutput.body;
1852
- const $metadata = deserializeMetadata(output);
1853
- const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
1854
- response = new LakeFormationServiceException_1.LakeFormationServiceException({
1855
- name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
1856
- $fault: "client",
1857
- $metadata,
1797
+ (0, smithy_client_1.throwDefaultError)({
1798
+ output,
1799
+ parsedBody,
1800
+ exceptionCtor: LakeFormationServiceException_1.LakeFormationServiceException,
1801
+ errorCode,
1858
1802
  });
1859
- throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
1860
1803
  }
1861
1804
  };
1862
1805
  const deserializeAws_restJson1GetLFTagCommand = async (output, context) => {
1863
1806
  if (output.statusCode !== 200 && output.statusCode >= 300) {
1864
1807
  return deserializeAws_restJson1GetLFTagCommandError(output, context);
1865
1808
  }
1866
- const contents = {
1809
+ const contents = map({
1867
1810
  $metadata: deserializeMetadata(output),
1868
- CatalogId: undefined,
1869
- TagKey: undefined,
1870
- TagValues: undefined,
1871
- };
1811
+ });
1872
1812
  const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
1873
- if (data.CatalogId !== undefined && data.CatalogId !== null) {
1813
+ if (data.CatalogId != null) {
1874
1814
  contents.CatalogId = (0, smithy_client_1.expectString)(data.CatalogId);
1875
1815
  }
1876
- if (data.TagKey !== undefined && data.TagKey !== null) {
1816
+ if (data.TagKey != null) {
1877
1817
  contents.TagKey = (0, smithy_client_1.expectString)(data.TagKey);
1878
1818
  }
1879
- if (data.TagValues !== undefined && data.TagValues !== null) {
1819
+ if (data.TagValues != null) {
1880
1820
  contents.TagValues = deserializeAws_restJson1TagValueList(data.TagValues, context);
1881
1821
  }
1882
- return Promise.resolve(contents);
1822
+ return contents;
1883
1823
  };
1884
1824
  exports.deserializeAws_restJson1GetLFTagCommand = deserializeAws_restJson1GetLFTagCommand;
1885
1825
  const deserializeAws_restJson1GetLFTagCommandError = async (output, context) => {
@@ -1887,7 +1827,6 @@ const deserializeAws_restJson1GetLFTagCommandError = async (output, context) =>
1887
1827
  ...output,
1888
1828
  body: await parseBody(output.body, context),
1889
1829
  };
1890
- let response;
1891
1830
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1892
1831
  switch (errorCode) {
1893
1832
  case "AccessDeniedException":
@@ -1907,33 +1846,29 @@ const deserializeAws_restJson1GetLFTagCommandError = async (output, context) =>
1907
1846
  throw await deserializeAws_restJson1OperationTimeoutExceptionResponse(parsedOutput, context);
1908
1847
  default:
1909
1848
  const parsedBody = parsedOutput.body;
1910
- const $metadata = deserializeMetadata(output);
1911
- const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
1912
- response = new LakeFormationServiceException_1.LakeFormationServiceException({
1913
- name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
1914
- $fault: "client",
1915
- $metadata,
1849
+ (0, smithy_client_1.throwDefaultError)({
1850
+ output,
1851
+ parsedBody,
1852
+ exceptionCtor: LakeFormationServiceException_1.LakeFormationServiceException,
1853
+ errorCode,
1916
1854
  });
1917
- throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
1918
1855
  }
1919
1856
  };
1920
1857
  const deserializeAws_restJson1GetQueryStateCommand = async (output, context) => {
1921
1858
  if (output.statusCode !== 200 && output.statusCode >= 300) {
1922
1859
  return deserializeAws_restJson1GetQueryStateCommandError(output, context);
1923
1860
  }
1924
- const contents = {
1861
+ const contents = map({
1925
1862
  $metadata: deserializeMetadata(output),
1926
- Error: undefined,
1927
- State: undefined,
1928
- };
1863
+ });
1929
1864
  const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
1930
- if (data.Error !== undefined && data.Error !== null) {
1865
+ if (data.Error != null) {
1931
1866
  contents.Error = (0, smithy_client_1.expectString)(data.Error);
1932
1867
  }
1933
- if (data.State !== undefined && data.State !== null) {
1868
+ if (data.State != null) {
1934
1869
  contents.State = (0, smithy_client_1.expectString)(data.State);
1935
1870
  }
1936
- return Promise.resolve(contents);
1871
+ return contents;
1937
1872
  };
1938
1873
  exports.deserializeAws_restJson1GetQueryStateCommand = deserializeAws_restJson1GetQueryStateCommand;
1939
1874
  const deserializeAws_restJson1GetQueryStateCommandError = async (output, context) => {
@@ -1941,7 +1876,6 @@ const deserializeAws_restJson1GetQueryStateCommandError = async (output, context
1941
1876
  ...output,
1942
1877
  body: await parseBody(output.body, context),
1943
1878
  };
1944
- let response;
1945
1879
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1946
1880
  switch (errorCode) {
1947
1881
  case "AccessDeniedException":
@@ -1955,37 +1889,32 @@ const deserializeAws_restJson1GetQueryStateCommandError = async (output, context
1955
1889
  throw await deserializeAws_restJson1InvalidInputExceptionResponse(parsedOutput, context);
1956
1890
  default:
1957
1891
  const parsedBody = parsedOutput.body;
1958
- const $metadata = deserializeMetadata(output);
1959
- const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
1960
- response = new LakeFormationServiceException_1.LakeFormationServiceException({
1961
- name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
1962
- $fault: "client",
1963
- $metadata,
1892
+ (0, smithy_client_1.throwDefaultError)({
1893
+ output,
1894
+ parsedBody,
1895
+ exceptionCtor: LakeFormationServiceException_1.LakeFormationServiceException,
1896
+ errorCode,
1964
1897
  });
1965
- throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
1966
1898
  }
1967
1899
  };
1968
1900
  const deserializeAws_restJson1GetQueryStatisticsCommand = async (output, context) => {
1969
1901
  if (output.statusCode !== 200 && output.statusCode >= 300) {
1970
1902
  return deserializeAws_restJson1GetQueryStatisticsCommandError(output, context);
1971
1903
  }
1972
- const contents = {
1904
+ const contents = map({
1973
1905
  $metadata: deserializeMetadata(output),
1974
- ExecutionStatistics: undefined,
1975
- PlanningStatistics: undefined,
1976
- QuerySubmissionTime: undefined,
1977
- };
1906
+ });
1978
1907
  const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
1979
- if (data.ExecutionStatistics !== undefined && data.ExecutionStatistics !== null) {
1908
+ if (data.ExecutionStatistics != null) {
1980
1909
  contents.ExecutionStatistics = deserializeAws_restJson1ExecutionStatistics(data.ExecutionStatistics, context);
1981
1910
  }
1982
- if (data.PlanningStatistics !== undefined && data.PlanningStatistics !== null) {
1911
+ if (data.PlanningStatistics != null) {
1983
1912
  contents.PlanningStatistics = deserializeAws_restJson1PlanningStatistics(data.PlanningStatistics, context);
1984
1913
  }
1985
- if (data.QuerySubmissionTime !== undefined && data.QuerySubmissionTime !== null) {
1914
+ if (data.QuerySubmissionTime != null) {
1986
1915
  contents.QuerySubmissionTime = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseRfc3339DateTime)(data.QuerySubmissionTime));
1987
1916
  }
1988
- return Promise.resolve(contents);
1917
+ return contents;
1989
1918
  };
1990
1919
  exports.deserializeAws_restJson1GetQueryStatisticsCommand = deserializeAws_restJson1GetQueryStatisticsCommand;
1991
1920
  const deserializeAws_restJson1GetQueryStatisticsCommandError = async (output, context) => {
@@ -1993,7 +1922,6 @@ const deserializeAws_restJson1GetQueryStatisticsCommandError = async (output, co
1993
1922
  ...output,
1994
1923
  body: await parseBody(output.body, context),
1995
1924
  };
1996
- let response;
1997
1925
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1998
1926
  switch (errorCode) {
1999
1927
  case "AccessDeniedException":
@@ -2016,37 +1944,32 @@ const deserializeAws_restJson1GetQueryStatisticsCommandError = async (output, co
2016
1944
  throw await deserializeAws_restJson1ThrottledExceptionResponse(parsedOutput, context);
2017
1945
  default:
2018
1946
  const parsedBody = parsedOutput.body;
2019
- const $metadata = deserializeMetadata(output);
2020
- const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
2021
- response = new LakeFormationServiceException_1.LakeFormationServiceException({
2022
- name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
2023
- $fault: "client",
2024
- $metadata,
1947
+ (0, smithy_client_1.throwDefaultError)({
1948
+ output,
1949
+ parsedBody,
1950
+ exceptionCtor: LakeFormationServiceException_1.LakeFormationServiceException,
1951
+ errorCode,
2025
1952
  });
2026
- throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
2027
1953
  }
2028
1954
  };
2029
1955
  const deserializeAws_restJson1GetResourceLFTagsCommand = async (output, context) => {
2030
1956
  if (output.statusCode !== 200 && output.statusCode >= 300) {
2031
1957
  return deserializeAws_restJson1GetResourceLFTagsCommandError(output, context);
2032
1958
  }
2033
- const contents = {
1959
+ const contents = map({
2034
1960
  $metadata: deserializeMetadata(output),
2035
- LFTagOnDatabase: undefined,
2036
- LFTagsOnColumns: undefined,
2037
- LFTagsOnTable: undefined,
2038
- };
1961
+ });
2039
1962
  const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
2040
- if (data.LFTagOnDatabase !== undefined && data.LFTagOnDatabase !== null) {
1963
+ if (data.LFTagOnDatabase != null) {
2041
1964
  contents.LFTagOnDatabase = deserializeAws_restJson1LFTagsList(data.LFTagOnDatabase, context);
2042
1965
  }
2043
- if (data.LFTagsOnColumns !== undefined && data.LFTagsOnColumns !== null) {
1966
+ if (data.LFTagsOnColumns != null) {
2044
1967
  contents.LFTagsOnColumns = deserializeAws_restJson1ColumnLFTagsList(data.LFTagsOnColumns, context);
2045
1968
  }
2046
- if (data.LFTagsOnTable !== undefined && data.LFTagsOnTable !== null) {
1969
+ if (data.LFTagsOnTable != null) {
2047
1970
  contents.LFTagsOnTable = deserializeAws_restJson1LFTagsList(data.LFTagsOnTable, context);
2048
1971
  }
2049
- return Promise.resolve(contents);
1972
+ return contents;
2050
1973
  };
2051
1974
  exports.deserializeAws_restJson1GetResourceLFTagsCommand = deserializeAws_restJson1GetResourceLFTagsCommand;
2052
1975
  const deserializeAws_restJson1GetResourceLFTagsCommandError = async (output, context) => {
@@ -2054,7 +1977,6 @@ const deserializeAws_restJson1GetResourceLFTagsCommandError = async (output, con
2054
1977
  ...output,
2055
1978
  body: await parseBody(output.body, context),
2056
1979
  };
2057
- let response;
2058
1980
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2059
1981
  switch (errorCode) {
2060
1982
  case "AccessDeniedException":
@@ -2077,33 +1999,29 @@ const deserializeAws_restJson1GetResourceLFTagsCommandError = async (output, con
2077
1999
  throw await deserializeAws_restJson1OperationTimeoutExceptionResponse(parsedOutput, context);
2078
2000
  default:
2079
2001
  const parsedBody = parsedOutput.body;
2080
- const $metadata = deserializeMetadata(output);
2081
- const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
2082
- response = new LakeFormationServiceException_1.LakeFormationServiceException({
2083
- name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
2084
- $fault: "client",
2085
- $metadata,
2002
+ (0, smithy_client_1.throwDefaultError)({
2003
+ output,
2004
+ parsedBody,
2005
+ exceptionCtor: LakeFormationServiceException_1.LakeFormationServiceException,
2006
+ errorCode,
2086
2007
  });
2087
- throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
2088
2008
  }
2089
2009
  };
2090
2010
  const deserializeAws_restJson1GetTableObjectsCommand = async (output, context) => {
2091
2011
  if (output.statusCode !== 200 && output.statusCode >= 300) {
2092
2012
  return deserializeAws_restJson1GetTableObjectsCommandError(output, context);
2093
2013
  }
2094
- const contents = {
2014
+ const contents = map({
2095
2015
  $metadata: deserializeMetadata(output),
2096
- NextToken: undefined,
2097
- Objects: undefined,
2098
- };
2016
+ });
2099
2017
  const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
2100
- if (data.NextToken !== undefined && data.NextToken !== null) {
2018
+ if (data.NextToken != null) {
2101
2019
  contents.NextToken = (0, smithy_client_1.expectString)(data.NextToken);
2102
2020
  }
2103
- if (data.Objects !== undefined && data.Objects !== null) {
2021
+ if (data.Objects != null) {
2104
2022
  contents.Objects = deserializeAws_restJson1PartitionedTableObjectsList(data.Objects, context);
2105
2023
  }
2106
- return Promise.resolve(contents);
2024
+ return contents;
2107
2025
  };
2108
2026
  exports.deserializeAws_restJson1GetTableObjectsCommand = deserializeAws_restJson1GetTableObjectsCommand;
2109
2027
  const deserializeAws_restJson1GetTableObjectsCommandError = async (output, context) => {
@@ -2111,7 +2029,6 @@ const deserializeAws_restJson1GetTableObjectsCommandError = async (output, conte
2111
2029
  ...output,
2112
2030
  body: await parseBody(output.body, context),
2113
2031
  };
2114
- let response;
2115
2032
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2116
2033
  switch (errorCode) {
2117
2034
  case "EntityNotFoundException":
@@ -2137,41 +2054,35 @@ const deserializeAws_restJson1GetTableObjectsCommandError = async (output, conte
2137
2054
  throw await deserializeAws_restJson1TransactionCommittedExceptionResponse(parsedOutput, context);
2138
2055
  default:
2139
2056
  const parsedBody = parsedOutput.body;
2140
- const $metadata = deserializeMetadata(output);
2141
- const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
2142
- response = new LakeFormationServiceException_1.LakeFormationServiceException({
2143
- name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
2144
- $fault: "client",
2145
- $metadata,
2057
+ (0, smithy_client_1.throwDefaultError)({
2058
+ output,
2059
+ parsedBody,
2060
+ exceptionCtor: LakeFormationServiceException_1.LakeFormationServiceException,
2061
+ errorCode,
2146
2062
  });
2147
- throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
2148
2063
  }
2149
2064
  };
2150
2065
  const deserializeAws_restJson1GetTemporaryGluePartitionCredentialsCommand = async (output, context) => {
2151
2066
  if (output.statusCode !== 200 && output.statusCode >= 300) {
2152
2067
  return deserializeAws_restJson1GetTemporaryGluePartitionCredentialsCommandError(output, context);
2153
2068
  }
2154
- const contents = {
2069
+ const contents = map({
2155
2070
  $metadata: deserializeMetadata(output),
2156
- AccessKeyId: undefined,
2157
- Expiration: undefined,
2158
- SecretAccessKey: undefined,
2159
- SessionToken: undefined,
2160
- };
2071
+ });
2161
2072
  const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
2162
- if (data.AccessKeyId !== undefined && data.AccessKeyId !== null) {
2073
+ if (data.AccessKeyId != null) {
2163
2074
  contents.AccessKeyId = (0, smithy_client_1.expectString)(data.AccessKeyId);
2164
2075
  }
2165
- if (data.Expiration !== undefined && data.Expiration !== null) {
2076
+ if (data.Expiration != null) {
2166
2077
  contents.Expiration = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(data.Expiration)));
2167
2078
  }
2168
- if (data.SecretAccessKey !== undefined && data.SecretAccessKey !== null) {
2079
+ if (data.SecretAccessKey != null) {
2169
2080
  contents.SecretAccessKey = (0, smithy_client_1.expectString)(data.SecretAccessKey);
2170
2081
  }
2171
- if (data.SessionToken !== undefined && data.SessionToken !== null) {
2082
+ if (data.SessionToken != null) {
2172
2083
  contents.SessionToken = (0, smithy_client_1.expectString)(data.SessionToken);
2173
2084
  }
2174
- return Promise.resolve(contents);
2085
+ return contents;
2175
2086
  };
2176
2087
  exports.deserializeAws_restJson1GetTemporaryGluePartitionCredentialsCommand = deserializeAws_restJson1GetTemporaryGluePartitionCredentialsCommand;
2177
2088
  const deserializeAws_restJson1GetTemporaryGluePartitionCredentialsCommandError = async (output, context) => {
@@ -2179,7 +2090,6 @@ const deserializeAws_restJson1GetTemporaryGluePartitionCredentialsCommandError =
2179
2090
  ...output,
2180
2091
  body: await parseBody(output.body, context),
2181
2092
  };
2182
- let response;
2183
2093
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2184
2094
  switch (errorCode) {
2185
2095
  case "AccessDeniedException":
@@ -2202,41 +2112,35 @@ const deserializeAws_restJson1GetTemporaryGluePartitionCredentialsCommandError =
2202
2112
  throw await deserializeAws_restJson1PermissionTypeMismatchExceptionResponse(parsedOutput, context);
2203
2113
  default:
2204
2114
  const parsedBody = parsedOutput.body;
2205
- const $metadata = deserializeMetadata(output);
2206
- const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
2207
- response = new LakeFormationServiceException_1.LakeFormationServiceException({
2208
- name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
2209
- $fault: "client",
2210
- $metadata,
2115
+ (0, smithy_client_1.throwDefaultError)({
2116
+ output,
2117
+ parsedBody,
2118
+ exceptionCtor: LakeFormationServiceException_1.LakeFormationServiceException,
2119
+ errorCode,
2211
2120
  });
2212
- throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
2213
2121
  }
2214
2122
  };
2215
2123
  const deserializeAws_restJson1GetTemporaryGlueTableCredentialsCommand = async (output, context) => {
2216
2124
  if (output.statusCode !== 200 && output.statusCode >= 300) {
2217
2125
  return deserializeAws_restJson1GetTemporaryGlueTableCredentialsCommandError(output, context);
2218
2126
  }
2219
- const contents = {
2127
+ const contents = map({
2220
2128
  $metadata: deserializeMetadata(output),
2221
- AccessKeyId: undefined,
2222
- Expiration: undefined,
2223
- SecretAccessKey: undefined,
2224
- SessionToken: undefined,
2225
- };
2129
+ });
2226
2130
  const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
2227
- if (data.AccessKeyId !== undefined && data.AccessKeyId !== null) {
2131
+ if (data.AccessKeyId != null) {
2228
2132
  contents.AccessKeyId = (0, smithy_client_1.expectString)(data.AccessKeyId);
2229
2133
  }
2230
- if (data.Expiration !== undefined && data.Expiration !== null) {
2134
+ if (data.Expiration != null) {
2231
2135
  contents.Expiration = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(data.Expiration)));
2232
2136
  }
2233
- if (data.SecretAccessKey !== undefined && data.SecretAccessKey !== null) {
2137
+ if (data.SecretAccessKey != null) {
2234
2138
  contents.SecretAccessKey = (0, smithy_client_1.expectString)(data.SecretAccessKey);
2235
2139
  }
2236
- if (data.SessionToken !== undefined && data.SessionToken !== null) {
2140
+ if (data.SessionToken != null) {
2237
2141
  contents.SessionToken = (0, smithy_client_1.expectString)(data.SessionToken);
2238
2142
  }
2239
- return Promise.resolve(contents);
2143
+ return contents;
2240
2144
  };
2241
2145
  exports.deserializeAws_restJson1GetTemporaryGlueTableCredentialsCommand = deserializeAws_restJson1GetTemporaryGlueTableCredentialsCommand;
2242
2146
  const deserializeAws_restJson1GetTemporaryGlueTableCredentialsCommandError = async (output, context) => {
@@ -2244,7 +2148,6 @@ const deserializeAws_restJson1GetTemporaryGlueTableCredentialsCommandError = asy
2244
2148
  ...output,
2245
2149
  body: await parseBody(output.body, context),
2246
2150
  };
2247
- let response;
2248
2151
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2249
2152
  switch (errorCode) {
2250
2153
  case "AccessDeniedException":
@@ -2267,27 +2170,24 @@ const deserializeAws_restJson1GetTemporaryGlueTableCredentialsCommandError = asy
2267
2170
  throw await deserializeAws_restJson1PermissionTypeMismatchExceptionResponse(parsedOutput, context);
2268
2171
  default:
2269
2172
  const parsedBody = parsedOutput.body;
2270
- const $metadata = deserializeMetadata(output);
2271
- const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
2272
- response = new LakeFormationServiceException_1.LakeFormationServiceException({
2273
- name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
2274
- $fault: "client",
2275
- $metadata,
2173
+ (0, smithy_client_1.throwDefaultError)({
2174
+ output,
2175
+ parsedBody,
2176
+ exceptionCtor: LakeFormationServiceException_1.LakeFormationServiceException,
2177
+ errorCode,
2276
2178
  });
2277
- throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
2278
2179
  }
2279
2180
  };
2280
2181
  const deserializeAws_restJson1GetWorkUnitResultsCommand = async (output, context) => {
2281
2182
  if (output.statusCode !== 200 && output.statusCode >= 300) {
2282
2183
  return deserializeAws_restJson1GetWorkUnitResultsCommandError(output, context);
2283
2184
  }
2284
- const contents = {
2185
+ const contents = map({
2285
2186
  $metadata: deserializeMetadata(output),
2286
- ResultStream: undefined,
2287
- };
2187
+ });
2288
2188
  const data = output.body;
2289
2189
  contents.ResultStream = data;
2290
- return Promise.resolve(contents);
2190
+ return contents;
2291
2191
  };
2292
2192
  exports.deserializeAws_restJson1GetWorkUnitResultsCommand = deserializeAws_restJson1GetWorkUnitResultsCommand;
2293
2193
  const deserializeAws_restJson1GetWorkUnitResultsCommandError = async (output, context) => {
@@ -2295,7 +2195,6 @@ const deserializeAws_restJson1GetWorkUnitResultsCommandError = async (output, co
2295
2195
  ...output,
2296
2196
  body: await parseBody(output.body, context),
2297
2197
  };
2298
- let response;
2299
2198
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2300
2199
  switch (errorCode) {
2301
2200
  case "AccessDeniedException":
@@ -2315,37 +2214,32 @@ const deserializeAws_restJson1GetWorkUnitResultsCommandError = async (output, co
2315
2214
  throw await deserializeAws_restJson1ThrottledExceptionResponse(parsedOutput, context);
2316
2215
  default:
2317
2216
  const parsedBody = parsedOutput.body;
2318
- const $metadata = deserializeMetadata(output);
2319
- const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
2320
- response = new LakeFormationServiceException_1.LakeFormationServiceException({
2321
- name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
2322
- $fault: "client",
2323
- $metadata,
2217
+ (0, smithy_client_1.throwDefaultError)({
2218
+ output,
2219
+ parsedBody,
2220
+ exceptionCtor: LakeFormationServiceException_1.LakeFormationServiceException,
2221
+ errorCode,
2324
2222
  });
2325
- throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
2326
2223
  }
2327
2224
  };
2328
2225
  const deserializeAws_restJson1GetWorkUnitsCommand = async (output, context) => {
2329
2226
  if (output.statusCode !== 200 && output.statusCode >= 300) {
2330
2227
  return deserializeAws_restJson1GetWorkUnitsCommandError(output, context);
2331
2228
  }
2332
- const contents = {
2229
+ const contents = map({
2333
2230
  $metadata: deserializeMetadata(output),
2334
- NextToken: undefined,
2335
- QueryId: undefined,
2336
- WorkUnitRanges: undefined,
2337
- };
2231
+ });
2338
2232
  const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
2339
- if (data.NextToken !== undefined && data.NextToken !== null) {
2233
+ if (data.NextToken != null) {
2340
2234
  contents.NextToken = (0, smithy_client_1.expectString)(data.NextToken);
2341
2235
  }
2342
- if (data.QueryId !== undefined && data.QueryId !== null) {
2236
+ if (data.QueryId != null) {
2343
2237
  contents.QueryId = (0, smithy_client_1.expectString)(data.QueryId);
2344
2238
  }
2345
- if (data.WorkUnitRanges !== undefined && data.WorkUnitRanges !== null) {
2239
+ if (data.WorkUnitRanges != null) {
2346
2240
  contents.WorkUnitRanges = deserializeAws_restJson1WorkUnitRangeList(data.WorkUnitRanges, context);
2347
2241
  }
2348
- return Promise.resolve(contents);
2242
+ return contents;
2349
2243
  };
2350
2244
  exports.deserializeAws_restJson1GetWorkUnitsCommand = deserializeAws_restJson1GetWorkUnitsCommand;
2351
2245
  const deserializeAws_restJson1GetWorkUnitsCommandError = async (output, context) => {
@@ -2353,7 +2247,6 @@ const deserializeAws_restJson1GetWorkUnitsCommandError = async (output, context)
2353
2247
  ...output,
2354
2248
  body: await parseBody(output.body, context),
2355
2249
  };
2356
- let response;
2357
2250
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2358
2251
  switch (errorCode) {
2359
2252
  case "AccessDeniedException":
@@ -2373,25 +2266,23 @@ const deserializeAws_restJson1GetWorkUnitsCommandError = async (output, context)
2373
2266
  throw await deserializeAws_restJson1WorkUnitsNotReadyYetExceptionResponse(parsedOutput, context);
2374
2267
  default:
2375
2268
  const parsedBody = parsedOutput.body;
2376
- const $metadata = deserializeMetadata(output);
2377
- const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
2378
- response = new LakeFormationServiceException_1.LakeFormationServiceException({
2379
- name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
2380
- $fault: "client",
2381
- $metadata,
2269
+ (0, smithy_client_1.throwDefaultError)({
2270
+ output,
2271
+ parsedBody,
2272
+ exceptionCtor: LakeFormationServiceException_1.LakeFormationServiceException,
2273
+ errorCode,
2382
2274
  });
2383
- throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
2384
2275
  }
2385
2276
  };
2386
2277
  const deserializeAws_restJson1GrantPermissionsCommand = async (output, context) => {
2387
2278
  if (output.statusCode !== 200 && output.statusCode >= 300) {
2388
2279
  return deserializeAws_restJson1GrantPermissionsCommandError(output, context);
2389
2280
  }
2390
- const contents = {
2281
+ const contents = map({
2391
2282
  $metadata: deserializeMetadata(output),
2392
- };
2283
+ });
2393
2284
  await collectBody(output.body, context);
2394
- return Promise.resolve(contents);
2285
+ return contents;
2395
2286
  };
2396
2287
  exports.deserializeAws_restJson1GrantPermissionsCommand = deserializeAws_restJson1GrantPermissionsCommand;
2397
2288
  const deserializeAws_restJson1GrantPermissionsCommandError = async (output, context) => {
@@ -2399,7 +2290,6 @@ const deserializeAws_restJson1GrantPermissionsCommandError = async (output, cont
2399
2290
  ...output,
2400
2291
  body: await parseBody(output.body, context),
2401
2292
  };
2402
- let response;
2403
2293
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2404
2294
  switch (errorCode) {
2405
2295
  case "ConcurrentModificationException":
@@ -2413,33 +2303,29 @@ const deserializeAws_restJson1GrantPermissionsCommandError = async (output, cont
2413
2303
  throw await deserializeAws_restJson1InvalidInputExceptionResponse(parsedOutput, context);
2414
2304
  default:
2415
2305
  const parsedBody = parsedOutput.body;
2416
- const $metadata = deserializeMetadata(output);
2417
- const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
2418
- response = new LakeFormationServiceException_1.LakeFormationServiceException({
2419
- name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
2420
- $fault: "client",
2421
- $metadata,
2306
+ (0, smithy_client_1.throwDefaultError)({
2307
+ output,
2308
+ parsedBody,
2309
+ exceptionCtor: LakeFormationServiceException_1.LakeFormationServiceException,
2310
+ errorCode,
2422
2311
  });
2423
- throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
2424
2312
  }
2425
2313
  };
2426
2314
  const deserializeAws_restJson1ListDataCellsFilterCommand = async (output, context) => {
2427
2315
  if (output.statusCode !== 200 && output.statusCode >= 300) {
2428
2316
  return deserializeAws_restJson1ListDataCellsFilterCommandError(output, context);
2429
2317
  }
2430
- const contents = {
2318
+ const contents = map({
2431
2319
  $metadata: deserializeMetadata(output),
2432
- DataCellsFilters: undefined,
2433
- NextToken: undefined,
2434
- };
2320
+ });
2435
2321
  const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
2436
- if (data.DataCellsFilters !== undefined && data.DataCellsFilters !== null) {
2322
+ if (data.DataCellsFilters != null) {
2437
2323
  contents.DataCellsFilters = deserializeAws_restJson1DataCellsFilterList(data.DataCellsFilters, context);
2438
2324
  }
2439
- if (data.NextToken !== undefined && data.NextToken !== null) {
2325
+ if (data.NextToken != null) {
2440
2326
  contents.NextToken = (0, smithy_client_1.expectString)(data.NextToken);
2441
2327
  }
2442
- return Promise.resolve(contents);
2328
+ return contents;
2443
2329
  };
2444
2330
  exports.deserializeAws_restJson1ListDataCellsFilterCommand = deserializeAws_restJson1ListDataCellsFilterCommand;
2445
2331
  const deserializeAws_restJson1ListDataCellsFilterCommandError = async (output, context) => {
@@ -2447,7 +2333,6 @@ const deserializeAws_restJson1ListDataCellsFilterCommandError = async (output, c
2447
2333
  ...output,
2448
2334
  body: await parseBody(output.body, context),
2449
2335
  };
2450
- let response;
2451
2336
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2452
2337
  switch (errorCode) {
2453
2338
  case "AccessDeniedException":
@@ -2464,33 +2349,29 @@ const deserializeAws_restJson1ListDataCellsFilterCommandError = async (output, c
2464
2349
  throw await deserializeAws_restJson1OperationTimeoutExceptionResponse(parsedOutput, context);
2465
2350
  default:
2466
2351
  const parsedBody = parsedOutput.body;
2467
- const $metadata = deserializeMetadata(output);
2468
- const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
2469
- response = new LakeFormationServiceException_1.LakeFormationServiceException({
2470
- name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
2471
- $fault: "client",
2472
- $metadata,
2352
+ (0, smithy_client_1.throwDefaultError)({
2353
+ output,
2354
+ parsedBody,
2355
+ exceptionCtor: LakeFormationServiceException_1.LakeFormationServiceException,
2356
+ errorCode,
2473
2357
  });
2474
- throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
2475
2358
  }
2476
2359
  };
2477
2360
  const deserializeAws_restJson1ListLFTagsCommand = async (output, context) => {
2478
2361
  if (output.statusCode !== 200 && output.statusCode >= 300) {
2479
2362
  return deserializeAws_restJson1ListLFTagsCommandError(output, context);
2480
2363
  }
2481
- const contents = {
2364
+ const contents = map({
2482
2365
  $metadata: deserializeMetadata(output),
2483
- LFTags: undefined,
2484
- NextToken: undefined,
2485
- };
2366
+ });
2486
2367
  const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
2487
- if (data.LFTags !== undefined && data.LFTags !== null) {
2368
+ if (data.LFTags != null) {
2488
2369
  contents.LFTags = deserializeAws_restJson1LFTagsList(data.LFTags, context);
2489
2370
  }
2490
- if (data.NextToken !== undefined && data.NextToken !== null) {
2371
+ if (data.NextToken != null) {
2491
2372
  contents.NextToken = (0, smithy_client_1.expectString)(data.NextToken);
2492
2373
  }
2493
- return Promise.resolve(contents);
2374
+ return contents;
2494
2375
  };
2495
2376
  exports.deserializeAws_restJson1ListLFTagsCommand = deserializeAws_restJson1ListLFTagsCommand;
2496
2377
  const deserializeAws_restJson1ListLFTagsCommandError = async (output, context) => {
@@ -2498,7 +2379,6 @@ const deserializeAws_restJson1ListLFTagsCommandError = async (output, context) =
2498
2379
  ...output,
2499
2380
  body: await parseBody(output.body, context),
2500
2381
  };
2501
- let response;
2502
2382
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2503
2383
  switch (errorCode) {
2504
2384
  case "AccessDeniedException":
@@ -2518,33 +2398,29 @@ const deserializeAws_restJson1ListLFTagsCommandError = async (output, context) =
2518
2398
  throw await deserializeAws_restJson1OperationTimeoutExceptionResponse(parsedOutput, context);
2519
2399
  default:
2520
2400
  const parsedBody = parsedOutput.body;
2521
- const $metadata = deserializeMetadata(output);
2522
- const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
2523
- response = new LakeFormationServiceException_1.LakeFormationServiceException({
2524
- name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
2525
- $fault: "client",
2526
- $metadata,
2401
+ (0, smithy_client_1.throwDefaultError)({
2402
+ output,
2403
+ parsedBody,
2404
+ exceptionCtor: LakeFormationServiceException_1.LakeFormationServiceException,
2405
+ errorCode,
2527
2406
  });
2528
- throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
2529
2407
  }
2530
2408
  };
2531
2409
  const deserializeAws_restJson1ListPermissionsCommand = async (output, context) => {
2532
2410
  if (output.statusCode !== 200 && output.statusCode >= 300) {
2533
2411
  return deserializeAws_restJson1ListPermissionsCommandError(output, context);
2534
2412
  }
2535
- const contents = {
2413
+ const contents = map({
2536
2414
  $metadata: deserializeMetadata(output),
2537
- NextToken: undefined,
2538
- PrincipalResourcePermissions: undefined,
2539
- };
2415
+ });
2540
2416
  const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
2541
- if (data.NextToken !== undefined && data.NextToken !== null) {
2417
+ if (data.NextToken != null) {
2542
2418
  contents.NextToken = (0, smithy_client_1.expectString)(data.NextToken);
2543
2419
  }
2544
- if (data.PrincipalResourcePermissions !== undefined && data.PrincipalResourcePermissions !== null) {
2420
+ if (data.PrincipalResourcePermissions != null) {
2545
2421
  contents.PrincipalResourcePermissions = deserializeAws_restJson1PrincipalResourcePermissionsList(data.PrincipalResourcePermissions, context);
2546
2422
  }
2547
- return Promise.resolve(contents);
2423
+ return contents;
2548
2424
  };
2549
2425
  exports.deserializeAws_restJson1ListPermissionsCommand = deserializeAws_restJson1ListPermissionsCommand;
2550
2426
  const deserializeAws_restJson1ListPermissionsCommandError = async (output, context) => {
@@ -2552,7 +2428,6 @@ const deserializeAws_restJson1ListPermissionsCommandError = async (output, conte
2552
2428
  ...output,
2553
2429
  body: await parseBody(output.body, context),
2554
2430
  };
2555
- let response;
2556
2431
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2557
2432
  switch (errorCode) {
2558
2433
  case "InternalServiceException":
@@ -2566,33 +2441,29 @@ const deserializeAws_restJson1ListPermissionsCommandError = async (output, conte
2566
2441
  throw await deserializeAws_restJson1OperationTimeoutExceptionResponse(parsedOutput, context);
2567
2442
  default:
2568
2443
  const parsedBody = parsedOutput.body;
2569
- const $metadata = deserializeMetadata(output);
2570
- const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
2571
- response = new LakeFormationServiceException_1.LakeFormationServiceException({
2572
- name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
2573
- $fault: "client",
2574
- $metadata,
2444
+ (0, smithy_client_1.throwDefaultError)({
2445
+ output,
2446
+ parsedBody,
2447
+ exceptionCtor: LakeFormationServiceException_1.LakeFormationServiceException,
2448
+ errorCode,
2575
2449
  });
2576
- throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
2577
2450
  }
2578
2451
  };
2579
2452
  const deserializeAws_restJson1ListResourcesCommand = async (output, context) => {
2580
2453
  if (output.statusCode !== 200 && output.statusCode >= 300) {
2581
2454
  return deserializeAws_restJson1ListResourcesCommandError(output, context);
2582
2455
  }
2583
- const contents = {
2456
+ const contents = map({
2584
2457
  $metadata: deserializeMetadata(output),
2585
- NextToken: undefined,
2586
- ResourceInfoList: undefined,
2587
- };
2458
+ });
2588
2459
  const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
2589
- if (data.NextToken !== undefined && data.NextToken !== null) {
2460
+ if (data.NextToken != null) {
2590
2461
  contents.NextToken = (0, smithy_client_1.expectString)(data.NextToken);
2591
2462
  }
2592
- if (data.ResourceInfoList !== undefined && data.ResourceInfoList !== null) {
2463
+ if (data.ResourceInfoList != null) {
2593
2464
  contents.ResourceInfoList = deserializeAws_restJson1ResourceInfoList(data.ResourceInfoList, context);
2594
2465
  }
2595
- return Promise.resolve(contents);
2466
+ return contents;
2596
2467
  };
2597
2468
  exports.deserializeAws_restJson1ListResourcesCommand = deserializeAws_restJson1ListResourcesCommand;
2598
2469
  const deserializeAws_restJson1ListResourcesCommandError = async (output, context) => {
@@ -2600,7 +2471,6 @@ const deserializeAws_restJson1ListResourcesCommandError = async (output, context
2600
2471
  ...output,
2601
2472
  body: await parseBody(output.body, context),
2602
2473
  };
2603
- let response;
2604
2474
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2605
2475
  switch (errorCode) {
2606
2476
  case "InternalServiceException":
@@ -2614,33 +2484,29 @@ const deserializeAws_restJson1ListResourcesCommandError = async (output, context
2614
2484
  throw await deserializeAws_restJson1OperationTimeoutExceptionResponse(parsedOutput, context);
2615
2485
  default:
2616
2486
  const parsedBody = parsedOutput.body;
2617
- const $metadata = deserializeMetadata(output);
2618
- const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
2619
- response = new LakeFormationServiceException_1.LakeFormationServiceException({
2620
- name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
2621
- $fault: "client",
2622
- $metadata,
2487
+ (0, smithy_client_1.throwDefaultError)({
2488
+ output,
2489
+ parsedBody,
2490
+ exceptionCtor: LakeFormationServiceException_1.LakeFormationServiceException,
2491
+ errorCode,
2623
2492
  });
2624
- throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
2625
2493
  }
2626
2494
  };
2627
2495
  const deserializeAws_restJson1ListTableStorageOptimizersCommand = async (output, context) => {
2628
2496
  if (output.statusCode !== 200 && output.statusCode >= 300) {
2629
2497
  return deserializeAws_restJson1ListTableStorageOptimizersCommandError(output, context);
2630
2498
  }
2631
- const contents = {
2499
+ const contents = map({
2632
2500
  $metadata: deserializeMetadata(output),
2633
- NextToken: undefined,
2634
- StorageOptimizerList: undefined,
2635
- };
2501
+ });
2636
2502
  const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
2637
- if (data.NextToken !== undefined && data.NextToken !== null) {
2503
+ if (data.NextToken != null) {
2638
2504
  contents.NextToken = (0, smithy_client_1.expectString)(data.NextToken);
2639
2505
  }
2640
- if (data.StorageOptimizerList !== undefined && data.StorageOptimizerList !== null) {
2506
+ if (data.StorageOptimizerList != null) {
2641
2507
  contents.StorageOptimizerList = deserializeAws_restJson1StorageOptimizerList(data.StorageOptimizerList, context);
2642
2508
  }
2643
- return Promise.resolve(contents);
2509
+ return contents;
2644
2510
  };
2645
2511
  exports.deserializeAws_restJson1ListTableStorageOptimizersCommand = deserializeAws_restJson1ListTableStorageOptimizersCommand;
2646
2512
  const deserializeAws_restJson1ListTableStorageOptimizersCommandError = async (output, context) => {
@@ -2648,7 +2514,6 @@ const deserializeAws_restJson1ListTableStorageOptimizersCommandError = async (ou
2648
2514
  ...output,
2649
2515
  body: await parseBody(output.body, context),
2650
2516
  };
2651
- let response;
2652
2517
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2653
2518
  switch (errorCode) {
2654
2519
  case "AccessDeniedException":
@@ -2665,33 +2530,29 @@ const deserializeAws_restJson1ListTableStorageOptimizersCommandError = async (ou
2665
2530
  throw await deserializeAws_restJson1InvalidInputExceptionResponse(parsedOutput, context);
2666
2531
  default:
2667
2532
  const parsedBody = parsedOutput.body;
2668
- const $metadata = deserializeMetadata(output);
2669
- const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
2670
- response = new LakeFormationServiceException_1.LakeFormationServiceException({
2671
- name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
2672
- $fault: "client",
2673
- $metadata,
2533
+ (0, smithy_client_1.throwDefaultError)({
2534
+ output,
2535
+ parsedBody,
2536
+ exceptionCtor: LakeFormationServiceException_1.LakeFormationServiceException,
2537
+ errorCode,
2674
2538
  });
2675
- throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
2676
2539
  }
2677
2540
  };
2678
2541
  const deserializeAws_restJson1ListTransactionsCommand = async (output, context) => {
2679
2542
  if (output.statusCode !== 200 && output.statusCode >= 300) {
2680
2543
  return deserializeAws_restJson1ListTransactionsCommandError(output, context);
2681
2544
  }
2682
- const contents = {
2545
+ const contents = map({
2683
2546
  $metadata: deserializeMetadata(output),
2684
- NextToken: undefined,
2685
- Transactions: undefined,
2686
- };
2547
+ });
2687
2548
  const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
2688
- if (data.NextToken !== undefined && data.NextToken !== null) {
2549
+ if (data.NextToken != null) {
2689
2550
  contents.NextToken = (0, smithy_client_1.expectString)(data.NextToken);
2690
2551
  }
2691
- if (data.Transactions !== undefined && data.Transactions !== null) {
2552
+ if (data.Transactions != null) {
2692
2553
  contents.Transactions = deserializeAws_restJson1TransactionDescriptionList(data.Transactions, context);
2693
2554
  }
2694
- return Promise.resolve(contents);
2555
+ return contents;
2695
2556
  };
2696
2557
  exports.deserializeAws_restJson1ListTransactionsCommand = deserializeAws_restJson1ListTransactionsCommand;
2697
2558
  const deserializeAws_restJson1ListTransactionsCommandError = async (output, context) => {
@@ -2699,7 +2560,6 @@ const deserializeAws_restJson1ListTransactionsCommandError = async (output, cont
2699
2560
  ...output,
2700
2561
  body: await parseBody(output.body, context),
2701
2562
  };
2702
- let response;
2703
2563
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2704
2564
  switch (errorCode) {
2705
2565
  case "InternalServiceException":
@@ -2713,25 +2573,23 @@ const deserializeAws_restJson1ListTransactionsCommandError = async (output, cont
2713
2573
  throw await deserializeAws_restJson1OperationTimeoutExceptionResponse(parsedOutput, context);
2714
2574
  default:
2715
2575
  const parsedBody = parsedOutput.body;
2716
- const $metadata = deserializeMetadata(output);
2717
- const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
2718
- response = new LakeFormationServiceException_1.LakeFormationServiceException({
2719
- name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
2720
- $fault: "client",
2721
- $metadata,
2576
+ (0, smithy_client_1.throwDefaultError)({
2577
+ output,
2578
+ parsedBody,
2579
+ exceptionCtor: LakeFormationServiceException_1.LakeFormationServiceException,
2580
+ errorCode,
2722
2581
  });
2723
- throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
2724
2582
  }
2725
2583
  };
2726
2584
  const deserializeAws_restJson1PutDataLakeSettingsCommand = async (output, context) => {
2727
2585
  if (output.statusCode !== 200 && output.statusCode >= 300) {
2728
2586
  return deserializeAws_restJson1PutDataLakeSettingsCommandError(output, context);
2729
2587
  }
2730
- const contents = {
2588
+ const contents = map({
2731
2589
  $metadata: deserializeMetadata(output),
2732
- };
2590
+ });
2733
2591
  await collectBody(output.body, context);
2734
- return Promise.resolve(contents);
2592
+ return contents;
2735
2593
  };
2736
2594
  exports.deserializeAws_restJson1PutDataLakeSettingsCommand = deserializeAws_restJson1PutDataLakeSettingsCommand;
2737
2595
  const deserializeAws_restJson1PutDataLakeSettingsCommandError = async (output, context) => {
@@ -2739,7 +2597,6 @@ const deserializeAws_restJson1PutDataLakeSettingsCommandError = async (output, c
2739
2597
  ...output,
2740
2598
  body: await parseBody(output.body, context),
2741
2599
  };
2742
- let response;
2743
2600
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2744
2601
  switch (errorCode) {
2745
2602
  case "InternalServiceException":
@@ -2750,25 +2607,23 @@ const deserializeAws_restJson1PutDataLakeSettingsCommandError = async (output, c
2750
2607
  throw await deserializeAws_restJson1InvalidInputExceptionResponse(parsedOutput, context);
2751
2608
  default:
2752
2609
  const parsedBody = parsedOutput.body;
2753
- const $metadata = deserializeMetadata(output);
2754
- const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
2755
- response = new LakeFormationServiceException_1.LakeFormationServiceException({
2756
- name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
2757
- $fault: "client",
2758
- $metadata,
2610
+ (0, smithy_client_1.throwDefaultError)({
2611
+ output,
2612
+ parsedBody,
2613
+ exceptionCtor: LakeFormationServiceException_1.LakeFormationServiceException,
2614
+ errorCode,
2759
2615
  });
2760
- throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
2761
2616
  }
2762
2617
  };
2763
2618
  const deserializeAws_restJson1RegisterResourceCommand = async (output, context) => {
2764
2619
  if (output.statusCode !== 200 && output.statusCode >= 300) {
2765
2620
  return deserializeAws_restJson1RegisterResourceCommandError(output, context);
2766
2621
  }
2767
- const contents = {
2622
+ const contents = map({
2768
2623
  $metadata: deserializeMetadata(output),
2769
- };
2624
+ });
2770
2625
  await collectBody(output.body, context);
2771
- return Promise.resolve(contents);
2626
+ return contents;
2772
2627
  };
2773
2628
  exports.deserializeAws_restJson1RegisterResourceCommand = deserializeAws_restJson1RegisterResourceCommand;
2774
2629
  const deserializeAws_restJson1RegisterResourceCommandError = async (output, context) => {
@@ -2776,7 +2631,6 @@ const deserializeAws_restJson1RegisterResourceCommandError = async (output, cont
2776
2631
  ...output,
2777
2632
  body: await parseBody(output.body, context),
2778
2633
  };
2779
- let response;
2780
2634
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2781
2635
  switch (errorCode) {
2782
2636
  case "AccessDeniedException":
@@ -2802,29 +2656,26 @@ const deserializeAws_restJson1RegisterResourceCommandError = async (output, cont
2802
2656
  throw await deserializeAws_restJson1ResourceNumberLimitExceededExceptionResponse(parsedOutput, context);
2803
2657
  default:
2804
2658
  const parsedBody = parsedOutput.body;
2805
- const $metadata = deserializeMetadata(output);
2806
- const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
2807
- response = new LakeFormationServiceException_1.LakeFormationServiceException({
2808
- name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
2809
- $fault: "client",
2810
- $metadata,
2659
+ (0, smithy_client_1.throwDefaultError)({
2660
+ output,
2661
+ parsedBody,
2662
+ exceptionCtor: LakeFormationServiceException_1.LakeFormationServiceException,
2663
+ errorCode,
2811
2664
  });
2812
- throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
2813
2665
  }
2814
2666
  };
2815
2667
  const deserializeAws_restJson1RemoveLFTagsFromResourceCommand = async (output, context) => {
2816
2668
  if (output.statusCode !== 200 && output.statusCode >= 300) {
2817
2669
  return deserializeAws_restJson1RemoveLFTagsFromResourceCommandError(output, context);
2818
2670
  }
2819
- const contents = {
2671
+ const contents = map({
2820
2672
  $metadata: deserializeMetadata(output),
2821
- Failures: undefined,
2822
- };
2673
+ });
2823
2674
  const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
2824
- if (data.Failures !== undefined && data.Failures !== null) {
2675
+ if (data.Failures != null) {
2825
2676
  contents.Failures = deserializeAws_restJson1LFTagErrors(data.Failures, context);
2826
2677
  }
2827
- return Promise.resolve(contents);
2678
+ return contents;
2828
2679
  };
2829
2680
  exports.deserializeAws_restJson1RemoveLFTagsFromResourceCommand = deserializeAws_restJson1RemoveLFTagsFromResourceCommand;
2830
2681
  const deserializeAws_restJson1RemoveLFTagsFromResourceCommandError = async (output, context) => {
@@ -2832,7 +2683,6 @@ const deserializeAws_restJson1RemoveLFTagsFromResourceCommandError = async (outp
2832
2683
  ...output,
2833
2684
  body: await parseBody(output.body, context),
2834
2685
  };
2835
- let response;
2836
2686
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2837
2687
  switch (errorCode) {
2838
2688
  case "AccessDeniedException":
@@ -2858,25 +2708,23 @@ const deserializeAws_restJson1RemoveLFTagsFromResourceCommandError = async (outp
2858
2708
  throw await deserializeAws_restJson1OperationTimeoutExceptionResponse(parsedOutput, context);
2859
2709
  default:
2860
2710
  const parsedBody = parsedOutput.body;
2861
- const $metadata = deserializeMetadata(output);
2862
- const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
2863
- response = new LakeFormationServiceException_1.LakeFormationServiceException({
2864
- name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
2865
- $fault: "client",
2866
- $metadata,
2711
+ (0, smithy_client_1.throwDefaultError)({
2712
+ output,
2713
+ parsedBody,
2714
+ exceptionCtor: LakeFormationServiceException_1.LakeFormationServiceException,
2715
+ errorCode,
2867
2716
  });
2868
- throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
2869
2717
  }
2870
2718
  };
2871
2719
  const deserializeAws_restJson1RevokePermissionsCommand = async (output, context) => {
2872
2720
  if (output.statusCode !== 200 && output.statusCode >= 300) {
2873
2721
  return deserializeAws_restJson1RevokePermissionsCommandError(output, context);
2874
2722
  }
2875
- const contents = {
2723
+ const contents = map({
2876
2724
  $metadata: deserializeMetadata(output),
2877
- };
2725
+ });
2878
2726
  await collectBody(output.body, context);
2879
- return Promise.resolve(contents);
2727
+ return contents;
2880
2728
  };
2881
2729
  exports.deserializeAws_restJson1RevokePermissionsCommand = deserializeAws_restJson1RevokePermissionsCommand;
2882
2730
  const deserializeAws_restJson1RevokePermissionsCommandError = async (output, context) => {
@@ -2884,7 +2732,6 @@ const deserializeAws_restJson1RevokePermissionsCommandError = async (output, con
2884
2732
  ...output,
2885
2733
  body: await parseBody(output.body, context),
2886
2734
  };
2887
- let response;
2888
2735
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2889
2736
  switch (errorCode) {
2890
2737
  case "ConcurrentModificationException":
@@ -2898,33 +2745,29 @@ const deserializeAws_restJson1RevokePermissionsCommandError = async (output, con
2898
2745
  throw await deserializeAws_restJson1InvalidInputExceptionResponse(parsedOutput, context);
2899
2746
  default:
2900
2747
  const parsedBody = parsedOutput.body;
2901
- const $metadata = deserializeMetadata(output);
2902
- const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
2903
- response = new LakeFormationServiceException_1.LakeFormationServiceException({
2904
- name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
2905
- $fault: "client",
2906
- $metadata,
2748
+ (0, smithy_client_1.throwDefaultError)({
2749
+ output,
2750
+ parsedBody,
2751
+ exceptionCtor: LakeFormationServiceException_1.LakeFormationServiceException,
2752
+ errorCode,
2907
2753
  });
2908
- throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
2909
2754
  }
2910
2755
  };
2911
2756
  const deserializeAws_restJson1SearchDatabasesByLFTagsCommand = async (output, context) => {
2912
2757
  if (output.statusCode !== 200 && output.statusCode >= 300) {
2913
2758
  return deserializeAws_restJson1SearchDatabasesByLFTagsCommandError(output, context);
2914
2759
  }
2915
- const contents = {
2760
+ const contents = map({
2916
2761
  $metadata: deserializeMetadata(output),
2917
- DatabaseList: undefined,
2918
- NextToken: undefined,
2919
- };
2762
+ });
2920
2763
  const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
2921
- if (data.DatabaseList !== undefined && data.DatabaseList !== null) {
2764
+ if (data.DatabaseList != null) {
2922
2765
  contents.DatabaseList = deserializeAws_restJson1DatabaseLFTagsList(data.DatabaseList, context);
2923
2766
  }
2924
- if (data.NextToken !== undefined && data.NextToken !== null) {
2767
+ if (data.NextToken != null) {
2925
2768
  contents.NextToken = (0, smithy_client_1.expectString)(data.NextToken);
2926
2769
  }
2927
- return Promise.resolve(contents);
2770
+ return contents;
2928
2771
  };
2929
2772
  exports.deserializeAws_restJson1SearchDatabasesByLFTagsCommand = deserializeAws_restJson1SearchDatabasesByLFTagsCommand;
2930
2773
  const deserializeAws_restJson1SearchDatabasesByLFTagsCommandError = async (output, context) => {
@@ -2932,7 +2775,6 @@ const deserializeAws_restJson1SearchDatabasesByLFTagsCommandError = async (outpu
2932
2775
  ...output,
2933
2776
  body: await parseBody(output.body, context),
2934
2777
  };
2935
- let response;
2936
2778
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2937
2779
  switch (errorCode) {
2938
2780
  case "AccessDeniedException":
@@ -2955,33 +2797,29 @@ const deserializeAws_restJson1SearchDatabasesByLFTagsCommandError = async (outpu
2955
2797
  throw await deserializeAws_restJson1OperationTimeoutExceptionResponse(parsedOutput, context);
2956
2798
  default:
2957
2799
  const parsedBody = parsedOutput.body;
2958
- const $metadata = deserializeMetadata(output);
2959
- const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
2960
- response = new LakeFormationServiceException_1.LakeFormationServiceException({
2961
- name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
2962
- $fault: "client",
2963
- $metadata,
2800
+ (0, smithy_client_1.throwDefaultError)({
2801
+ output,
2802
+ parsedBody,
2803
+ exceptionCtor: LakeFormationServiceException_1.LakeFormationServiceException,
2804
+ errorCode,
2964
2805
  });
2965
- throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
2966
2806
  }
2967
2807
  };
2968
2808
  const deserializeAws_restJson1SearchTablesByLFTagsCommand = async (output, context) => {
2969
2809
  if (output.statusCode !== 200 && output.statusCode >= 300) {
2970
2810
  return deserializeAws_restJson1SearchTablesByLFTagsCommandError(output, context);
2971
2811
  }
2972
- const contents = {
2812
+ const contents = map({
2973
2813
  $metadata: deserializeMetadata(output),
2974
- NextToken: undefined,
2975
- TableList: undefined,
2976
- };
2814
+ });
2977
2815
  const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
2978
- if (data.NextToken !== undefined && data.NextToken !== null) {
2816
+ if (data.NextToken != null) {
2979
2817
  contents.NextToken = (0, smithy_client_1.expectString)(data.NextToken);
2980
2818
  }
2981
- if (data.TableList !== undefined && data.TableList !== null) {
2819
+ if (data.TableList != null) {
2982
2820
  contents.TableList = deserializeAws_restJson1TableLFTagsList(data.TableList, context);
2983
2821
  }
2984
- return Promise.resolve(contents);
2822
+ return contents;
2985
2823
  };
2986
2824
  exports.deserializeAws_restJson1SearchTablesByLFTagsCommand = deserializeAws_restJson1SearchTablesByLFTagsCommand;
2987
2825
  const deserializeAws_restJson1SearchTablesByLFTagsCommandError = async (output, context) => {
@@ -2989,7 +2827,6 @@ const deserializeAws_restJson1SearchTablesByLFTagsCommandError = async (output,
2989
2827
  ...output,
2990
2828
  body: await parseBody(output.body, context),
2991
2829
  };
2992
- let response;
2993
2830
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2994
2831
  switch (errorCode) {
2995
2832
  case "AccessDeniedException":
@@ -3012,29 +2849,26 @@ const deserializeAws_restJson1SearchTablesByLFTagsCommandError = async (output,
3012
2849
  throw await deserializeAws_restJson1OperationTimeoutExceptionResponse(parsedOutput, context);
3013
2850
  default:
3014
2851
  const parsedBody = parsedOutput.body;
3015
- const $metadata = deserializeMetadata(output);
3016
- const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
3017
- response = new LakeFormationServiceException_1.LakeFormationServiceException({
3018
- name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
3019
- $fault: "client",
3020
- $metadata,
2852
+ (0, smithy_client_1.throwDefaultError)({
2853
+ output,
2854
+ parsedBody,
2855
+ exceptionCtor: LakeFormationServiceException_1.LakeFormationServiceException,
2856
+ errorCode,
3021
2857
  });
3022
- throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
3023
2858
  }
3024
2859
  };
3025
2860
  const deserializeAws_restJson1StartQueryPlanningCommand = async (output, context) => {
3026
2861
  if (output.statusCode !== 200 && output.statusCode >= 300) {
3027
2862
  return deserializeAws_restJson1StartQueryPlanningCommandError(output, context);
3028
2863
  }
3029
- const contents = {
2864
+ const contents = map({
3030
2865
  $metadata: deserializeMetadata(output),
3031
- QueryId: undefined,
3032
- };
2866
+ });
3033
2867
  const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
3034
- if (data.QueryId !== undefined && data.QueryId !== null) {
2868
+ if (data.QueryId != null) {
3035
2869
  contents.QueryId = (0, smithy_client_1.expectString)(data.QueryId);
3036
2870
  }
3037
- return Promise.resolve(contents);
2871
+ return contents;
3038
2872
  };
3039
2873
  exports.deserializeAws_restJson1StartQueryPlanningCommand = deserializeAws_restJson1StartQueryPlanningCommand;
3040
2874
  const deserializeAws_restJson1StartQueryPlanningCommandError = async (output, context) => {
@@ -3042,7 +2876,6 @@ const deserializeAws_restJson1StartQueryPlanningCommandError = async (output, co
3042
2876
  ...output,
3043
2877
  body: await parseBody(output.body, context),
3044
2878
  };
3045
- let response;
3046
2879
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
3047
2880
  switch (errorCode) {
3048
2881
  case "AccessDeniedException":
@@ -3059,29 +2892,26 @@ const deserializeAws_restJson1StartQueryPlanningCommandError = async (output, co
3059
2892
  throw await deserializeAws_restJson1ThrottledExceptionResponse(parsedOutput, context);
3060
2893
  default:
3061
2894
  const parsedBody = parsedOutput.body;
3062
- const $metadata = deserializeMetadata(output);
3063
- const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
3064
- response = new LakeFormationServiceException_1.LakeFormationServiceException({
3065
- name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
3066
- $fault: "client",
3067
- $metadata,
2895
+ (0, smithy_client_1.throwDefaultError)({
2896
+ output,
2897
+ parsedBody,
2898
+ exceptionCtor: LakeFormationServiceException_1.LakeFormationServiceException,
2899
+ errorCode,
3068
2900
  });
3069
- throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
3070
2901
  }
3071
2902
  };
3072
2903
  const deserializeAws_restJson1StartTransactionCommand = async (output, context) => {
3073
2904
  if (output.statusCode !== 200 && output.statusCode >= 300) {
3074
2905
  return deserializeAws_restJson1StartTransactionCommandError(output, context);
3075
2906
  }
3076
- const contents = {
2907
+ const contents = map({
3077
2908
  $metadata: deserializeMetadata(output),
3078
- TransactionId: undefined,
3079
- };
2909
+ });
3080
2910
  const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
3081
- if (data.TransactionId !== undefined && data.TransactionId !== null) {
2911
+ if (data.TransactionId != null) {
3082
2912
  contents.TransactionId = (0, smithy_client_1.expectString)(data.TransactionId);
3083
2913
  }
3084
- return Promise.resolve(contents);
2914
+ return contents;
3085
2915
  };
3086
2916
  exports.deserializeAws_restJson1StartTransactionCommand = deserializeAws_restJson1StartTransactionCommand;
3087
2917
  const deserializeAws_restJson1StartTransactionCommandError = async (output, context) => {
@@ -3089,7 +2919,6 @@ const deserializeAws_restJson1StartTransactionCommandError = async (output, cont
3089
2919
  ...output,
3090
2920
  body: await parseBody(output.body, context),
3091
2921
  };
3092
- let response;
3093
2922
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
3094
2923
  switch (errorCode) {
3095
2924
  case "InternalServiceException":
@@ -3100,25 +2929,23 @@ const deserializeAws_restJson1StartTransactionCommandError = async (output, cont
3100
2929
  throw await deserializeAws_restJson1OperationTimeoutExceptionResponse(parsedOutput, context);
3101
2930
  default:
3102
2931
  const parsedBody = parsedOutput.body;
3103
- const $metadata = deserializeMetadata(output);
3104
- const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
3105
- response = new LakeFormationServiceException_1.LakeFormationServiceException({
3106
- name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
3107
- $fault: "client",
3108
- $metadata,
2932
+ (0, smithy_client_1.throwDefaultError)({
2933
+ output,
2934
+ parsedBody,
2935
+ exceptionCtor: LakeFormationServiceException_1.LakeFormationServiceException,
2936
+ errorCode,
3109
2937
  });
3110
- throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
3111
2938
  }
3112
2939
  };
3113
2940
  const deserializeAws_restJson1UpdateLFTagCommand = async (output, context) => {
3114
2941
  if (output.statusCode !== 200 && output.statusCode >= 300) {
3115
2942
  return deserializeAws_restJson1UpdateLFTagCommandError(output, context);
3116
2943
  }
3117
- const contents = {
2944
+ const contents = map({
3118
2945
  $metadata: deserializeMetadata(output),
3119
- };
2946
+ });
3120
2947
  await collectBody(output.body, context);
3121
- return Promise.resolve(contents);
2948
+ return contents;
3122
2949
  };
3123
2950
  exports.deserializeAws_restJson1UpdateLFTagCommand = deserializeAws_restJson1UpdateLFTagCommand;
3124
2951
  const deserializeAws_restJson1UpdateLFTagCommandError = async (output, context) => {
@@ -3126,7 +2953,6 @@ const deserializeAws_restJson1UpdateLFTagCommandError = async (output, context)
3126
2953
  ...output,
3127
2954
  body: await parseBody(output.body, context),
3128
2955
  };
3129
- let response;
3130
2956
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
3131
2957
  switch (errorCode) {
3132
2958
  case "AccessDeniedException":
@@ -3149,25 +2975,23 @@ const deserializeAws_restJson1UpdateLFTagCommandError = async (output, context)
3149
2975
  throw await deserializeAws_restJson1OperationTimeoutExceptionResponse(parsedOutput, context);
3150
2976
  default:
3151
2977
  const parsedBody = parsedOutput.body;
3152
- const $metadata = deserializeMetadata(output);
3153
- const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
3154
- response = new LakeFormationServiceException_1.LakeFormationServiceException({
3155
- name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
3156
- $fault: "client",
3157
- $metadata,
2978
+ (0, smithy_client_1.throwDefaultError)({
2979
+ output,
2980
+ parsedBody,
2981
+ exceptionCtor: LakeFormationServiceException_1.LakeFormationServiceException,
2982
+ errorCode,
3158
2983
  });
3159
- throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
3160
2984
  }
3161
2985
  };
3162
2986
  const deserializeAws_restJson1UpdateResourceCommand = async (output, context) => {
3163
2987
  if (output.statusCode !== 200 && output.statusCode >= 300) {
3164
2988
  return deserializeAws_restJson1UpdateResourceCommandError(output, context);
3165
2989
  }
3166
- const contents = {
2990
+ const contents = map({
3167
2991
  $metadata: deserializeMetadata(output),
3168
- };
2992
+ });
3169
2993
  await collectBody(output.body, context);
3170
- return Promise.resolve(contents);
2994
+ return contents;
3171
2995
  };
3172
2996
  exports.deserializeAws_restJson1UpdateResourceCommand = deserializeAws_restJson1UpdateResourceCommand;
3173
2997
  const deserializeAws_restJson1UpdateResourceCommandError = async (output, context) => {
@@ -3175,7 +2999,6 @@ const deserializeAws_restJson1UpdateResourceCommandError = async (output, contex
3175
2999
  ...output,
3176
3000
  body: await parseBody(output.body, context),
3177
3001
  };
3178
- let response;
3179
3002
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
3180
3003
  switch (errorCode) {
3181
3004
  case "EntityNotFoundException":
@@ -3192,25 +3015,23 @@ const deserializeAws_restJson1UpdateResourceCommandError = async (output, contex
3192
3015
  throw await deserializeAws_restJson1OperationTimeoutExceptionResponse(parsedOutput, context);
3193
3016
  default:
3194
3017
  const parsedBody = parsedOutput.body;
3195
- const $metadata = deserializeMetadata(output);
3196
- const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
3197
- response = new LakeFormationServiceException_1.LakeFormationServiceException({
3198
- name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
3199
- $fault: "client",
3200
- $metadata,
3018
+ (0, smithy_client_1.throwDefaultError)({
3019
+ output,
3020
+ parsedBody,
3021
+ exceptionCtor: LakeFormationServiceException_1.LakeFormationServiceException,
3022
+ errorCode,
3201
3023
  });
3202
- throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
3203
3024
  }
3204
3025
  };
3205
3026
  const deserializeAws_restJson1UpdateTableObjectsCommand = async (output, context) => {
3206
3027
  if (output.statusCode !== 200 && output.statusCode >= 300) {
3207
3028
  return deserializeAws_restJson1UpdateTableObjectsCommandError(output, context);
3208
3029
  }
3209
- const contents = {
3030
+ const contents = map({
3210
3031
  $metadata: deserializeMetadata(output),
3211
- };
3032
+ });
3212
3033
  await collectBody(output.body, context);
3213
- return Promise.resolve(contents);
3034
+ return contents;
3214
3035
  };
3215
3036
  exports.deserializeAws_restJson1UpdateTableObjectsCommand = deserializeAws_restJson1UpdateTableObjectsCommand;
3216
3037
  const deserializeAws_restJson1UpdateTableObjectsCommandError = async (output, context) => {
@@ -3218,7 +3039,6 @@ const deserializeAws_restJson1UpdateTableObjectsCommandError = async (output, co
3218
3039
  ...output,
3219
3040
  body: await parseBody(output.body, context),
3220
3041
  };
3221
- let response;
3222
3042
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
3223
3043
  switch (errorCode) {
3224
3044
  case "ConcurrentModificationException":
@@ -3250,29 +3070,26 @@ const deserializeAws_restJson1UpdateTableObjectsCommandError = async (output, co
3250
3070
  throw await deserializeAws_restJson1TransactionCommittedExceptionResponse(parsedOutput, context);
3251
3071
  default:
3252
3072
  const parsedBody = parsedOutput.body;
3253
- const $metadata = deserializeMetadata(output);
3254
- const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
3255
- response = new LakeFormationServiceException_1.LakeFormationServiceException({
3256
- name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
3257
- $fault: "client",
3258
- $metadata,
3073
+ (0, smithy_client_1.throwDefaultError)({
3074
+ output,
3075
+ parsedBody,
3076
+ exceptionCtor: LakeFormationServiceException_1.LakeFormationServiceException,
3077
+ errorCode,
3259
3078
  });
3260
- throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
3261
3079
  }
3262
3080
  };
3263
3081
  const deserializeAws_restJson1UpdateTableStorageOptimizerCommand = async (output, context) => {
3264
3082
  if (output.statusCode !== 200 && output.statusCode >= 300) {
3265
3083
  return deserializeAws_restJson1UpdateTableStorageOptimizerCommandError(output, context);
3266
3084
  }
3267
- const contents = {
3085
+ const contents = map({
3268
3086
  $metadata: deserializeMetadata(output),
3269
- Result: undefined,
3270
- };
3087
+ });
3271
3088
  const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
3272
- if (data.Result !== undefined && data.Result !== null) {
3089
+ if (data.Result != null) {
3273
3090
  contents.Result = (0, smithy_client_1.expectString)(data.Result);
3274
3091
  }
3275
- return Promise.resolve(contents);
3092
+ return contents;
3276
3093
  };
3277
3094
  exports.deserializeAws_restJson1UpdateTableStorageOptimizerCommand = deserializeAws_restJson1UpdateTableStorageOptimizerCommand;
3278
3095
  const deserializeAws_restJson1UpdateTableStorageOptimizerCommandError = async (output, context) => {
@@ -3280,7 +3097,6 @@ const deserializeAws_restJson1UpdateTableStorageOptimizerCommandError = async (o
3280
3097
  ...output,
3281
3098
  body: await parseBody(output.body, context),
3282
3099
  };
3283
- let response;
3284
3100
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
3285
3101
  switch (errorCode) {
3286
3102
  case "AccessDeniedException":
@@ -3297,20 +3113,19 @@ const deserializeAws_restJson1UpdateTableStorageOptimizerCommandError = async (o
3297
3113
  throw await deserializeAws_restJson1InvalidInputExceptionResponse(parsedOutput, context);
3298
3114
  default:
3299
3115
  const parsedBody = parsedOutput.body;
3300
- const $metadata = deserializeMetadata(output);
3301
- const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
3302
- response = new LakeFormationServiceException_1.LakeFormationServiceException({
3303
- name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
3304
- $fault: "client",
3305
- $metadata,
3116
+ (0, smithy_client_1.throwDefaultError)({
3117
+ output,
3118
+ parsedBody,
3119
+ exceptionCtor: LakeFormationServiceException_1.LakeFormationServiceException,
3120
+ errorCode,
3306
3121
  });
3307
- throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
3308
3122
  }
3309
3123
  };
3124
+ const map = smithy_client_1.map;
3310
3125
  const deserializeAws_restJson1AccessDeniedExceptionResponse = async (parsedOutput, context) => {
3311
- const contents = {};
3126
+ const contents = map({});
3312
3127
  const data = parsedOutput.body;
3313
- if (data.Message !== undefined && data.Message !== null) {
3128
+ if (data.Message != null) {
3314
3129
  contents.Message = (0, smithy_client_1.expectString)(data.Message);
3315
3130
  }
3316
3131
  const exception = new models_0_1.AccessDeniedException({
@@ -3320,9 +3135,9 @@ const deserializeAws_restJson1AccessDeniedExceptionResponse = async (parsedOutpu
3320
3135
  return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
3321
3136
  };
3322
3137
  const deserializeAws_restJson1AlreadyExistsExceptionResponse = async (parsedOutput, context) => {
3323
- const contents = {};
3138
+ const contents = map({});
3324
3139
  const data = parsedOutput.body;
3325
- if (data.Message !== undefined && data.Message !== null) {
3140
+ if (data.Message != null) {
3326
3141
  contents.Message = (0, smithy_client_1.expectString)(data.Message);
3327
3142
  }
3328
3143
  const exception = new models_0_1.AlreadyExistsException({
@@ -3332,9 +3147,9 @@ const deserializeAws_restJson1AlreadyExistsExceptionResponse = async (parsedOutp
3332
3147
  return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
3333
3148
  };
3334
3149
  const deserializeAws_restJson1ConcurrentModificationExceptionResponse = async (parsedOutput, context) => {
3335
- const contents = {};
3150
+ const contents = map({});
3336
3151
  const data = parsedOutput.body;
3337
- if (data.Message !== undefined && data.Message !== null) {
3152
+ if (data.Message != null) {
3338
3153
  contents.Message = (0, smithy_client_1.expectString)(data.Message);
3339
3154
  }
3340
3155
  const exception = new models_0_1.ConcurrentModificationException({
@@ -3344,9 +3159,9 @@ const deserializeAws_restJson1ConcurrentModificationExceptionResponse = async (p
3344
3159
  return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
3345
3160
  };
3346
3161
  const deserializeAws_restJson1EntityNotFoundExceptionResponse = async (parsedOutput, context) => {
3347
- const contents = {};
3162
+ const contents = map({});
3348
3163
  const data = parsedOutput.body;
3349
- if (data.Message !== undefined && data.Message !== null) {
3164
+ if (data.Message != null) {
3350
3165
  contents.Message = (0, smithy_client_1.expectString)(data.Message);
3351
3166
  }
3352
3167
  const exception = new models_0_1.EntityNotFoundException({
@@ -3356,9 +3171,9 @@ const deserializeAws_restJson1EntityNotFoundExceptionResponse = async (parsedOut
3356
3171
  return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
3357
3172
  };
3358
3173
  const deserializeAws_restJson1ExpiredExceptionResponse = async (parsedOutput, context) => {
3359
- const contents = {};
3174
+ const contents = map({});
3360
3175
  const data = parsedOutput.body;
3361
- if (data.Message !== undefined && data.Message !== null) {
3176
+ if (data.Message != null) {
3362
3177
  contents.Message = (0, smithy_client_1.expectString)(data.Message);
3363
3178
  }
3364
3179
  const exception = new models_0_1.ExpiredException({
@@ -3368,9 +3183,9 @@ const deserializeAws_restJson1ExpiredExceptionResponse = async (parsedOutput, co
3368
3183
  return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
3369
3184
  };
3370
3185
  const deserializeAws_restJson1GlueEncryptionExceptionResponse = async (parsedOutput, context) => {
3371
- const contents = {};
3186
+ const contents = map({});
3372
3187
  const data = parsedOutput.body;
3373
- if (data.Message !== undefined && data.Message !== null) {
3188
+ if (data.Message != null) {
3374
3189
  contents.Message = (0, smithy_client_1.expectString)(data.Message);
3375
3190
  }
3376
3191
  const exception = new models_0_1.GlueEncryptionException({
@@ -3380,9 +3195,9 @@ const deserializeAws_restJson1GlueEncryptionExceptionResponse = async (parsedOut
3380
3195
  return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
3381
3196
  };
3382
3197
  const deserializeAws_restJson1InternalServiceExceptionResponse = async (parsedOutput, context) => {
3383
- const contents = {};
3198
+ const contents = map({});
3384
3199
  const data = parsedOutput.body;
3385
- if (data.Message !== undefined && data.Message !== null) {
3200
+ if (data.Message != null) {
3386
3201
  contents.Message = (0, smithy_client_1.expectString)(data.Message);
3387
3202
  }
3388
3203
  const exception = new models_0_1.InternalServiceException({
@@ -3392,9 +3207,9 @@ const deserializeAws_restJson1InternalServiceExceptionResponse = async (parsedOu
3392
3207
  return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
3393
3208
  };
3394
3209
  const deserializeAws_restJson1InvalidInputExceptionResponse = async (parsedOutput, context) => {
3395
- const contents = {};
3210
+ const contents = map({});
3396
3211
  const data = parsedOutput.body;
3397
- if (data.Message !== undefined && data.Message !== null) {
3212
+ if (data.Message != null) {
3398
3213
  contents.Message = (0, smithy_client_1.expectString)(data.Message);
3399
3214
  }
3400
3215
  const exception = new models_0_1.InvalidInputException({
@@ -3404,9 +3219,9 @@ const deserializeAws_restJson1InvalidInputExceptionResponse = async (parsedOutpu
3404
3219
  return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
3405
3220
  };
3406
3221
  const deserializeAws_restJson1OperationTimeoutExceptionResponse = async (parsedOutput, context) => {
3407
- const contents = {};
3222
+ const contents = map({});
3408
3223
  const data = parsedOutput.body;
3409
- if (data.Message !== undefined && data.Message !== null) {
3224
+ if (data.Message != null) {
3410
3225
  contents.Message = (0, smithy_client_1.expectString)(data.Message);
3411
3226
  }
3412
3227
  const exception = new models_0_1.OperationTimeoutException({
@@ -3416,9 +3231,9 @@ const deserializeAws_restJson1OperationTimeoutExceptionResponse = async (parsedO
3416
3231
  return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
3417
3232
  };
3418
3233
  const deserializeAws_restJson1PermissionTypeMismatchExceptionResponse = async (parsedOutput, context) => {
3419
- const contents = {};
3234
+ const contents = map({});
3420
3235
  const data = parsedOutput.body;
3421
- if (data.Message !== undefined && data.Message !== null) {
3236
+ if (data.Message != null) {
3422
3237
  contents.Message = (0, smithy_client_1.expectString)(data.Message);
3423
3238
  }
3424
3239
  const exception = new models_0_1.PermissionTypeMismatchException({
@@ -3428,9 +3243,9 @@ const deserializeAws_restJson1PermissionTypeMismatchExceptionResponse = async (p
3428
3243
  return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
3429
3244
  };
3430
3245
  const deserializeAws_restJson1ResourceNotReadyExceptionResponse = async (parsedOutput, context) => {
3431
- const contents = {};
3246
+ const contents = map({});
3432
3247
  const data = parsedOutput.body;
3433
- if (data.Message !== undefined && data.Message !== null) {
3248
+ if (data.Message != null) {
3434
3249
  contents.Message = (0, smithy_client_1.expectString)(data.Message);
3435
3250
  }
3436
3251
  const exception = new models_0_1.ResourceNotReadyException({
@@ -3440,9 +3255,9 @@ const deserializeAws_restJson1ResourceNotReadyExceptionResponse = async (parsedO
3440
3255
  return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
3441
3256
  };
3442
3257
  const deserializeAws_restJson1ResourceNumberLimitExceededExceptionResponse = async (parsedOutput, context) => {
3443
- const contents = {};
3258
+ const contents = map({});
3444
3259
  const data = parsedOutput.body;
3445
- if (data.Message !== undefined && data.Message !== null) {
3260
+ if (data.Message != null) {
3446
3261
  contents.Message = (0, smithy_client_1.expectString)(data.Message);
3447
3262
  }
3448
3263
  const exception = new models_0_1.ResourceNumberLimitExceededException({
@@ -3452,9 +3267,9 @@ const deserializeAws_restJson1ResourceNumberLimitExceededExceptionResponse = asy
3452
3267
  return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
3453
3268
  };
3454
3269
  const deserializeAws_restJson1StatisticsNotReadyYetExceptionResponse = async (parsedOutput, context) => {
3455
- const contents = {};
3270
+ const contents = map({});
3456
3271
  const data = parsedOutput.body;
3457
- if (data.Message !== undefined && data.Message !== null) {
3272
+ if (data.Message != null) {
3458
3273
  contents.Message = (0, smithy_client_1.expectString)(data.Message);
3459
3274
  }
3460
3275
  const exception = new models_0_1.StatisticsNotReadyYetException({
@@ -3464,9 +3279,9 @@ const deserializeAws_restJson1StatisticsNotReadyYetExceptionResponse = async (pa
3464
3279
  return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
3465
3280
  };
3466
3281
  const deserializeAws_restJson1ThrottledExceptionResponse = async (parsedOutput, context) => {
3467
- const contents = {};
3282
+ const contents = map({});
3468
3283
  const data = parsedOutput.body;
3469
- if (data.Message !== undefined && data.Message !== null) {
3284
+ if (data.Message != null) {
3470
3285
  contents.Message = (0, smithy_client_1.expectString)(data.Message);
3471
3286
  }
3472
3287
  const exception = new models_0_1.ThrottledException({
@@ -3476,9 +3291,9 @@ const deserializeAws_restJson1ThrottledExceptionResponse = async (parsedOutput,
3476
3291
  return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
3477
3292
  };
3478
3293
  const deserializeAws_restJson1TransactionCanceledExceptionResponse = async (parsedOutput, context) => {
3479
- const contents = {};
3294
+ const contents = map({});
3480
3295
  const data = parsedOutput.body;
3481
- if (data.Message !== undefined && data.Message !== null) {
3296
+ if (data.Message != null) {
3482
3297
  contents.Message = (0, smithy_client_1.expectString)(data.Message);
3483
3298
  }
3484
3299
  const exception = new models_0_1.TransactionCanceledException({
@@ -3488,9 +3303,9 @@ const deserializeAws_restJson1TransactionCanceledExceptionResponse = async (pars
3488
3303
  return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
3489
3304
  };
3490
3305
  const deserializeAws_restJson1TransactionCommitInProgressExceptionResponse = async (parsedOutput, context) => {
3491
- const contents = {};
3306
+ const contents = map({});
3492
3307
  const data = parsedOutput.body;
3493
- if (data.Message !== undefined && data.Message !== null) {
3308
+ if (data.Message != null) {
3494
3309
  contents.Message = (0, smithy_client_1.expectString)(data.Message);
3495
3310
  }
3496
3311
  const exception = new models_0_1.TransactionCommitInProgressException({
@@ -3500,9 +3315,9 @@ const deserializeAws_restJson1TransactionCommitInProgressExceptionResponse = asy
3500
3315
  return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
3501
3316
  };
3502
3317
  const deserializeAws_restJson1TransactionCommittedExceptionResponse = async (parsedOutput, context) => {
3503
- const contents = {};
3318
+ const contents = map({});
3504
3319
  const data = parsedOutput.body;
3505
- if (data.Message !== undefined && data.Message !== null) {
3320
+ if (data.Message != null) {
3506
3321
  contents.Message = (0, smithy_client_1.expectString)(data.Message);
3507
3322
  }
3508
3323
  const exception = new models_0_1.TransactionCommittedException({
@@ -3512,9 +3327,9 @@ const deserializeAws_restJson1TransactionCommittedExceptionResponse = async (par
3512
3327
  return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
3513
3328
  };
3514
3329
  const deserializeAws_restJson1WorkUnitsNotReadyYetExceptionResponse = async (parsedOutput, context) => {
3515
- const contents = {};
3330
+ const contents = map({});
3516
3331
  const data = parsedOutput.body;
3517
- if (data.Message !== undefined && data.Message !== null) {
3332
+ if (data.Message != null) {
3518
3333
  contents.Message = (0, smithy_client_1.expectString)(data.Message);
3519
3334
  }
3520
3335
  const exception = new models_0_1.WorkUnitsNotReadyYetException({
@@ -3545,9 +3360,6 @@ const serializeAws_restJson1AuthorizedSessionTagValueList = (input, context) =>
3545
3360
  return input
3546
3361
  .filter((e) => e != null)
3547
3362
  .map((entry) => {
3548
- if (entry === null) {
3549
- return null;
3550
- }
3551
3363
  return entry;
3552
3364
  });
3553
3365
  };
@@ -3566,9 +3378,6 @@ const serializeAws_restJson1BatchPermissionsRequestEntryList = (input, context)
3566
3378
  return input
3567
3379
  .filter((e) => e != null)
3568
3380
  .map((entry) => {
3569
- if (entry === null) {
3570
- return null;
3571
- }
3572
3381
  return serializeAws_restJson1BatchPermissionsRequestEntry(entry, context);
3573
3382
  });
3574
3383
  };
@@ -3579,9 +3388,6 @@ const serializeAws_restJson1ColumnNames = (input, context) => {
3579
3388
  return input
3580
3389
  .filter((e) => e != null)
3581
3390
  .map((entry) => {
3582
- if (entry === null) {
3583
- return null;
3584
- }
3585
3391
  return entry;
3586
3392
  });
3587
3393
  };
@@ -3630,9 +3436,6 @@ const serializeAws_restJson1DataLakePrincipalList = (input, context) => {
3630
3436
  return input
3631
3437
  .filter((e) => e != null)
3632
3438
  .map((entry) => {
3633
- if (entry === null) {
3634
- return null;
3635
- }
3636
3439
  return serializeAws_restJson1DataLakePrincipal(entry, context);
3637
3440
  });
3638
3441
  };
@@ -3678,9 +3481,6 @@ const serializeAws_restJson1Expression = (input, context) => {
3678
3481
  return input
3679
3482
  .filter((e) => e != null)
3680
3483
  .map((entry) => {
3681
- if (entry === null) {
3682
- return null;
3683
- }
3684
3484
  return serializeAws_restJson1LFTag(entry, context);
3685
3485
  });
3686
3486
  };
@@ -3697,9 +3497,6 @@ const serializeAws_restJson1FilterConditionList = (input, context) => {
3697
3497
  return input
3698
3498
  .filter((e) => e != null)
3699
3499
  .map((entry) => {
3700
- if (entry === null) {
3701
- return null;
3702
- }
3703
3500
  return serializeAws_restJson1FilterCondition(entry, context);
3704
3501
  });
3705
3502
  };
@@ -3734,9 +3531,6 @@ const serializeAws_restJson1LFTagsList = (input, context) => {
3734
3531
  return input
3735
3532
  .filter((e) => e != null)
3736
3533
  .map((entry) => {
3737
- if (entry === null) {
3738
- return null;
3739
- }
3740
3534
  return serializeAws_restJson1LFTagPair(entry, context);
3741
3535
  });
3742
3536
  };
@@ -3749,9 +3543,6 @@ const serializeAws_restJson1PartitionValuesList = (input, context) => {
3749
3543
  return input
3750
3544
  .filter((e) => e != null)
3751
3545
  .map((entry) => {
3752
- if (entry === null) {
3753
- return null;
3754
- }
3755
3546
  return entry;
3756
3547
  });
3757
3548
  };
@@ -3759,9 +3550,6 @@ const serializeAws_restJson1PermissionList = (input, context) => {
3759
3550
  return input
3760
3551
  .filter((e) => e != null)
3761
3552
  .map((entry) => {
3762
- if (entry === null) {
3763
- return null;
3764
- }
3765
3553
  return entry;
3766
3554
  });
3767
3555
  };
@@ -3769,9 +3557,6 @@ const serializeAws_restJson1PermissionTypeList = (input, context) => {
3769
3557
  return input
3770
3558
  .filter((e) => e != null)
3771
3559
  .map((entry) => {
3772
- if (entry === null) {
3773
- return null;
3774
- }
3775
3560
  return entry;
3776
3561
  });
3777
3562
  };
@@ -3785,9 +3570,6 @@ const serializeAws_restJson1PrincipalPermissionsList = (input, context) => {
3785
3570
  return input
3786
3571
  .filter((e) => e != null)
3787
3572
  .map((entry) => {
3788
- if (entry === null) {
3789
- return null;
3790
- }
3791
3573
  return serializeAws_restJson1PrincipalPermissions(entry, context);
3792
3574
  });
3793
3575
  };
@@ -3867,9 +3649,6 @@ const serializeAws_restJson1StringValueList = (input, context) => {
3867
3649
  return input
3868
3650
  .filter((e) => e != null)
3869
3651
  .map((entry) => {
3870
- if (entry === null) {
3871
- return null;
3872
- }
3873
3652
  return entry;
3874
3653
  });
3875
3654
  };
@@ -3901,9 +3680,6 @@ const serializeAws_restJson1TagValueList = (input, context) => {
3901
3680
  return input
3902
3681
  .filter((e) => e != null)
3903
3682
  .map((entry) => {
3904
- if (entry === null) {
3905
- return null;
3906
- }
3907
3683
  return entry;
3908
3684
  });
3909
3685
  };
@@ -3911,9 +3687,6 @@ const serializeAws_restJson1TrustedResourceOwners = (input, context) => {
3911
3687
  return input
3912
3688
  .filter((e) => e != null)
3913
3689
  .map((entry) => {
3914
- if (entry === null) {
3915
- return null;
3916
- }
3917
3690
  return entry;
3918
3691
  });
3919
3692
  };
@@ -3921,9 +3694,6 @@ const serializeAws_restJson1ValueStringList = (input, context) => {
3921
3694
  return input
3922
3695
  .filter((e) => e != null)
3923
3696
  .map((entry) => {
3924
- if (entry === null) {
3925
- return null;
3926
- }
3927
3697
  return entry;
3928
3698
  });
3929
3699
  };
@@ -3937,9 +3707,6 @@ const serializeAws_restJson1VirtualObjectList = (input, context) => {
3937
3707
  return input
3938
3708
  .filter((e) => e != null)
3939
3709
  .map((entry) => {
3940
- if (entry === null) {
3941
- return null;
3942
- }
3943
3710
  return serializeAws_restJson1VirtualObject(entry, context);
3944
3711
  });
3945
3712
  };
@@ -3955,9 +3722,6 @@ const serializeAws_restJson1WriteOperationList = (input, context) => {
3955
3722
  return input
3956
3723
  .filter((e) => e != null)
3957
3724
  .map((entry) => {
3958
- if (entry === null) {
3959
- return null;
3960
- }
3961
3725
  return serializeAws_restJson1WriteOperation(entry, context);
3962
3726
  });
3963
3727
  };