@scaleway/sdk-baremetal 2.6.2 → 2.7.1

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,499 +0,0 @@
1
- import { isJSONObject, marshalBlobToScwFile, resolveOneOf, unmarshalArrayOfObject, unmarshalDate, unmarshalMoney, unmarshalTimeSeries } from "@scaleway/sdk-client";
2
- //#region src/v1/marshalling.gen.ts
3
- const unmarshalSchemaPartition = (data) => {
4
- if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'SchemaPartition' failed as data isn't a dictionary.`);
5
- return {
6
- label: data.label,
7
- number: data.number,
8
- size: data.size,
9
- useAllAvailableSpace: data.use_all_available_space
10
- };
11
- };
12
- const unmarshalSchemaPool = (data) => {
13
- if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'SchemaPool' failed as data isn't a dictionary.`);
14
- return {
15
- devices: data.devices,
16
- filesystemOptions: data.filesystem_options,
17
- name: data.name,
18
- options: data.options,
19
- type: data.type
20
- };
21
- };
22
- const unmarshalSchemaDisk = (data) => {
23
- if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'SchemaDisk' failed as data isn't a dictionary.`);
24
- return {
25
- device: data.device,
26
- partitions: unmarshalArrayOfObject(data.partitions, unmarshalSchemaPartition)
27
- };
28
- };
29
- const unmarshalSchemaFilesystem = (data) => {
30
- if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'SchemaFilesystem' failed as data isn't a dictionary.`);
31
- return {
32
- device: data.device,
33
- format: data.format,
34
- mountpoint: data.mountpoint
35
- };
36
- };
37
- const unmarshalSchemaRAID = (data) => {
38
- if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'SchemaRAID' failed as data isn't a dictionary.`);
39
- return {
40
- devices: data.devices,
41
- level: data.level,
42
- name: data.name
43
- };
44
- };
45
- const unmarshalSchemaZFS = (data) => {
46
- if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'SchemaZFS' failed as data isn't a dictionary.`);
47
- return { pools: unmarshalArrayOfObject(data.pools, unmarshalSchemaPool) };
48
- };
49
- const unmarshalSchema = (data) => {
50
- if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'Schema' failed as data isn't a dictionary.`);
51
- return {
52
- disks: unmarshalArrayOfObject(data.disks, unmarshalSchemaDisk),
53
- filesystems: unmarshalArrayOfObject(data.filesystems, unmarshalSchemaFilesystem),
54
- raids: unmarshalArrayOfObject(data.raids, unmarshalSchemaRAID),
55
- zfs: data.zfs ? unmarshalSchemaZFS(data.zfs) : void 0
56
- };
57
- };
58
- const unmarshalIP = (data) => {
59
- if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'IP' failed as data isn't a dictionary.`);
60
- return {
61
- address: data.address,
62
- id: data.id,
63
- reverse: data.reverse,
64
- reverseStatus: data.reverse_status,
65
- reverseStatusMessage: data.reverse_status_message,
66
- version: data.version
67
- };
68
- };
69
- const unmarshalCertificationOption = (data) => {
70
- if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'CertificationOption' failed as data isn't a dictionary.`);
71
- return {};
72
- };
73
- const unmarshalLicenseOption = (data) => {
74
- if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'LicenseOption' failed as data isn't a dictionary.`);
75
- return { osId: data.os_id };
76
- };
77
- const unmarshalPrivateNetworkOption = (data) => {
78
- if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'PrivateNetworkOption' failed as data isn't a dictionary.`);
79
- return { bandwidthInBps: data.bandwidth_in_bps };
80
- };
81
- const unmarshalPublicBandwidthOption = (data) => {
82
- if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'PublicBandwidthOption' failed as data isn't a dictionary.`);
83
- return { bandwidthInBps: data.bandwidth_in_bps };
84
- };
85
- const unmarshalRemoteAccessOption = (data) => {
86
- if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'RemoteAccessOption' failed as data isn't a dictionary.`);
87
- return {};
88
- };
89
- const unmarshalServerInstall = (data) => {
90
- if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'ServerInstall' failed as data isn't a dictionary.`);
91
- return {
92
- hostname: data.hostname,
93
- osId: data.os_id,
94
- partitioningSchema: data.partitioning_schema ? unmarshalSchema(data.partitioning_schema) : void 0,
95
- serviceUrl: data.service_url,
96
- serviceUser: data.service_user,
97
- sshKeyIds: data.ssh_key_ids,
98
- status: data.status,
99
- user: data.user
100
- };
101
- };
102
- const unmarshalServerOption = (data) => {
103
- if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'ServerOption' failed as data isn't a dictionary.`);
104
- return {
105
- certification: data.certification ? unmarshalCertificationOption(data.certification) : void 0,
106
- expiresAt: unmarshalDate(data.expires_at),
107
- id: data.id,
108
- license: data.license ? unmarshalLicenseOption(data.license) : void 0,
109
- manageable: data.manageable,
110
- name: data.name,
111
- privateNetwork: data.private_network ? unmarshalPrivateNetworkOption(data.private_network) : void 0,
112
- publicBandwidth: data.public_bandwidth ? unmarshalPublicBandwidthOption(data.public_bandwidth) : void 0,
113
- remoteAccess: data.remote_access ? unmarshalRemoteAccessOption(data.remote_access) : void 0,
114
- status: data.status
115
- };
116
- };
117
- const unmarshalServerRescueServer = (data) => {
118
- if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'ServerRescueServer' failed as data isn't a dictionary.`);
119
- return {
120
- password: data.password,
121
- user: data.user
122
- };
123
- };
124
- const unmarshalServer = (data) => {
125
- if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'Server' failed as data isn't a dictionary.`);
126
- return {
127
- bootType: data.boot_type,
128
- createdAt: unmarshalDate(data.created_at),
129
- description: data.description,
130
- domain: data.domain,
131
- id: data.id,
132
- install: data.install ? unmarshalServerInstall(data.install) : void 0,
133
- ips: unmarshalArrayOfObject(data.ips, unmarshalIP),
134
- name: data.name,
135
- offerId: data.offer_id,
136
- offerName: data.offer_name,
137
- options: unmarshalArrayOfObject(data.options, unmarshalServerOption),
138
- organizationId: data.organization_id,
139
- pingStatus: data.ping_status,
140
- projectId: data.project_id,
141
- protected: data.protected,
142
- rescueServer: data.rescue_server ? unmarshalServerRescueServer(data.rescue_server) : void 0,
143
- status: data.status,
144
- tags: data.tags,
145
- updatedAt: unmarshalDate(data.updated_at),
146
- userData: data.user_data,
147
- zone: data.zone
148
- };
149
- };
150
- const unmarshalOSOSField = (data) => {
151
- if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'OSOSField' failed as data isn't a dictionary.`);
152
- return {
153
- defaultValue: data.default_value,
154
- editable: data.editable,
155
- required: data.required
156
- };
157
- };
158
- const unmarshalOS = (data) => {
159
- if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'OS' failed as data isn't a dictionary.`);
160
- return {
161
- allowed: data.allowed,
162
- cloudInitSupported: data.cloud_init_supported,
163
- cloudInitVersion: data.cloud_init_version,
164
- customPartitioningSupported: data.custom_partitioning_supported,
165
- enabled: data.enabled,
166
- id: data.id,
167
- licenseRequired: data.license_required,
168
- logoUrl: data.logo_url,
169
- name: data.name,
170
- password: data.password ? unmarshalOSOSField(data.password) : void 0,
171
- servicePassword: data.service_password ? unmarshalOSOSField(data.service_password) : void 0,
172
- serviceUser: data.service_user ? unmarshalOSOSField(data.service_user) : void 0,
173
- ssh: data.ssh ? unmarshalOSOSField(data.ssh) : void 0,
174
- user: data.user ? unmarshalOSOSField(data.user) : void 0,
175
- version: data.version,
176
- zone: data.zone
177
- };
178
- };
179
- const unmarshalCPU = (data) => {
180
- if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'CPU' failed as data isn't a dictionary.`);
181
- return {
182
- benchmark: data.benchmark,
183
- coreCount: data.core_count,
184
- frequency: data.frequency,
185
- name: data.name,
186
- threadCount: data.thread_count
187
- };
188
- };
189
- const unmarshalDisk = (data) => {
190
- if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'Disk' failed as data isn't a dictionary.`);
191
- return {
192
- capacity: data.capacity,
193
- type: data.type
194
- };
195
- };
196
- const unmarshalGPU = (data) => {
197
- if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'GPU' failed as data isn't a dictionary.`);
198
- return {
199
- name: data.name,
200
- vram: data.vram
201
- };
202
- };
203
- const unmarshalMemory = (data) => {
204
- if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'Memory' failed as data isn't a dictionary.`);
205
- return {
206
- capacity: data.capacity,
207
- frequency: data.frequency,
208
- isEcc: data.is_ecc,
209
- type: data.type
210
- };
211
- };
212
- const unmarshalOfferOptionOffer = (data) => {
213
- if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'OfferOptionOffer' failed as data isn't a dictionary.`);
214
- return {
215
- certification: data.certification ? unmarshalCertificationOption(data.certification) : void 0,
216
- enabled: data.enabled,
217
- id: data.id,
218
- license: data.license ? unmarshalLicenseOption(data.license) : void 0,
219
- manageable: data.manageable,
220
- name: data.name,
221
- osId: data.os_id,
222
- price: data.price ? unmarshalMoney(data.price) : void 0,
223
- privateNetwork: data.private_network ? unmarshalPrivateNetworkOption(data.private_network) : void 0,
224
- publicBandwidth: data.public_bandwidth ? unmarshalPublicBandwidthOption(data.public_bandwidth) : void 0,
225
- remoteAccess: data.remote_access ? unmarshalRemoteAccessOption(data.remote_access) : void 0,
226
- subscriptionPeriod: data.subscription_period
227
- };
228
- };
229
- const unmarshalPersistentMemory = (data) => {
230
- if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'PersistentMemory' failed as data isn't a dictionary.`);
231
- return {
232
- capacity: data.capacity,
233
- frequency: data.frequency,
234
- type: data.type
235
- };
236
- };
237
- const unmarshalRaidController = (data) => {
238
- if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'RaidController' failed as data isn't a dictionary.`);
239
- return {
240
- model: data.model,
241
- raidLevel: data.raid_level
242
- };
243
- };
244
- const unmarshalOffer = (data) => {
245
- if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'Offer' failed as data isn't a dictionary.`);
246
- return {
247
- bandwidth: data.bandwidth,
248
- commercialRange: data.commercial_range,
249
- cpus: unmarshalArrayOfObject(data.cpus, unmarshalCPU),
250
- disks: unmarshalArrayOfObject(data.disks, unmarshalDisk),
251
- enable: data.enable,
252
- fee: data.fee ? unmarshalMoney(data.fee) : void 0,
253
- gpus: unmarshalArrayOfObject(data.gpus, unmarshalGPU),
254
- id: data.id,
255
- incompatibleOsIds: data.incompatible_os_ids,
256
- maxBandwidth: data.max_bandwidth,
257
- memories: unmarshalArrayOfObject(data.memories, unmarshalMemory),
258
- monthlyOfferId: data.monthly_offer_id,
259
- name: data.name,
260
- operationPath: data.operation_path,
261
- options: unmarshalArrayOfObject(data.options, unmarshalOfferOptionOffer),
262
- persistentMemories: unmarshalArrayOfObject(data.persistent_memories, unmarshalPersistentMemory),
263
- pricePerHour: data.price_per_hour ? unmarshalMoney(data.price_per_hour) : void 0,
264
- pricePerMonth: data.price_per_month ? unmarshalMoney(data.price_per_month) : void 0,
265
- privateBandwidth: data.private_bandwidth,
266
- quotaName: data.quota_name,
267
- raidControllers: unmarshalArrayOfObject(data.raid_controllers, unmarshalRaidController),
268
- sharedBandwidth: data.shared_bandwidth,
269
- stock: data.stock,
270
- subscriptionPeriod: data.subscription_period,
271
- tags: data.tags,
272
- zone: data.zone
273
- };
274
- };
275
- const unmarshalOption = (data) => {
276
- if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'Option' failed as data isn't a dictionary.`);
277
- return {
278
- certification: data.certification ? unmarshalCertificationOption(data.certification) : void 0,
279
- id: data.id,
280
- license: data.license ? unmarshalLicenseOption(data.license) : void 0,
281
- manageable: data.manageable,
282
- name: data.name,
283
- privateNetwork: data.private_network ? unmarshalPrivateNetworkOption(data.private_network) : void 0,
284
- publicBandwidth: data.public_bandwidth ? unmarshalPublicBandwidthOption(data.public_bandwidth) : void 0,
285
- remoteAccess: data.remote_access ? unmarshalRemoteAccessOption(data.remote_access) : void 0
286
- };
287
- };
288
- const unmarshalServerPrivateNetwork = (data) => {
289
- if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'ServerPrivateNetwork' failed as data isn't a dictionary.`);
290
- return {
291
- createdAt: unmarshalDate(data.created_at),
292
- id: data.id,
293
- privateNetworkId: data.private_network_id,
294
- projectId: data.project_id,
295
- serverId: data.server_id,
296
- status: data.status,
297
- updatedAt: unmarshalDate(data.updated_at),
298
- vlan: data.vlan
299
- };
300
- };
301
- const unmarshalSetting = (data) => {
302
- if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'Setting' failed as data isn't a dictionary.`);
303
- return {
304
- enabled: data.enabled,
305
- id: data.id,
306
- projectId: data.project_id,
307
- type: data.type
308
- };
309
- };
310
- const unmarshalBMCAccess = (data) => {
311
- if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'BMCAccess' failed as data isn't a dictionary.`);
312
- return {
313
- expiresAt: unmarshalDate(data.expires_at),
314
- login: data.login,
315
- password: data.password,
316
- url: data.url
317
- };
318
- };
319
- const unmarshalBatchCreateServersResponse = (data) => {
320
- if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'BatchCreateServersResponse' failed as data isn't a dictionary.`);
321
- return { servers: unmarshalArrayOfObject(data.servers, unmarshalServer) };
322
- };
323
- const unmarshalGetServerMetricsResponse = (data) => {
324
- if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'GetServerMetricsResponse' failed as data isn't a dictionary.`);
325
- return { pings: data.pings ? unmarshalTimeSeries(data.pings) : void 0 };
326
- };
327
- const unmarshalListOSResponse = (data) => {
328
- if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'ListOSResponse' failed as data isn't a dictionary.`);
329
- return {
330
- os: unmarshalArrayOfObject(data.os, unmarshalOS),
331
- totalCount: data.total_count
332
- };
333
- };
334
- const unmarshalListOffersResponse = (data) => {
335
- if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'ListOffersResponse' failed as data isn't a dictionary.`);
336
- return {
337
- offers: unmarshalArrayOfObject(data.offers, unmarshalOffer),
338
- totalCount: data.total_count
339
- };
340
- };
341
- const unmarshalListOptionsResponse = (data) => {
342
- if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'ListOptionsResponse' failed as data isn't a dictionary.`);
343
- return {
344
- options: unmarshalArrayOfObject(data.options, unmarshalOption),
345
- totalCount: data.total_count
346
- };
347
- };
348
- const unmarshalServerEvent = (data) => {
349
- if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'ServerEvent' failed as data isn't a dictionary.`);
350
- return {
351
- action: data.action,
352
- createdAt: unmarshalDate(data.created_at),
353
- id: data.id,
354
- updatedAt: unmarshalDate(data.updated_at)
355
- };
356
- };
357
- const unmarshalListServerEventsResponse = (data) => {
358
- if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'ListServerEventsResponse' failed as data isn't a dictionary.`);
359
- return {
360
- events: unmarshalArrayOfObject(data.events, unmarshalServerEvent),
361
- totalCount: data.total_count
362
- };
363
- };
364
- const unmarshalListServerPrivateNetworksResponse = (data) => {
365
- if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'ListServerPrivateNetworksResponse' failed as data isn't a dictionary.`);
366
- return {
367
- serverPrivateNetworks: unmarshalArrayOfObject(data.server_private_networks, unmarshalServerPrivateNetwork),
368
- totalCount: data.total_count
369
- };
370
- };
371
- const unmarshalListServersResponse = (data) => {
372
- if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'ListServersResponse' failed as data isn't a dictionary.`);
373
- return {
374
- servers: unmarshalArrayOfObject(data.servers, unmarshalServer),
375
- totalCount: data.total_count
376
- };
377
- };
378
- const unmarshalListSettingsResponse = (data) => {
379
- if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'ListSettingsResponse' failed as data isn't a dictionary.`);
380
- return {
381
- settings: unmarshalArrayOfObject(data.settings, unmarshalSetting),
382
- totalCount: data.total_count
383
- };
384
- };
385
- const unmarshalSetServerPrivateNetworksResponse = (data) => {
386
- if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'SetServerPrivateNetworksResponse' failed as data isn't a dictionary.`);
387
- return { serverPrivateNetworks: unmarshalArrayOfObject(data.server_private_networks, unmarshalServerPrivateNetwork) };
388
- };
389
- const marshalSchemaPartition = (request, defaults) => ({
390
- label: request.label,
391
- number: request.number,
392
- size: request.size,
393
- use_all_available_space: request.useAllAvailableSpace
394
- });
395
- const marshalSchemaPool = (request, defaults) => ({
396
- devices: request.devices,
397
- filesystem_options: request.filesystemOptions,
398
- name: request.name,
399
- options: request.options,
400
- type: request.type
401
- });
402
- const marshalSchemaDisk = (request, defaults) => ({
403
- device: request.device,
404
- partitions: request.partitions.map((elt) => marshalSchemaPartition(elt, defaults))
405
- });
406
- const marshalSchemaFilesystem = (request, defaults) => ({
407
- device: request.device,
408
- format: request.format,
409
- mountpoint: request.mountpoint
410
- });
411
- const marshalSchemaRAID = (request, defaults) => ({
412
- devices: request.devices,
413
- level: request.level,
414
- name: request.name
415
- });
416
- const marshalSchemaZFS = (request, defaults) => ({ pools: request.pools.map((elt) => marshalSchemaPool(elt, defaults)) });
417
- const marshalSchema = (request, defaults) => ({
418
- disks: request.disks.map((elt) => marshalSchemaDisk(elt, defaults)),
419
- filesystems: request.filesystems.map((elt) => marshalSchemaFilesystem(elt, defaults)),
420
- raids: request.raids.map((elt) => marshalSchemaRAID(elt, defaults)),
421
- zfs: request.zfs !== void 0 ? marshalSchemaZFS(request.zfs, defaults) : void 0
422
- });
423
- const marshalCreateServerRequestInstall = (request, defaults) => ({
424
- hostname: request.hostname,
425
- os_id: request.osId,
426
- partitioning_schema: request.partitioningSchema !== void 0 ? marshalSchema(request.partitioningSchema, defaults) : void 0,
427
- password: request.password,
428
- service_password: request.servicePassword,
429
- service_user: request.serviceUser,
430
- ssh_key_ids: request.sshKeyIds,
431
- user: request.user
432
- });
433
- const marshalCreateServerRequest = (request, defaults) => ({
434
- description: request.description,
435
- install: request.install !== void 0 ? marshalCreateServerRequestInstall(request.install, defaults) : void 0,
436
- name: request.name,
437
- offer_id: request.offerId,
438
- option_ids: request.optionIds,
439
- protected: request.protected,
440
- tags: request.tags,
441
- user_data: request.userData,
442
- ...resolveOneOf([{
443
- default: defaults.defaultProjectId,
444
- param: "project_id",
445
- value: request.projectId
446
- }, {
447
- default: defaults.defaultOrganizationId,
448
- param: "organization_id",
449
- value: request.organizationId
450
- }])
451
- });
452
- const marshalAddOptionServerRequest = (request, defaults) => ({ expires_at: request.expiresAt });
453
- const marshalBatchCreateServersRequestServerConfig = (request, defaults) => ({
454
- description: request.description,
455
- hostname: request.hostname,
456
- tags: request.tags
457
- });
458
- const marshalBatchCreateServersRequest = (request, defaults) => ({
459
- common_configuration: request.commonConfiguration !== void 0 ? marshalCreateServerRequest(request.commonConfiguration, defaults) : void 0,
460
- servers: request.servers !== void 0 ? request.servers.map((elt) => marshalBatchCreateServersRequestServerConfig(elt, defaults)) : void 0
461
- });
462
- const marshalInstallServerRequest = async (request, defaults) => ({
463
- hostname: request.hostname,
464
- os_id: request.osId,
465
- partitioning_schema: request.partitioningSchema !== void 0 ? marshalSchema(request.partitioningSchema, defaults) : void 0,
466
- password: request.password,
467
- service_password: request.servicePassword,
468
- service_user: request.serviceUser,
469
- ssh_key_ids: request.sshKeyIds,
470
- user: request.user,
471
- user_data: request.userData !== void 0 ? await marshalBlobToScwFile(request.userData) : void 0
472
- });
473
- const marshalPrivateNetworkApiAddServerPrivateNetworkRequest = (request, defaults) => ({ private_network_id: request.privateNetworkId });
474
- const marshalPrivateNetworkApiSetServerPrivateNetworksRequest = (request, defaults) => ({ private_network_ids: request.privateNetworkIds });
475
- const marshalRebootServerRequest = (request, defaults) => ({
476
- boot_type: request.bootType,
477
- ssh_key_ids: request.sshKeyIds
478
- });
479
- const marshalStartBMCAccessRequest = (request, defaults) => ({ ip: request.ip });
480
- const marshalStartServerRequest = (request, defaults) => ({
481
- boot_type: request.bootType,
482
- ssh_key_ids: request.sshKeyIds
483
- });
484
- const marshalUpdateIPRequest = (request, defaults) => ({ reverse: request.reverse });
485
- const marshalUpdateServerRequest = (request, defaults) => ({
486
- description: request.description,
487
- name: request.name,
488
- protected: request.protected,
489
- tags: request.tags,
490
- user_data: request.userData
491
- });
492
- const marshalUpdateSettingRequest = (request, defaults) => ({ enabled: request.enabled });
493
- const marshalValidatePartitioningSchemaRequest = (request, defaults) => ({
494
- offer_id: request.offerId,
495
- os_id: request.osId,
496
- partitioning_schema: request.partitioningSchema !== void 0 ? marshalSchema(request.partitioningSchema, defaults) : void 0
497
- });
498
- //#endregion
499
- export { marshalAddOptionServerRequest, marshalBatchCreateServersRequest, marshalCreateServerRequest, marshalInstallServerRequest, marshalPrivateNetworkApiAddServerPrivateNetworkRequest, marshalPrivateNetworkApiSetServerPrivateNetworksRequest, marshalRebootServerRequest, marshalSchema, marshalStartBMCAccessRequest, marshalStartServerRequest, marshalUpdateIPRequest, marshalUpdateServerRequest, marshalUpdateSettingRequest, marshalValidatePartitioningSchemaRequest, unmarshalBMCAccess, unmarshalBatchCreateServersResponse, unmarshalGetServerMetricsResponse, unmarshalIP, unmarshalListOSResponse, unmarshalListOffersResponse, unmarshalListOptionsResponse, unmarshalListServerEventsResponse, unmarshalListServerPrivateNetworksResponse, unmarshalListServersResponse, unmarshalListSettingsResponse, unmarshalOS, unmarshalOffer, unmarshalOption, unmarshalSchema, unmarshalServer, unmarshalServerPrivateNetwork, unmarshalSetServerPrivateNetworksResponse, unmarshalSetting };
@@ -1,154 +0,0 @@
1
- export declare const queriesMetadata: {
2
- readonly namespace: 'baremetal';
3
- readonly version: 'v1';
4
- readonly folderName: 'baremetalv1';
5
- readonly services: readonly [{
6
- readonly apiClass: 'API';
7
- readonly methods: readonly [{
8
- readonly methodName: 'listServers';
9
- readonly protoName: 'ListServers';
10
- readonly paramsType: 'ListServersRequest';
11
- readonly returnType: 'ListServersResponse';
12
- readonly isList: true;
13
- readonly paginationType: 'offset';
14
- readonly pageParamKey: 'page';
15
- readonly listItemType: 'Server';
16
- readonly isPrivate: false;
17
- readonly description: '"';
18
- }, {
19
- readonly methodName: 'getServer';
20
- readonly protoName: 'GetServer';
21
- readonly paramsType: 'GetServerRequest';
22
- readonly returnType: 'Server';
23
- readonly isList: false;
24
- readonly paginationType: 'none';
25
- readonly isPrivate: false;
26
- readonly description: '"';
27
- readonly hasWaiter: true;
28
- }, {
29
- readonly methodName: 'getServerMetrics';
30
- readonly protoName: 'GetServerMetrics';
31
- readonly paramsType: 'GetServerMetricsRequest';
32
- readonly returnType: 'GetServerMetricsResponse';
33
- readonly isList: false;
34
- readonly paginationType: 'none';
35
- readonly isPrivate: false;
36
- readonly description: '"';
37
- }, {
38
- readonly methodName: 'listServerEvents';
39
- readonly protoName: 'ListServerEvents';
40
- readonly paramsType: 'ListServerEventsRequest';
41
- readonly returnType: 'ListServerEventsResponse';
42
- readonly isList: true;
43
- readonly paginationType: 'offset';
44
- readonly pageParamKey: 'page';
45
- readonly listItemType: 'ServerEvent';
46
- readonly isPrivate: false;
47
- readonly description: '"';
48
- }, {
49
- readonly methodName: 'getDefaultPartitioningSchema';
50
- readonly protoName: 'GetDefaultPartitioningSchema';
51
- readonly paramsType: 'GetDefaultPartitioningSchemaRequest';
52
- readonly returnType: 'Schema';
53
- readonly isList: false;
54
- readonly paginationType: 'none';
55
- readonly isPrivate: false;
56
- readonly description: '"';
57
- }, {
58
- readonly methodName: 'getBMCAccess';
59
- readonly protoName: 'GetBMCAccess';
60
- readonly paramsType: 'GetBMCAccessRequest';
61
- readonly returnType: 'BMCAccess';
62
- readonly isList: false;
63
- readonly paginationType: 'none';
64
- readonly isPrivate: false;
65
- readonly description: '"';
66
- }, {
67
- readonly methodName: 'listOffers';
68
- readonly protoName: 'ListOffers';
69
- readonly paramsType: 'ListOffersRequest';
70
- readonly returnType: 'ListOffersResponse';
71
- readonly isList: true;
72
- readonly paginationType: 'offset';
73
- readonly pageParamKey: 'page';
74
- readonly listItemType: 'Offer';
75
- readonly isPrivate: false;
76
- readonly description: '"';
77
- }, {
78
- readonly methodName: 'getOffer';
79
- readonly protoName: 'GetOffer';
80
- readonly paramsType: 'GetOfferRequest';
81
- readonly returnType: 'Offer';
82
- readonly isList: false;
83
- readonly paginationType: 'none';
84
- readonly isPrivate: false;
85
- readonly description: '"';
86
- }, {
87
- readonly methodName: 'getOption';
88
- readonly protoName: 'GetOption';
89
- readonly paramsType: 'GetOptionRequest';
90
- readonly returnType: 'Option';
91
- readonly isList: false;
92
- readonly paginationType: 'none';
93
- readonly isPrivate: false;
94
- readonly description: '"';
95
- }, {
96
- readonly methodName: 'listOptions';
97
- readonly protoName: 'ListOptions';
98
- readonly paramsType: 'ListOptionsRequest';
99
- readonly returnType: 'ListOptionsResponse';
100
- readonly isList: true;
101
- readonly paginationType: 'offset';
102
- readonly pageParamKey: 'page';
103
- readonly listItemType: 'Option';
104
- readonly isPrivate: false;
105
- readonly description: '"';
106
- }, {
107
- readonly methodName: 'listSettings';
108
- readonly protoName: 'ListSettings';
109
- readonly paramsType: 'ListSettingsRequest';
110
- readonly returnType: 'ListSettingsResponse';
111
- readonly isList: true;
112
- readonly paginationType: 'offset';
113
- readonly pageParamKey: 'page';
114
- readonly listItemType: 'Setting';
115
- readonly isPrivate: false;
116
- readonly description: '"';
117
- }, {
118
- readonly methodName: 'listOS';
119
- readonly protoName: 'ListOS';
120
- readonly paramsType: 'ListOSRequest';
121
- readonly returnType: 'ListOSResponse';
122
- readonly isList: true;
123
- readonly paginationType: 'offset';
124
- readonly pageParamKey: 'page';
125
- readonly listItemType: 'OS';
126
- readonly isPrivate: false;
127
- readonly description: '"';
128
- }, {
129
- readonly methodName: 'getOS';
130
- readonly protoName: 'GetOS';
131
- readonly paramsType: 'GetOSRequest';
132
- readonly returnType: 'OS';
133
- readonly isList: false;
134
- readonly paginationType: 'none';
135
- readonly isPrivate: false;
136
- readonly description: '"';
137
- }];
138
- }, {
139
- readonly apiClass: 'PrivateNetworkAPI';
140
- readonly methods: readonly [{
141
- readonly methodName: 'listServerPrivateNetworks';
142
- readonly protoName: 'ListServerPrivateNetworks';
143
- readonly paramsType: 'PrivateNetworkApiListServerPrivateNetworksRequest';
144
- readonly returnType: 'ListServerPrivateNetworksResponse';
145
- readonly isList: true;
146
- readonly paginationType: 'offset';
147
- readonly pageParamKey: 'page';
148
- readonly listItemType: 'ServerPrivateNetwork';
149
- readonly isPrivate: false;
150
- readonly description: '"';
151
- }];
152
- }];
153
- };
154
- export type QueriesMetadata = typeof queriesMetadata;