@scaleway/sdk 2.0.0-alpha.11 → 2.0.0-alpha.13

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.
Files changed (204) hide show
  1. package/package.json +2 -2
  2. package/dist/api/account/index.js +0 -4
  3. package/dist/api/account/v2/api.gen.js +0 -147
  4. package/dist/api/account/v2/index.gen.js +0 -4
  5. package/dist/api/account/v2/marshalling.gen.js +0 -39
  6. package/dist/api/account/v3/api.gen.js +0 -129
  7. package/dist/api/account/v3/index.gen.js +0 -6
  8. package/dist/api/account/v3/marshalling.gen.js +0 -39
  9. package/dist/api/account/v3/validation-rules.gen.js +0 -39
  10. package/dist/api/applesilicon/index.js +0 -2
  11. package/dist/api/applesilicon/v1alpha1/api.gen.js +0 -220
  12. package/dist/api/applesilicon/v1alpha1/content.gen.js +0 -7
  13. package/dist/api/applesilicon/v1alpha1/index.gen.js +0 -5
  14. package/dist/api/applesilicon/v1alpha1/marshalling.gen.js +0 -113
  15. package/dist/api/baremetal/index.js +0 -2
  16. package/dist/api/baremetal/v1/api.gen.js +0 -523
  17. package/dist/api/baremetal/v1/api.utils.js +0 -27
  18. package/dist/api/baremetal/v1/content.gen.js +0 -13
  19. package/dist/api/baremetal/v1/index.js +0 -5
  20. package/dist/api/baremetal/v1/marshalling.gen.js +0 -395
  21. package/dist/api/baremetal/v1/validation-rules.gen.js +0 -109
  22. package/dist/api/billing/index.js +0 -2
  23. package/dist/api/billing/v2alpha1/api.gen.js +0 -80
  24. package/dist/api/billing/v2alpha1/index.gen.js +0 -4
  25. package/dist/api/billing/v2alpha1/marshalling.gen.js +0 -53
  26. package/dist/api/block/index.js +0 -2
  27. package/dist/api/block/v1alpha1/api.gen.js +0 -245
  28. package/dist/api/block/v1alpha1/content.gen.js +0 -13
  29. package/dist/api/block/v1alpha1/index.gen.js +0 -7
  30. package/dist/api/block/v1alpha1/marshalling.gen.js +0 -175
  31. package/dist/api/block/v1alpha1/validation-rules.gen.js +0 -42
  32. package/dist/api/cockpit/index.js +0 -2
  33. package/dist/api/cockpit/v1beta1/api.gen.js +0 -448
  34. package/dist/api/cockpit/v1beta1/content.gen.js +0 -7
  35. package/dist/api/cockpit/v1beta1/index.gen.js +0 -5
  36. package/dist/api/cockpit/v1beta1/marshalling.gen.js +0 -220
  37. package/dist/api/container/index.js +0 -2
  38. package/dist/api/container/v1beta1/api.gen.js +0 -549
  39. package/dist/api/container/v1beta1/content.gen.js +0 -22
  40. package/dist/api/container/v1beta1/index.gen.js +0 -5
  41. package/dist/api/container/v1beta1/marshalling.gen.js +0 -330
  42. package/dist/api/document_db/index.js +0 -2
  43. package/dist/api/document_db/v1beta1/api.gen.js +0 -830
  44. package/dist/api/document_db/v1beta1/content.gen.js +0 -19
  45. package/dist/api/document_db/v1beta1/index.gen.js +0 -7
  46. package/dist/api/document_db/v1beta1/marshalling.gen.js +0 -580
  47. package/dist/api/document_db/v1beta1/validation-rules.gen.js +0 -10
  48. package/dist/api/domain/index.js +0 -2
  49. package/dist/api/domain/v2beta1/api.gen.js +0 -875
  50. package/dist/api/domain/v2beta1/content.gen.js +0 -28
  51. package/dist/api/domain/v2beta1/index.gen.js +0 -7
  52. package/dist/api/domain/v2beta1/marshalling.gen.js +0 -958
  53. package/dist/api/flexibleip/index.js +0 -2
  54. package/dist/api/flexibleip/v1alpha1/api.gen.js +0 -203
  55. package/dist/api/flexibleip/v1alpha1/content.gen.js +0 -10
  56. package/dist/api/flexibleip/v1alpha1/index.gen.js +0 -7
  57. package/dist/api/flexibleip/v1alpha1/marshalling.gen.js +0 -97
  58. package/dist/api/flexibleip/v1alpha1/validation-rules.gen.js +0 -14
  59. package/dist/api/function/index.js +0 -2
  60. package/dist/api/function/v1beta1/api.gen.js +0 -560
  61. package/dist/api/function/v1beta1/content.gen.js +0 -22
  62. package/dist/api/function/v1beta1/index.gen.js +0 -5
  63. package/dist/api/function/v1beta1/marshalling.gen.js +0 -368
  64. package/dist/api/iam/index.js +0 -2
  65. package/dist/api/iam/v1alpha1/api.gen.js +0 -799
  66. package/dist/api/iam/v1alpha1/index.gen.js +0 -6
  67. package/dist/api/iam/v1alpha1/marshalling.gen.js +0 -373
  68. package/dist/api/iam/v1alpha1/validation-rules.gen.js +0 -207
  69. package/dist/api/instance/index.js +0 -2
  70. package/dist/api/instance/v1/api.gen.js +0 -1003
  71. package/dist/api/instance/v1/api.utils.js +0 -369
  72. package/dist/api/instance/v1/content.gen.js +0 -31
  73. package/dist/api/instance/v1/index.js +0 -2
  74. package/dist/api/instance/v1/marshalling.gen.js +0 -1206
  75. package/dist/api/instance/v1/marshalling.utils.js +0 -63
  76. package/dist/api/iot/index.js +0 -2
  77. package/dist/api/iot/v1/api.gen.js +0 -581
  78. package/dist/api/iot/v1/content.gen.js +0 -7
  79. package/dist/api/iot/v1/index.gen.js +0 -5
  80. package/dist/api/iot/v1/marshalling.gen.js +0 -388
  81. package/dist/api/ipfs/index.js +0 -2
  82. package/dist/api/ipfs/v1alpha1/api.gen.js +0 -197
  83. package/dist/api/ipfs/v1alpha1/content.gen.js +0 -7
  84. package/dist/api/ipfs/v1alpha1/index.gen.js +0 -5
  85. package/dist/api/ipfs/v1alpha1/marshalling.gen.js +0 -121
  86. package/dist/api/k8s/index.js +0 -2
  87. package/dist/api/k8s/v1/api.gen.js +0 -454
  88. package/dist/api/k8s/v1/api.utils.js +0 -13
  89. package/dist/api/k8s/v1/content.gen.js +0 -13
  90. package/dist/api/k8s/v1/index.js +0 -4
  91. package/dist/api/k8s/v1/marshalling.gen.js +0 -333
  92. package/dist/api/k8s/v1/validation-rules.gen.js +0 -101
  93. package/dist/api/lb/index.js +0 -2
  94. package/dist/api/lb/v1/api.gen.js +0 -1669
  95. package/dist/api/lb/v1/api.utils.js +0 -81
  96. package/dist/api/lb/v1/content.gen.js +0 -16
  97. package/dist/api/lb/v1/index.js +0 -2
  98. package/dist/api/lb/v1/marshalling.gen.js +0 -923
  99. package/dist/api/marketplace/index.js +0 -4
  100. package/dist/api/marketplace/v1/api.gen.js +0 -60
  101. package/dist/api/marketplace/v1/index.gen.js +0 -4
  102. package/dist/api/marketplace/v1/marshalling.gen.js +0 -92
  103. package/dist/api/marketplace/v2/api.gen.js +0 -162
  104. package/dist/api/marketplace/v2/index.gen.js +0 -4
  105. package/dist/api/marketplace/v2/marshalling.gen.js +0 -94
  106. package/dist/api/mnq/index.js +0 -2
  107. package/dist/api/mnq/v1alpha1/api.gen.js +0 -205
  108. package/dist/api/mnq/v1alpha1/index.gen.js +0 -4
  109. package/dist/api/mnq/v1alpha1/marshalling.gen.js +0 -121
  110. package/dist/api/rdb/index.js +0 -2
  111. package/dist/api/rdb/v1/api.gen.js +0 -972
  112. package/dist/api/rdb/v1/content.gen.js +0 -22
  113. package/dist/api/rdb/v1/index.gen.js +0 -7
  114. package/dist/api/rdb/v1/marshalling.gen.js +0 -636
  115. package/dist/api/rdb/v1/validation-rules.gen.js +0 -10
  116. package/dist/api/redis/index.js +0 -2
  117. package/dist/api/redis/v1/api.gen.js +0 -389
  118. package/dist/api/redis/v1/content.gen.js +0 -7
  119. package/dist/api/redis/v1/index.gen.js +0 -5
  120. package/dist/api/redis/v1/marshalling.gen.js +0 -259
  121. package/dist/api/registry/index.js +0 -2
  122. package/dist/api/registry/v1/api.gen.js +0 -252
  123. package/dist/api/registry/v1/content.gen.js +0 -13
  124. package/dist/api/registry/v1/index.gen.js +0 -5
  125. package/dist/api/registry/v1/marshalling.gen.js +0 -106
  126. package/dist/api/secret/index.js +0 -2
  127. package/dist/api/secret/v1alpha1/api.gen.js +0 -415
  128. package/dist/api/secret/v1alpha1/index.gen.js +0 -4
  129. package/dist/api/secret/v1alpha1/marshalling.gen.js +0 -143
  130. package/dist/api/tem/index.js +0 -2
  131. package/dist/api/tem/v1alpha1/api.gen.js +0 -229
  132. package/dist/api/tem/v1alpha1/content.gen.js +0 -10
  133. package/dist/api/tem/v1alpha1/index.gen.js +0 -5
  134. package/dist/api/tem/v1alpha1/marshalling.gen.js +0 -159
  135. package/dist/api/test/index.js +0 -2
  136. package/dist/api/test/v1/api.gen.js +0 -152
  137. package/dist/api/test/v1/content.gen.js +0 -7
  138. package/dist/api/test/v1/index.gen.js +0 -5
  139. package/dist/api/test/v1/marshalling.gen.js +0 -79
  140. package/dist/api/vpc/index.js +0 -4
  141. package/dist/api/vpc/v1/api.gen.js +0 -110
  142. package/dist/api/vpc/v1/index.gen.js +0 -4
  143. package/dist/api/vpc/v1/marshalling.gen.js +0 -44
  144. package/dist/api/vpc/v2/api.gen.js +0 -276
  145. package/dist/api/vpc/v2/index.gen.js +0 -4
  146. package/dist/api/vpc/v2/marshalling.gen.js +0 -135
  147. package/dist/api/vpcgw/index.js +0 -2
  148. package/dist/api/vpcgw/v1/api.gen.js +0 -669
  149. package/dist/api/vpcgw/v1/content.gen.js +0 -10
  150. package/dist/api/vpcgw/v1/index.gen.js +0 -5
  151. package/dist/api/vpcgw/v1/marshalling.gen.js +0 -336
  152. package/dist/api/webhosting/index.js +0 -2
  153. package/dist/api/webhosting/v1alpha1/api.gen.js +0 -210
  154. package/dist/api/webhosting/v1alpha1/content.gen.js +0 -7
  155. package/dist/api/webhosting/v1alpha1/index.gen.js +0 -7
  156. package/dist/api/webhosting/v1alpha1/marshalling.gen.js +0 -173
  157. package/dist/api/webhosting/v1alpha1/validation-rules.gen.js +0 -23
  158. package/dist/helpers/is-browser.js +0 -5
  159. package/dist/helpers/is-response.js +0 -10
  160. package/dist/helpers/json.js +0 -11
  161. package/dist/helpers/marshalling.js +0 -130
  162. package/dist/index.cjs +0 -24364
  163. package/dist/index.d.ts +0 -27584
  164. package/dist/index.js +0 -69
  165. package/dist/internal/async/interval-retrier.js +0 -105
  166. package/dist/internal/async/sleep.js +0 -13
  167. package/dist/internal/interceptors/composer.js +0 -46
  168. package/dist/internal/interceptors/helpers.js +0 -32
  169. package/dist/internal/logger/console-logger.js +0 -38
  170. package/dist/internal/logger/index.js +0 -41
  171. package/dist/internal/logger/level-resolver.js +0 -13
  172. package/dist/internal/validations/string-validation.js +0 -38
  173. package/dist/node_modules/.pnpm/@scaleway_random-name@4.0.2/node_modules/@scaleway/random-name/dist/index.js +0 -13
  174. package/dist/scw/api.js +0 -12
  175. package/dist/scw/auth.js +0 -68
  176. package/dist/scw/client-ini-factory.js +0 -174
  177. package/dist/scw/client-ini-profile.js +0 -54
  178. package/dist/scw/client-settings.js +0 -78
  179. package/dist/scw/client.js +0 -98
  180. package/dist/scw/constants.js +0 -4
  181. package/dist/scw/custom-marshalling.js +0 -131
  182. package/dist/scw/errors/error-parser.js +0 -107
  183. package/dist/scw/errors/non-standard/invalid-request-mapper.js +0 -36
  184. package/dist/scw/errors/non-standard/unknown-resource-mapper.js +0 -27
  185. package/dist/scw/errors/scw-error.js +0 -66
  186. package/dist/scw/errors/standard/already-exists-error.js +0 -26
  187. package/dist/scw/errors/standard/denied-authentication-error.js +0 -52
  188. package/dist/scw/errors/standard/index.js +0 -13
  189. package/dist/scw/errors/standard/invalid-arguments-error.js +0 -67
  190. package/dist/scw/errors/standard/out-of-stock-error.js +0 -22
  191. package/dist/scw/errors/standard/permissions-denied-error.js +0 -48
  192. package/dist/scw/errors/standard/precondition-failed-error.js +0 -42
  193. package/dist/scw/errors/standard/quotas-exceeded-error.js +0 -68
  194. package/dist/scw/errors/standard/resource-expired-error.js +0 -26
  195. package/dist/scw/errors/standard/resource-locked-error.js +0 -25
  196. package/dist/scw/errors/standard/resource-not-found-error.js +0 -25
  197. package/dist/scw/errors/standard/too-many-requests-error.js +0 -70
  198. package/dist/scw/errors/standard/transient-state-error.js +0 -26
  199. package/dist/scw/errors/types.js +0 -23
  200. package/dist/scw/fetch/build-fetcher.js +0 -72
  201. package/dist/scw/fetch/http-dumper.js +0 -54
  202. package/dist/scw/fetch/http-interceptors.js +0 -99
  203. package/dist/scw/fetch/resource-paginator.js +0 -84
  204. package/dist/scw/fetch/response-parser.js +0 -72
