Skip to content

Commit 4c71c0e

Browse files
fix: typos in plural acronyms (#176)
* feat: update generated apis
1 parent 1a11352 commit 4c71c0e

File tree

4 files changed

+40
-40
lines changed

4 files changed

+40
-40
lines changed

api/baremetal/v1alpha1/baremetal_sdk.go

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -395,8 +395,8 @@ type Server struct {
395395
Install *ServerInstall `json:"install"`
396396
// Tags array of customs tags
397397
Tags []string `json:"tags"`
398-
// Ips array of IPs
399-
Ips []*IP `json:"ips"`
398+
// IPs array of IPs
399+
IPs []*IP `json:"ips"`
400400
// Domain the server domain
401401
Domain string `json:"domain"`
402402
// BootType boot type
@@ -420,7 +420,7 @@ type ServerInstall struct {
420420

421421
Hostname string `json:"hostname"`
422422

423-
SSHKeyIds []string `json:"ssh_key_ids"`
423+
SSHKeyIDs []string `json:"ssh_key_ids"`
424424
// Status
425425
//
426426
// Default value: unknown
@@ -661,8 +661,8 @@ type InstallServerRequest struct {
661661
OsID string `json:"os_id"`
662662
// Hostname hostname of the server
663663
Hostname string `json:"hostname"`
664-
// SSHKeyIds array of ssh key IDs authorized
665-
SSHKeyIds []string `json:"ssh_key_ids"`
664+
// SSHKeyIDs array of ssh key IDs authorized
665+
SSHKeyIDs []string `json:"ssh_key_ids"`
666666
}
667667

668668
// InstallServer install your server.

api/instance/v1/instance_sdk.go

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -693,11 +693,11 @@ type Dashboard struct {
693693

694694
ServersCount uint32 `json:"servers_count"`
695695

696-
IpsCount uint32 `json:"ips_count"`
696+
IPsCount uint32 `json:"ips_count"`
697697

698698
SecurityGroupsCount uint32 `json:"security_groups_count"`
699699

700-
IpsUnused uint32 `json:"ips_unused"`
700+
IPsUnused uint32 `json:"ips_unused"`
701701
}
702702

703703
type GetBootscriptResponse struct {
@@ -802,14 +802,14 @@ type ListComputeClustersResponse struct {
802802
TotalCount uint32 `json:"total_count"`
803803
}
804804

805-
type ListImagesResponse struct {
806-
Images []*Image `json:"images"`
805+
type ListIPsResponse struct {
806+
IPs []*IP `json:"ips"`
807807

808808
TotalCount uint32 `json:"total_count"`
809809
}
810810

811-
type ListIpsResponse struct {
812-
Ips []*IP `json:"ips"`
811+
type ListImagesResponse struct {
812+
Images []*Image `json:"images"`
813813

814814
TotalCount uint32 `json:"total_count"`
815815
}
@@ -3801,7 +3801,7 @@ func (s *API) DeleteComputeClusterServers(req *DeleteComputeClusterServersReques
38013801
return nil
38023802
}
38033803

3804-
type ListIpsRequest struct {
3804+
type ListIPsRequest struct {
38053805
Zone scw.Zone `json:"-"`
38063806

38073807
Organization *string `json:"-"`
@@ -3813,8 +3813,8 @@ type ListIpsRequest struct {
38133813
Page *int32 `json:"-"`
38143814
}
38153815

3816-
// ListIps list IPs
3817-
func (s *API) ListIps(req *ListIpsRequest, opts ...scw.RequestOption) (*ListIpsResponse, error) {
3816+
// ListIPs list IPs
3817+
func (s *API) ListIPs(req *ListIPsRequest, opts ...scw.RequestOption) (*ListIPsResponse, error) {
38183818
var err error
38193819

38203820
defaultOrganization, exist := s.client.GetDefaultOrganizationID()
@@ -3849,7 +3849,7 @@ func (s *API) ListIps(req *ListIpsRequest, opts ...scw.RequestOption) (*ListIpsR
38493849
Headers: http.Header{},
38503850
}
38513851

3852-
var resp ListIpsResponse
3852+
var resp ListIPsResponse
38533853

38543854
err = s.client.Do(scwReq, &resp, opts...)
38553855
if err != nil {
@@ -3860,21 +3860,21 @@ func (s *API) ListIps(req *ListIpsRequest, opts ...scw.RequestOption) (*ListIpsR
38603860

38613861
// UnsafeGetTotalCount should not be used
38623862
// Internal usage only
3863-
func (r *ListIpsResponse) UnsafeGetTotalCount() int {
3863+
func (r *ListIPsResponse) UnsafeGetTotalCount() int {
38643864
return int(r.TotalCount)
38653865
}
38663866

38673867
// UnsafeAppend should not be used
38683868
// Internal usage only
3869-
func (r *ListIpsResponse) UnsafeAppend(res interface{}) (int, scw.SdkError) {
3870-
results, ok := res.(*ListIpsResponse)
3869+
func (r *ListIPsResponse) UnsafeAppend(res interface{}) (int, scw.SdkError) {
3870+
results, ok := res.(*ListIPsResponse)
38713871
if !ok {
38723872
return 0, errors.New("%T type cannot be appended to type %T", res, r)
38733873
}
38743874

3875-
r.Ips = append(r.Ips, results.Ips...)
3876-
r.TotalCount += uint32(len(results.Ips))
3877-
return len(results.Ips), nil
3875+
r.IPs = append(r.IPs, results.IPs...)
3876+
r.TotalCount += uint32(len(results.IPs))
3877+
return len(results.IPs), nil
38783878
}
38793879

38803880
type CreateIPRequest struct {

api/instance/v1/instance_utils.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -236,7 +236,7 @@ func (r *ListBootscriptsResponse) UnsafeSetTotalCount(totalCount int) {
236236

237237
// UnsafeSetTotalCount should not be used
238238
// Internal usage only
239-
func (r *ListIpsResponse) UnsafeSetTotalCount(totalCount int) {
239+
func (r *ListIPsResponse) UnsafeSetTotalCount(totalCount int) {
240240
r.TotalCount = uint32(totalCount)
241241
}
242242

api/lb/v1/lb_sdk.go

Lines changed: 18 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1095,8 +1095,8 @@ type LbType struct {
10951095
}
10961096

10971097
type ListACLResponse struct {
1098-
// Acls list of Acl object (see Acl object description)
1099-
Acls []*ACL `json:"acls"`
1098+
// ACLs list of Acl object (see Acl object description)
1099+
ACLs []*ACL `json:"acls"`
11001100
// TotalCount result count
11011101
TotalCount uint32 `json:"total_count"`
11021102
}
@@ -1121,9 +1121,9 @@ type ListFrontendsResponse struct {
11211121
TotalCount uint32 `json:"total_count"`
11221122
}
11231123

1124-
type ListIpsResponse struct {
1125-
// Ips list IP address object
1126-
Ips []*IP `json:"ips"`
1124+
type ListIPsResponse struct {
1125+
// IPs list IP address object
1126+
IPs []*IP `json:"ips"`
11271127
// TotalCount total count, wihtout pagination
11281128
TotalCount uint32 `json:"total_count"`
11291129
}
@@ -1445,7 +1445,7 @@ type ListIPsRequest struct {
14451445
}
14461446

14471447
// ListIPs list IPs
1448-
func (s *API) ListIPs(req *ListIPsRequest, opts ...scw.RequestOption) (*ListIpsResponse, error) {
1448+
func (s *API) ListIPs(req *ListIPsRequest, opts ...scw.RequestOption) (*ListIPsResponse, error) {
14491449
var err error
14501450

14511451
defaultOrganizationID, exist := s.client.GetDefaultOrganizationID()
@@ -1480,7 +1480,7 @@ func (s *API) ListIPs(req *ListIPsRequest, opts ...scw.RequestOption) (*ListIpsR
14801480
Headers: http.Header{},
14811481
}
14821482

1483-
var resp ListIpsResponse
1483+
var resp ListIPsResponse
14841484

14851485
err = s.client.Do(scwReq, &resp, opts...)
14861486
if err != nil {
@@ -1491,21 +1491,21 @@ func (s *API) ListIPs(req *ListIPsRequest, opts ...scw.RequestOption) (*ListIpsR
14911491

14921492
// UnsafeGetTotalCount should not be used
14931493
// Internal usage only
1494-
func (r *ListIpsResponse) UnsafeGetTotalCount() int {
1494+
func (r *ListIPsResponse) UnsafeGetTotalCount() int {
14951495
return int(r.TotalCount)
14961496
}
14971497

14981498
// UnsafeAppend should not be used
14991499
// Internal usage only
1500-
func (r *ListIpsResponse) UnsafeAppend(res interface{}) (int, scw.SdkError) {
1501-
results, ok := res.(*ListIpsResponse)
1500+
func (r *ListIPsResponse) UnsafeAppend(res interface{}) (int, scw.SdkError) {
1501+
results, ok := res.(*ListIPsResponse)
15021502
if !ok {
15031503
return 0, errors.New("%T type cannot be appended to type %T", res, r)
15041504
}
15051505

1506-
r.Ips = append(r.Ips, results.Ips...)
1507-
r.TotalCount += uint32(len(results.Ips))
1508-
return len(results.Ips), nil
1506+
r.IPs = append(r.IPs, results.IPs...)
1507+
r.TotalCount += uint32(len(results.IPs))
1508+
return len(results.IPs), nil
15091509
}
15101510

15111511
type GetIPRequest struct {
@@ -2619,7 +2619,7 @@ func (s *API) GetLbStats(req *GetLbStatsRequest, opts ...scw.RequestOption) (*Lb
26192619
return &resp, nil
26202620
}
26212621

2622-
type ListAclsRequest struct {
2622+
type ListACLsRequest struct {
26232623
Region scw.Region `json:"-"`
26242624
// FrontendID iD of your frontend
26252625
FrontendID string `json:"-"`
@@ -2635,7 +2635,7 @@ type ListAclsRequest struct {
26352635
Name *string `json:"-"`
26362636
}
26372637

2638-
func (s *API) ListAcls(req *ListAclsRequest, opts ...scw.RequestOption) (*ListACLResponse, error) {
2638+
func (s *API) ListACLs(req *ListACLsRequest, opts ...scw.RequestOption) (*ListACLResponse, error) {
26392639
var err error
26402640

26412641
if req.Region == "" {
@@ -2692,9 +2692,9 @@ func (r *ListACLResponse) UnsafeAppend(res interface{}) (int, scw.SdkError) {
26922692
return 0, errors.New("%T type cannot be appended to type %T", res, r)
26932693
}
26942694

2695-
r.Acls = append(r.Acls, results.Acls...)
2696-
r.TotalCount += uint32(len(results.Acls))
2697-
return len(results.Acls), nil
2695+
r.ACLs = append(r.ACLs, results.ACLs...)
2696+
r.TotalCount += uint32(len(results.ACLs))
2697+
return len(results.ACLs), nil
26982698
}
26992699

27002700
type CreateACLRequest struct {

0 commit comments

Comments
 (0)