@scaleway/sdk 0.1.0-beta.8 → 1.0.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.
Files changed (173) hide show
  1. package/README.md +1 -1
  2. package/dist/api/account/index.js +2 -2
  3. package/dist/api/account/v2/api.gen.js +5 -18
  4. package/dist/api/account/v2/index.gen.js +3 -0
  5. package/dist/api/account/v2/marshalling.gen.js +0 -2
  6. package/dist/api/account/v2alpha1/api.gen.js +3 -13
  7. package/dist/api/account/v2alpha1/marshalling.gen.js +0 -5
  8. package/dist/api/applesilicon/index.js +2 -2
  9. package/dist/api/applesilicon/v1alpha1/api.gen.js +7 -27
  10. package/dist/api/applesilicon/v1alpha1/index.gen.js +4 -0
  11. package/dist/api/applesilicon/v1alpha1/marshalling.gen.js +1 -14
  12. package/dist/api/baremetal/v1/api.gen.js +47 -49
  13. package/dist/api/baremetal/v1/api.utils.js +2 -10
  14. package/dist/api/baremetal/v1/content.gen.js +6 -3
  15. package/dist/api/baremetal/v1/index.js +4 -1
  16. package/dist/api/baremetal/v1/marshalling.gen.js +44 -45
  17. package/dist/api/baremetal/v1/validation-rules.gen.js +109 -0
  18. package/dist/api/container/index.js +2 -2
  19. package/dist/api/container/v1beta1/api.gen.js +5 -51
  20. package/dist/api/container/v1beta1/content.gen.js +4 -4
  21. package/dist/api/container/v1beta1/{index.js → index.gen.js} +3 -1
  22. package/dist/api/container/v1beta1/marshalling.gen.js +12 -26
  23. package/dist/api/domain/index.js +2 -2
  24. package/dist/api/domain/v2beta1/api.gen.js +55 -85
  25. package/dist/api/domain/v2beta1/content.gen.js +22 -1
  26. package/dist/api/domain/v2beta1/index.gen.js +4 -0
  27. package/dist/api/domain/v2beta1/marshalling.gen.js +47 -165
  28. package/dist/api/flexibleip/index.js +2 -2
  29. package/dist/api/flexibleip/v1alpha1/api.gen.js +5 -22
  30. package/dist/api/flexibleip/v1alpha1/content.gen.js +1 -1
  31. package/dist/api/flexibleip/v1alpha1/index.gen.js +6 -0
  32. package/dist/api/flexibleip/v1alpha1/marshalling.gen.js +0 -7
  33. package/dist/api/flexibleip/v1alpha1/validation-rules.gen.js +14 -0
  34. package/dist/api/function/index.js +2 -2
  35. package/dist/api/function/v1beta1/api.gen.js +54 -57
  36. package/dist/api/function/v1beta1/content.gen.js +8 -5
  37. package/dist/api/function/v1beta1/index.gen.js +4 -0
  38. package/dist/api/function/v1beta1/marshalling.gen.js +125 -33
  39. package/dist/api/iam/index.js +2 -2
  40. package/dist/api/iam/v1alpha1/api.gen.js +15 -62
  41. package/dist/api/iam/v1alpha1/index.gen.js +5 -0
  42. package/dist/api/iam/v1alpha1/marshalling.gen.js +7 -29
  43. package/dist/api/iam/v1alpha1/validation-rules.gen.js +184 -0
  44. package/dist/api/instance/v1/api.gen.js +38 -118
  45. package/dist/api/instance/v1/api.utils.js +59 -51
  46. package/dist/api/instance/v1/content.gen.js +7 -7
  47. package/dist/api/instance/v1/marshalling.gen.js +46 -168
  48. package/dist/api/instance/v1/marshalling.utils.js +63 -0
  49. package/dist/api/iot/index.js +2 -2
  50. package/dist/api/iot/v1/api.gen.js +5 -56
  51. package/dist/api/iot/v1/index.gen.js +4 -0
  52. package/dist/api/iot/v1/marshalling.gen.js +2 -51
  53. package/dist/api/k8s/index.js +2 -2
  54. package/dist/api/k8s/v1/api.gen.js +17 -43
  55. package/dist/api/k8s/v1/content.gen.js +2 -2
  56. package/dist/api/k8s/v1/index.gen.js +6 -0
  57. package/dist/api/k8s/v1/marshalling.gen.js +18 -36
  58. package/dist/api/k8s/v1/validation-rules.gen.js +92 -0
  59. package/dist/api/lb/v1/api.gen.js +8 -163
  60. package/dist/api/lb/v1/api.utils.js +3 -9
  61. package/dist/api/lb/v1/content.gen.js +3 -3
  62. package/dist/api/lb/v1/marshalling.gen.js +74 -101
  63. package/dist/api/marketplace/index.js +4 -2
  64. package/dist/api/marketplace/v1/api.gen.js +3 -13
  65. package/dist/api/marketplace/v1/index.gen.js +3 -0
  66. package/dist/api/marketplace/v1/marshalling.gen.js +0 -13
  67. package/dist/api/marketplace/v2/api.gen.js +85 -0
  68. package/dist/api/marketplace/v2/index.gen.js +3 -0
  69. package/dist/api/marketplace/v2/marshalling.gen.js +92 -0
  70. package/dist/api/mnq/index.js +2 -2
  71. package/dist/api/mnq/v1alpha1/api.gen.js +7 -25
  72. package/dist/api/mnq/v1alpha1/index.gen.js +3 -0
  73. package/dist/api/mnq/v1alpha1/marshalling.gen.js +7 -46
  74. package/dist/api/rdb/index.js +2 -2
  75. package/dist/api/rdb/v1/api.gen.js +15 -89
  76. package/dist/api/rdb/v1/content.gen.js +10 -4
  77. package/dist/api/rdb/v1/index.gen.js +4 -0
  78. package/dist/api/rdb/v1/marshalling.gen.js +25 -81
  79. package/dist/api/redis/index.js +2 -2
  80. package/dist/api/redis/{v1alpha1 → v1}/api.gen.js +45 -77
  81. package/dist/api/redis/{v1alpha1 → v1}/content.gen.js +1 -1
  82. package/dist/api/redis/v1/index.gen.js +4 -0
  83. package/dist/api/redis/{v1alpha1 → v1}/marshalling.gen.js +42 -59
  84. package/dist/api/registry/index.js +2 -2
  85. package/dist/api/registry/v1/api.gen.js +5 -29
  86. package/dist/api/registry/v1/content.gen.js +2 -2
  87. package/dist/api/registry/v1/{index.js → index.gen.js} +3 -1
  88. package/dist/api/registry/v1/marshalling.gen.js +2 -8
  89. package/dist/api/secret/index.js +2 -0
  90. package/dist/api/secret/v1alpha1/api.gen.js +135 -0
  91. package/dist/api/secret/v1alpha1/index.gen.js +3 -0
  92. package/dist/api/secret/v1alpha1/marshalling.gen.js +82 -0
  93. package/dist/api/tem/index.js +2 -0
  94. package/dist/api/tem/v1alpha1/api.gen.js +109 -0
  95. package/dist/api/tem/v1alpha1/content.gen.js +10 -0
  96. package/dist/api/tem/v1alpha1/index.gen.js +4 -0
  97. package/dist/api/tem/v1alpha1/marshalling.gen.js +132 -0
  98. package/dist/api/test/index.js +2 -2
  99. package/dist/api/test/v1/api.gen.js +6 -20
  100. package/dist/api/test/v1/index.gen.js +4 -0
  101. package/dist/api/test/v1/marshalling.gen.js +2 -5
  102. package/dist/api/vpc/index.js +2 -2
  103. package/dist/api/vpc/v1/api.gen.js +6 -17
  104. package/dist/api/vpc/v1/index.gen.js +3 -0
  105. package/dist/api/vpc/v1/marshalling.gen.js +1 -3
  106. package/dist/api/vpcgw/index.js +2 -2
  107. package/dist/api/vpcgw/v1/api.gen.js +5 -64
  108. package/dist/api/vpcgw/v1/content.gen.js +2 -2
  109. package/dist/api/vpcgw/v1/{index.js → index.gen.js} +3 -1
  110. package/dist/api/vpcgw/v1/marshalling.gen.js +3 -24
  111. package/dist/helpers/json.js +1 -2
  112. package/dist/helpers/marshalling.js +7 -20
  113. package/dist/index.cjs +3870 -2948
  114. package/dist/index.d.ts +7218 -4335
  115. package/dist/index.js +10 -6
  116. package/dist/internal/async/interval-retrier.js +10 -16
  117. package/dist/internal/interceptors/interceptor.js +3 -1
  118. package/dist/internal/interceptors/request.js +1 -3
  119. package/dist/internal/logger/console-logger.js +3 -5
  120. package/dist/internal/logger/index.js +3 -5
  121. package/dist/internal/logger/level-resolver.js +0 -3
  122. package/dist/internal/validations/string-validation.js +8 -10
  123. package/dist/node_modules/.pnpm/@scaleway_random-name@4.0.1/node_modules/@scaleway/random-name/dist/index.js +13 -0
  124. package/dist/scw/api.js +3 -4
  125. package/dist/scw/auth.js +3 -5
  126. package/dist/scw/client-ini-factory.js +32 -15
  127. package/dist/scw/client-ini-profile.js +10 -4
  128. package/dist/scw/client-settings.js +32 -15
  129. package/dist/scw/client.js +5 -6
  130. package/dist/scw/constants.js +1 -1
  131. package/dist/scw/custom-marshalling.js +8 -14
  132. package/dist/scw/errors/error-parser.js +2 -21
  133. package/dist/scw/errors/non-standard/invalid-request-mapper.js +17 -15
  134. package/dist/scw/errors/non-standard/unknown-resource-mapper.js +7 -6
  135. package/dist/scw/errors/scw-error.js +20 -20
  136. package/dist/scw/errors/standard/already-exists-error.js +3 -4
  137. package/dist/scw/errors/standard/denied-authentication-error.js +4 -11
  138. package/dist/scw/errors/standard/invalid-arguments-error.js +1 -10
  139. package/dist/scw/errors/standard/out-of-stock-error.js +0 -3
  140. package/dist/scw/errors/standard/permissions-denied-error.js +1 -4
  141. package/dist/scw/errors/standard/precondition-failed-error.js +4 -8
  142. package/dist/scw/errors/standard/quotas-exceeded-error.js +14 -14
  143. package/dist/scw/errors/standard/resource-expired-error.js +3 -4
  144. package/dist/scw/errors/standard/resource-locked-error.js +3 -4
  145. package/dist/scw/errors/standard/resource-not-found-error.js +3 -4
  146. package/dist/scw/errors/standard/too-many-requests-error.js +3 -16
  147. package/dist/scw/errors/standard/transient-state-error.js +3 -4
  148. package/dist/scw/errors/types.js +0 -3
  149. package/dist/scw/fetch/build-fetcher.js +1 -9
  150. package/dist/scw/fetch/http-dumper.js +4 -7
  151. package/dist/scw/fetch/http-interceptors.js +9 -12
  152. package/dist/scw/fetch/resource-paginator.js +18 -16
  153. package/dist/scw/fetch/response-parser.js +17 -23
  154. package/node_modules/@scaleway/random-name/CHANGELOG.md +42 -63
  155. package/node_modules/@scaleway/random-name/dist/index.js +5 -246
  156. package/node_modules/@scaleway/random-name/package.json +6 -5
  157. package/package.json +4 -5
  158. package/dist/api/account/v2/index.js +0 -1
  159. package/dist/api/applesilicon/v1alpha1/index.js +0 -2
  160. package/dist/api/domain/v2beta1/index.js +0 -2
  161. package/dist/api/flexibleip/v1alpha1/index.js +0 -2
  162. package/dist/api/function/v1beta1/index.js +0 -2
  163. package/dist/api/iam/v1alpha1/index.js +0 -1
  164. package/dist/api/iot/v1/index.js +0 -2
  165. package/dist/api/k8s/v1/index.js +0 -2
  166. package/dist/api/marketplace/v1/index.js +0 -1
  167. package/dist/api/mnq/v1alpha1/index.js +0 -1
  168. package/dist/api/rdb/v1/index.js +0 -2
  169. package/dist/api/redis/v1alpha1/index.js +0 -2
  170. package/dist/api/test/v1/index.js +0 -1
  171. package/dist/api/vpc/v1/index.js +0 -1
  172. package/dist/node_modules/.pnpm/@scaleway_random-name@3.0.2/node_modules/@scaleway/random-name/dist/index.js +0 -254
  173. package/node_modules/@scaleway/random-name/dist/index.browser.js +0 -256
