File tree 8 files changed +101
-49
lines changed
8 files changed +101
-49
lines changed Original file line number Diff line number Diff line change @@ -20,8 +20,9 @@ type Datacenter struct {
20
20
21
21
// DatacenterServerTypes represents the server types available and supported in a datacenter.
22
22
type DatacenterServerTypes struct {
23
- Supported []* ServerType
24
- Available []* ServerType
23
+ Supported []* ServerType
24
+ AvailableForMigration []* ServerType
25
+ Available []* ServerType
25
26
}
26
27
27
28
// DatacenterClient is a client for the datacenter API.
Original file line number Diff line number Diff line change @@ -19,6 +19,7 @@ type LoadBalancerType struct {
19
19
MaxTargets int
20
20
MaxAssignedCertificates int
21
21
Pricings []LoadBalancerTypeLocationPricing
22
+ Deprecated * string
22
23
}
23
24
24
25
// LoadBalancerTypeClient is a client for the Load Balancer types API.
Original file line number Diff line number Diff line change @@ -2,14 +2,18 @@ package schema
2
2
3
3
// Datacenter defines the schema of a datacenter.
4
4
type Datacenter struct {
5
- ID int64 `json:"id"`
6
- Name string `json:"name"`
7
- Description string `json:"description"`
8
- Location Location `json:"location"`
9
- ServerTypes struct {
10
- Supported []int64 `json:"supported"`
11
- Available []int64 `json:"available"`
12
- } `json:"server_types"`
5
+ ID int64 `json:"id"`
6
+ Name string `json:"name"`
7
+ Description string `json:"description"`
8
+ Location Location `json:"location"`
9
+ ServerTypes DatacenterServerTypes `json:"server_types"`
10
+ }
11
+
12
+ // DatacenterServerTypes defines the schema of the server types available in a datacenter.
13
+ type DatacenterServerTypes struct {
14
+ Supported []int64 `json:"supported"`
15
+ AvailableForMigration []int64 `json:"available_for_migration"`
16
+ Available []int64 `json:"available"`
13
17
}
14
18
15
19
// DatacenterGetResponse defines the schema of the response when retrieving a single datacenter.
Original file line number Diff line number Diff line change @@ -10,6 +10,7 @@ type LoadBalancerType struct {
10
10
MaxTargets int `json:"max_targets"`
11
11
MaxAssignedCertificates int `json:"max_assigned_certificates"`
12
12
Prices []PricingLoadBalancerTypePrice `json:"prices"`
13
+ Deprecated * string `json:"deprecated"`
13
14
}
14
15
15
16
// LoadBalancerTypeListResponse defines the schema of the response when
Original file line number Diff line number Diff line change @@ -25,6 +25,7 @@ type Server struct {
25
25
Volumes []int64 `json:"volumes"`
26
26
PrimaryDiskSize int `json:"primary_disk_size"`
27
27
PlacementGroup * PlacementGroup `json:"placement_group"`
28
+ LoadBalancers []int64 `json:"load_balancers"`
28
29
}
29
30
30
31
// ServerProtection defines the schema of a server's resource protection.
Original file line number Diff line number Diff line change @@ -46,6 +46,8 @@ You can find a documentation of goverter here: https://goverter.jmattheis.de/
46
46
// goverter:extend int64FromServer
47
47
// goverter:extend networkFromInt64
48
48
// goverter:extend int64FromNetwork
49
+ // goverter:extend loadBalancerFromInt64
50
+ // goverter:extend int64FromLoadBalancer
49
51
// goverter:extend volumeFromInt64
50
52
// goverter:extend int64FromVolume
51
53
// goverter:extend certificateFromInt64
@@ -389,6 +391,14 @@ func int64FromNetwork(network Network) int64 {
389
391
return network .ID
390
392
}
391
393
394
+ func loadBalancerFromInt64 (id int64 ) LoadBalancer {
395
+ return LoadBalancer {ID : id }
396
+ }
397
+
398
+ func int64FromLoadBalancer (lb LoadBalancer ) int64 {
399
+ return lb .ID
400
+ }
401
+
392
402
func volumeFromInt64 (id int64 ) * Volume {
393
403
return & Volume {ID : id }
394
404
}
Original file line number Diff line number Diff line change @@ -38,6 +38,7 @@ type Server struct {
38
38
Volumes []* Volume
39
39
PrimaryDiskSize int
40
40
PlacementGroup * PlacementGroup
41
+ LoadBalancers []* LoadBalancer
41
42
}
42
43
43
44
// ServerProtection represents the protection level of a server.
You can’t perform that action at this time.
0 commit comments