@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.
- package/README.md +1 -1
- package/dist/_virtual/_rolldown/runtime.js +11 -0
- package/dist/index.gen.js +3 -6
- package/dist/v1/api.gen.js +400 -597
- package/dist/v1/content.gen.js +12 -16
- package/dist/v1/index.gen.js +43 -41
- package/dist/v1/marshalling.gen.js +428 -675
- package/dist/v1/validation-rules.gen.js +58 -96
- package/dist/v3/api.gen.js +65 -103
- package/dist/v3/content.gen.js +2 -3
- package/dist/v3/index.gen.d.ts +1 -1
- package/dist/v3/index.gen.js +12 -10
- package/dist/v3/marshalling.gen.js +24 -52
- package/package.json +4 -4
|
@@ -1,731 +1,484 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
};
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
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
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
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
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
};
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
};
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
};
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
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
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
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
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
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
|
-
|
|
363
|
-
|
|
364
|
-
|
|
365
|
-
|
|
366
|
-
|
|
367
|
-
|
|
368
|
-
|
|
369
|
-
|
|
370
|
-
|
|
371
|
-
|
|
372
|
-
|
|
373
|
-
|
|
374
|
-
|
|
375
|
-
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
|
|
379
|
-
|
|
380
|
-
|
|
381
|
-
|
|
382
|
-
|
|
383
|
-
|
|
384
|
-
|
|
385
|
-
|
|
386
|
-
|
|
387
|
-
|
|
388
|
-
|
|
389
|
-
|
|
390
|
-
|
|
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
|
-
|
|
404
|
-
|
|
405
|
-
|
|
406
|
-
|
|
407
|
-
|
|
408
|
-
|
|
409
|
-
|
|
410
|
-
|
|
411
|
-
|
|
412
|
-
|
|
413
|
-
|
|
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
|
-
|
|
421
|
-
|
|
422
|
-
|
|
423
|
-
|
|
424
|
-
|
|
425
|
-
|
|
426
|
-
|
|
427
|
-
|
|
428
|
-
|
|
429
|
-
|
|
430
|
-
|
|
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
|
-
|
|
438
|
-
|
|
439
|
-
|
|
440
|
-
|
|
441
|
-
|
|
442
|
-
|
|
443
|
-
|
|
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
|
-
|
|
451
|
-
|
|
452
|
-
|
|
453
|
-
|
|
454
|
-
|
|
455
|
-
|
|
456
|
-
|
|
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
|
-
|
|
464
|
-
|
|
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
|
-
|
|
474
|
-
|
|
475
|
-
|
|
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
|
-
|
|
485
|
-
|
|
486
|
-
|
|
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
|
-
|
|
496
|
-
|
|
497
|
-
|
|
498
|
-
|
|
499
|
-
|
|
500
|
-
|
|
501
|
-
|
|
502
|
-
|
|
503
|
-
|
|
504
|
-
|
|
505
|
-
|
|
506
|
-
|
|
507
|
-
|
|
508
|
-
|
|
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
|
-
|
|
520
|
-
|
|
521
|
-
|
|
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
|
-
|
|
531
|
-
|
|
532
|
-
|
|
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
|
-
|
|
545
|
-
|
|
546
|
-
|
|
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
|
-
|
|
556
|
-
|
|
557
|
-
|
|
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
|
-
|
|
567
|
-
|
|
568
|
-
|
|
569
|
-
|
|
570
|
-
|
|
571
|
-
|
|
572
|
-
|
|
573
|
-
|
|
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
|
-
|
|
585
|
-
|
|
586
|
-
|
|
587
|
-
|
|
588
|
-
|
|
589
|
-
|
|
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
|
-
|
|
592
|
-
|
|
593
|
-
|
|
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
|
-
|
|
598
|
-
|
|
599
|
-
|
|
600
|
-
|
|
401
|
+
var marshalSchemaFilesystem = (request, defaults) => ({
|
|
402
|
+
device: request.device,
|
|
403
|
+
format: request.format,
|
|
404
|
+
mountpoint: request.mountpoint
|
|
601
405
|
});
|
|
602
|
-
|
|
603
|
-
|
|
604
|
-
|
|
605
|
-
|
|
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
|
-
|
|
612
|
-
|
|
613
|
-
|
|
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
|
-
|
|
619
|
-
|
|
620
|
-
|
|
621
|
-
|
|
622
|
-
|
|
623
|
-
|
|
624
|
-
|
|
625
|
-
|
|
626
|
-
|
|
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
|
-
|
|
630
|
-
|
|
631
|
-
|
|
632
|
-
|
|
633
|
-
|
|
634
|
-
|
|
635
|
-
|
|
636
|
-
|
|
637
|
-
|
|
638
|
-
|
|
639
|
-
|
|
640
|
-
|
|
641
|
-
|
|
642
|
-
|
|
643
|
-
|
|
644
|
-
|
|
645
|
-
|
|
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
|
-
|
|
655
|
-
|
|
656
|
-
|
|
657
|
-
|
|
658
|
-
|
|
659
|
-
|
|
660
|
-
|
|
661
|
-
|
|
662
|
-
|
|
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
|
-
|
|
672
|
-
|
|
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
|
-
|
|
679
|
-
|
|
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
|
-
|
|
686
|
-
|
|
687
|
-
|
|
688
|
-
|
|
689
|
-
|
|
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
|
-
|
|
696
|
-
|
|
697
|
-
|
|
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 };
|