@aws-sdk/client-emr-containers 3.312.0 → 3.316.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,8 +1,8 @@
1
1
  import { HttpRequest as __HttpRequest } from "@aws-sdk/protocol-http";
2
- import { decorateServiceException as __decorateServiceException, expectInt32 as __expectInt32, expectNonNull as __expectNonNull, expectObject as __expectObject, expectString as __expectString, expectUnion as __expectUnion, map as __map, parseRfc3339DateTimeWithOffset as __parseRfc3339DateTimeWithOffset, resolvedPath as __resolvedPath, throwDefaultError, } from "@aws-sdk/smithy-client";
2
+ import { _json, decorateServiceException as __decorateServiceException, expectNonNull as __expectNonNull, expectObject as __expectObject, expectString as __expectString, map, parseRfc3339DateTimeWithOffset as __parseRfc3339DateTimeWithOffset, resolvedPath as __resolvedPath, take, withBaseException, } from "@aws-sdk/smithy-client";
3
3
  import { v4 as generateIdempotencyToken } from "uuid";
4
4
  import { EMRContainersServiceException as __BaseException } from "../models/EMRContainersServiceException";
5
- import { ContainerInfo, InternalServerException, ResourceNotFoundException, ValidationException, } from "../models/models_0";
5
+ import { InternalServerException, ResourceNotFoundException, ValidationException, } from "../models/models_0";
6
6
  export const se_CancelJobRunCommand = async (input, context) => {
7
7
  const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
8
8
  const headers = {};
@@ -28,13 +28,13 @@ export const se_CreateJobTemplateCommand = async (input, context) => {
28
28
  };
29
29
  const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/jobtemplates";
30
30
  let body;
31
- body = JSON.stringify({
32
- clientToken: input.clientToken ?? generateIdempotencyToken(),
33
- ...(input.jobTemplateData != null && { jobTemplateData: se_JobTemplateData(input.jobTemplateData, context) }),
34
- ...(input.kmsKeyArn != null && { kmsKeyArn: input.kmsKeyArn }),
35
- ...(input.name != null && { name: input.name }),
36
- ...(input.tags != null && { tags: se_TagMap(input.tags, context) }),
37
- });
31
+ body = JSON.stringify(take(input, {
32
+ clientToken: [true, (_) => _ ?? generateIdempotencyToken()],
33
+ jobTemplateData: (_) => se_JobTemplateData(_, context),
34
+ kmsKeyArn: [],
35
+ name: [],
36
+ tags: (_) => _json(_),
37
+ }));
38
38
  return new __HttpRequest({
39
39
  protocol,
40
40
  hostname,
@@ -54,18 +54,16 @@ export const se_CreateManagedEndpointCommand = async (input, context) => {
54
54
  "/virtualclusters/{virtualClusterId}/endpoints";
55
55
  resolvedPath = __resolvedPath(resolvedPath, input, "virtualClusterId", () => input.virtualClusterId, "{virtualClusterId}", false);
56
56
  let body;
57
- body = JSON.stringify({
58
- ...(input.certificateArn != null && { certificateArn: input.certificateArn }),
59
- clientToken: input.clientToken ?? generateIdempotencyToken(),
60
- ...(input.configurationOverrides != null && {
61
- configurationOverrides: se_ConfigurationOverrides(input.configurationOverrides, context),
62
- }),
63
- ...(input.executionRoleArn != null && { executionRoleArn: input.executionRoleArn }),
64
- ...(input.name != null && { name: input.name }),
65
- ...(input.releaseLabel != null && { releaseLabel: input.releaseLabel }),
66
- ...(input.tags != null && { tags: se_TagMap(input.tags, context) }),
67
- ...(input.type != null && { type: input.type }),
68
- });
57
+ body = JSON.stringify(take(input, {
58
+ certificateArn: [],
59
+ clientToken: [true, (_) => _ ?? generateIdempotencyToken()],
60
+ configurationOverrides: (_) => se_ConfigurationOverrides(_, context),
61
+ executionRoleArn: [],
62
+ name: [],
63
+ releaseLabel: [],
64
+ tags: (_) => _json(_),
65
+ type: [],
66
+ }));
69
67
  return new __HttpRequest({
70
68
  protocol,
71
69
  hostname,
@@ -83,14 +81,12 @@ export const se_CreateVirtualClusterCommand = async (input, context) => {
83
81
  };
84
82
  const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/virtualclusters";
85
83
  let body;
86
- body = JSON.stringify({
87
- clientToken: input.clientToken ?? generateIdempotencyToken(),
88
- ...(input.containerProvider != null && {
89
- containerProvider: se_ContainerProvider(input.containerProvider, context),
90
- }),
91
- ...(input.name != null && { name: input.name }),
92
- ...(input.tags != null && { tags: se_TagMap(input.tags, context) }),
93
- });
84
+ body = JSON.stringify(take(input, {
85
+ clientToken: [true, (_) => _ ?? generateIdempotencyToken()],
86
+ containerProvider: (_) => _json(_),
87
+ name: [],
88
+ tags: (_) => _json(_),
89
+ }));
94
90
  return new __HttpRequest({
95
91
  protocol,
96
92
  hostname,
@@ -367,24 +363,18 @@ export const se_StartJobRunCommand = async (input, context) => {
367
363
  "/virtualclusters/{virtualClusterId}/jobruns";
368
364
  resolvedPath = __resolvedPath(resolvedPath, input, "virtualClusterId", () => input.virtualClusterId, "{virtualClusterId}", false);
369
365
  let body;
370
- body = JSON.stringify({
371
- clientToken: input.clientToken ?? generateIdempotencyToken(),
372
- ...(input.configurationOverrides != null && {
373
- configurationOverrides: se_ConfigurationOverrides(input.configurationOverrides, context),
374
- }),
375
- ...(input.executionRoleArn != null && { executionRoleArn: input.executionRoleArn }),
376
- ...(input.jobDriver != null && { jobDriver: se_JobDriver(input.jobDriver, context) }),
377
- ...(input.jobTemplateId != null && { jobTemplateId: input.jobTemplateId }),
378
- ...(input.jobTemplateParameters != null && {
379
- jobTemplateParameters: se_TemplateParameterInputMap(input.jobTemplateParameters, context),
380
- }),
381
- ...(input.name != null && { name: input.name }),
382
- ...(input.releaseLabel != null && { releaseLabel: input.releaseLabel }),
383
- ...(input.retryPolicyConfiguration != null && {
384
- retryPolicyConfiguration: se_RetryPolicyConfiguration(input.retryPolicyConfiguration, context),
385
- }),
386
- ...(input.tags != null && { tags: se_TagMap(input.tags, context) }),
387
- });
366
+ body = JSON.stringify(take(input, {
367
+ clientToken: [true, (_) => _ ?? generateIdempotencyToken()],
368
+ configurationOverrides: (_) => se_ConfigurationOverrides(_, context),
369
+ executionRoleArn: [],
370
+ jobDriver: (_) => _json(_),
371
+ jobTemplateId: [],
372
+ jobTemplateParameters: (_) => _json(_),
373
+ name: [],
374
+ releaseLabel: [],
375
+ retryPolicyConfiguration: (_) => _json(_),
376
+ tags: (_) => _json(_),
377
+ }));
388
378
  return new __HttpRequest({
389
379
  protocol,
390
380
  hostname,
@@ -403,9 +393,9 @@ export const se_TagResourceCommand = async (input, context) => {
403
393
  let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/tags/{resourceArn}";
404
394
  resolvedPath = __resolvedPath(resolvedPath, input, "resourceArn", () => input.resourceArn, "{resourceArn}", false);
405
395
  let body;
406
- body = JSON.stringify({
407
- ...(input.tags != null && { tags: se_TagMap(input.tags, context) }),
408
- });
396
+ body = JSON.stringify(take(input, {
397
+ tags: (_) => _json(_),
398
+ }));
409
399
  return new __HttpRequest({
410
400
  protocol,
411
401
  hostname,
@@ -447,12 +437,11 @@ export const de_CancelJobRunCommand = async (output, context) => {
447
437
  $metadata: deserializeMetadata(output),
448
438
  });
449
439
  const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
450
- if (data.id != null) {
451
- contents.id = __expectString(data.id);
452
- }
453
- if (data.virtualClusterId != null) {
454
- contents.virtualClusterId = __expectString(data.virtualClusterId);
455
- }
440
+ const doc = take(data, {
441
+ id: __expectString,
442
+ virtualClusterId: __expectString,
443
+ });
444
+ Object.assign(contents, doc);
456
445
  return contents;
457
446
  };
458
447
  const de_CancelJobRunCommandError = async (output, context) => {
@@ -470,10 +459,9 @@ const de_CancelJobRunCommandError = async (output, context) => {
470
459
  throw await de_ValidationExceptionRes(parsedOutput, context);
471
460
  default:
472
461
  const parsedBody = parsedOutput.body;
473
- throwDefaultError({
462
+ return throwDefaultError({
474
463
  output,
475
464
  parsedBody,
476
- exceptionCtor: __BaseException,
477
465
  errorCode,
478
466
  });
479
467
  }
@@ -486,18 +474,13 @@ export const de_CreateJobTemplateCommand = async (output, context) => {
486
474
  $metadata: deserializeMetadata(output),
487
475
  });
488
476
  const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
489
- if (data.arn != null) {
490
- contents.arn = __expectString(data.arn);
491
- }
492
- if (data.createdAt != null) {
493
- contents.createdAt = __expectNonNull(__parseRfc3339DateTimeWithOffset(data.createdAt));
494
- }
495
- if (data.id != null) {
496
- contents.id = __expectString(data.id);
497
- }
498
- if (data.name != null) {
499
- contents.name = __expectString(data.name);
500
- }
477
+ const doc = take(data, {
478
+ arn: __expectString,
479
+ createdAt: (_) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)),
480
+ id: __expectString,
481
+ name: __expectString,
482
+ });
483
+ Object.assign(contents, doc);
501
484
  return contents;
502
485
  };
503
486
  const de_CreateJobTemplateCommandError = async (output, context) => {
@@ -518,10 +501,9 @@ const de_CreateJobTemplateCommandError = async (output, context) => {
518
501
  throw await de_ValidationExceptionRes(parsedOutput, context);
519
502
  default:
520
503
  const parsedBody = parsedOutput.body;
521
- throwDefaultError({
504
+ return throwDefaultError({
522
505
  output,
523
506
  parsedBody,
524
- exceptionCtor: __BaseException,
525
507
  errorCode,
526
508
  });
527
509
  }
@@ -534,18 +516,13 @@ export const de_CreateManagedEndpointCommand = async (output, context) => {
534
516
  $metadata: deserializeMetadata(output),
535
517
  });
536
518
  const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
537
- if (data.arn != null) {
538
- contents.arn = __expectString(data.arn);
539
- }
540
- if (data.id != null) {
541
- contents.id = __expectString(data.id);
542
- }
543
- if (data.name != null) {
544
- contents.name = __expectString(data.name);
545
- }
546
- if (data.virtualClusterId != null) {
547
- contents.virtualClusterId = __expectString(data.virtualClusterId);
548
- }
519
+ const doc = take(data, {
520
+ arn: __expectString,
521
+ id: __expectString,
522
+ name: __expectString,
523
+ virtualClusterId: __expectString,
524
+ });
525
+ Object.assign(contents, doc);
549
526
  return contents;
550
527
  };
551
528
  const de_CreateManagedEndpointCommandError = async (output, context) => {
@@ -566,10 +543,9 @@ const de_CreateManagedEndpointCommandError = async (output, context) => {
566
543
  throw await de_ValidationExceptionRes(parsedOutput, context);
567
544
  default:
568
545
  const parsedBody = parsedOutput.body;
569
- throwDefaultError({
546
+ return throwDefaultError({
570
547
  output,
571
548
  parsedBody,
572
- exceptionCtor: __BaseException,
573
549
  errorCode,
574
550
  });
575
551
  }
@@ -582,15 +558,12 @@ export const de_CreateVirtualClusterCommand = async (output, context) => {
582
558
  $metadata: deserializeMetadata(output),
583
559
  });
584
560
  const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
585
- if (data.arn != null) {
586
- contents.arn = __expectString(data.arn);
587
- }
588
- if (data.id != null) {
589
- contents.id = __expectString(data.id);
590
- }
591
- if (data.name != null) {
592
- contents.name = __expectString(data.name);
593
- }
561
+ const doc = take(data, {
562
+ arn: __expectString,
563
+ id: __expectString,
564
+ name: __expectString,
565
+ });
566
+ Object.assign(contents, doc);
594
567
  return contents;
595
568
  };
596
569
  const de_CreateVirtualClusterCommandError = async (output, context) => {
@@ -611,10 +584,9 @@ const de_CreateVirtualClusterCommandError = async (output, context) => {
611
584
  throw await de_ValidationExceptionRes(parsedOutput, context);
612
585
  default:
613
586
  const parsedBody = parsedOutput.body;
614
- throwDefaultError({
587
+ return throwDefaultError({
615
588
  output,
616
589
  parsedBody,
617
- exceptionCtor: __BaseException,
618
590
  errorCode,
619
591
  });
620
592
  }
@@ -627,9 +599,10 @@ export const de_DeleteJobTemplateCommand = async (output, context) => {
627
599
  $metadata: deserializeMetadata(output),
628
600
  });
629
601
  const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
630
- if (data.id != null) {
631
- contents.id = __expectString(data.id);
632
- }
602
+ const doc = take(data, {
603
+ id: __expectString,
604
+ });
605
+ Object.assign(contents, doc);
633
606
  return contents;
634
607
  };
635
608
  const de_DeleteJobTemplateCommandError = async (output, context) => {
@@ -647,10 +620,9 @@ const de_DeleteJobTemplateCommandError = async (output, context) => {
647
620
  throw await de_ValidationExceptionRes(parsedOutput, context);
648
621
  default:
649
622
  const parsedBody = parsedOutput.body;
650
- throwDefaultError({
623
+ return throwDefaultError({
651
624
  output,
652
625
  parsedBody,
653
- exceptionCtor: __BaseException,
654
626
  errorCode,
655
627
  });
656
628
  }
@@ -663,12 +635,11 @@ export const de_DeleteManagedEndpointCommand = async (output, context) => {
663
635
  $metadata: deserializeMetadata(output),
664
636
  });
665
637
  const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
666
- if (data.id != null) {
667
- contents.id = __expectString(data.id);
668
- }
669
- if (data.virtualClusterId != null) {
670
- contents.virtualClusterId = __expectString(data.virtualClusterId);
671
- }
638
+ const doc = take(data, {
639
+ id: __expectString,
640
+ virtualClusterId: __expectString,
641
+ });
642
+ Object.assign(contents, doc);
672
643
  return contents;
673
644
  };
674
645
  const de_DeleteManagedEndpointCommandError = async (output, context) => {
@@ -686,10 +657,9 @@ const de_DeleteManagedEndpointCommandError = async (output, context) => {
686
657
  throw await de_ValidationExceptionRes(parsedOutput, context);
687
658
  default:
688
659
  const parsedBody = parsedOutput.body;
689
- throwDefaultError({
660
+ return throwDefaultError({
690
661
  output,
691
662
  parsedBody,
692
- exceptionCtor: __BaseException,
693
663
  errorCode,
694
664
  });
695
665
  }
@@ -702,9 +672,10 @@ export const de_DeleteVirtualClusterCommand = async (output, context) => {
702
672
  $metadata: deserializeMetadata(output),
703
673
  });
704
674
  const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
705
- if (data.id != null) {
706
- contents.id = __expectString(data.id);
707
- }
675
+ const doc = take(data, {
676
+ id: __expectString,
677
+ });
678
+ Object.assign(contents, doc);
708
679
  return contents;
709
680
  };
710
681
  const de_DeleteVirtualClusterCommandError = async (output, context) => {
@@ -722,10 +693,9 @@ const de_DeleteVirtualClusterCommandError = async (output, context) => {
722
693
  throw await de_ValidationExceptionRes(parsedOutput, context);
723
694
  default:
724
695
  const parsedBody = parsedOutput.body;
725
- throwDefaultError({
696
+ return throwDefaultError({
726
697
  output,
727
698
  parsedBody,
728
- exceptionCtor: __BaseException,
729
699
  errorCode,
730
700
  });
731
701
  }
@@ -738,9 +708,10 @@ export const de_DescribeJobRunCommand = async (output, context) => {
738
708
  $metadata: deserializeMetadata(output),
739
709
  });
740
710
  const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
741
- if (data.jobRun != null) {
742
- contents.jobRun = de_JobRun(data.jobRun, context);
743
- }
711
+ const doc = take(data, {
712
+ jobRun: (_) => de_JobRun(_, context),
713
+ });
714
+ Object.assign(contents, doc);
744
715
  return contents;
745
716
  };
746
717
  const de_DescribeJobRunCommandError = async (output, context) => {
@@ -761,10 +732,9 @@ const de_DescribeJobRunCommandError = async (output, context) => {
761
732
  throw await de_ValidationExceptionRes(parsedOutput, context);
762
733
  default:
763
734
  const parsedBody = parsedOutput.body;
764
- throwDefaultError({
735
+ return throwDefaultError({
765
736
  output,
766
737
  parsedBody,
767
- exceptionCtor: __BaseException,
768
738
  errorCode,
769
739
  });
770
740
  }
@@ -777,9 +747,10 @@ export const de_DescribeJobTemplateCommand = async (output, context) => {
777
747
  $metadata: deserializeMetadata(output),
778
748
  });
779
749
  const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
780
- if (data.jobTemplate != null) {
781
- contents.jobTemplate = de_JobTemplate(data.jobTemplate, context);
782
- }
750
+ const doc = take(data, {
751
+ jobTemplate: (_) => de_JobTemplate(_, context),
752
+ });
753
+ Object.assign(contents, doc);
783
754
  return contents;
784
755
  };
785
756
  const de_DescribeJobTemplateCommandError = async (output, context) => {
@@ -800,10 +771,9 @@ const de_DescribeJobTemplateCommandError = async (output, context) => {
800
771
  throw await de_ValidationExceptionRes(parsedOutput, context);
801
772
  default:
802
773
  const parsedBody = parsedOutput.body;
803
- throwDefaultError({
774
+ return throwDefaultError({
804
775
  output,
805
776
  parsedBody,
806
- exceptionCtor: __BaseException,
807
777
  errorCode,
808
778
  });
809
779
  }
@@ -816,9 +786,10 @@ export const de_DescribeManagedEndpointCommand = async (output, context) => {
816
786
  $metadata: deserializeMetadata(output),
817
787
  });
818
788
  const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
819
- if (data.endpoint != null) {
820
- contents.endpoint = de_Endpoint(data.endpoint, context);
821
- }
789
+ const doc = take(data, {
790
+ endpoint: (_) => de_Endpoint(_, context),
791
+ });
792
+ Object.assign(contents, doc);
822
793
  return contents;
823
794
  };
824
795
  const de_DescribeManagedEndpointCommandError = async (output, context) => {
@@ -839,10 +810,9 @@ const de_DescribeManagedEndpointCommandError = async (output, context) => {
839
810
  throw await de_ValidationExceptionRes(parsedOutput, context);
840
811
  default:
841
812
  const parsedBody = parsedOutput.body;
842
- throwDefaultError({
813
+ return throwDefaultError({
843
814
  output,
844
815
  parsedBody,
845
- exceptionCtor: __BaseException,
846
816
  errorCode,
847
817
  });
848
818
  }
@@ -855,9 +825,10 @@ export const de_DescribeVirtualClusterCommand = async (output, context) => {
855
825
  $metadata: deserializeMetadata(output),
856
826
  });
857
827
  const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
858
- if (data.virtualCluster != null) {
859
- contents.virtualCluster = de_VirtualCluster(data.virtualCluster, context);
860
- }
828
+ const doc = take(data, {
829
+ virtualCluster: (_) => de_VirtualCluster(_, context),
830
+ });
831
+ Object.assign(contents, doc);
861
832
  return contents;
862
833
  };
863
834
  const de_DescribeVirtualClusterCommandError = async (output, context) => {
@@ -878,10 +849,9 @@ const de_DescribeVirtualClusterCommandError = async (output, context) => {
878
849
  throw await de_ValidationExceptionRes(parsedOutput, context);
879
850
  default:
880
851
  const parsedBody = parsedOutput.body;
881
- throwDefaultError({
852
+ return throwDefaultError({
882
853
  output,
883
854
  parsedBody,
884
- exceptionCtor: __BaseException,
885
855
  errorCode,
886
856
  });
887
857
  }
@@ -894,12 +864,11 @@ export const de_ListJobRunsCommand = async (output, context) => {
894
864
  $metadata: deserializeMetadata(output),
895
865
  });
896
866
  const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
897
- if (data.jobRuns != null) {
898
- contents.jobRuns = de_JobRuns(data.jobRuns, context);
899
- }
900
- if (data.nextToken != null) {
901
- contents.nextToken = __expectString(data.nextToken);
902
- }
867
+ const doc = take(data, {
868
+ jobRuns: (_) => de_JobRuns(_, context),
869
+ nextToken: __expectString,
870
+ });
871
+ Object.assign(contents, doc);
903
872
  return contents;
904
873
  };
905
874
  const de_ListJobRunsCommandError = async (output, context) => {
@@ -917,10 +886,9 @@ const de_ListJobRunsCommandError = async (output, context) => {
917
886
  throw await de_ValidationExceptionRes(parsedOutput, context);
918
887
  default:
919
888
  const parsedBody = parsedOutput.body;
920
- throwDefaultError({
889
+ return throwDefaultError({
921
890
  output,
922
891
  parsedBody,
923
- exceptionCtor: __BaseException,
924
892
  errorCode,
925
893
  });
926
894
  }
@@ -933,12 +901,11 @@ export const de_ListJobTemplatesCommand = async (output, context) => {
933
901
  $metadata: deserializeMetadata(output),
934
902
  });
935
903
  const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
936
- if (data.nextToken != null) {
937
- contents.nextToken = __expectString(data.nextToken);
938
- }
939
- if (data.templates != null) {
940
- contents.templates = de_JobTemplates(data.templates, context);
941
- }
904
+ const doc = take(data, {
905
+ nextToken: __expectString,
906
+ templates: (_) => de_JobTemplates(_, context),
907
+ });
908
+ Object.assign(contents, doc);
942
909
  return contents;
943
910
  };
944
911
  const de_ListJobTemplatesCommandError = async (output, context) => {
@@ -956,10 +923,9 @@ const de_ListJobTemplatesCommandError = async (output, context) => {
956
923
  throw await de_ValidationExceptionRes(parsedOutput, context);
957
924
  default:
958
925
  const parsedBody = parsedOutput.body;
959
- throwDefaultError({
926
+ return throwDefaultError({
960
927
  output,
961
928
  parsedBody,
962
- exceptionCtor: __BaseException,
963
929
  errorCode,
964
930
  });
965
931
  }
@@ -972,12 +938,11 @@ export const de_ListManagedEndpointsCommand = async (output, context) => {
972
938
  $metadata: deserializeMetadata(output),
973
939
  });
974
940
  const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
975
- if (data.endpoints != null) {
976
- contents.endpoints = de_Endpoints(data.endpoints, context);
977
- }
978
- if (data.nextToken != null) {
979
- contents.nextToken = __expectString(data.nextToken);
980
- }
941
+ const doc = take(data, {
942
+ endpoints: (_) => de_Endpoints(_, context),
943
+ nextToken: __expectString,
944
+ });
945
+ Object.assign(contents, doc);
981
946
  return contents;
982
947
  };
983
948
  const de_ListManagedEndpointsCommandError = async (output, context) => {
@@ -995,10 +960,9 @@ const de_ListManagedEndpointsCommandError = async (output, context) => {
995
960
  throw await de_ValidationExceptionRes(parsedOutput, context);
996
961
  default:
997
962
  const parsedBody = parsedOutput.body;
998
- throwDefaultError({
963
+ return throwDefaultError({
999
964
  output,
1000
965
  parsedBody,
1001
- exceptionCtor: __BaseException,
1002
966
  errorCode,
1003
967
  });
1004
968
  }
@@ -1011,9 +975,10 @@ export const de_ListTagsForResourceCommand = async (output, context) => {
1011
975
  $metadata: deserializeMetadata(output),
1012
976
  });
1013
977
  const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
1014
- if (data.tags != null) {
1015
- contents.tags = de_TagMap(data.tags, context);
1016
- }
978
+ const doc = take(data, {
979
+ tags: _json,
980
+ });
981
+ Object.assign(contents, doc);
1017
982
  return contents;
1018
983
  };
1019
984
  const de_ListTagsForResourceCommandError = async (output, context) => {
@@ -1034,10 +999,9 @@ const de_ListTagsForResourceCommandError = async (output, context) => {
1034
999
  throw await de_ValidationExceptionRes(parsedOutput, context);
1035
1000
  default:
1036
1001
  const parsedBody = parsedOutput.body;
1037
- throwDefaultError({
1002
+ return throwDefaultError({
1038
1003
  output,
1039
1004
  parsedBody,
1040
- exceptionCtor: __BaseException,
1041
1005
  errorCode,
1042
1006
  });
1043
1007
  }
@@ -1050,12 +1014,11 @@ export const de_ListVirtualClustersCommand = async (output, context) => {
1050
1014
  $metadata: deserializeMetadata(output),
1051
1015
  });
1052
1016
  const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
1053
- if (data.nextToken != null) {
1054
- contents.nextToken = __expectString(data.nextToken);
1055
- }
1056
- if (data.virtualClusters != null) {
1057
- contents.virtualClusters = de_VirtualClusters(data.virtualClusters, context);
1058
- }
1017
+ const doc = take(data, {
1018
+ nextToken: __expectString,
1019
+ virtualClusters: (_) => de_VirtualClusters(_, context),
1020
+ });
1021
+ Object.assign(contents, doc);
1059
1022
  return contents;
1060
1023
  };
1061
1024
  const de_ListVirtualClustersCommandError = async (output, context) => {
@@ -1073,10 +1036,9 @@ const de_ListVirtualClustersCommandError = async (output, context) => {
1073
1036
  throw await de_ValidationExceptionRes(parsedOutput, context);
1074
1037
  default:
1075
1038
  const parsedBody = parsedOutput.body;
1076
- throwDefaultError({
1039
+ return throwDefaultError({
1077
1040
  output,
1078
1041
  parsedBody,
1079
- exceptionCtor: __BaseException,
1080
1042
  errorCode,
1081
1043
  });
1082
1044
  }
@@ -1089,18 +1051,13 @@ export const de_StartJobRunCommand = async (output, context) => {
1089
1051
  $metadata: deserializeMetadata(output),
1090
1052
  });
1091
1053
  const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
1092
- if (data.arn != null) {
1093
- contents.arn = __expectString(data.arn);
1094
- }
1095
- if (data.id != null) {
1096
- contents.id = __expectString(data.id);
1097
- }
1098
- if (data.name != null) {
1099
- contents.name = __expectString(data.name);
1100
- }
1101
- if (data.virtualClusterId != null) {
1102
- contents.virtualClusterId = __expectString(data.virtualClusterId);
1103
- }
1054
+ const doc = take(data, {
1055
+ arn: __expectString,
1056
+ id: __expectString,
1057
+ name: __expectString,
1058
+ virtualClusterId: __expectString,
1059
+ });
1060
+ Object.assign(contents, doc);
1104
1061
  return contents;
1105
1062
  };
1106
1063
  const de_StartJobRunCommandError = async (output, context) => {
@@ -1121,10 +1078,9 @@ const de_StartJobRunCommandError = async (output, context) => {
1121
1078
  throw await de_ValidationExceptionRes(parsedOutput, context);
1122
1079
  default:
1123
1080
  const parsedBody = parsedOutput.body;
1124
- throwDefaultError({
1081
+ return throwDefaultError({
1125
1082
  output,
1126
1083
  parsedBody,
1127
- exceptionCtor: __BaseException,
1128
1084
  errorCode,
1129
1085
  });
1130
1086
  }
@@ -1157,10 +1113,9 @@ const de_TagResourceCommandError = async (output, context) => {
1157
1113
  throw await de_ValidationExceptionRes(parsedOutput, context);
1158
1114
  default:
1159
1115
  const parsedBody = parsedOutput.body;
1160
- throwDefaultError({
1116
+ return throwDefaultError({
1161
1117
  output,
1162
1118
  parsedBody,
1163
- exceptionCtor: __BaseException,
1164
1119
  errorCode,
1165
1120
  });
1166
1121
  }
@@ -1193,21 +1148,21 @@ const de_UntagResourceCommandError = async (output, context) => {
1193
1148
  throw await de_ValidationExceptionRes(parsedOutput, context);
1194
1149
  default:
1195
1150
  const parsedBody = parsedOutput.body;
1196
- throwDefaultError({
1151
+ return throwDefaultError({
1197
1152
  output,
1198
1153
  parsedBody,
1199
- exceptionCtor: __BaseException,
1200
1154
  errorCode,
1201
1155
  });
1202
1156
  }
1203
1157
  };
1204
- const map = __map;
1158
+ const throwDefaultError = withBaseException(__BaseException);
1205
1159
  const de_InternalServerExceptionRes = async (parsedOutput, context) => {
1206
1160
  const contents = map({});
1207
1161
  const data = parsedOutput.body;
1208
- if (data.message != null) {
1209
- contents.message = __expectString(data.message);
1210
- }
1162
+ const doc = take(data, {
1163
+ message: __expectString,
1164
+ });
1165
+ Object.assign(contents, doc);
1211
1166
  const exception = new InternalServerException({
1212
1167
  $metadata: deserializeMetadata(parsedOutput),
1213
1168
  ...contents,
@@ -1217,9 +1172,10 @@ const de_InternalServerExceptionRes = async (parsedOutput, context) => {
1217
1172
  const de_ResourceNotFoundExceptionRes = async (parsedOutput, context) => {
1218
1173
  const contents = map({});
1219
1174
  const data = parsedOutput.body;
1220
- if (data.message != null) {
1221
- contents.message = __expectString(data.message);
1222
- }
1175
+ const doc = take(data, {
1176
+ message: __expectString,
1177
+ });
1178
+ Object.assign(contents, doc);
1223
1179
  const exception = new ResourceNotFoundException({
1224
1180
  $metadata: deserializeMetadata(parsedOutput),
1225
1181
  ...contents,
@@ -1229,27 +1185,22 @@ const de_ResourceNotFoundExceptionRes = async (parsedOutput, context) => {
1229
1185
  const de_ValidationExceptionRes = async (parsedOutput, context) => {
1230
1186
  const contents = map({});
1231
1187
  const data = parsedOutput.body;
1232
- if (data.message != null) {
1233
- contents.message = __expectString(data.message);
1234
- }
1188
+ const doc = take(data, {
1189
+ message: __expectString,
1190
+ });
1191
+ Object.assign(contents, doc);
1235
1192
  const exception = new ValidationException({
1236
1193
  $metadata: deserializeMetadata(parsedOutput),
1237
1194
  ...contents,
1238
1195
  });
1239
1196
  return __decorateServiceException(exception, parsedOutput.body);
1240
1197
  };
1241
- const se_CloudWatchMonitoringConfiguration = (input, context) => {
1242
- return {
1243
- ...(input.logGroupName != null && { logGroupName: input.logGroupName }),
1244
- ...(input.logStreamNamePrefix != null && { logStreamNamePrefix: input.logStreamNamePrefix }),
1245
- };
1246
- };
1247
1198
  const se_Configuration = (input, context) => {
1248
- return {
1249
- ...(input.classification != null && { classification: input.classification }),
1250
- ...(input.configurations != null && { configurations: se_ConfigurationList(input.configurations, context) }),
1251
- ...(input.properties != null && { properties: se_SensitivePropertiesMap(input.properties, context) }),
1252
- };
1199
+ return take(input, {
1200
+ classification: [],
1201
+ configurations: (_) => se_ConfigurationList(_, context),
1202
+ properties: _json,
1203
+ });
1253
1204
  };
1254
1205
  const se_ConfigurationList = (input, context) => {
1255
1206
  return input
@@ -1259,494 +1210,160 @@ const se_ConfigurationList = (input, context) => {
1259
1210
  });
1260
1211
  };
1261
1212
  const se_ConfigurationOverrides = (input, context) => {
1262
- return {
1263
- ...(input.applicationConfiguration != null && {
1264
- applicationConfiguration: se_ConfigurationList(input.applicationConfiguration, context),
1265
- }),
1266
- ...(input.monitoringConfiguration != null && {
1267
- monitoringConfiguration: se_MonitoringConfiguration(input.monitoringConfiguration, context),
1268
- }),
1269
- };
1270
- };
1271
- const se_ContainerInfo = (input, context) => {
1272
- return ContainerInfo.visit(input, {
1273
- eksInfo: (value) => ({ eksInfo: se_EksInfo(value, context) }),
1274
- _: (name, value) => ({ name: value }),
1275
- });
1276
- };
1277
- const se_ContainerProvider = (input, context) => {
1278
- return {
1279
- ...(input.id != null && { id: input.id }),
1280
- ...(input.info != null && { info: se_ContainerInfo(input.info, context) }),
1281
- ...(input.type != null && { type: input.type }),
1282
- };
1283
- };
1284
- const se_EksInfo = (input, context) => {
1285
- return {
1286
- ...(input.namespace != null && { namespace: input.namespace }),
1287
- };
1288
- };
1289
- const se_EntryPointArguments = (input, context) => {
1290
- return input
1291
- .filter((e) => e != null)
1292
- .map((entry) => {
1293
- return entry;
1213
+ return take(input, {
1214
+ applicationConfiguration: (_) => se_ConfigurationList(_, context),
1215
+ monitoringConfiguration: _json,
1294
1216
  });
1295
1217
  };
1296
- const se_JobDriver = (input, context) => {
1297
- return {
1298
- ...(input.sparkSqlJobDriver != null && {
1299
- sparkSqlJobDriver: se_SparkSqlJobDriver(input.sparkSqlJobDriver, context),
1300
- }),
1301
- ...(input.sparkSubmitJobDriver != null && {
1302
- sparkSubmitJobDriver: se_SparkSubmitJobDriver(input.sparkSubmitJobDriver, context),
1303
- }),
1304
- };
1305
- };
1306
1218
  const se_JobTemplateData = (input, context) => {
1307
- return {
1308
- ...(input.configurationOverrides != null && {
1309
- configurationOverrides: se_ParametricConfigurationOverrides(input.configurationOverrides, context),
1310
- }),
1311
- ...(input.executionRoleArn != null && { executionRoleArn: input.executionRoleArn }),
1312
- ...(input.jobDriver != null && { jobDriver: se_JobDriver(input.jobDriver, context) }),
1313
- ...(input.jobTags != null && { jobTags: se_TagMap(input.jobTags, context) }),
1314
- ...(input.parameterConfiguration != null && {
1315
- parameterConfiguration: se_TemplateParameterConfigurationMap(input.parameterConfiguration, context),
1316
- }),
1317
- ...(input.releaseLabel != null && { releaseLabel: input.releaseLabel }),
1318
- };
1319
- };
1320
- const se_MonitoringConfiguration = (input, context) => {
1321
- return {
1322
- ...(input.cloudWatchMonitoringConfiguration != null && {
1323
- cloudWatchMonitoringConfiguration: se_CloudWatchMonitoringConfiguration(input.cloudWatchMonitoringConfiguration, context),
1324
- }),
1325
- ...(input.persistentAppUI != null && { persistentAppUI: input.persistentAppUI }),
1326
- ...(input.s3MonitoringConfiguration != null && {
1327
- s3MonitoringConfiguration: se_S3MonitoringConfiguration(input.s3MonitoringConfiguration, context),
1328
- }),
1329
- };
1330
- };
1331
- const se_ParametricCloudWatchMonitoringConfiguration = (input, context) => {
1332
- return {
1333
- ...(input.logGroupName != null && { logGroupName: input.logGroupName }),
1334
- ...(input.logStreamNamePrefix != null && { logStreamNamePrefix: input.logStreamNamePrefix }),
1335
- };
1219
+ return take(input, {
1220
+ configurationOverrides: (_) => se_ParametricConfigurationOverrides(_, context),
1221
+ executionRoleArn: [],
1222
+ jobDriver: _json,
1223
+ jobTags: _json,
1224
+ parameterConfiguration: _json,
1225
+ releaseLabel: [],
1226
+ });
1336
1227
  };
1337
1228
  const se_ParametricConfigurationOverrides = (input, context) => {
1338
- return {
1339
- ...(input.applicationConfiguration != null && {
1340
- applicationConfiguration: se_ConfigurationList(input.applicationConfiguration, context),
1341
- }),
1342
- ...(input.monitoringConfiguration != null && {
1343
- monitoringConfiguration: se_ParametricMonitoringConfiguration(input.monitoringConfiguration, context),
1344
- }),
1345
- };
1346
- };
1347
- const se_ParametricMonitoringConfiguration = (input, context) => {
1348
- return {
1349
- ...(input.cloudWatchMonitoringConfiguration != null && {
1350
- cloudWatchMonitoringConfiguration: se_ParametricCloudWatchMonitoringConfiguration(input.cloudWatchMonitoringConfiguration, context),
1351
- }),
1352
- ...(input.persistentAppUI != null && { persistentAppUI: input.persistentAppUI }),
1353
- ...(input.s3MonitoringConfiguration != null && {
1354
- s3MonitoringConfiguration: se_ParametricS3MonitoringConfiguration(input.s3MonitoringConfiguration, context),
1355
- }),
1356
- };
1357
- };
1358
- const se_ParametricS3MonitoringConfiguration = (input, context) => {
1359
- return {
1360
- ...(input.logUri != null && { logUri: input.logUri }),
1361
- };
1362
- };
1363
- const se_RetryPolicyConfiguration = (input, context) => {
1364
- return {
1365
- ...(input.maxAttempts != null && { maxAttempts: input.maxAttempts }),
1366
- };
1367
- };
1368
- const se_S3MonitoringConfiguration = (input, context) => {
1369
- return {
1370
- ...(input.logUri != null && { logUri: input.logUri }),
1371
- };
1372
- };
1373
- const se_SensitivePropertiesMap = (input, context) => {
1374
- return Object.entries(input).reduce((acc, [key, value]) => {
1375
- if (value === null) {
1376
- return acc;
1377
- }
1378
- acc[key] = value;
1379
- return acc;
1380
- }, {});
1381
- };
1382
- const se_SparkSqlJobDriver = (input, context) => {
1383
- return {
1384
- ...(input.entryPoint != null && { entryPoint: input.entryPoint }),
1385
- ...(input.sparkSqlParameters != null && { sparkSqlParameters: input.sparkSqlParameters }),
1386
- };
1387
- };
1388
- const se_SparkSubmitJobDriver = (input, context) => {
1389
- return {
1390
- ...(input.entryPoint != null && { entryPoint: input.entryPoint }),
1391
- ...(input.entryPointArguments != null && {
1392
- entryPointArguments: se_EntryPointArguments(input.entryPointArguments, context),
1393
- }),
1394
- ...(input.sparkSubmitParameters != null && { sparkSubmitParameters: input.sparkSubmitParameters }),
1395
- };
1396
- };
1397
- const se_TagMap = (input, context) => {
1398
- return Object.entries(input).reduce((acc, [key, value]) => {
1399
- if (value === null) {
1400
- return acc;
1401
- }
1402
- acc[key] = value;
1403
- return acc;
1404
- }, {});
1405
- };
1406
- const se_TemplateParameterConfiguration = (input, context) => {
1407
- return {
1408
- ...(input.defaultValue != null && { defaultValue: input.defaultValue }),
1409
- ...(input.type != null && { type: input.type }),
1410
- };
1411
- };
1412
- const se_TemplateParameterConfigurationMap = (input, context) => {
1413
- return Object.entries(input).reduce((acc, [key, value]) => {
1414
- if (value === null) {
1415
- return acc;
1416
- }
1417
- acc[key] = se_TemplateParameterConfiguration(value, context);
1418
- return acc;
1419
- }, {});
1420
- };
1421
- const se_TemplateParameterInputMap = (input, context) => {
1422
- return Object.entries(input).reduce((acc, [key, value]) => {
1423
- if (value === null) {
1424
- return acc;
1425
- }
1426
- acc[key] = value;
1427
- return acc;
1428
- }, {});
1429
- };
1430
- const de_Certificate = (output, context) => {
1431
- return {
1432
- certificateArn: __expectString(output.certificateArn),
1433
- certificateData: __expectString(output.certificateData),
1434
- };
1435
- };
1436
- const de_CloudWatchMonitoringConfiguration = (output, context) => {
1437
- return {
1438
- logGroupName: __expectString(output.logGroupName),
1439
- logStreamNamePrefix: __expectString(output.logStreamNamePrefix),
1440
- };
1229
+ return take(input, {
1230
+ applicationConfiguration: (_) => se_ConfigurationList(_, context),
1231
+ monitoringConfiguration: _json,
1232
+ });
1441
1233
  };
1442
1234
  const de_Configuration = (output, context) => {
1443
- return {
1444
- classification: __expectString(output.classification),
1445
- configurations: output.configurations != null ? de_ConfigurationList(output.configurations, context) : undefined,
1446
- properties: output.properties != null ? de_SensitivePropertiesMap(output.properties, context) : undefined,
1447
- };
1235
+ return take(output, {
1236
+ classification: __expectString,
1237
+ configurations: (_) => de_ConfigurationList(_, context),
1238
+ properties: _json,
1239
+ });
1448
1240
  };
1449
1241
  const de_ConfigurationList = (output, context) => {
1450
1242
  const retVal = (output || [])
1451
1243
  .filter((e) => e != null)
1452
1244
  .map((entry) => {
1453
- if (entry === null) {
1454
- return null;
1455
- }
1456
1245
  return de_Configuration(entry, context);
1457
1246
  });
1458
1247
  return retVal;
1459
1248
  };
1460
1249
  const de_ConfigurationOverrides = (output, context) => {
1461
- return {
1462
- applicationConfiguration: output.applicationConfiguration != null
1463
- ? de_ConfigurationList(output.applicationConfiguration, context)
1464
- : undefined,
1465
- monitoringConfiguration: output.monitoringConfiguration != null
1466
- ? de_MonitoringConfiguration(output.monitoringConfiguration, context)
1467
- : undefined,
1468
- };
1469
- };
1470
- const de_ContainerInfo = (output, context) => {
1471
- if (output.eksInfo != null) {
1472
- return {
1473
- eksInfo: de_EksInfo(output.eksInfo, context),
1474
- };
1475
- }
1476
- return { $unknown: Object.entries(output)[0] };
1477
- };
1478
- const de_ContainerProvider = (output, context) => {
1479
- return {
1480
- id: __expectString(output.id),
1481
- info: output.info != null ? de_ContainerInfo(__expectUnion(output.info), context) : undefined,
1482
- type: __expectString(output.type),
1483
- };
1484
- };
1485
- const de_EksInfo = (output, context) => {
1486
- return {
1487
- namespace: __expectString(output.namespace),
1488
- };
1250
+ return take(output, {
1251
+ applicationConfiguration: (_) => de_ConfigurationList(_, context),
1252
+ monitoringConfiguration: _json,
1253
+ });
1489
1254
  };
1490
1255
  const de_Endpoint = (output, context) => {
1491
- return {
1492
- arn: __expectString(output.arn),
1493
- certificateArn: __expectString(output.certificateArn),
1494
- certificateAuthority: output.certificateAuthority != null ? de_Certificate(output.certificateAuthority, context) : undefined,
1495
- configurationOverrides: output.configurationOverrides != null
1496
- ? de_ConfigurationOverrides(output.configurationOverrides, context)
1497
- : undefined,
1498
- createdAt: output.createdAt != null ? __expectNonNull(__parseRfc3339DateTimeWithOffset(output.createdAt)) : undefined,
1499
- executionRoleArn: __expectString(output.executionRoleArn),
1500
- failureReason: __expectString(output.failureReason),
1501
- id: __expectString(output.id),
1502
- name: __expectString(output.name),
1503
- releaseLabel: __expectString(output.releaseLabel),
1504
- securityGroup: __expectString(output.securityGroup),
1505
- serverUrl: __expectString(output.serverUrl),
1506
- state: __expectString(output.state),
1507
- stateDetails: __expectString(output.stateDetails),
1508
- subnetIds: output.subnetIds != null ? de_SubnetIds(output.subnetIds, context) : undefined,
1509
- tags: output.tags != null ? de_TagMap(output.tags, context) : undefined,
1510
- type: __expectString(output.type),
1511
- virtualClusterId: __expectString(output.virtualClusterId),
1512
- };
1256
+ return take(output, {
1257
+ arn: __expectString,
1258
+ certificateArn: __expectString,
1259
+ certificateAuthority: _json,
1260
+ configurationOverrides: (_) => de_ConfigurationOverrides(_, context),
1261
+ createdAt: (_) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)),
1262
+ executionRoleArn: __expectString,
1263
+ failureReason: __expectString,
1264
+ id: __expectString,
1265
+ name: __expectString,
1266
+ releaseLabel: __expectString,
1267
+ securityGroup: __expectString,
1268
+ serverUrl: __expectString,
1269
+ state: __expectString,
1270
+ stateDetails: __expectString,
1271
+ subnetIds: _json,
1272
+ tags: _json,
1273
+ type: __expectString,
1274
+ virtualClusterId: __expectString,
1275
+ });
1513
1276
  };
1514
1277
  const de_Endpoints = (output, context) => {
1515
1278
  const retVal = (output || [])
1516
1279
  .filter((e) => e != null)
1517
1280
  .map((entry) => {
1518
- if (entry === null) {
1519
- return null;
1520
- }
1521
1281
  return de_Endpoint(entry, context);
1522
1282
  });
1523
1283
  return retVal;
1524
1284
  };
1525
- const de_EntryPointArguments = (output, context) => {
1526
- const retVal = (output || [])
1527
- .filter((e) => e != null)
1528
- .map((entry) => {
1529
- if (entry === null) {
1530
- return null;
1531
- }
1532
- return __expectString(entry);
1533
- });
1534
- return retVal;
1535
- };
1536
- const de_JobDriver = (output, context) => {
1537
- return {
1538
- sparkSqlJobDriver: output.sparkSqlJobDriver != null ? de_SparkSqlJobDriver(output.sparkSqlJobDriver, context) : undefined,
1539
- sparkSubmitJobDriver: output.sparkSubmitJobDriver != null ? de_SparkSubmitJobDriver(output.sparkSubmitJobDriver, context) : undefined,
1540
- };
1541
- };
1542
1285
  const de_JobRun = (output, context) => {
1543
- return {
1544
- arn: __expectString(output.arn),
1545
- clientToken: __expectString(output.clientToken),
1546
- configurationOverrides: output.configurationOverrides != null
1547
- ? de_ConfigurationOverrides(output.configurationOverrides, context)
1548
- : undefined,
1549
- createdAt: output.createdAt != null ? __expectNonNull(__parseRfc3339DateTimeWithOffset(output.createdAt)) : undefined,
1550
- createdBy: __expectString(output.createdBy),
1551
- executionRoleArn: __expectString(output.executionRoleArn),
1552
- failureReason: __expectString(output.failureReason),
1553
- finishedAt: output.finishedAt != null ? __expectNonNull(__parseRfc3339DateTimeWithOffset(output.finishedAt)) : undefined,
1554
- id: __expectString(output.id),
1555
- jobDriver: output.jobDriver != null ? de_JobDriver(output.jobDriver, context) : undefined,
1556
- name: __expectString(output.name),
1557
- releaseLabel: __expectString(output.releaseLabel),
1558
- retryPolicyConfiguration: output.retryPolicyConfiguration != null
1559
- ? de_RetryPolicyConfiguration(output.retryPolicyConfiguration, context)
1560
- : undefined,
1561
- retryPolicyExecution: output.retryPolicyExecution != null ? de_RetryPolicyExecution(output.retryPolicyExecution, context) : undefined,
1562
- state: __expectString(output.state),
1563
- stateDetails: __expectString(output.stateDetails),
1564
- tags: output.tags != null ? de_TagMap(output.tags, context) : undefined,
1565
- virtualClusterId: __expectString(output.virtualClusterId),
1566
- };
1286
+ return take(output, {
1287
+ arn: __expectString,
1288
+ clientToken: __expectString,
1289
+ configurationOverrides: (_) => de_ConfigurationOverrides(_, context),
1290
+ createdAt: (_) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)),
1291
+ createdBy: __expectString,
1292
+ executionRoleArn: __expectString,
1293
+ failureReason: __expectString,
1294
+ finishedAt: (_) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)),
1295
+ id: __expectString,
1296
+ jobDriver: _json,
1297
+ name: __expectString,
1298
+ releaseLabel: __expectString,
1299
+ retryPolicyConfiguration: _json,
1300
+ retryPolicyExecution: _json,
1301
+ state: __expectString,
1302
+ stateDetails: __expectString,
1303
+ tags: _json,
1304
+ virtualClusterId: __expectString,
1305
+ });
1567
1306
  };
1568
1307
  const de_JobRuns = (output, context) => {
1569
1308
  const retVal = (output || [])
1570
1309
  .filter((e) => e != null)
1571
1310
  .map((entry) => {
1572
- if (entry === null) {
1573
- return null;
1574
- }
1575
1311
  return de_JobRun(entry, context);
1576
1312
  });
1577
1313
  return retVal;
1578
1314
  };
1579
1315
  const de_JobTemplate = (output, context) => {
1580
- return {
1581
- arn: __expectString(output.arn),
1582
- createdAt: output.createdAt != null ? __expectNonNull(__parseRfc3339DateTimeWithOffset(output.createdAt)) : undefined,
1583
- createdBy: __expectString(output.createdBy),
1584
- decryptionError: __expectString(output.decryptionError),
1585
- id: __expectString(output.id),
1586
- jobTemplateData: output.jobTemplateData != null ? de_JobTemplateData(output.jobTemplateData, context) : undefined,
1587
- kmsKeyArn: __expectString(output.kmsKeyArn),
1588
- name: __expectString(output.name),
1589
- tags: output.tags != null ? de_TagMap(output.tags, context) : undefined,
1590
- };
1316
+ return take(output, {
1317
+ arn: __expectString,
1318
+ createdAt: (_) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)),
1319
+ createdBy: __expectString,
1320
+ decryptionError: __expectString,
1321
+ id: __expectString,
1322
+ jobTemplateData: (_) => de_JobTemplateData(_, context),
1323
+ kmsKeyArn: __expectString,
1324
+ name: __expectString,
1325
+ tags: _json,
1326
+ });
1591
1327
  };
1592
1328
  const de_JobTemplateData = (output, context) => {
1593
- return {
1594
- configurationOverrides: output.configurationOverrides != null
1595
- ? de_ParametricConfigurationOverrides(output.configurationOverrides, context)
1596
- : undefined,
1597
- executionRoleArn: __expectString(output.executionRoleArn),
1598
- jobDriver: output.jobDriver != null ? de_JobDriver(output.jobDriver, context) : undefined,
1599
- jobTags: output.jobTags != null ? de_TagMap(output.jobTags, context) : undefined,
1600
- parameterConfiguration: output.parameterConfiguration != null
1601
- ? de_TemplateParameterConfigurationMap(output.parameterConfiguration, context)
1602
- : undefined,
1603
- releaseLabel: __expectString(output.releaseLabel),
1604
- };
1329
+ return take(output, {
1330
+ configurationOverrides: (_) => de_ParametricConfigurationOverrides(_, context),
1331
+ executionRoleArn: __expectString,
1332
+ jobDriver: _json,
1333
+ jobTags: _json,
1334
+ parameterConfiguration: _json,
1335
+ releaseLabel: __expectString,
1336
+ });
1605
1337
  };
1606
1338
  const de_JobTemplates = (output, context) => {
1607
1339
  const retVal = (output || [])
1608
1340
  .filter((e) => e != null)
1609
1341
  .map((entry) => {
1610
- if (entry === null) {
1611
- return null;
1612
- }
1613
1342
  return de_JobTemplate(entry, context);
1614
1343
  });
1615
1344
  return retVal;
1616
1345
  };
1617
- const de_MonitoringConfiguration = (output, context) => {
1618
- return {
1619
- cloudWatchMonitoringConfiguration: output.cloudWatchMonitoringConfiguration != null
1620
- ? de_CloudWatchMonitoringConfiguration(output.cloudWatchMonitoringConfiguration, context)
1621
- : undefined,
1622
- persistentAppUI: __expectString(output.persistentAppUI),
1623
- s3MonitoringConfiguration: output.s3MonitoringConfiguration != null
1624
- ? de_S3MonitoringConfiguration(output.s3MonitoringConfiguration, context)
1625
- : undefined,
1626
- };
1627
- };
1628
- const de_ParametricCloudWatchMonitoringConfiguration = (output, context) => {
1629
- return {
1630
- logGroupName: __expectString(output.logGroupName),
1631
- logStreamNamePrefix: __expectString(output.logStreamNamePrefix),
1632
- };
1633
- };
1634
1346
  const de_ParametricConfigurationOverrides = (output, context) => {
1635
- return {
1636
- applicationConfiguration: output.applicationConfiguration != null
1637
- ? de_ConfigurationList(output.applicationConfiguration, context)
1638
- : undefined,
1639
- monitoringConfiguration: output.monitoringConfiguration != null
1640
- ? de_ParametricMonitoringConfiguration(output.monitoringConfiguration, context)
1641
- : undefined,
1642
- };
1643
- };
1644
- const de_ParametricMonitoringConfiguration = (output, context) => {
1645
- return {
1646
- cloudWatchMonitoringConfiguration: output.cloudWatchMonitoringConfiguration != null
1647
- ? de_ParametricCloudWatchMonitoringConfiguration(output.cloudWatchMonitoringConfiguration, context)
1648
- : undefined,
1649
- persistentAppUI: __expectString(output.persistentAppUI),
1650
- s3MonitoringConfiguration: output.s3MonitoringConfiguration != null
1651
- ? de_ParametricS3MonitoringConfiguration(output.s3MonitoringConfiguration, context)
1652
- : undefined,
1653
- };
1654
- };
1655
- const de_ParametricS3MonitoringConfiguration = (output, context) => {
1656
- return {
1657
- logUri: __expectString(output.logUri),
1658
- };
1659
- };
1660
- const de_RetryPolicyConfiguration = (output, context) => {
1661
- return {
1662
- maxAttempts: __expectInt32(output.maxAttempts),
1663
- };
1664
- };
1665
- const de_RetryPolicyExecution = (output, context) => {
1666
- return {
1667
- currentAttemptCount: __expectInt32(output.currentAttemptCount),
1668
- };
1669
- };
1670
- const de_S3MonitoringConfiguration = (output, context) => {
1671
- return {
1672
- logUri: __expectString(output.logUri),
1673
- };
1674
- };
1675
- const de_SensitivePropertiesMap = (output, context) => {
1676
- return Object.entries(output).reduce((acc, [key, value]) => {
1677
- if (value === null) {
1678
- return acc;
1679
- }
1680
- acc[key] = __expectString(value);
1681
- return acc;
1682
- }, {});
1683
- };
1684
- const de_SparkSqlJobDriver = (output, context) => {
1685
- return {
1686
- entryPoint: __expectString(output.entryPoint),
1687
- sparkSqlParameters: __expectString(output.sparkSqlParameters),
1688
- };
1689
- };
1690
- const de_SparkSubmitJobDriver = (output, context) => {
1691
- return {
1692
- entryPoint: __expectString(output.entryPoint),
1693
- entryPointArguments: output.entryPointArguments != null ? de_EntryPointArguments(output.entryPointArguments, context) : undefined,
1694
- sparkSubmitParameters: __expectString(output.sparkSubmitParameters),
1695
- };
1696
- };
1697
- const de_SubnetIds = (output, context) => {
1698
- const retVal = (output || [])
1699
- .filter((e) => e != null)
1700
- .map((entry) => {
1701
- if (entry === null) {
1702
- return null;
1703
- }
1704
- return __expectString(entry);
1347
+ return take(output, {
1348
+ applicationConfiguration: (_) => de_ConfigurationList(_, context),
1349
+ monitoringConfiguration: _json,
1705
1350
  });
1706
- return retVal;
1707
- };
1708
- const de_TagMap = (output, context) => {
1709
- return Object.entries(output).reduce((acc, [key, value]) => {
1710
- if (value === null) {
1711
- return acc;
1712
- }
1713
- acc[key] = __expectString(value);
1714
- return acc;
1715
- }, {});
1716
- };
1717
- const de_TemplateParameterConfiguration = (output, context) => {
1718
- return {
1719
- defaultValue: __expectString(output.defaultValue),
1720
- type: __expectString(output.type),
1721
- };
1722
- };
1723
- const de_TemplateParameterConfigurationMap = (output, context) => {
1724
- return Object.entries(output).reduce((acc, [key, value]) => {
1725
- if (value === null) {
1726
- return acc;
1727
- }
1728
- acc[key] = de_TemplateParameterConfiguration(value, context);
1729
- return acc;
1730
- }, {});
1731
1351
  };
1732
1352
  const de_VirtualCluster = (output, context) => {
1733
- return {
1734
- arn: __expectString(output.arn),
1735
- containerProvider: output.containerProvider != null ? de_ContainerProvider(output.containerProvider, context) : undefined,
1736
- createdAt: output.createdAt != null ? __expectNonNull(__parseRfc3339DateTimeWithOffset(output.createdAt)) : undefined,
1737
- id: __expectString(output.id),
1738
- name: __expectString(output.name),
1739
- state: __expectString(output.state),
1740
- tags: output.tags != null ? de_TagMap(output.tags, context) : undefined,
1741
- };
1353
+ return take(output, {
1354
+ arn: __expectString,
1355
+ containerProvider: _json,
1356
+ createdAt: (_) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)),
1357
+ id: __expectString,
1358
+ name: __expectString,
1359
+ state: __expectString,
1360
+ tags: _json,
1361
+ });
1742
1362
  };
1743
1363
  const de_VirtualClusters = (output, context) => {
1744
1364
  const retVal = (output || [])
1745
1365
  .filter((e) => e != null)
1746
1366
  .map((entry) => {
1747
- if (entry === null) {
1748
- return null;
1749
- }
1750
1367
  return de_VirtualCluster(entry, context);
1751
1368
  });
1752
1369
  return retVal;