Skip to content

Commit 98dcd2e

Browse files
author
Quentin Brosse
authored
feat: update generated apis (#265)
1 parent 7a34738 commit 98dcd2e

File tree

2 files changed

+34
-26
lines changed

2 files changed

+34
-26
lines changed

api/instance/v1/instance_sdk.go

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -971,7 +971,7 @@ type Server struct {
971971
Protected bool `json:"protected"`
972972
// PrivateIP display the server private IP address
973973
PrivateIP *string `json:"private_ip"`
974-
// PublicIP display the server public IP address
974+
// PublicIP display information about the public IP
975975
PublicIP *ServerIP `json:"public_ip"`
976976
// ModificationDate display the server modification date
977977
ModificationDate time.Time `json:"modification_date"`
@@ -1463,7 +1463,7 @@ type CreateServerRequest struct {
14631463
Volumes map[string]*VolumeTemplate `json:"volumes,omitempty"`
14641464
// EnableIPv6 true if IPv6 is enabled on the server
14651465
EnableIPv6 bool `json:"enable_ipv6,omitempty"`
1466-
// PublicIP the public IPv4 attached to the server
1466+
// PublicIP the ID of the reserved IP to attach to the server
14671467
PublicIP *string `json:"public_ip,omitempty"`
14681468
// BootType the boot type to use
14691469
//
@@ -1629,7 +1629,7 @@ type setServerRequest struct {
16291629
Protected bool `json:"protected"`
16301630
// PrivateIP display the server private IP address
16311631
PrivateIP *string `json:"private_ip"`
1632-
// PublicIP display the server public IP address
1632+
// PublicIP display information about the public IP
16331633
PublicIP *ServerIP `json:"public_ip"`
16341634
// ModificationDate display the server modification date
16351635
ModificationDate time.Time `json:"modification_date"`
@@ -1821,7 +1821,7 @@ type ServerActionRequest struct {
18211821

18221822
// ServerAction perform action
18231823
//
1824-
// Perform power related actions on a server.
1824+
// Perform power related actions on a server. Be wary that when terminating a server, all the attached volumes (local *and* block storage) are deleted. So, if you want to keep your local volumes, you must use the `archive` action instead of `terminate`. And if you want to keep block-storage volumes, **you must** detach it beforehand you issue the `terminate` call. For more information, read the [Volumes](#volumes-7e8a39) documentation.
18251825
func (s *API) ServerAction(req *ServerActionRequest, opts ...scw.RequestOption) (*ServerActionResponse, error) {
18261826
var err error
18271827

api/marketplace/v1/marketplace_sdk.go

Lines changed: 30 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -65,30 +65,32 @@ type GetVersionResponse struct {
6565
Version *Version `json:"version"`
6666
}
6767

68+
// Image image
6869
type Image struct {
70+
// ID uUID of this image
6971
ID string `json:"id"`
70-
72+
// Name name of the image
7173
Name string `json:"name"`
72-
74+
// Description text description of this image
7375
Description string `json:"description"`
74-
76+
// Logo uRL of this image's logo
7577
Logo string `json:"logo"`
76-
78+
// Categories list of categories this image belongs to
7779
Categories []string `json:"categories"`
78-
79-
Organization *Organization `json:"organization"`
80-
81-
ValidUntil time.Time `json:"valid_until"`
82-
80+
// CreationDate creation date of this image
8381
CreationDate time.Time `json:"creation_date"`
84-
82+
// ModificationDate date of the last modification of this image
8583
ModificationDate time.Time `json:"modification_date"`
86-
84+
// ValidUntil expiration date of this image
85+
ValidUntil time.Time `json:"valid_until"`
86+
// Label label of this image
87+
Label string `json:"label"`
88+
// Versions list of versions of this image
8789
Versions []*Version `json:"versions"`
90+
// Organization organization this image belongs to
91+
Organization *Organization `json:"organization"`
8892

8993
CurrentPublicVersion string `json:"current_public_version"`
90-
91-
Label string `json:"label"`
9294
}
9395

9496
type ListImagesResponse struct {
@@ -103,14 +105,16 @@ type ListVersionsResponse struct {
103105
TotalCount uint32 `json:"total_count"`
104106
}
105107

108+
// LocalImage local image
106109
type LocalImage struct {
110+
// ID uUID of this local image
107111
ID string `json:"id"`
108-
112+
// CompatibleCommercialTypes list of all commercial types that are compatible with this local image
113+
CompatibleCommercialTypes []string `json:"compatible_commercial_types"`
114+
// Arch supported architecture for this local image
109115
Arch string `json:"arch"`
110-
116+
// Zone availability Zone where this local image is available
111117
Zone scw.Zone `json:"zone"`
112-
113-
CompatibleCommercialTypes []string `json:"compatible_commercial_types"`
114118
}
115119

116120
type Organization struct {
@@ -119,15 +123,17 @@ type Organization struct {
119123
Name string `json:"name"`
120124
}
121125

126+
// Version version
122127
type Version struct {
128+
// ID uUID of this version
123129
ID string `json:"id"`
124-
130+
// Name name of this version
125131
Name string `json:"name"`
126-
132+
// CreationDate creation date of this image version
127133
CreationDate time.Time `json:"creation_date"`
128-
134+
// ModificationDate date of the last modification of this version
129135
ModificationDate time.Time `json:"modification_date"`
130-
136+
// LocalImages list of local images available in this version
131137
LocalImages []*LocalImage `json:"local_images"`
132138
}
133139

@@ -155,8 +161,9 @@ func (s *API) GetServiceInfo(req *GetServiceInfoRequest, opts ...scw.RequestOpti
155161
}
156162

157163
type ListImagesRequest struct {
164+
// PerPage a positive integer lower or equal to 100 to select the number of items to display
158165
PerPage *uint32 `json:"-"`
159-
166+
// Page a positive integer to choose the page to display
160167
Page *int32 `json:"-"`
161168
}
162169

@@ -209,6 +216,7 @@ func (r *ListImagesResponse) UnsafeAppend(res interface{}) (uint32, scw.SdkError
209216
}
210217

211218
type GetImageRequest struct {
219+
// ImageID display the image name
212220
ImageID string `json:"-"`
213221
}
214222

0 commit comments

Comments
 (0)