@aws-sdk/client-eks 3.310.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.
@@ -1,5 +1,5 @@
1
1
  import { HttpRequest as __HttpRequest } from "@aws-sdk/protocol-http";
2
- import { decorateServiceException as __decorateServiceException, expectBoolean as __expectBoolean, expectInt32 as __expectInt32, expectNonNull as __expectNonNull, expectNumber as __expectNumber, expectObject as __expectObject, expectString as __expectString, map as __map, parseEpochTimestamp as __parseEpochTimestamp, resolvedPath as __resolvedPath, throwDefaultError, } from "@aws-sdk/smithy-client";
2
+ import { _json, decorateServiceException as __decorateServiceException, expectInt32 as __expectInt32, expectNonNull as __expectNonNull, expectNumber as __expectNumber, expectObject as __expectObject, expectString as __expectString, map, parseEpochTimestamp as __parseEpochTimestamp, resolvedPath as __resolvedPath, take, withBaseException, } from "@aws-sdk/smithy-client";
3
3
  import { v4 as generateIdempotencyToken } from "uuid";
4
4
  import { EKSServiceException as __BaseException } from "../models/EKSServiceException";
5
5
  import { AccessDeniedException, BadRequestException, ClientException, InvalidParameterException, InvalidRequestException, NotFoundException, ResourceInUseException, ResourceLimitExceededException, ResourceNotFoundException, ResourcePropagationDelayException, ServerException, ServiceUnavailableException, UnsupportedAvailabilityZoneException, } from "../models/models_0";
