@scaleway/sdk-k8s 2.5.0 → 2.6.0

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