@@ -1,38 +1,33 @@
1
1
  import { isJSONObject } from '../../../helpers/json.js';
2
2
  import { unmarshalMoney, unmarshalTimeSeries } from '../../../scw/custom-marshalling.js';
3
- import { unmarshalArrayOfObject, unmarshalDate, resolveOneOf } from '../../../helpers/marshalling.js';
3
+ import { unmarshalDate, unmarshalArrayOfObject, resolveOneOf } from '../../../helpers/marshalling.js';
4
4
 
5
5
  // This file was automatically generated. DO NOT EDIT.
6
-
7
6
  const unmarshalCPU = data => {
8
7
  if (!isJSONObject(data)) {
9
8
  throw new TypeError(`Unmarshalling the type 'CPU' failed as data isn't a dictionary.`);
10
9
  }
11
-
12
10
  return {
11
+ benchmark: data.benchmark,
13
12
  coreCount: data.core_count,
14
13
  frequency: data.frequency,
15
14
  name: data.name,
16
15
  threadCount: data.thread_count
17
16
  };
18
17
  };
19
-
20
18
  const unmarshalDisk = data => {
21
19
  if (!isJSONObject(data)) {
22
20
  throw new TypeError(`Unmarshalling the type 'Disk' failed as data isn't a dictionary.`);
23
21
  }
24
-
25
22
  return {
26
23
  capacity: data.capacity,
27
24
  type: data.type
28
25
  };
29
26
  };
