@aws-sdk/client-databrew 3.141.0 → 3.150.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.
@@ -1,10 +1,10 @@
1
1
  import { __assign, __awaiter, __generator, __read } from "tslib";
2
2
  import { HttpRequest as __HttpRequest } from "@aws-sdk/protocol-http";
3
- import { decorateServiceException as __decorateServiceException, expectBoolean as __expectBoolean, expectInt32 as __expectInt32, expectLong as __expectLong, expectNonNull as __expectNonNull, expectNumber as __expectNumber, expectObject as __expectObject, expectString as __expectString, extendedEncodeURIComponent as __extendedEncodeURIComponent, limitedParseDouble as __limitedParseDouble, parseEpochTimestamp as __parseEpochTimestamp, serializeFloat as __serializeFloat, } from "@aws-sdk/smithy-client";
3
+ import { decorateServiceException as __decorateServiceException, expectBoolean as __expectBoolean, expectInt32 as __expectInt32, expectLong as __expectLong, expectNonNull as __expectNonNull, expectNumber as __expectNumber, expectObject as __expectObject, expectString as __expectString, limitedParseDouble as __limitedParseDouble, map as __map, parseEpochTimestamp as __parseEpochTimestamp, resolvedPath as __resolvedPath, serializeFloat as __serializeFloat, throwDefaultError, } from "@aws-sdk/smithy-client";
4
4
  import { DataBrewServiceException as __BaseException } from "../models/DataBrewServiceException";
5
5
  import { AccessDeniedException, ConflictException, InternalServerException, ResourceNotFoundException, ServiceQuotaExceededException, ValidationException, } from "../models/models_0";
6
6
  export var serializeAws_restJson1BatchDeleteRecipeVersionCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
7
- var _a, hostname, _b, protocol, port, basePath, headers, resolvedPath, labelValue, body;
7
+ var _a, hostname, _b, protocol, port, basePath, headers, resolvedPath, body;
8
8
  return __generator(this, function (_c) {
9
9
  switch (_c.label) {
10
10
  case 0: return [4, context.endpoint()];
@@ -14,16 +14,7 @@ export var serializeAws_restJson1BatchDeleteRecipeVersionCommand = function (inp
14
14
  "content-type": "application/json",
15
15
  };
16
16
  resolvedPath = "".concat((basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || "") + "/recipes/{Name}/batchDeleteRecipeVersion";
17
- if (input.Name !== undefined) {
18
- labelValue = input.Name;
19
- if (labelValue.length <= 0) {
20
- throw new Error("Empty value provided for input HTTP label: Name.");
21
- }
22
- resolvedPath = resolvedPath.replace("{Name}", __extendedEncodeURIComponent(labelValue));
23
- }
24
- else {
25
- throw new Error("No value provided for input HTTP label: Name.");
26
- }
17
+ resolvedPath = __resolvedPath(resolvedPath, input, "Name", function () { return input.Name; }, "{Name}", false);
27
18
  body = JSON.stringify(__assign({}, (input.RecipeVersions != null && {
28
19
  RecipeVersions: serializeAws_restJson1RecipeVersionList(input.RecipeVersions, context),
29
20
  })));
@@ -222,7 +213,7 @@ export var serializeAws_restJson1CreateScheduleCommand = function (input, contex
222
213
  });
223
214
  }); };
224
215
  export var serializeAws_restJson1DeleteDatasetCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
