diff --git a/api/baremetal/v1alpha1/baremetal_sdk.go b/api/baremetal/v1alpha1/baremetal_sdk.go index c0257a6f..190ccc2f 100644 --- a/api/baremetal/v1alpha1/baremetal_sdk.go +++ b/api/baremetal/v1alpha1/baremetal_sdk.go @@ -395,8 +395,8 @@ type Server struct { Install *ServerInstall `json:"install"` // Tags array of customs tags Tags []string `json:"tags"` - // Ips array of IPs - Ips []*IP `json:"ips"` + // IPs array of IPs + IPs []*IP `json:"ips"` // Domain the server domain Domain string `json:"domain"` // BootType boot type @@ -420,7 +420,7 @@ type ServerInstall struct { Hostname string `json:"hostname"` - SSHKeyIds []string `json:"ssh_key_ids"` + SSHKeyIDs []string `json:"ssh_key_ids"` // Status // // Default value: unknown @@ -661,8 +661,8 @@ type InstallServerRequest struct { OsID string `json:"os_id"` // Hostname hostname of the server Hostname string `json:"hostname"` - // SSHKeyIds array of ssh key IDs authorized - SSHKeyIds []string `json:"ssh_key_ids"` + // SSHKeyIDs array of ssh key IDs authorized + SSHKeyIDs []string `json:"ssh_key_ids"` } // InstallServer install your server. diff --git a/api/instance/v1/instance_sdk.go b/api/instance/v1/instance_sdk.go index 942352e6..18e9e7cc 100644 --- a/api/instance/v1/instance_sdk.go +++ b/api/instance/v1/instance_sdk.go @@ -693,11 +693,11 @@ type Dashboard struct { ServersCount uint32 `json:"servers_count"` - IpsCount uint32 `json:"ips_count"` + IPsCount uint32 `json:"ips_count"` SecurityGroupsCount uint32 `json:"security_groups_count"` - IpsUnused uint32 `json:"ips_unused"` + IPsUnused uint32 `json:"ips_unused"` } type GetBootscriptResponse struct { @@ -802,14 +802,14 @@ type ListComputeClustersResponse struct { TotalCount uint32 `json:"total_count"` } -type ListImagesResponse struct { - Images []*Image `json:"images"` +type ListIPsResponse struct { + IPs []*IP `json:"ips"` TotalCount uint32 `json:"total_count"` } -type ListIpsResponse struct { - Ips []*IP `json:"ips"` +type ListImagesResponse struct { + Images []*Image `json:"images"` TotalCount uint32 `json:"total_count"` } @@ -3801,7 +3801,7 @@ func (s *API) DeleteComputeClusterServers(req *DeleteComputeClusterServersReques return nil } -type ListIpsRequest struct { +type ListIPsRequest struct { Zone scw.Zone `json:"-"` Organization *string `json:"-"` @@ -3813,8 +3813,8 @@ type ListIpsRequest struct { Page *int32 `json:"-"` } -// ListIps list IPs -func (s *API) ListIps(req *ListIpsRequest, opts ...scw.RequestOption) (*ListIpsResponse, error) { +// ListIPs list IPs +func (s *API) ListIPs(req *ListIPsRequest, opts ...scw.RequestOption) (*ListIPsResponse, error) { var err error defaultOrganization, exist := s.client.GetDefaultOrganizationID() @@ -3849,7 +3849,7 @@ func (s *API) ListIps(req *ListIpsRequest, opts ...scw.RequestOption) (*ListIpsR Headers: http.Header{}, } - var resp ListIpsResponse + var resp ListIPsResponse err = s.client.Do(scwReq, &resp, opts...) if err != nil { @@ -3860,21 +3860,21 @@ func (s *API) ListIps(req *ListIpsRequest, opts ...scw.RequestOption) (*ListIpsR // UnsafeGetTotalCount should not be used // Internal usage only -func (r *ListIpsResponse) UnsafeGetTotalCount() int { +func (r *ListIPsResponse) UnsafeGetTotalCount() int { return int(r.TotalCount) } // UnsafeAppend should not be used // Internal usage only -func (r *ListIpsResponse) UnsafeAppend(res interface{}) (int, scw.SdkError) { - results, ok := res.(*ListIpsResponse) +func (r *ListIPsResponse) UnsafeAppend(res interface{}) (int, scw.SdkError) { + results, ok := res.(*ListIPsResponse) if !ok { return 0, errors.New("%T type cannot be appended to type %T", res, r) } - r.Ips = append(r.Ips, results.Ips...) - r.TotalCount += uint32(len(results.Ips)) - return len(results.Ips), nil + r.IPs = append(r.IPs, results.IPs...) + r.TotalCount += uint32(len(results.IPs)) + return len(results.IPs), nil } type CreateIPRequest struct { diff --git a/api/instance/v1/instance_utils.go b/api/instance/v1/instance_utils.go index 096e90c5..aaf7b40d 100644 --- a/api/instance/v1/instance_utils.go +++ b/api/instance/v1/instance_utils.go @@ -236,7 +236,7 @@ func (r *ListBootscriptsResponse) UnsafeSetTotalCount(totalCount int) { // UnsafeSetTotalCount should not be used // Internal usage only -func (r *ListIpsResponse) UnsafeSetTotalCount(totalCount int) { +func (r *ListIPsResponse) UnsafeSetTotalCount(totalCount int) { r.TotalCount = uint32(totalCount) } diff --git a/api/lb/v1/lb_sdk.go b/api/lb/v1/lb_sdk.go index 883a0515..2306edc2 100644 --- a/api/lb/v1/lb_sdk.go +++ b/api/lb/v1/lb_sdk.go @@ -1095,8 +1095,8 @@ type LbType struct { } type ListACLResponse struct { - // Acls list of Acl object (see Acl object description) - Acls []*ACL `json:"acls"` + // ACLs list of Acl object (see Acl object description) + ACLs []*ACL `json:"acls"` // TotalCount result count TotalCount uint32 `json:"total_count"` } @@ -1121,9 +1121,9 @@ type ListFrontendsResponse struct { TotalCount uint32 `json:"total_count"` } -type ListIpsResponse struct { - // Ips list IP address object - Ips []*IP `json:"ips"` +type ListIPsResponse struct { + // IPs list IP address object + IPs []*IP `json:"ips"` // TotalCount total count, wihtout pagination TotalCount uint32 `json:"total_count"` } @@ -1445,7 +1445,7 @@ type ListIPsRequest struct { } // ListIPs list IPs -func (s *API) ListIPs(req *ListIPsRequest, opts ...scw.RequestOption) (*ListIpsResponse, error) { +func (s *API) ListIPs(req *ListIPsRequest, opts ...scw.RequestOption) (*ListIPsResponse, error) { var err error defaultOrganizationID, exist := s.client.GetDefaultOrganizationID() @@ -1480,7 +1480,7 @@ func (s *API) ListIPs(req *ListIPsRequest, opts ...scw.RequestOption) (*ListIpsR Headers: http.Header{}, } - var resp ListIpsResponse + var resp ListIPsResponse err = s.client.Do(scwReq, &resp, opts...) if err != nil { @@ -1491,21 +1491,21 @@ func (s *API) ListIPs(req *ListIPsRequest, opts ...scw.RequestOption) (*ListIpsR // UnsafeGetTotalCount should not be used // Internal usage only -func (r *ListIpsResponse) UnsafeGetTotalCount() int { +func (r *ListIPsResponse) UnsafeGetTotalCount() int { return int(r.TotalCount) } // UnsafeAppend should not be used // Internal usage only -func (r *ListIpsResponse) UnsafeAppend(res interface{}) (int, scw.SdkError) { - results, ok := res.(*ListIpsResponse) +func (r *ListIPsResponse) UnsafeAppend(res interface{}) (int, scw.SdkError) { + results, ok := res.(*ListIPsResponse) if !ok { return 0, errors.New("%T type cannot be appended to type %T", res, r) } - r.Ips = append(r.Ips, results.Ips...) - r.TotalCount += uint32(len(results.Ips)) - return len(results.Ips), nil + r.IPs = append(r.IPs, results.IPs...) + r.TotalCount += uint32(len(results.IPs)) + return len(results.IPs), nil } type GetIPRequest struct { @@ -2619,7 +2619,7 @@ func (s *API) GetLbStats(req *GetLbStatsRequest, opts ...scw.RequestOption) (*Lb return &resp, nil } -type ListAclsRequest struct { +type ListACLsRequest struct { Region scw.Region `json:"-"` // FrontendID iD of your frontend FrontendID string `json:"-"` @@ -2635,7 +2635,7 @@ type ListAclsRequest struct { Name *string `json:"-"` } -func (s *API) ListAcls(req *ListAclsRequest, opts ...scw.RequestOption) (*ListACLResponse, error) { +func (s *API) ListACLs(req *ListACLsRequest, opts ...scw.RequestOption) (*ListACLResponse, error) { var err error if req.Region == "" { @@ -2692,9 +2692,9 @@ func (r *ListACLResponse) UnsafeAppend(res interface{}) (int, scw.SdkError) { return 0, errors.New("%T type cannot be appended to type %T", res, r) } - r.Acls = append(r.Acls, results.Acls...) - r.TotalCount += uint32(len(results.Acls)) - return len(results.Acls), nil + r.ACLs = append(r.ACLs, results.ACLs...) + r.TotalCount += uint32(len(results.ACLs)) + return len(results.ACLs), nil } type CreateACLRequest struct {