@scaleway/sdk 1.34.0 → 2.0.0-alpha.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 (61) hide show
  1. package/dist/api/account/v2/api.gen.js +1 -1
  2. package/dist/api/account/v3/api.gen.js +1 -1
  3. package/dist/api/applesilicon/v1alpha1/api.gen.js +1 -1
  4. package/dist/api/applesilicon/v1alpha1/marshalling.gen.js +26 -26
  5. package/dist/api/baremetal/v1/api.gen.js +6 -6
  6. package/dist/api/baremetal/v1/marshalling.gen.js +109 -120
  7. package/dist/api/billing/v2alpha1/api.gen.js +3 -3
  8. package/dist/api/billing/v2alpha1/marshalling.gen.js +9 -9
  9. package/dist/api/cockpit/v1beta1/api.gen.js +47 -71
  10. package/dist/api/cockpit/v1beta1/marshalling.gen.js +43 -63
  11. package/dist/api/container/v1beta1/api.gen.js +11 -11
  12. package/dist/api/container/v1beta1/marshalling.gen.js +76 -102
  13. package/dist/api/document_db/v1beta1/api.gen.js +6 -6
  14. package/dist/api/document_db/v1beta1/marshalling.gen.js +169 -225
  15. package/dist/api/domain/v2beta1/api.gen.js +45 -38
  16. package/dist/api/domain/v2beta1/index.gen.js +2 -0
  17. package/dist/api/domain/v2beta1/marshalling.gen.js +361 -575
  18. package/dist/api/flexibleip/v1alpha1/api.gen.js +15 -7
  19. package/dist/api/flexibleip/v1alpha1/marshalling.gen.js +2 -2
  20. package/dist/api/function/v1beta1/api.gen.js +11 -11
  21. package/dist/api/function/v1beta1/marshalling.gen.js +103 -129
  22. package/dist/api/iam/v1alpha1/api.gen.js +64 -32
  23. package/dist/api/iam/v1alpha1/marshalling.gen.js +68 -78
  24. package/dist/api/instance/v1/api.gen.js +1 -1
  25. package/dist/api/instance/v1/marshalling.gen.js +397 -602
  26. package/dist/api/iot/v1/api.gen.js +35 -27
  27. package/dist/api/iot/v1/marshalling.gen.js +111 -162
  28. package/dist/api/ipfs/v1alpha1/api.gen.js +2 -2
  29. package/dist/api/ipfs/v1alpha1/marshalling.gen.js +23 -27
  30. package/dist/api/k8s/v1/api.gen.js +3 -3
  31. package/dist/api/k8s/v1/marshalling.gen.js +109 -194
  32. package/dist/api/lb/v1/api.gen.js +583 -552
  33. package/dist/api/lb/v1/marshalling.gen.js +245 -361
  34. package/dist/api/marketplace/v1/marshalling.gen.js +11 -11
  35. package/dist/api/marketplace/v2/api.gen.js +6 -6
  36. package/dist/api/mnq/v1alpha1/api.gen.js +21 -14
  37. package/dist/api/mnq/v1alpha1/marshalling.gen.js +35 -40
  38. package/dist/api/rdb/v1/api.gen.js +7 -7
  39. package/dist/api/rdb/v1/marshalling.gen.js +184 -240
  40. package/dist/api/redis/v1/api.gen.js +1 -1
  41. package/dist/api/redis/v1/marshalling.gen.js +73 -97
  42. package/dist/api/registry/v1/api.gen.js +3 -3
  43. package/dist/api/registry/v1/marshalling.gen.js +5 -7
  44. package/dist/api/secret/v1alpha1/api.gen.js +2 -2
  45. package/dist/api/secret/v1alpha1/marshalling.gen.js +20 -30
  46. package/dist/api/tem/v1alpha1/api.gen.js +1 -1
  47. package/dist/api/tem/v1alpha1/marshalling.gen.js +52 -61
  48. package/dist/api/test/v1/api.gen.js +8 -25
  49. package/dist/api/test/v1/marshalling.gen.js +5 -7
  50. package/dist/api/vpc/v1/api.gen.js +1 -1
  51. package/dist/api/vpc/v2/api.gen.js +2 -2
  52. package/dist/api/vpc/v2/marshalling.gen.js +3 -5
  53. package/dist/api/vpcgw/v1/api.gen.js +6 -6
  54. package/dist/api/vpcgw/v1/marshalling.gen.js +36 -49
  55. package/dist/api/webhosting/v1alpha1/api.gen.js +56 -4
  56. package/dist/api/webhosting/v1alpha1/index.gen.js +1 -1
  57. package/dist/api/webhosting/v1alpha1/marshalling.gen.js +69 -42
  58. package/dist/api/webhosting/v1alpha1/validation-rules.gen.js +10 -1
  59. package/dist/index.cjs +3127 -3989
  60. package/dist/index.d.ts +9658 -12221
  61. package/package.json +2 -2