225
- var _a, hostname, _b, protocol, port, basePath, headers, resolvedPath, labelValue, body;
216
+ var _a, hostname, _b, protocol, port, basePath, headers, resolvedPath, body;
226
217
  return __generator(this, function (_c) {
227
218
  switch (_c.label) {
228
219
  case 0: return [4, context.endpoint()];
@@ -230,16 +221,7 @@ export var serializeAws_restJson1DeleteDatasetCommand = function (input, context
230
221
  _a = _c.sent(), hostname = _a.hostname, _b = _a.protocol, protocol = _b === void 0 ? "https" : _b, port = _a.port, basePath = _a.path;
231
222
  headers = {};
232
223
  resolvedPath = "".concat((basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || "") + "/datasets/{Name}";
233
- if (input.Name !== undefined) {
234
- labelValue = input.Name;
235
- if (labelValue.length <= 0) {
236
- throw new Error("Empty value provided for input HTTP label: Name.");
237
- }
238
- resolvedPath = resolvedPath.replace("{Name}", __extendedEncodeURIComponent(labelValue));
239
- }
240
- else {
241
- throw new Error("No value provided for input HTTP label: Name.");
242
- }
224
+ resolvedPath = __resolvedPath(resolvedPath, input, "Name", function () { return input.Name; }, "{Name}", false);
243
225
  return [2, new __HttpRequest({
244
226
  protocol: protocol,
245
227
  hostname: hostname,
@@ -253,7 +235,7 @@ export var serializeAws_restJson1DeleteDatasetCommand = function (input, context
253
235
  });
254
236
  }); };
255
237
  export var serializeAws_restJson1DeleteJobCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
256
- var _a, hostname, _b, protocol, port, basePath, headers, resolvedPath, labelValue, body;
238
+ var _a, hostname, _b, protocol, port, basePath, headers, resolvedPath, body;
257
239
  return __generator(this, function (_c) {
258
240
  switch (_c.label) {
259
241
  case 0: return [4, context.endpoint()];
@@ -261,16 +243,7 @@ export var serializeAws_restJson1DeleteJobCommand = function (input, context) {
261
243
  _a = _c.sent(), hostname = _a.hostname, _b = _a.protocol, protocol = _b === void 0 ? "https" : _b, port = _a.port, basePath = _a.path;
262
244
  headers = {};
263
245
  resolvedPath = "".concat((basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || "") + "/jobs/{Name}";
264
- if (input.Name !== undefined) {
265
- labelValue = input.Name;
266
- if (labelValue.length <= 0) {
267
- throw new Error("Empty value provided for input HTTP label: Name.");
268
- }
269
- resolvedPath = resolvedPath.replace("{Name}", __extendedEncodeURIComponent(labelValue));
270
- }
271
- else {
272
- throw new Error("No value provided for input HTTP label: Name.");
273
- }
246
+ resolvedPath = __resolvedPath(resolvedPath, input, "Name", function () { return input.Name; }, "{Name}", false);
274
247
  return [2, new __HttpRequest({
275
248
  protocol: protocol,
276
249
  hostname: hostname,
@@ -284,7 +257,7 @@ export var serializeAws_restJson1DeleteJobCommand = function (input, context) {
284
257
  });
285
258
  }); };
286
259
  export var serializeAws_restJson1DeleteProjectCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
287
- var _a, hostname, _b, protocol, port, basePath, headers, resolvedPath, labelValue, body;
260
+ var _a, hostname, _b, protocol, port, basePath, headers, resolvedPath, body;
288
261
  return __generator(this, function (_c) {
289
262
  switch (_c.label) {
290
263
  case 0: return [4, context.endpoint()];
@@ -292,16 +265,7 @@ export var serializeAws_restJson1DeleteProjectCommand = function (input, context
292
265
  _a = _c.sent(), hostname = _a.hostname, _b = _a.protocol, protocol = _b === void 0 ? "https" : _b, port = _a.port, basePath = _a.path;
293
266
  headers = {};
294
267
  resolvedPath = "".concat((basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || "") + "/projects/{Name}";
295
- if (input.Name !== undefined) {
296
- labelValue = input.Name;
297
- if (labelValue.length <= 0) {
298
- throw new Error("Empty value provided for input HTTP label: Name.");
299
- }
300
- resolvedPath = resolvedPath.replace("{Name}", __extendedEncodeURIComponent(labelValue));
301
- }
302
- else {
303
- throw new Error("No value provided for input HTTP label: Name.");
304
- }
268
+ resolvedPath = __resolvedPath(resolvedPath, input, "Name", function () { return input.Name; }, "{Name}", false);
305
269
  return [2, new __HttpRequest({
306
270
  protocol: protocol,
307
271
  hostname: hostname,
@@ -315,7 +279,7 @@ export var serializeAws_restJson1DeleteProjectCommand = function (input, context
315
279
  });
316
280
  }); };
317
281
  export var serializeAws_restJson1DeleteRecipeVersionCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
318
- var _a, hostname, _b, protocol, port, basePath, headers, resolvedPath, labelValue, labelValue, body;
282
+ var _a, hostname, _b, protocol, port, basePath, headers, resolvedPath, body;
319
283
  return __generator(this, function (_c) {
320
284
  switch (_c.label) {
321
285
  case 0: return [4, context.endpoint()];
@@ -324,26 +288,8 @@ export var serializeAws_restJson1DeleteRecipeVersionCommand = function (input, c
324
288
  headers = {};
325
289
  resolvedPath = "".concat((basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || "") +
326
290
  "/recipes/{Name}/recipeVersion/{RecipeVersion}";
327
- if (input.Name !== undefined) {
328
- labelValue = input.Name;
329
- if (labelValue.length <= 0) {
330
- throw new Error("Empty value provided for input HTTP label: Name.");
331
- }
332
- resolvedPath = resolvedPath.replace("{Name}", __extendedEncodeURIComponent(labelValue));
333
- }
334
- else {
335
- throw new Error("No value provided for input HTTP label: Name.");
336
- }
337
- if (input.RecipeVersion !== undefined) {
338
- labelValue = input.RecipeVersion;
339
- if (labelValue.length <= 0) {
340
- throw new Error("Empty value provided for input HTTP label: RecipeVersion.");
341
- }
342
- resolvedPath = resolvedPath.replace("{RecipeVersion}", __extendedEncodeURIComponent(labelValue));
343
- }
344
- else {
345
- throw new Error("No value provided for input HTTP label: RecipeVersion.");
346
- }
291
+ resolvedPath = __resolvedPath(resolvedPath, input, "Name", function () { return input.Name; }, "{Name}", false);
292
+ resolvedPath = __resolvedPath(resolvedPath, input, "RecipeVersion", function () { return input.RecipeVersion; }, "{RecipeVersion}", false);
347
293
  return [2, new __HttpRequest({
348
294
  protocol: protocol,
349
295
  hostname: hostname,
@@ -357,7 +303,7 @@ export var serializeAws_restJson1DeleteRecipeVersionCommand = function (input, c
357
303
  });
358
304
  }); };
359
305
  export var serializeAws_restJson1DeleteRulesetCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
360
- var _a, hostname, _b, protocol, port, basePath, headers, resolvedPath, labelValue, body;
306
+ var _a, hostname, _b, protocol, port, basePath, headers, resolvedPath, body;
361
307
  return __generator(this, function (_c) {
362
308
  switch (_c.label) {
363
309
  case 0: return [4, context.endpoint()];
@@ -365,16 +311,7 @@ export var serializeAws_restJson1DeleteRulesetCommand = function (input, context
365
311
  _a = _c.sent(), hostname = _a.hostname, _b = _a.protocol, protocol = _b === void 0 ? "https" : _b, port = _a.port, basePath = _a.path;
366
312
  headers = {};
367
313
  resolvedPath = "".concat((basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || "") + "/rulesets/{Name}";
368
- if (input.Name !== undefined) {
369
- labelValue = input.Name;
370
- if (labelValue.length <= 0) {
371
- throw new Error("Empty value provided for input HTTP label: Name.");
372
- }
373
- resolvedPath = resolvedPath.replace("{Name}", __extendedEncodeURIComponent(labelValue));
374
- }
375
- else {
376
- throw new Error("No value provided for input HTTP label: Name.");
377
- }
314
+ resolvedPath = __resolvedPath(resolvedPath, input, "Name", function () { return input.Name; }, "{Name}", false);
378
315
  return [2, new __HttpRequest({
379
316
  protocol: protocol,
380
317
  hostname: hostname,
@@ -388,7 +325,7 @@ export var serializeAws_restJson1DeleteRulesetCommand = function (input, context
388
325
  });
389
326
  }); };
390
327
  export var serializeAws_restJson1DeleteScheduleCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
391
- var _a, hostname, _b, protocol, port, basePath, headers, resolvedPath, labelValue, body;
328
+ var _a, hostname, _b, protocol, port, basePath, headers, resolvedPath, body;
392
329
  return __generator(this, function (_c) {
393
330
  switch (_c.label) {
394
331
  case 0: return [4, context.endpoint()];
@@ -396,16 +333,7 @@ export var serializeAws_restJson1DeleteScheduleCommand = function (input, contex
396
333
  _a = _c.sent(), hostname = _a.hostname, _b = _a.protocol, protocol = _b === void 0 ? "https" : _b, port = _a.port, basePath = _a.path;
397
334
  headers = {};
398
335
  resolvedPath = "".concat((basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || "") + "/schedules/{Name}";
399
- if (input.Name !== undefined) {
400
- labelValue = input.Name;
401
- if (labelValue.length <= 0) {
402
- throw new Error("Empty value provided for input HTTP label: Name.");
403
- }
404
- resolvedPath = resolvedPath.replace("{Name}", __extendedEncodeURIComponent(labelValue));
405
- }
406
- else {
407
- throw new Error("No value provided for input HTTP label: Name.");
408
- }
336
+ resolvedPath = __resolvedPath(resolvedPath, input, "Name", function () { return input.Name; }, "{Name}", false);
409
337
  return [2, new __HttpRequest({
410
338
  protocol: protocol,
411
339
  hostname: hostname,
@@ -419,7 +347,7 @@ export var serializeAws_restJson1DeleteScheduleCommand = function (input, contex
419
347
  });
420
348
  }); };
421
349
  export var serializeAws_restJson1DescribeDatasetCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
422
- var _a, hostname, _b, protocol, port, basePath, headers, resolvedPath, labelValue, body;
350
+ var _a, hostname, _b, protocol, port, basePath, headers, resolvedPath, body;
423
351
  return __generator(this, function (_c) {
424
352
  switch (_c.label) {
425
353
  case 0: return [4, context.endpoint()];
@@ -427,16 +355,7 @@ export var serializeAws_restJson1DescribeDatasetCommand = function (input, conte
427
355
  _a = _c.sent(), hostname = _a.hostname, _b = _a.protocol, protocol = _b === void 0 ? "https" : _b, port = _a.port, basePath = _a.path;
428
356
  headers = {};
429
357
  resolvedPath = "".concat((basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || "") + "/datasets/{Name}";
430
- if (input.Name !== undefined) {
431
- labelValue = input.Name;
432
- if (labelValue.length <= 0) {
433
- throw new Error("Empty value provided for input HTTP label: Name.");
434
- }
435
- resolvedPath = resolvedPath.replace("{Name}", __extendedEncodeURIComponent(labelValue));
436
- }
437
- else {
438
- throw new Error("No value provided for input HTTP label: Name.");
439
- }
358
+ resolvedPath = __resolvedPath(resolvedPath, input, "Name", function () { return input.Name; }, "{Name}", false);
440
359
  return [2, new __HttpRequest({
441
360
  protocol: protocol,
442
361
  hostname: hostname,
@@ -450,7 +369,7 @@ export var serializeAws_restJson1DescribeDatasetCommand = function (input, conte
450
369
  });
451
370
  }); };
452
371
  export var serializeAws_restJson1DescribeJobCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
453
- var _a, hostname, _b, protocol, port, basePath, headers, resolvedPath, labelValue, body;
372
+ var _a, hostname, _b, protocol, port, basePath, headers, resolvedPath, body;
454
373
  return __generator(this, function (_c) {
455
374
  switch (_c.label) {
456
375
  case 0: return [4, context.endpoint()];
@@ -458,16 +377,7 @@ export var serializeAws_restJson1DescribeJobCommand = function (input, context)
458
377
  _a = _c.sent(), hostname = _a.hostname, _b = _a.protocol, protocol = _b === void 0 ? "https" : _b, port = _a.port, basePath = _a.path;
459
378
  headers = {};
460
379
  resolvedPath = "".concat((basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || "") + "/jobs/{Name}";
461
- if (input.Name !== undefined) {
462
- labelValue = input.Name;
463
- if (labelValue.length <= 0) {
464
- throw new Error("Empty value provided for input HTTP label: Name.");
465
- }
466
- resolvedPath = resolvedPath.replace("{Name}", __extendedEncodeURIComponent(labelValue));
467
- }
468
- else {
469
- throw new Error("No value provided for input HTTP label: Name.");
470
- }
380
+ resolvedPath = __resolvedPath(resolvedPath, input, "Name", function () { return input.Name; }, "{Name}", false);
471
381
  return [2, new __HttpRequest({
472
382
  protocol: protocol,
473
383
  hostname: hostname,
@@ -481,7 +391,7 @@ export var serializeAws_restJson1DescribeJobCommand = function (input, context)
481
391
  });
482
392
  }); };
483
393
  export var serializeAws_restJson1DescribeJobRunCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
484
- var _a, hostname, _b, protocol, port, basePath, headers, resolvedPath, labelValue, labelValue, body;
394
+ var _a, hostname, _b, protocol, port, basePath, headers, resolvedPath, body;
485
395
  return __generator(this, function (_c) {
486
396
  switch (_c.label) {
487
397
  case 0: return [4, context.endpoint()];
@@ -489,26 +399,8 @@ export var serializeAws_restJson1DescribeJobRunCommand = function (input, contex
489
399
  _a = _c.sent(), hostname = _a.hostname, _b = _a.protocol, protocol = _b === void 0 ? "https" : _b, port = _a.port, basePath = _a.path;
490
400
  headers = {};
491
401
  resolvedPath = "".concat((basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || "") + "/jobs/{Name}/jobRun/{RunId}";
492
- if (input.Name !== undefined) {
493
- labelValue = input.Name;
494
- if (labelValue.length <= 0) {
495
- throw new Error("Empty value provided for input HTTP label: Name.");
496
- }
497
- resolvedPath = resolvedPath.replace("{Name}", __extendedEncodeURIComponent(labelValue));
498
- }
499
- else {
500
- throw new Error("No value provided for input HTTP label: Name.");
501
- }
502
- if (input.RunId !== undefined) {
503
- labelValue = input.RunId;
504
- if (labelValue.length <= 0) {
505
- throw new Error("Empty value provided for input HTTP label: RunId.");
506
- }
507
- resolvedPath = resolvedPath.replace("{RunId}", __extendedEncodeURIComponent(labelValue));
508
- }
509
- else {
510
- throw new Error("No value provided for input HTTP label: RunId.");
511
- }
402
+ resolvedPath = __resolvedPath(resolvedPath, input, "Name", function () { return input.Name; }, "{Name}", false);
403
+ resolvedPath = __resolvedPath(resolvedPath, input, "RunId", function () { return input.RunId; }, "{RunId}", false);
512
404
  return [2, new __HttpRequest({
513
405
  protocol: protocol,
514
406
  hostname: hostname,
@@ -522,7 +414,7 @@ export var serializeAws_restJson1DescribeJobRunCommand = function (input, contex
522
414
  });
523
415
  }); };
524
416
  export var serializeAws_restJson1DescribeProjectCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
525
- var _a, hostname, _b, protocol, port, basePath, headers, resolvedPath, labelValue, body;
417
+ var _a, hostname, _b, protocol, port, basePath, headers, resolvedPath, body;
526
418
  return __generator(this, function (_c) {
527
419
  switch (_c.label) {
528
420
  case 0: return [4, context.endpoint()];
@@ -530,16 +422,7 @@ export var serializeAws_restJson1DescribeProjectCommand = function (input, conte
530
422
  _a = _c.sent(), hostname = _a.hostname, _b = _a.protocol, protocol = _b === void 0 ? "https" : _b, port = _a.port, basePath = _a.path;
531
423
  headers = {};
532
424
  resolvedPath = "".concat((basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || "") + "/projects/{Name}";
533
- if (input.Name !== undefined) {
534
- labelValue = input.Name;
535
- if (labelValue.length <= 0) {
536
- throw new Error("Empty value provided for input HTTP label: Name.");
537
- }
538
- resolvedPath = resolvedPath.replace("{Name}", __extendedEncodeURIComponent(labelValue));
539
- }
540
- else {
541
- throw new Error("No value provided for input HTTP label: Name.");
542
- }
425
+ resolvedPath = __resolvedPath(resolvedPath, input, "Name", function () { return input.Name; }, "{Name}", false);
543
426
  return [2, new __HttpRequest({
544
427
  protocol: protocol,
545
428
  hostname: hostname,
@@ -553,7 +436,7 @@ export var serializeAws_restJson1DescribeProjectCommand = function (input, conte
553
436
  });
554
437
  }); };
555
438
  export var serializeAws_restJson1DescribeRecipeCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
556
- var _a, hostname, _b, protocol, port, basePath, headers, resolvedPath, labelValue, query, body;
439
+ var _a, hostname, _b, protocol, port, basePath, headers, resolvedPath, query, body;
557
440
  return __generator(this, function (_c) {
558
441
  switch (_c.label) {
559
442
  case 0: return [4, context.endpoint()];
@@ -561,17 +444,10 @@ export var serializeAws_restJson1DescribeRecipeCommand = function (input, contex
561
444
  _a = _c.sent(), hostname = _a.hostname, _b = _a.protocol, protocol = _b === void 0 ? "https" : _b, port = _a.port, basePath = _a.path;
562
445
  headers = {};
563
446
  resolvedPath = "".concat((basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || "") + "/recipes/{Name}";
564
- if (input.Name !== undefined) {
565
- labelValue = input.Name;
566
- if (labelValue.length <= 0) {
567
- throw new Error("Empty value provided for input HTTP label: Name.");
568
- }
569
- resolvedPath = resolvedPath.replace("{Name}", __extendedEncodeURIComponent(labelValue));
570
- }
571
- else {
572
- throw new Error("No value provided for input HTTP label: Name.");
573
- }
574
- query = __assign({}, (input.RecipeVersion !== undefined && { recipeVersion: input.RecipeVersion }));
447
+ resolvedPath = __resolvedPath(resolvedPath, input, "Name", function () { return input.Name; }, "{Name}", false);
448
+ query = map({
449
+ recipeVersion: [, input.RecipeVersion],
450
+ });
575
451
  return [2, new __HttpRequest({
576
452
  protocol: protocol,
577
453
  hostname: hostname,
@@ -586,7 +462,7 @@ export var serializeAws_restJson1DescribeRecipeCommand = function (input, contex
586
462
  });
587
463
  }); };
588
464
  export var serializeAws_restJson1DescribeRulesetCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
589
- var _a, hostname, _b, protocol, port, basePath, headers, resolvedPath, labelValue, body;
465
+ var _a, hostname, _b, protocol, port, basePath, headers, resolvedPath, body;
590
466
  return __generator(this, function (_c) {
591
467
  switch (_c.label) {
592
468
  case 0: return [4, context.endpoint()];
@@ -594,16 +470,7 @@ export var serializeAws_restJson1DescribeRulesetCommand = function (input, conte
594
470
  _a = _c.sent(), hostname = _a.hostname, _b = _a.protocol, protocol = _b === void 0 ? "https" : _b, port = _a.port, basePath = _a.path;
595
471
  headers = {};
596
472
  resolvedPath = "".concat((basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || "") + "/rulesets/{Name}";
597
- if (input.Name !== undefined) {
598
- labelValue = input.Name;
599
- if (labelValue.length <= 0) {
600
- throw new Error("Empty value provided for input HTTP label: Name.");
601
- }
602
- resolvedPath = resolvedPath.replace("{Name}", __extendedEncodeURIComponent(labelValue));
603
- }
604
- else {
605
- throw new Error("No value provided for input HTTP label: Name.");
606
- }
473
+ resolvedPath = __resolvedPath(resolvedPath, input, "Name", function () { return input.Name; }, "{Name}", false);
607
474
  return [2, new __HttpRequest({
608
475
  protocol: protocol,
609
476
  hostname: hostname,
@@ -617,7 +484,7 @@ export var serializeAws_restJson1DescribeRulesetCommand = function (input, conte
617
484
  });
618
485
  }); };
619
486
  export var serializeAws_restJson1DescribeScheduleCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
620
- var _a, hostname, _b, protocol, port, basePath, headers, resolvedPath, labelValue, body;
487
+ var _a, hostname, _b, protocol, port, basePath, headers, resolvedPath, body;
621
488
  return __generator(this, function (_c) {
622
489
  switch (_c.label) {
623
490
  case 0: return [4, context.endpoint()];
@@ -625,16 +492,7 @@ export var serializeAws_restJson1DescribeScheduleCommand = function (input, cont
625
492
  _a = _c.sent(), hostname = _a.hostname, _b = _a.protocol, protocol = _b === void 0 ? "https" : _b, port = _a.port, basePath = _a.path;
626
493
  headers = {};
627
494
  resolvedPath = "".concat((basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || "") + "/schedules/{Name}";
628
- if (input.Name !== undefined) {
629
- labelValue = input.Name;
630
- if (labelValue.length <= 0) {
631
- throw new Error("Empty value provided for input HTTP label: Name.");
632
- }
633
- resolvedPath = resolvedPath.replace("{Name}", __extendedEncodeURIComponent(labelValue));
634
- }
635
- else {
636
- throw new Error("No value provided for input HTTP label: Name.");
637
- }
495
+ resolvedPath = __resolvedPath(resolvedPath, input, "Name", function () { return input.Name; }, "{Name}", false);
638
496
  return [2, new __HttpRequest({
639
497
  protocol: protocol,
640
498
  hostname: hostname,
@@ -656,7 +514,10 @@ export var serializeAws_restJson1ListDatasetsCommand = function (input, context)
656
514
  _a = _c.sent(), hostname = _a.hostname, _b = _a.protocol, protocol = _b === void 0 ? "https" : _b, port = _a.port, basePath = _a.path;
657
515
  headers = {};
658
516
  resolvedPath = "".concat((basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || "") + "/datasets";
659
- query = __assign(__assign({}, (input.MaxResults !== undefined && { maxResults: input.MaxResults.toString() })), (input.NextToken !== undefined && { nextToken: input.NextToken }));
517
+ query = map({
518
+ maxResults: [function () { return input.MaxResults !== void 0; }, function () { return input.MaxResults.toString(); }],
519
+ nextToken: [, input.NextToken],
520
+ });
660
521
  return [2, new __HttpRequest({
661
522
  protocol: protocol,
662
523
  hostname: hostname,
@@ -671,7 +532,7 @@ export var serializeAws_restJson1ListDatasetsCommand = function (input, context)
671
532
  });
672
533
  }); };
673
534
  export var serializeAws_restJson1ListJobRunsCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
674
- var _a, hostname, _b, protocol, port, basePath, headers, resolvedPath, labelValue, query, body;
535
+ var _a, hostname, _b, protocol, port, basePath, headers, resolvedPath, query, body;
675
536
  return __generator(this, function (_c) {
676
537
  switch (_c.label) {
677
538
  case 0: return [4, context.endpoint()];
@@ -679,17 +540,11 @@ export var serializeAws_restJson1ListJobRunsCommand = function (input, context)
679
540
  _a = _c.sent(), hostname = _a.hostname, _b = _a.protocol, protocol = _b === void 0 ? "https" : _b, port = _a.port, basePath = _a.path;
680
541
  headers = {};
681
542
  resolvedPath = "".concat((basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || "") + "/jobs/{Name}/jobRuns";
682
- if (input.Name !== undefined) {
683
- labelValue = input.Name;
684
- if (labelValue.length <= 0) {
685
- throw new Error("Empty value provided for input HTTP label: Name.");
686
- }
687
- resolvedPath = resolvedPath.replace("{Name}", __extendedEncodeURIComponent(labelValue));
688
- }
689
- else {
690
- throw new Error("No value provided for input HTTP label: Name.");
691
- }
692
- query = __assign(__assign({}, (input.MaxResults !== undefined && { maxResults: input.MaxResults.toString() })), (input.NextToken !== undefined && { nextToken: input.NextToken }));
543
+ resolvedPath = __resolvedPath(resolvedPath, input, "Name", function () { return input.Name; }, "{Name}", false);
544
+ query = map({
545
+ maxResults: [function () { return input.MaxResults !== void 0; }, function () { return input.MaxResults.toString(); }],
546
+ nextToken: [, input.NextToken],
547
+ });
693
548
  return [2, new __HttpRequest({
694
549
  protocol: protocol,
695
550
  hostname: hostname,
@@ -712,7 +567,12 @@ export var serializeAws_restJson1ListJobsCommand = function (input, context) { r
712
567
  _a = _c.sent(), hostname = _a.hostname, _b = _a.protocol, protocol = _b === void 0 ? "https" : _b, port = _a.port, basePath = _a.path;
713
568
  headers = {};
714
569
  resolvedPath = "".concat((basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || "") + "/jobs";
715
- query = __assign(__assign(__assign(__assign({}, (input.DatasetName !== undefined && { datasetName: input.DatasetName })), (input.MaxResults !== undefined && { maxResults: input.MaxResults.toString() })), (input.NextToken !== undefined && { nextToken: input.NextToken })), (input.ProjectName !== undefined && { projectName: input.ProjectName }));
570
+ query = map({
571
+ datasetName: [, input.DatasetName],
572
+ maxResults: [function () { return input.MaxResults !== void 0; }, function () { return input.MaxResults.toString(); }],
573
+ nextToken: [, input.NextToken],
574
+ projectName: [, input.ProjectName],
575
+ });
716
576
  return [2, new __HttpRequest({
717
577
  protocol: protocol,
718
578
  hostname: hostname,
@@ -735,7 +595,10 @@ export var serializeAws_restJson1ListProjectsCommand = function (input, context)
735
595
  _a = _c.sent(), hostname = _a.hostname, _b = _a.protocol, protocol = _b === void 0 ? "https" : _b, port = _a.port, basePath = _a.path;
736
596
  headers = {};
737
597
  resolvedPath = "".concat((basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || "") + "/projects";
738
- query = __assign(__assign({}, (input.NextToken !== undefined && { nextToken: input.NextToken })), (input.MaxResults !== undefined && { maxResults: input.MaxResults.toString() }));
598
+ query = map({
599
+ nextToken: [, input.NextToken],
600
+ maxResults: [function () { return input.MaxResults !== void 0; }, function () { return input.MaxResults.toString(); }],
601
+ });
739
602
  return [2, new __HttpRequest({
740
603
  protocol: protocol,
741
604
  hostname: hostname,
@@ -758,7 +621,11 @@ export var serializeAws_restJson1ListRecipesCommand = function (input, context)
758
621
  _a = _c.sent(), hostname = _a.hostname, _b = _a.protocol, protocol = _b === void 0 ? "https" : _b, port = _a.port, basePath = _a.path;
759
622
  headers = {};
760
623
  resolvedPath = "".concat((basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || "") + "/recipes";
761
- query = __assign(__assign(__assign({}, (input.MaxResults !== undefined && { maxResults: input.MaxResults.toString() })), (input.NextToken !== undefined && { nextToken: input.NextToken })), (input.RecipeVersion !== undefined && { recipeVersion: input.RecipeVersion }));
624
+ query = map({
625
+ maxResults: [function () { return input.MaxResults !== void 0; }, function () { return input.MaxResults.toString(); }],
626
+ nextToken: [, input.NextToken],
627
+ recipeVersion: [, input.RecipeVersion],
628
+ });
762
629
  return [2, new __HttpRequest({
763
630
  protocol: protocol,
764
631
  hostname: hostname,
@@ -781,7 +648,11 @@ export var serializeAws_restJson1ListRecipeVersionsCommand = function (input, co
781
648
  _a = _c.sent(), hostname = _a.hostname, _b = _a.protocol, protocol = _b === void 0 ? "https" : _b, port = _a.port, basePath = _a.path;
782
649
  headers = {};
783
650
  resolvedPath = "".concat((basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || "") + "/recipeVersions";
784
- query = __assign(__assign(__assign({}, (input.MaxResults !== undefined && { maxResults: input.MaxResults.toString() })), (input.NextToken !== undefined && { nextToken: input.NextToken })), (input.Name !== undefined && { name: input.Name }));
651
+ query = map({
652
+ maxResults: [function () { return input.MaxResults !== void 0; }, function () { return input.MaxResults.toString(); }],
653
+ nextToken: [, input.NextToken],
654
+ name: [, input.Name],
655
+ });
785
656
  return [2, new __HttpRequest({
786
657
  protocol: protocol,
787
658
  hostname: hostname,
@@ -804,7 +675,11 @@ export var serializeAws_restJson1ListRulesetsCommand = function (input, context)
804
675
  _a = _c.sent(), hostname = _a.hostname, _b = _a.protocol, protocol = _b === void 0 ? "https" : _b, port = _a.port, basePath = _a.path;
805
676
  headers = {};
806
677
  resolvedPath = "".concat((basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || "") + "/rulesets";
807
- query = __assign(__assign(__assign({}, (input.TargetArn !== undefined && { targetArn: input.TargetArn })), (input.MaxResults !== undefined && { maxResults: input.MaxResults.toString() })), (input.NextToken !== undefined && { nextToken: input.NextToken }));
678
+ query = map({
679
+ targetArn: [, input.TargetArn],
680
+ maxResults: [function () { return input.MaxResults !== void 0; }, function () { return input.MaxResults.toString(); }],
681
+ nextToken: [, input.NextToken],
682
+ });
808
683
  return [2, new __HttpRequest({
809
684
  protocol: protocol,
810
685
  hostname: hostname,
@@ -827,7 +702,11 @@ export var serializeAws_restJson1ListSchedulesCommand = function (input, context
827
702
  _a = _c.sent(), hostname = _a.hostname, _b = _a.protocol, protocol = _b === void 0 ? "https" : _b, port = _a.port, basePath = _a.path;
828
703
  headers = {};
829
704
  resolvedPath = "".concat((basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || "") + "/schedules";
830
- query = __assign(__assign(__assign({}, (input.JobName !== undefined && { jobName: input.JobName })), (input.MaxResults !== undefined && { maxResults: input.MaxResults.toString() })), (input.NextToken !== undefined && { nextToken: input.NextToken }));
705
+ query = map({
706
+ jobName: [, input.JobName],
707
+ maxResults: [function () { return input.MaxResults !== void 0; }, function () { return input.MaxResults.toString(); }],
708
+ nextToken: [, input.NextToken],
709
+ });
831
710
  return [2, new __HttpRequest({
832
711
  protocol: protocol,
833
712
  hostname: hostname,
@@ -842,7 +721,7 @@ export var serializeAws_restJson1ListSchedulesCommand = function (input, context
842
721
  });
843
722
  }); };
844
723
  export var serializeAws_restJson1ListTagsForResourceCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
845
- var _a, hostname, _b, protocol, port, basePath, headers, resolvedPath, labelValue, body;
724
+ var _a, hostname, _b, protocol, port, basePath, headers, resolvedPath, body;
846
725
  return __generator(this, function (_c) {
847
726
  switch (_c.label) {
848
727
  case 0: return [4, context.endpoint()];
@@ -850,16 +729,7 @@ export var serializeAws_restJson1ListTagsForResourceCommand = function (input, c
850
729
  _a = _c.sent(), hostname = _a.hostname, _b = _a.protocol, protocol = _b === void 0 ? "https" : _b, port = _a.port, basePath = _a.path;
851
730
  headers = {};
852
731
  resolvedPath = "".concat((basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || "") + "/tags/{ResourceArn}";
853
- if (input.ResourceArn !== undefined) {
854
- labelValue = input.ResourceArn;
855
- if (labelValue.length <= 0) {
856
- throw new Error("Empty value provided for input HTTP label: ResourceArn.");
857
- }
858
- resolvedPath = resolvedPath.replace("{ResourceArn}", __extendedEncodeURIComponent(labelValue));
859
- }
860
- else {
861
- throw new Error("No value provided for input HTTP label: ResourceArn.");
862
- }
732
+ resolvedPath = __resolvedPath(resolvedPath, input, "ResourceArn", function () { return input.ResourceArn; }, "{ResourceArn}", false);
863
733
  return [2, new __HttpRequest({
864
734
  protocol: protocol,
865
735
  hostname: hostname,
@@ -873,7 +743,7 @@ export var serializeAws_restJson1ListTagsForResourceCommand = function (input, c
873
743
  });
874
744
  }); };
875
745
  export var serializeAws_restJson1PublishRecipeCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
876
- var _a, hostname, _b, protocol, port, basePath, headers, resolvedPath, labelValue, body;
746
+ var _a, hostname, _b, protocol, port, basePath, headers, resolvedPath, body;
877
747
  return __generator(this, function (_c) {
878
748
  switch (_c.label) {
879
749
  case 0: return [4, context.endpoint()];
@@ -883,16 +753,7 @@ export var serializeAws_restJson1PublishRecipeCommand = function (input, context
883
753
  "content-type": "application/json",
884
754
  };
885
755
  resolvedPath = "".concat((basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || "") + "/recipes/{Name}/publishRecipe";
886
- if (input.Name !== undefined) {
887
- labelValue = input.Name;
888
- if (labelValue.length <= 0) {
889
- throw new Error("Empty value provided for input HTTP label: Name.");
890
- }
891
- resolvedPath = resolvedPath.replace("{Name}", __extendedEncodeURIComponent(labelValue));
892
- }
893
- else {
894
- throw new Error("No value provided for input HTTP label: Name.");
895
- }
756
+ resolvedPath = __resolvedPath(resolvedPath, input, "Name", function () { return input.Name; }, "{Name}", false);
896
757
  body = JSON.stringify(__assign({}, (input.Description != null && { Description: input.Description })));
897
758
  return [2, new __HttpRequest({
898
759
  protocol: protocol,
@@ -907,7 +768,7 @@ export var serializeAws_restJson1PublishRecipeCommand = function (input, context
907
768
  });
908
769
  }); };
909
770
  export var serializeAws_restJson1SendProjectSessionActionCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
910
- var _a, hostname, _b, protocol, port, basePath, headers, resolvedPath, labelValue, body;
771
+ var _a, hostname, _b, protocol, port, basePath, headers, resolvedPath, body;
911
772
  return __generator(this, function (_c) {
912
773
  switch (_c.label) {
913
774
  case 0: return [4, context.endpoint()];
@@ -917,16 +778,7 @@ export var serializeAws_restJson1SendProjectSessionActionCommand = function (inp
917
778
  "content-type": "application/json",
918
779
  };
919
780
  resolvedPath = "".concat((basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || "") + "/projects/{Name}/sendProjectSessionAction";
920
- if (input.Name !== undefined) {
921
- labelValue = input.Name;
922
- if (labelValue.length <= 0) {
923
- throw new Error("Empty value provided for input HTTP label: Name.");
924
- }
925
- resolvedPath = resolvedPath.replace("{Name}", __extendedEncodeURIComponent(labelValue));
926
- }
927
- else {
928
- throw new Error("No value provided for input HTTP label: Name.");
929
- }
781
+ resolvedPath = __resolvedPath(resolvedPath, input, "Name", function () { return input.Name; }, "{Name}", false);
930
782
  body = JSON.stringify(__assign(__assign(__assign(__assign(__assign({}, (input.ClientSessionId != null && { ClientSessionId: input.ClientSessionId })), (input.Preview != null && { Preview: input.Preview })), (input.RecipeStep != null && { RecipeStep: serializeAws_restJson1RecipeStep(input.RecipeStep, context) })), (input.StepIndex != null && { StepIndex: input.StepIndex })), (input.ViewFrame != null && { ViewFrame: serializeAws_restJson1ViewFrame(input.ViewFrame, context) })));
931
783
  return [2, new __HttpRequest({
932
784
  protocol: protocol,
@@ -941,7 +793,7 @@ export var serializeAws_restJson1SendProjectSessionActionCommand = function (inp
941
793
  });
942
794
  }); };
943
795
  export var serializeAws_restJson1StartJobRunCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
944
- var _a, hostname, _b, protocol, port, basePath, headers, resolvedPath, labelValue, body;
796
+ var _a, hostname, _b, protocol, port, basePath, headers, resolvedPath, body;
945
797
  return __generator(this, function (_c) {
946
798
  switch (_c.label) {
947
799
  case 0: return [4, context.endpoint()];
@@ -949,16 +801,7 @@ export var serializeAws_restJson1StartJobRunCommand = function (input, context)
949
801
  _a = _c.sent(), hostname = _a.hostname, _b = _a.protocol, protocol = _b === void 0 ? "https" : _b, port = _a.port, basePath = _a.path;
950
802
  headers = {};
951
803
  resolvedPath = "".concat((basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || "") + "/jobs/{Name}/startJobRun";
952
- if (input.Name !== undefined) {
953
- labelValue = input.Name;
954
- if (labelValue.length <= 0) {
955
- throw new Error("Empty value provided for input HTTP label: Name.");
956
- }
957
- resolvedPath = resolvedPath.replace("{Name}", __extendedEncodeURIComponent(labelValue));
958
- }
959
- else {
960
- throw new Error("No value provided for input HTTP label: Name.");
961
- }
804
+ resolvedPath = __resolvedPath(resolvedPath, input, "Name", function () { return input.Name; }, "{Name}", false);
962
805
  return [2, new __HttpRequest({
963
806
  protocol: protocol,
964
807
  hostname: hostname,
@@ -972,7 +815,7 @@ export var serializeAws_restJson1StartJobRunCommand = function (input, context)
972
815
  });
973
816
  }); };
974
817
  export var serializeAws_restJson1StartProjectSessionCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
975
- var _a, hostname, _b, protocol, port, basePath, headers, resolvedPath, labelValue, body;
818
+ var _a, hostname, _b, protocol, port, basePath, headers, resolvedPath, body;
976
819
  return __generator(this, function (_c) {
977
820
  switch (_c.label) {
978
821
  case 0: return [4, context.endpoint()];
@@ -982,16 +825,7 @@ export var serializeAws_restJson1StartProjectSessionCommand = function (input, c
982
825
  "content-type": "application/json",
983
826
  };
984
827
  resolvedPath = "".concat((basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || "") + "/projects/{Name}/startProjectSession";
985
- if (input.Name !== undefined) {
986
- labelValue = input.Name;
987
- if (labelValue.length <= 0) {
988
- throw new Error("Empty value provided for input HTTP label: Name.");
989
- }
990
- resolvedPath = resolvedPath.replace("{Name}", __extendedEncodeURIComponent(labelValue));
991
- }
992
- else {
993
- throw new Error("No value provided for input HTTP label: Name.");
994
- }
828
+ resolvedPath = __resolvedPath(resolvedPath, input, "Name", function () { return input.Name; }, "{Name}", false);
995
829
  body = JSON.stringify(__assign({}, (input.AssumeControl != null && { AssumeControl: input.AssumeControl })));
996
830
  return [2, new __HttpRequest({
997
831
  protocol: protocol,
@@ -1006,7 +840,7 @@ export var serializeAws_restJson1StartProjectSessionCommand = function (input, c
1006
840
  });
1007
841
  }); };
1008
842
  export var serializeAws_restJson1StopJobRunCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
1009
- var _a, hostname, _b, protocol, port, basePath, headers, resolvedPath, labelValue, labelValue, body;
843
+ var _a, hostname, _b, protocol, port, basePath, headers, resolvedPath, body;
1010
844
  return __generator(this, function (_c) {
1011
845
  switch (_c.label) {
1012
846
  case 0: return [4, context.endpoint()];
@@ -1014,26 +848,8 @@ export var serializeAws_restJson1StopJobRunCommand = function (input, context) {
1014
848
  _a = _c.sent(), hostname = _a.hostname, _b = _a.protocol, protocol = _b === void 0 ? "https" : _b, port = _a.port, basePath = _a.path;
1015
849
  headers = {};
1016
850
  resolvedPath = "".concat((basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || "") + "/jobs/{Name}/jobRun/{RunId}/stopJobRun";
1017
- if (input.Name !== undefined) {
1018
- labelValue = input.Name;
1019
- if (labelValue.length <= 0) {
1020
- throw new Error("Empty value provided for input HTTP label: Name.");
1021
- }
1022
- resolvedPath = resolvedPath.replace("{Name}", __extendedEncodeURIComponent(labelValue));
1023
- }
1024
- else {
1025
- throw new Error("No value provided for input HTTP label: Name.");
1026
- }
1027
- if (input.RunId !== undefined) {
1028
- labelValue = input.RunId;
1029
- if (labelValue.length <= 0) {
1030
- throw new Error("Empty value provided for input HTTP label: RunId.");
1031
- }
1032
- resolvedPath = resolvedPath.replace("{RunId}", __extendedEncodeURIComponent(labelValue));
1033
- }
1034
- else {
1035
- throw new Error("No value provided for input HTTP label: RunId.");
1036
- }
851
+ resolvedPath = __resolvedPath(resolvedPath, input, "Name", function () { return input.Name; }, "{Name}", false);
852
+ resolvedPath = __resolvedPath(resolvedPath, input, "RunId", function () { return input.RunId; }, "{RunId}", false);
1037
853
  return [2, new __HttpRequest({
1038
854
  protocol: protocol,
1039
855
  hostname: hostname,
@@ -1047,7 +863,7 @@ export var serializeAws_restJson1StopJobRunCommand = function (input, context) {
1047
863
  });
1048
864
  }); };
1049
865
  export var serializeAws_restJson1TagResourceCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
1050
- var _a, hostname, _b, protocol, port, basePath, headers, resolvedPath, labelValue, body;
866
+ var _a, hostname, _b, protocol, port, basePath, headers, resolvedPath, body;
1051
867
  return __generator(this, function (_c) {
1052
868
  switch (_c.label) {
1053
869
  case 0: return [4, context.endpoint()];
@@ -1057,16 +873,7 @@ export var serializeAws_restJson1TagResourceCommand = function (input, context)
1057
873
  "content-type": "application/json",
1058
874
  };
1059
875
  resolvedPath = "".concat((basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || "") + "/tags/{ResourceArn}";
1060
- if (input.ResourceArn !== undefined) {
1061
- labelValue = input.ResourceArn;
1062
- if (labelValue.length <= 0) {
1063
- throw new Error("Empty value provided for input HTTP label: ResourceArn.");
1064
- }
1065
- resolvedPath = resolvedPath.replace("{ResourceArn}", __extendedEncodeURIComponent(labelValue));
1066
- }
1067
- else {
1068
- throw new Error("No value provided for input HTTP label: ResourceArn.");
1069
- }
876
+ resolvedPath = __resolvedPath(resolvedPath, input, "ResourceArn", function () { return input.ResourceArn; }, "{ResourceArn}", false);
1070
877
  body = JSON.stringify(__assign({}, (input.Tags != null && { Tags: serializeAws_restJson1TagMap(input.Tags, context) })));
1071
878
  return [2, new __HttpRequest({
1072
879
  protocol: protocol,
@@ -1081,7 +888,7 @@ export var serializeAws_restJson1TagResourceCommand = function (input, context)
1081
888
  });
1082
889
  }); };
1083
890
  export var serializeAws_restJson1UntagResourceCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
1084
- var _a, hostname, _b, protocol, port, basePath, headers, resolvedPath, labelValue, query, body;
891
+ var _a, hostname, _b, protocol, port, basePath, headers, resolvedPath, query, body;
1085
892
  return __generator(this, function (_c) {
1086
893
  switch (_c.label) {
1087
894
  case 0: return [4, context.endpoint()];
@@ -1089,17 +896,10 @@ export var serializeAws_restJson1UntagResourceCommand = function (input, context
1089
896
  _a = _c.sent(), hostname = _a.hostname, _b = _a.protocol, protocol = _b === void 0 ? "https" : _b, port = _a.port, basePath = _a.path;
1090
897
  headers = {};
1091
898
  resolvedPath = "".concat((basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || "") + "/tags/{ResourceArn}";
1092
- if (input.ResourceArn !== undefined) {
1093
- labelValue = input.ResourceArn;
1094
- if (labelValue.length <= 0) {
1095
- throw new Error("Empty value provided for input HTTP label: ResourceArn.");
1096
- }
1097
- resolvedPath = resolvedPath.replace("{ResourceArn}", __extendedEncodeURIComponent(labelValue));
1098
- }
1099
- else {
1100
- throw new Error("No value provided for input HTTP label: ResourceArn.");
1101
- }
1102
- query = __assign({}, (input.TagKeys !== undefined && { tagKeys: (input.TagKeys || []).map(function (_entry) { return _entry; }) }));
899
+ resolvedPath = __resolvedPath(resolvedPath, input, "ResourceArn", function () { return input.ResourceArn; }, "{ResourceArn}", false);
900
+ query = map({
901
+ tagKeys: [function () { return input.TagKeys !== void 0; }, function () { return (input.TagKeys || []).map(function (_entry) { return _entry; }); }],
902
+ });
1103
903
  return [2, new __HttpRequest({
1104
904
  protocol: protocol,
1105
905
  hostname: hostname,
@@ -1114,7 +914,7 @@ export var serializeAws_restJson1UntagResourceCommand = function (input, context
1114
914
  });
1115
915
  }); };
1116
916
  export var serializeAws_restJson1UpdateDatasetCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
1117
- var _a, hostname, _b, protocol, port, basePath, headers, resolvedPath, labelValue, body;
917
+ var _a, hostname, _b, protocol, port, basePath, headers, resolvedPath, body;
1118
918
  return __generator(this, function (_c) {
1119
919
  switch (_c.label) {
1120
920
  case 0: return [4, context.endpoint()];
@@ -1124,16 +924,7 @@ export var serializeAws_restJson1UpdateDatasetCommand = function (input, context
1124
924
  "content-type": "application/json",
1125
925
  };
1126
926
  resolvedPath = "".concat((basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || "") + "/datasets/{Name}";
1127
- if (input.Name !== undefined) {
1128
- labelValue = input.Name;
1129
- if (labelValue.length <= 0) {
1130
- throw new Error("Empty value provided for input HTTP label: Name.");
1131
- }
1132
- resolvedPath = resolvedPath.replace("{Name}", __extendedEncodeURIComponent(labelValue));
1133
- }
1134
- else {
1135
- throw new Error("No value provided for input HTTP label: Name.");
1136
- }
927
+ resolvedPath = __resolvedPath(resolvedPath, input, "Name", function () { return input.Name; }, "{Name}", false);
1137
928
  body = JSON.stringify(__assign(__assign(__assign(__assign({}, (input.Format != null && { Format: input.Format })), (input.FormatOptions != null && {
1138
929
  FormatOptions: serializeAws_restJson1FormatOptions(input.FormatOptions, context),
1139
930
  })), (input.Input != null && { Input: serializeAws_restJson1Input(input.Input, context) })), (input.PathOptions != null && { PathOptions: serializeAws_restJson1PathOptions(input.PathOptions, context) })));
@@ -1150,7 +941,7 @@ export var serializeAws_restJson1UpdateDatasetCommand = function (input, context
1150
941
  });
1151
942
  }); };
1152
943
  export var serializeAws_restJson1UpdateProfileJobCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
1153
- var _a, hostname, _b, protocol, port, basePath, headers, resolvedPath, labelValue, body;
944
+ var _a, hostname, _b, protocol, port, basePath, headers, resolvedPath, body;
1154
945
  return __generator(this, function (_c) {
1155
946
  switch (_c.label) {
1156
947
  case 0: return [4, context.endpoint()];
@@ -1160,16 +951,7 @@ export var serializeAws_restJson1UpdateProfileJobCommand = function (input, cont
1160
951
  "content-type": "application/json",
1161
952
  };
1162
953
  resolvedPath = "".concat((basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || "") + "/profileJobs/{Name}";
1163
- if (input.Name !== undefined) {
1164
- labelValue = input.Name;
1165
- if (labelValue.length <= 0) {
1166
- throw new Error("Empty value provided for input HTTP label: Name.");
1167
- }
1168
- resolvedPath = resolvedPath.replace("{Name}", __extendedEncodeURIComponent(labelValue));
1169
- }
1170
- else {
1171
- throw new Error("No value provided for input HTTP label: Name.");
1172
- }
954
+ resolvedPath = __resolvedPath(resolvedPath, input, "Name", function () { return input.Name; }, "{Name}", false);
1173
955
  body = JSON.stringify(__assign(__assign(__assign(__assign(__assign(__assign(__assign(__assign(__assign(__assign(__assign({}, (input.Configuration != null && {
1174
956
  Configuration: serializeAws_restJson1ProfileConfiguration(input.Configuration, context),
1175
957
  })), (input.EncryptionKeyArn != null && { EncryptionKeyArn: input.EncryptionKeyArn })), (input.EncryptionMode != null && { EncryptionMode: input.EncryptionMode })), (input.JobSample != null && { JobSample: serializeAws_restJson1JobSample(input.JobSample, context) })), (input.LogSubscription != null && { LogSubscription: input.LogSubscription })), (input.MaxCapacity != null && { MaxCapacity: input.MaxCapacity })), (input.MaxRetries != null && { MaxRetries: input.MaxRetries })), (input.OutputLocation != null && {
@@ -1190,7 +972,7 @@ export var serializeAws_restJson1UpdateProfileJobCommand = function (input, cont
1190
972
  });
1191
973
  }); };
1192
974
  export var serializeAws_restJson1UpdateProjectCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
1193
- var _a, hostname, _b, protocol, port, basePath, headers, resolvedPath, labelValue, body;
975
+ var _a, hostname, _b, protocol, port, basePath, headers, resolvedPath, body;
1194
976
  return __generator(this, function (_c) {
1195
977
  switch (_c.label) {
1196
978
  case 0: return [4, context.endpoint()];
@@ -1200,16 +982,7 @@ export var serializeAws_restJson1UpdateProjectCommand = function (input, context
1200
982
  "content-type": "application/json",
1201
983
  };
1202
984
  resolvedPath = "".concat((basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || "") + "/projects/{Name}";
1203
- if (input.Name !== undefined) {
1204
- labelValue = input.Name;
1205
- if (labelValue.length <= 0) {
1206
- throw new Error("Empty value provided for input HTTP label: Name.");
1207
- }
1208
- resolvedPath = resolvedPath.replace("{Name}", __extendedEncodeURIComponent(labelValue));
1209
- }
1210
- else {
1211
- throw new Error("No value provided for input HTTP label: Name.");
1212
- }
985
+ resolvedPath = __resolvedPath(resolvedPath, input, "Name", function () { return input.Name; }, "{Name}", false);
1213
986
  body = JSON.stringify(__assign(__assign({}, (input.RoleArn != null && { RoleArn: input.RoleArn })), (input.Sample != null && { Sample: serializeAws_restJson1Sample(input.Sample, context) })));
1214
987
  return [2, new __HttpRequest({
1215
988
  protocol: protocol,
@@ -1224,7 +997,7 @@ export var serializeAws_restJson1UpdateProjectCommand = function (input, context
1224
997
  });
1225
998
  }); };
1226
999
  export var serializeAws_restJson1UpdateRecipeCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
1227
- var _a, hostname, _b, protocol, port, basePath, headers, resolvedPath, labelValue, body;
1000
+ var _a, hostname, _b, protocol, port, basePath, headers, resolvedPath, body;
1228
1001
  return __generator(this, function (_c) {
1229
1002
  switch (_c.label) {
1230
1003
  case 0: return [4, context.endpoint()];
@@ -1234,16 +1007,7 @@ export var serializeAws_restJson1UpdateRecipeCommand = function (input, context)
1234
1007
  "content-type": "application/json",
1235
1008
  };
1236
1009
  resolvedPath = "".concat((basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || "") + "/recipes/{Name}";
1237
- if (input.Name !== undefined) {
1238
- labelValue = input.Name;
1239
- if (labelValue.length <= 0) {
1240
- throw new Error("Empty value provided for input HTTP label: Name.");
1241
- }
1242
- resolvedPath = resolvedPath.replace("{Name}", __extendedEncodeURIComponent(labelValue));
1243
- }
1244
- else {
1245
- throw new Error("No value provided for input HTTP label: Name.");
1246
- }
1010
+ resolvedPath = __resolvedPath(resolvedPath, input, "Name", function () { return input.Name; }, "{Name}", false);
1247
1011
  body = JSON.stringify(__assign(__assign({}, (input.Description != null && { Description: input.Description })), (input.Steps != null && { Steps: serializeAws_restJson1RecipeStepList(input.Steps, context) })));
1248
1012
  return [2, new __HttpRequest({
1249
1013
  protocol: protocol,
@@ -1258,7 +1022,7 @@ export var serializeAws_restJson1UpdateRecipeCommand = function (input, context)
1258
1022
  });
1259
1023
  }); };
1260
1024
  export var serializeAws_restJson1UpdateRecipeJobCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
1261
- var _a, hostname, _b, protocol, port, basePath, headers, resolvedPath, labelValue, body;
1025
+ var _a, hostname, _b, protocol, port, basePath, headers, resolvedPath, body;
1262
1026
  return __generator(this, function (_c) {
1263
1027
  switch (_c.label) {
1264
1028
  case 0: return [4, context.endpoint()];
@@ -1268,16 +1032,7 @@ export var serializeAws_restJson1UpdateRecipeJobCommand = function (input, conte
1268
1032
  "content-type": "application/json",
1269
1033
  };
1270
1034
  resolvedPath = "".concat((basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || "") + "/recipeJobs/{Name}";
1271
- if (input.Name !== undefined) {
1272
- labelValue = input.Name;
1273
- if (labelValue.length <= 0) {
1274
- throw new Error("Empty value provided for input HTTP label: Name.");
1275
- }
1276
- resolvedPath = resolvedPath.replace("{Name}", __extendedEncodeURIComponent(labelValue));
1277
- }
1278
- else {
1279
- throw new Error("No value provided for input HTTP label: Name.");
1280
- }
1035
+ resolvedPath = __resolvedPath(resolvedPath, input, "Name", function () { return input.Name; }, "{Name}", false);
1281
1036
  body = JSON.stringify(__assign(__assign(__assign(__assign(__assign(__assign(__assign(__assign(__assign(__assign({}, (input.DataCatalogOutputs != null && {
1282
1037
  DataCatalogOutputs: serializeAws_restJson1DataCatalogOutputList(input.DataCatalogOutputs, context),
1283
1038
  })), (input.DatabaseOutputs != null && {
@@ -1296,7 +1051,7 @@ export var serializeAws_restJson1UpdateRecipeJobCommand = function (input, conte
1296
1051
  });
1297
1052
  }); };
1298
1053
  export var serializeAws_restJson1UpdateRulesetCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
1299
- var _a, hostname, _b, protocol, port, basePath, headers, resolvedPath, labelValue, body;
1054
+ var _a, hostname, _b, protocol, port, basePath, headers, resolvedPath, body;
1300
1055
  return __generator(this, function (_c) {
1301
1056
  switch (_c.label) {
1302
1057
  case 0: return [4, context.endpoint()];
@@ -1306,16 +1061,7 @@ export var serializeAws_restJson1UpdateRulesetCommand = function (input, context
1306
1061
  "content-type": "application/json",
1307
1062
  };
1308
1063
  resolvedPath = "".concat((basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || "") + "/rulesets/{Name}";
1309
- if (input.Name !== undefined) {
1310
- labelValue = input.Name;
1311
- if (labelValue.length <= 0) {
1312
- throw new Error("Empty value provided for input HTTP label: Name.");
1313
- }
1314
- resolvedPath = resolvedPath.replace("{Name}", __extendedEncodeURIComponent(labelValue));
1315
- }
1316
- else {
1317
- throw new Error("No value provided for input HTTP label: Name.");
1318
- }
1064
+ resolvedPath = __resolvedPath(resolvedPath, input, "Name", function () { return input.Name; }, "{Name}", false);
1319
1065
  body = JSON.stringify(__assign(__assign({}, (input.Description != null && { Description: input.Description })), (input.Rules != null && { Rules: serializeAws_restJson1RuleList(input.Rules, context) })));
1320
1066
  return [2, new __HttpRequest({
1321
1067
  protocol: protocol,
@@ -1330,7 +1076,7 @@ export var serializeAws_restJson1UpdateRulesetCommand = function (input, context
1330
1076
  });
1331
1077
  }); };
1332
1078
  export var serializeAws_restJson1UpdateScheduleCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
1333
- var _a, hostname, _b, protocol, port, basePath, headers, resolvedPath, labelValue, body;
1079
+ var _a, hostname, _b, protocol, port, basePath, headers, resolvedPath, body;
1334
1080
  return __generator(this, function (_c) {
1335
1081
  switch (_c.label) {
1336
1082
  case 0: return [4, context.endpoint()];
@@ -1340,16 +1086,7 @@ export var serializeAws_restJson1UpdateScheduleCommand = function (input, contex
1340
1086
  "content-type": "application/json",
1341
1087
  };
1342
1088
  resolvedPath = "".concat((basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || "") + "/schedules/{Name}";
1343
- if (input.Name !== undefined) {
1344
- labelValue = input.Name;
1345
- if (labelValue.length <= 0) {
1346
- throw new Error("Empty value provided for input HTTP label: Name.");
1347
- }
1348
- resolvedPath = resolvedPath.replace("{Name}", __extendedEncodeURIComponent(labelValue));
1349
- }
1350
- else {
1351
- throw new Error("No value provided for input HTTP label: Name.");
1352
- }
1089
+ resolvedPath = __resolvedPath(resolvedPath, input, "Name", function () { return input.Name; }, "{Name}", false);
1353
1090
  body = JSON.stringify(__assign(__assign({}, (input.CronExpression != null && { CronExpression: input.CronExpression })), (input.JobNames != null && { JobNames: serializeAws_restJson1JobNameList(input.JobNames, context) })));
1354
1091
  return [2, new __HttpRequest({
1355
1092
  protocol: protocol,
@@ -1371,28 +1108,26 @@ export var deserializeAws_restJson1BatchDeleteRecipeVersionCommand = function (o
1371
1108
  if (output.statusCode !== 200 && output.statusCode >= 300) {
1372
1109
  return [2, deserializeAws_restJson1BatchDeleteRecipeVersionCommandError(output, context)];
1373
1110
  }
1374
- contents = {
1111
+ contents = map({
1375
1112
  $metadata: deserializeMetadata(output),
1376
- Errors: undefined,
1377
- Name: undefined,
1378
- };
1113
+ });
1379
1114
  _a = __expectNonNull;
1380
1115
  _b = __expectObject;
1381
1116
  return [4, parseBody(output.body, context)];
1382
1117
  case 1:
1383
1118
  data = _a.apply(void 0, [_b.apply(void 0, [_c.sent()]), "body"]);
1384
- if (data.Errors !== undefined && data.Errors !== null) {
1119
+ if (data.Errors != null) {
1385
1120
  contents.Errors = deserializeAws_restJson1RecipeErrorList(data.Errors, context);
1386
1121
  }
1387
- if (data.Name !== undefined && data.Name !== null) {
1122
+ if (data.Name != null) {
1388
1123
  contents.Name = __expectString(data.Name);
1389
1124
  }
1390
- return [2, Promise.resolve(contents)];
1125
+ return [2, contents];
1391
1126
  }
1392
1127
  });
1393
1128
  }); };
1394
1129
  var deserializeAws_restJson1BatchDeleteRecipeVersionCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
1395
- var parsedOutput, _a, response, errorCode, _b, parsedBody, $metadata, statusCode;
1130
+ var parsedOutput, _a, errorCode, _b, parsedBody;
1396
1131
  var _c;
1397
1132
  return __generator(this, function (_d) {
1398
1133
  switch (_d.label) {
@@ -1421,14 +1156,14 @@ var deserializeAws_restJson1BatchDeleteRecipeVersionCommandError = function (out
1421
1156
  case 7: throw _d.sent();
1422
1157
  case 8:
1423
1158
  parsedBody = parsedOutput.body;
1424
- $metadata = deserializeMetadata(output);
1425
- statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
1426
- response = new __BaseException({
1427
- name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
1428
- $fault: "client",
1429
- $metadata: $metadata,
1159
+ throwDefaultError({
1160
+ output: output,
1161
+ parsedBody: parsedBody,
1162
+ exceptionCtor: __BaseException,
1163
+ errorCode: errorCode,
1430
1164
  });
1431
- throw __decorateServiceException(response, parsedBody);
1165
+ _d.label = 9;
1166
+ case 9: return [2];
1432
1167
  }
1433
1168
  });
1434
1169
  }); };
@@ -1440,24 +1175,23 @@ export var deserializeAws_restJson1CreateDatasetCommand = function (output, cont
1440
1175
  if (output.statusCode !== 200 && output.statusCode >= 300) {
1441
1176
  return [2, deserializeAws_restJson1CreateDatasetCommandError(output, context)];
1442
1177
  }
1443
- contents = {
1178
+ contents = map({
1444
1179
  $metadata: deserializeMetadata(output),
1445
- Name: undefined,
1446
- };
1180
+ });
1447
1181
  _a = __expectNonNull;
1448
1182
  _b = __expectObject;
1449
1183
  return [4, parseBody(output.body, context)];
1450
1184
  case 1:
1451
1185
  data = _a.apply(void 0, [_b.apply(void 0, [_c.sent()]), "body"]);
1452
- if (data.Name !== undefined && data.Name !== null) {
1186
+ if (data.Name != null) {
1453
1187
  contents.Name = __expectString(data.Name);
1454
1188
  }
1455
- return [2, Promise.resolve(contents)];
1189
+ return [2, contents];
1456
1190
  }
1457
1191
  });
1458
1192
  }); };
1459
1193
  var deserializeAws_restJson1CreateDatasetCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
1460
- var parsedOutput, _a, response, errorCode, _b, parsedBody, $metadata, statusCode;
1194
+ var parsedOutput, _a, errorCode, _b, parsedBody;
1461
1195
  var _c;
1462
1196
  return __generator(this, function (_d) {
1463
1197
  switch (_d.label) {
@@ -1490,14 +1224,14 @@ var deserializeAws_restJson1CreateDatasetCommandError = function (output, contex
1490
1224
  case 9: throw _d.sent();
1491
1225
  case 10:
1492
1226
  parsedBody = parsedOutput.body;
1493
- $metadata = deserializeMetadata(output);
1494
- statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
1495
- response = new __BaseException({
1496
- name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
1497
- $fault: "client",
1498
- $metadata: $metadata,
1227
+ throwDefaultError({
1228
+ output: output,
1229
+ parsedBody: parsedBody,
1230
+ exceptionCtor: __BaseException,
1231
+ errorCode: errorCode,
1499
1232
  });
1500
- throw __decorateServiceException(response, parsedBody);
1233
+ _d.label = 11;
1234
+ case 11: return [2];
1501
1235
  }
1502
1236
  });
1503
1237
  }); };
@@ -1509,24 +1243,23 @@ export var deserializeAws_restJson1CreateProfileJobCommand = function (output, c
1509
1243
  if (output.statusCode !== 200 && output.statusCode >= 300) {
1510
1244
  return [2, deserializeAws_restJson1CreateProfileJobCommandError(output, context)];
1511
1245
  }
1512
- contents = {
1246
+ contents = map({
1513
1247
  $metadata: deserializeMetadata(output),
1514
- Name: undefined,
1515
- };
1248
+ });
1516
1249
  _a = __expectNonNull;
1517
1250
  _b = __expectObject;
1518
1251
  return [4, parseBody(output.body, context)];
1519
1252
  case 1:
1520
1253
  data = _a.apply(void 0, [_b.apply(void 0, [_c.sent()]), "body"]);
1521
- if (data.Name !== undefined && data.Name !== null) {
1254
+ if (data.Name != null) {
1522
1255
  contents.Name = __expectString(data.Name);
1523
1256
  }
1524
- return [2, Promise.resolve(contents)];
1257
+ return [2, contents];
1525
1258
  }
1526
1259
  });
1527
1260
  }); };
1528
1261
  var deserializeAws_restJson1CreateProfileJobCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
1529
- var parsedOutput, _a, response, errorCode, _b, parsedBody, $metadata, statusCode;
1262
+ var parsedOutput, _a, errorCode, _b, parsedBody;
1530
1263
  var _c;
1531
1264
  return __generator(this, function (_d) {
1532
1265
  switch (_d.label) {
@@ -1563,14 +1296,14 @@ var deserializeAws_restJson1CreateProfileJobCommandError = function (output, con
1563
1296
  case 11: throw _d.sent();
1564
1297
  case 12:
1565
1298
  parsedBody = parsedOutput.body;
1566
- $metadata = deserializeMetadata(output);
1567
- statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
1568
- response = new __BaseException({
1569
- name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
1570
- $fault: "client",
1571
- $metadata: $metadata,
1299
+ throwDefaultError({
1300
+ output: output,
1301
+ parsedBody: parsedBody,
1302
+ exceptionCtor: __BaseException,
1303
+ errorCode: errorCode,
1572
1304
  });
1573
- throw __decorateServiceException(response, parsedBody);
1305
+ _d.label = 13;
1306
+ case 13: return [2];
1574
1307
  }
1575
1308
  });
1576
1309
  }); };
@@ -1582,24 +1315,23 @@ export var deserializeAws_restJson1CreateProjectCommand = function (output, cont
1582
1315
  if (output.statusCode !== 200 && output.statusCode >= 300) {
1583
1316
  return [2, deserializeAws_restJson1CreateProjectCommandError(output, context)];
1584
1317
  }
1585
- contents = {
1318
+ contents = map({
1586
1319
  $metadata: deserializeMetadata(output),
1587
- Name: undefined,
1588
- };
1320
+ });
1589
1321
  _a = __expectNonNull;
1590
1322
  _b = __expectObject;
1591
1323
  return [4, parseBody(output.body, context)];
1592
1324
  case 1:
1593
1325
  data = _a.apply(void 0, [_b.apply(void 0, [_c.sent()]), "body"]);
1594
- if (data.Name !== undefined && data.Name !== null) {
1326
+ if (data.Name != null) {
1595
1327
  contents.Name = __expectString(data.Name);
1596
1328
  }
1597
- return [2, Promise.resolve(contents)];
1329
+ return [2, contents];
1598
1330
  }
1599
1331
  });
1600
1332
  }); };
1601
1333
  var deserializeAws_restJson1CreateProjectCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
1602
- var parsedOutput, _a, response, errorCode, _b, parsedBody, $metadata, statusCode;
1334
+ var parsedOutput, _a, errorCode, _b, parsedBody;
1603
1335
  var _c;
1604
1336
  return __generator(this, function (_d) {
1605
1337
  switch (_d.label) {
@@ -1632,14 +1364,14 @@ var deserializeAws_restJson1CreateProjectCommandError = function (output, contex
1632
1364
  case 9: throw _d.sent();
1633
1365
  case 10:
1634
1366
  parsedBody = parsedOutput.body;
1635
- $metadata = deserializeMetadata(output);
1636
- statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
1637
- response = new __BaseException({
1638
- name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
1639
- $fault: "client",
1640
- $metadata: $metadata,
1367
+ throwDefaultError({
1368
+ output: output,
1369
+ parsedBody: parsedBody,
1370
+ exceptionCtor: __BaseException,
1371
+ errorCode: errorCode,
1641
1372
  });
1642
- throw __decorateServiceException(response, parsedBody);
1373
+ _d.label = 11;
1374
+ case 11: return [2];
1643
1375
  }
1644
1376
  });
1645
1377
  }); };
@@ -1651,24 +1383,23 @@ export var deserializeAws_restJson1CreateRecipeCommand = function (output, conte
1651
1383
  if (output.statusCode !== 200 && output.statusCode >= 300) {
1652
1384
  return [2, deserializeAws_restJson1CreateRecipeCommandError(output, context)];
1653
1385
  }
1654
- contents = {
1386
+ contents = map({
1655
1387
  $metadata: deserializeMetadata(output),
1656
- Name: undefined,
1657
- };
1388
+ });
1658
1389
  _a = __expectNonNull;
1659
1390
  _b = __expectObject;
1660
1391
  return [4, parseBody(output.body, context)];
1661
1392
  case 1:
1662
1393
  data = _a.apply(void 0, [_b.apply(void 0, [_c.sent()]), "body"]);
1663
- if (data.Name !== undefined && data.Name !== null) {
1394
+ if (data.Name != null) {
1664
1395
  contents.Name = __expectString(data.Name);
1665
1396
  }
1666
- return [2, Promise.resolve(contents)];
1397
+ return [2, contents];
1667
1398
  }
1668
1399
  });
1669
1400
  }); };
1670
1401
  var deserializeAws_restJson1CreateRecipeCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
1671
- var parsedOutput, _a, response, errorCode, _b, parsedBody, $metadata, statusCode;
1402
+ var parsedOutput, _a, errorCode, _b, parsedBody;
1672
1403
  var _c;
1673
1404
  return __generator(this, function (_d) {
1674
1405
  switch (_d.label) {
@@ -1697,14 +1428,14 @@ var deserializeAws_restJson1CreateRecipeCommandError = function (output, context
1697
1428
  case 7: throw _d.sent();
1698
1429
  case 8:
1699
1430
  parsedBody = parsedOutput.body;
1700
- $metadata = deserializeMetadata(output);
1701
- statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
1702
- response = new __BaseException({
1703
- name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
1704
- $fault: "client",
1705
- $metadata: $metadata,
1431
+ throwDefaultError({
1432
+ output: output,
1433
+ parsedBody: parsedBody,
1434
+ exceptionCtor: __BaseException,
1435
+ errorCode: errorCode,
1706
1436
  });
1707
- throw __decorateServiceException(response, parsedBody);
1437
+ _d.label = 9;
1438
+ case 9: return [2];
1708
1439
  }
1709
1440
  });
1710
1441
  }); };
@@ -1716,24 +1447,23 @@ export var deserializeAws_restJson1CreateRecipeJobCommand = function (output, co
1716
1447
  if (output.statusCode !== 200 && output.statusCode >= 300) {
1717
1448
  return [2, deserializeAws_restJson1CreateRecipeJobCommandError(output, context)];
1718
1449
  }
1719
- contents = {
1450
+ contents = map({
1720
1451
  $metadata: deserializeMetadata(output),
1721
- Name: undefined,
1722
- };
1452
+ });
1723
1453
  _a = __expectNonNull;
1724
1454
  _b = __expectObject;
1725
1455
  return [4, parseBody(output.body, context)];
1726
1456
  case 1:
1727
1457
  data = _a.apply(void 0, [_b.apply(void 0, [_c.sent()]), "body"]);
1728
- if (data.Name !== undefined && data.Name !== null) {
1458
+ if (data.Name != null) {
1729
1459
  contents.Name = __expectString(data.Name);
1730
1460
  }
1731
- return [2, Promise.resolve(contents)];
1461
+ return [2, contents];
1732
1462
  }
1733
1463
  });
1734
1464
  }); };
1735
1465
  var deserializeAws_restJson1CreateRecipeJobCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
1736
- var parsedOutput, _a, response, errorCode, _b, parsedBody, $metadata, statusCode;
1466
+ var parsedOutput, _a, errorCode, _b, parsedBody;
1737
1467
  var _c;
1738
1468
  return __generator(this, function (_d) {
1739
1469
  switch (_d.label) {
@@ -1770,14 +1500,14 @@ var deserializeAws_restJson1CreateRecipeJobCommandError = function (output, cont
1770
1500
  case 11: throw _d.sent();
1771
1501
  case 12:
1772
1502
  parsedBody = parsedOutput.body;
1773
- $metadata = deserializeMetadata(output);
1774
- statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
1775
- response = new __BaseException({
1776
- name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
1777
- $fault: "client",
1778
- $metadata: $metadata,
1503
+ throwDefaultError({
1504
+ output: output,
1505
+ parsedBody: parsedBody,
1506
+ exceptionCtor: __BaseException,
1507
+ errorCode: errorCode,
1779
1508
  });
1780
- throw __decorateServiceException(response, parsedBody);
1509
+ _d.label = 13;
1510
+ case 13: return [2];
1781
1511
  }
1782
1512
  });
1783
1513
  }); };
@@ -1789,24 +1519,23 @@ export var deserializeAws_restJson1CreateRulesetCommand = function (output, cont
1789
1519
  if (output.statusCode !== 200 && output.statusCode >= 300) {
1790
1520
  return [2, deserializeAws_restJson1CreateRulesetCommandError(output, context)];
1791
1521
  }
1792
- contents = {
1522
+ contents = map({
1793
1523
  $metadata: deserializeMetadata(output),
1794
- Name: undefined,
1795
- };
1524
+ });
1796
1525
  _a = __expectNonNull;
1797
1526
  _b = __expectObject;
1798
1527
  return [4, parseBody(output.body, context)];
1799
1528
  case 1:
1800
1529
  data = _a.apply(void 0, [_b.apply(void 0, [_c.sent()]), "body"]);
1801
- if (data.Name !== undefined && data.Name !== null) {
1530
+ if (data.Name != null) {
1802
1531
  contents.Name = __expectString(data.Name);
1803
1532
  }
1804
- return [2, Promise.resolve(contents)];
1533
+ return [2, contents];
1805
1534
  }
1806
1535
  });
1807
1536
  }); };
1808
1537
  var deserializeAws_restJson1CreateRulesetCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
1809
- var parsedOutput, _a, response, errorCode, _b, parsedBody, $metadata, statusCode;
1538
+ var parsedOutput, _a, errorCode, _b, parsedBody;
1810
1539
  var _c;
1811
1540
  return __generator(this, function (_d) {
1812
1541
  switch (_d.label) {
@@ -1835,14 +1564,14 @@ var deserializeAws_restJson1CreateRulesetCommandError = function (output, contex
1835
1564
  case 7: throw _d.sent();
1836
1565
  case 8:
1837
1566
  parsedBody = parsedOutput.body;
1838
- $metadata = deserializeMetadata(output);
1839
- statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
1840
- response = new __BaseException({
1841
- name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
1842
- $fault: "client",
1843
- $metadata: $metadata,
1567
+ throwDefaultError({
1568
+ output: output,
1569
+ parsedBody: parsedBody,
1570
+ exceptionCtor: __BaseException,
1571
+ errorCode: errorCode,
1844
1572
  });
1845
- throw __decorateServiceException(response, parsedBody);
1573
+ _d.label = 9;
1574
+ case 9: return [2];
1846
1575
  }
1847
1576
  });
1848
1577
  }); };
@@ -1854,24 +1583,23 @@ export var deserializeAws_restJson1CreateScheduleCommand = function (output, con
1854
1583
  if (output.statusCode !== 200 && output.statusCode >= 300) {
1855
1584
  return [2, deserializeAws_restJson1CreateScheduleCommandError(output, context)];
1856
1585
  }
1857
- contents = {
1586
+ contents = map({
1858
1587
  $metadata: deserializeMetadata(output),
1859
- Name: undefined,
1860
- };
1588
+ });
1861
1589
  _a = __expectNonNull;
1862
1590
  _b = __expectObject;
1863
1591
  return [4, parseBody(output.body, context)];
1864
1592
  case 1:
1865
1593
  data = _a.apply(void 0, [_b.apply(void 0, [_c.sent()]), "body"]);
1866
- if (data.Name !== undefined && data.Name !== null) {
1594
+ if (data.Name != null) {
1867
1595
  contents.Name = __expectString(data.Name);
1868
1596
  }
1869
- return [2, Promise.resolve(contents)];
1597
+ return [2, contents];
1870
1598
  }
1871
1599
  });
1872
1600
  }); };
1873
1601
  var deserializeAws_restJson1CreateScheduleCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
1874
- var parsedOutput, _a, response, errorCode, _b, parsedBody, $metadata, statusCode;
1602
+ var parsedOutput, _a, errorCode, _b, parsedBody;
1875
1603
  var _c;
1876
1604
  return __generator(this, function (_d) {
1877
1605
  switch (_d.label) {
@@ -1900,14 +1628,14 @@ var deserializeAws_restJson1CreateScheduleCommandError = function (output, conte
1900
1628
  case 7: throw _d.sent();
1901
1629
  case 8:
1902
1630
  parsedBody = parsedOutput.body;
1903
- $metadata = deserializeMetadata(output);
1904
- statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
1905
- response = new __BaseException({
1906
- name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
1907
- $fault: "client",
1908
- $metadata: $metadata,
1631
+ throwDefaultError({
1632
+ output: output,
1633
+ parsedBody: parsedBody,
1634
+ exceptionCtor: __BaseException,
1635
+ errorCode: errorCode,
1909
1636
  });
1910
- throw __decorateServiceException(response, parsedBody);
1637
+ _d.label = 9;
1638
+ case 9: return [2];
1911
1639
  }
1912
1640
  });
1913
1641
  }); };
@@ -1919,24 +1647,23 @@ export var deserializeAws_restJson1DeleteDatasetCommand = function (output, cont
1919
1647
  if (output.statusCode !== 200 && output.statusCode >= 300) {
1920
1648
  return [2, deserializeAws_restJson1DeleteDatasetCommandError(output, context)];
1921
1649
  }
1922
- contents = {
1650
+ contents = map({
1923
1651
  $metadata: deserializeMetadata(output),
1924
- Name: undefined,
1925
- };
1652
+ });
1926
1653
  _a = __expectNonNull;
1927
1654
  _b = __expectObject;
1928
1655
  return [4, parseBody(output.body, context)];
1929
1656
  case 1:
1930
1657
  data = _a.apply(void 0, [_b.apply(void 0, [_c.sent()]), "body"]);
1931
- if (data.Name !== undefined && data.Name !== null) {
1658
+ if (data.Name != null) {
1932
1659
  contents.Name = __expectString(data.Name);
1933
1660
  }
1934
- return [2, Promise.resolve(contents)];
1661
+ return [2, contents];
1935
1662
  }
1936
1663
  });
1937
1664
  }); };
1938
1665
  var deserializeAws_restJson1DeleteDatasetCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
1939
- var parsedOutput, _a, response, errorCode, _b, parsedBody, $metadata, statusCode;
1666
+ var parsedOutput, _a, errorCode, _b, parsedBody;
1940
1667
  var _c;
1941
1668
  return __generator(this, function (_d) {
1942
1669
  switch (_d.label) {
@@ -1965,14 +1692,14 @@ var deserializeAws_restJson1DeleteDatasetCommandError = function (output, contex
1965
1692
  case 7: throw _d.sent();
1966
1693
  case 8:
1967
1694
  parsedBody = parsedOutput.body;
1968
- $metadata = deserializeMetadata(output);
1969
- statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
1970
- response = new __BaseException({
1971
- name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
1972
- $fault: "client",
1973
- $metadata: $metadata,
1695
+ throwDefaultError({
1696
+ output: output,
1697
+ parsedBody: parsedBody,
1698
+ exceptionCtor: __BaseException,
1699
+ errorCode: errorCode,
1974
1700
  });
1975
- throw __decorateServiceException(response, parsedBody);
1701
+ _d.label = 9;
1702
+ case 9: return [2];
1976
1703
  }
1977
1704
  });
1978
1705
  }); };
@@ -1984,24 +1711,23 @@ export var deserializeAws_restJson1DeleteJobCommand = function (output, context)
1984
1711
  if (output.statusCode !== 200 && output.statusCode >= 300) {
1985
1712
  return [2, deserializeAws_restJson1DeleteJobCommandError(output, context)];
1986
1713
  }
1987
- contents = {
1714
+ contents = map({
1988
1715
  $metadata: deserializeMetadata(output),
1989
- Name: undefined,
1990
- };
1716
+ });
1991
1717
  _a = __expectNonNull;
1992
1718
  _b = __expectObject;
1993
1719
  return [4, parseBody(output.body, context)];
1994
1720
  case 1:
1995
1721
  data = _a.apply(void 0, [_b.apply(void 0, [_c.sent()]), "body"]);
1996
- if (data.Name !== undefined && data.Name !== null) {
1722
+ if (data.Name != null) {
1997
1723
  contents.Name = __expectString(data.Name);
1998
1724
  }
1999
- return [2, Promise.resolve(contents)];
1725
+ return [2, contents];
2000
1726
  }
2001
1727
  });
2002
1728
  }); };
2003
1729
  var deserializeAws_restJson1DeleteJobCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
2004
- var parsedOutput, _a, response, errorCode, _b, parsedBody, $metadata, statusCode;
1730
+ var parsedOutput, _a, errorCode, _b, parsedBody;
2005
1731
  var _c;
2006
1732
  return __generator(this, function (_d) {
2007
1733
  switch (_d.label) {
@@ -2030,14 +1756,14 @@ var deserializeAws_restJson1DeleteJobCommandError = function (output, context) {
2030
1756
  case 7: throw _d.sent();
2031
1757
  case 8:
2032
1758
  parsedBody = parsedOutput.body;
2033
- $metadata = deserializeMetadata(output);
2034
- statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
2035
- response = new __BaseException({
2036
- name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
2037
- $fault: "client",
2038
- $metadata: $metadata,
1759
+ throwDefaultError({
1760
+ output: output,
1761
+ parsedBody: parsedBody,
1762
+ exceptionCtor: __BaseException,
1763
+ errorCode: errorCode,
2039
1764
  });
2040
- throw __decorateServiceException(response, parsedBody);
1765
+ _d.label = 9;
1766
+ case 9: return [2];
2041
1767
  }
2042
1768
  });
2043
1769
  }); };
@@ -2049,24 +1775,23 @@ export var deserializeAws_restJson1DeleteProjectCommand = function (output, cont
2049
1775
  if (output.statusCode !== 200 && output.statusCode >= 300) {
2050
1776
  return [2, deserializeAws_restJson1DeleteProjectCommandError(output, context)];
2051
1777
  }
2052
- contents = {
1778
+ contents = map({
2053
1779
  $metadata: deserializeMetadata(output),
2054
- Name: undefined,
2055
- };
1780
+ });
2056
1781
  _a = __expectNonNull;
2057
1782
  _b = __expectObject;
2058
1783
  return [4, parseBody(output.body, context)];
2059
1784
  case 1:
2060
1785
  data = _a.apply(void 0, [_b.apply(void 0, [_c.sent()]), "body"]);
2061
- if (data.Name !== undefined && data.Name !== null) {
1786
+ if (data.Name != null) {
2062
1787
  contents.Name = __expectString(data.Name);
2063
1788
  }
2064
- return [2, Promise.resolve(contents)];
1789
+ return [2, contents];
2065
1790
  }
2066
1791
  });
2067
1792
  }); };
2068
1793
  var deserializeAws_restJson1DeleteProjectCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
2069
- var parsedOutput, _a, response, errorCode, _b, parsedBody, $metadata, statusCode;
1794
+ var parsedOutput, _a, errorCode, _b, parsedBody;
2070
1795
  var _c;
2071
1796
  return __generator(this, function (_d) {
2072
1797
  switch (_d.label) {
@@ -2095,14 +1820,14 @@ var deserializeAws_restJson1DeleteProjectCommandError = function (output, contex
2095
1820
  case 7: throw _d.sent();
2096
1821
  case 8:
2097
1822
  parsedBody = parsedOutput.body;
2098
- $metadata = deserializeMetadata(output);
2099
- statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
2100
- response = new __BaseException({
2101
- name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
2102
- $fault: "client",
2103
- $metadata: $metadata,
1823
+ throwDefaultError({
1824
+ output: output,
1825
+ parsedBody: parsedBody,
1826
+ exceptionCtor: __BaseException,
1827
+ errorCode: errorCode,
2104
1828
  });
2105
- throw __decorateServiceException(response, parsedBody);
1829
+ _d.label = 9;
1830
+ case 9: return [2];
2106
1831
  }
2107
1832
  });
2108
1833
  }); };
@@ -2114,28 +1839,26 @@ export var deserializeAws_restJson1DeleteRecipeVersionCommand = function (output
2114
1839
  if (output.statusCode !== 200 && output.statusCode >= 300) {
2115
1840
  return [2, deserializeAws_restJson1DeleteRecipeVersionCommandError(output, context)];
2116
1841
  }
2117
- contents = {
1842
+ contents = map({
2118
1843
  $metadata: deserializeMetadata(output),
2119
- Name: undefined,
2120
- RecipeVersion: undefined,
2121
- };
1844
+ });
2122
1845
  _a = __expectNonNull;
2123
1846
  _b = __expectObject;
2124
1847
  return [4, parseBody(output.body, context)];
2125
1848
  case 1:
2126
1849
  data = _a.apply(void 0, [_b.apply(void 0, [_c.sent()]), "body"]);
2127
- if (data.Name !== undefined && data.Name !== null) {
1850
+ if (data.Name != null) {
2128
1851
  contents.Name = __expectString(data.Name);
2129
1852
  }
2130
- if (data.RecipeVersion !== undefined && data.RecipeVersion !== null) {
1853
+ if (data.RecipeVersion != null) {
2131
1854
  contents.RecipeVersion = __expectString(data.RecipeVersion);
2132
1855
  }
2133
- return [2, Promise.resolve(contents)];
1856
+ return [2, contents];
2134
1857
  }
2135
1858
  });
2136
1859
  }); };
2137
1860
  var deserializeAws_restJson1DeleteRecipeVersionCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
2138
- var parsedOutput, _a, response, errorCode, _b, parsedBody, $metadata, statusCode;
1861
+ var parsedOutput, _a, errorCode, _b, parsedBody;
2139
1862
  var _c;
2140
1863
  return __generator(this, function (_d) {
2141
1864
  switch (_d.label) {
@@ -2164,14 +1887,14 @@ var deserializeAws_restJson1DeleteRecipeVersionCommandError = function (output,
2164
1887
  case 7: throw _d.sent();
2165
1888
  case 8:
2166
1889
  parsedBody = parsedOutput.body;
2167
- $metadata = deserializeMetadata(output);
2168
- statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
2169
- response = new __BaseException({
2170
- name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
2171
- $fault: "client",
2172
- $metadata: $metadata,
1890
+ throwDefaultError({
1891
+ output: output,
1892
+ parsedBody: parsedBody,
1893
+ exceptionCtor: __BaseException,
1894
+ errorCode: errorCode,
2173
1895
  });
2174
- throw __decorateServiceException(response, parsedBody);
1896
+ _d.label = 9;
1897
+ case 9: return [2];
2175
1898
  }
2176
1899
  });
2177
1900
  }); };
@@ -2183,24 +1906,23 @@ export var deserializeAws_restJson1DeleteRulesetCommand = function (output, cont
2183
1906
  if (output.statusCode !== 200 && output.statusCode >= 300) {
2184
1907
  return [2, deserializeAws_restJson1DeleteRulesetCommandError(output, context)];
2185
1908
  }
2186
- contents = {
1909
+ contents = map({
2187
1910
  $metadata: deserializeMetadata(output),
2188
- Name: undefined,
2189
- };
1911
+ });
2190
1912
  _a = __expectNonNull;
2191
1913
  _b = __expectObject;
2192
1914
  return [4, parseBody(output.body, context)];
2193
1915
  case 1:
2194
1916
  data = _a.apply(void 0, [_b.apply(void 0, [_c.sent()]), "body"]);
2195
- if (data.Name !== undefined && data.Name !== null) {
1917
+ if (data.Name != null) {
2196
1918
  contents.Name = __expectString(data.Name);
2197
1919
  }
2198
- return [2, Promise.resolve(contents)];
1920
+ return [2, contents];
2199
1921
  }
2200
1922
  });
2201
1923
  }); };
2202
1924
  var deserializeAws_restJson1DeleteRulesetCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
2203
- var parsedOutput, _a, response, errorCode, _b, parsedBody, $metadata, statusCode;
1925
+ var parsedOutput, _a, errorCode, _b, parsedBody;
2204
1926
  var _c;
2205
1927
  return __generator(this, function (_d) {
2206
1928
  switch (_d.label) {
@@ -2229,14 +1951,14 @@ var deserializeAws_restJson1DeleteRulesetCommandError = function (output, contex
2229
1951
  case 7: throw _d.sent();
2230
1952
  case 8:
2231
1953
  parsedBody = parsedOutput.body;
2232
- $metadata = deserializeMetadata(output);
2233
- statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
2234
- response = new __BaseException({
2235
- name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
2236
- $fault: "client",
2237
- $metadata: $metadata,
1954
+ throwDefaultError({
1955
+ output: output,
1956
+ parsedBody: parsedBody,
1957
+ exceptionCtor: __BaseException,
1958
+ errorCode: errorCode,
2238
1959
  });
2239
- throw __decorateServiceException(response, parsedBody);
1960
+ _d.label = 9;
1961
+ case 9: return [2];
2240
1962
  }
2241
1963
  });
2242
1964
  }); };
@@ -2248,24 +1970,23 @@ export var deserializeAws_restJson1DeleteScheduleCommand = function (output, con
2248
1970
  if (output.statusCode !== 200 && output.statusCode >= 300) {
2249
1971
  return [2, deserializeAws_restJson1DeleteScheduleCommandError(output, context)];
2250
1972
  }
2251
- contents = {
1973
+ contents = map({
2252
1974
  $metadata: deserializeMetadata(output),
2253
- Name: undefined,
2254
- };
1975
+ });
2255
1976
  _a = __expectNonNull;
2256
1977
  _b = __expectObject;
2257
1978
  return [4, parseBody(output.body, context)];
2258
1979
  case 1:
2259
1980
  data = _a.apply(void 0, [_b.apply(void 0, [_c.sent()]), "body"]);
2260
- if (data.Name !== undefined && data.Name !== null) {
1981
+ if (data.Name != null) {
2261
1982
  contents.Name = __expectString(data.Name);
2262
1983
  }
2263
- return [2, Promise.resolve(contents)];
1984
+ return [2, contents];
2264
1985
  }
2265
1986
  });
2266
1987
  }); };
2267
1988
  var deserializeAws_restJson1DeleteScheduleCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
2268
- var parsedOutput, _a, response, errorCode, _b, parsedBody, $metadata, statusCode;
1989
+ var parsedOutput, _a, errorCode, _b, parsedBody;
2269
1990
  var _c;
2270
1991
  return __generator(this, function (_d) {
2271
1992
  switch (_d.label) {
@@ -2290,14 +2011,14 @@ var deserializeAws_restJson1DeleteScheduleCommandError = function (output, conte
2290
2011
  case 5: throw _d.sent();
2291
2012
  case 6:
2292
2013
  parsedBody = parsedOutput.body;
2293
- $metadata = deserializeMetadata(output);
2294
- statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
2295
- response = new __BaseException({
2296
- name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
2297
- $fault: "client",
2298
- $metadata: $metadata,
2014
+ throwDefaultError({
2015
+ output: output,
2016
+ parsedBody: parsedBody,
2017
+ exceptionCtor: __BaseException,
2018
+ errorCode: errorCode,
2299
2019
  });
2300
- throw __decorateServiceException(response, parsedBody);
2020
+ _d.label = 7;
2021
+ case 7: return [2];
2301
2022
  }
2302
2023
  });
2303
2024
  }); };
@@ -2309,68 +2030,56 @@ export var deserializeAws_restJson1DescribeDatasetCommand = function (output, co
2309
2030
  if (output.statusCode !== 200 && output.statusCode >= 300) {
2310
2031
  return [2, deserializeAws_restJson1DescribeDatasetCommandError(output, context)];
2311
2032
  }
2312
- contents = {
2033
+ contents = map({
2313
2034
  $metadata: deserializeMetadata(output),
2314
- CreateDate: undefined,
2315
- CreatedBy: undefined,
2316
- Format: undefined,
2317
- FormatOptions: undefined,
2318
- Input: undefined,
2319
- LastModifiedBy: undefined,
2320
- LastModifiedDate: undefined,
2321
- Name: undefined,
2322
- PathOptions: undefined,
2323
- ResourceArn: undefined,
2324
- Source: undefined,
2325
- Tags: undefined,
2326
- };
2035
+ });
2327
2036
  _a = __expectNonNull;
2328
2037
  _b = __expectObject;
2329
2038
  return [4, parseBody(output.body, context)];
2330
2039
  case 1:
2331
2040
  data = _a.apply(void 0, [_b.apply(void 0, [_c.sent()]), "body"]);
2332
- if (data.CreateDate !== undefined && data.CreateDate !== null) {
2041
+ if (data.CreateDate != null) {
2333
2042
  contents.CreateDate = __expectNonNull(__parseEpochTimestamp(__expectNumber(data.CreateDate)));
2334
2043
  }
2335
- if (data.CreatedBy !== undefined && data.CreatedBy !== null) {
2044
+ if (data.CreatedBy != null) {
2336
2045
  contents.CreatedBy = __expectString(data.CreatedBy);
2337
2046
  }
2338
- if (data.Format !== undefined && data.Format !== null) {
2047
+ if (data.Format != null) {
2339
2048
  contents.Format = __expectString(data.Format);
2340
2049
  }
2341
- if (data.FormatOptions !== undefined && data.FormatOptions !== null) {
2050
+ if (data.FormatOptions != null) {
2342
2051
  contents.FormatOptions = deserializeAws_restJson1FormatOptions(data.FormatOptions, context);
2343
2052
  }
2344
- if (data.Input !== undefined && data.Input !== null) {
2053
+ if (data.Input != null) {
2345
2054
  contents.Input = deserializeAws_restJson1Input(data.Input, context);
2346
2055
  }
2347
- if (data.LastModifiedBy !== undefined && data.LastModifiedBy !== null) {
2056
+ if (data.LastModifiedBy != null) {
2348
2057
  contents.LastModifiedBy = __expectString(data.LastModifiedBy);
2349
2058
  }
2350
- if (data.LastModifiedDate !== undefined && data.LastModifiedDate !== null) {
2059
+ if (data.LastModifiedDate != null) {
2351
2060
  contents.LastModifiedDate = __expectNonNull(__parseEpochTimestamp(__expectNumber(data.LastModifiedDate)));
2352
2061
  }
2353
- if (data.Name !== undefined && data.Name !== null) {
2062
+ if (data.Name != null) {
2354
2063
  contents.Name = __expectString(data.Name);
2355
2064
  }
2356
- if (data.PathOptions !== undefined && data.PathOptions !== null) {
2065
+ if (data.PathOptions != null) {
2357
2066
  contents.PathOptions = deserializeAws_restJson1PathOptions(data.PathOptions, context);
2358
2067
  }
2359
- if (data.ResourceArn !== undefined && data.ResourceArn !== null) {
2068
+ if (data.ResourceArn != null) {
2360
2069
  contents.ResourceArn = __expectString(data.ResourceArn);
2361
2070
  }
2362
- if (data.Source !== undefined && data.Source !== null) {
2071
+ if (data.Source != null) {
2363
2072
  contents.Source = __expectString(data.Source);
2364
2073
  }
2365
- if (data.Tags !== undefined && data.Tags !== null) {
2074
+ if (data.Tags != null) {
2366
2075
  contents.Tags = deserializeAws_restJson1TagMap(data.Tags, context);
2367
2076
  }
2368
- return [2, Promise.resolve(contents)];
2077
+ return [2, contents];
2369
2078
  }
2370
2079
  });
2371
2080
  }); };
2372
2081
  var deserializeAws_restJson1DescribeDatasetCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
2373
- var parsedOutput, _a, response, errorCode, _b, parsedBody, $metadata, statusCode;
2082
+ var parsedOutput, _a, errorCode, _b, parsedBody;
2374
2083
  var _c;
2375
2084
  return __generator(this, function (_d) {
2376
2085
  switch (_d.label) {
@@ -2395,14 +2104,14 @@ var deserializeAws_restJson1DescribeDatasetCommandError = function (output, cont
2395
2104
  case 5: throw _d.sent();
2396
2105
  case 6:
2397
2106
  parsedBody = parsedOutput.body;
2398
- $metadata = deserializeMetadata(output);
2399
- statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
2400
- response = new __BaseException({
2401
- name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
2402
- $fault: "client",
2403
- $metadata: $metadata,
2107
+ throwDefaultError({
2108
+ output: output,
2109
+ parsedBody: parsedBody,
2110
+ exceptionCtor: __BaseException,
2111
+ errorCode: errorCode,
2404
2112
  });
2405
- throw __decorateServiceException(response, parsedBody);
2113
+ _d.label = 7;
2114
+ case 7: return [2];
2406
2115
  }
2407
2116
  });
2408
2117
  }); };
@@ -2414,116 +2123,92 @@ export var deserializeAws_restJson1DescribeJobCommand = function (output, contex
2414
2123
  if (output.statusCode !== 200 && output.statusCode >= 300) {
2415
2124
  return [2, deserializeAws_restJson1DescribeJobCommandError(output, context)];
2416
2125
  }
2417
- contents = {
2126
+ contents = map({
2418
2127
  $metadata: deserializeMetadata(output),
2419
- CreateDate: undefined,
2420
- CreatedBy: undefined,
2421
- DataCatalogOutputs: undefined,
2422
- DatabaseOutputs: undefined,
2423
- DatasetName: undefined,
2424
- EncryptionKeyArn: undefined,
2425
- EncryptionMode: undefined,
2426
- JobSample: undefined,
2427
- LastModifiedBy: undefined,
2428
- LastModifiedDate: undefined,
2429
- LogSubscription: undefined,
2430
- MaxCapacity: undefined,
2431
- MaxRetries: undefined,
2432
- Name: undefined,
2433
- Outputs: undefined,
2434
- ProfileConfiguration: undefined,
2435
- ProjectName: undefined,
2436
- RecipeReference: undefined,
2437
- ResourceArn: undefined,
2438
- RoleArn: undefined,
2439
- Tags: undefined,
2440
- Timeout: undefined,
2441
- Type: undefined,
2442
- ValidationConfigurations: undefined,
2443
- };
2128
+ });
2444
2129
  _a = __expectNonNull;
2445
2130
  _b = __expectObject;
2446
2131
  return [4, parseBody(output.body, context)];
2447
2132
  case 1:
2448
2133
  data = _a.apply(void 0, [_b.apply(void 0, [_c.sent()]), "body"]);
2449
- if (data.CreateDate !== undefined && data.CreateDate !== null) {
2134
+ if (data.CreateDate != null) {
2450
2135
  contents.CreateDate = __expectNonNull(__parseEpochTimestamp(__expectNumber(data.CreateDate)));
2451
2136
  }
2452
- if (data.CreatedBy !== undefined && data.CreatedBy !== null) {
2137
+ if (data.CreatedBy != null) {
2453
2138
  contents.CreatedBy = __expectString(data.CreatedBy);
2454
2139
  }
2455
- if (data.DataCatalogOutputs !== undefined && data.DataCatalogOutputs !== null) {
2140
+ if (data.DataCatalogOutputs != null) {
2456
2141
  contents.DataCatalogOutputs = deserializeAws_restJson1DataCatalogOutputList(data.DataCatalogOutputs, context);
2457
2142
  }
2458
- if (data.DatabaseOutputs !== undefined && data.DatabaseOutputs !== null) {
2143
+ if (data.DatabaseOutputs != null) {
2459
2144
  contents.DatabaseOutputs = deserializeAws_restJson1DatabaseOutputList(data.DatabaseOutputs, context);
2460
2145
  }
2461
- if (data.DatasetName !== undefined && data.DatasetName !== null) {
2146
+ if (data.DatasetName != null) {
2462
2147
  contents.DatasetName = __expectString(data.DatasetName);
2463
2148
  }
2464
- if (data.EncryptionKeyArn !== undefined && data.EncryptionKeyArn !== null) {
2149
+ if (data.EncryptionKeyArn != null) {
2465
2150
  contents.EncryptionKeyArn = __expectString(data.EncryptionKeyArn);
2466
2151
  }
2467
- if (data.EncryptionMode !== undefined && data.EncryptionMode !== null) {
2152
+ if (data.EncryptionMode != null) {
2468
2153
  contents.EncryptionMode = __expectString(data.EncryptionMode);
2469
2154
  }
2470
- if (data.JobSample !== undefined && data.JobSample !== null) {
2155
+ if (data.JobSample != null) {
2471
2156
  contents.JobSample = deserializeAws_restJson1JobSample(data.JobSample, context);
2472
2157
  }
2473
- if (data.LastModifiedBy !== undefined && data.LastModifiedBy !== null) {
2158
+ if (data.LastModifiedBy != null) {
2474
2159
  contents.LastModifiedBy = __expectString(data.LastModifiedBy);
2475
2160
  }
2476
- if (data.LastModifiedDate !== undefined && data.LastModifiedDate !== null) {
2161
+ if (data.LastModifiedDate != null) {
2477
2162
  contents.LastModifiedDate = __expectNonNull(__parseEpochTimestamp(__expectNumber(data.LastModifiedDate)));
2478
2163
  }
2479
- if (data.LogSubscription !== undefined && data.LogSubscription !== null) {
2164
+ if (data.LogSubscription != null) {
2480
2165
  contents.LogSubscription = __expectString(data.LogSubscription);
2481
2166
  }
2482
- if (data.MaxCapacity !== undefined && data.MaxCapacity !== null) {
2167
+ if (data.MaxCapacity != null) {
2483
2168
  contents.MaxCapacity = __expectInt32(data.MaxCapacity);
2484
2169
  }
2485
- if (data.MaxRetries !== undefined && data.MaxRetries !== null) {
2170
+ if (data.MaxRetries != null) {
2486
2171
  contents.MaxRetries = __expectInt32(data.MaxRetries);
2487
2172
  }
2488
- if (data.Name !== undefined && data.Name !== null) {
2173
+ if (data.Name != null) {
2489
2174
  contents.Name = __expectString(data.Name);
2490
2175
  }
2491
- if (data.Outputs !== undefined && data.Outputs !== null) {
2176
+ if (data.Outputs != null) {
2492
2177
  contents.Outputs = deserializeAws_restJson1OutputList(data.Outputs, context);
2493
2178
  }
2494
- if (data.ProfileConfiguration !== undefined && data.ProfileConfiguration !== null) {
2179
+ if (data.ProfileConfiguration != null) {
2495
2180
  contents.ProfileConfiguration = deserializeAws_restJson1ProfileConfiguration(data.ProfileConfiguration, context);
2496
2181
  }
2497
- if (data.ProjectName !== undefined && data.ProjectName !== null) {
2182
+ if (data.ProjectName != null) {
2498
2183
  contents.ProjectName = __expectString(data.ProjectName);
2499
2184
  }
2500
- if (data.RecipeReference !== undefined && data.RecipeReference !== null) {
2185
+ if (data.RecipeReference != null) {
2501
2186
  contents.RecipeReference = deserializeAws_restJson1RecipeReference(data.RecipeReference, context);
2502
2187
  }
2503
- if (data.ResourceArn !== undefined && data.ResourceArn !== null) {
2188
+ if (data.ResourceArn != null) {
2504
2189
  contents.ResourceArn = __expectString(data.ResourceArn);
2505
2190
  }
2506
- if (data.RoleArn !== undefined && data.RoleArn !== null) {
2191
+ if (data.RoleArn != null) {
2507
2192
  contents.RoleArn = __expectString(data.RoleArn);
2508
2193
  }
2509
- if (data.Tags !== undefined && data.Tags !== null) {
2194
+ if (data.Tags != null) {
2510
2195
  contents.Tags = deserializeAws_restJson1TagMap(data.Tags, context);
2511
2196
  }
2512
- if (data.Timeout !== undefined && data.Timeout !== null) {
2197
+ if (data.Timeout != null) {
2513
2198
  contents.Timeout = __expectInt32(data.Timeout);
2514
2199
  }
2515
- if (data.Type !== undefined && data.Type !== null) {
2200
+ if (data.Type != null) {
2516
2201
  contents.Type = __expectString(data.Type);
2517
2202
  }
2518
- if (data.ValidationConfigurations !== undefined && data.ValidationConfigurations !== null) {
2203
+ if (data.ValidationConfigurations != null) {
2519
2204
  contents.ValidationConfigurations = deserializeAws_restJson1ValidationConfigurationList(data.ValidationConfigurations, context);
2520
2205
  }
2521
- return [2, Promise.resolve(contents)];
2206
+ return [2, contents];
2522
2207
  }
2523
2208
  });
2524
2209
  }); };
2525
2210
  var deserializeAws_restJson1DescribeJobCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
2526
- var parsedOutput, _a, response, errorCode, _b, parsedBody, $metadata, statusCode;
2211
+ var parsedOutput, _a, errorCode, _b, parsedBody;
2527
2212
  var _c;
2528
2213
  return __generator(this, function (_d) {
2529
2214
  switch (_d.label) {
@@ -2548,14 +2233,14 @@ var deserializeAws_restJson1DescribeJobCommandError = function (output, context)
2548
2233
  case 5: throw _d.sent();
2549
2234
  case 6:
2550
2235
  parsedBody = parsedOutput.body;
2551
- $metadata = deserializeMetadata(output);
2552
- statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
2553
- response = new __BaseException({
2554
- name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
2555
- $fault: "client",
2556
- $metadata: $metadata,
2236
+ throwDefaultError({
2237
+ output: output,
2238
+ parsedBody: parsedBody,
2239
+ exceptionCtor: __BaseException,
2240
+ errorCode: errorCode,
2557
2241
  });
2558
- throw __decorateServiceException(response, parsedBody);
2242
+ _d.label = 7;
2243
+ case 7: return [2];
2559
2244
  }
2560
2245
  });
2561
2246
  }); };
@@ -2567,96 +2252,77 @@ export var deserializeAws_restJson1DescribeJobRunCommand = function (output, con
2567
2252
  if (output.statusCode !== 200 && output.statusCode >= 300) {
2568
2253
  return [2, deserializeAws_restJson1DescribeJobRunCommandError(output, context)];
2569
2254
  }
2570
- contents = {
2255
+ contents = map({
2571
2256
  $metadata: deserializeMetadata(output),
2572
- Attempt: undefined,
2573
- CompletedOn: undefined,
2574
- DataCatalogOutputs: undefined,
2575
- DatabaseOutputs: undefined,
2576
- DatasetName: undefined,
2577
- ErrorMessage: undefined,
2578
- ExecutionTime: undefined,
2579
- JobName: undefined,
2580
- JobSample: undefined,
2581
- LogGroupName: undefined,
2582
- LogSubscription: undefined,
2583
- Outputs: undefined,
2584
- ProfileConfiguration: undefined,
2585
- RecipeReference: undefined,
2586
- RunId: undefined,
2587
- StartedBy: undefined,
2588
- StartedOn: undefined,
2589
- State: undefined,
2590
- ValidationConfigurations: undefined,
2591
- };
2257
+ });
2592
2258
  _a = __expectNonNull;
2593
2259
  _b = __expectObject;
2594
2260
  return [4, parseBody(output.body, context)];
2595
2261
  case 1:
2596
2262
  data = _a.apply(void 0, [_b.apply(void 0, [_c.sent()]), "body"]);
2597
- if (data.Attempt !== undefined && data.Attempt !== null) {
2263
+ if (data.Attempt != null) {
2598
2264
  contents.Attempt = __expectInt32(data.Attempt);
2599
2265
  }
2600
- if (data.CompletedOn !== undefined && data.CompletedOn !== null) {
2266
+ if (data.CompletedOn != null) {
2601
2267
  contents.CompletedOn = __expectNonNull(__parseEpochTimestamp(__expectNumber(data.CompletedOn)));
2602
2268
  }
2603
- if (data.DataCatalogOutputs !== undefined && data.DataCatalogOutputs !== null) {
2269
+ if (data.DataCatalogOutputs != null) {
2604
2270
  contents.DataCatalogOutputs = deserializeAws_restJson1DataCatalogOutputList(data.DataCatalogOutputs, context);
2605
2271
  }
2606
- if (data.DatabaseOutputs !== undefined && data.DatabaseOutputs !== null) {
2272
+ if (data.DatabaseOutputs != null) {
2607
2273
  contents.DatabaseOutputs = deserializeAws_restJson1DatabaseOutputList(data.DatabaseOutputs, context);
2608
2274
  }
2609
- if (data.DatasetName !== undefined && data.DatasetName !== null) {
2275
+ if (data.DatasetName != null) {
2610
2276
  contents.DatasetName = __expectString(data.DatasetName);
2611
2277
  }
2612
- if (data.ErrorMessage !== undefined && data.ErrorMessage !== null) {
2278
+ if (data.ErrorMessage != null) {
2613
2279
  contents.ErrorMessage = __expectString(data.ErrorMessage);
2614
2280
  }
2615
- if (data.ExecutionTime !== undefined && data.ExecutionTime !== null) {
2281
+ if (data.ExecutionTime != null) {
2616
2282
  contents.ExecutionTime = __expectInt32(data.ExecutionTime);
2617
2283
  }
2618
- if (data.JobName !== undefined && data.JobName !== null) {
2284
+ if (data.JobName != null) {
2619
2285
  contents.JobName = __expectString(data.JobName);
2620
2286
  }
2621
- if (data.JobSample !== undefined && data.JobSample !== null) {
2287
+ if (data.JobSample != null) {
2622
2288
  contents.JobSample = deserializeAws_restJson1JobSample(data.JobSample, context);
2623
2289
  }
2624
- if (data.LogGroupName !== undefined && data.LogGroupName !== null) {
2290
+ if (data.LogGroupName != null) {
2625
2291
  contents.LogGroupName = __expectString(data.LogGroupName);
2626
2292
  }
2627
- if (data.LogSubscription !== undefined && data.LogSubscription !== null) {
2293
+ if (data.LogSubscription != null) {
2628
2294
  contents.LogSubscription = __expectString(data.LogSubscription);
2629
2295
  }
2630
- if (data.Outputs !== undefined && data.Outputs !== null) {
2296
+ if (data.Outputs != null) {
2631
2297
  contents.Outputs = deserializeAws_restJson1OutputList(data.Outputs, context);
2632
2298
  }
2633
- if (data.ProfileConfiguration !== undefined && data.ProfileConfiguration !== null) {
2299
+ if (data.ProfileConfiguration != null) {
2634
2300
  contents.ProfileConfiguration = deserializeAws_restJson1ProfileConfiguration(data.ProfileConfiguration, context);
2635
2301
  }
2636
- if (data.RecipeReference !== undefined && data.RecipeReference !== null) {
2302
+ if (data.RecipeReference != null) {
2637
2303
  contents.RecipeReference = deserializeAws_restJson1RecipeReference(data.RecipeReference, context);
2638
2304
  }
2639
- if (data.RunId !== undefined && data.RunId !== null) {
2305
+ if (data.RunId != null) {
2640
2306
  contents.RunId = __expectString(data.RunId);
2641
2307
  }
2642
- if (data.StartedBy !== undefined && data.StartedBy !== null) {
2308
+ if (data.StartedBy != null) {
2643
2309
  contents.StartedBy = __expectString(data.StartedBy);
2644
2310
  }
2645
- if (data.StartedOn !== undefined && data.StartedOn !== null) {
2311
+ if (data.StartedOn != null) {
2646
2312
  contents.StartedOn = __expectNonNull(__parseEpochTimestamp(__expectNumber(data.StartedOn)));
2647
2313
  }
2648
- if (data.State !== undefined && data.State !== null) {
2314
+ if (data.State != null) {
2649
2315
  contents.State = __expectString(data.State);
2650
2316
  }
2651
- if (data.ValidationConfigurations !== undefined && data.ValidationConfigurations !== null) {
2317
+ if (data.ValidationConfigurations != null) {
2652
2318
  contents.ValidationConfigurations = deserializeAws_restJson1ValidationConfigurationList(data.ValidationConfigurations, context);
2653
2319
  }
2654
- return [2, Promise.resolve(contents)];
2320
+ return [2, contents];
2655
2321
  }
2656
2322
  });
2657
2323
  }); };
2658
2324
  var deserializeAws_restJson1DescribeJobRunCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
2659
- var parsedOutput, _a, response, errorCode, _b, parsedBody, $metadata, statusCode;
2325
+ var parsedOutput, _a, errorCode, _b, parsedBody;
2660
2326
  var _c;
2661
2327
  return __generator(this, function (_d) {
2662
2328
  switch (_d.label) {
@@ -2681,14 +2347,14 @@ var deserializeAws_restJson1DescribeJobRunCommandError = function (output, conte
2681
2347
  case 5: throw _d.sent();
2682
2348
  case 6:
2683
2349
  parsedBody = parsedOutput.body;
2684
- $metadata = deserializeMetadata(output);
2685
- statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
2686
- response = new __BaseException({
2687
- name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
2688
- $fault: "client",
2689
- $metadata: $metadata,
2350
+ throwDefaultError({
2351
+ output: output,
2352
+ parsedBody: parsedBody,
2353
+ exceptionCtor: __BaseException,
2354
+ errorCode: errorCode,
2690
2355
  });
2691
- throw __decorateServiceException(response, parsedBody);
2356
+ _d.label = 7;
2357
+ case 7: return [2];
2692
2358
  }
2693
2359
  });
2694
2360
  }); };
@@ -2700,76 +2366,62 @@ export var deserializeAws_restJson1DescribeProjectCommand = function (output, co
2700
2366
  if (output.statusCode !== 200 && output.statusCode >= 300) {
2701
2367
  return [2, deserializeAws_restJson1DescribeProjectCommandError(output, context)];
2702
2368
  }
2703
- contents = {
2369
+ contents = map({
2704
2370
  $metadata: deserializeMetadata(output),
2705
- CreateDate: undefined,
2706
- CreatedBy: undefined,
2707
- DatasetName: undefined,
2708
- LastModifiedBy: undefined,
2709
- LastModifiedDate: undefined,
2710
- Name: undefined,
2711
- OpenDate: undefined,
2712
- OpenedBy: undefined,
2713
- RecipeName: undefined,
2714
- ResourceArn: undefined,
2715
- RoleArn: undefined,
2716
- Sample: undefined,
2717
- SessionStatus: undefined,
2718
- Tags: undefined,
2719
- };
2371
+ });
2720
2372
  _a = __expectNonNull;
2721
2373
  _b = __expectObject;
2722
2374
  return [4, parseBody(output.body, context)];
2723
2375
  case 1:
2724
2376
  data = _a.apply(void 0, [_b.apply(void 0, [_c.sent()]), "body"]);
2725
- if (data.CreateDate !== undefined && data.CreateDate !== null) {
2377
+ if (data.CreateDate != null) {
2726
2378
  contents.CreateDate = __expectNonNull(__parseEpochTimestamp(__expectNumber(data.CreateDate)));
2727
2379
  }
2728
- if (data.CreatedBy !== undefined && data.CreatedBy !== null) {
2380
+ if (data.CreatedBy != null) {
2729
2381
  contents.CreatedBy = __expectString(data.CreatedBy);
2730
2382
  }
2731
- if (data.DatasetName !== undefined && data.DatasetName !== null) {
2383
+ if (data.DatasetName != null) {
2732
2384
  contents.DatasetName = __expectString(data.DatasetName);
2733
2385
  }
2734
- if (data.LastModifiedBy !== undefined && data.LastModifiedBy !== null) {
2386
+ if (data.LastModifiedBy != null) {
2735
2387
  contents.LastModifiedBy = __expectString(data.LastModifiedBy);
2736
2388
  }
2737
- if (data.LastModifiedDate !== undefined && data.LastModifiedDate !== null) {
2389
+ if (data.LastModifiedDate != null) {
2738
2390
  contents.LastModifiedDate = __expectNonNull(__parseEpochTimestamp(__expectNumber(data.LastModifiedDate)));
2739
2391
  }
2740
- if (data.Name !== undefined && data.Name !== null) {
2392
+ if (data.Name != null) {
2741
2393
  contents.Name = __expectString(data.Name);
2742
2394
  }
2743
- if (data.OpenDate !== undefined && data.OpenDate !== null) {
2395
+ if (data.OpenDate != null) {
2744
2396
  contents.OpenDate = __expectNonNull(__parseEpochTimestamp(__expectNumber(data.OpenDate)));
2745
2397
  }
2746
- if (data.OpenedBy !== undefined && data.OpenedBy !== null) {
2398
+ if (data.OpenedBy != null) {
2747
2399
  contents.OpenedBy = __expectString(data.OpenedBy);
2748
2400
  }
2749
- if (data.RecipeName !== undefined && data.RecipeName !== null) {
2401
+ if (data.RecipeName != null) {
2750
2402
  contents.RecipeName = __expectString(data.RecipeName);
2751
2403
  }
2752
- if (data.ResourceArn !== undefined && data.ResourceArn !== null) {
2404
+ if (data.ResourceArn != null) {
2753
2405
  contents.ResourceArn = __expectString(data.ResourceArn);
2754
2406
  }
2755
- if (data.RoleArn !== undefined && data.RoleArn !== null) {
2407
+ if (data.RoleArn != null) {
2756
2408
  contents.RoleArn = __expectString(data.RoleArn);
2757
2409
  }
2758
- if (data.Sample !== undefined && data.Sample !== null) {
2410
+ if (data.Sample != null) {
2759
2411
  contents.Sample = deserializeAws_restJson1Sample(data.Sample, context);
2760
2412
  }
2761
- if (data.SessionStatus !== undefined && data.SessionStatus !== null) {
2413
+ if (data.SessionStatus != null) {
2762
2414
  contents.SessionStatus = __expectString(data.SessionStatus);
2763
2415
  }
2764
- if (data.Tags !== undefined && data.Tags !== null) {
2416
+ if (data.Tags != null) {
2765
2417
  contents.Tags = deserializeAws_restJson1TagMap(data.Tags, context);
2766
2418
  }
2767
- return [2, Promise.resolve(contents)];
2419
+ return [2, contents];
2768
2420
  }
2769
2421
  });
2770
2422
  }); };
2771
2423
  var deserializeAws_restJson1DescribeProjectCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
2772
- var parsedOutput, _a, response, errorCode, _b, parsedBody, $metadata, statusCode;
2424
+ var parsedOutput, _a, errorCode, _b, parsedBody;
2773
2425
  var _c;
2774
2426
  return __generator(this, function (_d) {
2775
2427
  switch (_d.label) {
@@ -2794,14 +2446,14 @@ var deserializeAws_restJson1DescribeProjectCommandError = function (output, cont
2794
2446
  case 5: throw _d.sent();
2795
2447
  case 6:
2796
2448
  parsedBody = parsedOutput.body;
2797
- $metadata = deserializeMetadata(output);
2798
- statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
2799
- response = new __BaseException({
2800
- name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
2801
- $fault: "client",
2802
- $metadata: $metadata,
2449
+ throwDefaultError({
2450
+ output: output,
2451
+ parsedBody: parsedBody,
2452
+ exceptionCtor: __BaseException,
2453
+ errorCode: errorCode,
2803
2454
  });
2804
- throw __decorateServiceException(response, parsedBody);
2455
+ _d.label = 7;
2456
+ case 7: return [2];
2805
2457
  }
2806
2458
  });
2807
2459
  }); };
@@ -2813,72 +2465,59 @@ export var deserializeAws_restJson1DescribeRecipeCommand = function (output, con
2813
2465
  if (output.statusCode !== 200 && output.statusCode >= 300) {
2814
2466
  return [2, deserializeAws_restJson1DescribeRecipeCommandError(output, context)];
2815
2467
  }
2816
- contents = {
2468
+ contents = map({
2817
2469
  $metadata: deserializeMetadata(output),
2818
- CreateDate: undefined,
2819
- CreatedBy: undefined,
2820
- Description: undefined,
2821
- LastModifiedBy: undefined,
2822
- LastModifiedDate: undefined,
2823
- Name: undefined,
2824
- ProjectName: undefined,
2825
- PublishedBy: undefined,
2826
- PublishedDate: undefined,
2827
- RecipeVersion: undefined,
2828
- ResourceArn: undefined,
2829
- Steps: undefined,
2830
- Tags: undefined,
2831
- };
2470
+ });
2832
2471
  _a = __expectNonNull;
2833
2472
  _b = __expectObject;
2834
2473
  return [4, parseBody(output.body, context)];
2835
2474
  case 1:
2836
2475
  data = _a.apply(void 0, [_b.apply(void 0, [_c.sent()]), "body"]);
2837
- if (data.CreateDate !== undefined && data.CreateDate !== null) {
2476
+ if (data.CreateDate != null) {
2838
2477
  contents.CreateDate = __expectNonNull(__parseEpochTimestamp(__expectNumber(data.CreateDate)));
2839
2478
  }
2840
- if (data.CreatedBy !== undefined && data.CreatedBy !== null) {
2479
+ if (data.CreatedBy != null) {
2841
2480
  contents.CreatedBy = __expectString(data.CreatedBy);
2842
2481
  }
2843
- if (data.Description !== undefined && data.Description !== null) {
2482
+ if (data.Description != null) {
2844
2483
  contents.Description = __expectString(data.Description);
2845
2484
  }
2846
- if (data.LastModifiedBy !== undefined && data.LastModifiedBy !== null) {
2485
+ if (data.LastModifiedBy != null) {
2847
2486
  contents.LastModifiedBy = __expectString(data.LastModifiedBy);
2848
2487
  }
2849
- if (data.LastModifiedDate !== undefined && data.LastModifiedDate !== null) {
2488
+ if (data.LastModifiedDate != null) {
2850
2489
  contents.LastModifiedDate = __expectNonNull(__parseEpochTimestamp(__expectNumber(data.LastModifiedDate)));
2851
2490
  }
2852
- if (data.Name !== undefined && data.Name !== null) {
2491
+ if (data.Name != null) {
2853
2492
  contents.Name = __expectString(data.Name);
2854
2493
  }
2855
- if (data.ProjectName !== undefined && data.ProjectName !== null) {
2494
+ if (data.ProjectName != null) {
2856
2495
  contents.ProjectName = __expectString(data.ProjectName);
2857
2496
  }
2858
- if (data.PublishedBy !== undefined && data.PublishedBy !== null) {
2497
+ if (data.PublishedBy != null) {
2859
2498
  contents.PublishedBy = __expectString(data.PublishedBy);
2860
2499
  }
2861
- if (data.PublishedDate !== undefined && data.PublishedDate !== null) {
2500
+ if (data.PublishedDate != null) {
2862
2501
  contents.PublishedDate = __expectNonNull(__parseEpochTimestamp(__expectNumber(data.PublishedDate)));
2863
2502
  }
2864
- if (data.RecipeVersion !== undefined && data.RecipeVersion !== null) {
2503
+ if (data.RecipeVersion != null) {
2865
2504
  contents.RecipeVersion = __expectString(data.RecipeVersion);
2866
2505
  }
2867
- if (data.ResourceArn !== undefined && data.ResourceArn !== null) {
2506
+ if (data.ResourceArn != null) {
2868
2507
  contents.ResourceArn = __expectString(data.ResourceArn);
2869
2508
  }
2870
- if (data.Steps !== undefined && data.Steps !== null) {
2509
+ if (data.Steps != null) {
2871
2510
  contents.Steps = deserializeAws_restJson1RecipeStepList(data.Steps, context);
2872
2511
  }
2873
- if (data.Tags !== undefined && data.Tags !== null) {
2512
+ if (data.Tags != null) {
2874
2513
  contents.Tags = deserializeAws_restJson1TagMap(data.Tags, context);
2875
2514
  }
2876
- return [2, Promise.resolve(contents)];
2515
+ return [2, contents];
2877
2516
  }
2878
2517
  });
2879
2518
  }); };
2880
2519
  var deserializeAws_restJson1DescribeRecipeCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
2881
- var parsedOutput, _a, response, errorCode, _b, parsedBody, $metadata, statusCode;
2520
+ var parsedOutput, _a, errorCode, _b, parsedBody;
2882
2521
  var _c;
2883
2522
  return __generator(this, function (_d) {
2884
2523
  switch (_d.label) {
@@ -2903,14 +2542,14 @@ var deserializeAws_restJson1DescribeRecipeCommandError = function (output, conte
2903
2542
  case 5: throw _d.sent();
2904
2543
  case 6:
2905
2544
  parsedBody = parsedOutput.body;
2906
- $metadata = deserializeMetadata(output);
2907
- statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
2908
- response = new __BaseException({
2909
- name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
2910
- $fault: "client",
2911
- $metadata: $metadata,
2545
+ throwDefaultError({
2546
+ output: output,
2547
+ parsedBody: parsedBody,
2548
+ exceptionCtor: __BaseException,
2549
+ errorCode: errorCode,
2912
2550
  });
2913
- throw __decorateServiceException(response, parsedBody);
2551
+ _d.label = 7;
2552
+ case 7: return [2];
2914
2553
  }
2915
2554
  });
2916
2555
  }); };
@@ -2922,60 +2561,50 @@ export var deserializeAws_restJson1DescribeRulesetCommand = function (output, co
2922
2561
  if (output.statusCode !== 200 && output.statusCode >= 300) {
2923
2562
  return [2, deserializeAws_restJson1DescribeRulesetCommandError(output, context)];
2924
2563
  }
2925
- contents = {
2564
+ contents = map({
2926
2565
  $metadata: deserializeMetadata(output),
2927
- CreateDate: undefined,
2928
- CreatedBy: undefined,
2929
- Description: undefined,
2930
- LastModifiedBy: undefined,
2931
- LastModifiedDate: undefined,
2932
- Name: undefined,
2933
- ResourceArn: undefined,
2934
- Rules: undefined,
2935
- Tags: undefined,
2936
- TargetArn: undefined,
2937
- };
2566
+ });
2938
2567
  _a = __expectNonNull;
2939
2568
  _b = __expectObject;
2940
2569
  return [4, parseBody(output.body, context)];
2941
2570
  case 1:
2942
2571
  data = _a.apply(void 0, [_b.apply(void 0, [_c.sent()]), "body"]);
2943
- if (data.CreateDate !== undefined && data.CreateDate !== null) {
2572
+ if (data.CreateDate != null) {
2944
2573
  contents.CreateDate = __expectNonNull(__parseEpochTimestamp(__expectNumber(data.CreateDate)));
2945
2574
  }
2946
- if (data.CreatedBy !== undefined && data.CreatedBy !== null) {
2575
+ if (data.CreatedBy != null) {
2947
2576
  contents.CreatedBy = __expectString(data.CreatedBy);
2948
2577
  }
2949
- if (data.Description !== undefined && data.Description !== null) {
2578
+ if (data.Description != null) {
2950
2579
  contents.Description = __expectString(data.Description);
2951
2580
  }
2952
- if (data.LastModifiedBy !== undefined && data.LastModifiedBy !== null) {
2581
+ if (data.LastModifiedBy != null) {
2953
2582
  contents.LastModifiedBy = __expectString(data.LastModifiedBy);
2954
2583
  }
2955
- if (data.LastModifiedDate !== undefined && data.LastModifiedDate !== null) {
2584
+ if (data.LastModifiedDate != null) {
2956
2585
  contents.LastModifiedDate = __expectNonNull(__parseEpochTimestamp(__expectNumber(data.LastModifiedDate)));
2957
2586
  }
2958
- if (data.Name !== undefined && data.Name !== null) {
2587
+ if (data.Name != null) {
2959
2588
  contents.Name = __expectString(data.Name);
2960
2589
  }
2961
- if (data.ResourceArn !== undefined && data.ResourceArn !== null) {
2590
+ if (data.ResourceArn != null) {
2962
2591
  contents.ResourceArn = __expectString(data.ResourceArn);
2963
2592
  }
2964
- if (data.Rules !== undefined && data.Rules !== null) {
2593
+ if (data.Rules != null) {
2965
2594
  contents.Rules = deserializeAws_restJson1RuleList(data.Rules, context);
2966
2595
  }
2967
- if (data.Tags !== undefined && data.Tags !== null) {
2596
+ if (data.Tags != null) {
2968
2597
  contents.Tags = deserializeAws_restJson1TagMap(data.Tags, context);
2969
2598
  }
2970
- if (data.TargetArn !== undefined && data.TargetArn !== null) {
2599
+ if (data.TargetArn != null) {
2971
2600
  contents.TargetArn = __expectString(data.TargetArn);
2972
2601
  }
2973
- return [2, Promise.resolve(contents)];
2602
+ return [2, contents];
2974
2603
  }
2975
2604
  });
2976
2605
  }); };
2977
2606
  var deserializeAws_restJson1DescribeRulesetCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
2978
- var parsedOutput, _a, response, errorCode, _b, parsedBody, $metadata, statusCode;
2607
+ var parsedOutput, _a, errorCode, _b, parsedBody;
2979
2608
  var _c;
2980
2609
  return __generator(this, function (_d) {
2981
2610
  switch (_d.label) {
@@ -3000,14 +2629,14 @@ var deserializeAws_restJson1DescribeRulesetCommandError = function (output, cont
3000
2629
  case 5: throw _d.sent();
3001
2630
  case 6:
3002
2631
  parsedBody = parsedOutput.body;
3003
- $metadata = deserializeMetadata(output);
3004
- statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
3005
- response = new __BaseException({
3006
- name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
3007
- $fault: "client",
3008
- $metadata: $metadata,
2632
+ throwDefaultError({
2633
+ output: output,
2634
+ parsedBody: parsedBody,
2635
+ exceptionCtor: __BaseException,
2636
+ errorCode: errorCode,
3009
2637
  });
3010
- throw __decorateServiceException(response, parsedBody);
2638
+ _d.label = 7;
2639
+ case 7: return [2];
3011
2640
  }
3012
2641
  });
3013
2642
  }); };
@@ -3019,56 +2648,47 @@ export var deserializeAws_restJson1DescribeScheduleCommand = function (output, c
3019
2648
  if (output.statusCode !== 200 && output.statusCode >= 300) {
3020
2649
  return [2, deserializeAws_restJson1DescribeScheduleCommandError(output, context)];
3021
2650
  }
3022
- contents = {
2651
+ contents = map({
3023
2652
  $metadata: deserializeMetadata(output),
3024
- CreateDate: undefined,
3025
- CreatedBy: undefined,
3026
- CronExpression: undefined,
3027
- JobNames: undefined,
3028
- LastModifiedBy: undefined,
3029
- LastModifiedDate: undefined,
3030
- Name: undefined,
3031
- ResourceArn: undefined,
3032
- Tags: undefined,
3033
- };
2653
+ });
3034
2654
  _a = __expectNonNull;
3035
2655
  _b = __expectObject;
3036
2656
  return [4, parseBody(output.body, context)];
3037
2657
  case 1:
3038
2658
  data = _a.apply(void 0, [_b.apply(void 0, [_c.sent()]), "body"]);
3039
- if (data.CreateDate !== undefined && data.CreateDate !== null) {
2659
+ if (data.CreateDate != null) {
3040
2660
  contents.CreateDate = __expectNonNull(__parseEpochTimestamp(__expectNumber(data.CreateDate)));
3041
2661
  }
3042
- if (data.CreatedBy !== undefined && data.CreatedBy !== null) {
2662
+ if (data.CreatedBy != null) {
3043
2663
  contents.CreatedBy = __expectString(data.CreatedBy);
3044
2664
  }
3045
- if (data.CronExpression !== undefined && data.CronExpression !== null) {
2665
+ if (data.CronExpression != null) {
3046
2666
  contents.CronExpression = __expectString(data.CronExpression);
3047
2667
  }
3048
- if (data.JobNames !== undefined && data.JobNames !== null) {
2668
+ if (data.JobNames != null) {
3049
2669
  contents.JobNames = deserializeAws_restJson1JobNameList(data.JobNames, context);
3050
2670
  }
3051
- if (data.LastModifiedBy !== undefined && data.LastModifiedBy !== null) {
2671
+ if (data.LastModifiedBy != null) {
3052
2672
  contents.LastModifiedBy = __expectString(data.LastModifiedBy);
3053
2673
  }
3054
- if (data.LastModifiedDate !== undefined && data.LastModifiedDate !== null) {
2674
+ if (data.LastModifiedDate != null) {
3055
2675
  contents.LastModifiedDate = __expectNonNull(__parseEpochTimestamp(__expectNumber(data.LastModifiedDate)));
3056
2676
  }
3057
- if (data.Name !== undefined && data.Name !== null) {
2677
+ if (data.Name != null) {
3058
2678
  contents.Name = __expectString(data.Name);
3059
2679
  }
3060
- if (data.ResourceArn !== undefined && data.ResourceArn !== null) {
2680
+ if (data.ResourceArn != null) {
3061
2681
  contents.ResourceArn = __expectString(data.ResourceArn);
3062
2682
  }
3063
- if (data.Tags !== undefined && data.Tags !== null) {
2683
+ if (data.Tags != null) {
3064
2684
  contents.Tags = deserializeAws_restJson1TagMap(data.Tags, context);
3065
2685
  }
3066
- return [2, Promise.resolve(contents)];
2686
+ return [2, contents];
3067
2687
  }
3068
2688
  });
3069
2689
  }); };
3070
2690
  var deserializeAws_restJson1DescribeScheduleCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
3071
- var parsedOutput, _a, response, errorCode, _b, parsedBody, $metadata, statusCode;
2691
+ var parsedOutput, _a, errorCode, _b, parsedBody;
3072
2692
  var _c;
3073
2693
  return __generator(this, function (_d) {
3074
2694
  switch (_d.label) {
@@ -3093,14 +2713,14 @@ var deserializeAws_restJson1DescribeScheduleCommandError = function (output, con
3093
2713
  case 5: throw _d.sent();
3094
2714
  case 6:
3095
2715
  parsedBody = parsedOutput.body;
3096
- $metadata = deserializeMetadata(output);
3097
- statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
3098
- response = new __BaseException({
3099
- name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
3100
- $fault: "client",
3101
- $metadata: $metadata,
2716
+ throwDefaultError({
2717
+ output: output,
2718
+ parsedBody: parsedBody,
2719
+ exceptionCtor: __BaseException,
2720
+ errorCode: errorCode,
3102
2721
  });
3103
- throw __decorateServiceException(response, parsedBody);
2722
+ _d.label = 7;
2723
+ case 7: return [2];
3104
2724
  }
3105
2725
  });
3106
2726
  }); };
@@ -3112,28 +2732,26 @@ export var deserializeAws_restJson1ListDatasetsCommand = function (output, conte
3112
2732
  if (output.statusCode !== 200 && output.statusCode >= 300) {
3113
2733
  return [2, deserializeAws_restJson1ListDatasetsCommandError(output, context)];
3114
2734
  }
3115
- contents = {
2735
+ contents = map({
3116
2736
  $metadata: deserializeMetadata(output),
3117
- Datasets: undefined,
3118
- NextToken: undefined,
3119
- };
2737
+ });
3120
2738
  _a = __expectNonNull;
3121
2739
  _b = __expectObject;
3122
2740
  return [4, parseBody(output.body, context)];
3123
2741
  case 1:
3124
2742
  data = _a.apply(void 0, [_b.apply(void 0, [_c.sent()]), "body"]);
3125
- if (data.Datasets !== undefined && data.Datasets !== null) {
2743
+ if (data.Datasets != null) {
3126
2744
  contents.Datasets = deserializeAws_restJson1DatasetList(data.Datasets, context);
3127
2745
  }
3128
- if (data.NextToken !== undefined && data.NextToken !== null) {
2746
+ if (data.NextToken != null) {
3129
2747
  contents.NextToken = __expectString(data.NextToken);
3130
2748
  }
3131
- return [2, Promise.resolve(contents)];
2749
+ return [2, contents];
3132
2750
  }
3133
2751
  });
3134
2752
  }); };
3135
2753
  var deserializeAws_restJson1ListDatasetsCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
3136
- var parsedOutput, _a, response, errorCode, _b, parsedBody, $metadata, statusCode;
2754
+ var parsedOutput, _a, errorCode, _b, parsedBody;
3137
2755
  var _c;
3138
2756
  return __generator(this, function (_d) {
3139
2757
  switch (_d.label) {
@@ -3154,14 +2772,14 @@ var deserializeAws_restJson1ListDatasetsCommandError = function (output, context
3154
2772
  case 3: throw _d.sent();
3155
2773
  case 4:
3156
2774
  parsedBody = parsedOutput.body;
3157
- $metadata = deserializeMetadata(output);
3158
- statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
3159
- response = new __BaseException({
3160
- name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
3161
- $fault: "client",
3162
- $metadata: $metadata,
2775
+ throwDefaultError({
2776
+ output: output,
2777
+ parsedBody: parsedBody,
2778
+ exceptionCtor: __BaseException,
2779
+ errorCode: errorCode,
3163
2780
  });
3164
- throw __decorateServiceException(response, parsedBody);
2781
+ _d.label = 5;
2782
+ case 5: return [2];
3165
2783
  }
3166
2784
  });
3167
2785
  }); };
@@ -3173,28 +2791,26 @@ export var deserializeAws_restJson1ListJobRunsCommand = function (output, contex
3173
2791
  if (output.statusCode !== 200 && output.statusCode >= 300) {
3174
2792
  return [2, deserializeAws_restJson1ListJobRunsCommandError(output, context)];
3175
2793
  }
3176
- contents = {
2794
+ contents = map({
3177
2795
  $metadata: deserializeMetadata(output),
3178
- JobRuns: undefined,
3179
- NextToken: undefined,
3180
- };
2796
+ });
3181
2797
  _a = __expectNonNull;
3182
2798
  _b = __expectObject;
3183
2799
  return [4, parseBody(output.body, context)];
3184
2800
  case 1:
3185
2801
  data = _a.apply(void 0, [_b.apply(void 0, [_c.sent()]), "body"]);
3186
- if (data.JobRuns !== undefined && data.JobRuns !== null) {
2802
+ if (data.JobRuns != null) {
3187
2803
  contents.JobRuns = deserializeAws_restJson1JobRunList(data.JobRuns, context);
3188
2804
  }
3189
- if (data.NextToken !== undefined && data.NextToken !== null) {
2805
+ if (data.NextToken != null) {
3190
2806
  contents.NextToken = __expectString(data.NextToken);
3191
2807
  }
3192
- return [2, Promise.resolve(contents)];
2808
+ return [2, contents];
3193
2809
  }
3194
2810
  });
3195
2811
  }); };
3196
2812
  var deserializeAws_restJson1ListJobRunsCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
3197
- var parsedOutput, _a, response, errorCode, _b, parsedBody, $metadata, statusCode;
2813
+ var parsedOutput, _a, errorCode, _b, parsedBody;
3198
2814
  var _c;
3199
2815
  return __generator(this, function (_d) {
3200
2816
  switch (_d.label) {
@@ -3219,14 +2835,14 @@ var deserializeAws_restJson1ListJobRunsCommandError = function (output, context)
3219
2835
  case 5: throw _d.sent();
3220
2836
  case 6:
3221
2837
  parsedBody = parsedOutput.body;
3222
- $metadata = deserializeMetadata(output);
3223
- statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
3224
- response = new __BaseException({
3225
- name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
3226
- $fault: "client",
3227
- $metadata: $metadata,
2838
+ throwDefaultError({
2839
+ output: output,
2840
+ parsedBody: parsedBody,
2841
+ exceptionCtor: __BaseException,
2842
+ errorCode: errorCode,
3228
2843
  });
3229
- throw __decorateServiceException(response, parsedBody);
2844
+ _d.label = 7;
2845
+ case 7: return [2];
3230
2846
  }
3231
2847
  });
3232
2848
  }); };
@@ -3238,28 +2854,26 @@ export var deserializeAws_restJson1ListJobsCommand = function (output, context)
3238
2854
  if (output.statusCode !== 200 && output.statusCode >= 300) {
3239
2855
  return [2, deserializeAws_restJson1ListJobsCommandError(output, context)];
3240
2856
  }
3241
- contents = {
2857
+ contents = map({
3242
2858
  $metadata: deserializeMetadata(output),
3243
- Jobs: undefined,
3244
- NextToken: undefined,
3245
- };
2859
+ });
3246
2860
  _a = __expectNonNull;
3247
2861
  _b = __expectObject;
3248
2862
  return [4, parseBody(output.body, context)];
3249
2863
  case 1:
3250
2864
  data = _a.apply(void 0, [_b.apply(void 0, [_c.sent()]), "body"]);
3251
- if (data.Jobs !== undefined && data.Jobs !== null) {
2865
+ if (data.Jobs != null) {
3252
2866
  contents.Jobs = deserializeAws_restJson1JobList(data.Jobs, context);
3253
2867
  }
3254
- if (data.NextToken !== undefined && data.NextToken !== null) {
2868
+ if (data.NextToken != null) {
3255
2869
  contents.NextToken = __expectString(data.NextToken);
3256
2870
  }
3257
- return [2, Promise.resolve(contents)];
2871
+ return [2, contents];
3258
2872
  }
3259
2873
  });
3260
2874
  }); };
3261
2875
  var deserializeAws_restJson1ListJobsCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
3262
- var parsedOutput, _a, response, errorCode, _b, parsedBody, $metadata, statusCode;
2876
+ var parsedOutput, _a, errorCode, _b, parsedBody;
3263
2877
  var _c;
3264
2878
  return __generator(this, function (_d) {
3265
2879
  switch (_d.label) {
@@ -3280,14 +2894,14 @@ var deserializeAws_restJson1ListJobsCommandError = function (output, context) {
3280
2894
  case 3: throw _d.sent();
3281
2895
  case 4:
3282
2896
  parsedBody = parsedOutput.body;
3283
- $metadata = deserializeMetadata(output);
3284
- statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
3285
- response = new __BaseException({
3286
- name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
3287
- $fault: "client",
3288
- $metadata: $metadata,
2897
+ throwDefaultError({
2898
+ output: output,
2899
+ parsedBody: parsedBody,
2900
+ exceptionCtor: __BaseException,
2901
+ errorCode: errorCode,
3289
2902
  });
3290
- throw __decorateServiceException(response, parsedBody);
2903
+ _d.label = 5;
2904
+ case 5: return [2];
3291
2905
  }
3292
2906
  });
3293
2907
  }); };
@@ -3299,28 +2913,26 @@ export var deserializeAws_restJson1ListProjectsCommand = function (output, conte
3299
2913
  if (output.statusCode !== 200 && output.statusCode >= 300) {
3300
2914
  return [2, deserializeAws_restJson1ListProjectsCommandError(output, context)];
3301
2915
  }
3302
- contents = {
2916
+ contents = map({
3303
2917
  $metadata: deserializeMetadata(output),
3304
- NextToken: undefined,
3305
- Projects: undefined,
3306
- };
2918
+ });
3307
2919
  _a = __expectNonNull;
3308
2920
  _b = __expectObject;
3309
2921
  return [4, parseBody(output.body, context)];
3310
2922
  case 1:
3311
2923
  data = _a.apply(void 0, [_b.apply(void 0, [_c.sent()]), "body"]);
3312
- if (data.NextToken !== undefined && data.NextToken !== null) {
2924
+ if (data.NextToken != null) {
3313
2925
  contents.NextToken = __expectString(data.NextToken);
3314
2926
  }
3315
- if (data.Projects !== undefined && data.Projects !== null) {
2927
+ if (data.Projects != null) {
3316
2928
  contents.Projects = deserializeAws_restJson1ProjectList(data.Projects, context);
3317
2929
  }
3318
- return [2, Promise.resolve(contents)];
2930
+ return [2, contents];
3319
2931
  }
3320
2932
  });
3321
2933
  }); };
3322
2934
  var deserializeAws_restJson1ListProjectsCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
3323
- var parsedOutput, _a, response, errorCode, _b, parsedBody, $metadata, statusCode;
2935
+ var parsedOutput, _a, errorCode, _b, parsedBody;
3324
2936
  var _c;
3325
2937
  return __generator(this, function (_d) {
3326
2938
  switch (_d.label) {
@@ -3341,14 +2953,14 @@ var deserializeAws_restJson1ListProjectsCommandError = function (output, context
3341
2953
  case 3: throw _d.sent();
3342
2954
  case 4:
3343
2955
  parsedBody = parsedOutput.body;
3344
- $metadata = deserializeMetadata(output);
3345
- statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
3346
- response = new __BaseException({
3347
- name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
3348
- $fault: "client",
3349
- $metadata: $metadata,
2956
+ throwDefaultError({
2957
+ output: output,
2958
+ parsedBody: parsedBody,
2959
+ exceptionCtor: __BaseException,
2960
+ errorCode: errorCode,
3350
2961
  });
3351
- throw __decorateServiceException(response, parsedBody);
2962
+ _d.label = 5;
2963
+ case 5: return [2];
3352
2964
  }
3353
2965
  });
3354
2966
  }); };
@@ -3360,28 +2972,26 @@ export var deserializeAws_restJson1ListRecipesCommand = function (output, contex
3360
2972
  if (output.statusCode !== 200 && output.statusCode >= 300) {
3361
2973
  return [2, deserializeAws_restJson1ListRecipesCommandError(output, context)];
3362
2974
  }
3363
- contents = {
2975
+ contents = map({
3364
2976
  $metadata: deserializeMetadata(output),
3365
- NextToken: undefined,
3366
- Recipes: undefined,
3367
- };
2977
+ });
3368
2978
  _a = __expectNonNull;
3369
2979
  _b = __expectObject;
3370
2980
  return [4, parseBody(output.body, context)];
3371
2981
  case 1:
3372
2982
  data = _a.apply(void 0, [_b.apply(void 0, [_c.sent()]), "body"]);
3373
- if (data.NextToken !== undefined && data.NextToken !== null) {
2983
+ if (data.NextToken != null) {
3374
2984
  contents.NextToken = __expectString(data.NextToken);
3375
2985
  }
3376
- if (data.Recipes !== undefined && data.Recipes !== null) {
2986
+ if (data.Recipes != null) {
3377
2987
  contents.Recipes = deserializeAws_restJson1RecipeList(data.Recipes, context);
3378
2988
  }
3379
- return [2, Promise.resolve(contents)];
2989
+ return [2, contents];
3380
2990
  }
3381
2991
  });
3382
2992
  }); };
3383
2993
  var deserializeAws_restJson1ListRecipesCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
3384
- var parsedOutput, _a, response, errorCode, _b, parsedBody, $metadata, statusCode;
2994
+ var parsedOutput, _a, errorCode, _b, parsedBody;
3385
2995
  var _c;
3386
2996
  return __generator(this, function (_d) {
3387
2997
  switch (_d.label) {
@@ -3402,14 +3012,14 @@ var deserializeAws_restJson1ListRecipesCommandError = function (output, context)
3402
3012
  case 3: throw _d.sent();
3403
3013
  case 4:
3404
3014
  parsedBody = parsedOutput.body;
3405
- $metadata = deserializeMetadata(output);
3406
- statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
3407
- response = new __BaseException({
3408
- name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
3409
- $fault: "client",
3410
- $metadata: $metadata,
3015
+ throwDefaultError({
3016
+ output: output,
3017
+ parsedBody: parsedBody,
3018
+ exceptionCtor: __BaseException,
3019
+ errorCode: errorCode,
3411
3020
  });
3412
- throw __decorateServiceException(response, parsedBody);
3021
+ _d.label = 5;
3022
+ case 5: return [2];
3413
3023
  }
3414
3024
  });
3415
3025
  }); };
@@ -3421,28 +3031,26 @@ export var deserializeAws_restJson1ListRecipeVersionsCommand = function (output,
3421
3031
  if (output.statusCode !== 200 && output.statusCode >= 300) {
3422
3032
  return [2, deserializeAws_restJson1ListRecipeVersionsCommandError(output, context)];
3423
3033
  }
3424
- contents = {
3034
+ contents = map({
3425
3035
  $metadata: deserializeMetadata(output),
3426
- NextToken: undefined,
3427
- Recipes: undefined,
3428
- };
3036
+ });
3429
3037
  _a = __expectNonNull;
3430
3038
  _b = __expectObject;
3431
3039
  return [4, parseBody(output.body, context)];
3432
3040
  case 1:
3433
3041
  data = _a.apply(void 0, [_b.apply(void 0, [_c.sent()]), "body"]);
3434
- if (data.NextToken !== undefined && data.NextToken !== null) {
3042
+ if (data.NextToken != null) {
3435
3043
  contents.NextToken = __expectString(data.NextToken);
3436
3044
  }
3437
- if (data.Recipes !== undefined && data.Recipes !== null) {
3045
+ if (data.Recipes != null) {
3438
3046
  contents.Recipes = deserializeAws_restJson1RecipeList(data.Recipes, context);
3439
3047
  }
3440
- return [2, Promise.resolve(contents)];
3048
+ return [2, contents];
3441
3049
  }
3442
3050
  });
3443
3051
  }); };
3444
3052
  var deserializeAws_restJson1ListRecipeVersionsCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
3445
- var parsedOutput, _a, response, errorCode, _b, parsedBody, $metadata, statusCode;
3053
+ var parsedOutput, _a, errorCode, _b, parsedBody;
3446
3054
  var _c;
3447
3055
  return __generator(this, function (_d) {
3448
3056
  switch (_d.label) {
@@ -3463,14 +3071,14 @@ var deserializeAws_restJson1ListRecipeVersionsCommandError = function (output, c
3463
3071
  case 3: throw _d.sent();
3464
3072
  case 4:
3465
3073
  parsedBody = parsedOutput.body;
3466
- $metadata = deserializeMetadata(output);
3467
- statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
3468
- response = new __BaseException({
3469
- name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
3470
- $fault: "client",
3471
- $metadata: $metadata,
3074
+ throwDefaultError({
3075
+ output: output,
3076
+ parsedBody: parsedBody,
3077
+ exceptionCtor: __BaseException,
3078
+ errorCode: errorCode,
3472
3079
  });
3473
- throw __decorateServiceException(response, parsedBody);
3080
+ _d.label = 5;
3081
+ case 5: return [2];
3474
3082
  }
3475
3083
  });
3476
3084
  }); };
@@ -3482,28 +3090,26 @@ export var deserializeAws_restJson1ListRulesetsCommand = function (output, conte
3482
3090
  if (output.statusCode !== 200 && output.statusCode >= 300) {
3483
3091
  return [2, deserializeAws_restJson1ListRulesetsCommandError(output, context)];
3484
3092
  }
3485
- contents = {
3093
+ contents = map({
3486
3094
  $metadata: deserializeMetadata(output),
3487
- NextToken: undefined,
3488
- Rulesets: undefined,
3489
- };
3095
+ });
3490
3096
  _a = __expectNonNull;
3491
3097
  _b = __expectObject;
3492
3098
  return [4, parseBody(output.body, context)];
3493
3099
  case 1:
3494
3100
  data = _a.apply(void 0, [_b.apply(void 0, [_c.sent()]), "body"]);
3495
- if (data.NextToken !== undefined && data.NextToken !== null) {
3101
+ if (data.NextToken != null) {
3496
3102
  contents.NextToken = __expectString(data.NextToken);
3497
3103
  }
3498
- if (data.Rulesets !== undefined && data.Rulesets !== null) {
3104
+ if (data.Rulesets != null) {
3499
3105
  contents.Rulesets = deserializeAws_restJson1RulesetItemList(data.Rulesets, context);
3500
3106
  }
3501
- return [2, Promise.resolve(contents)];
3107
+ return [2, contents];
3502
3108
  }
3503
3109
  });
3504
3110
  }); };
3505
3111
  var deserializeAws_restJson1ListRulesetsCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
3506
- var parsedOutput, _a, response, errorCode, _b, parsedBody, $metadata, statusCode;
3112
+ var parsedOutput, _a, errorCode, _b, parsedBody;
3507
3113
  var _c;
3508
3114
  return __generator(this, function (_d) {
3509
3115
  switch (_d.label) {
@@ -3528,14 +3134,14 @@ var deserializeAws_restJson1ListRulesetsCommandError = function (output, context
3528
3134
  case 5: throw _d.sent();
3529
3135
  case 6:
3530
3136
  parsedBody = parsedOutput.body;
3531
- $metadata = deserializeMetadata(output);
3532
- statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
3533
- response = new __BaseException({
3534
- name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
3535
- $fault: "client",
3536
- $metadata: $metadata,
3137
+ throwDefaultError({
3138
+ output: output,
3139
+ parsedBody: parsedBody,
3140
+ exceptionCtor: __BaseException,
3141
+ errorCode: errorCode,
3537
3142
  });
3538
- throw __decorateServiceException(response, parsedBody);
3143
+ _d.label = 7;
3144
+ case 7: return [2];
3539
3145
  }
3540
3146
  });
3541
3147
  }); };
@@ -3547,28 +3153,26 @@ export var deserializeAws_restJson1ListSchedulesCommand = function (output, cont
3547
3153
  if (output.statusCode !== 200 && output.statusCode >= 300) {
3548
3154
  return [2, deserializeAws_restJson1ListSchedulesCommandError(output, context)];
3549
3155
  }
3550
- contents = {
3156
+ contents = map({
3551
3157
  $metadata: deserializeMetadata(output),
3552
- NextToken: undefined,
3553
- Schedules: undefined,
3554
- };
3158
+ });
3555
3159
  _a = __expectNonNull;
3556
3160
  _b = __expectObject;
3557
3161
  return [4, parseBody(output.body, context)];
3558
3162
  case 1:
3559
3163
  data = _a.apply(void 0, [_b.apply(void 0, [_c.sent()]), "body"]);
3560
- if (data.NextToken !== undefined && data.NextToken !== null) {
3164
+ if (data.NextToken != null) {
3561
3165
  contents.NextToken = __expectString(data.NextToken);
3562
3166
  }
3563
- if (data.Schedules !== undefined && data.Schedules !== null) {
3167
+ if (data.Schedules != null) {
3564
3168
  contents.Schedules = deserializeAws_restJson1ScheduleList(data.Schedules, context);
3565
3169
  }
3566
- return [2, Promise.resolve(contents)];
3170
+ return [2, contents];
3567
3171
  }
3568
3172
  });
3569
3173
  }); };
3570
3174
  var deserializeAws_restJson1ListSchedulesCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
3571
- var parsedOutput, _a, response, errorCode, _b, parsedBody, $metadata, statusCode;
3175
+ var parsedOutput, _a, errorCode, _b, parsedBody;
3572
3176
  var _c;
3573
3177
  return __generator(this, function (_d) {
3574
3178
  switch (_d.label) {
@@ -3589,14 +3193,14 @@ var deserializeAws_restJson1ListSchedulesCommandError = function (output, contex
3589
3193
  case 3: throw _d.sent();
3590
3194
  case 4:
3591
3195
  parsedBody = parsedOutput.body;
3592
- $metadata = deserializeMetadata(output);
3593
- statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
3594
- response = new __BaseException({
3595
- name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
3596
- $fault: "client",
3597
- $metadata: $metadata,
3196
+ throwDefaultError({
3197
+ output: output,
3198
+ parsedBody: parsedBody,
3199
+ exceptionCtor: __BaseException,
3200
+ errorCode: errorCode,
3598
3201
  });
3599
- throw __decorateServiceException(response, parsedBody);
3202
+ _d.label = 5;
3203
+ case 5: return [2];
3600
3204
  }
3601
3205
  });
3602
3206
  }); };
@@ -3608,24 +3212,23 @@ export var deserializeAws_restJson1ListTagsForResourceCommand = function (output
3608
3212
  if (output.statusCode !== 200 && output.statusCode >= 300) {
3609
3213
  return [2, deserializeAws_restJson1ListTagsForResourceCommandError(output, context)];
3610
3214
  }
3611
- contents = {
3215
+ contents = map({
3612
3216
  $metadata: deserializeMetadata(output),
3613
- Tags: undefined,
3614
- };
3217
+ });
3615
3218
  _a = __expectNonNull;
3616
3219
  _b = __expectObject;
3617
3220
  return [4, parseBody(output.body, context)];
3618
3221
  case 1:
3619
3222
  data = _a.apply(void 0, [_b.apply(void 0, [_c.sent()]), "body"]);
3620
- if (data.Tags !== undefined && data.Tags !== null) {
3223
+ if (data.Tags != null) {
3621
3224
  contents.Tags = deserializeAws_restJson1TagMap(data.Tags, context);
3622
3225
  }
3623
- return [2, Promise.resolve(contents)];
3226
+ return [2, contents];
3624
3227
  }
3625
3228
  });
3626
3229
  }); };
3627
3230
  var deserializeAws_restJson1ListTagsForResourceCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
3628
- var parsedOutput, _a, response, errorCode, _b, parsedBody, $metadata, statusCode;
3231
+ var parsedOutput, _a, errorCode, _b, parsedBody;
3629
3232
  var _c;
3630
3233
  return __generator(this, function (_d) {
3631
3234
  switch (_d.label) {
@@ -3654,14 +3257,14 @@ var deserializeAws_restJson1ListTagsForResourceCommandError = function (output,
3654
3257
  case 7: throw _d.sent();
3655
3258
  case 8:
3656
3259
  parsedBody = parsedOutput.body;
3657
- $metadata = deserializeMetadata(output);
3658
- statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
3659
- response = new __BaseException({
3660
- name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
3661
- $fault: "client",
3662
- $metadata: $metadata,
3260
+ throwDefaultError({
3261
+ output: output,
3262
+ parsedBody: parsedBody,
3263
+ exceptionCtor: __BaseException,
3264
+ errorCode: errorCode,
3663
3265
  });
3664
- throw __decorateServiceException(response, parsedBody);
3266
+ _d.label = 9;
3267
+ case 9: return [2];
3665
3268
  }
3666
3269
  });
3667
3270
  }); };
@@ -3673,24 +3276,23 @@ export var deserializeAws_restJson1PublishRecipeCommand = function (output, cont
3673
3276
  if (output.statusCode !== 200 && output.statusCode >= 300) {
3674
3277
  return [2, deserializeAws_restJson1PublishRecipeCommandError(output, context)];
3675
3278
  }
3676
- contents = {
3279
+ contents = map({
3677
3280
  $metadata: deserializeMetadata(output),
3678
- Name: undefined,
3679
- };
3281
+ });
3680
3282
  _a = __expectNonNull;
3681
3283
  _b = __expectObject;
3682
3284
  return [4, parseBody(output.body, context)];
3683
3285
  case 1:
3684
3286
  data = _a.apply(void 0, [_b.apply(void 0, [_c.sent()]), "body"]);
3685
- if (data.Name !== undefined && data.Name !== null) {
3287
+ if (data.Name != null) {
3686
3288
  contents.Name = __expectString(data.Name);
3687
3289
  }
3688
- return [2, Promise.resolve(contents)];
3290
+ return [2, contents];
3689
3291
  }
3690
3292
  });
3691
3293
  }); };
3692
3294
  var deserializeAws_restJson1PublishRecipeCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
3693
- var parsedOutput, _a, response, errorCode, _b, parsedBody, $metadata, statusCode;
3295
+ var parsedOutput, _a, errorCode, _b, parsedBody;
3694
3296
  var _c;
3695
3297
  return __generator(this, function (_d) {
3696
3298
  switch (_d.label) {
@@ -3719,14 +3321,14 @@ var deserializeAws_restJson1PublishRecipeCommandError = function (output, contex
3719
3321
  case 7: throw _d.sent();
3720
3322
  case 8:
3721
3323
  parsedBody = parsedOutput.body;
3722
- $metadata = deserializeMetadata(output);
3723
- statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
3724
- response = new __BaseException({
3725
- name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
3726
- $fault: "client",
3727
- $metadata: $metadata,
3324
+ throwDefaultError({
3325
+ output: output,
3326
+ parsedBody: parsedBody,
3327
+ exceptionCtor: __BaseException,
3328
+ errorCode: errorCode,
3728
3329
  });
3729
- throw __decorateServiceException(response, parsedBody);
3330
+ _d.label = 9;
3331
+ case 9: return [2];
3730
3332
  }
3731
3333
  });
3732
3334
  }); };
@@ -3738,32 +3340,29 @@ export var deserializeAws_restJson1SendProjectSessionActionCommand = function (o
3738
3340
  if (output.statusCode !== 200 && output.statusCode >= 300) {
3739
3341
  return [2, deserializeAws_restJson1SendProjectSessionActionCommandError(output, context)];
3740
3342
  }
3741
- contents = {
3343
+ contents = map({
3742
3344
  $metadata: deserializeMetadata(output),
3743
- ActionId: undefined,
3744
- Name: undefined,
3745
- Result: undefined,
3746
- };
3345
+ });
3747
3346
  _a = __expectNonNull;
3748
3347
  _b = __expectObject;
3749
3348
  return [4, parseBody(output.body, context)];
3750
3349
  case 1:
3751
3350
  data = _a.apply(void 0, [_b.apply(void 0, [_c.sent()]), "body"]);
3752
- if (data.ActionId !== undefined && data.ActionId !== null) {
3351
+ if (data.ActionId != null) {
3753
3352
  contents.ActionId = __expectInt32(data.ActionId);
3754
3353
  }
3755
- if (data.Name !== undefined && data.Name !== null) {
3354
+ if (data.Name != null) {
3756
3355
  contents.Name = __expectString(data.Name);
3757
3356
  }
3758
- if (data.Result !== undefined && data.Result !== null) {
3357
+ if (data.Result != null) {
3759
3358
  contents.Result = __expectString(data.Result);
3760
3359
  }
3761
- return [2, Promise.resolve(contents)];
3360
+ return [2, contents];
3762
3361
  }
3763
3362
  });
3764
3363
  }); };
3765
3364
  var deserializeAws_restJson1SendProjectSessionActionCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
3766
- var parsedOutput, _a, response, errorCode, _b, parsedBody, $metadata, statusCode;
3365
+ var parsedOutput, _a, errorCode, _b, parsedBody;
3767
3366
  var _c;
3768
3367
  return __generator(this, function (_d) {
3769
3368
  switch (_d.label) {
@@ -3792,14 +3391,14 @@ var deserializeAws_restJson1SendProjectSessionActionCommandError = function (out
3792
3391
  case 7: throw _d.sent();
3793
3392
  case 8:
3794
3393
  parsedBody = parsedOutput.body;
3795
- $metadata = deserializeMetadata(output);
3796
- statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
3797
- response = new __BaseException({
3798
- name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
3799
- $fault: "client",
3800
- $metadata: $metadata,
3394
+ throwDefaultError({
3395
+ output: output,
3396
+ parsedBody: parsedBody,
3397
+ exceptionCtor: __BaseException,
3398
+ errorCode: errorCode,
3801
3399
  });
3802
- throw __decorateServiceException(response, parsedBody);
3400
+ _d.label = 9;
3401
+ case 9: return [2];
3803
3402
  }
3804
3403
  });
3805
3404
  }); };
@@ -3811,24 +3410,23 @@ export var deserializeAws_restJson1StartJobRunCommand = function (output, contex
3811
3410
  if (output.statusCode !== 200 && output.statusCode >= 300) {
3812
3411
  return [2, deserializeAws_restJson1StartJobRunCommandError(output, context)];
3813
3412
  }
3814
- contents = {
3413
+ contents = map({
3815
3414
  $metadata: deserializeMetadata(output),
3816
- RunId: undefined,
3817
- };
3415
+ });
3818
3416
  _a = __expectNonNull;
3819
3417
  _b = __expectObject;
3820
3418
  return [4, parseBody(output.body, context)];
3821
3419
  case 1:
3822
3420
  data = _a.apply(void 0, [_b.apply(void 0, [_c.sent()]), "body"]);
3823
- if (data.RunId !== undefined && data.RunId !== null) {
3421
+ if (data.RunId != null) {
3824
3422
  contents.RunId = __expectString(data.RunId);
3825
3423
  }
3826
- return [2, Promise.resolve(contents)];
3424
+ return [2, contents];
3827
3425
  }
3828
3426
  });
3829
3427
  }); };
3830
3428
  var deserializeAws_restJson1StartJobRunCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
3831
- var parsedOutput, _a, response, errorCode, _b, parsedBody, $metadata, statusCode;
3429
+ var parsedOutput, _a, errorCode, _b, parsedBody;
3832
3430
  var _c;
3833
3431
  return __generator(this, function (_d) {
3834
3432
  switch (_d.label) {
@@ -3861,14 +3459,14 @@ var deserializeAws_restJson1StartJobRunCommandError = function (output, context)
3861
3459
  case 9: throw _d.sent();
3862
3460
  case 10:
3863
3461
  parsedBody = parsedOutput.body;
3864
- $metadata = deserializeMetadata(output);
3865
- statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
3866
- response = new __BaseException({
3867
- name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
3868
- $fault: "client",
3869
- $metadata: $metadata,
3462
+ throwDefaultError({
3463
+ output: output,
3464
+ parsedBody: parsedBody,
3465
+ exceptionCtor: __BaseException,
3466
+ errorCode: errorCode,
3870
3467
  });
3871
- throw __decorateServiceException(response, parsedBody);
3468
+ _d.label = 11;
3469
+ case 11: return [2];
3872
3470
  }
3873
3471
  });
3874
3472
  }); };
@@ -3880,28 +3478,26 @@ export var deserializeAws_restJson1StartProjectSessionCommand = function (output
3880
3478
  if (output.statusCode !== 200 && output.statusCode >= 300) {
3881
3479
  return [2, deserializeAws_restJson1StartProjectSessionCommandError(output, context)];
3882
3480
  }
3883
- contents = {
3481
+ contents = map({
3884
3482
  $metadata: deserializeMetadata(output),
3885
- ClientSessionId: undefined,
3886
- Name: undefined,
3887
- };
3483
+ });
3888
3484
  _a = __expectNonNull;
3889
3485
  _b = __expectObject;
3890
3486
  return [4, parseBody(output.body, context)];
3891
3487
  case 1:
3892
3488
  data = _a.apply(void 0, [_b.apply(void 0, [_c.sent()]), "body"]);
3893
- if (data.ClientSessionId !== undefined && data.ClientSessionId !== null) {
3489
+ if (data.ClientSessionId != null) {
3894
3490
  contents.ClientSessionId = __expectString(data.ClientSessionId);
3895
3491
  }
3896
- if (data.Name !== undefined && data.Name !== null) {
3492
+ if (data.Name != null) {
3897
3493
  contents.Name = __expectString(data.Name);
3898
3494
  }
3899
- return [2, Promise.resolve(contents)];
3495
+ return [2, contents];
3900
3496
  }
3901
3497
  });
3902
3498
  }); };
3903
3499
  var deserializeAws_restJson1StartProjectSessionCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
3904
- var parsedOutput, _a, response, errorCode, _b, parsedBody, $metadata, statusCode;
3500
+ var parsedOutput, _a, errorCode, _b, parsedBody;
3905
3501
  var _c;
3906
3502
  return __generator(this, function (_d) {
3907
3503
  switch (_d.label) {
@@ -3934,14 +3530,14 @@ var deserializeAws_restJson1StartProjectSessionCommandError = function (output,
3934
3530
  case 9: throw _d.sent();
3935
3531
  case 10:
3936
3532
  parsedBody = parsedOutput.body;
3937
- $metadata = deserializeMetadata(output);
3938
- statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
3939
- response = new __BaseException({
3940
- name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
3941
- $fault: "client",
3942
- $metadata: $metadata,
3533
+ throwDefaultError({
3534
+ output: output,
3535
+ parsedBody: parsedBody,
3536
+ exceptionCtor: __BaseException,
3537
+ errorCode: errorCode,
3943
3538
  });
3944
- throw __decorateServiceException(response, parsedBody);
3539
+ _d.label = 11;
3540
+ case 11: return [2];
3945
3541
  }
3946
3542
  });
3947
3543
  }); };
@@ -3953,24 +3549,23 @@ export var deserializeAws_restJson1StopJobRunCommand = function (output, context
3953
3549
  if (output.statusCode !== 200 && output.statusCode >= 300) {
3954
3550
  return [2, deserializeAws_restJson1StopJobRunCommandError(output, context)];
3955
3551
  }
3956
- contents = {
3552
+ contents = map({
3957
3553
  $metadata: deserializeMetadata(output),
3958
- RunId: undefined,
3959
- };
3554
+ });
3960
3555
  _a = __expectNonNull;
3961
3556
  _b = __expectObject;
3962
3557
  return [4, parseBody(output.body, context)];
3963
3558
  case 1:
3964
3559
  data = _a.apply(void 0, [_b.apply(void 0, [_c.sent()]), "body"]);
3965
- if (data.RunId !== undefined && data.RunId !== null) {
3560
+ if (data.RunId != null) {
3966
3561
  contents.RunId = __expectString(data.RunId);
3967
3562
  }
3968
- return [2, Promise.resolve(contents)];
3563
+ return [2, contents];
3969
3564
  }
3970
3565
  });
3971
3566
  }); };
3972
3567
  var deserializeAws_restJson1StopJobRunCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
3973
- var parsedOutput, _a, response, errorCode, _b, parsedBody, $metadata, statusCode;
3568
+ var parsedOutput, _a, errorCode, _b, parsedBody;
3974
3569
  var _c;
3975
3570
  return __generator(this, function (_d) {
3976
3571
  switch (_d.label) {
@@ -3995,14 +3590,14 @@ var deserializeAws_restJson1StopJobRunCommandError = function (output, context)
3995
3590
  case 5: throw _d.sent();
3996
3591
  case 6:
3997
3592
  parsedBody = parsedOutput.body;
3998
- $metadata = deserializeMetadata(output);
3999
- statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
4000
- response = new __BaseException({
4001
- name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
4002
- $fault: "client",
4003
- $metadata: $metadata,
3593
+ throwDefaultError({
3594
+ output: output,
3595
+ parsedBody: parsedBody,
3596
+ exceptionCtor: __BaseException,
3597
+ errorCode: errorCode,
4004
3598
  });
4005
- throw __decorateServiceException(response, parsedBody);
3599
+ _d.label = 7;
3600
+ case 7: return [2];
4006
3601
  }
4007
3602
  });
4008
3603
  }); };
@@ -4014,18 +3609,18 @@ export var deserializeAws_restJson1TagResourceCommand = function (output, contex
4014
3609
  if (output.statusCode !== 200 && output.statusCode >= 300) {
4015
3610
  return [2, deserializeAws_restJson1TagResourceCommandError(output, context)];
4016
3611
  }
4017
- contents = {
3612
+ contents = map({
4018
3613
  $metadata: deserializeMetadata(output),
4019
- };
3614
+ });
4020
3615
  return [4, collectBody(output.body, context)];
4021
3616
  case 1:
4022
3617
  _a.sent();
4023
- return [2, Promise.resolve(contents)];
3618
+ return [2, contents];
4024
3619
  }
4025
3620
  });
4026
3621
  }); };
4027
3622
  var deserializeAws_restJson1TagResourceCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
4028
- var parsedOutput, _a, response, errorCode, _b, parsedBody, $metadata, statusCode;
3623
+ var parsedOutput, _a, errorCode, _b, parsedBody;
4029
3624
  var _c;
4030
3625
  return __generator(this, function (_d) {
4031
3626
  switch (_d.label) {
@@ -4054,14 +3649,14 @@ var deserializeAws_restJson1TagResourceCommandError = function (output, context)
4054
3649
  case 7: throw _d.sent();
4055
3650
  case 8:
4056
3651
  parsedBody = parsedOutput.body;
4057
- $metadata = deserializeMetadata(output);
4058
- statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
4059
- response = new __BaseException({
4060
- name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
4061
- $fault: "client",
4062
- $metadata: $metadata,
3652
+ throwDefaultError({
3653
+ output: output,
3654
+ parsedBody: parsedBody,
3655
+ exceptionCtor: __BaseException,
3656
+ errorCode: errorCode,
4063
3657
  });
4064
- throw __decorateServiceException(response, parsedBody);
3658
+ _d.label = 9;
3659
+ case 9: return [2];
4065
3660
  }
4066
3661
  });
4067
3662
  }); };
@@ -4073,18 +3668,18 @@ export var deserializeAws_restJson1UntagResourceCommand = function (output, cont
4073
3668
  if (output.statusCode !== 200 && output.statusCode >= 300) {
4074
3669
  return [2, deserializeAws_restJson1UntagResourceCommandError(output, context)];
4075
3670
  }
4076
- contents = {
3671
+ contents = map({
4077
3672
  $metadata: deserializeMetadata(output),
4078
- };
3673
+ });
4079
3674
  return [4, collectBody(output.body, context)];
4080
3675
  case 1:
4081
3676
  _a.sent();
4082
- return [2, Promise.resolve(contents)];
3677
+ return [2, contents];
4083
3678
  }
4084
3679
  });
4085
3680
  }); };
4086
3681
  var deserializeAws_restJson1UntagResourceCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
4087
- var parsedOutput, _a, response, errorCode, _b, parsedBody, $metadata, statusCode;
3682
+ var parsedOutput, _a, errorCode, _b, parsedBody;
4088
3683
  var _c;
4089
3684
  return __generator(this, function (_d) {
4090
3685
  switch (_d.label) {
@@ -4113,14 +3708,14 @@ var deserializeAws_restJson1UntagResourceCommandError = function (output, contex
4113
3708
  case 7: throw _d.sent();
4114
3709
  case 8:
4115
3710
  parsedBody = parsedOutput.body;
4116
- $metadata = deserializeMetadata(output);
4117
- statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
4118
- response = new __BaseException({
4119
- name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
4120
- $fault: "client",
4121
- $metadata: $metadata,
3711
+ throwDefaultError({
3712
+ output: output,
3713
+ parsedBody: parsedBody,
3714
+ exceptionCtor: __BaseException,
3715
+ errorCode: errorCode,
4122
3716
  });
4123
- throw __decorateServiceException(response, parsedBody);
3717
+ _d.label = 9;
3718
+ case 9: return [2];
4124
3719
  }
4125
3720
  });
4126
3721
  }); };
@@ -4132,24 +3727,23 @@ export var deserializeAws_restJson1UpdateDatasetCommand = function (output, cont
4132
3727
  if (output.statusCode !== 200 && output.statusCode >= 300) {
4133
3728
  return [2, deserializeAws_restJson1UpdateDatasetCommandError(output, context)];
4134
3729
  }
4135
- contents = {
3730
+ contents = map({
4136
3731
  $metadata: deserializeMetadata(output),
4137
- Name: undefined,
4138
- };
3732
+ });
4139
3733
  _a = __expectNonNull;
4140
3734
  _b = __expectObject;
4141
3735
  return [4, parseBody(output.body, context)];
4142
3736
  case 1:
4143
3737
  data = _a.apply(void 0, [_b.apply(void 0, [_c.sent()]), "body"]);
4144
- if (data.Name !== undefined && data.Name !== null) {
3738
+ if (data.Name != null) {
4145
3739
  contents.Name = __expectString(data.Name);
4146
3740
  }
4147
- return [2, Promise.resolve(contents)];
3741
+ return [2, contents];
4148
3742
  }
4149
3743
  });
4150
3744
  }); };
4151
3745
  var deserializeAws_restJson1UpdateDatasetCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
4152
- var parsedOutput, _a, response, errorCode, _b, parsedBody, $metadata, statusCode;
3746
+ var parsedOutput, _a, errorCode, _b, parsedBody;
4153
3747
  var _c;
4154
3748
  return __generator(this, function (_d) {
4155
3749
  switch (_d.label) {
@@ -4178,14 +3772,14 @@ var deserializeAws_restJson1UpdateDatasetCommandError = function (output, contex
4178
3772
  case 7: throw _d.sent();
4179
3773
  case 8:
4180
3774
  parsedBody = parsedOutput.body;
4181
- $metadata = deserializeMetadata(output);
4182
- statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
4183
- response = new __BaseException({
4184
- name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
4185
- $fault: "client",
4186
- $metadata: $metadata,
3775
+ throwDefaultError({
3776
+ output: output,
3777
+ parsedBody: parsedBody,
3778
+ exceptionCtor: __BaseException,
3779
+ errorCode: errorCode,
4187
3780
  });
4188
- throw __decorateServiceException(response, parsedBody);
3781
+ _d.label = 9;
3782
+ case 9: return [2];
4189
3783
  }
4190
3784
  });
4191
3785
  }); };
@@ -4197,24 +3791,23 @@ export var deserializeAws_restJson1UpdateProfileJobCommand = function (output, c
4197
3791
  if (output.statusCode !== 200 && output.statusCode >= 300) {
4198
3792
  return [2, deserializeAws_restJson1UpdateProfileJobCommandError(output, context)];
4199
3793
  }
4200
- contents = {
3794
+ contents = map({
4201
3795
  $metadata: deserializeMetadata(output),
4202
- Name: undefined,
4203
- };
3796
+ });
4204
3797
  _a = __expectNonNull;
4205
3798
  _b = __expectObject;
4206
3799
  return [4, parseBody(output.body, context)];
4207
3800
  case 1:
4208
3801
  data = _a.apply(void 0, [_b.apply(void 0, [_c.sent()]), "body"]);
4209
- if (data.Name !== undefined && data.Name !== null) {
3802
+ if (data.Name != null) {
4210
3803
  contents.Name = __expectString(data.Name);
4211
3804
  }
4212
- return [2, Promise.resolve(contents)];
3805
+ return [2, contents];
4213
3806
  }
4214
3807
  });
4215
3808
  }); };
4216
3809
  var deserializeAws_restJson1UpdateProfileJobCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
4217
- var parsedOutput, _a, response, errorCode, _b, parsedBody, $metadata, statusCode;
3810
+ var parsedOutput, _a, errorCode, _b, parsedBody;
4218
3811
  var _c;
4219
3812
  return __generator(this, function (_d) {
4220
3813
  switch (_d.label) {
@@ -4243,14 +3836,14 @@ var deserializeAws_restJson1UpdateProfileJobCommandError = function (output, con
4243
3836
  case 7: throw _d.sent();
4244
3837
  case 8:
4245
3838
  parsedBody = parsedOutput.body;
4246
- $metadata = deserializeMetadata(output);
4247
- statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
4248
- response = new __BaseException({
4249
- name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
4250
- $fault: "client",
4251
- $metadata: $metadata,
3839
+ throwDefaultError({
3840
+ output: output,
3841
+ parsedBody: parsedBody,
3842
+ exceptionCtor: __BaseException,
3843
+ errorCode: errorCode,
4252
3844
  });
4253
- throw __decorateServiceException(response, parsedBody);
3845
+ _d.label = 9;
3846
+ case 9: return [2];
4254
3847
  }
4255
3848
  });
4256
3849
  }); };
@@ -4262,28 +3855,26 @@ export var deserializeAws_restJson1UpdateProjectCommand = function (output, cont
4262
3855
  if (output.statusCode !== 200 && output.statusCode >= 300) {
4263
3856
  return [2, deserializeAws_restJson1UpdateProjectCommandError(output, context)];
4264
3857
  }
4265
- contents = {
3858
+ contents = map({
4266
3859
  $metadata: deserializeMetadata(output),
4267
- LastModifiedDate: undefined,
4268
- Name: undefined,
4269
- };
3860
+ });
4270
3861
  _a = __expectNonNull;
4271
3862
  _b = __expectObject;
4272
3863
  return [4, parseBody(output.body, context)];
4273
3864
  case 1:
4274
3865
  data = _a.apply(void 0, [_b.apply(void 0, [_c.sent()]), "body"]);
4275
- if (data.LastModifiedDate !== undefined && data.LastModifiedDate !== null) {
3866
+ if (data.LastModifiedDate != null) {
4276
3867
  contents.LastModifiedDate = __expectNonNull(__parseEpochTimestamp(__expectNumber(data.LastModifiedDate)));
4277
3868
  }
4278
- if (data.Name !== undefined && data.Name !== null) {
3869
+ if (data.Name != null) {
4279
3870
  contents.Name = __expectString(data.Name);
4280
3871
  }
4281
- return [2, Promise.resolve(contents)];
3872
+ return [2, contents];
4282
3873
  }
4283
3874
  });
4284
3875
  }); };
4285
3876
  var deserializeAws_restJson1UpdateProjectCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
4286
- var parsedOutput, _a, response, errorCode, _b, parsedBody, $metadata, statusCode;
3877
+ var parsedOutput, _a, errorCode, _b, parsedBody;
4287
3878
  var _c;
4288
3879
  return __generator(this, function (_d) {
4289
3880
  switch (_d.label) {
@@ -4308,14 +3899,14 @@ var deserializeAws_restJson1UpdateProjectCommandError = function (output, contex
4308
3899
  case 5: throw _d.sent();
4309
3900
  case 6:
4310
3901
  parsedBody = parsedOutput.body;
4311
- $metadata = deserializeMetadata(output);
4312
- statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
4313
- response = new __BaseException({
4314
- name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
4315
- $fault: "client",
4316
- $metadata: $metadata,
3902
+ throwDefaultError({
3903
+ output: output,
3904
+ parsedBody: parsedBody,
3905
+ exceptionCtor: __BaseException,
3906
+ errorCode: errorCode,
4317
3907
  });
4318
- throw __decorateServiceException(response, parsedBody);
3908
+ _d.label = 7;
3909
+ case 7: return [2];
4319
3910
  }
4320
3911
  });
4321
3912
  }); };
@@ -4327,24 +3918,23 @@ export var deserializeAws_restJson1UpdateRecipeCommand = function (output, conte
4327
3918
  if (output.statusCode !== 200 && output.statusCode >= 300) {
4328
3919
  return [2, deserializeAws_restJson1UpdateRecipeCommandError(output, context)];
4329
3920
  }
4330
- contents = {
3921
+ contents = map({
4331
3922
  $metadata: deserializeMetadata(output),
4332
- Name: undefined,
4333
- };
3923
+ });
4334
3924
  _a = __expectNonNull;
4335
3925
  _b = __expectObject;
4336
3926
  return [4, parseBody(output.body, context)];
4337
3927
  case 1:
4338
3928
  data = _a.apply(void 0, [_b.apply(void 0, [_c.sent()]), "body"]);
4339
- if (data.Name !== undefined && data.Name !== null) {
3929
+ if (data.Name != null) {
4340
3930
  contents.Name = __expectString(data.Name);
4341
3931
  }
4342
- return [2, Promise.resolve(contents)];
3932
+ return [2, contents];
4343
3933
  }
4344
3934
  });
4345
3935
  }); };
4346
3936
  var deserializeAws_restJson1UpdateRecipeCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
4347
- var parsedOutput, _a, response, errorCode, _b, parsedBody, $metadata, statusCode;
3937
+ var parsedOutput, _a, errorCode, _b, parsedBody;
4348
3938
  var _c;
4349
3939
  return __generator(this, function (_d) {
4350
3940
  switch (_d.label) {
@@ -4369,14 +3959,14 @@ var deserializeAws_restJson1UpdateRecipeCommandError = function (output, context
4369
3959
  case 5: throw _d.sent();
4370
3960
  case 6:
4371
3961
  parsedBody = parsedOutput.body;
4372
- $metadata = deserializeMetadata(output);
4373
- statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
4374
- response = new __BaseException({
4375
- name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
4376
- $fault: "client",
4377
- $metadata: $metadata,
3962
+ throwDefaultError({
3963
+ output: output,
3964
+ parsedBody: parsedBody,
3965
+ exceptionCtor: __BaseException,
3966
+ errorCode: errorCode,
4378
3967
  });
4379
- throw __decorateServiceException(response, parsedBody);
3968
+ _d.label = 7;
3969
+ case 7: return [2];
4380
3970
  }
4381
3971
  });
4382
3972
  }); };
@@ -4388,24 +3978,23 @@ export var deserializeAws_restJson1UpdateRecipeJobCommand = function (output, co
4388
3978
  if (output.statusCode !== 200 && output.statusCode >= 300) {
4389
3979
  return [2, deserializeAws_restJson1UpdateRecipeJobCommandError(output, context)];
4390
3980
  }
4391
- contents = {
3981
+ contents = map({
4392
3982
  $metadata: deserializeMetadata(output),
4393
- Name: undefined,
4394
- };
3983
+ });
4395
3984
  _a = __expectNonNull;
4396
3985
  _b = __expectObject;
4397
3986
  return [4, parseBody(output.body, context)];
4398
3987
  case 1:
4399
3988
  data = _a.apply(void 0, [_b.apply(void 0, [_c.sent()]), "body"]);
4400
- if (data.Name !== undefined && data.Name !== null) {
3989
+ if (data.Name != null) {
4401
3990
  contents.Name = __expectString(data.Name);
4402
3991
  }
4403
- return [2, Promise.resolve(contents)];
3992
+ return [2, contents];
4404
3993
  }
4405
3994
  });
4406
3995
  }); };
4407
3996
  var deserializeAws_restJson1UpdateRecipeJobCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
4408
- var parsedOutput, _a, response, errorCode, _b, parsedBody, $metadata, statusCode;
3997
+ var parsedOutput, _a, errorCode, _b, parsedBody;
4409
3998
  var _c;
4410
3999
  return __generator(this, function (_d) {
4411
4000
  switch (_d.label) {
@@ -4434,14 +4023,14 @@ var deserializeAws_restJson1UpdateRecipeJobCommandError = function (output, cont
4434
4023
  case 7: throw _d.sent();
4435
4024
  case 8:
4436
4025
  parsedBody = parsedOutput.body;
4437
- $metadata = deserializeMetadata(output);
4438
- statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
4439
- response = new __BaseException({
4440
- name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
4441
- $fault: "client",
4442
- $metadata: $metadata,
4026
+ throwDefaultError({
4027
+ output: output,
4028
+ parsedBody: parsedBody,
4029
+ exceptionCtor: __BaseException,
4030
+ errorCode: errorCode,
4443
4031
  });
4444
- throw __decorateServiceException(response, parsedBody);
4032
+ _d.label = 9;
4033
+ case 9: return [2];
4445
4034
  }
4446
4035
  });
4447
4036
  }); };
@@ -4453,24 +4042,23 @@ export var deserializeAws_restJson1UpdateRulesetCommand = function (output, cont
4453
4042
  if (output.statusCode !== 200 && output.statusCode >= 300) {
4454
4043
  return [2, deserializeAws_restJson1UpdateRulesetCommandError(output, context)];
4455
4044
  }
4456
- contents = {
4045
+ contents = map({
4457
4046
  $metadata: deserializeMetadata(output),
4458
- Name: undefined,
4459
- };
4047
+ });
4460
4048
  _a = __expectNonNull;
4461
4049
  _b = __expectObject;
4462
4050
  return [4, parseBody(output.body, context)];
4463
4051
  case 1:
4464
4052
  data = _a.apply(void 0, [_b.apply(void 0, [_c.sent()]), "body"]);
4465
- if (data.Name !== undefined && data.Name !== null) {
4053
+ if (data.Name != null) {
4466
4054
  contents.Name = __expectString(data.Name);
4467
4055
  }
4468
- return [2, Promise.resolve(contents)];
4056
+ return [2, contents];
4469
4057
  }
4470
4058
  });
4471
4059
  }); };
4472
4060
  var deserializeAws_restJson1UpdateRulesetCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
4473
- var parsedOutput, _a, response, errorCode, _b, parsedBody, $metadata, statusCode;
4061
+ var parsedOutput, _a, errorCode, _b, parsedBody;
4474
4062
  var _c;
4475
4063
  return __generator(this, function (_d) {
4476
4064
  switch (_d.label) {
@@ -4495,14 +4083,14 @@ var deserializeAws_restJson1UpdateRulesetCommandError = function (output, contex
4495
4083
  case 5: throw _d.sent();
4496
4084
  case 6:
4497
4085
  parsedBody = parsedOutput.body;
4498
- $metadata = deserializeMetadata(output);
4499
- statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
4500
- response = new __BaseException({
4501
- name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
4502
- $fault: "client",
4503
- $metadata: $metadata,
4086
+ throwDefaultError({
4087
+ output: output,
4088
+ parsedBody: parsedBody,
4089
+ exceptionCtor: __BaseException,
4090
+ errorCode: errorCode,
4504
4091
  });
4505
- throw __decorateServiceException(response, parsedBody);
4092
+ _d.label = 7;
4093
+ case 7: return [2];
4506
4094
  }
4507
4095
  });
4508
4096
  }); };
@@ -4514,24 +4102,23 @@ export var deserializeAws_restJson1UpdateScheduleCommand = function (output, con
4514
4102
  if (output.statusCode !== 200 && output.statusCode >= 300) {
4515
4103
  return [2, deserializeAws_restJson1UpdateScheduleCommandError(output, context)];
4516
4104
  }
4517
- contents = {
4105
+ contents = map({
4518
4106
  $metadata: deserializeMetadata(output),
4519
- Name: undefined,
4520
- };
4107
+ });
4521
4108
  _a = __expectNonNull;
4522
4109
  _b = __expectObject;
4523
4110
  return [4, parseBody(output.body, context)];
4524
4111
  case 1:
4525
4112
  data = _a.apply(void 0, [_b.apply(void 0, [_c.sent()]), "body"]);
4526
- if (data.Name !== undefined && data.Name !== null) {
4113
+ if (data.Name != null) {
4527
4114
  contents.Name = __expectString(data.Name);
4528
4115
  }
4529
- return [2, Promise.resolve(contents)];
4116
+ return [2, contents];
4530
4117
  }
4531
4118
  });
4532
4119
  }); };
4533
4120
  var deserializeAws_restJson1UpdateScheduleCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
4534
- var parsedOutput, _a, response, errorCode, _b, parsedBody, $metadata, statusCode;
4121
+ var parsedOutput, _a, errorCode, _b, parsedBody;
4535
4122
  var _c;
4536
4123
  return __generator(this, function (_d) {
4537
4124
  switch (_d.label) {
@@ -4560,23 +4147,24 @@ var deserializeAws_restJson1UpdateScheduleCommandError = function (output, conte
4560
4147
  case 7: throw _d.sent();
4561
4148
  case 8:
4562
4149
  parsedBody = parsedOutput.body;
4563
- $metadata = deserializeMetadata(output);
4564
- statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
4565
- response = new __BaseException({
4566
- name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
4567
- $fault: "client",
4568
- $metadata: $metadata,
4150
+ throwDefaultError({
4151
+ output: output,
4152
+ parsedBody: parsedBody,
4153
+ exceptionCtor: __BaseException,
4154
+ errorCode: errorCode,
4569
4155
  });
4570
- throw __decorateServiceException(response, parsedBody);
4156
+ _d.label = 9;
4157
+ case 9: return [2];
4571
4158
  }
4572
4159
  });
4573
4160
  }); };
4161
+ var map = __map;
4574
4162
  var deserializeAws_restJson1AccessDeniedExceptionResponse = function (parsedOutput, context) { return __awaiter(void 0, void 0, void 0, function () {
4575
4163
  var contents, data, exception;
4576
4164
  return __generator(this, function (_a) {
4577
- contents = {};
4165
+ contents = map({});
4578
4166
  data = parsedOutput.body;
4579
- if (data.Message !== undefined && data.Message !== null) {
4167
+ if (data.Message != null) {
4580
4168
  contents.Message = __expectString(data.Message);
4581
4169
  }
4582
4170
  exception = new AccessDeniedException(__assign({ $metadata: deserializeMetadata(parsedOutput) }, contents));
@@ -4586,9 +4174,9 @@ var deserializeAws_restJson1AccessDeniedExceptionResponse = function (parsedOutp
4586
4174
  var deserializeAws_restJson1ConflictExceptionResponse = function (parsedOutput, context) { return __awaiter(void 0, void 0, void 0, function () {
4587
4175
  var contents, data, exception;
4588
4176
  return __generator(this, function (_a) {
4589
- contents = {};
4177
+ contents = map({});
4590
4178
  data = parsedOutput.body;
4591
- if (data.Message !== undefined && data.Message !== null) {
4179
+ if (data.Message != null) {
4592
4180
  contents.Message = __expectString(data.Message);
4593
4181
  }
4594
4182
  exception = new ConflictException(__assign({ $metadata: deserializeMetadata(parsedOutput) }, contents));
@@ -4598,9 +4186,9 @@ var deserializeAws_restJson1ConflictExceptionResponse = function (parsedOutput,
4598
4186
  var deserializeAws_restJson1InternalServerExceptionResponse = function (parsedOutput, context) { return __awaiter(void 0, void 0, void 0, function () {
4599
4187
  var contents, data, exception;
4600
4188
  return __generator(this, function (_a) {
4601
- contents = {};
4189
+ contents = map({});
4602
4190
  data = parsedOutput.body;
4603
- if (data.Message !== undefined && data.Message !== null) {
4191
+ if (data.Message != null) {
4604
4192
  contents.Message = __expectString(data.Message);
4605
4193
  }
4606
4194
  exception = new InternalServerException(__assign({ $metadata: deserializeMetadata(parsedOutput) }, contents));
@@ -4610,9 +4198,9 @@ var deserializeAws_restJson1InternalServerExceptionResponse = function (parsedOu
4610
4198
  var deserializeAws_restJson1ResourceNotFoundExceptionResponse = function (parsedOutput, context) { return __awaiter(void 0, void 0, void 0, function () {
4611
4199
  var contents, data, exception;
4612
4200
  return __generator(this, function (_a) {
4613
- contents = {};
4201
+ contents = map({});
4614
4202
  data = parsedOutput.body;
4615
- if (data.Message !== undefined && data.Message !== null) {
4203
+ if (data.Message != null) {
4616
4204
  contents.Message = __expectString(data.Message);
4617
4205
  }
4618
4206
  exception = new ResourceNotFoundException(__assign({ $metadata: deserializeMetadata(parsedOutput) }, contents));
@@ -4622,9 +4210,9 @@ var deserializeAws_restJson1ResourceNotFoundExceptionResponse = function (parsed
4622
4210
  var deserializeAws_restJson1ServiceQuotaExceededExceptionResponse = function (parsedOutput, context) { return __awaiter(void 0, void 0, void 0, function () {
4623
4211
  var contents, data, exception;
4624
4212
  return __generator(this, function (_a) {
4625
- contents = {};
4213
+ contents = map({});
4626
4214
  data = parsedOutput.body;
4627
- if (data.Message !== undefined && data.Message !== null) {
4215
+ if (data.Message != null) {
4628
4216
  contents.Message = __expectString(data.Message);
4629
4217
  }
4630
4218
  exception = new ServiceQuotaExceededException(__assign({ $metadata: deserializeMetadata(parsedOutput) }, contents));
@@ -4634,9 +4222,9 @@ var deserializeAws_restJson1ServiceQuotaExceededExceptionResponse = function (pa
4634
4222
  var deserializeAws_restJson1ValidationExceptionResponse = function (parsedOutput, context) { return __awaiter(void 0, void 0, void 0, function () {
4635
4223
  var contents, data, exception;
4636
4224
  return __generator(this, function (_a) {
4637
- contents = {};
4225
+ contents = map({});
4638
4226
  data = parsedOutput.body;
4639
- if (data.Message !== undefined && data.Message !== null) {
4227
+ if (data.Message != null) {
4640
4228
  contents.Message = __expectString(data.Message);
4641
4229
  }
4642
4230
  exception = new ValidationException(__assign({ $metadata: deserializeMetadata(parsedOutput) }, contents));
@@ -4647,9 +4235,6 @@ var serializeAws_restJson1AllowedStatisticList = function (input, context) {
4647
4235
  return input
4648
4236
  .filter(function (e) { return e != null; })
4649
4237
  .map(function (entry) {
4650
- if (entry === null) {
4651
- return null;
4652
- }
4653
4238
  return serializeAws_restJson1AllowedStatistics(entry, context);
4654
4239
  });
4655
4240
  };
@@ -4660,9 +4245,6 @@ var serializeAws_restJson1ColumnNameList = function (input, context) {
4660
4245
  return input
4661
4246
  .filter(function (e) { return e != null; })
4662
4247
  .map(function (entry) {
4663
- if (entry === null) {
4664
- return null;
4665
- }
4666
4248
  return entry;
4667
4249
  });
4668
4250
  };
@@ -4673,9 +4255,6 @@ var serializeAws_restJson1ColumnSelectorList = function (input, context) {
4673
4255
  return input
4674
4256
  .filter(function (e) { return e != null; })
4675
4257
  .map(function (entry) {
4676
- if (entry === null) {
4677
- return null;
4678
- }
4679
4258
  return serializeAws_restJson1ColumnSelector(entry, context);
4680
4259
  });
4681
4260
  };
@@ -4688,9 +4267,6 @@ var serializeAws_restJson1ColumnStatisticsConfigurationList = function (input, c
4688
4267
  return input
4689
4268
  .filter(function (e) { return e != null; })
4690
4269
  .map(function (entry) {
4691
- if (entry === null) {
4692
- return null;
4693
- }
4694
4270
  return serializeAws_restJson1ColumnStatisticsConfiguration(entry, context);
4695
4271
  });
4696
4272
  };
@@ -4701,9 +4277,6 @@ var serializeAws_restJson1ConditionExpressionList = function (input, context) {
4701
4277
  return input
4702
4278
  .filter(function (e) { return e != null; })
4703
4279
  .map(function (entry) {
4704
- if (entry === null) {
4705
- return null;
4706
- }
4707
4280
  return serializeAws_restJson1ConditionExpression(entry, context);
4708
4281
  });
4709
4282
  };
@@ -4727,9 +4300,6 @@ var serializeAws_restJson1DatabaseOutputList = function (input, context) {
4727
4300
  return input
4728
4301
  .filter(function (e) { return e != null; })
4729
4302
  .map(function (entry) {
4730
- if (entry === null) {
4731
- return null;
4732
- }
4733
4303
  return serializeAws_restJson1DatabaseOutput(entry, context);
4734
4304
  });
4735
4305
  };
@@ -4752,9 +4322,6 @@ var serializeAws_restJson1DataCatalogOutputList = function (input, context) {
4752
4322
  return input
4753
4323
  .filter(function (e) { return e != null; })
4754
4324
  .map(function (entry) {
4755
- if (entry === null) {
4756
- return null;
4757
- }
4758
4325
  return serializeAws_restJson1DataCatalogOutput(entry, context);
4759
4326
  });
4760
4327
  };
@@ -4775,9 +4342,6 @@ var serializeAws_restJson1EntityTypeList = function (input, context) {
4775
4342
  return input
4776
4343
  .filter(function (e) { return e != null; })
4777
4344
  .map(function (entry) {
4778
- if (entry === null) {
4779
- return null;
4780
- }
4781
4345
  return entry;
4782
4346
  });
4783
4347
  };
@@ -4799,9 +4363,6 @@ var serializeAws_restJson1HiddenColumnList = function (input, context) {
4799
4363
  return input
4800
4364
  .filter(function (e) { return e != null; })
4801
4365
  .map(function (entry) {
4802
- if (entry === null) {
4803
- return null;
4804
- }
4805
4366
  return entry;
4806
4367
  });
4807
4368
  };
@@ -4818,9 +4379,6 @@ var serializeAws_restJson1JobNameList = function (input, context) {
4818
4379
  return input
4819
4380
  .filter(function (e) { return e != null; })
4820
4381
  .map(function (entry) {
4821
- if (entry === null) {
4822
- return null;
4823
- }
4824
4382
  return entry;
4825
4383
  });
4826
4384
  };
@@ -4847,9 +4405,6 @@ var serializeAws_restJson1OutputList = function (input, context) {
4847
4405
  return input
4848
4406
  .filter(function (e) { return e != null; })
4849
4407
  .map(function (entry) {
4850
- if (entry === null) {
4851
- return null;
4852
- }
4853
4408
  return serializeAws_restJson1Output(entry, context);
4854
4409
  });
4855
4410
  };
@@ -4904,9 +4459,6 @@ var serializeAws_restJson1RecipeStepList = function (input, context) {
4904
4459
  return input
4905
4460
  .filter(function (e) { return e != null; })
4906
4461
  .map(function (entry) {
4907
- if (entry === null) {
4908
- return null;
4909
- }
4910
4462
  return serializeAws_restJson1RecipeStep(entry, context);
4911
4463
  });
4912
4464
  };
@@ -4914,9 +4466,6 @@ var serializeAws_restJson1RecipeVersionList = function (input, context) {
4914
4466
  return input
4915
4467
  .filter(function (e) { return e != null; })
4916
4468
  .map(function (entry) {
4917
- if (entry === null) {
4918
- return null;
4919
- }
4920
4469
  return entry;
4921
4470
  });
4922
4471
  };
@@ -4931,9 +4480,6 @@ var serializeAws_restJson1RuleList = function (input, context) {
4931
4480
  return input
4932
4481
  .filter(function (e) { return e != null; })
4933
4482
  .map(function (entry) {
4934
- if (entry === null) {
4935
- return null;
4936
- }
4937
4483
  return serializeAws_restJson1Rule(entry, context);
4938
4484
  });
4939
4485
  };
@@ -4950,9 +4496,6 @@ var serializeAws_restJson1SheetIndexList = function (input, context) {
4950
4496
  return input
4951
4497
  .filter(function (e) { return e != null; })
4952
4498
  .map(function (entry) {
4953
- if (entry === null) {
4954
- return null;
4955
- }
4956
4499
  return entry;
4957
4500
  });
4958
4501
  };
@@ -4960,9 +4503,6 @@ var serializeAws_restJson1SheetNameList = function (input, context) {
4960
4503
  return input
4961
4504
  .filter(function (e) { return e != null; })
4962
4505
  .map(function (entry) {
4963
- if (entry === null) {
4964
- return null;
4965
- }
4966
4506
  return entry;
4967
4507
  });
4968
4508
  };
@@ -4970,9 +4510,6 @@ var serializeAws_restJson1StatisticList = function (input, context) {
4970
4510
  return input
4971
4511
  .filter(function (e) { return e != null; })
4972
4512
  .map(function (entry) {
4973
- if (entry === null) {
4974
- return null;
4975
- }
4976
4513
  return entry;
4977
4514
  });
4978
4515
  };
@@ -4983,9 +4520,6 @@ var serializeAws_restJson1StatisticOverrideList = function (input, context) {
4983
4520
  return input
4984
4521
  .filter(function (e) { return e != null; })
4985
4522
  .map(function (entry) {
4986
- if (entry === null) {
4987
- return null;
4988
- }
4989
4523
  return serializeAws_restJson1StatisticOverride(entry, context);
4990
4524
  });
4991
4525
  };
@@ -5016,9 +4550,6 @@ var serializeAws_restJson1ValidationConfigurationList = function (input, context
5016
4550
  return input
5017
4551
  .filter(function (e) { return e != null; })
5018
4552
  .map(function (entry) {
5019
- if (entry === null) {
5020
- return null;
5021
- }
5022
4553
  return serializeAws_restJson1ValidationConfiguration(entry, context);
5023
4554
  });
5024
4555
  };