@scaleway/sdk-k8s 1.2.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.
@@ -0,0 +1,619 @@
1
+ import randomName from "@scaleway/random-name";
2
+ import { resolveOneOf, isJSONObject, unmarshalArrayOfObject, unmarshalDate } from "@scaleway/sdk-client";
3
+ const unmarshalPoolUpgradePolicy = (data) => {
4
+ if (!isJSONObject(data)) {
5
+ throw new TypeError(
6
+ `Unmarshalling the type 'PoolUpgradePolicy' failed as data isn't a dictionary.`
7
+ );
8
+ }
9
+ return {
10
+ maxSurge: data.max_surge,
11
+ maxUnavailable: data.max_unavailable
12
+ };
13
+ };
14
+ const unmarshalPool = (data) => {
15
+ if (!isJSONObject(data)) {
16
+ throw new TypeError(
17
+ `Unmarshalling the type 'Pool' failed as data isn't a dictionary.`
18
+ );
19
+ }
20
+ return {
21
+ autohealing: data.autohealing,
22
+ autoscaling: data.autoscaling,
23
+ clusterId: data.cluster_id,
24
+ containerRuntime: data.container_runtime,
25
+ createdAt: unmarshalDate(data.created_at),
26
+ id: data.id,
27
+ kubeletArgs: data.kubelet_args,
28
+ maxSize: data.max_size,
29
+ minSize: data.min_size,
30
+ name: data.name,
31
+ nodeType: data.node_type,
32
+ placementGroupId: data.placement_group_id,
33
+ publicIpDisabled: data.public_ip_disabled,
34
+ region: data.region,
35
+ rootVolumeSize: data.root_volume_size,
36
+ rootVolumeType: data.root_volume_type,
37
+ size: data.size,
38
+ status: data.status,
39
+ tags: data.tags,
40
+ updatedAt: unmarshalDate(data.updated_at),
41
+ upgradePolicy: data.upgrade_policy ? unmarshalPoolUpgradePolicy(data.upgrade_policy) : void 0,
42
+ version: data.version,
43
+ zone: data.zone
44
+ };
45
+ };
46
+ const unmarshalVersion = (data) => {
47
+ if (!isJSONObject(data)) {
48
+ throw new TypeError(
49
+ `Unmarshalling the type 'Version' failed as data isn't a dictionary.`
50
+ );
51
+ }
52
+ return {
53
+ availableAdmissionPlugins: data.available_admission_plugins,
54
+ availableCnis: data.available_cnis,
55
+ availableContainerRuntimes: data.available_container_runtimes,
56
+ availableFeatureGates: data.available_feature_gates,
57
+ availableKubeletArgs: data.available_kubelet_args,
58
+ label: data.label,
59
+ name: data.name,
60
+ region: data.region
61
+ };
62
+ };
63
+ const unmarshalMaintenanceWindow = (data) => {
64
+ if (!isJSONObject(data)) {
65
+ throw new TypeError(
66
+ `Unmarshalling the type 'MaintenanceWindow' failed as data isn't a dictionary.`
67
+ );
68
+ }
69
+ return {
70
+ day: data.day,
71
+ startHour: data.start_hour
72
+ };
73
+ };
74
+ const unmarshalClusterAutoUpgrade = (data) => {
75
+ if (!isJSONObject(data)) {
76
+ throw new TypeError(
77
+ `Unmarshalling the type 'ClusterAutoUpgrade' failed as data isn't a dictionary.`
78
+ );
79
+ }
80
+ return {
81
+ enabled: data.enabled,
82
+ maintenanceWindow: data.maintenance_window ? unmarshalMaintenanceWindow(data.maintenance_window) : void 0
83
+ };
84
+ };
85
+ const unmarshalClusterAutoscalerConfig = (data) => {
86
+ if (!isJSONObject(data)) {
87
+ throw new TypeError(
88
+ `Unmarshalling the type 'ClusterAutoscalerConfig' failed as data isn't a dictionary.`
89
+ );
90
+ }
91
+ return {
92
+ balanceSimilarNodeGroups: data.balance_similar_node_groups,
93
+ estimator: data.estimator,
94
+ expander: data.expander,
95
+ expendablePodsPriorityCutoff: data.expendable_pods_priority_cutoff,
96
+ ignoreDaemonsetsUtilization: data.ignore_daemonsets_utilization,
97
+ maxGracefulTerminationSec: data.max_graceful_termination_sec,
98
+ scaleDownDelayAfterAdd: data.scale_down_delay_after_add,
99
+ scaleDownDisabled: data.scale_down_disabled,
100
+ scaleDownUnneededTime: data.scale_down_unneeded_time,
101
+ scaleDownUtilizationThreshold: data.scale_down_utilization_threshold
102
+ };
103
+ };
104
+ const unmarshalClusterOpenIDConnectConfig = (data) => {
105
+ if (!isJSONObject(data)) {
106
+ throw new TypeError(
107
+ `Unmarshalling the type 'ClusterOpenIDConnectConfig' failed as data isn't a dictionary.`
108
+ );
109
+ }
110
+ return {
111
+ clientId: data.client_id,
112
+ groupsClaim: data.groups_claim,
113
+ groupsPrefix: data.groups_prefix,
114
+ issuerUrl: data.issuer_url,
115
+ requiredClaim: data.required_claim,
116
+ usernameClaim: data.username_claim,
117
+ usernamePrefix: data.username_prefix
118
+ };
119
+ };
120
+ const unmarshalCluster = (data) => {
121
+ if (!isJSONObject(data)) {
122
+ throw new TypeError(
123
+ `Unmarshalling the type 'Cluster' failed as data isn't a dictionary.`
124
+ );
125
+ }
126
+ return {
127
+ aclAvailable: data.acl_available,
128
+ admissionPlugins: data.admission_plugins,
129
+ apiserverCertSans: data.apiserver_cert_sans,
130
+ autoUpgrade: data.auto_upgrade ? unmarshalClusterAutoUpgrade(data.auto_upgrade) : void 0,
131
+ autoscalerConfig: data.autoscaler_config ? unmarshalClusterAutoscalerConfig(data.autoscaler_config) : void 0,
132
+ clusterUrl: data.cluster_url,
133
+ cni: data.cni,
134
+ commitmentEndsAt: unmarshalDate(data.commitment_ends_at),
135
+ createdAt: unmarshalDate(data.created_at),
136
+ description: data.description,
137
+ dnsWildcard: data.dns_wildcard,
138
+ featureGates: data.feature_gates,
139
+ iamNodesGroupId: data.iam_nodes_group_id,
140
+ id: data.id,
141
+ name: data.name,
142
+ openIdConnectConfig: data.open_id_connect_config ? unmarshalClusterOpenIDConnectConfig(data.open_id_connect_config) : void 0,
143
+ organizationId: data.organization_id,
144
+ privateNetworkId: data.private_network_id,
145
+ projectId: data.project_id,
146
+ region: data.region,
147
+ status: data.status,
148
+ tags: data.tags,
149
+ type: data.type,
150
+ updatedAt: unmarshalDate(data.updated_at),
151
+ upgradeAvailable: data.upgrade_available,
152
+ version: data.version
153
+ };
154
+ };
155
+ const unmarshalNode = (data) => {
156
+ if (!isJSONObject(data)) {
157
+ throw new TypeError(
158
+ `Unmarshalling the type 'Node' failed as data isn't a dictionary.`
159
+ );
160
+ }
161
+ return {
162
+ clusterId: data.cluster_id,
163
+ conditions: data.conditions ? data.conditions : void 0,
164
+ createdAt: unmarshalDate(data.created_at),
165
+ errorMessage: data.error_message,
166
+ id: data.id,
167
+ name: data.name,
168
+ poolId: data.pool_id,
169
+ providerId: data.provider_id,
170
+ publicIpV4: data.public_ip_v4,
171
+ publicIpV6: data.public_ip_v6,
172
+ region: data.region,
173
+ status: data.status,
174
+ updatedAt: unmarshalDate(data.updated_at)
175
+ };
176
+ };
177
+ const unmarshalACLRule = (data) => {
178
+ if (!isJSONObject(data)) {
179
+ throw new TypeError(
180
+ `Unmarshalling the type 'ACLRule' failed as data isn't a dictionary.`
181
+ );
182
+ }
183
+ return {
184
+ description: data.description,
185
+ id: data.id,
186
+ ip: data.ip,
187
+ scalewayRanges: data.scaleway_ranges
188
+ };
189
+ };
190
+ const unmarshalAddClusterACLRulesResponse = (data) => {
191
+ if (!isJSONObject(data)) {
192
+ throw new TypeError(
193
+ `Unmarshalling the type 'AddClusterACLRulesResponse' failed as data isn't a dictionary.`
194
+ );
195
+ }
196
+ return {
197
+ rules: unmarshalArrayOfObject(data.rules, unmarshalACLRule)
198
+ };
199
+ };
200
+ const unmarshalExternalNodeCoreV1Taint = (data) => {
201
+ if (!isJSONObject(data)) {
202
+ throw new TypeError(
203
+ `Unmarshalling the type 'ExternalNodeCoreV1Taint' failed as data isn't a dictionary.`
204
+ );
205
+ }
206
+ return {
207
+ effect: data.effect,
208
+ key: data.key,
209
+ value: data.value
210
+ };
211
+ };
212
+ const unmarshalExternalNode = (data) => {
213
+ if (!isJSONObject(data)) {
214
+ throw new TypeError(
215
+ `Unmarshalling the type 'ExternalNode' failed as data isn't a dictionary.`
216
+ );
217
+ }
218
+ return {
219
+ clusterCa: data.cluster_ca,
220
+ clusterUrl: data.cluster_url,
221
+ cniPluginsVersion: data.cni_plugins_version,
222
+ containerdVersion: data.containerd_version,
223
+ externalIp: data.external_ip,
224
+ iamToken: data.iam_token,
225
+ id: data.id,
226
+ kubeToken: data.kube_token,
227
+ kubeletConfig: data.kubelet_config,
228
+ name: data.name,
229
+ nodeLabels: data.node_labels,
230
+ nodeTaints: unmarshalArrayOfObject(
231
+ data.node_taints,
232
+ unmarshalExternalNodeCoreV1Taint
233
+ ),
234
+ poolVersion: data.pool_version,
235
+ runcVersion: data.runc_version
236
+ };
237
+ };
238
+ const unmarshalExternalNodeAuth = (data) => {
239
+ if (!isJSONObject(data)) {
240
+ throw new TypeError(
241
+ `Unmarshalling the type 'ExternalNodeAuth' failed as data isn't a dictionary.`
242
+ );
243
+ }
244
+ return {
245
+ metadataUrl: data.metadata_url,
246
+ nodeSecretKey: data.node_secret_key
247
+ };
248
+ };
249
+ const unmarshalListClusterACLRulesResponse = (data) => {
250
+ if (!isJSONObject(data)) {
251
+ throw new TypeError(
252
+ `Unmarshalling the type 'ListClusterACLRulesResponse' failed as data isn't a dictionary.`
253
+ );
254
+ }
255
+ return {
256
+ rules: unmarshalArrayOfObject(data.rules, unmarshalACLRule),
257
+ totalCount: data.total_count
258
+ };
259
+ };
260
+ const unmarshalClusterType = (data) => {
261
+ if (!isJSONObject(data)) {
262
+ throw new TypeError(
263
+ `Unmarshalling the type 'ClusterType' failed as data isn't a dictionary.`
264
+ );
265
+ }
266
+ return {
267
+ auditLogsSupported: data.audit_logs_supported,
268
+ availability: data.availability,
269
+ commitmentDelay: data.commitment_delay,
270
+ dedicated: data.dedicated,
271
+ maxEtcdSize: data.max_etcd_size,
272
+ maxNodes: data.max_nodes,
273
+ memory: data.memory,
274
+ name: data.name,
275
+ resiliency: data.resiliency,
276
+ sla: data.sla
277
+ };
278
+ };
279
+ const unmarshalListClusterAvailableTypesResponse = (data) => {
280
+ if (!isJSONObject(data)) {
281
+ throw new TypeError(
282
+ `Unmarshalling the type 'ListClusterAvailableTypesResponse' failed as data isn't a dictionary.`
283
+ );
284
+ }
285
+ return {
286
+ clusterTypes: unmarshalArrayOfObject(
287
+ data.cluster_types,
288
+ unmarshalClusterType
289
+ ),
290
+ totalCount: data.total_count
291
+ };
292
+ };
293
+ const unmarshalListClusterAvailableVersionsResponse = (data) => {
294
+ if (!isJSONObject(data)) {
295
+ throw new TypeError(
296
+ `Unmarshalling the type 'ListClusterAvailableVersionsResponse' failed as data isn't a dictionary.`
297
+ );
298
+ }
299
+ return {
300
+ versions: unmarshalArrayOfObject(data.versions, unmarshalVersion)
301
+ };
302
+ };
303
+ const unmarshalListClusterTypesResponse = (data) => {
304
+ if (!isJSONObject(data)) {
305
+ throw new TypeError(
306
+ `Unmarshalling the type 'ListClusterTypesResponse' failed as data isn't a dictionary.`
307
+ );
308
+ }
309
+ return {
310
+ clusterTypes: unmarshalArrayOfObject(
311
+ data.cluster_types,
312
+ unmarshalClusterType
313
+ ),
314
+ totalCount: data.total_count
315
+ };
316
+ };
317
+ const unmarshalListClustersResponse = (data) => {
318
+ if (!isJSONObject(data)) {
319
+ throw new TypeError(
320
+ `Unmarshalling the type 'ListClustersResponse' failed as data isn't a dictionary.`
321
+ );
322
+ }
323
+ return {
324
+ clusters: unmarshalArrayOfObject(data.clusters, unmarshalCluster),
325
+ totalCount: data.total_count
326
+ };
327
+ };
328
+ const unmarshalListNodesResponse = (data) => {
329
+ if (!isJSONObject(data)) {
330
+ throw new TypeError(
331
+ `Unmarshalling the type 'ListNodesResponse' failed as data isn't a dictionary.`
332
+ );
333
+ }
334
+ return {
335
+ nodes: unmarshalArrayOfObject(data.nodes, unmarshalNode),
336
+ totalCount: data.total_count
337
+ };
338
+ };
339
+ const unmarshalListPoolsResponse = (data) => {
340
+ if (!isJSONObject(data)) {
341
+ throw new TypeError(
342
+ `Unmarshalling the type 'ListPoolsResponse' failed as data isn't a dictionary.`
343
+ );
344
+ }
345
+ return {
346
+ pools: unmarshalArrayOfObject(data.pools, unmarshalPool),
347
+ totalCount: data.total_count
348
+ };
349
+ };
350
+ const unmarshalListVersionsResponse = (data) => {
351
+ if (!isJSONObject(data)) {
352
+ throw new TypeError(
353
+ `Unmarshalling the type 'ListVersionsResponse' failed as data isn't a dictionary.`
354
+ );
355
+ }
356
+ return {
357
+ versions: unmarshalArrayOfObject(data.versions, unmarshalVersion)
358
+ };
359
+ };
360
+ const unmarshalNodeMetadataCoreV1Taint = (data) => {
361
+ if (!isJSONObject(data)) {
362
+ throw new TypeError(
363
+ `Unmarshalling the type 'NodeMetadataCoreV1Taint' failed as data isn't a dictionary.`
364
+ );
365
+ }
366
+ return {
367
+ effect: data.effect,
368
+ key: data.key,
369
+ value: data.value
370
+ };
371
+ };
372
+ const unmarshalNodeMetadata = (data) => {
373
+ if (!isJSONObject(data)) {
374
+ throw new TypeError(
375
+ `Unmarshalling the type 'NodeMetadata' failed as data isn't a dictionary.`
376
+ );
377
+ }
378
+ return {
379
+ clusterCa: data.cluster_ca,
380
+ clusterUrl: data.cluster_url,
381
+ credentialProviderConfig: data.credential_provider_config,
382
+ externalIp: data.external_ip,
383
+ hasGpu: data.has_gpu,
384
+ id: data.id,
385
+ kubeletConfig: data.kubelet_config,
386
+ name: data.name,
387
+ nodeLabels: data.node_labels,
388
+ nodeTaints: unmarshalArrayOfObject(
389
+ data.node_taints,
390
+ unmarshalNodeMetadataCoreV1Taint
391
+ ),
392
+ poolVersion: data.pool_version,
393
+ repoUri: data.repo_uri
394
+ };
395
+ };
396
+ const unmarshalSetClusterACLRulesResponse = (data) => {
397
+ if (!isJSONObject(data)) {
398
+ throw new TypeError(
399
+ `Unmarshalling the type 'SetClusterACLRulesResponse' failed as data isn't a dictionary.`
400
+ );
401
+ }
402
+ return {
403
+ rules: unmarshalArrayOfObject(data.rules, unmarshalACLRule)
404
+ };
405
+ };
406
+ const marshalACLRuleRequest = (request, defaults) => ({
407
+ description: request.description,
408
+ ...resolveOneOf([
409
+ { param: "ip", value: request.ip },
410
+ { param: "scaleway_ranges", value: request.scalewayRanges }
411
+ ])
412
+ });
413
+ const marshalAddClusterACLRulesRequest = (request, defaults) => ({
414
+ acls: request.acls !== void 0 ? request.acls.map((elt) => marshalACLRuleRequest(elt)) : void 0
415
+ });
416
+ const marshalMaintenanceWindow = (request, defaults) => ({
417
+ day: request.day,
418
+ start_hour: request.startHour
419
+ });
420
+ const marshalCreateClusterRequestPoolConfigUpgradePolicy = (request, defaults) => ({
421
+ max_surge: request.maxSurge,
422
+ max_unavailable: request.maxUnavailable
423
+ });
424
+ const marshalCreateClusterRequestAutoUpgrade = (request, defaults) => ({
425
+ enable: request.enable,
426
+ maintenance_window: request.maintenanceWindow !== void 0 ? marshalMaintenanceWindow(request.maintenanceWindow) : void 0
427
+ });
428
+ const marshalCreateClusterRequestAutoscalerConfig = (request, defaults) => ({
429
+ balance_similar_node_groups: request.balanceSimilarNodeGroups,
430
+ estimator: request.estimator,
431
+ expander: request.expander,
432
+ expendable_pods_priority_cutoff: request.expendablePodsPriorityCutoff,
433
+ ignore_daemonsets_utilization: request.ignoreDaemonsetsUtilization,
434
+ max_graceful_termination_sec: request.maxGracefulTerminationSec,
435
+ scale_down_delay_after_add: request.scaleDownDelayAfterAdd,
436
+ scale_down_disabled: request.scaleDownDisabled,
437
+ scale_down_unneeded_time: request.scaleDownUnneededTime,
438
+ scale_down_utilization_threshold: request.scaleDownUtilizationThreshold
439
+ });
440
+ const marshalCreateClusterRequestOpenIDConnectConfig = (request, defaults) => ({
441
+ client_id: request.clientId,
442
+ groups_claim: request.groupsClaim,
443
+ groups_prefix: request.groupsPrefix,
444
+ issuer_url: request.issuerUrl,
445
+ required_claim: request.requiredClaim,
446
+ username_claim: request.usernameClaim,
447
+ username_prefix: request.usernamePrefix
448
+ });
449
+ const marshalCreateClusterRequestPoolConfig = (request, defaults) => ({
450
+ autohealing: request.autohealing,
451
+ autoscaling: request.autoscaling,
452
+ container_runtime: request.containerRuntime,
453
+ kubelet_args: request.kubeletArgs,
454
+ max_size: request.maxSize,
455
+ min_size: request.minSize,
456
+ name: request.name,
457
+ node_type: request.nodeType,
458
+ placement_group_id: request.placementGroupId,
459
+ public_ip_disabled: request.publicIpDisabled,
460
+ root_volume_size: request.rootVolumeSize,
461
+ root_volume_type: request.rootVolumeType,
462
+ size: request.size,
463
+ tags: request.tags,
464
+ upgrade_policy: request.upgradePolicy !== void 0 ? marshalCreateClusterRequestPoolConfigUpgradePolicy(
465
+ request.upgradePolicy
466
+ ) : void 0,
467
+ zone: request.zone
468
+ });
469
+ const marshalCreateClusterRequest = (request, defaults) => ({
470
+ admission_plugins: request.admissionPlugins,
471
+ apiserver_cert_sans: request.apiserverCertSans,
472
+ auto_upgrade: request.autoUpgrade !== void 0 ? marshalCreateClusterRequestAutoUpgrade(request.autoUpgrade) : void 0,
473
+ autoscaler_config: request.autoscalerConfig !== void 0 ? marshalCreateClusterRequestAutoscalerConfig(
474
+ request.autoscalerConfig
475
+ ) : void 0,
476
+ cni: request.cni,
477
+ description: request.description,
478
+ feature_gates: request.featureGates,
479
+ name: request.name || randomName("k8s"),
480
+ open_id_connect_config: request.openIdConnectConfig !== void 0 ? marshalCreateClusterRequestOpenIDConnectConfig(
481
+ request.openIdConnectConfig
482
+ ) : void 0,
483
+ pools: request.pools !== void 0 ? request.pools.map(
484
+ (elt) => marshalCreateClusterRequestPoolConfig(elt)
485
+ ) : void 0,
486
+ private_network_id: request.privateNetworkId,
487
+ tags: request.tags,
488
+ type: request.type,
489
+ version: request.version,
490
+ ...resolveOneOf([
491
+ {
492
+ default: defaults.defaultProjectId,
493
+ param: "project_id",
494
+ value: request.projectId
495
+ },
496
+ {
497
+ default: defaults.defaultOrganizationId,
498
+ param: "organization_id",
499
+ value: request.organizationId
500
+ }
501
+ ])
502
+ });
503
+ const marshalCreatePoolRequestUpgradePolicy = (request, defaults) => ({
504
+ max_surge: request.maxSurge,
505
+ max_unavailable: request.maxUnavailable
506
+ });
507
+ const marshalCreatePoolRequest = (request, defaults) => ({
508
+ autohealing: request.autohealing,
509
+ autoscaling: request.autoscaling,
510
+ container_runtime: request.containerRuntime,
511
+ kubelet_args: request.kubeletArgs !== void 0 ? request.kubeletArgs : void 0,
512
+ max_size: request.maxSize,
513
+ min_size: request.minSize,
514
+ name: request.name || randomName("pool"),
515
+ node_type: request.nodeType,
516
+ placement_group_id: request.placementGroupId,
517
+ public_ip_disabled: request.publicIpDisabled,
518
+ root_volume_size: request.rootVolumeSize,
519
+ root_volume_type: request.rootVolumeType,
520
+ size: request.size,
521
+ tags: request.tags,
522
+ upgrade_policy: request.upgradePolicy !== void 0 ? marshalCreatePoolRequestUpgradePolicy(request.upgradePolicy) : void 0,
523
+ zone: request.zone ?? defaults.defaultZone
524
+ });
525
+ const marshalSetClusterACLRulesRequest = (request, defaults) => ({
526
+ acls: request.acls !== void 0 ? request.acls.map((elt) => marshalACLRuleRequest(elt)) : void 0
527
+ });
528
+ const marshalSetClusterTypeRequest = (request, defaults) => ({
529
+ type: request.type
530
+ });
531
+ const marshalUpdateClusterRequestAutoUpgrade = (request, defaults) => ({
532
+ enable: request.enable,
533
+ maintenance_window: request.maintenanceWindow !== void 0 ? marshalMaintenanceWindow(request.maintenanceWindow) : void 0
534
+ });
535
+ const marshalUpdateClusterRequestAutoscalerConfig = (request, defaults) => ({
536
+ balance_similar_node_groups: request.balanceSimilarNodeGroups,
537
+ estimator: request.estimator,
538
+ expander: request.expander,
539
+ expendable_pods_priority_cutoff: request.expendablePodsPriorityCutoff,
540
+ ignore_daemonsets_utilization: request.ignoreDaemonsetsUtilization,
541
+ max_graceful_termination_sec: request.maxGracefulTerminationSec,
542
+ scale_down_delay_after_add: request.scaleDownDelayAfterAdd,
543
+ scale_down_disabled: request.scaleDownDisabled,
544
+ scale_down_unneeded_time: request.scaleDownUnneededTime,
545
+ scale_down_utilization_threshold: request.scaleDownUtilizationThreshold
546
+ });
547
+ const marshalUpdateClusterRequestOpenIDConnectConfig = (request, defaults) => ({
548
+ client_id: request.clientId,
549
+ groups_claim: request.groupsClaim,
550
+ groups_prefix: request.groupsPrefix,
551
+ issuer_url: request.issuerUrl,
552
+ required_claim: request.requiredClaim,
553
+ username_claim: request.usernameClaim,
554
+ username_prefix: request.usernamePrefix
555
+ });
556
+ const marshalUpdateClusterRequest = (request, defaults) => ({
557
+ admission_plugins: request.admissionPlugins,
558
+ apiserver_cert_sans: request.apiserverCertSans,
559
+ auto_upgrade: request.autoUpgrade !== void 0 ? marshalUpdateClusterRequestAutoUpgrade(request.autoUpgrade) : void 0,
560
+ autoscaler_config: request.autoscalerConfig !== void 0 ? marshalUpdateClusterRequestAutoscalerConfig(
561
+ request.autoscalerConfig
562
+ ) : void 0,
563
+ description: request.description,
564
+ feature_gates: request.featureGates,
565
+ name: request.name,
566
+ open_id_connect_config: request.openIdConnectConfig !== void 0 ? marshalUpdateClusterRequestOpenIDConnectConfig(
567
+ request.openIdConnectConfig
568
+ ) : void 0,
569
+ tags: request.tags
570
+ });
571
+ const marshalUpdatePoolRequestUpgradePolicy = (request, defaults) => ({
572
+ max_surge: request.maxSurge,
573
+ max_unavailable: request.maxUnavailable
574
+ });
575
+ const marshalUpdatePoolRequest = (request, defaults) => ({
576
+ autohealing: request.autohealing,
577
+ autoscaling: request.autoscaling,
578
+ kubelet_args: request.kubeletArgs,
579
+ max_size: request.maxSize,
580
+ min_size: request.minSize,
581
+ size: request.size,
582
+ tags: request.tags,
583
+ upgrade_policy: request.upgradePolicy !== void 0 ? marshalUpdatePoolRequestUpgradePolicy(request.upgradePolicy) : void 0
584
+ });
585
+ const marshalUpgradeClusterRequest = (request, defaults) => ({
586
+ upgrade_pools: request.upgradePools,
587
+ version: request.version
588
+ });
589
+ const marshalUpgradePoolRequest = (request, defaults) => ({
590
+ version: request.version
591
+ });
592
+ export {
593
+ marshalAddClusterACLRulesRequest,
594
+ marshalCreateClusterRequest,
595
+ marshalCreatePoolRequest,
596
+ marshalSetClusterACLRulesRequest,
597
+ marshalSetClusterTypeRequest,
598
+ marshalUpdateClusterRequest,
599
+ marshalUpdatePoolRequest,
600
+ marshalUpgradeClusterRequest,
601
+ marshalUpgradePoolRequest,
602
+ unmarshalAddClusterACLRulesResponse,
603
+ unmarshalCluster,
604
+ unmarshalExternalNode,
605
+ unmarshalExternalNodeAuth,
606
+ unmarshalListClusterACLRulesResponse,
607
+ unmarshalListClusterAvailableTypesResponse,
608
+ unmarshalListClusterAvailableVersionsResponse,
609
+ unmarshalListClusterTypesResponse,
610
+ unmarshalListClustersResponse,
611
+ unmarshalListNodesResponse,
612
+ unmarshalListPoolsResponse,
613
+ unmarshalListVersionsResponse,
614
+ unmarshalNode,
615
+ unmarshalNodeMetadata,
616
+ unmarshalPool,
617
+ unmarshalSetClusterACLRulesResponse,
618
+ unmarshalVersion
619
+ };