@scaleway/sdk-dedibox 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 +2 -4
- package/dist/v1/api.gen.js +911 -1452
- package/dist/v1/content.gen.js +28 -41
- package/dist/v1/index.gen.js +104 -102
- package/dist/v1/marshalling.gen.js +845 -1363
- package/dist/v1/validation-rules.gen.js +276 -586
- package/package.json +4 -4
|
@@ -1,1486 +1,968 @@
|
|
|
1
1
|
import { isJSONObject, unmarshalArrayOfObject, unmarshalDate, unmarshalMoney } from "@scaleway/sdk-client";
|
|
2
2
|
const unmarshalIP = (data) => {
|
|
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
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
};
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
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
|
-
throw new TypeError(
|
|
133
|
-
`Unmarshalling the type 'OfferLicenseInfo' failed as data isn't a dictionary.`
|
|
134
|
-
);
|
|
135
|
-
}
|
|
136
|
-
return {
|
|
137
|
-
boundToIp: data.bound_to_ip
|
|
138
|
-
};
|
|
139
|
-
};
|
|
140
|
-
const unmarshalOfferRPNInfo = (data) => {
|
|
141
|
-
if (!isJSONObject(data)) {
|
|
142
|
-
throw new TypeError(
|
|
143
|
-
`Unmarshalling the type 'OfferRPNInfo' failed as data isn't a dictionary.`
|
|
144
|
-
);
|
|
145
|
-
}
|
|
146
|
-
return {
|
|
147
|
-
speed: data.speed
|
|
148
|
-
};
|
|
149
|
-
};
|
|
150
|
-
const unmarshalOfferSANInfo = (data) => {
|
|
151
|
-
if (!isJSONObject(data)) {
|
|
152
|
-
throw new TypeError(
|
|
153
|
-
`Unmarshalling the type 'OfferSANInfo' failed as data isn't a dictionary.`
|
|
154
|
-
);
|
|
155
|
-
}
|
|
156
|
-
return {
|
|
157
|
-
deviceType: data.device_type,
|
|
158
|
-
ha: data.ha,
|
|
159
|
-
size: data.size
|
|
160
|
-
};
|
|
161
|
-
};
|
|
162
|
-
const unmarshalOfferServerInfo = (data) => {
|
|
163
|
-
if (!isJSONObject(data)) {
|
|
164
|
-
throw new TypeError(
|
|
165
|
-
`Unmarshalling the type 'OfferServerInfo' failed as data isn't a dictionary.`
|
|
166
|
-
);
|
|
167
|
-
}
|
|
168
|
-
return {
|
|
169
|
-
availableOptions: unmarshalArrayOfObject(
|
|
170
|
-
data.available_options,
|
|
171
|
-
unmarshalOffer
|
|
172
|
-
),
|
|
173
|
-
bandwidth: data.bandwidth,
|
|
174
|
-
commercialRange: data.commercial_range,
|
|
175
|
-
connectivity: data.connectivity,
|
|
176
|
-
cpus: unmarshalArrayOfObject(data.cpus, unmarshalCPU),
|
|
177
|
-
disks: unmarshalArrayOfObject(data.disks, unmarshalDisk),
|
|
178
|
-
memories: unmarshalArrayOfObject(data.memories, unmarshalMemory),
|
|
179
|
-
onetimeFees: data.onetime_fees ? unmarshalOffer(data.onetime_fees) : void 0,
|
|
180
|
-
persistentMemories: unmarshalArrayOfObject(
|
|
181
|
-
data.persistent_memories,
|
|
182
|
-
unmarshalPersistentMemory
|
|
183
|
-
),
|
|
184
|
-
raidControllers: unmarshalArrayOfObject(
|
|
185
|
-
data.raid_controllers,
|
|
186
|
-
unmarshalRaidController
|
|
187
|
-
),
|
|
188
|
-
rpnVersion: data.rpn_version,
|
|
189
|
-
stock: data.stock,
|
|
190
|
-
stockByDatacenter: data.stock_by_datacenter
|
|
191
|
-
};
|
|
192
|
-
};
|
|
193
|
-
const unmarshalOfferServiceLevelInfo = (data) => {
|
|
194
|
-
if (!isJSONObject(data)) {
|
|
195
|
-
throw new TypeError(
|
|
196
|
-
`Unmarshalling the type 'OfferServiceLevelInfo' failed as data isn't a dictionary.`
|
|
197
|
-
);
|
|
198
|
-
}
|
|
199
|
-
return {
|
|
200
|
-
antidos: data.antidos,
|
|
201
|
-
availableOptions: unmarshalArrayOfObject(
|
|
202
|
-
data.available_options,
|
|
203
|
-
unmarshalOffer
|
|
204
|
-
),
|
|
205
|
-
customization: data.customization,
|
|
206
|
-
extraFailoverQuota: data.extra_failover_quota,
|
|
207
|
-
git: data.git,
|
|
208
|
-
highRpnBandwidth: data.high_rpn_bandwidth,
|
|
209
|
-
prioritySupport: data.priority_support,
|
|
210
|
-
salesSupport: data.sales_support,
|
|
211
|
-
sla: data.sla,
|
|
212
|
-
supportPhone: data.support_phone,
|
|
213
|
-
supportTicket: data.support_ticket
|
|
214
|
-
};
|
|
215
|
-
};
|
|
216
|
-
const unmarshalOfferStorageInfo = (data) => {
|
|
217
|
-
if (!isJSONObject(data)) {
|
|
218
|
-
throw new TypeError(
|
|
219
|
-
`Unmarshalling the type 'OfferStorageInfo' failed as data isn't a dictionary.`
|
|
220
|
-
);
|
|
221
|
-
}
|
|
222
|
-
return {
|
|
223
|
-
maxQuota: data.max_quota,
|
|
224
|
-
size: data.size
|
|
225
|
-
};
|
|
3
|
+
if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'IP' failed as data isn't a dictionary.`);
|
|
4
|
+
return {
|
|
5
|
+
address: data.address,
|
|
6
|
+
cidr: data.cidr,
|
|
7
|
+
gateway: data.gateway,
|
|
8
|
+
ipId: data.ip_id,
|
|
9
|
+
netmask: data.netmask,
|
|
10
|
+
reverse: data.reverse,
|
|
11
|
+
semantic: data.semantic,
|
|
12
|
+
status: data.status,
|
|
13
|
+
version: data.version
|
|
14
|
+
};
|
|
15
|
+
};
|
|
16
|
+
var unmarshalCPU = (data) => {
|
|
17
|
+
if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'CPU' failed as data isn't a dictionary.`);
|
|
18
|
+
return {
|
|
19
|
+
coreCount: data.core_count,
|
|
20
|
+
frequency: data.frequency,
|
|
21
|
+
name: data.name,
|
|
22
|
+
threadCount: data.thread_count
|
|
23
|
+
};
|
|
24
|
+
};
|
|
25
|
+
var unmarshalDisk = (data) => {
|
|
26
|
+
if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'Disk' failed as data isn't a dictionary.`);
|
|
27
|
+
return {
|
|
28
|
+
capacity: data.capacity,
|
|
29
|
+
type: data.type
|
|
30
|
+
};
|
|
31
|
+
};
|
|
32
|
+
var unmarshalMemory = (data) => {
|
|
33
|
+
if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'Memory' failed as data isn't a dictionary.`);
|
|
34
|
+
return {
|
|
35
|
+
capacity: data.capacity,
|
|
36
|
+
frequency: data.frequency,
|
|
37
|
+
isEcc: data.is_ecc,
|
|
38
|
+
type: data.type
|
|
39
|
+
};
|
|
40
|
+
};
|
|
41
|
+
var unmarshalPersistentMemory = (data) => {
|
|
42
|
+
if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'PersistentMemory' failed as data isn't a dictionary.`);
|
|
43
|
+
return {
|
|
44
|
+
capacity: data.capacity,
|
|
45
|
+
frequency: data.frequency,
|
|
46
|
+
model: data.model
|
|
47
|
+
};
|
|
48
|
+
};
|
|
49
|
+
var unmarshalRaidController = (data) => {
|
|
50
|
+
if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'RaidController' failed as data isn't a dictionary.`);
|
|
51
|
+
return {
|
|
52
|
+
model: data.model,
|
|
53
|
+
raidLevel: data.raid_level
|
|
54
|
+
};
|
|
55
|
+
};
|
|
56
|
+
var unmarshalOfferAntiDosInfo = (data) => {
|
|
57
|
+
if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'OfferAntiDosInfo' failed as data isn't a dictionary.`);
|
|
58
|
+
return { type: data.type };
|
|
59
|
+
};
|
|
60
|
+
var unmarshalOfferBackupInfo = (data) => {
|
|
61
|
+
if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'OfferBackupInfo' failed as data isn't a dictionary.`);
|
|
62
|
+
return { size: data.size };
|
|
63
|
+
};
|
|
64
|
+
var unmarshalOfferBandwidthInfo = (data) => {
|
|
65
|
+
if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'OfferBandwidthInfo' failed as data isn't a dictionary.`);
|
|
66
|
+
return { speed: data.speed };
|
|
67
|
+
};
|
|
68
|
+
var unmarshalOfferFailoverBlockInfo = (data) => {
|
|
69
|
+
if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'OfferFailoverBlockInfo' failed as data isn't a dictionary.`);
|
|
70
|
+
return { onetimeFees: data.onetime_fees ? unmarshalOffer(data.onetime_fees) : void 0 };
|
|
71
|
+
};
|
|
72
|
+
var unmarshalOfferFailoverIpInfo = (data) => {
|
|
73
|
+
if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'OfferFailoverIpInfo' failed as data isn't a dictionary.`);
|
|
74
|
+
return { onetimeFees: data.onetime_fees ? unmarshalOffer(data.onetime_fees) : void 0 };
|
|
75
|
+
};
|
|
76
|
+
var unmarshalOfferLicenseInfo = (data) => {
|
|
77
|
+
if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'OfferLicenseInfo' failed as data isn't a dictionary.`);
|
|
78
|
+
return { boundToIp: data.bound_to_ip };
|
|
79
|
+
};
|
|
80
|
+
var unmarshalOfferRPNInfo = (data) => {
|
|
81
|
+
if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'OfferRPNInfo' failed as data isn't a dictionary.`);
|
|
82
|
+
return { speed: data.speed };
|
|
83
|
+
};
|
|
84
|
+
var unmarshalOfferSANInfo = (data) => {
|
|
85
|
+
if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'OfferSANInfo' failed as data isn't a dictionary.`);
|
|
86
|
+
return {
|
|
87
|
+
deviceType: data.device_type,
|
|
88
|
+
ha: data.ha,
|
|
89
|
+
size: data.size
|
|
90
|
+
};
|
|
91
|
+
};
|
|
92
|
+
var unmarshalOfferServerInfo = (data) => {
|
|
93
|
+
if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'OfferServerInfo' failed as data isn't a dictionary.`);
|
|
94
|
+
return {
|
|
95
|
+
availableOptions: unmarshalArrayOfObject(data.available_options, unmarshalOffer),
|
|
96
|
+
bandwidth: data.bandwidth,
|
|
97
|
+
commercialRange: data.commercial_range,
|
|
98
|
+
connectivity: data.connectivity,
|
|
99
|
+
cpus: unmarshalArrayOfObject(data.cpus, unmarshalCPU),
|
|
100
|
+
disks: unmarshalArrayOfObject(data.disks, unmarshalDisk),
|
|
101
|
+
memories: unmarshalArrayOfObject(data.memories, unmarshalMemory),
|
|
102
|
+
onetimeFees: data.onetime_fees ? unmarshalOffer(data.onetime_fees) : void 0,
|
|
103
|
+
persistentMemories: unmarshalArrayOfObject(data.persistent_memories, unmarshalPersistentMemory),
|
|
104
|
+
raidControllers: unmarshalArrayOfObject(data.raid_controllers, unmarshalRaidController),
|
|
105
|
+
rpnVersion: data.rpn_version,
|
|
106
|
+
stock: data.stock,
|
|
107
|
+
stockByDatacenter: data.stock_by_datacenter
|
|
108
|
+
};
|
|
109
|
+
};
|
|
110
|
+
var unmarshalOfferServiceLevelInfo = (data) => {
|
|
111
|
+
if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'OfferServiceLevelInfo' failed as data isn't a dictionary.`);
|
|
112
|
+
return {
|
|
113
|
+
antidos: data.antidos,
|
|
114
|
+
availableOptions: unmarshalArrayOfObject(data.available_options, unmarshalOffer),
|
|
115
|
+
customization: data.customization,
|
|
116
|
+
extraFailoverQuota: data.extra_failover_quota,
|
|
117
|
+
git: data.git,
|
|
118
|
+
highRpnBandwidth: data.high_rpn_bandwidth,
|
|
119
|
+
prioritySupport: data.priority_support,
|
|
120
|
+
salesSupport: data.sales_support,
|
|
121
|
+
sla: data.sla,
|
|
122
|
+
supportPhone: data.support_phone,
|
|
123
|
+
supportTicket: data.support_ticket
|
|
124
|
+
};
|
|
125
|
+
};
|
|
126
|
+
var unmarshalOfferStorageInfo = (data) => {
|
|
127
|
+
if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'OfferStorageInfo' failed as data isn't a dictionary.`);
|
|
128
|
+
return {
|
|
129
|
+
maxQuota: data.max_quota,
|
|
130
|
+
size: data.size
|
|
131
|
+
};
|
|
226
132
|
};
|
|
227
133
|
const unmarshalOffer = (data) => {
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
serviceLevelInfo: data.service_level_info ? unmarshalOfferServiceLevelInfo(data.service_level_info) : void 0,
|
|
249
|
-
storageInfo: data.storage_info ? unmarshalOfferStorageInfo(data.storage_info) : void 0,
|
|
250
|
-
usbStorageInfo: data.usb_storage_info ? unmarshalOfferStorageInfo(data.usb_storage_info) : void 0
|
|
251
|
-
};
|
|
134
|
+
if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'Offer' failed as data isn't a dictionary.`);
|
|
135
|
+
return {
|
|
136
|
+
antidosInfo: data.antidos_info ? unmarshalOfferAntiDosInfo(data.antidos_info) : void 0,
|
|
137
|
+
backupInfo: data.backup_info ? unmarshalOfferBackupInfo(data.backup_info) : void 0,
|
|
138
|
+
bandwidthInfo: data.bandwidth_info ? unmarshalOfferBandwidthInfo(data.bandwidth_info) : void 0,
|
|
139
|
+
catalog: data.catalog,
|
|
140
|
+
failoverBlockInfo: data.failover_block_info ? unmarshalOfferFailoverBlockInfo(data.failover_block_info) : void 0,
|
|
141
|
+
failoverIpInfo: data.failover_ip_info ? unmarshalOfferFailoverIpInfo(data.failover_ip_info) : void 0,
|
|
142
|
+
id: data.id,
|
|
143
|
+
licenseInfo: data.license_info ? unmarshalOfferLicenseInfo(data.license_info) : void 0,
|
|
144
|
+
name: data.name,
|
|
145
|
+
paymentFrequency: data.payment_frequency,
|
|
146
|
+
pricing: data.pricing ? unmarshalMoney(data.pricing) : void 0,
|
|
147
|
+
rpnInfo: data.rpn_info ? unmarshalOfferRPNInfo(data.rpn_info) : void 0,
|
|
148
|
+
sanInfo: data.san_info ? unmarshalOfferSANInfo(data.san_info) : void 0,
|
|
149
|
+
serverInfo: data.server_info ? unmarshalOfferServerInfo(data.server_info) : void 0,
|
|
150
|
+
serviceLevelInfo: data.service_level_info ? unmarshalOfferServiceLevelInfo(data.service_level_info) : void 0,
|
|
151
|
+
storageInfo: data.storage_info ? unmarshalOfferStorageInfo(data.storage_info) : void 0,
|
|
152
|
+
usbStorageInfo: data.usb_storage_info ? unmarshalOfferStorageInfo(data.usb_storage_info) : void 0
|
|
153
|
+
};
|
|
252
154
|
};
|
|
253
155
|
const unmarshalOS = (data) => {
|
|
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
|
-
requiresValidHostname: data.requires_valid_hostname,
|
|
279
|
-
type: data.type,
|
|
280
|
-
version: data.version
|
|
281
|
-
};
|
|
156
|
+
if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'OS' failed as data isn't a dictionary.`);
|
|
157
|
+
return {
|
|
158
|
+
allowCustomPartitioning: data.allow_custom_partitioning,
|
|
159
|
+
allowSshKeys: data.allow_ssh_keys,
|
|
160
|
+
allowedFilesystems: data.allowed_filesystems,
|
|
161
|
+
arch: data.arch,
|
|
162
|
+
displayName: data.display_name,
|
|
163
|
+
hostnameMaxLength: data.hostname_max_length,
|
|
164
|
+
hostnameRegex: data.hostname_regex,
|
|
165
|
+
id: data.id,
|
|
166
|
+
licenseOffers: unmarshalArrayOfObject(data.license_offers, unmarshalOffer),
|
|
167
|
+
maxPartitions: data.max_partitions,
|
|
168
|
+
name: data.name,
|
|
169
|
+
panelPasswordRegex: data.panel_password_regex,
|
|
170
|
+
passwordRegex: data.password_regex,
|
|
171
|
+
releasedAt: unmarshalDate(data.released_at),
|
|
172
|
+
requiresAdminPassword: data.requires_admin_password,
|
|
173
|
+
requiresLicense: data.requires_license,
|
|
174
|
+
requiresPanelPassword: data.requires_panel_password,
|
|
175
|
+
requiresUser: data.requires_user,
|
|
176
|
+
requiresValidHostname: data.requires_valid_hostname,
|
|
177
|
+
type: data.type,
|
|
178
|
+
version: data.version
|
|
179
|
+
};
|
|
282
180
|
};
|
|
283
181
|
const unmarshalRpnSan = (data) => {
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
status: data.status,
|
|
306
|
-
storageSize: data.storage_size,
|
|
307
|
-
terminatedAt: unmarshalDate(data.terminated_at)
|
|
308
|
-
};
|
|
182
|
+
if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'RpnSan' failed as data isn't a dictionary.`);
|
|
183
|
+
return {
|
|
184
|
+
createdAt: unmarshalDate(data.created_at),
|
|
185
|
+
datacenterName: data.datacenter_name,
|
|
186
|
+
deliveredAt: unmarshalDate(data.delivered_at),
|
|
187
|
+
expiresAt: unmarshalDate(data.expires_at),
|
|
188
|
+
id: data.id,
|
|
189
|
+
iqn: data.iqn,
|
|
190
|
+
iqnSuffix: data.iqn_suffix,
|
|
191
|
+
offer: data.offer ? unmarshalOffer(data.offer) : void 0,
|
|
192
|
+
offerId: data.offer_id,
|
|
193
|
+
offerName: data.offer_name,
|
|
194
|
+
organizationId: data.organization_id,
|
|
195
|
+
projectId: data.project_id,
|
|
196
|
+
rpnv1Compatible: data.rpnv1_compatible,
|
|
197
|
+
rpnv1Implicit: data.rpnv1_implicit,
|
|
198
|
+
serverHostname: data.server_hostname,
|
|
199
|
+
status: data.status,
|
|
200
|
+
storageSize: data.storage_size,
|
|
201
|
+
terminatedAt: unmarshalDate(data.terminated_at)
|
|
202
|
+
};
|
|
309
203
|
};
|
|
310
204
|
const unmarshalRpnGroup = (data) => {
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
};
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
);
|
|
359
|
-
}
|
|
360
|
-
return {
|
|
361
|
-
createdAt: unmarshalDate(data.created_at),
|
|
362
|
-
expiredAt: unmarshalDate(data.expired_at),
|
|
363
|
-
offer: data.offer ? unmarshalOffer(data.offer) : void 0,
|
|
364
|
-
options: unmarshalArrayOfObject(data.options, unmarshalServerOption),
|
|
365
|
-
updatedAt: unmarshalDate(data.updated_at)
|
|
366
|
-
};
|
|
367
|
-
};
|
|
368
|
-
const unmarshalServiceLevel = (data) => {
|
|
369
|
-
if (!isJSONObject(data)) {
|
|
370
|
-
throw new TypeError(
|
|
371
|
-
`Unmarshalling the type 'ServiceLevel' failed as data isn't a dictionary.`
|
|
372
|
-
);
|
|
373
|
-
}
|
|
374
|
-
return {
|
|
375
|
-
level: data.level,
|
|
376
|
-
offerId: data.offer_id
|
|
377
|
-
};
|
|
205
|
+
if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'RpnGroup' failed as data isn't a dictionary.`);
|
|
206
|
+
return {
|
|
207
|
+
active: data.active,
|
|
208
|
+
createdAt: unmarshalDate(data.created_at),
|
|
209
|
+
id: data.id,
|
|
210
|
+
membersCount: data.members_count,
|
|
211
|
+
name: data.name,
|
|
212
|
+
organizationId: data.organization_id,
|
|
213
|
+
owner: data.owner,
|
|
214
|
+
projectId: data.project_id,
|
|
215
|
+
type: data.type
|
|
216
|
+
};
|
|
217
|
+
};
|
|
218
|
+
var unmarshalNetworkInterface = (data) => {
|
|
219
|
+
if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'NetworkInterface' failed as data isn't a dictionary.`);
|
|
220
|
+
return {
|
|
221
|
+
cardId: data.card_id,
|
|
222
|
+
deviceId: data.device_id,
|
|
223
|
+
ips: unmarshalArrayOfObject(data.ips, unmarshalIP),
|
|
224
|
+
mac: data.mac,
|
|
225
|
+
type: data.type
|
|
226
|
+
};
|
|
227
|
+
};
|
|
228
|
+
var unmarshalServerLocation = (data) => {
|
|
229
|
+
if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'ServerLocation' failed as data isn't a dictionary.`);
|
|
230
|
+
return {
|
|
231
|
+
datacenterName: data.datacenter_name,
|
|
232
|
+
rack: data.rack,
|
|
233
|
+
room: data.room
|
|
234
|
+
};
|
|
235
|
+
};
|
|
236
|
+
var unmarshalServerOption = (data) => {
|
|
237
|
+
if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'ServerOption' failed as data isn't a dictionary.`);
|
|
238
|
+
return {
|
|
239
|
+
createdAt: unmarshalDate(data.created_at),
|
|
240
|
+
expiredAt: unmarshalDate(data.expired_at),
|
|
241
|
+
offer: data.offer ? unmarshalOffer(data.offer) : void 0,
|
|
242
|
+
options: unmarshalArrayOfObject(data.options, unmarshalServerOption),
|
|
243
|
+
updatedAt: unmarshalDate(data.updated_at)
|
|
244
|
+
};
|
|
245
|
+
};
|
|
246
|
+
var unmarshalServiceLevel = (data) => {
|
|
247
|
+
if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'ServiceLevel' failed as data isn't a dictionary.`);
|
|
248
|
+
return {
|
|
249
|
+
level: data.level,
|
|
250
|
+
offerId: data.offer_id
|
|
251
|
+
};
|
|
378
252
|
};
|
|
379
253
|
const unmarshalServer = (data) => {
|
|
380
|
-
|
|
381
|
-
|
|
382
|
-
|
|
383
|
-
|
|
384
|
-
|
|
385
|
-
|
|
386
|
-
|
|
387
|
-
|
|
388
|
-
|
|
389
|
-
|
|
390
|
-
|
|
391
|
-
|
|
392
|
-
|
|
393
|
-
|
|
394
|
-
|
|
395
|
-
|
|
396
|
-
|
|
397
|
-
|
|
398
|
-
|
|
399
|
-
|
|
400
|
-
|
|
401
|
-
|
|
402
|
-
|
|
403
|
-
|
|
404
|
-
|
|
405
|
-
|
|
406
|
-
|
|
407
|
-
|
|
408
|
-
|
|
409
|
-
|
|
410
|
-
|
|
411
|
-
|
|
412
|
-
|
|
413
|
-
|
|
414
|
-
|
|
415
|
-
};
|
|
416
|
-
const unmarshalRpnV2GroupSubnet = (data) => {
|
|
417
|
-
if (!isJSONObject(data)) {
|
|
418
|
-
throw new TypeError(
|
|
419
|
-
`Unmarshalling the type 'RpnV2GroupSubnet' failed as data isn't a dictionary.`
|
|
420
|
-
);
|
|
421
|
-
}
|
|
422
|
-
return {
|
|
423
|
-
address: data.address,
|
|
424
|
-
cidr: data.cidr
|
|
425
|
-
};
|
|
254
|
+
if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'Server' failed as data isn't a dictionary.`);
|
|
255
|
+
return {
|
|
256
|
+
abuseContact: data.abuse_contact,
|
|
257
|
+
createdAt: unmarshalDate(data.created_at),
|
|
258
|
+
expiredAt: unmarshalDate(data.expired_at),
|
|
259
|
+
hasBmc: data.has_bmc,
|
|
260
|
+
hostname: data.hostname,
|
|
261
|
+
id: data.id,
|
|
262
|
+
interfaces: unmarshalArrayOfObject(data.interfaces, unmarshalNetworkInterface),
|
|
263
|
+
ipv6Slaac: data.ipv6_slaac,
|
|
264
|
+
isHds: data.is_hds,
|
|
265
|
+
isOutsourced: data.is_outsourced,
|
|
266
|
+
isRpnv2Member: data.is_rpnv2_member,
|
|
267
|
+
level: data.level ? unmarshalServiceLevel(data.level) : void 0,
|
|
268
|
+
location: data.location ? unmarshalServerLocation(data.location) : void 0,
|
|
269
|
+
offer: data.offer ? unmarshalOffer(data.offer) : void 0,
|
|
270
|
+
options: unmarshalArrayOfObject(data.options, unmarshalServerOption),
|
|
271
|
+
organizationId: data.organization_id,
|
|
272
|
+
os: data.os ? unmarshalOS(data.os) : void 0,
|
|
273
|
+
projectId: data.project_id,
|
|
274
|
+
qinq: data.qinq,
|
|
275
|
+
rebootedAt: unmarshalDate(data.rebooted_at),
|
|
276
|
+
rescueOs: data.rescue_os ? unmarshalOS(data.rescue_os) : void 0,
|
|
277
|
+
status: data.status,
|
|
278
|
+
tags: data.tags,
|
|
279
|
+
updatedAt: unmarshalDate(data.updated_at),
|
|
280
|
+
zone: data.zone
|
|
281
|
+
};
|
|
282
|
+
};
|
|
283
|
+
var unmarshalRpnV2GroupSubnet = (data) => {
|
|
284
|
+
if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'RpnV2GroupSubnet' failed as data isn't a dictionary.`);
|
|
285
|
+
return {
|
|
286
|
+
address: data.address,
|
|
287
|
+
cidr: data.cidr
|
|
288
|
+
};
|
|
426
289
|
};
|
|
427
290
|
const unmarshalRpnV2Group = (data) => {
|
|
428
|
-
|
|
429
|
-
|
|
430
|
-
|
|
431
|
-
|
|
432
|
-
|
|
433
|
-
|
|
434
|
-
|
|
435
|
-
|
|
436
|
-
|
|
437
|
-
|
|
438
|
-
|
|
439
|
-
|
|
440
|
-
|
|
441
|
-
|
|
442
|
-
|
|
443
|
-
status: data.status,
|
|
444
|
-
subnet: data.subnet ? unmarshalRpnV2GroupSubnet(data.subnet) : void 0,
|
|
445
|
-
type: data.type
|
|
446
|
-
};
|
|
291
|
+
if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'RpnV2Group' failed as data isn't a dictionary.`);
|
|
292
|
+
return {
|
|
293
|
+
compatibleRpnv1: data.compatible_rpnv1,
|
|
294
|
+
gateway: data.gateway,
|
|
295
|
+
id: data.id,
|
|
296
|
+
membersCount: data.members_count,
|
|
297
|
+
name: data.name,
|
|
298
|
+
organizationId: data.organization_id,
|
|
299
|
+
owner: data.owner,
|
|
300
|
+
projectId: data.project_id,
|
|
301
|
+
rpnv1Group: data.rpnv1_group ? unmarshalRpnGroup(data.rpnv1_group) : void 0,
|
|
302
|
+
status: data.status,
|
|
303
|
+
subnet: data.subnet ? unmarshalRpnV2GroupSubnet(data.subnet) : void 0,
|
|
304
|
+
type: data.type
|
|
305
|
+
};
|
|
447
306
|
};
|
|
448
307
|
const unmarshalService = (data) => {
|
|
449
|
-
|
|
450
|
-
|
|
451
|
-
|
|
452
|
-
|
|
453
|
-
|
|
454
|
-
|
|
455
|
-
|
|
456
|
-
|
|
457
|
-
|
|
458
|
-
|
|
459
|
-
|
|
460
|
-
|
|
461
|
-
|
|
462
|
-
|
|
463
|
-
|
|
464
|
-
|
|
465
|
-
|
|
466
|
-
|
|
467
|
-
|
|
468
|
-
|
|
469
|
-
|
|
470
|
-
|
|
471
|
-
|
|
472
|
-
|
|
473
|
-
address: data.address,
|
|
474
|
-
cidr: data.cidr,
|
|
475
|
-
gatewayIp: data.gateway_ip,
|
|
476
|
-
id: data.id,
|
|
477
|
-
ipVersion: data.ip_version,
|
|
478
|
-
nameservers: data.nameservers,
|
|
479
|
-
netmask: data.netmask
|
|
480
|
-
};
|
|
308
|
+
if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'Service' failed as data isn't a dictionary.`);
|
|
309
|
+
return {
|
|
310
|
+
createdAt: unmarshalDate(data.created_at),
|
|
311
|
+
deliveredAt: unmarshalDate(data.delivered_at),
|
|
312
|
+
expiresAt: unmarshalDate(data.expires_at),
|
|
313
|
+
id: data.id,
|
|
314
|
+
offer: data.offer ? unmarshalOffer(data.offer) : void 0,
|
|
315
|
+
provisioningStatus: data.provisioning_status,
|
|
316
|
+
resourceId: data.resource_id,
|
|
317
|
+
terminatedAt: unmarshalDate(data.terminated_at),
|
|
318
|
+
type: data.type
|
|
319
|
+
};
|
|
320
|
+
};
|
|
321
|
+
var unmarshalFailoverBlock = (data) => {
|
|
322
|
+
if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'FailoverBlock' failed as data isn't a dictionary.`);
|
|
323
|
+
return {
|
|
324
|
+
address: data.address,
|
|
325
|
+
cidr: data.cidr,
|
|
326
|
+
gatewayIp: data.gateway_ip,
|
|
327
|
+
id: data.id,
|
|
328
|
+
ipVersion: data.ip_version,
|
|
329
|
+
nameservers: data.nameservers,
|
|
330
|
+
netmask: data.netmask
|
|
331
|
+
};
|
|
481
332
|
};
|
|
482
333
|
const unmarshalFailoverIP = (data) => {
|
|
483
|
-
|
|
484
|
-
|
|
485
|
-
|
|
486
|
-
|
|
487
|
-
|
|
488
|
-
|
|
489
|
-
|
|
490
|
-
|
|
491
|
-
|
|
492
|
-
|
|
493
|
-
|
|
494
|
-
|
|
495
|
-
|
|
496
|
-
|
|
497
|
-
|
|
498
|
-
|
|
499
|
-
serverZone: data.server_zone,
|
|
500
|
-
status: data.status,
|
|
501
|
-
type: data.type
|
|
502
|
-
};
|
|
334
|
+
if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'FailoverIP' failed as data isn't a dictionary.`);
|
|
335
|
+
return {
|
|
336
|
+
address: data.address,
|
|
337
|
+
block: data.block ? unmarshalFailoverBlock(data.block) : void 0,
|
|
338
|
+
cidr: data.cidr,
|
|
339
|
+
gatewayIp: data.gateway_ip,
|
|
340
|
+
id: data.id,
|
|
341
|
+
ipVersion: data.ip_version,
|
|
342
|
+
mac: data.mac,
|
|
343
|
+
netmask: data.netmask,
|
|
344
|
+
reverse: data.reverse,
|
|
345
|
+
serverId: data.server_id,
|
|
346
|
+
serverZone: data.server_zone,
|
|
347
|
+
status: data.status,
|
|
348
|
+
type: data.type
|
|
349
|
+
};
|
|
503
350
|
};
|
|
504
351
|
const unmarshalIPv6Block = (data) => {
|
|
505
|
-
|
|
506
|
-
|
|
507
|
-
|
|
508
|
-
|
|
509
|
-
|
|
510
|
-
|
|
511
|
-
|
|
512
|
-
|
|
513
|
-
|
|
514
|
-
|
|
515
|
-
id: data.id,
|
|
516
|
-
nameservers: data.nameservers,
|
|
517
|
-
subnets: unmarshalArrayOfObject(data.subnets, unmarshalIPv6Block)
|
|
518
|
-
};
|
|
352
|
+
if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'IPv6Block' failed as data isn't a dictionary.`);
|
|
353
|
+
return {
|
|
354
|
+
address: data.address,
|
|
355
|
+
cidr: data.cidr,
|
|
356
|
+
delegationStatus: data.delegation_status,
|
|
357
|
+
duid: data.duid,
|
|
358
|
+
id: data.id,
|
|
359
|
+
nameservers: data.nameservers,
|
|
360
|
+
subnets: unmarshalArrayOfObject(data.subnets, unmarshalIPv6Block)
|
|
361
|
+
};
|
|
519
362
|
};
|
|
520
363
|
const unmarshalBMCAccess = (data) => {
|
|
521
|
-
|
|
522
|
-
|
|
523
|
-
|
|
524
|
-
|
|
525
|
-
|
|
526
|
-
|
|
527
|
-
|
|
528
|
-
|
|
529
|
-
password: data.password,
|
|
530
|
-
status: data.status,
|
|
531
|
-
url: data.url
|
|
532
|
-
};
|
|
364
|
+
if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'BMCAccess' failed as data isn't a dictionary.`);
|
|
365
|
+
return {
|
|
366
|
+
expiresAt: unmarshalDate(data.expires_at),
|
|
367
|
+
login: data.login,
|
|
368
|
+
password: data.password,
|
|
369
|
+
status: data.status,
|
|
370
|
+
url: data.url
|
|
371
|
+
};
|
|
533
372
|
};
|
|
534
373
|
const unmarshalBackup = (data) => {
|
|
535
|
-
|
|
536
|
-
|
|
537
|
-
|
|
538
|
-
|
|
539
|
-
|
|
540
|
-
|
|
541
|
-
|
|
542
|
-
|
|
543
|
-
|
|
544
|
-
|
|
545
|
-
|
|
546
|
-
|
|
547
|
-
|
|
548
|
-
quotaSpaceUsed: data.quota_space_used,
|
|
549
|
-
server: data.server,
|
|
550
|
-
status: data.status
|
|
551
|
-
};
|
|
374
|
+
if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'Backup' failed as data isn't a dictionary.`);
|
|
375
|
+
return {
|
|
376
|
+
aclEnabled: data.acl_enabled,
|
|
377
|
+
autologin: data.autologin,
|
|
378
|
+
id: data.id,
|
|
379
|
+
login: data.login,
|
|
380
|
+
quotaFiles: data.quota_files,
|
|
381
|
+
quotaFilesUsed: data.quota_files_used,
|
|
382
|
+
quotaSpace: data.quota_space,
|
|
383
|
+
quotaSpaceUsed: data.quota_space_used,
|
|
384
|
+
server: data.server,
|
|
385
|
+
status: data.status
|
|
386
|
+
};
|
|
552
387
|
};
|
|
553
388
|
const unmarshalCanOrderResponse = (data) => {
|
|
554
|
-
|
|
555
|
-
|
|
556
|
-
|
|
557
|
-
|
|
558
|
-
|
|
559
|
-
|
|
560
|
-
|
|
561
|
-
|
|
562
|
-
|
|
563
|
-
|
|
564
|
-
|
|
565
|
-
phoneConfirmed: data.phone_confirmed,
|
|
566
|
-
quotaOk: data.quota_ok,
|
|
567
|
-
userConfirmed: data.user_confirmed
|
|
568
|
-
};
|
|
389
|
+
if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'CanOrderResponse' failed as data isn't a dictionary.`);
|
|
390
|
+
return {
|
|
391
|
+
billingOk: data.billing_ok,
|
|
392
|
+
canOrder: data.can_order,
|
|
393
|
+
emailConfirmed: data.email_confirmed,
|
|
394
|
+
message: data.message,
|
|
395
|
+
paymentMode: data.payment_mode,
|
|
396
|
+
phoneConfirmed: data.phone_confirmed,
|
|
397
|
+
quotaOk: data.quota_ok,
|
|
398
|
+
userConfirmed: data.user_confirmed
|
|
399
|
+
};
|
|
569
400
|
};
|
|
570
401
|
const unmarshalCreateFailoverIPsResponse = (data) => {
|
|
571
|
-
|
|
572
|
-
|
|
573
|
-
|
|
574
|
-
|
|
575
|
-
|
|
576
|
-
|
|
577
|
-
|
|
578
|
-
|
|
579
|
-
|
|
580
|
-
|
|
581
|
-
|
|
582
|
-
|
|
583
|
-
throw new TypeError(
|
|
584
|
-
`Unmarshalling the type 'GetIPv6BlockQuotasResponseQuota' failed as data isn't a dictionary.`
|
|
585
|
-
);
|
|
586
|
-
}
|
|
587
|
-
return {
|
|
588
|
-
cidr: data.cidr,
|
|
589
|
-
quota: data.quota
|
|
590
|
-
};
|
|
402
|
+
if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'CreateFailoverIPsResponse' failed as data isn't a dictionary.`);
|
|
403
|
+
return {
|
|
404
|
+
services: unmarshalArrayOfObject(data.services, unmarshalService),
|
|
405
|
+
totalCount: data.total_count
|
|
406
|
+
};
|
|
407
|
+
};
|
|
408
|
+
var unmarshalGetIPv6BlockQuotasResponseQuota = (data) => {
|
|
409
|
+
if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'GetIPv6BlockQuotasResponseQuota' failed as data isn't a dictionary.`);
|
|
410
|
+
return {
|
|
411
|
+
cidr: data.cidr,
|
|
412
|
+
quota: data.quota
|
|
413
|
+
};
|
|
591
414
|
};
|
|
592
415
|
const unmarshalGetIPv6BlockQuotasResponse = (data) => {
|
|
593
|
-
|
|
594
|
-
|
|
595
|
-
|
|
596
|
-
|
|
597
|
-
|
|
598
|
-
return {
|
|
599
|
-
quotas: unmarshalArrayOfObject(
|
|
600
|
-
data.quotas,
|
|
601
|
-
unmarshalGetIPv6BlockQuotasResponseQuota
|
|
602
|
-
),
|
|
603
|
-
totalCount: data.total_count
|
|
604
|
-
};
|
|
416
|
+
if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'GetIPv6BlockQuotasResponse' failed as data isn't a dictionary.`);
|
|
417
|
+
return {
|
|
418
|
+
quotas: unmarshalArrayOfObject(data.quotas, unmarshalGetIPv6BlockQuotasResponseQuota),
|
|
419
|
+
totalCount: data.total_count
|
|
420
|
+
};
|
|
605
421
|
};
|
|
606
422
|
const unmarshalGetRemainingQuotaResponse = (data) => {
|
|
607
|
-
|
|
608
|
-
|
|
609
|
-
|
|
610
|
-
|
|
611
|
-
|
|
612
|
-
|
|
613
|
-
|
|
614
|
-
failoverBlockRemainingQuota: data.failover_block_remaining_quota,
|
|
615
|
-
failoverIpQuota: data.failover_ip_quota,
|
|
616
|
-
failoverIpRemainingQuota: data.failover_ip_remaining_quota
|
|
617
|
-
};
|
|
423
|
+
if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'GetRemainingQuotaResponse' failed as data isn't a dictionary.`);
|
|
424
|
+
return {
|
|
425
|
+
failoverBlockQuota: data.failover_block_quota,
|
|
426
|
+
failoverBlockRemainingQuota: data.failover_block_remaining_quota,
|
|
427
|
+
failoverIpQuota: data.failover_ip_quota,
|
|
428
|
+
failoverIpRemainingQuota: data.failover_ip_remaining_quota
|
|
429
|
+
};
|
|
618
430
|
};
|
|
619
431
|
const unmarshalGetRpnStatusResponse = (data) => {
|
|
620
|
-
|
|
621
|
-
|
|
622
|
-
|
|
623
|
-
|
|
624
|
-
|
|
625
|
-
return {
|
|
626
|
-
operationsLeft: data.operations_left,
|
|
627
|
-
status: data.status
|
|
628
|
-
};
|
|
432
|
+
if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'GetRpnStatusResponse' failed as data isn't a dictionary.`);
|
|
433
|
+
return {
|
|
434
|
+
operationsLeft: data.operations_left,
|
|
435
|
+
status: data.status
|
|
436
|
+
};
|
|
629
437
|
};
|
|
630
438
|
const unmarshalInvoice = (data) => {
|
|
631
|
-
|
|
632
|
-
|
|
633
|
-
|
|
634
|
-
|
|
635
|
-
|
|
636
|
-
|
|
637
|
-
|
|
638
|
-
|
|
639
|
-
|
|
640
|
-
|
|
641
|
-
|
|
642
|
-
|
|
643
|
-
totalWithTaxes: data.total_with_taxes ? unmarshalMoney(data.total_with_taxes) : void 0,
|
|
644
|
-
totalWithoutTaxes: data.total_without_taxes ? unmarshalMoney(data.total_without_taxes) : void 0,
|
|
645
|
-
transactionId: data.transaction_id
|
|
646
|
-
};
|
|
439
|
+
if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'Invoice' failed as data isn't a dictionary.`);
|
|
440
|
+
return {
|
|
441
|
+
content: data.content,
|
|
442
|
+
createdAt: unmarshalDate(data.created_at),
|
|
443
|
+
id: data.id,
|
|
444
|
+
paidAt: unmarshalDate(data.paid_at),
|
|
445
|
+
paymentMethod: data.payment_method,
|
|
446
|
+
status: data.status,
|
|
447
|
+
totalWithTaxes: data.total_with_taxes ? unmarshalMoney(data.total_with_taxes) : void 0,
|
|
448
|
+
totalWithoutTaxes: data.total_without_taxes ? unmarshalMoney(data.total_without_taxes) : void 0,
|
|
449
|
+
transactionId: data.transaction_id
|
|
450
|
+
};
|
|
647
451
|
};
|
|
648
452
|
const unmarshalListFailoverIPsResponse = (data) => {
|
|
649
|
-
|
|
650
|
-
|
|
651
|
-
|
|
652
|
-
|
|
653
|
-
|
|
654
|
-
|
|
655
|
-
|
|
656
|
-
|
|
657
|
-
|
|
658
|
-
|
|
659
|
-
|
|
660
|
-
|
|
661
|
-
throw new TypeError(
|
|
662
|
-
`Unmarshalling the type 'ListIPv6BlockSubnetsAvailableResponseSubnet' failed as data isn't a dictionary.`
|
|
663
|
-
);
|
|
664
|
-
}
|
|
665
|
-
return {
|
|
666
|
-
address: data.address,
|
|
667
|
-
cidr: data.cidr
|
|
668
|
-
};
|
|
453
|
+
if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'ListFailoverIPsResponse' failed as data isn't a dictionary.`);
|
|
454
|
+
return {
|
|
455
|
+
failoverIps: unmarshalArrayOfObject(data.failover_ips, unmarshalFailoverIP),
|
|
456
|
+
totalCount: data.total_count
|
|
457
|
+
};
|
|
458
|
+
};
|
|
459
|
+
var unmarshalListIPv6BlockSubnetsAvailableResponseSubnet = (data) => {
|
|
460
|
+
if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'ListIPv6BlockSubnetsAvailableResponseSubnet' failed as data isn't a dictionary.`);
|
|
461
|
+
return {
|
|
462
|
+
address: data.address,
|
|
463
|
+
cidr: data.cidr
|
|
464
|
+
};
|
|
669
465
|
};
|
|
670
466
|
const unmarshalListIPv6BlockSubnetsAvailableResponse = (data) => {
|
|
671
|
-
|
|
672
|
-
|
|
673
|
-
|
|
674
|
-
|
|
675
|
-
|
|
676
|
-
return {
|
|
677
|
-
subnetAvailables: unmarshalArrayOfObject(
|
|
678
|
-
data.subnet_availables,
|
|
679
|
-
unmarshalListIPv6BlockSubnetsAvailableResponseSubnet
|
|
680
|
-
),
|
|
681
|
-
totalCount: data.total_count
|
|
682
|
-
};
|
|
467
|
+
if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'ListIPv6BlockSubnetsAvailableResponse' failed as data isn't a dictionary.`);
|
|
468
|
+
return {
|
|
469
|
+
subnetAvailables: unmarshalArrayOfObject(data.subnet_availables, unmarshalListIPv6BlockSubnetsAvailableResponseSubnet),
|
|
470
|
+
totalCount: data.total_count
|
|
471
|
+
};
|
|
683
472
|
};
|
|
684
473
|
const unmarshalListIPv6BlocksResponse = (data) => {
|
|
685
|
-
|
|
686
|
-
|
|
687
|
-
|
|
688
|
-
|
|
689
|
-
|
|
690
|
-
|
|
691
|
-
|
|
692
|
-
|
|
693
|
-
|
|
694
|
-
|
|
695
|
-
|
|
696
|
-
|
|
697
|
-
|
|
698
|
-
|
|
699
|
-
|
|
700
|
-
|
|
701
|
-
|
|
702
|
-
|
|
703
|
-
id: data.id,
|
|
704
|
-
paidAt: unmarshalDate(data.paid_at),
|
|
705
|
-
paymentMethod: data.payment_method,
|
|
706
|
-
status: data.status,
|
|
707
|
-
totalWithTaxes: data.total_with_taxes ? unmarshalMoney(data.total_with_taxes) : void 0,
|
|
708
|
-
totalWithoutTaxes: data.total_without_taxes ? unmarshalMoney(data.total_without_taxes) : void 0,
|
|
709
|
-
transactionId: data.transaction_id
|
|
710
|
-
};
|
|
474
|
+
if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'ListIPv6BlocksResponse' failed as data isn't a dictionary.`);
|
|
475
|
+
return {
|
|
476
|
+
ipv6Blocks: unmarshalArrayOfObject(data.ipv6_blocks, unmarshalIPv6Block),
|
|
477
|
+
totalCount: data.total_count
|
|
478
|
+
};
|
|
479
|
+
};
|
|
480
|
+
var unmarshalInvoiceSummary = (data) => {
|
|
481
|
+
if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'InvoiceSummary' failed as data isn't a dictionary.`);
|
|
482
|
+
return {
|
|
483
|
+
createdAt: unmarshalDate(data.created_at),
|
|
484
|
+
id: data.id,
|
|
485
|
+
paidAt: unmarshalDate(data.paid_at),
|
|
486
|
+
paymentMethod: data.payment_method,
|
|
487
|
+
status: data.status,
|
|
488
|
+
totalWithTaxes: data.total_with_taxes ? unmarshalMoney(data.total_with_taxes) : void 0,
|
|
489
|
+
totalWithoutTaxes: data.total_without_taxes ? unmarshalMoney(data.total_without_taxes) : void 0,
|
|
490
|
+
transactionId: data.transaction_id
|
|
491
|
+
};
|
|
711
492
|
};
|
|
712
493
|
const unmarshalListInvoicesResponse = (data) => {
|
|
713
|
-
|
|
714
|
-
|
|
715
|
-
|
|
716
|
-
|
|
717
|
-
|
|
718
|
-
|
|
719
|
-
|
|
720
|
-
|
|
721
|
-
|
|
722
|
-
|
|
723
|
-
|
|
724
|
-
|
|
725
|
-
|
|
726
|
-
|
|
727
|
-
|
|
728
|
-
|
|
729
|
-
|
|
730
|
-
|
|
731
|
-
|
|
732
|
-
|
|
733
|
-
};
|
|
734
|
-
|
|
735
|
-
|
|
736
|
-
|
|
737
|
-
|
|
738
|
-
|
|
739
|
-
|
|
740
|
-
|
|
741
|
-
|
|
742
|
-
hostname: data.hostname,
|
|
743
|
-
id: data.id
|
|
744
|
-
};
|
|
745
|
-
};
|
|
746
|
-
const unmarshalRpnSanIp = (data) => {
|
|
747
|
-
if (!isJSONObject(data)) {
|
|
748
|
-
throw new TypeError(
|
|
749
|
-
`Unmarshalling the type 'RpnSanIp' failed as data isn't a dictionary.`
|
|
750
|
-
);
|
|
751
|
-
}
|
|
752
|
-
return {
|
|
753
|
-
ip: data.ip ? unmarshalIP(data.ip) : void 0,
|
|
754
|
-
rpnv2Group: data.rpnv2_group ? unmarshalRpnSanIpRpnV2Group(data.rpnv2_group) : void 0,
|
|
755
|
-
server: data.server ? unmarshalRpnSanIpServer(data.server) : void 0,
|
|
756
|
-
type: data.type
|
|
757
|
-
};
|
|
494
|
+
if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'ListInvoicesResponse' failed as data isn't a dictionary.`);
|
|
495
|
+
return {
|
|
496
|
+
invoices: unmarshalArrayOfObject(data.invoices, unmarshalInvoiceSummary),
|
|
497
|
+
totalCount: data.total_count
|
|
498
|
+
};
|
|
499
|
+
};
|
|
500
|
+
var unmarshalRpnSanIpRpnV2Group = (data) => {
|
|
501
|
+
if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'RpnSanIpRpnV2Group' failed as data isn't a dictionary.`);
|
|
502
|
+
return {
|
|
503
|
+
id: data.id,
|
|
504
|
+
name: data.name
|
|
505
|
+
};
|
|
506
|
+
};
|
|
507
|
+
var unmarshalRpnSanIpServer = (data) => {
|
|
508
|
+
if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'RpnSanIpServer' failed as data isn't a dictionary.`);
|
|
509
|
+
return {
|
|
510
|
+
datacenterName: data.datacenter_name,
|
|
511
|
+
hostname: data.hostname,
|
|
512
|
+
id: data.id
|
|
513
|
+
};
|
|
514
|
+
};
|
|
515
|
+
var unmarshalRpnSanIp = (data) => {
|
|
516
|
+
if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'RpnSanIp' failed as data isn't a dictionary.`);
|
|
517
|
+
return {
|
|
518
|
+
ip: data.ip ? unmarshalIP(data.ip) : void 0,
|
|
519
|
+
rpnv2Group: data.rpnv2_group ? unmarshalRpnSanIpRpnV2Group(data.rpnv2_group) : void 0,
|
|
520
|
+
server: data.server ? unmarshalRpnSanIpServer(data.server) : void 0,
|
|
521
|
+
type: data.type
|
|
522
|
+
};
|
|
758
523
|
};
|
|
759
524
|
const unmarshalListIpsResponse = (data) => {
|
|
760
|
-
|
|
761
|
-
|
|
762
|
-
|
|
763
|
-
|
|
764
|
-
|
|
765
|
-
return {
|
|
766
|
-
ips: unmarshalArrayOfObject(data.ips, unmarshalRpnSanIp),
|
|
767
|
-
totalCount: data.total_count
|
|
768
|
-
};
|
|
525
|
+
if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'ListIpsResponse' failed as data isn't a dictionary.`);
|
|
526
|
+
return {
|
|
527
|
+
ips: unmarshalArrayOfObject(data.ips, unmarshalRpnSanIp),
|
|
528
|
+
totalCount: data.total_count
|
|
529
|
+
};
|
|
769
530
|
};
|
|
770
531
|
const unmarshalListOSResponse = (data) => {
|
|
771
|
-
|
|
772
|
-
|
|
773
|
-
|
|
774
|
-
|
|
775
|
-
|
|
776
|
-
return {
|
|
777
|
-
os: unmarshalArrayOfObject(data.os, unmarshalOS),
|
|
778
|
-
totalCount: data.total_count
|
|
779
|
-
};
|
|
532
|
+
if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'ListOSResponse' failed as data isn't a dictionary.`);
|
|
533
|
+
return {
|
|
534
|
+
os: unmarshalArrayOfObject(data.os, unmarshalOS),
|
|
535
|
+
totalCount: data.total_count
|
|
536
|
+
};
|
|
780
537
|
};
|
|
781
538
|
const unmarshalListOffersResponse = (data) => {
|
|
782
|
-
|
|
783
|
-
|
|
784
|
-
|
|
785
|
-
|
|
786
|
-
|
|
787
|
-
|
|
788
|
-
|
|
789
|
-
|
|
790
|
-
|
|
791
|
-
|
|
792
|
-
|
|
793
|
-
|
|
794
|
-
|
|
795
|
-
|
|
796
|
-
|
|
797
|
-
|
|
798
|
-
|
|
799
|
-
createdAt: unmarshalDate(data.created_at),
|
|
800
|
-
id: data.id,
|
|
801
|
-
method: data.method,
|
|
802
|
-
refundedAt: unmarshalDate(data.refunded_at),
|
|
803
|
-
status: data.status,
|
|
804
|
-
totalWithTaxes: data.total_with_taxes ? unmarshalMoney(data.total_with_taxes) : void 0,
|
|
805
|
-
totalWithoutTaxes: data.total_without_taxes ? unmarshalMoney(data.total_without_taxes) : void 0
|
|
806
|
-
};
|
|
539
|
+
if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'ListOffersResponse' failed as data isn't a dictionary.`);
|
|
540
|
+
return {
|
|
541
|
+
offers: unmarshalArrayOfObject(data.offers, unmarshalOffer),
|
|
542
|
+
totalCount: data.total_count
|
|
543
|
+
};
|
|
544
|
+
};
|
|
545
|
+
var unmarshalRefundSummary = (data) => {
|
|
546
|
+
if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'RefundSummary' failed as data isn't a dictionary.`);
|
|
547
|
+
return {
|
|
548
|
+
createdAt: unmarshalDate(data.created_at),
|
|
549
|
+
id: data.id,
|
|
550
|
+
method: data.method,
|
|
551
|
+
refundedAt: unmarshalDate(data.refunded_at),
|
|
552
|
+
status: data.status,
|
|
553
|
+
totalWithTaxes: data.total_with_taxes ? unmarshalMoney(data.total_with_taxes) : void 0,
|
|
554
|
+
totalWithoutTaxes: data.total_without_taxes ? unmarshalMoney(data.total_without_taxes) : void 0
|
|
555
|
+
};
|
|
807
556
|
};
|
|
808
557
|
const unmarshalListRefundsResponse = (data) => {
|
|
809
|
-
|
|
810
|
-
|
|
811
|
-
|
|
812
|
-
|
|
813
|
-
|
|
814
|
-
|
|
815
|
-
|
|
816
|
-
|
|
817
|
-
|
|
818
|
-
|
|
819
|
-
|
|
820
|
-
|
|
821
|
-
|
|
822
|
-
|
|
823
|
-
|
|
824
|
-
}
|
|
825
|
-
return {
|
|
826
|
-
datacenterName: data.datacenter_name,
|
|
827
|
-
hostname: data.hostname,
|
|
828
|
-
id: data.id,
|
|
829
|
-
sans: unmarshalArrayOfObject(data.sans, unmarshalRpnSan),
|
|
830
|
-
zone: data.zone
|
|
831
|
-
};
|
|
558
|
+
if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'ListRefundsResponse' failed as data isn't a dictionary.`);
|
|
559
|
+
return {
|
|
560
|
+
refunds: unmarshalArrayOfObject(data.refunds, unmarshalRefundSummary),
|
|
561
|
+
totalCount: data.total_count
|
|
562
|
+
};
|
|
563
|
+
};
|
|
564
|
+
var unmarshalRpnSanServer = (data) => {
|
|
565
|
+
if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'RpnSanServer' failed as data isn't a dictionary.`);
|
|
566
|
+
return {
|
|
567
|
+
datacenterName: data.datacenter_name,
|
|
568
|
+
hostname: data.hostname,
|
|
569
|
+
id: data.id,
|
|
570
|
+
sans: unmarshalArrayOfObject(data.sans, unmarshalRpnSan),
|
|
571
|
+
zone: data.zone
|
|
572
|
+
};
|
|
832
573
|
};
|
|
833
574
|
const unmarshalListRpnCapableSanServersResponse = (data) => {
|
|
834
|
-
|
|
835
|
-
|
|
836
|
-
|
|
837
|
-
|
|
838
|
-
|
|
839
|
-
return {
|
|
840
|
-
sanServers: unmarshalArrayOfObject(data.san_servers, unmarshalRpnSanServer),
|
|
841
|
-
totalCount: data.total_count
|
|
842
|
-
};
|
|
575
|
+
if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'ListRpnCapableSanServersResponse' failed as data isn't a dictionary.`);
|
|
576
|
+
return {
|
|
577
|
+
sanServers: unmarshalArrayOfObject(data.san_servers, unmarshalRpnSanServer),
|
|
578
|
+
totalCount: data.total_count
|
|
579
|
+
};
|
|
843
580
|
};
|
|
844
581
|
const unmarshalListRpnCapableServersResponse = (data) => {
|
|
845
|
-
|
|
846
|
-
|
|
847
|
-
|
|
848
|
-
|
|
849
|
-
|
|
850
|
-
|
|
851
|
-
|
|
852
|
-
|
|
853
|
-
|
|
854
|
-
|
|
855
|
-
|
|
856
|
-
|
|
857
|
-
|
|
858
|
-
|
|
859
|
-
|
|
860
|
-
|
|
861
|
-
|
|
862
|
-
|
|
863
|
-
|
|
864
|
-
groupOwner: data.group_owner,
|
|
865
|
-
id: data.id,
|
|
866
|
-
owner: data.owner,
|
|
867
|
-
sanServer: data.san_server ? unmarshalRpnSanServer(data.san_server) : void 0,
|
|
868
|
-
server: data.server ? unmarshalServer(data.server) : void 0,
|
|
869
|
-
speed: data.speed,
|
|
870
|
-
status: data.status
|
|
871
|
-
};
|
|
582
|
+
if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'ListRpnCapableServersResponse' failed as data isn't a dictionary.`);
|
|
583
|
+
return {
|
|
584
|
+
servers: unmarshalArrayOfObject(data.servers, unmarshalServer),
|
|
585
|
+
totalCount: data.total_count
|
|
586
|
+
};
|
|
587
|
+
};
|
|
588
|
+
var unmarshalRpnGroupMember = (data) => {
|
|
589
|
+
if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'RpnGroupMember' failed as data isn't a dictionary.`);
|
|
590
|
+
return {
|
|
591
|
+
groupId: data.group_id,
|
|
592
|
+
groupName: data.group_name,
|
|
593
|
+
groupOwner: data.group_owner,
|
|
594
|
+
id: data.id,
|
|
595
|
+
owner: data.owner,
|
|
596
|
+
sanServer: data.san_server ? unmarshalRpnSanServer(data.san_server) : void 0,
|
|
597
|
+
server: data.server ? unmarshalServer(data.server) : void 0,
|
|
598
|
+
speed: data.speed,
|
|
599
|
+
status: data.status
|
|
600
|
+
};
|
|
872
601
|
};
|
|
873
602
|
const unmarshalListRpnGroupMembersResponse = (data) => {
|
|
874
|
-
|
|
875
|
-
|
|
876
|
-
|
|
877
|
-
|
|
878
|
-
|
|
879
|
-
return {
|
|
880
|
-
members: unmarshalArrayOfObject(data.members, unmarshalRpnGroupMember),
|
|
881
|
-
totalCount: data.total_count
|
|
882
|
-
};
|
|
603
|
+
if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'ListRpnGroupMembersResponse' failed as data isn't a dictionary.`);
|
|
604
|
+
return {
|
|
605
|
+
members: unmarshalArrayOfObject(data.members, unmarshalRpnGroupMember),
|
|
606
|
+
totalCount: data.total_count
|
|
607
|
+
};
|
|
883
608
|
};
|
|
884
609
|
const unmarshalListRpnGroupsResponse = (data) => {
|
|
885
|
-
|
|
886
|
-
|
|
887
|
-
|
|
888
|
-
|
|
889
|
-
|
|
890
|
-
return {
|
|
891
|
-
rpnGroups: unmarshalArrayOfObject(data.rpn_groups, unmarshalRpnGroup),
|
|
892
|
-
totalCount: data.total_count
|
|
893
|
-
};
|
|
610
|
+
if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'ListRpnGroupsResponse' failed as data isn't a dictionary.`);
|
|
611
|
+
return {
|
|
612
|
+
rpnGroups: unmarshalArrayOfObject(data.rpn_groups, unmarshalRpnGroup),
|
|
613
|
+
totalCount: data.total_count
|
|
614
|
+
};
|
|
894
615
|
};
|
|
895
616
|
const unmarshalListRpnInvitesResponse = (data) => {
|
|
896
|
-
|
|
897
|
-
|
|
898
|
-
|
|
899
|
-
|
|
900
|
-
|
|
901
|
-
|
|
902
|
-
|
|
903
|
-
|
|
904
|
-
|
|
905
|
-
|
|
906
|
-
|
|
907
|
-
|
|
908
|
-
|
|
909
|
-
|
|
910
|
-
|
|
911
|
-
|
|
912
|
-
|
|
913
|
-
|
|
914
|
-
|
|
915
|
-
|
|
916
|
-
|
|
917
|
-
|
|
918
|
-
|
|
919
|
-
|
|
920
|
-
|
|
921
|
-
|
|
922
|
-
projectId: data.project_id,
|
|
923
|
-
rpnv1Compatible: data.rpnv1_compatible,
|
|
924
|
-
rpnv1Implicit: data.rpnv1_implicit,
|
|
925
|
-
serverHostname: data.server_hostname,
|
|
926
|
-
status: data.status,
|
|
927
|
-
storageSize: data.storage_size,
|
|
928
|
-
terminatedAt: unmarshalDate(data.terminated_at)
|
|
929
|
-
};
|
|
617
|
+
if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'ListRpnInvitesResponse' failed as data isn't a dictionary.`);
|
|
618
|
+
return {
|
|
619
|
+
members: unmarshalArrayOfObject(data.members, unmarshalRpnGroupMember),
|
|
620
|
+
totalCount: data.total_count
|
|
621
|
+
};
|
|
622
|
+
};
|
|
623
|
+
var unmarshalRpnSanSummary = (data) => {
|
|
624
|
+
if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'RpnSanSummary' failed as data isn't a dictionary.`);
|
|
625
|
+
return {
|
|
626
|
+
createdAt: unmarshalDate(data.created_at),
|
|
627
|
+
datacenterName: data.datacenter_name,
|
|
628
|
+
deliveredAt: unmarshalDate(data.delivered_at),
|
|
629
|
+
expiresAt: unmarshalDate(data.expires_at),
|
|
630
|
+
id: data.id,
|
|
631
|
+
iqnSuffix: data.iqn_suffix,
|
|
632
|
+
offerId: data.offer_id,
|
|
633
|
+
offerName: data.offer_name,
|
|
634
|
+
organizationId: data.organization_id,
|
|
635
|
+
projectId: data.project_id,
|
|
636
|
+
rpnv1Compatible: data.rpnv1_compatible,
|
|
637
|
+
rpnv1Implicit: data.rpnv1_implicit,
|
|
638
|
+
serverHostname: data.server_hostname,
|
|
639
|
+
status: data.status,
|
|
640
|
+
storageSize: data.storage_size,
|
|
641
|
+
terminatedAt: unmarshalDate(data.terminated_at)
|
|
642
|
+
};
|
|
930
643
|
};
|
|
931
644
|
const unmarshalListRpnSansResponse = (data) => {
|
|
932
|
-
|
|
933
|
-
|
|
934
|
-
|
|
935
|
-
|
|
936
|
-
|
|
937
|
-
|
|
938
|
-
|
|
939
|
-
|
|
940
|
-
|
|
941
|
-
|
|
942
|
-
|
|
943
|
-
|
|
944
|
-
|
|
945
|
-
|
|
946
|
-
|
|
947
|
-
|
|
948
|
-
|
|
949
|
-
|
|
950
|
-
|
|
951
|
-
|
|
952
|
-
|
|
953
|
-
hostname: data.hostname,
|
|
954
|
-
id: data.id,
|
|
955
|
-
ipAddress: data.ip_address,
|
|
956
|
-
rpnVersion: data.rpn_version,
|
|
957
|
-
rpnv1GroupCount: data.rpnv1_group_count,
|
|
958
|
-
rpnv2GroupCount: data.rpnv2_group_count,
|
|
959
|
-
zone: data.zone
|
|
960
|
-
};
|
|
645
|
+
if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'ListRpnSansResponse' failed as data isn't a dictionary.`);
|
|
646
|
+
return {
|
|
647
|
+
rpnSans: unmarshalArrayOfObject(data.rpn_sans, unmarshalRpnSanSummary),
|
|
648
|
+
totalCount: data.total_count
|
|
649
|
+
};
|
|
650
|
+
};
|
|
651
|
+
var unmarshalRpnServerCapability = (data) => {
|
|
652
|
+
if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'RpnServerCapability' failed as data isn't a dictionary.`);
|
|
653
|
+
return {
|
|
654
|
+
canJoinQinqGroup: data.can_join_qinq_group,
|
|
655
|
+
canJoinRpnv2Group: data.can_join_rpnv2_group,
|
|
656
|
+
compatibleQinq: data.compatible_qinq,
|
|
657
|
+
datacenterName: data.datacenter_name,
|
|
658
|
+
hostname: data.hostname,
|
|
659
|
+
id: data.id,
|
|
660
|
+
ipAddress: data.ip_address,
|
|
661
|
+
rpnVersion: data.rpn_version,
|
|
662
|
+
rpnv1GroupCount: data.rpnv1_group_count,
|
|
663
|
+
rpnv2GroupCount: data.rpnv2_group_count,
|
|
664
|
+
zone: data.zone
|
|
665
|
+
};
|
|
961
666
|
};
|
|
962
667
|
const unmarshalListRpnServerCapabilitiesResponse = (data) => {
|
|
963
|
-
|
|
964
|
-
|
|
965
|
-
|
|
966
|
-
|
|
967
|
-
|
|
968
|
-
return {
|
|
969
|
-
servers: unmarshalArrayOfObject(data.servers, unmarshalRpnServerCapability),
|
|
970
|
-
totalCount: data.total_count
|
|
971
|
-
};
|
|
668
|
+
if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'ListRpnServerCapabilitiesResponse' failed as data isn't a dictionary.`);
|
|
669
|
+
return {
|
|
670
|
+
servers: unmarshalArrayOfObject(data.servers, unmarshalRpnServerCapability),
|
|
671
|
+
totalCount: data.total_count
|
|
672
|
+
};
|
|
972
673
|
};
|
|
973
674
|
const unmarshalListRpnV2CapableResourcesResponse = (data) => {
|
|
974
|
-
|
|
975
|
-
|
|
976
|
-
|
|
977
|
-
|
|
978
|
-
|
|
979
|
-
|
|
980
|
-
|
|
981
|
-
|
|
982
|
-
|
|
983
|
-
|
|
984
|
-
|
|
985
|
-
|
|
986
|
-
|
|
987
|
-
|
|
988
|
-
|
|
989
|
-
|
|
990
|
-
|
|
991
|
-
|
|
992
|
-
|
|
993
|
-
|
|
994
|
-
|
|
995
|
-
|
|
996
|
-
|
|
997
|
-
|
|
998
|
-
|
|
999
|
-
|
|
1000
|
-
|
|
1001
|
-
|
|
1002
|
-
`Unmarshalling the type 'Log' failed as data isn't a dictionary.`
|
|
1003
|
-
);
|
|
1004
|
-
}
|
|
1005
|
-
return {
|
|
1006
|
-
action: data.action,
|
|
1007
|
-
createdAt: unmarshalDate(data.created_at),
|
|
1008
|
-
finishedAt: unmarshalDate(data.finished_at),
|
|
1009
|
-
group: data.group ? unmarshalRpnV2Group(data.group) : void 0,
|
|
1010
|
-
id: data.id,
|
|
1011
|
-
member: data.member ? unmarshalRpnV2Member(data.member) : void 0,
|
|
1012
|
-
status: data.status
|
|
1013
|
-
};
|
|
675
|
+
if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'ListRpnV2CapableResourcesResponse' failed as data isn't a dictionary.`);
|
|
676
|
+
return {
|
|
677
|
+
servers: unmarshalArrayOfObject(data.servers, unmarshalServer),
|
|
678
|
+
totalCount: data.total_count
|
|
679
|
+
};
|
|
680
|
+
};
|
|
681
|
+
var unmarshalRpnV2Member = (data) => {
|
|
682
|
+
if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'RpnV2Member' failed as data isn't a dictionary.`);
|
|
683
|
+
return {
|
|
684
|
+
id: data.id,
|
|
685
|
+
rpnv1Group: data.rpnv1_group ? unmarshalRpnGroup(data.rpnv1_group) : void 0,
|
|
686
|
+
server: data.server ? unmarshalServer(data.server) : void 0,
|
|
687
|
+
speed: data.speed,
|
|
688
|
+
status: data.status,
|
|
689
|
+
vlan: data.vlan
|
|
690
|
+
};
|
|
691
|
+
};
|
|
692
|
+
var unmarshalLog = (data) => {
|
|
693
|
+
if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'Log' failed as data isn't a dictionary.`);
|
|
694
|
+
return {
|
|
695
|
+
action: data.action,
|
|
696
|
+
createdAt: unmarshalDate(data.created_at),
|
|
697
|
+
finishedAt: unmarshalDate(data.finished_at),
|
|
698
|
+
group: data.group ? unmarshalRpnV2Group(data.group) : void 0,
|
|
699
|
+
id: data.id,
|
|
700
|
+
member: data.member ? unmarshalRpnV2Member(data.member) : void 0,
|
|
701
|
+
status: data.status
|
|
702
|
+
};
|
|
1014
703
|
};
|
|
1015
704
|
const unmarshalListRpnV2GroupLogsResponse = (data) => {
|
|
1016
|
-
|
|
1017
|
-
|
|
1018
|
-
|
|
1019
|
-
|
|
1020
|
-
|
|
1021
|
-
return {
|
|
1022
|
-
logs: unmarshalArrayOfObject(data.logs, unmarshalLog),
|
|
1023
|
-
totalCount: data.total_count
|
|
1024
|
-
};
|
|
705
|
+
if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'ListRpnV2GroupLogsResponse' failed as data isn't a dictionary.`);
|
|
706
|
+
return {
|
|
707
|
+
logs: unmarshalArrayOfObject(data.logs, unmarshalLog),
|
|
708
|
+
totalCount: data.total_count
|
|
709
|
+
};
|
|
1025
710
|
};
|
|
1026
711
|
const unmarshalListRpnV2GroupsResponse = (data) => {
|
|
1027
|
-
|
|
1028
|
-
|
|
1029
|
-
|
|
1030
|
-
|
|
1031
|
-
|
|
1032
|
-
return {
|
|
1033
|
-
rpnGroups: unmarshalArrayOfObject(data.rpn_groups, unmarshalRpnV2Group),
|
|
1034
|
-
totalCount: data.total_count
|
|
1035
|
-
};
|
|
712
|
+
if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'ListRpnV2GroupsResponse' failed as data isn't a dictionary.`);
|
|
713
|
+
return {
|
|
714
|
+
rpnGroups: unmarshalArrayOfObject(data.rpn_groups, unmarshalRpnV2Group),
|
|
715
|
+
totalCount: data.total_count
|
|
716
|
+
};
|
|
1036
717
|
};
|
|
1037
718
|
const unmarshalListRpnV2MembersResponse = (data) => {
|
|
1038
|
-
|
|
1039
|
-
|
|
1040
|
-
|
|
1041
|
-
|
|
1042
|
-
|
|
1043
|
-
|
|
1044
|
-
|
|
1045
|
-
|
|
1046
|
-
|
|
1047
|
-
|
|
1048
|
-
|
|
1049
|
-
|
|
1050
|
-
|
|
1051
|
-
|
|
1052
|
-
|
|
1053
|
-
}
|
|
1054
|
-
return {
|
|
1055
|
-
capacity: data.capacity,
|
|
1056
|
-
connector: data.connector,
|
|
1057
|
-
id: data.id,
|
|
1058
|
-
isAddon: data.is_addon,
|
|
1059
|
-
type: data.type
|
|
1060
|
-
};
|
|
719
|
+
if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'ListRpnV2MembersResponse' failed as data isn't a dictionary.`);
|
|
720
|
+
return {
|
|
721
|
+
members: unmarshalArrayOfObject(data.members, unmarshalRpnV2Member),
|
|
722
|
+
totalCount: data.total_count
|
|
723
|
+
};
|
|
724
|
+
};
|
|
725
|
+
var unmarshalServerDisk = (data) => {
|
|
726
|
+
if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'ServerDisk' failed as data isn't a dictionary.`);
|
|
727
|
+
return {
|
|
728
|
+
capacity: data.capacity,
|
|
729
|
+
connector: data.connector,
|
|
730
|
+
id: data.id,
|
|
731
|
+
isAddon: data.is_addon,
|
|
732
|
+
type: data.type
|
|
733
|
+
};
|
|
1061
734
|
};
|
|
1062
735
|
const unmarshalListServerDisksResponse = (data) => {
|
|
1063
|
-
|
|
1064
|
-
|
|
1065
|
-
|
|
1066
|
-
|
|
1067
|
-
|
|
1068
|
-
|
|
1069
|
-
|
|
1070
|
-
|
|
1071
|
-
|
|
1072
|
-
|
|
1073
|
-
|
|
1074
|
-
|
|
1075
|
-
|
|
1076
|
-
`Unmarshalling the type 'ServerEvent' failed as data isn't a dictionary.`
|
|
1077
|
-
);
|
|
1078
|
-
}
|
|
1079
|
-
return {
|
|
1080
|
-
date: unmarshalDate(data.date),
|
|
1081
|
-
description: data.description,
|
|
1082
|
-
eventId: data.event_id
|
|
1083
|
-
};
|
|
736
|
+
if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'ListServerDisksResponse' failed as data isn't a dictionary.`);
|
|
737
|
+
return {
|
|
738
|
+
disks: unmarshalArrayOfObject(data.disks, unmarshalServerDisk),
|
|
739
|
+
totalCount: data.total_count
|
|
740
|
+
};
|
|
741
|
+
};
|
|
742
|
+
var unmarshalServerEvent = (data) => {
|
|
743
|
+
if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'ServerEvent' failed as data isn't a dictionary.`);
|
|
744
|
+
return {
|
|
745
|
+
date: unmarshalDate(data.date),
|
|
746
|
+
description: data.description,
|
|
747
|
+
eventId: data.event_id
|
|
748
|
+
};
|
|
1084
749
|
};
|
|
1085
750
|
const unmarshalListServerEventsResponse = (data) => {
|
|
1086
|
-
|
|
1087
|
-
|
|
1088
|
-
|
|
1089
|
-
|
|
1090
|
-
|
|
1091
|
-
|
|
1092
|
-
|
|
1093
|
-
|
|
1094
|
-
|
|
1095
|
-
|
|
1096
|
-
|
|
1097
|
-
|
|
1098
|
-
|
|
1099
|
-
|
|
1100
|
-
|
|
1101
|
-
|
|
1102
|
-
|
|
1103
|
-
|
|
1104
|
-
|
|
1105
|
-
|
|
1106
|
-
|
|
1107
|
-
|
|
1108
|
-
|
|
1109
|
-
|
|
1110
|
-
|
|
1111
|
-
|
|
1112
|
-
|
|
1113
|
-
|
|
1114
|
-
|
|
1115
|
-
offerId: data.offer_id,
|
|
1116
|
-
offerName: data.offer_name,
|
|
1117
|
-
organizationId: data.organization_id,
|
|
1118
|
-
osId: data.os_id,
|
|
1119
|
-
projectId: data.project_id,
|
|
1120
|
-
qinq: data.qinq,
|
|
1121
|
-
rpnVersion: data.rpn_version,
|
|
1122
|
-
status: data.status,
|
|
1123
|
-
updatedAt: unmarshalDate(data.updated_at),
|
|
1124
|
-
zone: data.zone
|
|
1125
|
-
};
|
|
751
|
+
if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'ListServerEventsResponse' failed as data isn't a dictionary.`);
|
|
752
|
+
return {
|
|
753
|
+
events: unmarshalArrayOfObject(data.events, unmarshalServerEvent),
|
|
754
|
+
totalCount: data.total_count
|
|
755
|
+
};
|
|
756
|
+
};
|
|
757
|
+
var unmarshalServerSummary = (data) => {
|
|
758
|
+
if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'ServerSummary' failed as data isn't a dictionary.`);
|
|
759
|
+
return {
|
|
760
|
+
createdAt: unmarshalDate(data.created_at),
|
|
761
|
+
datacenterName: data.datacenter_name,
|
|
762
|
+
expiredAt: unmarshalDate(data.expired_at),
|
|
763
|
+
hostname: data.hostname,
|
|
764
|
+
id: data.id,
|
|
765
|
+
interfaces: unmarshalArrayOfObject(data.interfaces, unmarshalNetworkInterface),
|
|
766
|
+
isHds: data.is_hds,
|
|
767
|
+
isOutsourced: data.is_outsourced,
|
|
768
|
+
level: data.level ? unmarshalServiceLevel(data.level) : void 0,
|
|
769
|
+
offerId: data.offer_id,
|
|
770
|
+
offerName: data.offer_name,
|
|
771
|
+
organizationId: data.organization_id,
|
|
772
|
+
osId: data.os_id,
|
|
773
|
+
projectId: data.project_id,
|
|
774
|
+
qinq: data.qinq,
|
|
775
|
+
rpnVersion: data.rpn_version,
|
|
776
|
+
status: data.status,
|
|
777
|
+
updatedAt: unmarshalDate(data.updated_at),
|
|
778
|
+
zone: data.zone
|
|
779
|
+
};
|
|
1126
780
|
};
|
|
1127
781
|
const unmarshalListServersResponse = (data) => {
|
|
1128
|
-
|
|
1129
|
-
|
|
1130
|
-
|
|
1131
|
-
|
|
1132
|
-
|
|
1133
|
-
return {
|
|
1134
|
-
servers: unmarshalArrayOfObject(data.servers, unmarshalServerSummary),
|
|
1135
|
-
totalCount: data.total_count
|
|
1136
|
-
};
|
|
782
|
+
if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'ListServersResponse' failed as data isn't a dictionary.`);
|
|
783
|
+
return {
|
|
784
|
+
servers: unmarshalArrayOfObject(data.servers, unmarshalServerSummary),
|
|
785
|
+
totalCount: data.total_count
|
|
786
|
+
};
|
|
1137
787
|
};
|
|
1138
788
|
const unmarshalListServicesResponse = (data) => {
|
|
1139
|
-
|
|
1140
|
-
|
|
1141
|
-
|
|
1142
|
-
|
|
1143
|
-
|
|
1144
|
-
return {
|
|
1145
|
-
services: unmarshalArrayOfObject(data.services, unmarshalService),
|
|
1146
|
-
totalCount: data.total_count
|
|
1147
|
-
};
|
|
789
|
+
if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'ListServicesResponse' failed as data isn't a dictionary.`);
|
|
790
|
+
return {
|
|
791
|
+
services: unmarshalArrayOfObject(data.services, unmarshalService),
|
|
792
|
+
totalCount: data.total_count
|
|
793
|
+
};
|
|
1148
794
|
};
|
|
1149
795
|
const unmarshalListSubscribableServerOptionsResponse = (data) => {
|
|
1150
|
-
|
|
1151
|
-
|
|
1152
|
-
|
|
1153
|
-
|
|
1154
|
-
|
|
1155
|
-
|
|
1156
|
-
|
|
1157
|
-
|
|
1158
|
-
|
|
1159
|
-
|
|
1160
|
-
|
|
1161
|
-
|
|
1162
|
-
throw new TypeError(
|
|
1163
|
-
`Unmarshalling the type 'RaidArray' failed as data isn't a dictionary.`
|
|
1164
|
-
);
|
|
1165
|
-
}
|
|
1166
|
-
return {
|
|
1167
|
-
disks: unmarshalArrayOfObject(data.disks, unmarshalServerDisk),
|
|
1168
|
-
raidLevel: data.raid_level
|
|
1169
|
-
};
|
|
796
|
+
if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'ListSubscribableServerOptionsResponse' failed as data isn't a dictionary.`);
|
|
797
|
+
return {
|
|
798
|
+
serverOptions: unmarshalArrayOfObject(data.server_options, unmarshalOffer),
|
|
799
|
+
totalCount: data.total_count
|
|
800
|
+
};
|
|
801
|
+
};
|
|
802
|
+
var unmarshalRaidArray = (data) => {
|
|
803
|
+
if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'RaidArray' failed as data isn't a dictionary.`);
|
|
804
|
+
return {
|
|
805
|
+
disks: unmarshalArrayOfObject(data.disks, unmarshalServerDisk),
|
|
806
|
+
raidLevel: data.raid_level
|
|
807
|
+
};
|
|
1170
808
|
};
|
|
1171
809
|
const unmarshalRaid = (data) => {
|
|
1172
|
-
|
|
1173
|
-
|
|
1174
|
-
`Unmarshalling the type 'Raid' failed as data isn't a dictionary.`
|
|
1175
|
-
);
|
|
1176
|
-
}
|
|
1177
|
-
return {
|
|
1178
|
-
raidArrays: unmarshalArrayOfObject(data.raid_arrays, unmarshalRaidArray)
|
|
1179
|
-
};
|
|
810
|
+
if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'Raid' failed as data isn't a dictionary.`);
|
|
811
|
+
return { raidArrays: unmarshalArrayOfObject(data.raid_arrays, unmarshalRaidArray) };
|
|
1180
812
|
};
|
|
1181
813
|
const unmarshalRefund = (data) => {
|
|
1182
|
-
|
|
1183
|
-
|
|
1184
|
-
|
|
1185
|
-
|
|
1186
|
-
|
|
1187
|
-
|
|
1188
|
-
|
|
1189
|
-
|
|
1190
|
-
|
|
1191
|
-
|
|
1192
|
-
|
|
1193
|
-
status: data.status,
|
|
1194
|
-
totalWithTaxes: data.total_with_taxes ? unmarshalMoney(data.total_with_taxes) : void 0,
|
|
1195
|
-
totalWithoutTaxes: data.total_without_taxes ? unmarshalMoney(data.total_without_taxes) : void 0
|
|
1196
|
-
};
|
|
814
|
+
if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'Refund' failed as data isn't a dictionary.`);
|
|
815
|
+
return {
|
|
816
|
+
content: data.content,
|
|
817
|
+
createdAt: unmarshalDate(data.created_at),
|
|
818
|
+
id: data.id,
|
|
819
|
+
method: data.method,
|
|
820
|
+
refundedAt: unmarshalDate(data.refunded_at),
|
|
821
|
+
status: data.status,
|
|
822
|
+
totalWithTaxes: data.total_with_taxes ? unmarshalMoney(data.total_with_taxes) : void 0,
|
|
823
|
+
totalWithoutTaxes: data.total_without_taxes ? unmarshalMoney(data.total_without_taxes) : void 0
|
|
824
|
+
};
|
|
1197
825
|
};
|
|
1198
826
|
const unmarshalRescue = (data) => {
|
|
1199
|
-
|
|
1200
|
-
|
|
1201
|
-
|
|
1202
|
-
|
|
1203
|
-
|
|
1204
|
-
|
|
1205
|
-
|
|
1206
|
-
|
|
1207
|
-
|
|
1208
|
-
|
|
1209
|
-
|
|
1210
|
-
|
|
1211
|
-
|
|
1212
|
-
|
|
1213
|
-
|
|
1214
|
-
|
|
1215
|
-
|
|
1216
|
-
|
|
1217
|
-
return {
|
|
1218
|
-
capacity: data.capacity,
|
|
1219
|
-
connectors: data.connectors,
|
|
1220
|
-
fileSystem: data.file_system,
|
|
1221
|
-
mountPoint: data.mount_point,
|
|
1222
|
-
raidLevel: data.raid_level,
|
|
1223
|
-
type: data.type
|
|
1224
|
-
};
|
|
827
|
+
if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'Rescue' failed as data isn't a dictionary.`);
|
|
828
|
+
return {
|
|
829
|
+
login: data.login,
|
|
830
|
+
osId: data.os_id,
|
|
831
|
+
password: data.password,
|
|
832
|
+
protocol: data.protocol
|
|
833
|
+
};
|
|
834
|
+
};
|
|
835
|
+
var unmarshalPartition = (data) => {
|
|
836
|
+
if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'Partition' failed as data isn't a dictionary.`);
|
|
837
|
+
return {
|
|
838
|
+
capacity: data.capacity,
|
|
839
|
+
connectors: data.connectors,
|
|
840
|
+
fileSystem: data.file_system,
|
|
841
|
+
mountPoint: data.mount_point,
|
|
842
|
+
raidLevel: data.raid_level,
|
|
843
|
+
type: data.type
|
|
844
|
+
};
|
|
1225
845
|
};
|
|
1226
846
|
const unmarshalServerDefaultPartitioning = (data) => {
|
|
1227
|
-
|
|
1228
|
-
|
|
1229
|
-
`Unmarshalling the type 'ServerDefaultPartitioning' failed as data isn't a dictionary.`
|
|
1230
|
-
);
|
|
1231
|
-
}
|
|
1232
|
-
return {
|
|
1233
|
-
partitions: unmarshalArrayOfObject(data.partitions, unmarshalPartition)
|
|
1234
|
-
};
|
|
847
|
+
if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'ServerDefaultPartitioning' failed as data isn't a dictionary.`);
|
|
848
|
+
return { partitions: unmarshalArrayOfObject(data.partitions, unmarshalPartition) };
|
|
1235
849
|
};
|
|
1236
850
|
const unmarshalServerInstall = (data) => {
|
|
1237
|
-
|
|
1238
|
-
|
|
1239
|
-
|
|
1240
|
-
|
|
1241
|
-
|
|
1242
|
-
|
|
1243
|
-
|
|
1244
|
-
|
|
1245
|
-
|
|
1246
|
-
|
|
1247
|
-
sshKeyIds: data.ssh_key_ids,
|
|
1248
|
-
status: data.status,
|
|
1249
|
-
userLogin: data.user_login
|
|
1250
|
-
};
|
|
851
|
+
if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'ServerInstall' failed as data isn't a dictionary.`);
|
|
852
|
+
return {
|
|
853
|
+
hostname: data.hostname,
|
|
854
|
+
osId: data.os_id,
|
|
855
|
+
panelUrl: data.panel_url,
|
|
856
|
+
partitions: unmarshalArrayOfObject(data.partitions, unmarshalPartition),
|
|
857
|
+
sshKeyIds: data.ssh_key_ids,
|
|
858
|
+
status: data.status,
|
|
859
|
+
userLogin: data.user_login
|
|
860
|
+
};
|
|
1251
861
|
};
|
|
1252
862
|
const unmarshalSubscribeStorageOptionsResponse = (data) => {
|
|
1253
|
-
|
|
1254
|
-
|
|
1255
|
-
`Unmarshalling the type 'SubscribeStorageOptionsResponse' failed as data isn't a dictionary.`
|
|
1256
|
-
);
|
|
1257
|
-
}
|
|
1258
|
-
return {
|
|
1259
|
-
services: unmarshalArrayOfObject(data.services, unmarshalService)
|
|
1260
|
-
};
|
|
863
|
+
if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'SubscribeStorageOptionsResponse' failed as data isn't a dictionary.`);
|
|
864
|
+
return { services: unmarshalArrayOfObject(data.services, unmarshalService) };
|
|
1261
865
|
};
|
|
1262
866
|
const marshalAttachFailoverIPToMacAddressRequest = (request, defaults) => ({
|
|
1263
|
-
|
|
1264
|
-
|
|
867
|
+
mac: request.mac,
|
|
868
|
+
type: request.type
|
|
1265
869
|
});
|
|
1266
870
|
const marshalAttachFailoverIPsRequest = (request, defaults) => ({
|
|
1267
|
-
|
|
1268
|
-
|
|
871
|
+
fips_ids: request.fipsIds,
|
|
872
|
+
server_id: request.serverId
|
|
1269
873
|
});
|
|
1270
874
|
const marshalCreateFailoverIPsRequest = (request, defaults) => ({
|
|
1271
|
-
|
|
1272
|
-
|
|
1273
|
-
|
|
875
|
+
offer_id: request.offerId,
|
|
876
|
+
project_id: request.projectId ?? defaults.defaultProjectId,
|
|
877
|
+
quantity: request.quantity
|
|
1274
878
|
});
|
|
1275
879
|
const marshalCreateServerRequest = (request, defaults) => ({
|
|
1276
|
-
|
|
1277
|
-
|
|
1278
|
-
|
|
1279
|
-
|
|
1280
|
-
});
|
|
1281
|
-
const marshalDetachFailoverIPsRequest = (request, defaults) => ({
|
|
1282
|
-
fips_ids: request.fipsIds
|
|
1283
|
-
});
|
|
1284
|
-
const marshalIPv6BlockApiCreateIPv6BlockRequest = (request, defaults) => ({
|
|
1285
|
-
project_id: request.projectId ?? defaults.defaultProjectId
|
|
880
|
+
datacenter_name: request.datacenterName,
|
|
881
|
+
offer_id: request.offerId,
|
|
882
|
+
project_id: request.projectId ?? defaults.defaultProjectId,
|
|
883
|
+
server_option_ids: request.serverOptionIds
|
|
1286
884
|
});
|
|
885
|
+
const marshalDetachFailoverIPsRequest = (request, defaults) => ({ fips_ids: request.fipsIds });
|
|
886
|
+
const marshalIPv6BlockApiCreateIPv6BlockRequest = (request, defaults) => ({ project_id: request.projectId ?? defaults.defaultProjectId });
|
|
1287
887
|
const marshalIPv6BlockApiCreateIPv6BlockSubnetRequest = (request, defaults) => ({
|
|
1288
|
-
|
|
1289
|
-
|
|
1290
|
-
});
|
|
1291
|
-
const marshalIPv6BlockApiUpdateIPv6BlockRequest = (request, defaults) => ({
|
|
1292
|
-
nameservers: request.nameservers
|
|
888
|
+
address: request.address,
|
|
889
|
+
cidr: request.cidr
|
|
1293
890
|
});
|
|
1294
|
-
const
|
|
1295
|
-
|
|
1296
|
-
|
|
1297
|
-
|
|
1298
|
-
|
|
1299
|
-
|
|
891
|
+
const marshalIPv6BlockApiUpdateIPv6BlockRequest = (request, defaults) => ({ nameservers: request.nameservers });
|
|
892
|
+
var marshalInstallPartition = (request, defaults) => ({
|
|
893
|
+
capacity: request.capacity,
|
|
894
|
+
connectors: request.connectors,
|
|
895
|
+
file_system: request.fileSystem,
|
|
896
|
+
mount_point: request.mountPoint,
|
|
897
|
+
raid_level: request.raidLevel
|
|
1300
898
|
});
|
|
1301
899
|
const marshalInstallServerRequest = (request, defaults) => ({
|
|
1302
|
-
|
|
1303
|
-
|
|
1304
|
-
|
|
1305
|
-
|
|
1306
|
-
|
|
1307
|
-
|
|
1308
|
-
|
|
1309
|
-
|
|
1310
|
-
|
|
1311
|
-
|
|
1312
|
-
});
|
|
1313
|
-
const marshalRpnSanApiAddIpRequest = (request, defaults) => ({
|
|
1314
|
-
ip_ids: request.ipIds
|
|
1315
|
-
});
|
|
900
|
+
hostname: request.hostname,
|
|
901
|
+
ip_id: request.ipId,
|
|
902
|
+
license_offer_id: request.licenseOfferId,
|
|
903
|
+
os_id: request.osId,
|
|
904
|
+
panel_password: request.panelPassword,
|
|
905
|
+
partitions: request.partitions !== void 0 ? request.partitions.map((elt) => marshalInstallPartition(elt, defaults)) : void 0,
|
|
906
|
+
root_password: request.rootPassword,
|
|
907
|
+
ssh_key_ids: request.sshKeyIds,
|
|
908
|
+
user_login: request.userLogin,
|
|
909
|
+
user_password: request.userPassword
|
|
910
|
+
});
|
|
911
|
+
const marshalRpnSanApiAddIpRequest = (request, defaults) => ({ ip_ids: request.ipIds });
|
|
1316
912
|
const marshalRpnSanApiCreateRpnSanRequest = (request, defaults) => ({
|
|
1317
|
-
|
|
1318
|
-
|
|
1319
|
-
});
|
|
1320
|
-
const marshalRpnSanApiRemoveIpRequest = (request, defaults) => ({
|
|
1321
|
-
ip_ids: request.ipIds
|
|
913
|
+
offer_id: request.offerId,
|
|
914
|
+
project_id: request.projectId ?? defaults.defaultProjectId
|
|
1322
915
|
});
|
|
916
|
+
const marshalRpnSanApiRemoveIpRequest = (request, defaults) => ({ ip_ids: request.ipIds });
|
|
1323
917
|
const marshalRpnV1ApiAddRpnGroupMembersRequest = (request, defaults) => ({
|
|
1324
|
-
|
|
1325
|
-
|
|
918
|
+
san_server_ids: request.sanServerIds,
|
|
919
|
+
server_ids: request.serverIds
|
|
1326
920
|
});
|
|
1327
921
|
const marshalRpnV1ApiCreateRpnGroupRequest = (request, defaults) => ({
|
|
1328
|
-
|
|
1329
|
-
|
|
1330
|
-
|
|
1331
|
-
|
|
1332
|
-
});
|
|
1333
|
-
const marshalRpnV1ApiDeleteRpnGroupMembersRequest = (request, defaults) => ({
|
|
1334
|
-
member_ids: request.memberIds
|
|
1335
|
-
});
|
|
1336
|
-
const marshalRpnV1ApiLeaveRpnGroupRequest = (request, defaults) => ({
|
|
1337
|
-
member_ids: request.memberIds
|
|
922
|
+
name: request.name,
|
|
923
|
+
project_id: request.projectId ?? defaults.defaultProjectId,
|
|
924
|
+
san_server_ids: request.sanServerIds,
|
|
925
|
+
server_ids: request.serverIds
|
|
1338
926
|
});
|
|
927
|
+
const marshalRpnV1ApiDeleteRpnGroupMembersRequest = (request, defaults) => ({ member_ids: request.memberIds });
|
|
928
|
+
const marshalRpnV1ApiLeaveRpnGroupRequest = (request, defaults) => ({ member_ids: request.memberIds });
|
|
1339
929
|
const marshalRpnV1ApiRpnGroupInviteRequest = (request, defaults) => ({
|
|
1340
|
-
|
|
1341
|
-
|
|
1342
|
-
});
|
|
1343
|
-
const marshalRpnV1ApiUpdateRpnGroupNameRequest = (request, defaults) => ({
|
|
1344
|
-
name: request.name
|
|
1345
|
-
});
|
|
1346
|
-
const marshalRpnV2ApiAddRpnV2MembersRequest = (request, defaults) => ({
|
|
1347
|
-
servers: request.servers
|
|
930
|
+
project_id: request.projectId ?? defaults.defaultProjectId,
|
|
931
|
+
server_ids: request.serverIds
|
|
1348
932
|
});
|
|
933
|
+
const marshalRpnV1ApiUpdateRpnGroupNameRequest = (request, defaults) => ({ name: request.name });
|
|
934
|
+
const marshalRpnV2ApiAddRpnV2MembersRequest = (request, defaults) => ({ servers: request.servers });
|
|
1349
935
|
const marshalRpnV2ApiCreateRpnV2GroupRequest = (request, defaults) => ({
|
|
1350
|
-
|
|
1351
|
-
|
|
1352
|
-
|
|
1353
|
-
|
|
1354
|
-
});
|
|
1355
|
-
const marshalRpnV2ApiDeleteRpnV2MembersRequest = (request, defaults) => ({
|
|
1356
|
-
|
|
1357
|
-
});
|
|
1358
|
-
const marshalRpnV2ApiEnableRpnV2GroupCompatibilityRequest = (request, defaults) => ({
|
|
1359
|
-
rpnv1_group_id: request.rpnv1GroupId
|
|
1360
|
-
});
|
|
1361
|
-
const marshalRpnV2ApiUpdateRpnV2GroupNameRequest = (request, defaults) => ({
|
|
1362
|
-
name: request.name
|
|
1363
|
-
});
|
|
936
|
+
name: request.name,
|
|
937
|
+
project_id: request.projectId ?? defaults.defaultProjectId,
|
|
938
|
+
servers: request.servers,
|
|
939
|
+
type: request.type
|
|
940
|
+
});
|
|
941
|
+
const marshalRpnV2ApiDeleteRpnV2MembersRequest = (request, defaults) => ({ member_ids: request.memberIds });
|
|
942
|
+
const marshalRpnV2ApiEnableRpnV2GroupCompatibilityRequest = (request, defaults) => ({ rpnv1_group_id: request.rpnv1GroupId });
|
|
943
|
+
const marshalRpnV2ApiUpdateRpnV2GroupNameRequest = (request, defaults) => ({ name: request.name });
|
|
1364
944
|
const marshalRpnV2ApiUpdateRpnV2VlanForMembersRequest = (request, defaults) => ({
|
|
1365
|
-
|
|
1366
|
-
|
|
1367
|
-
});
|
|
1368
|
-
const marshalStartBMCAccessRequest = (request, defaults) => ({
|
|
1369
|
-
|
|
1370
|
-
});
|
|
1371
|
-
const
|
|
1372
|
-
|
|
1373
|
-
|
|
1374
|
-
|
|
1375
|
-
|
|
1376
|
-
});
|
|
1377
|
-
const
|
|
1378
|
-
options_ids: request.optionsIds
|
|
1379
|
-
});
|
|
1380
|
-
const marshalUpdatableRaidArray = (request, defaults) => ({
|
|
1381
|
-
disk_ids: request.diskIds,
|
|
1382
|
-
raid_level: request.raidLevel
|
|
1383
|
-
});
|
|
1384
|
-
const marshalUpdateRaidRequest = (request, defaults) => ({
|
|
1385
|
-
raid_arrays: request.raidArrays.map(
|
|
1386
|
-
(elt) => marshalUpdatableRaidArray(elt)
|
|
1387
|
-
)
|
|
1388
|
-
});
|
|
1389
|
-
const marshalUpdateReverseRequest = (request, defaults) => ({
|
|
1390
|
-
reverse: request.reverse
|
|
1391
|
-
});
|
|
945
|
+
member_ids: request.memberIds,
|
|
946
|
+
vlan: request.vlan
|
|
947
|
+
});
|
|
948
|
+
const marshalStartBMCAccessRequest = (request, defaults) => ({ ip: request.ip });
|
|
949
|
+
const marshalStartRescueRequest = (request, defaults) => ({ os_id: request.osId });
|
|
950
|
+
const marshalSubscribeServerOptionRequest = (request, defaults) => ({ option_id: request.optionId });
|
|
951
|
+
const marshalSubscribeStorageOptionsRequest = (request, defaults) => ({ options_ids: request.optionsIds });
|
|
952
|
+
var marshalUpdatableRaidArray = (request, defaults) => ({
|
|
953
|
+
disk_ids: request.diskIds,
|
|
954
|
+
raid_level: request.raidLevel
|
|
955
|
+
});
|
|
956
|
+
const marshalUpdateRaidRequest = (request, defaults) => ({ raid_arrays: request.raidArrays.map((elt) => marshalUpdatableRaidArray(elt, defaults)) });
|
|
957
|
+
const marshalUpdateReverseRequest = (request, defaults) => ({ reverse: request.reverse });
|
|
1392
958
|
const marshalUpdateServerBackupRequest = (request, defaults) => ({
|
|
1393
|
-
|
|
1394
|
-
|
|
1395
|
-
|
|
959
|
+
acl_enabled: request.aclEnabled,
|
|
960
|
+
autologin: request.autologin,
|
|
961
|
+
password: request.password
|
|
1396
962
|
});
|
|
1397
963
|
const marshalUpdateServerRequest = (request, defaults) => ({
|
|
1398
|
-
|
|
1399
|
-
|
|
1400
|
-
});
|
|
1401
|
-
const marshalUpdateServerTagsRequest = (request, defaults) => ({
|
|
1402
|
-
tags: request.tags
|
|
964
|
+
enable_ipv6: request.enableIpv6,
|
|
965
|
+
hostname: request.hostname
|
|
1403
966
|
});
|
|
1404
|
-
|
|
1405
|
-
|
|
1406
|
-
marshalAttachFailoverIPsRequest,
|
|
1407
|
-
marshalCreateFailoverIPsRequest,
|
|
1408
|
-
marshalCreateServerRequest,
|
|
1409
|
-
marshalDetachFailoverIPsRequest,
|
|
1410
|
-
marshalIPv6BlockApiCreateIPv6BlockRequest,
|
|
1411
|
-
marshalIPv6BlockApiCreateIPv6BlockSubnetRequest,
|
|
1412
|
-
marshalIPv6BlockApiUpdateIPv6BlockRequest,
|
|
1413
|
-
marshalInstallServerRequest,
|
|
1414
|
-
marshalRpnSanApiAddIpRequest,
|
|
1415
|
-
marshalRpnSanApiCreateRpnSanRequest,
|
|
1416
|
-
marshalRpnSanApiRemoveIpRequest,
|
|
1417
|
-
marshalRpnV1ApiAddRpnGroupMembersRequest,
|
|
1418
|
-
marshalRpnV1ApiCreateRpnGroupRequest,
|
|
1419
|
-
marshalRpnV1ApiDeleteRpnGroupMembersRequest,
|
|
1420
|
-
marshalRpnV1ApiLeaveRpnGroupRequest,
|
|
1421
|
-
marshalRpnV1ApiRpnGroupInviteRequest,
|
|
1422
|
-
marshalRpnV1ApiUpdateRpnGroupNameRequest,
|
|
1423
|
-
marshalRpnV2ApiAddRpnV2MembersRequest,
|
|
1424
|
-
marshalRpnV2ApiCreateRpnV2GroupRequest,
|
|
1425
|
-
marshalRpnV2ApiDeleteRpnV2MembersRequest,
|
|
1426
|
-
marshalRpnV2ApiEnableRpnV2GroupCompatibilityRequest,
|
|
1427
|
-
marshalRpnV2ApiUpdateRpnV2GroupNameRequest,
|
|
1428
|
-
marshalRpnV2ApiUpdateRpnV2VlanForMembersRequest,
|
|
1429
|
-
marshalStartBMCAccessRequest,
|
|
1430
|
-
marshalStartRescueRequest,
|
|
1431
|
-
marshalSubscribeServerOptionRequest,
|
|
1432
|
-
marshalSubscribeStorageOptionsRequest,
|
|
1433
|
-
marshalUpdateRaidRequest,
|
|
1434
|
-
marshalUpdateReverseRequest,
|
|
1435
|
-
marshalUpdateServerBackupRequest,
|
|
1436
|
-
marshalUpdateServerRequest,
|
|
1437
|
-
marshalUpdateServerTagsRequest,
|
|
1438
|
-
unmarshalBMCAccess,
|
|
1439
|
-
unmarshalBackup,
|
|
1440
|
-
unmarshalCanOrderResponse,
|
|
1441
|
-
unmarshalCreateFailoverIPsResponse,
|
|
1442
|
-
unmarshalFailoverIP,
|
|
1443
|
-
unmarshalGetIPv6BlockQuotasResponse,
|
|
1444
|
-
unmarshalGetRemainingQuotaResponse,
|
|
1445
|
-
unmarshalGetRpnStatusResponse,
|
|
1446
|
-
unmarshalIP,
|
|
1447
|
-
unmarshalIPv6Block,
|
|
1448
|
-
unmarshalInvoice,
|
|
1449
|
-
unmarshalListFailoverIPsResponse,
|
|
1450
|
-
unmarshalListIPv6BlockSubnetsAvailableResponse,
|
|
1451
|
-
unmarshalListIPv6BlocksResponse,
|
|
1452
|
-
unmarshalListInvoicesResponse,
|
|
1453
|
-
unmarshalListIpsResponse,
|
|
1454
|
-
unmarshalListOSResponse,
|
|
1455
|
-
unmarshalListOffersResponse,
|
|
1456
|
-
unmarshalListRefundsResponse,
|
|
1457
|
-
unmarshalListRpnCapableSanServersResponse,
|
|
1458
|
-
unmarshalListRpnCapableServersResponse,
|
|
1459
|
-
unmarshalListRpnGroupMembersResponse,
|
|
1460
|
-
unmarshalListRpnGroupsResponse,
|
|
1461
|
-
unmarshalListRpnInvitesResponse,
|
|
1462
|
-
unmarshalListRpnSansResponse,
|
|
1463
|
-
unmarshalListRpnServerCapabilitiesResponse,
|
|
1464
|
-
unmarshalListRpnV2CapableResourcesResponse,
|
|
1465
|
-
unmarshalListRpnV2GroupLogsResponse,
|
|
1466
|
-
unmarshalListRpnV2GroupsResponse,
|
|
1467
|
-
unmarshalListRpnV2MembersResponse,
|
|
1468
|
-
unmarshalListServerDisksResponse,
|
|
1469
|
-
unmarshalListServerEventsResponse,
|
|
1470
|
-
unmarshalListServersResponse,
|
|
1471
|
-
unmarshalListServicesResponse,
|
|
1472
|
-
unmarshalListSubscribableServerOptionsResponse,
|
|
1473
|
-
unmarshalOS,
|
|
1474
|
-
unmarshalOffer,
|
|
1475
|
-
unmarshalRaid,
|
|
1476
|
-
unmarshalRefund,
|
|
1477
|
-
unmarshalRescue,
|
|
1478
|
-
unmarshalRpnGroup,
|
|
1479
|
-
unmarshalRpnSan,
|
|
1480
|
-
unmarshalRpnV2Group,
|
|
1481
|
-
unmarshalServer,
|
|
1482
|
-
unmarshalServerDefaultPartitioning,
|
|
1483
|
-
unmarshalServerInstall,
|
|
1484
|
-
unmarshalService,
|
|
1485
|
-
unmarshalSubscribeStorageOptionsResponse
|
|
1486
|
-
};
|
|
967
|
+
const marshalUpdateServerTagsRequest = (request, defaults) => ({ tags: request.tags });
|
|
968
|
+
export { marshalAttachFailoverIPToMacAddressRequest, marshalAttachFailoverIPsRequest, marshalCreateFailoverIPsRequest, marshalCreateServerRequest, marshalDetachFailoverIPsRequest, marshalIPv6BlockApiCreateIPv6BlockRequest, marshalIPv6BlockApiCreateIPv6BlockSubnetRequest, marshalIPv6BlockApiUpdateIPv6BlockRequest, marshalInstallServerRequest, marshalRpnSanApiAddIpRequest, marshalRpnSanApiCreateRpnSanRequest, marshalRpnSanApiRemoveIpRequest, marshalRpnV1ApiAddRpnGroupMembersRequest, marshalRpnV1ApiCreateRpnGroupRequest, marshalRpnV1ApiDeleteRpnGroupMembersRequest, marshalRpnV1ApiLeaveRpnGroupRequest, marshalRpnV1ApiRpnGroupInviteRequest, marshalRpnV1ApiUpdateRpnGroupNameRequest, marshalRpnV2ApiAddRpnV2MembersRequest, marshalRpnV2ApiCreateRpnV2GroupRequest, marshalRpnV2ApiDeleteRpnV2MembersRequest, marshalRpnV2ApiEnableRpnV2GroupCompatibilityRequest, marshalRpnV2ApiUpdateRpnV2GroupNameRequest, marshalRpnV2ApiUpdateRpnV2VlanForMembersRequest, marshalStartBMCAccessRequest, marshalStartRescueRequest, marshalSubscribeServerOptionRequest, marshalSubscribeStorageOptionsRequest, marshalUpdateRaidRequest, marshalUpdateReverseRequest, marshalUpdateServerBackupRequest, marshalUpdateServerRequest, marshalUpdateServerTagsRequest, unmarshalBMCAccess, unmarshalBackup, unmarshalCanOrderResponse, unmarshalCreateFailoverIPsResponse, unmarshalFailoverIP, unmarshalGetIPv6BlockQuotasResponse, unmarshalGetRemainingQuotaResponse, unmarshalGetRpnStatusResponse, unmarshalIP, unmarshalIPv6Block, unmarshalInvoice, unmarshalListFailoverIPsResponse, unmarshalListIPv6BlockSubnetsAvailableResponse, unmarshalListIPv6BlocksResponse, unmarshalListInvoicesResponse, unmarshalListIpsResponse, unmarshalListOSResponse, unmarshalListOffersResponse, unmarshalListRefundsResponse, unmarshalListRpnCapableSanServersResponse, unmarshalListRpnCapableServersResponse, unmarshalListRpnGroupMembersResponse, unmarshalListRpnGroupsResponse, unmarshalListRpnInvitesResponse, unmarshalListRpnSansResponse, unmarshalListRpnServerCapabilitiesResponse, unmarshalListRpnV2CapableResourcesResponse, unmarshalListRpnV2GroupLogsResponse, unmarshalListRpnV2GroupsResponse, unmarshalListRpnV2MembersResponse, unmarshalListServerDisksResponse, unmarshalListServerEventsResponse, unmarshalListServersResponse, unmarshalListServicesResponse, unmarshalListSubscribableServerOptionsResponse, unmarshalOS, unmarshalOffer, unmarshalRaid, unmarshalRefund, unmarshalRescue, unmarshalRpnGroup, unmarshalRpnSan, unmarshalRpnV2Group, unmarshalServer, unmarshalServerDefaultPartitioning, unmarshalServerInstall, unmarshalService, unmarshalSubscribeStorageOptionsResponse };
|