@@ -1,333 +0,0 @@
1
- import randomName from '../../../node_modules/.pnpm/@scaleway_random-name@4.0.2/node_modules/@scaleway/random-name/dist/index.js';
2
- import { isJSONObject } from '../../../helpers/json.js';
3
- import { unmarshalDate, unmarshalArrayOfObject, resolveOneOf } from '../../../helpers/marshalling.js';
4
-
5
- // This file was automatically generated. DO NOT EDIT.
6
- // If you have any remark or suggestion do not hesitate to open an issue.
7
- const unmarshalPoolUpgradePolicy = data => {
8
- if (!isJSONObject(data)) {
9
- throw new TypeError(`Unmarshalling the type 'PoolUpgradePolicy' failed as data isn't a dictionary.`);
10
- }
11
- return {
12
- maxSurge: data.max_surge,
13
- maxUnavailable: data.max_unavailable
14
- };
15
- };
16
- const unmarshalPool = data => {
17
- if (!isJSONObject(data)) {
18
- throw new TypeError(`Unmarshalling the type 'Pool' failed as data isn't a dictionary.`);
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 ? data.placement_group_id : undefined,
33
- region: data.region,
34
- rootVolumeSize: data.root_volume_size ? data.root_volume_size : undefined,
35
- rootVolumeType: data.root_volume_type,
36
- size: data.size,
37
- status: data.status,
38
- tags: data.tags,
39
- updatedAt: unmarshalDate(data.updated_at),
40
- upgradePolicy: unmarshalPoolUpgradePolicy(data.upgrade_policy),
41
- version: data.version,
42
- zone: data.zone
43
- };
44
- };
45
- const unmarshalVersion = data => {
46
- if (!isJSONObject(data)) {
47
- throw new TypeError(`Unmarshalling the type 'Version' failed as data isn't a dictionary.`);
48
- }
49
- return {
50
- availableAdmissionPlugins: data.available_admission_plugins,
51
- availableCnis: data.available_cnis,
52
- availableContainerRuntimes: data.available_container_runtimes,
53
- availableFeatureGates: data.available_feature_gates,
54
- availableIngresses: data.available_ingresses ? data.available_ingresses : undefined,
55
- availableKubeletArgs: data.available_kubelet_args,
56
- label: data.label,
57
- name: data.name,
58
- region: data.region
59
- };
60
- };
61
- const unmarshalClusterOpenIDConnectConfig = data => {
62
- if (!isJSONObject(data)) {
63
- throw new TypeError(`Unmarshalling the type 'ClusterOpenIDConnectConfig' failed as data isn't a dictionary.`);
64
- }
65
- return {
66
- clientId: data.client_id,
67
- groupsClaim: data.groups_claim,
68
- groupsPrefix: data.groups_prefix,
69
- issuerUrl: data.issuer_url,
70
- requiredClaim: data.required_claim,
71
- usernameClaim: data.username_claim,
72
- usernamePrefix: data.username_prefix
73
- };
74
- };
75
- const unmarshalMaintenanceWindow = data => {
76
- if (!isJSONObject(data)) {
77
- throw new TypeError(`Unmarshalling the type 'MaintenanceWindow' failed as data isn't a dictionary.`);
78
- }
79
- return {
80
- day: data.day,
81
- startHour: data.start_hour
82
- };
83
- };
84
- const unmarshalClusterAutoUpgrade = data => {
85
- if (!isJSONObject(data)) {
86
- throw new TypeError(`Unmarshalling the type 'ClusterAutoUpgrade' failed as data isn't a dictionary.`);
87
- }
88
- return {
89
- enabled: data.enabled,
90
- maintenanceWindow: unmarshalMaintenanceWindow(data.maintenance_window)
91
- };
92
- };
93
- const unmarshalClusterAutoscalerConfig = data => {
94
- if (!isJSONObject(data)) {
95
- throw new TypeError(`Unmarshalling the type 'ClusterAutoscalerConfig' failed as data isn't a dictionary.`);
96
- }
97
- return {
98
- balanceSimilarNodeGroups: data.balance_similar_node_groups,
99
- estimator: data.estimator,
100
- expander: data.expander,
101
- expendablePodsPriorityCutoff: data.expendable_pods_priority_cutoff,
102
- ignoreDaemonsetsUtilization: data.ignore_daemonsets_utilization,
103
- maxGracefulTerminationSec: data.max_graceful_termination_sec,
104
- scaleDownDelayAfterAdd: data.scale_down_delay_after_add,
105
- scaleDownDisabled: data.scale_down_disabled,
106
- scaleDownUnneededTime: data.scale_down_unneeded_time,
107
- scaleDownUtilizationThreshold: data.scale_down_utilization_threshold
108
- };
109
- };
110
- const unmarshalCluster = data => {
111
- if (!isJSONObject(data)) {
112
- throw new TypeError(`Unmarshalling the type 'Cluster' failed as data isn't a dictionary.`);
113
- }
114
- return {
115
- admissionPlugins: data.admission_plugins,
116
- apiserverCertSans: data.apiserver_cert_sans,
117
- autoUpgrade: unmarshalClusterAutoUpgrade(data.auto_upgrade),
118
- autoscalerConfig: unmarshalClusterAutoscalerConfig(data.autoscaler_config),
119
- clusterUrl: data.cluster_url,
120
- cni: data.cni,
121
- commitmentEndsAt: unmarshalDate(data.commitment_ends_at),
122
- createdAt: unmarshalDate(data.created_at),
123
- dashboardEnabled: data.dashboard_enabled ? data.dashboard_enabled : undefined,
124
- description: data.description,
125
- dnsWildcard: data.dns_wildcard,
126
- featureGates: data.feature_gates,
127
- id: data.id,
128
- ingress: data.ingress ? data.ingress : undefined,
129
- name: data.name,
130
- openIdConnectConfig: unmarshalClusterOpenIDConnectConfig(data.open_id_connect_config),
131
- organizationId: data.organization_id,
132
- privateNetworkId: data.private_network_id ? data.private_network_id : undefined,
133
- projectId: data.project_id,
134
- region: data.region,
135
- status: data.status,
136
- tags: data.tags,
137
- type: data.type,
138
- updatedAt: unmarshalDate(data.updated_at),
139
- upgradeAvailable: data.upgrade_available,
140
- version: data.version
141
- };
142
- };
143
- const unmarshalNode = data => {
144
- if (!isJSONObject(data)) {
145
- throw new TypeError(`Unmarshalling the type 'Node' failed as data isn't a dictionary.`);
146
- }
147
- return {
148
- clusterId: data.cluster_id,
149
- conditions: data.conditions ? data.conditions : undefined,
150
- createdAt: unmarshalDate(data.created_at),
151
- errorMessage: data.error_message ? data.error_message : undefined,
152
- id: data.id,
153
- name: data.name,
154
- poolId: data.pool_id,
155
- providerId: data.provider_id,
156
- publicIpV4: data.public_ip_v4 ? data.public_ip_v4 : undefined,
157
- publicIpV6: data.public_ip_v6 ? data.public_ip_v6 : undefined,
158
- region: data.region,
159
- status: data.status,
160
- updatedAt: unmarshalDate(data.updated_at)
161
- };
162
- };
163
- const unmarshalExternalNode = data => {
164
- if (!isJSONObject(data)) {
165
- throw new TypeError(`Unmarshalling the type 'ExternalNode' failed as data isn't a dictionary.`);
166
- }
167
- return {
168
- clusterCa: data.cluster_ca,
169
- clusterUrl: data.cluster_url,
170
- externalIp: data.external_ip,
171
- id: data.id,
172
- kubeToken: data.kube_token,
173
- kubeletConfig: data.kubelet_config,
174
- name: data.name,
175
- poolVersion: data.pool_version
176
- };
177
- };
178
- const unmarshalClusterType = data => {
179
- if (!isJSONObject(data)) {
180
- throw new TypeError(`Unmarshalling the type 'ClusterType' failed as data isn't a dictionary.`);
181
- }
182
- return {
183
- availability: data.availability,
184
- commitmentDelay: data.commitment_delay ? data.commitment_delay : undefined,
185
- dedicated: data.dedicated,
186
- maxNodes: data.max_nodes,
187
- memory: data.memory,
188
- name: data.name,
189
- resiliency: data.resiliency,
190
- sla: data.sla
191
- };
192
- };
193
- const unmarshalListClusterAvailableTypesResponse = data => {
194
- if (!isJSONObject(data)) {
195
- throw new TypeError(`Unmarshalling the type 'ListClusterAvailableTypesResponse' failed as data isn't a dictionary.`);
196
- }
197
- return {
198
- clusterTypes: unmarshalArrayOfObject(data.cluster_types, unmarshalClusterType),
199
- totalCount: data.total_count
200
- };
201
- };
202
- const unmarshalListClusterAvailableVersionsResponse = data => {
203
- if (!isJSONObject(data)) {
204
- throw new TypeError(`Unmarshalling the type 'ListClusterAvailableVersionsResponse' failed as data isn't a dictionary.`);
205
- }
206
- return {
207
- versions: unmarshalArrayOfObject(data.versions, unmarshalVersion)
208
- };
209
- };
210
- const unmarshalListClusterTypesResponse = data => {
211
- if (!isJSONObject(data)) {
212
- throw new TypeError(`Unmarshalling the type 'ListClusterTypesResponse' failed as data isn't a dictionary.`);
213
- }
214
- return {
215
- clusterTypes: unmarshalArrayOfObject(data.cluster_types, unmarshalClusterType),
216
- totalCount: data.total_count
217
- };
218
- };
219
- const unmarshalListClustersResponse = data => {
220
- if (!isJSONObject(data)) {
221
- throw new TypeError(`Unmarshalling the type 'ListClustersResponse' failed as data isn't a dictionary.`);
222
- }
223
- return {
224
- clusters: unmarshalArrayOfObject(data.clusters, unmarshalCluster),
225
- totalCount: data.total_count
226
- };
227
- };
228
- const unmarshalListNodesResponse = data => {
229
- if (!isJSONObject(data)) {
230
- throw new TypeError(`Unmarshalling the type 'ListNodesResponse' failed as data isn't a dictionary.`);
231
- }
232
- return {
233
- nodes: unmarshalArrayOfObject(data.nodes, unmarshalNode),
234
- totalCount: data.total_count
235
- };
236
- };
237
- const unmarshalListPoolsResponse = data => {
238
- if (!isJSONObject(data)) {
239
- throw new TypeError(`Unmarshalling the type 'ListPoolsResponse' failed as data isn't a dictionary.`);
240
- }
241
- return {
242
- pools: unmarshalArrayOfObject(data.pools, unmarshalPool),
243
- totalCount: data.total_count
244
- };
245
- };
246
- const unmarshalListVersionsResponse = data => {
247
- if (!isJSONObject(data)) {
248
- throw new TypeError(`Unmarshalling the type 'ListVersionsResponse' failed as data isn't a dictionary.`);
249
- }
250
- return {
251
- versions: unmarshalArrayOfObject(data.versions, unmarshalVersion)
252
- };
253
- };
254
- const marshalCreateClusterRequest = (request, defaults) => ({
255
- admission_plugins: request.admissionPlugins,
256
- apiserver_cert_sans: request.apiserverCertSans,
257
- auto_upgrade: request.autoUpgrade,
258
- autoscaler_config: request.autoscalerConfig,
259
- cni: request.cni,
260
- description: request.description,
261
- enable_dashboard: request.enableDashboard,
262
- feature_gates: request.featureGates,
263
- ingress: request.ingress,
264
- name: request.name || randomName('k8s'),
265
- open_id_connect_config: request.openIdConnectConfig,
266
- pools: request.pools,
267
- private_network_id: request.privateNetworkId,
268
- tags: request.tags,
269
- type: request.type,
270
- version: request.version,
271
- ...resolveOneOf([{
272
- param: 'organization_id',
273
- value: request.organizationId
274
- }, {
275
- param: 'project_id',
276
- value: request.projectId
277
- }])
278
- });
279
- const marshalCreatePoolRequest = (request, defaults) => ({
280
- autohealing: request.autohealing,
281
- autoscaling: request.autoscaling,
282
- container_runtime: request.containerRuntime,
283
- kubelet_args: request.kubeletArgs,
284
- max_size: request.maxSize,
285
- min_size: request.minSize,
286
- name: request.name || randomName('pool'),
287
- node_type: request.nodeType,
288
- placement_group_id: request.placementGroupId,
289
- root_volume_size: request.rootVolumeSize,
290
- root_volume_type: request.rootVolumeType,
291
- size: request.size,
292
- tags: request.tags,
293
- upgrade_policy: request.upgradePolicy,
294
- zone: request.zone ?? defaults.defaultZone
295
- });
296
- const marshalMigrateToPrivateNetworkClusterRequest = (request, defaults) => ({
297
- private_network_id: request.privateNetworkId
298
- });
299
- const marshalSetClusterTypeRequest = (request, defaults) => ({
300
- type: request.type
301
- });
302
- const marshalUpdateClusterRequest = (request, defaults) => ({
303
- admission_plugins: request.admissionPlugins,
304
- apiserver_cert_sans: request.apiserverCertSans,
305
- auto_upgrade: request.autoUpgrade,
306
- autoscaler_config: request.autoscalerConfig,
307
- description: request.description,
308
- enable_dashboard: request.enableDashboard,
309
- feature_gates: request.featureGates,
310
- ingress: request.ingress,
311
- name: request.name,
312
- open_id_connect_config: request.openIdConnectConfig,
313
- tags: request.tags
314
- });
315
- const marshalUpdatePoolRequest = (request, defaults) => ({
316
- autohealing: request.autohealing,
317
- autoscaling: request.autoscaling,
318
- kubelet_args: request.kubeletArgs,
319
- max_size: request.maxSize,
320
- min_size: request.minSize,
321
- size: request.size,
322
- tags: request.tags,
323
- upgrade_policy: request.upgradePolicy
324
- });
325
- const marshalUpgradeClusterRequest = (request, defaults) => ({
326
- upgrade_pools: request.upgradePools,
327
- version: request.version
328
- });
329
- const marshalUpgradePoolRequest = (request, defaults) => ({
330
- version: request.version
331
- });
332
-
333
- export { marshalCreateClusterRequest, marshalCreatePoolRequest, marshalMigrateToPrivateNetworkClusterRequest, marshalSetClusterTypeRequest, marshalUpdateClusterRequest, marshalUpdatePoolRequest, marshalUpgradeClusterRequest, marshalUpgradePoolRequest, unmarshalCluster, unmarshalExternalNode, unmarshalListClusterAvailableTypesResponse, unmarshalListClusterAvailableVersionsResponse, unmarshalListClusterTypesResponse, unmarshalListClustersResponse, unmarshalListNodesResponse, unmarshalListPoolsResponse, unmarshalListVersionsResponse, unmarshalNode, unmarshalPool, unmarshalVersion };
@@ -1,101 +0,0 @@
1
- // This file was automatically generated. DO NOT EDIT.
2
- // If you have any remark or suggestion do not hesitate to open an issue.
3
-
4
- const CreateClusterRequest = {
5
- name: {
6
- minLength: 1
7
- }
8
- };
9
- const CreateClusterRequestAutoscalerConfig = {
10
- scaleDownUtilizationThreshold: {
11
- greaterThan: 0,
12
- lessThan: 1
13
- }
14
- };
15
- const CreateClusterRequestOpenIDConnectConfig = {
16
- clientId: {
17
- minLength: 1
18
- },
19
- groupsPrefix: {
20
- minLength: 1
21
- },
22
- usernameClaim: {
23
- minLength: 1
24
- },
25
- usernamePrefix: {
26
- minLength: 1
27
- }
28
- };
29
- const CreateClusterRequestPoolConfig = {
30
- name: {
31
- minLength: 1
32
- }
33
- };
34
- const CreatePoolRequest = {
35
- name: {
36
- minLength: 1
37
- }
38
- };
39
- const ListClusterTypesRequest = {
40
- page: {
41
- greaterThan: 0
42
- },
43
- pageSize: {
44
- greaterThan: 0,
45
- lessThanOrEqual: 100
46
- }
47
- };
48
- const ListClustersRequest = {
49
- name: {
50
- minLength: 1
51
- },
52
- page: {
53
- greaterThan: 0
54
- },
55
- pageSize: {
56
- greaterThan: 0,
57
- lessThanOrEqual: 100
58
- }
59
- };
60
- const ListNodesRequest = {
61
- name: {
62
- minLength: 1
63
- },
64
- page: {
65
- greaterThan: 0
66
- },
67
- pageSize: {
68
- greaterThan: 0,
69
- lessThanOrEqual: 100
70
- }
71
- };
72
- const ListPoolsRequest = {
73
- name: {
74
- minLength: 1
75
- },
76
- page: {
77
- greaterThan: 0
78
- },
79
- pageSize: {
80
- greaterThan: 0,
81
- lessThanOrEqual: 100
82
- }
83
- };
84
- const MaintenanceWindow = {
85
- startHour: {
86
- lessThanOrEqual: 23
87
- }
88
- };
89
- const UpdateClusterRequest = {
90
- name: {
91
- minLength: 1
92
- }
93
- };
94
- const UpdateClusterRequestAutoscalerConfig = {
95
- scaleDownUtilizationThreshold: {
96
- greaterThan: 0,
97
- lessThan: 1
98
- }
99
- };
100
-
101
- export { CreateClusterRequest, CreateClusterRequestAutoscalerConfig, CreateClusterRequestOpenIDConnectConfig, CreateClusterRequestPoolConfig, CreatePoolRequest, ListClusterTypesRequest, ListClustersRequest, ListNodesRequest, ListPoolsRequest, MaintenanceWindow, UpdateClusterRequest, UpdateClusterRequestAutoscalerConfig };
@@ -1,2 +0,0 @@
1
- import * as index from './v1/index.js';
2
- export { index as v1 };