30
-
31
27
  const unmarshalIP = data => {
32
28
  if (!isJSONObject(data)) {
33
29
  throw new TypeError(`Unmarshalling the type 'IP' failed as data isn't a dictionary.`);
34
30
  }
35
-
36
31
  return {
37
32
  address: data.address,
38
33
  id: data.id,
@@ -42,12 +37,10 @@ const unmarshalIP = data => {
42
37
  version: data.version
43
38
  };
44
39
  };
45
-
46
40
  const unmarshalMemory = data => {
47
41
  if (!isJSONObject(data)) {
48
42
  throw new TypeError(`Unmarshalling the type 'Memory' failed as data isn't a dictionary.`);
49
43
  }
50
-
51
44
  return {
52
45
  capacity: data.capacity,
53
46
  frequency: data.frequency,
@@ -55,24 +48,20 @@ const unmarshalMemory = data => {
55
48
  type: data.type
56
49
  };
57
50
  };
58
-
59
51
  const unmarshalOSOSField = data => {
60
52
  if (!isJSONObject(data)) {
61
53
  throw new TypeError(`Unmarshalling the type 'OSOSField' failed as data isn't a dictionary.`);
62
54
  }
63
-
64
55
  return {
65
56
  defaultValue: data.default_value,
66
57
  editable: data.editable,
67
58
  required: data.required
68
59
  };
69
60
  };
70
-
71
61
  const unmarshalOfferOptionOffer = data => {
72
62
  if (!isJSONObject(data)) {
73
63
  throw new TypeError(`Unmarshalling the type 'OfferOptionOffer' failed as data isn't a dictionary.`);
74
64
  }
75
-
76
65
  return {
77
66
  enabled: data.enabled,
78
67
  id: data.id,
@@ -83,35 +72,29 @@ const unmarshalOfferOptionOffer = data => {
83
72
  subscriptionPeriod: data.subscription_period
84
73
  };
85
74
  };
86
-
87
75
  const unmarshalPersistentMemory = data => {
88
76
  if (!isJSONObject(data)) {
89
77
  throw new TypeError(`Unmarshalling the type 'PersistentMemory' failed as data isn't a dictionary.`);
90
78
  }
91
-
92
79
  return {
93
80
  capacity: data.capacity,
94
81
  frequency: data.frequency,
95
82
  type: data.type
96
83
  };
97
84
  };
98
-
99
85
  const unmarshalRaidController = data => {
100
86
  if (!isJSONObject(data)) {
101
87
  throw new TypeError(`Unmarshalling the type 'RaidController' failed as data isn't a dictionary.`);
102
88
  }
103
-
104
89
  return {
105
90
  model: data.model,
106
91
  raidLevel: data.raid_level
107
92
  };
108
93
  };
109
-
110
94
  const unmarshalServerInstall = data => {
111
95
  if (!isJSONObject(data)) {
112
96
  throw new TypeError(`Unmarshalling the type 'ServerInstall' failed as data isn't a dictionary.`);
113
97
  }
114
-
115
98
  return {
116
99
  hostname: data.hostname,
117
100
  osId: data.os_id,
@@ -122,12 +105,10 @@ const unmarshalServerInstall = data => {
122
105
  user: data.user
123
106
  };
124
107
  };
125
-
126
108
  const unmarshalServerOption = data => {
127
109
  if (!isJSONObject(data)) {
128
110
  throw new TypeError(`Unmarshalling the type 'ServerOption' failed as data isn't a dictionary.`);
129
111
  }
130
-
131
112
  return {
132
113
  expiresAt: unmarshalDate(data.expires_at),
133
114
  id: data.id,
@@ -136,26 +117,23 @@ const unmarshalServerOption = data => {
136
117
  status: data.status
137
118
  };
138
119
  };
139
-
140
120
  const unmarshalServerRescueServer = data => {
141
121
  if (!isJSONObject(data)) {
142
122
  throw new TypeError(`Unmarshalling the type 'ServerRescueServer' failed as data isn't a dictionary.`);
143
123
  }
144
-
145
124
  return {
146
125
  password: data.password,
147
126
  user: data.user
148
127
  };
149
128
  };
150
-
151
129
  const unmarshalOS = data => {
152
130
  if (!isJSONObject(data)) {
153
131
  throw new TypeError(`Unmarshalling the type 'OS' failed as data isn't a dictionary.`);
154
132
  }
155
-
156
133
  return {
157
134
  enabled: data.enabled,
158
135
  id: data.id,
136
+ licenseRequired: data.license_required,
159
137
  logoUrl: data.logo_url,
160
138
  name: data.name,
161
139
  password: data.password ? unmarshalOSOSField(data.password) : undefined,
@@ -170,7 +148,6 @@ const unmarshalOffer = data => {
170
148
  if (!isJSONObject(data)) {
171
149
  throw new TypeError(`Unmarshalling the type 'Offer' failed as data isn't a dictionary.`);
172
150
  }
173
-
174
151
  return {
175
152
  bandwidth: data.bandwidth,
176
153
  commercialRange: data.commercial_range,
@@ -197,7 +174,6 @@ const unmarshalOption = data => {
197
174
  if (!isJSONObject(data)) {
198
175
  throw new TypeError(`Unmarshalling the type 'Option' failed as data isn't a dictionary.`);
199
176
  }
200
-
201
177
  return {
202
178
  id: data.id,
203
179
  manageable: data.manageable,
@@ -208,7 +184,6 @@ const unmarshalServer = data => {
208
184
  if (!isJSONObject(data)) {
209
185
  throw new TypeError(`Unmarshalling the type 'Server' failed as data isn't a dictionary.`);
210
186
  }
211
-
212
187
  return {
213
188
  bootType: data.boot_type,
214
189
  createdAt: unmarshalDate(data.created_at),
@@ -231,12 +206,10 @@ const unmarshalServer = data => {
231
206
  zone: data.zone
232
207
  };
233
208
  };
234
-
235
209
  const unmarshalServerEvent = data => {
236
210
  if (!isJSONObject(data)) {
237
211
  throw new TypeError(`Unmarshalling the type 'ServerEvent' failed as data isn't a dictionary.`);
238
212
  }
239
-
240
213
  return {
241
214
  action: data.action,
242
215
  createdAt: unmarshalDate(data.created_at),
@@ -244,12 +217,25 @@ const unmarshalServerEvent = data => {
244
217
  updatedAt: unmarshalDate(data.updated_at)
245
218
  };
246
219
  };
247
-
220
+ const unmarshalServerPrivateNetwork = data => {
221
+ if (!isJSONObject(data)) {
222
+ throw new TypeError(`Unmarshalling the type 'ServerPrivateNetwork' failed as data isn't a dictionary.`);
223
+ }
224
+ return {
225
+ createdAt: unmarshalDate(data.created_at),
226
+ id: data.id,
227
+ privateNetworkId: data.private_network_id,
228
+ projectId: data.project_id,
229
+ serverId: data.server_id,
230
+ status: data.status,
231
+ updatedAt: unmarshalDate(data.updated_at),
232
+ vlan: data.vlan
233
+ };
234
+ };
248
235
  const unmarshalSetting = data => {
249
236
  if (!isJSONObject(data)) {
250
237
  throw new TypeError(`Unmarshalling the type 'Setting' failed as data isn't a dictionary.`);
251
238
  }
252
-
253
239
  return {
254
240
  enabled: data.enabled,
255
241
  id: data.id,
@@ -261,7 +247,6 @@ const unmarshalBMCAccess = data => {
261
247
  if (!isJSONObject(data)) {
262
248
  throw new TypeError(`Unmarshalling the type 'BMCAccess' failed as data isn't a dictionary.`);
263
249
  }
264
-
265
250
  return {
266
251
  expiresAt: unmarshalDate(data.expires_at),
267
252
  login: data.login,
@@ -273,7 +258,6 @@ const unmarshalGetServerMetricsResponse = data => {
273
258
  if (!isJSONObject(data)) {
274
259
  throw new TypeError(`Unmarshalling the type 'GetServerMetricsResponse' failed as data isn't a dictionary.`);
275
260
  }
276
-
277
261
  return {
278
262
  pings: data.pings ? unmarshalTimeSeries(data.pings) : undefined
279
263
  };
@@ -282,7 +266,6 @@ const unmarshalListOSResponse = data => {
282
266
  if (!isJSONObject(data)) {
283
267
  throw new TypeError(`Unmarshalling the type 'ListOSResponse' failed as data isn't a dictionary.`);
284
268
  }
285
-
286
269
  return {
287
270
  os: unmarshalArrayOfObject(data.os, unmarshalOS),
288
271
  totalCount: data.total_count
@@ -292,7 +275,6 @@ const unmarshalListOffersResponse = data => {
292
275
  if (!isJSONObject(data)) {
293
276
  throw new TypeError(`Unmarshalling the type 'ListOffersResponse' failed as data isn't a dictionary.`);
294
277
  }
295
-
296
278
  return {
297
279
  offers: unmarshalArrayOfObject(data.offers, unmarshalOffer),
298
280
  totalCount: data.total_count
@@ -302,7 +284,6 @@ const unmarshalListOptionsResponse = data => {
302
284
  if (!isJSONObject(data)) {
303
285
  throw new TypeError(`Unmarshalling the type 'ListOptionsResponse' failed as data isn't a dictionary.`);
304
286
  }
305
-
306
287
  return {
307
288
  options: unmarshalArrayOfObject(data.options, unmarshalOption),
308
289
  totalCount: data.total_count
@@ -312,17 +293,24 @@ const unmarshalListServerEventsResponse = data => {
312
293
  if (!isJSONObject(data)) {
313
294
  throw new TypeError(`Unmarshalling the type 'ListServerEventsResponse' failed as data isn't a dictionary.`);
314
295
  }
315
-
316
296
  return {
317
297
  events: unmarshalArrayOfObject(data.events, unmarshalServerEvent),
318
298
  totalCount: data.total_count
319
299
  };
320
300
  };
301
+ const unmarshalListServerPrivateNetworksResponse = data => {
302
+ if (!isJSONObject(data)) {
303
+ throw new TypeError(`Unmarshalling the type 'ListServerPrivateNetworksResponse' failed as data isn't a dictionary.`);
304
+ }
305
+ return {
306
+ serverPrivateNetworks: unmarshalArrayOfObject(data.server_private_networks, unmarshalServerPrivateNetwork),
307
+ totalCount: data.total_count
308
+ };
309
+ };
321
310
  const unmarshalListServersResponse = data => {
322
311
  if (!isJSONObject(data)) {
323
312
  throw new TypeError(`Unmarshalling the type 'ListServersResponse' failed as data isn't a dictionary.`);
324
313
  }
325
-
326
314
  return {
327
315
  servers: unmarshalArrayOfObject(data.servers, unmarshalServer),
328
316
  totalCount: data.total_count
@@ -332,13 +320,19 @@ const unmarshalListSettingsResponse = data => {
332
320
  if (!isJSONObject(data)) {
333
321
  throw new TypeError(`Unmarshalling the type 'ListSettingsResponse' failed as data isn't a dictionary.`);
334
322
  }
335
-
336
323
  return {
337
324
  settings: unmarshalArrayOfObject(data.settings, unmarshalSetting),
338
325
  totalCount: data.total_count
339
326
  };
340
327
  };
341
-
328
+ const unmarshalSetServerPrivateNetworksResponse = data => {
329
+ if (!isJSONObject(data)) {
330
+ throw new TypeError(`Unmarshalling the type 'SetServerPrivateNetworksResponse' failed as data isn't a dictionary.`);
331
+ }
332
+ return {
333
+ serverPrivateNetworks: unmarshalArrayOfObject(data.server_private_networks, unmarshalServerPrivateNetwork)
334
+ };
335
+ };
342
336
  const marshalCreateServerRequestInstall = (request, defaults) => ({
343
337
  hostname: request.hostname,
344
338
  os_id: request.osId,
@@ -348,7 +342,6 @@ const marshalCreateServerRequestInstall = (request, defaults) => ({
348
342
  ssh_key_ids: request.sshKeyIds,
349
343
  user: request.user
350
344
  });
351
-
352
345
  const marshalAddOptionServerRequest = (request, defaults) => ({
353
346
  expires_at: request.expiresAt
354
347
  });
@@ -378,14 +371,20 @@ const marshalInstallServerRequest = (request, defaults) => ({
378
371
  ssh_key_ids: request.sshKeyIds,
379
372
  user: request.user
380
373
  });
374
+ const marshalPrivateNetworkApiAddServerPrivateNetworkRequest = (request, defaults) => ({
375
+ private_network_id: request.privateNetworkId
376
+ });
377
+ const marshalPrivateNetworkApiSetServerPrivateNetworksRequest = (request, defaults) => ({
378
+ private_network_ids: request.privateNetworkIds
379
+ });
381
380
  const marshalRebootServerRequest = (request, defaults) => ({
382
- boot_type: request.bootType
381
+ boot_type: request.bootType ?? 'unknown_boot_type'
383
382
  });
384
383
  const marshalStartBMCAccessRequest = (request, defaults) => ({
385
384
  ip: request.ip
386
385
  });
387
386
  const marshalStartServerRequest = (request, defaults) => ({
388
- boot_type: request.bootType
387
+ boot_type: request.bootType ?? 'unknown_boot_type'
389
388
  });
390
389
  const marshalUpdateIPRequest = (request, defaults) => ({
391
390
  reverse: request.reverse
@@ -399,4 +398,4 @@ const marshalUpdateSettingRequest = (request, defaults) => ({
399
398
  enabled: request.enabled
400
399
  });
401
400
 
402
- export { marshalAddOptionServerRequest, marshalCreateServerRequest, marshalInstallServerRequest, marshalRebootServerRequest, marshalStartBMCAccessRequest, marshalStartServerRequest, marshalUpdateIPRequest, marshalUpdateServerRequest, marshalUpdateSettingRequest, unmarshalBMCAccess, unmarshalGetServerMetricsResponse, unmarshalIP, unmarshalListOSResponse, unmarshalListOffersResponse, unmarshalListOptionsResponse, unmarshalListServerEventsResponse, unmarshalListServersResponse, unmarshalListSettingsResponse, unmarshalOS, unmarshalOffer, unmarshalOption, unmarshalServer, unmarshalSetting };
401
+ export { marshalAddOptionServerRequest, marshalCreateServerRequest, marshalInstallServerRequest, marshalPrivateNetworkApiAddServerPrivateNetworkRequest, marshalPrivateNetworkApiSetServerPrivateNetworksRequest, marshalRebootServerRequest, marshalStartBMCAccessRequest, marshalStartServerRequest, marshalUpdateIPRequest, marshalUpdateServerRequest, marshalUpdateSettingRequest, unmarshalBMCAccess, unmarshalGetServerMetricsResponse, unmarshalIP, unmarshalListOSResponse, unmarshalListOffersResponse, unmarshalListOptionsResponse, unmarshalListServerEventsResponse, unmarshalListServerPrivateNetworksResponse, unmarshalListServersResponse, unmarshalListSettingsResponse, unmarshalOS, unmarshalOffer, unmarshalOption, unmarshalServer, unmarshalServerPrivateNetwork, unmarshalSetServerPrivateNetworksResponse, unmarshalSetting };
@@ -0,0 +1,109 @@
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 CreateServerRequest = {
5
+ description: {
6
+ maxLength: 255
7
+ },
8
+ name: {
9
+ minLength: 1
10
+ }
11
+ };
12
+ const CreateServerRequestInstall = {
13
+ hostname: {
14
+ maxLength: 255
15
+ },
16
+ password: {
17
+ maxLength: 255
18
+ },
19
+ servicePassword: {
20
+ maxLength: 255
21
+ },
22
+ serviceUser: {
23
+ maxLength: 255
24
+ },
25
+ user: {
26
+ maxLength: 255
27
+ }
28
+ };
29
+ const InstallServerRequest = {
30
+ hostname: {
31
+ maxLength: 255
32
+ },
33
+ password: {
34
+ maxLength: 255
35
+ },
36
+ servicePassword: {
37
+ maxLength: 255
38
+ },
39
+ serviceUser: {
40
+ maxLength: 255
41
+ },
42
+ user: {
43
+ maxLength: 255
44
+ }
45
+ };
46
+ const ListOSRequest = {
47
+ page: {
48
+ greaterThan: 0
49
+ },
50
+ pageSize: {
51
+ greaterThan: 0,
52
+ lessThanOrEqual: 100
53
+ }
54
+ };
55
+ const ListOffersRequest = {
56
+ page: {
57
+ greaterThan: 0
58
+ },
59
+ pageSize: {
60
+ greaterThan: 0,
61
+ lessThanOrEqual: 100
62
+ }
63
+ };
64
+ const ListOptionsRequest = {
65
+ page: {
66
+ greaterThan: 0
67
+ },
68
+ pageSize: {
69
+ greaterThan: 0,
70
+ lessThanOrEqual: 100
71
+ }
72
+ };
73
+ const ListServerEventsRequest = {
74
+ page: {
75
+ greaterThan: 0
76
+ },
77
+ pageSize: {
78
+ greaterThan: 0,
79
+ lessThanOrEqual: 100
80
+ }
81
+ };
82
+ const ListServersRequest = {
83
+ page: {
84
+ greaterThan: 0
85
+ },
86
+ pageSize: {
87
+ greaterThan: 0,
88
+ lessThanOrEqual: 100
89
+ }
90
+ };
91
+ const ListSettingsRequest = {
92
+ page: {
93
+ greaterThan: 0
94
+ },
95
+ pageSize: {
96
+ greaterThan: 0,
97
+ lessThanOrEqual: 100
98
+ }
99
+ };
100
+ const UpdateServerRequest = {
101
+ description: {
102
+ maxLength: 255
103
+ },
104
+ name: {
105
+ maxLength: 255
106
+ }
107
+ };
108
+
109
+ export { CreateServerRequest, CreateServerRequestInstall, InstallServerRequest, ListOSRequest, ListOffersRequest, ListOptionsRequest, ListServerEventsRequest, ListServersRequest, ListSettingsRequest, UpdateServerRequest };
@@ -1,2 +1,2 @@
1
- import * as index$1 from './v1beta1/index.js';
2
- export { index$1 as v1beta1 };
1
+ import * as index_gen from './v1beta1/index.gen.js';
2
+ export { index_gen as v1beta1 };