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