@aws-sdk/client-eks 3.312.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.
@@ -16,12 +16,10 @@ const se_AssociateEncryptionConfigCommand = async (input, context) => {
16
16
  "/clusters/{clusterName}/encryption-config/associate";
17
17
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "clusterName", () => input.clusterName, "{clusterName}", false);
18
18
  let body;
19
- body = JSON.stringify({
20
- clientRequestToken: input.clientRequestToken ?? (0, uuid_1.v4)(),
21
- ...(input.encryptionConfig != null && {
22
- encryptionConfig: se_EncryptionConfigList(input.encryptionConfig, context),
23
- }),
24
- });
19
+ body = JSON.stringify((0, smithy_client_1.take)(input, {
20
+ clientRequestToken: (_) => _ ?? (0, uuid_1.v4)(),
21
+ encryptionConfig: (_) => (0, smithy_client_1._json)(_),
22
+ }));
25
23
  return new protocol_http_1.HttpRequest({
26
24
  protocol,
27
25
  hostname,
@@ -42,11 +40,11 @@ const se_AssociateIdentityProviderConfigCommand = async (input, context) => {
42
40
  "/clusters/{clusterName}/identity-provider-configs/associate";
43
41
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "clusterName", () => input.clusterName, "{clusterName}", false);
44
42
  let body;
45
- body = JSON.stringify({
46
- clientRequestToken: input.clientRequestToken ?? (0, uuid_1.v4)(),
47
- ...(input.oidc != null && { oidc: se_OidcIdentityProviderConfigRequest(input.oidc, context) }),
48
- ...(input.tags != null && { tags: se_TagMap(input.tags, context) }),
49
- });
43
+ body = JSON.stringify((0, smithy_client_1.take)(input, {
44
+ clientRequestToken: (_) => _ ?? (0, uuid_1.v4)(),
45
+ oidc: (_) => (0, smithy_client_1._json)(_),
46
+ tags: (_) => (0, smithy_client_1._json)(_),
47
+ }));
50
48
  return new protocol_http_1.HttpRequest({
51
49
  protocol,
52
50
  hostname,
@@ -66,15 +64,15 @@ const se_CreateAddonCommand = async (input, context) => {
66
64
  let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/clusters/{clusterName}/addons";
67
65
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "clusterName", () => input.clusterName, "{clusterName}", false);
68
66
  let body;
69
- body = JSON.stringify({
70
- ...(input.addonName != null && { addonName: input.addonName }),
71
- ...(input.addonVersion != null && { addonVersion: input.addonVersion }),
72
- clientRequestToken: input.clientRequestToken ?? (0, uuid_1.v4)(),
73
- ...(input.configurationValues != null && { configurationValues: input.configurationValues }),
74
- ...(input.resolveConflicts != null && { resolveConflicts: input.resolveConflicts }),
75
- ...(input.serviceAccountRoleArn != null && { serviceAccountRoleArn: input.serviceAccountRoleArn }),
76
- ...(input.tags != null && { tags: se_TagMap(input.tags, context) }),
77
- });
67
+ body = JSON.stringify((0, smithy_client_1.take)(input, {
68
+ addonName: [],
69
+ addonVersion: [],
70
+ clientRequestToken: (_) => _ ?? (0, uuid_1.v4)(),
71
+ configurationValues: [],
72
+ resolveConflicts: [],
73
+ serviceAccountRoleArn: [],
74
+ tags: (_) => (0, smithy_client_1._json)(_),
75
+ }));
78
76
  return new protocol_http_1.HttpRequest({
79
77
  protocol,
80
78
  hostname,
@@ -93,24 +91,18 @@ const se_CreateClusterCommand = async (input, context) => {
93
91
  };
94
92
  const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/clusters";
95
93
  let body;
96
- body = JSON.stringify({
97
- clientRequestToken: input.clientRequestToken ?? (0, uuid_1.v4)(),
98
- ...(input.encryptionConfig != null && {
99
- encryptionConfig: se_EncryptionConfigList(input.encryptionConfig, context),
100
- }),
101
- ...(input.kubernetesNetworkConfig != null && {
102
- kubernetesNetworkConfig: se_KubernetesNetworkConfigRequest(input.kubernetesNetworkConfig, context),
103
- }),
104
- ...(input.logging != null && { logging: se_Logging(input.logging, context) }),
105
- ...(input.name != null && { name: input.name }),
106
- ...(input.outpostConfig != null && { outpostConfig: se_OutpostConfigRequest(input.outpostConfig, context) }),
107
- ...(input.resourcesVpcConfig != null && {
108
- resourcesVpcConfig: se_VpcConfigRequest(input.resourcesVpcConfig, context),
109
- }),
110
- ...(input.roleArn != null && { roleArn: input.roleArn }),
111
- ...(input.tags != null && { tags: se_TagMap(input.tags, context) }),
112
- ...(input.version != null && { version: input.version }),
113
- });
94
+ body = JSON.stringify((0, smithy_client_1.take)(input, {
95
+ clientRequestToken: (_) => _ ?? (0, uuid_1.v4)(),
96
+ encryptionConfig: (_) => (0, smithy_client_1._json)(_),
97
+ kubernetesNetworkConfig: (_) => (0, smithy_client_1._json)(_),
98
+ logging: (_) => (0, smithy_client_1._json)(_),
99
+ name: [],
100
+ outpostConfig: (_) => (0, smithy_client_1._json)(_),
101
+ resourcesVpcConfig: (_) => (0, smithy_client_1._json)(_),
102
+ roleArn: [],
103
+ tags: (_) => (0, smithy_client_1._json)(_),
104
+ version: [],
105
+ }));
114
106
  return new protocol_http_1.HttpRequest({
115
107
  protocol,
116
108
  hostname,
@@ -130,14 +122,14 @@ const se_CreateFargateProfileCommand = async (input, context) => {
130
122
  let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/clusters/{clusterName}/fargate-profiles";
131
123
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "clusterName", () => input.clusterName, "{clusterName}", false);
132
124
  let body;
133
- body = JSON.stringify({
134
- clientRequestToken: input.clientRequestToken ?? (0, uuid_1.v4)(),
135
- ...(input.fargateProfileName != null && { fargateProfileName: input.fargateProfileName }),
136
- ...(input.podExecutionRoleArn != null && { podExecutionRoleArn: input.podExecutionRoleArn }),
137
- ...(input.selectors != null && { selectors: se_FargateProfileSelectors(input.selectors, context) }),
138
- ...(input.subnets != null && { subnets: se_StringList(input.subnets, context) }),
139
- ...(input.tags != null && { tags: se_TagMap(input.tags, context) }),
140
- });
125
+ body = JSON.stringify((0, smithy_client_1.take)(input, {
126
+ clientRequestToken: (_) => _ ?? (0, uuid_1.v4)(),
127
+ fargateProfileName: [],
128
+ podExecutionRoleArn: [],
129
+ selectors: (_) => (0, smithy_client_1._json)(_),
130
+ subnets: (_) => (0, smithy_client_1._json)(_),
131
+ tags: (_) => (0, smithy_client_1._json)(_),
132
+ }));
141
133
  return new protocol_http_1.HttpRequest({
142
134
  protocol,
143
135
  hostname,
@@ -157,27 +149,25 @@ const se_CreateNodegroupCommand = async (input, context) => {
157
149
  let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/clusters/{clusterName}/node-groups";
158
150
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "clusterName", () => input.clusterName, "{clusterName}", false);
159
151
  let body;
160
- body = JSON.stringify({
161
- ...(input.amiType != null && { amiType: input.amiType }),
162
- ...(input.capacityType != null && { capacityType: input.capacityType }),
163
- clientRequestToken: input.clientRequestToken ?? (0, uuid_1.v4)(),
164
- ...(input.diskSize != null && { diskSize: input.diskSize }),
165
- ...(input.instanceTypes != null && { instanceTypes: se_StringList(input.instanceTypes, context) }),
166
- ...(input.labels != null && { labels: se_labelsMap(input.labels, context) }),
167
- ...(input.launchTemplate != null && {
168
- launchTemplate: se_LaunchTemplateSpecification(input.launchTemplate, context),
169
- }),
170
- ...(input.nodeRole != null && { nodeRole: input.nodeRole }),
171
- ...(input.nodegroupName != null && { nodegroupName: input.nodegroupName }),
172
- ...(input.releaseVersion != null && { releaseVersion: input.releaseVersion }),
173
- ...(input.remoteAccess != null && { remoteAccess: se_RemoteAccessConfig(input.remoteAccess, context) }),
174
- ...(input.scalingConfig != null && { scalingConfig: se_NodegroupScalingConfig(input.scalingConfig, context) }),
175
- ...(input.subnets != null && { subnets: se_StringList(input.subnets, context) }),
176
- ...(input.tags != null && { tags: se_TagMap(input.tags, context) }),
177
- ...(input.taints != null && { taints: se_taintsList(input.taints, context) }),
178
- ...(input.updateConfig != null && { updateConfig: se_NodegroupUpdateConfig(input.updateConfig, context) }),
179
- ...(input.version != null && { version: input.version }),
180
- });
152
+ body = JSON.stringify((0, smithy_client_1.take)(input, {
153
+ amiType: [],
154
+ capacityType: [],
155
+ clientRequestToken: (_) => _ ?? (0, uuid_1.v4)(),
156
+ diskSize: [],
157
+ instanceTypes: (_) => (0, smithy_client_1._json)(_),
158
+ labels: (_) => (0, smithy_client_1._json)(_),
159
+ launchTemplate: (_) => (0, smithy_client_1._json)(_),
160
+ nodeRole: [],
161
+ nodegroupName: [],
162
+ releaseVersion: [],
163
+ remoteAccess: (_) => (0, smithy_client_1._json)(_),
164
+ scalingConfig: (_) => (0, smithy_client_1._json)(_),
165
+ subnets: (_) => (0, smithy_client_1._json)(_),
166
+ tags: (_) => (0, smithy_client_1._json)(_),
167
+ taints: (_) => (0, smithy_client_1._json)(_),
168
+ updateConfig: (_) => (0, smithy_client_1._json)(_),
169
+ version: [],
170
+ }));
181
171
  return new protocol_http_1.HttpRequest({
182
172
  protocol,
183
173
  hostname,
@@ -196,7 +186,7 @@ const se_DeleteAddonCommand = async (input, context) => {
196
186
  "/clusters/{clusterName}/addons/{addonName}";
197
187
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "clusterName", () => input.clusterName, "{clusterName}", false);
198
188
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "addonName", () => input.addonName, "{addonName}", false);
199
- const query = map({
189
+ const query = (0, smithy_client_1.map)({
200
190
  preserve: [() => input.preserve !== void 0, () => input.preserve.toString()],
201
191
  });
202
192
  let body;
@@ -307,7 +297,7 @@ const se_DescribeAddonConfigurationCommand = async (input, context) => {
307
297
  const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
308
298
  const headers = {};
309
299
  const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/addons/configuration-schemas";
310
- const query = map({
300
+ const query = (0, smithy_client_1.map)({
311
301
  addonName: [, (0, smithy_client_1.expectNonNull)(input.addonName, `addonName`)],
312
302
  addonVersion: [, (0, smithy_client_1.expectNonNull)(input.addonVersion, `addonVersion`)],
313
303
  });
@@ -328,7 +318,7 @@ const se_DescribeAddonVersionsCommand = async (input, context) => {
328
318
  const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
329
319
  const headers = {};
330
320
  const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/addons/supported-versions";
331
- const query = map({
321
+ const query = (0, smithy_client_1.map)({
332
322
  kubernetesVersion: [, input.kubernetesVersion],
333
323
  maxResults: [() => input.maxResults !== void 0, () => input.maxResults.toString()],
334
324
  nextToken: [, input.nextToken],
@@ -395,11 +385,9 @@ const se_DescribeIdentityProviderConfigCommand = async (input, context) => {
395
385
  "/clusters/{clusterName}/identity-provider-configs/describe";
396
386
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "clusterName", () => input.clusterName, "{clusterName}", false);
397
387
  let body;
398
- body = JSON.stringify({
399
- ...(input.identityProviderConfig != null && {
400
- identityProviderConfig: se_IdentityProviderConfig(input.identityProviderConfig, context),
401
- }),
402
- });
388
+ body = JSON.stringify((0, smithy_client_1.take)(input, {
389
+ identityProviderConfig: (_) => (0, smithy_client_1._json)(_),
390
+ }));
403
391
  return new protocol_http_1.HttpRequest({
404
392
  protocol,
405
393
  hostname,
@@ -436,7 +424,7 @@ const se_DescribeUpdateCommand = async (input, context) => {
436
424
  let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/clusters/{name}/updates/{updateId}";
437
425
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "name", () => input.name, "{name}", false);
438
426
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "updateId", () => input.updateId, "{updateId}", false);
439
- const query = map({
427
+ const query = (0, smithy_client_1.map)({
440
428
  nodegroupName: [, input.nodegroupName],
441
429
  addonName: [, input.addonName],
442
430
  });
@@ -462,12 +450,10 @@ const se_DisassociateIdentityProviderConfigCommand = async (input, context) => {
462
450
  "/clusters/{clusterName}/identity-provider-configs/disassociate";
463
451
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "clusterName", () => input.clusterName, "{clusterName}", false);
464
452
  let body;
465
- body = JSON.stringify({
466
- clientRequestToken: input.clientRequestToken ?? (0, uuid_1.v4)(),
467
- ...(input.identityProviderConfig != null && {
468
- identityProviderConfig: se_IdentityProviderConfig(input.identityProviderConfig, context),
469
- }),
470
- });
453
+ body = JSON.stringify((0, smithy_client_1.take)(input, {
454
+ clientRequestToken: (_) => _ ?? (0, uuid_1.v4)(),
455
+ identityProviderConfig: (_) => (0, smithy_client_1._json)(_),
456
+ }));
471
457
  return new protocol_http_1.HttpRequest({
472
458
  protocol,
473
459
  hostname,
@@ -484,7 +470,7 @@ const se_ListAddonsCommand = async (input, context) => {
484
470
  const headers = {};
485
471
  let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/clusters/{clusterName}/addons";
486
472
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "clusterName", () => input.clusterName, "{clusterName}", false);
487
- const query = map({
473
+ const query = (0, smithy_client_1.map)({
488
474
  maxResults: [() => input.maxResults !== void 0, () => input.maxResults.toString()],
489
475
  nextToken: [, input.nextToken],
490
476
  });
@@ -505,7 +491,7 @@ const se_ListClustersCommand = async (input, context) => {
505
491
  const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
506
492
  const headers = {};
507
493
  const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/clusters";
508
- const query = map({
494
+ const query = (0, smithy_client_1.map)({
509
495
  maxResults: [() => input.maxResults !== void 0, () => input.maxResults.toString()],
510
496
  nextToken: [, input.nextToken],
511
497
  include: [() => input.include !== void 0, () => (input.include || []).map((_entry) => _entry)],
@@ -528,7 +514,7 @@ const se_ListFargateProfilesCommand = async (input, context) => {
528
514
  const headers = {};
529
515
  let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/clusters/{clusterName}/fargate-profiles";
530
516
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "clusterName", () => input.clusterName, "{clusterName}", false);
531
- const query = map({
517
+ const query = (0, smithy_client_1.map)({
532
518
  maxResults: [() => input.maxResults !== void 0, () => input.maxResults.toString()],
533
519
  nextToken: [, input.nextToken],
534
520
  });
@@ -551,7 +537,7 @@ const se_ListIdentityProviderConfigsCommand = async (input, context) => {
551
537
  let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` +
552
538
  "/clusters/{clusterName}/identity-provider-configs";
553
539
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "clusterName", () => input.clusterName, "{clusterName}", false);
554
- const query = map({
540
+ const query = (0, smithy_client_1.map)({
555
541
  maxResults: [() => input.maxResults !== void 0, () => input.maxResults.toString()],
556
542
  nextToken: [, input.nextToken],
557
543
  });
@@ -573,7 +559,7 @@ const se_ListNodegroupsCommand = async (input, context) => {
573
559
  const headers = {};
574
560
  let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/clusters/{clusterName}/node-groups";
575
561
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "clusterName", () => input.clusterName, "{clusterName}", false);
576
- const query = map({
562
+ const query = (0, smithy_client_1.map)({
577
563
  maxResults: [() => input.maxResults !== void 0, () => input.maxResults.toString()],
578
564
  nextToken: [, input.nextToken],
579
565
  });
@@ -612,7 +598,7 @@ const se_ListUpdatesCommand = async (input, context) => {
612
598
  const headers = {};
613
599
  let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/clusters/{name}/updates";
614
600
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "name", () => input.name, "{name}", false);
615
- const query = map({
601
+ const query = (0, smithy_client_1.map)({
616
602
  nodegroupName: [, input.nodegroupName],
617
603
  addonName: [, input.addonName],
618
604
  nextToken: [, input.nextToken],
@@ -638,14 +624,12 @@ const se_RegisterClusterCommand = async (input, context) => {
638
624
  };
639
625
  const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/cluster-registrations";
640
626
  let body;
641
- body = JSON.stringify({
642
- clientRequestToken: input.clientRequestToken ?? (0, uuid_1.v4)(),
643
- ...(input.connectorConfig != null && {
644
- connectorConfig: se_ConnectorConfigRequest(input.connectorConfig, context),
645
- }),
646
- ...(input.name != null && { name: input.name }),
647
- ...(input.tags != null && { tags: se_TagMap(input.tags, context) }),
648
- });
627
+ body = JSON.stringify((0, smithy_client_1.take)(input, {
628
+ clientRequestToken: (_) => _ ?? (0, uuid_1.v4)(),
629
+ connectorConfig: (_) => (0, smithy_client_1._json)(_),
630
+ name: [],
631
+ tags: (_) => (0, smithy_client_1._json)(_),
632
+ }));
649
633
  return new protocol_http_1.HttpRequest({
650
634
  protocol,
651
635
  hostname,
@@ -665,9 +649,9 @@ const se_TagResourceCommand = async (input, context) => {
665
649
  let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/tags/{resourceArn}";
666
650
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "resourceArn", () => input.resourceArn, "{resourceArn}", false);
667
651
  let body;
668
- body = JSON.stringify({
669
- ...(input.tags != null && { tags: se_TagMap(input.tags, context) }),
670
- });
652
+ body = JSON.stringify((0, smithy_client_1.take)(input, {
653
+ tags: (_) => (0, smithy_client_1._json)(_),
654
+ }));
671
655
  return new protocol_http_1.HttpRequest({
672
656
  protocol,
673
657
  hostname,
@@ -684,7 +668,7 @@ const se_UntagResourceCommand = async (input, context) => {
684
668
  const headers = {};
685
669
  let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/tags/{resourceArn}";
686
670
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "resourceArn", () => input.resourceArn, "{resourceArn}", false);
687
- const query = map({
671
+ const query = (0, smithy_client_1.map)({
688
672
  tagKeys: [
689
673
  (0, smithy_client_1.expectNonNull)(input.tagKeys, `tagKeys`) != null,
690
674
  () => (input.tagKeys || []).map((_entry) => _entry),
@@ -713,13 +697,13 @@ const se_UpdateAddonCommand = async (input, context) => {
713
697
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "clusterName", () => input.clusterName, "{clusterName}", false);
714
698
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "addonName", () => input.addonName, "{addonName}", false);
715
699
  let body;
716
- body = JSON.stringify({
717
- ...(input.addonVersion != null && { addonVersion: input.addonVersion }),
718
- clientRequestToken: input.clientRequestToken ?? (0, uuid_1.v4)(),
719
- ...(input.configurationValues != null && { configurationValues: input.configurationValues }),
720
- ...(input.resolveConflicts != null && { resolveConflicts: input.resolveConflicts }),
721
- ...(input.serviceAccountRoleArn != null && { serviceAccountRoleArn: input.serviceAccountRoleArn }),
722
- });
700
+ body = JSON.stringify((0, smithy_client_1.take)(input, {
701
+ addonVersion: [],
702
+ clientRequestToken: (_) => _ ?? (0, uuid_1.v4)(),
703
+ configurationValues: [],
704
+ resolveConflicts: [],
705
+ serviceAccountRoleArn: [],
706
+ }));
723
707
  return new protocol_http_1.HttpRequest({
724
708
  protocol,
725
709
  hostname,
@@ -739,13 +723,11 @@ const se_UpdateClusterConfigCommand = async (input, context) => {
739
723
  let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/clusters/{name}/update-config";
740
724
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "name", () => input.name, "{name}", false);
741
725
  let body;
742
- body = JSON.stringify({
743
- clientRequestToken: input.clientRequestToken ?? (0, uuid_1.v4)(),
744
- ...(input.logging != null && { logging: se_Logging(input.logging, context) }),
745
- ...(input.resourcesVpcConfig != null && {
746
- resourcesVpcConfig: se_VpcConfigRequest(input.resourcesVpcConfig, context),
747
- }),
748
- });
726
+ body = JSON.stringify((0, smithy_client_1.take)(input, {
727
+ clientRequestToken: (_) => _ ?? (0, uuid_1.v4)(),
728
+ logging: (_) => (0, smithy_client_1._json)(_),
729
+ resourcesVpcConfig: (_) => (0, smithy_client_1._json)(_),
730
+ }));
749
731
  return new protocol_http_1.HttpRequest({
750
732
  protocol,
751
733
  hostname,
@@ -765,10 +747,10 @@ const se_UpdateClusterVersionCommand = async (input, context) => {
765
747
  let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/clusters/{name}/updates";
766
748
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "name", () => input.name, "{name}", false);
767
749
  let body;
768
- body = JSON.stringify({
769
- clientRequestToken: input.clientRequestToken ?? (0, uuid_1.v4)(),
770
- ...(input.version != null && { version: input.version }),
771
- });
750
+ body = JSON.stringify((0, smithy_client_1.take)(input, {
751
+ clientRequestToken: (_) => _ ?? (0, uuid_1.v4)(),
752
+ version: [],
753
+ }));
772
754
  return new protocol_http_1.HttpRequest({
773
755
  protocol,
774
756
  hostname,
@@ -790,13 +772,13 @@ const se_UpdateNodegroupConfigCommand = async (input, context) => {
790
772
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "clusterName", () => input.clusterName, "{clusterName}", false);
791
773
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "nodegroupName", () => input.nodegroupName, "{nodegroupName}", false);
792
774
  let body;
793
- body = JSON.stringify({
794
- clientRequestToken: input.clientRequestToken ?? (0, uuid_1.v4)(),
795
- ...(input.labels != null && { labels: se_UpdateLabelsPayload(input.labels, context) }),
796
- ...(input.scalingConfig != null && { scalingConfig: se_NodegroupScalingConfig(input.scalingConfig, context) }),
797
- ...(input.taints != null && { taints: se_UpdateTaintsPayload(input.taints, context) }),
798
- ...(input.updateConfig != null && { updateConfig: se_NodegroupUpdateConfig(input.updateConfig, context) }),
799
- });
775
+ body = JSON.stringify((0, smithy_client_1.take)(input, {
776
+ clientRequestToken: (_) => _ ?? (0, uuid_1.v4)(),
777
+ labels: (_) => (0, smithy_client_1._json)(_),
778
+ scalingConfig: (_) => (0, smithy_client_1._json)(_),
779
+ taints: (_) => (0, smithy_client_1._json)(_),
780
+ updateConfig: (_) => (0, smithy_client_1._json)(_),
781
+ }));
800
782
  return new protocol_http_1.HttpRequest({
801
783
  protocol,
802
784
  hostname,
@@ -818,15 +800,13 @@ const se_UpdateNodegroupVersionCommand = async (input, context) => {
818
800
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "clusterName", () => input.clusterName, "{clusterName}", false);
819
801
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "nodegroupName", () => input.nodegroupName, "{nodegroupName}", false);
820
802
  let body;
821
- body = JSON.stringify({
822
- clientRequestToken: input.clientRequestToken ?? (0, uuid_1.v4)(),
823
- ...(input.force != null && { force: input.force }),
824
- ...(input.launchTemplate != null && {
825
- launchTemplate: se_LaunchTemplateSpecification(input.launchTemplate, context),
826
- }),
827
- ...(input.releaseVersion != null && { releaseVersion: input.releaseVersion }),
828
- ...(input.version != null && { version: input.version }),
829
- });
803
+ body = JSON.stringify((0, smithy_client_1.take)(input, {
804
+ clientRequestToken: (_) => _ ?? (0, uuid_1.v4)(),
805
+ force: [],
806
+ launchTemplate: (_) => (0, smithy_client_1._json)(_),
807
+ releaseVersion: [],
808
+ version: [],
809
+ }));
830
810
  return new protocol_http_1.HttpRequest({
831
811
  protocol,
832
812
  hostname,
@@ -842,13 +822,14 @@ const de_AssociateEncryptionConfigCommand = async (output, context) => {
842
822
  if (output.statusCode !== 200 && output.statusCode >= 300) {
843
823
  return de_AssociateEncryptionConfigCommandError(output, context);
844
824
  }
845
- const contents = map({
825
+ const contents = (0, smithy_client_1.map)({
846
826
  $metadata: deserializeMetadata(output),
847
827
  });
848
828
  const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
849
- if (data.update != null) {
850
- contents.update = de_Update(data.update, context);
851
- }
829
+ const doc = (0, smithy_client_1.take)(data, {
830
+ update: (_) => de_Update(_, context),
831
+ });
832
+ Object.assign(contents, doc);
852
833
  return contents;
853
834
  };
854
835
  exports.de_AssociateEncryptionConfigCommand = de_AssociateEncryptionConfigCommand;
@@ -879,10 +860,9 @@ const de_AssociateEncryptionConfigCommandError = async (output, context) => {
879
860
  throw await de_ServerExceptionRes(parsedOutput, context);
880
861
  default:
881
862
  const parsedBody = parsedOutput.body;
882
- (0, smithy_client_1.throwDefaultError)({
863
+ return throwDefaultError({
883
864
  output,
884
865
  parsedBody,
885
- exceptionCtor: EKSServiceException_1.EKSServiceException,
886
866
  errorCode,
887
867
  });
888
868
  }
@@ -891,16 +871,15 @@ const de_AssociateIdentityProviderConfigCommand = async (output, context) => {
891
871
  if (output.statusCode !== 200 && output.statusCode >= 300) {
892
872
  return de_AssociateIdentityProviderConfigCommandError(output, context);
893
873
  }
894
- const contents = map({
874
+ const contents = (0, smithy_client_1.map)({
895
875
  $metadata: deserializeMetadata(output),
896
876
  });
897
877
  const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
898
- if (data.tags != null) {
899
- contents.tags = de_TagMap(data.tags, context);
900
- }
901
- if (data.update != null) {
902
- contents.update = de_Update(data.update, context);
903
- }
878
+ const doc = (0, smithy_client_1.take)(data, {
879
+ tags: smithy_client_1._json,
880
+ update: (_) => de_Update(_, context),
881
+ });
882
+ Object.assign(contents, doc);
904
883
  return contents;
905
884
  };
906
885
  exports.de_AssociateIdentityProviderConfigCommand = de_AssociateIdentityProviderConfigCommand;
@@ -931,10 +910,9 @@ const de_AssociateIdentityProviderConfigCommandError = async (output, context) =
931
910
  throw await de_ServerExceptionRes(parsedOutput, context);
932
911
  default:
933
912
  const parsedBody = parsedOutput.body;
934
- (0, smithy_client_1.throwDefaultError)({
913
+ return throwDefaultError({
935
914
  output,
936
915
  parsedBody,
937
- exceptionCtor: EKSServiceException_1.EKSServiceException,
938
916
  errorCode,
939
917
  });
940
918
  }
@@ -943,13 +921,14 @@ const de_CreateAddonCommand = async (output, context) => {
943
921
  if (output.statusCode !== 200 && output.statusCode >= 300) {
944
922
  return de_CreateAddonCommandError(output, context);
945
923
  }
946
- const contents = map({
924
+ const contents = (0, smithy_client_1.map)({
947
925
  $metadata: deserializeMetadata(output),
948
926
  });
949
927
  const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
950
- if (data.addon != null) {
951
- contents.addon = de_Addon(data.addon, context);
952
- }
928
+ const doc = (0, smithy_client_1.take)(data, {
929
+ addon: (_) => de_Addon(_, context),
930
+ });
931
+ Object.assign(contents, doc);
953
932
  return contents;
954
933
  };
955
934
  exports.de_CreateAddonCommand = de_CreateAddonCommand;
@@ -980,10 +959,9 @@ const de_CreateAddonCommandError = async (output, context) => {
980
959
  throw await de_ServerExceptionRes(parsedOutput, context);
981
960
  default:
982
961
  const parsedBody = parsedOutput.body;
983
- (0, smithy_client_1.throwDefaultError)({
962
+ return throwDefaultError({
984
963
  output,
985
964
  parsedBody,
986
- exceptionCtor: EKSServiceException_1.EKSServiceException,
987
965
  errorCode,
988
966
  });
989
967
  }
@@ -992,13 +970,14 @@ const de_CreateClusterCommand = async (output, context) => {
992
970
  if (output.statusCode !== 200 && output.statusCode >= 300) {
993
971
  return de_CreateClusterCommandError(output, context);
994
972
  }
995
- const contents = map({
973
+ const contents = (0, smithy_client_1.map)({
996
974
  $metadata: deserializeMetadata(output),
997
975
  });
998
976
  const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
999
- if (data.cluster != null) {
1000
- contents.cluster = de_Cluster(data.cluster, context);
1001
- }
977
+ const doc = (0, smithy_client_1.take)(data, {
978
+ cluster: (_) => de_Cluster(_, context),
979
+ });
980
+ Object.assign(contents, doc);
1002
981
  return contents;
1003
982
  };
1004
983
  exports.de_CreateClusterCommand = de_CreateClusterCommand;
@@ -1032,10 +1011,9 @@ const de_CreateClusterCommandError = async (output, context) => {
1032
1011
  throw await de_UnsupportedAvailabilityZoneExceptionRes(parsedOutput, context);
1033
1012
  default:
1034
1013
  const parsedBody = parsedOutput.body;
1035
- (0, smithy_client_1.throwDefaultError)({
1014
+ return throwDefaultError({
1036
1015
  output,
1037
1016
  parsedBody,
1038
- exceptionCtor: EKSServiceException_1.EKSServiceException,
1039
1017
  errorCode,
1040
1018
  });
1041
1019
  }
@@ -1044,13 +1022,14 @@ const de_CreateFargateProfileCommand = async (output, context) => {
1044
1022
  if (output.statusCode !== 200 && output.statusCode >= 300) {
1045
1023
  return de_CreateFargateProfileCommandError(output, context);
1046
1024
  }
1047
- const contents = map({
1025
+ const contents = (0, smithy_client_1.map)({
1048
1026
  $metadata: deserializeMetadata(output),
1049
1027
  });
1050
1028
  const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
1051
- if (data.fargateProfile != null) {
1052
- contents.fargateProfile = de_FargateProfile(data.fargateProfile, context);
1053
- }
1029
+ const doc = (0, smithy_client_1.take)(data, {
1030
+ fargateProfile: (_) => de_FargateProfile(_, context),
1031
+ });
1032
+ Object.assign(contents, doc);
1054
1033
  return contents;
1055
1034
  };
1056
1035
  exports.de_CreateFargateProfileCommand = de_CreateFargateProfileCommand;
@@ -1081,10 +1060,9 @@ const de_CreateFargateProfileCommandError = async (output, context) => {
1081
1060
  throw await de_UnsupportedAvailabilityZoneExceptionRes(parsedOutput, context);
1082
1061
  default:
1083
1062
  const parsedBody = parsedOutput.body;
1084
- (0, smithy_client_1.throwDefaultError)({
1063
+ return throwDefaultError({
1085
1064
  output,
1086
1065
  parsedBody,
1087
- exceptionCtor: EKSServiceException_1.EKSServiceException,
1088
1066
  errorCode,
1089
1067
  });
1090
1068
  }
@@ -1093,13 +1071,14 @@ const de_CreateNodegroupCommand = async (output, context) => {
1093
1071
  if (output.statusCode !== 200 && output.statusCode >= 300) {
1094
1072
  return de_CreateNodegroupCommandError(output, context);
1095
1073
  }
1096
- const contents = map({
1074
+ const contents = (0, smithy_client_1.map)({
1097
1075
  $metadata: deserializeMetadata(output),
1098
1076
  });
1099
1077
  const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
1100
- if (data.nodegroup != null) {
1101
- contents.nodegroup = de_Nodegroup(data.nodegroup, context);
1102
- }
1078
+ const doc = (0, smithy_client_1.take)(data, {
1079
+ nodegroup: (_) => de_Nodegroup(_, context),
1080
+ });
1081
+ Object.assign(contents, doc);
1103
1082
  return contents;
1104
1083
  };
1105
1084
  exports.de_CreateNodegroupCommand = de_CreateNodegroupCommand;
@@ -1133,10 +1112,9 @@ const de_CreateNodegroupCommandError = async (output, context) => {
1133
1112
  throw await de_ServiceUnavailableExceptionRes(parsedOutput, context);
1134
1113
  default:
1135
1114
  const parsedBody = parsedOutput.body;
1136
- (0, smithy_client_1.throwDefaultError)({
1115
+ return throwDefaultError({
1137
1116
  output,
1138
1117
  parsedBody,
1139
- exceptionCtor: EKSServiceException_1.EKSServiceException,
1140
1118
  errorCode,
1141
1119
  });
1142
1120
  }
@@ -1145,13 +1123,14 @@ const de_DeleteAddonCommand = async (output, context) => {
1145
1123
  if (output.statusCode !== 200 && output.statusCode >= 300) {
1146
1124
  return de_DeleteAddonCommandError(output, context);
1147
1125
  }
1148
- const contents = map({
1126
+ const contents = (0, smithy_client_1.map)({
1149
1127
  $metadata: deserializeMetadata(output),
1150
1128
  });
1151
1129
  const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
1152
- if (data.addon != null) {
1153
- contents.addon = de_Addon(data.addon, context);
1154
- }
1130
+ const doc = (0, smithy_client_1.take)(data, {
1131
+ addon: (_) => de_Addon(_, context),
1132
+ });
1133
+ Object.assign(contents, doc);
1155
1134
  return contents;
1156
1135
  };
1157
1136
  exports.de_DeleteAddonCommand = de_DeleteAddonCommand;
@@ -1179,10 +1158,9 @@ const de_DeleteAddonCommandError = async (output, context) => {
1179
1158
  throw await de_ServerExceptionRes(parsedOutput, context);
1180
1159
  default:
1181
1160
  const parsedBody = parsedOutput.body;
1182
- (0, smithy_client_1.throwDefaultError)({
1161
+ return throwDefaultError({
1183
1162
  output,
1184
1163
  parsedBody,
1185
- exceptionCtor: EKSServiceException_1.EKSServiceException,
1186
1164
  errorCode,
1187
1165
  });
1188
1166
  }
@@ -1191,13 +1169,14 @@ const de_DeleteClusterCommand = async (output, context) => {
1191
1169
  if (output.statusCode !== 200 && output.statusCode >= 300) {
1192
1170
  return de_DeleteClusterCommandError(output, context);
1193
1171
  }
1194
- const contents = map({
1172
+ const contents = (0, smithy_client_1.map)({
1195
1173
  $metadata: deserializeMetadata(output),
1196
1174
  });
1197
1175
  const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
1198
- if (data.cluster != null) {
1199
- contents.cluster = de_Cluster(data.cluster, context);
1200
- }
1176
+ const doc = (0, smithy_client_1.take)(data, {
1177
+ cluster: (_) => de_Cluster(_, context),
1178
+ });
1179
+ Object.assign(contents, doc);
1201
1180
  return contents;
1202
1181
  };
1203
1182
  exports.de_DeleteClusterCommand = de_DeleteClusterCommand;
@@ -1225,10 +1204,9 @@ const de_DeleteClusterCommandError = async (output, context) => {
1225
1204
  throw await de_ServiceUnavailableExceptionRes(parsedOutput, context);
1226
1205
  default:
1227
1206
  const parsedBody = parsedOutput.body;
1228
- (0, smithy_client_1.throwDefaultError)({
1207
+ return throwDefaultError({
1229
1208
  output,
1230
1209
  parsedBody,
1231
- exceptionCtor: EKSServiceException_1.EKSServiceException,
1232
1210
  errorCode,
1233
1211
  });
1234
1212
  }
@@ -1237,13 +1215,14 @@ const de_DeleteFargateProfileCommand = async (output, context) => {
1237
1215
  if (output.statusCode !== 200 && output.statusCode >= 300) {
1238
1216
  return de_DeleteFargateProfileCommandError(output, context);
1239
1217
  }
1240
- const contents = map({
1218
+ const contents = (0, smithy_client_1.map)({
1241
1219
  $metadata: deserializeMetadata(output),
1242
1220
  });
1243
1221
  const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
1244
- if (data.fargateProfile != null) {
1245
- contents.fargateProfile = de_FargateProfile(data.fargateProfile, context);
1246
- }
1222
+ const doc = (0, smithy_client_1.take)(data, {
1223
+ fargateProfile: (_) => de_FargateProfile(_, context),
1224
+ });
1225
+ Object.assign(contents, doc);
1247
1226
  return contents;
1248
1227
  };
1249
1228
  exports.de_DeleteFargateProfileCommand = de_DeleteFargateProfileCommand;
@@ -1268,10 +1247,9 @@ const de_DeleteFargateProfileCommandError = async (output, context) => {
1268
1247
  throw await de_ServerExceptionRes(parsedOutput, context);
1269
1248
  default:
1270
1249
  const parsedBody = parsedOutput.body;
1271
- (0, smithy_client_1.throwDefaultError)({
1250
+ return throwDefaultError({
1272
1251
  output,
1273
1252
  parsedBody,
1274
- exceptionCtor: EKSServiceException_1.EKSServiceException,
1275
1253
  errorCode,
1276
1254
  });
1277
1255
  }
@@ -1280,13 +1258,14 @@ const de_DeleteNodegroupCommand = async (output, context) => {
1280
1258
  if (output.statusCode !== 200 && output.statusCode >= 300) {
1281
1259
  return de_DeleteNodegroupCommandError(output, context);
1282
1260
  }
1283
- const contents = map({
1261
+ const contents = (0, smithy_client_1.map)({
1284
1262
  $metadata: deserializeMetadata(output),
1285
1263
  });
1286
1264
  const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
1287
- if (data.nodegroup != null) {
1288
- contents.nodegroup = de_Nodegroup(data.nodegroup, context);
1289
- }
1265
+ const doc = (0, smithy_client_1.take)(data, {
1266
+ nodegroup: (_) => de_Nodegroup(_, context),
1267
+ });
1268
+ Object.assign(contents, doc);
1290
1269
  return contents;
1291
1270
  };
1292
1271
  exports.de_DeleteNodegroupCommand = de_DeleteNodegroupCommand;
@@ -1317,10 +1296,9 @@ const de_DeleteNodegroupCommandError = async (output, context) => {
1317
1296
  throw await de_ServiceUnavailableExceptionRes(parsedOutput, context);
1318
1297
  default:
1319
1298
  const parsedBody = parsedOutput.body;
1320
- (0, smithy_client_1.throwDefaultError)({
1299
+ return throwDefaultError({
1321
1300
  output,
1322
1301
  parsedBody,
1323
- exceptionCtor: EKSServiceException_1.EKSServiceException,
1324
1302
  errorCode,
1325
1303
  });
1326
1304
  }
@@ -1329,13 +1307,14 @@ const de_DeregisterClusterCommand = async (output, context) => {
1329
1307
  if (output.statusCode !== 200 && output.statusCode >= 300) {
1330
1308
  return de_DeregisterClusterCommandError(output, context);
1331
1309
  }
1332
- const contents = map({
1310
+ const contents = (0, smithy_client_1.map)({
1333
1311
  $metadata: deserializeMetadata(output),
1334
1312
  });
1335
1313
  const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
1336
- if (data.cluster != null) {
1337
- contents.cluster = de_Cluster(data.cluster, context);
1338
- }
1314
+ const doc = (0, smithy_client_1.take)(data, {
1315
+ cluster: (_) => de_Cluster(_, context),
1316
+ });
1317
+ Object.assign(contents, doc);
1339
1318
  return contents;
1340
1319
  };
1341
1320
  exports.de_DeregisterClusterCommand = de_DeregisterClusterCommand;
@@ -1366,10 +1345,9 @@ const de_DeregisterClusterCommandError = async (output, context) => {
1366
1345
  throw await de_ServiceUnavailableExceptionRes(parsedOutput, context);
1367
1346
  default:
1368
1347
  const parsedBody = parsedOutput.body;
1369
- (0, smithy_client_1.throwDefaultError)({
1348
+ return throwDefaultError({
1370
1349
  output,
1371
1350
  parsedBody,
1372
- exceptionCtor: EKSServiceException_1.EKSServiceException,
1373
1351
  errorCode,
1374
1352
  });
1375
1353
  }
@@ -1378,13 +1356,14 @@ const de_DescribeAddonCommand = async (output, context) => {
1378
1356
  if (output.statusCode !== 200 && output.statusCode >= 300) {
1379
1357
  return de_DescribeAddonCommandError(output, context);
1380
1358
  }
1381
- const contents = map({
1359
+ const contents = (0, smithy_client_1.map)({
1382
1360
  $metadata: deserializeMetadata(output),
1383
1361
  });
1384
1362
  const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
1385
- if (data.addon != null) {
1386
- contents.addon = de_Addon(data.addon, context);
1387
- }
1363
+ const doc = (0, smithy_client_1.take)(data, {
1364
+ addon: (_) => de_Addon(_, context),
1365
+ });
1366
+ Object.assign(contents, doc);
1388
1367
  return contents;
1389
1368
  };
1390
1369
  exports.de_DescribeAddonCommand = de_DescribeAddonCommand;
@@ -1412,10 +1391,9 @@ const de_DescribeAddonCommandError = async (output, context) => {
1412
1391
  throw await de_ServerExceptionRes(parsedOutput, context);
1413
1392
  default:
1414
1393
  const parsedBody = parsedOutput.body;
1415
- (0, smithy_client_1.throwDefaultError)({
1394
+ return throwDefaultError({
1416
1395
  output,
1417
1396
  parsedBody,
1418
- exceptionCtor: EKSServiceException_1.EKSServiceException,
1419
1397
  errorCode,
1420
1398
  });
1421
1399
  }
@@ -1424,19 +1402,16 @@ const de_DescribeAddonConfigurationCommand = async (output, context) => {
1424
1402
  if (output.statusCode !== 200 && output.statusCode >= 300) {
1425
1403
  return de_DescribeAddonConfigurationCommandError(output, context);
1426
1404
  }
1427
- const contents = map({
1405
+ const contents = (0, smithy_client_1.map)({
1428
1406
  $metadata: deserializeMetadata(output),
1429
1407
  });
1430
1408
  const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
1431
- if (data.addonName != null) {
1432
- contents.addonName = (0, smithy_client_1.expectString)(data.addonName);
1433
- }
1434
- if (data.addonVersion != null) {
1435
- contents.addonVersion = (0, smithy_client_1.expectString)(data.addonVersion);
1436
- }
1437
- if (data.configurationSchema != null) {
1438
- contents.configurationSchema = (0, smithy_client_1.expectString)(data.configurationSchema);
1439
- }
1409
+ const doc = (0, smithy_client_1.take)(data, {
1410
+ addonName: smithy_client_1.expectString,
1411
+ addonVersion: smithy_client_1.expectString,
1412
+ configurationSchema: smithy_client_1.expectString,
1413
+ });
1414
+ Object.assign(contents, doc);
1440
1415
  return contents;
1441
1416
  };
1442
1417
  exports.de_DescribeAddonConfigurationCommand = de_DescribeAddonConfigurationCommand;
@@ -1458,10 +1433,9 @@ const de_DescribeAddonConfigurationCommandError = async (output, context) => {
1458
1433
  throw await de_ServerExceptionRes(parsedOutput, context);
1459
1434
  default:
1460
1435
  const parsedBody = parsedOutput.body;
1461
- (0, smithy_client_1.throwDefaultError)({
1436
+ return throwDefaultError({
1462
1437
  output,
1463
1438
  parsedBody,
1464
- exceptionCtor: EKSServiceException_1.EKSServiceException,
1465
1439
  errorCode,
1466
1440
  });
1467
1441
  }
@@ -1470,16 +1444,15 @@ const de_DescribeAddonVersionsCommand = async (output, context) => {
1470
1444
  if (output.statusCode !== 200 && output.statusCode >= 300) {
1471
1445
  return de_DescribeAddonVersionsCommandError(output, context);
1472
1446
  }
1473
- const contents = map({
1447
+ const contents = (0, smithy_client_1.map)({
1474
1448
  $metadata: deserializeMetadata(output),
1475
1449
  });
1476
1450
  const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
1477
- if (data.addons != null) {
1478
- contents.addons = de_Addons(data.addons, context);
1479
- }
1480
- if (data.nextToken != null) {
1481
- contents.nextToken = (0, smithy_client_1.expectString)(data.nextToken);
1482
- }
1451
+ const doc = (0, smithy_client_1.take)(data, {
1452
+ addons: smithy_client_1._json,
1453
+ nextToken: smithy_client_1.expectString,
1454
+ });
1455
+ Object.assign(contents, doc);
1483
1456
  return contents;
1484
1457
  };
1485
1458
  exports.de_DescribeAddonVersionsCommand = de_DescribeAddonVersionsCommand;
@@ -1501,10 +1474,9 @@ const de_DescribeAddonVersionsCommandError = async (output, context) => {
1501
1474
  throw await de_ServerExceptionRes(parsedOutput, context);
1502
1475
  default:
1503
1476
  const parsedBody = parsedOutput.body;
1504
- (0, smithy_client_1.throwDefaultError)({
1477
+ return throwDefaultError({
1505
1478
  output,
1506
1479
  parsedBody,
1507
- exceptionCtor: EKSServiceException_1.EKSServiceException,
1508
1480
  errorCode,
1509
1481
  });
1510
1482
  }
@@ -1513,13 +1485,14 @@ const de_DescribeClusterCommand = async (output, context) => {
1513
1485
  if (output.statusCode !== 200 && output.statusCode >= 300) {
1514
1486
  return de_DescribeClusterCommandError(output, context);
1515
1487
  }
1516
- const contents = map({
1488
+ const contents = (0, smithy_client_1.map)({
1517
1489
  $metadata: deserializeMetadata(output),
1518
1490
  });
1519
1491
  const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
1520
- if (data.cluster != null) {
1521
- contents.cluster = de_Cluster(data.cluster, context);
1522
- }
1492
+ const doc = (0, smithy_client_1.take)(data, {
1493
+ cluster: (_) => de_Cluster(_, context),
1494
+ });
1495
+ Object.assign(contents, doc);
1523
1496
  return contents;
1524
1497
  };
1525
1498
  exports.de_DescribeClusterCommand = de_DescribeClusterCommand;
@@ -1544,10 +1517,9 @@ const de_DescribeClusterCommandError = async (output, context) => {
1544
1517
  throw await de_ServiceUnavailableExceptionRes(parsedOutput, context);
1545
1518
  default:
1546
1519
  const parsedBody = parsedOutput.body;
1547
- (0, smithy_client_1.throwDefaultError)({
1520
+ return throwDefaultError({
1548
1521
  output,
1549
1522
  parsedBody,
1550
- exceptionCtor: EKSServiceException_1.EKSServiceException,
1551
1523
  errorCode,
1552
1524
  });
1553
1525
  }
@@ -1556,13 +1528,14 @@ const de_DescribeFargateProfileCommand = async (output, context) => {
1556
1528
  if (output.statusCode !== 200 && output.statusCode >= 300) {
1557
1529
  return de_DescribeFargateProfileCommandError(output, context);
1558
1530
  }
1559
- const contents = map({
1531
+ const contents = (0, smithy_client_1.map)({
1560
1532
  $metadata: deserializeMetadata(output),
1561
1533
  });
1562
1534
  const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
1563
- if (data.fargateProfile != null) {
1564
- contents.fargateProfile = de_FargateProfile(data.fargateProfile, context);
1565
- }
1535
+ const doc = (0, smithy_client_1.take)(data, {
1536
+ fargateProfile: (_) => de_FargateProfile(_, context),
1537
+ });
1538
+ Object.assign(contents, doc);
1566
1539
  return contents;
1567
1540
  };
1568
1541
  exports.de_DescribeFargateProfileCommand = de_DescribeFargateProfileCommand;
@@ -1587,10 +1560,9 @@ const de_DescribeFargateProfileCommandError = async (output, context) => {
1587
1560
  throw await de_ServerExceptionRes(parsedOutput, context);
1588
1561
  default:
1589
1562
  const parsedBody = parsedOutput.body;
1590
- (0, smithy_client_1.throwDefaultError)({
1563
+ return throwDefaultError({
1591
1564
  output,
1592
1565
  parsedBody,
1593
- exceptionCtor: EKSServiceException_1.EKSServiceException,
1594
1566
  errorCode,
1595
1567
  });
1596
1568
  }
@@ -1599,13 +1571,14 @@ const de_DescribeIdentityProviderConfigCommand = async (output, context) => {
1599
1571
  if (output.statusCode !== 200 && output.statusCode >= 300) {
1600
1572
  return de_DescribeIdentityProviderConfigCommandError(output, context);
1601
1573
  }
1602
- const contents = map({
1574
+ const contents = (0, smithy_client_1.map)({
1603
1575
  $metadata: deserializeMetadata(output),
1604
1576
  });
1605
1577
  const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
1606
- if (data.identityProviderConfig != null) {
1607
- contents.identityProviderConfig = de_IdentityProviderConfigResponse(data.identityProviderConfig, context);
1608
- }
1578
+ const doc = (0, smithy_client_1.take)(data, {
1579
+ identityProviderConfig: smithy_client_1._json,
1580
+ });
1581
+ Object.assign(contents, doc);
1609
1582
  return contents;
1610
1583
  };
1611
1584
  exports.de_DescribeIdentityProviderConfigCommand = de_DescribeIdentityProviderConfigCommand;
@@ -1633,10 +1606,9 @@ const de_DescribeIdentityProviderConfigCommandError = async (output, context) =>
1633
1606
  throw await de_ServiceUnavailableExceptionRes(parsedOutput, context);
1634
1607
  default:
1635
1608
  const parsedBody = parsedOutput.body;
1636
- (0, smithy_client_1.throwDefaultError)({
1609
+ return throwDefaultError({
1637
1610
  output,
1638
1611
  parsedBody,
1639
- exceptionCtor: EKSServiceException_1.EKSServiceException,
1640
1612
  errorCode,
1641
1613
  });
1642
1614
  }
@@ -1645,13 +1617,14 @@ const de_DescribeNodegroupCommand = async (output, context) => {
1645
1617
  if (output.statusCode !== 200 && output.statusCode >= 300) {
1646
1618
  return de_DescribeNodegroupCommandError(output, context);
1647
1619
  }
1648
- const contents = map({
1620
+ const contents = (0, smithy_client_1.map)({
1649
1621
  $metadata: deserializeMetadata(output),
1650
1622
  });
1651
1623
  const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
1652
- if (data.nodegroup != null) {
1653
- contents.nodegroup = de_Nodegroup(data.nodegroup, context);
1654
- }
1624
+ const doc = (0, smithy_client_1.take)(data, {
1625
+ nodegroup: (_) => de_Nodegroup(_, context),
1626
+ });
1627
+ Object.assign(contents, doc);
1655
1628
  return contents;
1656
1629
  };
1657
1630
  exports.de_DescribeNodegroupCommand = de_DescribeNodegroupCommand;
@@ -1679,10 +1652,9 @@ const de_DescribeNodegroupCommandError = async (output, context) => {
1679
1652
  throw await de_ServiceUnavailableExceptionRes(parsedOutput, context);
1680
1653
  default:
1681
1654
  const parsedBody = parsedOutput.body;
1682
- (0, smithy_client_1.throwDefaultError)({
1655
+ return throwDefaultError({
1683
1656
  output,
1684
1657
  parsedBody,
1685
- exceptionCtor: EKSServiceException_1.EKSServiceException,
1686
1658
  errorCode,
1687
1659
  });
1688
1660
  }
@@ -1691,13 +1663,14 @@ const de_DescribeUpdateCommand = async (output, context) => {
1691
1663
  if (output.statusCode !== 200 && output.statusCode >= 300) {
1692
1664
  return de_DescribeUpdateCommandError(output, context);
1693
1665
  }
1694
- const contents = map({
1666
+ const contents = (0, smithy_client_1.map)({
1695
1667
  $metadata: deserializeMetadata(output),
1696
1668
  });
1697
1669
  const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
1698
- if (data.update != null) {
1699
- contents.update = de_Update(data.update, context);
1700
- }
1670
+ const doc = (0, smithy_client_1.take)(data, {
1671
+ update: (_) => de_Update(_, context),
1672
+ });
1673
+ Object.assign(contents, doc);
1701
1674
  return contents;
1702
1675
  };
1703
1676
  exports.de_DescribeUpdateCommand = de_DescribeUpdateCommand;
@@ -1722,10 +1695,9 @@ const de_DescribeUpdateCommandError = async (output, context) => {
1722
1695
  throw await de_ServerExceptionRes(parsedOutput, context);
1723
1696
  default:
1724
1697
  const parsedBody = parsedOutput.body;
1725
- (0, smithy_client_1.throwDefaultError)({
1698
+ return throwDefaultError({
1726
1699
  output,
1727
1700
  parsedBody,
1728
- exceptionCtor: EKSServiceException_1.EKSServiceException,
1729
1701
  errorCode,
1730
1702
  });
1731
1703
  }
@@ -1734,13 +1706,14 @@ const de_DisassociateIdentityProviderConfigCommand = async (output, context) =>
1734
1706
  if (output.statusCode !== 200 && output.statusCode >= 300) {
1735
1707
  return de_DisassociateIdentityProviderConfigCommandError(output, context);
1736
1708
  }
1737
- const contents = map({
1709
+ const contents = (0, smithy_client_1.map)({
1738
1710
  $metadata: deserializeMetadata(output),
1739
1711
  });
1740
1712
  const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
1741
- if (data.update != null) {
1742
- contents.update = de_Update(data.update, context);
1743
- }
1713
+ const doc = (0, smithy_client_1.take)(data, {
1714
+ update: (_) => de_Update(_, context),
1715
+ });
1716
+ Object.assign(contents, doc);
1744
1717
  return contents;
1745
1718
  };
1746
1719
  exports.de_DisassociateIdentityProviderConfigCommand = de_DisassociateIdentityProviderConfigCommand;
@@ -1771,10 +1744,9 @@ const de_DisassociateIdentityProviderConfigCommandError = async (output, context
1771
1744
  throw await de_ServerExceptionRes(parsedOutput, context);
1772
1745
  default:
1773
1746
  const parsedBody = parsedOutput.body;
1774
- (0, smithy_client_1.throwDefaultError)({
1747
+ return throwDefaultError({
1775
1748
  output,
1776
1749
  parsedBody,
1777
- exceptionCtor: EKSServiceException_1.EKSServiceException,
1778
1750
  errorCode,
1779
1751
  });
1780
1752
  }
@@ -1783,16 +1755,15 @@ const de_ListAddonsCommand = async (output, context) => {
1783
1755
  if (output.statusCode !== 200 && output.statusCode >= 300) {
1784
1756
  return de_ListAddonsCommandError(output, context);
1785
1757
  }
1786
- const contents = map({
1758
+ const contents = (0, smithy_client_1.map)({
1787
1759
  $metadata: deserializeMetadata(output),
1788
1760
  });
1789
1761
  const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
1790
- if (data.addons != null) {
1791
- contents.addons = de_StringList(data.addons, context);
1792
- }
1793
- if (data.nextToken != null) {
1794
- contents.nextToken = (0, smithy_client_1.expectString)(data.nextToken);
1795
- }
1762
+ const doc = (0, smithy_client_1.take)(data, {
1763
+ addons: smithy_client_1._json,
1764
+ nextToken: smithy_client_1.expectString,
1765
+ });
1766
+ Object.assign(contents, doc);
1796
1767
  return contents;
1797
1768
  };
1798
1769
  exports.de_ListAddonsCommand = de_ListAddonsCommand;
@@ -1820,10 +1791,9 @@ const de_ListAddonsCommandError = async (output, context) => {
1820
1791
  throw await de_ServerExceptionRes(parsedOutput, context);
1821
1792
  default:
1822
1793
  const parsedBody = parsedOutput.body;
1823
- (0, smithy_client_1.throwDefaultError)({
1794
+ return throwDefaultError({
1824
1795
  output,
1825
1796
  parsedBody,
1826
- exceptionCtor: EKSServiceException_1.EKSServiceException,
1827
1797
  errorCode,
1828
1798
  });
1829
1799
  }
@@ -1832,16 +1802,15 @@ const de_ListClustersCommand = async (output, context) => {
1832
1802
  if (output.statusCode !== 200 && output.statusCode >= 300) {
1833
1803
  return de_ListClustersCommandError(output, context);
1834
1804
  }
1835
- const contents = map({
1805
+ const contents = (0, smithy_client_1.map)({
1836
1806
  $metadata: deserializeMetadata(output),
1837
1807
  });
1838
1808
  const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
1839
- if (data.clusters != null) {
1840
- contents.clusters = de_StringList(data.clusters, context);
1841
- }
1842
- if (data.nextToken != null) {
1843
- contents.nextToken = (0, smithy_client_1.expectString)(data.nextToken);
1844
- }
1809
+ const doc = (0, smithy_client_1.take)(data, {
1810
+ clusters: smithy_client_1._json,
1811
+ nextToken: smithy_client_1.expectString,
1812
+ });
1813
+ Object.assign(contents, doc);
1845
1814
  return contents;
1846
1815
  };
1847
1816
  exports.de_ListClustersCommand = de_ListClustersCommand;
@@ -1866,10 +1835,9 @@ const de_ListClustersCommandError = async (output, context) => {
1866
1835
  throw await de_ServiceUnavailableExceptionRes(parsedOutput, context);
1867
1836
  default:
1868
1837
  const parsedBody = parsedOutput.body;
1869
- (0, smithy_client_1.throwDefaultError)({
1838
+ return throwDefaultError({
1870
1839
  output,
1871
1840
  parsedBody,
1872
- exceptionCtor: EKSServiceException_1.EKSServiceException,
1873
1841
  errorCode,
1874
1842
  });
1875
1843
  }
@@ -1878,16 +1846,15 @@ const de_ListFargateProfilesCommand = async (output, context) => {
1878
1846
  if (output.statusCode !== 200 && output.statusCode >= 300) {
1879
1847
  return de_ListFargateProfilesCommandError(output, context);
1880
1848
  }
1881
- const contents = map({
1849
+ const contents = (0, smithy_client_1.map)({
1882
1850
  $metadata: deserializeMetadata(output),
1883
1851
  });
1884
1852
  const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
1885
- if (data.fargateProfileNames != null) {
1886
- contents.fargateProfileNames = de_StringList(data.fargateProfileNames, context);
1887
- }
1888
- if (data.nextToken != null) {
1889
- contents.nextToken = (0, smithy_client_1.expectString)(data.nextToken);
1890
- }
1853
+ const doc = (0, smithy_client_1.take)(data, {
1854
+ fargateProfileNames: smithy_client_1._json,
1855
+ nextToken: smithy_client_1.expectString,
1856
+ });
1857
+ Object.assign(contents, doc);
1891
1858
  return contents;
1892
1859
  };
1893
1860
  exports.de_ListFargateProfilesCommand = de_ListFargateProfilesCommand;
@@ -1912,10 +1879,9 @@ const de_ListFargateProfilesCommandError = async (output, context) => {
1912
1879
  throw await de_ServerExceptionRes(parsedOutput, context);
1913
1880
  default:
1914
1881
  const parsedBody = parsedOutput.body;
1915
- (0, smithy_client_1.throwDefaultError)({
1882
+ return throwDefaultError({
1916
1883
  output,
1917
1884
  parsedBody,
1918
- exceptionCtor: EKSServiceException_1.EKSServiceException,
1919
1885
  errorCode,
1920
1886
  });
1921
1887
  }
@@ -1924,16 +1890,15 @@ const de_ListIdentityProviderConfigsCommand = async (output, context) => {
1924
1890
  if (output.statusCode !== 200 && output.statusCode >= 300) {
1925
1891
  return de_ListIdentityProviderConfigsCommandError(output, context);
1926
1892
  }
1927
- const contents = map({
1893
+ const contents = (0, smithy_client_1.map)({
1928
1894
  $metadata: deserializeMetadata(output),
1929
1895
  });
1930
1896
  const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
1931
- if (data.identityProviderConfigs != null) {
1932
- contents.identityProviderConfigs = de_IdentityProviderConfigs(data.identityProviderConfigs, context);
1933
- }
1934
- if (data.nextToken != null) {
1935
- contents.nextToken = (0, smithy_client_1.expectString)(data.nextToken);
1936
- }
1897
+ const doc = (0, smithy_client_1.take)(data, {
1898
+ identityProviderConfigs: smithy_client_1._json,
1899
+ nextToken: smithy_client_1.expectString,
1900
+ });
1901
+ Object.assign(contents, doc);
1937
1902
  return contents;
1938
1903
  };
1939
1904
  exports.de_ListIdentityProviderConfigsCommand = de_ListIdentityProviderConfigsCommand;
@@ -1961,10 +1926,9 @@ const de_ListIdentityProviderConfigsCommandError = async (output, context) => {
1961
1926
  throw await de_ServiceUnavailableExceptionRes(parsedOutput, context);
1962
1927
  default:
1963
1928
  const parsedBody = parsedOutput.body;
1964
- (0, smithy_client_1.throwDefaultError)({
1929
+ return throwDefaultError({
1965
1930
  output,
1966
1931
  parsedBody,
1967
- exceptionCtor: EKSServiceException_1.EKSServiceException,
1968
1932
  errorCode,
1969
1933
  });
1970
1934
  }
@@ -1973,16 +1937,15 @@ const de_ListNodegroupsCommand = async (output, context) => {
1973
1937
  if (output.statusCode !== 200 && output.statusCode >= 300) {
1974
1938
  return de_ListNodegroupsCommandError(output, context);
1975
1939
  }
1976
- const contents = map({
1940
+ const contents = (0, smithy_client_1.map)({
1977
1941
  $metadata: deserializeMetadata(output),
1978
1942
  });
1979
1943
  const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
1980
- if (data.nextToken != null) {
1981
- contents.nextToken = (0, smithy_client_1.expectString)(data.nextToken);
1982
- }
1983
- if (data.nodegroups != null) {
1984
- contents.nodegroups = de_StringList(data.nodegroups, context);
1985
- }
1944
+ const doc = (0, smithy_client_1.take)(data, {
1945
+ nextToken: smithy_client_1.expectString,
1946
+ nodegroups: smithy_client_1._json,
1947
+ });
1948
+ Object.assign(contents, doc);
1986
1949
  return contents;
1987
1950
  };
1988
1951
  exports.de_ListNodegroupsCommand = de_ListNodegroupsCommand;
@@ -2010,10 +1973,9 @@ const de_ListNodegroupsCommandError = async (output, context) => {
2010
1973
  throw await de_ServiceUnavailableExceptionRes(parsedOutput, context);
2011
1974
  default:
2012
1975
  const parsedBody = parsedOutput.body;
2013
- (0, smithy_client_1.throwDefaultError)({
1976
+ return throwDefaultError({
2014
1977
  output,
2015
1978
  parsedBody,
2016
- exceptionCtor: EKSServiceException_1.EKSServiceException,
2017
1979
  errorCode,
2018
1980
  });
2019
1981
  }
@@ -2022,13 +1984,14 @@ const de_ListTagsForResourceCommand = async (output, context) => {
2022
1984
  if (output.statusCode !== 200 && output.statusCode >= 300) {
2023
1985
  return de_ListTagsForResourceCommandError(output, context);
2024
1986
  }
2025
- const contents = map({
1987
+ const contents = (0, smithy_client_1.map)({
2026
1988
  $metadata: deserializeMetadata(output),
2027
1989
  });
2028
1990
  const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
2029
- if (data.tags != null) {
2030
- contents.tags = de_TagMap(data.tags, context);
2031
- }
1991
+ const doc = (0, smithy_client_1.take)(data, {
1992
+ tags: smithy_client_1._json,
1993
+ });
1994
+ Object.assign(contents, doc);
2032
1995
  return contents;
2033
1996
  };
2034
1997
  exports.de_ListTagsForResourceCommand = de_ListTagsForResourceCommand;
@@ -2047,10 +2010,9 @@ const de_ListTagsForResourceCommandError = async (output, context) => {
2047
2010
  throw await de_NotFoundExceptionRes(parsedOutput, context);
2048
2011
  default:
2049
2012
  const parsedBody = parsedOutput.body;
2050
- (0, smithy_client_1.throwDefaultError)({
2013
+ return throwDefaultError({
2051
2014
  output,
2052
2015
  parsedBody,
2053
- exceptionCtor: EKSServiceException_1.EKSServiceException,
2054
2016
  errorCode,
2055
2017
  });
2056
2018
  }
@@ -2059,16 +2021,15 @@ const de_ListUpdatesCommand = async (output, context) => {
2059
2021
  if (output.statusCode !== 200 && output.statusCode >= 300) {
2060
2022
  return de_ListUpdatesCommandError(output, context);
2061
2023
  }
2062
- const contents = map({
2024
+ const contents = (0, smithy_client_1.map)({
2063
2025
  $metadata: deserializeMetadata(output),
2064
2026
  });
2065
2027
  const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
2066
- if (data.nextToken != null) {
2067
- contents.nextToken = (0, smithy_client_1.expectString)(data.nextToken);
2068
- }
2069
- if (data.updateIds != null) {
2070
- contents.updateIds = de_StringList(data.updateIds, context);
2071
- }
2028
+ const doc = (0, smithy_client_1.take)(data, {
2029
+ nextToken: smithy_client_1.expectString,
2030
+ updateIds: smithy_client_1._json,
2031
+ });
2032
+ Object.assign(contents, doc);
2072
2033
  return contents;
2073
2034
  };
2074
2035
  exports.de_ListUpdatesCommand = de_ListUpdatesCommand;
@@ -2093,10 +2054,9 @@ const de_ListUpdatesCommandError = async (output, context) => {
2093
2054
  throw await de_ServerExceptionRes(parsedOutput, context);
2094
2055
  default:
2095
2056
  const parsedBody = parsedOutput.body;
2096
- (0, smithy_client_1.throwDefaultError)({
2057
+ return throwDefaultError({
2097
2058
  output,
2098
2059
  parsedBody,
2099
- exceptionCtor: EKSServiceException_1.EKSServiceException,
2100
2060
  errorCode,
2101
2061
  });
2102
2062
  }
@@ -2105,13 +2065,14 @@ const de_RegisterClusterCommand = async (output, context) => {
2105
2065
  if (output.statusCode !== 200 && output.statusCode >= 300) {
2106
2066
  return de_RegisterClusterCommandError(output, context);
2107
2067
  }
2108
- const contents = map({
2068
+ const contents = (0, smithy_client_1.map)({
2109
2069
  $metadata: deserializeMetadata(output),
2110
2070
  });
2111
2071
  const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
2112
- if (data.cluster != null) {
2113
- contents.cluster = de_Cluster(data.cluster, context);
2114
- }
2072
+ const doc = (0, smithy_client_1.take)(data, {
2073
+ cluster: (_) => de_Cluster(_, context),
2074
+ });
2075
+ Object.assign(contents, doc);
2115
2076
  return contents;
2116
2077
  };
2117
2078
  exports.de_RegisterClusterCommand = de_RegisterClusterCommand;
@@ -2148,10 +2109,9 @@ const de_RegisterClusterCommandError = async (output, context) => {
2148
2109
  throw await de_ServiceUnavailableExceptionRes(parsedOutput, context);
2149
2110
  default:
2150
2111
  const parsedBody = parsedOutput.body;
2151
- (0, smithy_client_1.throwDefaultError)({
2112
+ return throwDefaultError({
2152
2113
  output,
2153
2114
  parsedBody,
2154
- exceptionCtor: EKSServiceException_1.EKSServiceException,
2155
2115
  errorCode,
2156
2116
  });
2157
2117
  }
@@ -2160,7 +2120,7 @@ const de_TagResourceCommand = async (output, context) => {
2160
2120
  if (output.statusCode !== 200 && output.statusCode >= 300) {
2161
2121
  return de_TagResourceCommandError(output, context);
2162
2122
  }
2163
- const contents = map({
2123
+ const contents = (0, smithy_client_1.map)({
2164
2124
  $metadata: deserializeMetadata(output),
2165
2125
  });
2166
2126
  await collectBody(output.body, context);
@@ -2182,10 +2142,9 @@ const de_TagResourceCommandError = async (output, context) => {
2182
2142
  throw await de_NotFoundExceptionRes(parsedOutput, context);
2183
2143
  default:
2184
2144
  const parsedBody = parsedOutput.body;
2185
- (0, smithy_client_1.throwDefaultError)({
2145
+ return throwDefaultError({
2186
2146
  output,
2187
2147
  parsedBody,
2188
- exceptionCtor: EKSServiceException_1.EKSServiceException,
2189
2148
  errorCode,
2190
2149
  });
2191
2150
  }
@@ -2194,7 +2153,7 @@ const de_UntagResourceCommand = async (output, context) => {
2194
2153
  if (output.statusCode !== 200 && output.statusCode >= 300) {
2195
2154
  return de_UntagResourceCommandError(output, context);
2196
2155
  }
2197
- const contents = map({
2156
+ const contents = (0, smithy_client_1.map)({
2198
2157
  $metadata: deserializeMetadata(output),
2199
2158
  });
2200
2159
  await collectBody(output.body, context);
@@ -2216,10 +2175,9 @@ const de_UntagResourceCommandError = async (output, context) => {
2216
2175
  throw await de_NotFoundExceptionRes(parsedOutput, context);
2217
2176
  default:
2218
2177
  const parsedBody = parsedOutput.body;
2219
- (0, smithy_client_1.throwDefaultError)({
2178
+ return throwDefaultError({
2220
2179
  output,
2221
2180
  parsedBody,
2222
- exceptionCtor: EKSServiceException_1.EKSServiceException,
2223
2181
  errorCode,
2224
2182
  });
2225
2183
  }
@@ -2228,13 +2186,14 @@ const de_UpdateAddonCommand = async (output, context) => {
2228
2186
  if (output.statusCode !== 200 && output.statusCode >= 300) {
2229
2187
  return de_UpdateAddonCommandError(output, context);
2230
2188
  }
2231
- const contents = map({
2189
+ const contents = (0, smithy_client_1.map)({
2232
2190
  $metadata: deserializeMetadata(output),
2233
2191
  });
2234
2192
  const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
2235
- if (data.update != null) {
2236
- contents.update = de_Update(data.update, context);
2237
- }
2193
+ const doc = (0, smithy_client_1.take)(data, {
2194
+ update: (_) => de_Update(_, context),
2195
+ });
2196
+ Object.assign(contents, doc);
2238
2197
  return contents;
2239
2198
  };
2240
2199
  exports.de_UpdateAddonCommand = de_UpdateAddonCommand;
@@ -2265,10 +2224,9 @@ const de_UpdateAddonCommandError = async (output, context) => {
2265
2224
  throw await de_ServerExceptionRes(parsedOutput, context);
2266
2225
  default:
2267
2226
  const parsedBody = parsedOutput.body;
2268
- (0, smithy_client_1.throwDefaultError)({
2227
+ return throwDefaultError({
2269
2228
  output,
2270
2229
  parsedBody,
2271
- exceptionCtor: EKSServiceException_1.EKSServiceException,
2272
2230
  errorCode,
2273
2231
  });
2274
2232
  }
@@ -2277,13 +2235,14 @@ const de_UpdateClusterConfigCommand = async (output, context) => {
2277
2235
  if (output.statusCode !== 200 && output.statusCode >= 300) {
2278
2236
  return de_UpdateClusterConfigCommandError(output, context);
2279
2237
  }
2280
- const contents = map({
2238
+ const contents = (0, smithy_client_1.map)({
2281
2239
  $metadata: deserializeMetadata(output),
2282
2240
  });
2283
2241
  const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
2284
- if (data.update != null) {
2285
- contents.update = de_Update(data.update, context);
2286
- }
2242
+ const doc = (0, smithy_client_1.take)(data, {
2243
+ update: (_) => de_Update(_, context),
2244
+ });
2245
+ Object.assign(contents, doc);
2287
2246
  return contents;
2288
2247
  };
2289
2248
  exports.de_UpdateClusterConfigCommand = de_UpdateClusterConfigCommand;
@@ -2314,10 +2273,9 @@ const de_UpdateClusterConfigCommandError = async (output, context) => {
2314
2273
  throw await de_ServerExceptionRes(parsedOutput, context);
2315
2274
  default:
2316
2275
  const parsedBody = parsedOutput.body;
2317
- (0, smithy_client_1.throwDefaultError)({
2276
+ return throwDefaultError({
2318
2277
  output,
2319
2278
  parsedBody,
2320
- exceptionCtor: EKSServiceException_1.EKSServiceException,
2321
2279
  errorCode,
2322
2280
  });
2323
2281
  }
@@ -2326,13 +2284,14 @@ const de_UpdateClusterVersionCommand = async (output, context) => {
2326
2284
  if (output.statusCode !== 200 && output.statusCode >= 300) {
2327
2285
  return de_UpdateClusterVersionCommandError(output, context);
2328
2286
  }
2329
- const contents = map({
2287
+ const contents = (0, smithy_client_1.map)({
2330
2288
  $metadata: deserializeMetadata(output),
2331
2289
  });
2332
2290
  const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
2333
- if (data.update != null) {
2334
- contents.update = de_Update(data.update, context);
2335
- }
2291
+ const doc = (0, smithy_client_1.take)(data, {
2292
+ update: (_) => de_Update(_, context),
2293
+ });
2294
+ Object.assign(contents, doc);
2336
2295
  return contents;
2337
2296
  };
2338
2297
  exports.de_UpdateClusterVersionCommand = de_UpdateClusterVersionCommand;
@@ -2363,10 +2322,9 @@ const de_UpdateClusterVersionCommandError = async (output, context) => {
2363
2322
  throw await de_ServerExceptionRes(parsedOutput, context);
2364
2323
  default:
2365
2324
  const parsedBody = parsedOutput.body;
2366
- (0, smithy_client_1.throwDefaultError)({
2325
+ return throwDefaultError({
2367
2326
  output,
2368
2327
  parsedBody,
2369
- exceptionCtor: EKSServiceException_1.EKSServiceException,
2370
2328
  errorCode,
2371
2329
  });
2372
2330
  }
@@ -2375,13 +2333,14 @@ const de_UpdateNodegroupConfigCommand = async (output, context) => {
2375
2333
  if (output.statusCode !== 200 && output.statusCode >= 300) {
2376
2334
  return de_UpdateNodegroupConfigCommandError(output, context);
2377
2335
  }
2378
- const contents = map({
2336
+ const contents = (0, smithy_client_1.map)({
2379
2337
  $metadata: deserializeMetadata(output),
2380
2338
  });
2381
2339
  const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
2382
- if (data.update != null) {
2383
- contents.update = de_Update(data.update, context);
2384
- }
2340
+ const doc = (0, smithy_client_1.take)(data, {
2341
+ update: (_) => de_Update(_, context),
2342
+ });
2343
+ Object.assign(contents, doc);
2385
2344
  return contents;
2386
2345
  };
2387
2346
  exports.de_UpdateNodegroupConfigCommand = de_UpdateNodegroupConfigCommand;
@@ -2412,10 +2371,9 @@ const de_UpdateNodegroupConfigCommandError = async (output, context) => {
2412
2371
  throw await de_ServerExceptionRes(parsedOutput, context);
2413
2372
  default:
2414
2373
  const parsedBody = parsedOutput.body;
2415
- (0, smithy_client_1.throwDefaultError)({
2374
+ return throwDefaultError({
2416
2375
  output,
2417
2376
  parsedBody,
2418
- exceptionCtor: EKSServiceException_1.EKSServiceException,
2419
2377
  errorCode,
2420
2378
  });
2421
2379
  }
@@ -2424,13 +2382,14 @@ const de_UpdateNodegroupVersionCommand = async (output, context) => {
2424
2382
  if (output.statusCode !== 200 && output.statusCode >= 300) {
2425
2383
  return de_UpdateNodegroupVersionCommandError(output, context);
2426
2384
  }
2427
- const contents = map({
2385
+ const contents = (0, smithy_client_1.map)({
2428
2386
  $metadata: deserializeMetadata(output),
2429
2387
  });
2430
2388
  const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
2431
- if (data.update != null) {
2432
- contents.update = de_Update(data.update, context);
2433
- }
2389
+ const doc = (0, smithy_client_1.take)(data, {
2390
+ update: (_) => de_Update(_, context),
2391
+ });
2392
+ Object.assign(contents, doc);
2434
2393
  return contents;
2435
2394
  };
2436
2395
  exports.de_UpdateNodegroupVersionCommand = de_UpdateNodegroupVersionCommand;
@@ -2461,21 +2420,21 @@ const de_UpdateNodegroupVersionCommandError = async (output, context) => {
2461
2420
  throw await de_ServerExceptionRes(parsedOutput, context);
2462
2421
  default:
2463
2422
  const parsedBody = parsedOutput.body;
2464
- (0, smithy_client_1.throwDefaultError)({
2423
+ return throwDefaultError({
2465
2424
  output,
2466
2425
  parsedBody,
2467
- exceptionCtor: EKSServiceException_1.EKSServiceException,
2468
2426
  errorCode,
2469
2427
  });
2470
2428
  }
2471
2429
  };
2472
- const map = smithy_client_1.map;
2430
+ const throwDefaultError = (0, smithy_client_1.withBaseException)(EKSServiceException_1.EKSServiceException);
2473
2431
  const de_AccessDeniedExceptionRes = async (parsedOutput, context) => {
2474
- const contents = map({});
2432
+ const contents = (0, smithy_client_1.map)({});
2475
2433
  const data = parsedOutput.body;
2476
- if (data.message != null) {
2477
- contents.message = (0, smithy_client_1.expectString)(data.message);
2478
- }
2434
+ const doc = (0, smithy_client_1.take)(data, {
2435
+ message: smithy_client_1.expectString,
2436
+ });
2437
+ Object.assign(contents, doc);
2479
2438
  const exception = new models_0_1.AccessDeniedException({
2480
2439
  $metadata: deserializeMetadata(parsedOutput),
2481
2440
  ...contents,
@@ -2483,11 +2442,12 @@ const de_AccessDeniedExceptionRes = async (parsedOutput, context) => {
2483
2442
  return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
2484
2443
  };
2485
2444
  const de_BadRequestExceptionRes = async (parsedOutput, context) => {
2486
- const contents = map({});
2445
+ const contents = (0, smithy_client_1.map)({});
2487
2446
  const data = parsedOutput.body;
2488
- if (data.message != null) {
2489
- contents.message = (0, smithy_client_1.expectString)(data.message);
2490
- }
2447
+ const doc = (0, smithy_client_1.take)(data, {
2448
+ message: smithy_client_1.expectString,
2449
+ });
2450
+ Object.assign(contents, doc);
2491
2451
  const exception = new models_0_1.BadRequestException({
2492
2452
  $metadata: deserializeMetadata(parsedOutput),
2493
2453
  ...contents,
@@ -2495,20 +2455,15 @@ const de_BadRequestExceptionRes = async (parsedOutput, context) => {
2495
2455
  return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
2496
2456
  };
2497
2457
  const de_ClientExceptionRes = async (parsedOutput, context) => {
2498
- const contents = map({});
2458
+ const contents = (0, smithy_client_1.map)({});
2499
2459
  const data = parsedOutput.body;
2500
- if (data.addonName != null) {
2501
- contents.addonName = (0, smithy_client_1.expectString)(data.addonName);
2502
- }
2503
- if (data.clusterName != null) {
2504
- contents.clusterName = (0, smithy_client_1.expectString)(data.clusterName);
2505
- }
2506
- if (data.message != null) {
2507
- contents.message = (0, smithy_client_1.expectString)(data.message);
2508
- }
2509
- if (data.nodegroupName != null) {
2510
- contents.nodegroupName = (0, smithy_client_1.expectString)(data.nodegroupName);
2511
- }
2460
+ const doc = (0, smithy_client_1.take)(data, {
2461
+ addonName: smithy_client_1.expectString,
2462
+ clusterName: smithy_client_1.expectString,
2463
+ message: smithy_client_1.expectString,
2464
+ nodegroupName: smithy_client_1.expectString,
2465
+ });
2466
+ Object.assign(contents, doc);
2512
2467
  const exception = new models_0_1.ClientException({
2513
2468
  $metadata: deserializeMetadata(parsedOutput),
2514
2469
  ...contents,
@@ -2516,23 +2471,16 @@ const de_ClientExceptionRes = async (parsedOutput, context) => {
2516
2471
  return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
2517
2472
  };
2518
2473
  const de_InvalidParameterExceptionRes = async (parsedOutput, context) => {
2519
- const contents = map({});
2474
+ const contents = (0, smithy_client_1.map)({});
2520
2475
  const data = parsedOutput.body;
2521
- if (data.addonName != null) {
2522
- contents.addonName = (0, smithy_client_1.expectString)(data.addonName);
2523
- }
2524
- if (data.clusterName != null) {
2525
- contents.clusterName = (0, smithy_client_1.expectString)(data.clusterName);
2526
- }
2527
- if (data.fargateProfileName != null) {
2528
- contents.fargateProfileName = (0, smithy_client_1.expectString)(data.fargateProfileName);
2529
- }
2530
- if (data.message != null) {
2531
- contents.message = (0, smithy_client_1.expectString)(data.message);
2532
- }
2533
- if (data.nodegroupName != null) {
2534
- contents.nodegroupName = (0, smithy_client_1.expectString)(data.nodegroupName);
2535
- }
2476
+ const doc = (0, smithy_client_1.take)(data, {
2477
+ addonName: smithy_client_1.expectString,
2478
+ clusterName: smithy_client_1.expectString,
2479
+ fargateProfileName: smithy_client_1.expectString,
2480
+ message: smithy_client_1.expectString,
2481
+ nodegroupName: smithy_client_1.expectString,
2482
+ });
2483
+ Object.assign(contents, doc);
2536
2484
  const exception = new models_0_1.InvalidParameterException({
2537
2485
  $metadata: deserializeMetadata(parsedOutput),
2538
2486
  ...contents,
@@ -2540,20 +2488,15 @@ const de_InvalidParameterExceptionRes = async (parsedOutput, context) => {
2540
2488
  return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
2541
2489
  };
2542
2490
  const de_InvalidRequestExceptionRes = async (parsedOutput, context) => {
2543
- const contents = map({});
2491
+ const contents = (0, smithy_client_1.map)({});
2544
2492
  const data = parsedOutput.body;
2545
- if (data.addonName != null) {
2546
- contents.addonName = (0, smithy_client_1.expectString)(data.addonName);
2547
- }
2548
- if (data.clusterName != null) {
2549
- contents.clusterName = (0, smithy_client_1.expectString)(data.clusterName);
2550
- }
2551
- if (data.message != null) {
2552
- contents.message = (0, smithy_client_1.expectString)(data.message);
2553
- }
2554
- if (data.nodegroupName != null) {
2555
- contents.nodegroupName = (0, smithy_client_1.expectString)(data.nodegroupName);
2556
- }
2493
+ const doc = (0, smithy_client_1.take)(data, {
2494
+ addonName: smithy_client_1.expectString,
2495
+ clusterName: smithy_client_1.expectString,
2496
+ message: smithy_client_1.expectString,
2497
+ nodegroupName: smithy_client_1.expectString,
2498
+ });
2499
+ Object.assign(contents, doc);
2557
2500
  const exception = new models_0_1.InvalidRequestException({
2558
2501
  $metadata: deserializeMetadata(parsedOutput),
2559
2502
  ...contents,
@@ -2561,11 +2504,12 @@ const de_InvalidRequestExceptionRes = async (parsedOutput, context) => {
2561
2504
  return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
2562
2505
  };
2563
2506
  const de_NotFoundExceptionRes = async (parsedOutput, context) => {
2564
- const contents = map({});
2507
+ const contents = (0, smithy_client_1.map)({});
2565
2508
  const data = parsedOutput.body;
2566
- if (data.message != null) {
2567
- contents.message = (0, smithy_client_1.expectString)(data.message);
2568
- }
2509
+ const doc = (0, smithy_client_1.take)(data, {
2510
+ message: smithy_client_1.expectString,
2511
+ });
2512
+ Object.assign(contents, doc);
2569
2513
  const exception = new models_0_1.NotFoundException({
2570
2514
  $metadata: deserializeMetadata(parsedOutput),
2571
2515
  ...contents,
@@ -2573,20 +2517,15 @@ const de_NotFoundExceptionRes = async (parsedOutput, context) => {
2573
2517
  return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
2574
2518
  };
2575
2519
  const de_ResourceInUseExceptionRes = async (parsedOutput, context) => {
2576
- const contents = map({});
2520
+ const contents = (0, smithy_client_1.map)({});
2577
2521
  const data = parsedOutput.body;
2578
- if (data.addonName != null) {
2579
- contents.addonName = (0, smithy_client_1.expectString)(data.addonName);
2580
- }
2581
- if (data.clusterName != null) {
2582
- contents.clusterName = (0, smithy_client_1.expectString)(data.clusterName);
2583
- }
2584
- if (data.message != null) {
2585
- contents.message = (0, smithy_client_1.expectString)(data.message);
2586
- }
2587
- if (data.nodegroupName != null) {
2588
- contents.nodegroupName = (0, smithy_client_1.expectString)(data.nodegroupName);
2589
- }
2522
+ const doc = (0, smithy_client_1.take)(data, {
2523
+ addonName: smithy_client_1.expectString,
2524
+ clusterName: smithy_client_1.expectString,
2525
+ message: smithy_client_1.expectString,
2526
+ nodegroupName: smithy_client_1.expectString,
2527
+ });
2528
+ Object.assign(contents, doc);
2590
2529
  const exception = new models_0_1.ResourceInUseException({
2591
2530
  $metadata: deserializeMetadata(parsedOutput),
2592
2531
  ...contents,
@@ -2594,17 +2533,14 @@ const de_ResourceInUseExceptionRes = async (parsedOutput, context) => {
2594
2533
  return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
2595
2534
  };
2596
2535
  const de_ResourceLimitExceededExceptionRes = async (parsedOutput, context) => {
2597
- const contents = map({});
2536
+ const contents = (0, smithy_client_1.map)({});
2598
2537
  const data = parsedOutput.body;
2599
- if (data.clusterName != null) {
2600
- contents.clusterName = (0, smithy_client_1.expectString)(data.clusterName);
2601
- }
2602
- if (data.message != null) {
2603
- contents.message = (0, smithy_client_1.expectString)(data.message);
2604
- }
2605
- if (data.nodegroupName != null) {
2606
- contents.nodegroupName = (0, smithy_client_1.expectString)(data.nodegroupName);
2607
- }
2538
+ const doc = (0, smithy_client_1.take)(data, {
2539
+ clusterName: smithy_client_1.expectString,
2540
+ message: smithy_client_1.expectString,
2541
+ nodegroupName: smithy_client_1.expectString,
2542
+ });
2543
+ Object.assign(contents, doc);
2608
2544
  const exception = new models_0_1.ResourceLimitExceededException({
2609
2545
  $metadata: deserializeMetadata(parsedOutput),
2610
2546
  ...contents,
@@ -2612,23 +2548,16 @@ const de_ResourceLimitExceededExceptionRes = async (parsedOutput, context) => {
2612
2548
  return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
2613
2549
  };
2614
2550
  const de_ResourceNotFoundExceptionRes = async (parsedOutput, context) => {
2615
- const contents = map({});
2551
+ const contents = (0, smithy_client_1.map)({});
2616
2552
  const data = parsedOutput.body;
2617
- if (data.addonName != null) {
2618
- contents.addonName = (0, smithy_client_1.expectString)(data.addonName);
2619
- }
2620
- if (data.clusterName != null) {
2621
- contents.clusterName = (0, smithy_client_1.expectString)(data.clusterName);
2622
- }
2623
- if (data.fargateProfileName != null) {
2624
- contents.fargateProfileName = (0, smithy_client_1.expectString)(data.fargateProfileName);
2625
- }
2626
- if (data.message != null) {
2627
- contents.message = (0, smithy_client_1.expectString)(data.message);
2628
- }
2629
- if (data.nodegroupName != null) {
2630
- contents.nodegroupName = (0, smithy_client_1.expectString)(data.nodegroupName);
2631
- }
2553
+ const doc = (0, smithy_client_1.take)(data, {
2554
+ addonName: smithy_client_1.expectString,
2555
+ clusterName: smithy_client_1.expectString,
2556
+ fargateProfileName: smithy_client_1.expectString,
2557
+ message: smithy_client_1.expectString,
2558
+ nodegroupName: smithy_client_1.expectString,
2559
+ });
2560
+ Object.assign(contents, doc);
2632
2561
  const exception = new models_0_1.ResourceNotFoundException({
2633
2562
  $metadata: deserializeMetadata(parsedOutput),
2634
2563
  ...contents,
@@ -2636,11 +2565,12 @@ const de_ResourceNotFoundExceptionRes = async (parsedOutput, context) => {
2636
2565
  return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
2637
2566
  };
2638
2567
  const de_ResourcePropagationDelayExceptionRes = async (parsedOutput, context) => {
2639
- const contents = map({});
2568
+ const contents = (0, smithy_client_1.map)({});
2640
2569
  const data = parsedOutput.body;
2641
- if (data.message != null) {
2642
- contents.message = (0, smithy_client_1.expectString)(data.message);
2643
- }
2570
+ const doc = (0, smithy_client_1.take)(data, {
2571
+ message: smithy_client_1.expectString,
2572
+ });
2573
+ Object.assign(contents, doc);
2644
2574
  const exception = new models_0_1.ResourcePropagationDelayException({
2645
2575
  $metadata: deserializeMetadata(parsedOutput),
2646
2576
  ...contents,
@@ -2648,20 +2578,15 @@ const de_ResourcePropagationDelayExceptionRes = async (parsedOutput, context) =>
2648
2578
  return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
2649
2579
  };
2650
2580
  const de_ServerExceptionRes = async (parsedOutput, context) => {
2651
- const contents = map({});
2581
+ const contents = (0, smithy_client_1.map)({});
2652
2582
  const data = parsedOutput.body;
2653
- if (data.addonName != null) {
2654
- contents.addonName = (0, smithy_client_1.expectString)(data.addonName);
2655
- }
2656
- if (data.clusterName != null) {
2657
- contents.clusterName = (0, smithy_client_1.expectString)(data.clusterName);
2658
- }
2659
- if (data.message != null) {
2660
- contents.message = (0, smithy_client_1.expectString)(data.message);
2661
- }
2662
- if (data.nodegroupName != null) {
2663
- contents.nodegroupName = (0, smithy_client_1.expectString)(data.nodegroupName);
2664
- }
2583
+ const doc = (0, smithy_client_1.take)(data, {
2584
+ addonName: smithy_client_1.expectString,
2585
+ clusterName: smithy_client_1.expectString,
2586
+ message: smithy_client_1.expectString,
2587
+ nodegroupName: smithy_client_1.expectString,
2588
+ });
2589
+ Object.assign(contents, doc);
2665
2590
  const exception = new models_0_1.ServerException({
2666
2591
  $metadata: deserializeMetadata(parsedOutput),
2667
2592
  ...contents,
@@ -2669,11 +2594,12 @@ const de_ServerExceptionRes = async (parsedOutput, context) => {
2669
2594
  return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
2670
2595
  };
2671
2596
  const de_ServiceUnavailableExceptionRes = async (parsedOutput, context) => {
2672
- const contents = map({});
2597
+ const contents = (0, smithy_client_1.map)({});
2673
2598
  const data = parsedOutput.body;
2674
- if (data.message != null) {
2675
- contents.message = (0, smithy_client_1.expectString)(data.message);
2676
- }
2599
+ const doc = (0, smithy_client_1.take)(data, {
2600
+ message: smithy_client_1.expectString,
2601
+ });
2602
+ Object.assign(contents, doc);
2677
2603
  const exception = new models_0_1.ServiceUnavailableException({
2678
2604
  $metadata: deserializeMetadata(parsedOutput),
2679
2605
  ...contents,
@@ -2681,785 +2607,121 @@ const de_ServiceUnavailableExceptionRes = async (parsedOutput, context) => {
2681
2607
  return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
2682
2608
  };
2683
2609
  const de_UnsupportedAvailabilityZoneExceptionRes = async (parsedOutput, context) => {
2684
- const contents = map({});
2610
+ const contents = (0, smithy_client_1.map)({});
2685
2611
  const data = parsedOutput.body;
2686
- if (data.clusterName != null) {
2687
- contents.clusterName = (0, smithy_client_1.expectString)(data.clusterName);
2688
- }
2689
- if (data.message != null) {
2690
- contents.message = (0, smithy_client_1.expectString)(data.message);
2691
- }
2692
- if (data.nodegroupName != null) {
2693
- contents.nodegroupName = (0, smithy_client_1.expectString)(data.nodegroupName);
2694
- }
2695
- if (data.validZones != null) {
2696
- contents.validZones = de_StringList(data.validZones, context);
2697
- }
2612
+ const doc = (0, smithy_client_1.take)(data, {
2613
+ clusterName: smithy_client_1.expectString,
2614
+ message: smithy_client_1.expectString,
2615
+ nodegroupName: smithy_client_1.expectString,
2616
+ validZones: smithy_client_1._json,
2617
+ });
2618
+ Object.assign(contents, doc);
2698
2619
  const exception = new models_0_1.UnsupportedAvailabilityZoneException({
2699
2620
  $metadata: deserializeMetadata(parsedOutput),
2700
2621
  ...contents,
2701
2622
  });
2702
2623
  return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
2703
2624
  };
2704
- const se_ConnectorConfigRequest = (input, context) => {
2705
- return {
2706
- ...(input.provider != null && { provider: input.provider }),
2707
- ...(input.roleArn != null && { roleArn: input.roleArn }),
2708
- };
2709
- };
2710
- const se_ControlPlanePlacementRequest = (input, context) => {
2711
- return {
2712
- ...(input.groupName != null && { groupName: input.groupName }),
2713
- };
2714
- };
2715
- const se_EncryptionConfig = (input, context) => {
2716
- return {
2717
- ...(input.provider != null && { provider: se_Provider(input.provider, context) }),
2718
- ...(input.resources != null && { resources: se_StringList(input.resources, context) }),
2719
- };
2720
- };
2721
- const se_EncryptionConfigList = (input, context) => {
2722
- return input
2723
- .filter((e) => e != null)
2724
- .map((entry) => {
2725
- return se_EncryptionConfig(entry, context);
2726
- });
2727
- };
2728
- const se_FargateProfileLabel = (input, context) => {
2729
- return Object.entries(input).reduce((acc, [key, value]) => {
2730
- if (value === null) {
2731
- return acc;
2732
- }
2733
- acc[key] = value;
2734
- return acc;
2735
- }, {});
2736
- };
2737
- const se_FargateProfileSelector = (input, context) => {
2738
- return {
2739
- ...(input.labels != null && { labels: se_FargateProfileLabel(input.labels, context) }),
2740
- ...(input.namespace != null && { namespace: input.namespace }),
2741
- };
2742
- };
2743
- const se_FargateProfileSelectors = (input, context) => {
2744
- return input
2745
- .filter((e) => e != null)
2746
- .map((entry) => {
2747
- return se_FargateProfileSelector(entry, context);
2748
- });
2749
- };
2750
- const se_IdentityProviderConfig = (input, context) => {
2751
- return {
2752
- ...(input.name != null && { name: input.name }),
2753
- ...(input.type != null && { type: input.type }),
2754
- };
2755
- };
2756
- const se_KubernetesNetworkConfigRequest = (input, context) => {
2757
- return {
2758
- ...(input.ipFamily != null && { ipFamily: input.ipFamily }),
2759
- ...(input.serviceIpv4Cidr != null && { serviceIpv4Cidr: input.serviceIpv4Cidr }),
2760
- };
2761
- };
2762
- const se_labelsKeyList = (input, context) => {
2763
- return input
2764
- .filter((e) => e != null)
2765
- .map((entry) => {
2766
- return entry;
2767
- });
2768
- };
2769
- const se_labelsMap = (input, context) => {
2770
- return Object.entries(input).reduce((acc, [key, value]) => {
2771
- if (value === null) {
2772
- return acc;
2773
- }
2774
- acc[key] = value;
2775
- return acc;
2776
- }, {});
2777
- };
2778
- const se_LaunchTemplateSpecification = (input, context) => {
2779
- return {
2780
- ...(input.id != null && { id: input.id }),
2781
- ...(input.name != null && { name: input.name }),
2782
- ...(input.version != null && { version: input.version }),
2783
- };
2784
- };
2785
- const se_Logging = (input, context) => {
2786
- return {
2787
- ...(input.clusterLogging != null && { clusterLogging: se_LogSetups(input.clusterLogging, context) }),
2788
- };
2789
- };
2790
- const se_LogSetup = (input, context) => {
2791
- return {
2792
- ...(input.enabled != null && { enabled: input.enabled }),
2793
- ...(input.types != null && { types: se_LogTypes(input.types, context) }),
2794
- };
2795
- };
2796
- const se_LogSetups = (input, context) => {
2797
- return input
2798
- .filter((e) => e != null)
2799
- .map((entry) => {
2800
- return se_LogSetup(entry, context);
2801
- });
2802
- };
2803
- const se_LogTypes = (input, context) => {
2804
- return input
2805
- .filter((e) => e != null)
2806
- .map((entry) => {
2807
- return entry;
2808
- });
2809
- };
2810
- const se_NodegroupScalingConfig = (input, context) => {
2811
- return {
2812
- ...(input.desiredSize != null && { desiredSize: input.desiredSize }),
2813
- ...(input.maxSize != null && { maxSize: input.maxSize }),
2814
- ...(input.minSize != null && { minSize: input.minSize }),
2815
- };
2816
- };
2817
- const se_NodegroupUpdateConfig = (input, context) => {
2818
- return {
2819
- ...(input.maxUnavailable != null && { maxUnavailable: input.maxUnavailable }),
2820
- ...(input.maxUnavailablePercentage != null && { maxUnavailablePercentage: input.maxUnavailablePercentage }),
2821
- };
2822
- };
2823
- const se_OidcIdentityProviderConfigRequest = (input, context) => {
2824
- return {
2825
- ...(input.clientId != null && { clientId: input.clientId }),
2826
- ...(input.groupsClaim != null && { groupsClaim: input.groupsClaim }),
2827
- ...(input.groupsPrefix != null && { groupsPrefix: input.groupsPrefix }),
2828
- ...(input.identityProviderConfigName != null && { identityProviderConfigName: input.identityProviderConfigName }),
2829
- ...(input.issuerUrl != null && { issuerUrl: input.issuerUrl }),
2830
- ...(input.requiredClaims != null && { requiredClaims: se_requiredClaimsMap(input.requiredClaims, context) }),
2831
- ...(input.usernameClaim != null && { usernameClaim: input.usernameClaim }),
2832
- ...(input.usernamePrefix != null && { usernamePrefix: input.usernamePrefix }),
2833
- };
2834
- };
2835
- const se_OutpostConfigRequest = (input, context) => {
2836
- return {
2837
- ...(input.controlPlaneInstanceType != null && { controlPlaneInstanceType: input.controlPlaneInstanceType }),
2838
- ...(input.controlPlanePlacement != null && {
2839
- controlPlanePlacement: se_ControlPlanePlacementRequest(input.controlPlanePlacement, context),
2840
- }),
2841
- ...(input.outpostArns != null && { outpostArns: se_StringList(input.outpostArns, context) }),
2842
- };
2843
- };
2844
- const se_Provider = (input, context) => {
2845
- return {
2846
- ...(input.keyArn != null && { keyArn: input.keyArn }),
2847
- };
2848
- };
2849
- const se_RemoteAccessConfig = (input, context) => {
2850
- return {
2851
- ...(input.ec2SshKey != null && { ec2SshKey: input.ec2SshKey }),
2852
- ...(input.sourceSecurityGroups != null && {
2853
- sourceSecurityGroups: se_StringList(input.sourceSecurityGroups, context),
2854
- }),
2855
- };
2856
- };
2857
- const se_requiredClaimsMap = (input, context) => {
2858
- return Object.entries(input).reduce((acc, [key, value]) => {
2859
- if (value === null) {
2860
- return acc;
2861
- }
2862
- acc[key] = value;
2863
- return acc;
2864
- }, {});
2865
- };
2866
- const se_StringList = (input, context) => {
2867
- return input
2868
- .filter((e) => e != null)
2869
- .map((entry) => {
2870
- return entry;
2871
- });
2872
- };
2873
- const se_TagMap = (input, context) => {
2874
- return Object.entries(input).reduce((acc, [key, value]) => {
2875
- if (value === null) {
2876
- return acc;
2877
- }
2878
- acc[key] = value;
2879
- return acc;
2880
- }, {});
2881
- };
2882
- const se_Taint = (input, context) => {
2883
- return {
2884
- ...(input.effect != null && { effect: input.effect }),
2885
- ...(input.key != null && { key: input.key }),
2886
- ...(input.value != null && { value: input.value }),
2887
- };
2888
- };
2889
- const se_taintsList = (input, context) => {
2890
- return input
2891
- .filter((e) => e != null)
2892
- .map((entry) => {
2893
- return se_Taint(entry, context);
2894
- });
2895
- };
2896
- const se_UpdateLabelsPayload = (input, context) => {
2897
- return {
2898
- ...(input.addOrUpdateLabels != null && { addOrUpdateLabels: se_labelsMap(input.addOrUpdateLabels, context) }),
2899
- ...(input.removeLabels != null && { removeLabels: se_labelsKeyList(input.removeLabels, context) }),
2900
- };
2901
- };
2902
- const se_UpdateTaintsPayload = (input, context) => {
2903
- return {
2904
- ...(input.addOrUpdateTaints != null && { addOrUpdateTaints: se_taintsList(input.addOrUpdateTaints, context) }),
2905
- ...(input.removeTaints != null && { removeTaints: se_taintsList(input.removeTaints, context) }),
2906
- };
2907
- };
2908
- const se_VpcConfigRequest = (input, context) => {
2909
- return {
2910
- ...(input.endpointPrivateAccess != null && { endpointPrivateAccess: input.endpointPrivateAccess }),
2911
- ...(input.endpointPublicAccess != null && { endpointPublicAccess: input.endpointPublicAccess }),
2912
- ...(input.publicAccessCidrs != null && { publicAccessCidrs: se_StringList(input.publicAccessCidrs, context) }),
2913
- ...(input.securityGroupIds != null && { securityGroupIds: se_StringList(input.securityGroupIds, context) }),
2914
- ...(input.subnetIds != null && { subnetIds: se_StringList(input.subnetIds, context) }),
2915
- };
2916
- };
2917
2625
  const de_Addon = (output, context) => {
2918
- return {
2919
- addonArn: (0, smithy_client_1.expectString)(output.addonArn),
2920
- addonName: (0, smithy_client_1.expectString)(output.addonName),
2921
- addonVersion: (0, smithy_client_1.expectString)(output.addonVersion),
2922
- clusterName: (0, smithy_client_1.expectString)(output.clusterName),
2923
- configurationValues: (0, smithy_client_1.expectString)(output.configurationValues),
2924
- createdAt: output.createdAt != null ? (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(output.createdAt))) : undefined,
2925
- health: output.health != null ? de_AddonHealth(output.health, context) : undefined,
2926
- marketplaceInformation: output.marketplaceInformation != null
2927
- ? de_MarketplaceInformation(output.marketplaceInformation, context)
2928
- : undefined,
2929
- modifiedAt: output.modifiedAt != null ? (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(output.modifiedAt))) : undefined,
2930
- owner: (0, smithy_client_1.expectString)(output.owner),
2931
- publisher: (0, smithy_client_1.expectString)(output.publisher),
2932
- serviceAccountRoleArn: (0, smithy_client_1.expectString)(output.serviceAccountRoleArn),
2933
- status: (0, smithy_client_1.expectString)(output.status),
2934
- tags: output.tags != null ? de_TagMap(output.tags, context) : undefined,
2935
- };
2936
- };
2937
- const de_AddonHealth = (output, context) => {
2938
- return {
2939
- issues: output.issues != null ? de_AddonIssueList(output.issues, context) : undefined,
2940
- };
2941
- };
2942
- const de_AddonInfo = (output, context) => {
2943
- return {
2944
- addonName: (0, smithy_client_1.expectString)(output.addonName),
2945
- addonVersions: output.addonVersions != null ? de_AddonVersionInfoList(output.addonVersions, context) : undefined,
2946
- marketplaceInformation: output.marketplaceInformation != null
2947
- ? de_MarketplaceInformation(output.marketplaceInformation, context)
2948
- : undefined,
2949
- owner: (0, smithy_client_1.expectString)(output.owner),
2950
- publisher: (0, smithy_client_1.expectString)(output.publisher),
2951
- type: (0, smithy_client_1.expectString)(output.type),
2952
- };
2953
- };
2954
- const de_AddonIssue = (output, context) => {
2955
- return {
2956
- code: (0, smithy_client_1.expectString)(output.code),
2957
- message: (0, smithy_client_1.expectString)(output.message),
2958
- resourceIds: output.resourceIds != null ? de_StringList(output.resourceIds, context) : undefined,
2959
- };
2960
- };
2961
- const de_AddonIssueList = (output, context) => {
2962
- const retVal = (output || [])
2963
- .filter((e) => e != null)
2964
- .map((entry) => {
2965
- if (entry === null) {
2966
- return null;
2967
- }
2968
- return de_AddonIssue(entry, context);
2969
- });
2970
- return retVal;
2971
- };
2972
- const de_Addons = (output, context) => {
2973
- const retVal = (output || [])
2974
- .filter((e) => e != null)
2975
- .map((entry) => {
2976
- if (entry === null) {
2977
- return null;
2978
- }
2979
- return de_AddonInfo(entry, context);
2980
- });
2981
- return retVal;
2982
- };
2983
- const de_AddonVersionInfo = (output, context) => {
2984
- return {
2985
- addonVersion: (0, smithy_client_1.expectString)(output.addonVersion),
2986
- architecture: output.architecture != null ? de_StringList(output.architecture, context) : undefined,
2987
- compatibilities: output.compatibilities != null ? de_Compatibilities(output.compatibilities, context) : undefined,
2988
- requiresConfiguration: (0, smithy_client_1.expectBoolean)(output.requiresConfiguration),
2989
- };
2990
- };
2991
- const de_AddonVersionInfoList = (output, context) => {
2992
- const retVal = (output || [])
2993
- .filter((e) => e != null)
2994
- .map((entry) => {
2995
- if (entry === null) {
2996
- return null;
2997
- }
2998
- return de_AddonVersionInfo(entry, context);
2999
- });
3000
- return retVal;
3001
- };
3002
- const de_AutoScalingGroup = (output, context) => {
3003
- return {
3004
- name: (0, smithy_client_1.expectString)(output.name),
3005
- };
3006
- };
3007
- const de_AutoScalingGroupList = (output, context) => {
3008
- const retVal = (output || [])
3009
- .filter((e) => e != null)
3010
- .map((entry) => {
3011
- if (entry === null) {
3012
- return null;
3013
- }
3014
- return de_AutoScalingGroup(entry, context);
2626
+ return (0, smithy_client_1.take)(output, {
2627
+ addonArn: smithy_client_1.expectString,
2628
+ addonName: smithy_client_1.expectString,
2629
+ addonVersion: smithy_client_1.expectString,
2630
+ clusterName: smithy_client_1.expectString,
2631
+ configurationValues: smithy_client_1.expectString,
2632
+ createdAt: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(_))),
2633
+ health: smithy_client_1._json,
2634
+ marketplaceInformation: smithy_client_1._json,
2635
+ modifiedAt: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(_))),
2636
+ owner: smithy_client_1.expectString,
2637
+ publisher: smithy_client_1.expectString,
2638
+ serviceAccountRoleArn: smithy_client_1.expectString,
2639
+ status: smithy_client_1.expectString,
2640
+ tags: smithy_client_1._json,
3015
2641
  });
3016
- return retVal;
3017
- };
3018
- const de_Certificate = (output, context) => {
3019
- return {
3020
- data: (0, smithy_client_1.expectString)(output.data),
3021
- };
3022
2642
  };
3023
2643
  const de_Cluster = (output, context) => {
3024
- return {
3025
- arn: (0, smithy_client_1.expectString)(output.arn),
3026
- certificateAuthority: output.certificateAuthority != null ? de_Certificate(output.certificateAuthority, context) : undefined,
3027
- clientRequestToken: (0, smithy_client_1.expectString)(output.clientRequestToken),
3028
- connectorConfig: output.connectorConfig != null ? de_ConnectorConfigResponse(output.connectorConfig, context) : undefined,
3029
- createdAt: output.createdAt != null ? (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(output.createdAt))) : undefined,
3030
- encryptionConfig: output.encryptionConfig != null ? de_EncryptionConfigList(output.encryptionConfig, context) : undefined,
3031
- endpoint: (0, smithy_client_1.expectString)(output.endpoint),
3032
- health: output.health != null ? de_ClusterHealth(output.health, context) : undefined,
3033
- id: (0, smithy_client_1.expectString)(output.id),
3034
- identity: output.identity != null ? de_Identity(output.identity, context) : undefined,
3035
- kubernetesNetworkConfig: output.kubernetesNetworkConfig != null
3036
- ? de_KubernetesNetworkConfigResponse(output.kubernetesNetworkConfig, context)
3037
- : undefined,
3038
- logging: output.logging != null ? de_Logging(output.logging, context) : undefined,
3039
- name: (0, smithy_client_1.expectString)(output.name),
3040
- outpostConfig: output.outpostConfig != null ? de_OutpostConfigResponse(output.outpostConfig, context) : undefined,
3041
- platformVersion: (0, smithy_client_1.expectString)(output.platformVersion),
3042
- resourcesVpcConfig: output.resourcesVpcConfig != null ? de_VpcConfigResponse(output.resourcesVpcConfig, context) : undefined,
3043
- roleArn: (0, smithy_client_1.expectString)(output.roleArn),
3044
- status: (0, smithy_client_1.expectString)(output.status),
3045
- tags: output.tags != null ? de_TagMap(output.tags, context) : undefined,
3046
- version: (0, smithy_client_1.expectString)(output.version),
3047
- };
3048
- };
3049
- const de_ClusterHealth = (output, context) => {
3050
- return {
3051
- issues: output.issues != null ? de_ClusterIssueList(output.issues, context) : undefined,
3052
- };
3053
- };
3054
- const de_ClusterIssue = (output, context) => {
3055
- return {
3056
- code: (0, smithy_client_1.expectString)(output.code),
3057
- message: (0, smithy_client_1.expectString)(output.message),
3058
- resourceIds: output.resourceIds != null ? de_StringList(output.resourceIds, context) : undefined,
3059
- };
3060
- };
3061
- const de_ClusterIssueList = (output, context) => {
3062
- const retVal = (output || [])
3063
- .filter((e) => e != null)
3064
- .map((entry) => {
3065
- if (entry === null) {
3066
- return null;
3067
- }
3068
- return de_ClusterIssue(entry, context);
2644
+ return (0, smithy_client_1.take)(output, {
2645
+ arn: smithy_client_1.expectString,
2646
+ certificateAuthority: smithy_client_1._json,
2647
+ clientRequestToken: smithy_client_1.expectString,
2648
+ connectorConfig: (_) => de_ConnectorConfigResponse(_, context),
2649
+ createdAt: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(_))),
2650
+ encryptionConfig: smithy_client_1._json,
2651
+ endpoint: smithy_client_1.expectString,
2652
+ health: smithy_client_1._json,
2653
+ id: smithy_client_1.expectString,
2654
+ identity: smithy_client_1._json,
2655
+ kubernetesNetworkConfig: smithy_client_1._json,
2656
+ logging: smithy_client_1._json,
2657
+ name: smithy_client_1.expectString,
2658
+ outpostConfig: smithy_client_1._json,
2659
+ platformVersion: smithy_client_1.expectString,
2660
+ resourcesVpcConfig: smithy_client_1._json,
2661
+ roleArn: smithy_client_1.expectString,
2662
+ status: smithy_client_1.expectString,
2663
+ tags: smithy_client_1._json,
2664
+ version: smithy_client_1.expectString,
3069
2665
  });
3070
- return retVal;
3071
- };
3072
- const de_Compatibilities = (output, context) => {
3073
- const retVal = (output || [])
3074
- .filter((e) => e != null)
3075
- .map((entry) => {
3076
- if (entry === null) {
3077
- return null;
3078
- }
3079
- return de_Compatibility(entry, context);
3080
- });
3081
- return retVal;
3082
- };
3083
- const de_Compatibility = (output, context) => {
3084
- return {
3085
- clusterVersion: (0, smithy_client_1.expectString)(output.clusterVersion),
3086
- defaultVersion: (0, smithy_client_1.expectBoolean)(output.defaultVersion),
3087
- platformVersions: output.platformVersions != null ? de_StringList(output.platformVersions, context) : undefined,
3088
- };
3089
2666
  };
3090
2667
  const de_ConnectorConfigResponse = (output, context) => {
3091
- return {
3092
- activationCode: (0, smithy_client_1.expectString)(output.activationCode),
3093
- activationExpiry: output.activationExpiry != null
3094
- ? (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(output.activationExpiry)))
3095
- : undefined,
3096
- activationId: (0, smithy_client_1.expectString)(output.activationId),
3097
- provider: (0, smithy_client_1.expectString)(output.provider),
3098
- roleArn: (0, smithy_client_1.expectString)(output.roleArn),
3099
- };
3100
- };
3101
- const de_ControlPlanePlacementResponse = (output, context) => {
3102
- return {
3103
- groupName: (0, smithy_client_1.expectString)(output.groupName),
3104
- };
3105
- };
3106
- const de_EncryptionConfig = (output, context) => {
3107
- return {
3108
- provider: output.provider != null ? de_Provider(output.provider, context) : undefined,
3109
- resources: output.resources != null ? de_StringList(output.resources, context) : undefined,
3110
- };
3111
- };
3112
- const de_EncryptionConfigList = (output, context) => {
3113
- const retVal = (output || [])
3114
- .filter((e) => e != null)
3115
- .map((entry) => {
3116
- if (entry === null) {
3117
- return null;
3118
- }
3119
- return de_EncryptionConfig(entry, context);
3120
- });
3121
- return retVal;
3122
- };
3123
- const de_ErrorDetail = (output, context) => {
3124
- return {
3125
- errorCode: (0, smithy_client_1.expectString)(output.errorCode),
3126
- errorMessage: (0, smithy_client_1.expectString)(output.errorMessage),
3127
- resourceIds: output.resourceIds != null ? de_StringList(output.resourceIds, context) : undefined,
3128
- };
3129
- };
3130
- const de_ErrorDetails = (output, context) => {
3131
- const retVal = (output || [])
3132
- .filter((e) => e != null)
3133
- .map((entry) => {
3134
- if (entry === null) {
3135
- return null;
3136
- }
3137
- return de_ErrorDetail(entry, context);
2668
+ return (0, smithy_client_1.take)(output, {
2669
+ activationCode: smithy_client_1.expectString,
2670
+ activationExpiry: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(_))),
2671
+ activationId: smithy_client_1.expectString,
2672
+ provider: smithy_client_1.expectString,
2673
+ roleArn: smithy_client_1.expectString,
3138
2674
  });
3139
- return retVal;
3140
2675
  };
3141
2676
  const de_FargateProfile = (output, context) => {
3142
- return {
3143
- clusterName: (0, smithy_client_1.expectString)(output.clusterName),
3144
- createdAt: output.createdAt != null ? (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(output.createdAt))) : undefined,
3145
- fargateProfileArn: (0, smithy_client_1.expectString)(output.fargateProfileArn),
3146
- fargateProfileName: (0, smithy_client_1.expectString)(output.fargateProfileName),
3147
- podExecutionRoleArn: (0, smithy_client_1.expectString)(output.podExecutionRoleArn),
3148
- selectors: output.selectors != null ? de_FargateProfileSelectors(output.selectors, context) : undefined,
3149
- status: (0, smithy_client_1.expectString)(output.status),
3150
- subnets: output.subnets != null ? de_StringList(output.subnets, context) : undefined,
3151
- tags: output.tags != null ? de_TagMap(output.tags, context) : undefined,
3152
- };
3153
- };
3154
- const de_FargateProfileLabel = (output, context) => {
3155
- return Object.entries(output).reduce((acc, [key, value]) => {
3156
- if (value === null) {
3157
- return acc;
3158
- }
3159
- acc[key] = (0, smithy_client_1.expectString)(value);
3160
- return acc;
3161
- }, {});
3162
- };
3163
- const de_FargateProfileSelector = (output, context) => {
3164
- return {
3165
- labels: output.labels != null ? de_FargateProfileLabel(output.labels, context) : undefined,
3166
- namespace: (0, smithy_client_1.expectString)(output.namespace),
3167
- };
3168
- };
3169
- const de_FargateProfileSelectors = (output, context) => {
3170
- const retVal = (output || [])
3171
- .filter((e) => e != null)
3172
- .map((entry) => {
3173
- if (entry === null) {
3174
- return null;
3175
- }
3176
- return de_FargateProfileSelector(entry, context);
3177
- });
3178
- return retVal;
3179
- };
3180
- const de_Identity = (output, context) => {
3181
- return {
3182
- oidc: output.oidc != null ? de_OIDC(output.oidc, context) : undefined,
3183
- };
3184
- };
3185
- const de_IdentityProviderConfig = (output, context) => {
3186
- return {
3187
- name: (0, smithy_client_1.expectString)(output.name),
3188
- type: (0, smithy_client_1.expectString)(output.type),
3189
- };
3190
- };
3191
- const de_IdentityProviderConfigResponse = (output, context) => {
3192
- return {
3193
- oidc: output.oidc != null ? de_OidcIdentityProviderConfig(output.oidc, context) : undefined,
3194
- };
3195
- };
3196
- const de_IdentityProviderConfigs = (output, context) => {
3197
- const retVal = (output || [])
3198
- .filter((e) => e != null)
3199
- .map((entry) => {
3200
- if (entry === null) {
3201
- return null;
3202
- }
3203
- return de_IdentityProviderConfig(entry, context);
3204
- });
3205
- return retVal;
3206
- };
3207
- const de_Issue = (output, context) => {
3208
- return {
3209
- code: (0, smithy_client_1.expectString)(output.code),
3210
- message: (0, smithy_client_1.expectString)(output.message),
3211
- resourceIds: output.resourceIds != null ? de_StringList(output.resourceIds, context) : undefined,
3212
- };
3213
- };
3214
- const de_IssueList = (output, context) => {
3215
- const retVal = (output || [])
3216
- .filter((e) => e != null)
3217
- .map((entry) => {
3218
- if (entry === null) {
3219
- return null;
3220
- }
3221
- return de_Issue(entry, context);
3222
- });
3223
- return retVal;
3224
- };
3225
- const de_KubernetesNetworkConfigResponse = (output, context) => {
3226
- return {
3227
- ipFamily: (0, smithy_client_1.expectString)(output.ipFamily),
3228
- serviceIpv4Cidr: (0, smithy_client_1.expectString)(output.serviceIpv4Cidr),
3229
- serviceIpv6Cidr: (0, smithy_client_1.expectString)(output.serviceIpv6Cidr),
3230
- };
3231
- };
3232
- const de_labelsMap = (output, context) => {
3233
- return Object.entries(output).reduce((acc, [key, value]) => {
3234
- if (value === null) {
3235
- return acc;
3236
- }
3237
- acc[key] = (0, smithy_client_1.expectString)(value);
3238
- return acc;
3239
- }, {});
3240
- };
3241
- const de_LaunchTemplateSpecification = (output, context) => {
3242
- return {
3243
- id: (0, smithy_client_1.expectString)(output.id),
3244
- name: (0, smithy_client_1.expectString)(output.name),
3245
- version: (0, smithy_client_1.expectString)(output.version),
3246
- };
3247
- };
3248
- const de_Logging = (output, context) => {
3249
- return {
3250
- clusterLogging: output.clusterLogging != null ? de_LogSetups(output.clusterLogging, context) : undefined,
3251
- };
3252
- };
3253
- const de_LogSetup = (output, context) => {
3254
- return {
3255
- enabled: (0, smithy_client_1.expectBoolean)(output.enabled),
3256
- types: output.types != null ? de_LogTypes(output.types, context) : undefined,
3257
- };
3258
- };
3259
- const de_LogSetups = (output, context) => {
3260
- const retVal = (output || [])
3261
- .filter((e) => e != null)
3262
- .map((entry) => {
3263
- if (entry === null) {
3264
- return null;
3265
- }
3266
- return de_LogSetup(entry, context);
2677
+ return (0, smithy_client_1.take)(output, {
2678
+ clusterName: smithy_client_1.expectString,
2679
+ createdAt: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(_))),
2680
+ fargateProfileArn: smithy_client_1.expectString,
2681
+ fargateProfileName: smithy_client_1.expectString,
2682
+ podExecutionRoleArn: smithy_client_1.expectString,
2683
+ selectors: smithy_client_1._json,
2684
+ status: smithy_client_1.expectString,
2685
+ subnets: smithy_client_1._json,
2686
+ tags: smithy_client_1._json,
3267
2687
  });
3268
- return retVal;
3269
- };
3270
- const de_LogTypes = (output, context) => {
3271
- const retVal = (output || [])
3272
- .filter((e) => e != null)
3273
- .map((entry) => {
3274
- if (entry === null) {
3275
- return null;
3276
- }
3277
- return (0, smithy_client_1.expectString)(entry);
3278
- });
3279
- return retVal;
3280
- };
3281
- const de_MarketplaceInformation = (output, context) => {
3282
- return {
3283
- productId: (0, smithy_client_1.expectString)(output.productId),
3284
- productUrl: (0, smithy_client_1.expectString)(output.productUrl),
3285
- };
3286
2688
  };
3287
2689
  const de_Nodegroup = (output, context) => {
3288
- return {
3289
- amiType: (0, smithy_client_1.expectString)(output.amiType),
3290
- capacityType: (0, smithy_client_1.expectString)(output.capacityType),
3291
- clusterName: (0, smithy_client_1.expectString)(output.clusterName),
3292
- createdAt: output.createdAt != null ? (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(output.createdAt))) : undefined,
3293
- diskSize: (0, smithy_client_1.expectInt32)(output.diskSize),
3294
- health: output.health != null ? de_NodegroupHealth(output.health, context) : undefined,
3295
- instanceTypes: output.instanceTypes != null ? de_StringList(output.instanceTypes, context) : undefined,
3296
- labels: output.labels != null ? de_labelsMap(output.labels, context) : undefined,
3297
- launchTemplate: output.launchTemplate != null ? de_LaunchTemplateSpecification(output.launchTemplate, context) : undefined,
3298
- modifiedAt: output.modifiedAt != null ? (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(output.modifiedAt))) : undefined,
3299
- nodeRole: (0, smithy_client_1.expectString)(output.nodeRole),
3300
- nodegroupArn: (0, smithy_client_1.expectString)(output.nodegroupArn),
3301
- nodegroupName: (0, smithy_client_1.expectString)(output.nodegroupName),
3302
- releaseVersion: (0, smithy_client_1.expectString)(output.releaseVersion),
3303
- remoteAccess: output.remoteAccess != null ? de_RemoteAccessConfig(output.remoteAccess, context) : undefined,
3304
- resources: output.resources != null ? de_NodegroupResources(output.resources, context) : undefined,
3305
- scalingConfig: output.scalingConfig != null ? de_NodegroupScalingConfig(output.scalingConfig, context) : undefined,
3306
- status: (0, smithy_client_1.expectString)(output.status),
3307
- subnets: output.subnets != null ? de_StringList(output.subnets, context) : undefined,
3308
- tags: output.tags != null ? de_TagMap(output.tags, context) : undefined,
3309
- taints: output.taints != null ? de_taintsList(output.taints, context) : undefined,
3310
- updateConfig: output.updateConfig != null ? de_NodegroupUpdateConfig(output.updateConfig, context) : undefined,
3311
- version: (0, smithy_client_1.expectString)(output.version),
3312
- };
3313
- };
3314
- const de_NodegroupHealth = (output, context) => {
3315
- return {
3316
- issues: output.issues != null ? de_IssueList(output.issues, context) : undefined,
3317
- };
3318
- };
3319
- const de_NodegroupResources = (output, context) => {
3320
- return {
3321
- autoScalingGroups: output.autoScalingGroups != null ? de_AutoScalingGroupList(output.autoScalingGroups, context) : undefined,
3322
- remoteAccessSecurityGroup: (0, smithy_client_1.expectString)(output.remoteAccessSecurityGroup),
3323
- };
3324
- };
3325
- const de_NodegroupScalingConfig = (output, context) => {
3326
- return {
3327
- desiredSize: (0, smithy_client_1.expectInt32)(output.desiredSize),
3328
- maxSize: (0, smithy_client_1.expectInt32)(output.maxSize),
3329
- minSize: (0, smithy_client_1.expectInt32)(output.minSize),
3330
- };
3331
- };
3332
- const de_NodegroupUpdateConfig = (output, context) => {
3333
- return {
3334
- maxUnavailable: (0, smithy_client_1.expectInt32)(output.maxUnavailable),
3335
- maxUnavailablePercentage: (0, smithy_client_1.expectInt32)(output.maxUnavailablePercentage),
3336
- };
3337
- };
3338
- const de_OIDC = (output, context) => {
3339
- return {
3340
- issuer: (0, smithy_client_1.expectString)(output.issuer),
3341
- };
3342
- };
3343
- const de_OidcIdentityProviderConfig = (output, context) => {
3344
- return {
3345
- clientId: (0, smithy_client_1.expectString)(output.clientId),
3346
- clusterName: (0, smithy_client_1.expectString)(output.clusterName),
3347
- groupsClaim: (0, smithy_client_1.expectString)(output.groupsClaim),
3348
- groupsPrefix: (0, smithy_client_1.expectString)(output.groupsPrefix),
3349
- identityProviderConfigArn: (0, smithy_client_1.expectString)(output.identityProviderConfigArn),
3350
- identityProviderConfigName: (0, smithy_client_1.expectString)(output.identityProviderConfigName),
3351
- issuerUrl: (0, smithy_client_1.expectString)(output.issuerUrl),
3352
- requiredClaims: output.requiredClaims != null ? de_requiredClaimsMap(output.requiredClaims, context) : undefined,
3353
- status: (0, smithy_client_1.expectString)(output.status),
3354
- tags: output.tags != null ? de_TagMap(output.tags, context) : undefined,
3355
- usernameClaim: (0, smithy_client_1.expectString)(output.usernameClaim),
3356
- usernamePrefix: (0, smithy_client_1.expectString)(output.usernamePrefix),
3357
- };
3358
- };
3359
- const de_OutpostConfigResponse = (output, context) => {
3360
- return {
3361
- controlPlaneInstanceType: (0, smithy_client_1.expectString)(output.controlPlaneInstanceType),
3362
- controlPlanePlacement: output.controlPlanePlacement != null
3363
- ? de_ControlPlanePlacementResponse(output.controlPlanePlacement, context)
3364
- : undefined,
3365
- outpostArns: output.outpostArns != null ? de_StringList(output.outpostArns, context) : undefined,
3366
- };
3367
- };
3368
- const de_Provider = (output, context) => {
3369
- return {
3370
- keyArn: (0, smithy_client_1.expectString)(output.keyArn),
3371
- };
3372
- };
3373
- const de_RemoteAccessConfig = (output, context) => {
3374
- return {
3375
- ec2SshKey: (0, smithy_client_1.expectString)(output.ec2SshKey),
3376
- sourceSecurityGroups: output.sourceSecurityGroups != null ? de_StringList(output.sourceSecurityGroups, context) : undefined,
3377
- };
3378
- };
3379
- const de_requiredClaimsMap = (output, context) => {
3380
- return Object.entries(output).reduce((acc, [key, value]) => {
3381
- if (value === null) {
3382
- return acc;
3383
- }
3384
- acc[key] = (0, smithy_client_1.expectString)(value);
3385
- return acc;
3386
- }, {});
3387
- };
3388
- const de_StringList = (output, context) => {
3389
- const retVal = (output || [])
3390
- .filter((e) => e != null)
3391
- .map((entry) => {
3392
- if (entry === null) {
3393
- return null;
3394
- }
3395
- return (0, smithy_client_1.expectString)(entry);
2690
+ return (0, smithy_client_1.take)(output, {
2691
+ amiType: smithy_client_1.expectString,
2692
+ capacityType: smithy_client_1.expectString,
2693
+ clusterName: smithy_client_1.expectString,
2694
+ createdAt: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(_))),
2695
+ diskSize: smithy_client_1.expectInt32,
2696
+ health: smithy_client_1._json,
2697
+ instanceTypes: smithy_client_1._json,
2698
+ labels: smithy_client_1._json,
2699
+ launchTemplate: smithy_client_1._json,
2700
+ modifiedAt: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(_))),
2701
+ nodeRole: smithy_client_1.expectString,
2702
+ nodegroupArn: smithy_client_1.expectString,
2703
+ nodegroupName: smithy_client_1.expectString,
2704
+ releaseVersion: smithy_client_1.expectString,
2705
+ remoteAccess: smithy_client_1._json,
2706
+ resources: smithy_client_1._json,
2707
+ scalingConfig: smithy_client_1._json,
2708
+ status: smithy_client_1.expectString,
2709
+ subnets: smithy_client_1._json,
2710
+ tags: smithy_client_1._json,
2711
+ taints: smithy_client_1._json,
2712
+ updateConfig: smithy_client_1._json,
2713
+ version: smithy_client_1.expectString,
3396
2714
  });
3397
- return retVal;
3398
- };
3399
- const de_TagMap = (output, context) => {
3400
- return Object.entries(output).reduce((acc, [key, value]) => {
3401
- if (value === null) {
3402
- return acc;
3403
- }
3404
- acc[key] = (0, smithy_client_1.expectString)(value);
3405
- return acc;
3406
- }, {});
3407
- };
3408
- const de_Taint = (output, context) => {
3409
- return {
3410
- effect: (0, smithy_client_1.expectString)(output.effect),
3411
- key: (0, smithy_client_1.expectString)(output.key),
3412
- value: (0, smithy_client_1.expectString)(output.value),
3413
- };
3414
- };
3415
- const de_taintsList = (output, context) => {
3416
- const retVal = (output || [])
3417
- .filter((e) => e != null)
3418
- .map((entry) => {
3419
- if (entry === null) {
3420
- return null;
3421
- }
3422
- return de_Taint(entry, context);
3423
- });
3424
- return retVal;
3425
2715
  };
3426
2716
  const de_Update = (output, context) => {
3427
- return {
3428
- createdAt: output.createdAt != null ? (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(output.createdAt))) : undefined,
3429
- errors: output.errors != null ? de_ErrorDetails(output.errors, context) : undefined,
3430
- id: (0, smithy_client_1.expectString)(output.id),
3431
- params: output.params != null ? de_UpdateParams(output.params, context) : undefined,
3432
- status: (0, smithy_client_1.expectString)(output.status),
3433
- type: (0, smithy_client_1.expectString)(output.type),
3434
- };
3435
- };
3436
- const de_UpdateParam = (output, context) => {
3437
- return {
3438
- type: (0, smithy_client_1.expectString)(output.type),
3439
- value: (0, smithy_client_1.expectString)(output.value),
3440
- };
3441
- };
3442
- const de_UpdateParams = (output, context) => {
3443
- const retVal = (output || [])
3444
- .filter((e) => e != null)
3445
- .map((entry) => {
3446
- if (entry === null) {
3447
- return null;
3448
- }
3449
- return de_UpdateParam(entry, context);
3450
- });
3451
- return retVal;
3452
- };
3453
- const de_VpcConfigResponse = (output, context) => {
3454
- return {
3455
- clusterSecurityGroupId: (0, smithy_client_1.expectString)(output.clusterSecurityGroupId),
3456
- endpointPrivateAccess: (0, smithy_client_1.expectBoolean)(output.endpointPrivateAccess),
3457
- endpointPublicAccess: (0, smithy_client_1.expectBoolean)(output.endpointPublicAccess),
3458
- publicAccessCidrs: output.publicAccessCidrs != null ? de_StringList(output.publicAccessCidrs, context) : undefined,
3459
- securityGroupIds: output.securityGroupIds != null ? de_StringList(output.securityGroupIds, context) : undefined,
3460
- subnetIds: output.subnetIds != null ? de_StringList(output.subnetIds, context) : undefined,
3461
- vpcId: (0, smithy_client_1.expectString)(output.vpcId),
3462
- };
2717
+ return (0, smithy_client_1.take)(output, {
2718
+ createdAt: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(_))),
2719
+ errors: smithy_client_1._json,
2720
+ id: smithy_client_1.expectString,
2721
+ params: smithy_client_1._json,
2722
+ status: smithy_client_1.expectString,
2723
+ type: smithy_client_1.expectString,
2724
+ });
3463
2725
  };
3464
2726
  const deserializeMetadata = (output) => ({
3465
2727
  httpStatusCode: output.statusCode,