Skip to content

Commit

Permalink
chore(sdk): generate go extend sdk (2024-09-04T19:55:59+00:00)
Browse files Browse the repository at this point in the history
generated from openapi spec commit: 5446e393985f5839a02be651746283c12430aed5
  • Loading branch information
Ubuntu authored and rulisastra committed Sep 6, 2024
1 parent 1ad4178 commit f8ff29b
Show file tree
Hide file tree
Showing 518 changed files with 38,092 additions and 10,652 deletions.
21 changes: 21 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,24 @@
<a name="v0.73.0"></a>
## [v0.73.0]
### feat
- **:** add websocket client base implementation
### test
- **lobby:** add tests for websocket client lobby implementation
- **integration:** match2 - update alliance ruleset
- **integration:** add inventory integration test
- **core:** improve websocket connection status
### docs
- **readme:** improve lobby implementation
### chore
- **:** improve the core and test
- **:** linter issue
- **:** refactor the code and test
- **:** update readme, migration guide, test, and samples for lobby websocket
- **:** testing using pong
### fix
- **utils:** data races


<a name="v0.72.0"></a>
## [v0.72.0]
### docs
Expand Down
65 changes: 65 additions & 0 deletions ams-sdk/pkg/amsclient/fleets/fleet_servers_parameters.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ import (
"github.com/go-openapi/runtime"
cr "github.com/go-openapi/runtime/client"
"github.com/go-openapi/strfmt"
"github.com/go-openapi/swag"
)

