@scaleway/sdk-baremetal 2.2.1 → 2.3.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.
@@ -1,709 +1,484 @@
1
- import { resolveOneOf, marshalBlobToScwFile, isJSONObject, unmarshalArrayOfObject, unmarshalDate, unmarshalTimeSeries, unmarshalMoney } from "@scaleway/sdk-client";
2
- const unmarshalSchemaPartition = (data) => {
3
- if (!isJSONObject(data)) {
4
- throw new TypeError(
5
- `Unmarshalling the type 'SchemaPartition' failed as data isn't a dictionary.`
6
- );
7
- }
8
- return {
9
- label: data.label,
10
- number: data.number,
11
- size: data.size,
12
- useAllAvailableSpace: data.use_all_available_space
13
- };
14
- };
15
- const unmarshalSchemaPool = (data) => {
16
- if (!isJSONObject(data)) {
17
- throw new TypeError(
18
- `Unmarshalling the type 'SchemaPool' failed as data isn't a dictionary.`
19
- );
20
- }
21
- return {
22
- devices: data.devices,
23
- filesystemOptions: data.filesystem_options,
24
- name: data.name,
25
- options: data.options,
26
- type: data.type
27
- };
28
- };
29
- const unmarshalSchemaDisk = (data) => {
30
- if (!isJSONObject(data)) {
31
- throw new TypeError(
32
- `Unmarshalling the type 'SchemaDisk' failed as data isn't a dictionary.`
33
- );
34
- }
35
- return {
36
- device: data.device,
37
- partitions: unmarshalArrayOfObject(data.partitions, unmarshalSchemaPartition)
38
- };
39
- };
40
- const unmarshalSchemaFilesystem = (data) => {
41
- if (!isJSONObject(data)) {
42
- throw new TypeError(
43
- `Unmarshalling the type 'SchemaFilesystem' failed as data isn't a dictionary.`
44
- );
45
- }
46
- return {
47
- device: data.device,
48
- format: data.format,
49
- mountpoint: data.mountpoint
50
- };
51
- };
52
- const unmarshalSchemaRAID = (data) => {
53
- if (!isJSONObject(data)) {
54
- throw new TypeError(
55
- `Unmarshalling the type 'SchemaRAID' failed as data isn't a dictionary.`
56
- );
57
- }
58
- return {
59
- devices: data.devices,
60
- level: data.level,
61
- name: data.name
62
- };
63
- };
64
- const unmarshalSchemaZFS = (data) => {
65
- if (!isJSONObject(data)) {
66
- throw new TypeError(
67
- `Unmarshalling the type 'SchemaZFS' failed as data isn't a dictionary.`
68
- );
69
- }
70
- return {
71
- pools: unmarshalArrayOfObject(data.pools, unmarshalSchemaPool)
72
- };
1
+ import { isJSONObject, marshalBlobToScwFile, resolveOneOf, unmarshalArrayOfObject, unmarshalDate, unmarshalMoney, unmarshalTimeSeries } from "@scaleway/sdk-client";
2
+ var unmarshalSchemaPartition = (data) => {
3
+ if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'SchemaPartition' failed as data isn't a dictionary.`);
4
+ return {
5
+ label: data.label,
6
+ number: data.number,
7
+ size: data.size,
8
+ useAllAvailableSpace: data.use_all_available_space
9
+ };
10
+ };
11
+ var unmarshalSchemaPool = (data) => {
12
+ if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'SchemaPool' failed as data isn't a dictionary.`);
13
+ return {
14
+ devices: data.devices,
15
+ filesystemOptions: data.filesystem_options,
16
+ name: data.name,
17
+ options: data.options,
18
+ type: data.type
19
+ };
20
+ };
21
+ var unmarshalSchemaDisk = (data) => {
22
+ if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'SchemaDisk' failed as data isn't a dictionary.`);
23
+ return {
24
+ device: data.device,
25
+ partitions: unmarshalArrayOfObject(data.partitions, unmarshalSchemaPartition)
26
+ };
27
+ };
28
+ var unmarshalSchemaFilesystem = (data) => {
29
+ if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'SchemaFilesystem' failed as data isn't a dictionary.`);
30
+ return {
31
+ device: data.device,
32
+ format: data.format,
33
+ mountpoint: data.mountpoint
34
+ };
35
+ };
36
+ var unmarshalSchemaRAID = (data) => {
37
+ if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'SchemaRAID' failed as data isn't a dictionary.`);
38
+ return {
39
+ devices: data.devices,
40
+ level: data.level,
41
+ name: data.name
42
+ };
43
+ };
44
+ var unmarshalSchemaZFS = (data) => {
45
+ if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'SchemaZFS' failed as data isn't a dictionary.`);
46
+ return { pools: unmarshalArrayOfObject(data.pools, unmarshalSchemaPool) };
73
47
  };
74
48
  const unmarshalSchema = (data) => {
75
- if (!isJSONObject(data)) {
76
- throw new TypeError(
77
- `Unmarshalling the type 'Schema' failed as data isn't a dictionary.`
78
- );
79
- }
80
- return {
81
- disks: unmarshalArrayOfObject(data.disks, unmarshalSchemaDisk),
82
- filesystems: unmarshalArrayOfObject(data.filesystems, unmarshalSchemaFilesystem),
83
- raids: unmarshalArrayOfObject(data.raids, unmarshalSchemaRAID),
84
- zfs: data.zfs ? unmarshalSchemaZFS(data.zfs) : void 0
85
- };
49
+ if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'Schema' failed as data isn't a dictionary.`);
50
+ return {
51
+ disks: unmarshalArrayOfObject(data.disks, unmarshalSchemaDisk),
52
+ filesystems: unmarshalArrayOfObject(data.filesystems, unmarshalSchemaFilesystem),
53
+ raids: unmarshalArrayOfObject(data.raids, unmarshalSchemaRAID),
54
+ zfs: data.zfs ? unmarshalSchemaZFS(data.zfs) : void 0
55
+ };
86
56
  };
87
57
  const unmarshalIP = (data) => {
88
- if (!isJSONObject(data)) {
89
- throw new TypeError(
90
- `Unmarshalling the type 'IP' failed as data isn't a dictionary.`
91
- );
92
- }
93
- return {
94
- address: data.address,
95
- id: data.id,
96
- reverse: data.reverse,
97
- reverseStatus: data.reverse_status,
98
- reverseStatusMessage: data.reverse_status_message,
99
- version: data.version
100
- };
101
- };
102
- const unmarshalCertificationOption = (data) => {
103
- if (!isJSONObject(data)) {
104
- throw new TypeError(
105
- `Unmarshalling the type 'CertificationOption' failed as data isn't a dictionary.`
106
- );
107
- }
108
- return {};
109
- };
110
- const unmarshalLicenseOption = (data) => {
111
- if (!isJSONObject(data)) {
112
- throw new TypeError(
113
- `Unmarshalling the type 'LicenseOption' failed as data isn't a dictionary.`
114
- );
115
- }
116
- return {
117
- osId: data.os_id
118
- };
119
- };
120
- const unmarshalPrivateNetworkOption = (data) => {
121
- if (!isJSONObject(data)) {
122
- throw new TypeError(
123
- `Unmarshalling the type 'PrivateNetworkOption' failed as data isn't a dictionary.`
124
- );
125
- }
126
- return {
127
- bandwidthInBps: data.bandwidth_in_bps
128
- };
129
- };
130
- const unmarshalPublicBandwidthOption = (data) => {
131
- if (!isJSONObject(data)) {
132
- throw new TypeError(
133
- `Unmarshalling the type 'PublicBandwidthOption' failed as data isn't a dictionary.`
134
- );
135
- }
136
- return {
137
- bandwidthInBps: data.bandwidth_in_bps
138
- };
139
- };
140
- const unmarshalRemoteAccessOption = (data) => {
141
- if (!isJSONObject(data)) {
142
- throw new TypeError(
143
- `Unmarshalling the type 'RemoteAccessOption' failed as data isn't a dictionary.`
144
- );
145
- }
146
- return {};
147
- };
148
- const unmarshalServerInstall = (data) => {
149
- if (!isJSONObject(data)) {
150
- throw new TypeError(
151
- `Unmarshalling the type 'ServerInstall' failed as data isn't a dictionary.`
152
- );
153
- }
154
- return {
155
- hostname: data.hostname,
156
- osId: data.os_id,
157
- partitioningSchema: data.partitioning_schema ? unmarshalSchema(data.partitioning_schema) : void 0,
158
- serviceUrl: data.service_url,
159
- serviceUser: data.service_user,
160
- sshKeyIds: data.ssh_key_ids,
161
- status: data.status,
162
- user: data.user
163
- };
164
- };
165
- const unmarshalServerOption = (data) => {
166
- if (!isJSONObject(data)) {
167
- throw new TypeError(
168
- `Unmarshalling the type 'ServerOption' failed as data isn't a dictionary.`
169
- );
170
- }
171
- return {
172
- certification: data.certification ? unmarshalCertificationOption(data.certification) : void 0,
173
- expiresAt: unmarshalDate(data.expires_at),
174
- id: data.id,
175
- license: data.license ? unmarshalLicenseOption(data.license) : void 0,
176
- manageable: data.manageable,
177
- name: data.name,
178
- privateNetwork: data.private_network ? unmarshalPrivateNetworkOption(data.private_network) : void 0,
179
- publicBandwidth: data.public_bandwidth ? unmarshalPublicBandwidthOption(data.public_bandwidth) : void 0,
180
- remoteAccess: data.remote_access ? unmarshalRemoteAccessOption(data.remote_access) : void 0,
181
- status: data.status
182
- };
183
- };
184
- const unmarshalServerRescueServer = (data) => {
185
- if (!isJSONObject(data)) {
186
- throw new TypeError(
187
- `Unmarshalling the type 'ServerRescueServer' failed as data isn't a dictionary.`
188
- );
189
- }
190
- return {
191
- password: data.password,
192
- user: data.user
193
- };
58
+ if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'IP' failed as data isn't a dictionary.`);
59
+ return {
60
+ address: data.address,
61
+ id: data.id,
62
+ reverse: data.reverse,
63
+ reverseStatus: data.reverse_status,
64
+ reverseStatusMessage: data.reverse_status_message,
65
+ version: data.version
66
+ };
67
+ };
68
+ var unmarshalCertificationOption = (data) => {
69
+ if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'CertificationOption' failed as data isn't a dictionary.`);
70
+ return {};
71
+ };
72
+ var unmarshalLicenseOption = (data) => {
73
+ if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'LicenseOption' failed as data isn't a dictionary.`);
74
+ return { osId: data.os_id };
75
+ };
76
+ var unmarshalPrivateNetworkOption = (data) => {
77
+ if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'PrivateNetworkOption' failed as data isn't a dictionary.`);
78
+ return { bandwidthInBps: data.bandwidth_in_bps };
79
+ };
80
+ var unmarshalPublicBandwidthOption = (data) => {
81
+ if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'PublicBandwidthOption' failed as data isn't a dictionary.`);
82
+ return { bandwidthInBps: data.bandwidth_in_bps };
83
+ };
84
+ var unmarshalRemoteAccessOption = (data) => {
85
+ if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'RemoteAccessOption' failed as data isn't a dictionary.`);
86
+ return {};
87
+ };
88
+ var unmarshalServerInstall = (data) => {
89
+ if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'ServerInstall' failed as data isn't a dictionary.`);
90
+ return {
91
+ hostname: data.hostname,
92
+ osId: data.os_id,
93
+ partitioningSchema: data.partitioning_schema ? unmarshalSchema(data.partitioning_schema) : void 0,
94
+ serviceUrl: data.service_url,
95
+ serviceUser: data.service_user,
96
+ sshKeyIds: data.ssh_key_ids,
97
+ status: data.status,
98
+ user: data.user
99
+ };
100
+ };
101
+ var unmarshalServerOption = (data) => {
102
+ if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'ServerOption' failed as data isn't a dictionary.`);
103
+ return {
104
+ certification: data.certification ? unmarshalCertificationOption(data.certification) : void 0,
105
+ expiresAt: unmarshalDate(data.expires_at),
106
+ id: data.id,
107
+ license: data.license ? unmarshalLicenseOption(data.license) : void 0,
108
+ manageable: data.manageable,
109
+ name: data.name,
110
+ privateNetwork: data.private_network ? unmarshalPrivateNetworkOption(data.private_network) : void 0,
111
+ publicBandwidth: data.public_bandwidth ? unmarshalPublicBandwidthOption(data.public_bandwidth) : void 0,
112
+ remoteAccess: data.remote_access ? unmarshalRemoteAccessOption(data.remote_access) : void 0,
113
+ status: data.status
114
+ };
115
+ };
116
+ var unmarshalServerRescueServer = (data) => {
117
+ if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'ServerRescueServer' failed as data isn't a dictionary.`);
118
+ return {
119
+ password: data.password,
120
+ user: data.user
121
+ };
194
122
  };
195
123
  const unmarshalServer = (data) => {
196
- if (!isJSONObject(data)) {
197
- throw new TypeError(
198
- `Unmarshalling the type 'Server' failed as data isn't a dictionary.`
199
- );
200
- }
201
- return {
202
- bootType: data.boot_type,
203
- createdAt: unmarshalDate(data.created_at),
204
- description: data.description,
205
- domain: data.domain,
206
- id: data.id,
207
- install: data.install ? unmarshalServerInstall(data.install) : void 0,
208
- ips: unmarshalArrayOfObject(data.ips, unmarshalIP),
209
- name: data.name,
210
- offerId: data.offer_id,
211
- offerName: data.offer_name,
212
- options: unmarshalArrayOfObject(data.options, unmarshalServerOption),
213
- organizationId: data.organization_id,
214
- pingStatus: data.ping_status,
215
- projectId: data.project_id,
216
- protected: data.protected,
217
- rescueServer: data.rescue_server ? unmarshalServerRescueServer(data.rescue_server) : void 0,
218
- status: data.status,
219
- tags: data.tags,
220
- updatedAt: unmarshalDate(data.updated_at),
221
- userData: data.user_data,
222
- zone: data.zone
223
- };
224
- };
225
- const unmarshalOSOSField = (data) => {
226
- if (!isJSONObject(data)) {
227
- throw new TypeError(
228
- `Unmarshalling the type 'OSOSField' failed as data isn't a dictionary.`
229
- );
230
- }
231
- return {
232
- defaultValue: data.default_value,
233
- editable: data.editable,
234
- required: data.required
235
- };
124
+ if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'Server' failed as data isn't a dictionary.`);
125
+ return {
126
+ bootType: data.boot_type,
127
+ createdAt: unmarshalDate(data.created_at),
128
+ description: data.description,
129
+ domain: data.domain,
130
+ id: data.id,
131
+ install: data.install ? unmarshalServerInstall(data.install) : void 0,
132
+ ips: unmarshalArrayOfObject(data.ips, unmarshalIP),
133
+ name: data.name,
134
+ offerId: data.offer_id,
135
+ offerName: data.offer_name,
136
+ options: unmarshalArrayOfObject(data.options, unmarshalServerOption),
137
+ organizationId: data.organization_id,
138
+ pingStatus: data.ping_status,
139
+ projectId: data.project_id,
140
+ protected: data.protected,
141
+ rescueServer: data.rescue_server ? unmarshalServerRescueServer(data.rescue_server) : void 0,
142
+ status: data.status,
143
+ tags: data.tags,
144
+ updatedAt: unmarshalDate(data.updated_at),
145
+ userData: data.user_data,
146
+ zone: data.zone
147
+ };
148
+ };
149
+ var unmarshalOSOSField = (data) => {
150
+ if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'OSOSField' failed as data isn't a dictionary.`);
151
+ return {
152
+ defaultValue: data.default_value,
153
+ editable: data.editable,
154
+ required: data.required
155
+ };
236
156
  };
237
157
  const unmarshalOS = (data) => {
238
- if (!isJSONObject(data)) {
239
- throw new TypeError(
240
- `Unmarshalling the type 'OS' failed as data isn't a dictionary.`
241
- );
242
- }
243
- return {
244
- allowed: data.allowed,
245
- cloudInitSupported: data.cloud_init_supported,
246
- cloudInitVersion: data.cloud_init_version,
247
- customPartitioningSupported: data.custom_partitioning_supported,
248
- enabled: data.enabled,
249
- id: data.id,
250
- licenseRequired: data.license_required,
251
- logoUrl: data.logo_url,
252
- name: data.name,
253
- password: data.password ? unmarshalOSOSField(data.password) : void 0,
254
- servicePassword: data.service_password ? unmarshalOSOSField(data.service_password) : void 0,
255
- serviceUser: data.service_user ? unmarshalOSOSField(data.service_user) : void 0,
256
- ssh: data.ssh ? unmarshalOSOSField(data.ssh) : void 0,
257
- user: data.user ? unmarshalOSOSField(data.user) : void 0,
258
- version: data.version,
259
- zone: data.zone
260
- };
261
- };
262
- const unmarshalCPU = (data) => {
263
- if (!isJSONObject(data)) {
264
- throw new TypeError(
265
- `Unmarshalling the type 'CPU' failed as data isn't a dictionary.`
266
- );
267
- }
268
- return {
269
- benchmark: data.benchmark,
270
- coreCount: data.core_count,
271
- frequency: data.frequency,
272
- name: data.name,
273
- threadCount: data.thread_count
274
- };
275
- };
276
- const unmarshalDisk = (data) => {
277
- if (!isJSONObject(data)) {
278
- throw new TypeError(
279
- `Unmarshalling the type 'Disk' failed as data isn't a dictionary.`
280
- );
281
- }
282
- return {
283
- capacity: data.capacity,
284
- type: data.type
285
- };
286
- };
287
- const unmarshalGPU = (data) => {
288
- if (!isJSONObject(data)) {
289
- throw new TypeError(
290
- `Unmarshalling the type 'GPU' failed as data isn't a dictionary.`
291
- );
292
- }
293
- return {
294
- name: data.name,
295
- vram: data.vram
296
- };
297
- };
298
- const unmarshalMemory = (data) => {
299
- if (!isJSONObject(data)) {
300
- throw new TypeError(
301
- `Unmarshalling the type 'Memory' failed as data isn't a dictionary.`
302
- );
303
- }
304
- return {
305
- capacity: data.capacity,
306
- frequency: data.frequency,
307
- isEcc: data.is_ecc,
308
- type: data.type
309
- };
310
- };
311
- const unmarshalOfferOptionOffer = (data) => {
312
- if (!isJSONObject(data)) {
313
- throw new TypeError(
314
- `Unmarshalling the type 'OfferOptionOffer' failed as data isn't a dictionary.`
315
- );
316
- }
317
- return {
318
- certification: data.certification ? unmarshalCertificationOption(data.certification) : void 0,
319
- enabled: data.enabled,
320
- id: data.id,
321
- license: data.license ? unmarshalLicenseOption(data.license) : void 0,
322
- manageable: data.manageable,
323
- name: data.name,
324
- osId: data.os_id,
325
- price: data.price ? unmarshalMoney(data.price) : void 0,
326
- privateNetwork: data.private_network ? unmarshalPrivateNetworkOption(data.private_network) : void 0,
327
- publicBandwidth: data.public_bandwidth ? unmarshalPublicBandwidthOption(data.public_bandwidth) : void 0,
328
- remoteAccess: data.remote_access ? unmarshalRemoteAccessOption(data.remote_access) : void 0,
329
- subscriptionPeriod: data.subscription_period
330
- };
331
- };
332
- const unmarshalPersistentMemory = (data) => {
333
- if (!isJSONObject(data)) {
334
- throw new TypeError(
335
- `Unmarshalling the type 'PersistentMemory' failed as data isn't a dictionary.`
336
- );
337
- }
338
- return {
339
- capacity: data.capacity,
340
- frequency: data.frequency,
341
- type: data.type
342
- };
343
- };
344
- const unmarshalRaidController = (data) => {
345
- if (!isJSONObject(data)) {
346
- throw new TypeError(
347
- `Unmarshalling the type 'RaidController' failed as data isn't a dictionary.`
348
- );
349
- }
350
- return {
351
- model: data.model,
352
- raidLevel: data.raid_level
353
- };
158
+ if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'OS' failed as data isn't a dictionary.`);
159
+ return {
160
+ allowed: data.allowed,
161
+ cloudInitSupported: data.cloud_init_supported,
162
+ cloudInitVersion: data.cloud_init_version,
163
+ customPartitioningSupported: data.custom_partitioning_supported,
164
+ enabled: data.enabled,
165
+ id: data.id,
166
+ licenseRequired: data.license_required,
167
+ logoUrl: data.logo_url,
168
+ name: data.name,
169
+ password: data.password ? unmarshalOSOSField(data.password) : void 0,
170
+ servicePassword: data.service_password ? unmarshalOSOSField(data.service_password) : void 0,
171
+ serviceUser: data.service_user ? unmarshalOSOSField(data.service_user) : void 0,
172
+ ssh: data.ssh ? unmarshalOSOSField(data.ssh) : void 0,
173
+ user: data.user ? unmarshalOSOSField(data.user) : void 0,
174
+ version: data.version,
175
+ zone: data.zone
176
+ };
177
+ };
178
+ var unmarshalCPU = (data) => {
179
+ if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'CPU' failed as data isn't a dictionary.`);
180
+ return {
181
+ benchmark: data.benchmark,
182
+ coreCount: data.core_count,
183
+ frequency: data.frequency,
184
+ name: data.name,
185
+ threadCount: data.thread_count
186
+ };
187
+ };
188
+ var unmarshalDisk = (data) => {
189
+ if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'Disk' failed as data isn't a dictionary.`);
190
+ return {
191
+ capacity: data.capacity,
192
+ type: data.type
193
+ };
194
+ };
195
+ var unmarshalGPU = (data) => {
196
+ if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'GPU' failed as data isn't a dictionary.`);
197
+ return {
198
+ name: data.name,
199
+ vram: data.vram
200
+ };
201
+ };
202
+ var unmarshalMemory = (data) => {
203
+ if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'Memory' failed as data isn't a dictionary.`);
204
+ return {
205
+ capacity: data.capacity,
206
+ frequency: data.frequency,
207
+ isEcc: data.is_ecc,
208
+ type: data.type
209
+ };
210
+ };
211
+ var unmarshalOfferOptionOffer = (data) => {
212
+ if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'OfferOptionOffer' failed as data isn't a dictionary.`);
213
+ return {
214
+ certification: data.certification ? unmarshalCertificationOption(data.certification) : void 0,
215
+ enabled: data.enabled,
216
+ id: data.id,
217
+ license: data.license ? unmarshalLicenseOption(data.license) : void 0,
218
+ manageable: data.manageable,
219
+ name: data.name,
220
+ osId: data.os_id,
221
+ price: data.price ? unmarshalMoney(data.price) : void 0,
222
+ privateNetwork: data.private_network ? unmarshalPrivateNetworkOption(data.private_network) : void 0,
223
+ publicBandwidth: data.public_bandwidth ? unmarshalPublicBandwidthOption(data.public_bandwidth) : void 0,
224
+ remoteAccess: data.remote_access ? unmarshalRemoteAccessOption(data.remote_access) : void 0,
225
+ subscriptionPeriod: data.subscription_period
226
+ };
227
+ };
228
+ var unmarshalPersistentMemory = (data) => {
229
+ if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'PersistentMemory' failed as data isn't a dictionary.`);
230
+ return {
231
+ capacity: data.capacity,
232
+ frequency: data.frequency,
233
+ type: data.type
234
+ };
235
+ };
236
+ var unmarshalRaidController = (data) => {
237
+ if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'RaidController' failed as data isn't a dictionary.`);
238
+ return {
239
+ model: data.model,
240
+ raidLevel: data.raid_level
241
+ };
354
242
  };
355
243
  const unmarshalOffer = (data) => {
356
- if (!isJSONObject(data)) {
357
- throw new TypeError(
358
- `Unmarshalling the type 'Offer' failed as data isn't a dictionary.`
359
- );
360
- }
361
- return {
362
- bandwidth: data.bandwidth,
363
- commercialRange: data.commercial_range,
364
- cpus: unmarshalArrayOfObject(data.cpus, unmarshalCPU),
365
- disks: unmarshalArrayOfObject(data.disks, unmarshalDisk),
366
- enable: data.enable,
367
- fee: data.fee ? unmarshalMoney(data.fee) : void 0,
368
- gpus: unmarshalArrayOfObject(data.gpus, unmarshalGPU),
369
- id: data.id,
370
- incompatibleOsIds: data.incompatible_os_ids,
371
- maxBandwidth: data.max_bandwidth,
372
- memories: unmarshalArrayOfObject(data.memories, unmarshalMemory),
373
- monthlyOfferId: data.monthly_offer_id,
374
- name: data.name,
375
- operationPath: data.operation_path,
376
- options: unmarshalArrayOfObject(data.options, unmarshalOfferOptionOffer),
377
- persistentMemories: unmarshalArrayOfObject(data.persistent_memories, unmarshalPersistentMemory),
378
- pricePerHour: data.price_per_hour ? unmarshalMoney(data.price_per_hour) : void 0,
379
- pricePerMonth: data.price_per_month ? unmarshalMoney(data.price_per_month) : void 0,
380
- privateBandwidth: data.private_bandwidth,
381
- quotaName: data.quota_name,
382
- raidControllers: unmarshalArrayOfObject(data.raid_controllers, unmarshalRaidController),
383
- sharedBandwidth: data.shared_bandwidth,
384
- stock: data.stock,
385
- subscriptionPeriod: data.subscription_period,
386
- tags: data.tags,
387
- zone: data.zone
388
- };
244
+ if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'Offer' failed as data isn't a dictionary.`);
245
+ return {
246
+ bandwidth: data.bandwidth,
247
+ commercialRange: data.commercial_range,
248
+ cpus: unmarshalArrayOfObject(data.cpus, unmarshalCPU),
249
+ disks: unmarshalArrayOfObject(data.disks, unmarshalDisk),
250
+ enable: data.enable,
251
+ fee: data.fee ? unmarshalMoney(data.fee) : void 0,
252
+ gpus: unmarshalArrayOfObject(data.gpus, unmarshalGPU),
253
+ id: data.id,
254
+ incompatibleOsIds: data.incompatible_os_ids,
255
+ maxBandwidth: data.max_bandwidth,
256
+ memories: unmarshalArrayOfObject(data.memories, unmarshalMemory),
257
+ monthlyOfferId: data.monthly_offer_id,
258
+ name: data.name,
259
+ operationPath: data.operation_path,
260
+ options: unmarshalArrayOfObject(data.options, unmarshalOfferOptionOffer),
261
+ persistentMemories: unmarshalArrayOfObject(data.persistent_memories, unmarshalPersistentMemory),
262
+ pricePerHour: data.price_per_hour ? unmarshalMoney(data.price_per_hour) : void 0,
263
+ pricePerMonth: data.price_per_month ? unmarshalMoney(data.price_per_month) : void 0,
264
+ privateBandwidth: data.private_bandwidth,
265
+ quotaName: data.quota_name,
266
+ raidControllers: unmarshalArrayOfObject(data.raid_controllers, unmarshalRaidController),
267
+ sharedBandwidth: data.shared_bandwidth,
268
+ stock: data.stock,
269
+ subscriptionPeriod: data.subscription_period,
270
+ tags: data.tags,
271
+ zone: data.zone
272
+ };
389
273
  };
390
274
  const unmarshalOption = (data) => {
391
- if (!isJSONObject(data)) {
392
- throw new TypeError(
393
- `Unmarshalling the type 'Option' failed as data isn't a dictionary.`
394
- );
395
- }
396
- return {
397
- certification: data.certification ? unmarshalCertificationOption(data.certification) : void 0,
398
- id: data.id,
399
- license: data.license ? unmarshalLicenseOption(data.license) : void 0,
400
- manageable: data.manageable,
401
- name: data.name,
402
- privateNetwork: data.private_network ? unmarshalPrivateNetworkOption(data.private_network) : void 0,
403
- publicBandwidth: data.public_bandwidth ? unmarshalPublicBandwidthOption(data.public_bandwidth) : void 0,
404
- remoteAccess: data.remote_access ? unmarshalRemoteAccessOption(data.remote_access) : void 0
405
- };
275
+ if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'Option' failed as data isn't a dictionary.`);
276
+ return {
277
+ certification: data.certification ? unmarshalCertificationOption(data.certification) : void 0,
278
+ id: data.id,
279
+ license: data.license ? unmarshalLicenseOption(data.license) : void 0,
280
+ manageable: data.manageable,
281
+ name: data.name,
282
+ privateNetwork: data.private_network ? unmarshalPrivateNetworkOption(data.private_network) : void 0,
283
+ publicBandwidth: data.public_bandwidth ? unmarshalPublicBandwidthOption(data.public_bandwidth) : void 0,
284
+ remoteAccess: data.remote_access ? unmarshalRemoteAccessOption(data.remote_access) : void 0
285
+ };
406
286
  };
407
287
  const unmarshalServerPrivateNetwork = (data) => {
408
- if (!isJSONObject(data)) {
409
- throw new TypeError(
410
- `Unmarshalling the type 'ServerPrivateNetwork' failed as data isn't a dictionary.`
411
- );
412
- }
413
- return {
414
- createdAt: unmarshalDate(data.created_at),
415
- id: data.id,
416
- privateNetworkId: data.private_network_id,
417
- projectId: data.project_id,
418
- serverId: data.server_id,
419
- status: data.status,
420
- updatedAt: unmarshalDate(data.updated_at),
421
- vlan: data.vlan
422
- };
288
+ if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'ServerPrivateNetwork' failed as data isn't a dictionary.`);
289
+ return {
290
+ createdAt: unmarshalDate(data.created_at),
291
+ id: data.id,
292
+ privateNetworkId: data.private_network_id,
293
+ projectId: data.project_id,
294
+ serverId: data.server_id,
295
+ status: data.status,
296
+ updatedAt: unmarshalDate(data.updated_at),
297
+ vlan: data.vlan
298
+ };
423
299
  };
424
300
  const unmarshalSetting = (data) => {
425
- if (!isJSONObject(data)) {
426
- throw new TypeError(
427
- `Unmarshalling the type 'Setting' failed as data isn't a dictionary.`
428
- );
429
- }
430
- return {
431
- enabled: data.enabled,
432
- id: data.id,
433
- projectId: data.project_id,
434
- type: data.type
435
- };
301
+ if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'Setting' failed as data isn't a dictionary.`);
302
+ return {
303
+ enabled: data.enabled,
304
+ id: data.id,
305
+ projectId: data.project_id,
306
+ type: data.type
307
+ };
436
308
  };
437
309
  const unmarshalBMCAccess = (data) => {
438
- if (!isJSONObject(data)) {
439
- throw new TypeError(
440
- `Unmarshalling the type 'BMCAccess' failed as data isn't a dictionary.`
441
- );
442
- }
443
- return {
444
- expiresAt: unmarshalDate(data.expires_at),
445
- login: data.login,
446
- password: data.password,
447
- url: data.url
448
- };
310
+ if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'BMCAccess' failed as data isn't a dictionary.`);
311
+ return {
312
+ expiresAt: unmarshalDate(data.expires_at),
313
+ login: data.login,
314
+ password: data.password,
315
+ url: data.url
316
+ };
449
317
  };
450
318
  const unmarshalGetServerMetricsResponse = (data) => {
451
- if (!isJSONObject(data)) {
452
- throw new TypeError(
453
- `Unmarshalling the type 'GetServerMetricsResponse' failed as data isn't a dictionary.`
454
- );
455
- }
456
- return {
457
- pings: data.pings ? unmarshalTimeSeries(data.pings) : void 0
458
- };
319
+ if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'GetServerMetricsResponse' failed as data isn't a dictionary.`);
320
+ return { pings: data.pings ? unmarshalTimeSeries(data.pings) : void 0 };
459
321
  };
460
322
  const unmarshalListOSResponse = (data) => {
461
- if (!isJSONObject(data)) {
462
- throw new TypeError(
463
- `Unmarshalling the type 'ListOSResponse' failed as data isn't a dictionary.`
464
- );
465
- }
466
- return {
467
- os: unmarshalArrayOfObject(data.os, unmarshalOS),
468
- totalCount: data.total_count
469
- };
323
+ if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'ListOSResponse' failed as data isn't a dictionary.`);
324
+ return {
325
+ os: unmarshalArrayOfObject(data.os, unmarshalOS),
326
+ totalCount: data.total_count
327
+ };
470
328
  };
471
329
  const unmarshalListOffersResponse = (data) => {
472
- if (!isJSONObject(data)) {
473
- throw new TypeError(
474
- `Unmarshalling the type 'ListOffersResponse' failed as data isn't a dictionary.`
475
- );
476
- }
477
- return {
478
- offers: unmarshalArrayOfObject(data.offers, unmarshalOffer),
479
- totalCount: data.total_count
480
- };
330
+ if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'ListOffersResponse' failed as data isn't a dictionary.`);
331
+ return {
332
+ offers: unmarshalArrayOfObject(data.offers, unmarshalOffer),
333
+ totalCount: data.total_count
334
+ };
481
335
  };
482
336
  const unmarshalListOptionsResponse = (data) => {
483
- if (!isJSONObject(data)) {
484
- throw new TypeError(
485
- `Unmarshalling the type 'ListOptionsResponse' failed as data isn't a dictionary.`
486
- );
487
- }
488
- return {
489
- options: unmarshalArrayOfObject(data.options, unmarshalOption),
490
- totalCount: data.total_count
491
- };
492
- };
493
- const unmarshalServerEvent = (data) => {
494
- if (!isJSONObject(data)) {
495
- throw new TypeError(
496
- `Unmarshalling the type 'ServerEvent' failed as data isn't a dictionary.`
497
- );
498
- }
499
- return {
500
- action: data.action,
501
- createdAt: unmarshalDate(data.created_at),
502
- id: data.id,
503
- updatedAt: unmarshalDate(data.updated_at)
504
- };
337
+ if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'ListOptionsResponse' failed as data isn't a dictionary.`);
338
+ return {
339
+ options: unmarshalArrayOfObject(data.options, unmarshalOption),
340
+ totalCount: data.total_count
341
+ };
342
+ };
343
+ var unmarshalServerEvent = (data) => {
344
+ if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'ServerEvent' failed as data isn't a dictionary.`);
345
+ return {
346
+ action: data.action,
347
+ createdAt: unmarshalDate(data.created_at),
348
+ id: data.id,
349
+ updatedAt: unmarshalDate(data.updated_at)
350
+ };
505
351
  };
506
352
  const unmarshalListServerEventsResponse = (data) => {
507
- if (!isJSONObject(data)) {
508
- throw new TypeError(
509
- `Unmarshalling the type 'ListServerEventsResponse' failed as data isn't a dictionary.`
510
- );
511
- }
512
- return {
513
- events: unmarshalArrayOfObject(data.events, unmarshalServerEvent),
514
- totalCount: data.total_count
515
- };
353
+ if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'ListServerEventsResponse' failed as data isn't a dictionary.`);
354
+ return {
355
+ events: unmarshalArrayOfObject(data.events, unmarshalServerEvent),
356
+ totalCount: data.total_count
357
+ };
516
358
  };
517
359
  const unmarshalListServerPrivateNetworksResponse = (data) => {
518
- if (!isJSONObject(data)) {
519
- throw new TypeError(
520
- `Unmarshalling the type 'ListServerPrivateNetworksResponse' failed as data isn't a dictionary.`
521
- );
522
- }
523
- return {
524
- serverPrivateNetworks: unmarshalArrayOfObject(data.server_private_networks, unmarshalServerPrivateNetwork),
525
- totalCount: data.total_count
526
- };
360
+ if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'ListServerPrivateNetworksResponse' failed as data isn't a dictionary.`);
361
+ return {
362
+ serverPrivateNetworks: unmarshalArrayOfObject(data.server_private_networks, unmarshalServerPrivateNetwork),
363
+ totalCount: data.total_count
364
+ };
527
365
  };
528
366
  const unmarshalListServersResponse = (data) => {
529
- if (!isJSONObject(data)) {
530
- throw new TypeError(
531
- `Unmarshalling the type 'ListServersResponse' failed as data isn't a dictionary.`
532
- );
533
- }
534
- return {
535
- servers: unmarshalArrayOfObject(data.servers, unmarshalServer),
536
- totalCount: data.total_count
537
- };
367
+ if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'ListServersResponse' failed as data isn't a dictionary.`);
368
+ return {
369
+ servers: unmarshalArrayOfObject(data.servers, unmarshalServer),
370
+ totalCount: data.total_count
371
+ };
538
372
  };
539
373
  const unmarshalListSettingsResponse = (data) => {
540
- if (!isJSONObject(data)) {
541
- throw new TypeError(
542
- `Unmarshalling the type 'ListSettingsResponse' failed as data isn't a dictionary.`
543
- );
544
- }
545
- return {
546
- settings: unmarshalArrayOfObject(data.settings, unmarshalSetting),
547
- totalCount: data.total_count
548
- };
374
+ if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'ListSettingsResponse' failed as data isn't a dictionary.`);
375
+ return {
376
+ settings: unmarshalArrayOfObject(data.settings, unmarshalSetting),
377
+ totalCount: data.total_count
378
+ };
549
379
  };
550
380
  const unmarshalSetServerPrivateNetworksResponse = (data) => {
551
- if (!isJSONObject(data)) {
552
- throw new TypeError(
553
- `Unmarshalling the type 'SetServerPrivateNetworksResponse' failed as data isn't a dictionary.`
554
- );
555
- }
556
- return {
557
- serverPrivateNetworks: unmarshalArrayOfObject(data.server_private_networks, unmarshalServerPrivateNetwork)
558
- };
559
- };
560
- const marshalSchemaPartition = (request, defaults) => ({
561
- label: request.label,
562
- number: request.number,
563
- size: request.size,
564
- use_all_available_space: request.useAllAvailableSpace
381
+ if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'SetServerPrivateNetworksResponse' failed as data isn't a dictionary.`);
382
+ return { serverPrivateNetworks: unmarshalArrayOfObject(data.server_private_networks, unmarshalServerPrivateNetwork) };
383
+ };
384
+ var marshalSchemaPartition = (request, defaults) => ({
385
+ label: request.label,
386
+ number: request.number,
387
+ size: request.size,
388
+ use_all_available_space: request.useAllAvailableSpace
565
389
  });
566
- const marshalSchemaPool = (request, defaults) => ({
567
- devices: request.devices,
568
- filesystem_options: request.filesystemOptions,
569
- name: request.name,
570
- options: request.options,
571
- type: request.type
390
+ var marshalSchemaPool = (request, defaults) => ({
391
+ devices: request.devices,
392
+ filesystem_options: request.filesystemOptions,
393
+ name: request.name,
394
+ options: request.options,
395
+ type: request.type
572
396
  });
573
- const marshalSchemaDisk = (request, defaults) => ({
574
- device: request.device,
575
- partitions: request.partitions.map((elt) => marshalSchemaPartition(elt))
397
+ var marshalSchemaDisk = (request, defaults) => ({
398
+ device: request.device,
399
+ partitions: request.partitions.map((elt) => marshalSchemaPartition(elt, defaults))
576
400
  });
577
- const marshalSchemaFilesystem = (request, defaults) => ({
578
- device: request.device,
579
- format: request.format,
580
- mountpoint: request.mountpoint
401
+ var marshalSchemaFilesystem = (request, defaults) => ({
402
+ device: request.device,
403
+ format: request.format,
404
+ mountpoint: request.mountpoint
581
405
  });
582
- const marshalSchemaRAID = (request, defaults) => ({
583
- devices: request.devices,
584
- level: request.level,
585
- name: request.name
586
- });
587
- const marshalSchemaZFS = (request, defaults) => ({
588
- pools: request.pools.map((elt) => marshalSchemaPool(elt))
406
+ var marshalSchemaRAID = (request, defaults) => ({
407
+ devices: request.devices,
408
+ level: request.level,
409
+ name: request.name
589
410
  });
411
+ var marshalSchemaZFS = (request, defaults) => ({ pools: request.pools.map((elt) => marshalSchemaPool(elt, defaults)) });
590
412
  const marshalSchema = (request, defaults) => ({
591
- disks: request.disks.map((elt) => marshalSchemaDisk(elt)),
592
- filesystems: request.filesystems.map((elt) => marshalSchemaFilesystem(elt)),
593
- raids: request.raids.map((elt) => marshalSchemaRAID(elt)),
594
- zfs: request.zfs !== void 0 ? marshalSchemaZFS(request.zfs) : void 0
413
+ disks: request.disks.map((elt) => marshalSchemaDisk(elt, defaults)),
414
+ filesystems: request.filesystems.map((elt) => marshalSchemaFilesystem(elt, defaults)),
415
+ raids: request.raids.map((elt) => marshalSchemaRAID(elt, defaults)),
416
+ zfs: request.zfs !== void 0 ? marshalSchemaZFS(request.zfs, defaults) : void 0
595
417
  });
596
- const marshalCreateServerRequestInstall = (request, defaults) => ({
597
- hostname: request.hostname,
598
- os_id: request.osId,
599
- partitioning_schema: request.partitioningSchema !== void 0 ? marshalSchema(request.partitioningSchema) : void 0,
600
- password: request.password,
601
- service_password: request.servicePassword,
602
- service_user: request.serviceUser,
603
- ssh_key_ids: request.sshKeyIds,
604
- user: request.user
418
+ var marshalCreateServerRequestInstall = (request, defaults) => ({
419
+ hostname: request.hostname,
420
+ os_id: request.osId,
421
+ partitioning_schema: request.partitioningSchema !== void 0 ? marshalSchema(request.partitioningSchema, defaults) : void 0,
422
+ password: request.password,
423
+ service_password: request.servicePassword,
424
+ service_user: request.serviceUser,
425
+ ssh_key_ids: request.sshKeyIds,
426
+ user: request.user
605
427
  });
606
428
  const marshalCreateServerRequest = (request, defaults) => ({
607
- description: request.description,
608
- install: request.install !== void 0 ? marshalCreateServerRequestInstall(request.install) : void 0,
609
- name: request.name,
610
- offer_id: request.offerId,
611
- option_ids: request.optionIds,
612
- protected: request.protected,
613
- tags: request.tags,
614
- user_data: request.userData,
615
- ...resolveOneOf([
616
- {
617
- default: defaults.defaultProjectId,
618
- param: "project_id",
619
- value: request.projectId
620
- },
621
- {
622
- default: defaults.defaultOrganizationId,
623
- param: "organization_id",
624
- value: request.organizationId
625
- }
626
- ])
627
- });
628
- const marshalAddOptionServerRequest = (request, defaults) => ({
629
- expires_at: request.expiresAt
429
+ description: request.description,
430
+ install: request.install !== void 0 ? marshalCreateServerRequestInstall(request.install, defaults) : void 0,
431
+ name: request.name,
432
+ offer_id: request.offerId,
433
+ option_ids: request.optionIds,
434
+ protected: request.protected,
435
+ tags: request.tags,
436
+ user_data: request.userData,
437
+ ...resolveOneOf([{
438
+ default: defaults.defaultProjectId,
439
+ param: "project_id",
440
+ value: request.projectId
441
+ }, {
442
+ default: defaults.defaultOrganizationId,
443
+ param: "organization_id",
444
+ value: request.organizationId
445
+ }])
630
446
  });
447
+ const marshalAddOptionServerRequest = (request, defaults) => ({ expires_at: request.expiresAt });
631
448
  const marshalInstallServerRequest = async (request, defaults) => ({
632
- hostname: request.hostname,
633
- os_id: request.osId,
634
- partitioning_schema: request.partitioningSchema !== void 0 ? marshalSchema(request.partitioningSchema) : void 0,
635
- password: request.password,
636
- service_password: request.servicePassword,
637
- service_user: request.serviceUser,
638
- ssh_key_ids: request.sshKeyIds,
639
- user: request.user,
640
- user_data: request.userData !== void 0 ? await marshalBlobToScwFile(request.userData) : void 0
641
- });
642
- const marshalPrivateNetworkApiAddServerPrivateNetworkRequest = (request, defaults) => ({
643
- private_network_id: request.privateNetworkId
644
- });
645
- const marshalPrivateNetworkApiSetServerPrivateNetworksRequest = (request, defaults) => ({
646
- private_network_ids: request.privateNetworkIds
449
+ hostname: request.hostname,
450
+ os_id: request.osId,
451
+ partitioning_schema: request.partitioningSchema !== void 0 ? marshalSchema(request.partitioningSchema, defaults) : void 0,
452
+ password: request.password,
453
+ service_password: request.servicePassword,
454
+ service_user: request.serviceUser,
455
+ ssh_key_ids: request.sshKeyIds,
456
+ user: request.user,
457
+ user_data: request.userData !== void 0 ? await marshalBlobToScwFile(request.userData) : void 0
647
458
  });
459
+ const marshalPrivateNetworkApiAddServerPrivateNetworkRequest = (request, defaults) => ({ private_network_id: request.privateNetworkId });
460
+ const marshalPrivateNetworkApiSetServerPrivateNetworksRequest = (request, defaults) => ({ private_network_ids: request.privateNetworkIds });
648
461
  const marshalRebootServerRequest = (request, defaults) => ({
649
- boot_type: request.bootType,
650
- ssh_key_ids: request.sshKeyIds
651
- });
652
- const marshalStartBMCAccessRequest = (request, defaults) => ({
653
- ip: request.ip
462
+ boot_type: request.bootType,
463
+ ssh_key_ids: request.sshKeyIds
654
464
  });
465
+ const marshalStartBMCAccessRequest = (request, defaults) => ({ ip: request.ip });
655
466
  const marshalStartServerRequest = (request, defaults) => ({
656
- boot_type: request.bootType,
657
- ssh_key_ids: request.sshKeyIds
658
- });
659
- const marshalUpdateIPRequest = (request, defaults) => ({
660
- reverse: request.reverse
467
+ boot_type: request.bootType,
468
+ ssh_key_ids: request.sshKeyIds
661
469
  });
470
+ const marshalUpdateIPRequest = (request, defaults) => ({ reverse: request.reverse });
662
471
  const marshalUpdateServerRequest = (request, defaults) => ({
663
- description: request.description,
664
- name: request.name,
665
- protected: request.protected,
666
- tags: request.tags,
667
- user_data: request.userData
668
- });
669
- const marshalUpdateSettingRequest = (request, defaults) => ({
670
- enabled: request.enabled
472
+ description: request.description,
473
+ name: request.name,
474
+ protected: request.protected,
475
+ tags: request.tags,
476
+ user_data: request.userData
671
477
  });
478
+ const marshalUpdateSettingRequest = (request, defaults) => ({ enabled: request.enabled });
672
479
  const marshalValidatePartitioningSchemaRequest = (request, defaults) => ({
673
- offer_id: request.offerId,
674
- os_id: request.osId,
675
- partitioning_schema: request.partitioningSchema !== void 0 ? marshalSchema(request.partitioningSchema) : void 0
480
+ offer_id: request.offerId,
481
+ os_id: request.osId,
482
+ partitioning_schema: request.partitioningSchema !== void 0 ? marshalSchema(request.partitioningSchema, defaults) : void 0
676
483
  });
677
- export {
678
- marshalAddOptionServerRequest,
679
- marshalCreateServerRequest,
680
- marshalInstallServerRequest,
681
- marshalPrivateNetworkApiAddServerPrivateNetworkRequest,
682
- marshalPrivateNetworkApiSetServerPrivateNetworksRequest,
683
- marshalRebootServerRequest,
684
- marshalSchema,
685
- marshalStartBMCAccessRequest,
686
- marshalStartServerRequest,
687
- marshalUpdateIPRequest,
688
- marshalUpdateServerRequest,
689
- marshalUpdateSettingRequest,
690
- marshalValidatePartitioningSchemaRequest,
691
- unmarshalBMCAccess,
692
- unmarshalGetServerMetricsResponse,
693
- unmarshalIP,
694
- unmarshalListOSResponse,
695
- unmarshalListOffersResponse,
696
- unmarshalListOptionsResponse,
697
- unmarshalListServerEventsResponse,
698
- unmarshalListServerPrivateNetworksResponse,
699
- unmarshalListServersResponse,
700
- unmarshalListSettingsResponse,
701
- unmarshalOS,
702
- unmarshalOffer,
703
- unmarshalOption,
704
- unmarshalSchema,
705
- unmarshalServer,
706
- unmarshalServerPrivateNetwork,
707
- unmarshalSetServerPrivateNetworksResponse,
708
- unmarshalSetting
709
- };
484
+ export { marshalAddOptionServerRequest, marshalCreateServerRequest, marshalInstallServerRequest, marshalPrivateNetworkApiAddServerPrivateNetworkRequest, marshalPrivateNetworkApiSetServerPrivateNetworksRequest, marshalRebootServerRequest, marshalSchema, marshalStartBMCAccessRequest, marshalStartServerRequest, marshalUpdateIPRequest, marshalUpdateServerRequest, marshalUpdateSettingRequest, marshalValidatePartitioningSchemaRequest, unmarshalBMCAccess, unmarshalGetServerMetricsResponse, unmarshalIP, unmarshalListOSResponse, unmarshalListOffersResponse, unmarshalListOptionsResponse, unmarshalListServerEventsResponse, unmarshalListServerPrivateNetworksResponse, unmarshalListServersResponse, unmarshalListSettingsResponse, unmarshalOS, unmarshalOffer, unmarshalOption, unmarshalSchema, unmarshalServer, unmarshalServerPrivateNetwork, unmarshalSetServerPrivateNetworksResponse, unmarshalSetting };