@scaleway/sdk-baremetal 2.7.0 → 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,500 +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
- eccType: data.ecc_type,
208
- frequency: data.frequency,
209
- isEcc: data.is_ecc,
210
- type: data.type
211
- };
212
- };
213
- const unmarshalOfferOptionOffer = (data) => {
214
- if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'OfferOptionOffer' failed as data isn't a dictionary.`);
215
- return {
216
- certification: data.certification ? unmarshalCertificationOption(data.certification) : void 0,
217
- enabled: data.enabled,
218
- id: data.id,
219
- license: data.license ? unmarshalLicenseOption(data.license) : void 0,
220
- manageable: data.manageable,
221
- name: data.name,
222
- osId: data.os_id,
223
- price: data.price ? unmarshalMoney(data.price) : void 0,
224
- privateNetwork: data.private_network ? unmarshalPrivateNetworkOption(data.private_network) : void 0,
225
- publicBandwidth: data.public_bandwidth ? unmarshalPublicBandwidthOption(data.public_bandwidth) : void 0,
226
- remoteAccess: data.remote_access ? unmarshalRemoteAccessOption(data.remote_access) : void 0,
227
- subscriptionPeriod: data.subscription_period
228
- };
229
- };
230
- const unmarshalPersistentMemory = (data) => {
231
- if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'PersistentMemory' failed as data isn't a dictionary.`);
232
- return {
233
- capacity: data.capacity,
234
- frequency: data.frequency,
235
- type: data.type
236
- };
237
- };
238
- const unmarshalRaidController = (data) => {
239
- if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'RaidController' failed as data isn't a dictionary.`);
240
- return {
241
- model: data.model,
242
- raidLevel: data.raid_level
243
- };
244
- };
245
- const unmarshalOffer = (data) => {
246
- if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'Offer' failed as data isn't a dictionary.`);
247
- return {
248
- bandwidth: data.bandwidth,
249
- commercialRange: data.commercial_range,
250
- cpus: unmarshalArrayOfObject(data.cpus, unmarshalCPU),
251
- disks: unmarshalArrayOfObject(data.disks, unmarshalDisk),
252
- enable: data.enable,
253
- fee: data.fee ? unmarshalMoney(data.fee) : void 0,
254
- gpus: unmarshalArrayOfObject(data.gpus, unmarshalGPU),
255
- id: data.id,
256
- incompatibleOsIds: data.incompatible_os_ids,
257
- maxBandwidth: data.max_bandwidth,
258
- memories: unmarshalArrayOfObject(data.memories, unmarshalMemory),
259
- monthlyOfferId: data.monthly_offer_id,
260
- name: data.name,
261
- operationPath: data.operation_path,
262
- options: unmarshalArrayOfObject(data.options, unmarshalOfferOptionOffer),
263
- persistentMemories: unmarshalArrayOfObject(data.persistent_memories, unmarshalPersistentMemory),
264
- pricePerHour: data.price_per_hour ? unmarshalMoney(data.price_per_hour) : void 0,
265
- pricePerMonth: data.price_per_month ? unmarshalMoney(data.price_per_month) : void 0,
266
- privateBandwidth: data.private_bandwidth,
267
- quotaName: data.quota_name,
268
- raidControllers: unmarshalArrayOfObject(data.raid_controllers, unmarshalRaidController),
269
- sharedBandwidth: data.shared_bandwidth,
270
- stock: data.stock,
271
- subscriptionPeriod: data.subscription_period,
272
- tags: data.tags,
273
- zone: data.zone
274
- };
275
- };
276
- const unmarshalOption = (data) => {
277
- if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'Option' failed as data isn't a dictionary.`);
278
- return {
279
- certification: data.certification ? unmarshalCertificationOption(data.certification) : void 0,
280
- id: data.id,
281
- license: data.license ? unmarshalLicenseOption(data.license) : void 0,
282
- manageable: data.manageable,
283
- name: data.name,
284
- privateNetwork: data.private_network ? unmarshalPrivateNetworkOption(data.private_network) : void 0,
285
- publicBandwidth: data.public_bandwidth ? unmarshalPublicBandwidthOption(data.public_bandwidth) : void 0,
286
- remoteAccess: data.remote_access ? unmarshalRemoteAccessOption(data.remote_access) : void 0
287
- };
288
- };
289
- const unmarshalServerPrivateNetwork = (data) => {
290
- if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'ServerPrivateNetwork' failed as data isn't a dictionary.`);
291
- return {
292
- createdAt: unmarshalDate(data.created_at),
293
- id: data.id,
294
- privateNetworkId: data.private_network_id,
295
- projectId: data.project_id,
296
- serverId: data.server_id,
297
- status: data.status,
298
- updatedAt: unmarshalDate(data.updated_at),
299
- vlan: data.vlan
300
- };
301
- };
302
- const unmarshalSetting = (data) => {
303
- if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'Setting' failed as data isn't a dictionary.`);
304
- return {
305
- enabled: data.enabled,
306
- id: data.id,
307
- projectId: data.project_id,
308
- type: data.type
309
- };
310
- };
311
- const unmarshalBMCAccess = (data) => {
312
- if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'BMCAccess' failed as data isn't a dictionary.`);
313
- return {
314
- expiresAt: unmarshalDate(data.expires_at),
315
- login: data.login,
316
- password: data.password,
317
- url: data.url
318
- };
319
- };
320
- const unmarshalBatchCreateServersResponse = (data) => {
321
- if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'BatchCreateServersResponse' failed as data isn't a dictionary.`);
322
- return { servers: unmarshalArrayOfObject(data.servers, unmarshalServer) };
323
- };
324
- const unmarshalGetServerMetricsResponse = (data) => {
325
- if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'GetServerMetricsResponse' failed as data isn't a dictionary.`);
326
- return { pings: data.pings ? unmarshalTimeSeries(data.pings) : void 0 };
327
- };
328
- const unmarshalListOSResponse = (data) => {
329
- if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'ListOSResponse' failed as data isn't a dictionary.`);
330
- return {
331
- os: unmarshalArrayOfObject(data.os, unmarshalOS),
332
- totalCount: data.total_count
333
- };
334
- };
335
- const unmarshalListOffersResponse = (data) => {
336
- if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'ListOffersResponse' failed as data isn't a dictionary.`);
337
- return {
338
- offers: unmarshalArrayOfObject(data.offers, unmarshalOffer),
339
- totalCount: data.total_count
340
- };
341
- };
342
- const unmarshalListOptionsResponse = (data) => {
343
- if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'ListOptionsResponse' failed as data isn't a dictionary.`);
344
- return {
345
- options: unmarshalArrayOfObject(data.options, unmarshalOption),
346
- totalCount: data.total_count
347
- };
348
- };
349
- const unmarshalServerEvent = (data) => {
350
- if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'ServerEvent' failed as data isn't a dictionary.`);
351
- return {
352
- action: data.action,
353
- createdAt: unmarshalDate(data.created_at),
354
- id: data.id,
355
- updatedAt: unmarshalDate(data.updated_at)
356
- };
357
- };
358
- const unmarshalListServerEventsResponse = (data) => {
359
- if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'ListServerEventsResponse' failed as data isn't a dictionary.`);
360
- return {
361
- events: unmarshalArrayOfObject(data.events, unmarshalServerEvent),
362
- totalCount: data.total_count
363
- };
364
- };
365
- const unmarshalListServerPrivateNetworksResponse = (data) => {
366
- if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'ListServerPrivateNetworksResponse' failed as data isn't a dictionary.`);
367
- return {
368
- serverPrivateNetworks: unmarshalArrayOfObject(data.server_private_networks, unmarshalServerPrivateNetwork),
369
- totalCount: data.total_count
370
- };
371
- };
372
- const unmarshalListServersResponse = (data) => {
373
- if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'ListServersResponse' failed as data isn't a dictionary.`);
374
- return {
375
- servers: unmarshalArrayOfObject(data.servers, unmarshalServer),
376
- totalCount: data.total_count
377
- };
378
- };
379
- const unmarshalListSettingsResponse = (data) => {
380
- if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'ListSettingsResponse' failed as data isn't a dictionary.`);
381
- return {
382
- settings: unmarshalArrayOfObject(data.settings, unmarshalSetting),
383
- totalCount: data.total_count
384
- };
385
- };
386
- const unmarshalSetServerPrivateNetworksResponse = (data) => {
387
- if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'SetServerPrivateNetworksResponse' failed as data isn't a dictionary.`);
388
- return { serverPrivateNetworks: unmarshalArrayOfObject(data.server_private_networks, unmarshalServerPrivateNetwork) };
389
- };
390
- const marshalSchemaPartition = (request, defaults) => ({
391
- label: request.label,
392
- number: request.number,
393
- size: request.size,
394
- use_all_available_space: request.useAllAvailableSpace
395
- });
396
- const marshalSchemaPool = (request, defaults) => ({
397
- devices: request.devices,
398
- filesystem_options: request.filesystemOptions,
399
- name: request.name,
400
- options: request.options,
401
- type: request.type
402
- });
403
- const marshalSchemaDisk = (request, defaults) => ({
404
- device: request.device,
405
- partitions: request.partitions.map((elt) => marshalSchemaPartition(elt, defaults))
406
- });
407
- const marshalSchemaFilesystem = (request, defaults) => ({
408
- device: request.device,
409
- format: request.format,
410
- mountpoint: request.mountpoint
411
- });
412
- const marshalSchemaRAID = (request, defaults) => ({
413
- devices: request.devices,
414
- level: request.level,
415
- name: request.name
416
- });
417
- const marshalSchemaZFS = (request, defaults) => ({ pools: request.pools.map((elt) => marshalSchemaPool(elt, defaults)) });
418
- const marshalSchema = (request, defaults) => ({
419
- disks: request.disks.map((elt) => marshalSchemaDisk(elt, defaults)),
420
- filesystems: request.filesystems.map((elt) => marshalSchemaFilesystem(elt, defaults)),
421
- raids: request.raids.map((elt) => marshalSchemaRAID(elt, defaults)),
422
- zfs: request.zfs !== void 0 ? marshalSchemaZFS(request.zfs, defaults) : void 0
423
- });
424
- const marshalCreateServerRequestInstall = (request, defaults) => ({
425
- hostname: request.hostname,
426
- os_id: request.osId,
427
- partitioning_schema: request.partitioningSchema !== void 0 ? marshalSchema(request.partitioningSchema, defaults) : void 0,
428
- password: request.password,
429
- service_password: request.servicePassword,
430
- service_user: request.serviceUser,
431
- ssh_key_ids: request.sshKeyIds,
432
- user: request.user
433
- });
434
- const marshalCreateServerRequest = (request, defaults) => ({
435
- description: request.description,
436
- install: request.install !== void 0 ? marshalCreateServerRequestInstall(request.install, defaults) : void 0,
437
- name: request.name,
438
- offer_id: request.offerId,
439
- option_ids: request.optionIds,
440
- protected: request.protected,
441
- tags: request.tags,
442
- user_data: request.userData,
443
- ...resolveOneOf([{
444
- default: defaults.defaultProjectId,
445
- param: "project_id",
446
- value: request.projectId
447
- }, {
448
- default: defaults.defaultOrganizationId,
449
- param: "organization_id",
450
- value: request.organizationId
451
- }])
452
- });
453
- const marshalAddOptionServerRequest = (request, defaults) => ({ expires_at: request.expiresAt });
454
- const marshalBatchCreateServersRequestServerConfig = (request, defaults) => ({
455
- description: request.description,
456
- hostname: request.hostname,
457
- tags: request.tags
458
- });
459
- const marshalBatchCreateServersRequest = (request, defaults) => ({
460
- common_configuration: request.commonConfiguration !== void 0 ? marshalCreateServerRequest(request.commonConfiguration, defaults) : void 0,
461
- servers: request.servers !== void 0 ? request.servers.map((elt) => marshalBatchCreateServersRequestServerConfig(elt, defaults)) : void 0
462
- });
463
- const marshalInstallServerRequest = async (request, defaults) => ({
464
- hostname: request.hostname,
465
- os_id: request.osId,
466
- partitioning_schema: request.partitioningSchema !== void 0 ? marshalSchema(request.partitioningSchema, defaults) : void 0,
467
- password: request.password,
468
- service_password: request.servicePassword,
469
- service_user: request.serviceUser,
470
- ssh_key_ids: request.sshKeyIds,
471
- user: request.user,
472
- user_data: request.userData !== void 0 ? await marshalBlobToScwFile(request.userData) : void 0
473
- });
474
- const marshalPrivateNetworkApiAddServerPrivateNetworkRequest = (request, defaults) => ({ private_network_id: request.privateNetworkId });
475
- const marshalPrivateNetworkApiSetServerPrivateNetworksRequest = (request, defaults) => ({ private_network_ids: request.privateNetworkIds });
476
- const marshalRebootServerRequest = (request, defaults) => ({
477
- boot_type: request.bootType,
478
- ssh_key_ids: request.sshKeyIds
479
- });
480
- const marshalStartBMCAccessRequest = (request, defaults) => ({ ip: request.ip });
481
- const marshalStartServerRequest = (request, defaults) => ({
482
- boot_type: request.bootType,
483
- ssh_key_ids: request.sshKeyIds
484
- });
485
- const marshalUpdateIPRequest = (request, defaults) => ({ reverse: request.reverse });
486
- const marshalUpdateServerRequest = (request, defaults) => ({
487
- description: request.description,
488
- name: request.name,
489
- protected: request.protected,
490
- tags: request.tags,
491
- user_data: request.userData
492
- });
493
- const marshalUpdateSettingRequest = (request, defaults) => ({ enabled: request.enabled });
494
- const marshalValidatePartitioningSchemaRequest = (request, defaults) => ({
495
- offer_id: request.offerId,
496
- os_id: request.osId,
497
- partitioning_schema: request.partitioningSchema !== void 0 ? marshalSchema(request.partitioningSchema, defaults) : void 0
498
- });
499
- //#endregion
500
- 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;