-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathtypes.gen.go
1441 lines (1125 loc) · 48.5 KB
/
types.gen.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
// Package genesiscloud provides primitives to interact with the openapi HTTP API.
//
// Code generated by github.com/oapi-codegen/oapi-codegen/v2 version v2.4.1 DO NOT EDIT.
package genesiscloud
import (
"encoding/json"
"time"
"github.com/oapi-codegen/runtime"
)
const (
ApiKeyAuthScopes = "ApiKeyAuth.Scopes"
)
// Defines values for FilesystemStatus.
const (
FilesystemStatusCreated FilesystemStatus = "created"
FilesystemStatusCreating FilesystemStatus = "creating"
FilesystemStatusDeleting FilesystemStatus = "deleting"
FilesystemStatusError FilesystemStatus = "error"
)
var AllFilesystemStatuss = []FilesystemStatus{
FilesystemStatusCreated,
FilesystemStatusCreating,
FilesystemStatusDeleting,
FilesystemStatusError,
}
// Defines values for FilesystemType.
const (
FilesystemTypeVast FilesystemType = "vast"
)
var AllFilesystemTypes = []FilesystemType{
FilesystemTypeVast,
}
// Defines values for FloatingIPVersion.
const (
FloatingIPVersionIpv4 FloatingIPVersion = "ipv4"
FloatingIPVersionIpv6 FloatingIPVersion = "ipv6"
)
var AllFloatingIPVersions = []FloatingIPVersion{
FloatingIPVersionIpv4,
FloatingIPVersionIpv6,
}
// Defines values for FloatingIpStatus.
const (
FloatingIpStatusCreated FloatingIpStatus = "created"
FloatingIpStatusCreating FloatingIpStatus = "creating"
FloatingIpStatusDeleting FloatingIpStatus = "deleting"
FloatingIpStatusError FloatingIpStatus = "error"
)
var AllFloatingIpStatuss = []FloatingIpStatus{
FloatingIpStatusCreated,
FloatingIpStatusCreating,
FloatingIpStatusDeleting,
FloatingIpStatusError,
}
// Defines values for ImageType.
const (
ImageTypeCloudImage ImageType = "cloud-image"
)
var AllImageTypes = []ImageType{
ImageTypeCloudImage,
}
// Defines values for InstanceAction.
const (
InstanceActionReset InstanceAction = "reset"
InstanceActionStart InstanceAction = "start"
InstanceActionStop InstanceAction = "stop"
)
var AllInstanceActions = []InstanceAction{
InstanceActionReset,
InstanceActionStart,
InstanceActionStop,
}
// Defines values for InstanceBillingType.
const (
InstanceBillingTypeOnDemand InstanceBillingType = "on-demand"
InstanceBillingTypePrepaid12Month InstanceBillingType = "prepaid-12-month"
InstanceBillingTypePrepaid3Month InstanceBillingType = "prepaid-3-month"
InstanceBillingTypePrepaid6Month InstanceBillingType = "prepaid-6-month"
InstanceBillingTypePrepaidMonthly InstanceBillingType = "prepaid-monthly"
InstanceBillingTypeReserved InstanceBillingType = "reserved"
)
var AllInstanceBillingTypes = []InstanceBillingType{
InstanceBillingTypeOnDemand,
InstanceBillingTypePrepaid12Month,
InstanceBillingTypePrepaid3Month,
InstanceBillingTypePrepaid6Month,
InstanceBillingTypePrepaidMonthly,
InstanceBillingTypeReserved,
}
// Defines values for InstanceStatus.
const (
InstanceStatusActive InstanceStatus = "active"
InstanceStatusCreating InstanceStatus = "creating"
InstanceStatusDeleting InstanceStatus = "deleting"
InstanceStatusError InstanceStatus = "error"
InstanceStatusPendingPayment InstanceStatus = "pending_payment"
InstanceStatusResetting InstanceStatus = "resetting"
InstanceStatusStarting InstanceStatus = "starting"
InstanceStatusStopped InstanceStatus = "stopped"
InstanceStatusStopping InstanceStatus = "stopping"
)
var AllInstanceStatuss = []InstanceStatus{
InstanceStatusActive,
InstanceStatusCreating,
InstanceStatusDeleting,
InstanceStatusError,
InstanceStatusPendingPayment,
InstanceStatusResetting,
InstanceStatusStarting,
InstanceStatusStopped,
InstanceStatusStopping,
}
// Defines values for OSType.
const (
OSTypeLinux OSType = "linux"
OSTypeWindows OSType = "windows"
)
var AllOSTypes = []OSType{
OSTypeLinux,
OSTypeWindows,
}
// Defines values for Region.
const (
RegionEUCDEMUC1 Region = "EUC-DE-MUC-1"
RegionNORDNOKRS1 Region = "NORD-NO-KRS-1"
)
var AllRegions = []Region{
RegionEUCDEMUC1,
RegionNORDNOKRS1,
}
// Defines values for SecurityGroupRuleDirection.
const (
SecurityGroupRuleDirectionEgress SecurityGroupRuleDirection = "egress"
SecurityGroupRuleDirectionIngress SecurityGroupRuleDirection = "ingress"
)
var AllSecurityGroupRuleDirections = []SecurityGroupRuleDirection{
SecurityGroupRuleDirectionEgress,
SecurityGroupRuleDirectionIngress,
}
// Defines values for SecurityGroupRuleProtocol.
const (
SecurityGroupRuleProtocolAll SecurityGroupRuleProtocol = "all"
SecurityGroupRuleProtocolIcmp SecurityGroupRuleProtocol = "icmp"
SecurityGroupRuleProtocolTcp SecurityGroupRuleProtocol = "tcp"
SecurityGroupRuleProtocolUdp SecurityGroupRuleProtocol = "udp"
)
var AllSecurityGroupRuleProtocols = []SecurityGroupRuleProtocol{
SecurityGroupRuleProtocolAll,
SecurityGroupRuleProtocolIcmp,
SecurityGroupRuleProtocolTcp,
SecurityGroupRuleProtocolUdp,
}
// Defines values for SecurityGroupStatus.
const (
SecurityGroupStatusCreated SecurityGroupStatus = "created"
SecurityGroupStatusCreating SecurityGroupStatus = "creating"
SecurityGroupStatusDeleting SecurityGroupStatus = "deleting"
SecurityGroupStatusError SecurityGroupStatus = "error"
)
var AllSecurityGroupStatuss = []SecurityGroupStatus{
SecurityGroupStatusCreated,
SecurityGroupStatusCreating,
SecurityGroupStatusDeleting,
SecurityGroupStatusError,
}
// Defines values for SnapshotStatus.
const (
SnapshotStatusCreated SnapshotStatus = "created"
SnapshotStatusCreating SnapshotStatus = "creating"
SnapshotStatusDeleting SnapshotStatus = "deleting"
SnapshotStatusError SnapshotStatus = "error"
SnapshotStatusPendingDelete SnapshotStatus = "pending_delete"
)
var AllSnapshotStatuss = []SnapshotStatus{
SnapshotStatusCreated,
SnapshotStatusCreating,
SnapshotStatusDeleting,
SnapshotStatusError,
SnapshotStatusPendingDelete,
}
// Defines values for VolumeStatus.
const (
VolumeStatusCreated VolumeStatus = "created"
VolumeStatusCreating VolumeStatus = "creating"
VolumeStatusDeleting VolumeStatus = "deleting"
VolumeStatusError VolumeStatus = "error"
VolumeStatusPendingDelete VolumeStatus = "pending_delete"
)
var AllVolumeStatuss = []VolumeStatus{
VolumeStatusCreated,
VolumeStatusCreating,
VolumeStatusDeleting,
VolumeStatusError,
VolumeStatusPendingDelete,
}
// Defines values for VolumeType.
const (
VolumeTypeHdd VolumeType = "hdd"
VolumeTypeSsd VolumeType = "ssd"
)
var AllVolumeTypes = []VolumeType{
VolumeTypeHdd,
VolumeTypeSsd,
}
// Defines values for CreateFloatingIPJSONBodyVersion.
const (
CreateFloatingIPJSONBodyVersionIpv4 CreateFloatingIPJSONBodyVersion = "ipv4"
)
var AllCreateFloatingIPJSONBodyVersions = []CreateFloatingIPJSONBodyVersion{
CreateFloatingIPJSONBodyVersionIpv4,
}
// Error defines model for Error.
type Error struct {
// Code The Genesis Cloud error code.
// Check the [developer documentation](https://developers.com/#error-codes) for more information on error codes.
Code string `json:"code"`
// Message An explanation of what went wrong.
Message string `json:"message"`
}
// Filesystem defines model for Filesystem.
type Filesystem struct {
CreatedAt Timestamp `json:"created_at"`
// Description The human-readable description for the filesystem.
Description string `json:"description"`
// Id A unique identifier for each filesystem. This is automatically generated.
Id FilesystemId `json:"id"`
// MountBasePath The mount base path of the filesystem.
MountBasePath *string `json:"mount_base_path"`
// MountEndpointRange The mount endpoint range of the filesystem.
MountEndpointRange *[]string `json:"mount_endpoint_range"`
// Name The human-readable name for the filesystem.
Name string `json:"name"`
// Region The region identifier.
Region Region `json:"region"`
// Size The storage size of this filesystem given in GiB.
Size int `json:"size"`
Status FilesystemStatus `json:"status"`
// Type The filesystem type.
Type FilesystemType `json:"type"`
UpdatedAt Timestamp `json:"updated_at"`
}
// FilesystemStatus defines model for Filesystem.Status.
type FilesystemStatus string
// FilesystemId A unique identifier for each filesystem. This is automatically generated.
type FilesystemId = string
// FilesystemType The filesystem type.
type FilesystemType string
// FloatingIP defines model for FloatingIP.
type FloatingIP struct {
CreatedAt Timestamp `json:"created_at"`
// Description The human-readable description for the floating IP.
Description string `json:"description"`
// Id A unique identifier for each floating IP. This is automatically generated.
Id string `json:"id"`
Instance *struct {
// Id A unique identifier for the attached instance.
Id string `json:"id"`
// Name The name of the attached instance.
Name string `json:"name"`
} `json:"instance"`
// IpAddress The IP address of the floating IP.
IpAddress *string `json:"ip_address"`
// IsPublic A boolean value indicating whether the floating IP is public or private.
IsPublic bool `json:"is_public"`
// Name The human-readable name for the floating IP.
Name string `json:"name"`
// Region The region identifier.
Region Region `json:"region"`
// Status The floating ip status.
Status FloatingIpStatus `json:"status"`
UpdatedAt Timestamp `json:"updated_at"`
// Version The IP version of the floating IP.
Version FloatingIPVersion `json:"version"`
}
// FloatingIPVersion The IP version of the floating IP.
type FloatingIPVersion string
// FloatingIpStatus The floating ip status.
type FloatingIpStatus string
// Image defines model for Image.
type Image struct {
CreatedAt Timestamp `json:"created_at"`
Family *string `json:"family"`
// Id A unique number that can be used to identify and reference a specific image.
Id ImageId `json:"id"`
// Name The display name that has been given to an image. This is what is shown in the control panel and is generally a descriptive title for the image in question.
Name string `json:"name"`
// OsType The OS type.
OsType OSType `json:"os_type"`
// Regions The list of regions in which this image can be used in.
Regions []Region `json:"regions"`
Slug *string `json:"slug"`
// Type Describes the kind of image.
Type ImageType `json:"type"`
UpdatedAt Timestamp `json:"updated_at"`
// Versions The list of versions if this is a cloud-image otherwise empty.
Versions *[]string `json:"versions"`
}
// ImageType Describes the kind of image.
type ImageType string
// ImageId A unique number that can be used to identify and reference a specific image.
type ImageId = string
// Instance defines model for Instance.
type Instance struct {
CreatedAt Timestamp `json:"created_at"`
// DiskSize The storage size of the instance's boot volume given in GiB.
DiskSize *InstanceDiskSize `json:"disk_size,omitempty"`
// DnsName The dns name of your instance.
DnsName InstanceDNSName `json:"dns_name"`
// FloatingIp The floating IP attached to the instance.
FloatingIp *struct {
// Id The ID of the floating IP.
Id string `json:"id"`
// Name The name of the floating IP.
Name string `json:"name"`
} `json:"floating_ip"`
// Hostname The hostname of your instance.
Hostname InstanceHostname `json:"hostname"`
// Id The unique ID of the instance.
Id string `json:"id"`
// Image The image of the instance.
Image struct {
// Id A unique number that can be used to identify and reference a specific image.
Id ImageId `json:"id"`
// Name The image name.
Name string `json:"name"`
} `json:"image"`
// Name The human-readable name set for the instance.
Name InstanceName `json:"name"`
// OsType The OS type.
OsType OSType `json:"os_type"`
// PlacementOption The placement option identifier in which instances are physically located relative to each other within a zone.
PlacementOption string `json:"placement_option"`
// PrivateIp The private IPv4 IP-Address (IPv4 address).
PrivateIp *string `json:"private_ip"`
// PublicIp The public IPv4 IP-Address (IPv4 address).
PublicIp *string `json:"public_ip"`
// Region The region identifier.
Region Region `json:"region"`
// ReservationId The unique ID of the reservation the instance is associated with.
ReservationId *string `json:"reservation_id"`
// SecurityGroups The security groups of the instance.
SecurityGroups []struct {
// Id A unique identifier for each security group. This is automatically generated.
Id SecurityGroupId `json:"id"`
// Name The name of the security group.
Name string `json:"name"`
} `json:"security_groups"`
// SshKeys The ssh keys of the instance.
SshKeys []struct {
// Id The ssh key ID.
Id InstanceSSHKeyId `json:"id"`
// Name The name of the ssh key.
Name string `json:"name"`
} `json:"ssh_keys"`
// Status The instance status
Status InstanceStatus `json:"status"`
// Type The instance type identifier.
Type InstanceType `json:"type"`
UpdatedAt Timestamp `json:"updated_at"`
// Volumes The volumes of the instance
Volumes []struct {
// Id A unique identifier for each volume. This is automatically generated.
Id VolumeId `json:"id"`
// Name The volume name.
Name string `json:"name"`
} `json:"volumes"`
}
// InstanceAction defines model for Instance.Action.
type InstanceAction string
// InstanceBillingType The billing type of the instance.
type InstanceBillingType string
// InstanceDNSName The dns name of your instance.
type InstanceDNSName = string
// InstanceDestroyOnShutdown Option that you can set at instance creation that will allow the instance to destroy on shutdown command
type InstanceDestroyOnShutdown = bool
// InstanceDiskSize The storage size of the instance's boot volume given in GiB.
type InstanceDiskSize = int
// InstanceFloatingIp The id of the floating IP to attach to the instance.
type InstanceFloatingIp = string
// InstanceHostname The hostname of your instance.
type InstanceHostname = string
// InstanceIsProtected Specifies if the instance is termination protected.
// When set to `true`, it"s not possible to destroy the instance until it"s switched to `false`.
// Set to `true` automatically for long-term billed instances.
type InstanceIsProtected = bool
// InstanceName The human-readable name set for the instance.
type InstanceName = string
// InstancePublicIpv6 A boolean value indicating whether the instance should have an ipv6 address or not.
type InstancePublicIpv6 = bool
// InstanceReuseLongTermSubscription The long term subscription id to be used for this instance.
// If not provided, the billing_type will default to on-demand.
type InstanceReuseLongTermSubscription = string
// InstanceSSHKeyId The ssh key ID.
type InstanceSSHKeyId = string
// InstanceStatus The instance status
type InstanceStatus string
// InstanceType The instance type identifier.
type InstanceType = string
// InstanceUpdateSecurityGroups defines model for Instance.UpdateSecurityGroups.
type InstanceUpdateSecurityGroups struct {
union json.RawMessage
}
// InstanceUpdateSecurityGroupsAttach defines model for Instance.UpdateSecurityGroups.Attach.
type InstanceUpdateSecurityGroupsAttach struct {
// Attach A unique identifier for each security group. This is automatically generated.
Attach SecurityGroupId `json:"attach"`
}
// InstanceUpdateSecurityGroupsDetach defines model for Instance.UpdateSecurityGroups.Detach.
type InstanceUpdateSecurityGroupsDetach struct {
// Detach A unique identifier for each security group. This is automatically generated.
Detach SecurityGroupId `json:"detach"`
}
// InstanceUpdateSecurityGroupsList The instance's security group IDs.
type InstanceUpdateSecurityGroupsList = []SecurityGroupId
// InstanceUpdateVolumes defines model for Instance.UpdateVolumes.
type InstanceUpdateVolumes struct {
union json.RawMessage
}
// InstanceUpdateVolumesAttach defines model for Instance.UpdateVolumes.Attach.
type InstanceUpdateVolumesAttach struct {
// Attach A unique identifier for each volume. This is automatically generated.
Attach VolumeId `json:"attach"`
}
// InstanceUpdateVolumesDetach defines model for Instance.UpdateVolumes.Detach.
type InstanceUpdateVolumesDetach struct {
// Detach A unique identifier for each volume. This is automatically generated.
Detach VolumeId `json:"detach"`
}
// InstanceUpdateVolumesList The instance's volume IDs.
type InstanceUpdateVolumesList = []VolumeId
// InstanceUserData defines model for Instance.UserData.
type InstanceUserData = []struct {
Content string `json:"content"`
Filename *string `json:"filename,omitempty"`
Type string `json:"type"`
}
// InstancesAvailability defines model for InstancesAvailability.
type InstancesAvailability struct {
Availability struct {
InstanceTypes []struct {
Available bool `json:"available"`
Count *float32 `json:"count,omitempty"`
// Type The instance type identifier.
Type InstanceType `json:"type"`
} `json:"instance_types"`
Placement *string `json:"placement,omitempty"`
// Region The region identifier.
Region Region `json:"region"`
Type string `json:"type"`
} `json:"availability"`
}
// OSType The OS type.
type OSType string
// Quota defines model for Quota.
type Quota struct {
Capacity int `json:"capacity"`
Flavors []struct {
FlavorName string `json:"flavor_name"`
ProductName string `json:"product_name"`
Unit string `json:"unit"`
Used int `json:"used"`
} `json:"flavors"`
Key string `json:"key"`
Used int `json:"used"`
}
// Region The region identifier.
type Region string
// Reservation defines model for Reservation.
type Reservation struct {
FlavorName string `json:"flavor_name"`
Id string `json:"id"`
Metadata map[string]interface{} `json:"metadata"`
Quota struct {
Capacity int `json:"capacity"`
Used int `json:"used"`
} `json:"quota"`
// Region The region identifier.
Region Region `json:"region"`
}
// SSHKey defines model for SSHKey.
type SSHKey struct {
CreatedAt Timestamp `json:"created_at"`
// Fingerprint The fingerprint of the SSH key.
Fingerprint string `json:"fingerprint"`
// Id A unique identifier for each SSH key. This is automatically generated.
Id string `json:"id"`
// Name The human-readable name for the SSH key.
Name string `json:"name"`
// Size The length of the SSH key.
Size int `json:"size"`
// Type The encryption algorithm type of the SSH key.
Type string `json:"type"`
UpdatedAt Timestamp `json:"updated_at"`
// Value SSH public key.
Value string `json:"value"`
}
// SecurityGroup defines model for SecurityGroup.
type SecurityGroup struct {
CreatedAt Timestamp `json:"created_at"`
// Description The human-readable description for the security group.
Description string `json:"description"`
// Id A unique identifier for each security group. This is automatically generated.
Id SecurityGroupId `json:"id"`
IsInternal bool `json:"is_internal"`
// Name The human-readable name for the security group.
Name string `json:"name"`
// Region The region identifier.
Region Region `json:"region"`
Rules []SecurityGroupRule `json:"rules"`
// Status The security group status.
Status SecurityGroupStatus `json:"status"`
UpdatedAt Timestamp `json:"updated_at"`
}
// SecurityGroupRule defines model for SecurityGroup.Rule.
type SecurityGroupRule struct {
// Direction The direction of the rule.
Direction SecurityGroupRuleDirection `json:"direction"`
// PortRangeMax The maximum port number of the rule.
PortRangeMax *int `json:"port_range_max"`
// PortRangeMin The minimum port number of the rule.
PortRangeMin *int `json:"port_range_min"`
// Protocol The protocol of the rule.
Protocol SecurityGroupRuleProtocol `json:"protocol"`
}
// SecurityGroupRuleDirection The direction of the rule.
type SecurityGroupRuleDirection string
// SecurityGroupRuleProtocol The protocol of the rule.
type SecurityGroupRuleProtocol string
// SecurityGroupStatus The security group status.
type SecurityGroupStatus string
// SecurityGroupId A unique identifier for each security group. This is automatically generated.
type SecurityGroupId = string
// Snapshot defines model for Snapshot.
type Snapshot struct {
CreatedAt Timestamp `json:"created_at"`
// Id A unique identifier for each snapshot. This is automatically generated.
Id string `json:"id"`
// Name The human-readable name for the snapshot.
Name string `json:"name"`
// OsType The OS type.
OsType OSType `json:"os_type"`
// Region The region identifier.
Region Region `json:"region"`
// Size The storage size of this snapshot given in GiB.
Size int `json:"size"`
// SourceInstanceId The id of the source instance from which this snapshot was derived.
SourceInstanceId *string `json:"source_instance_id,omitempty"`
// SourceSnapshotId The id of the source snapshot from which this snapsot was derived.
SourceSnapshotId *string `json:"source_snapshot_id,omitempty"`
// Status The snapshot status.
Status SnapshotStatus `json:"status"`
UpdatedAt Timestamp `json:"updated_at"`
}
// SnapshotStatus The snapshot status.
type SnapshotStatus string
// Timestamp defines model for Timestamp.
type Timestamp = time.Time
// Volume defines model for Volume.
type Volume struct {
CreatedAt Timestamp `json:"created_at"`
// Description The human-readable description for the volume.
Description string `json:"description"`
// Id A unique identifier for each volume. This is automatically generated.
Id VolumeId `json:"id"`
// Instances The attached instances.
Instances []struct {
// Id The id of the attached instance.
Id string `json:"id"`
// Name The name of the attached instance.
Name string `json:"name"`
} `json:"instances"`
// Name The human-readable name for the volume.
Name string `json:"name"`
// Region The region identifier.
Region Region `json:"region"`
// Size The storage size of this volume given in GiB.
Size int `json:"size"`
Status VolumeStatus `json:"status"`
// Type The volume type.
Type VolumeType `json:"type"`
UpdatedAt Timestamp `json:"updated_at"`
}
// VolumeStatus defines model for Volume.Status.
type VolumeStatus string
// VolumeId A unique identifier for each volume. This is automatically generated.
type VolumeId = string
// VolumeType The volume type.
type VolumeType string
// PageQueryParameter A positive integer to choose the page to return.
type PageQueryParameter = int
// PerPageQueryParameter A positive integer lower or equal to 100 to select the number of items to return.
type PerPageQueryParameter = int
// ErrorResponse defines model for ErrorResponse.
type ErrorResponse = Error
// InstanceGetActionsResponse defines model for Instance.GetActionsResponse.
type InstanceGetActionsResponse struct {
Actions []InstanceAction `json:"actions"`
}
// InstanceGetInstanceUserMetadataResponse defines model for Instance.GetInstanceUserMetadataResponse.
type InstanceGetInstanceUserMetadataResponse map[string]interface{}
// InstancesAvailabilityResponse defines model for InstancesAvailabilityResponse.
type InstancesAvailabilityResponse = InstancesAvailability
// PaginatedFilesystemsResponse defines model for PaginatedFilesystemsResponse.
type PaginatedFilesystemsResponse struct {
Filesystems []Filesystem `json:"filesystems"`
Page int `json:"page"`
PerPage int `json:"per_page"`
TotalCount int `json:"total_count"`
}
// PaginatedFloatingIPsResponse defines model for PaginatedFloatingIPsResponse.
type PaginatedFloatingIPsResponse struct {
FloatingIps []FloatingIP `json:"floating_ips"`
Page int `json:"page"`
PerPage int `json:"per_page"`
TotalCount int `json:"total_count"`
}
// PaginatedImagesResponse defines model for PaginatedImagesResponse.
type PaginatedImagesResponse struct {
Images []Image `json:"images"`
Page int `json:"page"`
PerPage int `json:"per_page"`
TotalCount int `json:"total_count"`
}
// PaginatedInstancesResponse defines model for PaginatedInstancesResponse.
type PaginatedInstancesResponse struct {
Instances []Instance `json:"instances"`
Page int `json:"page"`
PerPage int `json:"per_page"`
TotalCount int `json:"total_count"`
}
// PaginatedSSHKeysResponse defines model for PaginatedSSHKeysResponse.
type PaginatedSSHKeysResponse struct {
Page int `json:"page"`
PerPage int `json:"per_page"`
SshKeys []SSHKey `json:"ssh_keys"`
TotalCount int `json:"total_count"`
}
// PaginatedSecurityGroupsResponse defines model for PaginatedSecurityGroupsResponse.
type PaginatedSecurityGroupsResponse struct {
Page int `json:"page"`
PerPage int `json:"per_page"`
SecurityGroups []SecurityGroup `json:"security_groups"`
TotalCount int `json:"total_count"`
}
// PaginatedSnapshotsResponse defines model for PaginatedSnapshotsResponse.
type PaginatedSnapshotsResponse struct {
Page int `json:"page"`
PerPage int `json:"per_page"`
Snapshots []Snapshot `json:"snapshots"`
TotalCount int `json:"total_count"`
}
// PaginatedVolumesResponse defines model for PaginatedVolumesResponse.
type PaginatedVolumesResponse struct {
Page int `json:"page"`
PerPage int `json:"per_page"`
TotalCount int `json:"total_count"`
Volumes []Volume `json:"volumes"`
}
// QuotasResponse defines model for QuotasResponse.
type QuotasResponse struct {
Quotas []Quota `json:"quotas"`
}
// ReservationsResponse defines model for ReservationsResponse.
type ReservationsResponse struct {
Reservations []Reservation `json:"reservations"`
}
// SingleFilesystemResponse defines model for SingleFilesystemResponse.
type SingleFilesystemResponse struct {
Filesystem Filesystem `json:"filesystem"`
}
// SingleFloatingIPResponse defines model for SingleFloatingIPResponse.
type SingleFloatingIPResponse struct {
FloatingIp FloatingIP `json:"floating_ip"`
}
// SingleInstanceResponse defines model for SingleInstanceResponse.
type SingleInstanceResponse struct {
Instance Instance `json:"instance"`
}
// SingleSSHKeyResponse defines model for SingleSSHKeyResponse.
type SingleSSHKeyResponse = SSHKey
// SingleSecurityGroupResponse defines model for SingleSecurityGroupResponse.
type SingleSecurityGroupResponse struct {
SecurityGroup SecurityGroup `json:"security_group"`
}
// SingleSnapshotResponse defines model for SingleSnapshotResponse.
type SingleSnapshotResponse struct {
Snapshot Snapshot `json:"snapshot"`
}
// SingleVolumeResponse defines model for SingleVolumeResponse.
type SingleVolumeResponse struct {
Volume Volume `json:"volume"`
}
// GetInstancesAvailabilityParams defines parameters for GetInstancesAvailability.
type GetInstancesAvailabilityParams struct {
Placement *string `form:"placement,omitempty" json:"placement,omitempty"`
}
// ListFilesystemsPaginatedParams defines parameters for ListFilesystemsPaginated.
type ListFilesystemsPaginatedParams struct {
Page *PageQueryParameter `form:"page,omitempty" json:"page,omitempty"`
PerPage *PerPageQueryParameter `form:"per_page,omitempty" json:"per_page,omitempty"`
}
// CreateFilesystemJSONBody defines parameters for CreateFilesystem.
type CreateFilesystemJSONBody struct {
// Description The human-readable description set for the filesystem.
Description *string `json:"description,omitempty"`
// Name The human-readable name set for the filesystem.
Name string `json:"name"`
// Region The region identifier.
Region Region `json:"region"`
// Size The storage size of this filesystem given in GiB (min: 1GiB).
Size int `json:"size"`
// Type The filesystem type.
Type *FilesystemType `json:"type,omitempty"`
}
// UpdateFilesystemJSONBody defines parameters for UpdateFilesystem.
type UpdateFilesystemJSONBody struct {
// Description The human-readable description set for the filesystem.
Description *string `json:"description,omitempty"`
// Name The human-readable name set for the filesystem.
Name *string `json:"name,omitempty"`
// Size The storage size of this filesystem given in GiB (min: previous size).
Size *int `json:"size,omitempty"`
}
// ListFloatingIPsPaginatedParams defines parameters for ListFloatingIPsPaginated.
type ListFloatingIPsPaginatedParams struct {
Page *PageQueryParameter `form:"page,omitempty" json:"page,omitempty"`
PerPage *PerPageQueryParameter `form:"per_page,omitempty" json:"per_page,omitempty"`
}
// CreateFloatingIPJSONBody defines parameters for CreateFloatingIP.
type CreateFloatingIPJSONBody struct {
// Description The human-readable description set for the floating IP.
Description *string `json:"description,omitempty"`
// Name The human-readable name set for the floating IP.
Name string `json:"name"`
// Region The region identifier.
Region Region `json:"region"`
// Version The IP version of the floating IP.
Version *CreateFloatingIPJSONBodyVersion `json:"version,omitempty"`
}
// CreateFloatingIPJSONBodyVersion defines parameters for CreateFloatingIP.
type CreateFloatingIPJSONBodyVersion string
// UpdateFloatingIPJSONBody defines parameters for UpdateFloatingIP.
type UpdateFloatingIPJSONBody struct {
// Description The human-readable description set for the floating IP.
Description *string `json:"description,omitempty"`
// Name The human-readable name set for the floating IP.
Name *string `json:"name,omitempty"`
}
// ListImagesPaginatedParams defines parameters for ListImagesPaginated.
type ListImagesPaginatedParams struct {
Page *PageQueryParameter `form:"page,omitempty" json:"page,omitempty"`
PerPage *PerPageQueryParameter `form:"per_page,omitempty" json:"per_page,omitempty"`
Type *ImageType `form:"type,omitempty" json:"type,omitempty"`
}
// ListInstancesPaginatedParams defines parameters for ListInstancesPaginated.
type ListInstancesPaginatedParams struct {
Page *PageQueryParameter `form:"page,omitempty" json:"page,omitempty"`
PerPage *PerPageQueryParameter `form:"per_page,omitempty" json:"per_page,omitempty"`
}
// CreateInstanceJSONBody defines parameters for CreateInstance.
type CreateInstanceJSONBody struct {
// BillingType The billing type of the instance.
BillingType *InstanceBillingType `json:"billing_type,omitempty"`
// DestroyOnShutdown Option that you can set at instance creation that will allow the instance to destroy on shutdown command
DestroyOnShutdown *InstanceDestroyOnShutdown `json:"destroy_on_shutdown,omitempty"`
// DiskSize The storage size of the instance's boot volume given in GiB.
DiskSize *InstanceDiskSize `json:"disk_size,omitempty"`
// FloatingIp The id of the floating IP to attach to the instance.
FloatingIp *InstanceFloatingIp `json:"floating_ip,omitempty"`
// Hostname The hostname of your instance.
Hostname InstanceHostname `json:"hostname"`
// Image A unique number that can be used to identify and reference a specific image.
Image ImageId `json:"image"`
// IsProtected Specifies if the instance is termination protected.
// When set to `true`, it"s not possible to destroy the instance until it"s switched to `false`.
// Set to `true` automatically for long-term billed instances.
IsProtected *InstanceIsProtected `json:"is_protected,omitempty"`
// Metadata Option to provide metadata.