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