@scaleway/sdk-instance 1.0.2

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