@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.
@@ -1,1486 +1,968 @@
1
1
  import { isJSONObject, unmarshalArrayOfObject, unmarshalDate, unmarshalMoney } from "@scaleway/sdk-client";
2
2
  const unmarshalIP = (data) => {
3
- if (!isJSONObject(data)) {
4
- throw new TypeError(
5
- `Unmarshalling the type 'IP' failed as data isn't a dictionary.`
6
- );
7
- }
8
- return {
9
- address: data.address,
10
- cidr: data.cidr,
11
- gateway: data.gateway,
12
- ipId: data.ip_id,
13
- netmask: data.netmask,
14
- reverse: data.reverse,
15
- semantic: data.semantic,
16
- status: data.status,
17
- version: data.version
18
- };
19
- };
20
- const unmarshalCPU = (data) => {
21
- if (!isJSONObject(data)) {
22
- throw new TypeError(
23
- `Unmarshalling the type 'CPU' failed as data isn't a dictionary.`
24
- );
25
- }
26
- return {
27
- coreCount: data.core_count,
28
- frequency: data.frequency,
29
- name: data.name,
30
- threadCount: data.thread_count
31
- };
32
- };
33
- const unmarshalDisk = (data) => {
34
- if (!isJSONObject(data)) {
35
- throw new TypeError(
36
- `Unmarshalling the type 'Disk' failed as data isn't a dictionary.`
37
- );
38
- }
39
- return {
40
- capacity: data.capacity,
41
- type: data.type
42
- };
43
- };
44
- const unmarshalMemory = (data) => {
45
- if (!isJSONObject(data)) {
46
- throw new TypeError(
47
- `Unmarshalling the type 'Memory' failed as data isn't a dictionary.`
48
- );
49
- }
50
- return {
51
- capacity: data.capacity,
52
- frequency: data.frequency,
53
- isEcc: data.is_ecc,
54
- type: data.type
55
- };
56
- };
57
- const unmarshalPersistentMemory = (data) => {
58
- if (!isJSONObject(data)) {
59
- throw new TypeError(
60
- `Unmarshalling the type 'PersistentMemory' failed as data isn't a dictionary.`
61
- );
62
- }
63
- return {
64
- capacity: data.capacity,
65
- frequency: data.frequency,
66
- model: data.model
67
- };
68
- };
69
- const unmarshalRaidController = (data) => {
70
- if (!isJSONObject(data)) {
71
- throw new TypeError(
72
- `Unmarshalling the type 'RaidController' failed as data isn't a dictionary.`
73
- );
74
- }
75
- return {
76
- model: data.model,
77
- raidLevel: data.raid_level
78
- };
79
- };
80
- const unmarshalOfferAntiDosInfo = (data) => {
81
- if (!isJSONObject(data)) {
82
- throw new TypeError(
83
- `Unmarshalling the type 'OfferAntiDosInfo' failed as data isn't a dictionary.`
84
- );
85
- }
86
- return {
87
- type: data.type
88
- };
89
- };
90
- const unmarshalOfferBackupInfo = (data) => {
91
- if (!isJSONObject(data)) {
92
- throw new TypeError(
93
- `Unmarshalling the type 'OfferBackupInfo' failed as data isn't a dictionary.`
94
- );
95
- }
96
- return {
97
- size: data.size
98
- };
99
- };
100
- const unmarshalOfferBandwidthInfo = (data) => {
101
- if (!isJSONObject(data)) {
102
- throw new TypeError(
103
- `Unmarshalling the type 'OfferBandwidthInfo' failed as data isn't a dictionary.`
104
- );
105
- }
106
- return {
107
- speed: data.speed
108
- };
109
- };
110
- const unmarshalOfferFailoverBlockInfo = (data) => {
111
- if (!isJSONObject(data)) {
112
- throw new TypeError(
113
- `Unmarshalling the type 'OfferFailoverBlockInfo' failed as data isn't a dictionary.`
114
- );
115
- }
116
- return {
117
- onetimeFees: data.onetime_fees ? unmarshalOffer(data.onetime_fees) : void 0
118
- };
119
- };
120
- const unmarshalOfferFailoverIpInfo = (data) => {
121
- if (!isJSONObject(data)) {
122
- throw new TypeError(
123
- `Unmarshalling the type 'OfferFailoverIpInfo' failed as data isn't a dictionary.`
124
- );
125
- }
126
- return {
127
- onetimeFees: data.onetime_fees ? unmarshalOffer(data.onetime_fees) : void 0
128
- };
129
- };
130
- const unmarshalOfferLicenseInfo = (data) => {
131
- if (!isJSONObject(data)) {
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
- if (!isJSONObject(data)) {
229
- throw new TypeError(
230
- `Unmarshalling the type 'Offer' failed as data isn't a dictionary.`
231
- );
232
- }
233
- return {
234
- antidosInfo: data.antidos_info ? unmarshalOfferAntiDosInfo(data.antidos_info) : void 0,
235
- backupInfo: data.backup_info ? unmarshalOfferBackupInfo(data.backup_info) : void 0,
236
- bandwidthInfo: data.bandwidth_info ? unmarshalOfferBandwidthInfo(data.bandwidth_info) : void 0,
237
- catalog: data.catalog,
238
- failoverBlockInfo: data.failover_block_info ? unmarshalOfferFailoverBlockInfo(data.failover_block_info) : void 0,
239
- failoverIpInfo: data.failover_ip_info ? unmarshalOfferFailoverIpInfo(data.failover_ip_info) : void 0,
240
- id: data.id,
241
- licenseInfo: data.license_info ? unmarshalOfferLicenseInfo(data.license_info) : void 0,
242
- name: data.name,
243
- paymentFrequency: data.payment_frequency,
244
- pricing: data.pricing ? unmarshalMoney(data.pricing) : void 0,
245
- rpnInfo: data.rpn_info ? unmarshalOfferRPNInfo(data.rpn_info) : void 0,
246
- sanInfo: data.san_info ? unmarshalOfferSANInfo(data.san_info) : void 0,
247
- serverInfo: data.server_info ? unmarshalOfferServerInfo(data.server_info) : void 0,
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
- if (!isJSONObject(data)) {
255
- throw new TypeError(
256
- `Unmarshalling the type 'OS' failed as data isn't a dictionary.`
257
- );
258
- }
259
- return {
260
- allowCustomPartitioning: data.allow_custom_partitioning,
261
- allowSshKeys: data.allow_ssh_keys,
262
- allowedFilesystems: data.allowed_filesystems,
263
- arch: data.arch,
264
- displayName: data.display_name,
265
- hostnameMaxLength: data.hostname_max_length,
266
- hostnameRegex: data.hostname_regex,
267
- id: data.id,
268
- licenseOffers: unmarshalArrayOfObject(data.license_offers, unmarshalOffer),
269
- maxPartitions: data.max_partitions,
270
- name: data.name,
271
- panelPasswordRegex: data.panel_password_regex,
272
- passwordRegex: data.password_regex,
273
- releasedAt: unmarshalDate(data.released_at),
274
- requiresAdminPassword: data.requires_admin_password,
275
- requiresLicense: data.requires_license,
276
- requiresPanelPassword: data.requires_panel_password,
277
- requiresUser: data.requires_user,
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
- if (!isJSONObject(data)) {
285
- throw new TypeError(
286
- `Unmarshalling the type 'RpnSan' failed as data isn't a dictionary.`
287
- );
288
- }
289
- return {
290
- createdAt: unmarshalDate(data.created_at),
291
- datacenterName: data.datacenter_name,
292
- deliveredAt: unmarshalDate(data.delivered_at),
293
- expiresAt: unmarshalDate(data.expires_at),
294
- id: data.id,
295
- iqn: data.iqn,
296
- iqnSuffix: data.iqn_suffix,
297
- offer: data.offer ? unmarshalOffer(data.offer) : void 0,
298
- offerId: data.offer_id,
299
- offerName: data.offer_name,
300
- organizationId: data.organization_id,
301
- projectId: data.project_id,
302
- rpnv1Compatible: data.rpnv1_compatible,
303
- rpnv1Implicit: data.rpnv1_implicit,
304
- serverHostname: data.server_hostname,
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
- if (!isJSONObject(data)) {
312
- throw new TypeError(
313
- `Unmarshalling the type 'RpnGroup' failed as data isn't a dictionary.`
314
- );
315
- }
316
- return {
317
- active: data.active,
318
- createdAt: unmarshalDate(data.created_at),
319
- id: data.id,
320
- membersCount: data.members_count,
321
- name: data.name,
322
- organizationId: data.organization_id,
323
- owner: data.owner,
324
- projectId: data.project_id,
325
- type: data.type
326
- };
327
- };
328
- const unmarshalNetworkInterface = (data) => {
329
- if (!isJSONObject(data)) {
330
- throw new TypeError(
331
- `Unmarshalling the type 'NetworkInterface' failed as data isn't a dictionary.`
332
- );
333
- }
334
- return {
335
- cardId: data.card_id,
336
- deviceId: data.device_id,
337
- ips: unmarshalArrayOfObject(data.ips, unmarshalIP),
338
- mac: data.mac,
339
- type: data.type
340
- };
341
- };
342
- const unmarshalServerLocation = (data) => {
343
- if (!isJSONObject(data)) {
344
- throw new TypeError(
345
- `Unmarshalling the type 'ServerLocation' failed as data isn't a dictionary.`
346
- );
347
- }
348
- return {
349
- datacenterName: data.datacenter_name,
350
- rack: data.rack,
351
- room: data.room
352
- };
353
- };
354
- const unmarshalServerOption = (data) => {
355
- if (!isJSONObject(data)) {
356
- throw new TypeError(
357
- `Unmarshalling the type 'ServerOption' failed as data isn't a dictionary.`
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
- if (!isJSONObject(data)) {
381
- throw new TypeError(
382
- `Unmarshalling the type 'Server' failed as data isn't a dictionary.`
383
- );
384
- }
385
- return {
386
- abuseContact: data.abuse_contact,
387
- createdAt: unmarshalDate(data.created_at),
388
- expiredAt: unmarshalDate(data.expired_at),
389
- hasBmc: data.has_bmc,
390
- hostname: data.hostname,
391
- id: data.id,
392
- interfaces: unmarshalArrayOfObject(
393
- data.interfaces,
394
- unmarshalNetworkInterface
395
- ),
396
- ipv6Slaac: data.ipv6_slaac,
397
- isHds: data.is_hds,
398
- isOutsourced: data.is_outsourced,
399
- isRpnv2Member: data.is_rpnv2_member,
400
- level: data.level ? unmarshalServiceLevel(data.level) : void 0,
401
- location: data.location ? unmarshalServerLocation(data.location) : void 0,
402
- offer: data.offer ? unmarshalOffer(data.offer) : void 0,
403
- options: unmarshalArrayOfObject(data.options, unmarshalServerOption),
404
- organizationId: data.organization_id,
405
- os: data.os ? unmarshalOS(data.os) : void 0,
406
- projectId: data.project_id,
407
- qinq: data.qinq,
408
- rebootedAt: unmarshalDate(data.rebooted_at),
409
- rescueOs: data.rescue_os ? unmarshalOS(data.rescue_os) : void 0,
410
- status: data.status,
411
- tags: data.tags,
412
- updatedAt: unmarshalDate(data.updated_at),
413
- zone: data.zone
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
- if (!isJSONObject(data)) {
429
- throw new TypeError(
430
- `Unmarshalling the type 'RpnV2Group' failed as data isn't a dictionary.`
431
- );
432
- }
433
- return {
434
- compatibleRpnv1: data.compatible_rpnv1,
435
- gateway: data.gateway,
436
- id: data.id,
437
- membersCount: data.members_count,
438
- name: data.name,
439
- organizationId: data.organization_id,
440
- owner: data.owner,
441
- projectId: data.project_id,
442
- rpnv1Group: data.rpnv1_group ? unmarshalRpnGroup(data.rpnv1_group) : void 0,
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
- if (!isJSONObject(data)) {
450
- throw new TypeError(
451
- `Unmarshalling the type 'Service' failed as data isn't a dictionary.`
452
- );
453
- }
454
- return {
455
- createdAt: unmarshalDate(data.created_at),
456
- deliveredAt: unmarshalDate(data.delivered_at),
457
- expiresAt: unmarshalDate(data.expires_at),
458
- id: data.id,
459
- offer: data.offer ? unmarshalOffer(data.offer) : void 0,
460
- provisioningStatus: data.provisioning_status,
461
- resourceId: data.resource_id,
462
- terminatedAt: unmarshalDate(data.terminated_at),
463
- type: data.type
464
- };
465
- };
466
- const unmarshalFailoverBlock = (data) => {
467
- if (!isJSONObject(data)) {
468
- throw new TypeError(
469
- `Unmarshalling the type 'FailoverBlock' failed as data isn't a dictionary.`
470
- );
471
- }
472
- return {
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
- if (!isJSONObject(data)) {
484
- throw new TypeError(
485
- `Unmarshalling the type 'FailoverIP' failed as data isn't a dictionary.`
486
- );
487
- }
488
- return {
489
- address: data.address,
490
- block: data.block ? unmarshalFailoverBlock(data.block) : void 0,
491
- cidr: data.cidr,
492
- gatewayIp: data.gateway_ip,
493
- id: data.id,
494
- ipVersion: data.ip_version,
495
- mac: data.mac,
496
- netmask: data.netmask,
497
- reverse: data.reverse,
498
- serverId: data.server_id,
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
- if (!isJSONObject(data)) {
506
- throw new TypeError(
507
- `Unmarshalling the type 'IPv6Block' failed as data isn't a dictionary.`
508
- );
509
- }
510
- return {
511
- address: data.address,
512
- cidr: data.cidr,
513
- delegationStatus: data.delegation_status,
514
- duid: data.duid,
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
- if (!isJSONObject(data)) {
522
- throw new TypeError(
523
- `Unmarshalling the type 'BMCAccess' failed as data isn't a dictionary.`
524
- );
525
- }
526
- return {
527
- expiresAt: unmarshalDate(data.expires_at),
528
- login: data.login,
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
- if (!isJSONObject(data)) {
536
- throw new TypeError(
537
- `Unmarshalling the type 'Backup' failed as data isn't a dictionary.`
538
- );
539
- }
540
- return {
541
- aclEnabled: data.acl_enabled,
542
- autologin: data.autologin,
543
- id: data.id,
544
- login: data.login,
545
- quotaFiles: data.quota_files,
546
- quotaFilesUsed: data.quota_files_used,
547
- quotaSpace: data.quota_space,
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
- if (!isJSONObject(data)) {
555
- throw new TypeError(
556
- `Unmarshalling the type 'CanOrderResponse' failed as data isn't a dictionary.`
557
- );
558
- }
559
- return {
560
- billingOk: data.billing_ok,
561
- canOrder: data.can_order,
562
- emailConfirmed: data.email_confirmed,
563
- message: data.message,
564
- paymentMode: data.payment_mode,
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
- if (!isJSONObject(data)) {
572
- throw new TypeError(
573
- `Unmarshalling the type 'CreateFailoverIPsResponse' failed as data isn't a dictionary.`
574
- );
575
- }
576
- return {
577
- services: unmarshalArrayOfObject(data.services, unmarshalService),
578
- totalCount: data.total_count
579
- };
580
- };
581
- const unmarshalGetIPv6BlockQuotasResponseQuota = (data) => {
582
- if (!isJSONObject(data)) {
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
- if (!isJSONObject(data)) {
594
- throw new TypeError(
595
- `Unmarshalling the type 'GetIPv6BlockQuotasResponse' failed as data isn't a dictionary.`
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
- if (!isJSONObject(data)) {
608
- throw new TypeError(
609
- `Unmarshalling the type 'GetRemainingQuotaResponse' failed as data isn't a dictionary.`
610
- );
611
- }
612
- return {
613
- failoverBlockQuota: data.failover_block_quota,
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
- if (!isJSONObject(data)) {
621
- throw new TypeError(
622
- `Unmarshalling the type 'GetRpnStatusResponse' failed as data isn't a dictionary.`
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
- if (!isJSONObject(data)) {
632
- throw new TypeError(
633
- `Unmarshalling the type 'Invoice' failed as data isn't a dictionary.`
634
- );
635
- }
636
- return {
637
- content: data.content,
638
- createdAt: unmarshalDate(data.created_at),
639
- id: data.id,
640
- paidAt: unmarshalDate(data.paid_at),
641
- paymentMethod: data.payment_method,
642
- status: data.status,
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
- if (!isJSONObject(data)) {
650
- throw new TypeError(
651
- `Unmarshalling the type 'ListFailoverIPsResponse' failed as data isn't a dictionary.`
652
- );
653
- }
654
- return {
655
- failoverIps: unmarshalArrayOfObject(data.failover_ips, unmarshalFailoverIP),
656
- totalCount: data.total_count
657
- };
658
- };
659
- const unmarshalListIPv6BlockSubnetsAvailableResponseSubnet = (data) => {
660
- if (!isJSONObject(data)) {
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
- if (!isJSONObject(data)) {
672
- throw new TypeError(
673
- `Unmarshalling the type 'ListIPv6BlockSubnetsAvailableResponse' failed as data isn't a dictionary.`
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
- if (!isJSONObject(data)) {
686
- throw new TypeError(
687
- `Unmarshalling the type 'ListIPv6BlocksResponse' failed as data isn't a dictionary.`
688
- );
689
- }
690
- return {
691
- ipv6Blocks: unmarshalArrayOfObject(data.ipv6_blocks, unmarshalIPv6Block),
692
- totalCount: data.total_count
693
- };
694
- };
695
- const unmarshalInvoiceSummary = (data) => {
696
- if (!isJSONObject(data)) {
697
- throw new TypeError(
698
- `Unmarshalling the type 'InvoiceSummary' failed as data isn't a dictionary.`
699
- );
700
- }
701
- return {
702
- createdAt: unmarshalDate(data.created_at),
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
- if (!isJSONObject(data)) {
714
- throw new TypeError(
715
- `Unmarshalling the type 'ListInvoicesResponse' failed as data isn't a dictionary.`
716
- );
717
- }
718
- return {
719
- invoices: unmarshalArrayOfObject(data.invoices, unmarshalInvoiceSummary),
720
- totalCount: data.total_count
721
- };
722
- };
723
- const unmarshalRpnSanIpRpnV2Group = (data) => {
724
- if (!isJSONObject(data)) {
725
- throw new TypeError(
726
- `Unmarshalling the type 'RpnSanIpRpnV2Group' failed as data isn't a dictionary.`
727
- );
728
- }
729
- return {
730
- id: data.id,
731
- name: data.name
732
- };
733
- };
734
- const unmarshalRpnSanIpServer = (data) => {
735
- if (!isJSONObject(data)) {
736
- throw new TypeError(
737
- `Unmarshalling the type 'RpnSanIpServer' failed as data isn't a dictionary.`
738
- );
739
- }
740
- return {
741
- datacenterName: data.datacenter_name,
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
- if (!isJSONObject(data)) {
761
- throw new TypeError(
762
- `Unmarshalling the type 'ListIpsResponse' failed as data isn't a dictionary.`
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
- if (!isJSONObject(data)) {
772
- throw new TypeError(
773
- `Unmarshalling the type 'ListOSResponse' failed as data isn't a dictionary.`
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
- if (!isJSONObject(data)) {
783
- throw new TypeError(
784
- `Unmarshalling the type 'ListOffersResponse' failed as data isn't a dictionary.`
785
- );
786
- }
787
- return {
788
- offers: unmarshalArrayOfObject(data.offers, unmarshalOffer),
789
- totalCount: data.total_count
790
- };
791
- };
792
- const unmarshalRefundSummary = (data) => {
793
- if (!isJSONObject(data)) {
794
- throw new TypeError(
795
- `Unmarshalling the type 'RefundSummary' failed as data isn't a dictionary.`
796
- );
797
- }
798
- return {
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
- if (!isJSONObject(data)) {
810
- throw new TypeError(
811
- `Unmarshalling the type 'ListRefundsResponse' failed as data isn't a dictionary.`
812
- );
813
- }
814
- return {
815
- refunds: unmarshalArrayOfObject(data.refunds, unmarshalRefundSummary),
816
- totalCount: data.total_count
817
- };
818
- };
819
- const unmarshalRpnSanServer = (data) => {
820
- if (!isJSONObject(data)) {
821
- throw new TypeError(
822
- `Unmarshalling the type 'RpnSanServer' failed as data isn't a dictionary.`
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
- if (!isJSONObject(data)) {
835
- throw new TypeError(
836
- `Unmarshalling the type 'ListRpnCapableSanServersResponse' failed as data isn't a dictionary.`
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
- if (!isJSONObject(data)) {
846
- throw new TypeError(
847
- `Unmarshalling the type 'ListRpnCapableServersResponse' failed as data isn't a dictionary.`
848
- );
849
- }
850
- return {
851
- servers: unmarshalArrayOfObject(data.servers, unmarshalServer),
852
- totalCount: data.total_count
853
- };
854
- };
855
- const unmarshalRpnGroupMember = (data) => {
856
- if (!isJSONObject(data)) {
857
- throw new TypeError(
858
- `Unmarshalling the type 'RpnGroupMember' failed as data isn't a dictionary.`
859
- );
860
- }
861
- return {
862
- groupId: data.group_id,
863
- groupName: data.group_name,
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
- if (!isJSONObject(data)) {
875
- throw new TypeError(
876
- `Unmarshalling the type 'ListRpnGroupMembersResponse' failed as data isn't a dictionary.`
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
- if (!isJSONObject(data)) {
886
- throw new TypeError(
887
- `Unmarshalling the type 'ListRpnGroupsResponse' failed as data isn't a dictionary.`
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
- if (!isJSONObject(data)) {
897
- throw new TypeError(
898
- `Unmarshalling the type 'ListRpnInvitesResponse' failed as data isn't a dictionary.`
899
- );
900
- }
901
- return {
902
- members: unmarshalArrayOfObject(data.members, unmarshalRpnGroupMember),
903
- totalCount: data.total_count
904
- };
905
- };
906
- const unmarshalRpnSanSummary = (data) => {
907
- if (!isJSONObject(data)) {
908
- throw new TypeError(
909
- `Unmarshalling the type 'RpnSanSummary' failed as data isn't a dictionary.`
910
- );
911
- }
912
- return {
913
- createdAt: unmarshalDate(data.created_at),
914
- datacenterName: data.datacenter_name,
915
- deliveredAt: unmarshalDate(data.delivered_at),
916
- expiresAt: unmarshalDate(data.expires_at),
917
- id: data.id,
918
- iqnSuffix: data.iqn_suffix,
919
- offerId: data.offer_id,
920
- offerName: data.offer_name,
921
- organizationId: data.organization_id,
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
- if (!isJSONObject(data)) {
933
- throw new TypeError(
934
- `Unmarshalling the type 'ListRpnSansResponse' failed as data isn't a dictionary.`
935
- );
936
- }
937
- return {
938
- rpnSans: unmarshalArrayOfObject(data.rpn_sans, unmarshalRpnSanSummary),
939
- totalCount: data.total_count
940
- };
941
- };
942
- const unmarshalRpnServerCapability = (data) => {
943
- if (!isJSONObject(data)) {
944
- throw new TypeError(
945
- `Unmarshalling the type 'RpnServerCapability' failed as data isn't a dictionary.`
946
- );
947
- }
948
- return {
949
- canJoinQinqGroup: data.can_join_qinq_group,
950
- canJoinRpnv2Group: data.can_join_rpnv2_group,
951
- compatibleQinq: data.compatible_qinq,
952
- datacenterName: data.datacenter_name,
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
- if (!isJSONObject(data)) {
964
- throw new TypeError(
965
- `Unmarshalling the type 'ListRpnServerCapabilitiesResponse' failed as data isn't a dictionary.`
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
- if (!isJSONObject(data)) {
975
- throw new TypeError(
976
- `Unmarshalling the type 'ListRpnV2CapableResourcesResponse' failed as data isn't a dictionary.`
977
- );
978
- }
979
- return {
980
- servers: unmarshalArrayOfObject(data.servers, unmarshalServer),
981
- totalCount: data.total_count
982
- };
983
- };
984
- const unmarshalRpnV2Member = (data) => {
985
- if (!isJSONObject(data)) {
986
- throw new TypeError(
987
- `Unmarshalling the type 'RpnV2Member' failed as data isn't a dictionary.`
988
- );
989
- }
990
- return {
991
- id: data.id,
992
- rpnv1Group: data.rpnv1_group ? unmarshalRpnGroup(data.rpnv1_group) : void 0,
993
- server: data.server ? unmarshalServer(data.server) : void 0,
994
- speed: data.speed,
995
- status: data.status,
996
- vlan: data.vlan
997
- };
998
- };
999
- const unmarshalLog = (data) => {
1000
- if (!isJSONObject(data)) {
1001
- throw new TypeError(
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
- if (!isJSONObject(data)) {
1017
- throw new TypeError(
1018
- `Unmarshalling the type 'ListRpnV2GroupLogsResponse' failed as data isn't a dictionary.`
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
- if (!isJSONObject(data)) {
1028
- throw new TypeError(
1029
- `Unmarshalling the type 'ListRpnV2GroupsResponse' failed as data isn't a dictionary.`
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
- if (!isJSONObject(data)) {
1039
- throw new TypeError(
1040
- `Unmarshalling the type 'ListRpnV2MembersResponse' failed as data isn't a dictionary.`
1041
- );
1042
- }
1043
- return {
1044
- members: unmarshalArrayOfObject(data.members, unmarshalRpnV2Member),
1045
- totalCount: data.total_count
1046
- };
1047
- };
1048
- const unmarshalServerDisk = (data) => {
1049
- if (!isJSONObject(data)) {
1050
- throw new TypeError(
1051
- `Unmarshalling the type 'ServerDisk' failed as data isn't a dictionary.`
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
- if (!isJSONObject(data)) {
1064
- throw new TypeError(
1065
- `Unmarshalling the type 'ListServerDisksResponse' failed as data isn't a dictionary.`
1066
- );
1067
- }
1068
- return {
1069
- disks: unmarshalArrayOfObject(data.disks, unmarshalServerDisk),
1070
- totalCount: data.total_count
1071
- };
1072
- };
1073
- const unmarshalServerEvent = (data) => {
1074
- if (!isJSONObject(data)) {
1075
- throw new TypeError(
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
- if (!isJSONObject(data)) {
1087
- throw new TypeError(
1088
- `Unmarshalling the type 'ListServerEventsResponse' failed as data isn't a dictionary.`
1089
- );
1090
- }
1091
- return {
1092
- events: unmarshalArrayOfObject(data.events, unmarshalServerEvent),
1093
- totalCount: data.total_count
1094
- };
1095
- };
1096
- const unmarshalServerSummary = (data) => {
1097
- if (!isJSONObject(data)) {
1098
- throw new TypeError(
1099
- `Unmarshalling the type 'ServerSummary' failed as data isn't a dictionary.`
1100
- );
1101
- }
1102
- return {
1103
- createdAt: unmarshalDate(data.created_at),
1104
- datacenterName: data.datacenter_name,
1105
- expiredAt: unmarshalDate(data.expired_at),
1106
- hostname: data.hostname,
1107
- id: data.id,
1108
- interfaces: unmarshalArrayOfObject(
1109
- data.interfaces,
1110
- unmarshalNetworkInterface
1111
- ),
1112
- isHds: data.is_hds,
1113
- isOutsourced: data.is_outsourced,
1114
- level: data.level ? unmarshalServiceLevel(data.level) : void 0,
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
- if (!isJSONObject(data)) {
1129
- throw new TypeError(
1130
- `Unmarshalling the type 'ListServersResponse' failed as data isn't a dictionary.`
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
- if (!isJSONObject(data)) {
1140
- throw new TypeError(
1141
- `Unmarshalling the type 'ListServicesResponse' failed as data isn't a dictionary.`
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
- if (!isJSONObject(data)) {
1151
- throw new TypeError(
1152
- `Unmarshalling the type 'ListSubscribableServerOptionsResponse' failed as data isn't a dictionary.`
1153
- );
1154
- }
1155
- return {
1156
- serverOptions: unmarshalArrayOfObject(data.server_options, unmarshalOffer),
1157
- totalCount: data.total_count
1158
- };
1159
- };
1160
- const unmarshalRaidArray = (data) => {
1161
- if (!isJSONObject(data)) {
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
- if (!isJSONObject(data)) {
1173
- throw new TypeError(
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
- if (!isJSONObject(data)) {
1183
- throw new TypeError(
1184
- `Unmarshalling the type 'Refund' failed as data isn't a dictionary.`
1185
- );
1186
- }
1187
- return {
1188
- content: data.content,
1189
- createdAt: unmarshalDate(data.created_at),
1190
- id: data.id,
1191
- method: data.method,
1192
- refundedAt: unmarshalDate(data.refunded_at),
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
- if (!isJSONObject(data)) {
1200
- throw new TypeError(
1201
- `Unmarshalling the type 'Rescue' failed as data isn't a dictionary.`
1202
- );
1203
- }
1204
- return {
1205
- login: data.login,
1206
- osId: data.os_id,
1207
- password: data.password,
1208
- protocol: data.protocol
1209
- };
1210
- };
1211
- const unmarshalPartition = (data) => {
1212
- if (!isJSONObject(data)) {
1213
- throw new TypeError(
1214
- `Unmarshalling the type 'Partition' failed as data isn't a dictionary.`
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
- if (!isJSONObject(data)) {
1228
- throw new TypeError(
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
- if (!isJSONObject(data)) {
1238
- throw new TypeError(
1239
- `Unmarshalling the type 'ServerInstall' failed as data isn't a dictionary.`
1240
- );
1241
- }
1242
- return {
1243
- hostname: data.hostname,
1244
- osId: data.os_id,
1245
- panelUrl: data.panel_url,
1246
- partitions: unmarshalArrayOfObject(data.partitions, unmarshalPartition),
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
- if (!isJSONObject(data)) {
1254
- throw new TypeError(
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
- mac: request.mac,
1264
- type: request.type
867
+ mac: request.mac,
868
+ type: request.type
1265
869
  });
1266
870
  const marshalAttachFailoverIPsRequest = (request, defaults) => ({
1267
- fips_ids: request.fipsIds,
1268
- server_id: request.serverId
871
+ fips_ids: request.fipsIds,
872
+ server_id: request.serverId
1269
873
  });
1270
874
  const marshalCreateFailoverIPsRequest = (request, defaults) => ({
1271
- offer_id: request.offerId,
1272
- project_id: request.projectId ?? defaults.defaultProjectId,
1273
- quantity: request.quantity
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
- datacenter_name: request.datacenterName,
1277
- offer_id: request.offerId,
1278
- project_id: request.projectId ?? defaults.defaultProjectId,
1279
- server_option_ids: request.serverOptionIds
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
- address: request.address,
1289
- cidr: request.cidr
1290
- });
1291
- const marshalIPv6BlockApiUpdateIPv6BlockRequest = (request, defaults) => ({
1292
- nameservers: request.nameservers
888
+ address: request.address,
889
+ cidr: request.cidr
1293
890
  });
1294
- const marshalInstallPartition = (request, defaults) => ({
1295
- capacity: request.capacity,
1296
- connectors: request.connectors,
1297
- file_system: request.fileSystem,
1298
- mount_point: request.mountPoint,
1299
- raid_level: request.raidLevel
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
- hostname: request.hostname,
1303
- ip_id: request.ipId,
1304
- license_offer_id: request.licenseOfferId,
1305
- os_id: request.osId,
1306
- panel_password: request.panelPassword,
1307
- partitions: request.partitions !== void 0 ? request.partitions.map((elt) => marshalInstallPartition(elt)) : void 0,
1308
- root_password: request.rootPassword,
1309
- ssh_key_ids: request.sshKeyIds,
1310
- user_login: request.userLogin,
1311
- user_password: request.userPassword
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
- offer_id: request.offerId,
1318
- project_id: request.projectId ?? defaults.defaultProjectId
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
- san_server_ids: request.sanServerIds,
1325
- server_ids: request.serverIds
918
+ san_server_ids: request.sanServerIds,
919
+ server_ids: request.serverIds
1326
920
  });
1327
921
  const marshalRpnV1ApiCreateRpnGroupRequest = (request, defaults) => ({
1328
- name: request.name,
1329
- project_id: request.projectId ?? defaults.defaultProjectId,
1330
- san_server_ids: request.sanServerIds,
1331
- server_ids: request.serverIds
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
- project_id: request.projectId ?? defaults.defaultProjectId,
1341
- server_ids: request.serverIds
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
- name: request.name,
1351
- project_id: request.projectId ?? defaults.defaultProjectId,
1352
- servers: request.servers,
1353
- type: request.type
1354
- });
1355
- const marshalRpnV2ApiDeleteRpnV2MembersRequest = (request, defaults) => ({
1356
- member_ids: request.memberIds
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
- member_ids: request.memberIds,
1366
- vlan: request.vlan
1367
- });
1368
- const marshalStartBMCAccessRequest = (request, defaults) => ({
1369
- ip: request.ip
1370
- });
1371
- const marshalStartRescueRequest = (request, defaults) => ({
1372
- os_id: request.osId
1373
- });
1374
- const marshalSubscribeServerOptionRequest = (request, defaults) => ({
1375
- option_id: request.optionId
1376
- });
1377
- const marshalSubscribeStorageOptionsRequest = (request, defaults) => ({
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
- acl_enabled: request.aclEnabled,
1394
- autologin: request.autologin,
1395
- password: request.password
959
+ acl_enabled: request.aclEnabled,
960
+ autologin: request.autologin,
961
+ password: request.password
1396
962
  });
1397
963
  const marshalUpdateServerRequest = (request, defaults) => ({
1398
- enable_ipv6: request.enableIpv6,
1399
- hostname: request.hostname
1400
- });
1401
- const marshalUpdateServerTagsRequest = (request, defaults) => ({
1402
- tags: request.tags
964
+ enable_ipv6: request.enableIpv6,
965
+ hostname: request.hostname
1403
966
  });
1404
- export {
1405
- marshalAttachFailoverIPToMacAddressRequest,
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 };