// NewFleetServersParams creates a new FleetServersParams object
Expand Down Expand Up @@ -74,6 +75,16 @@ type FleetServersParams struct {
*/
Namespace string
/*Count
the data limit
*/
Count *string
/*Offset
the data offset
*/
Offset *int64

timeout time.Duration
AuthInfoWriter runtime.ClientAuthInfoWriter
Expand Down Expand Up @@ -162,6 +173,28 @@ func (o *FleetServersParams) SetNamespace(namespace string) {
o.Namespace = namespace
}

// WithCount adds the count to the fleet servers params
func (o *FleetServersParams) WithCount(count *string) *FleetServersParams {
o.SetCount(count)
return o
}

// SetCount adds the count to the fleet servers params
func (o *FleetServersParams) SetCount(count *string) {
o.Count = count
}

// WithOffset adds the offset to the fleet servers params
func (o *FleetServersParams) WithOffset(offset *int64) *FleetServersParams {
o.SetOffset(offset)
return o
}

// SetOffset adds the offset to the fleet servers params
func (o *FleetServersParams) SetOffset(offset *int64) {
o.Offset = offset
}

// WriteToRequest writes these params to a swagger request
func (o *FleetServersParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error {

Expand All @@ -180,6 +213,38 @@ func (o *FleetServersParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.
return err
}

if o.Count != nil {

// query param count
var qrCount string
if o.Count != nil {
qrCount = *o.Count
}
qCount := qrCount
if qCount != "" {
if err := r.SetQueryParam("count", qCount); err != nil {
return err
}
}

}

if o.Offset != nil {

// query param offset
var qrOffset int64
if o.Offset != nil {
qrOffset = *o.Offset
}
qOffset := swag.FormatInt64(qrOffset)
if qOffset != "" {
if err := r.SetQueryParam("offset", qOffset); err != nil {
return err
}
}

}

// setting the default header value
if err := r.SetHeaderParam("User-Agent", utils.UserAgentGen()); err != nil {
return err
Expand Down
25 changes: 25 additions & 0 deletions ams-sdk/pkg/amsclientmodels/api_fleet_servers_response.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,10 @@ import (
// swagger:model Api fleet servers response.
type APIFleetServersResponse struct {

// paging
// Required: true
Paging *APIPagingInfo `json:"paging"`

// regions
// Required: true
Regions []*APIFleetRegionalServerCounts `json:"regions"`
Expand All @@ -33,6 +37,9 @@ type APIFleetServersResponse struct {
func (m *APIFleetServersResponse) Validate(formats strfmt.Registry) error {
var res []error

if err := m.validatePaging(formats); err != nil {
res = append(res, err)
}
if err := m.validateRegions(formats); err != nil {
res = append(res, err)
}
Expand All @@ -46,6 +53,24 @@ func (m *APIFleetServersResponse) Validate(formats strfmt.Registry) error {
return nil
}

func (m *APIFleetServersResponse) validatePaging(formats strfmt.Registry) error {

if err := validate.Required("paging", "body", m.Paging); err != nil {
return err
}

if m.Paging != nil {
if err := m.Paging.Validate(formats); err != nil {
if ve, ok := err.(*errors.Validation); ok {
return ve.ValidateName("paging")
}
return err
}
}

return nil
}

func (m *APIFleetServersResponse) validateRegions(formats strfmt.Registry) error {

if err := validate.Required("regions", "body", m.Regions); err != nil {
Expand Down
4 changes: 2 additions & 2 deletions basic-sdk/pkg/basicclient/misc/get_languages_responses.go
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ func NewGetLanguagesOK() *GetLanguagesOK {
successful operation
*/
type GetLanguagesOK struct {
Payload map[string]interface{}
Payload map[string]string
}

func (o *GetLanguagesOK) Error() string {
Expand All @@ -88,7 +88,7 @@ func (o *GetLanguagesOK) ToJSONString() string {
return fmt.Sprintf("%+v", string(b))
}

func (o *GetLanguagesOK) GetPayload() map[string]interface{} {
func (o *GetLanguagesOK) GetPayload() map[string]string {
return o.Payload
}

Expand Down

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,12 @@ func (o *AdminEvaluateProgressReader) ReadResponse(response runtime.ClientRespon
return nil, err
}
return result, nil
case 400:
result := NewAdminEvaluateProgressBadRequest()
if err := result.readResponse(response, consumer, o.formats); err != nil {
return nil, err
}
return result, nil
case 401:
result := NewAdminEvaluateProgressUnauthorized()
if err := result.readResponse(response, consumer, o.formats); err != nil {
Expand Down Expand Up @@ -94,6 +100,59 @@ func (o *AdminEvaluateProgressNoContent) readResponse(response runtime.ClientRes
return nil
}

// NewAdminEvaluateProgressBadRequest creates a AdminEvaluateProgressBadRequest with default headers values
func NewAdminEvaluateProgressBadRequest() *AdminEvaluateProgressBadRequest {
return &AdminEvaluateProgressBadRequest{}
}

/*AdminEvaluateProgressBadRequest handles this case with default header values.
<table><tr><td>errorCode</td><td>errorMessage</td></tr><tr><td>20018</td><td>bad request: {{message}}</td></tr></table>
*/
type AdminEvaluateProgressBadRequest struct {
Payload *challengeclientmodels.IamErrorResponse
}

func (o *AdminEvaluateProgressBadRequest) Error() string {
return fmt.Sprintf("[POST /challenge/v1/admin/namespaces/{namespace}/progress/evaluate][%d] adminEvaluateProgressBadRequest %+v", 400, o.ToJSONString())
}

func (o *AdminEvaluateProgressBadRequest) ToJSONString() string {
if o.Payload == nil {
return "{}"
}

b, err := json.Marshal(o.Payload)
if err != nil {
fmt.Println(err)

return fmt.Sprintf("Failed to marshal the payload: %+v", o.Payload)
}

return fmt.Sprintf("%+v", string(b))
}

func (o *AdminEvaluateProgressBadRequest) GetPayload() *challengeclientmodels.IamErrorResponse {
return o.Payload
}

func (o *AdminEvaluateProgressBadRequest) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
// handle file responses
contentDisposition := response.GetHeader("Content-Disposition")
if strings.Contains(strings.ToLower(contentDisposition), "filename=") {
consumer = runtime.ByteStreamConsumer()
}

o.Payload = new(challengeclientmodels.IamErrorResponse)

// response payload
if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF {
return err
}

return nil
}

// NewAdminEvaluateProgressUnauthorized creates a AdminEvaluateProgressUnauthorized with default headers values
func NewAdminEvaluateProgressUnauthorized() *AdminEvaluateProgressUnauthorized {
return &AdminEvaluateProgressUnauthorized{}
Expand Down

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit f8ff29b

Please sign in to comment.