@@ -33,74 +33,71 @@ const unmarshalEndpoint = data => {
33
33
  }
34
34
  return {
35
35
  directAccess: data.direct_access ? unmarshalEndpointDirectAccessDetails(data.direct_access) : undefined,
36
- hostname: data.hostname,
36
+ hostname: data.hostname ? data.hostname : undefined,
37
37
  id: data.id,
38
- ip: data.ip,
38
+ ip: data.ip ? data.ip : undefined,
39
39
  loadBalancer: data.load_balancer ? unmarshalEndpointLoadBalancerDetails(data.load_balancer) : undefined,
40
- name: data.name,
40
+ name: data.name ? data.name : undefined,
41
41
  port: data.port,
42
42
  privateNetwork: data.private_network ? unmarshalEndpointPrivateNetworkDetails(data.private_network) : undefined
43
43
  };
44
44
  };
45
- const unmarshalEngineSetting = data => {
46
- if (!isJSONObject(data)) {
47
- throw new TypeError(`Unmarshalling the type 'EngineSetting' failed as data isn't a dictionary.`);
48
- }
49
- return {
50
- defaultValue: data.default_value,
51
- description: data.description,
52
- floatMax: data.float_max,
53
- floatMin: data.float_min,
54
- hotConfigurable: data.hot_configurable,
55
- intMax: data.int_max,
56
- intMin: data.int_min,
57
- name: data.name,
58
- propertyType: data.property_type,
59
- stringConstraint: data.string_constraint,
60
- unit: data.unit
61
- };
62
- };
63
- const unmarshalBackupSchedule = data => {
45
+ const unmarshalReadReplica = data => {
64
46
  if (!isJSONObject(data)) {
65
- throw new TypeError(`Unmarshalling the type 'BackupSchedule' failed as data isn't a dictionary.`);
47
+ throw new TypeError(`Unmarshalling the type 'ReadReplica' failed as data isn't a dictionary.`);
66
48
  }
67
49
  return {
68
- disabled: data.disabled,
69
- frequency: data.frequency,
70
- nextRunAt: unmarshalDate(data.next_run_at),
71
- retention: data.retention
50
+ endpoints: unmarshalArrayOfObject(data.endpoints, unmarshalEndpoint),
51
+ id: data.id,
52
+ region: data.region,
53
+ sameZone: data.same_zone,
54
+ status: data.status
72
55
  };
73
56
  };
74
- const unmarshalEngineVersion = data => {
57
+ const unmarshalDatabaseBackup = data => {
75
58
  if (!isJSONObject(data)) {
76
- throw new TypeError(`Unmarshalling the type 'EngineVersion' failed as data isn't a dictionary.`);
59
+ throw new TypeError(`Unmarshalling the type 'DatabaseBackup' failed as data isn't a dictionary.`);
77
60
  }
78
61
  return {
79
- availableInitSettings: unmarshalArrayOfObject(data.available_init_settings, unmarshalEngineSetting),
80
- availableSettings: unmarshalArrayOfObject(data.available_settings, unmarshalEngineSetting),
81
- beta: data.beta,
82
- disabled: data.disabled,
83
- endOfLife: unmarshalDate(data.end_of_life),
62
+ createdAt: unmarshalDate(data.created_at),
63
+ databaseName: data.database_name,
64
+ downloadUrl: data.download_url ? data.download_url : undefined,
65
+ downloadUrlExpiresAt: unmarshalDate(data.download_url_expires_at),
66
+ expiresAt: unmarshalDate(data.expires_at),
67
+ id: data.id,
68
+ instanceId: data.instance_id,
69
+ instanceName: data.instance_name,
84
70
  name: data.name,
85
- version: data.version
71
+ region: data.region,
72
+ sameRegion: data.same_region,
73
+ size: data.size ? data.size : undefined,
74
+ status: data.status,
75
+ updatedAt: unmarshalDate(data.updated_at)
86
76
  };
87
77
  };
88
- const unmarshalInstanceSetting = data => {
78
+ const unmarshalDatabase = data => {
89
79
  if (!isJSONObject(data)) {
90
- throw new TypeError(`Unmarshalling the type 'InstanceSetting' failed as data isn't a dictionary.`);
80
+ throw new TypeError(`Unmarshalling the type 'Database' failed as data isn't a dictionary.`);
91
81
  }
92
82
  return {
83
+ managed: data.managed,
93
84
  name: data.name,
94
- value: data.value
85
+ owner: data.owner,
86
+ size: data.size
95
87
  };
96
88
  };
97
- const unmarshalLogsPolicy = data => {
89
+ const unmarshalInstanceLog = data => {
98
90
  if (!isJSONObject(data)) {
99
- throw new TypeError(`Unmarshalling the type 'LogsPolicy' failed as data isn't a dictionary.`);
91
+ throw new TypeError(`Unmarshalling the type 'InstanceLog' failed as data isn't a dictionary.`);
100
92
  }
101
93
  return {
102
- maxAgeRetention: data.max_age_retention,
103
- totalDiskRetention: data.total_disk_retention
94
+ createdAt: unmarshalDate(data.created_at),
95
+ downloadUrl: data.download_url ? data.download_url : undefined,
96
+ expiresAt: unmarshalDate(data.expires_at),
97
+ id: data.id,
98
+ nodeName: data.node_name,
99
+ region: data.region,
100
+ status: data.status
104
101
  };
105
102
  };
106
103
  const unmarshalMaintenance = data => {
@@ -115,37 +112,33 @@ const unmarshalMaintenance = data => {
115
112
  stopsAt: unmarshalDate(data.stops_at)
116
113
  };
117
114
  };
118
- const unmarshalNodeTypeVolumeConstraintSizes = data => {
115
+ const unmarshalLogsPolicy = data => {
119
116
  if (!isJSONObject(data)) {
120
- throw new TypeError(`Unmarshalling the type 'NodeTypeVolumeConstraintSizes' failed as data isn't a dictionary.`);
117
+ throw new TypeError(`Unmarshalling the type 'LogsPolicy' failed as data isn't a dictionary.`);
121
118
  }
122
119
  return {
123
- maxSize: data.max_size,
124
- minSize: data.min_size
120
+ maxAgeRetention: data.max_age_retention ? data.max_age_retention : undefined,
121
+ totalDiskRetention: data.total_disk_retention ? data.total_disk_retention : undefined
125
122
  };
126
123
  };
127
- const unmarshalNodeTypeVolumeType = data => {
124
+ const unmarshalBackupSchedule = data => {
128
125
  if (!isJSONObject(data)) {
129
- throw new TypeError(`Unmarshalling the type 'NodeTypeVolumeType' failed as data isn't a dictionary.`);
126
+ throw new TypeError(`Unmarshalling the type 'BackupSchedule' failed as data isn't a dictionary.`);
130
127
  }
131
128
  return {
132
- chunkSize: data.chunk_size,
133
- description: data.description,
134
- maxSize: data.max_size,
135
- minSize: data.min_size,
136
- type: data.type
129
+ disabled: data.disabled,
130
+ frequency: data.frequency,
131
+ nextRunAt: unmarshalDate(data.next_run_at),
132
+ retention: data.retention
137
133
  };
138
134
  };
139
- const unmarshalReadReplica = data => {
135
+ const unmarshalInstanceSetting = data => {
140
136
  if (!isJSONObject(data)) {
141
- throw new TypeError(`Unmarshalling the type 'ReadReplica' failed as data isn't a dictionary.`);
137
+ throw new TypeError(`Unmarshalling the type 'InstanceSetting' failed as data isn't a dictionary.`);
142
138
  }
143
139
  return {
144
- endpoints: unmarshalArrayOfObject(data.endpoints, unmarshalEndpoint),
145
- id: data.id,
146
- region: data.region,
147
- sameZone: data.same_zone,
148
- status: data.status
140
+ name: data.name,
141
+ value: data.value
149
142
  };
150
143
  };
151
144
  const unmarshalUpgradableVersion = data => {
@@ -168,69 +161,13 @@ const unmarshalVolume = data => {
168
161
  type: data.type
169
162
  };
170
163
  };
171
- const unmarshalACLRule = data => {
172
- if (!isJSONObject(data)) {
173
- throw new TypeError(`Unmarshalling the type 'ACLRule' failed as data isn't a dictionary.`);
174
- }
175
- return {
176
- action: data.action,
177
- description: data.description,
178
- direction: data.direction,
179
- ip: data.ip,
180
- port: data.port,
181
- protocol: data.protocol
182
- };
183
- };
184
- const unmarshalDatabase = data => {
185
- if (!isJSONObject(data)) {
186
- throw new TypeError(`Unmarshalling the type 'Database' failed as data isn't a dictionary.`);
187
- }
188
- return {
189
- managed: data.managed,
190
- name: data.name,
191
- owner: data.owner,
192
- size: data.size
193
- };
194
- };
195
- const unmarshalDatabaseBackup = data => {
196
- if (!isJSONObject(data)) {
197
- throw new TypeError(`Unmarshalling the type 'DatabaseBackup' failed as data isn't a dictionary.`);
198
- }
199
- return {
200
- createdAt: unmarshalDate(data.created_at),
201
- databaseName: data.database_name,
202
- downloadUrl: data.download_url,
203
- downloadUrlExpiresAt: unmarshalDate(data.download_url_expires_at),
204
- expiresAt: unmarshalDate(data.expires_at),
205
- id: data.id,
206
- instanceId: data.instance_id,
207
- instanceName: data.instance_name,
208
- name: data.name,
209
- region: data.region,
210
- sameRegion: data.same_region,
211
- size: data.size,
212
- status: data.status,
213
- updatedAt: unmarshalDate(data.updated_at)
214
- };
215
- };
216
- const unmarshalDatabaseEngine = data => {
217
- if (!isJSONObject(data)) {
218
- throw new TypeError(`Unmarshalling the type 'DatabaseEngine' failed as data isn't a dictionary.`);
219
- }
220
- return {
221
- logoUrl: data.logo_url,
222
- name: data.name,
223
- region: data.region,
224
- versions: unmarshalArrayOfObject(data.versions, unmarshalEngineVersion)
225
- };
226
- };
227
164
  const unmarshalInstance = data => {
228
165
  if (!isJSONObject(data)) {
229
166
  throw new TypeError(`Unmarshalling the type 'Instance' failed as data isn't a dictionary.`);
230
167
  }
231
168
  return {
232
169
  backupSameRegion: data.backup_same_region,
233
- backupSchedule: data.backup_schedule ? unmarshalBackupSchedule(data.backup_schedule) : undefined,
170
+ backupSchedule: unmarshalBackupSchedule(data.backup_schedule),
234
171
  createdAt: unmarshalDate(data.created_at),
235
172
  endpoint: data.endpoint ? unmarshalEndpoint(data.endpoint) : undefined,
236
173
  endpoints: unmarshalArrayOfObject(data.endpoints, unmarshalEndpoint),
@@ -238,7 +175,7 @@ const unmarshalInstance = data => {
238
175
  id: data.id,
239
176
  initSettings: unmarshalArrayOfObject(data.init_settings, unmarshalInstanceSetting),
240
177
  isHaCluster: data.is_ha_cluster,
241
- logsPolicy: data.logs_policy ? unmarshalLogsPolicy(data.logs_policy) : undefined,
178
+ logsPolicy: unmarshalLogsPolicy(data.logs_policy),
242
179
  maintenances: unmarshalArrayOfObject(data.maintenances, unmarshalMaintenance),
243
180
  name: data.name,
244
181
  nodeType: data.node_type,
@@ -250,51 +187,7 @@ const unmarshalInstance = data => {
250
187
  status: data.status,
251
188
  tags: data.tags,
252
189
  upgradableVersion: unmarshalArrayOfObject(data.upgradable_version, unmarshalUpgradableVersion),
253
- volume: data.volume ? unmarshalVolume(data.volume) : undefined
254
- };
255
- };
256
- const unmarshalInstanceLog = data => {
257
- if (!isJSONObject(data)) {
258
- throw new TypeError(`Unmarshalling the type 'InstanceLog' failed as data isn't a dictionary.`);
259
- }
260
- return {
261
- createdAt: unmarshalDate(data.created_at),
262
- downloadUrl: data.download_url,
263
- expiresAt: unmarshalDate(data.expires_at),
264
- id: data.id,
265
- nodeName: data.node_name,
266
- region: data.region,
267
- status: data.status
268
- };
269
- };
270
- const unmarshalListInstanceLogsDetailsResponseInstanceLogDetail = data => {
271
- if (!isJSONObject(data)) {
272
- throw new TypeError(`Unmarshalling the type 'ListInstanceLogsDetailsResponseInstanceLogDetail' failed as data isn't a dictionary.`);
273
- }
274
- return {
275
- logName: data.log_name,
276
- size: data.size
277
- };
278
- };
279
- const unmarshalNodeType = data => {
280
- if (!isJSONObject(data)) {
281
- throw new TypeError(`Unmarshalling the type 'NodeType' failed as data isn't a dictionary.`);
282
- }
283
- return {
284
- availableVolumeTypes: unmarshalArrayOfObject(data.available_volume_types, unmarshalNodeTypeVolumeType),
285
- beta: data.beta,
286
- description: data.description,
287
- disabled: data.disabled,
288
- generation: data.generation,
289
- instanceRange: data.instance_range,
290
- isBssdCompatible: data.is_bssd_compatible,
291
- isHaRequired: data.is_ha_required,
292
- memory: data.memory,
293
- name: data.name,
294
- region: data.region,
295
- stockStatus: data.stock_status,
296
- vcpus: data.vcpus,
297
- volumeConstraint: data.volume_constraint ? unmarshalNodeTypeVolumeConstraintSizes(data.volume_constraint) : undefined
190
+ volume: unmarshalVolume(data.volume)
298
191
  };
299
192
  };
300
193
  const unmarshalPrivilege = data => {
@@ -320,7 +213,7 @@ const unmarshalSnapshot = data => {
320
213
  name: data.name,
321
214
  nodeType: data.node_type,
322
215
  region: data.region,
323
- size: data.size,
216
+ size: data.size ? data.size : undefined,
324
217
  status: data.status,
325
218
  updatedAt: unmarshalDate(data.updated_at)
326
219
  };
@@ -334,6 +227,19 @@ const unmarshalUser = data => {
334
227
  name: data.name
335
228
  };
336
229
  };
230
+ const unmarshalACLRule = data => {
231
+ if (!isJSONObject(data)) {
232
+ throw new TypeError(`Unmarshalling the type 'ACLRule' failed as data isn't a dictionary.`);
233
+ }
234
+ return {
235
+ action: data.action,
236
+ description: data.description,
237
+ direction: data.direction,
238
+ ip: data.ip,
239
+ port: data.port ? data.port : undefined,
240
+ protocol: data.protocol
241
+ };
242
+ };
337
243
  const unmarshalAddInstanceACLRulesResponse = data => {
338
244
  if (!isJSONObject(data)) {
339
245
  throw new TypeError(`Unmarshalling the type 'AddInstanceACLRulesResponse' failed as data isn't a dictionary.`);
@@ -383,6 +289,49 @@ const unmarshalListDatabaseBackupsResponse = data => {
383
289
  totalCount: data.total_count
384
290
  };
385
291
  };
292
+ const unmarshalEngineSetting = data => {
293
+ if (!isJSONObject(data)) {
294
+ throw new TypeError(`Unmarshalling the type 'EngineSetting' failed as data isn't a dictionary.`);
295
+ }
296
+ return {
297
+ defaultValue: data.default_value,
298
+ description: data.description,
299
+ floatMax: data.float_max ? data.float_max : undefined,
300
+ floatMin: data.float_min ? data.float_min : undefined,
301
+ hotConfigurable: data.hot_configurable,
302
+ intMax: data.int_max ? data.int_max : undefined,
303
+ intMin: data.int_min ? data.int_min : undefined,
304
+ name: data.name,
305
+ propertyType: data.property_type,
306
+ stringConstraint: data.string_constraint ? data.string_constraint : undefined,
307
+ unit: data.unit ? data.unit : undefined
308
+ };
309
+ };
310
+ const unmarshalEngineVersion = data => {
311
+ if (!isJSONObject(data)) {
312
+ throw new TypeError(`Unmarshalling the type 'EngineVersion' failed as data isn't a dictionary.`);
313
+ }
314
+ return {
315
+ availableInitSettings: unmarshalArrayOfObject(data.available_init_settings, unmarshalEngineSetting),
316
+ availableSettings: unmarshalArrayOfObject(data.available_settings, unmarshalEngineSetting),
317
+ beta: data.beta,
318
+ disabled: data.disabled,
319
+ endOfLife: unmarshalDate(data.end_of_life),
320
+ name: data.name,
321
+ version: data.version
322
+ };
323
+ };
324
+ const unmarshalDatabaseEngine = data => {
325
+ if (!isJSONObject(data)) {
326
+ throw new TypeError(`Unmarshalling the type 'DatabaseEngine' failed as data isn't a dictionary.`);
327
+ }
328
+ return {
329
+ logoUrl: data.logo_url,
330
+ name: data.name,
331
+ region: data.region,
332
+ versions: unmarshalArrayOfObject(data.versions, unmarshalEngineVersion)
333
+ };
334
+ };
386
335
  const unmarshalListDatabaseEnginesResponse = data => {
387
336
  if (!isJSONObject(data)) {
388
337
  throw new TypeError(`Unmarshalling the type 'ListDatabaseEnginesResponse' failed as data isn't a dictionary.`);
@@ -410,6 +359,15 @@ const unmarshalListInstanceACLRulesResponse = data => {
410
359
  totalCount: data.total_count
411
360
  };
412
361
  };
362
+ const unmarshalListInstanceLogsDetailsResponseInstanceLogDetail = data => {
363
+ if (!isJSONObject(data)) {
364
+ throw new TypeError(`Unmarshalling the type 'ListInstanceLogsDetailsResponseInstanceLogDetail' failed as data isn't a dictionary.`);
365
+ }
366
+ return {
367
+ logName: data.log_name,
368
+ size: data.size
369
+ };
370
+ };
413
371
  const unmarshalListInstanceLogsDetailsResponse = data => {
414
372
  if (!isJSONObject(data)) {
415
373
  throw new TypeError(`Unmarshalling the type 'ListInstanceLogsDetailsResponse' failed as data isn't a dictionary.`);
@@ -435,6 +393,48 @@ const unmarshalListInstancesResponse = data => {
435
393
  totalCount: data.total_count
436
394
  };
437
395
  };
396
+ const unmarshalNodeTypeVolumeType = data => {
397
+ if (!isJSONObject(data)) {
398
+ throw new TypeError(`Unmarshalling the type 'NodeTypeVolumeType' failed as data isn't a dictionary.`);
399
+ }
400
+ return {
401
+ chunkSize: data.chunk_size,
402
+ description: data.description,
403
+ maxSize: data.max_size,
404
+ minSize: data.min_size,
405
+ type: data.type
406
+ };
407
+ };
408
+ const unmarshalNodeTypeVolumeConstraintSizes = data => {
409
+ if (!isJSONObject(data)) {
410
+ throw new TypeError(`Unmarshalling the type 'NodeTypeVolumeConstraintSizes' failed as data isn't a dictionary.`);
411
+ }
412
+ return {
413
+ maxSize: data.max_size,
414
+ minSize: data.min_size
415
+ };
416
+ };
417
+ const unmarshalNodeType = data => {
418
+ if (!isJSONObject(data)) {
419
+ throw new TypeError(`Unmarshalling the type 'NodeType' failed as data isn't a dictionary.`);
420
+ }
421
+ return {
422
+ availableVolumeTypes: unmarshalArrayOfObject(data.available_volume_types, unmarshalNodeTypeVolumeType),
423
+ beta: data.beta,
424
+ description: data.description,
425
+ disabled: data.disabled,
426
+ generation: data.generation,
427
+ instanceRange: data.instance_range,
428
+ isBssdCompatible: data.is_bssd_compatible ? data.is_bssd_compatible : undefined,
429
+ isHaRequired: data.is_ha_required,
430
+ memory: data.memory,
431
+ name: data.name,
432
+ region: data.region,
433
+ stockStatus: data.stock_status,
434
+ vcpus: data.vcpus,
435
+ volumeConstraint: data.volume_constraint ? unmarshalNodeTypeVolumeConstraintSizes(data.volume_constraint) : undefined
436
+ };
437
+ };
438
438
  const unmarshalListNodeTypesResponse = data => {
439
439
  if (!isJSONObject(data)) {
440
440
  throw new TypeError(`Unmarshalling the type 'ListNodeTypesResponse' failed as data isn't a dictionary.`);
@@ -495,65 +495,11 @@ const unmarshalSetInstanceSettingsResponse = data => {
495
495
  settings: unmarshalArrayOfObject(data.settings, unmarshalInstanceSetting)
496
496
  };
497
497
  };
498
- const marshalEndpointSpecPrivateNetworkIpamConfig = (request, defaults) => ({});
499
- const marshalReadReplicaEndpointSpecPrivateNetworkIpamConfig = (request, defaults) => ({});
500
- const marshalEndpointSpecLoadBalancer = (request, defaults) => ({});
501
- const marshalEndpointSpecPrivateNetwork = (request, defaults) => ({
502
- private_network_id: request.privateNetworkId,
503
- ...resolveOneOf([{
504
- param: 'service_ip',
505
- value: request.serviceIp
506
- }, {
507
- param: 'ipam_config',
508
- value: request.ipamConfig ? marshalEndpointSpecPrivateNetworkIpamConfig(request.ipamConfig) : undefined
509
- }])
510
- });
511
- const marshalReadReplicaEndpointSpecDirectAccess = (request, defaults) => ({});
512
- const marshalReadReplicaEndpointSpecPrivateNetwork = (request, defaults) => ({
513
- private_network_id: request.privateNetworkId,
514
- ...resolveOneOf([{
515
- param: 'service_ip',
516
- value: request.serviceIp
517
- }, {
518
- param: 'ipam_config',
519
- value: request.ipamConfig ? marshalReadReplicaEndpointSpecPrivateNetworkIpamConfig(request.ipamConfig) : undefined
520
- }])
521
- });
522
- const marshalACLRuleRequest = (request, defaults) => ({
523
- description: request.description,
524
- ip: request.ip
525
- });
526
- const marshalEndpointSpec = (request, defaults) => ({
527
- ...resolveOneOf([{
528
- param: 'load_balancer',
529
- value: request.loadBalancer ? marshalEndpointSpecLoadBalancer(request.loadBalancer) : undefined
530
- }, {
531
- param: 'private_network',
532
- value: request.privateNetwork ? marshalEndpointSpecPrivateNetwork(request.privateNetwork) : undefined
533
- }])
534
- });
535
- const marshalInstanceSetting = (request, defaults) => ({
536
- name: request.name,
537
- value: request.value
538
- });
539
- const marshalLogsPolicy = (request, defaults) => ({
540
- max_age_retention: request.maxAgeRetention,
541
- total_disk_retention: request.totalDiskRetention
542
- });
543
- const marshalReadReplicaEndpointSpec = (request, defaults) => ({
544
- ...resolveOneOf([{
545
- param: 'direct_access',
546
- value: request.directAccess ? marshalReadReplicaEndpointSpecDirectAccess(request.directAccess) : undefined
547
- }, {
548
- param: 'private_network',
549
- value: request.privateNetwork ? marshalReadReplicaEndpointSpecPrivateNetwork(request.privateNetwork) : undefined
550
- }])
551
- });
552
498
  const marshalAddInstanceACLRulesRequest = (request, defaults) => ({
553
- rules: request.rules.map(elt => marshalACLRuleRequest(elt))
499
+ rules: request.rules
554
500
  });
555
501
  const marshalAddInstanceSettingsRequest = (request, defaults) => ({
556
- settings: request.settings.map(elt => marshalInstanceSetting(elt))
502
+ settings: request.settings
557
503
  });
558
504
  const marshalCloneInstanceRequest = (request, defaults) => ({
559
505
  name: request.name,
@@ -569,7 +515,7 @@ const marshalCreateDatabaseRequest = (request, defaults) => ({
569
515
  name: request.name
570
516
  });
571
517
  const marshalCreateEndpointRequest = (request, defaults) => ({
572
- endpoint_spec: request.endpointSpec ? marshalEndpointSpec(request.endpointSpec) : undefined
518
+ endpoint_spec: request.endpointSpec
573
519
  });
574
520
  const marshalCreateInstanceFromSnapshotRequest = (request, defaults) => ({
575
521
  instance_name: request.instanceName,
@@ -580,8 +526,8 @@ const marshalCreateInstanceRequest = (request, defaults) => ({
580
526
  backup_same_region: request.backupSameRegion,
581
527
  disable_backup: request.disableBackup,
582
528
  engine: request.engine,
583
- init_endpoints: request.initEndpoints ? request.initEndpoints.map(elt => marshalEndpointSpec(elt)) : undefined,
584
- init_settings: request.initSettings ? request.initSettings.map(elt => marshalInstanceSetting(elt)) : undefined,
529
+ init_endpoints: request.initEndpoints,
530
+ init_settings: request.initSettings,
585
531
  is_ha_cluster: request.isHaCluster,
586
532
  name: request.name || randomName('ins'),
587
533
  node_type: request.nodeType,
@@ -589,22 +535,20 @@ const marshalCreateInstanceRequest = (request, defaults) => ({
589
535
  tags: request.tags,
590
536
  user_name: request.userName,
591
537
  volume_size: request.volumeSize,
592
- volume_type: request.volumeType ?? 'lssd',
538
+ volume_type: request.volumeType,
593
539
  ...resolveOneOf([{
594
- default: defaults.defaultProjectId,
595
- param: 'project_id',
596
- value: request.projectId
597
- }, {
598
- default: defaults.defaultOrganizationId,
599
540
  param: 'organization_id',
600
541
  value: request.organizationId
542
+ }, {
543
+ param: 'project_id',
544
+ value: request.projectId
601
545
  }])
602
546
  });
603
547
  const marshalCreateReadReplicaEndpointRequest = (request, defaults) => ({
604
- endpoint_spec: request.endpointSpec.map(elt => marshalReadReplicaEndpointSpec(elt))
548
+ endpoint_spec: request.endpointSpec
605
549
  });
606
550
  const marshalCreateReadReplicaRequest = (request, defaults) => ({
607
- endpoint_spec: request.endpointSpec ? request.endpointSpec.map(elt => marshalReadReplicaEndpointSpec(elt)) : undefined,
551
+ endpoint_spec: request.endpointSpec,
608
552
  instance_id: request.instanceId,
609
553
  same_zone: request.sameZone
610
554
  });
@@ -638,14 +582,14 @@ const marshalRestoreDatabaseBackupRequest = (request, defaults) => ({
638
582
  instance_id: request.instanceId
639
583
  });
640
584
  const marshalSetInstanceACLRulesRequest = (request, defaults) => ({
641
- rules: request.rules.map(elt => marshalACLRuleRequest(elt))
585
+ rules: request.rules
642
586
  });
643
587
  const marshalSetInstanceSettingsRequest = (request, defaults) => ({
644
- settings: request.settings.map(elt => marshalInstanceSetting(elt))
588
+ settings: request.settings
645
589
  });
646
590
  const marshalSetPrivilegeRequest = (request, defaults) => ({
647
591
  database_name: request.databaseName,
648
- permission: request.permission ?? 'readonly',
592
+ permission: request.permission,
649
593
  user_name: request.userName
650
594
  });
651
595
  const marshalUpdateDatabaseBackupRequest = (request, defaults) => ({
@@ -658,7 +602,7 @@ const marshalUpdateInstanceRequest = (request, defaults) => ({
658
602
  backup_schedule_retention: request.backupScheduleRetention,
659
603
  backup_schedule_start_hour: request.backupScheduleStartHour,
660
604
  is_backup_schedule_disabled: request.isBackupScheduleDisabled,
661
- logs_policy: request.logsPolicy ? marshalLogsPolicy(request.logsPolicy) : undefined,
605
+ logs_policy: request.logsPolicy,
662
606
  name: request.name,
663
607
  tags: request.tags
664
608
  });
@@ -672,20 +616,20 @@ const marshalUpdateUserRequest = (request, defaults) => ({
672
616
  });
673
617
  const marshalUpgradeInstanceRequest = (request, defaults) => ({
674
618
  ...resolveOneOf([{
619
+ param: 'enable_ha',
620
+ value: request.enableHa
621
+ }, {
675
622
  param: 'node_type',
676
623
  value: request.nodeType
677
624
  }, {
678
- param: 'enable_ha',
679
- value: request.enableHa
625
+ param: 'upgradable_version_id',
626
+ value: request.upgradableVersionId
680
627
  }, {
681
628
  param: 'volume_size',
682
629
  value: request.volumeSize
683
630
  }, {
684
631
  param: 'volume_type',
685
632
  value: request.volumeType
686
- }, {
687
- param: 'upgradable_version_id',
688
- value: request.upgradableVersionId
689
633
  }])
690
634
  });
691
635
 
@@ -79,7 +79,7 @@ class API extends API$1 {
79
79
  return _this.client.fetch({
80
80
  method: 'GET',
81
81
  path: `/redis/v1/zones/${validatePathParam('zone', request.zone ?? _this.client.settings.defaultZone)}/clusters`,
82
- urlParams: urlParams(['name', request.name], ['order_by', request.orderBy ?? 'created_at_asc'], ['organization_id', request.organizationId], ['page', request.page], ['page_size', request.pageSize ?? _this.client.settings.defaultPageSize], ['project_id', request.projectId], ['tags', request.tags], ['version', request.version])
82
+ urlParams: urlParams(['name', request.name], ['order_by', request.orderBy], ['organization_id', request.organizationId], ['page', request.page], ['page_size', request.pageSize ?? _this.client.settings.defaultPageSize], ['project_id', request.projectId], ['tags', request.tags], ['version', request.version])
83
83
  }, unmarshalListClustersResponse);
84
84
  };
85
85
  })();