@@ -12,12 +12,10 @@ export const se_AssociateEncryptionConfigCommand = async (input, context) => {
12
12
  "/clusters/{clusterName}/encryption-config/associate";
13
13
  resolvedPath = __resolvedPath(resolvedPath, input, "clusterName", () => input.clusterName, "{clusterName}", false);
14
14
  let body;
15
- body = JSON.stringify({
16
- clientRequestToken: input.clientRequestToken ?? generateIdempotencyToken(),
17
- ...(input.encryptionConfig != null && {
18
- encryptionConfig: se_EncryptionConfigList(input.encryptionConfig, context),
19
- }),
20
- });
15
+ body = JSON.stringify(take(input, {
16
+ clientRequestToken: (_) => _ ?? generateIdempotencyToken(),
17
+ encryptionConfig: (_) => _json(_),
18
+ }));
21
19
  return new __HttpRequest({
22
20
  protocol,
23
21
  hostname,
@@ -37,11 +35,11 @@ export const se_AssociateIdentityProviderConfigCommand = async (input, context)
37
35
  "/clusters/{clusterName}/identity-provider-configs/associate";
38
36
  resolvedPath = __resolvedPath(resolvedPath, input, "clusterName", () => input.clusterName, "{clusterName}", false);
39
37
  let body;
40
- body = JSON.stringify({
41
- clientRequestToken: input.clientRequestToken ?? generateIdempotencyToken(),
42
- ...(input.oidc != null && { oidc: se_OidcIdentityProviderConfigRequest(input.oidc, context) }),
43
- ...(input.tags != null && { tags: se_TagMap(input.tags, context) }),
44
- });
38
+ body = JSON.stringify(take(input, {
39
+ clientRequestToken: (_) => _ ?? generateIdempotencyToken(),
40
+ oidc: (_) => _json(_),
41
+ tags: (_) => _json(_),
42
+ }));
45
43
  return new __HttpRequest({
46
44
  protocol,
47
45
  hostname,
@@ -60,15 +58,15 @@ export const se_CreateAddonCommand = async (input, context) => {
60
58
  let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/clusters/{clusterName}/addons";
61
59
  resolvedPath = __resolvedPath(resolvedPath, input, "clusterName", () => input.clusterName, "{clusterName}", false);
62
60
  let body;
63
- body = JSON.stringify({
64
- ...(input.addonName != null && { addonName: input.addonName }),
65
- ...(input.addonVersion != null && { addonVersion: input.addonVersion }),
66
- clientRequestToken: input.clientRequestToken ?? generateIdempotencyToken(),
67
- ...(input.configurationValues != null && { configurationValues: input.configurationValues }),
68
- ...(input.resolveConflicts != null && { resolveConflicts: input.resolveConflicts }),
69
- ...(input.serviceAccountRoleArn != null && { serviceAccountRoleArn: input.serviceAccountRoleArn }),
70
- ...(input.tags != null && { tags: se_TagMap(input.tags, context) }),
71
- });
61
+ body = JSON.stringify(take(input, {
62
+ addonName: [],
63
+ addonVersion: [],
64
+ clientRequestToken: (_) => _ ?? generateIdempotencyToken(),
65
+ configurationValues: [],
66
+ resolveConflicts: [],
67
+ serviceAccountRoleArn: [],
68
+ tags: (_) => _json(_),
69
+ }));
72
70
  return new __HttpRequest({
73
71
  protocol,
74
72
  hostname,
@@ -86,24 +84,18 @@ export const se_CreateClusterCommand = async (input, context) => {
86
84
  };
87
85
  const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/clusters";
88
86
  let body;
89
- body = JSON.stringify({
90
- clientRequestToken: input.clientRequestToken ?? generateIdempotencyToken(),
91
- ...(input.encryptionConfig != null && {
92
- encryptionConfig: se_EncryptionConfigList(input.encryptionConfig, context),
93
- }),
94
- ...(input.kubernetesNetworkConfig != null && {
95
- kubernetesNetworkConfig: se_KubernetesNetworkConfigRequest(input.kubernetesNetworkConfig, context),
96
- }),
97
- ...(input.logging != null && { logging: se_Logging(input.logging, context) }),
98
- ...(input.name != null && { name: input.name }),
99
- ...(input.outpostConfig != null && { outpostConfig: se_OutpostConfigRequest(input.outpostConfig, context) }),
100
- ...(input.resourcesVpcConfig != null && {
101
- resourcesVpcConfig: se_VpcConfigRequest(input.resourcesVpcConfig, context),
102
- }),
103
- ...(input.roleArn != null && { roleArn: input.roleArn }),
104
- ...(input.tags != null && { tags: se_TagMap(input.tags, context) }),
105
- ...(input.version != null && { version: input.version }),
106
- });
87
+ body = JSON.stringify(take(input, {
88
+ clientRequestToken: (_) => _ ?? generateIdempotencyToken(),
89
+ encryptionConfig: (_) => _json(_),
90
+ kubernetesNetworkConfig: (_) => _json(_),
91
+ logging: (_) => _json(_),
92
+ name: [],
93
+ outpostConfig: (_) => _json(_),
94
+ resourcesVpcConfig: (_) => _json(_),
95
+ roleArn: [],
96
+ tags: (_) => _json(_),
97
+ version: [],
98
+ }));
107
99
  return new __HttpRequest({
108
100
  protocol,
109
101
  hostname,
@@ -122,14 +114,14 @@ export const se_CreateFargateProfileCommand = async (input, context) => {
122
114
  let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/clusters/{clusterName}/fargate-profiles";
123
115
  resolvedPath = __resolvedPath(resolvedPath, input, "clusterName", () => input.clusterName, "{clusterName}", false);
124
116
  let body;
125
- body = JSON.stringify({
126
- clientRequestToken: input.clientRequestToken ?? generateIdempotencyToken(),
127
- ...(input.fargateProfileName != null && { fargateProfileName: input.fargateProfileName }),
128
- ...(input.podExecutionRoleArn != null && { podExecutionRoleArn: input.podExecutionRoleArn }),
129
- ...(input.selectors != null && { selectors: se_FargateProfileSelectors(input.selectors, context) }),
130
- ...(input.subnets != null && { subnets: se_StringList(input.subnets, context) }),
131
- ...(input.tags != null && { tags: se_TagMap(input.tags, context) }),
132
- });
117
+ body = JSON.stringify(take(input, {
118
+ clientRequestToken: (_) => _ ?? generateIdempotencyToken(),
119
+ fargateProfileName: [],
120
+ podExecutionRoleArn: [],
121
+ selectors: (_) => _json(_),
122
+ subnets: (_) => _json(_),
123
+ tags: (_) => _json(_),
124
+ }));
133
125
  return new __HttpRequest({
134
126
  protocol,
135
127
  hostname,
@@ -148,27 +140,25 @@ export const se_CreateNodegroupCommand = async (input, context) => {
148
140
  let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/clusters/{clusterName}/node-groups";
149
141
  resolvedPath = __resolvedPath(resolvedPath, input, "clusterName", () => input.clusterName, "{clusterName}", false);
150
142
  let body;
151
- body = JSON.stringify({
152
- ...(input.amiType != null && { amiType: input.amiType }),
153
- ...(input.capacityType != null && { capacityType: input.capacityType }),
154
- clientRequestToken: input.clientRequestToken ?? generateIdempotencyToken(),
155
- ...(input.diskSize != null && { diskSize: input.diskSize }),
156
- ...(input.instanceTypes != null && { instanceTypes: se_StringList(input.instanceTypes, context) }),
157
- ...(input.labels != null && { labels: se_labelsMap(input.labels, context) }),
158
- ...(input.launchTemplate != null && {
159
- launchTemplate: se_LaunchTemplateSpecification(input.launchTemplate, context),
160
- }),
161
- ...(input.nodeRole != null && { nodeRole: input.nodeRole }),
162
- ...(input.nodegroupName != null && { nodegroupName: input.nodegroupName }),
163
- ...(input.releaseVersion != null && { releaseVersion: input.releaseVersion }),
164
- ...(input.remoteAccess != null && { remoteAccess: se_RemoteAccessConfig(input.remoteAccess, context) }),
165
- ...(input.scalingConfig != null && { scalingConfig: se_NodegroupScalingConfig(input.scalingConfig, context) }),
166
- ...(input.subnets != null && { subnets: se_StringList(input.subnets, context) }),
167
- ...(input.tags != null && { tags: se_TagMap(input.tags, context) }),
168
- ...(input.taints != null && { taints: se_taintsList(input.taints, context) }),
169
- ...(input.updateConfig != null && { updateConfig: se_NodegroupUpdateConfig(input.updateConfig, context) }),
170
- ...(input.version != null && { version: input.version }),
171
- });
143
+ body = JSON.stringify(take(input, {
144
+ amiType: [],
145
+ capacityType: [],
146
+ clientRequestToken: (_) => _ ?? generateIdempotencyToken(),
147
+ diskSize: [],
148
+ instanceTypes: (_) => _json(_),
149
+ labels: (_) => _json(_),
150
+ launchTemplate: (_) => _json(_),
151
+ nodeRole: [],
152
+ nodegroupName: [],
153
+ releaseVersion: [],
154
+ remoteAccess: (_) => _json(_),
155
+ scalingConfig: (_) => _json(_),
156
+ subnets: (_) => _json(_),
157
+ tags: (_) => _json(_),
158
+ taints: (_) => _json(_),
159
+ updateConfig: (_) => _json(_),
160
+ version: [],
161
+ }));
172
162
  return new __HttpRequest({
173
163
  protocol,
174
164
  hostname,
@@ -375,11 +365,9 @@ export const se_DescribeIdentityProviderConfigCommand = async (input, context) =
375
365
  "/clusters/{clusterName}/identity-provider-configs/describe";
376
366
  resolvedPath = __resolvedPath(resolvedPath, input, "clusterName", () => input.clusterName, "{clusterName}", false);
377
367
  let body;
378
- body = JSON.stringify({
379
- ...(input.identityProviderConfig != null && {
380
- identityProviderConfig: se_IdentityProviderConfig(input.identityProviderConfig, context),
381
- }),
382
- });
368
+ body = JSON.stringify(take(input, {
369
+ identityProviderConfig: (_) => _json(_),
370
+ }));
383
371
  return new __HttpRequest({
384
372
  protocol,
385
373
  hostname,
@@ -439,12 +427,10 @@ export const se_DisassociateIdentityProviderConfigCommand = async (input, contex
439
427
  "/clusters/{clusterName}/identity-provider-configs/disassociate";
440
428
  resolvedPath = __resolvedPath(resolvedPath, input, "clusterName", () => input.clusterName, "{clusterName}", false);
441
429
  let body;
442
- body = JSON.stringify({
443
- clientRequestToken: input.clientRequestToken ?? generateIdempotencyToken(),
444
- ...(input.identityProviderConfig != null && {
445
- identityProviderConfig: se_IdentityProviderConfig(input.identityProviderConfig, context),
446
- }),
447
- });
430
+ body = JSON.stringify(take(input, {
431
+ clientRequestToken: (_) => _ ?? generateIdempotencyToken(),
432
+ identityProviderConfig: (_) => _json(_),
433
+ }));
448
434
  return new __HttpRequest({
449
435
  protocol,
450
436
  hostname,
@@ -607,14 +593,12 @@ export const se_RegisterClusterCommand = async (input, context) => {
607
593
  };
608
594
  const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/cluster-registrations";
609
595
  let body;
610
- body = JSON.stringify({
611
- clientRequestToken: input.clientRequestToken ?? generateIdempotencyToken(),
612
- ...(input.connectorConfig != null && {
613
- connectorConfig: se_ConnectorConfigRequest(input.connectorConfig, context),
614
- }),
615
- ...(input.name != null && { name: input.name }),
616
- ...(input.tags != null && { tags: se_TagMap(input.tags, context) }),
617
- });
596
+ body = JSON.stringify(take(input, {
597
+ clientRequestToken: (_) => _ ?? generateIdempotencyToken(),
598
+ connectorConfig: (_) => _json(_),
599
+ name: [],
600
+ tags: (_) => _json(_),
601
+ }));
618
602
  return new __HttpRequest({
619
603
  protocol,
620
604
  hostname,
@@ -633,9 +617,9 @@ export const se_TagResourceCommand = async (input, context) => {
633
617
  let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/tags/{resourceArn}";
634
618
  resolvedPath = __resolvedPath(resolvedPath, input, "resourceArn", () => input.resourceArn, "{resourceArn}", false);
635
619
  let body;
636
- body = JSON.stringify({
637
- ...(input.tags != null && { tags: se_TagMap(input.tags, context) }),
638
- });
620
+ body = JSON.stringify(take(input, {
621
+ tags: (_) => _json(_),
622
+ }));
639
623
  return new __HttpRequest({
640
624
  protocol,
641
625
  hostname,
@@ -679,13 +663,13 @@ export const se_UpdateAddonCommand = async (input, context) => {
679
663
  resolvedPath = __resolvedPath(resolvedPath, input, "clusterName", () => input.clusterName, "{clusterName}", false);
680
664
  resolvedPath = __resolvedPath(resolvedPath, input, "addonName", () => input.addonName, "{addonName}", false);
681
665
  let body;
682
- body = JSON.stringify({
683
- ...(input.addonVersion != null && { addonVersion: input.addonVersion }),
684
- clientRequestToken: input.clientRequestToken ?? generateIdempotencyToken(),
685
- ...(input.configurationValues != null && { configurationValues: input.configurationValues }),
686
- ...(input.resolveConflicts != null && { resolveConflicts: input.resolveConflicts }),
687
- ...(input.serviceAccountRoleArn != null && { serviceAccountRoleArn: input.serviceAccountRoleArn }),
688
- });
666
+ body = JSON.stringify(take(input, {
667
+ addonVersion: [],
668
+ clientRequestToken: (_) => _ ?? generateIdempotencyToken(),
669
+ configurationValues: [],
670
+ resolveConflicts: [],
671
+ serviceAccountRoleArn: [],
672
+ }));
689
673
  return new __HttpRequest({
690
674
  protocol,
691
675
  hostname,
@@ -704,13 +688,11 @@ export const se_UpdateClusterConfigCommand = async (input, context) => {
704
688
  let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/clusters/{name}/update-config";
705
689
  resolvedPath = __resolvedPath(resolvedPath, input, "name", () => input.name, "{name}", false);
706
690
  let body;
707
- body = JSON.stringify({
708
- clientRequestToken: input.clientRequestToken ?? generateIdempotencyToken(),
709
- ...(input.logging != null && { logging: se_Logging(input.logging, context) }),
710
- ...(input.resourcesVpcConfig != null && {
711
- resourcesVpcConfig: se_VpcConfigRequest(input.resourcesVpcConfig, context),
712
- }),
713
- });
691
+ body = JSON.stringify(take(input, {
692
+ clientRequestToken: (_) => _ ?? generateIdempotencyToken(),
693
+ logging: (_) => _json(_),
694
+ resourcesVpcConfig: (_) => _json(_),
695
+ }));
714
696
  return new __HttpRequest({
715
697
  protocol,
716
698
  hostname,
@@ -729,10 +711,10 @@ export const se_UpdateClusterVersionCommand = async (input, context) => {
729
711
  let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/clusters/{name}/updates";
730
712
  resolvedPath = __resolvedPath(resolvedPath, input, "name", () => input.name, "{name}", false);
731
713
  let body;
732
- body = JSON.stringify({
733
- clientRequestToken: input.clientRequestToken ?? generateIdempotencyToken(),
734
- ...(input.version != null && { version: input.version }),
735
- });
714
+ body = JSON.stringify(take(input, {
715
+ clientRequestToken: (_) => _ ?? generateIdempotencyToken(),
716
+ version: [],
717
+ }));
736
718
  return new __HttpRequest({
737
719
  protocol,
738
720
  hostname,
@@ -753,13 +735,13 @@ export const se_UpdateNodegroupConfigCommand = async (input, context) => {
753
735
  resolvedPath = __resolvedPath(resolvedPath, input, "clusterName", () => input.clusterName, "{clusterName}", false);
754
736
  resolvedPath = __resolvedPath(resolvedPath, input, "nodegroupName", () => input.nodegroupName, "{nodegroupName}", false);
755
737
  let body;
756
- body = JSON.stringify({
757
- clientRequestToken: input.clientRequestToken ?? generateIdempotencyToken(),
758
- ...(input.labels != null && { labels: se_UpdateLabelsPayload(input.labels, context) }),
759
- ...(input.scalingConfig != null && { scalingConfig: se_NodegroupScalingConfig(input.scalingConfig, context) }),
760
- ...(input.taints != null && { taints: se_UpdateTaintsPayload(input.taints, context) }),
761
- ...(input.updateConfig != null && { updateConfig: se_NodegroupUpdateConfig(input.updateConfig, context) }),
762
- });
738
+ body = JSON.stringify(take(input, {
739
+ clientRequestToken: (_) => _ ?? generateIdempotencyToken(),
740
+ labels: (_) => _json(_),
741
+ scalingConfig: (_) => _json(_),
742
+ taints: (_) => _json(_),
743
+ updateConfig: (_) => _json(_),
744
+ }));
763
745
  return new __HttpRequest({
764
746
  protocol,
765
747
  hostname,
@@ -780,15 +762,13 @@ export const se_UpdateNodegroupVersionCommand = async (input, context) => {
780
762
  resolvedPath = __resolvedPath(resolvedPath, input, "clusterName", () => input.clusterName, "{clusterName}", false);
781
763
  resolvedPath = __resolvedPath(resolvedPath, input, "nodegroupName", () => input.nodegroupName, "{nodegroupName}", false);
782
764
  let body;
783
- body = JSON.stringify({
784
- clientRequestToken: input.clientRequestToken ?? generateIdempotencyToken(),
785
- ...(input.force != null && { force: input.force }),
786
- ...(input.launchTemplate != null && {
787
- launchTemplate: se_LaunchTemplateSpecification(input.launchTemplate, context),
788
- }),
789
- ...(input.releaseVersion != null && { releaseVersion: input.releaseVersion }),
790
- ...(input.version != null && { version: input.version }),
791
- });
765
+ body = JSON.stringify(take(input, {
766
+ clientRequestToken: (_) => _ ?? generateIdempotencyToken(),
767
+ force: [],
768
+ launchTemplate: (_) => _json(_),
769
+ releaseVersion: [],
770
+ version: [],
771
+ }));
792
772
  return new __HttpRequest({
793
773
  protocol,
794
774
  hostname,
@@ -807,9 +787,10 @@ export const de_AssociateEncryptionConfigCommand = async (output, context) => {
807
787
  $metadata: deserializeMetadata(output),
808
788
  });
809
789
  const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
810
- if (data.update != null) {
811
- contents.update = de_Update(data.update, context);
812
- }
790
+ const doc = take(data, {
791
+ update: (_) => de_Update(_, context),
792
+ });
793
+ Object.assign(contents, doc);
813
794
  return contents;
814
795
  };
815
796
  const de_AssociateEncryptionConfigCommandError = async (output, context) => {
@@ -839,10 +820,9 @@ const de_AssociateEncryptionConfigCommandError = async (output, context) => {
839
820
  throw await de_ServerExceptionRes(parsedOutput, context);
840
821
  default:
841
822
  const parsedBody = parsedOutput.body;
842
- throwDefaultError({
823
+ return throwDefaultError({
843
824
  output,
844
825
  parsedBody,
845
- exceptionCtor: __BaseException,
846
826
  errorCode,
847
827
  });
848
828
  }
@@ -855,12 +835,11 @@ export const de_AssociateIdentityProviderConfigCommand = async (output, context)
855
835
  $metadata: deserializeMetadata(output),
856
836
  });
857
837
  const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
858
- if (data.tags != null) {
859
- contents.tags = de_TagMap(data.tags, context);
860
- }
861
- if (data.update != null) {
862
- contents.update = de_Update(data.update, context);
863
- }
838
+ const doc = take(data, {
839
+ tags: _json,
840
+ update: (_) => de_Update(_, context),
841
+ });
842
+ Object.assign(contents, doc);
864
843
  return contents;
865
844
  };
866
845
  const de_AssociateIdentityProviderConfigCommandError = async (output, context) => {
@@ -890,10 +869,9 @@ const de_AssociateIdentityProviderConfigCommandError = async (output, context) =
890
869
  throw await de_ServerExceptionRes(parsedOutput, context);
891
870
  default:
892
871
  const parsedBody = parsedOutput.body;
893
- throwDefaultError({
872
+ return throwDefaultError({
894
873
  output,
895
874
  parsedBody,
896
- exceptionCtor: __BaseException,
897
875
  errorCode,
898
876
  });
899
877
  }
@@ -906,9 +884,10 @@ export const de_CreateAddonCommand = async (output, context) => {
906
884
  $metadata: deserializeMetadata(output),
907
885
  });
908
886
  const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
909
- if (data.addon != null) {
910
- contents.addon = de_Addon(data.addon, context);
911
- }
887
+ const doc = take(data, {
888
+ addon: (_) => de_Addon(_, context),
889
+ });
890
+ Object.assign(contents, doc);
912
891
  return contents;
913
892
  };
914
893
  const de_CreateAddonCommandError = async (output, context) => {
@@ -938,10 +917,9 @@ const de_CreateAddonCommandError = async (output, context) => {
938
917
  throw await de_ServerExceptionRes(parsedOutput, context);
939
918
  default:
940
919
  const parsedBody = parsedOutput.body;
941
- throwDefaultError({
920
+ return throwDefaultError({
942
921
  output,
943
922
  parsedBody,
944
- exceptionCtor: __BaseException,
945
923
  errorCode,
946
924
  });
947
925
  }
@@ -954,9 +932,10 @@ export const de_CreateClusterCommand = async (output, context) => {
954
932
  $metadata: deserializeMetadata(output),
955
933
  });
956
934
  const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
957
- if (data.cluster != null) {
958
- contents.cluster = de_Cluster(data.cluster, context);
959
- }
935
+ const doc = take(data, {
936
+ cluster: (_) => de_Cluster(_, context),
937
+ });
938
+ Object.assign(contents, doc);
960
939
  return contents;
961
940
  };
962
941
  const de_CreateClusterCommandError = async (output, context) => {
@@ -989,10 +968,9 @@ const de_CreateClusterCommandError = async (output, context) => {
989
968
  throw await de_UnsupportedAvailabilityZoneExceptionRes(parsedOutput, context);
990
969
  default:
991
970
  const parsedBody = parsedOutput.body;
992
- throwDefaultError({
971
+ return throwDefaultError({
993
972
  output,
994
973
  parsedBody,
995
- exceptionCtor: __BaseException,
996
974
  errorCode,
997
975
  });
998
976
  }
@@ -1005,9 +983,10 @@ export const de_CreateFargateProfileCommand = async (output, context) => {
1005
983
  $metadata: deserializeMetadata(output),
1006
984
  });
1007
985
  const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
1008
- if (data.fargateProfile != null) {
1009
- contents.fargateProfile = de_FargateProfile(data.fargateProfile, context);
1010
- }
986
+ const doc = take(data, {
987
+ fargateProfile: (_) => de_FargateProfile(_, context),
988
+ });
989
+ Object.assign(contents, doc);
1011
990
  return contents;
1012
991
  };
1013
992
  const de_CreateFargateProfileCommandError = async (output, context) => {
@@ -1037,10 +1016,9 @@ const de_CreateFargateProfileCommandError = async (output, context) => {
1037
1016
  throw await de_UnsupportedAvailabilityZoneExceptionRes(parsedOutput, context);
1038
1017
  default:
1039
1018
  const parsedBody = parsedOutput.body;
1040
- throwDefaultError({
1019
+ return throwDefaultError({
1041
1020
  output,
1042
1021
  parsedBody,
1043
- exceptionCtor: __BaseException,
1044
1022
  errorCode,
1045
1023
  });
1046
1024
  }
@@ -1053,9 +1031,10 @@ export const de_CreateNodegroupCommand = async (output, context) => {
1053
1031
  $metadata: deserializeMetadata(output),
1054
1032
  });
1055
1033
  const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
1056
- if (data.nodegroup != null) {
1057
- contents.nodegroup = de_Nodegroup(data.nodegroup, context);
1058
- }
1034
+ const doc = take(data, {
1035
+ nodegroup: (_) => de_Nodegroup(_, context),
1036
+ });
1037
+ Object.assign(contents, doc);
1059
1038
  return contents;
1060
1039
  };
1061
1040
  const de_CreateNodegroupCommandError = async (output, context) => {
@@ -1088,10 +1067,9 @@ const de_CreateNodegroupCommandError = async (output, context) => {
1088
1067
  throw await de_ServiceUnavailableExceptionRes(parsedOutput, context);
1089
1068
  default:
1090
1069
  const parsedBody = parsedOutput.body;
1091
- throwDefaultError({
1070
+ return throwDefaultError({
1092
1071
  output,
1093
1072
  parsedBody,
1094
- exceptionCtor: __BaseException,
1095
1073
  errorCode,
1096
1074
  });
1097
1075
  }
@@ -1104,9 +1082,10 @@ export const de_DeleteAddonCommand = async (output, context) => {
1104
1082
  $metadata: deserializeMetadata(output),
1105
1083
  });
1106
1084
  const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
1107
- if (data.addon != null) {
1108
- contents.addon = de_Addon(data.addon, context);
1109
- }
1085
+ const doc = take(data, {
1086
+ addon: (_) => de_Addon(_, context),
1087
+ });
1088
+ Object.assign(contents, doc);
1110
1089
  return contents;
1111
1090
  };
1112
1091
  const de_DeleteAddonCommandError = async (output, context) => {
@@ -1133,10 +1112,9 @@ const de_DeleteAddonCommandError = async (output, context) => {
1133
1112
  throw await de_ServerExceptionRes(parsedOutput, context);
1134
1113
  default:
1135
1114
  const parsedBody = parsedOutput.body;
1136
- throwDefaultError({
1115
+ return throwDefaultError({
1137
1116
  output,
1138
1117
  parsedBody,
1139
- exceptionCtor: __BaseException,
1140
1118
  errorCode,
1141
1119
  });
1142
1120
  }
@@ -1149,9 +1127,10 @@ export const de_DeleteClusterCommand = async (output, context) => {
1149
1127
  $metadata: deserializeMetadata(output),
1150
1128
  });
1151
1129
  const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
1152
- if (data.cluster != null) {
1153
- contents.cluster = de_Cluster(data.cluster, context);
1154
- }
1130
+ const doc = take(data, {
1131
+ cluster: (_) => de_Cluster(_, context),
1132
+ });
1133
+ Object.assign(contents, doc);
1155
1134
  return contents;
1156
1135
  };
1157
1136
  const de_DeleteClusterCommandError = async (output, context) => {
@@ -1178,10 +1157,9 @@ const de_DeleteClusterCommandError = async (output, context) => {
1178
1157
  throw await de_ServiceUnavailableExceptionRes(parsedOutput, context);
1179
1158
  default:
1180
1159
  const parsedBody = parsedOutput.body;
1181
- throwDefaultError({
1160
+ return throwDefaultError({
1182
1161
  output,
1183
1162
  parsedBody,
1184
- exceptionCtor: __BaseException,
1185
1163
  errorCode,
1186
1164
  });
1187
1165
  }
@@ -1194,9 +1172,10 @@ export const de_DeleteFargateProfileCommand = async (output, context) => {
1194
1172
  $metadata: deserializeMetadata(output),
1195
1173
  });
1196
1174
  const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
1197
- if (data.fargateProfile != null) {
1198
- contents.fargateProfile = de_FargateProfile(data.fargateProfile, context);
1199
- }
1175
+ const doc = take(data, {
1176
+ fargateProfile: (_) => de_FargateProfile(_, context),
1177
+ });
1178
+ Object.assign(contents, doc);
1200
1179
  return contents;
1201
1180
  };
1202
1181
  const de_DeleteFargateProfileCommandError = async (output, context) => {
@@ -1220,10 +1199,9 @@ const de_DeleteFargateProfileCommandError = async (output, context) => {
1220
1199
  throw await de_ServerExceptionRes(parsedOutput, context);
1221
1200
  default:
1222
1201
  const parsedBody = parsedOutput.body;
1223
- throwDefaultError({
1202
+ return throwDefaultError({
1224
1203
  output,
1225
1204
  parsedBody,
1226
- exceptionCtor: __BaseException,
1227
1205
  errorCode,
1228
1206
  });
1229
1207
  }
@@ -1236,9 +1214,10 @@ export const de_DeleteNodegroupCommand = async (output, context) => {
1236
1214
  $metadata: deserializeMetadata(output),
1237
1215
  });
1238
1216
  const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
1239
- if (data.nodegroup != null) {
1240
- contents.nodegroup = de_Nodegroup(data.nodegroup, context);
1241
- }
1217
+ const doc = take(data, {
1218
+ nodegroup: (_) => de_Nodegroup(_, context),
1219
+ });
1220
+ Object.assign(contents, doc);
1242
1221
  return contents;
1243
1222
  };
1244
1223
  const de_DeleteNodegroupCommandError = async (output, context) => {
@@ -1268,10 +1247,9 @@ const de_DeleteNodegroupCommandError = async (output, context) => {
1268
1247
  throw await de_ServiceUnavailableExceptionRes(parsedOutput, context);
1269
1248
  default:
1270
1249
  const parsedBody = parsedOutput.body;
1271
- throwDefaultError({
1250
+ return throwDefaultError({
1272
1251
  output,
1273
1252
  parsedBody,
1274
- exceptionCtor: __BaseException,
1275
1253
  errorCode,
1276
1254
  });
1277
1255
  }
@@ -1284,9 +1262,10 @@ export const de_DeregisterClusterCommand = async (output, context) => {
1284
1262
  $metadata: deserializeMetadata(output),
1285
1263
  });
1286
1264
  const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
1287
- if (data.cluster != null) {
1288
- contents.cluster = de_Cluster(data.cluster, context);
1289
- }
1265
+ const doc = take(data, {
1266
+ cluster: (_) => de_Cluster(_, context),
1267
+ });
1268
+ Object.assign(contents, doc);
1290
1269
  return contents;
1291
1270
  };
1292
1271
  const de_DeregisterClusterCommandError = async (output, context) => {
@@ -1316,10 +1295,9 @@ const de_DeregisterClusterCommandError = async (output, context) => {
1316
1295
  throw await de_ServiceUnavailableExceptionRes(parsedOutput, context);
1317
1296
  default:
1318
1297
  const parsedBody = parsedOutput.body;
1319
- throwDefaultError({
1298
+ return throwDefaultError({
1320
1299
  output,
1321
1300
  parsedBody,
1322
- exceptionCtor: __BaseException,
1323
1301
  errorCode,
1324
1302
  });
1325
1303
  }
@@ -1332,9 +1310,10 @@ export const de_DescribeAddonCommand = async (output, context) => {
1332
1310
  $metadata: deserializeMetadata(output),
1333
1311
  });
1334
1312
  const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
1335
- if (data.addon != null) {
1336
- contents.addon = de_Addon(data.addon, context);
1337
- }
1313
+ const doc = take(data, {
1314
+ addon: (_) => de_Addon(_, context),
1315
+ });
1316
+ Object.assign(contents, doc);
1338
1317
  return contents;
1339
1318
  };
1340
1319
  const de_DescribeAddonCommandError = async (output, context) => {
@@ -1361,10 +1340,9 @@ const de_DescribeAddonCommandError = async (output, context) => {
1361
1340
  throw await de_ServerExceptionRes(parsedOutput, context);
1362
1341
  default:
1363
1342
  const parsedBody = parsedOutput.body;
1364
- throwDefaultError({
1343
+ return throwDefaultError({
1365
1344
  output,
1366
1345
  parsedBody,
1367
- exceptionCtor: __BaseException,
1368
1346
  errorCode,
1369
1347
  });
1370
1348
  }
@@ -1377,15 +1355,12 @@ export const de_DescribeAddonConfigurationCommand = async (output, context) => {
1377
1355
  $metadata: deserializeMetadata(output),
1378
1356
  });
1379
1357
  const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
1380
- if (data.addonName != null) {
1381
- contents.addonName = __expectString(data.addonName);
1382
- }
1383
- if (data.addonVersion != null) {
1384
- contents.addonVersion = __expectString(data.addonVersion);
1385
- }
1386
- if (data.configurationSchema != null) {
1387
- contents.configurationSchema = __expectString(data.configurationSchema);
1388
- }
1358
+ const doc = take(data, {
1359
+ addonName: __expectString,
1360
+ addonVersion: __expectString,
1361
+ configurationSchema: __expectString,
1362
+ });
1363
+ Object.assign(contents, doc);
1389
1364
  return contents;
1390
1365
  };
1391
1366
  const de_DescribeAddonConfigurationCommandError = async (output, context) => {
@@ -1406,10 +1381,9 @@ const de_DescribeAddonConfigurationCommandError = async (output, context) => {
1406
1381
  throw await de_ServerExceptionRes(parsedOutput, context);
1407
1382
  default:
1408
1383
  const parsedBody = parsedOutput.body;
1409
- throwDefaultError({
1384
+ return throwDefaultError({
1410
1385
  output,
1411
1386
  parsedBody,
1412
- exceptionCtor: __BaseException,
1413
1387
  errorCode,
1414
1388
  });
1415
1389
  }
@@ -1422,12 +1396,11 @@ export const de_DescribeAddonVersionsCommand = async (output, context) => {
1422
1396
  $metadata: deserializeMetadata(output),
1423
1397
  });
1424
1398
  const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
1425
- if (data.addons != null) {
1426
- contents.addons = de_Addons(data.addons, context);
1427
- }
1428
- if (data.nextToken != null) {
1429
- contents.nextToken = __expectString(data.nextToken);
1430
- }
1399
+ const doc = take(data, {
1400
+ addons: _json,
1401
+ nextToken: __expectString,
1402
+ });
1403
+ Object.assign(contents, doc);
1431
1404
  return contents;
1432
1405
  };
1433
1406
  const de_DescribeAddonVersionsCommandError = async (output, context) => {
@@ -1448,10 +1421,9 @@ const de_DescribeAddonVersionsCommandError = async (output, context) => {
1448
1421
  throw await de_ServerExceptionRes(parsedOutput, context);
1449
1422
  default:
1450
1423
  const parsedBody = parsedOutput.body;
1451
- throwDefaultError({
1424
+ return throwDefaultError({
1452
1425
  output,
1453
1426
  parsedBody,
1454
- exceptionCtor: __BaseException,
1455
1427
  errorCode,
1456
1428
  });
1457
1429
  }
@@ -1464,9 +1436,10 @@ export const de_DescribeClusterCommand = async (output, context) => {
1464
1436
  $metadata: deserializeMetadata(output),
1465
1437
  });
1466
1438
  const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
1467
- if (data.cluster != null) {
1468
- contents.cluster = de_Cluster(data.cluster, context);
1469
- }
1439
+ const doc = take(data, {
1440
+ cluster: (_) => de_Cluster(_, context),
1441
+ });
1442
+ Object.assign(contents, doc);
1470
1443
  return contents;
1471
1444
  };
1472
1445
  const de_DescribeClusterCommandError = async (output, context) => {
@@ -1490,10 +1463,9 @@ const de_DescribeClusterCommandError = async (output, context) => {
1490
1463
  throw await de_ServiceUnavailableExceptionRes(parsedOutput, context);
1491
1464
  default:
1492
1465
  const parsedBody = parsedOutput.body;
1493
- throwDefaultError({
1466
+ return throwDefaultError({
1494
1467
  output,
1495
1468
  parsedBody,
1496
- exceptionCtor: __BaseException,
1497
1469
  errorCode,
1498
1470
  });
1499
1471
  }
@@ -1506,9 +1478,10 @@ export const de_DescribeFargateProfileCommand = async (output, context) => {
1506
1478
  $metadata: deserializeMetadata(output),
1507
1479
  });
1508
1480
  const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
1509
- if (data.fargateProfile != null) {
1510
- contents.fargateProfile = de_FargateProfile(data.fargateProfile, context);
1511
- }
1481
+ const doc = take(data, {
1482
+ fargateProfile: (_) => de_FargateProfile(_, context),
1483
+ });
1484
+ Object.assign(contents, doc);
1512
1485
  return contents;
1513
1486
  };
1514
1487
  const de_DescribeFargateProfileCommandError = async (output, context) => {
@@ -1532,10 +1505,9 @@ const de_DescribeFargateProfileCommandError = async (output, context) => {
1532
1505
  throw await de_ServerExceptionRes(parsedOutput, context);
1533
1506
  default:
1534
1507
  const parsedBody = parsedOutput.body;
1535
- throwDefaultError({
1508
+ return throwDefaultError({
1536
1509
  output,
1537
1510
  parsedBody,
1538
- exceptionCtor: __BaseException,
1539
1511
  errorCode,
1540
1512
  });
1541
1513
  }
@@ -1548,9 +1520,10 @@ export const de_DescribeIdentityProviderConfigCommand = async (output, context)
1548
1520
  $metadata: deserializeMetadata(output),
1549
1521
  });
1550
1522
  const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
1551
- if (data.identityProviderConfig != null) {
1552
- contents.identityProviderConfig = de_IdentityProviderConfigResponse(data.identityProviderConfig, context);
1553
- }
1523
+ const doc = take(data, {
1524
+ identityProviderConfig: _json,
1525
+ });
1526
+ Object.assign(contents, doc);
1554
1527
  return contents;
1555
1528
  };
1556
1529
  const de_DescribeIdentityProviderConfigCommandError = async (output, context) => {
@@ -1577,10 +1550,9 @@ const de_DescribeIdentityProviderConfigCommandError = async (output, context) =>
1577
1550
  throw await de_ServiceUnavailableExceptionRes(parsedOutput, context);
1578
1551
  default:
1579
1552
  const parsedBody = parsedOutput.body;
1580
- throwDefaultError({
1553
+ return throwDefaultError({
1581
1554
  output,
1582
1555
  parsedBody,
1583
- exceptionCtor: __BaseException,
1584
1556
  errorCode,
1585
1557
  });
1586
1558
  }
@@ -1593,9 +1565,10 @@ export const de_DescribeNodegroupCommand = async (output, context) => {
1593
1565
  $metadata: deserializeMetadata(output),
1594
1566
  });
1595
1567
  const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
1596
- if (data.nodegroup != null) {
1597
- contents.nodegroup = de_Nodegroup(data.nodegroup, context);
1598
- }
1568
+ const doc = take(data, {
1569
+ nodegroup: (_) => de_Nodegroup(_, context),
1570
+ });
1571
+ Object.assign(contents, doc);
1599
1572
  return contents;
1600
1573
  };
1601
1574
  const de_DescribeNodegroupCommandError = async (output, context) => {
@@ -1622,10 +1595,9 @@ const de_DescribeNodegroupCommandError = async (output, context) => {
1622
1595
  throw await de_ServiceUnavailableExceptionRes(parsedOutput, context);
1623
1596
  default:
1624
1597
  const parsedBody = parsedOutput.body;
1625
- throwDefaultError({
1598
+ return throwDefaultError({
1626
1599
  output,
1627
1600
  parsedBody,
1628
- exceptionCtor: __BaseException,
1629
1601
  errorCode,
1630
1602
  });
1631
1603
  }
@@ -1638,9 +1610,10 @@ export const de_DescribeUpdateCommand = async (output, context) => {
1638
1610
  $metadata: deserializeMetadata(output),
1639
1611
  });
1640
1612
  const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
1641
- if (data.update != null) {
1642
- contents.update = de_Update(data.update, context);
1643
- }
1613
+ const doc = take(data, {
1614
+ update: (_) => de_Update(_, context),
1615
+ });
1616
+ Object.assign(contents, doc);
1644
1617
  return contents;
1645
1618
  };
1646
1619
  const de_DescribeUpdateCommandError = async (output, context) => {
@@ -1664,10 +1637,9 @@ const de_DescribeUpdateCommandError = async (output, context) => {
1664
1637
  throw await de_ServerExceptionRes(parsedOutput, context);
1665
1638
  default:
1666
1639
  const parsedBody = parsedOutput.body;
1667
- throwDefaultError({
1640
+ return throwDefaultError({
1668
1641
  output,
1669
1642
  parsedBody,
1670
- exceptionCtor: __BaseException,
1671
1643
  errorCode,
1672
1644
  });
1673
1645
  }
@@ -1680,9 +1652,10 @@ export const de_DisassociateIdentityProviderConfigCommand = async (output, conte
1680
1652
  $metadata: deserializeMetadata(output),
1681
1653
  });
1682
1654
  const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
1683
- if (data.update != null) {
1684
- contents.update = de_Update(data.update, context);
1685
- }
1655
+ const doc = take(data, {
1656
+ update: (_) => de_Update(_, context),
1657
+ });
1658
+ Object.assign(contents, doc);
1686
1659
  return contents;
1687
1660
  };
1688
1661
  const de_DisassociateIdentityProviderConfigCommandError = async (output, context) => {
@@ -1712,10 +1685,9 @@ const de_DisassociateIdentityProviderConfigCommandError = async (output, context
1712
1685
  throw await de_ServerExceptionRes(parsedOutput, context);
1713
1686
  default:
1714
1687
  const parsedBody = parsedOutput.body;
1715
- throwDefaultError({
1688
+ return throwDefaultError({
1716
1689
  output,
1717
1690
  parsedBody,
1718
- exceptionCtor: __BaseException,
1719
1691
  errorCode,
1720
1692
  });
1721
1693
  }
@@ -1728,12 +1700,11 @@ export const de_ListAddonsCommand = async (output, context) => {
1728
1700
  $metadata: deserializeMetadata(output),
1729
1701
  });
1730
1702
  const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
1731
- if (data.addons != null) {
1732
- contents.addons = de_StringList(data.addons, context);
1733
- }
1734
- if (data.nextToken != null) {
1735
- contents.nextToken = __expectString(data.nextToken);
1736
- }
1703
+ const doc = take(data, {
1704
+ addons: _json,
1705
+ nextToken: __expectString,
1706
+ });
1707
+ Object.assign(contents, doc);
1737
1708
  return contents;
1738
1709
  };
1739
1710
  const de_ListAddonsCommandError = async (output, context) => {
@@ -1760,10 +1731,9 @@ const de_ListAddonsCommandError = async (output, context) => {
1760
1731
  throw await de_ServerExceptionRes(parsedOutput, context);
1761
1732
  default:
1762
1733
  const parsedBody = parsedOutput.body;
1763
- throwDefaultError({
1734
+ return throwDefaultError({
1764
1735
  output,
1765
1736
  parsedBody,
1766
- exceptionCtor: __BaseException,
1767
1737
  errorCode,
1768
1738
  });
1769
1739
  }
@@ -1776,12 +1746,11 @@ export const de_ListClustersCommand = async (output, context) => {
1776
1746
  $metadata: deserializeMetadata(output),
1777
1747
  });
1778
1748
  const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
1779
- if (data.clusters != null) {
1780
- contents.clusters = de_StringList(data.clusters, context);
1781
- }
1782
- if (data.nextToken != null) {
1783
- contents.nextToken = __expectString(data.nextToken);
1784
- }
1749
+ const doc = take(data, {
1750
+ clusters: _json,
1751
+ nextToken: __expectString,
1752
+ });
1753
+ Object.assign(contents, doc);
1785
1754
  return contents;
1786
1755
  };
1787
1756
  const de_ListClustersCommandError = async (output, context) => {
@@ -1805,10 +1774,9 @@ const de_ListClustersCommandError = async (output, context) => {
1805
1774
  throw await de_ServiceUnavailableExceptionRes(parsedOutput, context);
1806
1775
  default:
1807
1776
  const parsedBody = parsedOutput.body;
1808
- throwDefaultError({
1777
+ return throwDefaultError({
1809
1778
  output,
1810
1779
  parsedBody,
1811
- exceptionCtor: __BaseException,
1812
1780
  errorCode,
1813
1781
  });
1814
1782
  }
@@ -1821,12 +1789,11 @@ export const de_ListFargateProfilesCommand = async (output, context) => {
1821
1789
  $metadata: deserializeMetadata(output),
1822
1790
  });
1823
1791
  const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
1824
- if (data.fargateProfileNames != null) {
1825
- contents.fargateProfileNames = de_StringList(data.fargateProfileNames, context);
1826
- }
1827
- if (data.nextToken != null) {
1828
- contents.nextToken = __expectString(data.nextToken);
1829
- }
1792
+ const doc = take(data, {
1793
+ fargateProfileNames: _json,
1794
+ nextToken: __expectString,
1795
+ });
1796
+ Object.assign(contents, doc);
1830
1797
  return contents;
1831
1798
  };
1832
1799
  const de_ListFargateProfilesCommandError = async (output, context) => {
@@ -1850,10 +1817,9 @@ const de_ListFargateProfilesCommandError = async (output, context) => {
1850
1817
  throw await de_ServerExceptionRes(parsedOutput, context);
1851
1818
  default:
1852
1819
  const parsedBody = parsedOutput.body;
1853
- throwDefaultError({
1820
+ return throwDefaultError({
1854
1821
  output,
1855
1822
  parsedBody,
1856
- exceptionCtor: __BaseException,
1857
1823
  errorCode,
1858
1824
  });
1859
1825
  }
@@ -1866,12 +1832,11 @@ export const de_ListIdentityProviderConfigsCommand = async (output, context) =>
1866
1832
  $metadata: deserializeMetadata(output),
1867
1833
  });
1868
1834
  const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
1869
- if (data.identityProviderConfigs != null) {
1870
- contents.identityProviderConfigs = de_IdentityProviderConfigs(data.identityProviderConfigs, context);
1871
- }
1872
- if (data.nextToken != null) {
1873
- contents.nextToken = __expectString(data.nextToken);
1874
- }
1835
+ const doc = take(data, {
1836
+ identityProviderConfigs: _json,
1837
+ nextToken: __expectString,
1838
+ });
1839
+ Object.assign(contents, doc);
1875
1840
  return contents;
1876
1841
  };
1877
1842
  const de_ListIdentityProviderConfigsCommandError = async (output, context) => {
@@ -1898,10 +1863,9 @@ const de_ListIdentityProviderConfigsCommandError = async (output, context) => {
1898
1863
  throw await de_ServiceUnavailableExceptionRes(parsedOutput, context);
1899
1864
  default:
1900
1865
  const parsedBody = parsedOutput.body;
1901
- throwDefaultError({
1866
+ return throwDefaultError({
1902
1867
  output,
1903
1868
  parsedBody,
1904
- exceptionCtor: __BaseException,
1905
1869
  errorCode,
1906
1870
  });
1907
1871
  }
@@ -1914,12 +1878,11 @@ export const de_ListNodegroupsCommand = async (output, context) => {
1914
1878
  $metadata: deserializeMetadata(output),
1915
1879
  });
1916
1880
  const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
1917
- if (data.nextToken != null) {
1918
- contents.nextToken = __expectString(data.nextToken);
1919
- }
1920
- if (data.nodegroups != null) {
1921
- contents.nodegroups = de_StringList(data.nodegroups, context);
1922
- }
1881
+ const doc = take(data, {
1882
+ nextToken: __expectString,
1883
+ nodegroups: _json,
1884
+ });
1885
+ Object.assign(contents, doc);
1923
1886
  return contents;
1924
1887
  };
1925
1888
  const de_ListNodegroupsCommandError = async (output, context) => {
@@ -1946,10 +1909,9 @@ const de_ListNodegroupsCommandError = async (output, context) => {
1946
1909
  throw await de_ServiceUnavailableExceptionRes(parsedOutput, context);
1947
1910
  default:
1948
1911
  const parsedBody = parsedOutput.body;
1949
- throwDefaultError({
1912
+ return throwDefaultError({
1950
1913
  output,
1951
1914
  parsedBody,
1952
- exceptionCtor: __BaseException,
1953
1915
  errorCode,
1954
1916
  });
1955
1917
  }
@@ -1962,9 +1924,10 @@ export const de_ListTagsForResourceCommand = async (output, context) => {
1962
1924
  $metadata: deserializeMetadata(output),
1963
1925
  });
1964
1926
  const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
1965
- if (data.tags != null) {
1966
- contents.tags = de_TagMap(data.tags, context);
1967
- }
1927
+ const doc = take(data, {
1928
+ tags: _json,
1929
+ });
1930
+ Object.assign(contents, doc);
1968
1931
  return contents;
1969
1932
  };
1970
1933
  const de_ListTagsForResourceCommandError = async (output, context) => {
@@ -1982,10 +1945,9 @@ const de_ListTagsForResourceCommandError = async (output, context) => {
1982
1945
  throw await de_NotFoundExceptionRes(parsedOutput, context);
1983
1946
  default:
1984
1947
  const parsedBody = parsedOutput.body;
1985
- throwDefaultError({
1948
+ return throwDefaultError({
1986
1949
  output,
1987
1950
  parsedBody,
1988
- exceptionCtor: __BaseException,
1989
1951
  errorCode,
1990
1952
  });
1991
1953
  }
@@ -1998,12 +1960,11 @@ export const de_ListUpdatesCommand = async (output, context) => {
1998
1960
  $metadata: deserializeMetadata(output),
1999
1961
  });
2000
1962
  const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
2001
- if (data.nextToken != null) {
2002
- contents.nextToken = __expectString(data.nextToken);
2003
- }
2004
- if (data.updateIds != null) {
2005
- contents.updateIds = de_StringList(data.updateIds, context);
2006
- }
1963
+ const doc = take(data, {
1964
+ nextToken: __expectString,
1965
+ updateIds: _json,
1966
+ });
1967
+ Object.assign(contents, doc);
2007
1968
  return contents;
2008
1969
  };
2009
1970
  const de_ListUpdatesCommandError = async (output, context) => {
@@ -2027,10 +1988,9 @@ const de_ListUpdatesCommandError = async (output, context) => {
2027
1988
  throw await de_ServerExceptionRes(parsedOutput, context);
2028
1989
  default:
2029
1990
  const parsedBody = parsedOutput.body;
2030
- throwDefaultError({
1991
+ return throwDefaultError({
2031
1992
  output,
2032
1993
  parsedBody,
2033
- exceptionCtor: __BaseException,
2034
1994
  errorCode,
2035
1995
  });
2036
1996
  }
@@ -2043,9 +2003,10 @@ export const de_RegisterClusterCommand = async (output, context) => {
2043
2003
  $metadata: deserializeMetadata(output),
2044
2004
  });
2045
2005
  const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
2046
- if (data.cluster != null) {
2047
- contents.cluster = de_Cluster(data.cluster, context);
2048
- }
2006
+ const doc = take(data, {
2007
+ cluster: (_) => de_Cluster(_, context),
2008
+ });
2009
+ Object.assign(contents, doc);
2049
2010
  return contents;
2050
2011
  };
2051
2012
  const de_RegisterClusterCommandError = async (output, context) => {
@@ -2081,10 +2042,9 @@ const de_RegisterClusterCommandError = async (output, context) => {
2081
2042
  throw await de_ServiceUnavailableExceptionRes(parsedOutput, context);
2082
2043
  default:
2083
2044
  const parsedBody = parsedOutput.body;
2084
- throwDefaultError({
2045
+ return throwDefaultError({
2085
2046
  output,
2086
2047
  parsedBody,
2087
- exceptionCtor: __BaseException,
2088
2048
  errorCode,
2089
2049
  });
2090
2050
  }
@@ -2114,10 +2074,9 @@ const de_TagResourceCommandError = async (output, context) => {
2114
2074
  throw await de_NotFoundExceptionRes(parsedOutput, context);
2115
2075
  default:
2116
2076
  const parsedBody = parsedOutput.body;
2117
- throwDefaultError({
2077
+ return throwDefaultError({
2118
2078
  output,
2119
2079
  parsedBody,
2120
- exceptionCtor: __BaseException,
2121
2080
  errorCode,
2122
2081
  });
2123
2082
  }
@@ -2147,10 +2106,9 @@ const de_UntagResourceCommandError = async (output, context) => {
2147
2106
  throw await de_NotFoundExceptionRes(parsedOutput, context);
2148
2107
  default:
2149
2108
  const parsedBody = parsedOutput.body;
2150
- throwDefaultError({
2109
+ return throwDefaultError({
2151
2110
  output,
2152
2111
  parsedBody,
2153
- exceptionCtor: __BaseException,
2154
2112
  errorCode,
2155
2113
  });
2156
2114
  }
@@ -2163,9 +2121,10 @@ export const de_UpdateAddonCommand = async (output, context) => {
2163
2121
  $metadata: deserializeMetadata(output),
2164
2122
  });
2165
2123
  const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
2166
- if (data.update != null) {
2167
- contents.update = de_Update(data.update, context);
2168
- }
2124
+ const doc = take(data, {
2125
+ update: (_) => de_Update(_, context),
2126
+ });
2127
+ Object.assign(contents, doc);
2169
2128
  return contents;
2170
2129
  };
2171
2130
  const de_UpdateAddonCommandError = async (output, context) => {
@@ -2195,10 +2154,9 @@ const de_UpdateAddonCommandError = async (output, context) => {
2195
2154
  throw await de_ServerExceptionRes(parsedOutput, context);
2196
2155
  default:
2197
2156
  const parsedBody = parsedOutput.body;
2198
- throwDefaultError({
2157
+ return throwDefaultError({
2199
2158
  output,
2200
2159
  parsedBody,
2201
- exceptionCtor: __BaseException,
2202
2160
  errorCode,
2203
2161
  });
2204
2162
  }
@@ -2211,9 +2169,10 @@ export const de_UpdateClusterConfigCommand = async (output, context) => {
2211
2169
  $metadata: deserializeMetadata(output),
2212
2170
  });
2213
2171
  const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
2214
- if (data.update != null) {
2215
- contents.update = de_Update(data.update, context);
2216
- }
2172
+ const doc = take(data, {
2173
+ update: (_) => de_Update(_, context),
2174
+ });
2175
+ Object.assign(contents, doc);
2217
2176
  return contents;
2218
2177
  };
2219
2178
  const de_UpdateClusterConfigCommandError = async (output, context) => {
@@ -2243,10 +2202,9 @@ const de_UpdateClusterConfigCommandError = async (output, context) => {
2243
2202
  throw await de_ServerExceptionRes(parsedOutput, context);
2244
2203
  default:
2245
2204
  const parsedBody = parsedOutput.body;
2246
- throwDefaultError({
2205
+ return throwDefaultError({
2247
2206
  output,
2248
2207
  parsedBody,
2249
- exceptionCtor: __BaseException,
2250
2208
  errorCode,
2251
2209
  });
2252
2210
  }
@@ -2259,9 +2217,10 @@ export const de_UpdateClusterVersionCommand = async (output, context) => {
2259
2217
  $metadata: deserializeMetadata(output),
2260
2218
  });
2261
2219
  const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
2262
- if (data.update != null) {
2263
- contents.update = de_Update(data.update, context);
2264
- }
2220
+ const doc = take(data, {
2221
+ update: (_) => de_Update(_, context),
2222
+ });
2223
+ Object.assign(contents, doc);
2265
2224
  return contents;
2266
2225
  };
2267
2226
  const de_UpdateClusterVersionCommandError = async (output, context) => {
@@ -2291,10 +2250,9 @@ const de_UpdateClusterVersionCommandError = async (output, context) => {
2291
2250
  throw await de_ServerExceptionRes(parsedOutput, context);
2292
2251
  default:
2293
2252
  const parsedBody = parsedOutput.body;
2294
- throwDefaultError({
2253
+ return throwDefaultError({
2295
2254
  output,
2296
2255
  parsedBody,
2297
- exceptionCtor: __BaseException,
2298
2256
  errorCode,
2299
2257
  });
2300
2258
  }
@@ -2307,9 +2265,10 @@ export const de_UpdateNodegroupConfigCommand = async (output, context) => {
2307
2265
  $metadata: deserializeMetadata(output),
2308
2266
  });
2309
2267
  const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
2310
- if (data.update != null) {
2311
- contents.update = de_Update(data.update, context);
2312
- }
2268
+ const doc = take(data, {
2269
+ update: (_) => de_Update(_, context),
2270
+ });
2271
+ Object.assign(contents, doc);
2313
2272
  return contents;
2314
2273
  };
2315
2274
  const de_UpdateNodegroupConfigCommandError = async (output, context) => {
@@ -2339,10 +2298,9 @@ const de_UpdateNodegroupConfigCommandError = async (output, context) => {
2339
2298
  throw await de_ServerExceptionRes(parsedOutput, context);
2340
2299
  default:
2341
2300
  const parsedBody = parsedOutput.body;
2342
- throwDefaultError({
2301
+ return throwDefaultError({
2343
2302
  output,
2344
2303
  parsedBody,
2345
- exceptionCtor: __BaseException,
2346
2304
  errorCode,
2347
2305
  });
2348
2306
  }
@@ -2355,9 +2313,10 @@ export const de_UpdateNodegroupVersionCommand = async (output, context) => {
2355
2313
  $metadata: deserializeMetadata(output),
2356
2314
  });
2357
2315
  const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
2358
- if (data.update != null) {
2359
- contents.update = de_Update(data.update, context);
2360
- }
2316
+ const doc = take(data, {
2317
+ update: (_) => de_Update(_, context),
2318
+ });
2319
+ Object.assign(contents, doc);
2361
2320
  return contents;
2362
2321
  };
2363
2322
  const de_UpdateNodegroupVersionCommandError = async (output, context) => {
@@ -2387,21 +2346,21 @@ const de_UpdateNodegroupVersionCommandError = async (output, context) => {
2387
2346
  throw await de_ServerExceptionRes(parsedOutput, context);
2388
2347
  default:
2389
2348
  const parsedBody = parsedOutput.body;
2390
- throwDefaultError({
2349
+ return throwDefaultError({
2391
2350
  output,
2392
2351
  parsedBody,
2393
- exceptionCtor: __BaseException,
2394
2352
  errorCode,
2395
2353
  });
2396
2354
  }
2397
2355
  };
2398
- const map = __map;
2356
+ const throwDefaultError = withBaseException(__BaseException);
2399
2357
  const de_AccessDeniedExceptionRes = async (parsedOutput, context) => {
2400
2358
  const contents = map({});
2401
2359
  const data = parsedOutput.body;
2402
- if (data.message != null) {
2403
- contents.message = __expectString(data.message);
2404
- }
2360
+ const doc = take(data, {
2361
+ message: __expectString,
2362
+ });
2363
+ Object.assign(contents, doc);
2405
2364
  const exception = new AccessDeniedException({
2406
2365
  $metadata: deserializeMetadata(parsedOutput),
2407
2366
  ...contents,
@@ -2411,9 +2370,10 @@ const de_AccessDeniedExceptionRes = async (parsedOutput, context) => {
2411
2370
  const de_BadRequestExceptionRes = async (parsedOutput, context) => {
2412
2371
  const contents = map({});
2413
2372
  const data = parsedOutput.body;
2414
- if (data.message != null) {
2415
- contents.message = __expectString(data.message);
2416
- }
2373
+ const doc = take(data, {
2374
+ message: __expectString,
2375
+ });
2376
+ Object.assign(contents, doc);
2417
2377
  const exception = new BadRequestException({
2418
2378
  $metadata: deserializeMetadata(parsedOutput),
2419
2379
  ...contents,
@@ -2423,18 +2383,13 @@ const de_BadRequestExceptionRes = async (parsedOutput, context) => {
2423
2383
  const de_ClientExceptionRes = async (parsedOutput, context) => {
2424
2384
  const contents = map({});
2425
2385
  const data = parsedOutput.body;
2426
- if (data.addonName != null) {
2427
- contents.addonName = __expectString(data.addonName);
2428
- }
2429
- if (data.clusterName != null) {
2430
- contents.clusterName = __expectString(data.clusterName);
2431
- }
2432
- if (data.message != null) {
2433
- contents.message = __expectString(data.message);
2434
- }
2435
- if (data.nodegroupName != null) {
2436
- contents.nodegroupName = __expectString(data.nodegroupName);
2437
- }
2386
+ const doc = take(data, {
2387
+ addonName: __expectString,
2388
+ clusterName: __expectString,
2389
+ message: __expectString,
2390
+ nodegroupName: __expectString,
2391
+ });
2392
+ Object.assign(contents, doc);
2438
2393
  const exception = new ClientException({
2439
2394
  $metadata: deserializeMetadata(parsedOutput),
2440
2395
  ...contents,
@@ -2444,21 +2399,14 @@ const de_ClientExceptionRes = async (parsedOutput, context) => {
2444
2399
  const de_InvalidParameterExceptionRes = async (parsedOutput, context) => {
2445
2400
  const contents = map({});
2446
2401
  const data = parsedOutput.body;
2447
- if (data.addonName != null) {
2448
- contents.addonName = __expectString(data.addonName);
2449
- }
2450
- if (data.clusterName != null) {
2451
- contents.clusterName = __expectString(data.clusterName);
2452
- }
2453
- if (data.fargateProfileName != null) {
2454
- contents.fargateProfileName = __expectString(data.fargateProfileName);
2455
- }
2456
- if (data.message != null) {
2457
- contents.message = __expectString(data.message);
2458
- }
2459
- if (data.nodegroupName != null) {
2460
- contents.nodegroupName = __expectString(data.nodegroupName);
2461
- }
2402
+ const doc = take(data, {
2403
+ addonName: __expectString,
2404
+ clusterName: __expectString,
2405
+ fargateProfileName: __expectString,
2406
+ message: __expectString,
2407
+ nodegroupName: __expectString,
2408
+ });
2409
+ Object.assign(contents, doc);
2462
2410
  const exception = new InvalidParameterException({
2463
2411
  $metadata: deserializeMetadata(parsedOutput),
2464
2412
  ...contents,
@@ -2468,18 +2416,13 @@ const de_InvalidParameterExceptionRes = async (parsedOutput, context) => {
2468
2416
  const de_InvalidRequestExceptionRes = async (parsedOutput, context) => {
2469
2417
  const contents = map({});
2470
2418
  const data = parsedOutput.body;
2471
- if (data.addonName != null) {
2472
- contents.addonName = __expectString(data.addonName);
2473
- }
2474
- if (data.clusterName != null) {
2475
- contents.clusterName = __expectString(data.clusterName);
2476
- }
2477
- if (data.message != null) {
2478
- contents.message = __expectString(data.message);
2479
- }
2480
- if (data.nodegroupName != null) {
2481
- contents.nodegroupName = __expectString(data.nodegroupName);
2482
- }
2419
+ const doc = take(data, {
2420
+ addonName: __expectString,
2421
+ clusterName: __expectString,
2422
+ message: __expectString,
2423
+ nodegroupName: __expectString,
2424
+ });
2425
+ Object.assign(contents, doc);
2483
2426
  const exception = new InvalidRequestException({
2484
2427
  $metadata: deserializeMetadata(parsedOutput),
2485
2428
  ...contents,
@@ -2489,9 +2432,10 @@ const de_InvalidRequestExceptionRes = async (parsedOutput, context) => {
2489
2432
  const de_NotFoundExceptionRes = async (parsedOutput, context) => {
2490
2433
  const contents = map({});
2491
2434
  const data = parsedOutput.body;
2492
- if (data.message != null) {
2493
- contents.message = __expectString(data.message);
2494
- }
2435
+ const doc = take(data, {
2436
+ message: __expectString,
2437
+ });
2438
+ Object.assign(contents, doc);
2495
2439
  const exception = new NotFoundException({
2496
2440
  $metadata: deserializeMetadata(parsedOutput),
2497
2441
  ...contents,
@@ -2501,18 +2445,13 @@ const de_NotFoundExceptionRes = async (parsedOutput, context) => {
2501
2445
  const de_ResourceInUseExceptionRes = async (parsedOutput, context) => {
2502
2446
  const contents = map({});
2503
2447
  const data = parsedOutput.body;
2504
- if (data.addonName != null) {
2505
- contents.addonName = __expectString(data.addonName);
2506
- }
2507
- if (data.clusterName != null) {
2508
- contents.clusterName = __expectString(data.clusterName);
2509
- }
2510
- if (data.message != null) {
2511
- contents.message = __expectString(data.message);
2512
- }
2513
- if (data.nodegroupName != null) {
2514
- contents.nodegroupName = __expectString(data.nodegroupName);
2515
- }
2448
+ const doc = take(data, {
2449
+ addonName: __expectString,
2450
+ clusterName: __expectString,
2451
+ message: __expectString,
2452
+ nodegroupName: __expectString,
2453
+ });
2454
+ Object.assign(contents, doc);
2516
2455
  const exception = new ResourceInUseException({
2517
2456
  $metadata: deserializeMetadata(parsedOutput),
2518
2457
  ...contents,
@@ -2522,15 +2461,12 @@ const de_ResourceInUseExceptionRes = async (parsedOutput, context) => {
2522
2461
  const de_ResourceLimitExceededExceptionRes = async (parsedOutput, context) => {
2523
2462
  const contents = map({});
2524
2463
  const data = parsedOutput.body;
2525
- if (data.clusterName != null) {
2526
- contents.clusterName = __expectString(data.clusterName);
2527
- }
2528
- if (data.message != null) {
2529
- contents.message = __expectString(data.message);
2530
- }
2531
- if (data.nodegroupName != null) {
2532
- contents.nodegroupName = __expectString(data.nodegroupName);
2533
- }
2464
+ const doc = take(data, {
2465
+ clusterName: __expectString,
2466
+ message: __expectString,
2467
+ nodegroupName: __expectString,
2468
+ });
2469
+ Object.assign(contents, doc);
2534
2470
  const exception = new ResourceLimitExceededException({
2535
2471
  $metadata: deserializeMetadata(parsedOutput),
2536
2472
  ...contents,
@@ -2540,21 +2476,14 @@ const de_ResourceLimitExceededExceptionRes = async (parsedOutput, context) => {
2540
2476
  const de_ResourceNotFoundExceptionRes = async (parsedOutput, context) => {
2541
2477
  const contents = map({});
2542
2478
  const data = parsedOutput.body;
2543
- if (data.addonName != null) {
2544
- contents.addonName = __expectString(data.addonName);
2545
- }
2546
- if (data.clusterName != null) {
2547
- contents.clusterName = __expectString(data.clusterName);
2548
- }
2549
- if (data.fargateProfileName != null) {
2550
- contents.fargateProfileName = __expectString(data.fargateProfileName);
2551
- }
2552
- if (data.message != null) {
2553
- contents.message = __expectString(data.message);
2554
- }
2555
- if (data.nodegroupName != null) {
2556
- contents.nodegroupName = __expectString(data.nodegroupName);
2557
- }
2479
+ const doc = take(data, {
2480
+ addonName: __expectString,
2481
+ clusterName: __expectString,
2482
+ fargateProfileName: __expectString,
2483
+ message: __expectString,
2484
+ nodegroupName: __expectString,
2485
+ });
2486
+ Object.assign(contents, doc);
2558
2487
  const exception = new ResourceNotFoundException({
2559
2488
  $metadata: deserializeMetadata(parsedOutput),
2560
2489
  ...contents,
@@ -2564,9 +2493,10 @@ const de_ResourceNotFoundExceptionRes = async (parsedOutput, context) => {
2564
2493
  const de_ResourcePropagationDelayExceptionRes = async (parsedOutput, context) => {
2565
2494
  const contents = map({});
2566
2495
  const data = parsedOutput.body;
2567
- if (data.message != null) {
2568
- contents.message = __expectString(data.message);
2569
- }
2496
+ const doc = take(data, {
2497
+ message: __expectString,
2498
+ });
2499
+ Object.assign(contents, doc);
2570
2500
  const exception = new ResourcePropagationDelayException({
2571
2501
  $metadata: deserializeMetadata(parsedOutput),
2572
2502
  ...contents,
@@ -2576,18 +2506,13 @@ const de_ResourcePropagationDelayExceptionRes = async (parsedOutput, context) =>
2576
2506
  const de_ServerExceptionRes = async (parsedOutput, context) => {
2577
2507
  const contents = map({});
2578
2508
  const data = parsedOutput.body;
2579
- if (data.addonName != null) {
2580
- contents.addonName = __expectString(data.addonName);
2581
- }
2582
- if (data.clusterName != null) {
2583
- contents.clusterName = __expectString(data.clusterName);
2584
- }
2585
- if (data.message != null) {
2586
- contents.message = __expectString(data.message);
2587
- }
2588
- if (data.nodegroupName != null) {
2589
- contents.nodegroupName = __expectString(data.nodegroupName);
2590
- }
2509
+ const doc = take(data, {
2510
+ addonName: __expectString,
2511
+ clusterName: __expectString,
2512
+ message: __expectString,
2513
+ nodegroupName: __expectString,
2514
+ });
2515
+ Object.assign(contents, doc);
2591
2516
  const exception = new ServerException({
2592
2517
  $metadata: deserializeMetadata(parsedOutput),
2593
2518
  ...contents,
@@ -2597,9 +2522,10 @@ const de_ServerExceptionRes = async (parsedOutput, context) => {
2597
2522
  const de_ServiceUnavailableExceptionRes = async (parsedOutput, context) => {
2598
2523
  const contents = map({});
2599
2524
  const data = parsedOutput.body;
2600
- if (data.message != null) {
2601
- contents.message = __expectString(data.message);
2602
- }
2525
+ const doc = take(data, {
2526
+ message: __expectString,
2527
+ });
2528
+ Object.assign(contents, doc);
2603
2529
  const exception = new ServiceUnavailableException({
2604
2530
  $metadata: deserializeMetadata(parsedOutput),
2605
2531
  ...contents,
@@ -2609,783 +2535,119 @@ const de_ServiceUnavailableExceptionRes = async (parsedOutput, context) => {
2609
2535
  const de_UnsupportedAvailabilityZoneExceptionRes = async (parsedOutput, context) => {
2610
2536
  const contents = map({});
2611
2537
  const data = parsedOutput.body;
2612
- if (data.clusterName != null) {
2613
- contents.clusterName = __expectString(data.clusterName);
2614
- }
2615
- if (data.message != null) {
2616
- contents.message = __expectString(data.message);
2617
- }
2618
- if (data.nodegroupName != null) {
2619
- contents.nodegroupName = __expectString(data.nodegroupName);
2620
- }
2621
- if (data.validZones != null) {
2622
- contents.validZones = de_StringList(data.validZones, context);
2623
- }
2538
+ const doc = take(data, {
2539
+ clusterName: __expectString,
2540
+ message: __expectString,
2541
+ nodegroupName: __expectString,
2542
+ validZones: _json,
2543
+ });
2544
+ Object.assign(contents, doc);
2624
2545
  const exception = new UnsupportedAvailabilityZoneException({
2625
2546
  $metadata: deserializeMetadata(parsedOutput),
2626
2547
  ...contents,
2627
2548
  });
2628
2549
  return __decorateServiceException(exception, parsedOutput.body);
2629
2550
  };
2630
- const se_ConnectorConfigRequest = (input, context) => {
2631
- return {
2632
- ...(input.provider != null && { provider: input.provider }),
2633
- ...(input.roleArn != null && { roleArn: input.roleArn }),
2634
- };
2635
- };
2636
- const se_ControlPlanePlacementRequest = (input, context) => {
2637
- return {
2638
- ...(input.groupName != null && { groupName: input.groupName }),
2639
- };
2640
- };
2641
- const se_EncryptionConfig = (input, context) => {
2642
- return {
2643
- ...(input.provider != null && { provider: se_Provider(input.provider, context) }),
2644
- ...(input.resources != null && { resources: se_StringList(input.resources, context) }),
2645
- };
2646
- };
2647
- const se_EncryptionConfigList = (input, context) => {
2648
- return input
2649
- .filter((e) => e != null)
2650
- .map((entry) => {
2651
- return se_EncryptionConfig(entry, context);
2652
- });
2653
- };
2654
- const se_FargateProfileLabel = (input, context) => {
2655
- return Object.entries(input).reduce((acc, [key, value]) => {
2656
- if (value === null) {
2657
- return acc;
2658
- }
2659
- acc[key] = value;
2660
- return acc;
2661
- }, {});
2662
- };
2663
- const se_FargateProfileSelector = (input, context) => {
2664
- return {
2665
- ...(input.labels != null && { labels: se_FargateProfileLabel(input.labels, context) }),
2666
- ...(input.namespace != null && { namespace: input.namespace }),
2667
- };
2668
- };
2669
- const se_FargateProfileSelectors = (input, context) => {
2670
- return input
2671
- .filter((e) => e != null)
2672
- .map((entry) => {
2673
- return se_FargateProfileSelector(entry, context);
2674
- });
2675
- };
2676
- const se_IdentityProviderConfig = (input, context) => {
2677
- return {
2678
- ...(input.name != null && { name: input.name }),
2679
- ...(input.type != null && { type: input.type }),
2680
- };
2681
- };
2682
- const se_KubernetesNetworkConfigRequest = (input, context) => {
2683
- return {
2684
- ...(input.ipFamily != null && { ipFamily: input.ipFamily }),
2685
- ...(input.serviceIpv4Cidr != null && { serviceIpv4Cidr: input.serviceIpv4Cidr }),
2686
- };
2687
- };
2688
- const se_labelsKeyList = (input, context) => {
2689
- return input
2690
- .filter((e) => e != null)
2691
- .map((entry) => {
2692
- return entry;
2693
- });
2694
- };
2695
- const se_labelsMap = (input, context) => {
2696
- return Object.entries(input).reduce((acc, [key, value]) => {
2697
- if (value === null) {
2698
- return acc;
2699
- }
2700
- acc[key] = value;
2701
- return acc;
2702
- }, {});
2703
- };
2704
- const se_LaunchTemplateSpecification = (input, context) => {
2705
- return {
2706
- ...(input.id != null && { id: input.id }),
2707
- ...(input.name != null && { name: input.name }),
2708
- ...(input.version != null && { version: input.version }),
2709
- };
2710
- };
2711
- const se_Logging = (input, context) => {
2712
- return {
2713
- ...(input.clusterLogging != null && { clusterLogging: se_LogSetups(input.clusterLogging, context) }),
2714
- };
2715
- };
2716
- const se_LogSetup = (input, context) => {
2717
- return {
2718
- ...(input.enabled != null && { enabled: input.enabled }),
2719
- ...(input.types != null && { types: se_LogTypes(input.types, context) }),
2720
- };
2721
- };
2722
- const se_LogSetups = (input, context) => {
2723
- return input
2724
- .filter((e) => e != null)
2725
- .map((entry) => {
2726
- return se_LogSetup(entry, context);
2727
- });
2728
- };
2729
- const se_LogTypes = (input, context) => {
2730
- return input
2731
- .filter((e) => e != null)
2732
- .map((entry) => {
2733
- return entry;
2734
- });
2735
- };
2736
- const se_NodegroupScalingConfig = (input, context) => {
2737
- return {
2738
- ...(input.desiredSize != null && { desiredSize: input.desiredSize }),
2739
- ...(input.maxSize != null && { maxSize: input.maxSize }),
2740
- ...(input.minSize != null && { minSize: input.minSize }),
2741
- };
2742
- };
2743
- const se_NodegroupUpdateConfig = (input, context) => {
2744
- return {
2745
- ...(input.maxUnavailable != null && { maxUnavailable: input.maxUnavailable }),
2746
- ...(input.maxUnavailablePercentage != null && { maxUnavailablePercentage: input.maxUnavailablePercentage }),
2747
- };
2748
- };
2749
- const se_OidcIdentityProviderConfigRequest = (input, context) => {
2750
- return {
2751
- ...(input.clientId != null && { clientId: input.clientId }),
2752
- ...(input.groupsClaim != null && { groupsClaim: input.groupsClaim }),
2753
- ...(input.groupsPrefix != null && { groupsPrefix: input.groupsPrefix }),
2754
- ...(input.identityProviderConfigName != null && { identityProviderConfigName: input.identityProviderConfigName }),
2755
- ...(input.issuerUrl != null && { issuerUrl: input.issuerUrl }),
2756
- ...(input.requiredClaims != null && { requiredClaims: se_requiredClaimsMap(input.requiredClaims, context) }),
2757
- ...(input.usernameClaim != null && { usernameClaim: input.usernameClaim }),
2758
- ...(input.usernamePrefix != null && { usernamePrefix: input.usernamePrefix }),
2759
- };
2760
- };
2761
- const se_OutpostConfigRequest = (input, context) => {
2762
- return {
2763
- ...(input.controlPlaneInstanceType != null && { controlPlaneInstanceType: input.controlPlaneInstanceType }),
2764
- ...(input.controlPlanePlacement != null && {
2765
- controlPlanePlacement: se_ControlPlanePlacementRequest(input.controlPlanePlacement, context),
2766
- }),
2767
- ...(input.outpostArns != null && { outpostArns: se_StringList(input.outpostArns, context) }),
2768
- };
2769
- };
2770
- const se_Provider = (input, context) => {
2771
- return {
2772
- ...(input.keyArn != null && { keyArn: input.keyArn }),
2773
- };
2774
- };
2775
- const se_RemoteAccessConfig = (input, context) => {
2776
- return {
2777
- ...(input.ec2SshKey != null && { ec2SshKey: input.ec2SshKey }),
2778
- ...(input.sourceSecurityGroups != null && {
2779
- sourceSecurityGroups: se_StringList(input.sourceSecurityGroups, context),
2780
- }),
2781
- };
2782
- };
2783
- const se_requiredClaimsMap = (input, context) => {
2784
- return Object.entries(input).reduce((acc, [key, value]) => {
2785
- if (value === null) {
2786
- return acc;
2787
- }
2788
- acc[key] = value;
2789
- return acc;
2790
- }, {});
2791
- };
2792
- const se_StringList = (input, context) => {
2793
- return input
2794
- .filter((e) => e != null)
2795
- .map((entry) => {
2796
- return entry;
2797
- });
2798
- };
2799
- const se_TagMap = (input, context) => {
2800
- return Object.entries(input).reduce((acc, [key, value]) => {
2801
- if (value === null) {
2802
- return acc;
2803
- }
2804
- acc[key] = value;
2805
- return acc;
2806
- }, {});
2807
- };
2808
- const se_Taint = (input, context) => {
2809
- return {
2810
- ...(input.effect != null && { effect: input.effect }),
2811
- ...(input.key != null && { key: input.key }),
2812
- ...(input.value != null && { value: input.value }),
2813
- };
2814
- };
2815
- const se_taintsList = (input, context) => {
2816
- return input
2817
- .filter((e) => e != null)
2818
- .map((entry) => {
2819
- return se_Taint(entry, context);
2820
- });
2821
- };
2822
- const se_UpdateLabelsPayload = (input, context) => {
2823
- return {
2824
- ...(input.addOrUpdateLabels != null && { addOrUpdateLabels: se_labelsMap(input.addOrUpdateLabels, context) }),
2825
- ...(input.removeLabels != null && { removeLabels: se_labelsKeyList(input.removeLabels, context) }),
2826
- };
2827
- };
2828
- const se_UpdateTaintsPayload = (input, context) => {
2829
- return {
2830
- ...(input.addOrUpdateTaints != null && { addOrUpdateTaints: se_taintsList(input.addOrUpdateTaints, context) }),
2831
- ...(input.removeTaints != null && { removeTaints: se_taintsList(input.removeTaints, context) }),
2832
- };
2833
- };
2834
- const se_VpcConfigRequest = (input, context) => {
2835
- return {
2836
- ...(input.endpointPrivateAccess != null && { endpointPrivateAccess: input.endpointPrivateAccess }),
2837
- ...(input.endpointPublicAccess != null && { endpointPublicAccess: input.endpointPublicAccess }),
2838
- ...(input.publicAccessCidrs != null && { publicAccessCidrs: se_StringList(input.publicAccessCidrs, context) }),
2839
- ...(input.securityGroupIds != null && { securityGroupIds: se_StringList(input.securityGroupIds, context) }),
2840
- ...(input.subnetIds != null && { subnetIds: se_StringList(input.subnetIds, context) }),
2841
- };
2842
- };
2843
2551
  const de_Addon = (output, context) => {
2844
- return {
2845
- addonArn: __expectString(output.addonArn),
2846
- addonName: __expectString(output.addonName),
2847
- addonVersion: __expectString(output.addonVersion),
2848
- clusterName: __expectString(output.clusterName),
2849
- configurationValues: __expectString(output.configurationValues),
2850
- createdAt: output.createdAt != null ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.createdAt))) : undefined,
2851
- health: output.health != null ? de_AddonHealth(output.health, context) : undefined,
2852
- marketplaceInformation: output.marketplaceInformation != null
2853
- ? de_MarketplaceInformation(output.marketplaceInformation, context)
2854
- : undefined,
2855
- modifiedAt: output.modifiedAt != null ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.modifiedAt))) : undefined,
2856
- owner: __expectString(output.owner),
2857
- publisher: __expectString(output.publisher),
2858
- serviceAccountRoleArn: __expectString(output.serviceAccountRoleArn),
2859
- status: __expectString(output.status),
2860
- tags: output.tags != null ? de_TagMap(output.tags, context) : undefined,
2861
- };
2862
- };
2863
- const de_AddonHealth = (output, context) => {
2864
- return {
2865
- issues: output.issues != null ? de_AddonIssueList(output.issues, context) : undefined,
2866
- };
2867
- };
2868
- const de_AddonInfo = (output, context) => {
2869
- return {
2870
- addonName: __expectString(output.addonName),
2871
- addonVersions: output.addonVersions != null ? de_AddonVersionInfoList(output.addonVersions, context) : undefined,
2872
- marketplaceInformation: output.marketplaceInformation != null
2873
- ? de_MarketplaceInformation(output.marketplaceInformation, context)
2874
- : undefined,
2875
- owner: __expectString(output.owner),
2876
- publisher: __expectString(output.publisher),
2877
- type: __expectString(output.type),
2878
- };
2879
- };
2880
- const de_AddonIssue = (output, context) => {
2881
- return {
2882
- code: __expectString(output.code),
2883
- message: __expectString(output.message),
2884
- resourceIds: output.resourceIds != null ? de_StringList(output.resourceIds, context) : undefined,
2885
- };
2886
- };
2887
- const de_AddonIssueList = (output, context) => {
2888
- const retVal = (output || [])
2889
- .filter((e) => e != null)
2890
- .map((entry) => {
2891
- if (entry === null) {
2892
- return null;
2893
- }
2894
- return de_AddonIssue(entry, context);
2895
- });
2896
- return retVal;
2897
- };
2898
- const de_Addons = (output, context) => {
2899
- const retVal = (output || [])
2900
- .filter((e) => e != null)
2901
- .map((entry) => {
2902
- if (entry === null) {
2903
- return null;
2904
- }
2905
- return de_AddonInfo(entry, context);
2906
- });
2907
- return retVal;
2908
- };
2909
- const de_AddonVersionInfo = (output, context) => {
2910
- return {
2911
- addonVersion: __expectString(output.addonVersion),
2912
- architecture: output.architecture != null ? de_StringList(output.architecture, context) : undefined,
2913
- compatibilities: output.compatibilities != null ? de_Compatibilities(output.compatibilities, context) : undefined,
2914
- requiresConfiguration: __expectBoolean(output.requiresConfiguration),
2915
- };
2916
- };
2917
- const de_AddonVersionInfoList = (output, context) => {
2918
- const retVal = (output || [])
2919
- .filter((e) => e != null)
2920
- .map((entry) => {
2921
- if (entry === null) {
2922
- return null;
2923
- }
2924
- return de_AddonVersionInfo(entry, context);
2925
- });
2926
- return retVal;
2927
- };
2928
- const de_AutoScalingGroup = (output, context) => {
2929
- return {
2930
- name: __expectString(output.name),
2931
- };
2932
- };
2933
- const de_AutoScalingGroupList = (output, context) => {
2934
- const retVal = (output || [])
2935
- .filter((e) => e != null)
2936
- .map((entry) => {
2937
- if (entry === null) {
2938
- return null;
2939
- }
2940
- return de_AutoScalingGroup(entry, context);
2552
+ return take(output, {
2553
+ addonArn: __expectString,
2554
+ addonName: __expectString,
2555
+ addonVersion: __expectString,
2556
+ clusterName: __expectString,
2557
+ configurationValues: __expectString,
2558
+ createdAt: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))),
2559
+ health: _json,
2560
+ marketplaceInformation: _json,
2561
+ modifiedAt: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))),
2562
+ owner: __expectString,
2563
+ publisher: __expectString,
2564
+ serviceAccountRoleArn: __expectString,
2565
+ status: __expectString,
2566
+ tags: _json,
2941
2567
  });
2942
- return retVal;
2943
- };
2944
- const de_Certificate = (output, context) => {
2945
- return {
2946
- data: __expectString(output.data),
2947
- };
2948
2568
  };
2949
2569
  const de_Cluster = (output, context) => {
2950
- return {
2951
- arn: __expectString(output.arn),
2952
- certificateAuthority: output.certificateAuthority != null ? de_Certificate(output.certificateAuthority, context) : undefined,
2953
- clientRequestToken: __expectString(output.clientRequestToken),
2954
- connectorConfig: output.connectorConfig != null ? de_ConnectorConfigResponse(output.connectorConfig, context) : undefined,
2955
- createdAt: output.createdAt != null ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.createdAt))) : undefined,
2956
- encryptionConfig: output.encryptionConfig != null ? de_EncryptionConfigList(output.encryptionConfig, context) : undefined,
2957
- endpoint: __expectString(output.endpoint),
2958
- health: output.health != null ? de_ClusterHealth(output.health, context) : undefined,
2959
- id: __expectString(output.id),
2960
- identity: output.identity != null ? de_Identity(output.identity, context) : undefined,
2961
- kubernetesNetworkConfig: output.kubernetesNetworkConfig != null
2962
- ? de_KubernetesNetworkConfigResponse(output.kubernetesNetworkConfig, context)
2963
- : undefined,
2964
- logging: output.logging != null ? de_Logging(output.logging, context) : undefined,
2965
- name: __expectString(output.name),
2966
- outpostConfig: output.outpostConfig != null ? de_OutpostConfigResponse(output.outpostConfig, context) : undefined,
2967
- platformVersion: __expectString(output.platformVersion),
2968
- resourcesVpcConfig: output.resourcesVpcConfig != null ? de_VpcConfigResponse(output.resourcesVpcConfig, context) : undefined,
2969
- roleArn: __expectString(output.roleArn),
2970
- status: __expectString(output.status),
2971
- tags: output.tags != null ? de_TagMap(output.tags, context) : undefined,
2972
- version: __expectString(output.version),
2973
- };
2974
- };
2975
- const de_ClusterHealth = (output, context) => {
2976
- return {
2977
- issues: output.issues != null ? de_ClusterIssueList(output.issues, context) : undefined,
2978
- };
2979
- };
2980
- const de_ClusterIssue = (output, context) => {
2981
- return {
2982
- code: __expectString(output.code),
2983
- message: __expectString(output.message),
2984
- resourceIds: output.resourceIds != null ? de_StringList(output.resourceIds, context) : undefined,
2985
- };
2986
- };
2987
- const de_ClusterIssueList = (output, context) => {
2988
- const retVal = (output || [])
2989
- .filter((e) => e != null)
2990
- .map((entry) => {
2991
- if (entry === null) {
2992
- return null;
2993
- }
2994
- return de_ClusterIssue(entry, context);
2570
+ return take(output, {
2571
+ arn: __expectString,
2572
+ certificateAuthority: _json,
2573
+ clientRequestToken: __expectString,
2574
+ connectorConfig: (_) => de_ConnectorConfigResponse(_, context),
2575
+ createdAt: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))),
2576
+ encryptionConfig: _json,
2577
+ endpoint: __expectString,
2578
+ health: _json,
2579
+ id: __expectString,
2580
+ identity: _json,
2581
+ kubernetesNetworkConfig: _json,
2582
+ logging: _json,
2583
+ name: __expectString,
2584
+ outpostConfig: _json,
2585
+ platformVersion: __expectString,
2586
+ resourcesVpcConfig: _json,
2587
+ roleArn: __expectString,
2588
+ status: __expectString,
2589
+ tags: _json,
2590
+ version: __expectString,
2995
2591
  });
2996
- return retVal;
2997
- };
2998
- const de_Compatibilities = (output, context) => {
2999
- const retVal = (output || [])
3000
- .filter((e) => e != null)
3001
- .map((entry) => {
3002
- if (entry === null) {
3003
- return null;
3004
- }
3005
- return de_Compatibility(entry, context);
3006
- });
3007
- return retVal;
3008
- };
3009
- const de_Compatibility = (output, context) => {
3010
- return {
3011
- clusterVersion: __expectString(output.clusterVersion),
3012
- defaultVersion: __expectBoolean(output.defaultVersion),
3013
- platformVersions: output.platformVersions != null ? de_StringList(output.platformVersions, context) : undefined,
3014
- };
3015
2592
  };
3016
2593
  const de_ConnectorConfigResponse = (output, context) => {
3017
- return {
3018
- activationCode: __expectString(output.activationCode),
3019
- activationExpiry: output.activationExpiry != null
3020
- ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.activationExpiry)))
3021
- : undefined,
3022
- activationId: __expectString(output.activationId),
3023
- provider: __expectString(output.provider),
3024
- roleArn: __expectString(output.roleArn),
3025
- };
3026
- };
3027
- const de_ControlPlanePlacementResponse = (output, context) => {
3028
- return {
3029
- groupName: __expectString(output.groupName),
3030
- };
3031
- };
3032
- const de_EncryptionConfig = (output, context) => {
3033
- return {
3034
- provider: output.provider != null ? de_Provider(output.provider, context) : undefined,
3035
- resources: output.resources != null ? de_StringList(output.resources, context) : undefined,
3036
- };
3037
- };
3038
- const de_EncryptionConfigList = (output, context) => {
3039
- const retVal = (output || [])
3040
- .filter((e) => e != null)
3041
- .map((entry) => {
3042
- if (entry === null) {
3043
- return null;
3044
- }
3045
- return de_EncryptionConfig(entry, context);
3046
- });
3047
- return retVal;
3048
- };
3049
- const de_ErrorDetail = (output, context) => {
3050
- return {
3051
- errorCode: __expectString(output.errorCode),
3052
- errorMessage: __expectString(output.errorMessage),
3053
- resourceIds: output.resourceIds != null ? de_StringList(output.resourceIds, context) : undefined,
3054
- };
3055
- };
3056
- const de_ErrorDetails = (output, context) => {
3057
- const retVal = (output || [])
3058
- .filter((e) => e != null)
3059
- .map((entry) => {
3060
- if (entry === null) {
3061
- return null;
3062
- }
3063
- return de_ErrorDetail(entry, context);
2594
+ return take(output, {
2595
+ activationCode: __expectString,
2596
+ activationExpiry: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))),
2597
+ activationId: __expectString,
2598
+ provider: __expectString,
2599
+ roleArn: __expectString,
3064
2600
  });
3065
- return retVal;
3066
2601
  };
3067
2602
  const de_FargateProfile = (output, context) => {
3068
- return {
3069
- clusterName: __expectString(output.clusterName),
3070
- createdAt: output.createdAt != null ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.createdAt))) : undefined,
3071
- fargateProfileArn: __expectString(output.fargateProfileArn),
3072
- fargateProfileName: __expectString(output.fargateProfileName),
3073
- podExecutionRoleArn: __expectString(output.podExecutionRoleArn),
3074
- selectors: output.selectors != null ? de_FargateProfileSelectors(output.selectors, context) : undefined,
3075
- status: __expectString(output.status),
3076
- subnets: output.subnets != null ? de_StringList(output.subnets, context) : undefined,
3077
- tags: output.tags != null ? de_TagMap(output.tags, context) : undefined,
3078
- };
3079
- };
3080
- const de_FargateProfileLabel = (output, context) => {
3081
- return Object.entries(output).reduce((acc, [key, value]) => {
3082
- if (value === null) {
3083
- return acc;
3084
- }
3085
- acc[key] = __expectString(value);
3086
- return acc;
3087
- }, {});
3088
- };
3089
- const de_FargateProfileSelector = (output, context) => {
3090
- return {
3091
- labels: output.labels != null ? de_FargateProfileLabel(output.labels, context) : undefined,
3092
- namespace: __expectString(output.namespace),
3093
- };
3094
- };
3095
- const de_FargateProfileSelectors = (output, context) => {
3096
- const retVal = (output || [])
3097
- .filter((e) => e != null)
3098
- .map((entry) => {
3099
- if (entry === null) {
3100
- return null;
3101
- }
3102
- return de_FargateProfileSelector(entry, context);
3103
- });
3104
- return retVal;
3105
- };
3106
- const de_Identity = (output, context) => {
3107
- return {
3108
- oidc: output.oidc != null ? de_OIDC(output.oidc, context) : undefined,
3109
- };
3110
- };
3111
- const de_IdentityProviderConfig = (output, context) => {
3112
- return {
3113
- name: __expectString(output.name),
3114
- type: __expectString(output.type),
3115
- };
3116
- };
3117
- const de_IdentityProviderConfigResponse = (output, context) => {
3118
- return {
3119
- oidc: output.oidc != null ? de_OidcIdentityProviderConfig(output.oidc, context) : undefined,
3120
- };
3121
- };
3122
- const de_IdentityProviderConfigs = (output, context) => {
3123
- const retVal = (output || [])
3124
- .filter((e) => e != null)
3125
- .map((entry) => {
3126
- if (entry === null) {
3127
- return null;
3128
- }
3129
- return de_IdentityProviderConfig(entry, context);
3130
- });
3131
- return retVal;
3132
- };
3133
- const de_Issue = (output, context) => {
3134
- return {
3135
- code: __expectString(output.code),
3136
- message: __expectString(output.message),
3137
- resourceIds: output.resourceIds != null ? de_StringList(output.resourceIds, context) : undefined,
3138
- };
3139
- };
3140
- const de_IssueList = (output, context) => {
3141
- const retVal = (output || [])
3142
- .filter((e) => e != null)
3143
- .map((entry) => {
3144
- if (entry === null) {
3145
- return null;
3146
- }
3147
- return de_Issue(entry, context);
3148
- });
3149
- return retVal;
3150
- };
3151
- const de_KubernetesNetworkConfigResponse = (output, context) => {
3152
- return {
3153
- ipFamily: __expectString(output.ipFamily),
3154
- serviceIpv4Cidr: __expectString(output.serviceIpv4Cidr),
3155
- serviceIpv6Cidr: __expectString(output.serviceIpv6Cidr),
3156
- };
3157
- };
3158
- const de_labelsMap = (output, context) => {
3159
- return Object.entries(output).reduce((acc, [key, value]) => {
3160
- if (value === null) {
3161
- return acc;
3162
- }
3163
- acc[key] = __expectString(value);
3164
- return acc;
3165
- }, {});
3166
- };
3167
- const de_LaunchTemplateSpecification = (output, context) => {
3168
- return {
3169
- id: __expectString(output.id),
3170
- name: __expectString(output.name),
3171
- version: __expectString(output.version),
3172
- };
3173
- };
3174
- const de_Logging = (output, context) => {
3175
- return {
3176
- clusterLogging: output.clusterLogging != null ? de_LogSetups(output.clusterLogging, context) : undefined,
3177
- };
3178
- };
3179
- const de_LogSetup = (output, context) => {
3180
- return {
3181
- enabled: __expectBoolean(output.enabled),
3182
- types: output.types != null ? de_LogTypes(output.types, context) : undefined,
3183
- };
3184
- };
3185
- const de_LogSetups = (output, context) => {
3186
- const retVal = (output || [])
3187
- .filter((e) => e != null)
3188
- .map((entry) => {
3189
- if (entry === null) {
3190
- return null;
3191
- }
3192
- return de_LogSetup(entry, context);
2603
+ return take(output, {
2604
+ clusterName: __expectString,
2605
+ createdAt: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))),
2606
+ fargateProfileArn: __expectString,
2607
+ fargateProfileName: __expectString,
2608
+ podExecutionRoleArn: __expectString,
2609
+ selectors: _json,
2610
+ status: __expectString,
2611
+ subnets: _json,
2612
+ tags: _json,
3193
2613
  });
3194
- return retVal;
3195
- };
3196
- const de_LogTypes = (output, context) => {
3197
- const retVal = (output || [])
3198
- .filter((e) => e != null)
3199
- .map((entry) => {
3200
- if (entry === null) {
3201
- return null;
3202
- }
3203
- return __expectString(entry);
3204
- });
3205
- return retVal;
3206
- };
3207
- const de_MarketplaceInformation = (output, context) => {
3208
- return {
3209
- productId: __expectString(output.productId),
3210
- productUrl: __expectString(output.productUrl),
3211
- };
3212
2614
  };
3213
2615
  const de_Nodegroup = (output, context) => {
3214
- return {
3215
- amiType: __expectString(output.amiType),
3216
- capacityType: __expectString(output.capacityType),
3217
- clusterName: __expectString(output.clusterName),
3218
- createdAt: output.createdAt != null ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.createdAt))) : undefined,
3219
- diskSize: __expectInt32(output.diskSize),
3220
- health: output.health != null ? de_NodegroupHealth(output.health, context) : undefined,
3221
- instanceTypes: output.instanceTypes != null ? de_StringList(output.instanceTypes, context) : undefined,
3222
- labels: output.labels != null ? de_labelsMap(output.labels, context) : undefined,
3223
- launchTemplate: output.launchTemplate != null ? de_LaunchTemplateSpecification(output.launchTemplate, context) : undefined,
3224
- modifiedAt: output.modifiedAt != null ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.modifiedAt))) : undefined,
3225
- nodeRole: __expectString(output.nodeRole),
3226
- nodegroupArn: __expectString(output.nodegroupArn),
3227
- nodegroupName: __expectString(output.nodegroupName),
3228
- releaseVersion: __expectString(output.releaseVersion),
3229
- remoteAccess: output.remoteAccess != null ? de_RemoteAccessConfig(output.remoteAccess, context) : undefined,
3230
- resources: output.resources != null ? de_NodegroupResources(output.resources, context) : undefined,
3231
- scalingConfig: output.scalingConfig != null ? de_NodegroupScalingConfig(output.scalingConfig, context) : undefined,
3232
- status: __expectString(output.status),
3233
- subnets: output.subnets != null ? de_StringList(output.subnets, context) : undefined,
3234
- tags: output.tags != null ? de_TagMap(output.tags, context) : undefined,
3235
- taints: output.taints != null ? de_taintsList(output.taints, context) : undefined,
3236
- updateConfig: output.updateConfig != null ? de_NodegroupUpdateConfig(output.updateConfig, context) : undefined,
3237
- version: __expectString(output.version),
3238
- };
3239
- };
3240
- const de_NodegroupHealth = (output, context) => {
3241
- return {
3242
- issues: output.issues != null ? de_IssueList(output.issues, context) : undefined,
3243
- };
3244
- };
3245
- const de_NodegroupResources = (output, context) => {
3246
- return {
3247
- autoScalingGroups: output.autoScalingGroups != null ? de_AutoScalingGroupList(output.autoScalingGroups, context) : undefined,
3248
- remoteAccessSecurityGroup: __expectString(output.remoteAccessSecurityGroup),
3249
- };
3250
- };
3251
- const de_NodegroupScalingConfig = (output, context) => {
3252
- return {
3253
- desiredSize: __expectInt32(output.desiredSize),
3254
- maxSize: __expectInt32(output.maxSize),
3255
- minSize: __expectInt32(output.minSize),
3256
- };
3257
- };
3258
- const de_NodegroupUpdateConfig = (output, context) => {
3259
- return {
3260
- maxUnavailable: __expectInt32(output.maxUnavailable),
3261
- maxUnavailablePercentage: __expectInt32(output.maxUnavailablePercentage),
3262
- };
3263
- };
3264
- const de_OIDC = (output, context) => {
3265
- return {
3266
- issuer: __expectString(output.issuer),
3267
- };
3268
- };
3269
- const de_OidcIdentityProviderConfig = (output, context) => {
3270
- return {
3271
- clientId: __expectString(output.clientId),
3272
- clusterName: __expectString(output.clusterName),
3273
- groupsClaim: __expectString(output.groupsClaim),
3274
- groupsPrefix: __expectString(output.groupsPrefix),
3275
- identityProviderConfigArn: __expectString(output.identityProviderConfigArn),
3276
- identityProviderConfigName: __expectString(output.identityProviderConfigName),
3277
- issuerUrl: __expectString(output.issuerUrl),
3278
- requiredClaims: output.requiredClaims != null ? de_requiredClaimsMap(output.requiredClaims, context) : undefined,
3279
- status: __expectString(output.status),
3280
- tags: output.tags != null ? de_TagMap(output.tags, context) : undefined,
3281
- usernameClaim: __expectString(output.usernameClaim),
3282
- usernamePrefix: __expectString(output.usernamePrefix),
3283
- };
3284
- };
3285
- const de_OutpostConfigResponse = (output, context) => {
3286
- return {
3287
- controlPlaneInstanceType: __expectString(output.controlPlaneInstanceType),
3288
- controlPlanePlacement: output.controlPlanePlacement != null
3289
- ? de_ControlPlanePlacementResponse(output.controlPlanePlacement, context)
3290
- : undefined,
3291
- outpostArns: output.outpostArns != null ? de_StringList(output.outpostArns, context) : undefined,
3292
- };
3293
- };
3294
- const de_Provider = (output, context) => {
3295
- return {
3296
- keyArn: __expectString(output.keyArn),
3297
- };
3298
- };
3299
- const de_RemoteAccessConfig = (output, context) => {
3300
- return {
3301
- ec2SshKey: __expectString(output.ec2SshKey),
3302
- sourceSecurityGroups: output.sourceSecurityGroups != null ? de_StringList(output.sourceSecurityGroups, context) : undefined,
3303
- };
3304
- };
3305
- const de_requiredClaimsMap = (output, context) => {
3306
- return Object.entries(output).reduce((acc, [key, value]) => {
3307
- if (value === null) {
3308
- return acc;
3309
- }
3310
- acc[key] = __expectString(value);
3311
- return acc;
3312
- }, {});
3313
- };
3314
- const de_StringList = (output, context) => {
3315
- const retVal = (output || [])
3316
- .filter((e) => e != null)
3317
- .map((entry) => {
3318
- if (entry === null) {
3319
- return null;
3320
- }
3321
- return __expectString(entry);
2616
+ return take(output, {
2617
+ amiType: __expectString,
2618
+ capacityType: __expectString,
2619
+ clusterName: __expectString,
2620
+ createdAt: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))),
2621
+ diskSize: __expectInt32,
2622
+ health: _json,
2623
+ instanceTypes: _json,
2624
+ labels: _json,
2625
+ launchTemplate: _json,
2626
+ modifiedAt: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))),
2627
+ nodeRole: __expectString,
2628
+ nodegroupArn: __expectString,
2629
+ nodegroupName: __expectString,
2630
+ releaseVersion: __expectString,
2631
+ remoteAccess: _json,
2632
+ resources: _json,
2633
+ scalingConfig: _json,
2634
+ status: __expectString,
2635
+ subnets: _json,
2636
+ tags: _json,
2637
+ taints: _json,
2638
+ updateConfig: _json,
2639
+ version: __expectString,
3322
2640
  });
3323
- return retVal;
3324
- };
3325
- const de_TagMap = (output, context) => {
3326
- return Object.entries(output).reduce((acc, [key, value]) => {
3327
- if (value === null) {
3328
- return acc;
3329
- }
3330
- acc[key] = __expectString(value);
3331
- return acc;
3332
- }, {});
3333
- };
3334
- const de_Taint = (output, context) => {
3335
- return {
3336
- effect: __expectString(output.effect),
3337
- key: __expectString(output.key),
3338
- value: __expectString(output.value),
3339
- };
3340
- };
3341
- const de_taintsList = (output, context) => {
3342
- const retVal = (output || [])
3343
- .filter((e) => e != null)
3344
- .map((entry) => {
3345
- if (entry === null) {
3346
- return null;
3347
- }
3348
- return de_Taint(entry, context);
3349
- });
3350
- return retVal;
3351
2641
  };
3352
2642
  const de_Update = (output, context) => {
3353
- return {
3354
- createdAt: output.createdAt != null ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.createdAt))) : undefined,
3355
- errors: output.errors != null ? de_ErrorDetails(output.errors, context) : undefined,
3356
- id: __expectString(output.id),
3357
- params: output.params != null ? de_UpdateParams(output.params, context) : undefined,
3358
- status: __expectString(output.status),
3359
- type: __expectString(output.type),
3360
- };
3361
- };
3362
- const de_UpdateParam = (output, context) => {
3363
- return {
3364
- type: __expectString(output.type),
3365
- value: __expectString(output.value),
3366
- };
3367
- };
3368
- const de_UpdateParams = (output, context) => {
3369
- const retVal = (output || [])
3370
- .filter((e) => e != null)
3371
- .map((entry) => {
3372
- if (entry === null) {
3373
- return null;
3374
- }
3375
- return de_UpdateParam(entry, context);
3376
- });
3377
- return retVal;
3378
- };
3379
- const de_VpcConfigResponse = (output, context) => {
3380
- return {
3381
- clusterSecurityGroupId: __expectString(output.clusterSecurityGroupId),
3382
- endpointPrivateAccess: __expectBoolean(output.endpointPrivateAccess),
3383
- endpointPublicAccess: __expectBoolean(output.endpointPublicAccess),
3384
- publicAccessCidrs: output.publicAccessCidrs != null ? de_StringList(output.publicAccessCidrs, context) : undefined,
3385
- securityGroupIds: output.securityGroupIds != null ? de_StringList(output.securityGroupIds, context) : undefined,
3386
- subnetIds: output.subnetIds != null ? de_StringList(output.subnetIds, context) : undefined,
3387
- vpcId: __expectString(output.vpcId),
3388
- };
2643
+ return take(output, {
2644
+ createdAt: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))),
2645
+ errors: _json,
2646
+ id: __expectString,
2647
+ params: _json,
2648
+ status: __expectString,
2649
+ type: __expectString,
2650
+ });
3389
2651
  };
3390
2652
  const deserializeMetadata = (output) => ({
3391
2653
  httpStatusCode: output.statusCode,