@scaleway/sdk-instance 1.4.0 → 2.1.1

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,1872 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
3
- const randomName = require("@scaleway/random-name");
4
- const sdkClient = require("@scaleway/sdk-client");
5
- const unmarshalPrivateNIC = (data) => {
6
- if (!sdkClient.isJSONObject(data)) {
7
- throw new TypeError(
8
- `Unmarshalling the type 'PrivateNIC' failed as data isn't a dictionary.`
9
- );
10
- }
11
- return {
12
- creationDate: sdkClient.unmarshalDate(data.creation_date),
13
- id: data.id,
14
- macAddress: data.mac_address,
15
- privateNetworkId: data.private_network_id,
16
- serverId: data.server_id,
17
- state: data.state,
18
- tags: data.tags,
19
- zone: data.zone
20
- };
21
- };
22
- const unmarshalServerSummary = (data) => {
23
- if (!sdkClient.isJSONObject(data)) {
24
- throw new TypeError(
25
- `Unmarshalling the type 'ServerSummary' failed as data isn't a dictionary.`
26
- );
27
- }
28
- return {
29
- id: data.id,
30
- name: data.name
31
- };
32
- };
33
- const unmarshalBootscript = (data) => {
34
- if (!sdkClient.isJSONObject(data)) {
35
- throw new TypeError(
36
- `Unmarshalling the type 'Bootscript' failed as data isn't a dictionary.`
37
- );
38
- }
39
- return {
40
- architecture: data.architecture,
41
- bootcmdargs: data.bootcmdargs,
42
- default: data.default,
43
- dtb: data.dtb,
44
- id: data.id,
45
- initrd: data.initrd,
46
- kernel: data.kernel,
47
- organization: data.organization,
48
- project: data.project,
49
- public: data.public,
50
- title: data.title,
51
- zone: data.zone
52
- };
53
- };
54
- const unmarshalVolume = (data) => {
55
- if (!sdkClient.isJSONObject(data)) {
56
- throw new TypeError(
57
- `Unmarshalling the type 'Volume' failed as data isn't a dictionary.`
58
- );
59
- }
60
- return {
61
- creationDate: sdkClient.unmarshalDate(data.creation_date),
62
- exportUri: data.export_uri,
63
- id: data.id,
64
- modificationDate: sdkClient.unmarshalDate(data.modification_date),
65
- name: data.name,
66
- organization: data.organization,
67
- project: data.project,
68
- server: data.server ? unmarshalServerSummary(data.server) : void 0,
69
- size: data.size,
70
- state: data.state,
71
- tags: data.tags,
72
- volumeType: data.volume_type,
73
- zone: data.zone
74
- };
75
- };
76
- const unmarshalVolumeSummary = (data) => {
77
- if (!sdkClient.isJSONObject(data)) {
78
- throw new TypeError(
79
- `Unmarshalling the type 'VolumeSummary' failed as data isn't a dictionary.`
80
- );
81
- }
82
- return {
83
- id: data.id,
84
- name: data.name,
85
- size: data.size,
86
- volumeType: data.volume_type
87
- };
88
- };
89
- const unmarshalImage = (data) => {
90
- if (!sdkClient.isJSONObject(data)) {
91
- throw new TypeError(
92
- `Unmarshalling the type 'Image' failed as data isn't a dictionary.`
93
- );
94
- }
95
- return {
96
- arch: data.arch,
97
- creationDate: sdkClient.unmarshalDate(data.creation_date),
98
- defaultBootscript: data.default_bootscript ? unmarshalBootscript(data.default_bootscript) : void 0,
99
- extraVolumes: sdkClient.unmarshalMapOfObject(data.extra_volumes, unmarshalVolume),
100
- fromServer: data.from_server,
101
- id: data.id,
102
- modificationDate: sdkClient.unmarshalDate(data.modification_date),
103
- name: data.name,
104
- organization: data.organization,
105
- project: data.project,
106
- public: data.public,
107
- rootVolume: data.root_volume ? unmarshalVolumeSummary(data.root_volume) : void 0,
108
- state: data.state,
109
- tags: data.tags,
110
- zone: data.zone
111
- };
112
- };
113
- const unmarshalPlacementGroup = (data) => {
114
- if (!sdkClient.isJSONObject(data)) {
115
- throw new TypeError(
116
- `Unmarshalling the type 'PlacementGroup' failed as data isn't a dictionary.`
117
- );
118
- }
119
- return {
120
- id: data.id,
121
- name: data.name,
122
- organization: data.organization,
123
- policyMode: data.policy_mode,
124
- policyRespected: data.policy_respected,
125
- policyType: data.policy_type,
126
- project: data.project,
127
- tags: data.tags,
128
- zone: data.zone
129
- };
130
- };
131
- const unmarshalSecurityGroupSummary = (data) => {
132
- if (!sdkClient.isJSONObject(data)) {
133
- throw new TypeError(
134
- `Unmarshalling the type 'SecurityGroupSummary' failed as data isn't a dictionary.`
135
- );
136
- }
137
- return {
138
- id: data.id,
139
- name: data.name
140
- };
141
- };
142
- const unmarshalServerFilesystem = (data) => {
143
- if (!sdkClient.isJSONObject(data)) {
144
- throw new TypeError(
145
- `Unmarshalling the type 'ServerFilesystem' failed as data isn't a dictionary.`
146
- );
147
- }
148
- return {
149
- filesystemId: data.filesystem_id,
150
- state: data.state
151
- };
152
- };
153
- const unmarshalServerIp = (data) => {
154
- if (!sdkClient.isJSONObject(data)) {
155
- throw new TypeError(
156
- `Unmarshalling the type 'ServerIp' failed as data isn't a dictionary.`
157
- );
158
- }
159
- return {
160
- address: data.address,
161
- dynamic: data.dynamic,
162
- family: data.family,
163
- gateway: data.gateway,
164
- id: data.id,
165
- ipamId: data.ipam_id,
166
- netmask: data.netmask,
167
- provisioningMode: data.provisioning_mode,
168
- state: data.state,
169
- tags: data.tags
170
- };
171
- };
172
- const unmarshalServerIpv6 = (data) => {
173
- if (!sdkClient.isJSONObject(data)) {
174
- throw new TypeError(
175
- `Unmarshalling the type 'ServerIpv6' failed as data isn't a dictionary.`
176
- );
177
- }
178
- return {
179
- address: data.address,
180
- gateway: data.gateway,
181
- netmask: data.netmask
182
- };
183
- };
184
- const unmarshalServerLocation = (data) => {
185
- if (!sdkClient.isJSONObject(data)) {
186
- throw new TypeError(
187
- `Unmarshalling the type 'ServerLocation' failed as data isn't a dictionary.`
188
- );
189
- }
190
- return {
191
- clusterId: data.cluster_id,
192
- hypervisorId: data.hypervisor_id,
193
- nodeId: data.node_id,
194
- platformId: data.platform_id,
195
- zoneId: data.zone_id
196
- };
197
- };
198
- const unmarshalServerMaintenance = (data) => {
199
- if (!sdkClient.isJSONObject(data)) {
200
- throw new TypeError(
201
- `Unmarshalling the type 'ServerMaintenance' failed as data isn't a dictionary.`
202
- );
203
- }
204
- return {
205
- reason: data.reason,
206
- startDate: sdkClient.unmarshalDate(data.start_date)
207
- };
208
- };
209
- const unmarshalVolumeServer = (data) => {
210
- if (!sdkClient.isJSONObject(data)) {
211
- throw new TypeError(
212
- `Unmarshalling the type 'VolumeServer' failed as data isn't a dictionary.`
213
- );
214
- }
215
- return {
216
- boot: data.boot,
217
- creationDate: sdkClient.unmarshalDate(data.creation_date),
218
- exportUri: data.export_uri,
219
- id: data.id,
220
- modificationDate: sdkClient.unmarshalDate(data.modification_date),
221
- name: data.name,
222
- organization: data.organization,
223
- project: data.project,
224
- server: data.server ? unmarshalServerSummary(data.server) : void 0,
225
- size: data.size,
226
- state: data.state ? data.state : void 0,
227
- volumeType: data.volume_type,
228
- zone: data.zone
229
- };
230
- };
231
- const unmarshalServer = (data) => {
232
- if (!sdkClient.isJSONObject(data)) {
233
- throw new TypeError(
234
- `Unmarshalling the type 'Server' failed as data isn't a dictionary.`
235
- );
236
- }
237
- return {
238
- adminPasswordEncryptedValue: data.admin_password_encrypted_value,
239
- adminPasswordEncryptionSshKeyId: data.admin_password_encryption_ssh_key_id,
240
- allowedActions: data.allowed_actions,
241
- arch: data.arch,
242
- bootType: data.boot_type,
243
- commercialType: data.commercial_type,
244
- creationDate: sdkClient.unmarshalDate(data.creation_date),
245
- dynamicIpRequired: data.dynamic_ip_required,
246
- enableIpv6: data.enable_ipv6,
247
- endOfService: data.end_of_service,
248
- filesystems: sdkClient.unmarshalArrayOfObject(
249
- data.filesystems,
250
- unmarshalServerFilesystem
251
- ),
252
- hostname: data.hostname,
253
- id: data.id,
254
- image: data.image ? unmarshalImage(data.image) : void 0,
255
- ipv6: data.ipv6 ? unmarshalServerIpv6(data.ipv6) : void 0,
256
- location: data.location ? unmarshalServerLocation(data.location) : void 0,
257
- macAddress: data.mac_address,
258
- maintenances: sdkClient.unmarshalArrayOfObject(
259
- data.maintenances,
260
- unmarshalServerMaintenance
261
- ),
262
- modificationDate: sdkClient.unmarshalDate(data.modification_date),
263
- name: data.name,
264
- organization: data.organization,
265
- placementGroup: data.placement_group ? unmarshalPlacementGroup(data.placement_group) : void 0,
266
- privateIp: data.private_ip,
267
- privateNics: sdkClient.unmarshalArrayOfObject(data.private_nics, unmarshalPrivateNIC),
268
- project: data.project,
269
- protected: data.protected,
270
- publicIp: data.public_ip ? unmarshalServerIp(data.public_ip) : void 0,
271
- publicIps: sdkClient.unmarshalArrayOfObject(data.public_ips, unmarshalServerIp),
272
- routedIpEnabled: data.routed_ip_enabled,
273
- securityGroup: data.security_group ? unmarshalSecurityGroupSummary(data.security_group) : void 0,
274
- state: data.state,
275
- stateDetail: data.state_detail,
276
- tags: data.tags,
277
- volumes: sdkClient.unmarshalMapOfObject(data.volumes, unmarshalVolumeServer),
278
- zone: data.zone
279
- };
280
- };
281
- const unmarshalAttachServerFileSystemResponse = (data) => {
282
- if (!sdkClient.isJSONObject(data)) {
283
- throw new TypeError(
284
- `Unmarshalling the type 'AttachServerFileSystemResponse' failed as data isn't a dictionary.`
285
- );
286
- }
287
- return {
288
- server: data.server ? unmarshalServer(data.server) : void 0
289
- };
290
- };
291
- const unmarshalAttachServerVolumeResponse = (data) => {
292
- if (!sdkClient.isJSONObject(data)) {
293
- throw new TypeError(
294
- `Unmarshalling the type 'AttachServerVolumeResponse' failed as data isn't a dictionary.`
295
- );
296
- }
297
- return {
298
- server: data.server ? unmarshalServer(data.server) : void 0
299
- };
300
- };
301
- const unmarshalCreateImageResponse = (data) => {
302
- if (!sdkClient.isJSONObject(data)) {
303
- throw new TypeError(
304
- `Unmarshalling the type 'CreateImageResponse' failed as data isn't a dictionary.`
305
- );
306
- }
307
- return {
308
- image: data.image ? unmarshalImage(data.image) : void 0
309
- };
310
- };
311
- const unmarshalIp = (data) => {
312
- if (!sdkClient.isJSONObject(data)) {
313
- throw new TypeError(
314
- `Unmarshalling the type 'Ip' failed as data isn't a dictionary.`
315
- );
316
- }
317
- return {
318
- address: data.address,
319
- id: data.id,
320
- ipamId: data.ipam_id,
321
- organization: data.organization,
322
- prefix: data.prefix,
323
- project: data.project,
324
- reverse: data.reverse,
325
- server: data.server ? unmarshalServerSummary(data.server) : void 0,
326
- state: data.state,
327
- tags: data.tags,
328
- type: data.type,
329
- zone: data.zone
330
- };
331
- };
332
- const unmarshalCreateIpResponse = (data) => {
333
- if (!sdkClient.isJSONObject(data)) {
334
- throw new TypeError(
335
- `Unmarshalling the type 'CreateIpResponse' failed as data isn't a dictionary.`
336
- );
337
- }
338
- return {
339
- ip: data.ip ? unmarshalIp(data.ip) : void 0
340
- };
341
- };
342
- const unmarshalCreatePlacementGroupResponse = (data) => {
343
- if (!sdkClient.isJSONObject(data)) {
344
- throw new TypeError(
345
- `Unmarshalling the type 'CreatePlacementGroupResponse' failed as data isn't a dictionary.`
346
- );
347
- }
348
- return {
349
- placementGroup: data.placement_group ? unmarshalPlacementGroup(data.placement_group) : void 0
350
- };
351
- };
352
- const unmarshalCreatePrivateNICResponse = (data) => {
353
- if (!sdkClient.isJSONObject(data)) {
354
- throw new TypeError(
355
- `Unmarshalling the type 'CreatePrivateNICResponse' failed as data isn't a dictionary.`
356
- );
357
- }
358
- return {
359
- privateNic: data.private_nic ? unmarshalPrivateNIC(data.private_nic) : void 0
360
- };
361
- };
362
- const unmarshalSecurityGroup = (data) => {
363
- if (!sdkClient.isJSONObject(data)) {
364
- throw new TypeError(
365
- `Unmarshalling the type 'SecurityGroup' failed as data isn't a dictionary.`
366
- );
367
- }
368
- return {
369
- creationDate: sdkClient.unmarshalDate(data.creation_date),
370
- description: data.description,
371
- enableDefaultSecurity: data.enable_default_security,
372
- id: data.id,
373
- inboundDefaultPolicy: data.inbound_default_policy,
374
- modificationDate: sdkClient.unmarshalDate(data.modification_date),
375
- name: data.name,
376
- organization: data.organization,
377
- organizationDefault: data.organization_default,
378
- outboundDefaultPolicy: data.outbound_default_policy,
379
- project: data.project,
380
- projectDefault: data.project_default,
381
- servers: sdkClient.unmarshalArrayOfObject(data.servers, unmarshalServerSummary),
382
- state: data.state,
383
- stateful: data.stateful,
384
- tags: data.tags,
385
- zone: data.zone
386
- };
387
- };
388
- const unmarshalCreateSecurityGroupResponse = (data) => {
389
- if (!sdkClient.isJSONObject(data)) {
390
- throw new TypeError(
391
- `Unmarshalling the type 'CreateSecurityGroupResponse' failed as data isn't a dictionary.`
392
- );
393
- }
394
- return {
395
- securityGroup: data.security_group ? unmarshalSecurityGroup(data.security_group) : void 0
396
- };
397
- };
398
- const unmarshalSecurityGroupRule = (data) => {
399
- if (!sdkClient.isJSONObject(data)) {
400
- throw new TypeError(
401
- `Unmarshalling the type 'SecurityGroupRule' failed as data isn't a dictionary.`
402
- );
403
- }
404
- return {
405
- action: data.action,
406
- destPortFrom: data.dest_port_from,
407
- destPortTo: data.dest_port_to,
408
- direction: data.direction,
409
- editable: data.editable,
410
- id: data.id,
411
- ipRange: data.ip_range,
412
- position: data.position,
413
- protocol: data.protocol,
414
- zone: data.zone
415
- };
416
- };
417
- const unmarshalCreateSecurityGroupRuleResponse = (data) => {
418
- if (!sdkClient.isJSONObject(data)) {
419
- throw new TypeError(
420
- `Unmarshalling the type 'CreateSecurityGroupRuleResponse' failed as data isn't a dictionary.`
421
- );
422
- }
423
- return {
424
- rule: data.rule ? unmarshalSecurityGroupRule(data.rule) : void 0
425
- };
426
- };
427
- const unmarshalCreateServerResponse = (data) => {
428
- if (!sdkClient.isJSONObject(data)) {
429
- throw new TypeError(
430
- `Unmarshalling the type 'CreateServerResponse' failed as data isn't a dictionary.`
431
- );
432
- }
433
- return {
434
- server: data.server ? unmarshalServer(data.server) : void 0
435
- };
436
- };
437
- const unmarshalSnapshotBaseVolume = (data) => {
438
- if (!sdkClient.isJSONObject(data)) {
439
- throw new TypeError(
440
- `Unmarshalling the type 'SnapshotBaseVolume' failed as data isn't a dictionary.`
441
- );
442
- }
443
- return {
444
- id: data.id,
445
- name: data.name
446
- };
447
- };
448
- const unmarshalSnapshot = (data) => {
449
- if (!sdkClient.isJSONObject(data)) {
450
- throw new TypeError(
451
- `Unmarshalling the type 'Snapshot' failed as data isn't a dictionary.`
452
- );
453
- }
454
- return {
455
- baseVolume: data.base_volume ? unmarshalSnapshotBaseVolume(data.base_volume) : void 0,
456
- creationDate: sdkClient.unmarshalDate(data.creation_date),
457
- errorReason: data.error_reason,
458
- id: data.id,
459
- modificationDate: sdkClient.unmarshalDate(data.modification_date),
460
- name: data.name,
461
- organization: data.organization,
462
- project: data.project,
463
- size: data.size,
464
- state: data.state,
465
- tags: data.tags,
466
- volumeType: data.volume_type,
467
- zone: data.zone
468
- };
469
- };
470
- const unmarshalTask = (data) => {
471
- if (!sdkClient.isJSONObject(data)) {
472
- throw new TypeError(
473
- `Unmarshalling the type 'Task' failed as data isn't a dictionary.`
474
- );
475
- }
476
- return {
477
- description: data.description,
478
- hrefFrom: data.href_from,
479
- hrefResult: data.href_result,
480
- id: data.id,
481
- progress: data.progress,
482
- startedAt: sdkClient.unmarshalDate(data.started_at),
483
- status: data.status,
484
- terminatedAt: sdkClient.unmarshalDate(data.terminated_at),
485
- zone: data.zone
486
- };
487
- };
488
- const unmarshalCreateSnapshotResponse = (data) => {
489
- if (!sdkClient.isJSONObject(data)) {
490
- throw new TypeError(
491
- `Unmarshalling the type 'CreateSnapshotResponse' failed as data isn't a dictionary.`
492
- );
493
- }
494
- return {
495
- snapshot: data.snapshot ? unmarshalSnapshot(data.snapshot) : void 0,
496
- task: data.task ? unmarshalTask(data.task) : void 0
497
- };
498
- };
499
- const unmarshalCreateVolumeResponse = (data) => {
500
- if (!sdkClient.isJSONObject(data)) {
501
- throw new TypeError(
502
- `Unmarshalling the type 'CreateVolumeResponse' failed as data isn't a dictionary.`
503
- );
504
- }
505
- return {
506
- volume: data.volume ? unmarshalVolume(data.volume) : void 0
507
- };
508
- };
509
- const unmarshalDetachServerFileSystemResponse = (data) => {
510
- if (!sdkClient.isJSONObject(data)) {
511
- throw new TypeError(
512
- `Unmarshalling the type 'DetachServerFileSystemResponse' failed as data isn't a dictionary.`
513
- );
514
- }
515
- return {
516
- server: data.server ? unmarshalServer(data.server) : void 0
517
- };
518
- };
519
- const unmarshalDetachServerVolumeResponse = (data) => {
520
- if (!sdkClient.isJSONObject(data)) {
521
- throw new TypeError(
522
- `Unmarshalling the type 'DetachServerVolumeResponse' failed as data isn't a dictionary.`
523
- );
524
- }
525
- return {
526
- server: data.server ? unmarshalServer(data.server) : void 0
527
- };
528
- };
529
- const unmarshalExportSnapshotResponse = (data) => {
530
- if (!sdkClient.isJSONObject(data)) {
531
- throw new TypeError(
532
- `Unmarshalling the type 'ExportSnapshotResponse' failed as data isn't a dictionary.`
533
- );
534
- }
535
- return {
536
- task: data.task ? unmarshalTask(data.task) : void 0
537
- };
538
- };
539
- const unmarshalDashboard = (data) => {
540
- if (!sdkClient.isJSONObject(data)) {
541
- throw new TypeError(
542
- `Unmarshalling the type 'Dashboard' failed as data isn't a dictionary.`
543
- );
544
- }
545
- return {
546
- imagesCount: data.images_count,
547
- ipsCount: data.ips_count,
548
- ipsUnused: data.ips_unused,
549
- placementGroupsCount: data.placement_groups_count,
550
- privateNicsCount: data.private_nics_count,
551
- runningServersCount: data.running_servers_count,
552
- securityGroupsCount: data.security_groups_count,
553
- serversByTypes: data.servers_by_types,
554
- serversCount: data.servers_count,
555
- snapshotsCount: data.snapshots_count,
556
- volumesBSsdCount: data.volumes_b_ssd_count,
557
- volumesBSsdTotalSize: data.volumes_b_ssd_total_size,
558
- volumesCount: data.volumes_count,
559
- volumesLSsdCount: data.volumes_l_ssd_count,
560
- volumesLSsdTotalSize: data.volumes_l_ssd_total_size
561
- };
562
- };
563
- const unmarshalGetDashboardResponse = (data) => {
564
- if (!sdkClient.isJSONObject(data)) {
565
- throw new TypeError(
566
- `Unmarshalling the type 'GetDashboardResponse' failed as data isn't a dictionary.`
567
- );
568
- }
569
- return {
570
- dashboard: data.dashboard ? unmarshalDashboard(data.dashboard) : void 0
571
- };
572
- };
573
- const unmarshalGetImageResponse = (data) => {
574
- if (!sdkClient.isJSONObject(data)) {
575
- throw new TypeError(
576
- `Unmarshalling the type 'GetImageResponse' failed as data isn't a dictionary.`
577
- );
578
- }
579
- return {
580
- image: data.image ? unmarshalImage(data.image) : void 0
581
- };
582
- };
583
- const unmarshalGetIpResponse = (data) => {
584
- if (!sdkClient.isJSONObject(data)) {
585
- throw new TypeError(
586
- `Unmarshalling the type 'GetIpResponse' failed as data isn't a dictionary.`
587
- );
588
- }
589
- return {
590
- ip: data.ip ? unmarshalIp(data.ip) : void 0
591
- };
592
- };
593
- const unmarshalGetPlacementGroupResponse = (data) => {
594
- if (!sdkClient.isJSONObject(data)) {
595
- throw new TypeError(
596
- `Unmarshalling the type 'GetPlacementGroupResponse' failed as data isn't a dictionary.`
597
- );
598
- }
599
- return {
600
- placementGroup: data.placement_group ? unmarshalPlacementGroup(data.placement_group) : void 0
601
- };
602
- };
603
- const unmarshalPlacementGroupServer = (data) => {
604
- if (!sdkClient.isJSONObject(data)) {
605
- throw new TypeError(
606
- `Unmarshalling the type 'PlacementGroupServer' failed as data isn't a dictionary.`
607
- );
608
- }
609
- return {
610
- id: data.id,
611
- name: data.name,
612
- policyRespected: data.policy_respected
613
- };
614
- };
615
- const unmarshalGetPlacementGroupServersResponse = (data) => {
616
- if (!sdkClient.isJSONObject(data)) {
617
- throw new TypeError(
618
- `Unmarshalling the type 'GetPlacementGroupServersResponse' failed as data isn't a dictionary.`
619
- );
620
- }
621
- return {
622
- servers: sdkClient.unmarshalArrayOfObject(
623
- data.servers,
624
- unmarshalPlacementGroupServer
625
- )
626
- };
627
- };
628
- const unmarshalGetPrivateNICResponse = (data) => {
629
- if (!sdkClient.isJSONObject(data)) {
630
- throw new TypeError(
631
- `Unmarshalling the type 'GetPrivateNICResponse' failed as data isn't a dictionary.`
632
- );
633
- }
634
- return {
635
- privateNic: data.private_nic ? unmarshalPrivateNIC(data.private_nic) : void 0
636
- };
637
- };
638
- const unmarshalGetSecurityGroupResponse = (data) => {
639
- if (!sdkClient.isJSONObject(data)) {
640
- throw new TypeError(
641
- `Unmarshalling the type 'GetSecurityGroupResponse' failed as data isn't a dictionary.`
642
- );
643
- }
644
- return {
645
- securityGroup: data.security_group ? unmarshalSecurityGroup(data.security_group) : void 0
646
- };
647
- };
648
- const unmarshalGetSecurityGroupRuleResponse = (data) => {
649
- if (!sdkClient.isJSONObject(data)) {
650
- throw new TypeError(
651
- `Unmarshalling the type 'GetSecurityGroupRuleResponse' failed as data isn't a dictionary.`
652
- );
653
- }
654
- return {
655
- rule: data.rule ? unmarshalSecurityGroupRule(data.rule) : void 0
656
- };
657
- };
658
- const unmarshalGetServerResponse = (data) => {
659
- if (!sdkClient.isJSONObject(data)) {
660
- throw new TypeError(
661
- `Unmarshalling the type 'GetServerResponse' failed as data isn't a dictionary.`
662
- );
663
- }
664
- return {
665
- server: data.server ? unmarshalServer(data.server) : void 0
666
- };
667
- };
668
- const unmarshalGetServerTypesAvailabilityResponseAvailability = (data) => {
669
- if (!sdkClient.isJSONObject(data)) {
670
- throw new TypeError(
671
- `Unmarshalling the type 'GetServerTypesAvailabilityResponseAvailability' failed as data isn't a dictionary.`
672
- );
673
- }
674
- return {
675
- availability: data.availability
676
- };
677
- };
678
- const unmarshalGetServerTypesAvailabilityResponse = (data) => {
679
- if (!sdkClient.isJSONObject(data)) {
680
- throw new TypeError(
681
- `Unmarshalling the type 'GetServerTypesAvailabilityResponse' failed as data isn't a dictionary.`
682
- );
683
- }
684
- return {
685
- servers: sdkClient.unmarshalMapOfObject(
686
- data.servers,
687
- unmarshalGetServerTypesAvailabilityResponseAvailability
688
- ),
689
- totalCount: data.total_count
690
- };
691
- };
692
- const unmarshalGetSnapshotResponse = (data) => {
693
- if (!sdkClient.isJSONObject(data)) {
694
- throw new TypeError(
695
- `Unmarshalling the type 'GetSnapshotResponse' failed as data isn't a dictionary.`
696
- );
697
- }
698
- return {
699
- snapshot: data.snapshot ? unmarshalSnapshot(data.snapshot) : void 0
700
- };
701
- };
702
- const unmarshalGetVolumeResponse = (data) => {
703
- if (!sdkClient.isJSONObject(data)) {
704
- throw new TypeError(
705
- `Unmarshalling the type 'GetVolumeResponse' failed as data isn't a dictionary.`
706
- );
707
- }
708
- return {
709
- volume: data.volume ? unmarshalVolume(data.volume) : void 0
710
- };
711
- };
712
- const unmarshalListImagesResponse = (data) => {
713
- if (!sdkClient.isJSONObject(data)) {
714
- throw new TypeError(
715
- `Unmarshalling the type 'ListImagesResponse' failed as data isn't a dictionary.`
716
- );
717
- }
718
- return {
719
- images: sdkClient.unmarshalArrayOfObject(data.images, unmarshalImage),
720
- totalCount: data.total_count
721
- };
722
- };
723
- const unmarshalListIpsResponse = (data) => {
724
- if (!sdkClient.isJSONObject(data)) {
725
- throw new TypeError(
726
- `Unmarshalling the type 'ListIpsResponse' failed as data isn't a dictionary.`
727
- );
728
- }
729
- return {
730
- ips: sdkClient.unmarshalArrayOfObject(data.ips, unmarshalIp),
731
- totalCount: data.total_count
732
- };
733
- };
734
- const unmarshalListPlacementGroupsResponse = (data) => {
735
- if (!sdkClient.isJSONObject(data)) {
736
- throw new TypeError(
737
- `Unmarshalling the type 'ListPlacementGroupsResponse' failed as data isn't a dictionary.`
738
- );
739
- }
740
- return {
741
- placementGroups: sdkClient.unmarshalArrayOfObject(
742
- data.placement_groups,
743
- unmarshalPlacementGroup
744
- ),
745
- totalCount: data.total_count
746
- };
747
- };
748
- const unmarshalListPrivateNICsResponse = (data) => {
749
- if (!sdkClient.isJSONObject(data)) {
750
- throw new TypeError(
751
- `Unmarshalling the type 'ListPrivateNICsResponse' failed as data isn't a dictionary.`
752
- );
753
- }
754
- return {
755
- privateNics: sdkClient.unmarshalArrayOfObject(data.private_nics, unmarshalPrivateNIC),
756
- totalCount: data.total_count
757
- };
758
- };
759
- const unmarshalListSecurityGroupRulesResponse = (data) => {
760
- if (!sdkClient.isJSONObject(data)) {
761
- throw new TypeError(
762
- `Unmarshalling the type 'ListSecurityGroupRulesResponse' failed as data isn't a dictionary.`
763
- );
764
- }
765
- return {
766
- rules: sdkClient.unmarshalArrayOfObject(data.rules, unmarshalSecurityGroupRule),
767
- totalCount: data.total_count
768
- };
769
- };
770
- const unmarshalListSecurityGroupsResponse = (data) => {
771
- if (!sdkClient.isJSONObject(data)) {
772
- throw new TypeError(
773
- `Unmarshalling the type 'ListSecurityGroupsResponse' failed as data isn't a dictionary.`
774
- );
775
- }
776
- return {
777
- securityGroups: sdkClient.unmarshalArrayOfObject(
778
- data.security_groups,
779
- unmarshalSecurityGroup
780
- ),
781
- totalCount: data.total_count
782
- };
783
- };
784
- const unmarshalListServerActionsResponse = (data) => {
785
- if (!sdkClient.isJSONObject(data)) {
786
- throw new TypeError(
787
- `Unmarshalling the type 'ListServerActionsResponse' failed as data isn't a dictionary.`
788
- );
789
- }
790
- return {
791
- actions: data.actions
792
- };
793
- };
794
- const unmarshalListServerUserDataResponse = (data) => {
795
- if (!sdkClient.isJSONObject(data)) {
796
- throw new TypeError(
797
- `Unmarshalling the type 'ListServerUserDataResponse' failed as data isn't a dictionary.`
798
- );
799
- }
800
- return {
801
- userData: data.user_data
802
- };
803
- };
804
- const unmarshalListServersResponse = (data) => {
805
- if (!sdkClient.isJSONObject(data)) {
806
- throw new TypeError(
807
- `Unmarshalling the type 'ListServersResponse' failed as data isn't a dictionary.`
808
- );
809
- }
810
- return {
811
- servers: sdkClient.unmarshalArrayOfObject(data.servers, unmarshalServer),
812
- totalCount: data.total_count
813
- };
814
- };
815
- const unmarshalServerTypeNetworkInterface = (data) => {
816
- if (!sdkClient.isJSONObject(data)) {
817
- throw new TypeError(
818
- `Unmarshalling the type 'ServerTypeNetworkInterface' failed as data isn't a dictionary.`
819
- );
820
- }
821
- return {
822
- internalBandwidth: data.internal_bandwidth,
823
- internetBandwidth: data.internet_bandwidth
824
- };
825
- };
826
- const unmarshalServerTypeVolumeConstraintSizes = (data) => {
827
- if (!sdkClient.isJSONObject(data)) {
828
- throw new TypeError(
829
- `Unmarshalling the type 'ServerTypeVolumeConstraintSizes' failed as data isn't a dictionary.`
830
- );
831
- }
832
- return {
833
- maxSize: data.max_size,
834
- minSize: data.min_size
835
- };
836
- };
837
- const unmarshalServerTypeCapabilities = (data) => {
838
- if (!sdkClient.isJSONObject(data)) {
839
- throw new TypeError(
840
- `Unmarshalling the type 'ServerTypeCapabilities' failed as data isn't a dictionary.`
841
- );
842
- }
843
- return {
844
- blockStorage: data.block_storage,
845
- bootTypes: data.boot_types,
846
- maxFileSystems: data.max_file_systems
847
- };
848
- };
849
- const unmarshalServerTypeGPUInfo = (data) => {
850
- if (!sdkClient.isJSONObject(data)) {
851
- throw new TypeError(
852
- `Unmarshalling the type 'ServerTypeGPUInfo' failed as data isn't a dictionary.`
853
- );
854
- }
855
- return {
856
- gpuManufacturer: data.gpu_manufacturer,
857
- gpuMemory: data.gpu_memory,
858
- gpuName: data.gpu_name
859
- };
860
- };
861
- const unmarshalServerTypeNetwork = (data) => {
862
- if (!sdkClient.isJSONObject(data)) {
863
- throw new TypeError(
864
- `Unmarshalling the type 'ServerTypeNetwork' failed as data isn't a dictionary.`
865
- );
866
- }
867
- return {
868
- interfaces: sdkClient.unmarshalArrayOfObject(
869
- data.interfaces,
870
- unmarshalServerTypeNetworkInterface
871
- ),
872
- ipv6Support: data.ipv6_support,
873
- sumInternalBandwidth: data.sum_internal_bandwidth,
874
- sumInternetBandwidth: data.sum_internet_bandwidth
875
- };
876
- };
877
- const unmarshalServerTypeVolumeConstraintsByType = (data) => {
878
- if (!sdkClient.isJSONObject(data)) {
879
- throw new TypeError(
880
- `Unmarshalling the type 'ServerTypeVolumeConstraintsByType' failed as data isn't a dictionary.`
881
- );
882
- }
883
- return {
884
- lSsd: data.l_ssd ? unmarshalServerTypeVolumeConstraintSizes(data.l_ssd) : void 0
885
- };
886
- };
887
- const unmarshalServerType = (data) => {
888
- if (!sdkClient.isJSONObject(data)) {
889
- throw new TypeError(
890
- `Unmarshalling the type 'ServerType' failed as data isn't a dictionary.`
891
- );
892
- }
893
- return {
894
- altNames: data.alt_names,
895
- arch: data.arch,
896
- blockBandwidth: data.block_bandwidth,
897
- capabilities: data.capabilities ? unmarshalServerTypeCapabilities(data.capabilities) : void 0,
898
- endOfService: data.end_of_service,
899
- gpu: data.gpu,
900
- gpuInfo: data.gpu_info ? unmarshalServerTypeGPUInfo(data.gpu_info) : void 0,
901
- hourlyPrice: data.hourly_price,
902
- monthlyPrice: data.monthly_price,
903
- ncpus: data.ncpus,
904
- network: data.network ? unmarshalServerTypeNetwork(data.network) : void 0,
905
- perVolumeConstraint: data.per_volume_constraint ? unmarshalServerTypeVolumeConstraintsByType(data.per_volume_constraint) : void 0,
906
- ram: data.ram,
907
- scratchStorageMaxSize: data.scratch_storage_max_size,
908
- volumesConstraint: data.volumes_constraint ? unmarshalServerTypeVolumeConstraintSizes(data.volumes_constraint) : void 0
909
- };
910
- };
911
- const unmarshalListServersTypesResponse = (data) => {
912
- if (!sdkClient.isJSONObject(data)) {
913
- throw new TypeError(
914
- `Unmarshalling the type 'ListServersTypesResponse' failed as data isn't a dictionary.`
915
- );
916
- }
917
- return {
918
- servers: sdkClient.unmarshalMapOfObject(data.servers, unmarshalServerType),
919
- totalCount: data.total_count
920
- };
921
- };
922
- const unmarshalListSnapshotsResponse = (data) => {
923
- if (!sdkClient.isJSONObject(data)) {
924
- throw new TypeError(
925
- `Unmarshalling the type 'ListSnapshotsResponse' failed as data isn't a dictionary.`
926
- );
927
- }
928
- return {
929
- snapshots: sdkClient.unmarshalArrayOfObject(data.snapshots, unmarshalSnapshot),
930
- totalCount: data.total_count
931
- };
932
- };
933
- const unmarshalListVolumesResponse = (data) => {
934
- if (!sdkClient.isJSONObject(data)) {
935
- throw new TypeError(
936
- `Unmarshalling the type 'ListVolumesResponse' failed as data isn't a dictionary.`
937
- );
938
- }
939
- return {
940
- totalCount: data.total_count,
941
- volumes: sdkClient.unmarshalArrayOfObject(data.volumes, unmarshalVolume)
942
- };
943
- };
944
- const unmarshalVolumeTypeCapabilities = (data) => {
945
- if (!sdkClient.isJSONObject(data)) {
946
- throw new TypeError(
947
- `Unmarshalling the type 'VolumeTypeCapabilities' failed as data isn't a dictionary.`
948
- );
949
- }
950
- return {
951
- snapshot: data.snapshot
952
- };
953
- };
954
- const unmarshalVolumeTypeConstraints = (data) => {
955
- if (!sdkClient.isJSONObject(data)) {
956
- throw new TypeError(
957
- `Unmarshalling the type 'VolumeTypeConstraints' failed as data isn't a dictionary.`
958
- );
959
- }
960
- return {
961
- max: data.max,
962
- min: data.min
963
- };
964
- };
965
- const unmarshalVolumeType = (data) => {
966
- if (!sdkClient.isJSONObject(data)) {
967
- throw new TypeError(
968
- `Unmarshalling the type 'VolumeType' failed as data isn't a dictionary.`
969
- );
970
- }
971
- return {
972
- capabilities: data.capabilities ? unmarshalVolumeTypeCapabilities(data.capabilities) : void 0,
973
- constraints: data.constraints ? unmarshalVolumeTypeConstraints(data.constraints) : void 0,
974
- displayName: data.display_name
975
- };
976
- };
977
- const unmarshalListVolumesTypesResponse = (data) => {
978
- if (!sdkClient.isJSONObject(data)) {
979
- throw new TypeError(
980
- `Unmarshalling the type 'ListVolumesTypesResponse' failed as data isn't a dictionary.`
981
- );
982
- }
983
- return {
984
- totalCount: data.total_count,
985
- volumes: sdkClient.unmarshalMapOfObject(data.volumes, unmarshalVolumeType)
986
- };
987
- };
988
- const unmarshalMigrationPlan = (data) => {
989
- if (!sdkClient.isJSONObject(data)) {
990
- throw new TypeError(
991
- `Unmarshalling the type 'MigrationPlan' failed as data isn't a dictionary.`
992
- );
993
- }
994
- return {
995
- snapshots: sdkClient.unmarshalArrayOfObject(data.snapshots, unmarshalSnapshot),
996
- validationKey: data.validation_key,
997
- volume: data.volume ? unmarshalVolume(data.volume) : void 0
998
- };
999
- };
1000
- const unmarshalServerActionResponse = (data) => {
1001
- if (!sdkClient.isJSONObject(data)) {
1002
- throw new TypeError(
1003
- `Unmarshalling the type 'ServerActionResponse' failed as data isn't a dictionary.`
1004
- );
1005
- }
1006
- return {
1007
- task: data.task ? unmarshalTask(data.task) : void 0
1008
- };
1009
- };
1010
- const unmarshalServerCompatibleTypes = (data) => {
1011
- if (!sdkClient.isJSONObject(data)) {
1012
- throw new TypeError(
1013
- `Unmarshalling the type 'ServerCompatibleTypes' failed as data isn't a dictionary.`
1014
- );
1015
- }
1016
- return {
1017
- compatibleTypes: data.compatible_types
1018
- };
1019
- };
1020
- const unmarshalSetImageResponse = (data) => {
1021
- if (!sdkClient.isJSONObject(data)) {
1022
- throw new TypeError(
1023
- `Unmarshalling the type 'SetImageResponse' failed as data isn't a dictionary.`
1024
- );
1025
- }
1026
- return {
1027
- image: data.image ? unmarshalImage(data.image) : void 0
1028
- };
1029
- };
1030
- const unmarshalSetPlacementGroupResponse = (data) => {
1031
- if (!sdkClient.isJSONObject(data)) {
1032
- throw new TypeError(
1033
- `Unmarshalling the type 'SetPlacementGroupResponse' failed as data isn't a dictionary.`
1034
- );
1035
- }
1036
- return {
1037
- placementGroup: data.placement_group ? unmarshalPlacementGroup(data.placement_group) : void 0
1038
- };
1039
- };
1040
- const unmarshalSetPlacementGroupServersResponse = (data) => {
1041
- if (!sdkClient.isJSONObject(data)) {
1042
- throw new TypeError(
1043
- `Unmarshalling the type 'SetPlacementGroupServersResponse' failed as data isn't a dictionary.`
1044
- );
1045
- }
1046
- return {
1047
- servers: sdkClient.unmarshalArrayOfObject(
1048
- data.servers,
1049
- unmarshalPlacementGroupServer
1050
- )
1051
- };
1052
- };
1053
- const unmarshalSetSecurityGroupResponse = (data) => {
1054
- if (!sdkClient.isJSONObject(data)) {
1055
- throw new TypeError(
1056
- `Unmarshalling the type 'SetSecurityGroupResponse' failed as data isn't a dictionary.`
1057
- );
1058
- }
1059
- return {
1060
- securityGroup: data.security_group ? unmarshalSecurityGroup(data.security_group) : void 0
1061
- };
1062
- };
1063
- const unmarshalSetSecurityGroupRuleResponse = (data) => {
1064
- if (!sdkClient.isJSONObject(data)) {
1065
- throw new TypeError(
1066
- `Unmarshalling the type 'SetSecurityGroupRuleResponse' failed as data isn't a dictionary.`
1067
- );
1068
- }
1069
- return {
1070
- rule: data.rule ? unmarshalSecurityGroupRule(data.rule) : void 0
1071
- };
1072
- };
1073
- const unmarshalSetSecurityGroupRulesResponse = (data) => {
1074
- if (!sdkClient.isJSONObject(data)) {
1075
- throw new TypeError(
1076
- `Unmarshalling the type 'SetSecurityGroupRulesResponse' failed as data isn't a dictionary.`
1077
- );
1078
- }
1079
- return {
1080
- rules: sdkClient.unmarshalArrayOfObject(data.rules, unmarshalSecurityGroupRule)
1081
- };
1082
- };
1083
- const unmarshalSetServerResponse = (data) => {
1084
- if (!sdkClient.isJSONObject(data)) {
1085
- throw new TypeError(
1086
- `Unmarshalling the type 'SetServerResponse' failed as data isn't a dictionary.`
1087
- );
1088
- }
1089
- return {
1090
- server: data.server ? unmarshalServer(data.server) : void 0
1091
- };
1092
- };
1093
- const unmarshalSetSnapshotResponse = (data) => {
1094
- if (!sdkClient.isJSONObject(data)) {
1095
- throw new TypeError(
1096
- `Unmarshalling the type 'SetSnapshotResponse' failed as data isn't a dictionary.`
1097
- );
1098
- }
1099
- return {
1100
- snapshot: data.snapshot ? unmarshalSnapshot(data.snapshot) : void 0
1101
- };
1102
- };
1103
- const unmarshalUpdateImageResponse = (data) => {
1104
- if (!sdkClient.isJSONObject(data)) {
1105
- throw new TypeError(
1106
- `Unmarshalling the type 'UpdateImageResponse' failed as data isn't a dictionary.`
1107
- );
1108
- }
1109
- return {
1110
- image: data.image ? unmarshalImage(data.image) : void 0
1111
- };
1112
- };
1113
- const unmarshalUpdateIpResponse = (data) => {
1114
- if (!sdkClient.isJSONObject(data)) {
1115
- throw new TypeError(
1116
- `Unmarshalling the type 'UpdateIpResponse' failed as data isn't a dictionary.`
1117
- );
1118
- }
1119
- return {
1120
- ip: data.ip ? unmarshalIp(data.ip) : void 0
1121
- };
1122
- };
1123
- const unmarshalUpdatePlacementGroupResponse = (data) => {
1124
- if (!sdkClient.isJSONObject(data)) {
1125
- throw new TypeError(
1126
- `Unmarshalling the type 'UpdatePlacementGroupResponse' failed as data isn't a dictionary.`
1127
- );
1128
- }
1129
- return {
1130
- placementGroup: data.placement_group ? unmarshalPlacementGroup(data.placement_group) : void 0
1131
- };
1132
- };
1133
- const unmarshalUpdatePlacementGroupServersResponse = (data) => {
1134
- if (!sdkClient.isJSONObject(data)) {
1135
- throw new TypeError(
1136
- `Unmarshalling the type 'UpdatePlacementGroupServersResponse' failed as data isn't a dictionary.`
1137
- );
1138
- }
1139
- return {
1140
- servers: sdkClient.unmarshalArrayOfObject(
1141
- data.servers,
1142
- unmarshalPlacementGroupServer
1143
- )
1144
- };
1145
- };
1146
- const unmarshalUpdateSecurityGroupResponse = (data) => {
1147
- if (!sdkClient.isJSONObject(data)) {
1148
- throw new TypeError(
1149
- `Unmarshalling the type 'UpdateSecurityGroupResponse' failed as data isn't a dictionary.`
1150
- );
1151
- }
1152
- return {
1153
- securityGroup: data.security_group ? unmarshalSecurityGroup(data.security_group) : void 0
1154
- };
1155
- };
1156
- const unmarshalUpdateSecurityGroupRuleResponse = (data) => {
1157
- if (!sdkClient.isJSONObject(data)) {
1158
- throw new TypeError(
1159
- `Unmarshalling the type 'UpdateSecurityGroupRuleResponse' failed as data isn't a dictionary.`
1160
- );
1161
- }
1162
- return {
1163
- rule: data.rule ? unmarshalSecurityGroupRule(data.rule) : void 0
1164
- };
1165
- };
1166
- const unmarshalUpdateServerResponse = (data) => {
1167
- if (!sdkClient.isJSONObject(data)) {
1168
- throw new TypeError(
1169
- `Unmarshalling the type 'UpdateServerResponse' failed as data isn't a dictionary.`
1170
- );
1171
- }
1172
- return {
1173
- server: data.server ? unmarshalServer(data.server) : void 0
1174
- };
1175
- };
1176
- const unmarshalUpdateSnapshotResponse = (data) => {
1177
- if (!sdkClient.isJSONObject(data)) {
1178
- throw new TypeError(
1179
- `Unmarshalling the type 'UpdateSnapshotResponse' failed as data isn't a dictionary.`
1180
- );
1181
- }
1182
- return {
1183
- snapshot: data.snapshot ? unmarshalSnapshot(data.snapshot) : void 0
1184
- };
1185
- };
1186
- const unmarshalUpdateVolumeResponse = (data) => {
1187
- if (!sdkClient.isJSONObject(data)) {
1188
- throw new TypeError(
1189
- `Unmarshalling the type 'UpdateVolumeResponse' failed as data isn't a dictionary.`
1190
- );
1191
- }
1192
- return {
1193
- volume: data.volume ? unmarshalVolume(data.volume) : void 0
1194
- };
1195
- };
1196
- const marshalApplyBlockMigrationRequest = (request, defaults) => ({
1197
- validation_key: request.validationKey,
1198
- ...sdkClient.resolveOneOf([
1199
- { param: "volume_id", value: request.volumeId },
1200
- { param: "snapshot_id", value: request.snapshotId }
1201
- ])
1202
- });
1203
- const marshalAttachServerFileSystemRequest = (request, defaults) => ({
1204
- filesystem_id: request.filesystemId
1205
- });
1206
- const marshalAttachServerVolumeRequest = (request, defaults) => ({
1207
- boot: request.boot,
1208
- volume_id: request.volumeId,
1209
- volume_type: request.volumeType
1210
- });
1211
- const marshalCheckBlockMigrationOrganizationQuotasRequest = (request, defaults) => ({
1212
- organization: request.organization ?? defaults.defaultOrganizationId
1213
- });
1214
- const marshalVolumeTemplate = (request, defaults) => ({
1215
- id: request.id,
1216
- name: request.name,
1217
- size: request.size,
1218
- volume_type: request.volumeType,
1219
- ...sdkClient.resolveOneOf([
1220
- { param: "project", value: request.project },
1221
- { param: "organization", value: request.organization }
1222
- ])
1223
- });
1224
- const marshalCreateImageRequest = (request, defaults) => ({
1225
- arch: request.arch,
1226
- extra_volumes: request.extraVolumes !== void 0 ? Object.entries(request.extraVolumes).reduce(
1227
- (acc, [key, value]) => ({
1228
- ...acc,
1229
- [key]: marshalVolumeTemplate(value)
1230
- }),
1231
- {}
1232
- ) : void 0,
1233
- name: request.name || randomName("img"),
1234
- public: request.public,
1235
- root_volume: request.rootVolume,
1236
- tags: request.tags,
1237
- ...sdkClient.resolveOneOf([
1238
- {
1239
- default: defaults.defaultProjectId,
1240
- param: "project",
1241
- value: request.project
1242
- },
1243
- {
1244
- default: defaults.defaultOrganizationId,
1245
- param: "organization",
1246
- value: request.organization
1247
- }
1248
- ])
1249
- });
1250
- const marshalCreateIpRequest = (request, defaults) => ({
1251
- server: request.server,
1252
- tags: request.tags,
1253
- type: request.type,
1254
- ...sdkClient.resolveOneOf([
1255
- {
1256
- default: defaults.defaultProjectId,
1257
- param: "project",
1258
- value: request.project
1259
- },
1260
- {
1261
- default: defaults.defaultOrganizationId,
1262
- param: "organization",
1263
- value: request.organization
1264
- }
1265
- ])
1266
- });
1267
- const marshalCreatePlacementGroupRequest = (request, defaults) => ({
1268
- name: request.name || randomName("pg"),
1269
- policy_mode: request.policyMode,
1270
- policy_type: request.policyType,
1271
- tags: request.tags,
1272
- ...sdkClient.resolveOneOf([
1273
- {
1274
- default: defaults.defaultProjectId,
1275
- param: "project",
1276
- value: request.project
1277
- },
1278
- {
1279
- default: defaults.defaultOrganizationId,
1280
- param: "organization",
1281
- value: request.organization
1282
- }
1283
- ])
1284
- });
1285
- const marshalCreatePrivateNICRequest = (request, defaults) => ({
1286
- ip_ids: request.ipIds,
1287
- ipam_ip_ids: request.ipamIpIds,
1288
- private_network_id: request.privateNetworkId,
1289
- tags: request.tags
1290
- });
1291
- const marshalCreateSecurityGroupRequest = (request, defaults) => ({
1292
- description: request.description,
1293
- enable_default_security: request.enableDefaultSecurity,
1294
- inbound_default_policy: request.inboundDefaultPolicy,
1295
- name: request.name || randomName("sg"),
1296
- outbound_default_policy: request.outboundDefaultPolicy,
1297
- stateful: request.stateful,
1298
- tags: request.tags,
1299
- ...sdkClient.resolveOneOf([
1300
- {
1301
- default: defaults.defaultProjectId,
1302
- param: "project",
1303
- value: request.project
1304
- },
1305
- {
1306
- default: defaults.defaultOrganizationId,
1307
- param: "organization",
1308
- value: request.organization
1309
- }
1310
- ]),
1311
- ...sdkClient.resolveOneOf([
1312
- { param: "organization_default", value: request.organizationDefault },
1313
- { param: "project_default", value: request.projectDefault }
1314
- ])
1315
- });
1316
- const marshalCreateSecurityGroupRuleRequest = (request, defaults) => ({
1317
- action: request.action,
1318
- dest_port_from: request.destPortFrom,
1319
- dest_port_to: request.destPortTo,
1320
- direction: request.direction,
1321
- editable: request.editable,
1322
- ip_range: request.ipRange,
1323
- position: request.position,
1324
- protocol: request.protocol
1325
- });
1326
- const marshalVolumeServerTemplate = (request, defaults) => ({
1327
- base_snapshot: request.baseSnapshot,
1328
- boot: request.boot,
1329
- id: request.id,
1330
- name: request.name,
1331
- organization: request.organization,
1332
- project: request.project,
1333
- size: request.size,
1334
- volume_type: request.volumeType
1335
- });
1336
- const marshalCreateServerRequest = (request, defaults) => ({
1337
- admin_password_encryption_ssh_key_id: request.adminPasswordEncryptionSshKeyId,
1338
- boot_type: request.bootType,
1339
- commercial_type: request.commercialType,
1340
- dynamic_ip_required: request.dynamicIpRequired,
1341
- enable_ipv6: request.enableIpv6,
1342
- image: request.image,
1343
- name: request.name || randomName("srv"),
1344
- placement_group: request.placementGroup,
1345
- protected: request.protected,
1346
- public_ip: request.publicIp,
1347
- public_ips: request.publicIps,
1348
- routed_ip_enabled: request.routedIpEnabled,
1349
- security_group: request.securityGroup,
1350
- tags: request.tags,
1351
- volumes: request.volumes !== void 0 ? Object.entries(request.volumes).reduce(
1352
- (acc, [key, value]) => ({
1353
- ...acc,
1354
- [key]: marshalVolumeServerTemplate(value)
1355
- }),
1356
- {}
1357
- ) : void 0,
1358
- ...sdkClient.resolveOneOf([
1359
- {
1360
- default: defaults.defaultProjectId,
1361
- param: "project",
1362
- value: request.project
1363
- },
1364
- {
1365
- default: defaults.defaultOrganizationId,
1366
- param: "organization",
1367
- value: request.organization
1368
- }
1369
- ])
1370
- });
1371
- const marshalCreateSnapshotRequest = (request, defaults) => ({
1372
- bucket: request.bucket,
1373
- key: request.key,
1374
- name: request.name || randomName("snp"),
1375
- size: request.size,
1376
- tags: request.tags,
1377
- volume_id: request.volumeId,
1378
- volume_type: request.volumeType,
1379
- ...sdkClient.resolveOneOf([
1380
- {
1381
- default: defaults.defaultProjectId,
1382
- param: "project",
1383
- value: request.project
1384
- },
1385
- {
1386
- default: defaults.defaultOrganizationId,
1387
- param: "organization",
1388
- value: request.organization
1389
- }
1390
- ])
1391
- });
1392
- const marshalCreateVolumeRequest = (request, defaults) => ({
1393
- name: request.name || randomName("vol"),
1394
- tags: request.tags,
1395
- volume_type: request.volumeType,
1396
- ...sdkClient.resolveOneOf([
1397
- {
1398
- default: defaults.defaultProjectId,
1399
- param: "project",
1400
- value: request.project
1401
- },
1402
- {
1403
- default: defaults.defaultOrganizationId,
1404
- param: "organization",
1405
- value: request.organization
1406
- }
1407
- ]),
1408
- ...sdkClient.resolveOneOf([
1409
- { param: "size", value: request.size },
1410
- { param: "base_snapshot", value: request.baseSnapshot }
1411
- ])
1412
- });
1413
- const marshalDetachServerFileSystemRequest = (request, defaults) => ({
1414
- filesystem_id: request.filesystemId
1415
- });
1416
- const marshalDetachServerVolumeRequest = (request, defaults) => ({
1417
- volume_id: request.volumeId
1418
- });
1419
- const marshalExportSnapshotRequest = (request, defaults) => ({
1420
- bucket: request.bucket,
1421
- key: request.key
1422
- });
1423
- const marshalPlanBlockMigrationRequest = (request, defaults) => ({
1424
- ...sdkClient.resolveOneOf([
1425
- { param: "volume_id", value: request.volumeId },
1426
- { param: "snapshot_id", value: request.snapshotId }
1427
- ])
1428
- });
1429
- const marshalServerActionRequestVolumeBackupTemplate = (request, defaults) => ({
1430
- volume_type: request.volumeType
1431
- });
1432
- const marshalServerActionRequest = (request, defaults) => ({
1433
- action: request.action,
1434
- disable_ipv6: request.disableIpv6,
1435
- name: request.name,
1436
- volumes: request.volumes !== void 0 ? Object.entries(request.volumes).reduce(
1437
- (acc, [key, value]) => ({
1438
- ...acc,
1439
- [key]: marshalServerActionRequestVolumeBackupTemplate(
1440
- value
1441
- )
1442
- }),
1443
- {}
1444
- ) : void 0
1445
- });
1446
- const marshalServerSummary = (request, defaults) => ({
1447
- id: request.id,
1448
- name: request.name
1449
- });
1450
- const marshalBootscript = (request, defaults) => ({
1451
- architecture: request.architecture,
1452
- bootcmdargs: request.bootcmdargs,
1453
- default: request.default,
1454
- dtb: request.dtb,
1455
- id: request.id,
1456
- initrd: request.initrd,
1457
- kernel: request.kernel,
1458
- organization: request.organization,
1459
- project: request.project,
1460
- public: request.public,
1461
- title: request.title,
1462
- zone: request.zone
1463
- });
1464
- const marshalVolume = (request, defaults) => ({
1465
- creation_date: request.creationDate,
1466
- export_uri: request.exportUri,
1467
- id: request.id,
1468
- modification_date: request.modificationDate,
1469
- name: request.name,
1470
- organization: request.organization,
1471
- project: request.project,
1472
- server: request.server !== void 0 ? marshalServerSummary(request.server) : void 0,
1473
- size: request.size,
1474
- state: request.state,
1475
- tags: request.tags,
1476
- volume_type: request.volumeType,
1477
- zone: request.zone
1478
- });
1479
- const marshalVolumeSummary = (request, defaults) => ({
1480
- id: request.id,
1481
- name: request.name,
1482
- size: request.size,
1483
- volume_type: request.volumeType
1484
- });
1485
- const marshalSetImageRequest = (request, defaults) => ({
1486
- arch: request.arch,
1487
- creation_date: request.creationDate,
1488
- default_bootscript: request.defaultBootscript !== void 0 ? marshalBootscript(request.defaultBootscript) : void 0,
1489
- extra_volumes: request.extraVolumes !== void 0 ? Object.entries(request.extraVolumes).reduce(
1490
- (acc, [key, value]) => ({
1491
- ...acc,
1492
- [key]: marshalVolume(value)
1493
- }),
1494
- {}
1495
- ) : void 0,
1496
- from_server: request.fromServer,
1497
- modification_date: request.modificationDate,
1498
- name: request.name,
1499
- organization: request.organization ?? defaults.defaultOrganizationId,
1500
- project: request.project ?? defaults.defaultProjectId,
1501
- public: request.public,
1502
- root_volume: request.rootVolume !== void 0 ? marshalVolumeSummary(request.rootVolume) : void 0,
1503
- state: request.state,
1504
- tags: request.tags
1505
- });
1506
- const marshalSetPlacementGroupRequest = (request, defaults) => ({
1507
- name: request.name,
1508
- organization: request.organization ?? defaults.defaultOrganizationId,
1509
- policy_mode: request.policyMode,
1510
- policy_type: request.policyType,
1511
- project: request.project ?? defaults.defaultProjectId,
1512
- tags: request.tags
1513
- });
1514
- const marshalSetPlacementGroupServersRequest = (request, defaults) => ({
1515
- servers: request.servers
1516
- });
1517
- const marshalSetSecurityGroupRequest = (request, defaults) => ({
1518
- creation_date: request.creationDate,
1519
- description: request.description,
1520
- enable_default_security: request.enableDefaultSecurity,
1521
- inbound_default_policy: request.inboundDefaultPolicy,
1522
- modification_date: request.modificationDate,
1523
- name: request.name,
1524
- organization: request.organization ?? defaults.defaultOrganizationId,
1525
- organization_default: request.organizationDefault,
1526
- outbound_default_policy: request.outboundDefaultPolicy,
1527
- project: request.project ?? defaults.defaultProjectId,
1528
- project_default: request.projectDefault,
1529
- servers: request.servers !== void 0 ? request.servers.map((elt) => marshalServerSummary(elt)) : void 0,
1530
- stateful: request.stateful,
1531
- tags: request.tags
1532
- });
1533
- const marshalSetSecurityGroupRuleRequest = (request, defaults) => ({
1534
- action: request.action,
1535
- dest_port_from: request.destPortFrom,
1536
- dest_port_to: request.destPortTo,
1537
- direction: request.direction,
1538
- editable: request.editable,
1539
- id: request.id,
1540
- ip_range: request.ipRange,
1541
- position: request.position,
1542
- protocol: request.protocol
1543
- });
1544
- const marshalSetSecurityGroupRulesRequestRule = (request, defaults) => ({
1545
- action: request.action,
1546
- dest_port_from: request.destPortFrom,
1547
- dest_port_to: request.destPortTo,
1548
- direction: request.direction,
1549
- editable: request.editable,
1550
- id: request.id,
1551
- ip_range: request.ipRange,
1552
- position: request.position,
1553
- protocol: request.protocol,
1554
- zone: request.zone
1555
- });
1556
- const marshalSetSecurityGroupRulesRequest = (request, defaults) => ({
1557
- rules: request.rules !== void 0 ? request.rules.map(
1558
- (elt) => marshalSetSecurityGroupRulesRequestRule(elt)
1559
- ) : void 0
1560
- });
1561
- const marshalImage = (request, defaults) => ({
1562
- arch: request.arch,
1563
- creation_date: request.creationDate,
1564
- default_bootscript: request.defaultBootscript !== void 0 ? marshalBootscript(request.defaultBootscript) : void 0,
1565
- extra_volumes: Object.entries(request.extraVolumes).reduce(
1566
- (acc, [key, value]) => ({ ...acc, [key]: marshalVolume(value) }),
1567
- {}
1568
- ),
1569
- from_server: request.fromServer,
1570
- id: request.id,
1571
- modification_date: request.modificationDate,
1572
- name: request.name,
1573
- organization: request.organization,
1574
- project: request.project,
1575
- public: request.public,
1576
- root_volume: request.rootVolume !== void 0 ? marshalVolumeSummary(request.rootVolume) : void 0,
1577
- state: request.state,
1578
- tags: request.tags,
1579
- zone: request.zone
1580
- });
1581
- const marshalPlacementGroup = (request, defaults) => ({
1582
- id: request.id,
1583
- name: request.name,
1584
- organization: request.organization,
1585
- policy_mode: request.policyMode,
1586
- policy_respected: request.policyRespected,
1587
- policy_type: request.policyType,
1588
- project: request.project,
1589
- tags: request.tags,
1590
- zone: request.zone
1591
- });
1592
- const marshalPrivateNIC = (request, defaults) => ({
1593
- creation_date: request.creationDate,
1594
- id: request.id,
1595
- mac_address: request.macAddress,
1596
- private_network_id: request.privateNetworkId,
1597
- server_id: request.serverId,
1598
- state: request.state,
1599
- tags: request.tags,
1600
- zone: request.zone
1601
- });
1602
- const marshalSecurityGroupSummary = (request, defaults) => ({
1603
- id: request.id,
1604
- name: request.name
1605
- });
1606
- const marshalServerIp = (request, defaults) => ({
1607
- address: request.address,
1608
- dynamic: request.dynamic,
1609
- family: request.family,
1610
- gateway: request.gateway,
1611
- id: request.id,
1612
- ipam_id: request.ipamId,
1613
- netmask: request.netmask,
1614
- provisioning_mode: request.provisioningMode,
1615
- state: request.state,
1616
- tags: request.tags
1617
- });
1618
- const marshalServerIpv6 = (request, defaults) => ({
1619
- address: request.address,
1620
- gateway: request.gateway,
1621
- netmask: request.netmask
1622
- });
1623
- const marshalServerLocation = (request, defaults) => ({
1624
- cluster_id: request.clusterId,
1625
- hypervisor_id: request.hypervisorId,
1626
- node_id: request.nodeId,
1627
- platform_id: request.platformId,
1628
- zone_id: request.zoneId
1629
- });
1630
- const marshalServerMaintenance = (request, defaults) => ({
1631
- reason: request.reason,
1632
- start_date: request.startDate
1633
- });
1634
- const marshalSetServerRequest = (request, defaults) => ({
1635
- admin_password_encryption_ssh_key_id: request.adminPasswordEncryptionSshKeyId,
1636
- allowed_actions: request.allowedActions !== void 0 ? request.allowedActions : void 0,
1637
- arch: request.arch,
1638
- boot_type: request.bootType,
1639
- commercial_type: request.commercialType,
1640
- creation_date: request.creationDate,
1641
- dynamic_ip_required: request.dynamicIpRequired,
1642
- enable_ipv6: request.enableIpv6,
1643
- hostname: request.hostname,
1644
- image: request.image !== void 0 ? marshalImage(request.image) : void 0,
1645
- ipv6: request.ipv6 !== void 0 ? marshalServerIpv6(request.ipv6) : void 0,
1646
- location: request.location !== void 0 ? marshalServerLocation(request.location) : void 0,
1647
- maintenances: request.maintenances !== void 0 ? request.maintenances.map((elt) => marshalServerMaintenance(elt)) : void 0,
1648
- modification_date: request.modificationDate,
1649
- name: request.name,
1650
- organization: request.organization ?? defaults.defaultOrganizationId,
1651
- placement_group: request.placementGroup !== void 0 ? marshalPlacementGroup(request.placementGroup) : void 0,
1652
- private_ip: request.privateIp,
1653
- private_nics: request.privateNics !== void 0 ? request.privateNics.map((elt) => marshalPrivateNIC(elt)) : void 0,
1654
- project: request.project ?? defaults.defaultProjectId,
1655
- protected: request.protected,
1656
- public_ip: request.publicIp !== void 0 ? marshalServerIp(request.publicIp) : void 0,
1657
- public_ips: request.publicIps !== void 0 ? request.publicIps.map((elt) => marshalServerIp(elt)) : void 0,
1658
- routed_ip_enabled: request.routedIpEnabled,
1659
- security_group: request.securityGroup !== void 0 ? marshalSecurityGroupSummary(request.securityGroup) : void 0,
1660
- state: request.state,
1661
- state_detail: request.stateDetail,
1662
- tags: request.tags,
1663
- volumes: request.volumes !== void 0 ? Object.entries(request.volumes).reduce(
1664
- (acc, [key, value]) => ({
1665
- ...acc,
1666
- [key]: marshalVolume(value)
1667
- }),
1668
- {}
1669
- ) : void 0
1670
- });
1671
- const marshalSnapshotBaseVolume = (request, defaults) => ({
1672
- id: request.id,
1673
- name: request.name
1674
- });
1675
- const marshalSetSnapshotRequest = (request, defaults) => ({
1676
- base_volume: request.baseVolume !== void 0 ? marshalSnapshotBaseVolume(request.baseVolume) : void 0,
1677
- creation_date: request.creationDate,
1678
- id: request.id,
1679
- modification_date: request.modificationDate,
1680
- name: request.name,
1681
- organization: request.organization ?? defaults.defaultOrganizationId,
1682
- project: request.project ?? defaults.defaultProjectId,
1683
- size: request.size,
1684
- state: request.state,
1685
- tags: request.tags,
1686
- volume_type: request.volumeType
1687
- });
1688
- const marshalVolumeImageUpdateTemplate = (request, defaults) => ({
1689
- id: request.id
1690
- });
1691
- const marshalUpdateImageRequest = (request, defaults) => ({
1692
- arch: request.arch,
1693
- extra_volumes: request.extraVolumes !== void 0 ? Object.entries(request.extraVolumes).reduce(
1694
- (acc, [key, value]) => ({
1695
- ...acc,
1696
- [key]: marshalVolumeImageUpdateTemplate(value)
1697
- }),
1698
- {}
1699
- ) : void 0,
1700
- name: request.name,
1701
- public: request.public,
1702
- tags: request.tags
1703
- });
1704
- const marshalUpdateIpRequest = (request, defaults) => ({
1705
- reverse: request.reverse,
1706
- server: request.server,
1707
- tags: request.tags,
1708
- type: request.type
1709
- });
1710
- const marshalUpdatePlacementGroupRequest = (request, defaults) => ({
1711
- name: request.name,
1712
- policy_mode: request.policyMode,
1713
- policy_type: request.policyType,
1714
- tags: request.tags
1715
- });
1716
- const marshalUpdatePlacementGroupServersRequest = (request, defaults) => ({
1717
- servers: request.servers
1718
- });
1719
- const marshalUpdatePrivateNICRequest = (request, defaults) => ({
1720
- tags: request.tags
1721
- });
1722
- const marshalUpdateSecurityGroupRequest = (request, defaults) => ({
1723
- description: request.description,
1724
- enable_default_security: request.enableDefaultSecurity,
1725
- inbound_default_policy: request.inboundDefaultPolicy,
1726
- name: request.name,
1727
- organization_default: request.organizationDefault,
1728
- outbound_default_policy: request.outboundDefaultPolicy,
1729
- project_default: request.projectDefault,
1730
- stateful: request.stateful,
1731
- tags: request.tags
1732
- });
1733
- const marshalUpdateSecurityGroupRuleRequest = (request, defaults) => ({
1734
- action: request.action,
1735
- dest_port_from: request.destPortFrom,
1736
- dest_port_to: request.destPortTo,
1737
- direction: request.direction,
1738
- ip_range: request.ipRange,
1739
- position: request.position,
1740
- protocol: request.protocol
1741
- });
1742
- const marshalSecurityGroupTemplate = (request, defaults) => ({
1743
- id: request.id,
1744
- name: request.name
1745
- });
1746
- const marshalUpdateServerRequest = (request, defaults) => ({
1747
- admin_password_encryption_ssh_key_id: request.adminPasswordEncryptionSshKeyId,
1748
- boot_type: request.bootType,
1749
- commercial_type: request.commercialType,
1750
- dynamic_ip_required: request.dynamicIpRequired,
1751
- enable_ipv6: request.enableIpv6,
1752
- name: request.name,
1753
- placement_group: request.placementGroup,
1754
- private_nics: request.privateNics,
1755
- protected: request.protected,
1756
- public_ips: request.publicIps,
1757
- routed_ip_enabled: request.routedIpEnabled,
1758
- security_group: request.securityGroup !== void 0 ? marshalSecurityGroupTemplate(request.securityGroup) : void 0,
1759
- tags: request.tags,
1760
- volumes: request.volumes !== void 0 ? Object.entries(request.volumes).reduce(
1761
- (acc, [key, value]) => ({
1762
- ...acc,
1763
- [key]: marshalVolumeServerTemplate(value)
1764
- }),
1765
- {}
1766
- ) : void 0
1767
- });
1768
- const marshalUpdateSnapshotRequest = (request, defaults) => ({
1769
- name: request.name,
1770
- tags: request.tags
1771
- });
1772
- const marshalUpdateVolumeRequest = (request, defaults) => ({
1773
- name: request.name,
1774
- size: request.size,
1775
- tags: request.tags
1776
- });
1777
- exports.marshalApplyBlockMigrationRequest = marshalApplyBlockMigrationRequest;
1778
- exports.marshalAttachServerFileSystemRequest = marshalAttachServerFileSystemRequest;
1779
- exports.marshalAttachServerVolumeRequest = marshalAttachServerVolumeRequest;
1780
- exports.marshalCheckBlockMigrationOrganizationQuotasRequest = marshalCheckBlockMigrationOrganizationQuotasRequest;
1781
- exports.marshalCreateImageRequest = marshalCreateImageRequest;
1782
- exports.marshalCreateIpRequest = marshalCreateIpRequest;
1783
- exports.marshalCreatePlacementGroupRequest = marshalCreatePlacementGroupRequest;
1784
- exports.marshalCreatePrivateNICRequest = marshalCreatePrivateNICRequest;
1785
- exports.marshalCreateSecurityGroupRequest = marshalCreateSecurityGroupRequest;
1786
- exports.marshalCreateSecurityGroupRuleRequest = marshalCreateSecurityGroupRuleRequest;
1787
- exports.marshalCreateServerRequest = marshalCreateServerRequest;
1788
- exports.marshalCreateSnapshotRequest = marshalCreateSnapshotRequest;
1789
- exports.marshalCreateVolumeRequest = marshalCreateVolumeRequest;
1790
- exports.marshalDetachServerFileSystemRequest = marshalDetachServerFileSystemRequest;
1791
- exports.marshalDetachServerVolumeRequest = marshalDetachServerVolumeRequest;
1792
- exports.marshalExportSnapshotRequest = marshalExportSnapshotRequest;
1793
- exports.marshalPlanBlockMigrationRequest = marshalPlanBlockMigrationRequest;
1794
- exports.marshalServerActionRequest = marshalServerActionRequest;
1795
- exports.marshalSetImageRequest = marshalSetImageRequest;
1796
- exports.marshalSetPlacementGroupRequest = marshalSetPlacementGroupRequest;
1797
- exports.marshalSetPlacementGroupServersRequest = marshalSetPlacementGroupServersRequest;
1798
- exports.marshalSetSecurityGroupRequest = marshalSetSecurityGroupRequest;
1799
- exports.marshalSetSecurityGroupRuleRequest = marshalSetSecurityGroupRuleRequest;
1800
- exports.marshalSetSecurityGroupRulesRequest = marshalSetSecurityGroupRulesRequest;
1801
- exports.marshalSetServerRequest = marshalSetServerRequest;
1802
- exports.marshalSetSnapshotRequest = marshalSetSnapshotRequest;
1803
- exports.marshalUpdateImageRequest = marshalUpdateImageRequest;
1804
- exports.marshalUpdateIpRequest = marshalUpdateIpRequest;
1805
- exports.marshalUpdatePlacementGroupRequest = marshalUpdatePlacementGroupRequest;
1806
- exports.marshalUpdatePlacementGroupServersRequest = marshalUpdatePlacementGroupServersRequest;
1807
- exports.marshalUpdatePrivateNICRequest = marshalUpdatePrivateNICRequest;
1808
- exports.marshalUpdateSecurityGroupRequest = marshalUpdateSecurityGroupRequest;
1809
- exports.marshalUpdateSecurityGroupRuleRequest = marshalUpdateSecurityGroupRuleRequest;
1810
- exports.marshalUpdateServerRequest = marshalUpdateServerRequest;
1811
- exports.marshalUpdateSnapshotRequest = marshalUpdateSnapshotRequest;
1812
- exports.marshalUpdateVolumeRequest = marshalUpdateVolumeRequest;
1813
- exports.unmarshalAttachServerFileSystemResponse = unmarshalAttachServerFileSystemResponse;
1814
- exports.unmarshalAttachServerVolumeResponse = unmarshalAttachServerVolumeResponse;
1815
- exports.unmarshalCreateImageResponse = unmarshalCreateImageResponse;
1816
- exports.unmarshalCreateIpResponse = unmarshalCreateIpResponse;
1817
- exports.unmarshalCreatePlacementGroupResponse = unmarshalCreatePlacementGroupResponse;
1818
- exports.unmarshalCreatePrivateNICResponse = unmarshalCreatePrivateNICResponse;
1819
- exports.unmarshalCreateSecurityGroupResponse = unmarshalCreateSecurityGroupResponse;
1820
- exports.unmarshalCreateSecurityGroupRuleResponse = unmarshalCreateSecurityGroupRuleResponse;
1821
- exports.unmarshalCreateServerResponse = unmarshalCreateServerResponse;
1822
- exports.unmarshalCreateSnapshotResponse = unmarshalCreateSnapshotResponse;
1823
- exports.unmarshalCreateVolumeResponse = unmarshalCreateVolumeResponse;
1824
- exports.unmarshalDetachServerFileSystemResponse = unmarshalDetachServerFileSystemResponse;
1825
- exports.unmarshalDetachServerVolumeResponse = unmarshalDetachServerVolumeResponse;
1826
- exports.unmarshalExportSnapshotResponse = unmarshalExportSnapshotResponse;
1827
- exports.unmarshalGetDashboardResponse = unmarshalGetDashboardResponse;
1828
- exports.unmarshalGetImageResponse = unmarshalGetImageResponse;
1829
- exports.unmarshalGetIpResponse = unmarshalGetIpResponse;
1830
- exports.unmarshalGetPlacementGroupResponse = unmarshalGetPlacementGroupResponse;
1831
- exports.unmarshalGetPlacementGroupServersResponse = unmarshalGetPlacementGroupServersResponse;
1832
- exports.unmarshalGetPrivateNICResponse = unmarshalGetPrivateNICResponse;
1833
- exports.unmarshalGetSecurityGroupResponse = unmarshalGetSecurityGroupResponse;
1834
- exports.unmarshalGetSecurityGroupRuleResponse = unmarshalGetSecurityGroupRuleResponse;
1835
- exports.unmarshalGetServerResponse = unmarshalGetServerResponse;
1836
- exports.unmarshalGetServerTypesAvailabilityResponse = unmarshalGetServerTypesAvailabilityResponse;
1837
- exports.unmarshalGetSnapshotResponse = unmarshalGetSnapshotResponse;
1838
- exports.unmarshalGetVolumeResponse = unmarshalGetVolumeResponse;
1839
- exports.unmarshalListImagesResponse = unmarshalListImagesResponse;
1840
- exports.unmarshalListIpsResponse = unmarshalListIpsResponse;
1841
- exports.unmarshalListPlacementGroupsResponse = unmarshalListPlacementGroupsResponse;
1842
- exports.unmarshalListPrivateNICsResponse = unmarshalListPrivateNICsResponse;
1843
- exports.unmarshalListSecurityGroupRulesResponse = unmarshalListSecurityGroupRulesResponse;
1844
- exports.unmarshalListSecurityGroupsResponse = unmarshalListSecurityGroupsResponse;
1845
- exports.unmarshalListServerActionsResponse = unmarshalListServerActionsResponse;
1846
- exports.unmarshalListServerUserDataResponse = unmarshalListServerUserDataResponse;
1847
- exports.unmarshalListServersResponse = unmarshalListServersResponse;
1848
- exports.unmarshalListServersTypesResponse = unmarshalListServersTypesResponse;
1849
- exports.unmarshalListSnapshotsResponse = unmarshalListSnapshotsResponse;
1850
- exports.unmarshalListVolumesResponse = unmarshalListVolumesResponse;
1851
- exports.unmarshalListVolumesTypesResponse = unmarshalListVolumesTypesResponse;
1852
- exports.unmarshalMigrationPlan = unmarshalMigrationPlan;
1853
- exports.unmarshalPrivateNIC = unmarshalPrivateNIC;
1854
- exports.unmarshalServerActionResponse = unmarshalServerActionResponse;
1855
- exports.unmarshalServerCompatibleTypes = unmarshalServerCompatibleTypes;
1856
- exports.unmarshalSetImageResponse = unmarshalSetImageResponse;
1857
- exports.unmarshalSetPlacementGroupResponse = unmarshalSetPlacementGroupResponse;
1858
- exports.unmarshalSetPlacementGroupServersResponse = unmarshalSetPlacementGroupServersResponse;
1859
- exports.unmarshalSetSecurityGroupResponse = unmarshalSetSecurityGroupResponse;
1860
- exports.unmarshalSetSecurityGroupRuleResponse = unmarshalSetSecurityGroupRuleResponse;
1861
- exports.unmarshalSetSecurityGroupRulesResponse = unmarshalSetSecurityGroupRulesResponse;
1862
- exports.unmarshalSetServerResponse = unmarshalSetServerResponse;
1863
- exports.unmarshalSetSnapshotResponse = unmarshalSetSnapshotResponse;
1864
- exports.unmarshalUpdateImageResponse = unmarshalUpdateImageResponse;
1865
- exports.unmarshalUpdateIpResponse = unmarshalUpdateIpResponse;
1866
- exports.unmarshalUpdatePlacementGroupResponse = unmarshalUpdatePlacementGroupResponse;
1867
- exports.unmarshalUpdatePlacementGroupServersResponse = unmarshalUpdatePlacementGroupServersResponse;
1868
- exports.unmarshalUpdateSecurityGroupResponse = unmarshalUpdateSecurityGroupResponse;
1869
- exports.unmarshalUpdateSecurityGroupRuleResponse = unmarshalUpdateSecurityGroupRuleResponse;
1870
- exports.unmarshalUpdateServerResponse = unmarshalUpdateServerResponse;
1871
- exports.unmarshalUpdateSnapshotResponse = unmarshalUpdateSnapshotResponse;
1872
- exports.unmarshalUpdateVolumeResponse = unmarshalUpdateVolumeResponse;