@aws-sdk/client-emr-serverless 3.311.0 → 3.315.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.
@@ -32,35 +32,21 @@ const se_CreateApplicationCommand = async (input, context) => {
32
32
  };
33
33
  const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/applications";
34
34
  let body;
35
- body = JSON.stringify({
36
- ...(input.architecture != null && { architecture: input.architecture }),
37
- ...(input.autoStartConfiguration != null && {
38
- autoStartConfiguration: se_AutoStartConfig(input.autoStartConfiguration, context),
39
- }),
40
- ...(input.autoStopConfiguration != null && {
41
- autoStopConfiguration: se_AutoStopConfig(input.autoStopConfiguration, context),
42
- }),
43
- clientToken: input.clientToken ?? (0, uuid_1.v4)(),
44
- ...(input.imageConfiguration != null && {
45
- imageConfiguration: se_ImageConfigurationInput(input.imageConfiguration, context),
46
- }),
47
- ...(input.initialCapacity != null && {
48
- initialCapacity: se_InitialCapacityConfigMap(input.initialCapacity, context),
49
- }),
50
- ...(input.maximumCapacity != null && {
51
- maximumCapacity: se_MaximumAllowedResources(input.maximumCapacity, context),
52
- }),
53
- ...(input.name != null && { name: input.name }),
54
- ...(input.networkConfiguration != null && {
55
- networkConfiguration: se_NetworkConfiguration(input.networkConfiguration, context),
56
- }),
57
- ...(input.releaseLabel != null && { releaseLabel: input.releaseLabel }),
58
- ...(input.tags != null && { tags: se_TagMap(input.tags, context) }),
59
- ...(input.type != null && { type: input.type }),
60
- ...(input.workerTypeSpecifications != null && {
61
- workerTypeSpecifications: se_WorkerTypeSpecificationInputMap(input.workerTypeSpecifications, context),
62
- }),
63
- });
35
+ body = JSON.stringify((0, smithy_client_1.take)(input, {
36
+ architecture: [],
37
+ autoStartConfiguration: (_) => (0, smithy_client_1._json)(_),
38
+ autoStopConfiguration: (_) => (0, smithy_client_1._json)(_),
39
+ clientToken: (_) => _ ?? (0, uuid_1.v4)(),
40
+ imageConfiguration: (_) => (0, smithy_client_1._json)(_),
41
+ initialCapacity: (_) => (0, smithy_client_1._json)(_),
42
+ maximumCapacity: (_) => (0, smithy_client_1._json)(_),
43
+ name: [],
44
+ networkConfiguration: (_) => (0, smithy_client_1._json)(_),
45
+ releaseLabel: [],
46
+ tags: (_) => (0, smithy_client_1._json)(_),
47
+ type: [],
48
+ workerTypeSpecifications: (_) => (0, smithy_client_1._json)(_),
49
+ }));
64
50
  return new protocol_http_1.HttpRequest({
65
51
  protocol,
66
52
  hostname,
@@ -148,7 +134,7 @@ const se_ListApplicationsCommand = async (input, context) => {
148
134
  const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
149
135
  const headers = {};
150
136
  const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/applications";
151
- const query = map({
137
+ const query = (0, smithy_client_1.map)({
152
138
  nextToken: [, input.nextToken],
153
139
  maxResults: [() => input.maxResults !== void 0, () => input.maxResults.toString()],
154
140
  states: [() => input.states !== void 0, () => (input.states || []).map((_entry) => _entry)],
@@ -171,7 +157,7 @@ const se_ListJobRunsCommand = async (input, context) => {
171
157
  const headers = {};
172
158
  let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/applications/{applicationId}/jobruns";
173
159
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "applicationId", () => input.applicationId, "{applicationId}", false);
174
- const query = map({
160
+ const query = (0, smithy_client_1.map)({
175
161
  nextToken: [, input.nextToken],
176
162
  maxResults: [() => input.maxResults !== void 0, () => input.maxResults.toString()],
177
163
  createdAtAfter: [
@@ -239,17 +225,15 @@ const se_StartJobRunCommand = async (input, context) => {
239
225
  let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/applications/{applicationId}/jobruns";
240
226
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "applicationId", () => input.applicationId, "{applicationId}", false);
241
227
  let body;
242
- body = JSON.stringify({
243
- clientToken: input.clientToken ?? (0, uuid_1.v4)(),
244
- ...(input.configurationOverrides != null && {
245
- configurationOverrides: se_ConfigurationOverrides(input.configurationOverrides, context),
246
- }),
247
- ...(input.executionRoleArn != null && { executionRoleArn: input.executionRoleArn }),
248
- ...(input.executionTimeoutMinutes != null && { executionTimeoutMinutes: input.executionTimeoutMinutes }),
249
- ...(input.jobDriver != null && { jobDriver: se_JobDriver(input.jobDriver, context) }),
250
- ...(input.name != null && { name: input.name }),
251
- ...(input.tags != null && { tags: se_TagMap(input.tags, context) }),
252
- });
228
+ body = JSON.stringify((0, smithy_client_1.take)(input, {
229
+ clientToken: (_) => _ ?? (0, uuid_1.v4)(),
230
+ configurationOverrides: (_) => se_ConfigurationOverrides(_, context),
231
+ executionRoleArn: [],
232
+ executionTimeoutMinutes: [],
233
+ jobDriver: (_) => (0, smithy_client_1._json)(_),
234
+ name: [],
235
+ tags: (_) => (0, smithy_client_1._json)(_),
236
+ }));
253
237
  return new protocol_http_1.HttpRequest({
254
238
  protocol,
255
239
  hostname,
@@ -286,9 +270,9 @@ const se_TagResourceCommand = async (input, context) => {
286
270
  let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/tags/{resourceArn}";
287
271
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "resourceArn", () => input.resourceArn, "{resourceArn}", false);
288
272
  let body;
289
- body = JSON.stringify({
290
- ...(input.tags != null && { tags: se_TagMap(input.tags, context) }),
291
- });
273
+ body = JSON.stringify((0, smithy_client_1.take)(input, {
274
+ tags: (_) => (0, smithy_client_1._json)(_),
275
+ }));
292
276
  return new protocol_http_1.HttpRequest({
293
277
  protocol,
294
278
  hostname,
@@ -305,7 +289,7 @@ const se_UntagResourceCommand = async (input, context) => {
305
289
  const headers = {};
306
290
  let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/tags/{resourceArn}";
307
291
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "resourceArn", () => input.resourceArn, "{resourceArn}", false);
308
- const query = map({
292
+ const query = (0, smithy_client_1.map)({
309
293
  tagKeys: [
310
294
  (0, smithy_client_1.expectNonNull)(input.tagKeys, `tagKeys`) != null,
311
295
  () => (input.tagKeys || []).map((_entry) => _entry),
@@ -332,31 +316,17 @@ const se_UpdateApplicationCommand = async (input, context) => {
332
316
  let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/applications/{applicationId}";
333
317
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "applicationId", () => input.applicationId, "{applicationId}", false);
334
318
  let body;
335
- body = JSON.stringify({
336
- ...(input.architecture != null && { architecture: input.architecture }),
337
- ...(input.autoStartConfiguration != null && {
338
- autoStartConfiguration: se_AutoStartConfig(input.autoStartConfiguration, context),
339
- }),
340
- ...(input.autoStopConfiguration != null && {
341
- autoStopConfiguration: se_AutoStopConfig(input.autoStopConfiguration, context),
342
- }),
343
- clientToken: input.clientToken ?? (0, uuid_1.v4)(),
344
- ...(input.imageConfiguration != null && {
345
- imageConfiguration: se_ImageConfigurationInput(input.imageConfiguration, context),
346
- }),
347
- ...(input.initialCapacity != null && {
348
- initialCapacity: se_InitialCapacityConfigMap(input.initialCapacity, context),
349
- }),
350
- ...(input.maximumCapacity != null && {
351
- maximumCapacity: se_MaximumAllowedResources(input.maximumCapacity, context),
352
- }),
353
- ...(input.networkConfiguration != null && {
354
- networkConfiguration: se_NetworkConfiguration(input.networkConfiguration, context),
355
- }),
356
- ...(input.workerTypeSpecifications != null && {
357
- workerTypeSpecifications: se_WorkerTypeSpecificationInputMap(input.workerTypeSpecifications, context),
358
- }),
359
- });
319
+ body = JSON.stringify((0, smithy_client_1.take)(input, {
320
+ architecture: [],
321
+ autoStartConfiguration: (_) => (0, smithy_client_1._json)(_),
322
+ autoStopConfiguration: (_) => (0, smithy_client_1._json)(_),
323
+ clientToken: (_) => _ ?? (0, uuid_1.v4)(),
324
+ imageConfiguration: (_) => (0, smithy_client_1._json)(_),
325
+ initialCapacity: (_) => (0, smithy_client_1._json)(_),
326
+ maximumCapacity: (_) => (0, smithy_client_1._json)(_),
327
+ networkConfiguration: (_) => (0, smithy_client_1._json)(_),
328
+ workerTypeSpecifications: (_) => (0, smithy_client_1._json)(_),
329
+ }));
360
330
  return new protocol_http_1.HttpRequest({
361
331
  protocol,
362
332
  hostname,
@@ -372,16 +342,15 @@ const de_CancelJobRunCommand = async (output, context) => {
372
342
  if (output.statusCode !== 200 && output.statusCode >= 300) {
373
343
  return de_CancelJobRunCommandError(output, context);
374
344
  }
375
- const contents = map({
345
+ const contents = (0, smithy_client_1.map)({
376
346
  $metadata: deserializeMetadata(output),
377
347
  });
378
348
  const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
379
- if (data.applicationId != null) {
380
- contents.applicationId = (0, smithy_client_1.expectString)(data.applicationId);
381
- }
382
- if (data.jobRunId != null) {
383
- contents.jobRunId = (0, smithy_client_1.expectString)(data.jobRunId);
384
- }
349
+ const doc = (0, smithy_client_1.take)(data, {
350
+ applicationId: smithy_client_1.expectString,
351
+ jobRunId: smithy_client_1.expectString,
352
+ });
353
+ Object.assign(contents, doc);
385
354
  return contents;
386
355
  };
387
356
  exports.de_CancelJobRunCommand = de_CancelJobRunCommand;
@@ -403,10 +372,9 @@ const de_CancelJobRunCommandError = async (output, context) => {
403
372
  throw await de_ValidationExceptionRes(parsedOutput, context);
404
373
  default:
405
374
  const parsedBody = parsedOutput.body;
406
- (0, smithy_client_1.throwDefaultError)({
375
+ return throwDefaultError({
407
376
  output,
408
377
  parsedBody,
409
- exceptionCtor: EMRServerlessServiceException_1.EMRServerlessServiceException,
410
378
  errorCode,
411
379
  });
412
380
  }
@@ -415,19 +383,16 @@ const de_CreateApplicationCommand = async (output, context) => {
415
383
  if (output.statusCode !== 200 && output.statusCode >= 300) {
416
384
  return de_CreateApplicationCommandError(output, context);
417
385
  }
418
- const contents = map({
386
+ const contents = (0, smithy_client_1.map)({
419
387
  $metadata: deserializeMetadata(output),
420
388
  });
421
389
  const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
422
- if (data.applicationId != null) {
423
- contents.applicationId = (0, smithy_client_1.expectString)(data.applicationId);
424
- }
425
- if (data.arn != null) {
426
- contents.arn = (0, smithy_client_1.expectString)(data.arn);
427
- }
428
- if (data.name != null) {
429
- contents.name = (0, smithy_client_1.expectString)(data.name);
430
- }
390
+ const doc = (0, smithy_client_1.take)(data, {
391
+ applicationId: smithy_client_1.expectString,
392
+ arn: smithy_client_1.expectString,
393
+ name: smithy_client_1.expectString,
394
+ });
395
+ Object.assign(contents, doc);
431
396
  return contents;
432
397
  };
433
398
  exports.de_CreateApplicationCommand = de_CreateApplicationCommand;
@@ -452,10 +417,9 @@ const de_CreateApplicationCommandError = async (output, context) => {
452
417
  throw await de_ValidationExceptionRes(parsedOutput, context);
453
418
  default:
454
419
  const parsedBody = parsedOutput.body;
455
- (0, smithy_client_1.throwDefaultError)({
420
+ return throwDefaultError({
456
421
  output,
457
422
  parsedBody,
458
- exceptionCtor: EMRServerlessServiceException_1.EMRServerlessServiceException,
459
423
  errorCode,
460
424
  });
461
425
  }
@@ -464,7 +428,7 @@ const de_DeleteApplicationCommand = async (output, context) => {
464
428
  if (output.statusCode !== 200 && output.statusCode >= 300) {
465
429
  return de_DeleteApplicationCommandError(output, context);
466
430
  }
467
- const contents = map({
431
+ const contents = (0, smithy_client_1.map)({
468
432
  $metadata: deserializeMetadata(output),
469
433
  });
470
434
  await collectBody(output.body, context);
@@ -489,10 +453,9 @@ const de_DeleteApplicationCommandError = async (output, context) => {
489
453
  throw await de_ValidationExceptionRes(parsedOutput, context);
490
454
  default:
491
455
  const parsedBody = parsedOutput.body;
492
- (0, smithy_client_1.throwDefaultError)({
456
+ return throwDefaultError({
493
457
  output,
494
458
  parsedBody,
495
- exceptionCtor: EMRServerlessServiceException_1.EMRServerlessServiceException,
496
459
  errorCode,
497
460
  });
498
461
  }
@@ -501,13 +464,14 @@ const de_GetApplicationCommand = async (output, context) => {
501
464
  if (output.statusCode !== 200 && output.statusCode >= 300) {
502
465
  return de_GetApplicationCommandError(output, context);
503
466
  }
504
- const contents = map({
467
+ const contents = (0, smithy_client_1.map)({
505
468
  $metadata: deserializeMetadata(output),
506
469
  });
507
470
  const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
508
- if (data.application != null) {
509
- contents.application = de_Application(data.application, context);
510
- }
471
+ const doc = (0, smithy_client_1.take)(data, {
472
+ application: (_) => de_Application(_, context),
473
+ });
474
+ Object.assign(contents, doc);
511
475
  return contents;
512
476
  };
513
477
  exports.de_GetApplicationCommand = de_GetApplicationCommand;
@@ -529,10 +493,9 @@ const de_GetApplicationCommandError = async (output, context) => {
529
493
  throw await de_ValidationExceptionRes(parsedOutput, context);
530
494
  default:
531
495
  const parsedBody = parsedOutput.body;
532
- (0, smithy_client_1.throwDefaultError)({
496
+ return throwDefaultError({
533
497
  output,
534
498
  parsedBody,
535
- exceptionCtor: EMRServerlessServiceException_1.EMRServerlessServiceException,
536
499
  errorCode,
537
500
  });
538
501
  }
@@ -541,13 +504,14 @@ const de_GetDashboardForJobRunCommand = async (output, context) => {
541
504
  if (output.statusCode !== 200 && output.statusCode >= 300) {
542
505
  return de_GetDashboardForJobRunCommandError(output, context);
543
506
  }
544
- const contents = map({
507
+ const contents = (0, smithy_client_1.map)({
545
508
  $metadata: deserializeMetadata(output),
546
509
  });
547
510
  const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
548
- if (data.url != null) {
549
- contents.url = (0, smithy_client_1.expectString)(data.url);
550
- }
511
+ const doc = (0, smithy_client_1.take)(data, {
512
+ url: smithy_client_1.expectString,
513
+ });
514
+ Object.assign(contents, doc);
551
515
  return contents;
552
516
  };
553
517
  exports.de_GetDashboardForJobRunCommand = de_GetDashboardForJobRunCommand;
@@ -569,10 +533,9 @@ const de_GetDashboardForJobRunCommandError = async (output, context) => {
569
533
  throw await de_ValidationExceptionRes(parsedOutput, context);
570
534
  default:
571
535
  const parsedBody = parsedOutput.body;
572
- (0, smithy_client_1.throwDefaultError)({
536
+ return throwDefaultError({
573
537
  output,
574
538
  parsedBody,
575
- exceptionCtor: EMRServerlessServiceException_1.EMRServerlessServiceException,
576
539
  errorCode,
577
540
  });
578
541
  }
@@ -581,13 +544,14 @@ const de_GetJobRunCommand = async (output, context) => {
581
544
  if (output.statusCode !== 200 && output.statusCode >= 300) {
582
545
  return de_GetJobRunCommandError(output, context);
583
546
  }
584
- const contents = map({
547
+ const contents = (0, smithy_client_1.map)({
585
548
  $metadata: deserializeMetadata(output),
586
549
  });
587
550
  const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
588
- if (data.jobRun != null) {
589
- contents.jobRun = de_JobRun(data.jobRun, context);
590
- }
551
+ const doc = (0, smithy_client_1.take)(data, {
552
+ jobRun: (_) => de_JobRun(_, context),
553
+ });
554
+ Object.assign(contents, doc);
591
555
  return contents;
592
556
  };
593
557
  exports.de_GetJobRunCommand = de_GetJobRunCommand;
@@ -609,10 +573,9 @@ const de_GetJobRunCommandError = async (output, context) => {
609
573
  throw await de_ValidationExceptionRes(parsedOutput, context);
610
574
  default:
611
575
  const parsedBody = parsedOutput.body;
612
- (0, smithy_client_1.throwDefaultError)({
576
+ return throwDefaultError({
613
577
  output,
614
578
  parsedBody,
615
- exceptionCtor: EMRServerlessServiceException_1.EMRServerlessServiceException,
616
579
  errorCode,
617
580
  });
618
581
  }
@@ -621,16 +584,15 @@ const de_ListApplicationsCommand = async (output, context) => {
621
584
  if (output.statusCode !== 200 && output.statusCode >= 300) {
622
585
  return de_ListApplicationsCommandError(output, context);
623
586
  }
624
- const contents = map({
587
+ const contents = (0, smithy_client_1.map)({
625
588
  $metadata: deserializeMetadata(output),
626
589
  });
627
590
  const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
628
- if (data.applications != null) {
629
- contents.applications = de_ApplicationList(data.applications, context);
630
- }
631
- if (data.nextToken != null) {
632
- contents.nextToken = (0, smithy_client_1.expectString)(data.nextToken);
633
- }
591
+ const doc = (0, smithy_client_1.take)(data, {
592
+ applications: (_) => de_ApplicationList(_, context),
593
+ nextToken: smithy_client_1.expectString,
594
+ });
595
+ Object.assign(contents, doc);
634
596
  return contents;
635
597
  };
636
598
  exports.de_ListApplicationsCommand = de_ListApplicationsCommand;
@@ -649,10 +611,9 @@ const de_ListApplicationsCommandError = async (output, context) => {
649
611
  throw await de_ValidationExceptionRes(parsedOutput, context);
650
612
  default:
651
613
  const parsedBody = parsedOutput.body;
652
- (0, smithy_client_1.throwDefaultError)({
614
+ return throwDefaultError({
653
615
  output,
654
616
  parsedBody,
655
- exceptionCtor: EMRServerlessServiceException_1.EMRServerlessServiceException,
656
617
  errorCode,
657
618
  });
658
619
  }
@@ -661,16 +622,15 @@ const de_ListJobRunsCommand = async (output, context) => {
661
622
  if (output.statusCode !== 200 && output.statusCode >= 300) {
662
623
  return de_ListJobRunsCommandError(output, context);
663
624
  }
664
- const contents = map({
625
+ const contents = (0, smithy_client_1.map)({
665
626
  $metadata: deserializeMetadata(output),
666
627
  });
667
628
  const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
668
- if (data.jobRuns != null) {
669
- contents.jobRuns = de_JobRuns(data.jobRuns, context);
670
- }
671
- if (data.nextToken != null) {
672
- contents.nextToken = (0, smithy_client_1.expectString)(data.nextToken);
673
- }
629
+ const doc = (0, smithy_client_1.take)(data, {
630
+ jobRuns: (_) => de_JobRuns(_, context),
631
+ nextToken: smithy_client_1.expectString,
632
+ });
633
+ Object.assign(contents, doc);
674
634
  return contents;
675
635
  };
676
636
  exports.de_ListJobRunsCommand = de_ListJobRunsCommand;
@@ -689,10 +649,9 @@ const de_ListJobRunsCommandError = async (output, context) => {
689
649
  throw await de_ValidationExceptionRes(parsedOutput, context);
690
650
  default:
691
651
  const parsedBody = parsedOutput.body;
692
- (0, smithy_client_1.throwDefaultError)({
652
+ return throwDefaultError({
693
653
  output,
694
654
  parsedBody,
695
- exceptionCtor: EMRServerlessServiceException_1.EMRServerlessServiceException,
696
655
  errorCode,
697
656
  });
698
657
  }
@@ -701,13 +660,14 @@ const de_ListTagsForResourceCommand = async (output, context) => {
701
660
  if (output.statusCode !== 200 && output.statusCode >= 300) {
702
661
  return de_ListTagsForResourceCommandError(output, context);
703
662
  }
704
- const contents = map({
663
+ const contents = (0, smithy_client_1.map)({
705
664
  $metadata: deserializeMetadata(output),
706
665
  });
707
666
  const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
708
- if (data.tags != null) {
709
- contents.tags = de_TagMap(data.tags, context);
710
- }
667
+ const doc = (0, smithy_client_1.take)(data, {
668
+ tags: smithy_client_1._json,
669
+ });
670
+ Object.assign(contents, doc);
711
671
  return contents;
712
672
  };
713
673
  exports.de_ListTagsForResourceCommand = de_ListTagsForResourceCommand;
@@ -729,10 +689,9 @@ const de_ListTagsForResourceCommandError = async (output, context) => {
729
689
  throw await de_ValidationExceptionRes(parsedOutput, context);
730
690
  default:
731
691
  const parsedBody = parsedOutput.body;
732
- (0, smithy_client_1.throwDefaultError)({
692
+ return throwDefaultError({
733
693
  output,
734
694
  parsedBody,
735
- exceptionCtor: EMRServerlessServiceException_1.EMRServerlessServiceException,
736
695
  errorCode,
737
696
  });
738
697
  }
@@ -741,7 +700,7 @@ const de_StartApplicationCommand = async (output, context) => {
741
700
  if (output.statusCode !== 200 && output.statusCode >= 300) {
742
701
  return de_StartApplicationCommandError(output, context);
743
702
  }
744
- const contents = map({
703
+ const contents = (0, smithy_client_1.map)({
745
704
  $metadata: deserializeMetadata(output),
746
705
  });
747
706
  await collectBody(output.body, context);
@@ -769,10 +728,9 @@ const de_StartApplicationCommandError = async (output, context) => {
769
728
  throw await de_ValidationExceptionRes(parsedOutput, context);
770
729
  default:
771
730
  const parsedBody = parsedOutput.body;
772
- (0, smithy_client_1.throwDefaultError)({
731
+ return throwDefaultError({
773
732
  output,
774
733
  parsedBody,
775
- exceptionCtor: EMRServerlessServiceException_1.EMRServerlessServiceException,
776
734
  errorCode,
777
735
  });
778
736
  }
@@ -781,19 +739,16 @@ const de_StartJobRunCommand = async (output, context) => {
781
739
  if (output.statusCode !== 200 && output.statusCode >= 300) {
782
740
  return de_StartJobRunCommandError(output, context);
783
741
  }
784
- const contents = map({
742
+ const contents = (0, smithy_client_1.map)({
785
743
  $metadata: deserializeMetadata(output),
786
744
  });
787
745
  const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
788
- if (data.applicationId != null) {
789
- contents.applicationId = (0, smithy_client_1.expectString)(data.applicationId);
790
- }
791
- if (data.arn != null) {
792
- contents.arn = (0, smithy_client_1.expectString)(data.arn);
793
- }
794
- if (data.jobRunId != null) {
795
- contents.jobRunId = (0, smithy_client_1.expectString)(data.jobRunId);
796
- }
746
+ const doc = (0, smithy_client_1.take)(data, {
747
+ applicationId: smithy_client_1.expectString,
748
+ arn: smithy_client_1.expectString,
749
+ jobRunId: smithy_client_1.expectString,
750
+ });
751
+ Object.assign(contents, doc);
797
752
  return contents;
798
753
  };
799
754
  exports.de_StartJobRunCommand = de_StartJobRunCommand;
@@ -818,10 +773,9 @@ const de_StartJobRunCommandError = async (output, context) => {
818
773
  throw await de_ValidationExceptionRes(parsedOutput, context);
819
774
  default:
820
775
  const parsedBody = parsedOutput.body;
821
- (0, smithy_client_1.throwDefaultError)({
776
+ return throwDefaultError({
822
777
  output,
823
778
  parsedBody,
824
- exceptionCtor: EMRServerlessServiceException_1.EMRServerlessServiceException,
825
779
  errorCode,
826
780
  });
827
781
  }
@@ -830,7 +784,7 @@ const de_StopApplicationCommand = async (output, context) => {
830
784
  if (output.statusCode !== 200 && output.statusCode >= 300) {
831
785
  return de_StopApplicationCommandError(output, context);
832
786
  }
833
- const contents = map({
787
+ const contents = (0, smithy_client_1.map)({
834
788
  $metadata: deserializeMetadata(output),
835
789
  });
836
790
  await collectBody(output.body, context);
@@ -855,10 +809,9 @@ const de_StopApplicationCommandError = async (output, context) => {
855
809
  throw await de_ValidationExceptionRes(parsedOutput, context);
856
810
  default:
857
811
  const parsedBody = parsedOutput.body;
858
- (0, smithy_client_1.throwDefaultError)({
812
+ return throwDefaultError({
859
813
  output,
860
814
  parsedBody,
861
- exceptionCtor: EMRServerlessServiceException_1.EMRServerlessServiceException,
862
815
  errorCode,
863
816
  });
864
817
  }
@@ -867,7 +820,7 @@ const de_TagResourceCommand = async (output, context) => {
867
820
  if (output.statusCode !== 200 && output.statusCode >= 300) {
868
821
  return de_TagResourceCommandError(output, context);
869
822
  }
870
- const contents = map({
823
+ const contents = (0, smithy_client_1.map)({
871
824
  $metadata: deserializeMetadata(output),
872
825
  });
873
826
  await collectBody(output.body, context);
@@ -892,10 +845,9 @@ const de_TagResourceCommandError = async (output, context) => {
892
845
  throw await de_ValidationExceptionRes(parsedOutput, context);
893
846
  default:
894
847
  const parsedBody = parsedOutput.body;
895
- (0, smithy_client_1.throwDefaultError)({
848
+ return throwDefaultError({
896
849
  output,
897
850
  parsedBody,
898
- exceptionCtor: EMRServerlessServiceException_1.EMRServerlessServiceException,
899
851
  errorCode,
900
852
  });
901
853
  }
@@ -904,7 +856,7 @@ const de_UntagResourceCommand = async (output, context) => {
904
856
  if (output.statusCode !== 200 && output.statusCode >= 300) {
905
857
  return de_UntagResourceCommandError(output, context);
906
858
  }
907
- const contents = map({
859
+ const contents = (0, smithy_client_1.map)({
908
860
  $metadata: deserializeMetadata(output),
909
861
  });
910
862
  await collectBody(output.body, context);
@@ -929,10 +881,9 @@ const de_UntagResourceCommandError = async (output, context) => {
929
881
  throw await de_ValidationExceptionRes(parsedOutput, context);
930
882
  default:
931
883
  const parsedBody = parsedOutput.body;
932
- (0, smithy_client_1.throwDefaultError)({
884
+ return throwDefaultError({
933
885
  output,
934
886
  parsedBody,
935
- exceptionCtor: EMRServerlessServiceException_1.EMRServerlessServiceException,
936
887
  errorCode,
937
888
  });
938
889
  }
@@ -941,13 +892,14 @@ const de_UpdateApplicationCommand = async (output, context) => {
941
892
  if (output.statusCode !== 200 && output.statusCode >= 300) {
942
893
  return de_UpdateApplicationCommandError(output, context);
943
894
  }
944
- const contents = map({
895
+ const contents = (0, smithy_client_1.map)({
945
896
  $metadata: deserializeMetadata(output),
946
897
  });
947
898
  const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
948
- if (data.application != null) {
949
- contents.application = de_Application(data.application, context);
950
- }
899
+ const doc = (0, smithy_client_1.take)(data, {
900
+ application: (_) => de_Application(_, context),
901
+ });
902
+ Object.assign(contents, doc);
951
903
  return contents;
952
904
  };
953
905
  exports.de_UpdateApplicationCommand = de_UpdateApplicationCommand;
@@ -969,21 +921,21 @@ const de_UpdateApplicationCommandError = async (output, context) => {
969
921
  throw await de_ValidationExceptionRes(parsedOutput, context);
970
922
  default:
971
923
  const parsedBody = parsedOutput.body;
972
- (0, smithy_client_1.throwDefaultError)({
924
+ return throwDefaultError({
973
925
  output,
974
926
  parsedBody,
975
- exceptionCtor: EMRServerlessServiceException_1.EMRServerlessServiceException,
976
927
  errorCode,
977
928
  });
978
929
  }
979
930
  };
980
- const map = smithy_client_1.map;
931
+ const throwDefaultError = (0, smithy_client_1.withBaseException)(EMRServerlessServiceException_1.EMRServerlessServiceException);
981
932
  const de_ConflictExceptionRes = async (parsedOutput, context) => {
982
- const contents = map({});
933
+ const contents = (0, smithy_client_1.map)({});
983
934
  const data = parsedOutput.body;
984
- if (data.message != null) {
985
- contents.message = (0, smithy_client_1.expectString)(data.message);
986
- }
935
+ const doc = (0, smithy_client_1.take)(data, {
936
+ message: smithy_client_1.expectString,
937
+ });
938
+ Object.assign(contents, doc);
987
939
  const exception = new models_0_1.ConflictException({
988
940
  $metadata: deserializeMetadata(parsedOutput),
989
941
  ...contents,
@@ -991,11 +943,12 @@ const de_ConflictExceptionRes = async (parsedOutput, context) => {
991
943
  return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
992
944
  };
993
945
  const de_InternalServerExceptionRes = async (parsedOutput, context) => {
994
- const contents = map({});
946
+ const contents = (0, smithy_client_1.map)({});
995
947
  const data = parsedOutput.body;
996
- if (data.message != null) {
997
- contents.message = (0, smithy_client_1.expectString)(data.message);
998
- }
948
+ const doc = (0, smithy_client_1.take)(data, {
949
+ message: smithy_client_1.expectString,
950
+ });
951
+ Object.assign(contents, doc);
999
952
  const exception = new models_0_1.InternalServerException({
1000
953
  $metadata: deserializeMetadata(parsedOutput),
1001
954
  ...contents,
@@ -1003,11 +956,12 @@ const de_InternalServerExceptionRes = async (parsedOutput, context) => {
1003
956
  return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
1004
957
  };
1005
958
  const de_ResourceNotFoundExceptionRes = async (parsedOutput, context) => {
1006
- const contents = map({});
959
+ const contents = (0, smithy_client_1.map)({});
1007
960
  const data = parsedOutput.body;
1008
- if (data.message != null) {
1009
- contents.message = (0, smithy_client_1.expectString)(data.message);
1010
- }
961
+ const doc = (0, smithy_client_1.take)(data, {
962
+ message: smithy_client_1.expectString,
963
+ });
964
+ Object.assign(contents, doc);
1011
965
  const exception = new models_0_1.ResourceNotFoundException({
1012
966
  $metadata: deserializeMetadata(parsedOutput),
1013
967
  ...contents,
@@ -1015,11 +969,12 @@ const de_ResourceNotFoundExceptionRes = async (parsedOutput, context) => {
1015
969
  return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
1016
970
  };
1017
971
  const de_ServiceQuotaExceededExceptionRes = async (parsedOutput, context) => {
1018
- const contents = map({});
972
+ const contents = (0, smithy_client_1.map)({});
1019
973
  const data = parsedOutput.body;
1020
- if (data.message != null) {
1021
- contents.message = (0, smithy_client_1.expectString)(data.message);
1022
- }
974
+ const doc = (0, smithy_client_1.take)(data, {
975
+ message: smithy_client_1.expectString,
976
+ });
977
+ Object.assign(contents, doc);
1023
978
  const exception = new models_0_1.ServiceQuotaExceededException({
1024
979
  $metadata: deserializeMetadata(parsedOutput),
1025
980
  ...contents,
@@ -1027,34 +982,24 @@ const de_ServiceQuotaExceededExceptionRes = async (parsedOutput, context) => {
1027
982
  return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
1028
983
  };
1029
984
  const de_ValidationExceptionRes = async (parsedOutput, context) => {
1030
- const contents = map({});
985
+ const contents = (0, smithy_client_1.map)({});
1031
986
  const data = parsedOutput.body;
1032
- if (data.message != null) {
1033
- contents.message = (0, smithy_client_1.expectString)(data.message);
1034
- }
987
+ const doc = (0, smithy_client_1.take)(data, {
988
+ message: smithy_client_1.expectString,
989
+ });
990
+ Object.assign(contents, doc);
1035
991
  const exception = new models_0_1.ValidationException({
1036
992
  $metadata: deserializeMetadata(parsedOutput),
1037
993
  ...contents,
1038
994
  });
1039
995
  return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
1040
996
  };
1041
- const se_AutoStartConfig = (input, context) => {
1042
- return {
1043
- ...(input.enabled != null && { enabled: input.enabled }),
1044
- };
1045
- };
1046
- const se_AutoStopConfig = (input, context) => {
1047
- return {
1048
- ...(input.enabled != null && { enabled: input.enabled }),
1049
- ...(input.idleTimeoutMinutes != null && { idleTimeoutMinutes: input.idleTimeoutMinutes }),
1050
- };
1051
- };
1052
997
  const se_Configuration = (input, context) => {
1053
- return {
1054
- ...(input.classification != null && { classification: input.classification }),
1055
- ...(input.configurations != null && { configurations: se_ConfigurationList(input.configurations, context) }),
1056
- ...(input.properties != null && { properties: se_SensitivePropertiesMap(input.properties, context) }),
1057
- };
998
+ return (0, smithy_client_1.take)(input, {
999
+ classification: [],
1000
+ configurations: (_) => se_ConfigurationList(_, context),
1001
+ properties: smithy_client_1._json,
1002
+ });
1058
1003
  };
1059
1004
  const se_ConfigurationList = (input, context) => {
1060
1005
  return input
@@ -1064,459 +1009,136 @@ const se_ConfigurationList = (input, context) => {
1064
1009
  });
1065
1010
  };
1066
1011
  const se_ConfigurationOverrides = (input, context) => {
1067
- return {
1068
- ...(input.applicationConfiguration != null && {
1069
- applicationConfiguration: se_ConfigurationList(input.applicationConfiguration, context),
1070
- }),
1071
- ...(input.monitoringConfiguration != null && {
1072
- monitoringConfiguration: se_MonitoringConfiguration(input.monitoringConfiguration, context),
1073
- }),
1074
- };
1075
- };
1076
- const se_EntryPointArguments = (input, context) => {
1077
- return input
1078
- .filter((e) => e != null)
1079
- .map((entry) => {
1080
- return entry;
1081
- });
1082
- };
1083
- const se_Hive = (input, context) => {
1084
- return {
1085
- ...(input.initQueryFile != null && { initQueryFile: input.initQueryFile }),
1086
- ...(input.parameters != null && { parameters: input.parameters }),
1087
- ...(input.query != null && { query: input.query }),
1088
- };
1089
- };
1090
- const se_ImageConfigurationInput = (input, context) => {
1091
- return {
1092
- ...(input.imageUri != null && { imageUri: input.imageUri }),
1093
- };
1094
- };
1095
- const se_InitialCapacityConfig = (input, context) => {
1096
- return {
1097
- ...(input.workerConfiguration != null && {
1098
- workerConfiguration: se_WorkerResourceConfig(input.workerConfiguration, context),
1099
- }),
1100
- ...(input.workerCount != null && { workerCount: input.workerCount }),
1101
- };
1102
- };
1103
- const se_InitialCapacityConfigMap = (input, context) => {
1104
- return Object.entries(input).reduce((acc, [key, value]) => {
1105
- if (value === null) {
1106
- return acc;
1107
- }
1108
- acc[key] = se_InitialCapacityConfig(value, context);
1109
- return acc;
1110
- }, {});
1111
- };
1112
- const se_JobDriver = (input, context) => {
1113
- return models_0_1.JobDriver.visit(input, {
1114
- hive: (value) => ({ hive: se_Hive(value, context) }),
1115
- sparkSubmit: (value) => ({ sparkSubmit: se_SparkSubmit(value, context) }),
1116
- _: (name, value) => ({ name: value }),
1117
- });
1118
- };
1119
- const se_ManagedPersistenceMonitoringConfiguration = (input, context) => {
1120
- return {
1121
- ...(input.enabled != null && { enabled: input.enabled }),
1122
- ...(input.encryptionKeyArn != null && { encryptionKeyArn: input.encryptionKeyArn }),
1123
- };
1124
- };
1125
- const se_MaximumAllowedResources = (input, context) => {
1126
- return {
1127
- ...(input.cpu != null && { cpu: input.cpu }),
1128
- ...(input.disk != null && { disk: input.disk }),
1129
- ...(input.memory != null && { memory: input.memory }),
1130
- };
1131
- };
1132
- const se_MonitoringConfiguration = (input, context) => {
1133
- return {
1134
- ...(input.managedPersistenceMonitoringConfiguration != null && {
1135
- managedPersistenceMonitoringConfiguration: se_ManagedPersistenceMonitoringConfiguration(input.managedPersistenceMonitoringConfiguration, context),
1136
- }),
1137
- ...(input.s3MonitoringConfiguration != null && {
1138
- s3MonitoringConfiguration: se_S3MonitoringConfiguration(input.s3MonitoringConfiguration, context),
1139
- }),
1140
- };
1141
- };
1142
- const se_NetworkConfiguration = (input, context) => {
1143
- return {
1144
- ...(input.securityGroupIds != null && { securityGroupIds: se_SecurityGroupIds(input.securityGroupIds, context) }),
1145
- ...(input.subnetIds != null && { subnetIds: se_SubnetIds(input.subnetIds, context) }),
1146
- };
1147
- };
1148
- const se_S3MonitoringConfiguration = (input, context) => {
1149
- return {
1150
- ...(input.encryptionKeyArn != null && { encryptionKeyArn: input.encryptionKeyArn }),
1151
- ...(input.logUri != null && { logUri: input.logUri }),
1152
- };
1153
- };
1154
- const se_SecurityGroupIds = (input, context) => {
1155
- return input
1156
- .filter((e) => e != null)
1157
- .map((entry) => {
1158
- return entry;
1012
+ return (0, smithy_client_1.take)(input, {
1013
+ applicationConfiguration: (_) => se_ConfigurationList(_, context),
1014
+ monitoringConfiguration: smithy_client_1._json,
1159
1015
  });
1160
1016
  };
1161
- const se_SensitivePropertiesMap = (input, context) => {
1162
- return Object.entries(input).reduce((acc, [key, value]) => {
1163
- if (value === null) {
1164
- return acc;
1165
- }
1166
- acc[key] = value;
1167
- return acc;
1168
- }, {});
1169
- };
1170
- const se_SparkSubmit = (input, context) => {
1171
- return {
1172
- ...(input.entryPoint != null && { entryPoint: input.entryPoint }),
1173
- ...(input.entryPointArguments != null && {
1174
- entryPointArguments: se_EntryPointArguments(input.entryPointArguments, context),
1175
- }),
1176
- ...(input.sparkSubmitParameters != null && { sparkSubmitParameters: input.sparkSubmitParameters }),
1177
- };
1178
- };
1179
- const se_SubnetIds = (input, context) => {
1180
- return input
1181
- .filter((e) => e != null)
1182
- .map((entry) => {
1183
- return entry;
1184
- });
1185
- };
1186
- const se_TagMap = (input, context) => {
1187
- return Object.entries(input).reduce((acc, [key, value]) => {
1188
- if (value === null) {
1189
- return acc;
1190
- }
1191
- acc[key] = value;
1192
- return acc;
1193
- }, {});
1194
- };
1195
- const se_WorkerResourceConfig = (input, context) => {
1196
- return {
1197
- ...(input.cpu != null && { cpu: input.cpu }),
1198
- ...(input.disk != null && { disk: input.disk }),
1199
- ...(input.memory != null && { memory: input.memory }),
1200
- };
1201
- };
1202
- const se_WorkerTypeSpecificationInput = (input, context) => {
1203
- return {
1204
- ...(input.imageConfiguration != null && {
1205
- imageConfiguration: se_ImageConfigurationInput(input.imageConfiguration, context),
1206
- }),
1207
- };
1208
- };
1209
- const se_WorkerTypeSpecificationInputMap = (input, context) => {
1210
- return Object.entries(input).reduce((acc, [key, value]) => {
1211
- if (value === null) {
1212
- return acc;
1213
- }
1214
- acc[key] = se_WorkerTypeSpecificationInput(value, context);
1215
- return acc;
1216
- }, {});
1217
- };
1218
1017
  const de_Application = (output, context) => {
1219
- return {
1220
- applicationId: (0, smithy_client_1.expectString)(output.applicationId),
1221
- architecture: (0, smithy_client_1.expectString)(output.architecture),
1222
- arn: (0, smithy_client_1.expectString)(output.arn),
1223
- autoStartConfiguration: output.autoStartConfiguration != null ? de_AutoStartConfig(output.autoStartConfiguration, context) : undefined,
1224
- autoStopConfiguration: output.autoStopConfiguration != null ? de_AutoStopConfig(output.autoStopConfiguration, context) : undefined,
1225
- createdAt: output.createdAt != null ? (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(output.createdAt))) : undefined,
1226
- imageConfiguration: output.imageConfiguration != null ? de_ImageConfiguration(output.imageConfiguration, context) : undefined,
1227
- initialCapacity: output.initialCapacity != null ? de_InitialCapacityConfigMap(output.initialCapacity, context) : undefined,
1228
- maximumCapacity: output.maximumCapacity != null ? de_MaximumAllowedResources(output.maximumCapacity, context) : undefined,
1229
- name: (0, smithy_client_1.expectString)(output.name),
1230
- networkConfiguration: output.networkConfiguration != null ? de_NetworkConfiguration(output.networkConfiguration, context) : undefined,
1231
- releaseLabel: (0, smithy_client_1.expectString)(output.releaseLabel),
1232
- state: (0, smithy_client_1.expectString)(output.state),
1233
- stateDetails: (0, smithy_client_1.expectString)(output.stateDetails),
1234
- tags: output.tags != null ? de_TagMap(output.tags, context) : undefined,
1235
- type: (0, smithy_client_1.expectString)(output.type),
1236
- updatedAt: output.updatedAt != null ? (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(output.updatedAt))) : undefined,
1237
- workerTypeSpecifications: output.workerTypeSpecifications != null
1238
- ? de_WorkerTypeSpecificationMap(output.workerTypeSpecifications, context)
1239
- : undefined,
1240
- };
1018
+ return (0, smithy_client_1.take)(output, {
1019
+ applicationId: smithy_client_1.expectString,
1020
+ architecture: smithy_client_1.expectString,
1021
+ arn: smithy_client_1.expectString,
1022
+ autoStartConfiguration: smithy_client_1._json,
1023
+ autoStopConfiguration: smithy_client_1._json,
1024
+ createdAt: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(_))),
1025
+ imageConfiguration: smithy_client_1._json,
1026
+ initialCapacity: smithy_client_1._json,
1027
+ maximumCapacity: smithy_client_1._json,
1028
+ name: smithy_client_1.expectString,
1029
+ networkConfiguration: smithy_client_1._json,
1030
+ releaseLabel: smithy_client_1.expectString,
1031
+ state: smithy_client_1.expectString,
1032
+ stateDetails: smithy_client_1.expectString,
1033
+ tags: smithy_client_1._json,
1034
+ type: smithy_client_1.expectString,
1035
+ updatedAt: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(_))),
1036
+ workerTypeSpecifications: smithy_client_1._json,
1037
+ });
1241
1038
  };
1242
1039
  const de_ApplicationList = (output, context) => {
1243
1040
  const retVal = (output || [])
1244
1041
  .filter((e) => e != null)
1245
1042
  .map((entry) => {
1246
- if (entry === null) {
1247
- return null;
1248
- }
1249
1043
  return de_ApplicationSummary(entry, context);
1250
1044
  });
1251
1045
  return retVal;
1252
1046
  };
1253
1047
  const de_ApplicationSummary = (output, context) => {
1254
- return {
1255
- architecture: (0, smithy_client_1.expectString)(output.architecture),
1256
- arn: (0, smithy_client_1.expectString)(output.arn),
1257
- createdAt: output.createdAt != null ? (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(output.createdAt))) : undefined,
1258
- id: (0, smithy_client_1.expectString)(output.id),
1259
- name: (0, smithy_client_1.expectString)(output.name),
1260
- releaseLabel: (0, smithy_client_1.expectString)(output.releaseLabel),
1261
- state: (0, smithy_client_1.expectString)(output.state),
1262
- stateDetails: (0, smithy_client_1.expectString)(output.stateDetails),
1263
- type: (0, smithy_client_1.expectString)(output.type),
1264
- updatedAt: output.updatedAt != null ? (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(output.updatedAt))) : undefined,
1265
- };
1266
- };
1267
- const de_AutoStartConfig = (output, context) => {
1268
- return {
1269
- enabled: (0, smithy_client_1.expectBoolean)(output.enabled),
1270
- };
1271
- };
1272
- const de_AutoStopConfig = (output, context) => {
1273
- return {
1274
- enabled: (0, smithy_client_1.expectBoolean)(output.enabled),
1275
- idleTimeoutMinutes: (0, smithy_client_1.expectInt32)(output.idleTimeoutMinutes),
1276
- };
1048
+ return (0, smithy_client_1.take)(output, {
1049
+ architecture: smithy_client_1.expectString,
1050
+ arn: smithy_client_1.expectString,
1051
+ createdAt: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(_))),
1052
+ id: smithy_client_1.expectString,
1053
+ name: smithy_client_1.expectString,
1054
+ releaseLabel: smithy_client_1.expectString,
1055
+ state: smithy_client_1.expectString,
1056
+ stateDetails: smithy_client_1.expectString,
1057
+ type: smithy_client_1.expectString,
1058
+ updatedAt: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(_))),
1059
+ });
1277
1060
  };
1278
1061
  const de_Configuration = (output, context) => {
1279
- return {
1280
- classification: (0, smithy_client_1.expectString)(output.classification),
1281
- configurations: output.configurations != null ? de_ConfigurationList(output.configurations, context) : undefined,
1282
- properties: output.properties != null ? de_SensitivePropertiesMap(output.properties, context) : undefined,
1283
- };
1062
+ return (0, smithy_client_1.take)(output, {
1063
+ classification: smithy_client_1.expectString,
1064
+ configurations: (_) => de_ConfigurationList(_, context),
1065
+ properties: smithy_client_1._json,
1066
+ });
1284
1067
  };
1285
1068
  const de_ConfigurationList = (output, context) => {
1286
1069
  const retVal = (output || [])
1287
1070
  .filter((e) => e != null)
1288
1071
  .map((entry) => {
1289
- if (entry === null) {
1290
- return null;
1291
- }
1292
1072
  return de_Configuration(entry, context);
1293
1073
  });
1294
1074
  return retVal;
1295
1075
  };
1296
1076
  const de_ConfigurationOverrides = (output, context) => {
1297
- return {
1298
- applicationConfiguration: output.applicationConfiguration != null
1299
- ? de_ConfigurationList(output.applicationConfiguration, context)
1300
- : undefined,
1301
- monitoringConfiguration: output.monitoringConfiguration != null
1302
- ? de_MonitoringConfiguration(output.monitoringConfiguration, context)
1303
- : undefined,
1304
- };
1305
- };
1306
- const de_EntryPointArguments = (output, context) => {
1307
- const retVal = (output || [])
1308
- .filter((e) => e != null)
1309
- .map((entry) => {
1310
- if (entry === null) {
1311
- return null;
1312
- }
1313
- return (0, smithy_client_1.expectString)(entry);
1077
+ return (0, smithy_client_1.take)(output, {
1078
+ applicationConfiguration: (_) => de_ConfigurationList(_, context),
1079
+ monitoringConfiguration: smithy_client_1._json,
1314
1080
  });
1315
- return retVal;
1316
- };
1317
- const de_Hive = (output, context) => {
1318
- return {
1319
- initQueryFile: (0, smithy_client_1.expectString)(output.initQueryFile),
1320
- parameters: (0, smithy_client_1.expectString)(output.parameters),
1321
- query: (0, smithy_client_1.expectString)(output.query),
1322
- };
1323
- };
1324
- const de_ImageConfiguration = (output, context) => {
1325
- return {
1326
- imageUri: (0, smithy_client_1.expectString)(output.imageUri),
1327
- resolvedImageDigest: (0, smithy_client_1.expectString)(output.resolvedImageDigest),
1328
- };
1329
- };
1330
- const de_InitialCapacityConfig = (output, context) => {
1331
- return {
1332
- workerConfiguration: output.workerConfiguration != null ? de_WorkerResourceConfig(output.workerConfiguration, context) : undefined,
1333
- workerCount: (0, smithy_client_1.expectLong)(output.workerCount),
1334
- };
1335
- };
1336
- const de_InitialCapacityConfigMap = (output, context) => {
1337
- return Object.entries(output).reduce((acc, [key, value]) => {
1338
- if (value === null) {
1339
- return acc;
1340
- }
1341
- acc[key] = de_InitialCapacityConfig(value, context);
1342
- return acc;
1343
- }, {});
1344
- };
1345
- const de_JobDriver = (output, context) => {
1346
- if (output.hive != null) {
1347
- return {
1348
- hive: de_Hive(output.hive, context),
1349
- };
1350
- }
1351
- if (output.sparkSubmit != null) {
1352
- return {
1353
- sparkSubmit: de_SparkSubmit(output.sparkSubmit, context),
1354
- };
1355
- }
1356
- return { $unknown: Object.entries(output)[0] };
1357
1081
  };
1358
1082
  const de_JobRun = (output, context) => {
1359
- return {
1360
- applicationId: (0, smithy_client_1.expectString)(output.applicationId),
1361
- arn: (0, smithy_client_1.expectString)(output.arn),
1362
- configurationOverrides: output.configurationOverrides != null
1363
- ? de_ConfigurationOverrides(output.configurationOverrides, context)
1364
- : undefined,
1365
- createdAt: output.createdAt != null ? (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(output.createdAt))) : undefined,
1366
- createdBy: (0, smithy_client_1.expectString)(output.createdBy),
1367
- executionRole: (0, smithy_client_1.expectString)(output.executionRole),
1368
- executionTimeoutMinutes: (0, smithy_client_1.expectLong)(output.executionTimeoutMinutes),
1369
- jobDriver: output.jobDriver != null ? de_JobDriver((0, smithy_client_1.expectUnion)(output.jobDriver), context) : undefined,
1370
- jobRunId: (0, smithy_client_1.expectString)(output.jobRunId),
1371
- name: (0, smithy_client_1.expectString)(output.name),
1372
- networkConfiguration: output.networkConfiguration != null ? de_NetworkConfiguration(output.networkConfiguration, context) : undefined,
1373
- releaseLabel: (0, smithy_client_1.expectString)(output.releaseLabel),
1374
- state: (0, smithy_client_1.expectString)(output.state),
1375
- stateDetails: (0, smithy_client_1.expectString)(output.stateDetails),
1376
- tags: output.tags != null ? de_TagMap(output.tags, context) : undefined,
1377
- totalExecutionDurationSeconds: (0, smithy_client_1.expectInt32)(output.totalExecutionDurationSeconds),
1378
- totalResourceUtilization: output.totalResourceUtilization != null
1379
- ? de_TotalResourceUtilization(output.totalResourceUtilization, context)
1380
- : undefined,
1381
- updatedAt: output.updatedAt != null ? (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(output.updatedAt))) : undefined,
1382
- };
1083
+ return (0, smithy_client_1.take)(output, {
1084
+ applicationId: smithy_client_1.expectString,
1085
+ arn: smithy_client_1.expectString,
1086
+ billedResourceUtilization: (_) => de_ResourceUtilization(_, context),
1087
+ configurationOverrides: (_) => de_ConfigurationOverrides(_, context),
1088
+ createdAt: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(_))),
1089
+ createdBy: smithy_client_1.expectString,
1090
+ executionRole: smithy_client_1.expectString,
1091
+ executionTimeoutMinutes: smithy_client_1.expectLong,
1092
+ jobDriver: (_) => (0, smithy_client_1._json)((0, smithy_client_1.expectUnion)(_)),
1093
+ jobRunId: smithy_client_1.expectString,
1094
+ name: smithy_client_1.expectString,
1095
+ networkConfiguration: smithy_client_1._json,
1096
+ releaseLabel: smithy_client_1.expectString,
1097
+ state: smithy_client_1.expectString,
1098
+ stateDetails: smithy_client_1.expectString,
1099
+ tags: smithy_client_1._json,
1100
+ totalExecutionDurationSeconds: smithy_client_1.expectInt32,
1101
+ totalResourceUtilization: (_) => de_TotalResourceUtilization(_, context),
1102
+ updatedAt: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(_))),
1103
+ });
1383
1104
  };
1384
1105
  const de_JobRuns = (output, context) => {
1385
1106
  const retVal = (output || [])
1386
1107
  .filter((e) => e != null)
1387
1108
  .map((entry) => {
1388
- if (entry === null) {
1389
- return null;
1390
- }
1391
1109
  return de_JobRunSummary(entry, context);
1392
1110
  });
1393
1111
  return retVal;
1394
1112
  };
1395
1113
  const de_JobRunSummary = (output, context) => {
1396
- return {
1397
- applicationId: (0, smithy_client_1.expectString)(output.applicationId),
1398
- arn: (0, smithy_client_1.expectString)(output.arn),
1399
- createdAt: output.createdAt != null ? (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(output.createdAt))) : undefined,
1400
- createdBy: (0, smithy_client_1.expectString)(output.createdBy),
1401
- executionRole: (0, smithy_client_1.expectString)(output.executionRole),
1402
- id: (0, smithy_client_1.expectString)(output.id),
1403
- name: (0, smithy_client_1.expectString)(output.name),
1404
- releaseLabel: (0, smithy_client_1.expectString)(output.releaseLabel),
1405
- state: (0, smithy_client_1.expectString)(output.state),
1406
- stateDetails: (0, smithy_client_1.expectString)(output.stateDetails),
1407
- type: (0, smithy_client_1.expectString)(output.type),
1408
- updatedAt: output.updatedAt != null ? (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(output.updatedAt))) : undefined,
1409
- };
1410
- };
1411
- const de_ManagedPersistenceMonitoringConfiguration = (output, context) => {
1412
- return {
1413
- enabled: (0, smithy_client_1.expectBoolean)(output.enabled),
1414
- encryptionKeyArn: (0, smithy_client_1.expectString)(output.encryptionKeyArn),
1415
- };
1416
- };
1417
- const de_MaximumAllowedResources = (output, context) => {
1418
- return {
1419
- cpu: (0, smithy_client_1.expectString)(output.cpu),
1420
- disk: (0, smithy_client_1.expectString)(output.disk),
1421
- memory: (0, smithy_client_1.expectString)(output.memory),
1422
- };
1423
- };
1424
- const de_MonitoringConfiguration = (output, context) => {
1425
- return {
1426
- managedPersistenceMonitoringConfiguration: output.managedPersistenceMonitoringConfiguration != null
1427
- ? de_ManagedPersistenceMonitoringConfiguration(output.managedPersistenceMonitoringConfiguration, context)
1428
- : undefined,
1429
- s3MonitoringConfiguration: output.s3MonitoringConfiguration != null
1430
- ? de_S3MonitoringConfiguration(output.s3MonitoringConfiguration, context)
1431
- : undefined,
1432
- };
1433
- };
1434
- const de_NetworkConfiguration = (output, context) => {
1435
- return {
1436
- securityGroupIds: output.securityGroupIds != null ? de_SecurityGroupIds(output.securityGroupIds, context) : undefined,
1437
- subnetIds: output.subnetIds != null ? de_SubnetIds(output.subnetIds, context) : undefined,
1438
- };
1439
- };
1440
- const de_S3MonitoringConfiguration = (output, context) => {
1441
- return {
1442
- encryptionKeyArn: (0, smithy_client_1.expectString)(output.encryptionKeyArn),
1443
- logUri: (0, smithy_client_1.expectString)(output.logUri),
1444
- };
1445
- };
1446
- const de_SecurityGroupIds = (output, context) => {
1447
- const retVal = (output || [])
1448
- .filter((e) => e != null)
1449
- .map((entry) => {
1450
- if (entry === null) {
1451
- return null;
1452
- }
1453
- return (0, smithy_client_1.expectString)(entry);
1114
+ return (0, smithy_client_1.take)(output, {
1115
+ applicationId: smithy_client_1.expectString,
1116
+ arn: smithy_client_1.expectString,
1117
+ createdAt: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(_))),
1118
+ createdBy: smithy_client_1.expectString,
1119
+ executionRole: smithy_client_1.expectString,
1120
+ id: smithy_client_1.expectString,
1121
+ name: smithy_client_1.expectString,
1122
+ releaseLabel: smithy_client_1.expectString,
1123
+ state: smithy_client_1.expectString,
1124
+ stateDetails: smithy_client_1.expectString,
1125
+ type: smithy_client_1.expectString,
1126
+ updatedAt: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(_))),
1454
1127
  });
1455
- return retVal;
1456
1128
  };
1457
- const de_SensitivePropertiesMap = (output, context) => {
1458
- return Object.entries(output).reduce((acc, [key, value]) => {
1459
- if (value === null) {
1460
- return acc;
1461
- }
1462
- acc[key] = (0, smithy_client_1.expectString)(value);
1463
- return acc;
1464
- }, {});
1465
- };
1466
- const de_SparkSubmit = (output, context) => {
1467
- return {
1468
- entryPoint: (0, smithy_client_1.expectString)(output.entryPoint),
1469
- entryPointArguments: output.entryPointArguments != null ? de_EntryPointArguments(output.entryPointArguments, context) : undefined,
1470
- sparkSubmitParameters: (0, smithy_client_1.expectString)(output.sparkSubmitParameters),
1471
- };
1472
- };
1473
- const de_SubnetIds = (output, context) => {
1474
- const retVal = (output || [])
1475
- .filter((e) => e != null)
1476
- .map((entry) => {
1477
- if (entry === null) {
1478
- return null;
1479
- }
1480
- return (0, smithy_client_1.expectString)(entry);
1129
+ const de_ResourceUtilization = (output, context) => {
1130
+ return (0, smithy_client_1.take)(output, {
1131
+ memoryGBHour: smithy_client_1.limitedParseDouble,
1132
+ storageGBHour: smithy_client_1.limitedParseDouble,
1133
+ vCPUHour: smithy_client_1.limitedParseDouble,
1481
1134
  });
1482
- return retVal;
1483
- };
1484
- const de_TagMap = (output, context) => {
1485
- return Object.entries(output).reduce((acc, [key, value]) => {
1486
- if (value === null) {
1487
- return acc;
1488
- }
1489
- acc[key] = (0, smithy_client_1.expectString)(value);
1490
- return acc;
1491
- }, {});
1492
1135
  };
1493
1136
  const de_TotalResourceUtilization = (output, context) => {
1494
- return {
1495
- memoryGBHour: (0, smithy_client_1.limitedParseDouble)(output.memoryGBHour),
1496
- storageGBHour: (0, smithy_client_1.limitedParseDouble)(output.storageGBHour),
1497
- vCPUHour: (0, smithy_client_1.limitedParseDouble)(output.vCPUHour),
1498
- };
1499
- };
1500
- const de_WorkerResourceConfig = (output, context) => {
1501
- return {
1502
- cpu: (0, smithy_client_1.expectString)(output.cpu),
1503
- disk: (0, smithy_client_1.expectString)(output.disk),
1504
- memory: (0, smithy_client_1.expectString)(output.memory),
1505
- };
1506
- };
1507
- const de_WorkerTypeSpecification = (output, context) => {
1508
- return {
1509
- imageConfiguration: output.imageConfiguration != null ? de_ImageConfiguration(output.imageConfiguration, context) : undefined,
1510
- };
1511
- };
1512
- const de_WorkerTypeSpecificationMap = (output, context) => {
1513
- return Object.entries(output).reduce((acc, [key, value]) => {
1514
- if (value === null) {
1515
- return acc;
1516
- }
1517
- acc[key] = de_WorkerTypeSpecification(value, context);
1518
- return acc;
1519
- }, {});
1137
+ return (0, smithy_client_1.take)(output, {
1138
+ memoryGBHour: smithy_client_1.limitedParseDouble,
1139
+ storageGBHour: smithy_client_1.limitedParseDouble,
1140
+ vCPUHour: smithy_client_1.limitedParseDouble,
1141
+ });
1520
1142
  };
1521
1143
  const deserializeMetadata = (output) => ({
1522
1144
  httpStatusCode: output.statusCode,