diff --git a/client.go b/client.go index 929be6c..9c348d9 100644 --- a/client.go +++ b/client.go @@ -27,7 +27,7 @@ type Client interface { // jobs GetJobs(ctx context.Context, grp models.AppRunnerJobGroup, status models.AppRunnerJobStatus, limit *int64) ([]*models.AppRunnerJob, error) GetJob(ctx context.Context, jobID string) (*models.AppRunnerJob, error) - GetJobPlan(ctx context.Context, jobID string) (*models.Planv1Plan, error) + GetJobPlanJSON(ctx context.Context, jobID string) (string, error) // job executions GetJobExecutions(ctx context.Context, jobID string) ([]*models.AppRunnerJobExecution, error) diff --git a/client/operations/add_user_parameters.go b/client/operations/add_user_parameters.go deleted file mode 100644 index b18db81..0000000 --- a/client/operations/add_user_parameters.go +++ /dev/null @@ -1,153 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package operations - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "context" - "net/http" - "time" - - "github.com/go-openapi/errors" - "github.com/go-openapi/runtime" - cr "github.com/go-openapi/runtime/client" - "github.com/go-openapi/strfmt" - - "github.com/nuonco/nuon-go/models" -) - -// NewAddUserParams creates a new AddUserParams object, -// with the default timeout for this client. -// -// Default values are not hydrated, since defaults are normally applied by the API server side. -// -// To enforce default values in parameter, use SetDefaults or WithDefaults. -func NewAddUserParams() *AddUserParams { - return &AddUserParams{ - timeout: cr.DefaultTimeout, - } -} - -// NewAddUserParamsWithTimeout creates a new AddUserParams object -// with the ability to set a timeout on a request. -func NewAddUserParamsWithTimeout(timeout time.Duration) *AddUserParams { - return &AddUserParams{ - timeout: timeout, - } -} - -// NewAddUserParamsWithContext creates a new AddUserParams object -// with the ability to set a context for a request. -func NewAddUserParamsWithContext(ctx context.Context) *AddUserParams { - return &AddUserParams{ - Context: ctx, - } -} - -// NewAddUserParamsWithHTTPClient creates a new AddUserParams object -// with the ability to set a custom HTTPClient for a request. -func NewAddUserParamsWithHTTPClient(client *http.Client) *AddUserParams { - return &AddUserParams{ - HTTPClient: client, - } -} - -/* -AddUserParams contains all the parameters to send to the API endpoint - - for the add user operation. - - Typically these are written to a http.Request. -*/ -type AddUserParams struct { - - /* Req. - - Input - */ - Req *models.ServiceCreateOrgUserRequest - - timeout time.Duration - Context context.Context - HTTPClient *http.Client -} - -// WithDefaults hydrates default values in the add user params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *AddUserParams) WithDefaults() *AddUserParams { - o.SetDefaults() - return o -} - -// SetDefaults hydrates default values in the add user params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *AddUserParams) SetDefaults() { - // no default values defined for this parameter -} - -// WithTimeout adds the timeout to the add user params -func (o *AddUserParams) WithTimeout(timeout time.Duration) *AddUserParams { - o.SetTimeout(timeout) - return o -} - -// SetTimeout adds the timeout to the add user params -func (o *AddUserParams) SetTimeout(timeout time.Duration) { - o.timeout = timeout -} - -// WithContext adds the context to the add user params -func (o *AddUserParams) WithContext(ctx context.Context) *AddUserParams { - o.SetContext(ctx) - return o -} - -// SetContext adds the context to the add user params -func (o *AddUserParams) SetContext(ctx context.Context) { - o.Context = ctx -} - -// WithHTTPClient adds the HTTPClient to the add user params -func (o *AddUserParams) WithHTTPClient(client *http.Client) *AddUserParams { - o.SetHTTPClient(client) - return o -} - -// SetHTTPClient adds the HTTPClient to the add user params -func (o *AddUserParams) SetHTTPClient(client *http.Client) { - o.HTTPClient = client -} - -// WithReq adds the req to the add user params -func (o *AddUserParams) WithReq(req *models.ServiceCreateOrgUserRequest) *AddUserParams { - o.SetReq(req) - return o -} - -// SetReq adds the req to the add user params -func (o *AddUserParams) SetReq(req *models.ServiceCreateOrgUserRequest) { - o.Req = req -} - -// WriteToRequest writes these params to a swagger request -func (o *AddUserParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { - - if err := r.SetTimeout(o.timeout); err != nil { - return err - } - var res []error - if o.Req != nil { - if err := r.SetBodyParam(o.Req); err != nil { - return err - } - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} diff --git a/client/operations/add_user_responses.go b/client/operations/add_user_responses.go deleted file mode 100644 index a75ae56..0000000 --- a/client/operations/add_user_responses.go +++ /dev/null @@ -1,486 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package operations - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "encoding/json" - "fmt" - "io" - - "github.com/go-openapi/runtime" - "github.com/go-openapi/strfmt" - - "github.com/nuonco/nuon-go/models" -) - -// AddUserReader is a Reader for the AddUser structure. -type AddUserReader struct { - formats strfmt.Registry -} - -// ReadResponse reads a server response into the received o. -func (o *AddUserReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { - switch response.Code() { - case 201: - result := NewAddUserCreated() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return result, nil - case 400: - result := NewAddUserBadRequest() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return nil, result - case 401: - result := NewAddUserUnauthorized() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return nil, result - case 403: - result := NewAddUserForbidden() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return nil, result - case 404: - result := NewAddUserNotFound() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return nil, result - case 500: - result := NewAddUserInternalServerError() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return nil, result - default: - return nil, runtime.NewAPIError("[POST /v1/orgs/current/user] AddUser", response, response.Code()) - } -} - -// NewAddUserCreated creates a AddUserCreated with default headers values -func NewAddUserCreated() *AddUserCreated { - return &AddUserCreated{} -} - -/* -AddUserCreated describes a response with status code 201, with default header values. - -Created -*/ -type AddUserCreated struct { - Payload *models.AppAccount -} - -// IsSuccess returns true when this add user created response has a 2xx status code -func (o *AddUserCreated) IsSuccess() bool { - return true -} - -// IsRedirect returns true when this add user created response has a 3xx status code -func (o *AddUserCreated) IsRedirect() bool { - return false -} - -// IsClientError returns true when this add user created response has a 4xx status code -func (o *AddUserCreated) IsClientError() bool { - return false -} - -// IsServerError returns true when this add user created response has a 5xx status code -func (o *AddUserCreated) IsServerError() bool { - return false -} - -// IsCode returns true when this add user created response a status code equal to that given -func (o *AddUserCreated) IsCode(code int) bool { - return code == 201 -} - -// Code gets the status code for the add user created response -func (o *AddUserCreated) Code() int { - return 201 -} - -func (o *AddUserCreated) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[POST /v1/orgs/current/user][%d] addUserCreated %s", 201, payload) -} - -func (o *AddUserCreated) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[POST /v1/orgs/current/user][%d] addUserCreated %s", 201, payload) -} - -func (o *AddUserCreated) GetPayload() *models.AppAccount { - return o.Payload -} - -func (o *AddUserCreated) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.AppAccount) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewAddUserBadRequest creates a AddUserBadRequest with default headers values -func NewAddUserBadRequest() *AddUserBadRequest { - return &AddUserBadRequest{} -} - -/* -AddUserBadRequest describes a response with status code 400, with default header values. - -Bad Request -*/ -type AddUserBadRequest struct { - Payload *models.StderrErrResponse -} - -// IsSuccess returns true when this add user bad request response has a 2xx status code -func (o *AddUserBadRequest) IsSuccess() bool { - return false -} - -// IsRedirect returns true when this add user bad request response has a 3xx status code -func (o *AddUserBadRequest) IsRedirect() bool { - return false -} - -// IsClientError returns true when this add user bad request response has a 4xx status code -func (o *AddUserBadRequest) IsClientError() bool { - return true -} - -// IsServerError returns true when this add user bad request response has a 5xx status code -func (o *AddUserBadRequest) IsServerError() bool { - return false -} - -// IsCode returns true when this add user bad request response a status code equal to that given -func (o *AddUserBadRequest) IsCode(code int) bool { - return code == 400 -} - -// Code gets the status code for the add user bad request response -func (o *AddUserBadRequest) Code() int { - return 400 -} - -func (o *AddUserBadRequest) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[POST /v1/orgs/current/user][%d] addUserBadRequest %s", 400, payload) -} - -func (o *AddUserBadRequest) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[POST /v1/orgs/current/user][%d] addUserBadRequest %s", 400, payload) -} - -func (o *AddUserBadRequest) GetPayload() *models.StderrErrResponse { - return o.Payload -} - -func (o *AddUserBadRequest) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.StderrErrResponse) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewAddUserUnauthorized creates a AddUserUnauthorized with default headers values -func NewAddUserUnauthorized() *AddUserUnauthorized { - return &AddUserUnauthorized{} -} - -/* -AddUserUnauthorized describes a response with status code 401, with default header values. - -Unauthorized -*/ -type AddUserUnauthorized struct { - Payload *models.StderrErrResponse -} - -// IsSuccess returns true when this add user unauthorized response has a 2xx status code -func (o *AddUserUnauthorized) IsSuccess() bool { - return false -} - -// IsRedirect returns true when this add user unauthorized response has a 3xx status code -func (o *AddUserUnauthorized) IsRedirect() bool { - return false -} - -// IsClientError returns true when this add user unauthorized response has a 4xx status code -func (o *AddUserUnauthorized) IsClientError() bool { - return true -} - -// IsServerError returns true when this add user unauthorized response has a 5xx status code -func (o *AddUserUnauthorized) IsServerError() bool { - return false -} - -// IsCode returns true when this add user unauthorized response a status code equal to that given -func (o *AddUserUnauthorized) IsCode(code int) bool { - return code == 401 -} - -// Code gets the status code for the add user unauthorized response -func (o *AddUserUnauthorized) Code() int { - return 401 -} - -func (o *AddUserUnauthorized) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[POST /v1/orgs/current/user][%d] addUserUnauthorized %s", 401, payload) -} - -func (o *AddUserUnauthorized) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[POST /v1/orgs/current/user][%d] addUserUnauthorized %s", 401, payload) -} - -func (o *AddUserUnauthorized) GetPayload() *models.StderrErrResponse { - return o.Payload -} - -func (o *AddUserUnauthorized) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.StderrErrResponse) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewAddUserForbidden creates a AddUserForbidden with default headers values -func NewAddUserForbidden() *AddUserForbidden { - return &AddUserForbidden{} -} - -/* -AddUserForbidden describes a response with status code 403, with default header values. - -Forbidden -*/ -type AddUserForbidden struct { - Payload *models.StderrErrResponse -} - -// IsSuccess returns true when this add user forbidden response has a 2xx status code -func (o *AddUserForbidden) IsSuccess() bool { - return false -} - -// IsRedirect returns true when this add user forbidden response has a 3xx status code -func (o *AddUserForbidden) IsRedirect() bool { - return false -} - -// IsClientError returns true when this add user forbidden response has a 4xx status code -func (o *AddUserForbidden) IsClientError() bool { - return true -} - -// IsServerError returns true when this add user forbidden response has a 5xx status code -func (o *AddUserForbidden) IsServerError() bool { - return false -} - -// IsCode returns true when this add user forbidden response a status code equal to that given -func (o *AddUserForbidden) IsCode(code int) bool { - return code == 403 -} - -// Code gets the status code for the add user forbidden response -func (o *AddUserForbidden) Code() int { - return 403 -} - -func (o *AddUserForbidden) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[POST /v1/orgs/current/user][%d] addUserForbidden %s", 403, payload) -} - -func (o *AddUserForbidden) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[POST /v1/orgs/current/user][%d] addUserForbidden %s", 403, payload) -} - -func (o *AddUserForbidden) GetPayload() *models.StderrErrResponse { - return o.Payload -} - -func (o *AddUserForbidden) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.StderrErrResponse) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewAddUserNotFound creates a AddUserNotFound with default headers values -func NewAddUserNotFound() *AddUserNotFound { - return &AddUserNotFound{} -} - -/* -AddUserNotFound describes a response with status code 404, with default header values. - -Not Found -*/ -type AddUserNotFound struct { - Payload *models.StderrErrResponse -} - -// IsSuccess returns true when this add user not found response has a 2xx status code -func (o *AddUserNotFound) IsSuccess() bool { - return false -} - -// IsRedirect returns true when this add user not found response has a 3xx status code -func (o *AddUserNotFound) IsRedirect() bool { - return false -} - -// IsClientError returns true when this add user not found response has a 4xx status code -func (o *AddUserNotFound) IsClientError() bool { - return true -} - -// IsServerError returns true when this add user not found response has a 5xx status code -func (o *AddUserNotFound) IsServerError() bool { - return false -} - -// IsCode returns true when this add user not found response a status code equal to that given -func (o *AddUserNotFound) IsCode(code int) bool { - return code == 404 -} - -// Code gets the status code for the add user not found response -func (o *AddUserNotFound) Code() int { - return 404 -} - -func (o *AddUserNotFound) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[POST /v1/orgs/current/user][%d] addUserNotFound %s", 404, payload) -} - -func (o *AddUserNotFound) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[POST /v1/orgs/current/user][%d] addUserNotFound %s", 404, payload) -} - -func (o *AddUserNotFound) GetPayload() *models.StderrErrResponse { - return o.Payload -} - -func (o *AddUserNotFound) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.StderrErrResponse) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewAddUserInternalServerError creates a AddUserInternalServerError with default headers values -func NewAddUserInternalServerError() *AddUserInternalServerError { - return &AddUserInternalServerError{} -} - -/* -AddUserInternalServerError describes a response with status code 500, with default header values. - -Internal Server Error -*/ -type AddUserInternalServerError struct { - Payload *models.StderrErrResponse -} - -// IsSuccess returns true when this add user internal server error response has a 2xx status code -func (o *AddUserInternalServerError) IsSuccess() bool { - return false -} - -// IsRedirect returns true when this add user internal server error response has a 3xx status code -func (o *AddUserInternalServerError) IsRedirect() bool { - return false -} - -// IsClientError returns true when this add user internal server error response has a 4xx status code -func (o *AddUserInternalServerError) IsClientError() bool { - return false -} - -// IsServerError returns true when this add user internal server error response has a 5xx status code -func (o *AddUserInternalServerError) IsServerError() bool { - return true -} - -// IsCode returns true when this add user internal server error response a status code equal to that given -func (o *AddUserInternalServerError) IsCode(code int) bool { - return code == 500 -} - -// Code gets the status code for the add user internal server error response -func (o *AddUserInternalServerError) Code() int { - return 500 -} - -func (o *AddUserInternalServerError) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[POST /v1/orgs/current/user][%d] addUserInternalServerError %s", 500, payload) -} - -func (o *AddUserInternalServerError) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[POST /v1/orgs/current/user][%d] addUserInternalServerError %s", 500, payload) -} - -func (o *AddUserInternalServerError) GetPayload() *models.StderrErrResponse { - return o.Payload -} - -func (o *AddUserInternalServerError) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.StderrErrResponse) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} diff --git a/client/operations/create_app_config_parameters.go b/client/operations/create_app_config_parameters.go deleted file mode 100644 index 03a3b38..0000000 --- a/client/operations/create_app_config_parameters.go +++ /dev/null @@ -1,175 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package operations - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "context" - "net/http" - "time" - - "github.com/go-openapi/errors" - "github.com/go-openapi/runtime" - cr "github.com/go-openapi/runtime/client" - "github.com/go-openapi/strfmt" - - "github.com/nuonco/nuon-go/models" -) - -// NewCreateAppConfigParams creates a new CreateAppConfigParams object, -// with the default timeout for this client. -// -// Default values are not hydrated, since defaults are normally applied by the API server side. -// -// To enforce default values in parameter, use SetDefaults or WithDefaults. -func NewCreateAppConfigParams() *CreateAppConfigParams { - return &CreateAppConfigParams{ - timeout: cr.DefaultTimeout, - } -} - -// NewCreateAppConfigParamsWithTimeout creates a new CreateAppConfigParams object -// with the ability to set a timeout on a request. -func NewCreateAppConfigParamsWithTimeout(timeout time.Duration) *CreateAppConfigParams { - return &CreateAppConfigParams{ - timeout: timeout, - } -} - -// NewCreateAppConfigParamsWithContext creates a new CreateAppConfigParams object -// with the ability to set a context for a request. -func NewCreateAppConfigParamsWithContext(ctx context.Context) *CreateAppConfigParams { - return &CreateAppConfigParams{ - Context: ctx, - } -} - -// NewCreateAppConfigParamsWithHTTPClient creates a new CreateAppConfigParams object -// with the ability to set a custom HTTPClient for a request. -func NewCreateAppConfigParamsWithHTTPClient(client *http.Client) *CreateAppConfigParams { - return &CreateAppConfigParams{ - HTTPClient: client, - } -} - -/* -CreateAppConfigParams contains all the parameters to send to the API endpoint - - for the create app config operation. - - Typically these are written to a http.Request. -*/ -type CreateAppConfigParams struct { - - /* AppID. - - app ID - */ - AppID string - - /* Req. - - Input - */ - Req *models.ServiceCreateAppConfigRequest - - timeout time.Duration - Context context.Context - HTTPClient *http.Client -} - -// WithDefaults hydrates default values in the create app config params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *CreateAppConfigParams) WithDefaults() *CreateAppConfigParams { - o.SetDefaults() - return o -} - -// SetDefaults hydrates default values in the create app config params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *CreateAppConfigParams) SetDefaults() { - // no default values defined for this parameter -} - -// WithTimeout adds the timeout to the create app config params -func (o *CreateAppConfigParams) WithTimeout(timeout time.Duration) *CreateAppConfigParams { - o.SetTimeout(timeout) - return o -} - -// SetTimeout adds the timeout to the create app config params -func (o *CreateAppConfigParams) SetTimeout(timeout time.Duration) { - o.timeout = timeout -} - -// WithContext adds the context to the create app config params -func (o *CreateAppConfigParams) WithContext(ctx context.Context) *CreateAppConfigParams { - o.SetContext(ctx) - return o -} - -// SetContext adds the context to the create app config params -func (o *CreateAppConfigParams) SetContext(ctx context.Context) { - o.Context = ctx -} - -// WithHTTPClient adds the HTTPClient to the create app config params -func (o *CreateAppConfigParams) WithHTTPClient(client *http.Client) *CreateAppConfigParams { - o.SetHTTPClient(client) - return o -} - -// SetHTTPClient adds the HTTPClient to the create app config params -func (o *CreateAppConfigParams) SetHTTPClient(client *http.Client) { - o.HTTPClient = client -} - -// WithAppID adds the appID to the create app config params -func (o *CreateAppConfigParams) WithAppID(appID string) *CreateAppConfigParams { - o.SetAppID(appID) - return o -} - -// SetAppID adds the appId to the create app config params -func (o *CreateAppConfigParams) SetAppID(appID string) { - o.AppID = appID -} - -// WithReq adds the req to the create app config params -func (o *CreateAppConfigParams) WithReq(req *models.ServiceCreateAppConfigRequest) *CreateAppConfigParams { - o.SetReq(req) - return o -} - -// SetReq adds the req to the create app config params -func (o *CreateAppConfigParams) SetReq(req *models.ServiceCreateAppConfigRequest) { - o.Req = req -} - -// WriteToRequest writes these params to a swagger request -func (o *CreateAppConfigParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { - - if err := r.SetTimeout(o.timeout); err != nil { - return err - } - var res []error - - // path param app_id - if err := r.SetPathParam("app_id", o.AppID); err != nil { - return err - } - if o.Req != nil { - if err := r.SetBodyParam(o.Req); err != nil { - return err - } - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} diff --git a/client/operations/create_app_config_responses.go b/client/operations/create_app_config_responses.go deleted file mode 100644 index 237ddf4..0000000 --- a/client/operations/create_app_config_responses.go +++ /dev/null @@ -1,486 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package operations - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "encoding/json" - "fmt" - "io" - - "github.com/go-openapi/runtime" - "github.com/go-openapi/strfmt" - - "github.com/nuonco/nuon-go/models" -) - -// CreateAppConfigReader is a Reader for the CreateAppConfig structure. -type CreateAppConfigReader struct { - formats strfmt.Registry -} - -// ReadResponse reads a server response into the received o. -func (o *CreateAppConfigReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { - switch response.Code() { - case 201: - result := NewCreateAppConfigCreated() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return result, nil - case 400: - result := NewCreateAppConfigBadRequest() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return nil, result - case 401: - result := NewCreateAppConfigUnauthorized() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return nil, result - case 403: - result := NewCreateAppConfigForbidden() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return nil, result - case 404: - result := NewCreateAppConfigNotFound() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return nil, result - case 500: - result := NewCreateAppConfigInternalServerError() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return nil, result - default: - return nil, runtime.NewAPIError("[POST /v1/apps/{app_id}/config] CreateAppConfig", response, response.Code()) - } -} - -// NewCreateAppConfigCreated creates a CreateAppConfigCreated with default headers values -func NewCreateAppConfigCreated() *CreateAppConfigCreated { - return &CreateAppConfigCreated{} -} - -/* -CreateAppConfigCreated describes a response with status code 201, with default header values. - -Created -*/ -type CreateAppConfigCreated struct { - Payload *models.AppAppConfig -} - -// IsSuccess returns true when this create app config created response has a 2xx status code -func (o *CreateAppConfigCreated) IsSuccess() bool { - return true -} - -// IsRedirect returns true when this create app config created response has a 3xx status code -func (o *CreateAppConfigCreated) IsRedirect() bool { - return false -} - -// IsClientError returns true when this create app config created response has a 4xx status code -func (o *CreateAppConfigCreated) IsClientError() bool { - return false -} - -// IsServerError returns true when this create app config created response has a 5xx status code -func (o *CreateAppConfigCreated) IsServerError() bool { - return false -} - -// IsCode returns true when this create app config created response a status code equal to that given -func (o *CreateAppConfigCreated) IsCode(code int) bool { - return code == 201 -} - -// Code gets the status code for the create app config created response -func (o *CreateAppConfigCreated) Code() int { - return 201 -} - -func (o *CreateAppConfigCreated) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[POST /v1/apps/{app_id}/config][%d] createAppConfigCreated %s", 201, payload) -} - -func (o *CreateAppConfigCreated) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[POST /v1/apps/{app_id}/config][%d] createAppConfigCreated %s", 201, payload) -} - -func (o *CreateAppConfigCreated) GetPayload() *models.AppAppConfig { - return o.Payload -} - -func (o *CreateAppConfigCreated) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.AppAppConfig) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewCreateAppConfigBadRequest creates a CreateAppConfigBadRequest with default headers values -func NewCreateAppConfigBadRequest() *CreateAppConfigBadRequest { - return &CreateAppConfigBadRequest{} -} - -/* -CreateAppConfigBadRequest describes a response with status code 400, with default header values. - -Bad Request -*/ -type CreateAppConfigBadRequest struct { - Payload *models.StderrErrResponse -} - -// IsSuccess returns true when this create app config bad request response has a 2xx status code -func (o *CreateAppConfigBadRequest) IsSuccess() bool { - return false -} - -// IsRedirect returns true when this create app config bad request response has a 3xx status code -func (o *CreateAppConfigBadRequest) IsRedirect() bool { - return false -} - -// IsClientError returns true when this create app config bad request response has a 4xx status code -func (o *CreateAppConfigBadRequest) IsClientError() bool { - return true -} - -// IsServerError returns true when this create app config bad request response has a 5xx status code -func (o *CreateAppConfigBadRequest) IsServerError() bool { - return false -} - -// IsCode returns true when this create app config bad request response a status code equal to that given -func (o *CreateAppConfigBadRequest) IsCode(code int) bool { - return code == 400 -} - -// Code gets the status code for the create app config bad request response -func (o *CreateAppConfigBadRequest) Code() int { - return 400 -} - -func (o *CreateAppConfigBadRequest) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[POST /v1/apps/{app_id}/config][%d] createAppConfigBadRequest %s", 400, payload) -} - -func (o *CreateAppConfigBadRequest) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[POST /v1/apps/{app_id}/config][%d] createAppConfigBadRequest %s", 400, payload) -} - -func (o *CreateAppConfigBadRequest) GetPayload() *models.StderrErrResponse { - return o.Payload -} - -func (o *CreateAppConfigBadRequest) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.StderrErrResponse) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewCreateAppConfigUnauthorized creates a CreateAppConfigUnauthorized with default headers values -func NewCreateAppConfigUnauthorized() *CreateAppConfigUnauthorized { - return &CreateAppConfigUnauthorized{} -} - -/* -CreateAppConfigUnauthorized describes a response with status code 401, with default header values. - -Unauthorized -*/ -type CreateAppConfigUnauthorized struct { - Payload *models.StderrErrResponse -} - -// IsSuccess returns true when this create app config unauthorized response has a 2xx status code -func (o *CreateAppConfigUnauthorized) IsSuccess() bool { - return false -} - -// IsRedirect returns true when this create app config unauthorized response has a 3xx status code -func (o *CreateAppConfigUnauthorized) IsRedirect() bool { - return false -} - -// IsClientError returns true when this create app config unauthorized response has a 4xx status code -func (o *CreateAppConfigUnauthorized) IsClientError() bool { - return true -} - -// IsServerError returns true when this create app config unauthorized response has a 5xx status code -func (o *CreateAppConfigUnauthorized) IsServerError() bool { - return false -} - -// IsCode returns true when this create app config unauthorized response a status code equal to that given -func (o *CreateAppConfigUnauthorized) IsCode(code int) bool { - return code == 401 -} - -// Code gets the status code for the create app config unauthorized response -func (o *CreateAppConfigUnauthorized) Code() int { - return 401 -} - -func (o *CreateAppConfigUnauthorized) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[POST /v1/apps/{app_id}/config][%d] createAppConfigUnauthorized %s", 401, payload) -} - -func (o *CreateAppConfigUnauthorized) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[POST /v1/apps/{app_id}/config][%d] createAppConfigUnauthorized %s", 401, payload) -} - -func (o *CreateAppConfigUnauthorized) GetPayload() *models.StderrErrResponse { - return o.Payload -} - -func (o *CreateAppConfigUnauthorized) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.StderrErrResponse) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewCreateAppConfigForbidden creates a CreateAppConfigForbidden with default headers values -func NewCreateAppConfigForbidden() *CreateAppConfigForbidden { - return &CreateAppConfigForbidden{} -} - -/* -CreateAppConfigForbidden describes a response with status code 403, with default header values. - -Forbidden -*/ -type CreateAppConfigForbidden struct { - Payload *models.StderrErrResponse -} - -// IsSuccess returns true when this create app config forbidden response has a 2xx status code -func (o *CreateAppConfigForbidden) IsSuccess() bool { - return false -} - -// IsRedirect returns true when this create app config forbidden response has a 3xx status code -func (o *CreateAppConfigForbidden) IsRedirect() bool { - return false -} - -// IsClientError returns true when this create app config forbidden response has a 4xx status code -func (o *CreateAppConfigForbidden) IsClientError() bool { - return true -} - -// IsServerError returns true when this create app config forbidden response has a 5xx status code -func (o *CreateAppConfigForbidden) IsServerError() bool { - return false -} - -// IsCode returns true when this create app config forbidden response a status code equal to that given -func (o *CreateAppConfigForbidden) IsCode(code int) bool { - return code == 403 -} - -// Code gets the status code for the create app config forbidden response -func (o *CreateAppConfigForbidden) Code() int { - return 403 -} - -func (o *CreateAppConfigForbidden) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[POST /v1/apps/{app_id}/config][%d] createAppConfigForbidden %s", 403, payload) -} - -func (o *CreateAppConfigForbidden) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[POST /v1/apps/{app_id}/config][%d] createAppConfigForbidden %s", 403, payload) -} - -func (o *CreateAppConfigForbidden) GetPayload() *models.StderrErrResponse { - return o.Payload -} - -func (o *CreateAppConfigForbidden) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.StderrErrResponse) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewCreateAppConfigNotFound creates a CreateAppConfigNotFound with default headers values -func NewCreateAppConfigNotFound() *CreateAppConfigNotFound { - return &CreateAppConfigNotFound{} -} - -/* -CreateAppConfigNotFound describes a response with status code 404, with default header values. - -Not Found -*/ -type CreateAppConfigNotFound struct { - Payload *models.StderrErrResponse -} - -// IsSuccess returns true when this create app config not found response has a 2xx status code -func (o *CreateAppConfigNotFound) IsSuccess() bool { - return false -} - -// IsRedirect returns true when this create app config not found response has a 3xx status code -func (o *CreateAppConfigNotFound) IsRedirect() bool { - return false -} - -// IsClientError returns true when this create app config not found response has a 4xx status code -func (o *CreateAppConfigNotFound) IsClientError() bool { - return true -} - -// IsServerError returns true when this create app config not found response has a 5xx status code -func (o *CreateAppConfigNotFound) IsServerError() bool { - return false -} - -// IsCode returns true when this create app config not found response a status code equal to that given -func (o *CreateAppConfigNotFound) IsCode(code int) bool { - return code == 404 -} - -// Code gets the status code for the create app config not found response -func (o *CreateAppConfigNotFound) Code() int { - return 404 -} - -func (o *CreateAppConfigNotFound) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[POST /v1/apps/{app_id}/config][%d] createAppConfigNotFound %s", 404, payload) -} - -func (o *CreateAppConfigNotFound) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[POST /v1/apps/{app_id}/config][%d] createAppConfigNotFound %s", 404, payload) -} - -func (o *CreateAppConfigNotFound) GetPayload() *models.StderrErrResponse { - return o.Payload -} - -func (o *CreateAppConfigNotFound) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.StderrErrResponse) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewCreateAppConfigInternalServerError creates a CreateAppConfigInternalServerError with default headers values -func NewCreateAppConfigInternalServerError() *CreateAppConfigInternalServerError { - return &CreateAppConfigInternalServerError{} -} - -/* -CreateAppConfigInternalServerError describes a response with status code 500, with default header values. - -Internal Server Error -*/ -type CreateAppConfigInternalServerError struct { - Payload *models.StderrErrResponse -} - -// IsSuccess returns true when this create app config internal server error response has a 2xx status code -func (o *CreateAppConfigInternalServerError) IsSuccess() bool { - return false -} - -// IsRedirect returns true when this create app config internal server error response has a 3xx status code -func (o *CreateAppConfigInternalServerError) IsRedirect() bool { - return false -} - -// IsClientError returns true when this create app config internal server error response has a 4xx status code -func (o *CreateAppConfigInternalServerError) IsClientError() bool { - return false -} - -// IsServerError returns true when this create app config internal server error response has a 5xx status code -func (o *CreateAppConfigInternalServerError) IsServerError() bool { - return true -} - -// IsCode returns true when this create app config internal server error response a status code equal to that given -func (o *CreateAppConfigInternalServerError) IsCode(code int) bool { - return code == 500 -} - -// Code gets the status code for the create app config internal server error response -func (o *CreateAppConfigInternalServerError) Code() int { - return 500 -} - -func (o *CreateAppConfigInternalServerError) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[POST /v1/apps/{app_id}/config][%d] createAppConfigInternalServerError %s", 500, payload) -} - -func (o *CreateAppConfigInternalServerError) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[POST /v1/apps/{app_id}/config][%d] createAppConfigInternalServerError %s", 500, payload) -} - -func (o *CreateAppConfigInternalServerError) GetPayload() *models.StderrErrResponse { - return o.Payload -} - -func (o *CreateAppConfigInternalServerError) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.StderrErrResponse) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} diff --git a/client/operations/create_app_input_config_parameters.go b/client/operations/create_app_input_config_parameters.go deleted file mode 100644 index 38b5eee..0000000 --- a/client/operations/create_app_input_config_parameters.go +++ /dev/null @@ -1,175 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package operations - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "context" - "net/http" - "time" - - "github.com/go-openapi/errors" - "github.com/go-openapi/runtime" - cr "github.com/go-openapi/runtime/client" - "github.com/go-openapi/strfmt" - - "github.com/nuonco/nuon-go/models" -) - -// NewCreateAppInputConfigParams creates a new CreateAppInputConfigParams object, -// with the default timeout for this client. -// -// Default values are not hydrated, since defaults are normally applied by the API server side. -// -// To enforce default values in parameter, use SetDefaults or WithDefaults. -func NewCreateAppInputConfigParams() *CreateAppInputConfigParams { - return &CreateAppInputConfigParams{ - timeout: cr.DefaultTimeout, - } -} - -// NewCreateAppInputConfigParamsWithTimeout creates a new CreateAppInputConfigParams object -// with the ability to set a timeout on a request. -func NewCreateAppInputConfigParamsWithTimeout(timeout time.Duration) *CreateAppInputConfigParams { - return &CreateAppInputConfigParams{ - timeout: timeout, - } -} - -// NewCreateAppInputConfigParamsWithContext creates a new CreateAppInputConfigParams object -// with the ability to set a context for a request. -func NewCreateAppInputConfigParamsWithContext(ctx context.Context) *CreateAppInputConfigParams { - return &CreateAppInputConfigParams{ - Context: ctx, - } -} - -// NewCreateAppInputConfigParamsWithHTTPClient creates a new CreateAppInputConfigParams object -// with the ability to set a custom HTTPClient for a request. -func NewCreateAppInputConfigParamsWithHTTPClient(client *http.Client) *CreateAppInputConfigParams { - return &CreateAppInputConfigParams{ - HTTPClient: client, - } -} - -/* -CreateAppInputConfigParams contains all the parameters to send to the API endpoint - - for the create app input config operation. - - Typically these are written to a http.Request. -*/ -type CreateAppInputConfigParams struct { - - /* AppID. - - app ID - */ - AppID string - - /* Req. - - Input - */ - Req *models.ServiceCreateAppInputConfigRequest - - timeout time.Duration - Context context.Context - HTTPClient *http.Client -} - -// WithDefaults hydrates default values in the create app input config params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *CreateAppInputConfigParams) WithDefaults() *CreateAppInputConfigParams { - o.SetDefaults() - return o -} - -// SetDefaults hydrates default values in the create app input config params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *CreateAppInputConfigParams) SetDefaults() { - // no default values defined for this parameter -} - -// WithTimeout adds the timeout to the create app input config params -func (o *CreateAppInputConfigParams) WithTimeout(timeout time.Duration) *CreateAppInputConfigParams { - o.SetTimeout(timeout) - return o -} - -// SetTimeout adds the timeout to the create app input config params -func (o *CreateAppInputConfigParams) SetTimeout(timeout time.Duration) { - o.timeout = timeout -} - -// WithContext adds the context to the create app input config params -func (o *CreateAppInputConfigParams) WithContext(ctx context.Context) *CreateAppInputConfigParams { - o.SetContext(ctx) - return o -} - -// SetContext adds the context to the create app input config params -func (o *CreateAppInputConfigParams) SetContext(ctx context.Context) { - o.Context = ctx -} - -// WithHTTPClient adds the HTTPClient to the create app input config params -func (o *CreateAppInputConfigParams) WithHTTPClient(client *http.Client) *CreateAppInputConfigParams { - o.SetHTTPClient(client) - return o -} - -// SetHTTPClient adds the HTTPClient to the create app input config params -func (o *CreateAppInputConfigParams) SetHTTPClient(client *http.Client) { - o.HTTPClient = client -} - -// WithAppID adds the appID to the create app input config params -func (o *CreateAppInputConfigParams) WithAppID(appID string) *CreateAppInputConfigParams { - o.SetAppID(appID) - return o -} - -// SetAppID adds the appId to the create app input config params -func (o *CreateAppInputConfigParams) SetAppID(appID string) { - o.AppID = appID -} - -// WithReq adds the req to the create app input config params -func (o *CreateAppInputConfigParams) WithReq(req *models.ServiceCreateAppInputConfigRequest) *CreateAppInputConfigParams { - o.SetReq(req) - return o -} - -// SetReq adds the req to the create app input config params -func (o *CreateAppInputConfigParams) SetReq(req *models.ServiceCreateAppInputConfigRequest) { - o.Req = req -} - -// WriteToRequest writes these params to a swagger request -func (o *CreateAppInputConfigParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { - - if err := r.SetTimeout(o.timeout); err != nil { - return err - } - var res []error - - // path param app_id - if err := r.SetPathParam("app_id", o.AppID); err != nil { - return err - } - if o.Req != nil { - if err := r.SetBodyParam(o.Req); err != nil { - return err - } - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} diff --git a/client/operations/create_app_input_config_responses.go b/client/operations/create_app_input_config_responses.go deleted file mode 100644 index 2c654cb..0000000 --- a/client/operations/create_app_input_config_responses.go +++ /dev/null @@ -1,486 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package operations - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "encoding/json" - "fmt" - "io" - - "github.com/go-openapi/runtime" - "github.com/go-openapi/strfmt" - - "github.com/nuonco/nuon-go/models" -) - -// CreateAppInputConfigReader is a Reader for the CreateAppInputConfig structure. -type CreateAppInputConfigReader struct { - formats strfmt.Registry -} - -// ReadResponse reads a server response into the received o. -func (o *CreateAppInputConfigReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { - switch response.Code() { - case 201: - result := NewCreateAppInputConfigCreated() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return result, nil - case 400: - result := NewCreateAppInputConfigBadRequest() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return nil, result - case 401: - result := NewCreateAppInputConfigUnauthorized() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return nil, result - case 403: - result := NewCreateAppInputConfigForbidden() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return nil, result - case 404: - result := NewCreateAppInputConfigNotFound() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return nil, result - case 500: - result := NewCreateAppInputConfigInternalServerError() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return nil, result - default: - return nil, runtime.NewAPIError("[POST /v1/apps/{app_id}/input-config] CreateAppInputConfig", response, response.Code()) - } -} - -// NewCreateAppInputConfigCreated creates a CreateAppInputConfigCreated with default headers values -func NewCreateAppInputConfigCreated() *CreateAppInputConfigCreated { - return &CreateAppInputConfigCreated{} -} - -/* -CreateAppInputConfigCreated describes a response with status code 201, with default header values. - -Created -*/ -type CreateAppInputConfigCreated struct { - Payload *models.AppAppInputConfig -} - -// IsSuccess returns true when this create app input config created response has a 2xx status code -func (o *CreateAppInputConfigCreated) IsSuccess() bool { - return true -} - -// IsRedirect returns true when this create app input config created response has a 3xx status code -func (o *CreateAppInputConfigCreated) IsRedirect() bool { - return false -} - -// IsClientError returns true when this create app input config created response has a 4xx status code -func (o *CreateAppInputConfigCreated) IsClientError() bool { - return false -} - -// IsServerError returns true when this create app input config created response has a 5xx status code -func (o *CreateAppInputConfigCreated) IsServerError() bool { - return false -} - -// IsCode returns true when this create app input config created response a status code equal to that given -func (o *CreateAppInputConfigCreated) IsCode(code int) bool { - return code == 201 -} - -// Code gets the status code for the create app input config created response -func (o *CreateAppInputConfigCreated) Code() int { - return 201 -} - -func (o *CreateAppInputConfigCreated) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[POST /v1/apps/{app_id}/input-config][%d] createAppInputConfigCreated %s", 201, payload) -} - -func (o *CreateAppInputConfigCreated) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[POST /v1/apps/{app_id}/input-config][%d] createAppInputConfigCreated %s", 201, payload) -} - -func (o *CreateAppInputConfigCreated) GetPayload() *models.AppAppInputConfig { - return o.Payload -} - -func (o *CreateAppInputConfigCreated) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.AppAppInputConfig) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewCreateAppInputConfigBadRequest creates a CreateAppInputConfigBadRequest with default headers values -func NewCreateAppInputConfigBadRequest() *CreateAppInputConfigBadRequest { - return &CreateAppInputConfigBadRequest{} -} - -/* -CreateAppInputConfigBadRequest describes a response with status code 400, with default header values. - -Bad Request -*/ -type CreateAppInputConfigBadRequest struct { - Payload *models.StderrErrResponse -} - -// IsSuccess returns true when this create app input config bad request response has a 2xx status code -func (o *CreateAppInputConfigBadRequest) IsSuccess() bool { - return false -} - -// IsRedirect returns true when this create app input config bad request response has a 3xx status code -func (o *CreateAppInputConfigBadRequest) IsRedirect() bool { - return false -} - -// IsClientError returns true when this create app input config bad request response has a 4xx status code -func (o *CreateAppInputConfigBadRequest) IsClientError() bool { - return true -} - -// IsServerError returns true when this create app input config bad request response has a 5xx status code -func (o *CreateAppInputConfigBadRequest) IsServerError() bool { - return false -} - -// IsCode returns true when this create app input config bad request response a status code equal to that given -func (o *CreateAppInputConfigBadRequest) IsCode(code int) bool { - return code == 400 -} - -// Code gets the status code for the create app input config bad request response -func (o *CreateAppInputConfigBadRequest) Code() int { - return 400 -} - -func (o *CreateAppInputConfigBadRequest) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[POST /v1/apps/{app_id}/input-config][%d] createAppInputConfigBadRequest %s", 400, payload) -} - -func (o *CreateAppInputConfigBadRequest) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[POST /v1/apps/{app_id}/input-config][%d] createAppInputConfigBadRequest %s", 400, payload) -} - -func (o *CreateAppInputConfigBadRequest) GetPayload() *models.StderrErrResponse { - return o.Payload -} - -func (o *CreateAppInputConfigBadRequest) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.StderrErrResponse) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewCreateAppInputConfigUnauthorized creates a CreateAppInputConfigUnauthorized with default headers values -func NewCreateAppInputConfigUnauthorized() *CreateAppInputConfigUnauthorized { - return &CreateAppInputConfigUnauthorized{} -} - -/* -CreateAppInputConfigUnauthorized describes a response with status code 401, with default header values. - -Unauthorized -*/ -type CreateAppInputConfigUnauthorized struct { - Payload *models.StderrErrResponse -} - -// IsSuccess returns true when this create app input config unauthorized response has a 2xx status code -func (o *CreateAppInputConfigUnauthorized) IsSuccess() bool { - return false -} - -// IsRedirect returns true when this create app input config unauthorized response has a 3xx status code -func (o *CreateAppInputConfigUnauthorized) IsRedirect() bool { - return false -} - -// IsClientError returns true when this create app input config unauthorized response has a 4xx status code -func (o *CreateAppInputConfigUnauthorized) IsClientError() bool { - return true -} - -// IsServerError returns true when this create app input config unauthorized response has a 5xx status code -func (o *CreateAppInputConfigUnauthorized) IsServerError() bool { - return false -} - -// IsCode returns true when this create app input config unauthorized response a status code equal to that given -func (o *CreateAppInputConfigUnauthorized) IsCode(code int) bool { - return code == 401 -} - -// Code gets the status code for the create app input config unauthorized response -func (o *CreateAppInputConfigUnauthorized) Code() int { - return 401 -} - -func (o *CreateAppInputConfigUnauthorized) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[POST /v1/apps/{app_id}/input-config][%d] createAppInputConfigUnauthorized %s", 401, payload) -} - -func (o *CreateAppInputConfigUnauthorized) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[POST /v1/apps/{app_id}/input-config][%d] createAppInputConfigUnauthorized %s", 401, payload) -} - -func (o *CreateAppInputConfigUnauthorized) GetPayload() *models.StderrErrResponse { - return o.Payload -} - -func (o *CreateAppInputConfigUnauthorized) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.StderrErrResponse) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewCreateAppInputConfigForbidden creates a CreateAppInputConfigForbidden with default headers values -func NewCreateAppInputConfigForbidden() *CreateAppInputConfigForbidden { - return &CreateAppInputConfigForbidden{} -} - -/* -CreateAppInputConfigForbidden describes a response with status code 403, with default header values. - -Forbidden -*/ -type CreateAppInputConfigForbidden struct { - Payload *models.StderrErrResponse -} - -// IsSuccess returns true when this create app input config forbidden response has a 2xx status code -func (o *CreateAppInputConfigForbidden) IsSuccess() bool { - return false -} - -// IsRedirect returns true when this create app input config forbidden response has a 3xx status code -func (o *CreateAppInputConfigForbidden) IsRedirect() bool { - return false -} - -// IsClientError returns true when this create app input config forbidden response has a 4xx status code -func (o *CreateAppInputConfigForbidden) IsClientError() bool { - return true -} - -// IsServerError returns true when this create app input config forbidden response has a 5xx status code -func (o *CreateAppInputConfigForbidden) IsServerError() bool { - return false -} - -// IsCode returns true when this create app input config forbidden response a status code equal to that given -func (o *CreateAppInputConfigForbidden) IsCode(code int) bool { - return code == 403 -} - -// Code gets the status code for the create app input config forbidden response -func (o *CreateAppInputConfigForbidden) Code() int { - return 403 -} - -func (o *CreateAppInputConfigForbidden) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[POST /v1/apps/{app_id}/input-config][%d] createAppInputConfigForbidden %s", 403, payload) -} - -func (o *CreateAppInputConfigForbidden) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[POST /v1/apps/{app_id}/input-config][%d] createAppInputConfigForbidden %s", 403, payload) -} - -func (o *CreateAppInputConfigForbidden) GetPayload() *models.StderrErrResponse { - return o.Payload -} - -func (o *CreateAppInputConfigForbidden) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.StderrErrResponse) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewCreateAppInputConfigNotFound creates a CreateAppInputConfigNotFound with default headers values -func NewCreateAppInputConfigNotFound() *CreateAppInputConfigNotFound { - return &CreateAppInputConfigNotFound{} -} - -/* -CreateAppInputConfigNotFound describes a response with status code 404, with default header values. - -Not Found -*/ -type CreateAppInputConfigNotFound struct { - Payload *models.StderrErrResponse -} - -// IsSuccess returns true when this create app input config not found response has a 2xx status code -func (o *CreateAppInputConfigNotFound) IsSuccess() bool { - return false -} - -// IsRedirect returns true when this create app input config not found response has a 3xx status code -func (o *CreateAppInputConfigNotFound) IsRedirect() bool { - return false -} - -// IsClientError returns true when this create app input config not found response has a 4xx status code -func (o *CreateAppInputConfigNotFound) IsClientError() bool { - return true -} - -// IsServerError returns true when this create app input config not found response has a 5xx status code -func (o *CreateAppInputConfigNotFound) IsServerError() bool { - return false -} - -// IsCode returns true when this create app input config not found response a status code equal to that given -func (o *CreateAppInputConfigNotFound) IsCode(code int) bool { - return code == 404 -} - -// Code gets the status code for the create app input config not found response -func (o *CreateAppInputConfigNotFound) Code() int { - return 404 -} - -func (o *CreateAppInputConfigNotFound) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[POST /v1/apps/{app_id}/input-config][%d] createAppInputConfigNotFound %s", 404, payload) -} - -func (o *CreateAppInputConfigNotFound) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[POST /v1/apps/{app_id}/input-config][%d] createAppInputConfigNotFound %s", 404, payload) -} - -func (o *CreateAppInputConfigNotFound) GetPayload() *models.StderrErrResponse { - return o.Payload -} - -func (o *CreateAppInputConfigNotFound) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.StderrErrResponse) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewCreateAppInputConfigInternalServerError creates a CreateAppInputConfigInternalServerError with default headers values -func NewCreateAppInputConfigInternalServerError() *CreateAppInputConfigInternalServerError { - return &CreateAppInputConfigInternalServerError{} -} - -/* -CreateAppInputConfigInternalServerError describes a response with status code 500, with default header values. - -Internal Server Error -*/ -type CreateAppInputConfigInternalServerError struct { - Payload *models.StderrErrResponse -} - -// IsSuccess returns true when this create app input config internal server error response has a 2xx status code -func (o *CreateAppInputConfigInternalServerError) IsSuccess() bool { - return false -} - -// IsRedirect returns true when this create app input config internal server error response has a 3xx status code -func (o *CreateAppInputConfigInternalServerError) IsRedirect() bool { - return false -} - -// IsClientError returns true when this create app input config internal server error response has a 4xx status code -func (o *CreateAppInputConfigInternalServerError) IsClientError() bool { - return false -} - -// IsServerError returns true when this create app input config internal server error response has a 5xx status code -func (o *CreateAppInputConfigInternalServerError) IsServerError() bool { - return true -} - -// IsCode returns true when this create app input config internal server error response a status code equal to that given -func (o *CreateAppInputConfigInternalServerError) IsCode(code int) bool { - return code == 500 -} - -// Code gets the status code for the create app input config internal server error response -func (o *CreateAppInputConfigInternalServerError) Code() int { - return 500 -} - -func (o *CreateAppInputConfigInternalServerError) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[POST /v1/apps/{app_id}/input-config][%d] createAppInputConfigInternalServerError %s", 500, payload) -} - -func (o *CreateAppInputConfigInternalServerError) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[POST /v1/apps/{app_id}/input-config][%d] createAppInputConfigInternalServerError %s", 500, payload) -} - -func (o *CreateAppInputConfigInternalServerError) GetPayload() *models.StderrErrResponse { - return o.Payload -} - -func (o *CreateAppInputConfigInternalServerError) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.StderrErrResponse) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} diff --git a/client/operations/create_app_parameters.go b/client/operations/create_app_parameters.go deleted file mode 100644 index ba736a3..0000000 --- a/client/operations/create_app_parameters.go +++ /dev/null @@ -1,153 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package operations - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "context" - "net/http" - "time" - - "github.com/go-openapi/errors" - "github.com/go-openapi/runtime" - cr "github.com/go-openapi/runtime/client" - "github.com/go-openapi/strfmt" - - "github.com/nuonco/nuon-go/models" -) - -// NewCreateAppParams creates a new CreateAppParams object, -// with the default timeout for this client. -// -// Default values are not hydrated, since defaults are normally applied by the API server side. -// -// To enforce default values in parameter, use SetDefaults or WithDefaults. -func NewCreateAppParams() *CreateAppParams { - return &CreateAppParams{ - timeout: cr.DefaultTimeout, - } -} - -// NewCreateAppParamsWithTimeout creates a new CreateAppParams object -// with the ability to set a timeout on a request. -func NewCreateAppParamsWithTimeout(timeout time.Duration) *CreateAppParams { - return &CreateAppParams{ - timeout: timeout, - } -} - -// NewCreateAppParamsWithContext creates a new CreateAppParams object -// with the ability to set a context for a request. -func NewCreateAppParamsWithContext(ctx context.Context) *CreateAppParams { - return &CreateAppParams{ - Context: ctx, - } -} - -// NewCreateAppParamsWithHTTPClient creates a new CreateAppParams object -// with the ability to set a custom HTTPClient for a request. -func NewCreateAppParamsWithHTTPClient(client *http.Client) *CreateAppParams { - return &CreateAppParams{ - HTTPClient: client, - } -} - -/* -CreateAppParams contains all the parameters to send to the API endpoint - - for the create app operation. - - Typically these are written to a http.Request. -*/ -type CreateAppParams struct { - - /* Req. - - Input - */ - Req *models.ServiceCreateAppRequest - - timeout time.Duration - Context context.Context - HTTPClient *http.Client -} - -// WithDefaults hydrates default values in the create app params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *CreateAppParams) WithDefaults() *CreateAppParams { - o.SetDefaults() - return o -} - -// SetDefaults hydrates default values in the create app params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *CreateAppParams) SetDefaults() { - // no default values defined for this parameter -} - -// WithTimeout adds the timeout to the create app params -func (o *CreateAppParams) WithTimeout(timeout time.Duration) *CreateAppParams { - o.SetTimeout(timeout) - return o -} - -// SetTimeout adds the timeout to the create app params -func (o *CreateAppParams) SetTimeout(timeout time.Duration) { - o.timeout = timeout -} - -// WithContext adds the context to the create app params -func (o *CreateAppParams) WithContext(ctx context.Context) *CreateAppParams { - o.SetContext(ctx) - return o -} - -// SetContext adds the context to the create app params -func (o *CreateAppParams) SetContext(ctx context.Context) { - o.Context = ctx -} - -// WithHTTPClient adds the HTTPClient to the create app params -func (o *CreateAppParams) WithHTTPClient(client *http.Client) *CreateAppParams { - o.SetHTTPClient(client) - return o -} - -// SetHTTPClient adds the HTTPClient to the create app params -func (o *CreateAppParams) SetHTTPClient(client *http.Client) { - o.HTTPClient = client -} - -// WithReq adds the req to the create app params -func (o *CreateAppParams) WithReq(req *models.ServiceCreateAppRequest) *CreateAppParams { - o.SetReq(req) - return o -} - -// SetReq adds the req to the create app params -func (o *CreateAppParams) SetReq(req *models.ServiceCreateAppRequest) { - o.Req = req -} - -// WriteToRequest writes these params to a swagger request -func (o *CreateAppParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { - - if err := r.SetTimeout(o.timeout); err != nil { - return err - } - var res []error - if o.Req != nil { - if err := r.SetBodyParam(o.Req); err != nil { - return err - } - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} diff --git a/client/operations/create_app_responses.go b/client/operations/create_app_responses.go deleted file mode 100644 index ed908c8..0000000 --- a/client/operations/create_app_responses.go +++ /dev/null @@ -1,486 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package operations - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "encoding/json" - "fmt" - "io" - - "github.com/go-openapi/runtime" - "github.com/go-openapi/strfmt" - - "github.com/nuonco/nuon-go/models" -) - -// CreateAppReader is a Reader for the CreateApp structure. -type CreateAppReader struct { - formats strfmt.Registry -} - -// ReadResponse reads a server response into the received o. -func (o *CreateAppReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { - switch response.Code() { - case 201: - result := NewCreateAppCreated() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return result, nil - case 400: - result := NewCreateAppBadRequest() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return nil, result - case 401: - result := NewCreateAppUnauthorized() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return nil, result - case 403: - result := NewCreateAppForbidden() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return nil, result - case 404: - result := NewCreateAppNotFound() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return nil, result - case 500: - result := NewCreateAppInternalServerError() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return nil, result - default: - return nil, runtime.NewAPIError("[POST /v1/apps] CreateApp", response, response.Code()) - } -} - -// NewCreateAppCreated creates a CreateAppCreated with default headers values -func NewCreateAppCreated() *CreateAppCreated { - return &CreateAppCreated{} -} - -/* -CreateAppCreated describes a response with status code 201, with default header values. - -Created -*/ -type CreateAppCreated struct { - Payload *models.AppApp -} - -// IsSuccess returns true when this create app created response has a 2xx status code -func (o *CreateAppCreated) IsSuccess() bool { - return true -} - -// IsRedirect returns true when this create app created response has a 3xx status code -func (o *CreateAppCreated) IsRedirect() bool { - return false -} - -// IsClientError returns true when this create app created response has a 4xx status code -func (o *CreateAppCreated) IsClientError() bool { - return false -} - -// IsServerError returns true when this create app created response has a 5xx status code -func (o *CreateAppCreated) IsServerError() bool { - return false -} - -// IsCode returns true when this create app created response a status code equal to that given -func (o *CreateAppCreated) IsCode(code int) bool { - return code == 201 -} - -// Code gets the status code for the create app created response -func (o *CreateAppCreated) Code() int { - return 201 -} - -func (o *CreateAppCreated) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[POST /v1/apps][%d] createAppCreated %s", 201, payload) -} - -func (o *CreateAppCreated) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[POST /v1/apps][%d] createAppCreated %s", 201, payload) -} - -func (o *CreateAppCreated) GetPayload() *models.AppApp { - return o.Payload -} - -func (o *CreateAppCreated) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.AppApp) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewCreateAppBadRequest creates a CreateAppBadRequest with default headers values -func NewCreateAppBadRequest() *CreateAppBadRequest { - return &CreateAppBadRequest{} -} - -/* -CreateAppBadRequest describes a response with status code 400, with default header values. - -Bad Request -*/ -type CreateAppBadRequest struct { - Payload *models.StderrErrResponse -} - -// IsSuccess returns true when this create app bad request response has a 2xx status code -func (o *CreateAppBadRequest) IsSuccess() bool { - return false -} - -// IsRedirect returns true when this create app bad request response has a 3xx status code -func (o *CreateAppBadRequest) IsRedirect() bool { - return false -} - -// IsClientError returns true when this create app bad request response has a 4xx status code -func (o *CreateAppBadRequest) IsClientError() bool { - return true -} - -// IsServerError returns true when this create app bad request response has a 5xx status code -func (o *CreateAppBadRequest) IsServerError() bool { - return false -} - -// IsCode returns true when this create app bad request response a status code equal to that given -func (o *CreateAppBadRequest) IsCode(code int) bool { - return code == 400 -} - -// Code gets the status code for the create app bad request response -func (o *CreateAppBadRequest) Code() int { - return 400 -} - -func (o *CreateAppBadRequest) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[POST /v1/apps][%d] createAppBadRequest %s", 400, payload) -} - -func (o *CreateAppBadRequest) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[POST /v1/apps][%d] createAppBadRequest %s", 400, payload) -} - -func (o *CreateAppBadRequest) GetPayload() *models.StderrErrResponse { - return o.Payload -} - -func (o *CreateAppBadRequest) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.StderrErrResponse) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewCreateAppUnauthorized creates a CreateAppUnauthorized with default headers values -func NewCreateAppUnauthorized() *CreateAppUnauthorized { - return &CreateAppUnauthorized{} -} - -/* -CreateAppUnauthorized describes a response with status code 401, with default header values. - -Unauthorized -*/ -type CreateAppUnauthorized struct { - Payload *models.StderrErrResponse -} - -// IsSuccess returns true when this create app unauthorized response has a 2xx status code -func (o *CreateAppUnauthorized) IsSuccess() bool { - return false -} - -// IsRedirect returns true when this create app unauthorized response has a 3xx status code -func (o *CreateAppUnauthorized) IsRedirect() bool { - return false -} - -// IsClientError returns true when this create app unauthorized response has a 4xx status code -func (o *CreateAppUnauthorized) IsClientError() bool { - return true -} - -// IsServerError returns true when this create app unauthorized response has a 5xx status code -func (o *CreateAppUnauthorized) IsServerError() bool { - return false -} - -// IsCode returns true when this create app unauthorized response a status code equal to that given -func (o *CreateAppUnauthorized) IsCode(code int) bool { - return code == 401 -} - -// Code gets the status code for the create app unauthorized response -func (o *CreateAppUnauthorized) Code() int { - return 401 -} - -func (o *CreateAppUnauthorized) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[POST /v1/apps][%d] createAppUnauthorized %s", 401, payload) -} - -func (o *CreateAppUnauthorized) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[POST /v1/apps][%d] createAppUnauthorized %s", 401, payload) -} - -func (o *CreateAppUnauthorized) GetPayload() *models.StderrErrResponse { - return o.Payload -} - -func (o *CreateAppUnauthorized) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.StderrErrResponse) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewCreateAppForbidden creates a CreateAppForbidden with default headers values -func NewCreateAppForbidden() *CreateAppForbidden { - return &CreateAppForbidden{} -} - -/* -CreateAppForbidden describes a response with status code 403, with default header values. - -Forbidden -*/ -type CreateAppForbidden struct { - Payload *models.StderrErrResponse -} - -// IsSuccess returns true when this create app forbidden response has a 2xx status code -func (o *CreateAppForbidden) IsSuccess() bool { - return false -} - -// IsRedirect returns true when this create app forbidden response has a 3xx status code -func (o *CreateAppForbidden) IsRedirect() bool { - return false -} - -// IsClientError returns true when this create app forbidden response has a 4xx status code -func (o *CreateAppForbidden) IsClientError() bool { - return true -} - -// IsServerError returns true when this create app forbidden response has a 5xx status code -func (o *CreateAppForbidden) IsServerError() bool { - return false -} - -// IsCode returns true when this create app forbidden response a status code equal to that given -func (o *CreateAppForbidden) IsCode(code int) bool { - return code == 403 -} - -// Code gets the status code for the create app forbidden response -func (o *CreateAppForbidden) Code() int { - return 403 -} - -func (o *CreateAppForbidden) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[POST /v1/apps][%d] createAppForbidden %s", 403, payload) -} - -func (o *CreateAppForbidden) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[POST /v1/apps][%d] createAppForbidden %s", 403, payload) -} - -func (o *CreateAppForbidden) GetPayload() *models.StderrErrResponse { - return o.Payload -} - -func (o *CreateAppForbidden) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.StderrErrResponse) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewCreateAppNotFound creates a CreateAppNotFound with default headers values -func NewCreateAppNotFound() *CreateAppNotFound { - return &CreateAppNotFound{} -} - -/* -CreateAppNotFound describes a response with status code 404, with default header values. - -Not Found -*/ -type CreateAppNotFound struct { - Payload *models.StderrErrResponse -} - -// IsSuccess returns true when this create app not found response has a 2xx status code -func (o *CreateAppNotFound) IsSuccess() bool { - return false -} - -// IsRedirect returns true when this create app not found response has a 3xx status code -func (o *CreateAppNotFound) IsRedirect() bool { - return false -} - -// IsClientError returns true when this create app not found response has a 4xx status code -func (o *CreateAppNotFound) IsClientError() bool { - return true -} - -// IsServerError returns true when this create app not found response has a 5xx status code -func (o *CreateAppNotFound) IsServerError() bool { - return false -} - -// IsCode returns true when this create app not found response a status code equal to that given -func (o *CreateAppNotFound) IsCode(code int) bool { - return code == 404 -} - -// Code gets the status code for the create app not found response -func (o *CreateAppNotFound) Code() int { - return 404 -} - -func (o *CreateAppNotFound) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[POST /v1/apps][%d] createAppNotFound %s", 404, payload) -} - -func (o *CreateAppNotFound) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[POST /v1/apps][%d] createAppNotFound %s", 404, payload) -} - -func (o *CreateAppNotFound) GetPayload() *models.StderrErrResponse { - return o.Payload -} - -func (o *CreateAppNotFound) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.StderrErrResponse) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewCreateAppInternalServerError creates a CreateAppInternalServerError with default headers values -func NewCreateAppInternalServerError() *CreateAppInternalServerError { - return &CreateAppInternalServerError{} -} - -/* -CreateAppInternalServerError describes a response with status code 500, with default header values. - -Internal Server Error -*/ -type CreateAppInternalServerError struct { - Payload *models.StderrErrResponse -} - -// IsSuccess returns true when this create app internal server error response has a 2xx status code -func (o *CreateAppInternalServerError) IsSuccess() bool { - return false -} - -// IsRedirect returns true when this create app internal server error response has a 3xx status code -func (o *CreateAppInternalServerError) IsRedirect() bool { - return false -} - -// IsClientError returns true when this create app internal server error response has a 4xx status code -func (o *CreateAppInternalServerError) IsClientError() bool { - return false -} - -// IsServerError returns true when this create app internal server error response has a 5xx status code -func (o *CreateAppInternalServerError) IsServerError() bool { - return true -} - -// IsCode returns true when this create app internal server error response a status code equal to that given -func (o *CreateAppInternalServerError) IsCode(code int) bool { - return code == 500 -} - -// Code gets the status code for the create app internal server error response -func (o *CreateAppInternalServerError) Code() int { - return 500 -} - -func (o *CreateAppInternalServerError) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[POST /v1/apps][%d] createAppInternalServerError %s", 500, payload) -} - -func (o *CreateAppInternalServerError) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[POST /v1/apps][%d] createAppInternalServerError %s", 500, payload) -} - -func (o *CreateAppInternalServerError) GetPayload() *models.StderrErrResponse { - return o.Payload -} - -func (o *CreateAppInternalServerError) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.StderrErrResponse) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} diff --git a/client/operations/create_app_runner_config_parameters.go b/client/operations/create_app_runner_config_parameters.go deleted file mode 100644 index 90cec27..0000000 --- a/client/operations/create_app_runner_config_parameters.go +++ /dev/null @@ -1,175 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package operations - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "context" - "net/http" - "time" - - "github.com/go-openapi/errors" - "github.com/go-openapi/runtime" - cr "github.com/go-openapi/runtime/client" - "github.com/go-openapi/strfmt" - - "github.com/nuonco/nuon-go/models" -) - -// NewCreateAppRunnerConfigParams creates a new CreateAppRunnerConfigParams object, -// with the default timeout for this client. -// -// Default values are not hydrated, since defaults are normally applied by the API server side. -// -// To enforce default values in parameter, use SetDefaults or WithDefaults. -func NewCreateAppRunnerConfigParams() *CreateAppRunnerConfigParams { - return &CreateAppRunnerConfigParams{ - timeout: cr.DefaultTimeout, - } -} - -// NewCreateAppRunnerConfigParamsWithTimeout creates a new CreateAppRunnerConfigParams object -// with the ability to set a timeout on a request. -func NewCreateAppRunnerConfigParamsWithTimeout(timeout time.Duration) *CreateAppRunnerConfigParams { - return &CreateAppRunnerConfigParams{ - timeout: timeout, - } -} - -// NewCreateAppRunnerConfigParamsWithContext creates a new CreateAppRunnerConfigParams object -// with the ability to set a context for a request. -func NewCreateAppRunnerConfigParamsWithContext(ctx context.Context) *CreateAppRunnerConfigParams { - return &CreateAppRunnerConfigParams{ - Context: ctx, - } -} - -// NewCreateAppRunnerConfigParamsWithHTTPClient creates a new CreateAppRunnerConfigParams object -// with the ability to set a custom HTTPClient for a request. -func NewCreateAppRunnerConfigParamsWithHTTPClient(client *http.Client) *CreateAppRunnerConfigParams { - return &CreateAppRunnerConfigParams{ - HTTPClient: client, - } -} - -/* -CreateAppRunnerConfigParams contains all the parameters to send to the API endpoint - - for the create app runner config operation. - - Typically these are written to a http.Request. -*/ -type CreateAppRunnerConfigParams struct { - - /* AppID. - - app ID - */ - AppID string - - /* Req. - - Input - */ - Req *models.ServiceCreateAppRunnerConfigRequest - - timeout time.Duration - Context context.Context - HTTPClient *http.Client -} - -// WithDefaults hydrates default values in the create app runner config params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *CreateAppRunnerConfigParams) WithDefaults() *CreateAppRunnerConfigParams { - o.SetDefaults() - return o -} - -// SetDefaults hydrates default values in the create app runner config params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *CreateAppRunnerConfigParams) SetDefaults() { - // no default values defined for this parameter -} - -// WithTimeout adds the timeout to the create app runner config params -func (o *CreateAppRunnerConfigParams) WithTimeout(timeout time.Duration) *CreateAppRunnerConfigParams { - o.SetTimeout(timeout) - return o -} - -// SetTimeout adds the timeout to the create app runner config params -func (o *CreateAppRunnerConfigParams) SetTimeout(timeout time.Duration) { - o.timeout = timeout -} - -// WithContext adds the context to the create app runner config params -func (o *CreateAppRunnerConfigParams) WithContext(ctx context.Context) *CreateAppRunnerConfigParams { - o.SetContext(ctx) - return o -} - -// SetContext adds the context to the create app runner config params -func (o *CreateAppRunnerConfigParams) SetContext(ctx context.Context) { - o.Context = ctx -} - -// WithHTTPClient adds the HTTPClient to the create app runner config params -func (o *CreateAppRunnerConfigParams) WithHTTPClient(client *http.Client) *CreateAppRunnerConfigParams { - o.SetHTTPClient(client) - return o -} - -// SetHTTPClient adds the HTTPClient to the create app runner config params -func (o *CreateAppRunnerConfigParams) SetHTTPClient(client *http.Client) { - o.HTTPClient = client -} - -// WithAppID adds the appID to the create app runner config params -func (o *CreateAppRunnerConfigParams) WithAppID(appID string) *CreateAppRunnerConfigParams { - o.SetAppID(appID) - return o -} - -// SetAppID adds the appId to the create app runner config params -func (o *CreateAppRunnerConfigParams) SetAppID(appID string) { - o.AppID = appID -} - -// WithReq adds the req to the create app runner config params -func (o *CreateAppRunnerConfigParams) WithReq(req *models.ServiceCreateAppRunnerConfigRequest) *CreateAppRunnerConfigParams { - o.SetReq(req) - return o -} - -// SetReq adds the req to the create app runner config params -func (o *CreateAppRunnerConfigParams) SetReq(req *models.ServiceCreateAppRunnerConfigRequest) { - o.Req = req -} - -// WriteToRequest writes these params to a swagger request -func (o *CreateAppRunnerConfigParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { - - if err := r.SetTimeout(o.timeout); err != nil { - return err - } - var res []error - - // path param app_id - if err := r.SetPathParam("app_id", o.AppID); err != nil { - return err - } - if o.Req != nil { - if err := r.SetBodyParam(o.Req); err != nil { - return err - } - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} diff --git a/client/operations/create_app_runner_config_responses.go b/client/operations/create_app_runner_config_responses.go deleted file mode 100644 index f66ceef..0000000 --- a/client/operations/create_app_runner_config_responses.go +++ /dev/null @@ -1,486 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package operations - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "encoding/json" - "fmt" - "io" - - "github.com/go-openapi/runtime" - "github.com/go-openapi/strfmt" - - "github.com/nuonco/nuon-go/models" -) - -// CreateAppRunnerConfigReader is a Reader for the CreateAppRunnerConfig structure. -type CreateAppRunnerConfigReader struct { - formats strfmt.Registry -} - -// ReadResponse reads a server response into the received o. -func (o *CreateAppRunnerConfigReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { - switch response.Code() { - case 201: - result := NewCreateAppRunnerConfigCreated() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return result, nil - case 400: - result := NewCreateAppRunnerConfigBadRequest() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return nil, result - case 401: - result := NewCreateAppRunnerConfigUnauthorized() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return nil, result - case 403: - result := NewCreateAppRunnerConfigForbidden() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return nil, result - case 404: - result := NewCreateAppRunnerConfigNotFound() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return nil, result - case 500: - result := NewCreateAppRunnerConfigInternalServerError() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return nil, result - default: - return nil, runtime.NewAPIError("[POST /v1/apps/{app_id}/runner-config] CreateAppRunnerConfig", response, response.Code()) - } -} - -// NewCreateAppRunnerConfigCreated creates a CreateAppRunnerConfigCreated with default headers values -func NewCreateAppRunnerConfigCreated() *CreateAppRunnerConfigCreated { - return &CreateAppRunnerConfigCreated{} -} - -/* -CreateAppRunnerConfigCreated describes a response with status code 201, with default header values. - -Created -*/ -type CreateAppRunnerConfigCreated struct { - Payload *models.AppAppRunnerConfig -} - -// IsSuccess returns true when this create app runner config created response has a 2xx status code -func (o *CreateAppRunnerConfigCreated) IsSuccess() bool { - return true -} - -// IsRedirect returns true when this create app runner config created response has a 3xx status code -func (o *CreateAppRunnerConfigCreated) IsRedirect() bool { - return false -} - -// IsClientError returns true when this create app runner config created response has a 4xx status code -func (o *CreateAppRunnerConfigCreated) IsClientError() bool { - return false -} - -// IsServerError returns true when this create app runner config created response has a 5xx status code -func (o *CreateAppRunnerConfigCreated) IsServerError() bool { - return false -} - -// IsCode returns true when this create app runner config created response a status code equal to that given -func (o *CreateAppRunnerConfigCreated) IsCode(code int) bool { - return code == 201 -} - -// Code gets the status code for the create app runner config created response -func (o *CreateAppRunnerConfigCreated) Code() int { - return 201 -} - -func (o *CreateAppRunnerConfigCreated) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[POST /v1/apps/{app_id}/runner-config][%d] createAppRunnerConfigCreated %s", 201, payload) -} - -func (o *CreateAppRunnerConfigCreated) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[POST /v1/apps/{app_id}/runner-config][%d] createAppRunnerConfigCreated %s", 201, payload) -} - -func (o *CreateAppRunnerConfigCreated) GetPayload() *models.AppAppRunnerConfig { - return o.Payload -} - -func (o *CreateAppRunnerConfigCreated) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.AppAppRunnerConfig) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewCreateAppRunnerConfigBadRequest creates a CreateAppRunnerConfigBadRequest with default headers values -func NewCreateAppRunnerConfigBadRequest() *CreateAppRunnerConfigBadRequest { - return &CreateAppRunnerConfigBadRequest{} -} - -/* -CreateAppRunnerConfigBadRequest describes a response with status code 400, with default header values. - -Bad Request -*/ -type CreateAppRunnerConfigBadRequest struct { - Payload *models.StderrErrResponse -} - -// IsSuccess returns true when this create app runner config bad request response has a 2xx status code -func (o *CreateAppRunnerConfigBadRequest) IsSuccess() bool { - return false -} - -// IsRedirect returns true when this create app runner config bad request response has a 3xx status code -func (o *CreateAppRunnerConfigBadRequest) IsRedirect() bool { - return false -} - -// IsClientError returns true when this create app runner config bad request response has a 4xx status code -func (o *CreateAppRunnerConfigBadRequest) IsClientError() bool { - return true -} - -// IsServerError returns true when this create app runner config bad request response has a 5xx status code -func (o *CreateAppRunnerConfigBadRequest) IsServerError() bool { - return false -} - -// IsCode returns true when this create app runner config bad request response a status code equal to that given -func (o *CreateAppRunnerConfigBadRequest) IsCode(code int) bool { - return code == 400 -} - -// Code gets the status code for the create app runner config bad request response -func (o *CreateAppRunnerConfigBadRequest) Code() int { - return 400 -} - -func (o *CreateAppRunnerConfigBadRequest) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[POST /v1/apps/{app_id}/runner-config][%d] createAppRunnerConfigBadRequest %s", 400, payload) -} - -func (o *CreateAppRunnerConfigBadRequest) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[POST /v1/apps/{app_id}/runner-config][%d] createAppRunnerConfigBadRequest %s", 400, payload) -} - -func (o *CreateAppRunnerConfigBadRequest) GetPayload() *models.StderrErrResponse { - return o.Payload -} - -func (o *CreateAppRunnerConfigBadRequest) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.StderrErrResponse) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewCreateAppRunnerConfigUnauthorized creates a CreateAppRunnerConfigUnauthorized with default headers values -func NewCreateAppRunnerConfigUnauthorized() *CreateAppRunnerConfigUnauthorized { - return &CreateAppRunnerConfigUnauthorized{} -} - -/* -CreateAppRunnerConfigUnauthorized describes a response with status code 401, with default header values. - -Unauthorized -*/ -type CreateAppRunnerConfigUnauthorized struct { - Payload *models.StderrErrResponse -} - -// IsSuccess returns true when this create app runner config unauthorized response has a 2xx status code -func (o *CreateAppRunnerConfigUnauthorized) IsSuccess() bool { - return false -} - -// IsRedirect returns true when this create app runner config unauthorized response has a 3xx status code -func (o *CreateAppRunnerConfigUnauthorized) IsRedirect() bool { - return false -} - -// IsClientError returns true when this create app runner config unauthorized response has a 4xx status code -func (o *CreateAppRunnerConfigUnauthorized) IsClientError() bool { - return true -} - -// IsServerError returns true when this create app runner config unauthorized response has a 5xx status code -func (o *CreateAppRunnerConfigUnauthorized) IsServerError() bool { - return false -} - -// IsCode returns true when this create app runner config unauthorized response a status code equal to that given -func (o *CreateAppRunnerConfigUnauthorized) IsCode(code int) bool { - return code == 401 -} - -// Code gets the status code for the create app runner config unauthorized response -func (o *CreateAppRunnerConfigUnauthorized) Code() int { - return 401 -} - -func (o *CreateAppRunnerConfigUnauthorized) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[POST /v1/apps/{app_id}/runner-config][%d] createAppRunnerConfigUnauthorized %s", 401, payload) -} - -func (o *CreateAppRunnerConfigUnauthorized) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[POST /v1/apps/{app_id}/runner-config][%d] createAppRunnerConfigUnauthorized %s", 401, payload) -} - -func (o *CreateAppRunnerConfigUnauthorized) GetPayload() *models.StderrErrResponse { - return o.Payload -} - -func (o *CreateAppRunnerConfigUnauthorized) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.StderrErrResponse) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewCreateAppRunnerConfigForbidden creates a CreateAppRunnerConfigForbidden with default headers values -func NewCreateAppRunnerConfigForbidden() *CreateAppRunnerConfigForbidden { - return &CreateAppRunnerConfigForbidden{} -} - -/* -CreateAppRunnerConfigForbidden describes a response with status code 403, with default header values. - -Forbidden -*/ -type CreateAppRunnerConfigForbidden struct { - Payload *models.StderrErrResponse -} - -// IsSuccess returns true when this create app runner config forbidden response has a 2xx status code -func (o *CreateAppRunnerConfigForbidden) IsSuccess() bool { - return false -} - -// IsRedirect returns true when this create app runner config forbidden response has a 3xx status code -func (o *CreateAppRunnerConfigForbidden) IsRedirect() bool { - return false -} - -// IsClientError returns true when this create app runner config forbidden response has a 4xx status code -func (o *CreateAppRunnerConfigForbidden) IsClientError() bool { - return true -} - -// IsServerError returns true when this create app runner config forbidden response has a 5xx status code -func (o *CreateAppRunnerConfigForbidden) IsServerError() bool { - return false -} - -// IsCode returns true when this create app runner config forbidden response a status code equal to that given -func (o *CreateAppRunnerConfigForbidden) IsCode(code int) bool { - return code == 403 -} - -// Code gets the status code for the create app runner config forbidden response -func (o *CreateAppRunnerConfigForbidden) Code() int { - return 403 -} - -func (o *CreateAppRunnerConfigForbidden) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[POST /v1/apps/{app_id}/runner-config][%d] createAppRunnerConfigForbidden %s", 403, payload) -} - -func (o *CreateAppRunnerConfigForbidden) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[POST /v1/apps/{app_id}/runner-config][%d] createAppRunnerConfigForbidden %s", 403, payload) -} - -func (o *CreateAppRunnerConfigForbidden) GetPayload() *models.StderrErrResponse { - return o.Payload -} - -func (o *CreateAppRunnerConfigForbidden) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.StderrErrResponse) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewCreateAppRunnerConfigNotFound creates a CreateAppRunnerConfigNotFound with default headers values -func NewCreateAppRunnerConfigNotFound() *CreateAppRunnerConfigNotFound { - return &CreateAppRunnerConfigNotFound{} -} - -/* -CreateAppRunnerConfigNotFound describes a response with status code 404, with default header values. - -Not Found -*/ -type CreateAppRunnerConfigNotFound struct { - Payload *models.StderrErrResponse -} - -// IsSuccess returns true when this create app runner config not found response has a 2xx status code -func (o *CreateAppRunnerConfigNotFound) IsSuccess() bool { - return false -} - -// IsRedirect returns true when this create app runner config not found response has a 3xx status code -func (o *CreateAppRunnerConfigNotFound) IsRedirect() bool { - return false -} - -// IsClientError returns true when this create app runner config not found response has a 4xx status code -func (o *CreateAppRunnerConfigNotFound) IsClientError() bool { - return true -} - -// IsServerError returns true when this create app runner config not found response has a 5xx status code -func (o *CreateAppRunnerConfigNotFound) IsServerError() bool { - return false -} - -// IsCode returns true when this create app runner config not found response a status code equal to that given -func (o *CreateAppRunnerConfigNotFound) IsCode(code int) bool { - return code == 404 -} - -// Code gets the status code for the create app runner config not found response -func (o *CreateAppRunnerConfigNotFound) Code() int { - return 404 -} - -func (o *CreateAppRunnerConfigNotFound) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[POST /v1/apps/{app_id}/runner-config][%d] createAppRunnerConfigNotFound %s", 404, payload) -} - -func (o *CreateAppRunnerConfigNotFound) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[POST /v1/apps/{app_id}/runner-config][%d] createAppRunnerConfigNotFound %s", 404, payload) -} - -func (o *CreateAppRunnerConfigNotFound) GetPayload() *models.StderrErrResponse { - return o.Payload -} - -func (o *CreateAppRunnerConfigNotFound) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.StderrErrResponse) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewCreateAppRunnerConfigInternalServerError creates a CreateAppRunnerConfigInternalServerError with default headers values -func NewCreateAppRunnerConfigInternalServerError() *CreateAppRunnerConfigInternalServerError { - return &CreateAppRunnerConfigInternalServerError{} -} - -/* -CreateAppRunnerConfigInternalServerError describes a response with status code 500, with default header values. - -Internal Server Error -*/ -type CreateAppRunnerConfigInternalServerError struct { - Payload *models.StderrErrResponse -} - -// IsSuccess returns true when this create app runner config internal server error response has a 2xx status code -func (o *CreateAppRunnerConfigInternalServerError) IsSuccess() bool { - return false -} - -// IsRedirect returns true when this create app runner config internal server error response has a 3xx status code -func (o *CreateAppRunnerConfigInternalServerError) IsRedirect() bool { - return false -} - -// IsClientError returns true when this create app runner config internal server error response has a 4xx status code -func (o *CreateAppRunnerConfigInternalServerError) IsClientError() bool { - return false -} - -// IsServerError returns true when this create app runner config internal server error response has a 5xx status code -func (o *CreateAppRunnerConfigInternalServerError) IsServerError() bool { - return true -} - -// IsCode returns true when this create app runner config internal server error response a status code equal to that given -func (o *CreateAppRunnerConfigInternalServerError) IsCode(code int) bool { - return code == 500 -} - -// Code gets the status code for the create app runner config internal server error response -func (o *CreateAppRunnerConfigInternalServerError) Code() int { - return 500 -} - -func (o *CreateAppRunnerConfigInternalServerError) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[POST /v1/apps/{app_id}/runner-config][%d] createAppRunnerConfigInternalServerError %s", 500, payload) -} - -func (o *CreateAppRunnerConfigInternalServerError) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[POST /v1/apps/{app_id}/runner-config][%d] createAppRunnerConfigInternalServerError %s", 500, payload) -} - -func (o *CreateAppRunnerConfigInternalServerError) GetPayload() *models.StderrErrResponse { - return o.Payload -} - -func (o *CreateAppRunnerConfigInternalServerError) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.StderrErrResponse) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} diff --git a/client/operations/create_app_sandbox_config_parameters.go b/client/operations/create_app_sandbox_config_parameters.go deleted file mode 100644 index 1471004..0000000 --- a/client/operations/create_app_sandbox_config_parameters.go +++ /dev/null @@ -1,175 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package operations - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "context" - "net/http" - "time" - - "github.com/go-openapi/errors" - "github.com/go-openapi/runtime" - cr "github.com/go-openapi/runtime/client" - "github.com/go-openapi/strfmt" - - "github.com/nuonco/nuon-go/models" -) - -// NewCreateAppSandboxConfigParams creates a new CreateAppSandboxConfigParams object, -// with the default timeout for this client. -// -// Default values are not hydrated, since defaults are normally applied by the API server side. -// -// To enforce default values in parameter, use SetDefaults or WithDefaults. -func NewCreateAppSandboxConfigParams() *CreateAppSandboxConfigParams { - return &CreateAppSandboxConfigParams{ - timeout: cr.DefaultTimeout, - } -} - -// NewCreateAppSandboxConfigParamsWithTimeout creates a new CreateAppSandboxConfigParams object -// with the ability to set a timeout on a request. -func NewCreateAppSandboxConfigParamsWithTimeout(timeout time.Duration) *CreateAppSandboxConfigParams { - return &CreateAppSandboxConfigParams{ - timeout: timeout, - } -} - -// NewCreateAppSandboxConfigParamsWithContext creates a new CreateAppSandboxConfigParams object -// with the ability to set a context for a request. -func NewCreateAppSandboxConfigParamsWithContext(ctx context.Context) *CreateAppSandboxConfigParams { - return &CreateAppSandboxConfigParams{ - Context: ctx, - } -} - -// NewCreateAppSandboxConfigParamsWithHTTPClient creates a new CreateAppSandboxConfigParams object -// with the ability to set a custom HTTPClient for a request. -func NewCreateAppSandboxConfigParamsWithHTTPClient(client *http.Client) *CreateAppSandboxConfigParams { - return &CreateAppSandboxConfigParams{ - HTTPClient: client, - } -} - -/* -CreateAppSandboxConfigParams contains all the parameters to send to the API endpoint - - for the create app sandbox config operation. - - Typically these are written to a http.Request. -*/ -type CreateAppSandboxConfigParams struct { - - /* AppID. - - app ID - */ - AppID string - - /* Req. - - Input - */ - Req *models.ServiceCreateAppSandboxConfigRequest - - timeout time.Duration - Context context.Context - HTTPClient *http.Client -} - -// WithDefaults hydrates default values in the create app sandbox config params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *CreateAppSandboxConfigParams) WithDefaults() *CreateAppSandboxConfigParams { - o.SetDefaults() - return o -} - -// SetDefaults hydrates default values in the create app sandbox config params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *CreateAppSandboxConfigParams) SetDefaults() { - // no default values defined for this parameter -} - -// WithTimeout adds the timeout to the create app sandbox config params -func (o *CreateAppSandboxConfigParams) WithTimeout(timeout time.Duration) *CreateAppSandboxConfigParams { - o.SetTimeout(timeout) - return o -} - -// SetTimeout adds the timeout to the create app sandbox config params -func (o *CreateAppSandboxConfigParams) SetTimeout(timeout time.Duration) { - o.timeout = timeout -} - -// WithContext adds the context to the create app sandbox config params -func (o *CreateAppSandboxConfigParams) WithContext(ctx context.Context) *CreateAppSandboxConfigParams { - o.SetContext(ctx) - return o -} - -// SetContext adds the context to the create app sandbox config params -func (o *CreateAppSandboxConfigParams) SetContext(ctx context.Context) { - o.Context = ctx -} - -// WithHTTPClient adds the HTTPClient to the create app sandbox config params -func (o *CreateAppSandboxConfigParams) WithHTTPClient(client *http.Client) *CreateAppSandboxConfigParams { - o.SetHTTPClient(client) - return o -} - -// SetHTTPClient adds the HTTPClient to the create app sandbox config params -func (o *CreateAppSandboxConfigParams) SetHTTPClient(client *http.Client) { - o.HTTPClient = client -} - -// WithAppID adds the appID to the create app sandbox config params -func (o *CreateAppSandboxConfigParams) WithAppID(appID string) *CreateAppSandboxConfigParams { - o.SetAppID(appID) - return o -} - -// SetAppID adds the appId to the create app sandbox config params -func (o *CreateAppSandboxConfigParams) SetAppID(appID string) { - o.AppID = appID -} - -// WithReq adds the req to the create app sandbox config params -func (o *CreateAppSandboxConfigParams) WithReq(req *models.ServiceCreateAppSandboxConfigRequest) *CreateAppSandboxConfigParams { - o.SetReq(req) - return o -} - -// SetReq adds the req to the create app sandbox config params -func (o *CreateAppSandboxConfigParams) SetReq(req *models.ServiceCreateAppSandboxConfigRequest) { - o.Req = req -} - -// WriteToRequest writes these params to a swagger request -func (o *CreateAppSandboxConfigParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { - - if err := r.SetTimeout(o.timeout); err != nil { - return err - } - var res []error - - // path param app_id - if err := r.SetPathParam("app_id", o.AppID); err != nil { - return err - } - if o.Req != nil { - if err := r.SetBodyParam(o.Req); err != nil { - return err - } - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} diff --git a/client/operations/create_app_sandbox_config_responses.go b/client/operations/create_app_sandbox_config_responses.go deleted file mode 100644 index 37c4805..0000000 --- a/client/operations/create_app_sandbox_config_responses.go +++ /dev/null @@ -1,486 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package operations - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "encoding/json" - "fmt" - "io" - - "github.com/go-openapi/runtime" - "github.com/go-openapi/strfmt" - - "github.com/nuonco/nuon-go/models" -) - -// CreateAppSandboxConfigReader is a Reader for the CreateAppSandboxConfig structure. -type CreateAppSandboxConfigReader struct { - formats strfmt.Registry -} - -// ReadResponse reads a server response into the received o. -func (o *CreateAppSandboxConfigReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { - switch response.Code() { - case 201: - result := NewCreateAppSandboxConfigCreated() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return result, nil - case 400: - result := NewCreateAppSandboxConfigBadRequest() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return nil, result - case 401: - result := NewCreateAppSandboxConfigUnauthorized() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return nil, result - case 403: - result := NewCreateAppSandboxConfigForbidden() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return nil, result - case 404: - result := NewCreateAppSandboxConfigNotFound() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return nil, result - case 500: - result := NewCreateAppSandboxConfigInternalServerError() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return nil, result - default: - return nil, runtime.NewAPIError("[POST /v1/apps/{app_id}/sandbox-config] CreateAppSandboxConfig", response, response.Code()) - } -} - -// NewCreateAppSandboxConfigCreated creates a CreateAppSandboxConfigCreated with default headers values -func NewCreateAppSandboxConfigCreated() *CreateAppSandboxConfigCreated { - return &CreateAppSandboxConfigCreated{} -} - -/* -CreateAppSandboxConfigCreated describes a response with status code 201, with default header values. - -Created -*/ -type CreateAppSandboxConfigCreated struct { - Payload *models.AppAppSandboxConfig -} - -// IsSuccess returns true when this create app sandbox config created response has a 2xx status code -func (o *CreateAppSandboxConfigCreated) IsSuccess() bool { - return true -} - -// IsRedirect returns true when this create app sandbox config created response has a 3xx status code -func (o *CreateAppSandboxConfigCreated) IsRedirect() bool { - return false -} - -// IsClientError returns true when this create app sandbox config created response has a 4xx status code -func (o *CreateAppSandboxConfigCreated) IsClientError() bool { - return false -} - -// IsServerError returns true when this create app sandbox config created response has a 5xx status code -func (o *CreateAppSandboxConfigCreated) IsServerError() bool { - return false -} - -// IsCode returns true when this create app sandbox config created response a status code equal to that given -func (o *CreateAppSandboxConfigCreated) IsCode(code int) bool { - return code == 201 -} - -// Code gets the status code for the create app sandbox config created response -func (o *CreateAppSandboxConfigCreated) Code() int { - return 201 -} - -func (o *CreateAppSandboxConfigCreated) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[POST /v1/apps/{app_id}/sandbox-config][%d] createAppSandboxConfigCreated %s", 201, payload) -} - -func (o *CreateAppSandboxConfigCreated) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[POST /v1/apps/{app_id}/sandbox-config][%d] createAppSandboxConfigCreated %s", 201, payload) -} - -func (o *CreateAppSandboxConfigCreated) GetPayload() *models.AppAppSandboxConfig { - return o.Payload -} - -func (o *CreateAppSandboxConfigCreated) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.AppAppSandboxConfig) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewCreateAppSandboxConfigBadRequest creates a CreateAppSandboxConfigBadRequest with default headers values -func NewCreateAppSandboxConfigBadRequest() *CreateAppSandboxConfigBadRequest { - return &CreateAppSandboxConfigBadRequest{} -} - -/* -CreateAppSandboxConfigBadRequest describes a response with status code 400, with default header values. - -Bad Request -*/ -type CreateAppSandboxConfigBadRequest struct { - Payload *models.StderrErrResponse -} - -// IsSuccess returns true when this create app sandbox config bad request response has a 2xx status code -func (o *CreateAppSandboxConfigBadRequest) IsSuccess() bool { - return false -} - -// IsRedirect returns true when this create app sandbox config bad request response has a 3xx status code -func (o *CreateAppSandboxConfigBadRequest) IsRedirect() bool { - return false -} - -// IsClientError returns true when this create app sandbox config bad request response has a 4xx status code -func (o *CreateAppSandboxConfigBadRequest) IsClientError() bool { - return true -} - -// IsServerError returns true when this create app sandbox config bad request response has a 5xx status code -func (o *CreateAppSandboxConfigBadRequest) IsServerError() bool { - return false -} - -// IsCode returns true when this create app sandbox config bad request response a status code equal to that given -func (o *CreateAppSandboxConfigBadRequest) IsCode(code int) bool { - return code == 400 -} - -// Code gets the status code for the create app sandbox config bad request response -func (o *CreateAppSandboxConfigBadRequest) Code() int { - return 400 -} - -func (o *CreateAppSandboxConfigBadRequest) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[POST /v1/apps/{app_id}/sandbox-config][%d] createAppSandboxConfigBadRequest %s", 400, payload) -} - -func (o *CreateAppSandboxConfigBadRequest) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[POST /v1/apps/{app_id}/sandbox-config][%d] createAppSandboxConfigBadRequest %s", 400, payload) -} - -func (o *CreateAppSandboxConfigBadRequest) GetPayload() *models.StderrErrResponse { - return o.Payload -} - -func (o *CreateAppSandboxConfigBadRequest) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.StderrErrResponse) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewCreateAppSandboxConfigUnauthorized creates a CreateAppSandboxConfigUnauthorized with default headers values -func NewCreateAppSandboxConfigUnauthorized() *CreateAppSandboxConfigUnauthorized { - return &CreateAppSandboxConfigUnauthorized{} -} - -/* -CreateAppSandboxConfigUnauthorized describes a response with status code 401, with default header values. - -Unauthorized -*/ -type CreateAppSandboxConfigUnauthorized struct { - Payload *models.StderrErrResponse -} - -// IsSuccess returns true when this create app sandbox config unauthorized response has a 2xx status code -func (o *CreateAppSandboxConfigUnauthorized) IsSuccess() bool { - return false -} - -// IsRedirect returns true when this create app sandbox config unauthorized response has a 3xx status code -func (o *CreateAppSandboxConfigUnauthorized) IsRedirect() bool { - return false -} - -// IsClientError returns true when this create app sandbox config unauthorized response has a 4xx status code -func (o *CreateAppSandboxConfigUnauthorized) IsClientError() bool { - return true -} - -// IsServerError returns true when this create app sandbox config unauthorized response has a 5xx status code -func (o *CreateAppSandboxConfigUnauthorized) IsServerError() bool { - return false -} - -// IsCode returns true when this create app sandbox config unauthorized response a status code equal to that given -func (o *CreateAppSandboxConfigUnauthorized) IsCode(code int) bool { - return code == 401 -} - -// Code gets the status code for the create app sandbox config unauthorized response -func (o *CreateAppSandboxConfigUnauthorized) Code() int { - return 401 -} - -func (o *CreateAppSandboxConfigUnauthorized) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[POST /v1/apps/{app_id}/sandbox-config][%d] createAppSandboxConfigUnauthorized %s", 401, payload) -} - -func (o *CreateAppSandboxConfigUnauthorized) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[POST /v1/apps/{app_id}/sandbox-config][%d] createAppSandboxConfigUnauthorized %s", 401, payload) -} - -func (o *CreateAppSandboxConfigUnauthorized) GetPayload() *models.StderrErrResponse { - return o.Payload -} - -func (o *CreateAppSandboxConfigUnauthorized) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.StderrErrResponse) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewCreateAppSandboxConfigForbidden creates a CreateAppSandboxConfigForbidden with default headers values -func NewCreateAppSandboxConfigForbidden() *CreateAppSandboxConfigForbidden { - return &CreateAppSandboxConfigForbidden{} -} - -/* -CreateAppSandboxConfigForbidden describes a response with status code 403, with default header values. - -Forbidden -*/ -type CreateAppSandboxConfigForbidden struct { - Payload *models.StderrErrResponse -} - -// IsSuccess returns true when this create app sandbox config forbidden response has a 2xx status code -func (o *CreateAppSandboxConfigForbidden) IsSuccess() bool { - return false -} - -// IsRedirect returns true when this create app sandbox config forbidden response has a 3xx status code -func (o *CreateAppSandboxConfigForbidden) IsRedirect() bool { - return false -} - -// IsClientError returns true when this create app sandbox config forbidden response has a 4xx status code -func (o *CreateAppSandboxConfigForbidden) IsClientError() bool { - return true -} - -// IsServerError returns true when this create app sandbox config forbidden response has a 5xx status code -func (o *CreateAppSandboxConfigForbidden) IsServerError() bool { - return false -} - -// IsCode returns true when this create app sandbox config forbidden response a status code equal to that given -func (o *CreateAppSandboxConfigForbidden) IsCode(code int) bool { - return code == 403 -} - -// Code gets the status code for the create app sandbox config forbidden response -func (o *CreateAppSandboxConfigForbidden) Code() int { - return 403 -} - -func (o *CreateAppSandboxConfigForbidden) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[POST /v1/apps/{app_id}/sandbox-config][%d] createAppSandboxConfigForbidden %s", 403, payload) -} - -func (o *CreateAppSandboxConfigForbidden) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[POST /v1/apps/{app_id}/sandbox-config][%d] createAppSandboxConfigForbidden %s", 403, payload) -} - -func (o *CreateAppSandboxConfigForbidden) GetPayload() *models.StderrErrResponse { - return o.Payload -} - -func (o *CreateAppSandboxConfigForbidden) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.StderrErrResponse) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewCreateAppSandboxConfigNotFound creates a CreateAppSandboxConfigNotFound with default headers values -func NewCreateAppSandboxConfigNotFound() *CreateAppSandboxConfigNotFound { - return &CreateAppSandboxConfigNotFound{} -} - -/* -CreateAppSandboxConfigNotFound describes a response with status code 404, with default header values. - -Not Found -*/ -type CreateAppSandboxConfigNotFound struct { - Payload *models.StderrErrResponse -} - -// IsSuccess returns true when this create app sandbox config not found response has a 2xx status code -func (o *CreateAppSandboxConfigNotFound) IsSuccess() bool { - return false -} - -// IsRedirect returns true when this create app sandbox config not found response has a 3xx status code -func (o *CreateAppSandboxConfigNotFound) IsRedirect() bool { - return false -} - -// IsClientError returns true when this create app sandbox config not found response has a 4xx status code -func (o *CreateAppSandboxConfigNotFound) IsClientError() bool { - return true -} - -// IsServerError returns true when this create app sandbox config not found response has a 5xx status code -func (o *CreateAppSandboxConfigNotFound) IsServerError() bool { - return false -} - -// IsCode returns true when this create app sandbox config not found response a status code equal to that given -func (o *CreateAppSandboxConfigNotFound) IsCode(code int) bool { - return code == 404 -} - -// Code gets the status code for the create app sandbox config not found response -func (o *CreateAppSandboxConfigNotFound) Code() int { - return 404 -} - -func (o *CreateAppSandboxConfigNotFound) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[POST /v1/apps/{app_id}/sandbox-config][%d] createAppSandboxConfigNotFound %s", 404, payload) -} - -func (o *CreateAppSandboxConfigNotFound) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[POST /v1/apps/{app_id}/sandbox-config][%d] createAppSandboxConfigNotFound %s", 404, payload) -} - -func (o *CreateAppSandboxConfigNotFound) GetPayload() *models.StderrErrResponse { - return o.Payload -} - -func (o *CreateAppSandboxConfigNotFound) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.StderrErrResponse) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewCreateAppSandboxConfigInternalServerError creates a CreateAppSandboxConfigInternalServerError with default headers values -func NewCreateAppSandboxConfigInternalServerError() *CreateAppSandboxConfigInternalServerError { - return &CreateAppSandboxConfigInternalServerError{} -} - -/* -CreateAppSandboxConfigInternalServerError describes a response with status code 500, with default header values. - -Internal Server Error -*/ -type CreateAppSandboxConfigInternalServerError struct { - Payload *models.StderrErrResponse -} - -// IsSuccess returns true when this create app sandbox config internal server error response has a 2xx status code -func (o *CreateAppSandboxConfigInternalServerError) IsSuccess() bool { - return false -} - -// IsRedirect returns true when this create app sandbox config internal server error response has a 3xx status code -func (o *CreateAppSandboxConfigInternalServerError) IsRedirect() bool { - return false -} - -// IsClientError returns true when this create app sandbox config internal server error response has a 4xx status code -func (o *CreateAppSandboxConfigInternalServerError) IsClientError() bool { - return false -} - -// IsServerError returns true when this create app sandbox config internal server error response has a 5xx status code -func (o *CreateAppSandboxConfigInternalServerError) IsServerError() bool { - return true -} - -// IsCode returns true when this create app sandbox config internal server error response a status code equal to that given -func (o *CreateAppSandboxConfigInternalServerError) IsCode(code int) bool { - return code == 500 -} - -// Code gets the status code for the create app sandbox config internal server error response -func (o *CreateAppSandboxConfigInternalServerError) Code() int { - return 500 -} - -func (o *CreateAppSandboxConfigInternalServerError) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[POST /v1/apps/{app_id}/sandbox-config][%d] createAppSandboxConfigInternalServerError %s", 500, payload) -} - -func (o *CreateAppSandboxConfigInternalServerError) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[POST /v1/apps/{app_id}/sandbox-config][%d] createAppSandboxConfigInternalServerError %s", 500, payload) -} - -func (o *CreateAppSandboxConfigInternalServerError) GetPayload() *models.StderrErrResponse { - return o.Payload -} - -func (o *CreateAppSandboxConfigInternalServerError) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.StderrErrResponse) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} diff --git a/client/operations/create_app_secret_parameters.go b/client/operations/create_app_secret_parameters.go deleted file mode 100644 index c3e6705..0000000 --- a/client/operations/create_app_secret_parameters.go +++ /dev/null @@ -1,175 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package operations - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "context" - "net/http" - "time" - - "github.com/go-openapi/errors" - "github.com/go-openapi/runtime" - cr "github.com/go-openapi/runtime/client" - "github.com/go-openapi/strfmt" - - "github.com/nuonco/nuon-go/models" -) - -// NewCreateAppSecretParams creates a new CreateAppSecretParams object, -// with the default timeout for this client. -// -// Default values are not hydrated, since defaults are normally applied by the API server side. -// -// To enforce default values in parameter, use SetDefaults or WithDefaults. -func NewCreateAppSecretParams() *CreateAppSecretParams { - return &CreateAppSecretParams{ - timeout: cr.DefaultTimeout, - } -} - -// NewCreateAppSecretParamsWithTimeout creates a new CreateAppSecretParams object -// with the ability to set a timeout on a request. -func NewCreateAppSecretParamsWithTimeout(timeout time.Duration) *CreateAppSecretParams { - return &CreateAppSecretParams{ - timeout: timeout, - } -} - -// NewCreateAppSecretParamsWithContext creates a new CreateAppSecretParams object -// with the ability to set a context for a request. -func NewCreateAppSecretParamsWithContext(ctx context.Context) *CreateAppSecretParams { - return &CreateAppSecretParams{ - Context: ctx, - } -} - -// NewCreateAppSecretParamsWithHTTPClient creates a new CreateAppSecretParams object -// with the ability to set a custom HTTPClient for a request. -func NewCreateAppSecretParamsWithHTTPClient(client *http.Client) *CreateAppSecretParams { - return &CreateAppSecretParams{ - HTTPClient: client, - } -} - -/* -CreateAppSecretParams contains all the parameters to send to the API endpoint - - for the create app secret operation. - - Typically these are written to a http.Request. -*/ -type CreateAppSecretParams struct { - - /* AppID. - - app ID - */ - AppID string - - /* Req. - - Input - */ - Req *models.ServiceCreateAppSecretRequest - - timeout time.Duration - Context context.Context - HTTPClient *http.Client -} - -// WithDefaults hydrates default values in the create app secret params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *CreateAppSecretParams) WithDefaults() *CreateAppSecretParams { - o.SetDefaults() - return o -} - -// SetDefaults hydrates default values in the create app secret params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *CreateAppSecretParams) SetDefaults() { - // no default values defined for this parameter -} - -// WithTimeout adds the timeout to the create app secret params -func (o *CreateAppSecretParams) WithTimeout(timeout time.Duration) *CreateAppSecretParams { - o.SetTimeout(timeout) - return o -} - -// SetTimeout adds the timeout to the create app secret params -func (o *CreateAppSecretParams) SetTimeout(timeout time.Duration) { - o.timeout = timeout -} - -// WithContext adds the context to the create app secret params -func (o *CreateAppSecretParams) WithContext(ctx context.Context) *CreateAppSecretParams { - o.SetContext(ctx) - return o -} - -// SetContext adds the context to the create app secret params -func (o *CreateAppSecretParams) SetContext(ctx context.Context) { - o.Context = ctx -} - -// WithHTTPClient adds the HTTPClient to the create app secret params -func (o *CreateAppSecretParams) WithHTTPClient(client *http.Client) *CreateAppSecretParams { - o.SetHTTPClient(client) - return o -} - -// SetHTTPClient adds the HTTPClient to the create app secret params -func (o *CreateAppSecretParams) SetHTTPClient(client *http.Client) { - o.HTTPClient = client -} - -// WithAppID adds the appID to the create app secret params -func (o *CreateAppSecretParams) WithAppID(appID string) *CreateAppSecretParams { - o.SetAppID(appID) - return o -} - -// SetAppID adds the appId to the create app secret params -func (o *CreateAppSecretParams) SetAppID(appID string) { - o.AppID = appID -} - -// WithReq adds the req to the create app secret params -func (o *CreateAppSecretParams) WithReq(req *models.ServiceCreateAppSecretRequest) *CreateAppSecretParams { - o.SetReq(req) - return o -} - -// SetReq adds the req to the create app secret params -func (o *CreateAppSecretParams) SetReq(req *models.ServiceCreateAppSecretRequest) { - o.Req = req -} - -// WriteToRequest writes these params to a swagger request -func (o *CreateAppSecretParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { - - if err := r.SetTimeout(o.timeout); err != nil { - return err - } - var res []error - - // path param app_id - if err := r.SetPathParam("app_id", o.AppID); err != nil { - return err - } - if o.Req != nil { - if err := r.SetBodyParam(o.Req); err != nil { - return err - } - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} diff --git a/client/operations/create_app_secret_responses.go b/client/operations/create_app_secret_responses.go deleted file mode 100644 index 5112af0..0000000 --- a/client/operations/create_app_secret_responses.go +++ /dev/null @@ -1,486 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package operations - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "encoding/json" - "fmt" - "io" - - "github.com/go-openapi/runtime" - "github.com/go-openapi/strfmt" - - "github.com/nuonco/nuon-go/models" -) - -// CreateAppSecretReader is a Reader for the CreateAppSecret structure. -type CreateAppSecretReader struct { - formats strfmt.Registry -} - -// ReadResponse reads a server response into the received o. -func (o *CreateAppSecretReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { - switch response.Code() { - case 201: - result := NewCreateAppSecretCreated() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return result, nil - case 400: - result := NewCreateAppSecretBadRequest() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return nil, result - case 401: - result := NewCreateAppSecretUnauthorized() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return nil, result - case 403: - result := NewCreateAppSecretForbidden() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return nil, result - case 404: - result := NewCreateAppSecretNotFound() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return nil, result - case 500: - result := NewCreateAppSecretInternalServerError() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return nil, result - default: - return nil, runtime.NewAPIError("[POST /v1/apps/{app_id}/secret] CreateAppSecret", response, response.Code()) - } -} - -// NewCreateAppSecretCreated creates a CreateAppSecretCreated with default headers values -func NewCreateAppSecretCreated() *CreateAppSecretCreated { - return &CreateAppSecretCreated{} -} - -/* -CreateAppSecretCreated describes a response with status code 201, with default header values. - -Created -*/ -type CreateAppSecretCreated struct { - Payload *models.AppAppSecret -} - -// IsSuccess returns true when this create app secret created response has a 2xx status code -func (o *CreateAppSecretCreated) IsSuccess() bool { - return true -} - -// IsRedirect returns true when this create app secret created response has a 3xx status code -func (o *CreateAppSecretCreated) IsRedirect() bool { - return false -} - -// IsClientError returns true when this create app secret created response has a 4xx status code -func (o *CreateAppSecretCreated) IsClientError() bool { - return false -} - -// IsServerError returns true when this create app secret created response has a 5xx status code -func (o *CreateAppSecretCreated) IsServerError() bool { - return false -} - -// IsCode returns true when this create app secret created response a status code equal to that given -func (o *CreateAppSecretCreated) IsCode(code int) bool { - return code == 201 -} - -// Code gets the status code for the create app secret created response -func (o *CreateAppSecretCreated) Code() int { - return 201 -} - -func (o *CreateAppSecretCreated) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[POST /v1/apps/{app_id}/secret][%d] createAppSecretCreated %s", 201, payload) -} - -func (o *CreateAppSecretCreated) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[POST /v1/apps/{app_id}/secret][%d] createAppSecretCreated %s", 201, payload) -} - -func (o *CreateAppSecretCreated) GetPayload() *models.AppAppSecret { - return o.Payload -} - -func (o *CreateAppSecretCreated) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.AppAppSecret) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewCreateAppSecretBadRequest creates a CreateAppSecretBadRequest with default headers values -func NewCreateAppSecretBadRequest() *CreateAppSecretBadRequest { - return &CreateAppSecretBadRequest{} -} - -/* -CreateAppSecretBadRequest describes a response with status code 400, with default header values. - -Bad Request -*/ -type CreateAppSecretBadRequest struct { - Payload *models.StderrErrResponse -} - -// IsSuccess returns true when this create app secret bad request response has a 2xx status code -func (o *CreateAppSecretBadRequest) IsSuccess() bool { - return false -} - -// IsRedirect returns true when this create app secret bad request response has a 3xx status code -func (o *CreateAppSecretBadRequest) IsRedirect() bool { - return false -} - -// IsClientError returns true when this create app secret bad request response has a 4xx status code -func (o *CreateAppSecretBadRequest) IsClientError() bool { - return true -} - -// IsServerError returns true when this create app secret bad request response has a 5xx status code -func (o *CreateAppSecretBadRequest) IsServerError() bool { - return false -} - -// IsCode returns true when this create app secret bad request response a status code equal to that given -func (o *CreateAppSecretBadRequest) IsCode(code int) bool { - return code == 400 -} - -// Code gets the status code for the create app secret bad request response -func (o *CreateAppSecretBadRequest) Code() int { - return 400 -} - -func (o *CreateAppSecretBadRequest) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[POST /v1/apps/{app_id}/secret][%d] createAppSecretBadRequest %s", 400, payload) -} - -func (o *CreateAppSecretBadRequest) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[POST /v1/apps/{app_id}/secret][%d] createAppSecretBadRequest %s", 400, payload) -} - -func (o *CreateAppSecretBadRequest) GetPayload() *models.StderrErrResponse { - return o.Payload -} - -func (o *CreateAppSecretBadRequest) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.StderrErrResponse) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewCreateAppSecretUnauthorized creates a CreateAppSecretUnauthorized with default headers values -func NewCreateAppSecretUnauthorized() *CreateAppSecretUnauthorized { - return &CreateAppSecretUnauthorized{} -} - -/* -CreateAppSecretUnauthorized describes a response with status code 401, with default header values. - -Unauthorized -*/ -type CreateAppSecretUnauthorized struct { - Payload *models.StderrErrResponse -} - -// IsSuccess returns true when this create app secret unauthorized response has a 2xx status code -func (o *CreateAppSecretUnauthorized) IsSuccess() bool { - return false -} - -// IsRedirect returns true when this create app secret unauthorized response has a 3xx status code -func (o *CreateAppSecretUnauthorized) IsRedirect() bool { - return false -} - -// IsClientError returns true when this create app secret unauthorized response has a 4xx status code -func (o *CreateAppSecretUnauthorized) IsClientError() bool { - return true -} - -// IsServerError returns true when this create app secret unauthorized response has a 5xx status code -func (o *CreateAppSecretUnauthorized) IsServerError() bool { - return false -} - -// IsCode returns true when this create app secret unauthorized response a status code equal to that given -func (o *CreateAppSecretUnauthorized) IsCode(code int) bool { - return code == 401 -} - -// Code gets the status code for the create app secret unauthorized response -func (o *CreateAppSecretUnauthorized) Code() int { - return 401 -} - -func (o *CreateAppSecretUnauthorized) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[POST /v1/apps/{app_id}/secret][%d] createAppSecretUnauthorized %s", 401, payload) -} - -func (o *CreateAppSecretUnauthorized) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[POST /v1/apps/{app_id}/secret][%d] createAppSecretUnauthorized %s", 401, payload) -} - -func (o *CreateAppSecretUnauthorized) GetPayload() *models.StderrErrResponse { - return o.Payload -} - -func (o *CreateAppSecretUnauthorized) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.StderrErrResponse) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewCreateAppSecretForbidden creates a CreateAppSecretForbidden with default headers values -func NewCreateAppSecretForbidden() *CreateAppSecretForbidden { - return &CreateAppSecretForbidden{} -} - -/* -CreateAppSecretForbidden describes a response with status code 403, with default header values. - -Forbidden -*/ -type CreateAppSecretForbidden struct { - Payload *models.StderrErrResponse -} - -// IsSuccess returns true when this create app secret forbidden response has a 2xx status code -func (o *CreateAppSecretForbidden) IsSuccess() bool { - return false -} - -// IsRedirect returns true when this create app secret forbidden response has a 3xx status code -func (o *CreateAppSecretForbidden) IsRedirect() bool { - return false -} - -// IsClientError returns true when this create app secret forbidden response has a 4xx status code -func (o *CreateAppSecretForbidden) IsClientError() bool { - return true -} - -// IsServerError returns true when this create app secret forbidden response has a 5xx status code -func (o *CreateAppSecretForbidden) IsServerError() bool { - return false -} - -// IsCode returns true when this create app secret forbidden response a status code equal to that given -func (o *CreateAppSecretForbidden) IsCode(code int) bool { - return code == 403 -} - -// Code gets the status code for the create app secret forbidden response -func (o *CreateAppSecretForbidden) Code() int { - return 403 -} - -func (o *CreateAppSecretForbidden) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[POST /v1/apps/{app_id}/secret][%d] createAppSecretForbidden %s", 403, payload) -} - -func (o *CreateAppSecretForbidden) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[POST /v1/apps/{app_id}/secret][%d] createAppSecretForbidden %s", 403, payload) -} - -func (o *CreateAppSecretForbidden) GetPayload() *models.StderrErrResponse { - return o.Payload -} - -func (o *CreateAppSecretForbidden) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.StderrErrResponse) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewCreateAppSecretNotFound creates a CreateAppSecretNotFound with default headers values -func NewCreateAppSecretNotFound() *CreateAppSecretNotFound { - return &CreateAppSecretNotFound{} -} - -/* -CreateAppSecretNotFound describes a response with status code 404, with default header values. - -Not Found -*/ -type CreateAppSecretNotFound struct { - Payload *models.StderrErrResponse -} - -// IsSuccess returns true when this create app secret not found response has a 2xx status code -func (o *CreateAppSecretNotFound) IsSuccess() bool { - return false -} - -// IsRedirect returns true when this create app secret not found response has a 3xx status code -func (o *CreateAppSecretNotFound) IsRedirect() bool { - return false -} - -// IsClientError returns true when this create app secret not found response has a 4xx status code -func (o *CreateAppSecretNotFound) IsClientError() bool { - return true -} - -// IsServerError returns true when this create app secret not found response has a 5xx status code -func (o *CreateAppSecretNotFound) IsServerError() bool { - return false -} - -// IsCode returns true when this create app secret not found response a status code equal to that given -func (o *CreateAppSecretNotFound) IsCode(code int) bool { - return code == 404 -} - -// Code gets the status code for the create app secret not found response -func (o *CreateAppSecretNotFound) Code() int { - return 404 -} - -func (o *CreateAppSecretNotFound) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[POST /v1/apps/{app_id}/secret][%d] createAppSecretNotFound %s", 404, payload) -} - -func (o *CreateAppSecretNotFound) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[POST /v1/apps/{app_id}/secret][%d] createAppSecretNotFound %s", 404, payload) -} - -func (o *CreateAppSecretNotFound) GetPayload() *models.StderrErrResponse { - return o.Payload -} - -func (o *CreateAppSecretNotFound) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.StderrErrResponse) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewCreateAppSecretInternalServerError creates a CreateAppSecretInternalServerError with default headers values -func NewCreateAppSecretInternalServerError() *CreateAppSecretInternalServerError { - return &CreateAppSecretInternalServerError{} -} - -/* -CreateAppSecretInternalServerError describes a response with status code 500, with default header values. - -Internal Server Error -*/ -type CreateAppSecretInternalServerError struct { - Payload *models.StderrErrResponse -} - -// IsSuccess returns true when this create app secret internal server error response has a 2xx status code -func (o *CreateAppSecretInternalServerError) IsSuccess() bool { - return false -} - -// IsRedirect returns true when this create app secret internal server error response has a 3xx status code -func (o *CreateAppSecretInternalServerError) IsRedirect() bool { - return false -} - -// IsClientError returns true when this create app secret internal server error response has a 4xx status code -func (o *CreateAppSecretInternalServerError) IsClientError() bool { - return false -} - -// IsServerError returns true when this create app secret internal server error response has a 5xx status code -func (o *CreateAppSecretInternalServerError) IsServerError() bool { - return true -} - -// IsCode returns true when this create app secret internal server error response a status code equal to that given -func (o *CreateAppSecretInternalServerError) IsCode(code int) bool { - return code == 500 -} - -// Code gets the status code for the create app secret internal server error response -func (o *CreateAppSecretInternalServerError) Code() int { - return 500 -} - -func (o *CreateAppSecretInternalServerError) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[POST /v1/apps/{app_id}/secret][%d] createAppSecretInternalServerError %s", 500, payload) -} - -func (o *CreateAppSecretInternalServerError) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[POST /v1/apps/{app_id}/secret][%d] createAppSecretInternalServerError %s", 500, payload) -} - -func (o *CreateAppSecretInternalServerError) GetPayload() *models.StderrErrResponse { - return o.Payload -} - -func (o *CreateAppSecretInternalServerError) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.StderrErrResponse) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} diff --git a/client/operations/create_component_build_parameters.go b/client/operations/create_component_build_parameters.go deleted file mode 100644 index 76ebe37..0000000 --- a/client/operations/create_component_build_parameters.go +++ /dev/null @@ -1,175 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package operations - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "context" - "net/http" - "time" - - "github.com/go-openapi/errors" - "github.com/go-openapi/runtime" - cr "github.com/go-openapi/runtime/client" - "github.com/go-openapi/strfmt" - - "github.com/nuonco/nuon-go/models" -) - -// NewCreateComponentBuildParams creates a new CreateComponentBuildParams object, -// with the default timeout for this client. -// -// Default values are not hydrated, since defaults are normally applied by the API server side. -// -// To enforce default values in parameter, use SetDefaults or WithDefaults. -func NewCreateComponentBuildParams() *CreateComponentBuildParams { - return &CreateComponentBuildParams{ - timeout: cr.DefaultTimeout, - } -} - -// NewCreateComponentBuildParamsWithTimeout creates a new CreateComponentBuildParams object -// with the ability to set a timeout on a request. -func NewCreateComponentBuildParamsWithTimeout(timeout time.Duration) *CreateComponentBuildParams { - return &CreateComponentBuildParams{ - timeout: timeout, - } -} - -// NewCreateComponentBuildParamsWithContext creates a new CreateComponentBuildParams object -// with the ability to set a context for a request. -func NewCreateComponentBuildParamsWithContext(ctx context.Context) *CreateComponentBuildParams { - return &CreateComponentBuildParams{ - Context: ctx, - } -} - -// NewCreateComponentBuildParamsWithHTTPClient creates a new CreateComponentBuildParams object -// with the ability to set a custom HTTPClient for a request. -func NewCreateComponentBuildParamsWithHTTPClient(client *http.Client) *CreateComponentBuildParams { - return &CreateComponentBuildParams{ - HTTPClient: client, - } -} - -/* -CreateComponentBuildParams contains all the parameters to send to the API endpoint - - for the create component build operation. - - Typically these are written to a http.Request. -*/ -type CreateComponentBuildParams struct { - - /* ComponentID. - - component ID - */ - ComponentID string - - /* Req. - - Input - */ - Req *models.ServiceCreateComponentBuildRequest - - timeout time.Duration - Context context.Context - HTTPClient *http.Client -} - -// WithDefaults hydrates default values in the create component build params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *CreateComponentBuildParams) WithDefaults() *CreateComponentBuildParams { - o.SetDefaults() - return o -} - -// SetDefaults hydrates default values in the create component build params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *CreateComponentBuildParams) SetDefaults() { - // no default values defined for this parameter -} - -// WithTimeout adds the timeout to the create component build params -func (o *CreateComponentBuildParams) WithTimeout(timeout time.Duration) *CreateComponentBuildParams { - o.SetTimeout(timeout) - return o -} - -// SetTimeout adds the timeout to the create component build params -func (o *CreateComponentBuildParams) SetTimeout(timeout time.Duration) { - o.timeout = timeout -} - -// WithContext adds the context to the create component build params -func (o *CreateComponentBuildParams) WithContext(ctx context.Context) *CreateComponentBuildParams { - o.SetContext(ctx) - return o -} - -// SetContext adds the context to the create component build params -func (o *CreateComponentBuildParams) SetContext(ctx context.Context) { - o.Context = ctx -} - -// WithHTTPClient adds the HTTPClient to the create component build params -func (o *CreateComponentBuildParams) WithHTTPClient(client *http.Client) *CreateComponentBuildParams { - o.SetHTTPClient(client) - return o -} - -// SetHTTPClient adds the HTTPClient to the create component build params -func (o *CreateComponentBuildParams) SetHTTPClient(client *http.Client) { - o.HTTPClient = client -} - -// WithComponentID adds the componentID to the create component build params -func (o *CreateComponentBuildParams) WithComponentID(componentID string) *CreateComponentBuildParams { - o.SetComponentID(componentID) - return o -} - -// SetComponentID adds the componentId to the create component build params -func (o *CreateComponentBuildParams) SetComponentID(componentID string) { - o.ComponentID = componentID -} - -// WithReq adds the req to the create component build params -func (o *CreateComponentBuildParams) WithReq(req *models.ServiceCreateComponentBuildRequest) *CreateComponentBuildParams { - o.SetReq(req) - return o -} - -// SetReq adds the req to the create component build params -func (o *CreateComponentBuildParams) SetReq(req *models.ServiceCreateComponentBuildRequest) { - o.Req = req -} - -// WriteToRequest writes these params to a swagger request -func (o *CreateComponentBuildParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { - - if err := r.SetTimeout(o.timeout); err != nil { - return err - } - var res []error - - // path param component_id - if err := r.SetPathParam("component_id", o.ComponentID); err != nil { - return err - } - if o.Req != nil { - if err := r.SetBodyParam(o.Req); err != nil { - return err - } - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} diff --git a/client/operations/create_component_build_responses.go b/client/operations/create_component_build_responses.go deleted file mode 100644 index fdf79c4..0000000 --- a/client/operations/create_component_build_responses.go +++ /dev/null @@ -1,486 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package operations - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "encoding/json" - "fmt" - "io" - - "github.com/go-openapi/runtime" - "github.com/go-openapi/strfmt" - - "github.com/nuonco/nuon-go/models" -) - -// CreateComponentBuildReader is a Reader for the CreateComponentBuild structure. -type CreateComponentBuildReader struct { - formats strfmt.Registry -} - -// ReadResponse reads a server response into the received o. -func (o *CreateComponentBuildReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { - switch response.Code() { - case 201: - result := NewCreateComponentBuildCreated() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return result, nil - case 400: - result := NewCreateComponentBuildBadRequest() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return nil, result - case 401: - result := NewCreateComponentBuildUnauthorized() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return nil, result - case 403: - result := NewCreateComponentBuildForbidden() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return nil, result - case 404: - result := NewCreateComponentBuildNotFound() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return nil, result - case 500: - result := NewCreateComponentBuildInternalServerError() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return nil, result - default: - return nil, runtime.NewAPIError("[POST /v1/components/{component_id}/builds] CreateComponentBuild", response, response.Code()) - } -} - -// NewCreateComponentBuildCreated creates a CreateComponentBuildCreated with default headers values -func NewCreateComponentBuildCreated() *CreateComponentBuildCreated { - return &CreateComponentBuildCreated{} -} - -/* -CreateComponentBuildCreated describes a response with status code 201, with default header values. - -Created -*/ -type CreateComponentBuildCreated struct { - Payload *models.AppComponentBuild -} - -// IsSuccess returns true when this create component build created response has a 2xx status code -func (o *CreateComponentBuildCreated) IsSuccess() bool { - return true -} - -// IsRedirect returns true when this create component build created response has a 3xx status code -func (o *CreateComponentBuildCreated) IsRedirect() bool { - return false -} - -// IsClientError returns true when this create component build created response has a 4xx status code -func (o *CreateComponentBuildCreated) IsClientError() bool { - return false -} - -// IsServerError returns true when this create component build created response has a 5xx status code -func (o *CreateComponentBuildCreated) IsServerError() bool { - return false -} - -// IsCode returns true when this create component build created response a status code equal to that given -func (o *CreateComponentBuildCreated) IsCode(code int) bool { - return code == 201 -} - -// Code gets the status code for the create component build created response -func (o *CreateComponentBuildCreated) Code() int { - return 201 -} - -func (o *CreateComponentBuildCreated) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[POST /v1/components/{component_id}/builds][%d] createComponentBuildCreated %s", 201, payload) -} - -func (o *CreateComponentBuildCreated) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[POST /v1/components/{component_id}/builds][%d] createComponentBuildCreated %s", 201, payload) -} - -func (o *CreateComponentBuildCreated) GetPayload() *models.AppComponentBuild { - return o.Payload -} - -func (o *CreateComponentBuildCreated) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.AppComponentBuild) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewCreateComponentBuildBadRequest creates a CreateComponentBuildBadRequest with default headers values -func NewCreateComponentBuildBadRequest() *CreateComponentBuildBadRequest { - return &CreateComponentBuildBadRequest{} -} - -/* -CreateComponentBuildBadRequest describes a response with status code 400, with default header values. - -Bad Request -*/ -type CreateComponentBuildBadRequest struct { - Payload *models.StderrErrResponse -} - -// IsSuccess returns true when this create component build bad request response has a 2xx status code -func (o *CreateComponentBuildBadRequest) IsSuccess() bool { - return false -} - -// IsRedirect returns true when this create component build bad request response has a 3xx status code -func (o *CreateComponentBuildBadRequest) IsRedirect() bool { - return false -} - -// IsClientError returns true when this create component build bad request response has a 4xx status code -func (o *CreateComponentBuildBadRequest) IsClientError() bool { - return true -} - -// IsServerError returns true when this create component build bad request response has a 5xx status code -func (o *CreateComponentBuildBadRequest) IsServerError() bool { - return false -} - -// IsCode returns true when this create component build bad request response a status code equal to that given -func (o *CreateComponentBuildBadRequest) IsCode(code int) bool { - return code == 400 -} - -// Code gets the status code for the create component build bad request response -func (o *CreateComponentBuildBadRequest) Code() int { - return 400 -} - -func (o *CreateComponentBuildBadRequest) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[POST /v1/components/{component_id}/builds][%d] createComponentBuildBadRequest %s", 400, payload) -} - -func (o *CreateComponentBuildBadRequest) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[POST /v1/components/{component_id}/builds][%d] createComponentBuildBadRequest %s", 400, payload) -} - -func (o *CreateComponentBuildBadRequest) GetPayload() *models.StderrErrResponse { - return o.Payload -} - -func (o *CreateComponentBuildBadRequest) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.StderrErrResponse) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewCreateComponentBuildUnauthorized creates a CreateComponentBuildUnauthorized with default headers values -func NewCreateComponentBuildUnauthorized() *CreateComponentBuildUnauthorized { - return &CreateComponentBuildUnauthorized{} -} - -/* -CreateComponentBuildUnauthorized describes a response with status code 401, with default header values. - -Unauthorized -*/ -type CreateComponentBuildUnauthorized struct { - Payload *models.StderrErrResponse -} - -// IsSuccess returns true when this create component build unauthorized response has a 2xx status code -func (o *CreateComponentBuildUnauthorized) IsSuccess() bool { - return false -} - -// IsRedirect returns true when this create component build unauthorized response has a 3xx status code -func (o *CreateComponentBuildUnauthorized) IsRedirect() bool { - return false -} - -// IsClientError returns true when this create component build unauthorized response has a 4xx status code -func (o *CreateComponentBuildUnauthorized) IsClientError() bool { - return true -} - -// IsServerError returns true when this create component build unauthorized response has a 5xx status code -func (o *CreateComponentBuildUnauthorized) IsServerError() bool { - return false -} - -// IsCode returns true when this create component build unauthorized response a status code equal to that given -func (o *CreateComponentBuildUnauthorized) IsCode(code int) bool { - return code == 401 -} - -// Code gets the status code for the create component build unauthorized response -func (o *CreateComponentBuildUnauthorized) Code() int { - return 401 -} - -func (o *CreateComponentBuildUnauthorized) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[POST /v1/components/{component_id}/builds][%d] createComponentBuildUnauthorized %s", 401, payload) -} - -func (o *CreateComponentBuildUnauthorized) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[POST /v1/components/{component_id}/builds][%d] createComponentBuildUnauthorized %s", 401, payload) -} - -func (o *CreateComponentBuildUnauthorized) GetPayload() *models.StderrErrResponse { - return o.Payload -} - -func (o *CreateComponentBuildUnauthorized) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.StderrErrResponse) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewCreateComponentBuildForbidden creates a CreateComponentBuildForbidden with default headers values -func NewCreateComponentBuildForbidden() *CreateComponentBuildForbidden { - return &CreateComponentBuildForbidden{} -} - -/* -CreateComponentBuildForbidden describes a response with status code 403, with default header values. - -Forbidden -*/ -type CreateComponentBuildForbidden struct { - Payload *models.StderrErrResponse -} - -// IsSuccess returns true when this create component build forbidden response has a 2xx status code -func (o *CreateComponentBuildForbidden) IsSuccess() bool { - return false -} - -// IsRedirect returns true when this create component build forbidden response has a 3xx status code -func (o *CreateComponentBuildForbidden) IsRedirect() bool { - return false -} - -// IsClientError returns true when this create component build forbidden response has a 4xx status code -func (o *CreateComponentBuildForbidden) IsClientError() bool { - return true -} - -// IsServerError returns true when this create component build forbidden response has a 5xx status code -func (o *CreateComponentBuildForbidden) IsServerError() bool { - return false -} - -// IsCode returns true when this create component build forbidden response a status code equal to that given -func (o *CreateComponentBuildForbidden) IsCode(code int) bool { - return code == 403 -} - -// Code gets the status code for the create component build forbidden response -func (o *CreateComponentBuildForbidden) Code() int { - return 403 -} - -func (o *CreateComponentBuildForbidden) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[POST /v1/components/{component_id}/builds][%d] createComponentBuildForbidden %s", 403, payload) -} - -func (o *CreateComponentBuildForbidden) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[POST /v1/components/{component_id}/builds][%d] createComponentBuildForbidden %s", 403, payload) -} - -func (o *CreateComponentBuildForbidden) GetPayload() *models.StderrErrResponse { - return o.Payload -} - -func (o *CreateComponentBuildForbidden) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.StderrErrResponse) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewCreateComponentBuildNotFound creates a CreateComponentBuildNotFound with default headers values -func NewCreateComponentBuildNotFound() *CreateComponentBuildNotFound { - return &CreateComponentBuildNotFound{} -} - -/* -CreateComponentBuildNotFound describes a response with status code 404, with default header values. - -Not Found -*/ -type CreateComponentBuildNotFound struct { - Payload *models.StderrErrResponse -} - -// IsSuccess returns true when this create component build not found response has a 2xx status code -func (o *CreateComponentBuildNotFound) IsSuccess() bool { - return false -} - -// IsRedirect returns true when this create component build not found response has a 3xx status code -func (o *CreateComponentBuildNotFound) IsRedirect() bool { - return false -} - -// IsClientError returns true when this create component build not found response has a 4xx status code -func (o *CreateComponentBuildNotFound) IsClientError() bool { - return true -} - -// IsServerError returns true when this create component build not found response has a 5xx status code -func (o *CreateComponentBuildNotFound) IsServerError() bool { - return false -} - -// IsCode returns true when this create component build not found response a status code equal to that given -func (o *CreateComponentBuildNotFound) IsCode(code int) bool { - return code == 404 -} - -// Code gets the status code for the create component build not found response -func (o *CreateComponentBuildNotFound) Code() int { - return 404 -} - -func (o *CreateComponentBuildNotFound) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[POST /v1/components/{component_id}/builds][%d] createComponentBuildNotFound %s", 404, payload) -} - -func (o *CreateComponentBuildNotFound) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[POST /v1/components/{component_id}/builds][%d] createComponentBuildNotFound %s", 404, payload) -} - -func (o *CreateComponentBuildNotFound) GetPayload() *models.StderrErrResponse { - return o.Payload -} - -func (o *CreateComponentBuildNotFound) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.StderrErrResponse) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewCreateComponentBuildInternalServerError creates a CreateComponentBuildInternalServerError with default headers values -func NewCreateComponentBuildInternalServerError() *CreateComponentBuildInternalServerError { - return &CreateComponentBuildInternalServerError{} -} - -/* -CreateComponentBuildInternalServerError describes a response with status code 500, with default header values. - -Internal Server Error -*/ -type CreateComponentBuildInternalServerError struct { - Payload *models.StderrErrResponse -} - -// IsSuccess returns true when this create component build internal server error response has a 2xx status code -func (o *CreateComponentBuildInternalServerError) IsSuccess() bool { - return false -} - -// IsRedirect returns true when this create component build internal server error response has a 3xx status code -func (o *CreateComponentBuildInternalServerError) IsRedirect() bool { - return false -} - -// IsClientError returns true when this create component build internal server error response has a 4xx status code -func (o *CreateComponentBuildInternalServerError) IsClientError() bool { - return false -} - -// IsServerError returns true when this create component build internal server error response has a 5xx status code -func (o *CreateComponentBuildInternalServerError) IsServerError() bool { - return true -} - -// IsCode returns true when this create component build internal server error response a status code equal to that given -func (o *CreateComponentBuildInternalServerError) IsCode(code int) bool { - return code == 500 -} - -// Code gets the status code for the create component build internal server error response -func (o *CreateComponentBuildInternalServerError) Code() int { - return 500 -} - -func (o *CreateComponentBuildInternalServerError) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[POST /v1/components/{component_id}/builds][%d] createComponentBuildInternalServerError %s", 500, payload) -} - -func (o *CreateComponentBuildInternalServerError) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[POST /v1/components/{component_id}/builds][%d] createComponentBuildInternalServerError %s", 500, payload) -} - -func (o *CreateComponentBuildInternalServerError) GetPayload() *models.StderrErrResponse { - return o.Payload -} - -func (o *CreateComponentBuildInternalServerError) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.StderrErrResponse) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} diff --git a/client/operations/create_component_parameters.go b/client/operations/create_component_parameters.go deleted file mode 100644 index d829e74..0000000 --- a/client/operations/create_component_parameters.go +++ /dev/null @@ -1,175 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package operations - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "context" - "net/http" - "time" - - "github.com/go-openapi/errors" - "github.com/go-openapi/runtime" - cr "github.com/go-openapi/runtime/client" - "github.com/go-openapi/strfmt" - - "github.com/nuonco/nuon-go/models" -) - -// NewCreateComponentParams creates a new CreateComponentParams object, -// with the default timeout for this client. -// -// Default values are not hydrated, since defaults are normally applied by the API server side. -// -// To enforce default values in parameter, use SetDefaults or WithDefaults. -func NewCreateComponentParams() *CreateComponentParams { - return &CreateComponentParams{ - timeout: cr.DefaultTimeout, - } -} - -// NewCreateComponentParamsWithTimeout creates a new CreateComponentParams object -// with the ability to set a timeout on a request. -func NewCreateComponentParamsWithTimeout(timeout time.Duration) *CreateComponentParams { - return &CreateComponentParams{ - timeout: timeout, - } -} - -// NewCreateComponentParamsWithContext creates a new CreateComponentParams object -// with the ability to set a context for a request. -func NewCreateComponentParamsWithContext(ctx context.Context) *CreateComponentParams { - return &CreateComponentParams{ - Context: ctx, - } -} - -// NewCreateComponentParamsWithHTTPClient creates a new CreateComponentParams object -// with the ability to set a custom HTTPClient for a request. -func NewCreateComponentParamsWithHTTPClient(client *http.Client) *CreateComponentParams { - return &CreateComponentParams{ - HTTPClient: client, - } -} - -/* -CreateComponentParams contains all the parameters to send to the API endpoint - - for the create component operation. - - Typically these are written to a http.Request. -*/ -type CreateComponentParams struct { - - /* AppID. - - app ID - */ - AppID string - - /* Req. - - Input - */ - Req *models.ServiceCreateComponentRequest - - timeout time.Duration - Context context.Context - HTTPClient *http.Client -} - -// WithDefaults hydrates default values in the create component params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *CreateComponentParams) WithDefaults() *CreateComponentParams { - o.SetDefaults() - return o -} - -// SetDefaults hydrates default values in the create component params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *CreateComponentParams) SetDefaults() { - // no default values defined for this parameter -} - -// WithTimeout adds the timeout to the create component params -func (o *CreateComponentParams) WithTimeout(timeout time.Duration) *CreateComponentParams { - o.SetTimeout(timeout) - return o -} - -// SetTimeout adds the timeout to the create component params -func (o *CreateComponentParams) SetTimeout(timeout time.Duration) { - o.timeout = timeout -} - -// WithContext adds the context to the create component params -func (o *CreateComponentParams) WithContext(ctx context.Context) *CreateComponentParams { - o.SetContext(ctx) - return o -} - -// SetContext adds the context to the create component params -func (o *CreateComponentParams) SetContext(ctx context.Context) { - o.Context = ctx -} - -// WithHTTPClient adds the HTTPClient to the create component params -func (o *CreateComponentParams) WithHTTPClient(client *http.Client) *CreateComponentParams { - o.SetHTTPClient(client) - return o -} - -// SetHTTPClient adds the HTTPClient to the create component params -func (o *CreateComponentParams) SetHTTPClient(client *http.Client) { - o.HTTPClient = client -} - -// WithAppID adds the appID to the create component params -func (o *CreateComponentParams) WithAppID(appID string) *CreateComponentParams { - o.SetAppID(appID) - return o -} - -// SetAppID adds the appId to the create component params -func (o *CreateComponentParams) SetAppID(appID string) { - o.AppID = appID -} - -// WithReq adds the req to the create component params -func (o *CreateComponentParams) WithReq(req *models.ServiceCreateComponentRequest) *CreateComponentParams { - o.SetReq(req) - return o -} - -// SetReq adds the req to the create component params -func (o *CreateComponentParams) SetReq(req *models.ServiceCreateComponentRequest) { - o.Req = req -} - -// WriteToRequest writes these params to a swagger request -func (o *CreateComponentParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { - - if err := r.SetTimeout(o.timeout); err != nil { - return err - } - var res []error - - // path param app_id - if err := r.SetPathParam("app_id", o.AppID); err != nil { - return err - } - if o.Req != nil { - if err := r.SetBodyParam(o.Req); err != nil { - return err - } - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} diff --git a/client/operations/create_component_release_parameters.go b/client/operations/create_component_release_parameters.go deleted file mode 100644 index c052a37..0000000 --- a/client/operations/create_component_release_parameters.go +++ /dev/null @@ -1,175 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package operations - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "context" - "net/http" - "time" - - "github.com/go-openapi/errors" - "github.com/go-openapi/runtime" - cr "github.com/go-openapi/runtime/client" - "github.com/go-openapi/strfmt" - - "github.com/nuonco/nuon-go/models" -) - -// NewCreateComponentReleaseParams creates a new CreateComponentReleaseParams object, -// with the default timeout for this client. -// -// Default values are not hydrated, since defaults are normally applied by the API server side. -// -// To enforce default values in parameter, use SetDefaults or WithDefaults. -func NewCreateComponentReleaseParams() *CreateComponentReleaseParams { - return &CreateComponentReleaseParams{ - timeout: cr.DefaultTimeout, - } -} - -// NewCreateComponentReleaseParamsWithTimeout creates a new CreateComponentReleaseParams object -// with the ability to set a timeout on a request. -func NewCreateComponentReleaseParamsWithTimeout(timeout time.Duration) *CreateComponentReleaseParams { - return &CreateComponentReleaseParams{ - timeout: timeout, - } -} - -// NewCreateComponentReleaseParamsWithContext creates a new CreateComponentReleaseParams object -// with the ability to set a context for a request. -func NewCreateComponentReleaseParamsWithContext(ctx context.Context) *CreateComponentReleaseParams { - return &CreateComponentReleaseParams{ - Context: ctx, - } -} - -// NewCreateComponentReleaseParamsWithHTTPClient creates a new CreateComponentReleaseParams object -// with the ability to set a custom HTTPClient for a request. -func NewCreateComponentReleaseParamsWithHTTPClient(client *http.Client) *CreateComponentReleaseParams { - return &CreateComponentReleaseParams{ - HTTPClient: client, - } -} - -/* -CreateComponentReleaseParams contains all the parameters to send to the API endpoint - - for the create component release operation. - - Typically these are written to a http.Request. -*/ -type CreateComponentReleaseParams struct { - - /* ComponentID. - - component ID - */ - ComponentID string - - /* Req. - - Input - */ - Req *models.ServiceCreateComponentReleaseRequest - - timeout time.Duration - Context context.Context - HTTPClient *http.Client -} - -// WithDefaults hydrates default values in the create component release params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *CreateComponentReleaseParams) WithDefaults() *CreateComponentReleaseParams { - o.SetDefaults() - return o -} - -// SetDefaults hydrates default values in the create component release params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *CreateComponentReleaseParams) SetDefaults() { - // no default values defined for this parameter -} - -// WithTimeout adds the timeout to the create component release params -func (o *CreateComponentReleaseParams) WithTimeout(timeout time.Duration) *CreateComponentReleaseParams { - o.SetTimeout(timeout) - return o -} - -// SetTimeout adds the timeout to the create component release params -func (o *CreateComponentReleaseParams) SetTimeout(timeout time.Duration) { - o.timeout = timeout -} - -// WithContext adds the context to the create component release params -func (o *CreateComponentReleaseParams) WithContext(ctx context.Context) *CreateComponentReleaseParams { - o.SetContext(ctx) - return o -} - -// SetContext adds the context to the create component release params -func (o *CreateComponentReleaseParams) SetContext(ctx context.Context) { - o.Context = ctx -} - -// WithHTTPClient adds the HTTPClient to the create component release params -func (o *CreateComponentReleaseParams) WithHTTPClient(client *http.Client) *CreateComponentReleaseParams { - o.SetHTTPClient(client) - return o -} - -// SetHTTPClient adds the HTTPClient to the create component release params -func (o *CreateComponentReleaseParams) SetHTTPClient(client *http.Client) { - o.HTTPClient = client -} - -// WithComponentID adds the componentID to the create component release params -func (o *CreateComponentReleaseParams) WithComponentID(componentID string) *CreateComponentReleaseParams { - o.SetComponentID(componentID) - return o -} - -// SetComponentID adds the componentId to the create component release params -func (o *CreateComponentReleaseParams) SetComponentID(componentID string) { - o.ComponentID = componentID -} - -// WithReq adds the req to the create component release params -func (o *CreateComponentReleaseParams) WithReq(req *models.ServiceCreateComponentReleaseRequest) *CreateComponentReleaseParams { - o.SetReq(req) - return o -} - -// SetReq adds the req to the create component release params -func (o *CreateComponentReleaseParams) SetReq(req *models.ServiceCreateComponentReleaseRequest) { - o.Req = req -} - -// WriteToRequest writes these params to a swagger request -func (o *CreateComponentReleaseParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { - - if err := r.SetTimeout(o.timeout); err != nil { - return err - } - var res []error - - // path param component_id - if err := r.SetPathParam("component_id", o.ComponentID); err != nil { - return err - } - if o.Req != nil { - if err := r.SetBodyParam(o.Req); err != nil { - return err - } - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} diff --git a/client/operations/create_component_release_responses.go b/client/operations/create_component_release_responses.go deleted file mode 100644 index 863194b..0000000 --- a/client/operations/create_component_release_responses.go +++ /dev/null @@ -1,486 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package operations - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "encoding/json" - "fmt" - "io" - - "github.com/go-openapi/runtime" - "github.com/go-openapi/strfmt" - - "github.com/nuonco/nuon-go/models" -) - -// CreateComponentReleaseReader is a Reader for the CreateComponentRelease structure. -type CreateComponentReleaseReader struct { - formats strfmt.Registry -} - -// ReadResponse reads a server response into the received o. -func (o *CreateComponentReleaseReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { - switch response.Code() { - case 201: - result := NewCreateComponentReleaseCreated() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return result, nil - case 400: - result := NewCreateComponentReleaseBadRequest() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return nil, result - case 401: - result := NewCreateComponentReleaseUnauthorized() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return nil, result - case 403: - result := NewCreateComponentReleaseForbidden() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return nil, result - case 404: - result := NewCreateComponentReleaseNotFound() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return nil, result - case 500: - result := NewCreateComponentReleaseInternalServerError() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return nil, result - default: - return nil, runtime.NewAPIError("[POST /v1/components/{component_id}/releases] CreateComponentRelease", response, response.Code()) - } -} - -// NewCreateComponentReleaseCreated creates a CreateComponentReleaseCreated with default headers values -func NewCreateComponentReleaseCreated() *CreateComponentReleaseCreated { - return &CreateComponentReleaseCreated{} -} - -/* -CreateComponentReleaseCreated describes a response with status code 201, with default header values. - -Created -*/ -type CreateComponentReleaseCreated struct { - Payload *models.AppComponentRelease -} - -// IsSuccess returns true when this create component release created response has a 2xx status code -func (o *CreateComponentReleaseCreated) IsSuccess() bool { - return true -} - -// IsRedirect returns true when this create component release created response has a 3xx status code -func (o *CreateComponentReleaseCreated) IsRedirect() bool { - return false -} - -// IsClientError returns true when this create component release created response has a 4xx status code -func (o *CreateComponentReleaseCreated) IsClientError() bool { - return false -} - -// IsServerError returns true when this create component release created response has a 5xx status code -func (o *CreateComponentReleaseCreated) IsServerError() bool { - return false -} - -// IsCode returns true when this create component release created response a status code equal to that given -func (o *CreateComponentReleaseCreated) IsCode(code int) bool { - return code == 201 -} - -// Code gets the status code for the create component release created response -func (o *CreateComponentReleaseCreated) Code() int { - return 201 -} - -func (o *CreateComponentReleaseCreated) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[POST /v1/components/{component_id}/releases][%d] createComponentReleaseCreated %s", 201, payload) -} - -func (o *CreateComponentReleaseCreated) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[POST /v1/components/{component_id}/releases][%d] createComponentReleaseCreated %s", 201, payload) -} - -func (o *CreateComponentReleaseCreated) GetPayload() *models.AppComponentRelease { - return o.Payload -} - -func (o *CreateComponentReleaseCreated) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.AppComponentRelease) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewCreateComponentReleaseBadRequest creates a CreateComponentReleaseBadRequest with default headers values -func NewCreateComponentReleaseBadRequest() *CreateComponentReleaseBadRequest { - return &CreateComponentReleaseBadRequest{} -} - -/* -CreateComponentReleaseBadRequest describes a response with status code 400, with default header values. - -Bad Request -*/ -type CreateComponentReleaseBadRequest struct { - Payload *models.StderrErrResponse -} - -// IsSuccess returns true when this create component release bad request response has a 2xx status code -func (o *CreateComponentReleaseBadRequest) IsSuccess() bool { - return false -} - -// IsRedirect returns true when this create component release bad request response has a 3xx status code -func (o *CreateComponentReleaseBadRequest) IsRedirect() bool { - return false -} - -// IsClientError returns true when this create component release bad request response has a 4xx status code -func (o *CreateComponentReleaseBadRequest) IsClientError() bool { - return true -} - -// IsServerError returns true when this create component release bad request response has a 5xx status code -func (o *CreateComponentReleaseBadRequest) IsServerError() bool { - return false -} - -// IsCode returns true when this create component release bad request response a status code equal to that given -func (o *CreateComponentReleaseBadRequest) IsCode(code int) bool { - return code == 400 -} - -// Code gets the status code for the create component release bad request response -func (o *CreateComponentReleaseBadRequest) Code() int { - return 400 -} - -func (o *CreateComponentReleaseBadRequest) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[POST /v1/components/{component_id}/releases][%d] createComponentReleaseBadRequest %s", 400, payload) -} - -func (o *CreateComponentReleaseBadRequest) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[POST /v1/components/{component_id}/releases][%d] createComponentReleaseBadRequest %s", 400, payload) -} - -func (o *CreateComponentReleaseBadRequest) GetPayload() *models.StderrErrResponse { - return o.Payload -} - -func (o *CreateComponentReleaseBadRequest) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.StderrErrResponse) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewCreateComponentReleaseUnauthorized creates a CreateComponentReleaseUnauthorized with default headers values -func NewCreateComponentReleaseUnauthorized() *CreateComponentReleaseUnauthorized { - return &CreateComponentReleaseUnauthorized{} -} - -/* -CreateComponentReleaseUnauthorized describes a response with status code 401, with default header values. - -Unauthorized -*/ -type CreateComponentReleaseUnauthorized struct { - Payload *models.StderrErrResponse -} - -// IsSuccess returns true when this create component release unauthorized response has a 2xx status code -func (o *CreateComponentReleaseUnauthorized) IsSuccess() bool { - return false -} - -// IsRedirect returns true when this create component release unauthorized response has a 3xx status code -func (o *CreateComponentReleaseUnauthorized) IsRedirect() bool { - return false -} - -// IsClientError returns true when this create component release unauthorized response has a 4xx status code -func (o *CreateComponentReleaseUnauthorized) IsClientError() bool { - return true -} - -// IsServerError returns true when this create component release unauthorized response has a 5xx status code -func (o *CreateComponentReleaseUnauthorized) IsServerError() bool { - return false -} - -// IsCode returns true when this create component release unauthorized response a status code equal to that given -func (o *CreateComponentReleaseUnauthorized) IsCode(code int) bool { - return code == 401 -} - -// Code gets the status code for the create component release unauthorized response -func (o *CreateComponentReleaseUnauthorized) Code() int { - return 401 -} - -func (o *CreateComponentReleaseUnauthorized) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[POST /v1/components/{component_id}/releases][%d] createComponentReleaseUnauthorized %s", 401, payload) -} - -func (o *CreateComponentReleaseUnauthorized) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[POST /v1/components/{component_id}/releases][%d] createComponentReleaseUnauthorized %s", 401, payload) -} - -func (o *CreateComponentReleaseUnauthorized) GetPayload() *models.StderrErrResponse { - return o.Payload -} - -func (o *CreateComponentReleaseUnauthorized) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.StderrErrResponse) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewCreateComponentReleaseForbidden creates a CreateComponentReleaseForbidden with default headers values -func NewCreateComponentReleaseForbidden() *CreateComponentReleaseForbidden { - return &CreateComponentReleaseForbidden{} -} - -/* -CreateComponentReleaseForbidden describes a response with status code 403, with default header values. - -Forbidden -*/ -type CreateComponentReleaseForbidden struct { - Payload *models.StderrErrResponse -} - -// IsSuccess returns true when this create component release forbidden response has a 2xx status code -func (o *CreateComponentReleaseForbidden) IsSuccess() bool { - return false -} - -// IsRedirect returns true when this create component release forbidden response has a 3xx status code -func (o *CreateComponentReleaseForbidden) IsRedirect() bool { - return false -} - -// IsClientError returns true when this create component release forbidden response has a 4xx status code -func (o *CreateComponentReleaseForbidden) IsClientError() bool { - return true -} - -// IsServerError returns true when this create component release forbidden response has a 5xx status code -func (o *CreateComponentReleaseForbidden) IsServerError() bool { - return false -} - -// IsCode returns true when this create component release forbidden response a status code equal to that given -func (o *CreateComponentReleaseForbidden) IsCode(code int) bool { - return code == 403 -} - -// Code gets the status code for the create component release forbidden response -func (o *CreateComponentReleaseForbidden) Code() int { - return 403 -} - -func (o *CreateComponentReleaseForbidden) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[POST /v1/components/{component_id}/releases][%d] createComponentReleaseForbidden %s", 403, payload) -} - -func (o *CreateComponentReleaseForbidden) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[POST /v1/components/{component_id}/releases][%d] createComponentReleaseForbidden %s", 403, payload) -} - -func (o *CreateComponentReleaseForbidden) GetPayload() *models.StderrErrResponse { - return o.Payload -} - -func (o *CreateComponentReleaseForbidden) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.StderrErrResponse) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewCreateComponentReleaseNotFound creates a CreateComponentReleaseNotFound with default headers values -func NewCreateComponentReleaseNotFound() *CreateComponentReleaseNotFound { - return &CreateComponentReleaseNotFound{} -} - -/* -CreateComponentReleaseNotFound describes a response with status code 404, with default header values. - -Not Found -*/ -type CreateComponentReleaseNotFound struct { - Payload *models.StderrErrResponse -} - -// IsSuccess returns true when this create component release not found response has a 2xx status code -func (o *CreateComponentReleaseNotFound) IsSuccess() bool { - return false -} - -// IsRedirect returns true when this create component release not found response has a 3xx status code -func (o *CreateComponentReleaseNotFound) IsRedirect() bool { - return false -} - -// IsClientError returns true when this create component release not found response has a 4xx status code -func (o *CreateComponentReleaseNotFound) IsClientError() bool { - return true -} - -// IsServerError returns true when this create component release not found response has a 5xx status code -func (o *CreateComponentReleaseNotFound) IsServerError() bool { - return false -} - -// IsCode returns true when this create component release not found response a status code equal to that given -func (o *CreateComponentReleaseNotFound) IsCode(code int) bool { - return code == 404 -} - -// Code gets the status code for the create component release not found response -func (o *CreateComponentReleaseNotFound) Code() int { - return 404 -} - -func (o *CreateComponentReleaseNotFound) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[POST /v1/components/{component_id}/releases][%d] createComponentReleaseNotFound %s", 404, payload) -} - -func (o *CreateComponentReleaseNotFound) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[POST /v1/components/{component_id}/releases][%d] createComponentReleaseNotFound %s", 404, payload) -} - -func (o *CreateComponentReleaseNotFound) GetPayload() *models.StderrErrResponse { - return o.Payload -} - -func (o *CreateComponentReleaseNotFound) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.StderrErrResponse) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewCreateComponentReleaseInternalServerError creates a CreateComponentReleaseInternalServerError with default headers values -func NewCreateComponentReleaseInternalServerError() *CreateComponentReleaseInternalServerError { - return &CreateComponentReleaseInternalServerError{} -} - -/* -CreateComponentReleaseInternalServerError describes a response with status code 500, with default header values. - -Internal Server Error -*/ -type CreateComponentReleaseInternalServerError struct { - Payload *models.StderrErrResponse -} - -// IsSuccess returns true when this create component release internal server error response has a 2xx status code -func (o *CreateComponentReleaseInternalServerError) IsSuccess() bool { - return false -} - -// IsRedirect returns true when this create component release internal server error response has a 3xx status code -func (o *CreateComponentReleaseInternalServerError) IsRedirect() bool { - return false -} - -// IsClientError returns true when this create component release internal server error response has a 4xx status code -func (o *CreateComponentReleaseInternalServerError) IsClientError() bool { - return false -} - -// IsServerError returns true when this create component release internal server error response has a 5xx status code -func (o *CreateComponentReleaseInternalServerError) IsServerError() bool { - return true -} - -// IsCode returns true when this create component release internal server error response a status code equal to that given -func (o *CreateComponentReleaseInternalServerError) IsCode(code int) bool { - return code == 500 -} - -// Code gets the status code for the create component release internal server error response -func (o *CreateComponentReleaseInternalServerError) Code() int { - return 500 -} - -func (o *CreateComponentReleaseInternalServerError) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[POST /v1/components/{component_id}/releases][%d] createComponentReleaseInternalServerError %s", 500, payload) -} - -func (o *CreateComponentReleaseInternalServerError) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[POST /v1/components/{component_id}/releases][%d] createComponentReleaseInternalServerError %s", 500, payload) -} - -func (o *CreateComponentReleaseInternalServerError) GetPayload() *models.StderrErrResponse { - return o.Payload -} - -func (o *CreateComponentReleaseInternalServerError) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.StderrErrResponse) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} diff --git a/client/operations/create_component_responses.go b/client/operations/create_component_responses.go deleted file mode 100644 index 59a6268..0000000 --- a/client/operations/create_component_responses.go +++ /dev/null @@ -1,486 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package operations - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "encoding/json" - "fmt" - "io" - - "github.com/go-openapi/runtime" - "github.com/go-openapi/strfmt" - - "github.com/nuonco/nuon-go/models" -) - -// CreateComponentReader is a Reader for the CreateComponent structure. -type CreateComponentReader struct { - formats strfmt.Registry -} - -// ReadResponse reads a server response into the received o. -func (o *CreateComponentReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { - switch response.Code() { - case 201: - result := NewCreateComponentCreated() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return result, nil - case 400: - result := NewCreateComponentBadRequest() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return nil, result - case 401: - result := NewCreateComponentUnauthorized() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return nil, result - case 403: - result := NewCreateComponentForbidden() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return nil, result - case 404: - result := NewCreateComponentNotFound() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return nil, result - case 500: - result := NewCreateComponentInternalServerError() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return nil, result - default: - return nil, runtime.NewAPIError("[POST /v1/apps/{app_id}/components] CreateComponent", response, response.Code()) - } -} - -// NewCreateComponentCreated creates a CreateComponentCreated with default headers values -func NewCreateComponentCreated() *CreateComponentCreated { - return &CreateComponentCreated{} -} - -/* -CreateComponentCreated describes a response with status code 201, with default header values. - -Created -*/ -type CreateComponentCreated struct { - Payload *models.AppComponent -} - -// IsSuccess returns true when this create component created response has a 2xx status code -func (o *CreateComponentCreated) IsSuccess() bool { - return true -} - -// IsRedirect returns true when this create component created response has a 3xx status code -func (o *CreateComponentCreated) IsRedirect() bool { - return false -} - -// IsClientError returns true when this create component created response has a 4xx status code -func (o *CreateComponentCreated) IsClientError() bool { - return false -} - -// IsServerError returns true when this create component created response has a 5xx status code -func (o *CreateComponentCreated) IsServerError() bool { - return false -} - -// IsCode returns true when this create component created response a status code equal to that given -func (o *CreateComponentCreated) IsCode(code int) bool { - return code == 201 -} - -// Code gets the status code for the create component created response -func (o *CreateComponentCreated) Code() int { - return 201 -} - -func (o *CreateComponentCreated) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[POST /v1/apps/{app_id}/components][%d] createComponentCreated %s", 201, payload) -} - -func (o *CreateComponentCreated) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[POST /v1/apps/{app_id}/components][%d] createComponentCreated %s", 201, payload) -} - -func (o *CreateComponentCreated) GetPayload() *models.AppComponent { - return o.Payload -} - -func (o *CreateComponentCreated) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.AppComponent) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewCreateComponentBadRequest creates a CreateComponentBadRequest with default headers values -func NewCreateComponentBadRequest() *CreateComponentBadRequest { - return &CreateComponentBadRequest{} -} - -/* -CreateComponentBadRequest describes a response with status code 400, with default header values. - -Bad Request -*/ -type CreateComponentBadRequest struct { - Payload *models.StderrErrResponse -} - -// IsSuccess returns true when this create component bad request response has a 2xx status code -func (o *CreateComponentBadRequest) IsSuccess() bool { - return false -} - -// IsRedirect returns true when this create component bad request response has a 3xx status code -func (o *CreateComponentBadRequest) IsRedirect() bool { - return false -} - -// IsClientError returns true when this create component bad request response has a 4xx status code -func (o *CreateComponentBadRequest) IsClientError() bool { - return true -} - -// IsServerError returns true when this create component bad request response has a 5xx status code -func (o *CreateComponentBadRequest) IsServerError() bool { - return false -} - -// IsCode returns true when this create component bad request response a status code equal to that given -func (o *CreateComponentBadRequest) IsCode(code int) bool { - return code == 400 -} - -// Code gets the status code for the create component bad request response -func (o *CreateComponentBadRequest) Code() int { - return 400 -} - -func (o *CreateComponentBadRequest) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[POST /v1/apps/{app_id}/components][%d] createComponentBadRequest %s", 400, payload) -} - -func (o *CreateComponentBadRequest) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[POST /v1/apps/{app_id}/components][%d] createComponentBadRequest %s", 400, payload) -} - -func (o *CreateComponentBadRequest) GetPayload() *models.StderrErrResponse { - return o.Payload -} - -func (o *CreateComponentBadRequest) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.StderrErrResponse) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewCreateComponentUnauthorized creates a CreateComponentUnauthorized with default headers values -func NewCreateComponentUnauthorized() *CreateComponentUnauthorized { - return &CreateComponentUnauthorized{} -} - -/* -CreateComponentUnauthorized describes a response with status code 401, with default header values. - -Unauthorized -*/ -type CreateComponentUnauthorized struct { - Payload *models.StderrErrResponse -} - -// IsSuccess returns true when this create component unauthorized response has a 2xx status code -func (o *CreateComponentUnauthorized) IsSuccess() bool { - return false -} - -// IsRedirect returns true when this create component unauthorized response has a 3xx status code -func (o *CreateComponentUnauthorized) IsRedirect() bool { - return false -} - -// IsClientError returns true when this create component unauthorized response has a 4xx status code -func (o *CreateComponentUnauthorized) IsClientError() bool { - return true -} - -// IsServerError returns true when this create component unauthorized response has a 5xx status code -func (o *CreateComponentUnauthorized) IsServerError() bool { - return false -} - -// IsCode returns true when this create component unauthorized response a status code equal to that given -func (o *CreateComponentUnauthorized) IsCode(code int) bool { - return code == 401 -} - -// Code gets the status code for the create component unauthorized response -func (o *CreateComponentUnauthorized) Code() int { - return 401 -} - -func (o *CreateComponentUnauthorized) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[POST /v1/apps/{app_id}/components][%d] createComponentUnauthorized %s", 401, payload) -} - -func (o *CreateComponentUnauthorized) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[POST /v1/apps/{app_id}/components][%d] createComponentUnauthorized %s", 401, payload) -} - -func (o *CreateComponentUnauthorized) GetPayload() *models.StderrErrResponse { - return o.Payload -} - -func (o *CreateComponentUnauthorized) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.StderrErrResponse) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewCreateComponentForbidden creates a CreateComponentForbidden with default headers values -func NewCreateComponentForbidden() *CreateComponentForbidden { - return &CreateComponentForbidden{} -} - -/* -CreateComponentForbidden describes a response with status code 403, with default header values. - -Forbidden -*/ -type CreateComponentForbidden struct { - Payload *models.StderrErrResponse -} - -// IsSuccess returns true when this create component forbidden response has a 2xx status code -func (o *CreateComponentForbidden) IsSuccess() bool { - return false -} - -// IsRedirect returns true when this create component forbidden response has a 3xx status code -func (o *CreateComponentForbidden) IsRedirect() bool { - return false -} - -// IsClientError returns true when this create component forbidden response has a 4xx status code -func (o *CreateComponentForbidden) IsClientError() bool { - return true -} - -// IsServerError returns true when this create component forbidden response has a 5xx status code -func (o *CreateComponentForbidden) IsServerError() bool { - return false -} - -// IsCode returns true when this create component forbidden response a status code equal to that given -func (o *CreateComponentForbidden) IsCode(code int) bool { - return code == 403 -} - -// Code gets the status code for the create component forbidden response -func (o *CreateComponentForbidden) Code() int { - return 403 -} - -func (o *CreateComponentForbidden) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[POST /v1/apps/{app_id}/components][%d] createComponentForbidden %s", 403, payload) -} - -func (o *CreateComponentForbidden) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[POST /v1/apps/{app_id}/components][%d] createComponentForbidden %s", 403, payload) -} - -func (o *CreateComponentForbidden) GetPayload() *models.StderrErrResponse { - return o.Payload -} - -func (o *CreateComponentForbidden) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.StderrErrResponse) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewCreateComponentNotFound creates a CreateComponentNotFound with default headers values -func NewCreateComponentNotFound() *CreateComponentNotFound { - return &CreateComponentNotFound{} -} - -/* -CreateComponentNotFound describes a response with status code 404, with default header values. - -Not Found -*/ -type CreateComponentNotFound struct { - Payload *models.StderrErrResponse -} - -// IsSuccess returns true when this create component not found response has a 2xx status code -func (o *CreateComponentNotFound) IsSuccess() bool { - return false -} - -// IsRedirect returns true when this create component not found response has a 3xx status code -func (o *CreateComponentNotFound) IsRedirect() bool { - return false -} - -// IsClientError returns true when this create component not found response has a 4xx status code -func (o *CreateComponentNotFound) IsClientError() bool { - return true -} - -// IsServerError returns true when this create component not found response has a 5xx status code -func (o *CreateComponentNotFound) IsServerError() bool { - return false -} - -// IsCode returns true when this create component not found response a status code equal to that given -func (o *CreateComponentNotFound) IsCode(code int) bool { - return code == 404 -} - -// Code gets the status code for the create component not found response -func (o *CreateComponentNotFound) Code() int { - return 404 -} - -func (o *CreateComponentNotFound) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[POST /v1/apps/{app_id}/components][%d] createComponentNotFound %s", 404, payload) -} - -func (o *CreateComponentNotFound) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[POST /v1/apps/{app_id}/components][%d] createComponentNotFound %s", 404, payload) -} - -func (o *CreateComponentNotFound) GetPayload() *models.StderrErrResponse { - return o.Payload -} - -func (o *CreateComponentNotFound) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.StderrErrResponse) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewCreateComponentInternalServerError creates a CreateComponentInternalServerError with default headers values -func NewCreateComponentInternalServerError() *CreateComponentInternalServerError { - return &CreateComponentInternalServerError{} -} - -/* -CreateComponentInternalServerError describes a response with status code 500, with default header values. - -Internal Server Error -*/ -type CreateComponentInternalServerError struct { - Payload *models.StderrErrResponse -} - -// IsSuccess returns true when this create component internal server error response has a 2xx status code -func (o *CreateComponentInternalServerError) IsSuccess() bool { - return false -} - -// IsRedirect returns true when this create component internal server error response has a 3xx status code -func (o *CreateComponentInternalServerError) IsRedirect() bool { - return false -} - -// IsClientError returns true when this create component internal server error response has a 4xx status code -func (o *CreateComponentInternalServerError) IsClientError() bool { - return false -} - -// IsServerError returns true when this create component internal server error response has a 5xx status code -func (o *CreateComponentInternalServerError) IsServerError() bool { - return true -} - -// IsCode returns true when this create component internal server error response a status code equal to that given -func (o *CreateComponentInternalServerError) IsCode(code int) bool { - return code == 500 -} - -// Code gets the status code for the create component internal server error response -func (o *CreateComponentInternalServerError) Code() int { - return 500 -} - -func (o *CreateComponentInternalServerError) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[POST /v1/apps/{app_id}/components][%d] createComponentInternalServerError %s", 500, payload) -} - -func (o *CreateComponentInternalServerError) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[POST /v1/apps/{app_id}/components][%d] createComponentInternalServerError %s", 500, payload) -} - -func (o *CreateComponentInternalServerError) GetPayload() *models.StderrErrResponse { - return o.Payload -} - -func (o *CreateComponentInternalServerError) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.StderrErrResponse) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} diff --git a/client/operations/create_docker_build_component_config_parameters.go b/client/operations/create_docker_build_component_config_parameters.go deleted file mode 100644 index 821f137..0000000 --- a/client/operations/create_docker_build_component_config_parameters.go +++ /dev/null @@ -1,175 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package operations - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "context" - "net/http" - "time" - - "github.com/go-openapi/errors" - "github.com/go-openapi/runtime" - cr "github.com/go-openapi/runtime/client" - "github.com/go-openapi/strfmt" - - "github.com/nuonco/nuon-go/models" -) - -// NewCreateDockerBuildComponentConfigParams creates a new CreateDockerBuildComponentConfigParams object, -// with the default timeout for this client. -// -// Default values are not hydrated, since defaults are normally applied by the API server side. -// -// To enforce default values in parameter, use SetDefaults or WithDefaults. -func NewCreateDockerBuildComponentConfigParams() *CreateDockerBuildComponentConfigParams { - return &CreateDockerBuildComponentConfigParams{ - timeout: cr.DefaultTimeout, - } -} - -// NewCreateDockerBuildComponentConfigParamsWithTimeout creates a new CreateDockerBuildComponentConfigParams object -// with the ability to set a timeout on a request. -func NewCreateDockerBuildComponentConfigParamsWithTimeout(timeout time.Duration) *CreateDockerBuildComponentConfigParams { - return &CreateDockerBuildComponentConfigParams{ - timeout: timeout, - } -} - -// NewCreateDockerBuildComponentConfigParamsWithContext creates a new CreateDockerBuildComponentConfigParams object -// with the ability to set a context for a request. -func NewCreateDockerBuildComponentConfigParamsWithContext(ctx context.Context) *CreateDockerBuildComponentConfigParams { - return &CreateDockerBuildComponentConfigParams{ - Context: ctx, - } -} - -// NewCreateDockerBuildComponentConfigParamsWithHTTPClient creates a new CreateDockerBuildComponentConfigParams object -// with the ability to set a custom HTTPClient for a request. -func NewCreateDockerBuildComponentConfigParamsWithHTTPClient(client *http.Client) *CreateDockerBuildComponentConfigParams { - return &CreateDockerBuildComponentConfigParams{ - HTTPClient: client, - } -} - -/* -CreateDockerBuildComponentConfigParams contains all the parameters to send to the API endpoint - - for the create docker build component config operation. - - Typically these are written to a http.Request. -*/ -type CreateDockerBuildComponentConfigParams struct { - - /* ComponentID. - - component ID - */ - ComponentID string - - /* Req. - - Input - */ - Req *models.ServiceCreateDockerBuildComponentConfigRequest - - timeout time.Duration - Context context.Context - HTTPClient *http.Client -} - -// WithDefaults hydrates default values in the create docker build component config params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *CreateDockerBuildComponentConfigParams) WithDefaults() *CreateDockerBuildComponentConfigParams { - o.SetDefaults() - return o -} - -// SetDefaults hydrates default values in the create docker build component config params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *CreateDockerBuildComponentConfigParams) SetDefaults() { - // no default values defined for this parameter -} - -// WithTimeout adds the timeout to the create docker build component config params -func (o *CreateDockerBuildComponentConfigParams) WithTimeout(timeout time.Duration) *CreateDockerBuildComponentConfigParams { - o.SetTimeout(timeout) - return o -} - -// SetTimeout adds the timeout to the create docker build component config params -func (o *CreateDockerBuildComponentConfigParams) SetTimeout(timeout time.Duration) { - o.timeout = timeout -} - -// WithContext adds the context to the create docker build component config params -func (o *CreateDockerBuildComponentConfigParams) WithContext(ctx context.Context) *CreateDockerBuildComponentConfigParams { - o.SetContext(ctx) - return o -} - -// SetContext adds the context to the create docker build component config params -func (o *CreateDockerBuildComponentConfigParams) SetContext(ctx context.Context) { - o.Context = ctx -} - -// WithHTTPClient adds the HTTPClient to the create docker build component config params -func (o *CreateDockerBuildComponentConfigParams) WithHTTPClient(client *http.Client) *CreateDockerBuildComponentConfigParams { - o.SetHTTPClient(client) - return o -} - -// SetHTTPClient adds the HTTPClient to the create docker build component config params -func (o *CreateDockerBuildComponentConfigParams) SetHTTPClient(client *http.Client) { - o.HTTPClient = client -} - -// WithComponentID adds the componentID to the create docker build component config params -func (o *CreateDockerBuildComponentConfigParams) WithComponentID(componentID string) *CreateDockerBuildComponentConfigParams { - o.SetComponentID(componentID) - return o -} - -// SetComponentID adds the componentId to the create docker build component config params -func (o *CreateDockerBuildComponentConfigParams) SetComponentID(componentID string) { - o.ComponentID = componentID -} - -// WithReq adds the req to the create docker build component config params -func (o *CreateDockerBuildComponentConfigParams) WithReq(req *models.ServiceCreateDockerBuildComponentConfigRequest) *CreateDockerBuildComponentConfigParams { - o.SetReq(req) - return o -} - -// SetReq adds the req to the create docker build component config params -func (o *CreateDockerBuildComponentConfigParams) SetReq(req *models.ServiceCreateDockerBuildComponentConfigRequest) { - o.Req = req -} - -// WriteToRequest writes these params to a swagger request -func (o *CreateDockerBuildComponentConfigParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { - - if err := r.SetTimeout(o.timeout); err != nil { - return err - } - var res []error - - // path param component_id - if err := r.SetPathParam("component_id", o.ComponentID); err != nil { - return err - } - if o.Req != nil { - if err := r.SetBodyParam(o.Req); err != nil { - return err - } - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} diff --git a/client/operations/create_docker_build_component_config_responses.go b/client/operations/create_docker_build_component_config_responses.go deleted file mode 100644 index 9d68841..0000000 --- a/client/operations/create_docker_build_component_config_responses.go +++ /dev/null @@ -1,486 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package operations - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "encoding/json" - "fmt" - "io" - - "github.com/go-openapi/runtime" - "github.com/go-openapi/strfmt" - - "github.com/nuonco/nuon-go/models" -) - -// CreateDockerBuildComponentConfigReader is a Reader for the CreateDockerBuildComponentConfig structure. -type CreateDockerBuildComponentConfigReader struct { - formats strfmt.Registry -} - -// ReadResponse reads a server response into the received o. -func (o *CreateDockerBuildComponentConfigReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { - switch response.Code() { - case 201: - result := NewCreateDockerBuildComponentConfigCreated() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return result, nil - case 400: - result := NewCreateDockerBuildComponentConfigBadRequest() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return nil, result - case 401: - result := NewCreateDockerBuildComponentConfigUnauthorized() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return nil, result - case 403: - result := NewCreateDockerBuildComponentConfigForbidden() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return nil, result - case 404: - result := NewCreateDockerBuildComponentConfigNotFound() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return nil, result - case 500: - result := NewCreateDockerBuildComponentConfigInternalServerError() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return nil, result - default: - return nil, runtime.NewAPIError("[POST /v1/components/{component_id}/configs/docker-build] CreateDockerBuildComponentConfig", response, response.Code()) - } -} - -// NewCreateDockerBuildComponentConfigCreated creates a CreateDockerBuildComponentConfigCreated with default headers values -func NewCreateDockerBuildComponentConfigCreated() *CreateDockerBuildComponentConfigCreated { - return &CreateDockerBuildComponentConfigCreated{} -} - -/* -CreateDockerBuildComponentConfigCreated describes a response with status code 201, with default header values. - -Created -*/ -type CreateDockerBuildComponentConfigCreated struct { - Payload *models.AppDockerBuildComponentConfig -} - -// IsSuccess returns true when this create docker build component config created response has a 2xx status code -func (o *CreateDockerBuildComponentConfigCreated) IsSuccess() bool { - return true -} - -// IsRedirect returns true when this create docker build component config created response has a 3xx status code -func (o *CreateDockerBuildComponentConfigCreated) IsRedirect() bool { - return false -} - -// IsClientError returns true when this create docker build component config created response has a 4xx status code -func (o *CreateDockerBuildComponentConfigCreated) IsClientError() bool { - return false -} - -// IsServerError returns true when this create docker build component config created response has a 5xx status code -func (o *CreateDockerBuildComponentConfigCreated) IsServerError() bool { - return false -} - -// IsCode returns true when this create docker build component config created response a status code equal to that given -func (o *CreateDockerBuildComponentConfigCreated) IsCode(code int) bool { - return code == 201 -} - -// Code gets the status code for the create docker build component config created response -func (o *CreateDockerBuildComponentConfigCreated) Code() int { - return 201 -} - -func (o *CreateDockerBuildComponentConfigCreated) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[POST /v1/components/{component_id}/configs/docker-build][%d] createDockerBuildComponentConfigCreated %s", 201, payload) -} - -func (o *CreateDockerBuildComponentConfigCreated) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[POST /v1/components/{component_id}/configs/docker-build][%d] createDockerBuildComponentConfigCreated %s", 201, payload) -} - -func (o *CreateDockerBuildComponentConfigCreated) GetPayload() *models.AppDockerBuildComponentConfig { - return o.Payload -} - -func (o *CreateDockerBuildComponentConfigCreated) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.AppDockerBuildComponentConfig) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewCreateDockerBuildComponentConfigBadRequest creates a CreateDockerBuildComponentConfigBadRequest with default headers values -func NewCreateDockerBuildComponentConfigBadRequest() *CreateDockerBuildComponentConfigBadRequest { - return &CreateDockerBuildComponentConfigBadRequest{} -} - -/* -CreateDockerBuildComponentConfigBadRequest describes a response with status code 400, with default header values. - -Bad Request -*/ -type CreateDockerBuildComponentConfigBadRequest struct { - Payload *models.StderrErrResponse -} - -// IsSuccess returns true when this create docker build component config bad request response has a 2xx status code -func (o *CreateDockerBuildComponentConfigBadRequest) IsSuccess() bool { - return false -} - -// IsRedirect returns true when this create docker build component config bad request response has a 3xx status code -func (o *CreateDockerBuildComponentConfigBadRequest) IsRedirect() bool { - return false -} - -// IsClientError returns true when this create docker build component config bad request response has a 4xx status code -func (o *CreateDockerBuildComponentConfigBadRequest) IsClientError() bool { - return true -} - -// IsServerError returns true when this create docker build component config bad request response has a 5xx status code -func (o *CreateDockerBuildComponentConfigBadRequest) IsServerError() bool { - return false -} - -// IsCode returns true when this create docker build component config bad request response a status code equal to that given -func (o *CreateDockerBuildComponentConfigBadRequest) IsCode(code int) bool { - return code == 400 -} - -// Code gets the status code for the create docker build component config bad request response -func (o *CreateDockerBuildComponentConfigBadRequest) Code() int { - return 400 -} - -func (o *CreateDockerBuildComponentConfigBadRequest) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[POST /v1/components/{component_id}/configs/docker-build][%d] createDockerBuildComponentConfigBadRequest %s", 400, payload) -} - -func (o *CreateDockerBuildComponentConfigBadRequest) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[POST /v1/components/{component_id}/configs/docker-build][%d] createDockerBuildComponentConfigBadRequest %s", 400, payload) -} - -func (o *CreateDockerBuildComponentConfigBadRequest) GetPayload() *models.StderrErrResponse { - return o.Payload -} - -func (o *CreateDockerBuildComponentConfigBadRequest) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.StderrErrResponse) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewCreateDockerBuildComponentConfigUnauthorized creates a CreateDockerBuildComponentConfigUnauthorized with default headers values -func NewCreateDockerBuildComponentConfigUnauthorized() *CreateDockerBuildComponentConfigUnauthorized { - return &CreateDockerBuildComponentConfigUnauthorized{} -} - -/* -CreateDockerBuildComponentConfigUnauthorized describes a response with status code 401, with default header values. - -Unauthorized -*/ -type CreateDockerBuildComponentConfigUnauthorized struct { - Payload *models.StderrErrResponse -} - -// IsSuccess returns true when this create docker build component config unauthorized response has a 2xx status code -func (o *CreateDockerBuildComponentConfigUnauthorized) IsSuccess() bool { - return false -} - -// IsRedirect returns true when this create docker build component config unauthorized response has a 3xx status code -func (o *CreateDockerBuildComponentConfigUnauthorized) IsRedirect() bool { - return false -} - -// IsClientError returns true when this create docker build component config unauthorized response has a 4xx status code -func (o *CreateDockerBuildComponentConfigUnauthorized) IsClientError() bool { - return true -} - -// IsServerError returns true when this create docker build component config unauthorized response has a 5xx status code -func (o *CreateDockerBuildComponentConfigUnauthorized) IsServerError() bool { - return false -} - -// IsCode returns true when this create docker build component config unauthorized response a status code equal to that given -func (o *CreateDockerBuildComponentConfigUnauthorized) IsCode(code int) bool { - return code == 401 -} - -// Code gets the status code for the create docker build component config unauthorized response -func (o *CreateDockerBuildComponentConfigUnauthorized) Code() int { - return 401 -} - -func (o *CreateDockerBuildComponentConfigUnauthorized) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[POST /v1/components/{component_id}/configs/docker-build][%d] createDockerBuildComponentConfigUnauthorized %s", 401, payload) -} - -func (o *CreateDockerBuildComponentConfigUnauthorized) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[POST /v1/components/{component_id}/configs/docker-build][%d] createDockerBuildComponentConfigUnauthorized %s", 401, payload) -} - -func (o *CreateDockerBuildComponentConfigUnauthorized) GetPayload() *models.StderrErrResponse { - return o.Payload -} - -func (o *CreateDockerBuildComponentConfigUnauthorized) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.StderrErrResponse) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewCreateDockerBuildComponentConfigForbidden creates a CreateDockerBuildComponentConfigForbidden with default headers values -func NewCreateDockerBuildComponentConfigForbidden() *CreateDockerBuildComponentConfigForbidden { - return &CreateDockerBuildComponentConfigForbidden{} -} - -/* -CreateDockerBuildComponentConfigForbidden describes a response with status code 403, with default header values. - -Forbidden -*/ -type CreateDockerBuildComponentConfigForbidden struct { - Payload *models.StderrErrResponse -} - -// IsSuccess returns true when this create docker build component config forbidden response has a 2xx status code -func (o *CreateDockerBuildComponentConfigForbidden) IsSuccess() bool { - return false -} - -// IsRedirect returns true when this create docker build component config forbidden response has a 3xx status code -func (o *CreateDockerBuildComponentConfigForbidden) IsRedirect() bool { - return false -} - -// IsClientError returns true when this create docker build component config forbidden response has a 4xx status code -func (o *CreateDockerBuildComponentConfigForbidden) IsClientError() bool { - return true -} - -// IsServerError returns true when this create docker build component config forbidden response has a 5xx status code -func (o *CreateDockerBuildComponentConfigForbidden) IsServerError() bool { - return false -} - -// IsCode returns true when this create docker build component config forbidden response a status code equal to that given -func (o *CreateDockerBuildComponentConfigForbidden) IsCode(code int) bool { - return code == 403 -} - -// Code gets the status code for the create docker build component config forbidden response -func (o *CreateDockerBuildComponentConfigForbidden) Code() int { - return 403 -} - -func (o *CreateDockerBuildComponentConfigForbidden) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[POST /v1/components/{component_id}/configs/docker-build][%d] createDockerBuildComponentConfigForbidden %s", 403, payload) -} - -func (o *CreateDockerBuildComponentConfigForbidden) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[POST /v1/components/{component_id}/configs/docker-build][%d] createDockerBuildComponentConfigForbidden %s", 403, payload) -} - -func (o *CreateDockerBuildComponentConfigForbidden) GetPayload() *models.StderrErrResponse { - return o.Payload -} - -func (o *CreateDockerBuildComponentConfigForbidden) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.StderrErrResponse) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewCreateDockerBuildComponentConfigNotFound creates a CreateDockerBuildComponentConfigNotFound with default headers values -func NewCreateDockerBuildComponentConfigNotFound() *CreateDockerBuildComponentConfigNotFound { - return &CreateDockerBuildComponentConfigNotFound{} -} - -/* -CreateDockerBuildComponentConfigNotFound describes a response with status code 404, with default header values. - -Not Found -*/ -type CreateDockerBuildComponentConfigNotFound struct { - Payload *models.StderrErrResponse -} - -// IsSuccess returns true when this create docker build component config not found response has a 2xx status code -func (o *CreateDockerBuildComponentConfigNotFound) IsSuccess() bool { - return false -} - -// IsRedirect returns true when this create docker build component config not found response has a 3xx status code -func (o *CreateDockerBuildComponentConfigNotFound) IsRedirect() bool { - return false -} - -// IsClientError returns true when this create docker build component config not found response has a 4xx status code -func (o *CreateDockerBuildComponentConfigNotFound) IsClientError() bool { - return true -} - -// IsServerError returns true when this create docker build component config not found response has a 5xx status code -func (o *CreateDockerBuildComponentConfigNotFound) IsServerError() bool { - return false -} - -// IsCode returns true when this create docker build component config not found response a status code equal to that given -func (o *CreateDockerBuildComponentConfigNotFound) IsCode(code int) bool { - return code == 404 -} - -// Code gets the status code for the create docker build component config not found response -func (o *CreateDockerBuildComponentConfigNotFound) Code() int { - return 404 -} - -func (o *CreateDockerBuildComponentConfigNotFound) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[POST /v1/components/{component_id}/configs/docker-build][%d] createDockerBuildComponentConfigNotFound %s", 404, payload) -} - -func (o *CreateDockerBuildComponentConfigNotFound) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[POST /v1/components/{component_id}/configs/docker-build][%d] createDockerBuildComponentConfigNotFound %s", 404, payload) -} - -func (o *CreateDockerBuildComponentConfigNotFound) GetPayload() *models.StderrErrResponse { - return o.Payload -} - -func (o *CreateDockerBuildComponentConfigNotFound) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.StderrErrResponse) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewCreateDockerBuildComponentConfigInternalServerError creates a CreateDockerBuildComponentConfigInternalServerError with default headers values -func NewCreateDockerBuildComponentConfigInternalServerError() *CreateDockerBuildComponentConfigInternalServerError { - return &CreateDockerBuildComponentConfigInternalServerError{} -} - -/* -CreateDockerBuildComponentConfigInternalServerError describes a response with status code 500, with default header values. - -Internal Server Error -*/ -type CreateDockerBuildComponentConfigInternalServerError struct { - Payload *models.StderrErrResponse -} - -// IsSuccess returns true when this create docker build component config internal server error response has a 2xx status code -func (o *CreateDockerBuildComponentConfigInternalServerError) IsSuccess() bool { - return false -} - -// IsRedirect returns true when this create docker build component config internal server error response has a 3xx status code -func (o *CreateDockerBuildComponentConfigInternalServerError) IsRedirect() bool { - return false -} - -// IsClientError returns true when this create docker build component config internal server error response has a 4xx status code -func (o *CreateDockerBuildComponentConfigInternalServerError) IsClientError() bool { - return false -} - -// IsServerError returns true when this create docker build component config internal server error response has a 5xx status code -func (o *CreateDockerBuildComponentConfigInternalServerError) IsServerError() bool { - return true -} - -// IsCode returns true when this create docker build component config internal server error response a status code equal to that given -func (o *CreateDockerBuildComponentConfigInternalServerError) IsCode(code int) bool { - return code == 500 -} - -// Code gets the status code for the create docker build component config internal server error response -func (o *CreateDockerBuildComponentConfigInternalServerError) Code() int { - return 500 -} - -func (o *CreateDockerBuildComponentConfigInternalServerError) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[POST /v1/components/{component_id}/configs/docker-build][%d] createDockerBuildComponentConfigInternalServerError %s", 500, payload) -} - -func (o *CreateDockerBuildComponentConfigInternalServerError) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[POST /v1/components/{component_id}/configs/docker-build][%d] createDockerBuildComponentConfigInternalServerError %s", 500, payload) -} - -func (o *CreateDockerBuildComponentConfigInternalServerError) GetPayload() *models.StderrErrResponse { - return o.Payload -} - -func (o *CreateDockerBuildComponentConfigInternalServerError) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.StderrErrResponse) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} diff --git a/client/operations/create_external_image_component_config_parameters.go b/client/operations/create_external_image_component_config_parameters.go deleted file mode 100644 index 376acb5..0000000 --- a/client/operations/create_external_image_component_config_parameters.go +++ /dev/null @@ -1,175 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package operations - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "context" - "net/http" - "time" - - "github.com/go-openapi/errors" - "github.com/go-openapi/runtime" - cr "github.com/go-openapi/runtime/client" - "github.com/go-openapi/strfmt" - - "github.com/nuonco/nuon-go/models" -) - -// NewCreateExternalImageComponentConfigParams creates a new CreateExternalImageComponentConfigParams object, -// with the default timeout for this client. -// -// Default values are not hydrated, since defaults are normally applied by the API server side. -// -// To enforce default values in parameter, use SetDefaults or WithDefaults. -func NewCreateExternalImageComponentConfigParams() *CreateExternalImageComponentConfigParams { - return &CreateExternalImageComponentConfigParams{ - timeout: cr.DefaultTimeout, - } -} - -// NewCreateExternalImageComponentConfigParamsWithTimeout creates a new CreateExternalImageComponentConfigParams object -// with the ability to set a timeout on a request. -func NewCreateExternalImageComponentConfigParamsWithTimeout(timeout time.Duration) *CreateExternalImageComponentConfigParams { - return &CreateExternalImageComponentConfigParams{ - timeout: timeout, - } -} - -// NewCreateExternalImageComponentConfigParamsWithContext creates a new CreateExternalImageComponentConfigParams object -// with the ability to set a context for a request. -func NewCreateExternalImageComponentConfigParamsWithContext(ctx context.Context) *CreateExternalImageComponentConfigParams { - return &CreateExternalImageComponentConfigParams{ - Context: ctx, - } -} - -// NewCreateExternalImageComponentConfigParamsWithHTTPClient creates a new CreateExternalImageComponentConfigParams object -// with the ability to set a custom HTTPClient for a request. -func NewCreateExternalImageComponentConfigParamsWithHTTPClient(client *http.Client) *CreateExternalImageComponentConfigParams { - return &CreateExternalImageComponentConfigParams{ - HTTPClient: client, - } -} - -/* -CreateExternalImageComponentConfigParams contains all the parameters to send to the API endpoint - - for the create external image component config operation. - - Typically these are written to a http.Request. -*/ -type CreateExternalImageComponentConfigParams struct { - - /* ComponentID. - - component ID - */ - ComponentID string - - /* Req. - - Input - */ - Req *models.ServiceCreateExternalImageComponentConfigRequest - - timeout time.Duration - Context context.Context - HTTPClient *http.Client -} - -// WithDefaults hydrates default values in the create external image component config params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *CreateExternalImageComponentConfigParams) WithDefaults() *CreateExternalImageComponentConfigParams { - o.SetDefaults() - return o -} - -// SetDefaults hydrates default values in the create external image component config params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *CreateExternalImageComponentConfigParams) SetDefaults() { - // no default values defined for this parameter -} - -// WithTimeout adds the timeout to the create external image component config params -func (o *CreateExternalImageComponentConfigParams) WithTimeout(timeout time.Duration) *CreateExternalImageComponentConfigParams { - o.SetTimeout(timeout) - return o -} - -// SetTimeout adds the timeout to the create external image component config params -func (o *CreateExternalImageComponentConfigParams) SetTimeout(timeout time.Duration) { - o.timeout = timeout -} - -// WithContext adds the context to the create external image component config params -func (o *CreateExternalImageComponentConfigParams) WithContext(ctx context.Context) *CreateExternalImageComponentConfigParams { - o.SetContext(ctx) - return o -} - -// SetContext adds the context to the create external image component config params -func (o *CreateExternalImageComponentConfigParams) SetContext(ctx context.Context) { - o.Context = ctx -} - -// WithHTTPClient adds the HTTPClient to the create external image component config params -func (o *CreateExternalImageComponentConfigParams) WithHTTPClient(client *http.Client) *CreateExternalImageComponentConfigParams { - o.SetHTTPClient(client) - return o -} - -// SetHTTPClient adds the HTTPClient to the create external image component config params -func (o *CreateExternalImageComponentConfigParams) SetHTTPClient(client *http.Client) { - o.HTTPClient = client -} - -// WithComponentID adds the componentID to the create external image component config params -func (o *CreateExternalImageComponentConfigParams) WithComponentID(componentID string) *CreateExternalImageComponentConfigParams { - o.SetComponentID(componentID) - return o -} - -// SetComponentID adds the componentId to the create external image component config params -func (o *CreateExternalImageComponentConfigParams) SetComponentID(componentID string) { - o.ComponentID = componentID -} - -// WithReq adds the req to the create external image component config params -func (o *CreateExternalImageComponentConfigParams) WithReq(req *models.ServiceCreateExternalImageComponentConfigRequest) *CreateExternalImageComponentConfigParams { - o.SetReq(req) - return o -} - -// SetReq adds the req to the create external image component config params -func (o *CreateExternalImageComponentConfigParams) SetReq(req *models.ServiceCreateExternalImageComponentConfigRequest) { - o.Req = req -} - -// WriteToRequest writes these params to a swagger request -func (o *CreateExternalImageComponentConfigParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { - - if err := r.SetTimeout(o.timeout); err != nil { - return err - } - var res []error - - // path param component_id - if err := r.SetPathParam("component_id", o.ComponentID); err != nil { - return err - } - if o.Req != nil { - if err := r.SetBodyParam(o.Req); err != nil { - return err - } - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} diff --git a/client/operations/create_external_image_component_config_responses.go b/client/operations/create_external_image_component_config_responses.go deleted file mode 100644 index 6b04755..0000000 --- a/client/operations/create_external_image_component_config_responses.go +++ /dev/null @@ -1,486 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package operations - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "encoding/json" - "fmt" - "io" - - "github.com/go-openapi/runtime" - "github.com/go-openapi/strfmt" - - "github.com/nuonco/nuon-go/models" -) - -// CreateExternalImageComponentConfigReader is a Reader for the CreateExternalImageComponentConfig structure. -type CreateExternalImageComponentConfigReader struct { - formats strfmt.Registry -} - -// ReadResponse reads a server response into the received o. -func (o *CreateExternalImageComponentConfigReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { - switch response.Code() { - case 201: - result := NewCreateExternalImageComponentConfigCreated() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return result, nil - case 400: - result := NewCreateExternalImageComponentConfigBadRequest() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return nil, result - case 401: - result := NewCreateExternalImageComponentConfigUnauthorized() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return nil, result - case 403: - result := NewCreateExternalImageComponentConfigForbidden() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return nil, result - case 404: - result := NewCreateExternalImageComponentConfigNotFound() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return nil, result - case 500: - result := NewCreateExternalImageComponentConfigInternalServerError() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return nil, result - default: - return nil, runtime.NewAPIError("[POST /v1/components/{component_id}/configs/external-image] CreateExternalImageComponentConfig", response, response.Code()) - } -} - -// NewCreateExternalImageComponentConfigCreated creates a CreateExternalImageComponentConfigCreated with default headers values -func NewCreateExternalImageComponentConfigCreated() *CreateExternalImageComponentConfigCreated { - return &CreateExternalImageComponentConfigCreated{} -} - -/* -CreateExternalImageComponentConfigCreated describes a response with status code 201, with default header values. - -Created -*/ -type CreateExternalImageComponentConfigCreated struct { - Payload *models.AppExternalImageComponentConfig -} - -// IsSuccess returns true when this create external image component config created response has a 2xx status code -func (o *CreateExternalImageComponentConfigCreated) IsSuccess() bool { - return true -} - -// IsRedirect returns true when this create external image component config created response has a 3xx status code -func (o *CreateExternalImageComponentConfigCreated) IsRedirect() bool { - return false -} - -// IsClientError returns true when this create external image component config created response has a 4xx status code -func (o *CreateExternalImageComponentConfigCreated) IsClientError() bool { - return false -} - -// IsServerError returns true when this create external image component config created response has a 5xx status code -func (o *CreateExternalImageComponentConfigCreated) IsServerError() bool { - return false -} - -// IsCode returns true when this create external image component config created response a status code equal to that given -func (o *CreateExternalImageComponentConfigCreated) IsCode(code int) bool { - return code == 201 -} - -// Code gets the status code for the create external image component config created response -func (o *CreateExternalImageComponentConfigCreated) Code() int { - return 201 -} - -func (o *CreateExternalImageComponentConfigCreated) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[POST /v1/components/{component_id}/configs/external-image][%d] createExternalImageComponentConfigCreated %s", 201, payload) -} - -func (o *CreateExternalImageComponentConfigCreated) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[POST /v1/components/{component_id}/configs/external-image][%d] createExternalImageComponentConfigCreated %s", 201, payload) -} - -func (o *CreateExternalImageComponentConfigCreated) GetPayload() *models.AppExternalImageComponentConfig { - return o.Payload -} - -func (o *CreateExternalImageComponentConfigCreated) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.AppExternalImageComponentConfig) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewCreateExternalImageComponentConfigBadRequest creates a CreateExternalImageComponentConfigBadRequest with default headers values -func NewCreateExternalImageComponentConfigBadRequest() *CreateExternalImageComponentConfigBadRequest { - return &CreateExternalImageComponentConfigBadRequest{} -} - -/* -CreateExternalImageComponentConfigBadRequest describes a response with status code 400, with default header values. - -Bad Request -*/ -type CreateExternalImageComponentConfigBadRequest struct { - Payload *models.StderrErrResponse -} - -// IsSuccess returns true when this create external image component config bad request response has a 2xx status code -func (o *CreateExternalImageComponentConfigBadRequest) IsSuccess() bool { - return false -} - -// IsRedirect returns true when this create external image component config bad request response has a 3xx status code -func (o *CreateExternalImageComponentConfigBadRequest) IsRedirect() bool { - return false -} - -// IsClientError returns true when this create external image component config bad request response has a 4xx status code -func (o *CreateExternalImageComponentConfigBadRequest) IsClientError() bool { - return true -} - -// IsServerError returns true when this create external image component config bad request response has a 5xx status code -func (o *CreateExternalImageComponentConfigBadRequest) IsServerError() bool { - return false -} - -// IsCode returns true when this create external image component config bad request response a status code equal to that given -func (o *CreateExternalImageComponentConfigBadRequest) IsCode(code int) bool { - return code == 400 -} - -// Code gets the status code for the create external image component config bad request response -func (o *CreateExternalImageComponentConfigBadRequest) Code() int { - return 400 -} - -func (o *CreateExternalImageComponentConfigBadRequest) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[POST /v1/components/{component_id}/configs/external-image][%d] createExternalImageComponentConfigBadRequest %s", 400, payload) -} - -func (o *CreateExternalImageComponentConfigBadRequest) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[POST /v1/components/{component_id}/configs/external-image][%d] createExternalImageComponentConfigBadRequest %s", 400, payload) -} - -func (o *CreateExternalImageComponentConfigBadRequest) GetPayload() *models.StderrErrResponse { - return o.Payload -} - -func (o *CreateExternalImageComponentConfigBadRequest) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.StderrErrResponse) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewCreateExternalImageComponentConfigUnauthorized creates a CreateExternalImageComponentConfigUnauthorized with default headers values -func NewCreateExternalImageComponentConfigUnauthorized() *CreateExternalImageComponentConfigUnauthorized { - return &CreateExternalImageComponentConfigUnauthorized{} -} - -/* -CreateExternalImageComponentConfigUnauthorized describes a response with status code 401, with default header values. - -Unauthorized -*/ -type CreateExternalImageComponentConfigUnauthorized struct { - Payload *models.StderrErrResponse -} - -// IsSuccess returns true when this create external image component config unauthorized response has a 2xx status code -func (o *CreateExternalImageComponentConfigUnauthorized) IsSuccess() bool { - return false -} - -// IsRedirect returns true when this create external image component config unauthorized response has a 3xx status code -func (o *CreateExternalImageComponentConfigUnauthorized) IsRedirect() bool { - return false -} - -// IsClientError returns true when this create external image component config unauthorized response has a 4xx status code -func (o *CreateExternalImageComponentConfigUnauthorized) IsClientError() bool { - return true -} - -// IsServerError returns true when this create external image component config unauthorized response has a 5xx status code -func (o *CreateExternalImageComponentConfigUnauthorized) IsServerError() bool { - return false -} - -// IsCode returns true when this create external image component config unauthorized response a status code equal to that given -func (o *CreateExternalImageComponentConfigUnauthorized) IsCode(code int) bool { - return code == 401 -} - -// Code gets the status code for the create external image component config unauthorized response -func (o *CreateExternalImageComponentConfigUnauthorized) Code() int { - return 401 -} - -func (o *CreateExternalImageComponentConfigUnauthorized) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[POST /v1/components/{component_id}/configs/external-image][%d] createExternalImageComponentConfigUnauthorized %s", 401, payload) -} - -func (o *CreateExternalImageComponentConfigUnauthorized) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[POST /v1/components/{component_id}/configs/external-image][%d] createExternalImageComponentConfigUnauthorized %s", 401, payload) -} - -func (o *CreateExternalImageComponentConfigUnauthorized) GetPayload() *models.StderrErrResponse { - return o.Payload -} - -func (o *CreateExternalImageComponentConfigUnauthorized) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.StderrErrResponse) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewCreateExternalImageComponentConfigForbidden creates a CreateExternalImageComponentConfigForbidden with default headers values -func NewCreateExternalImageComponentConfigForbidden() *CreateExternalImageComponentConfigForbidden { - return &CreateExternalImageComponentConfigForbidden{} -} - -/* -CreateExternalImageComponentConfigForbidden describes a response with status code 403, with default header values. - -Forbidden -*/ -type CreateExternalImageComponentConfigForbidden struct { - Payload *models.StderrErrResponse -} - -// IsSuccess returns true when this create external image component config forbidden response has a 2xx status code -func (o *CreateExternalImageComponentConfigForbidden) IsSuccess() bool { - return false -} - -// IsRedirect returns true when this create external image component config forbidden response has a 3xx status code -func (o *CreateExternalImageComponentConfigForbidden) IsRedirect() bool { - return false -} - -// IsClientError returns true when this create external image component config forbidden response has a 4xx status code -func (o *CreateExternalImageComponentConfigForbidden) IsClientError() bool { - return true -} - -// IsServerError returns true when this create external image component config forbidden response has a 5xx status code -func (o *CreateExternalImageComponentConfigForbidden) IsServerError() bool { - return false -} - -// IsCode returns true when this create external image component config forbidden response a status code equal to that given -func (o *CreateExternalImageComponentConfigForbidden) IsCode(code int) bool { - return code == 403 -} - -// Code gets the status code for the create external image component config forbidden response -func (o *CreateExternalImageComponentConfigForbidden) Code() int { - return 403 -} - -func (o *CreateExternalImageComponentConfigForbidden) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[POST /v1/components/{component_id}/configs/external-image][%d] createExternalImageComponentConfigForbidden %s", 403, payload) -} - -func (o *CreateExternalImageComponentConfigForbidden) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[POST /v1/components/{component_id}/configs/external-image][%d] createExternalImageComponentConfigForbidden %s", 403, payload) -} - -func (o *CreateExternalImageComponentConfigForbidden) GetPayload() *models.StderrErrResponse { - return o.Payload -} - -func (o *CreateExternalImageComponentConfigForbidden) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.StderrErrResponse) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewCreateExternalImageComponentConfigNotFound creates a CreateExternalImageComponentConfigNotFound with default headers values -func NewCreateExternalImageComponentConfigNotFound() *CreateExternalImageComponentConfigNotFound { - return &CreateExternalImageComponentConfigNotFound{} -} - -/* -CreateExternalImageComponentConfigNotFound describes a response with status code 404, with default header values. - -Not Found -*/ -type CreateExternalImageComponentConfigNotFound struct { - Payload *models.StderrErrResponse -} - -// IsSuccess returns true when this create external image component config not found response has a 2xx status code -func (o *CreateExternalImageComponentConfigNotFound) IsSuccess() bool { - return false -} - -// IsRedirect returns true when this create external image component config not found response has a 3xx status code -func (o *CreateExternalImageComponentConfigNotFound) IsRedirect() bool { - return false -} - -// IsClientError returns true when this create external image component config not found response has a 4xx status code -func (o *CreateExternalImageComponentConfigNotFound) IsClientError() bool { - return true -} - -// IsServerError returns true when this create external image component config not found response has a 5xx status code -func (o *CreateExternalImageComponentConfigNotFound) IsServerError() bool { - return false -} - -// IsCode returns true when this create external image component config not found response a status code equal to that given -func (o *CreateExternalImageComponentConfigNotFound) IsCode(code int) bool { - return code == 404 -} - -// Code gets the status code for the create external image component config not found response -func (o *CreateExternalImageComponentConfigNotFound) Code() int { - return 404 -} - -func (o *CreateExternalImageComponentConfigNotFound) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[POST /v1/components/{component_id}/configs/external-image][%d] createExternalImageComponentConfigNotFound %s", 404, payload) -} - -func (o *CreateExternalImageComponentConfigNotFound) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[POST /v1/components/{component_id}/configs/external-image][%d] createExternalImageComponentConfigNotFound %s", 404, payload) -} - -func (o *CreateExternalImageComponentConfigNotFound) GetPayload() *models.StderrErrResponse { - return o.Payload -} - -func (o *CreateExternalImageComponentConfigNotFound) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.StderrErrResponse) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewCreateExternalImageComponentConfigInternalServerError creates a CreateExternalImageComponentConfigInternalServerError with default headers values -func NewCreateExternalImageComponentConfigInternalServerError() *CreateExternalImageComponentConfigInternalServerError { - return &CreateExternalImageComponentConfigInternalServerError{} -} - -/* -CreateExternalImageComponentConfigInternalServerError describes a response with status code 500, with default header values. - -Internal Server Error -*/ -type CreateExternalImageComponentConfigInternalServerError struct { - Payload *models.StderrErrResponse -} - -// IsSuccess returns true when this create external image component config internal server error response has a 2xx status code -func (o *CreateExternalImageComponentConfigInternalServerError) IsSuccess() bool { - return false -} - -// IsRedirect returns true when this create external image component config internal server error response has a 3xx status code -func (o *CreateExternalImageComponentConfigInternalServerError) IsRedirect() bool { - return false -} - -// IsClientError returns true when this create external image component config internal server error response has a 4xx status code -func (o *CreateExternalImageComponentConfigInternalServerError) IsClientError() bool { - return false -} - -// IsServerError returns true when this create external image component config internal server error response has a 5xx status code -func (o *CreateExternalImageComponentConfigInternalServerError) IsServerError() bool { - return true -} - -// IsCode returns true when this create external image component config internal server error response a status code equal to that given -func (o *CreateExternalImageComponentConfigInternalServerError) IsCode(code int) bool { - return code == 500 -} - -// Code gets the status code for the create external image component config internal server error response -func (o *CreateExternalImageComponentConfigInternalServerError) Code() int { - return 500 -} - -func (o *CreateExternalImageComponentConfigInternalServerError) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[POST /v1/components/{component_id}/configs/external-image][%d] createExternalImageComponentConfigInternalServerError %s", 500, payload) -} - -func (o *CreateExternalImageComponentConfigInternalServerError) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[POST /v1/components/{component_id}/configs/external-image][%d] createExternalImageComponentConfigInternalServerError %s", 500, payload) -} - -func (o *CreateExternalImageComponentConfigInternalServerError) GetPayload() *models.StderrErrResponse { - return o.Payload -} - -func (o *CreateExternalImageComponentConfigInternalServerError) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.StderrErrResponse) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} diff --git a/client/operations/create_helm_component_config_parameters.go b/client/operations/create_helm_component_config_parameters.go deleted file mode 100644 index 98a1b7c..0000000 --- a/client/operations/create_helm_component_config_parameters.go +++ /dev/null @@ -1,175 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package operations - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "context" - "net/http" - "time" - - "github.com/go-openapi/errors" - "github.com/go-openapi/runtime" - cr "github.com/go-openapi/runtime/client" - "github.com/go-openapi/strfmt" - - "github.com/nuonco/nuon-go/models" -) - -// NewCreateHelmComponentConfigParams creates a new CreateHelmComponentConfigParams object, -// with the default timeout for this client. -// -// Default values are not hydrated, since defaults are normally applied by the API server side. -// -// To enforce default values in parameter, use SetDefaults or WithDefaults. -func NewCreateHelmComponentConfigParams() *CreateHelmComponentConfigParams { - return &CreateHelmComponentConfigParams{ - timeout: cr.DefaultTimeout, - } -} - -// NewCreateHelmComponentConfigParamsWithTimeout creates a new CreateHelmComponentConfigParams object -// with the ability to set a timeout on a request. -func NewCreateHelmComponentConfigParamsWithTimeout(timeout time.Duration) *CreateHelmComponentConfigParams { - return &CreateHelmComponentConfigParams{ - timeout: timeout, - } -} - -// NewCreateHelmComponentConfigParamsWithContext creates a new CreateHelmComponentConfigParams object -// with the ability to set a context for a request. -func NewCreateHelmComponentConfigParamsWithContext(ctx context.Context) *CreateHelmComponentConfigParams { - return &CreateHelmComponentConfigParams{ - Context: ctx, - } -} - -// NewCreateHelmComponentConfigParamsWithHTTPClient creates a new CreateHelmComponentConfigParams object -// with the ability to set a custom HTTPClient for a request. -func NewCreateHelmComponentConfigParamsWithHTTPClient(client *http.Client) *CreateHelmComponentConfigParams { - return &CreateHelmComponentConfigParams{ - HTTPClient: client, - } -} - -/* -CreateHelmComponentConfigParams contains all the parameters to send to the API endpoint - - for the create helm component config operation. - - Typically these are written to a http.Request. -*/ -type CreateHelmComponentConfigParams struct { - - /* ComponentID. - - component ID - */ - ComponentID string - - /* Req. - - Input - */ - Req *models.ServiceCreateHelmComponentConfigRequest - - timeout time.Duration - Context context.Context - HTTPClient *http.Client -} - -// WithDefaults hydrates default values in the create helm component config params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *CreateHelmComponentConfigParams) WithDefaults() *CreateHelmComponentConfigParams { - o.SetDefaults() - return o -} - -// SetDefaults hydrates default values in the create helm component config params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *CreateHelmComponentConfigParams) SetDefaults() { - // no default values defined for this parameter -} - -// WithTimeout adds the timeout to the create helm component config params -func (o *CreateHelmComponentConfigParams) WithTimeout(timeout time.Duration) *CreateHelmComponentConfigParams { - o.SetTimeout(timeout) - return o -} - -// SetTimeout adds the timeout to the create helm component config params -func (o *CreateHelmComponentConfigParams) SetTimeout(timeout time.Duration) { - o.timeout = timeout -} - -// WithContext adds the context to the create helm component config params -func (o *CreateHelmComponentConfigParams) WithContext(ctx context.Context) *CreateHelmComponentConfigParams { - o.SetContext(ctx) - return o -} - -// SetContext adds the context to the create helm component config params -func (o *CreateHelmComponentConfigParams) SetContext(ctx context.Context) { - o.Context = ctx -} - -// WithHTTPClient adds the HTTPClient to the create helm component config params -func (o *CreateHelmComponentConfigParams) WithHTTPClient(client *http.Client) *CreateHelmComponentConfigParams { - o.SetHTTPClient(client) - return o -} - -// SetHTTPClient adds the HTTPClient to the create helm component config params -func (o *CreateHelmComponentConfigParams) SetHTTPClient(client *http.Client) { - o.HTTPClient = client -} - -// WithComponentID adds the componentID to the create helm component config params -func (o *CreateHelmComponentConfigParams) WithComponentID(componentID string) *CreateHelmComponentConfigParams { - o.SetComponentID(componentID) - return o -} - -// SetComponentID adds the componentId to the create helm component config params -func (o *CreateHelmComponentConfigParams) SetComponentID(componentID string) { - o.ComponentID = componentID -} - -// WithReq adds the req to the create helm component config params -func (o *CreateHelmComponentConfigParams) WithReq(req *models.ServiceCreateHelmComponentConfigRequest) *CreateHelmComponentConfigParams { - o.SetReq(req) - return o -} - -// SetReq adds the req to the create helm component config params -func (o *CreateHelmComponentConfigParams) SetReq(req *models.ServiceCreateHelmComponentConfigRequest) { - o.Req = req -} - -// WriteToRequest writes these params to a swagger request -func (o *CreateHelmComponentConfigParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { - - if err := r.SetTimeout(o.timeout); err != nil { - return err - } - var res []error - - // path param component_id - if err := r.SetPathParam("component_id", o.ComponentID); err != nil { - return err - } - if o.Req != nil { - if err := r.SetBodyParam(o.Req); err != nil { - return err - } - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} diff --git a/client/operations/create_helm_component_config_responses.go b/client/operations/create_helm_component_config_responses.go deleted file mode 100644 index d70ca67..0000000 --- a/client/operations/create_helm_component_config_responses.go +++ /dev/null @@ -1,486 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package operations - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "encoding/json" - "fmt" - "io" - - "github.com/go-openapi/runtime" - "github.com/go-openapi/strfmt" - - "github.com/nuonco/nuon-go/models" -) - -// CreateHelmComponentConfigReader is a Reader for the CreateHelmComponentConfig structure. -type CreateHelmComponentConfigReader struct { - formats strfmt.Registry -} - -// ReadResponse reads a server response into the received o. -func (o *CreateHelmComponentConfigReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { - switch response.Code() { - case 201: - result := NewCreateHelmComponentConfigCreated() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return result, nil - case 400: - result := NewCreateHelmComponentConfigBadRequest() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return nil, result - case 401: - result := NewCreateHelmComponentConfigUnauthorized() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return nil, result - case 403: - result := NewCreateHelmComponentConfigForbidden() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return nil, result - case 404: - result := NewCreateHelmComponentConfigNotFound() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return nil, result - case 500: - result := NewCreateHelmComponentConfigInternalServerError() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return nil, result - default: - return nil, runtime.NewAPIError("[POST /v1/components/{component_id}/configs/helm] CreateHelmComponentConfig", response, response.Code()) - } -} - -// NewCreateHelmComponentConfigCreated creates a CreateHelmComponentConfigCreated with default headers values -func NewCreateHelmComponentConfigCreated() *CreateHelmComponentConfigCreated { - return &CreateHelmComponentConfigCreated{} -} - -/* -CreateHelmComponentConfigCreated describes a response with status code 201, with default header values. - -Created -*/ -type CreateHelmComponentConfigCreated struct { - Payload *models.AppHelmComponentConfig -} - -// IsSuccess returns true when this create helm component config created response has a 2xx status code -func (o *CreateHelmComponentConfigCreated) IsSuccess() bool { - return true -} - -// IsRedirect returns true when this create helm component config created response has a 3xx status code -func (o *CreateHelmComponentConfigCreated) IsRedirect() bool { - return false -} - -// IsClientError returns true when this create helm component config created response has a 4xx status code -func (o *CreateHelmComponentConfigCreated) IsClientError() bool { - return false -} - -// IsServerError returns true when this create helm component config created response has a 5xx status code -func (o *CreateHelmComponentConfigCreated) IsServerError() bool { - return false -} - -// IsCode returns true when this create helm component config created response a status code equal to that given -func (o *CreateHelmComponentConfigCreated) IsCode(code int) bool { - return code == 201 -} - -// Code gets the status code for the create helm component config created response -func (o *CreateHelmComponentConfigCreated) Code() int { - return 201 -} - -func (o *CreateHelmComponentConfigCreated) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[POST /v1/components/{component_id}/configs/helm][%d] createHelmComponentConfigCreated %s", 201, payload) -} - -func (o *CreateHelmComponentConfigCreated) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[POST /v1/components/{component_id}/configs/helm][%d] createHelmComponentConfigCreated %s", 201, payload) -} - -func (o *CreateHelmComponentConfigCreated) GetPayload() *models.AppHelmComponentConfig { - return o.Payload -} - -func (o *CreateHelmComponentConfigCreated) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.AppHelmComponentConfig) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewCreateHelmComponentConfigBadRequest creates a CreateHelmComponentConfigBadRequest with default headers values -func NewCreateHelmComponentConfigBadRequest() *CreateHelmComponentConfigBadRequest { - return &CreateHelmComponentConfigBadRequest{} -} - -/* -CreateHelmComponentConfigBadRequest describes a response with status code 400, with default header values. - -Bad Request -*/ -type CreateHelmComponentConfigBadRequest struct { - Payload *models.StderrErrResponse -} - -// IsSuccess returns true when this create helm component config bad request response has a 2xx status code -func (o *CreateHelmComponentConfigBadRequest) IsSuccess() bool { - return false -} - -// IsRedirect returns true when this create helm component config bad request response has a 3xx status code -func (o *CreateHelmComponentConfigBadRequest) IsRedirect() bool { - return false -} - -// IsClientError returns true when this create helm component config bad request response has a 4xx status code -func (o *CreateHelmComponentConfigBadRequest) IsClientError() bool { - return true -} - -// IsServerError returns true when this create helm component config bad request response has a 5xx status code -func (o *CreateHelmComponentConfigBadRequest) IsServerError() bool { - return false -} - -// IsCode returns true when this create helm component config bad request response a status code equal to that given -func (o *CreateHelmComponentConfigBadRequest) IsCode(code int) bool { - return code == 400 -} - -// Code gets the status code for the create helm component config bad request response -func (o *CreateHelmComponentConfigBadRequest) Code() int { - return 400 -} - -func (o *CreateHelmComponentConfigBadRequest) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[POST /v1/components/{component_id}/configs/helm][%d] createHelmComponentConfigBadRequest %s", 400, payload) -} - -func (o *CreateHelmComponentConfigBadRequest) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[POST /v1/components/{component_id}/configs/helm][%d] createHelmComponentConfigBadRequest %s", 400, payload) -} - -func (o *CreateHelmComponentConfigBadRequest) GetPayload() *models.StderrErrResponse { - return o.Payload -} - -func (o *CreateHelmComponentConfigBadRequest) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.StderrErrResponse) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewCreateHelmComponentConfigUnauthorized creates a CreateHelmComponentConfigUnauthorized with default headers values -func NewCreateHelmComponentConfigUnauthorized() *CreateHelmComponentConfigUnauthorized { - return &CreateHelmComponentConfigUnauthorized{} -} - -/* -CreateHelmComponentConfigUnauthorized describes a response with status code 401, with default header values. - -Unauthorized -*/ -type CreateHelmComponentConfigUnauthorized struct { - Payload *models.StderrErrResponse -} - -// IsSuccess returns true when this create helm component config unauthorized response has a 2xx status code -func (o *CreateHelmComponentConfigUnauthorized) IsSuccess() bool { - return false -} - -// IsRedirect returns true when this create helm component config unauthorized response has a 3xx status code -func (o *CreateHelmComponentConfigUnauthorized) IsRedirect() bool { - return false -} - -// IsClientError returns true when this create helm component config unauthorized response has a 4xx status code -func (o *CreateHelmComponentConfigUnauthorized) IsClientError() bool { - return true -} - -// IsServerError returns true when this create helm component config unauthorized response has a 5xx status code -func (o *CreateHelmComponentConfigUnauthorized) IsServerError() bool { - return false -} - -// IsCode returns true when this create helm component config unauthorized response a status code equal to that given -func (o *CreateHelmComponentConfigUnauthorized) IsCode(code int) bool { - return code == 401 -} - -// Code gets the status code for the create helm component config unauthorized response -func (o *CreateHelmComponentConfigUnauthorized) Code() int { - return 401 -} - -func (o *CreateHelmComponentConfigUnauthorized) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[POST /v1/components/{component_id}/configs/helm][%d] createHelmComponentConfigUnauthorized %s", 401, payload) -} - -func (o *CreateHelmComponentConfigUnauthorized) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[POST /v1/components/{component_id}/configs/helm][%d] createHelmComponentConfigUnauthorized %s", 401, payload) -} - -func (o *CreateHelmComponentConfigUnauthorized) GetPayload() *models.StderrErrResponse { - return o.Payload -} - -func (o *CreateHelmComponentConfigUnauthorized) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.StderrErrResponse) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewCreateHelmComponentConfigForbidden creates a CreateHelmComponentConfigForbidden with default headers values -func NewCreateHelmComponentConfigForbidden() *CreateHelmComponentConfigForbidden { - return &CreateHelmComponentConfigForbidden{} -} - -/* -CreateHelmComponentConfigForbidden describes a response with status code 403, with default header values. - -Forbidden -*/ -type CreateHelmComponentConfigForbidden struct { - Payload *models.StderrErrResponse -} - -// IsSuccess returns true when this create helm component config forbidden response has a 2xx status code -func (o *CreateHelmComponentConfigForbidden) IsSuccess() bool { - return false -} - -// IsRedirect returns true when this create helm component config forbidden response has a 3xx status code -func (o *CreateHelmComponentConfigForbidden) IsRedirect() bool { - return false -} - -// IsClientError returns true when this create helm component config forbidden response has a 4xx status code -func (o *CreateHelmComponentConfigForbidden) IsClientError() bool { - return true -} - -// IsServerError returns true when this create helm component config forbidden response has a 5xx status code -func (o *CreateHelmComponentConfigForbidden) IsServerError() bool { - return false -} - -// IsCode returns true when this create helm component config forbidden response a status code equal to that given -func (o *CreateHelmComponentConfigForbidden) IsCode(code int) bool { - return code == 403 -} - -// Code gets the status code for the create helm component config forbidden response -func (o *CreateHelmComponentConfigForbidden) Code() int { - return 403 -} - -func (o *CreateHelmComponentConfigForbidden) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[POST /v1/components/{component_id}/configs/helm][%d] createHelmComponentConfigForbidden %s", 403, payload) -} - -func (o *CreateHelmComponentConfigForbidden) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[POST /v1/components/{component_id}/configs/helm][%d] createHelmComponentConfigForbidden %s", 403, payload) -} - -func (o *CreateHelmComponentConfigForbidden) GetPayload() *models.StderrErrResponse { - return o.Payload -} - -func (o *CreateHelmComponentConfigForbidden) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.StderrErrResponse) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewCreateHelmComponentConfigNotFound creates a CreateHelmComponentConfigNotFound with default headers values -func NewCreateHelmComponentConfigNotFound() *CreateHelmComponentConfigNotFound { - return &CreateHelmComponentConfigNotFound{} -} - -/* -CreateHelmComponentConfigNotFound describes a response with status code 404, with default header values. - -Not Found -*/ -type CreateHelmComponentConfigNotFound struct { - Payload *models.StderrErrResponse -} - -// IsSuccess returns true when this create helm component config not found response has a 2xx status code -func (o *CreateHelmComponentConfigNotFound) IsSuccess() bool { - return false -} - -// IsRedirect returns true when this create helm component config not found response has a 3xx status code -func (o *CreateHelmComponentConfigNotFound) IsRedirect() bool { - return false -} - -// IsClientError returns true when this create helm component config not found response has a 4xx status code -func (o *CreateHelmComponentConfigNotFound) IsClientError() bool { - return true -} - -// IsServerError returns true when this create helm component config not found response has a 5xx status code -func (o *CreateHelmComponentConfigNotFound) IsServerError() bool { - return false -} - -// IsCode returns true when this create helm component config not found response a status code equal to that given -func (o *CreateHelmComponentConfigNotFound) IsCode(code int) bool { - return code == 404 -} - -// Code gets the status code for the create helm component config not found response -func (o *CreateHelmComponentConfigNotFound) Code() int { - return 404 -} - -func (o *CreateHelmComponentConfigNotFound) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[POST /v1/components/{component_id}/configs/helm][%d] createHelmComponentConfigNotFound %s", 404, payload) -} - -func (o *CreateHelmComponentConfigNotFound) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[POST /v1/components/{component_id}/configs/helm][%d] createHelmComponentConfigNotFound %s", 404, payload) -} - -func (o *CreateHelmComponentConfigNotFound) GetPayload() *models.StderrErrResponse { - return o.Payload -} - -func (o *CreateHelmComponentConfigNotFound) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.StderrErrResponse) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewCreateHelmComponentConfigInternalServerError creates a CreateHelmComponentConfigInternalServerError with default headers values -func NewCreateHelmComponentConfigInternalServerError() *CreateHelmComponentConfigInternalServerError { - return &CreateHelmComponentConfigInternalServerError{} -} - -/* -CreateHelmComponentConfigInternalServerError describes a response with status code 500, with default header values. - -Internal Server Error -*/ -type CreateHelmComponentConfigInternalServerError struct { - Payload *models.StderrErrResponse -} - -// IsSuccess returns true when this create helm component config internal server error response has a 2xx status code -func (o *CreateHelmComponentConfigInternalServerError) IsSuccess() bool { - return false -} - -// IsRedirect returns true when this create helm component config internal server error response has a 3xx status code -func (o *CreateHelmComponentConfigInternalServerError) IsRedirect() bool { - return false -} - -// IsClientError returns true when this create helm component config internal server error response has a 4xx status code -func (o *CreateHelmComponentConfigInternalServerError) IsClientError() bool { - return false -} - -// IsServerError returns true when this create helm component config internal server error response has a 5xx status code -func (o *CreateHelmComponentConfigInternalServerError) IsServerError() bool { - return true -} - -// IsCode returns true when this create helm component config internal server error response a status code equal to that given -func (o *CreateHelmComponentConfigInternalServerError) IsCode(code int) bool { - return code == 500 -} - -// Code gets the status code for the create helm component config internal server error response -func (o *CreateHelmComponentConfigInternalServerError) Code() int { - return 500 -} - -func (o *CreateHelmComponentConfigInternalServerError) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[POST /v1/components/{component_id}/configs/helm][%d] createHelmComponentConfigInternalServerError %s", 500, payload) -} - -func (o *CreateHelmComponentConfigInternalServerError) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[POST /v1/components/{component_id}/configs/helm][%d] createHelmComponentConfigInternalServerError %s", 500, payload) -} - -func (o *CreateHelmComponentConfigInternalServerError) GetPayload() *models.StderrErrResponse { - return o.Payload -} - -func (o *CreateHelmComponentConfigInternalServerError) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.StderrErrResponse) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} diff --git a/client/operations/create_install_deploy_parameters.go b/client/operations/create_install_deploy_parameters.go deleted file mode 100644 index 109a269..0000000 --- a/client/operations/create_install_deploy_parameters.go +++ /dev/null @@ -1,175 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package operations - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "context" - "net/http" - "time" - - "github.com/go-openapi/errors" - "github.com/go-openapi/runtime" - cr "github.com/go-openapi/runtime/client" - "github.com/go-openapi/strfmt" - - "github.com/nuonco/nuon-go/models" -) - -// NewCreateInstallDeployParams creates a new CreateInstallDeployParams object, -// with the default timeout for this client. -// -// Default values are not hydrated, since defaults are normally applied by the API server side. -// -// To enforce default values in parameter, use SetDefaults or WithDefaults. -func NewCreateInstallDeployParams() *CreateInstallDeployParams { - return &CreateInstallDeployParams{ - timeout: cr.DefaultTimeout, - } -} - -// NewCreateInstallDeployParamsWithTimeout creates a new CreateInstallDeployParams object -// with the ability to set a timeout on a request. -func NewCreateInstallDeployParamsWithTimeout(timeout time.Duration) *CreateInstallDeployParams { - return &CreateInstallDeployParams{ - timeout: timeout, - } -} - -// NewCreateInstallDeployParamsWithContext creates a new CreateInstallDeployParams object -// with the ability to set a context for a request. -func NewCreateInstallDeployParamsWithContext(ctx context.Context) *CreateInstallDeployParams { - return &CreateInstallDeployParams{ - Context: ctx, - } -} - -// NewCreateInstallDeployParamsWithHTTPClient creates a new CreateInstallDeployParams object -// with the ability to set a custom HTTPClient for a request. -func NewCreateInstallDeployParamsWithHTTPClient(client *http.Client) *CreateInstallDeployParams { - return &CreateInstallDeployParams{ - HTTPClient: client, - } -} - -/* -CreateInstallDeployParams contains all the parameters to send to the API endpoint - - for the create install deploy operation. - - Typically these are written to a http.Request. -*/ -type CreateInstallDeployParams struct { - - /* InstallID. - - install ID - */ - InstallID string - - /* Req. - - Input - */ - Req *models.ServiceCreateInstallDeployRequest - - timeout time.Duration - Context context.Context - HTTPClient *http.Client -} - -// WithDefaults hydrates default values in the create install deploy params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *CreateInstallDeployParams) WithDefaults() *CreateInstallDeployParams { - o.SetDefaults() - return o -} - -// SetDefaults hydrates default values in the create install deploy params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *CreateInstallDeployParams) SetDefaults() { - // no default values defined for this parameter -} - -// WithTimeout adds the timeout to the create install deploy params -func (o *CreateInstallDeployParams) WithTimeout(timeout time.Duration) *CreateInstallDeployParams { - o.SetTimeout(timeout) - return o -} - -// SetTimeout adds the timeout to the create install deploy params -func (o *CreateInstallDeployParams) SetTimeout(timeout time.Duration) { - o.timeout = timeout -} - -// WithContext adds the context to the create install deploy params -func (o *CreateInstallDeployParams) WithContext(ctx context.Context) *CreateInstallDeployParams { - o.SetContext(ctx) - return o -} - -// SetContext adds the context to the create install deploy params -func (o *CreateInstallDeployParams) SetContext(ctx context.Context) { - o.Context = ctx -} - -// WithHTTPClient adds the HTTPClient to the create install deploy params -func (o *CreateInstallDeployParams) WithHTTPClient(client *http.Client) *CreateInstallDeployParams { - o.SetHTTPClient(client) - return o -} - -// SetHTTPClient adds the HTTPClient to the create install deploy params -func (o *CreateInstallDeployParams) SetHTTPClient(client *http.Client) { - o.HTTPClient = client -} - -// WithInstallID adds the installID to the create install deploy params -func (o *CreateInstallDeployParams) WithInstallID(installID string) *CreateInstallDeployParams { - o.SetInstallID(installID) - return o -} - -// SetInstallID adds the installId to the create install deploy params -func (o *CreateInstallDeployParams) SetInstallID(installID string) { - o.InstallID = installID -} - -// WithReq adds the req to the create install deploy params -func (o *CreateInstallDeployParams) WithReq(req *models.ServiceCreateInstallDeployRequest) *CreateInstallDeployParams { - o.SetReq(req) - return o -} - -// SetReq adds the req to the create install deploy params -func (o *CreateInstallDeployParams) SetReq(req *models.ServiceCreateInstallDeployRequest) { - o.Req = req -} - -// WriteToRequest writes these params to a swagger request -func (o *CreateInstallDeployParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { - - if err := r.SetTimeout(o.timeout); err != nil { - return err - } - var res []error - - // path param install_id - if err := r.SetPathParam("install_id", o.InstallID); err != nil { - return err - } - if o.Req != nil { - if err := r.SetBodyParam(o.Req); err != nil { - return err - } - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} diff --git a/client/operations/create_install_deploy_responses.go b/client/operations/create_install_deploy_responses.go deleted file mode 100644 index 4ddde3b..0000000 --- a/client/operations/create_install_deploy_responses.go +++ /dev/null @@ -1,486 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package operations - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "encoding/json" - "fmt" - "io" - - "github.com/go-openapi/runtime" - "github.com/go-openapi/strfmt" - - "github.com/nuonco/nuon-go/models" -) - -// CreateInstallDeployReader is a Reader for the CreateInstallDeploy structure. -type CreateInstallDeployReader struct { - formats strfmt.Registry -} - -// ReadResponse reads a server response into the received o. -func (o *CreateInstallDeployReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { - switch response.Code() { - case 201: - result := NewCreateInstallDeployCreated() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return result, nil - case 400: - result := NewCreateInstallDeployBadRequest() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return nil, result - case 401: - result := NewCreateInstallDeployUnauthorized() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return nil, result - case 403: - result := NewCreateInstallDeployForbidden() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return nil, result - case 404: - result := NewCreateInstallDeployNotFound() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return nil, result - case 500: - result := NewCreateInstallDeployInternalServerError() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return nil, result - default: - return nil, runtime.NewAPIError("[POST /v1/installs/{install_id}/deploys] CreateInstallDeploy", response, response.Code()) - } -} - -// NewCreateInstallDeployCreated creates a CreateInstallDeployCreated with default headers values -func NewCreateInstallDeployCreated() *CreateInstallDeployCreated { - return &CreateInstallDeployCreated{} -} - -/* -CreateInstallDeployCreated describes a response with status code 201, with default header values. - -Created -*/ -type CreateInstallDeployCreated struct { - Payload *models.AppInstallDeploy -} - -// IsSuccess returns true when this create install deploy created response has a 2xx status code -func (o *CreateInstallDeployCreated) IsSuccess() bool { - return true -} - -// IsRedirect returns true when this create install deploy created response has a 3xx status code -func (o *CreateInstallDeployCreated) IsRedirect() bool { - return false -} - -// IsClientError returns true when this create install deploy created response has a 4xx status code -func (o *CreateInstallDeployCreated) IsClientError() bool { - return false -} - -// IsServerError returns true when this create install deploy created response has a 5xx status code -func (o *CreateInstallDeployCreated) IsServerError() bool { - return false -} - -// IsCode returns true when this create install deploy created response a status code equal to that given -func (o *CreateInstallDeployCreated) IsCode(code int) bool { - return code == 201 -} - -// Code gets the status code for the create install deploy created response -func (o *CreateInstallDeployCreated) Code() int { - return 201 -} - -func (o *CreateInstallDeployCreated) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[POST /v1/installs/{install_id}/deploys][%d] createInstallDeployCreated %s", 201, payload) -} - -func (o *CreateInstallDeployCreated) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[POST /v1/installs/{install_id}/deploys][%d] createInstallDeployCreated %s", 201, payload) -} - -func (o *CreateInstallDeployCreated) GetPayload() *models.AppInstallDeploy { - return o.Payload -} - -func (o *CreateInstallDeployCreated) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.AppInstallDeploy) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewCreateInstallDeployBadRequest creates a CreateInstallDeployBadRequest with default headers values -func NewCreateInstallDeployBadRequest() *CreateInstallDeployBadRequest { - return &CreateInstallDeployBadRequest{} -} - -/* -CreateInstallDeployBadRequest describes a response with status code 400, with default header values. - -Bad Request -*/ -type CreateInstallDeployBadRequest struct { - Payload *models.StderrErrResponse -} - -// IsSuccess returns true when this create install deploy bad request response has a 2xx status code -func (o *CreateInstallDeployBadRequest) IsSuccess() bool { - return false -} - -// IsRedirect returns true when this create install deploy bad request response has a 3xx status code -func (o *CreateInstallDeployBadRequest) IsRedirect() bool { - return false -} - -// IsClientError returns true when this create install deploy bad request response has a 4xx status code -func (o *CreateInstallDeployBadRequest) IsClientError() bool { - return true -} - -// IsServerError returns true when this create install deploy bad request response has a 5xx status code -func (o *CreateInstallDeployBadRequest) IsServerError() bool { - return false -} - -// IsCode returns true when this create install deploy bad request response a status code equal to that given -func (o *CreateInstallDeployBadRequest) IsCode(code int) bool { - return code == 400 -} - -// Code gets the status code for the create install deploy bad request response -func (o *CreateInstallDeployBadRequest) Code() int { - return 400 -} - -func (o *CreateInstallDeployBadRequest) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[POST /v1/installs/{install_id}/deploys][%d] createInstallDeployBadRequest %s", 400, payload) -} - -func (o *CreateInstallDeployBadRequest) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[POST /v1/installs/{install_id}/deploys][%d] createInstallDeployBadRequest %s", 400, payload) -} - -func (o *CreateInstallDeployBadRequest) GetPayload() *models.StderrErrResponse { - return o.Payload -} - -func (o *CreateInstallDeployBadRequest) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.StderrErrResponse) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewCreateInstallDeployUnauthorized creates a CreateInstallDeployUnauthorized with default headers values -func NewCreateInstallDeployUnauthorized() *CreateInstallDeployUnauthorized { - return &CreateInstallDeployUnauthorized{} -} - -/* -CreateInstallDeployUnauthorized describes a response with status code 401, with default header values. - -Unauthorized -*/ -type CreateInstallDeployUnauthorized struct { - Payload *models.StderrErrResponse -} - -// IsSuccess returns true when this create install deploy unauthorized response has a 2xx status code -func (o *CreateInstallDeployUnauthorized) IsSuccess() bool { - return false -} - -// IsRedirect returns true when this create install deploy unauthorized response has a 3xx status code -func (o *CreateInstallDeployUnauthorized) IsRedirect() bool { - return false -} - -// IsClientError returns true when this create install deploy unauthorized response has a 4xx status code -func (o *CreateInstallDeployUnauthorized) IsClientError() bool { - return true -} - -// IsServerError returns true when this create install deploy unauthorized response has a 5xx status code -func (o *CreateInstallDeployUnauthorized) IsServerError() bool { - return false -} - -// IsCode returns true when this create install deploy unauthorized response a status code equal to that given -func (o *CreateInstallDeployUnauthorized) IsCode(code int) bool { - return code == 401 -} - -// Code gets the status code for the create install deploy unauthorized response -func (o *CreateInstallDeployUnauthorized) Code() int { - return 401 -} - -func (o *CreateInstallDeployUnauthorized) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[POST /v1/installs/{install_id}/deploys][%d] createInstallDeployUnauthorized %s", 401, payload) -} - -func (o *CreateInstallDeployUnauthorized) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[POST /v1/installs/{install_id}/deploys][%d] createInstallDeployUnauthorized %s", 401, payload) -} - -func (o *CreateInstallDeployUnauthorized) GetPayload() *models.StderrErrResponse { - return o.Payload -} - -func (o *CreateInstallDeployUnauthorized) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.StderrErrResponse) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewCreateInstallDeployForbidden creates a CreateInstallDeployForbidden with default headers values -func NewCreateInstallDeployForbidden() *CreateInstallDeployForbidden { - return &CreateInstallDeployForbidden{} -} - -/* -CreateInstallDeployForbidden describes a response with status code 403, with default header values. - -Forbidden -*/ -type CreateInstallDeployForbidden struct { - Payload *models.StderrErrResponse -} - -// IsSuccess returns true when this create install deploy forbidden response has a 2xx status code -func (o *CreateInstallDeployForbidden) IsSuccess() bool { - return false -} - -// IsRedirect returns true when this create install deploy forbidden response has a 3xx status code -func (o *CreateInstallDeployForbidden) IsRedirect() bool { - return false -} - -// IsClientError returns true when this create install deploy forbidden response has a 4xx status code -func (o *CreateInstallDeployForbidden) IsClientError() bool { - return true -} - -// IsServerError returns true when this create install deploy forbidden response has a 5xx status code -func (o *CreateInstallDeployForbidden) IsServerError() bool { - return false -} - -// IsCode returns true when this create install deploy forbidden response a status code equal to that given -func (o *CreateInstallDeployForbidden) IsCode(code int) bool { - return code == 403 -} - -// Code gets the status code for the create install deploy forbidden response -func (o *CreateInstallDeployForbidden) Code() int { - return 403 -} - -func (o *CreateInstallDeployForbidden) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[POST /v1/installs/{install_id}/deploys][%d] createInstallDeployForbidden %s", 403, payload) -} - -func (o *CreateInstallDeployForbidden) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[POST /v1/installs/{install_id}/deploys][%d] createInstallDeployForbidden %s", 403, payload) -} - -func (o *CreateInstallDeployForbidden) GetPayload() *models.StderrErrResponse { - return o.Payload -} - -func (o *CreateInstallDeployForbidden) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.StderrErrResponse) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewCreateInstallDeployNotFound creates a CreateInstallDeployNotFound with default headers values -func NewCreateInstallDeployNotFound() *CreateInstallDeployNotFound { - return &CreateInstallDeployNotFound{} -} - -/* -CreateInstallDeployNotFound describes a response with status code 404, with default header values. - -Not Found -*/ -type CreateInstallDeployNotFound struct { - Payload *models.StderrErrResponse -} - -// IsSuccess returns true when this create install deploy not found response has a 2xx status code -func (o *CreateInstallDeployNotFound) IsSuccess() bool { - return false -} - -// IsRedirect returns true when this create install deploy not found response has a 3xx status code -func (o *CreateInstallDeployNotFound) IsRedirect() bool { - return false -} - -// IsClientError returns true when this create install deploy not found response has a 4xx status code -func (o *CreateInstallDeployNotFound) IsClientError() bool { - return true -} - -// IsServerError returns true when this create install deploy not found response has a 5xx status code -func (o *CreateInstallDeployNotFound) IsServerError() bool { - return false -} - -// IsCode returns true when this create install deploy not found response a status code equal to that given -func (o *CreateInstallDeployNotFound) IsCode(code int) bool { - return code == 404 -} - -// Code gets the status code for the create install deploy not found response -func (o *CreateInstallDeployNotFound) Code() int { - return 404 -} - -func (o *CreateInstallDeployNotFound) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[POST /v1/installs/{install_id}/deploys][%d] createInstallDeployNotFound %s", 404, payload) -} - -func (o *CreateInstallDeployNotFound) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[POST /v1/installs/{install_id}/deploys][%d] createInstallDeployNotFound %s", 404, payload) -} - -func (o *CreateInstallDeployNotFound) GetPayload() *models.StderrErrResponse { - return o.Payload -} - -func (o *CreateInstallDeployNotFound) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.StderrErrResponse) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewCreateInstallDeployInternalServerError creates a CreateInstallDeployInternalServerError with default headers values -func NewCreateInstallDeployInternalServerError() *CreateInstallDeployInternalServerError { - return &CreateInstallDeployInternalServerError{} -} - -/* -CreateInstallDeployInternalServerError describes a response with status code 500, with default header values. - -Internal Server Error -*/ -type CreateInstallDeployInternalServerError struct { - Payload *models.StderrErrResponse -} - -// IsSuccess returns true when this create install deploy internal server error response has a 2xx status code -func (o *CreateInstallDeployInternalServerError) IsSuccess() bool { - return false -} - -// IsRedirect returns true when this create install deploy internal server error response has a 3xx status code -func (o *CreateInstallDeployInternalServerError) IsRedirect() bool { - return false -} - -// IsClientError returns true when this create install deploy internal server error response has a 4xx status code -func (o *CreateInstallDeployInternalServerError) IsClientError() bool { - return false -} - -// IsServerError returns true when this create install deploy internal server error response has a 5xx status code -func (o *CreateInstallDeployInternalServerError) IsServerError() bool { - return true -} - -// IsCode returns true when this create install deploy internal server error response a status code equal to that given -func (o *CreateInstallDeployInternalServerError) IsCode(code int) bool { - return code == 500 -} - -// Code gets the status code for the create install deploy internal server error response -func (o *CreateInstallDeployInternalServerError) Code() int { - return 500 -} - -func (o *CreateInstallDeployInternalServerError) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[POST /v1/installs/{install_id}/deploys][%d] createInstallDeployInternalServerError %s", 500, payload) -} - -func (o *CreateInstallDeployInternalServerError) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[POST /v1/installs/{install_id}/deploys][%d] createInstallDeployInternalServerError %s", 500, payload) -} - -func (o *CreateInstallDeployInternalServerError) GetPayload() *models.StderrErrResponse { - return o.Payload -} - -func (o *CreateInstallDeployInternalServerError) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.StderrErrResponse) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} diff --git a/client/operations/create_install_inputs_parameters.go b/client/operations/create_install_inputs_parameters.go deleted file mode 100644 index cf89313..0000000 --- a/client/operations/create_install_inputs_parameters.go +++ /dev/null @@ -1,175 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package operations - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "context" - "net/http" - "time" - - "github.com/go-openapi/errors" - "github.com/go-openapi/runtime" - cr "github.com/go-openapi/runtime/client" - "github.com/go-openapi/strfmt" - - "github.com/nuonco/nuon-go/models" -) - -// NewCreateInstallInputsParams creates a new CreateInstallInputsParams object, -// with the default timeout for this client. -// -// Default values are not hydrated, since defaults are normally applied by the API server side. -// -// To enforce default values in parameter, use SetDefaults or WithDefaults. -func NewCreateInstallInputsParams() *CreateInstallInputsParams { - return &CreateInstallInputsParams{ - timeout: cr.DefaultTimeout, - } -} - -// NewCreateInstallInputsParamsWithTimeout creates a new CreateInstallInputsParams object -// with the ability to set a timeout on a request. -func NewCreateInstallInputsParamsWithTimeout(timeout time.Duration) *CreateInstallInputsParams { - return &CreateInstallInputsParams{ - timeout: timeout, - } -} - -// NewCreateInstallInputsParamsWithContext creates a new CreateInstallInputsParams object -// with the ability to set a context for a request. -func NewCreateInstallInputsParamsWithContext(ctx context.Context) *CreateInstallInputsParams { - return &CreateInstallInputsParams{ - Context: ctx, - } -} - -// NewCreateInstallInputsParamsWithHTTPClient creates a new CreateInstallInputsParams object -// with the ability to set a custom HTTPClient for a request. -func NewCreateInstallInputsParamsWithHTTPClient(client *http.Client) *CreateInstallInputsParams { - return &CreateInstallInputsParams{ - HTTPClient: client, - } -} - -/* -CreateInstallInputsParams contains all the parameters to send to the API endpoint - - for the create install inputs operation. - - Typically these are written to a http.Request. -*/ -type CreateInstallInputsParams struct { - - /* InstallID. - - install ID - */ - InstallID string - - /* Req. - - Input - */ - Req *models.ServiceCreateInstallInputsRequest - - timeout time.Duration - Context context.Context - HTTPClient *http.Client -} - -// WithDefaults hydrates default values in the create install inputs params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *CreateInstallInputsParams) WithDefaults() *CreateInstallInputsParams { - o.SetDefaults() - return o -} - -// SetDefaults hydrates default values in the create install inputs params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *CreateInstallInputsParams) SetDefaults() { - // no default values defined for this parameter -} - -// WithTimeout adds the timeout to the create install inputs params -func (o *CreateInstallInputsParams) WithTimeout(timeout time.Duration) *CreateInstallInputsParams { - o.SetTimeout(timeout) - return o -} - -// SetTimeout adds the timeout to the create install inputs params -func (o *CreateInstallInputsParams) SetTimeout(timeout time.Duration) { - o.timeout = timeout -} - -// WithContext adds the context to the create install inputs params -func (o *CreateInstallInputsParams) WithContext(ctx context.Context) *CreateInstallInputsParams { - o.SetContext(ctx) - return o -} - -// SetContext adds the context to the create install inputs params -func (o *CreateInstallInputsParams) SetContext(ctx context.Context) { - o.Context = ctx -} - -// WithHTTPClient adds the HTTPClient to the create install inputs params -func (o *CreateInstallInputsParams) WithHTTPClient(client *http.Client) *CreateInstallInputsParams { - o.SetHTTPClient(client) - return o -} - -// SetHTTPClient adds the HTTPClient to the create install inputs params -func (o *CreateInstallInputsParams) SetHTTPClient(client *http.Client) { - o.HTTPClient = client -} - -// WithInstallID adds the installID to the create install inputs params -func (o *CreateInstallInputsParams) WithInstallID(installID string) *CreateInstallInputsParams { - o.SetInstallID(installID) - return o -} - -// SetInstallID adds the installId to the create install inputs params -func (o *CreateInstallInputsParams) SetInstallID(installID string) { - o.InstallID = installID -} - -// WithReq adds the req to the create install inputs params -func (o *CreateInstallInputsParams) WithReq(req *models.ServiceCreateInstallInputsRequest) *CreateInstallInputsParams { - o.SetReq(req) - return o -} - -// SetReq adds the req to the create install inputs params -func (o *CreateInstallInputsParams) SetReq(req *models.ServiceCreateInstallInputsRequest) { - o.Req = req -} - -// WriteToRequest writes these params to a swagger request -func (o *CreateInstallInputsParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { - - if err := r.SetTimeout(o.timeout); err != nil { - return err - } - var res []error - - // path param install_id - if err := r.SetPathParam("install_id", o.InstallID); err != nil { - return err - } - if o.Req != nil { - if err := r.SetBodyParam(o.Req); err != nil { - return err - } - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} diff --git a/client/operations/create_install_inputs_responses.go b/client/operations/create_install_inputs_responses.go deleted file mode 100644 index fb3ec6b..0000000 --- a/client/operations/create_install_inputs_responses.go +++ /dev/null @@ -1,486 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package operations - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "encoding/json" - "fmt" - "io" - - "github.com/go-openapi/runtime" - "github.com/go-openapi/strfmt" - - "github.com/nuonco/nuon-go/models" -) - -// CreateInstallInputsReader is a Reader for the CreateInstallInputs structure. -type CreateInstallInputsReader struct { - formats strfmt.Registry -} - -// ReadResponse reads a server response into the received o. -func (o *CreateInstallInputsReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { - switch response.Code() { - case 201: - result := NewCreateInstallInputsCreated() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return result, nil - case 400: - result := NewCreateInstallInputsBadRequest() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return nil, result - case 401: - result := NewCreateInstallInputsUnauthorized() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return nil, result - case 403: - result := NewCreateInstallInputsForbidden() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return nil, result - case 404: - result := NewCreateInstallInputsNotFound() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return nil, result - case 500: - result := NewCreateInstallInputsInternalServerError() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return nil, result - default: - return nil, runtime.NewAPIError("[POST /v1/installs/{install_id}/inputs] CreateInstallInputs", response, response.Code()) - } -} - -// NewCreateInstallInputsCreated creates a CreateInstallInputsCreated with default headers values -func NewCreateInstallInputsCreated() *CreateInstallInputsCreated { - return &CreateInstallInputsCreated{} -} - -/* -CreateInstallInputsCreated describes a response with status code 201, with default header values. - -Created -*/ -type CreateInstallInputsCreated struct { - Payload *models.AppInstallInputs -} - -// IsSuccess returns true when this create install inputs created response has a 2xx status code -func (o *CreateInstallInputsCreated) IsSuccess() bool { - return true -} - -// IsRedirect returns true when this create install inputs created response has a 3xx status code -func (o *CreateInstallInputsCreated) IsRedirect() bool { - return false -} - -// IsClientError returns true when this create install inputs created response has a 4xx status code -func (o *CreateInstallInputsCreated) IsClientError() bool { - return false -} - -// IsServerError returns true when this create install inputs created response has a 5xx status code -func (o *CreateInstallInputsCreated) IsServerError() bool { - return false -} - -// IsCode returns true when this create install inputs created response a status code equal to that given -func (o *CreateInstallInputsCreated) IsCode(code int) bool { - return code == 201 -} - -// Code gets the status code for the create install inputs created response -func (o *CreateInstallInputsCreated) Code() int { - return 201 -} - -func (o *CreateInstallInputsCreated) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[POST /v1/installs/{install_id}/inputs][%d] createInstallInputsCreated %s", 201, payload) -} - -func (o *CreateInstallInputsCreated) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[POST /v1/installs/{install_id}/inputs][%d] createInstallInputsCreated %s", 201, payload) -} - -func (o *CreateInstallInputsCreated) GetPayload() *models.AppInstallInputs { - return o.Payload -} - -func (o *CreateInstallInputsCreated) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.AppInstallInputs) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewCreateInstallInputsBadRequest creates a CreateInstallInputsBadRequest with default headers values -func NewCreateInstallInputsBadRequest() *CreateInstallInputsBadRequest { - return &CreateInstallInputsBadRequest{} -} - -/* -CreateInstallInputsBadRequest describes a response with status code 400, with default header values. - -Bad Request -*/ -type CreateInstallInputsBadRequest struct { - Payload *models.StderrErrResponse -} - -// IsSuccess returns true when this create install inputs bad request response has a 2xx status code -func (o *CreateInstallInputsBadRequest) IsSuccess() bool { - return false -} - -// IsRedirect returns true when this create install inputs bad request response has a 3xx status code -func (o *CreateInstallInputsBadRequest) IsRedirect() bool { - return false -} - -// IsClientError returns true when this create install inputs bad request response has a 4xx status code -func (o *CreateInstallInputsBadRequest) IsClientError() bool { - return true -} - -// IsServerError returns true when this create install inputs bad request response has a 5xx status code -func (o *CreateInstallInputsBadRequest) IsServerError() bool { - return false -} - -// IsCode returns true when this create install inputs bad request response a status code equal to that given -func (o *CreateInstallInputsBadRequest) IsCode(code int) bool { - return code == 400 -} - -// Code gets the status code for the create install inputs bad request response -func (o *CreateInstallInputsBadRequest) Code() int { - return 400 -} - -func (o *CreateInstallInputsBadRequest) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[POST /v1/installs/{install_id}/inputs][%d] createInstallInputsBadRequest %s", 400, payload) -} - -func (o *CreateInstallInputsBadRequest) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[POST /v1/installs/{install_id}/inputs][%d] createInstallInputsBadRequest %s", 400, payload) -} - -func (o *CreateInstallInputsBadRequest) GetPayload() *models.StderrErrResponse { - return o.Payload -} - -func (o *CreateInstallInputsBadRequest) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.StderrErrResponse) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewCreateInstallInputsUnauthorized creates a CreateInstallInputsUnauthorized with default headers values -func NewCreateInstallInputsUnauthorized() *CreateInstallInputsUnauthorized { - return &CreateInstallInputsUnauthorized{} -} - -/* -CreateInstallInputsUnauthorized describes a response with status code 401, with default header values. - -Unauthorized -*/ -type CreateInstallInputsUnauthorized struct { - Payload *models.StderrErrResponse -} - -// IsSuccess returns true when this create install inputs unauthorized response has a 2xx status code -func (o *CreateInstallInputsUnauthorized) IsSuccess() bool { - return false -} - -// IsRedirect returns true when this create install inputs unauthorized response has a 3xx status code -func (o *CreateInstallInputsUnauthorized) IsRedirect() bool { - return false -} - -// IsClientError returns true when this create install inputs unauthorized response has a 4xx status code -func (o *CreateInstallInputsUnauthorized) IsClientError() bool { - return true -} - -// IsServerError returns true when this create install inputs unauthorized response has a 5xx status code -func (o *CreateInstallInputsUnauthorized) IsServerError() bool { - return false -} - -// IsCode returns true when this create install inputs unauthorized response a status code equal to that given -func (o *CreateInstallInputsUnauthorized) IsCode(code int) bool { - return code == 401 -} - -// Code gets the status code for the create install inputs unauthorized response -func (o *CreateInstallInputsUnauthorized) Code() int { - return 401 -} - -func (o *CreateInstallInputsUnauthorized) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[POST /v1/installs/{install_id}/inputs][%d] createInstallInputsUnauthorized %s", 401, payload) -} - -func (o *CreateInstallInputsUnauthorized) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[POST /v1/installs/{install_id}/inputs][%d] createInstallInputsUnauthorized %s", 401, payload) -} - -func (o *CreateInstallInputsUnauthorized) GetPayload() *models.StderrErrResponse { - return o.Payload -} - -func (o *CreateInstallInputsUnauthorized) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.StderrErrResponse) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewCreateInstallInputsForbidden creates a CreateInstallInputsForbidden with default headers values -func NewCreateInstallInputsForbidden() *CreateInstallInputsForbidden { - return &CreateInstallInputsForbidden{} -} - -/* -CreateInstallInputsForbidden describes a response with status code 403, with default header values. - -Forbidden -*/ -type CreateInstallInputsForbidden struct { - Payload *models.StderrErrResponse -} - -// IsSuccess returns true when this create install inputs forbidden response has a 2xx status code -func (o *CreateInstallInputsForbidden) IsSuccess() bool { - return false -} - -// IsRedirect returns true when this create install inputs forbidden response has a 3xx status code -func (o *CreateInstallInputsForbidden) IsRedirect() bool { - return false -} - -// IsClientError returns true when this create install inputs forbidden response has a 4xx status code -func (o *CreateInstallInputsForbidden) IsClientError() bool { - return true -} - -// IsServerError returns true when this create install inputs forbidden response has a 5xx status code -func (o *CreateInstallInputsForbidden) IsServerError() bool { - return false -} - -// IsCode returns true when this create install inputs forbidden response a status code equal to that given -func (o *CreateInstallInputsForbidden) IsCode(code int) bool { - return code == 403 -} - -// Code gets the status code for the create install inputs forbidden response -func (o *CreateInstallInputsForbidden) Code() int { - return 403 -} - -func (o *CreateInstallInputsForbidden) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[POST /v1/installs/{install_id}/inputs][%d] createInstallInputsForbidden %s", 403, payload) -} - -func (o *CreateInstallInputsForbidden) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[POST /v1/installs/{install_id}/inputs][%d] createInstallInputsForbidden %s", 403, payload) -} - -func (o *CreateInstallInputsForbidden) GetPayload() *models.StderrErrResponse { - return o.Payload -} - -func (o *CreateInstallInputsForbidden) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.StderrErrResponse) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewCreateInstallInputsNotFound creates a CreateInstallInputsNotFound with default headers values -func NewCreateInstallInputsNotFound() *CreateInstallInputsNotFound { - return &CreateInstallInputsNotFound{} -} - -/* -CreateInstallInputsNotFound describes a response with status code 404, with default header values. - -Not Found -*/ -type CreateInstallInputsNotFound struct { - Payload *models.StderrErrResponse -} - -// IsSuccess returns true when this create install inputs not found response has a 2xx status code -func (o *CreateInstallInputsNotFound) IsSuccess() bool { - return false -} - -// IsRedirect returns true when this create install inputs not found response has a 3xx status code -func (o *CreateInstallInputsNotFound) IsRedirect() bool { - return false -} - -// IsClientError returns true when this create install inputs not found response has a 4xx status code -func (o *CreateInstallInputsNotFound) IsClientError() bool { - return true -} - -// IsServerError returns true when this create install inputs not found response has a 5xx status code -func (o *CreateInstallInputsNotFound) IsServerError() bool { - return false -} - -// IsCode returns true when this create install inputs not found response a status code equal to that given -func (o *CreateInstallInputsNotFound) IsCode(code int) bool { - return code == 404 -} - -// Code gets the status code for the create install inputs not found response -func (o *CreateInstallInputsNotFound) Code() int { - return 404 -} - -func (o *CreateInstallInputsNotFound) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[POST /v1/installs/{install_id}/inputs][%d] createInstallInputsNotFound %s", 404, payload) -} - -func (o *CreateInstallInputsNotFound) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[POST /v1/installs/{install_id}/inputs][%d] createInstallInputsNotFound %s", 404, payload) -} - -func (o *CreateInstallInputsNotFound) GetPayload() *models.StderrErrResponse { - return o.Payload -} - -func (o *CreateInstallInputsNotFound) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.StderrErrResponse) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewCreateInstallInputsInternalServerError creates a CreateInstallInputsInternalServerError with default headers values -func NewCreateInstallInputsInternalServerError() *CreateInstallInputsInternalServerError { - return &CreateInstallInputsInternalServerError{} -} - -/* -CreateInstallInputsInternalServerError describes a response with status code 500, with default header values. - -Internal Server Error -*/ -type CreateInstallInputsInternalServerError struct { - Payload *models.StderrErrResponse -} - -// IsSuccess returns true when this create install inputs internal server error response has a 2xx status code -func (o *CreateInstallInputsInternalServerError) IsSuccess() bool { - return false -} - -// IsRedirect returns true when this create install inputs internal server error response has a 3xx status code -func (o *CreateInstallInputsInternalServerError) IsRedirect() bool { - return false -} - -// IsClientError returns true when this create install inputs internal server error response has a 4xx status code -func (o *CreateInstallInputsInternalServerError) IsClientError() bool { - return false -} - -// IsServerError returns true when this create install inputs internal server error response has a 5xx status code -func (o *CreateInstallInputsInternalServerError) IsServerError() bool { - return true -} - -// IsCode returns true when this create install inputs internal server error response a status code equal to that given -func (o *CreateInstallInputsInternalServerError) IsCode(code int) bool { - return code == 500 -} - -// Code gets the status code for the create install inputs internal server error response -func (o *CreateInstallInputsInternalServerError) Code() int { - return 500 -} - -func (o *CreateInstallInputsInternalServerError) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[POST /v1/installs/{install_id}/inputs][%d] createInstallInputsInternalServerError %s", 500, payload) -} - -func (o *CreateInstallInputsInternalServerError) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[POST /v1/installs/{install_id}/inputs][%d] createInstallInputsInternalServerError %s", 500, payload) -} - -func (o *CreateInstallInputsInternalServerError) GetPayload() *models.StderrErrResponse { - return o.Payload -} - -func (o *CreateInstallInputsInternalServerError) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.StderrErrResponse) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} diff --git a/client/operations/create_install_parameters.go b/client/operations/create_install_parameters.go deleted file mode 100644 index fb08612..0000000 --- a/client/operations/create_install_parameters.go +++ /dev/null @@ -1,175 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package operations - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "context" - "net/http" - "time" - - "github.com/go-openapi/errors" - "github.com/go-openapi/runtime" - cr "github.com/go-openapi/runtime/client" - "github.com/go-openapi/strfmt" - - "github.com/nuonco/nuon-go/models" -) - -// NewCreateInstallParams creates a new CreateInstallParams object, -// with the default timeout for this client. -// -// Default values are not hydrated, since defaults are normally applied by the API server side. -// -// To enforce default values in parameter, use SetDefaults or WithDefaults. -func NewCreateInstallParams() *CreateInstallParams { - return &CreateInstallParams{ - timeout: cr.DefaultTimeout, - } -} - -// NewCreateInstallParamsWithTimeout creates a new CreateInstallParams object -// with the ability to set a timeout on a request. -func NewCreateInstallParamsWithTimeout(timeout time.Duration) *CreateInstallParams { - return &CreateInstallParams{ - timeout: timeout, - } -} - -// NewCreateInstallParamsWithContext creates a new CreateInstallParams object -// with the ability to set a context for a request. -func NewCreateInstallParamsWithContext(ctx context.Context) *CreateInstallParams { - return &CreateInstallParams{ - Context: ctx, - } -} - -// NewCreateInstallParamsWithHTTPClient creates a new CreateInstallParams object -// with the ability to set a custom HTTPClient for a request. -func NewCreateInstallParamsWithHTTPClient(client *http.Client) *CreateInstallParams { - return &CreateInstallParams{ - HTTPClient: client, - } -} - -/* -CreateInstallParams contains all the parameters to send to the API endpoint - - for the create install operation. - - Typically these are written to a http.Request. -*/ -type CreateInstallParams struct { - - /* AppID. - - app ID - */ - AppID string - - /* Req. - - Input - */ - Req *models.ServiceCreateInstallRequest - - timeout time.Duration - Context context.Context - HTTPClient *http.Client -} - -// WithDefaults hydrates default values in the create install params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *CreateInstallParams) WithDefaults() *CreateInstallParams { - o.SetDefaults() - return o -} - -// SetDefaults hydrates default values in the create install params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *CreateInstallParams) SetDefaults() { - // no default values defined for this parameter -} - -// WithTimeout adds the timeout to the create install params -func (o *CreateInstallParams) WithTimeout(timeout time.Duration) *CreateInstallParams { - o.SetTimeout(timeout) - return o -} - -// SetTimeout adds the timeout to the create install params -func (o *CreateInstallParams) SetTimeout(timeout time.Duration) { - o.timeout = timeout -} - -// WithContext adds the context to the create install params -func (o *CreateInstallParams) WithContext(ctx context.Context) *CreateInstallParams { - o.SetContext(ctx) - return o -} - -// SetContext adds the context to the create install params -func (o *CreateInstallParams) SetContext(ctx context.Context) { - o.Context = ctx -} - -// WithHTTPClient adds the HTTPClient to the create install params -func (o *CreateInstallParams) WithHTTPClient(client *http.Client) *CreateInstallParams { - o.SetHTTPClient(client) - return o -} - -// SetHTTPClient adds the HTTPClient to the create install params -func (o *CreateInstallParams) SetHTTPClient(client *http.Client) { - o.HTTPClient = client -} - -// WithAppID adds the appID to the create install params -func (o *CreateInstallParams) WithAppID(appID string) *CreateInstallParams { - o.SetAppID(appID) - return o -} - -// SetAppID adds the appId to the create install params -func (o *CreateInstallParams) SetAppID(appID string) { - o.AppID = appID -} - -// WithReq adds the req to the create install params -func (o *CreateInstallParams) WithReq(req *models.ServiceCreateInstallRequest) *CreateInstallParams { - o.SetReq(req) - return o -} - -// SetReq adds the req to the create install params -func (o *CreateInstallParams) SetReq(req *models.ServiceCreateInstallRequest) { - o.Req = req -} - -// WriteToRequest writes these params to a swagger request -func (o *CreateInstallParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { - - if err := r.SetTimeout(o.timeout); err != nil { - return err - } - var res []error - - // path param app_id - if err := r.SetPathParam("app_id", o.AppID); err != nil { - return err - } - if o.Req != nil { - if err := r.SetBodyParam(o.Req); err != nil { - return err - } - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} diff --git a/client/operations/create_install_responses.go b/client/operations/create_install_responses.go deleted file mode 100644 index 174e6d7..0000000 --- a/client/operations/create_install_responses.go +++ /dev/null @@ -1,486 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package operations - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "encoding/json" - "fmt" - "io" - - "github.com/go-openapi/runtime" - "github.com/go-openapi/strfmt" - - "github.com/nuonco/nuon-go/models" -) - -// CreateInstallReader is a Reader for the CreateInstall structure. -type CreateInstallReader struct { - formats strfmt.Registry -} - -// ReadResponse reads a server response into the received o. -func (o *CreateInstallReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { - switch response.Code() { - case 201: - result := NewCreateInstallCreated() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return result, nil - case 400: - result := NewCreateInstallBadRequest() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return nil, result - case 401: - result := NewCreateInstallUnauthorized() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return nil, result - case 403: - result := NewCreateInstallForbidden() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return nil, result - case 404: - result := NewCreateInstallNotFound() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return nil, result - case 500: - result := NewCreateInstallInternalServerError() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return nil, result - default: - return nil, runtime.NewAPIError("[POST /v1/apps/{app_id}/installs] CreateInstall", response, response.Code()) - } -} - -// NewCreateInstallCreated creates a CreateInstallCreated with default headers values -func NewCreateInstallCreated() *CreateInstallCreated { - return &CreateInstallCreated{} -} - -/* -CreateInstallCreated describes a response with status code 201, with default header values. - -Created -*/ -type CreateInstallCreated struct { - Payload *models.AppInstall -} - -// IsSuccess returns true when this create install created response has a 2xx status code -func (o *CreateInstallCreated) IsSuccess() bool { - return true -} - -// IsRedirect returns true when this create install created response has a 3xx status code -func (o *CreateInstallCreated) IsRedirect() bool { - return false -} - -// IsClientError returns true when this create install created response has a 4xx status code -func (o *CreateInstallCreated) IsClientError() bool { - return false -} - -// IsServerError returns true when this create install created response has a 5xx status code -func (o *CreateInstallCreated) IsServerError() bool { - return false -} - -// IsCode returns true when this create install created response a status code equal to that given -func (o *CreateInstallCreated) IsCode(code int) bool { - return code == 201 -} - -// Code gets the status code for the create install created response -func (o *CreateInstallCreated) Code() int { - return 201 -} - -func (o *CreateInstallCreated) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[POST /v1/apps/{app_id}/installs][%d] createInstallCreated %s", 201, payload) -} - -func (o *CreateInstallCreated) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[POST /v1/apps/{app_id}/installs][%d] createInstallCreated %s", 201, payload) -} - -func (o *CreateInstallCreated) GetPayload() *models.AppInstall { - return o.Payload -} - -func (o *CreateInstallCreated) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.AppInstall) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewCreateInstallBadRequest creates a CreateInstallBadRequest with default headers values -func NewCreateInstallBadRequest() *CreateInstallBadRequest { - return &CreateInstallBadRequest{} -} - -/* -CreateInstallBadRequest describes a response with status code 400, with default header values. - -Bad Request -*/ -type CreateInstallBadRequest struct { - Payload *models.StderrErrResponse -} - -// IsSuccess returns true when this create install bad request response has a 2xx status code -func (o *CreateInstallBadRequest) IsSuccess() bool { - return false -} - -// IsRedirect returns true when this create install bad request response has a 3xx status code -func (o *CreateInstallBadRequest) IsRedirect() bool { - return false -} - -// IsClientError returns true when this create install bad request response has a 4xx status code -func (o *CreateInstallBadRequest) IsClientError() bool { - return true -} - -// IsServerError returns true when this create install bad request response has a 5xx status code -func (o *CreateInstallBadRequest) IsServerError() bool { - return false -} - -// IsCode returns true when this create install bad request response a status code equal to that given -func (o *CreateInstallBadRequest) IsCode(code int) bool { - return code == 400 -} - -// Code gets the status code for the create install bad request response -func (o *CreateInstallBadRequest) Code() int { - return 400 -} - -func (o *CreateInstallBadRequest) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[POST /v1/apps/{app_id}/installs][%d] createInstallBadRequest %s", 400, payload) -} - -func (o *CreateInstallBadRequest) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[POST /v1/apps/{app_id}/installs][%d] createInstallBadRequest %s", 400, payload) -} - -func (o *CreateInstallBadRequest) GetPayload() *models.StderrErrResponse { - return o.Payload -} - -func (o *CreateInstallBadRequest) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.StderrErrResponse) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewCreateInstallUnauthorized creates a CreateInstallUnauthorized with default headers values -func NewCreateInstallUnauthorized() *CreateInstallUnauthorized { - return &CreateInstallUnauthorized{} -} - -/* -CreateInstallUnauthorized describes a response with status code 401, with default header values. - -Unauthorized -*/ -type CreateInstallUnauthorized struct { - Payload *models.StderrErrResponse -} - -// IsSuccess returns true when this create install unauthorized response has a 2xx status code -func (o *CreateInstallUnauthorized) IsSuccess() bool { - return false -} - -// IsRedirect returns true when this create install unauthorized response has a 3xx status code -func (o *CreateInstallUnauthorized) IsRedirect() bool { - return false -} - -// IsClientError returns true when this create install unauthorized response has a 4xx status code -func (o *CreateInstallUnauthorized) IsClientError() bool { - return true -} - -// IsServerError returns true when this create install unauthorized response has a 5xx status code -func (o *CreateInstallUnauthorized) IsServerError() bool { - return false -} - -// IsCode returns true when this create install unauthorized response a status code equal to that given -func (o *CreateInstallUnauthorized) IsCode(code int) bool { - return code == 401 -} - -// Code gets the status code for the create install unauthorized response -func (o *CreateInstallUnauthorized) Code() int { - return 401 -} - -func (o *CreateInstallUnauthorized) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[POST /v1/apps/{app_id}/installs][%d] createInstallUnauthorized %s", 401, payload) -} - -func (o *CreateInstallUnauthorized) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[POST /v1/apps/{app_id}/installs][%d] createInstallUnauthorized %s", 401, payload) -} - -func (o *CreateInstallUnauthorized) GetPayload() *models.StderrErrResponse { - return o.Payload -} - -func (o *CreateInstallUnauthorized) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.StderrErrResponse) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewCreateInstallForbidden creates a CreateInstallForbidden with default headers values -func NewCreateInstallForbidden() *CreateInstallForbidden { - return &CreateInstallForbidden{} -} - -/* -CreateInstallForbidden describes a response with status code 403, with default header values. - -Forbidden -*/ -type CreateInstallForbidden struct { - Payload *models.StderrErrResponse -} - -// IsSuccess returns true when this create install forbidden response has a 2xx status code -func (o *CreateInstallForbidden) IsSuccess() bool { - return false -} - -// IsRedirect returns true when this create install forbidden response has a 3xx status code -func (o *CreateInstallForbidden) IsRedirect() bool { - return false -} - -// IsClientError returns true when this create install forbidden response has a 4xx status code -func (o *CreateInstallForbidden) IsClientError() bool { - return true -} - -// IsServerError returns true when this create install forbidden response has a 5xx status code -func (o *CreateInstallForbidden) IsServerError() bool { - return false -} - -// IsCode returns true when this create install forbidden response a status code equal to that given -func (o *CreateInstallForbidden) IsCode(code int) bool { - return code == 403 -} - -// Code gets the status code for the create install forbidden response -func (o *CreateInstallForbidden) Code() int { - return 403 -} - -func (o *CreateInstallForbidden) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[POST /v1/apps/{app_id}/installs][%d] createInstallForbidden %s", 403, payload) -} - -func (o *CreateInstallForbidden) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[POST /v1/apps/{app_id}/installs][%d] createInstallForbidden %s", 403, payload) -} - -func (o *CreateInstallForbidden) GetPayload() *models.StderrErrResponse { - return o.Payload -} - -func (o *CreateInstallForbidden) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.StderrErrResponse) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewCreateInstallNotFound creates a CreateInstallNotFound with default headers values -func NewCreateInstallNotFound() *CreateInstallNotFound { - return &CreateInstallNotFound{} -} - -/* -CreateInstallNotFound describes a response with status code 404, with default header values. - -Not Found -*/ -type CreateInstallNotFound struct { - Payload *models.StderrErrResponse -} - -// IsSuccess returns true when this create install not found response has a 2xx status code -func (o *CreateInstallNotFound) IsSuccess() bool { - return false -} - -// IsRedirect returns true when this create install not found response has a 3xx status code -func (o *CreateInstallNotFound) IsRedirect() bool { - return false -} - -// IsClientError returns true when this create install not found response has a 4xx status code -func (o *CreateInstallNotFound) IsClientError() bool { - return true -} - -// IsServerError returns true when this create install not found response has a 5xx status code -func (o *CreateInstallNotFound) IsServerError() bool { - return false -} - -// IsCode returns true when this create install not found response a status code equal to that given -func (o *CreateInstallNotFound) IsCode(code int) bool { - return code == 404 -} - -// Code gets the status code for the create install not found response -func (o *CreateInstallNotFound) Code() int { - return 404 -} - -func (o *CreateInstallNotFound) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[POST /v1/apps/{app_id}/installs][%d] createInstallNotFound %s", 404, payload) -} - -func (o *CreateInstallNotFound) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[POST /v1/apps/{app_id}/installs][%d] createInstallNotFound %s", 404, payload) -} - -func (o *CreateInstallNotFound) GetPayload() *models.StderrErrResponse { - return o.Payload -} - -func (o *CreateInstallNotFound) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.StderrErrResponse) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewCreateInstallInternalServerError creates a CreateInstallInternalServerError with default headers values -func NewCreateInstallInternalServerError() *CreateInstallInternalServerError { - return &CreateInstallInternalServerError{} -} - -/* -CreateInstallInternalServerError describes a response with status code 500, with default header values. - -Internal Server Error -*/ -type CreateInstallInternalServerError struct { - Payload *models.StderrErrResponse -} - -// IsSuccess returns true when this create install internal server error response has a 2xx status code -func (o *CreateInstallInternalServerError) IsSuccess() bool { - return false -} - -// IsRedirect returns true when this create install internal server error response has a 3xx status code -func (o *CreateInstallInternalServerError) IsRedirect() bool { - return false -} - -// IsClientError returns true when this create install internal server error response has a 4xx status code -func (o *CreateInstallInternalServerError) IsClientError() bool { - return false -} - -// IsServerError returns true when this create install internal server error response has a 5xx status code -func (o *CreateInstallInternalServerError) IsServerError() bool { - return true -} - -// IsCode returns true when this create install internal server error response a status code equal to that given -func (o *CreateInstallInternalServerError) IsCode(code int) bool { - return code == 500 -} - -// Code gets the status code for the create install internal server error response -func (o *CreateInstallInternalServerError) Code() int { - return 500 -} - -func (o *CreateInstallInternalServerError) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[POST /v1/apps/{app_id}/installs][%d] createInstallInternalServerError %s", 500, payload) -} - -func (o *CreateInstallInternalServerError) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[POST /v1/apps/{app_id}/installs][%d] createInstallInternalServerError %s", 500, payload) -} - -func (o *CreateInstallInternalServerError) GetPayload() *models.StderrErrResponse { - return o.Payload -} - -func (o *CreateInstallInternalServerError) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.StderrErrResponse) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} diff --git a/client/operations/create_installer_parameters.go b/client/operations/create_installer_parameters.go deleted file mode 100644 index cccc0f8..0000000 --- a/client/operations/create_installer_parameters.go +++ /dev/null @@ -1,153 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package operations - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "context" - "net/http" - "time" - - "github.com/go-openapi/errors" - "github.com/go-openapi/runtime" - cr "github.com/go-openapi/runtime/client" - "github.com/go-openapi/strfmt" - - "github.com/nuonco/nuon-go/models" -) - -// NewCreateInstallerParams creates a new CreateInstallerParams object, -// with the default timeout for this client. -// -// Default values are not hydrated, since defaults are normally applied by the API server side. -// -// To enforce default values in parameter, use SetDefaults or WithDefaults. -func NewCreateInstallerParams() *CreateInstallerParams { - return &CreateInstallerParams{ - timeout: cr.DefaultTimeout, - } -} - -// NewCreateInstallerParamsWithTimeout creates a new CreateInstallerParams object -// with the ability to set a timeout on a request. -func NewCreateInstallerParamsWithTimeout(timeout time.Duration) *CreateInstallerParams { - return &CreateInstallerParams{ - timeout: timeout, - } -} - -// NewCreateInstallerParamsWithContext creates a new CreateInstallerParams object -// with the ability to set a context for a request. -func NewCreateInstallerParamsWithContext(ctx context.Context) *CreateInstallerParams { - return &CreateInstallerParams{ - Context: ctx, - } -} - -// NewCreateInstallerParamsWithHTTPClient creates a new CreateInstallerParams object -// with the ability to set a custom HTTPClient for a request. -func NewCreateInstallerParamsWithHTTPClient(client *http.Client) *CreateInstallerParams { - return &CreateInstallerParams{ - HTTPClient: client, - } -} - -/* -CreateInstallerParams contains all the parameters to send to the API endpoint - - for the create installer operation. - - Typically these are written to a http.Request. -*/ -type CreateInstallerParams struct { - - /* Req. - - Input - */ - Req *models.ServiceCreateInstallerRequest - - timeout time.Duration - Context context.Context - HTTPClient *http.Client -} - -// WithDefaults hydrates default values in the create installer params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *CreateInstallerParams) WithDefaults() *CreateInstallerParams { - o.SetDefaults() - return o -} - -// SetDefaults hydrates default values in the create installer params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *CreateInstallerParams) SetDefaults() { - // no default values defined for this parameter -} - -// WithTimeout adds the timeout to the create installer params -func (o *CreateInstallerParams) WithTimeout(timeout time.Duration) *CreateInstallerParams { - o.SetTimeout(timeout) - return o -} - -// SetTimeout adds the timeout to the create installer params -func (o *CreateInstallerParams) SetTimeout(timeout time.Duration) { - o.timeout = timeout -} - -// WithContext adds the context to the create installer params -func (o *CreateInstallerParams) WithContext(ctx context.Context) *CreateInstallerParams { - o.SetContext(ctx) - return o -} - -// SetContext adds the context to the create installer params -func (o *CreateInstallerParams) SetContext(ctx context.Context) { - o.Context = ctx -} - -// WithHTTPClient adds the HTTPClient to the create installer params -func (o *CreateInstallerParams) WithHTTPClient(client *http.Client) *CreateInstallerParams { - o.SetHTTPClient(client) - return o -} - -// SetHTTPClient adds the HTTPClient to the create installer params -func (o *CreateInstallerParams) SetHTTPClient(client *http.Client) { - o.HTTPClient = client -} - -// WithReq adds the req to the create installer params -func (o *CreateInstallerParams) WithReq(req *models.ServiceCreateInstallerRequest) *CreateInstallerParams { - o.SetReq(req) - return o -} - -// SetReq adds the req to the create installer params -func (o *CreateInstallerParams) SetReq(req *models.ServiceCreateInstallerRequest) { - o.Req = req -} - -// WriteToRequest writes these params to a swagger request -func (o *CreateInstallerParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { - - if err := r.SetTimeout(o.timeout); err != nil { - return err - } - var res []error - if o.Req != nil { - if err := r.SetBodyParam(o.Req); err != nil { - return err - } - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} diff --git a/client/operations/create_installer_responses.go b/client/operations/create_installer_responses.go deleted file mode 100644 index 9e90848..0000000 --- a/client/operations/create_installer_responses.go +++ /dev/null @@ -1,486 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package operations - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "encoding/json" - "fmt" - "io" - - "github.com/go-openapi/runtime" - "github.com/go-openapi/strfmt" - - "github.com/nuonco/nuon-go/models" -) - -// CreateInstallerReader is a Reader for the CreateInstaller structure. -type CreateInstallerReader struct { - formats strfmt.Registry -} - -// ReadResponse reads a server response into the received o. -func (o *CreateInstallerReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { - switch response.Code() { - case 201: - result := NewCreateInstallerCreated() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return result, nil - case 400: - result := NewCreateInstallerBadRequest() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return nil, result - case 401: - result := NewCreateInstallerUnauthorized() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return nil, result - case 403: - result := NewCreateInstallerForbidden() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return nil, result - case 404: - result := NewCreateInstallerNotFound() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return nil, result - case 500: - result := NewCreateInstallerInternalServerError() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return nil, result - default: - return nil, runtime.NewAPIError("[POST /v1/installers] CreateInstaller", response, response.Code()) - } -} - -// NewCreateInstallerCreated creates a CreateInstallerCreated with default headers values -func NewCreateInstallerCreated() *CreateInstallerCreated { - return &CreateInstallerCreated{} -} - -/* -CreateInstallerCreated describes a response with status code 201, with default header values. - -Created -*/ -type CreateInstallerCreated struct { - Payload *models.AppInstaller -} - -// IsSuccess returns true when this create installer created response has a 2xx status code -func (o *CreateInstallerCreated) IsSuccess() bool { - return true -} - -// IsRedirect returns true when this create installer created response has a 3xx status code -func (o *CreateInstallerCreated) IsRedirect() bool { - return false -} - -// IsClientError returns true when this create installer created response has a 4xx status code -func (o *CreateInstallerCreated) IsClientError() bool { - return false -} - -// IsServerError returns true when this create installer created response has a 5xx status code -func (o *CreateInstallerCreated) IsServerError() bool { - return false -} - -// IsCode returns true when this create installer created response a status code equal to that given -func (o *CreateInstallerCreated) IsCode(code int) bool { - return code == 201 -} - -// Code gets the status code for the create installer created response -func (o *CreateInstallerCreated) Code() int { - return 201 -} - -func (o *CreateInstallerCreated) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[POST /v1/installers][%d] createInstallerCreated %s", 201, payload) -} - -func (o *CreateInstallerCreated) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[POST /v1/installers][%d] createInstallerCreated %s", 201, payload) -} - -func (o *CreateInstallerCreated) GetPayload() *models.AppInstaller { - return o.Payload -} - -func (o *CreateInstallerCreated) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.AppInstaller) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewCreateInstallerBadRequest creates a CreateInstallerBadRequest with default headers values -func NewCreateInstallerBadRequest() *CreateInstallerBadRequest { - return &CreateInstallerBadRequest{} -} - -/* -CreateInstallerBadRequest describes a response with status code 400, with default header values. - -Bad Request -*/ -type CreateInstallerBadRequest struct { - Payload *models.StderrErrResponse -} - -// IsSuccess returns true when this create installer bad request response has a 2xx status code -func (o *CreateInstallerBadRequest) IsSuccess() bool { - return false -} - -// IsRedirect returns true when this create installer bad request response has a 3xx status code -func (o *CreateInstallerBadRequest) IsRedirect() bool { - return false -} - -// IsClientError returns true when this create installer bad request response has a 4xx status code -func (o *CreateInstallerBadRequest) IsClientError() bool { - return true -} - -// IsServerError returns true when this create installer bad request response has a 5xx status code -func (o *CreateInstallerBadRequest) IsServerError() bool { - return false -} - -// IsCode returns true when this create installer bad request response a status code equal to that given -func (o *CreateInstallerBadRequest) IsCode(code int) bool { - return code == 400 -} - -// Code gets the status code for the create installer bad request response -func (o *CreateInstallerBadRequest) Code() int { - return 400 -} - -func (o *CreateInstallerBadRequest) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[POST /v1/installers][%d] createInstallerBadRequest %s", 400, payload) -} - -func (o *CreateInstallerBadRequest) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[POST /v1/installers][%d] createInstallerBadRequest %s", 400, payload) -} - -func (o *CreateInstallerBadRequest) GetPayload() *models.StderrErrResponse { - return o.Payload -} - -func (o *CreateInstallerBadRequest) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.StderrErrResponse) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewCreateInstallerUnauthorized creates a CreateInstallerUnauthorized with default headers values -func NewCreateInstallerUnauthorized() *CreateInstallerUnauthorized { - return &CreateInstallerUnauthorized{} -} - -/* -CreateInstallerUnauthorized describes a response with status code 401, with default header values. - -Unauthorized -*/ -type CreateInstallerUnauthorized struct { - Payload *models.StderrErrResponse -} - -// IsSuccess returns true when this create installer unauthorized response has a 2xx status code -func (o *CreateInstallerUnauthorized) IsSuccess() bool { - return false -} - -// IsRedirect returns true when this create installer unauthorized response has a 3xx status code -func (o *CreateInstallerUnauthorized) IsRedirect() bool { - return false -} - -// IsClientError returns true when this create installer unauthorized response has a 4xx status code -func (o *CreateInstallerUnauthorized) IsClientError() bool { - return true -} - -// IsServerError returns true when this create installer unauthorized response has a 5xx status code -func (o *CreateInstallerUnauthorized) IsServerError() bool { - return false -} - -// IsCode returns true when this create installer unauthorized response a status code equal to that given -func (o *CreateInstallerUnauthorized) IsCode(code int) bool { - return code == 401 -} - -// Code gets the status code for the create installer unauthorized response -func (o *CreateInstallerUnauthorized) Code() int { - return 401 -} - -func (o *CreateInstallerUnauthorized) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[POST /v1/installers][%d] createInstallerUnauthorized %s", 401, payload) -} - -func (o *CreateInstallerUnauthorized) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[POST /v1/installers][%d] createInstallerUnauthorized %s", 401, payload) -} - -func (o *CreateInstallerUnauthorized) GetPayload() *models.StderrErrResponse { - return o.Payload -} - -func (o *CreateInstallerUnauthorized) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.StderrErrResponse) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewCreateInstallerForbidden creates a CreateInstallerForbidden with default headers values -func NewCreateInstallerForbidden() *CreateInstallerForbidden { - return &CreateInstallerForbidden{} -} - -/* -CreateInstallerForbidden describes a response with status code 403, with default header values. - -Forbidden -*/ -type CreateInstallerForbidden struct { - Payload *models.StderrErrResponse -} - -// IsSuccess returns true when this create installer forbidden response has a 2xx status code -func (o *CreateInstallerForbidden) IsSuccess() bool { - return false -} - -// IsRedirect returns true when this create installer forbidden response has a 3xx status code -func (o *CreateInstallerForbidden) IsRedirect() bool { - return false -} - -// IsClientError returns true when this create installer forbidden response has a 4xx status code -func (o *CreateInstallerForbidden) IsClientError() bool { - return true -} - -// IsServerError returns true when this create installer forbidden response has a 5xx status code -func (o *CreateInstallerForbidden) IsServerError() bool { - return false -} - -// IsCode returns true when this create installer forbidden response a status code equal to that given -func (o *CreateInstallerForbidden) IsCode(code int) bool { - return code == 403 -} - -// Code gets the status code for the create installer forbidden response -func (o *CreateInstallerForbidden) Code() int { - return 403 -} - -func (o *CreateInstallerForbidden) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[POST /v1/installers][%d] createInstallerForbidden %s", 403, payload) -} - -func (o *CreateInstallerForbidden) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[POST /v1/installers][%d] createInstallerForbidden %s", 403, payload) -} - -func (o *CreateInstallerForbidden) GetPayload() *models.StderrErrResponse { - return o.Payload -} - -func (o *CreateInstallerForbidden) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.StderrErrResponse) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewCreateInstallerNotFound creates a CreateInstallerNotFound with default headers values -func NewCreateInstallerNotFound() *CreateInstallerNotFound { - return &CreateInstallerNotFound{} -} - -/* -CreateInstallerNotFound describes a response with status code 404, with default header values. - -Not Found -*/ -type CreateInstallerNotFound struct { - Payload *models.StderrErrResponse -} - -// IsSuccess returns true when this create installer not found response has a 2xx status code -func (o *CreateInstallerNotFound) IsSuccess() bool { - return false -} - -// IsRedirect returns true when this create installer not found response has a 3xx status code -func (o *CreateInstallerNotFound) IsRedirect() bool { - return false -} - -// IsClientError returns true when this create installer not found response has a 4xx status code -func (o *CreateInstallerNotFound) IsClientError() bool { - return true -} - -// IsServerError returns true when this create installer not found response has a 5xx status code -func (o *CreateInstallerNotFound) IsServerError() bool { - return false -} - -// IsCode returns true when this create installer not found response a status code equal to that given -func (o *CreateInstallerNotFound) IsCode(code int) bool { - return code == 404 -} - -// Code gets the status code for the create installer not found response -func (o *CreateInstallerNotFound) Code() int { - return 404 -} - -func (o *CreateInstallerNotFound) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[POST /v1/installers][%d] createInstallerNotFound %s", 404, payload) -} - -func (o *CreateInstallerNotFound) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[POST /v1/installers][%d] createInstallerNotFound %s", 404, payload) -} - -func (o *CreateInstallerNotFound) GetPayload() *models.StderrErrResponse { - return o.Payload -} - -func (o *CreateInstallerNotFound) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.StderrErrResponse) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewCreateInstallerInternalServerError creates a CreateInstallerInternalServerError with default headers values -func NewCreateInstallerInternalServerError() *CreateInstallerInternalServerError { - return &CreateInstallerInternalServerError{} -} - -/* -CreateInstallerInternalServerError describes a response with status code 500, with default header values. - -Internal Server Error -*/ -type CreateInstallerInternalServerError struct { - Payload *models.StderrErrResponse -} - -// IsSuccess returns true when this create installer internal server error response has a 2xx status code -func (o *CreateInstallerInternalServerError) IsSuccess() bool { - return false -} - -// IsRedirect returns true when this create installer internal server error response has a 3xx status code -func (o *CreateInstallerInternalServerError) IsRedirect() bool { - return false -} - -// IsClientError returns true when this create installer internal server error response has a 4xx status code -func (o *CreateInstallerInternalServerError) IsClientError() bool { - return false -} - -// IsServerError returns true when this create installer internal server error response has a 5xx status code -func (o *CreateInstallerInternalServerError) IsServerError() bool { - return true -} - -// IsCode returns true when this create installer internal server error response a status code equal to that given -func (o *CreateInstallerInternalServerError) IsCode(code int) bool { - return code == 500 -} - -// Code gets the status code for the create installer internal server error response -func (o *CreateInstallerInternalServerError) Code() int { - return 500 -} - -func (o *CreateInstallerInternalServerError) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[POST /v1/installers][%d] createInstallerInternalServerError %s", 500, payload) -} - -func (o *CreateInstallerInternalServerError) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[POST /v1/installers][%d] createInstallerInternalServerError %s", 500, payload) -} - -func (o *CreateInstallerInternalServerError) GetPayload() *models.StderrErrResponse { - return o.Payload -} - -func (o *CreateInstallerInternalServerError) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.StderrErrResponse) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} diff --git a/client/operations/create_job_component_config_parameters.go b/client/operations/create_job_component_config_parameters.go deleted file mode 100644 index 28d8bd3..0000000 --- a/client/operations/create_job_component_config_parameters.go +++ /dev/null @@ -1,175 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package operations - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "context" - "net/http" - "time" - - "github.com/go-openapi/errors" - "github.com/go-openapi/runtime" - cr "github.com/go-openapi/runtime/client" - "github.com/go-openapi/strfmt" - - "github.com/nuonco/nuon-go/models" -) - -// NewCreateJobComponentConfigParams creates a new CreateJobComponentConfigParams object, -// with the default timeout for this client. -// -// Default values are not hydrated, since defaults are normally applied by the API server side. -// -// To enforce default values in parameter, use SetDefaults or WithDefaults. -func NewCreateJobComponentConfigParams() *CreateJobComponentConfigParams { - return &CreateJobComponentConfigParams{ - timeout: cr.DefaultTimeout, - } -} - -// NewCreateJobComponentConfigParamsWithTimeout creates a new CreateJobComponentConfigParams object -// with the ability to set a timeout on a request. -func NewCreateJobComponentConfigParamsWithTimeout(timeout time.Duration) *CreateJobComponentConfigParams { - return &CreateJobComponentConfigParams{ - timeout: timeout, - } -} - -// NewCreateJobComponentConfigParamsWithContext creates a new CreateJobComponentConfigParams object -// with the ability to set a context for a request. -func NewCreateJobComponentConfigParamsWithContext(ctx context.Context) *CreateJobComponentConfigParams { - return &CreateJobComponentConfigParams{ - Context: ctx, - } -} - -// NewCreateJobComponentConfigParamsWithHTTPClient creates a new CreateJobComponentConfigParams object -// with the ability to set a custom HTTPClient for a request. -func NewCreateJobComponentConfigParamsWithHTTPClient(client *http.Client) *CreateJobComponentConfigParams { - return &CreateJobComponentConfigParams{ - HTTPClient: client, - } -} - -/* -CreateJobComponentConfigParams contains all the parameters to send to the API endpoint - - for the create job component config operation. - - Typically these are written to a http.Request. -*/ -type CreateJobComponentConfigParams struct { - - /* ComponentID. - - component ID - */ - ComponentID string - - /* Req. - - Input - */ - Req *models.ServiceCreateJobComponentConfigRequest - - timeout time.Duration - Context context.Context - HTTPClient *http.Client -} - -// WithDefaults hydrates default values in the create job component config params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *CreateJobComponentConfigParams) WithDefaults() *CreateJobComponentConfigParams { - o.SetDefaults() - return o -} - -// SetDefaults hydrates default values in the create job component config params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *CreateJobComponentConfigParams) SetDefaults() { - // no default values defined for this parameter -} - -// WithTimeout adds the timeout to the create job component config params -func (o *CreateJobComponentConfigParams) WithTimeout(timeout time.Duration) *CreateJobComponentConfigParams { - o.SetTimeout(timeout) - return o -} - -// SetTimeout adds the timeout to the create job component config params -func (o *CreateJobComponentConfigParams) SetTimeout(timeout time.Duration) { - o.timeout = timeout -} - -// WithContext adds the context to the create job component config params -func (o *CreateJobComponentConfigParams) WithContext(ctx context.Context) *CreateJobComponentConfigParams { - o.SetContext(ctx) - return o -} - -// SetContext adds the context to the create job component config params -func (o *CreateJobComponentConfigParams) SetContext(ctx context.Context) { - o.Context = ctx -} - -// WithHTTPClient adds the HTTPClient to the create job component config params -func (o *CreateJobComponentConfigParams) WithHTTPClient(client *http.Client) *CreateJobComponentConfigParams { - o.SetHTTPClient(client) - return o -} - -// SetHTTPClient adds the HTTPClient to the create job component config params -func (o *CreateJobComponentConfigParams) SetHTTPClient(client *http.Client) { - o.HTTPClient = client -} - -// WithComponentID adds the componentID to the create job component config params -func (o *CreateJobComponentConfigParams) WithComponentID(componentID string) *CreateJobComponentConfigParams { - o.SetComponentID(componentID) - return o -} - -// SetComponentID adds the componentId to the create job component config params -func (o *CreateJobComponentConfigParams) SetComponentID(componentID string) { - o.ComponentID = componentID -} - -// WithReq adds the req to the create job component config params -func (o *CreateJobComponentConfigParams) WithReq(req *models.ServiceCreateJobComponentConfigRequest) *CreateJobComponentConfigParams { - o.SetReq(req) - return o -} - -// SetReq adds the req to the create job component config params -func (o *CreateJobComponentConfigParams) SetReq(req *models.ServiceCreateJobComponentConfigRequest) { - o.Req = req -} - -// WriteToRequest writes these params to a swagger request -func (o *CreateJobComponentConfigParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { - - if err := r.SetTimeout(o.timeout); err != nil { - return err - } - var res []error - - // path param component_id - if err := r.SetPathParam("component_id", o.ComponentID); err != nil { - return err - } - if o.Req != nil { - if err := r.SetBodyParam(o.Req); err != nil { - return err - } - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} diff --git a/client/operations/create_job_component_config_responses.go b/client/operations/create_job_component_config_responses.go deleted file mode 100644 index e141f27..0000000 --- a/client/operations/create_job_component_config_responses.go +++ /dev/null @@ -1,486 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package operations - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "encoding/json" - "fmt" - "io" - - "github.com/go-openapi/runtime" - "github.com/go-openapi/strfmt" - - "github.com/nuonco/nuon-go/models" -) - -// CreateJobComponentConfigReader is a Reader for the CreateJobComponentConfig structure. -type CreateJobComponentConfigReader struct { - formats strfmt.Registry -} - -// ReadResponse reads a server response into the received o. -func (o *CreateJobComponentConfigReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { - switch response.Code() { - case 201: - result := NewCreateJobComponentConfigCreated() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return result, nil - case 400: - result := NewCreateJobComponentConfigBadRequest() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return nil, result - case 401: - result := NewCreateJobComponentConfigUnauthorized() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return nil, result - case 403: - result := NewCreateJobComponentConfigForbidden() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return nil, result - case 404: - result := NewCreateJobComponentConfigNotFound() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return nil, result - case 500: - result := NewCreateJobComponentConfigInternalServerError() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return nil, result - default: - return nil, runtime.NewAPIError("[POST /v1/components/{component_id}/configs/job] CreateJobComponentConfig", response, response.Code()) - } -} - -// NewCreateJobComponentConfigCreated creates a CreateJobComponentConfigCreated with default headers values -func NewCreateJobComponentConfigCreated() *CreateJobComponentConfigCreated { - return &CreateJobComponentConfigCreated{} -} - -/* -CreateJobComponentConfigCreated describes a response with status code 201, with default header values. - -Created -*/ -type CreateJobComponentConfigCreated struct { - Payload *models.AppJobComponentConfig -} - -// IsSuccess returns true when this create job component config created response has a 2xx status code -func (o *CreateJobComponentConfigCreated) IsSuccess() bool { - return true -} - -// IsRedirect returns true when this create job component config created response has a 3xx status code -func (o *CreateJobComponentConfigCreated) IsRedirect() bool { - return false -} - -// IsClientError returns true when this create job component config created response has a 4xx status code -func (o *CreateJobComponentConfigCreated) IsClientError() bool { - return false -} - -// IsServerError returns true when this create job component config created response has a 5xx status code -func (o *CreateJobComponentConfigCreated) IsServerError() bool { - return false -} - -// IsCode returns true when this create job component config created response a status code equal to that given -func (o *CreateJobComponentConfigCreated) IsCode(code int) bool { - return code == 201 -} - -// Code gets the status code for the create job component config created response -func (o *CreateJobComponentConfigCreated) Code() int { - return 201 -} - -func (o *CreateJobComponentConfigCreated) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[POST /v1/components/{component_id}/configs/job][%d] createJobComponentConfigCreated %s", 201, payload) -} - -func (o *CreateJobComponentConfigCreated) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[POST /v1/components/{component_id}/configs/job][%d] createJobComponentConfigCreated %s", 201, payload) -} - -func (o *CreateJobComponentConfigCreated) GetPayload() *models.AppJobComponentConfig { - return o.Payload -} - -func (o *CreateJobComponentConfigCreated) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.AppJobComponentConfig) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewCreateJobComponentConfigBadRequest creates a CreateJobComponentConfigBadRequest with default headers values -func NewCreateJobComponentConfigBadRequest() *CreateJobComponentConfigBadRequest { - return &CreateJobComponentConfigBadRequest{} -} - -/* -CreateJobComponentConfigBadRequest describes a response with status code 400, with default header values. - -Bad Request -*/ -type CreateJobComponentConfigBadRequest struct { - Payload *models.StderrErrResponse -} - -// IsSuccess returns true when this create job component config bad request response has a 2xx status code -func (o *CreateJobComponentConfigBadRequest) IsSuccess() bool { - return false -} - -// IsRedirect returns true when this create job component config bad request response has a 3xx status code -func (o *CreateJobComponentConfigBadRequest) IsRedirect() bool { - return false -} - -// IsClientError returns true when this create job component config bad request response has a 4xx status code -func (o *CreateJobComponentConfigBadRequest) IsClientError() bool { - return true -} - -// IsServerError returns true when this create job component config bad request response has a 5xx status code -func (o *CreateJobComponentConfigBadRequest) IsServerError() bool { - return false -} - -// IsCode returns true when this create job component config bad request response a status code equal to that given -func (o *CreateJobComponentConfigBadRequest) IsCode(code int) bool { - return code == 400 -} - -// Code gets the status code for the create job component config bad request response -func (o *CreateJobComponentConfigBadRequest) Code() int { - return 400 -} - -func (o *CreateJobComponentConfigBadRequest) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[POST /v1/components/{component_id}/configs/job][%d] createJobComponentConfigBadRequest %s", 400, payload) -} - -func (o *CreateJobComponentConfigBadRequest) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[POST /v1/components/{component_id}/configs/job][%d] createJobComponentConfigBadRequest %s", 400, payload) -} - -func (o *CreateJobComponentConfigBadRequest) GetPayload() *models.StderrErrResponse { - return o.Payload -} - -func (o *CreateJobComponentConfigBadRequest) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.StderrErrResponse) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewCreateJobComponentConfigUnauthorized creates a CreateJobComponentConfigUnauthorized with default headers values -func NewCreateJobComponentConfigUnauthorized() *CreateJobComponentConfigUnauthorized { - return &CreateJobComponentConfigUnauthorized{} -} - -/* -CreateJobComponentConfigUnauthorized describes a response with status code 401, with default header values. - -Unauthorized -*/ -type CreateJobComponentConfigUnauthorized struct { - Payload *models.StderrErrResponse -} - -// IsSuccess returns true when this create job component config unauthorized response has a 2xx status code -func (o *CreateJobComponentConfigUnauthorized) IsSuccess() bool { - return false -} - -// IsRedirect returns true when this create job component config unauthorized response has a 3xx status code -func (o *CreateJobComponentConfigUnauthorized) IsRedirect() bool { - return false -} - -// IsClientError returns true when this create job component config unauthorized response has a 4xx status code -func (o *CreateJobComponentConfigUnauthorized) IsClientError() bool { - return true -} - -// IsServerError returns true when this create job component config unauthorized response has a 5xx status code -func (o *CreateJobComponentConfigUnauthorized) IsServerError() bool { - return false -} - -// IsCode returns true when this create job component config unauthorized response a status code equal to that given -func (o *CreateJobComponentConfigUnauthorized) IsCode(code int) bool { - return code == 401 -} - -// Code gets the status code for the create job component config unauthorized response -func (o *CreateJobComponentConfigUnauthorized) Code() int { - return 401 -} - -func (o *CreateJobComponentConfigUnauthorized) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[POST /v1/components/{component_id}/configs/job][%d] createJobComponentConfigUnauthorized %s", 401, payload) -} - -func (o *CreateJobComponentConfigUnauthorized) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[POST /v1/components/{component_id}/configs/job][%d] createJobComponentConfigUnauthorized %s", 401, payload) -} - -func (o *CreateJobComponentConfigUnauthorized) GetPayload() *models.StderrErrResponse { - return o.Payload -} - -func (o *CreateJobComponentConfigUnauthorized) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.StderrErrResponse) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewCreateJobComponentConfigForbidden creates a CreateJobComponentConfigForbidden with default headers values -func NewCreateJobComponentConfigForbidden() *CreateJobComponentConfigForbidden { - return &CreateJobComponentConfigForbidden{} -} - -/* -CreateJobComponentConfigForbidden describes a response with status code 403, with default header values. - -Forbidden -*/ -type CreateJobComponentConfigForbidden struct { - Payload *models.StderrErrResponse -} - -// IsSuccess returns true when this create job component config forbidden response has a 2xx status code -func (o *CreateJobComponentConfigForbidden) IsSuccess() bool { - return false -} - -// IsRedirect returns true when this create job component config forbidden response has a 3xx status code -func (o *CreateJobComponentConfigForbidden) IsRedirect() bool { - return false -} - -// IsClientError returns true when this create job component config forbidden response has a 4xx status code -func (o *CreateJobComponentConfigForbidden) IsClientError() bool { - return true -} - -// IsServerError returns true when this create job component config forbidden response has a 5xx status code -func (o *CreateJobComponentConfigForbidden) IsServerError() bool { - return false -} - -// IsCode returns true when this create job component config forbidden response a status code equal to that given -func (o *CreateJobComponentConfigForbidden) IsCode(code int) bool { - return code == 403 -} - -// Code gets the status code for the create job component config forbidden response -func (o *CreateJobComponentConfigForbidden) Code() int { - return 403 -} - -func (o *CreateJobComponentConfigForbidden) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[POST /v1/components/{component_id}/configs/job][%d] createJobComponentConfigForbidden %s", 403, payload) -} - -func (o *CreateJobComponentConfigForbidden) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[POST /v1/components/{component_id}/configs/job][%d] createJobComponentConfigForbidden %s", 403, payload) -} - -func (o *CreateJobComponentConfigForbidden) GetPayload() *models.StderrErrResponse { - return o.Payload -} - -func (o *CreateJobComponentConfigForbidden) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.StderrErrResponse) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewCreateJobComponentConfigNotFound creates a CreateJobComponentConfigNotFound with default headers values -func NewCreateJobComponentConfigNotFound() *CreateJobComponentConfigNotFound { - return &CreateJobComponentConfigNotFound{} -} - -/* -CreateJobComponentConfigNotFound describes a response with status code 404, with default header values. - -Not Found -*/ -type CreateJobComponentConfigNotFound struct { - Payload *models.StderrErrResponse -} - -// IsSuccess returns true when this create job component config not found response has a 2xx status code -func (o *CreateJobComponentConfigNotFound) IsSuccess() bool { - return false -} - -// IsRedirect returns true when this create job component config not found response has a 3xx status code -func (o *CreateJobComponentConfigNotFound) IsRedirect() bool { - return false -} - -// IsClientError returns true when this create job component config not found response has a 4xx status code -func (o *CreateJobComponentConfigNotFound) IsClientError() bool { - return true -} - -// IsServerError returns true when this create job component config not found response has a 5xx status code -func (o *CreateJobComponentConfigNotFound) IsServerError() bool { - return false -} - -// IsCode returns true when this create job component config not found response a status code equal to that given -func (o *CreateJobComponentConfigNotFound) IsCode(code int) bool { - return code == 404 -} - -// Code gets the status code for the create job component config not found response -func (o *CreateJobComponentConfigNotFound) Code() int { - return 404 -} - -func (o *CreateJobComponentConfigNotFound) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[POST /v1/components/{component_id}/configs/job][%d] createJobComponentConfigNotFound %s", 404, payload) -} - -func (o *CreateJobComponentConfigNotFound) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[POST /v1/components/{component_id}/configs/job][%d] createJobComponentConfigNotFound %s", 404, payload) -} - -func (o *CreateJobComponentConfigNotFound) GetPayload() *models.StderrErrResponse { - return o.Payload -} - -func (o *CreateJobComponentConfigNotFound) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.StderrErrResponse) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewCreateJobComponentConfigInternalServerError creates a CreateJobComponentConfigInternalServerError with default headers values -func NewCreateJobComponentConfigInternalServerError() *CreateJobComponentConfigInternalServerError { - return &CreateJobComponentConfigInternalServerError{} -} - -/* -CreateJobComponentConfigInternalServerError describes a response with status code 500, with default header values. - -Internal Server Error -*/ -type CreateJobComponentConfigInternalServerError struct { - Payload *models.StderrErrResponse -} - -// IsSuccess returns true when this create job component config internal server error response has a 2xx status code -func (o *CreateJobComponentConfigInternalServerError) IsSuccess() bool { - return false -} - -// IsRedirect returns true when this create job component config internal server error response has a 3xx status code -func (o *CreateJobComponentConfigInternalServerError) IsRedirect() bool { - return false -} - -// IsClientError returns true when this create job component config internal server error response has a 4xx status code -func (o *CreateJobComponentConfigInternalServerError) IsClientError() bool { - return false -} - -// IsServerError returns true when this create job component config internal server error response has a 5xx status code -func (o *CreateJobComponentConfigInternalServerError) IsServerError() bool { - return true -} - -// IsCode returns true when this create job component config internal server error response a status code equal to that given -func (o *CreateJobComponentConfigInternalServerError) IsCode(code int) bool { - return code == 500 -} - -// Code gets the status code for the create job component config internal server error response -func (o *CreateJobComponentConfigInternalServerError) Code() int { - return 500 -} - -func (o *CreateJobComponentConfigInternalServerError) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[POST /v1/components/{component_id}/configs/job][%d] createJobComponentConfigInternalServerError %s", 500, payload) -} - -func (o *CreateJobComponentConfigInternalServerError) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[POST /v1/components/{component_id}/configs/job][%d] createJobComponentConfigInternalServerError %s", 500, payload) -} - -func (o *CreateJobComponentConfigInternalServerError) GetPayload() *models.StderrErrResponse { - return o.Payload -} - -func (o *CreateJobComponentConfigInternalServerError) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.StderrErrResponse) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} diff --git a/client/operations/create_org_invite_parameters.go b/client/operations/create_org_invite_parameters.go deleted file mode 100644 index 1b6e119..0000000 --- a/client/operations/create_org_invite_parameters.go +++ /dev/null @@ -1,153 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package operations - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "context" - "net/http" - "time" - - "github.com/go-openapi/errors" - "github.com/go-openapi/runtime" - cr "github.com/go-openapi/runtime/client" - "github.com/go-openapi/strfmt" - - "github.com/nuonco/nuon-go/models" -) - -// NewCreateOrgInviteParams creates a new CreateOrgInviteParams object, -// with the default timeout for this client. -// -// Default values are not hydrated, since defaults are normally applied by the API server side. -// -// To enforce default values in parameter, use SetDefaults or WithDefaults. -func NewCreateOrgInviteParams() *CreateOrgInviteParams { - return &CreateOrgInviteParams{ - timeout: cr.DefaultTimeout, - } -} - -// NewCreateOrgInviteParamsWithTimeout creates a new CreateOrgInviteParams object -// with the ability to set a timeout on a request. -func NewCreateOrgInviteParamsWithTimeout(timeout time.Duration) *CreateOrgInviteParams { - return &CreateOrgInviteParams{ - timeout: timeout, - } -} - -// NewCreateOrgInviteParamsWithContext creates a new CreateOrgInviteParams object -// with the ability to set a context for a request. -func NewCreateOrgInviteParamsWithContext(ctx context.Context) *CreateOrgInviteParams { - return &CreateOrgInviteParams{ - Context: ctx, - } -} - -// NewCreateOrgInviteParamsWithHTTPClient creates a new CreateOrgInviteParams object -// with the ability to set a custom HTTPClient for a request. -func NewCreateOrgInviteParamsWithHTTPClient(client *http.Client) *CreateOrgInviteParams { - return &CreateOrgInviteParams{ - HTTPClient: client, - } -} - -/* -CreateOrgInviteParams contains all the parameters to send to the API endpoint - - for the create org invite operation. - - Typically these are written to a http.Request. -*/ -type CreateOrgInviteParams struct { - - /* Req. - - Input - */ - Req *models.ServiceCreateOrgInviteRequest - - timeout time.Duration - Context context.Context - HTTPClient *http.Client -} - -// WithDefaults hydrates default values in the create org invite params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *CreateOrgInviteParams) WithDefaults() *CreateOrgInviteParams { - o.SetDefaults() - return o -} - -// SetDefaults hydrates default values in the create org invite params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *CreateOrgInviteParams) SetDefaults() { - // no default values defined for this parameter -} - -// WithTimeout adds the timeout to the create org invite params -func (o *CreateOrgInviteParams) WithTimeout(timeout time.Duration) *CreateOrgInviteParams { - o.SetTimeout(timeout) - return o -} - -// SetTimeout adds the timeout to the create org invite params -func (o *CreateOrgInviteParams) SetTimeout(timeout time.Duration) { - o.timeout = timeout -} - -// WithContext adds the context to the create org invite params -func (o *CreateOrgInviteParams) WithContext(ctx context.Context) *CreateOrgInviteParams { - o.SetContext(ctx) - return o -} - -// SetContext adds the context to the create org invite params -func (o *CreateOrgInviteParams) SetContext(ctx context.Context) { - o.Context = ctx -} - -// WithHTTPClient adds the HTTPClient to the create org invite params -func (o *CreateOrgInviteParams) WithHTTPClient(client *http.Client) *CreateOrgInviteParams { - o.SetHTTPClient(client) - return o -} - -// SetHTTPClient adds the HTTPClient to the create org invite params -func (o *CreateOrgInviteParams) SetHTTPClient(client *http.Client) { - o.HTTPClient = client -} - -// WithReq adds the req to the create org invite params -func (o *CreateOrgInviteParams) WithReq(req *models.ServiceCreateOrgInviteRequest) *CreateOrgInviteParams { - o.SetReq(req) - return o -} - -// SetReq adds the req to the create org invite params -func (o *CreateOrgInviteParams) SetReq(req *models.ServiceCreateOrgInviteRequest) { - o.Req = req -} - -// WriteToRequest writes these params to a swagger request -func (o *CreateOrgInviteParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { - - if err := r.SetTimeout(o.timeout); err != nil { - return err - } - var res []error - if o.Req != nil { - if err := r.SetBodyParam(o.Req); err != nil { - return err - } - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} diff --git a/client/operations/create_org_invite_responses.go b/client/operations/create_org_invite_responses.go deleted file mode 100644 index 3da50e8..0000000 --- a/client/operations/create_org_invite_responses.go +++ /dev/null @@ -1,486 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package operations - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "encoding/json" - "fmt" - "io" - - "github.com/go-openapi/runtime" - "github.com/go-openapi/strfmt" - - "github.com/nuonco/nuon-go/models" -) - -// CreateOrgInviteReader is a Reader for the CreateOrgInvite structure. -type CreateOrgInviteReader struct { - formats strfmt.Registry -} - -// ReadResponse reads a server response into the received o. -func (o *CreateOrgInviteReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { - switch response.Code() { - case 201: - result := NewCreateOrgInviteCreated() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return result, nil - case 400: - result := NewCreateOrgInviteBadRequest() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return nil, result - case 401: - result := NewCreateOrgInviteUnauthorized() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return nil, result - case 403: - result := NewCreateOrgInviteForbidden() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return nil, result - case 404: - result := NewCreateOrgInviteNotFound() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return nil, result - case 500: - result := NewCreateOrgInviteInternalServerError() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return nil, result - default: - return nil, runtime.NewAPIError("[POST /v1/orgs/current/invites] CreateOrgInvite", response, response.Code()) - } -} - -// NewCreateOrgInviteCreated creates a CreateOrgInviteCreated with default headers values -func NewCreateOrgInviteCreated() *CreateOrgInviteCreated { - return &CreateOrgInviteCreated{} -} - -/* -CreateOrgInviteCreated describes a response with status code 201, with default header values. - -Created -*/ -type CreateOrgInviteCreated struct { - Payload *models.AppOrgInvite -} - -// IsSuccess returns true when this create org invite created response has a 2xx status code -func (o *CreateOrgInviteCreated) IsSuccess() bool { - return true -} - -// IsRedirect returns true when this create org invite created response has a 3xx status code -func (o *CreateOrgInviteCreated) IsRedirect() bool { - return false -} - -// IsClientError returns true when this create org invite created response has a 4xx status code -func (o *CreateOrgInviteCreated) IsClientError() bool { - return false -} - -// IsServerError returns true when this create org invite created response has a 5xx status code -func (o *CreateOrgInviteCreated) IsServerError() bool { - return false -} - -// IsCode returns true when this create org invite created response a status code equal to that given -func (o *CreateOrgInviteCreated) IsCode(code int) bool { - return code == 201 -} - -// Code gets the status code for the create org invite created response -func (o *CreateOrgInviteCreated) Code() int { - return 201 -} - -func (o *CreateOrgInviteCreated) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[POST /v1/orgs/current/invites][%d] createOrgInviteCreated %s", 201, payload) -} - -func (o *CreateOrgInviteCreated) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[POST /v1/orgs/current/invites][%d] createOrgInviteCreated %s", 201, payload) -} - -func (o *CreateOrgInviteCreated) GetPayload() *models.AppOrgInvite { - return o.Payload -} - -func (o *CreateOrgInviteCreated) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.AppOrgInvite) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewCreateOrgInviteBadRequest creates a CreateOrgInviteBadRequest with default headers values -func NewCreateOrgInviteBadRequest() *CreateOrgInviteBadRequest { - return &CreateOrgInviteBadRequest{} -} - -/* -CreateOrgInviteBadRequest describes a response with status code 400, with default header values. - -Bad Request -*/ -type CreateOrgInviteBadRequest struct { - Payload *models.StderrErrResponse -} - -// IsSuccess returns true when this create org invite bad request response has a 2xx status code -func (o *CreateOrgInviteBadRequest) IsSuccess() bool { - return false -} - -// IsRedirect returns true when this create org invite bad request response has a 3xx status code -func (o *CreateOrgInviteBadRequest) IsRedirect() bool { - return false -} - -// IsClientError returns true when this create org invite bad request response has a 4xx status code -func (o *CreateOrgInviteBadRequest) IsClientError() bool { - return true -} - -// IsServerError returns true when this create org invite bad request response has a 5xx status code -func (o *CreateOrgInviteBadRequest) IsServerError() bool { - return false -} - -// IsCode returns true when this create org invite bad request response a status code equal to that given -func (o *CreateOrgInviteBadRequest) IsCode(code int) bool { - return code == 400 -} - -// Code gets the status code for the create org invite bad request response -func (o *CreateOrgInviteBadRequest) Code() int { - return 400 -} - -func (o *CreateOrgInviteBadRequest) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[POST /v1/orgs/current/invites][%d] createOrgInviteBadRequest %s", 400, payload) -} - -func (o *CreateOrgInviteBadRequest) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[POST /v1/orgs/current/invites][%d] createOrgInviteBadRequest %s", 400, payload) -} - -func (o *CreateOrgInviteBadRequest) GetPayload() *models.StderrErrResponse { - return o.Payload -} - -func (o *CreateOrgInviteBadRequest) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.StderrErrResponse) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewCreateOrgInviteUnauthorized creates a CreateOrgInviteUnauthorized with default headers values -func NewCreateOrgInviteUnauthorized() *CreateOrgInviteUnauthorized { - return &CreateOrgInviteUnauthorized{} -} - -/* -CreateOrgInviteUnauthorized describes a response with status code 401, with default header values. - -Unauthorized -*/ -type CreateOrgInviteUnauthorized struct { - Payload *models.StderrErrResponse -} - -// IsSuccess returns true when this create org invite unauthorized response has a 2xx status code -func (o *CreateOrgInviteUnauthorized) IsSuccess() bool { - return false -} - -// IsRedirect returns true when this create org invite unauthorized response has a 3xx status code -func (o *CreateOrgInviteUnauthorized) IsRedirect() bool { - return false -} - -// IsClientError returns true when this create org invite unauthorized response has a 4xx status code -func (o *CreateOrgInviteUnauthorized) IsClientError() bool { - return true -} - -// IsServerError returns true when this create org invite unauthorized response has a 5xx status code -func (o *CreateOrgInviteUnauthorized) IsServerError() bool { - return false -} - -// IsCode returns true when this create org invite unauthorized response a status code equal to that given -func (o *CreateOrgInviteUnauthorized) IsCode(code int) bool { - return code == 401 -} - -// Code gets the status code for the create org invite unauthorized response -func (o *CreateOrgInviteUnauthorized) Code() int { - return 401 -} - -func (o *CreateOrgInviteUnauthorized) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[POST /v1/orgs/current/invites][%d] createOrgInviteUnauthorized %s", 401, payload) -} - -func (o *CreateOrgInviteUnauthorized) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[POST /v1/orgs/current/invites][%d] createOrgInviteUnauthorized %s", 401, payload) -} - -func (o *CreateOrgInviteUnauthorized) GetPayload() *models.StderrErrResponse { - return o.Payload -} - -func (o *CreateOrgInviteUnauthorized) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.StderrErrResponse) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewCreateOrgInviteForbidden creates a CreateOrgInviteForbidden with default headers values -func NewCreateOrgInviteForbidden() *CreateOrgInviteForbidden { - return &CreateOrgInviteForbidden{} -} - -/* -CreateOrgInviteForbidden describes a response with status code 403, with default header values. - -Forbidden -*/ -type CreateOrgInviteForbidden struct { - Payload *models.StderrErrResponse -} - -// IsSuccess returns true when this create org invite forbidden response has a 2xx status code -func (o *CreateOrgInviteForbidden) IsSuccess() bool { - return false -} - -// IsRedirect returns true when this create org invite forbidden response has a 3xx status code -func (o *CreateOrgInviteForbidden) IsRedirect() bool { - return false -} - -// IsClientError returns true when this create org invite forbidden response has a 4xx status code -func (o *CreateOrgInviteForbidden) IsClientError() bool { - return true -} - -// IsServerError returns true when this create org invite forbidden response has a 5xx status code -func (o *CreateOrgInviteForbidden) IsServerError() bool { - return false -} - -// IsCode returns true when this create org invite forbidden response a status code equal to that given -func (o *CreateOrgInviteForbidden) IsCode(code int) bool { - return code == 403 -} - -// Code gets the status code for the create org invite forbidden response -func (o *CreateOrgInviteForbidden) Code() int { - return 403 -} - -func (o *CreateOrgInviteForbidden) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[POST /v1/orgs/current/invites][%d] createOrgInviteForbidden %s", 403, payload) -} - -func (o *CreateOrgInviteForbidden) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[POST /v1/orgs/current/invites][%d] createOrgInviteForbidden %s", 403, payload) -} - -func (o *CreateOrgInviteForbidden) GetPayload() *models.StderrErrResponse { - return o.Payload -} - -func (o *CreateOrgInviteForbidden) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.StderrErrResponse) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewCreateOrgInviteNotFound creates a CreateOrgInviteNotFound with default headers values -func NewCreateOrgInviteNotFound() *CreateOrgInviteNotFound { - return &CreateOrgInviteNotFound{} -} - -/* -CreateOrgInviteNotFound describes a response with status code 404, with default header values. - -Not Found -*/ -type CreateOrgInviteNotFound struct { - Payload *models.StderrErrResponse -} - -// IsSuccess returns true when this create org invite not found response has a 2xx status code -func (o *CreateOrgInviteNotFound) IsSuccess() bool { - return false -} - -// IsRedirect returns true when this create org invite not found response has a 3xx status code -func (o *CreateOrgInviteNotFound) IsRedirect() bool { - return false -} - -// IsClientError returns true when this create org invite not found response has a 4xx status code -func (o *CreateOrgInviteNotFound) IsClientError() bool { - return true -} - -// IsServerError returns true when this create org invite not found response has a 5xx status code -func (o *CreateOrgInviteNotFound) IsServerError() bool { - return false -} - -// IsCode returns true when this create org invite not found response a status code equal to that given -func (o *CreateOrgInviteNotFound) IsCode(code int) bool { - return code == 404 -} - -// Code gets the status code for the create org invite not found response -func (o *CreateOrgInviteNotFound) Code() int { - return 404 -} - -func (o *CreateOrgInviteNotFound) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[POST /v1/orgs/current/invites][%d] createOrgInviteNotFound %s", 404, payload) -} - -func (o *CreateOrgInviteNotFound) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[POST /v1/orgs/current/invites][%d] createOrgInviteNotFound %s", 404, payload) -} - -func (o *CreateOrgInviteNotFound) GetPayload() *models.StderrErrResponse { - return o.Payload -} - -func (o *CreateOrgInviteNotFound) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.StderrErrResponse) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewCreateOrgInviteInternalServerError creates a CreateOrgInviteInternalServerError with default headers values -func NewCreateOrgInviteInternalServerError() *CreateOrgInviteInternalServerError { - return &CreateOrgInviteInternalServerError{} -} - -/* -CreateOrgInviteInternalServerError describes a response with status code 500, with default header values. - -Internal Server Error -*/ -type CreateOrgInviteInternalServerError struct { - Payload *models.StderrErrResponse -} - -// IsSuccess returns true when this create org invite internal server error response has a 2xx status code -func (o *CreateOrgInviteInternalServerError) IsSuccess() bool { - return false -} - -// IsRedirect returns true when this create org invite internal server error response has a 3xx status code -func (o *CreateOrgInviteInternalServerError) IsRedirect() bool { - return false -} - -// IsClientError returns true when this create org invite internal server error response has a 4xx status code -func (o *CreateOrgInviteInternalServerError) IsClientError() bool { - return false -} - -// IsServerError returns true when this create org invite internal server error response has a 5xx status code -func (o *CreateOrgInviteInternalServerError) IsServerError() bool { - return true -} - -// IsCode returns true when this create org invite internal server error response a status code equal to that given -func (o *CreateOrgInviteInternalServerError) IsCode(code int) bool { - return code == 500 -} - -// Code gets the status code for the create org invite internal server error response -func (o *CreateOrgInviteInternalServerError) Code() int { - return 500 -} - -func (o *CreateOrgInviteInternalServerError) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[POST /v1/orgs/current/invites][%d] createOrgInviteInternalServerError %s", 500, payload) -} - -func (o *CreateOrgInviteInternalServerError) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[POST /v1/orgs/current/invites][%d] createOrgInviteInternalServerError %s", 500, payload) -} - -func (o *CreateOrgInviteInternalServerError) GetPayload() *models.StderrErrResponse { - return o.Payload -} - -func (o *CreateOrgInviteInternalServerError) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.StderrErrResponse) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} diff --git a/client/operations/create_org_parameters.go b/client/operations/create_org_parameters.go deleted file mode 100644 index b409709..0000000 --- a/client/operations/create_org_parameters.go +++ /dev/null @@ -1,153 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package operations - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "context" - "net/http" - "time" - - "github.com/go-openapi/errors" - "github.com/go-openapi/runtime" - cr "github.com/go-openapi/runtime/client" - "github.com/go-openapi/strfmt" - - "github.com/nuonco/nuon-go/models" -) - -// NewCreateOrgParams creates a new CreateOrgParams object, -// with the default timeout for this client. -// -// Default values are not hydrated, since defaults are normally applied by the API server side. -// -// To enforce default values in parameter, use SetDefaults or WithDefaults. -func NewCreateOrgParams() *CreateOrgParams { - return &CreateOrgParams{ - timeout: cr.DefaultTimeout, - } -} - -// NewCreateOrgParamsWithTimeout creates a new CreateOrgParams object -// with the ability to set a timeout on a request. -func NewCreateOrgParamsWithTimeout(timeout time.Duration) *CreateOrgParams { - return &CreateOrgParams{ - timeout: timeout, - } -} - -// NewCreateOrgParamsWithContext creates a new CreateOrgParams object -// with the ability to set a context for a request. -func NewCreateOrgParamsWithContext(ctx context.Context) *CreateOrgParams { - return &CreateOrgParams{ - Context: ctx, - } -} - -// NewCreateOrgParamsWithHTTPClient creates a new CreateOrgParams object -// with the ability to set a custom HTTPClient for a request. -func NewCreateOrgParamsWithHTTPClient(client *http.Client) *CreateOrgParams { - return &CreateOrgParams{ - HTTPClient: client, - } -} - -/* -CreateOrgParams contains all the parameters to send to the API endpoint - - for the create org operation. - - Typically these are written to a http.Request. -*/ -type CreateOrgParams struct { - - /* Req. - - Input - */ - Req *models.ServiceCreateOrgRequest - - timeout time.Duration - Context context.Context - HTTPClient *http.Client -} - -// WithDefaults hydrates default values in the create org params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *CreateOrgParams) WithDefaults() *CreateOrgParams { - o.SetDefaults() - return o -} - -// SetDefaults hydrates default values in the create org params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *CreateOrgParams) SetDefaults() { - // no default values defined for this parameter -} - -// WithTimeout adds the timeout to the create org params -func (o *CreateOrgParams) WithTimeout(timeout time.Duration) *CreateOrgParams { - o.SetTimeout(timeout) - return o -} - -// SetTimeout adds the timeout to the create org params -func (o *CreateOrgParams) SetTimeout(timeout time.Duration) { - o.timeout = timeout -} - -// WithContext adds the context to the create org params -func (o *CreateOrgParams) WithContext(ctx context.Context) *CreateOrgParams { - o.SetContext(ctx) - return o -} - -// SetContext adds the context to the create org params -func (o *CreateOrgParams) SetContext(ctx context.Context) { - o.Context = ctx -} - -// WithHTTPClient adds the HTTPClient to the create org params -func (o *CreateOrgParams) WithHTTPClient(client *http.Client) *CreateOrgParams { - o.SetHTTPClient(client) - return o -} - -// SetHTTPClient adds the HTTPClient to the create org params -func (o *CreateOrgParams) SetHTTPClient(client *http.Client) { - o.HTTPClient = client -} - -// WithReq adds the req to the create org params -func (o *CreateOrgParams) WithReq(req *models.ServiceCreateOrgRequest) *CreateOrgParams { - o.SetReq(req) - return o -} - -// SetReq adds the req to the create org params -func (o *CreateOrgParams) SetReq(req *models.ServiceCreateOrgRequest) { - o.Req = req -} - -// WriteToRequest writes these params to a swagger request -func (o *CreateOrgParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { - - if err := r.SetTimeout(o.timeout); err != nil { - return err - } - var res []error - if o.Req != nil { - if err := r.SetBodyParam(o.Req); err != nil { - return err - } - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} diff --git a/client/operations/create_org_responses.go b/client/operations/create_org_responses.go deleted file mode 100644 index ab4dace..0000000 --- a/client/operations/create_org_responses.go +++ /dev/null @@ -1,486 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package operations - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "encoding/json" - "fmt" - "io" - - "github.com/go-openapi/runtime" - "github.com/go-openapi/strfmt" - - "github.com/nuonco/nuon-go/models" -) - -// CreateOrgReader is a Reader for the CreateOrg structure. -type CreateOrgReader struct { - formats strfmt.Registry -} - -// ReadResponse reads a server response into the received o. -func (o *CreateOrgReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { - switch response.Code() { - case 201: - result := NewCreateOrgCreated() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return result, nil - case 400: - result := NewCreateOrgBadRequest() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return nil, result - case 401: - result := NewCreateOrgUnauthorized() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return nil, result - case 403: - result := NewCreateOrgForbidden() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return nil, result - case 404: - result := NewCreateOrgNotFound() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return nil, result - case 500: - result := NewCreateOrgInternalServerError() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return nil, result - default: - return nil, runtime.NewAPIError("[POST /v1/orgs] CreateOrg", response, response.Code()) - } -} - -// NewCreateOrgCreated creates a CreateOrgCreated with default headers values -func NewCreateOrgCreated() *CreateOrgCreated { - return &CreateOrgCreated{} -} - -/* -CreateOrgCreated describes a response with status code 201, with default header values. - -Created -*/ -type CreateOrgCreated struct { - Payload *models.AppOrg -} - -// IsSuccess returns true when this create org created response has a 2xx status code -func (o *CreateOrgCreated) IsSuccess() bool { - return true -} - -// IsRedirect returns true when this create org created response has a 3xx status code -func (o *CreateOrgCreated) IsRedirect() bool { - return false -} - -// IsClientError returns true when this create org created response has a 4xx status code -func (o *CreateOrgCreated) IsClientError() bool { - return false -} - -// IsServerError returns true when this create org created response has a 5xx status code -func (o *CreateOrgCreated) IsServerError() bool { - return false -} - -// IsCode returns true when this create org created response a status code equal to that given -func (o *CreateOrgCreated) IsCode(code int) bool { - return code == 201 -} - -// Code gets the status code for the create org created response -func (o *CreateOrgCreated) Code() int { - return 201 -} - -func (o *CreateOrgCreated) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[POST /v1/orgs][%d] createOrgCreated %s", 201, payload) -} - -func (o *CreateOrgCreated) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[POST /v1/orgs][%d] createOrgCreated %s", 201, payload) -} - -func (o *CreateOrgCreated) GetPayload() *models.AppOrg { - return o.Payload -} - -func (o *CreateOrgCreated) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.AppOrg) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewCreateOrgBadRequest creates a CreateOrgBadRequest with default headers values -func NewCreateOrgBadRequest() *CreateOrgBadRequest { - return &CreateOrgBadRequest{} -} - -/* -CreateOrgBadRequest describes a response with status code 400, with default header values. - -Bad Request -*/ -type CreateOrgBadRequest struct { - Payload *models.StderrErrResponse -} - -// IsSuccess returns true when this create org bad request response has a 2xx status code -func (o *CreateOrgBadRequest) IsSuccess() bool { - return false -} - -// IsRedirect returns true when this create org bad request response has a 3xx status code -func (o *CreateOrgBadRequest) IsRedirect() bool { - return false -} - -// IsClientError returns true when this create org bad request response has a 4xx status code -func (o *CreateOrgBadRequest) IsClientError() bool { - return true -} - -// IsServerError returns true when this create org bad request response has a 5xx status code -func (o *CreateOrgBadRequest) IsServerError() bool { - return false -} - -// IsCode returns true when this create org bad request response a status code equal to that given -func (o *CreateOrgBadRequest) IsCode(code int) bool { - return code == 400 -} - -// Code gets the status code for the create org bad request response -func (o *CreateOrgBadRequest) Code() int { - return 400 -} - -func (o *CreateOrgBadRequest) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[POST /v1/orgs][%d] createOrgBadRequest %s", 400, payload) -} - -func (o *CreateOrgBadRequest) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[POST /v1/orgs][%d] createOrgBadRequest %s", 400, payload) -} - -func (o *CreateOrgBadRequest) GetPayload() *models.StderrErrResponse { - return o.Payload -} - -func (o *CreateOrgBadRequest) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.StderrErrResponse) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewCreateOrgUnauthorized creates a CreateOrgUnauthorized with default headers values -func NewCreateOrgUnauthorized() *CreateOrgUnauthorized { - return &CreateOrgUnauthorized{} -} - -/* -CreateOrgUnauthorized describes a response with status code 401, with default header values. - -Unauthorized -*/ -type CreateOrgUnauthorized struct { - Payload *models.StderrErrResponse -} - -// IsSuccess returns true when this create org unauthorized response has a 2xx status code -func (o *CreateOrgUnauthorized) IsSuccess() bool { - return false -} - -// IsRedirect returns true when this create org unauthorized response has a 3xx status code -func (o *CreateOrgUnauthorized) IsRedirect() bool { - return false -} - -// IsClientError returns true when this create org unauthorized response has a 4xx status code -func (o *CreateOrgUnauthorized) IsClientError() bool { - return true -} - -// IsServerError returns true when this create org unauthorized response has a 5xx status code -func (o *CreateOrgUnauthorized) IsServerError() bool { - return false -} - -// IsCode returns true when this create org unauthorized response a status code equal to that given -func (o *CreateOrgUnauthorized) IsCode(code int) bool { - return code == 401 -} - -// Code gets the status code for the create org unauthorized response -func (o *CreateOrgUnauthorized) Code() int { - return 401 -} - -func (o *CreateOrgUnauthorized) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[POST /v1/orgs][%d] createOrgUnauthorized %s", 401, payload) -} - -func (o *CreateOrgUnauthorized) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[POST /v1/orgs][%d] createOrgUnauthorized %s", 401, payload) -} - -func (o *CreateOrgUnauthorized) GetPayload() *models.StderrErrResponse { - return o.Payload -} - -func (o *CreateOrgUnauthorized) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.StderrErrResponse) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewCreateOrgForbidden creates a CreateOrgForbidden with default headers values -func NewCreateOrgForbidden() *CreateOrgForbidden { - return &CreateOrgForbidden{} -} - -/* -CreateOrgForbidden describes a response with status code 403, with default header values. - -Forbidden -*/ -type CreateOrgForbidden struct { - Payload *models.StderrErrResponse -} - -// IsSuccess returns true when this create org forbidden response has a 2xx status code -func (o *CreateOrgForbidden) IsSuccess() bool { - return false -} - -// IsRedirect returns true when this create org forbidden response has a 3xx status code -func (o *CreateOrgForbidden) IsRedirect() bool { - return false -} - -// IsClientError returns true when this create org forbidden response has a 4xx status code -func (o *CreateOrgForbidden) IsClientError() bool { - return true -} - -// IsServerError returns true when this create org forbidden response has a 5xx status code -func (o *CreateOrgForbidden) IsServerError() bool { - return false -} - -// IsCode returns true when this create org forbidden response a status code equal to that given -func (o *CreateOrgForbidden) IsCode(code int) bool { - return code == 403 -} - -// Code gets the status code for the create org forbidden response -func (o *CreateOrgForbidden) Code() int { - return 403 -} - -func (o *CreateOrgForbidden) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[POST /v1/orgs][%d] createOrgForbidden %s", 403, payload) -} - -func (o *CreateOrgForbidden) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[POST /v1/orgs][%d] createOrgForbidden %s", 403, payload) -} - -func (o *CreateOrgForbidden) GetPayload() *models.StderrErrResponse { - return o.Payload -} - -func (o *CreateOrgForbidden) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.StderrErrResponse) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewCreateOrgNotFound creates a CreateOrgNotFound with default headers values -func NewCreateOrgNotFound() *CreateOrgNotFound { - return &CreateOrgNotFound{} -} - -/* -CreateOrgNotFound describes a response with status code 404, with default header values. - -Not Found -*/ -type CreateOrgNotFound struct { - Payload *models.StderrErrResponse -} - -// IsSuccess returns true when this create org not found response has a 2xx status code -func (o *CreateOrgNotFound) IsSuccess() bool { - return false -} - -// IsRedirect returns true when this create org not found response has a 3xx status code -func (o *CreateOrgNotFound) IsRedirect() bool { - return false -} - -// IsClientError returns true when this create org not found response has a 4xx status code -func (o *CreateOrgNotFound) IsClientError() bool { - return true -} - -// IsServerError returns true when this create org not found response has a 5xx status code -func (o *CreateOrgNotFound) IsServerError() bool { - return false -} - -// IsCode returns true when this create org not found response a status code equal to that given -func (o *CreateOrgNotFound) IsCode(code int) bool { - return code == 404 -} - -// Code gets the status code for the create org not found response -func (o *CreateOrgNotFound) Code() int { - return 404 -} - -func (o *CreateOrgNotFound) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[POST /v1/orgs][%d] createOrgNotFound %s", 404, payload) -} - -func (o *CreateOrgNotFound) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[POST /v1/orgs][%d] createOrgNotFound %s", 404, payload) -} - -func (o *CreateOrgNotFound) GetPayload() *models.StderrErrResponse { - return o.Payload -} - -func (o *CreateOrgNotFound) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.StderrErrResponse) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewCreateOrgInternalServerError creates a CreateOrgInternalServerError with default headers values -func NewCreateOrgInternalServerError() *CreateOrgInternalServerError { - return &CreateOrgInternalServerError{} -} - -/* -CreateOrgInternalServerError describes a response with status code 500, with default header values. - -Internal Server Error -*/ -type CreateOrgInternalServerError struct { - Payload *models.StderrErrResponse -} - -// IsSuccess returns true when this create org internal server error response has a 2xx status code -func (o *CreateOrgInternalServerError) IsSuccess() bool { - return false -} - -// IsRedirect returns true when this create org internal server error response has a 3xx status code -func (o *CreateOrgInternalServerError) IsRedirect() bool { - return false -} - -// IsClientError returns true when this create org internal server error response has a 4xx status code -func (o *CreateOrgInternalServerError) IsClientError() bool { - return false -} - -// IsServerError returns true when this create org internal server error response has a 5xx status code -func (o *CreateOrgInternalServerError) IsServerError() bool { - return true -} - -// IsCode returns true when this create org internal server error response a status code equal to that given -func (o *CreateOrgInternalServerError) IsCode(code int) bool { - return code == 500 -} - -// Code gets the status code for the create org internal server error response -func (o *CreateOrgInternalServerError) Code() int { - return 500 -} - -func (o *CreateOrgInternalServerError) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[POST /v1/orgs][%d] createOrgInternalServerError %s", 500, payload) -} - -func (o *CreateOrgInternalServerError) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[POST /v1/orgs][%d] createOrgInternalServerError %s", 500, payload) -} - -func (o *CreateOrgInternalServerError) GetPayload() *models.StderrErrResponse { - return o.Payload -} - -func (o *CreateOrgInternalServerError) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.StderrErrResponse) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} diff --git a/client/operations/create_runner_job_execution_heart_beat_parameters.go b/client/operations/create_runner_job_execution_heart_beat_parameters.go deleted file mode 100644 index 0b0f4a4..0000000 --- a/client/operations/create_runner_job_execution_heart_beat_parameters.go +++ /dev/null @@ -1,197 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package operations - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "context" - "net/http" - "time" - - "github.com/go-openapi/errors" - "github.com/go-openapi/runtime" - cr "github.com/go-openapi/runtime/client" - "github.com/go-openapi/strfmt" - - "github.com/nuonco/nuon-runner-go/models" -) - -// NewCreateRunnerJobExecutionHeartBeatParams creates a new CreateRunnerJobExecutionHeartBeatParams object, -// with the default timeout for this client. -// -// Default values are not hydrated, since defaults are normally applied by the API server side. -// -// To enforce default values in parameter, use SetDefaults or WithDefaults. -func NewCreateRunnerJobExecutionHeartBeatParams() *CreateRunnerJobExecutionHeartBeatParams { - return &CreateRunnerJobExecutionHeartBeatParams{ - timeout: cr.DefaultTimeout, - } -} - -// NewCreateRunnerJobExecutionHeartBeatParamsWithTimeout creates a new CreateRunnerJobExecutionHeartBeatParams object -// with the ability to set a timeout on a request. -func NewCreateRunnerJobExecutionHeartBeatParamsWithTimeout(timeout time.Duration) *CreateRunnerJobExecutionHeartBeatParams { - return &CreateRunnerJobExecutionHeartBeatParams{ - timeout: timeout, - } -} - -// NewCreateRunnerJobExecutionHeartBeatParamsWithContext creates a new CreateRunnerJobExecutionHeartBeatParams object -// with the ability to set a context for a request. -func NewCreateRunnerJobExecutionHeartBeatParamsWithContext(ctx context.Context) *CreateRunnerJobExecutionHeartBeatParams { - return &CreateRunnerJobExecutionHeartBeatParams{ - Context: ctx, - } -} - -// NewCreateRunnerJobExecutionHeartBeatParamsWithHTTPClient creates a new CreateRunnerJobExecutionHeartBeatParams object -// with the ability to set a custom HTTPClient for a request. -func NewCreateRunnerJobExecutionHeartBeatParamsWithHTTPClient(client *http.Client) *CreateRunnerJobExecutionHeartBeatParams { - return &CreateRunnerJobExecutionHeartBeatParams{ - HTTPClient: client, - } -} - -/* -CreateRunnerJobExecutionHeartBeatParams contains all the parameters to send to the API endpoint - - for the create runner job execution heart beat operation. - - Typically these are written to a http.Request. -*/ -type CreateRunnerJobExecutionHeartBeatParams struct { - - /* Req. - - Input - */ - Req *models.ServiceCreateRunnerJobExecutionHeartBeatRequest - - /* RunnerJobExecutionID. - - runner job ID - */ - RunnerJobExecutionID string - - /* RunnerJobID. - - runner job ID - */ - RunnerJobID string - - timeout time.Duration - Context context.Context - HTTPClient *http.Client -} - -// WithDefaults hydrates default values in the create runner job execution heart beat params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *CreateRunnerJobExecutionHeartBeatParams) WithDefaults() *CreateRunnerJobExecutionHeartBeatParams { - o.SetDefaults() - return o -} - -// SetDefaults hydrates default values in the create runner job execution heart beat params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *CreateRunnerJobExecutionHeartBeatParams) SetDefaults() { - // no default values defined for this parameter -} - -// WithTimeout adds the timeout to the create runner job execution heart beat params -func (o *CreateRunnerJobExecutionHeartBeatParams) WithTimeout(timeout time.Duration) *CreateRunnerJobExecutionHeartBeatParams { - o.SetTimeout(timeout) - return o -} - -// SetTimeout adds the timeout to the create runner job execution heart beat params -func (o *CreateRunnerJobExecutionHeartBeatParams) SetTimeout(timeout time.Duration) { - o.timeout = timeout -} - -// WithContext adds the context to the create runner job execution heart beat params -func (o *CreateRunnerJobExecutionHeartBeatParams) WithContext(ctx context.Context) *CreateRunnerJobExecutionHeartBeatParams { - o.SetContext(ctx) - return o -} - -// SetContext adds the context to the create runner job execution heart beat params -func (o *CreateRunnerJobExecutionHeartBeatParams) SetContext(ctx context.Context) { - o.Context = ctx -} - -// WithHTTPClient adds the HTTPClient to the create runner job execution heart beat params -func (o *CreateRunnerJobExecutionHeartBeatParams) WithHTTPClient(client *http.Client) *CreateRunnerJobExecutionHeartBeatParams { - o.SetHTTPClient(client) - return o -} - -// SetHTTPClient adds the HTTPClient to the create runner job execution heart beat params -func (o *CreateRunnerJobExecutionHeartBeatParams) SetHTTPClient(client *http.Client) { - o.HTTPClient = client -} - -// WithReq adds the req to the create runner job execution heart beat params -func (o *CreateRunnerJobExecutionHeartBeatParams) WithReq(req *models.ServiceCreateRunnerJobExecutionHeartBeatRequest) *CreateRunnerJobExecutionHeartBeatParams { - o.SetReq(req) - return o -} - -// SetReq adds the req to the create runner job execution heart beat params -func (o *CreateRunnerJobExecutionHeartBeatParams) SetReq(req *models.ServiceCreateRunnerJobExecutionHeartBeatRequest) { - o.Req = req -} - -// WithRunnerJobExecutionID adds the runnerJobExecutionID to the create runner job execution heart beat params -func (o *CreateRunnerJobExecutionHeartBeatParams) WithRunnerJobExecutionID(runnerJobExecutionID string) *CreateRunnerJobExecutionHeartBeatParams { - o.SetRunnerJobExecutionID(runnerJobExecutionID) - return o -} - -// SetRunnerJobExecutionID adds the runnerJobExecutionId to the create runner job execution heart beat params -func (o *CreateRunnerJobExecutionHeartBeatParams) SetRunnerJobExecutionID(runnerJobExecutionID string) { - o.RunnerJobExecutionID = runnerJobExecutionID -} - -// WithRunnerJobID adds the runnerJobID to the create runner job execution heart beat params -func (o *CreateRunnerJobExecutionHeartBeatParams) WithRunnerJobID(runnerJobID string) *CreateRunnerJobExecutionHeartBeatParams { - o.SetRunnerJobID(runnerJobID) - return o -} - -// SetRunnerJobID adds the runnerJobId to the create runner job execution heart beat params -func (o *CreateRunnerJobExecutionHeartBeatParams) SetRunnerJobID(runnerJobID string) { - o.RunnerJobID = runnerJobID -} - -// WriteToRequest writes these params to a swagger request -func (o *CreateRunnerJobExecutionHeartBeatParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { - - if err := r.SetTimeout(o.timeout); err != nil { - return err - } - var res []error - if o.Req != nil { - if err := r.SetBodyParam(o.Req); err != nil { - return err - } - } - - // path param runner_job_execution_id - if err := r.SetPathParam("runner_job_execution_id", o.RunnerJobExecutionID); err != nil { - return err - } - - // path param runner_job_id - if err := r.SetPathParam("runner_job_id", o.RunnerJobID); err != nil { - return err - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} diff --git a/client/operations/create_runner_job_execution_heart_beat_responses.go b/client/operations/create_runner_job_execution_heart_beat_responses.go deleted file mode 100644 index 515bc50..0000000 --- a/client/operations/create_runner_job_execution_heart_beat_responses.go +++ /dev/null @@ -1,486 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package operations - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "encoding/json" - "fmt" - "io" - - "github.com/go-openapi/runtime" - "github.com/go-openapi/strfmt" - - "github.com/nuonco/nuon-runner-go/models" -) - -// CreateRunnerJobExecutionHeartBeatReader is a Reader for the CreateRunnerJobExecutionHeartBeat structure. -type CreateRunnerJobExecutionHeartBeatReader struct { - formats strfmt.Registry -} - -// ReadResponse reads a server response into the received o. -func (o *CreateRunnerJobExecutionHeartBeatReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { - switch response.Code() { - case 200: - result := NewCreateRunnerJobExecutionHeartBeatOK() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return result, nil - case 400: - result := NewCreateRunnerJobExecutionHeartBeatBadRequest() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return nil, result - case 401: - result := NewCreateRunnerJobExecutionHeartBeatUnauthorized() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return nil, result - case 403: - result := NewCreateRunnerJobExecutionHeartBeatForbidden() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return nil, result - case 404: - result := NewCreateRunnerJobExecutionHeartBeatNotFound() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return nil, result - case 500: - result := NewCreateRunnerJobExecutionHeartBeatInternalServerError() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return nil, result - default: - return nil, runtime.NewAPIError("[POST /v1/runner-job/{runner_job_id}/executions/{runner_job_execution_id}/heart-beats] CreateRunnerJobExecutionHeartBeat", response, response.Code()) - } -} - -// NewCreateRunnerJobExecutionHeartBeatOK creates a CreateRunnerJobExecutionHeartBeatOK with default headers values -func NewCreateRunnerJobExecutionHeartBeatOK() *CreateRunnerJobExecutionHeartBeatOK { - return &CreateRunnerJobExecutionHeartBeatOK{} -} - -/* -CreateRunnerJobExecutionHeartBeatOK describes a response with status code 200, with default header values. - -OK -*/ -type CreateRunnerJobExecutionHeartBeatOK struct { - Payload *models.AppRunnerJobExecutionHeartBeat -} - -// IsSuccess returns true when this create runner job execution heart beat o k response has a 2xx status code -func (o *CreateRunnerJobExecutionHeartBeatOK) IsSuccess() bool { - return true -} - -// IsRedirect returns true when this create runner job execution heart beat o k response has a 3xx status code -func (o *CreateRunnerJobExecutionHeartBeatOK) IsRedirect() bool { - return false -} - -// IsClientError returns true when this create runner job execution heart beat o k response has a 4xx status code -func (o *CreateRunnerJobExecutionHeartBeatOK) IsClientError() bool { - return false -} - -// IsServerError returns true when this create runner job execution heart beat o k response has a 5xx status code -func (o *CreateRunnerJobExecutionHeartBeatOK) IsServerError() bool { - return false -} - -// IsCode returns true when this create runner job execution heart beat o k response a status code equal to that given -func (o *CreateRunnerJobExecutionHeartBeatOK) IsCode(code int) bool { - return code == 200 -} - -// Code gets the status code for the create runner job execution heart beat o k response -func (o *CreateRunnerJobExecutionHeartBeatOK) Code() int { - return 200 -} - -func (o *CreateRunnerJobExecutionHeartBeatOK) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[POST /v1/runner-job/{runner_job_id}/executions/{runner_job_execution_id}/heart-beats][%d] createRunnerJobExecutionHeartBeatOK %s", 200, payload) -} - -func (o *CreateRunnerJobExecutionHeartBeatOK) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[POST /v1/runner-job/{runner_job_id}/executions/{runner_job_execution_id}/heart-beats][%d] createRunnerJobExecutionHeartBeatOK %s", 200, payload) -} - -func (o *CreateRunnerJobExecutionHeartBeatOK) GetPayload() *models.AppRunnerJobExecutionHeartBeat { - return o.Payload -} - -func (o *CreateRunnerJobExecutionHeartBeatOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.AppRunnerJobExecutionHeartBeat) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewCreateRunnerJobExecutionHeartBeatBadRequest creates a CreateRunnerJobExecutionHeartBeatBadRequest with default headers values -func NewCreateRunnerJobExecutionHeartBeatBadRequest() *CreateRunnerJobExecutionHeartBeatBadRequest { - return &CreateRunnerJobExecutionHeartBeatBadRequest{} -} - -/* -CreateRunnerJobExecutionHeartBeatBadRequest describes a response with status code 400, with default header values. - -Bad Request -*/ -type CreateRunnerJobExecutionHeartBeatBadRequest struct { - Payload *models.StderrErrResponse -} - -// IsSuccess returns true when this create runner job execution heart beat bad request response has a 2xx status code -func (o *CreateRunnerJobExecutionHeartBeatBadRequest) IsSuccess() bool { - return false -} - -// IsRedirect returns true when this create runner job execution heart beat bad request response has a 3xx status code -func (o *CreateRunnerJobExecutionHeartBeatBadRequest) IsRedirect() bool { - return false -} - -// IsClientError returns true when this create runner job execution heart beat bad request response has a 4xx status code -func (o *CreateRunnerJobExecutionHeartBeatBadRequest) IsClientError() bool { - return true -} - -// IsServerError returns true when this create runner job execution heart beat bad request response has a 5xx status code -func (o *CreateRunnerJobExecutionHeartBeatBadRequest) IsServerError() bool { - return false -} - -// IsCode returns true when this create runner job execution heart beat bad request response a status code equal to that given -func (o *CreateRunnerJobExecutionHeartBeatBadRequest) IsCode(code int) bool { - return code == 400 -} - -// Code gets the status code for the create runner job execution heart beat bad request response -func (o *CreateRunnerJobExecutionHeartBeatBadRequest) Code() int { - return 400 -} - -func (o *CreateRunnerJobExecutionHeartBeatBadRequest) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[POST /v1/runner-job/{runner_job_id}/executions/{runner_job_execution_id}/heart-beats][%d] createRunnerJobExecutionHeartBeatBadRequest %s", 400, payload) -} - -func (o *CreateRunnerJobExecutionHeartBeatBadRequest) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[POST /v1/runner-job/{runner_job_id}/executions/{runner_job_execution_id}/heart-beats][%d] createRunnerJobExecutionHeartBeatBadRequest %s", 400, payload) -} - -func (o *CreateRunnerJobExecutionHeartBeatBadRequest) GetPayload() *models.StderrErrResponse { - return o.Payload -} - -func (o *CreateRunnerJobExecutionHeartBeatBadRequest) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.StderrErrResponse) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewCreateRunnerJobExecutionHeartBeatUnauthorized creates a CreateRunnerJobExecutionHeartBeatUnauthorized with default headers values -func NewCreateRunnerJobExecutionHeartBeatUnauthorized() *CreateRunnerJobExecutionHeartBeatUnauthorized { - return &CreateRunnerJobExecutionHeartBeatUnauthorized{} -} - -/* -CreateRunnerJobExecutionHeartBeatUnauthorized describes a response with status code 401, with default header values. - -Unauthorized -*/ -type CreateRunnerJobExecutionHeartBeatUnauthorized struct { - Payload *models.StderrErrResponse -} - -// IsSuccess returns true when this create runner job execution heart beat unauthorized response has a 2xx status code -func (o *CreateRunnerJobExecutionHeartBeatUnauthorized) IsSuccess() bool { - return false -} - -// IsRedirect returns true when this create runner job execution heart beat unauthorized response has a 3xx status code -func (o *CreateRunnerJobExecutionHeartBeatUnauthorized) IsRedirect() bool { - return false -} - -// IsClientError returns true when this create runner job execution heart beat unauthorized response has a 4xx status code -func (o *CreateRunnerJobExecutionHeartBeatUnauthorized) IsClientError() bool { - return true -} - -// IsServerError returns true when this create runner job execution heart beat unauthorized response has a 5xx status code -func (o *CreateRunnerJobExecutionHeartBeatUnauthorized) IsServerError() bool { - return false -} - -// IsCode returns true when this create runner job execution heart beat unauthorized response a status code equal to that given -func (o *CreateRunnerJobExecutionHeartBeatUnauthorized) IsCode(code int) bool { - return code == 401 -} - -// Code gets the status code for the create runner job execution heart beat unauthorized response -func (o *CreateRunnerJobExecutionHeartBeatUnauthorized) Code() int { - return 401 -} - -func (o *CreateRunnerJobExecutionHeartBeatUnauthorized) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[POST /v1/runner-job/{runner_job_id}/executions/{runner_job_execution_id}/heart-beats][%d] createRunnerJobExecutionHeartBeatUnauthorized %s", 401, payload) -} - -func (o *CreateRunnerJobExecutionHeartBeatUnauthorized) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[POST /v1/runner-job/{runner_job_id}/executions/{runner_job_execution_id}/heart-beats][%d] createRunnerJobExecutionHeartBeatUnauthorized %s", 401, payload) -} - -func (o *CreateRunnerJobExecutionHeartBeatUnauthorized) GetPayload() *models.StderrErrResponse { - return o.Payload -} - -func (o *CreateRunnerJobExecutionHeartBeatUnauthorized) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.StderrErrResponse) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewCreateRunnerJobExecutionHeartBeatForbidden creates a CreateRunnerJobExecutionHeartBeatForbidden with default headers values -func NewCreateRunnerJobExecutionHeartBeatForbidden() *CreateRunnerJobExecutionHeartBeatForbidden { - return &CreateRunnerJobExecutionHeartBeatForbidden{} -} - -/* -CreateRunnerJobExecutionHeartBeatForbidden describes a response with status code 403, with default header values. - -Forbidden -*/ -type CreateRunnerJobExecutionHeartBeatForbidden struct { - Payload *models.StderrErrResponse -} - -// IsSuccess returns true when this create runner job execution heart beat forbidden response has a 2xx status code -func (o *CreateRunnerJobExecutionHeartBeatForbidden) IsSuccess() bool { - return false -} - -// IsRedirect returns true when this create runner job execution heart beat forbidden response has a 3xx status code -func (o *CreateRunnerJobExecutionHeartBeatForbidden) IsRedirect() bool { - return false -} - -// IsClientError returns true when this create runner job execution heart beat forbidden response has a 4xx status code -func (o *CreateRunnerJobExecutionHeartBeatForbidden) IsClientError() bool { - return true -} - -// IsServerError returns true when this create runner job execution heart beat forbidden response has a 5xx status code -func (o *CreateRunnerJobExecutionHeartBeatForbidden) IsServerError() bool { - return false -} - -// IsCode returns true when this create runner job execution heart beat forbidden response a status code equal to that given -func (o *CreateRunnerJobExecutionHeartBeatForbidden) IsCode(code int) bool { - return code == 403 -} - -// Code gets the status code for the create runner job execution heart beat forbidden response -func (o *CreateRunnerJobExecutionHeartBeatForbidden) Code() int { - return 403 -} - -func (o *CreateRunnerJobExecutionHeartBeatForbidden) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[POST /v1/runner-job/{runner_job_id}/executions/{runner_job_execution_id}/heart-beats][%d] createRunnerJobExecutionHeartBeatForbidden %s", 403, payload) -} - -func (o *CreateRunnerJobExecutionHeartBeatForbidden) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[POST /v1/runner-job/{runner_job_id}/executions/{runner_job_execution_id}/heart-beats][%d] createRunnerJobExecutionHeartBeatForbidden %s", 403, payload) -} - -func (o *CreateRunnerJobExecutionHeartBeatForbidden) GetPayload() *models.StderrErrResponse { - return o.Payload -} - -func (o *CreateRunnerJobExecutionHeartBeatForbidden) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.StderrErrResponse) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewCreateRunnerJobExecutionHeartBeatNotFound creates a CreateRunnerJobExecutionHeartBeatNotFound with default headers values -func NewCreateRunnerJobExecutionHeartBeatNotFound() *CreateRunnerJobExecutionHeartBeatNotFound { - return &CreateRunnerJobExecutionHeartBeatNotFound{} -} - -/* -CreateRunnerJobExecutionHeartBeatNotFound describes a response with status code 404, with default header values. - -Not Found -*/ -type CreateRunnerJobExecutionHeartBeatNotFound struct { - Payload *models.StderrErrResponse -} - -// IsSuccess returns true when this create runner job execution heart beat not found response has a 2xx status code -func (o *CreateRunnerJobExecutionHeartBeatNotFound) IsSuccess() bool { - return false -} - -// IsRedirect returns true when this create runner job execution heart beat not found response has a 3xx status code -func (o *CreateRunnerJobExecutionHeartBeatNotFound) IsRedirect() bool { - return false -} - -// IsClientError returns true when this create runner job execution heart beat not found response has a 4xx status code -func (o *CreateRunnerJobExecutionHeartBeatNotFound) IsClientError() bool { - return true -} - -// IsServerError returns true when this create runner job execution heart beat not found response has a 5xx status code -func (o *CreateRunnerJobExecutionHeartBeatNotFound) IsServerError() bool { - return false -} - -// IsCode returns true when this create runner job execution heart beat not found response a status code equal to that given -func (o *CreateRunnerJobExecutionHeartBeatNotFound) IsCode(code int) bool { - return code == 404 -} - -// Code gets the status code for the create runner job execution heart beat not found response -func (o *CreateRunnerJobExecutionHeartBeatNotFound) Code() int { - return 404 -} - -func (o *CreateRunnerJobExecutionHeartBeatNotFound) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[POST /v1/runner-job/{runner_job_id}/executions/{runner_job_execution_id}/heart-beats][%d] createRunnerJobExecutionHeartBeatNotFound %s", 404, payload) -} - -func (o *CreateRunnerJobExecutionHeartBeatNotFound) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[POST /v1/runner-job/{runner_job_id}/executions/{runner_job_execution_id}/heart-beats][%d] createRunnerJobExecutionHeartBeatNotFound %s", 404, payload) -} - -func (o *CreateRunnerJobExecutionHeartBeatNotFound) GetPayload() *models.StderrErrResponse { - return o.Payload -} - -func (o *CreateRunnerJobExecutionHeartBeatNotFound) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.StderrErrResponse) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewCreateRunnerJobExecutionHeartBeatInternalServerError creates a CreateRunnerJobExecutionHeartBeatInternalServerError with default headers values -func NewCreateRunnerJobExecutionHeartBeatInternalServerError() *CreateRunnerJobExecutionHeartBeatInternalServerError { - return &CreateRunnerJobExecutionHeartBeatInternalServerError{} -} - -/* -CreateRunnerJobExecutionHeartBeatInternalServerError describes a response with status code 500, with default header values. - -Internal Server Error -*/ -type CreateRunnerJobExecutionHeartBeatInternalServerError struct { - Payload *models.StderrErrResponse -} - -// IsSuccess returns true when this create runner job execution heart beat internal server error response has a 2xx status code -func (o *CreateRunnerJobExecutionHeartBeatInternalServerError) IsSuccess() bool { - return false -} - -// IsRedirect returns true when this create runner job execution heart beat internal server error response has a 3xx status code -func (o *CreateRunnerJobExecutionHeartBeatInternalServerError) IsRedirect() bool { - return false -} - -// IsClientError returns true when this create runner job execution heart beat internal server error response has a 4xx status code -func (o *CreateRunnerJobExecutionHeartBeatInternalServerError) IsClientError() bool { - return false -} - -// IsServerError returns true when this create runner job execution heart beat internal server error response has a 5xx status code -func (o *CreateRunnerJobExecutionHeartBeatInternalServerError) IsServerError() bool { - return true -} - -// IsCode returns true when this create runner job execution heart beat internal server error response a status code equal to that given -func (o *CreateRunnerJobExecutionHeartBeatInternalServerError) IsCode(code int) bool { - return code == 500 -} - -// Code gets the status code for the create runner job execution heart beat internal server error response -func (o *CreateRunnerJobExecutionHeartBeatInternalServerError) Code() int { - return 500 -} - -func (o *CreateRunnerJobExecutionHeartBeatInternalServerError) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[POST /v1/runner-job/{runner_job_id}/executions/{runner_job_execution_id}/heart-beats][%d] createRunnerJobExecutionHeartBeatInternalServerError %s", 500, payload) -} - -func (o *CreateRunnerJobExecutionHeartBeatInternalServerError) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[POST /v1/runner-job/{runner_job_id}/executions/{runner_job_execution_id}/heart-beats][%d] createRunnerJobExecutionHeartBeatInternalServerError %s", 500, payload) -} - -func (o *CreateRunnerJobExecutionHeartBeatInternalServerError) GetPayload() *models.StderrErrResponse { - return o.Payload -} - -func (o *CreateRunnerJobExecutionHeartBeatInternalServerError) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.StderrErrResponse) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} diff --git a/client/operations/create_terraform_module_component_config_parameters.go b/client/operations/create_terraform_module_component_config_parameters.go deleted file mode 100644 index 3ec6222..0000000 --- a/client/operations/create_terraform_module_component_config_parameters.go +++ /dev/null @@ -1,175 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package operations - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "context" - "net/http" - "time" - - "github.com/go-openapi/errors" - "github.com/go-openapi/runtime" - cr "github.com/go-openapi/runtime/client" - "github.com/go-openapi/strfmt" - - "github.com/nuonco/nuon-go/models" -) - -// NewCreateTerraformModuleComponentConfigParams creates a new CreateTerraformModuleComponentConfigParams object, -// with the default timeout for this client. -// -// Default values are not hydrated, since defaults are normally applied by the API server side. -// -// To enforce default values in parameter, use SetDefaults or WithDefaults. -func NewCreateTerraformModuleComponentConfigParams() *CreateTerraformModuleComponentConfigParams { - return &CreateTerraformModuleComponentConfigParams{ - timeout: cr.DefaultTimeout, - } -} - -// NewCreateTerraformModuleComponentConfigParamsWithTimeout creates a new CreateTerraformModuleComponentConfigParams object -// with the ability to set a timeout on a request. -func NewCreateTerraformModuleComponentConfigParamsWithTimeout(timeout time.Duration) *CreateTerraformModuleComponentConfigParams { - return &CreateTerraformModuleComponentConfigParams{ - timeout: timeout, - } -} - -// NewCreateTerraformModuleComponentConfigParamsWithContext creates a new CreateTerraformModuleComponentConfigParams object -// with the ability to set a context for a request. -func NewCreateTerraformModuleComponentConfigParamsWithContext(ctx context.Context) *CreateTerraformModuleComponentConfigParams { - return &CreateTerraformModuleComponentConfigParams{ - Context: ctx, - } -} - -// NewCreateTerraformModuleComponentConfigParamsWithHTTPClient creates a new CreateTerraformModuleComponentConfigParams object -// with the ability to set a custom HTTPClient for a request. -func NewCreateTerraformModuleComponentConfigParamsWithHTTPClient(client *http.Client) *CreateTerraformModuleComponentConfigParams { - return &CreateTerraformModuleComponentConfigParams{ - HTTPClient: client, - } -} - -/* -CreateTerraformModuleComponentConfigParams contains all the parameters to send to the API endpoint - - for the create terraform module component config operation. - - Typically these are written to a http.Request. -*/ -type CreateTerraformModuleComponentConfigParams struct { - - /* ComponentID. - - component ID - */ - ComponentID string - - /* Req. - - Input - */ - Req *models.ServiceCreateTerraformModuleComponentConfigRequest - - timeout time.Duration - Context context.Context - HTTPClient *http.Client -} - -// WithDefaults hydrates default values in the create terraform module component config params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *CreateTerraformModuleComponentConfigParams) WithDefaults() *CreateTerraformModuleComponentConfigParams { - o.SetDefaults() - return o -} - -// SetDefaults hydrates default values in the create terraform module component config params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *CreateTerraformModuleComponentConfigParams) SetDefaults() { - // no default values defined for this parameter -} - -// WithTimeout adds the timeout to the create terraform module component config params -func (o *CreateTerraformModuleComponentConfigParams) WithTimeout(timeout time.Duration) *CreateTerraformModuleComponentConfigParams { - o.SetTimeout(timeout) - return o -} - -// SetTimeout adds the timeout to the create terraform module component config params -func (o *CreateTerraformModuleComponentConfigParams) SetTimeout(timeout time.Duration) { - o.timeout = timeout -} - -// WithContext adds the context to the create terraform module component config params -func (o *CreateTerraformModuleComponentConfigParams) WithContext(ctx context.Context) *CreateTerraformModuleComponentConfigParams { - o.SetContext(ctx) - return o -} - -// SetContext adds the context to the create terraform module component config params -func (o *CreateTerraformModuleComponentConfigParams) SetContext(ctx context.Context) { - o.Context = ctx -} - -// WithHTTPClient adds the HTTPClient to the create terraform module component config params -func (o *CreateTerraformModuleComponentConfigParams) WithHTTPClient(client *http.Client) *CreateTerraformModuleComponentConfigParams { - o.SetHTTPClient(client) - return o -} - -// SetHTTPClient adds the HTTPClient to the create terraform module component config params -func (o *CreateTerraformModuleComponentConfigParams) SetHTTPClient(client *http.Client) { - o.HTTPClient = client -} - -// WithComponentID adds the componentID to the create terraform module component config params -func (o *CreateTerraformModuleComponentConfigParams) WithComponentID(componentID string) *CreateTerraformModuleComponentConfigParams { - o.SetComponentID(componentID) - return o -} - -// SetComponentID adds the componentId to the create terraform module component config params -func (o *CreateTerraformModuleComponentConfigParams) SetComponentID(componentID string) { - o.ComponentID = componentID -} - -// WithReq adds the req to the create terraform module component config params -func (o *CreateTerraformModuleComponentConfigParams) WithReq(req *models.ServiceCreateTerraformModuleComponentConfigRequest) *CreateTerraformModuleComponentConfigParams { - o.SetReq(req) - return o -} - -// SetReq adds the req to the create terraform module component config params -func (o *CreateTerraformModuleComponentConfigParams) SetReq(req *models.ServiceCreateTerraformModuleComponentConfigRequest) { - o.Req = req -} - -// WriteToRequest writes these params to a swagger request -func (o *CreateTerraformModuleComponentConfigParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { - - if err := r.SetTimeout(o.timeout); err != nil { - return err - } - var res []error - - // path param component_id - if err := r.SetPathParam("component_id", o.ComponentID); err != nil { - return err - } - if o.Req != nil { - if err := r.SetBodyParam(o.Req); err != nil { - return err - } - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} diff --git a/client/operations/create_terraform_module_component_config_responses.go b/client/operations/create_terraform_module_component_config_responses.go deleted file mode 100644 index f10cbb2..0000000 --- a/client/operations/create_terraform_module_component_config_responses.go +++ /dev/null @@ -1,486 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package operations - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "encoding/json" - "fmt" - "io" - - "github.com/go-openapi/runtime" - "github.com/go-openapi/strfmt" - - "github.com/nuonco/nuon-go/models" -) - -// CreateTerraformModuleComponentConfigReader is a Reader for the CreateTerraformModuleComponentConfig structure. -type CreateTerraformModuleComponentConfigReader struct { - formats strfmt.Registry -} - -// ReadResponse reads a server response into the received o. -func (o *CreateTerraformModuleComponentConfigReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { - switch response.Code() { - case 201: - result := NewCreateTerraformModuleComponentConfigCreated() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return result, nil - case 400: - result := NewCreateTerraformModuleComponentConfigBadRequest() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return nil, result - case 401: - result := NewCreateTerraformModuleComponentConfigUnauthorized() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return nil, result - case 403: - result := NewCreateTerraformModuleComponentConfigForbidden() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return nil, result - case 404: - result := NewCreateTerraformModuleComponentConfigNotFound() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return nil, result - case 500: - result := NewCreateTerraformModuleComponentConfigInternalServerError() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return nil, result - default: - return nil, runtime.NewAPIError("[POST /v1/components/{component_id}/configs/terraform-module] CreateTerraformModuleComponentConfig", response, response.Code()) - } -} - -// NewCreateTerraformModuleComponentConfigCreated creates a CreateTerraformModuleComponentConfigCreated with default headers values -func NewCreateTerraformModuleComponentConfigCreated() *CreateTerraformModuleComponentConfigCreated { - return &CreateTerraformModuleComponentConfigCreated{} -} - -/* -CreateTerraformModuleComponentConfigCreated describes a response with status code 201, with default header values. - -Created -*/ -type CreateTerraformModuleComponentConfigCreated struct { - Payload *models.AppTerraformModuleComponentConfig -} - -// IsSuccess returns true when this create terraform module component config created response has a 2xx status code -func (o *CreateTerraformModuleComponentConfigCreated) IsSuccess() bool { - return true -} - -// IsRedirect returns true when this create terraform module component config created response has a 3xx status code -func (o *CreateTerraformModuleComponentConfigCreated) IsRedirect() bool { - return false -} - -// IsClientError returns true when this create terraform module component config created response has a 4xx status code -func (o *CreateTerraformModuleComponentConfigCreated) IsClientError() bool { - return false -} - -// IsServerError returns true when this create terraform module component config created response has a 5xx status code -func (o *CreateTerraformModuleComponentConfigCreated) IsServerError() bool { - return false -} - -// IsCode returns true when this create terraform module component config created response a status code equal to that given -func (o *CreateTerraformModuleComponentConfigCreated) IsCode(code int) bool { - return code == 201 -} - -// Code gets the status code for the create terraform module component config created response -func (o *CreateTerraformModuleComponentConfigCreated) Code() int { - return 201 -} - -func (o *CreateTerraformModuleComponentConfigCreated) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[POST /v1/components/{component_id}/configs/terraform-module][%d] createTerraformModuleComponentConfigCreated %s", 201, payload) -} - -func (o *CreateTerraformModuleComponentConfigCreated) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[POST /v1/components/{component_id}/configs/terraform-module][%d] createTerraformModuleComponentConfigCreated %s", 201, payload) -} - -func (o *CreateTerraformModuleComponentConfigCreated) GetPayload() *models.AppTerraformModuleComponentConfig { - return o.Payload -} - -func (o *CreateTerraformModuleComponentConfigCreated) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.AppTerraformModuleComponentConfig) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewCreateTerraformModuleComponentConfigBadRequest creates a CreateTerraformModuleComponentConfigBadRequest with default headers values -func NewCreateTerraformModuleComponentConfigBadRequest() *CreateTerraformModuleComponentConfigBadRequest { - return &CreateTerraformModuleComponentConfigBadRequest{} -} - -/* -CreateTerraformModuleComponentConfigBadRequest describes a response with status code 400, with default header values. - -Bad Request -*/ -type CreateTerraformModuleComponentConfigBadRequest struct { - Payload *models.StderrErrResponse -} - -// IsSuccess returns true when this create terraform module component config bad request response has a 2xx status code -func (o *CreateTerraformModuleComponentConfigBadRequest) IsSuccess() bool { - return false -} - -// IsRedirect returns true when this create terraform module component config bad request response has a 3xx status code -func (o *CreateTerraformModuleComponentConfigBadRequest) IsRedirect() bool { - return false -} - -// IsClientError returns true when this create terraform module component config bad request response has a 4xx status code -func (o *CreateTerraformModuleComponentConfigBadRequest) IsClientError() bool { - return true -} - -// IsServerError returns true when this create terraform module component config bad request response has a 5xx status code -func (o *CreateTerraformModuleComponentConfigBadRequest) IsServerError() bool { - return false -} - -// IsCode returns true when this create terraform module component config bad request response a status code equal to that given -func (o *CreateTerraformModuleComponentConfigBadRequest) IsCode(code int) bool { - return code == 400 -} - -// Code gets the status code for the create terraform module component config bad request response -func (o *CreateTerraformModuleComponentConfigBadRequest) Code() int { - return 400 -} - -func (o *CreateTerraformModuleComponentConfigBadRequest) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[POST /v1/components/{component_id}/configs/terraform-module][%d] createTerraformModuleComponentConfigBadRequest %s", 400, payload) -} - -func (o *CreateTerraformModuleComponentConfigBadRequest) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[POST /v1/components/{component_id}/configs/terraform-module][%d] createTerraformModuleComponentConfigBadRequest %s", 400, payload) -} - -func (o *CreateTerraformModuleComponentConfigBadRequest) GetPayload() *models.StderrErrResponse { - return o.Payload -} - -func (o *CreateTerraformModuleComponentConfigBadRequest) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.StderrErrResponse) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewCreateTerraformModuleComponentConfigUnauthorized creates a CreateTerraformModuleComponentConfigUnauthorized with default headers values -func NewCreateTerraformModuleComponentConfigUnauthorized() *CreateTerraformModuleComponentConfigUnauthorized { - return &CreateTerraformModuleComponentConfigUnauthorized{} -} - -/* -CreateTerraformModuleComponentConfigUnauthorized describes a response with status code 401, with default header values. - -Unauthorized -*/ -type CreateTerraformModuleComponentConfigUnauthorized struct { - Payload *models.StderrErrResponse -} - -// IsSuccess returns true when this create terraform module component config unauthorized response has a 2xx status code -func (o *CreateTerraformModuleComponentConfigUnauthorized) IsSuccess() bool { - return false -} - -// IsRedirect returns true when this create terraform module component config unauthorized response has a 3xx status code -func (o *CreateTerraformModuleComponentConfigUnauthorized) IsRedirect() bool { - return false -} - -// IsClientError returns true when this create terraform module component config unauthorized response has a 4xx status code -func (o *CreateTerraformModuleComponentConfigUnauthorized) IsClientError() bool { - return true -} - -// IsServerError returns true when this create terraform module component config unauthorized response has a 5xx status code -func (o *CreateTerraformModuleComponentConfigUnauthorized) IsServerError() bool { - return false -} - -// IsCode returns true when this create terraform module component config unauthorized response a status code equal to that given -func (o *CreateTerraformModuleComponentConfigUnauthorized) IsCode(code int) bool { - return code == 401 -} - -// Code gets the status code for the create terraform module component config unauthorized response -func (o *CreateTerraformModuleComponentConfigUnauthorized) Code() int { - return 401 -} - -func (o *CreateTerraformModuleComponentConfigUnauthorized) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[POST /v1/components/{component_id}/configs/terraform-module][%d] createTerraformModuleComponentConfigUnauthorized %s", 401, payload) -} - -func (o *CreateTerraformModuleComponentConfigUnauthorized) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[POST /v1/components/{component_id}/configs/terraform-module][%d] createTerraformModuleComponentConfigUnauthorized %s", 401, payload) -} - -func (o *CreateTerraformModuleComponentConfigUnauthorized) GetPayload() *models.StderrErrResponse { - return o.Payload -} - -func (o *CreateTerraformModuleComponentConfigUnauthorized) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.StderrErrResponse) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewCreateTerraformModuleComponentConfigForbidden creates a CreateTerraformModuleComponentConfigForbidden with default headers values -func NewCreateTerraformModuleComponentConfigForbidden() *CreateTerraformModuleComponentConfigForbidden { - return &CreateTerraformModuleComponentConfigForbidden{} -} - -/* -CreateTerraformModuleComponentConfigForbidden describes a response with status code 403, with default header values. - -Forbidden -*/ -type CreateTerraformModuleComponentConfigForbidden struct { - Payload *models.StderrErrResponse -} - -// IsSuccess returns true when this create terraform module component config forbidden response has a 2xx status code -func (o *CreateTerraformModuleComponentConfigForbidden) IsSuccess() bool { - return false -} - -// IsRedirect returns true when this create terraform module component config forbidden response has a 3xx status code -func (o *CreateTerraformModuleComponentConfigForbidden) IsRedirect() bool { - return false -} - -// IsClientError returns true when this create terraform module component config forbidden response has a 4xx status code -func (o *CreateTerraformModuleComponentConfigForbidden) IsClientError() bool { - return true -} - -// IsServerError returns true when this create terraform module component config forbidden response has a 5xx status code -func (o *CreateTerraformModuleComponentConfigForbidden) IsServerError() bool { - return false -} - -// IsCode returns true when this create terraform module component config forbidden response a status code equal to that given -func (o *CreateTerraformModuleComponentConfigForbidden) IsCode(code int) bool { - return code == 403 -} - -// Code gets the status code for the create terraform module component config forbidden response -func (o *CreateTerraformModuleComponentConfigForbidden) Code() int { - return 403 -} - -func (o *CreateTerraformModuleComponentConfigForbidden) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[POST /v1/components/{component_id}/configs/terraform-module][%d] createTerraformModuleComponentConfigForbidden %s", 403, payload) -} - -func (o *CreateTerraformModuleComponentConfigForbidden) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[POST /v1/components/{component_id}/configs/terraform-module][%d] createTerraformModuleComponentConfigForbidden %s", 403, payload) -} - -func (o *CreateTerraformModuleComponentConfigForbidden) GetPayload() *models.StderrErrResponse { - return o.Payload -} - -func (o *CreateTerraformModuleComponentConfigForbidden) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.StderrErrResponse) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewCreateTerraformModuleComponentConfigNotFound creates a CreateTerraformModuleComponentConfigNotFound with default headers values -func NewCreateTerraformModuleComponentConfigNotFound() *CreateTerraformModuleComponentConfigNotFound { - return &CreateTerraformModuleComponentConfigNotFound{} -} - -/* -CreateTerraformModuleComponentConfigNotFound describes a response with status code 404, with default header values. - -Not Found -*/ -type CreateTerraformModuleComponentConfigNotFound struct { - Payload *models.StderrErrResponse -} - -// IsSuccess returns true when this create terraform module component config not found response has a 2xx status code -func (o *CreateTerraformModuleComponentConfigNotFound) IsSuccess() bool { - return false -} - -// IsRedirect returns true when this create terraform module component config not found response has a 3xx status code -func (o *CreateTerraformModuleComponentConfigNotFound) IsRedirect() bool { - return false -} - -// IsClientError returns true when this create terraform module component config not found response has a 4xx status code -func (o *CreateTerraformModuleComponentConfigNotFound) IsClientError() bool { - return true -} - -// IsServerError returns true when this create terraform module component config not found response has a 5xx status code -func (o *CreateTerraformModuleComponentConfigNotFound) IsServerError() bool { - return false -} - -// IsCode returns true when this create terraform module component config not found response a status code equal to that given -func (o *CreateTerraformModuleComponentConfigNotFound) IsCode(code int) bool { - return code == 404 -} - -// Code gets the status code for the create terraform module component config not found response -func (o *CreateTerraformModuleComponentConfigNotFound) Code() int { - return 404 -} - -func (o *CreateTerraformModuleComponentConfigNotFound) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[POST /v1/components/{component_id}/configs/terraform-module][%d] createTerraformModuleComponentConfigNotFound %s", 404, payload) -} - -func (o *CreateTerraformModuleComponentConfigNotFound) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[POST /v1/components/{component_id}/configs/terraform-module][%d] createTerraformModuleComponentConfigNotFound %s", 404, payload) -} - -func (o *CreateTerraformModuleComponentConfigNotFound) GetPayload() *models.StderrErrResponse { - return o.Payload -} - -func (o *CreateTerraformModuleComponentConfigNotFound) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.StderrErrResponse) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewCreateTerraformModuleComponentConfigInternalServerError creates a CreateTerraformModuleComponentConfigInternalServerError with default headers values -func NewCreateTerraformModuleComponentConfigInternalServerError() *CreateTerraformModuleComponentConfigInternalServerError { - return &CreateTerraformModuleComponentConfigInternalServerError{} -} - -/* -CreateTerraformModuleComponentConfigInternalServerError describes a response with status code 500, with default header values. - -Internal Server Error -*/ -type CreateTerraformModuleComponentConfigInternalServerError struct { - Payload *models.StderrErrResponse -} - -// IsSuccess returns true when this create terraform module component config internal server error response has a 2xx status code -func (o *CreateTerraformModuleComponentConfigInternalServerError) IsSuccess() bool { - return false -} - -// IsRedirect returns true when this create terraform module component config internal server error response has a 3xx status code -func (o *CreateTerraformModuleComponentConfigInternalServerError) IsRedirect() bool { - return false -} - -// IsClientError returns true when this create terraform module component config internal server error response has a 4xx status code -func (o *CreateTerraformModuleComponentConfigInternalServerError) IsClientError() bool { - return false -} - -// IsServerError returns true when this create terraform module component config internal server error response has a 5xx status code -func (o *CreateTerraformModuleComponentConfigInternalServerError) IsServerError() bool { - return true -} - -// IsCode returns true when this create terraform module component config internal server error response a status code equal to that given -func (o *CreateTerraformModuleComponentConfigInternalServerError) IsCode(code int) bool { - return code == 500 -} - -// Code gets the status code for the create terraform module component config internal server error response -func (o *CreateTerraformModuleComponentConfigInternalServerError) Code() int { - return 500 -} - -func (o *CreateTerraformModuleComponentConfigInternalServerError) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[POST /v1/components/{component_id}/configs/terraform-module][%d] createTerraformModuleComponentConfigInternalServerError %s", 500, payload) -} - -func (o *CreateTerraformModuleComponentConfigInternalServerError) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[POST /v1/components/{component_id}/configs/terraform-module][%d] createTerraformModuleComponentConfigInternalServerError %s", 500, payload) -} - -func (o *CreateTerraformModuleComponentConfigInternalServerError) GetPayload() *models.StderrErrResponse { - return o.Payload -} - -func (o *CreateTerraformModuleComponentConfigInternalServerError) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.StderrErrResponse) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} diff --git a/client/operations/create_v_c_s_connection_callback_parameters.go b/client/operations/create_v_c_s_connection_callback_parameters.go deleted file mode 100644 index 2d60df3..0000000 --- a/client/operations/create_v_c_s_connection_callback_parameters.go +++ /dev/null @@ -1,153 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package operations - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "context" - "net/http" - "time" - - "github.com/go-openapi/errors" - "github.com/go-openapi/runtime" - cr "github.com/go-openapi/runtime/client" - "github.com/go-openapi/strfmt" - - "github.com/nuonco/nuon-go/models" -) - -// NewCreateVCSConnectionCallbackParams creates a new CreateVCSConnectionCallbackParams object, -// with the default timeout for this client. -// -// Default values are not hydrated, since defaults are normally applied by the API server side. -// -// To enforce default values in parameter, use SetDefaults or WithDefaults. -func NewCreateVCSConnectionCallbackParams() *CreateVCSConnectionCallbackParams { - return &CreateVCSConnectionCallbackParams{ - timeout: cr.DefaultTimeout, - } -} - -// NewCreateVCSConnectionCallbackParamsWithTimeout creates a new CreateVCSConnectionCallbackParams object -// with the ability to set a timeout on a request. -func NewCreateVCSConnectionCallbackParamsWithTimeout(timeout time.Duration) *CreateVCSConnectionCallbackParams { - return &CreateVCSConnectionCallbackParams{ - timeout: timeout, - } -} - -// NewCreateVCSConnectionCallbackParamsWithContext creates a new CreateVCSConnectionCallbackParams object -// with the ability to set a context for a request. -func NewCreateVCSConnectionCallbackParamsWithContext(ctx context.Context) *CreateVCSConnectionCallbackParams { - return &CreateVCSConnectionCallbackParams{ - Context: ctx, - } -} - -// NewCreateVCSConnectionCallbackParamsWithHTTPClient creates a new CreateVCSConnectionCallbackParams object -// with the ability to set a custom HTTPClient for a request. -func NewCreateVCSConnectionCallbackParamsWithHTTPClient(client *http.Client) *CreateVCSConnectionCallbackParams { - return &CreateVCSConnectionCallbackParams{ - HTTPClient: client, - } -} - -/* -CreateVCSConnectionCallbackParams contains all the parameters to send to the API endpoint - - for the create v c s connection callback operation. - - Typically these are written to a http.Request. -*/ -type CreateVCSConnectionCallbackParams struct { - - /* Req. - - Input - */ - Req *models.ServiceCreateConnectionCallbackRequest - - timeout time.Duration - Context context.Context - HTTPClient *http.Client -} - -// WithDefaults hydrates default values in the create v c s connection callback params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *CreateVCSConnectionCallbackParams) WithDefaults() *CreateVCSConnectionCallbackParams { - o.SetDefaults() - return o -} - -// SetDefaults hydrates default values in the create v c s connection callback params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *CreateVCSConnectionCallbackParams) SetDefaults() { - // no default values defined for this parameter -} - -// WithTimeout adds the timeout to the create v c s connection callback params -func (o *CreateVCSConnectionCallbackParams) WithTimeout(timeout time.Duration) *CreateVCSConnectionCallbackParams { - o.SetTimeout(timeout) - return o -} - -// SetTimeout adds the timeout to the create v c s connection callback params -func (o *CreateVCSConnectionCallbackParams) SetTimeout(timeout time.Duration) { - o.timeout = timeout -} - -// WithContext adds the context to the create v c s connection callback params -func (o *CreateVCSConnectionCallbackParams) WithContext(ctx context.Context) *CreateVCSConnectionCallbackParams { - o.SetContext(ctx) - return o -} - -// SetContext adds the context to the create v c s connection callback params -func (o *CreateVCSConnectionCallbackParams) SetContext(ctx context.Context) { - o.Context = ctx -} - -// WithHTTPClient adds the HTTPClient to the create v c s connection callback params -func (o *CreateVCSConnectionCallbackParams) WithHTTPClient(client *http.Client) *CreateVCSConnectionCallbackParams { - o.SetHTTPClient(client) - return o -} - -// SetHTTPClient adds the HTTPClient to the create v c s connection callback params -func (o *CreateVCSConnectionCallbackParams) SetHTTPClient(client *http.Client) { - o.HTTPClient = client -} - -// WithReq adds the req to the create v c s connection callback params -func (o *CreateVCSConnectionCallbackParams) WithReq(req *models.ServiceCreateConnectionCallbackRequest) *CreateVCSConnectionCallbackParams { - o.SetReq(req) - return o -} - -// SetReq adds the req to the create v c s connection callback params -func (o *CreateVCSConnectionCallbackParams) SetReq(req *models.ServiceCreateConnectionCallbackRequest) { - o.Req = req -} - -// WriteToRequest writes these params to a swagger request -func (o *CreateVCSConnectionCallbackParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { - - if err := r.SetTimeout(o.timeout); err != nil { - return err - } - var res []error - if o.Req != nil { - if err := r.SetBodyParam(o.Req); err != nil { - return err - } - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} diff --git a/client/operations/create_v_c_s_connection_callback_responses.go b/client/operations/create_v_c_s_connection_callback_responses.go deleted file mode 100644 index a792c0f..0000000 --- a/client/operations/create_v_c_s_connection_callback_responses.go +++ /dev/null @@ -1,486 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package operations - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "encoding/json" - "fmt" - "io" - - "github.com/go-openapi/runtime" - "github.com/go-openapi/strfmt" - - "github.com/nuonco/nuon-go/models" -) - -// CreateVCSConnectionCallbackReader is a Reader for the CreateVCSConnectionCallback structure. -type CreateVCSConnectionCallbackReader struct { - formats strfmt.Registry -} - -// ReadResponse reads a server response into the received o. -func (o *CreateVCSConnectionCallbackReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { - switch response.Code() { - case 201: - result := NewCreateVCSConnectionCallbackCreated() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return result, nil - case 400: - result := NewCreateVCSConnectionCallbackBadRequest() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return nil, result - case 401: - result := NewCreateVCSConnectionCallbackUnauthorized() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return nil, result - case 403: - result := NewCreateVCSConnectionCallbackForbidden() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return nil, result - case 404: - result := NewCreateVCSConnectionCallbackNotFound() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return nil, result - case 500: - result := NewCreateVCSConnectionCallbackInternalServerError() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return nil, result - default: - return nil, runtime.NewAPIError("[POST /v1/vcs/connection-callback] CreateVCSConnectionCallback", response, response.Code()) - } -} - -// NewCreateVCSConnectionCallbackCreated creates a CreateVCSConnectionCallbackCreated with default headers values -func NewCreateVCSConnectionCallbackCreated() *CreateVCSConnectionCallbackCreated { - return &CreateVCSConnectionCallbackCreated{} -} - -/* -CreateVCSConnectionCallbackCreated describes a response with status code 201, with default header values. - -Created -*/ -type CreateVCSConnectionCallbackCreated struct { - Payload *models.AppVCSConnection -} - -// IsSuccess returns true when this create v c s connection callback created response has a 2xx status code -func (o *CreateVCSConnectionCallbackCreated) IsSuccess() bool { - return true -} - -// IsRedirect returns true when this create v c s connection callback created response has a 3xx status code -func (o *CreateVCSConnectionCallbackCreated) IsRedirect() bool { - return false -} - -// IsClientError returns true when this create v c s connection callback created response has a 4xx status code -func (o *CreateVCSConnectionCallbackCreated) IsClientError() bool { - return false -} - -// IsServerError returns true when this create v c s connection callback created response has a 5xx status code -func (o *CreateVCSConnectionCallbackCreated) IsServerError() bool { - return false -} - -// IsCode returns true when this create v c s connection callback created response a status code equal to that given -func (o *CreateVCSConnectionCallbackCreated) IsCode(code int) bool { - return code == 201 -} - -// Code gets the status code for the create v c s connection callback created response -func (o *CreateVCSConnectionCallbackCreated) Code() int { - return 201 -} - -func (o *CreateVCSConnectionCallbackCreated) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[POST /v1/vcs/connection-callback][%d] createVCSConnectionCallbackCreated %s", 201, payload) -} - -func (o *CreateVCSConnectionCallbackCreated) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[POST /v1/vcs/connection-callback][%d] createVCSConnectionCallbackCreated %s", 201, payload) -} - -func (o *CreateVCSConnectionCallbackCreated) GetPayload() *models.AppVCSConnection { - return o.Payload -} - -func (o *CreateVCSConnectionCallbackCreated) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.AppVCSConnection) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewCreateVCSConnectionCallbackBadRequest creates a CreateVCSConnectionCallbackBadRequest with default headers values -func NewCreateVCSConnectionCallbackBadRequest() *CreateVCSConnectionCallbackBadRequest { - return &CreateVCSConnectionCallbackBadRequest{} -} - -/* -CreateVCSConnectionCallbackBadRequest describes a response with status code 400, with default header values. - -Bad Request -*/ -type CreateVCSConnectionCallbackBadRequest struct { - Payload *models.StderrErrResponse -} - -// IsSuccess returns true when this create v c s connection callback bad request response has a 2xx status code -func (o *CreateVCSConnectionCallbackBadRequest) IsSuccess() bool { - return false -} - -// IsRedirect returns true when this create v c s connection callback bad request response has a 3xx status code -func (o *CreateVCSConnectionCallbackBadRequest) IsRedirect() bool { - return false -} - -// IsClientError returns true when this create v c s connection callback bad request response has a 4xx status code -func (o *CreateVCSConnectionCallbackBadRequest) IsClientError() bool { - return true -} - -// IsServerError returns true when this create v c s connection callback bad request response has a 5xx status code -func (o *CreateVCSConnectionCallbackBadRequest) IsServerError() bool { - return false -} - -// IsCode returns true when this create v c s connection callback bad request response a status code equal to that given -func (o *CreateVCSConnectionCallbackBadRequest) IsCode(code int) bool { - return code == 400 -} - -// Code gets the status code for the create v c s connection callback bad request response -func (o *CreateVCSConnectionCallbackBadRequest) Code() int { - return 400 -} - -func (o *CreateVCSConnectionCallbackBadRequest) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[POST /v1/vcs/connection-callback][%d] createVCSConnectionCallbackBadRequest %s", 400, payload) -} - -func (o *CreateVCSConnectionCallbackBadRequest) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[POST /v1/vcs/connection-callback][%d] createVCSConnectionCallbackBadRequest %s", 400, payload) -} - -func (o *CreateVCSConnectionCallbackBadRequest) GetPayload() *models.StderrErrResponse { - return o.Payload -} - -func (o *CreateVCSConnectionCallbackBadRequest) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.StderrErrResponse) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewCreateVCSConnectionCallbackUnauthorized creates a CreateVCSConnectionCallbackUnauthorized with default headers values -func NewCreateVCSConnectionCallbackUnauthorized() *CreateVCSConnectionCallbackUnauthorized { - return &CreateVCSConnectionCallbackUnauthorized{} -} - -/* -CreateVCSConnectionCallbackUnauthorized describes a response with status code 401, with default header values. - -Unauthorized -*/ -type CreateVCSConnectionCallbackUnauthorized struct { - Payload *models.StderrErrResponse -} - -// IsSuccess returns true when this create v c s connection callback unauthorized response has a 2xx status code -func (o *CreateVCSConnectionCallbackUnauthorized) IsSuccess() bool { - return false -} - -// IsRedirect returns true when this create v c s connection callback unauthorized response has a 3xx status code -func (o *CreateVCSConnectionCallbackUnauthorized) IsRedirect() bool { - return false -} - -// IsClientError returns true when this create v c s connection callback unauthorized response has a 4xx status code -func (o *CreateVCSConnectionCallbackUnauthorized) IsClientError() bool { - return true -} - -// IsServerError returns true when this create v c s connection callback unauthorized response has a 5xx status code -func (o *CreateVCSConnectionCallbackUnauthorized) IsServerError() bool { - return false -} - -// IsCode returns true when this create v c s connection callback unauthorized response a status code equal to that given -func (o *CreateVCSConnectionCallbackUnauthorized) IsCode(code int) bool { - return code == 401 -} - -// Code gets the status code for the create v c s connection callback unauthorized response -func (o *CreateVCSConnectionCallbackUnauthorized) Code() int { - return 401 -} - -func (o *CreateVCSConnectionCallbackUnauthorized) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[POST /v1/vcs/connection-callback][%d] createVCSConnectionCallbackUnauthorized %s", 401, payload) -} - -func (o *CreateVCSConnectionCallbackUnauthorized) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[POST /v1/vcs/connection-callback][%d] createVCSConnectionCallbackUnauthorized %s", 401, payload) -} - -func (o *CreateVCSConnectionCallbackUnauthorized) GetPayload() *models.StderrErrResponse { - return o.Payload -} - -func (o *CreateVCSConnectionCallbackUnauthorized) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.StderrErrResponse) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewCreateVCSConnectionCallbackForbidden creates a CreateVCSConnectionCallbackForbidden with default headers values -func NewCreateVCSConnectionCallbackForbidden() *CreateVCSConnectionCallbackForbidden { - return &CreateVCSConnectionCallbackForbidden{} -} - -/* -CreateVCSConnectionCallbackForbidden describes a response with status code 403, with default header values. - -Forbidden -*/ -type CreateVCSConnectionCallbackForbidden struct { - Payload *models.StderrErrResponse -} - -// IsSuccess returns true when this create v c s connection callback forbidden response has a 2xx status code -func (o *CreateVCSConnectionCallbackForbidden) IsSuccess() bool { - return false -} - -// IsRedirect returns true when this create v c s connection callback forbidden response has a 3xx status code -func (o *CreateVCSConnectionCallbackForbidden) IsRedirect() bool { - return false -} - -// IsClientError returns true when this create v c s connection callback forbidden response has a 4xx status code -func (o *CreateVCSConnectionCallbackForbidden) IsClientError() bool { - return true -} - -// IsServerError returns true when this create v c s connection callback forbidden response has a 5xx status code -func (o *CreateVCSConnectionCallbackForbidden) IsServerError() bool { - return false -} - -// IsCode returns true when this create v c s connection callback forbidden response a status code equal to that given -func (o *CreateVCSConnectionCallbackForbidden) IsCode(code int) bool { - return code == 403 -} - -// Code gets the status code for the create v c s connection callback forbidden response -func (o *CreateVCSConnectionCallbackForbidden) Code() int { - return 403 -} - -func (o *CreateVCSConnectionCallbackForbidden) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[POST /v1/vcs/connection-callback][%d] createVCSConnectionCallbackForbidden %s", 403, payload) -} - -func (o *CreateVCSConnectionCallbackForbidden) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[POST /v1/vcs/connection-callback][%d] createVCSConnectionCallbackForbidden %s", 403, payload) -} - -func (o *CreateVCSConnectionCallbackForbidden) GetPayload() *models.StderrErrResponse { - return o.Payload -} - -func (o *CreateVCSConnectionCallbackForbidden) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.StderrErrResponse) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewCreateVCSConnectionCallbackNotFound creates a CreateVCSConnectionCallbackNotFound with default headers values -func NewCreateVCSConnectionCallbackNotFound() *CreateVCSConnectionCallbackNotFound { - return &CreateVCSConnectionCallbackNotFound{} -} - -/* -CreateVCSConnectionCallbackNotFound describes a response with status code 404, with default header values. - -Not Found -*/ -type CreateVCSConnectionCallbackNotFound struct { - Payload *models.StderrErrResponse -} - -// IsSuccess returns true when this create v c s connection callback not found response has a 2xx status code -func (o *CreateVCSConnectionCallbackNotFound) IsSuccess() bool { - return false -} - -// IsRedirect returns true when this create v c s connection callback not found response has a 3xx status code -func (o *CreateVCSConnectionCallbackNotFound) IsRedirect() bool { - return false -} - -// IsClientError returns true when this create v c s connection callback not found response has a 4xx status code -func (o *CreateVCSConnectionCallbackNotFound) IsClientError() bool { - return true -} - -// IsServerError returns true when this create v c s connection callback not found response has a 5xx status code -func (o *CreateVCSConnectionCallbackNotFound) IsServerError() bool { - return false -} - -// IsCode returns true when this create v c s connection callback not found response a status code equal to that given -func (o *CreateVCSConnectionCallbackNotFound) IsCode(code int) bool { - return code == 404 -} - -// Code gets the status code for the create v c s connection callback not found response -func (o *CreateVCSConnectionCallbackNotFound) Code() int { - return 404 -} - -func (o *CreateVCSConnectionCallbackNotFound) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[POST /v1/vcs/connection-callback][%d] createVCSConnectionCallbackNotFound %s", 404, payload) -} - -func (o *CreateVCSConnectionCallbackNotFound) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[POST /v1/vcs/connection-callback][%d] createVCSConnectionCallbackNotFound %s", 404, payload) -} - -func (o *CreateVCSConnectionCallbackNotFound) GetPayload() *models.StderrErrResponse { - return o.Payload -} - -func (o *CreateVCSConnectionCallbackNotFound) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.StderrErrResponse) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewCreateVCSConnectionCallbackInternalServerError creates a CreateVCSConnectionCallbackInternalServerError with default headers values -func NewCreateVCSConnectionCallbackInternalServerError() *CreateVCSConnectionCallbackInternalServerError { - return &CreateVCSConnectionCallbackInternalServerError{} -} - -/* -CreateVCSConnectionCallbackInternalServerError describes a response with status code 500, with default header values. - -Internal Server Error -*/ -type CreateVCSConnectionCallbackInternalServerError struct { - Payload *models.StderrErrResponse -} - -// IsSuccess returns true when this create v c s connection callback internal server error response has a 2xx status code -func (o *CreateVCSConnectionCallbackInternalServerError) IsSuccess() bool { - return false -} - -// IsRedirect returns true when this create v c s connection callback internal server error response has a 3xx status code -func (o *CreateVCSConnectionCallbackInternalServerError) IsRedirect() bool { - return false -} - -// IsClientError returns true when this create v c s connection callback internal server error response has a 4xx status code -func (o *CreateVCSConnectionCallbackInternalServerError) IsClientError() bool { - return false -} - -// IsServerError returns true when this create v c s connection callback internal server error response has a 5xx status code -func (o *CreateVCSConnectionCallbackInternalServerError) IsServerError() bool { - return true -} - -// IsCode returns true when this create v c s connection callback internal server error response a status code equal to that given -func (o *CreateVCSConnectionCallbackInternalServerError) IsCode(code int) bool { - return code == 500 -} - -// Code gets the status code for the create v c s connection callback internal server error response -func (o *CreateVCSConnectionCallbackInternalServerError) Code() int { - return 500 -} - -func (o *CreateVCSConnectionCallbackInternalServerError) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[POST /v1/vcs/connection-callback][%d] createVCSConnectionCallbackInternalServerError %s", 500, payload) -} - -func (o *CreateVCSConnectionCallbackInternalServerError) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[POST /v1/vcs/connection-callback][%d] createVCSConnectionCallbackInternalServerError %s", 500, payload) -} - -func (o *CreateVCSConnectionCallbackInternalServerError) GetPayload() *models.StderrErrResponse { - return o.Payload -} - -func (o *CreateVCSConnectionCallbackInternalServerError) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.StderrErrResponse) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} diff --git a/client/operations/create_v_c_s_connection_parameters.go b/client/operations/create_v_c_s_connection_parameters.go deleted file mode 100644 index 10546dc..0000000 --- a/client/operations/create_v_c_s_connection_parameters.go +++ /dev/null @@ -1,153 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package operations - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "context" - "net/http" - "time" - - "github.com/go-openapi/errors" - "github.com/go-openapi/runtime" - cr "github.com/go-openapi/runtime/client" - "github.com/go-openapi/strfmt" - - "github.com/nuonco/nuon-go/models" -) - -// NewCreateVCSConnectionParams creates a new CreateVCSConnectionParams object, -// with the default timeout for this client. -// -// Default values are not hydrated, since defaults are normally applied by the API server side. -// -// To enforce default values in parameter, use SetDefaults or WithDefaults. -func NewCreateVCSConnectionParams() *CreateVCSConnectionParams { - return &CreateVCSConnectionParams{ - timeout: cr.DefaultTimeout, - } -} - -// NewCreateVCSConnectionParamsWithTimeout creates a new CreateVCSConnectionParams object -// with the ability to set a timeout on a request. -func NewCreateVCSConnectionParamsWithTimeout(timeout time.Duration) *CreateVCSConnectionParams { - return &CreateVCSConnectionParams{ - timeout: timeout, - } -} - -// NewCreateVCSConnectionParamsWithContext creates a new CreateVCSConnectionParams object -// with the ability to set a context for a request. -func NewCreateVCSConnectionParamsWithContext(ctx context.Context) *CreateVCSConnectionParams { - return &CreateVCSConnectionParams{ - Context: ctx, - } -} - -// NewCreateVCSConnectionParamsWithHTTPClient creates a new CreateVCSConnectionParams object -// with the ability to set a custom HTTPClient for a request. -func NewCreateVCSConnectionParamsWithHTTPClient(client *http.Client) *CreateVCSConnectionParams { - return &CreateVCSConnectionParams{ - HTTPClient: client, - } -} - -/* -CreateVCSConnectionParams contains all the parameters to send to the API endpoint - - for the create v c s connection operation. - - Typically these are written to a http.Request. -*/ -type CreateVCSConnectionParams struct { - - /* Req. - - Input - */ - Req *models.ServiceCreateConnectionRequest - - timeout time.Duration - Context context.Context - HTTPClient *http.Client -} - -// WithDefaults hydrates default values in the create v c s connection params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *CreateVCSConnectionParams) WithDefaults() *CreateVCSConnectionParams { - o.SetDefaults() - return o -} - -// SetDefaults hydrates default values in the create v c s connection params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *CreateVCSConnectionParams) SetDefaults() { - // no default values defined for this parameter -} - -// WithTimeout adds the timeout to the create v c s connection params -func (o *CreateVCSConnectionParams) WithTimeout(timeout time.Duration) *CreateVCSConnectionParams { - o.SetTimeout(timeout) - return o -} - -// SetTimeout adds the timeout to the create v c s connection params -func (o *CreateVCSConnectionParams) SetTimeout(timeout time.Duration) { - o.timeout = timeout -} - -// WithContext adds the context to the create v c s connection params -func (o *CreateVCSConnectionParams) WithContext(ctx context.Context) *CreateVCSConnectionParams { - o.SetContext(ctx) - return o -} - -// SetContext adds the context to the create v c s connection params -func (o *CreateVCSConnectionParams) SetContext(ctx context.Context) { - o.Context = ctx -} - -// WithHTTPClient adds the HTTPClient to the create v c s connection params -func (o *CreateVCSConnectionParams) WithHTTPClient(client *http.Client) *CreateVCSConnectionParams { - o.SetHTTPClient(client) - return o -} - -// SetHTTPClient adds the HTTPClient to the create v c s connection params -func (o *CreateVCSConnectionParams) SetHTTPClient(client *http.Client) { - o.HTTPClient = client -} - -// WithReq adds the req to the create v c s connection params -func (o *CreateVCSConnectionParams) WithReq(req *models.ServiceCreateConnectionRequest) *CreateVCSConnectionParams { - o.SetReq(req) - return o -} - -// SetReq adds the req to the create v c s connection params -func (o *CreateVCSConnectionParams) SetReq(req *models.ServiceCreateConnectionRequest) { - o.Req = req -} - -// WriteToRequest writes these params to a swagger request -func (o *CreateVCSConnectionParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { - - if err := r.SetTimeout(o.timeout); err != nil { - return err - } - var res []error - if o.Req != nil { - if err := r.SetBodyParam(o.Req); err != nil { - return err - } - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} diff --git a/client/operations/create_v_c_s_connection_responses.go b/client/operations/create_v_c_s_connection_responses.go deleted file mode 100644 index 089d7a0..0000000 --- a/client/operations/create_v_c_s_connection_responses.go +++ /dev/null @@ -1,486 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package operations - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "encoding/json" - "fmt" - "io" - - "github.com/go-openapi/runtime" - "github.com/go-openapi/strfmt" - - "github.com/nuonco/nuon-go/models" -) - -// CreateVCSConnectionReader is a Reader for the CreateVCSConnection structure. -type CreateVCSConnectionReader struct { - formats strfmt.Registry -} - -// ReadResponse reads a server response into the received o. -func (o *CreateVCSConnectionReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { - switch response.Code() { - case 201: - result := NewCreateVCSConnectionCreated() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return result, nil - case 400: - result := NewCreateVCSConnectionBadRequest() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return nil, result - case 401: - result := NewCreateVCSConnectionUnauthorized() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return nil, result - case 403: - result := NewCreateVCSConnectionForbidden() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return nil, result - case 404: - result := NewCreateVCSConnectionNotFound() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return nil, result - case 500: - result := NewCreateVCSConnectionInternalServerError() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return nil, result - default: - return nil, runtime.NewAPIError("[POST /v1/vcs/connections] CreateVCSConnection", response, response.Code()) - } -} - -// NewCreateVCSConnectionCreated creates a CreateVCSConnectionCreated with default headers values -func NewCreateVCSConnectionCreated() *CreateVCSConnectionCreated { - return &CreateVCSConnectionCreated{} -} - -/* -CreateVCSConnectionCreated describes a response with status code 201, with default header values. - -Created -*/ -type CreateVCSConnectionCreated struct { - Payload *models.AppVCSConnection -} - -// IsSuccess returns true when this create v c s connection created response has a 2xx status code -func (o *CreateVCSConnectionCreated) IsSuccess() bool { - return true -} - -// IsRedirect returns true when this create v c s connection created response has a 3xx status code -func (o *CreateVCSConnectionCreated) IsRedirect() bool { - return false -} - -// IsClientError returns true when this create v c s connection created response has a 4xx status code -func (o *CreateVCSConnectionCreated) IsClientError() bool { - return false -} - -// IsServerError returns true when this create v c s connection created response has a 5xx status code -func (o *CreateVCSConnectionCreated) IsServerError() bool { - return false -} - -// IsCode returns true when this create v c s connection created response a status code equal to that given -func (o *CreateVCSConnectionCreated) IsCode(code int) bool { - return code == 201 -} - -// Code gets the status code for the create v c s connection created response -func (o *CreateVCSConnectionCreated) Code() int { - return 201 -} - -func (o *CreateVCSConnectionCreated) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[POST /v1/vcs/connections][%d] createVCSConnectionCreated %s", 201, payload) -} - -func (o *CreateVCSConnectionCreated) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[POST /v1/vcs/connections][%d] createVCSConnectionCreated %s", 201, payload) -} - -func (o *CreateVCSConnectionCreated) GetPayload() *models.AppVCSConnection { - return o.Payload -} - -func (o *CreateVCSConnectionCreated) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.AppVCSConnection) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewCreateVCSConnectionBadRequest creates a CreateVCSConnectionBadRequest with default headers values -func NewCreateVCSConnectionBadRequest() *CreateVCSConnectionBadRequest { - return &CreateVCSConnectionBadRequest{} -} - -/* -CreateVCSConnectionBadRequest describes a response with status code 400, with default header values. - -Bad Request -*/ -type CreateVCSConnectionBadRequest struct { - Payload *models.StderrErrResponse -} - -// IsSuccess returns true when this create v c s connection bad request response has a 2xx status code -func (o *CreateVCSConnectionBadRequest) IsSuccess() bool { - return false -} - -// IsRedirect returns true when this create v c s connection bad request response has a 3xx status code -func (o *CreateVCSConnectionBadRequest) IsRedirect() bool { - return false -} - -// IsClientError returns true when this create v c s connection bad request response has a 4xx status code -func (o *CreateVCSConnectionBadRequest) IsClientError() bool { - return true -} - -// IsServerError returns true when this create v c s connection bad request response has a 5xx status code -func (o *CreateVCSConnectionBadRequest) IsServerError() bool { - return false -} - -// IsCode returns true when this create v c s connection bad request response a status code equal to that given -func (o *CreateVCSConnectionBadRequest) IsCode(code int) bool { - return code == 400 -} - -// Code gets the status code for the create v c s connection bad request response -func (o *CreateVCSConnectionBadRequest) Code() int { - return 400 -} - -func (o *CreateVCSConnectionBadRequest) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[POST /v1/vcs/connections][%d] createVCSConnectionBadRequest %s", 400, payload) -} - -func (o *CreateVCSConnectionBadRequest) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[POST /v1/vcs/connections][%d] createVCSConnectionBadRequest %s", 400, payload) -} - -func (o *CreateVCSConnectionBadRequest) GetPayload() *models.StderrErrResponse { - return o.Payload -} - -func (o *CreateVCSConnectionBadRequest) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.StderrErrResponse) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewCreateVCSConnectionUnauthorized creates a CreateVCSConnectionUnauthorized with default headers values -func NewCreateVCSConnectionUnauthorized() *CreateVCSConnectionUnauthorized { - return &CreateVCSConnectionUnauthorized{} -} - -/* -CreateVCSConnectionUnauthorized describes a response with status code 401, with default header values. - -Unauthorized -*/ -type CreateVCSConnectionUnauthorized struct { - Payload *models.StderrErrResponse -} - -// IsSuccess returns true when this create v c s connection unauthorized response has a 2xx status code -func (o *CreateVCSConnectionUnauthorized) IsSuccess() bool { - return false -} - -// IsRedirect returns true when this create v c s connection unauthorized response has a 3xx status code -func (o *CreateVCSConnectionUnauthorized) IsRedirect() bool { - return false -} - -// IsClientError returns true when this create v c s connection unauthorized response has a 4xx status code -func (o *CreateVCSConnectionUnauthorized) IsClientError() bool { - return true -} - -// IsServerError returns true when this create v c s connection unauthorized response has a 5xx status code -func (o *CreateVCSConnectionUnauthorized) IsServerError() bool { - return false -} - -// IsCode returns true when this create v c s connection unauthorized response a status code equal to that given -func (o *CreateVCSConnectionUnauthorized) IsCode(code int) bool { - return code == 401 -} - -// Code gets the status code for the create v c s connection unauthorized response -func (o *CreateVCSConnectionUnauthorized) Code() int { - return 401 -} - -func (o *CreateVCSConnectionUnauthorized) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[POST /v1/vcs/connections][%d] createVCSConnectionUnauthorized %s", 401, payload) -} - -func (o *CreateVCSConnectionUnauthorized) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[POST /v1/vcs/connections][%d] createVCSConnectionUnauthorized %s", 401, payload) -} - -func (o *CreateVCSConnectionUnauthorized) GetPayload() *models.StderrErrResponse { - return o.Payload -} - -func (o *CreateVCSConnectionUnauthorized) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.StderrErrResponse) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewCreateVCSConnectionForbidden creates a CreateVCSConnectionForbidden with default headers values -func NewCreateVCSConnectionForbidden() *CreateVCSConnectionForbidden { - return &CreateVCSConnectionForbidden{} -} - -/* -CreateVCSConnectionForbidden describes a response with status code 403, with default header values. - -Forbidden -*/ -type CreateVCSConnectionForbidden struct { - Payload *models.StderrErrResponse -} - -// IsSuccess returns true when this create v c s connection forbidden response has a 2xx status code -func (o *CreateVCSConnectionForbidden) IsSuccess() bool { - return false -} - -// IsRedirect returns true when this create v c s connection forbidden response has a 3xx status code -func (o *CreateVCSConnectionForbidden) IsRedirect() bool { - return false -} - -// IsClientError returns true when this create v c s connection forbidden response has a 4xx status code -func (o *CreateVCSConnectionForbidden) IsClientError() bool { - return true -} - -// IsServerError returns true when this create v c s connection forbidden response has a 5xx status code -func (o *CreateVCSConnectionForbidden) IsServerError() bool { - return false -} - -// IsCode returns true when this create v c s connection forbidden response a status code equal to that given -func (o *CreateVCSConnectionForbidden) IsCode(code int) bool { - return code == 403 -} - -// Code gets the status code for the create v c s connection forbidden response -func (o *CreateVCSConnectionForbidden) Code() int { - return 403 -} - -func (o *CreateVCSConnectionForbidden) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[POST /v1/vcs/connections][%d] createVCSConnectionForbidden %s", 403, payload) -} - -func (o *CreateVCSConnectionForbidden) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[POST /v1/vcs/connections][%d] createVCSConnectionForbidden %s", 403, payload) -} - -func (o *CreateVCSConnectionForbidden) GetPayload() *models.StderrErrResponse { - return o.Payload -} - -func (o *CreateVCSConnectionForbidden) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.StderrErrResponse) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewCreateVCSConnectionNotFound creates a CreateVCSConnectionNotFound with default headers values -func NewCreateVCSConnectionNotFound() *CreateVCSConnectionNotFound { - return &CreateVCSConnectionNotFound{} -} - -/* -CreateVCSConnectionNotFound describes a response with status code 404, with default header values. - -Not Found -*/ -type CreateVCSConnectionNotFound struct { - Payload *models.StderrErrResponse -} - -// IsSuccess returns true when this create v c s connection not found response has a 2xx status code -func (o *CreateVCSConnectionNotFound) IsSuccess() bool { - return false -} - -// IsRedirect returns true when this create v c s connection not found response has a 3xx status code -func (o *CreateVCSConnectionNotFound) IsRedirect() bool { - return false -} - -// IsClientError returns true when this create v c s connection not found response has a 4xx status code -func (o *CreateVCSConnectionNotFound) IsClientError() bool { - return true -} - -// IsServerError returns true when this create v c s connection not found response has a 5xx status code -func (o *CreateVCSConnectionNotFound) IsServerError() bool { - return false -} - -// IsCode returns true when this create v c s connection not found response a status code equal to that given -func (o *CreateVCSConnectionNotFound) IsCode(code int) bool { - return code == 404 -} - -// Code gets the status code for the create v c s connection not found response -func (o *CreateVCSConnectionNotFound) Code() int { - return 404 -} - -func (o *CreateVCSConnectionNotFound) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[POST /v1/vcs/connections][%d] createVCSConnectionNotFound %s", 404, payload) -} - -func (o *CreateVCSConnectionNotFound) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[POST /v1/vcs/connections][%d] createVCSConnectionNotFound %s", 404, payload) -} - -func (o *CreateVCSConnectionNotFound) GetPayload() *models.StderrErrResponse { - return o.Payload -} - -func (o *CreateVCSConnectionNotFound) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.StderrErrResponse) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewCreateVCSConnectionInternalServerError creates a CreateVCSConnectionInternalServerError with default headers values -func NewCreateVCSConnectionInternalServerError() *CreateVCSConnectionInternalServerError { - return &CreateVCSConnectionInternalServerError{} -} - -/* -CreateVCSConnectionInternalServerError describes a response with status code 500, with default header values. - -Internal Server Error -*/ -type CreateVCSConnectionInternalServerError struct { - Payload *models.StderrErrResponse -} - -// IsSuccess returns true when this create v c s connection internal server error response has a 2xx status code -func (o *CreateVCSConnectionInternalServerError) IsSuccess() bool { - return false -} - -// IsRedirect returns true when this create v c s connection internal server error response has a 3xx status code -func (o *CreateVCSConnectionInternalServerError) IsRedirect() bool { - return false -} - -// IsClientError returns true when this create v c s connection internal server error response has a 4xx status code -func (o *CreateVCSConnectionInternalServerError) IsClientError() bool { - return false -} - -// IsServerError returns true when this create v c s connection internal server error response has a 5xx status code -func (o *CreateVCSConnectionInternalServerError) IsServerError() bool { - return true -} - -// IsCode returns true when this create v c s connection internal server error response a status code equal to that given -func (o *CreateVCSConnectionInternalServerError) IsCode(code int) bool { - return code == 500 -} - -// Code gets the status code for the create v c s connection internal server error response -func (o *CreateVCSConnectionInternalServerError) Code() int { - return 500 -} - -func (o *CreateVCSConnectionInternalServerError) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[POST /v1/vcs/connections][%d] createVCSConnectionInternalServerError %s", 500, payload) -} - -func (o *CreateVCSConnectionInternalServerError) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[POST /v1/vcs/connections][%d] createVCSConnectionInternalServerError %s", 500, payload) -} - -func (o *CreateVCSConnectionInternalServerError) GetPayload() *models.StderrErrResponse { - return o.Payload -} - -func (o *CreateVCSConnectionInternalServerError) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.StderrErrResponse) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} diff --git a/client/operations/delete_app_parameters.go b/client/operations/delete_app_parameters.go deleted file mode 100644 index 2af7411..0000000 --- a/client/operations/delete_app_parameters.go +++ /dev/null @@ -1,151 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package operations - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "context" - "net/http" - "time" - - "github.com/go-openapi/errors" - "github.com/go-openapi/runtime" - cr "github.com/go-openapi/runtime/client" - "github.com/go-openapi/strfmt" -) - -// NewDeleteAppParams creates a new DeleteAppParams object, -// with the default timeout for this client. -// -// Default values are not hydrated, since defaults are normally applied by the API server side. -// -// To enforce default values in parameter, use SetDefaults or WithDefaults. -func NewDeleteAppParams() *DeleteAppParams { - return &DeleteAppParams{ - timeout: cr.DefaultTimeout, - } -} - -// NewDeleteAppParamsWithTimeout creates a new DeleteAppParams object -// with the ability to set a timeout on a request. -func NewDeleteAppParamsWithTimeout(timeout time.Duration) *DeleteAppParams { - return &DeleteAppParams{ - timeout: timeout, - } -} - -// NewDeleteAppParamsWithContext creates a new DeleteAppParams object -// with the ability to set a context for a request. -func NewDeleteAppParamsWithContext(ctx context.Context) *DeleteAppParams { - return &DeleteAppParams{ - Context: ctx, - } -} - -// NewDeleteAppParamsWithHTTPClient creates a new DeleteAppParams object -// with the ability to set a custom HTTPClient for a request. -func NewDeleteAppParamsWithHTTPClient(client *http.Client) *DeleteAppParams { - return &DeleteAppParams{ - HTTPClient: client, - } -} - -/* -DeleteAppParams contains all the parameters to send to the API endpoint - - for the delete app operation. - - Typically these are written to a http.Request. -*/ -type DeleteAppParams struct { - - /* AppID. - - app ID - */ - AppID string - - timeout time.Duration - Context context.Context - HTTPClient *http.Client -} - -// WithDefaults hydrates default values in the delete app params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *DeleteAppParams) WithDefaults() *DeleteAppParams { - o.SetDefaults() - return o -} - -// SetDefaults hydrates default values in the delete app params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *DeleteAppParams) SetDefaults() { - // no default values defined for this parameter -} - -// WithTimeout adds the timeout to the delete app params -func (o *DeleteAppParams) WithTimeout(timeout time.Duration) *DeleteAppParams { - o.SetTimeout(timeout) - return o -} - -// SetTimeout adds the timeout to the delete app params -func (o *DeleteAppParams) SetTimeout(timeout time.Duration) { - o.timeout = timeout -} - -// WithContext adds the context to the delete app params -func (o *DeleteAppParams) WithContext(ctx context.Context) *DeleteAppParams { - o.SetContext(ctx) - return o -} - -// SetContext adds the context to the delete app params -func (o *DeleteAppParams) SetContext(ctx context.Context) { - o.Context = ctx -} - -// WithHTTPClient adds the HTTPClient to the delete app params -func (o *DeleteAppParams) WithHTTPClient(client *http.Client) *DeleteAppParams { - o.SetHTTPClient(client) - return o -} - -// SetHTTPClient adds the HTTPClient to the delete app params -func (o *DeleteAppParams) SetHTTPClient(client *http.Client) { - o.HTTPClient = client -} - -// WithAppID adds the appID to the delete app params -func (o *DeleteAppParams) WithAppID(appID string) *DeleteAppParams { - o.SetAppID(appID) - return o -} - -// SetAppID adds the appId to the delete app params -func (o *DeleteAppParams) SetAppID(appID string) { - o.AppID = appID -} - -// WriteToRequest writes these params to a swagger request -func (o *DeleteAppParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { - - if err := r.SetTimeout(o.timeout); err != nil { - return err - } - var res []error - - // path param app_id - if err := r.SetPathParam("app_id", o.AppID); err != nil { - return err - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} diff --git a/client/operations/delete_app_responses.go b/client/operations/delete_app_responses.go deleted file mode 100644 index 7c03f69..0000000 --- a/client/operations/delete_app_responses.go +++ /dev/null @@ -1,484 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package operations - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "encoding/json" - "fmt" - "io" - - "github.com/go-openapi/runtime" - "github.com/go-openapi/strfmt" - - "github.com/nuonco/nuon-go/models" -) - -// DeleteAppReader is a Reader for the DeleteApp structure. -type DeleteAppReader struct { - formats strfmt.Registry -} - -// ReadResponse reads a server response into the received o. -func (o *DeleteAppReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { - switch response.Code() { - case 200: - result := NewDeleteAppOK() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return result, nil - case 400: - result := NewDeleteAppBadRequest() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return nil, result - case 401: - result := NewDeleteAppUnauthorized() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return nil, result - case 403: - result := NewDeleteAppForbidden() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return nil, result - case 404: - result := NewDeleteAppNotFound() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return nil, result - case 500: - result := NewDeleteAppInternalServerError() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return nil, result - default: - return nil, runtime.NewAPIError("[DELETE /v1/apps/{app_id}] DeleteApp", response, response.Code()) - } -} - -// NewDeleteAppOK creates a DeleteAppOK with default headers values -func NewDeleteAppOK() *DeleteAppOK { - return &DeleteAppOK{} -} - -/* -DeleteAppOK describes a response with status code 200, with default header values. - -OK -*/ -type DeleteAppOK struct { - Payload bool -} - -// IsSuccess returns true when this delete app o k response has a 2xx status code -func (o *DeleteAppOK) IsSuccess() bool { - return true -} - -// IsRedirect returns true when this delete app o k response has a 3xx status code -func (o *DeleteAppOK) IsRedirect() bool { - return false -} - -// IsClientError returns true when this delete app o k response has a 4xx status code -func (o *DeleteAppOK) IsClientError() bool { - return false -} - -// IsServerError returns true when this delete app o k response has a 5xx status code -func (o *DeleteAppOK) IsServerError() bool { - return false -} - -// IsCode returns true when this delete app o k response a status code equal to that given -func (o *DeleteAppOK) IsCode(code int) bool { - return code == 200 -} - -// Code gets the status code for the delete app o k response -func (o *DeleteAppOK) Code() int { - return 200 -} - -func (o *DeleteAppOK) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[DELETE /v1/apps/{app_id}][%d] deleteAppOK %s", 200, payload) -} - -func (o *DeleteAppOK) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[DELETE /v1/apps/{app_id}][%d] deleteAppOK %s", 200, payload) -} - -func (o *DeleteAppOK) GetPayload() bool { - return o.Payload -} - -func (o *DeleteAppOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - // response payload - if err := consumer.Consume(response.Body(), &o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewDeleteAppBadRequest creates a DeleteAppBadRequest with default headers values -func NewDeleteAppBadRequest() *DeleteAppBadRequest { - return &DeleteAppBadRequest{} -} - -/* -DeleteAppBadRequest describes a response with status code 400, with default header values. - -Bad Request -*/ -type DeleteAppBadRequest struct { - Payload *models.StderrErrResponse -} - -// IsSuccess returns true when this delete app bad request response has a 2xx status code -func (o *DeleteAppBadRequest) IsSuccess() bool { - return false -} - -// IsRedirect returns true when this delete app bad request response has a 3xx status code -func (o *DeleteAppBadRequest) IsRedirect() bool { - return false -} - -// IsClientError returns true when this delete app bad request response has a 4xx status code -func (o *DeleteAppBadRequest) IsClientError() bool { - return true -} - -// IsServerError returns true when this delete app bad request response has a 5xx status code -func (o *DeleteAppBadRequest) IsServerError() bool { - return false -} - -// IsCode returns true when this delete app bad request response a status code equal to that given -func (o *DeleteAppBadRequest) IsCode(code int) bool { - return code == 400 -} - -// Code gets the status code for the delete app bad request response -func (o *DeleteAppBadRequest) Code() int { - return 400 -} - -func (o *DeleteAppBadRequest) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[DELETE /v1/apps/{app_id}][%d] deleteAppBadRequest %s", 400, payload) -} - -func (o *DeleteAppBadRequest) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[DELETE /v1/apps/{app_id}][%d] deleteAppBadRequest %s", 400, payload) -} - -func (o *DeleteAppBadRequest) GetPayload() *models.StderrErrResponse { - return o.Payload -} - -func (o *DeleteAppBadRequest) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.StderrErrResponse) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewDeleteAppUnauthorized creates a DeleteAppUnauthorized with default headers values -func NewDeleteAppUnauthorized() *DeleteAppUnauthorized { - return &DeleteAppUnauthorized{} -} - -/* -DeleteAppUnauthorized describes a response with status code 401, with default header values. - -Unauthorized -*/ -type DeleteAppUnauthorized struct { - Payload *models.StderrErrResponse -} - -// IsSuccess returns true when this delete app unauthorized response has a 2xx status code -func (o *DeleteAppUnauthorized) IsSuccess() bool { - return false -} - -// IsRedirect returns true when this delete app unauthorized response has a 3xx status code -func (o *DeleteAppUnauthorized) IsRedirect() bool { - return false -} - -// IsClientError returns true when this delete app unauthorized response has a 4xx status code -func (o *DeleteAppUnauthorized) IsClientError() bool { - return true -} - -// IsServerError returns true when this delete app unauthorized response has a 5xx status code -func (o *DeleteAppUnauthorized) IsServerError() bool { - return false -} - -// IsCode returns true when this delete app unauthorized response a status code equal to that given -func (o *DeleteAppUnauthorized) IsCode(code int) bool { - return code == 401 -} - -// Code gets the status code for the delete app unauthorized response -func (o *DeleteAppUnauthorized) Code() int { - return 401 -} - -func (o *DeleteAppUnauthorized) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[DELETE /v1/apps/{app_id}][%d] deleteAppUnauthorized %s", 401, payload) -} - -func (o *DeleteAppUnauthorized) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[DELETE /v1/apps/{app_id}][%d] deleteAppUnauthorized %s", 401, payload) -} - -func (o *DeleteAppUnauthorized) GetPayload() *models.StderrErrResponse { - return o.Payload -} - -func (o *DeleteAppUnauthorized) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.StderrErrResponse) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewDeleteAppForbidden creates a DeleteAppForbidden with default headers values -func NewDeleteAppForbidden() *DeleteAppForbidden { - return &DeleteAppForbidden{} -} - -/* -DeleteAppForbidden describes a response with status code 403, with default header values. - -Forbidden -*/ -type DeleteAppForbidden struct { - Payload *models.StderrErrResponse -} - -// IsSuccess returns true when this delete app forbidden response has a 2xx status code -func (o *DeleteAppForbidden) IsSuccess() bool { - return false -} - -// IsRedirect returns true when this delete app forbidden response has a 3xx status code -func (o *DeleteAppForbidden) IsRedirect() bool { - return false -} - -// IsClientError returns true when this delete app forbidden response has a 4xx status code -func (o *DeleteAppForbidden) IsClientError() bool { - return true -} - -// IsServerError returns true when this delete app forbidden response has a 5xx status code -func (o *DeleteAppForbidden) IsServerError() bool { - return false -} - -// IsCode returns true when this delete app forbidden response a status code equal to that given -func (o *DeleteAppForbidden) IsCode(code int) bool { - return code == 403 -} - -// Code gets the status code for the delete app forbidden response -func (o *DeleteAppForbidden) Code() int { - return 403 -} - -func (o *DeleteAppForbidden) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[DELETE /v1/apps/{app_id}][%d] deleteAppForbidden %s", 403, payload) -} - -func (o *DeleteAppForbidden) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[DELETE /v1/apps/{app_id}][%d] deleteAppForbidden %s", 403, payload) -} - -func (o *DeleteAppForbidden) GetPayload() *models.StderrErrResponse { - return o.Payload -} - -func (o *DeleteAppForbidden) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.StderrErrResponse) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewDeleteAppNotFound creates a DeleteAppNotFound with default headers values -func NewDeleteAppNotFound() *DeleteAppNotFound { - return &DeleteAppNotFound{} -} - -/* -DeleteAppNotFound describes a response with status code 404, with default header values. - -Not Found -*/ -type DeleteAppNotFound struct { - Payload *models.StderrErrResponse -} - -// IsSuccess returns true when this delete app not found response has a 2xx status code -func (o *DeleteAppNotFound) IsSuccess() bool { - return false -} - -// IsRedirect returns true when this delete app not found response has a 3xx status code -func (o *DeleteAppNotFound) IsRedirect() bool { - return false -} - -// IsClientError returns true when this delete app not found response has a 4xx status code -func (o *DeleteAppNotFound) IsClientError() bool { - return true -} - -// IsServerError returns true when this delete app not found response has a 5xx status code -func (o *DeleteAppNotFound) IsServerError() bool { - return false -} - -// IsCode returns true when this delete app not found response a status code equal to that given -func (o *DeleteAppNotFound) IsCode(code int) bool { - return code == 404 -} - -// Code gets the status code for the delete app not found response -func (o *DeleteAppNotFound) Code() int { - return 404 -} - -func (o *DeleteAppNotFound) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[DELETE /v1/apps/{app_id}][%d] deleteAppNotFound %s", 404, payload) -} - -func (o *DeleteAppNotFound) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[DELETE /v1/apps/{app_id}][%d] deleteAppNotFound %s", 404, payload) -} - -func (o *DeleteAppNotFound) GetPayload() *models.StderrErrResponse { - return o.Payload -} - -func (o *DeleteAppNotFound) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.StderrErrResponse) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewDeleteAppInternalServerError creates a DeleteAppInternalServerError with default headers values -func NewDeleteAppInternalServerError() *DeleteAppInternalServerError { - return &DeleteAppInternalServerError{} -} - -/* -DeleteAppInternalServerError describes a response with status code 500, with default header values. - -Internal Server Error -*/ -type DeleteAppInternalServerError struct { - Payload *models.StderrErrResponse -} - -// IsSuccess returns true when this delete app internal server error response has a 2xx status code -func (o *DeleteAppInternalServerError) IsSuccess() bool { - return false -} - -// IsRedirect returns true when this delete app internal server error response has a 3xx status code -func (o *DeleteAppInternalServerError) IsRedirect() bool { - return false -} - -// IsClientError returns true when this delete app internal server error response has a 4xx status code -func (o *DeleteAppInternalServerError) IsClientError() bool { - return false -} - -// IsServerError returns true when this delete app internal server error response has a 5xx status code -func (o *DeleteAppInternalServerError) IsServerError() bool { - return true -} - -// IsCode returns true when this delete app internal server error response a status code equal to that given -func (o *DeleteAppInternalServerError) IsCode(code int) bool { - return code == 500 -} - -// Code gets the status code for the delete app internal server error response -func (o *DeleteAppInternalServerError) Code() int { - return 500 -} - -func (o *DeleteAppInternalServerError) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[DELETE /v1/apps/{app_id}][%d] deleteAppInternalServerError %s", 500, payload) -} - -func (o *DeleteAppInternalServerError) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[DELETE /v1/apps/{app_id}][%d] deleteAppInternalServerError %s", 500, payload) -} - -func (o *DeleteAppInternalServerError) GetPayload() *models.StderrErrResponse { - return o.Payload -} - -func (o *DeleteAppInternalServerError) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.StderrErrResponse) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} diff --git a/client/operations/delete_app_secret_parameters.go b/client/operations/delete_app_secret_parameters.go deleted file mode 100644 index 9dac59c..0000000 --- a/client/operations/delete_app_secret_parameters.go +++ /dev/null @@ -1,173 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package operations - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "context" - "net/http" - "time" - - "github.com/go-openapi/errors" - "github.com/go-openapi/runtime" - cr "github.com/go-openapi/runtime/client" - "github.com/go-openapi/strfmt" -) - -// NewDeleteAppSecretParams creates a new DeleteAppSecretParams object, -// with the default timeout for this client. -// -// Default values are not hydrated, since defaults are normally applied by the API server side. -// -// To enforce default values in parameter, use SetDefaults or WithDefaults. -func NewDeleteAppSecretParams() *DeleteAppSecretParams { - return &DeleteAppSecretParams{ - timeout: cr.DefaultTimeout, - } -} - -// NewDeleteAppSecretParamsWithTimeout creates a new DeleteAppSecretParams object -// with the ability to set a timeout on a request. -func NewDeleteAppSecretParamsWithTimeout(timeout time.Duration) *DeleteAppSecretParams { - return &DeleteAppSecretParams{ - timeout: timeout, - } -} - -// NewDeleteAppSecretParamsWithContext creates a new DeleteAppSecretParams object -// with the ability to set a context for a request. -func NewDeleteAppSecretParamsWithContext(ctx context.Context) *DeleteAppSecretParams { - return &DeleteAppSecretParams{ - Context: ctx, - } -} - -// NewDeleteAppSecretParamsWithHTTPClient creates a new DeleteAppSecretParams object -// with the ability to set a custom HTTPClient for a request. -func NewDeleteAppSecretParamsWithHTTPClient(client *http.Client) *DeleteAppSecretParams { - return &DeleteAppSecretParams{ - HTTPClient: client, - } -} - -/* -DeleteAppSecretParams contains all the parameters to send to the API endpoint - - for the delete app secret operation. - - Typically these are written to a http.Request. -*/ -type DeleteAppSecretParams struct { - - /* AppID. - - app ID - */ - AppID string - - /* SecretID. - - secret ID - */ - SecretID string - - timeout time.Duration - Context context.Context - HTTPClient *http.Client -} - -// WithDefaults hydrates default values in the delete app secret params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *DeleteAppSecretParams) WithDefaults() *DeleteAppSecretParams { - o.SetDefaults() - return o -} - -// SetDefaults hydrates default values in the delete app secret params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *DeleteAppSecretParams) SetDefaults() { - // no default values defined for this parameter -} - -// WithTimeout adds the timeout to the delete app secret params -func (o *DeleteAppSecretParams) WithTimeout(timeout time.Duration) *DeleteAppSecretParams { - o.SetTimeout(timeout) - return o -} - -// SetTimeout adds the timeout to the delete app secret params -func (o *DeleteAppSecretParams) SetTimeout(timeout time.Duration) { - o.timeout = timeout -} - -// WithContext adds the context to the delete app secret params -func (o *DeleteAppSecretParams) WithContext(ctx context.Context) *DeleteAppSecretParams { - o.SetContext(ctx) - return o -} - -// SetContext adds the context to the delete app secret params -func (o *DeleteAppSecretParams) SetContext(ctx context.Context) { - o.Context = ctx -} - -// WithHTTPClient adds the HTTPClient to the delete app secret params -func (o *DeleteAppSecretParams) WithHTTPClient(client *http.Client) *DeleteAppSecretParams { - o.SetHTTPClient(client) - return o -} - -// SetHTTPClient adds the HTTPClient to the delete app secret params -func (o *DeleteAppSecretParams) SetHTTPClient(client *http.Client) { - o.HTTPClient = client -} - -// WithAppID adds the appID to the delete app secret params -func (o *DeleteAppSecretParams) WithAppID(appID string) *DeleteAppSecretParams { - o.SetAppID(appID) - return o -} - -// SetAppID adds the appId to the delete app secret params -func (o *DeleteAppSecretParams) SetAppID(appID string) { - o.AppID = appID -} - -// WithSecretID adds the secretID to the delete app secret params -func (o *DeleteAppSecretParams) WithSecretID(secretID string) *DeleteAppSecretParams { - o.SetSecretID(secretID) - return o -} - -// SetSecretID adds the secretId to the delete app secret params -func (o *DeleteAppSecretParams) SetSecretID(secretID string) { - o.SecretID = secretID -} - -// WriteToRequest writes these params to a swagger request -func (o *DeleteAppSecretParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { - - if err := r.SetTimeout(o.timeout); err != nil { - return err - } - var res []error - - // path param app_id - if err := r.SetPathParam("app_id", o.AppID); err != nil { - return err - } - - // path param secret_id - if err := r.SetPathParam("secret_id", o.SecretID); err != nil { - return err - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} diff --git a/client/operations/delete_app_secret_responses.go b/client/operations/delete_app_secret_responses.go deleted file mode 100644 index 4bb0625..0000000 --- a/client/operations/delete_app_secret_responses.go +++ /dev/null @@ -1,484 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package operations - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "encoding/json" - "fmt" - "io" - - "github.com/go-openapi/runtime" - "github.com/go-openapi/strfmt" - - "github.com/nuonco/nuon-go/models" -) - -// DeleteAppSecretReader is a Reader for the DeleteAppSecret structure. -type DeleteAppSecretReader struct { - formats strfmt.Registry -} - -// ReadResponse reads a server response into the received o. -func (o *DeleteAppSecretReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { - switch response.Code() { - case 200: - result := NewDeleteAppSecretOK() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return result, nil - case 400: - result := NewDeleteAppSecretBadRequest() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return nil, result - case 401: - result := NewDeleteAppSecretUnauthorized() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return nil, result - case 403: - result := NewDeleteAppSecretForbidden() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return nil, result - case 404: - result := NewDeleteAppSecretNotFound() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return nil, result - case 500: - result := NewDeleteAppSecretInternalServerError() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return nil, result - default: - return nil, runtime.NewAPIError("[DELETE /v1/apps/{app_id}/secret/{secret_id}] DeleteAppSecret", response, response.Code()) - } -} - -// NewDeleteAppSecretOK creates a DeleteAppSecretOK with default headers values -func NewDeleteAppSecretOK() *DeleteAppSecretOK { - return &DeleteAppSecretOK{} -} - -/* -DeleteAppSecretOK describes a response with status code 200, with default header values. - -OK -*/ -type DeleteAppSecretOK struct { - Payload bool -} - -// IsSuccess returns true when this delete app secret o k response has a 2xx status code -func (o *DeleteAppSecretOK) IsSuccess() bool { - return true -} - -// IsRedirect returns true when this delete app secret o k response has a 3xx status code -func (o *DeleteAppSecretOK) IsRedirect() bool { - return false -} - -// IsClientError returns true when this delete app secret o k response has a 4xx status code -func (o *DeleteAppSecretOK) IsClientError() bool { - return false -} - -// IsServerError returns true when this delete app secret o k response has a 5xx status code -func (o *DeleteAppSecretOK) IsServerError() bool { - return false -} - -// IsCode returns true when this delete app secret o k response a status code equal to that given -func (o *DeleteAppSecretOK) IsCode(code int) bool { - return code == 200 -} - -// Code gets the status code for the delete app secret o k response -func (o *DeleteAppSecretOK) Code() int { - return 200 -} - -func (o *DeleteAppSecretOK) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[DELETE /v1/apps/{app_id}/secret/{secret_id}][%d] deleteAppSecretOK %s", 200, payload) -} - -func (o *DeleteAppSecretOK) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[DELETE /v1/apps/{app_id}/secret/{secret_id}][%d] deleteAppSecretOK %s", 200, payload) -} - -func (o *DeleteAppSecretOK) GetPayload() bool { - return o.Payload -} - -func (o *DeleteAppSecretOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - // response payload - if err := consumer.Consume(response.Body(), &o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewDeleteAppSecretBadRequest creates a DeleteAppSecretBadRequest with default headers values -func NewDeleteAppSecretBadRequest() *DeleteAppSecretBadRequest { - return &DeleteAppSecretBadRequest{} -} - -/* -DeleteAppSecretBadRequest describes a response with status code 400, with default header values. - -Bad Request -*/ -type DeleteAppSecretBadRequest struct { - Payload *models.StderrErrResponse -} - -// IsSuccess returns true when this delete app secret bad request response has a 2xx status code -func (o *DeleteAppSecretBadRequest) IsSuccess() bool { - return false -} - -// IsRedirect returns true when this delete app secret bad request response has a 3xx status code -func (o *DeleteAppSecretBadRequest) IsRedirect() bool { - return false -} - -// IsClientError returns true when this delete app secret bad request response has a 4xx status code -func (o *DeleteAppSecretBadRequest) IsClientError() bool { - return true -} - -// IsServerError returns true when this delete app secret bad request response has a 5xx status code -func (o *DeleteAppSecretBadRequest) IsServerError() bool { - return false -} - -// IsCode returns true when this delete app secret bad request response a status code equal to that given -func (o *DeleteAppSecretBadRequest) IsCode(code int) bool { - return code == 400 -} - -// Code gets the status code for the delete app secret bad request response -func (o *DeleteAppSecretBadRequest) Code() int { - return 400 -} - -func (o *DeleteAppSecretBadRequest) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[DELETE /v1/apps/{app_id}/secret/{secret_id}][%d] deleteAppSecretBadRequest %s", 400, payload) -} - -func (o *DeleteAppSecretBadRequest) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[DELETE /v1/apps/{app_id}/secret/{secret_id}][%d] deleteAppSecretBadRequest %s", 400, payload) -} - -func (o *DeleteAppSecretBadRequest) GetPayload() *models.StderrErrResponse { - return o.Payload -} - -func (o *DeleteAppSecretBadRequest) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.StderrErrResponse) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewDeleteAppSecretUnauthorized creates a DeleteAppSecretUnauthorized with default headers values -func NewDeleteAppSecretUnauthorized() *DeleteAppSecretUnauthorized { - return &DeleteAppSecretUnauthorized{} -} - -/* -DeleteAppSecretUnauthorized describes a response with status code 401, with default header values. - -Unauthorized -*/ -type DeleteAppSecretUnauthorized struct { - Payload *models.StderrErrResponse -} - -// IsSuccess returns true when this delete app secret unauthorized response has a 2xx status code -func (o *DeleteAppSecretUnauthorized) IsSuccess() bool { - return false -} - -// IsRedirect returns true when this delete app secret unauthorized response has a 3xx status code -func (o *DeleteAppSecretUnauthorized) IsRedirect() bool { - return false -} - -// IsClientError returns true when this delete app secret unauthorized response has a 4xx status code -func (o *DeleteAppSecretUnauthorized) IsClientError() bool { - return true -} - -// IsServerError returns true when this delete app secret unauthorized response has a 5xx status code -func (o *DeleteAppSecretUnauthorized) IsServerError() bool { - return false -} - -// IsCode returns true when this delete app secret unauthorized response a status code equal to that given -func (o *DeleteAppSecretUnauthorized) IsCode(code int) bool { - return code == 401 -} - -// Code gets the status code for the delete app secret unauthorized response -func (o *DeleteAppSecretUnauthorized) Code() int { - return 401 -} - -func (o *DeleteAppSecretUnauthorized) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[DELETE /v1/apps/{app_id}/secret/{secret_id}][%d] deleteAppSecretUnauthorized %s", 401, payload) -} - -func (o *DeleteAppSecretUnauthorized) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[DELETE /v1/apps/{app_id}/secret/{secret_id}][%d] deleteAppSecretUnauthorized %s", 401, payload) -} - -func (o *DeleteAppSecretUnauthorized) GetPayload() *models.StderrErrResponse { - return o.Payload -} - -func (o *DeleteAppSecretUnauthorized) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.StderrErrResponse) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewDeleteAppSecretForbidden creates a DeleteAppSecretForbidden with default headers values -func NewDeleteAppSecretForbidden() *DeleteAppSecretForbidden { - return &DeleteAppSecretForbidden{} -} - -/* -DeleteAppSecretForbidden describes a response with status code 403, with default header values. - -Forbidden -*/ -type DeleteAppSecretForbidden struct { - Payload *models.StderrErrResponse -} - -// IsSuccess returns true when this delete app secret forbidden response has a 2xx status code -func (o *DeleteAppSecretForbidden) IsSuccess() bool { - return false -} - -// IsRedirect returns true when this delete app secret forbidden response has a 3xx status code -func (o *DeleteAppSecretForbidden) IsRedirect() bool { - return false -} - -// IsClientError returns true when this delete app secret forbidden response has a 4xx status code -func (o *DeleteAppSecretForbidden) IsClientError() bool { - return true -} - -// IsServerError returns true when this delete app secret forbidden response has a 5xx status code -func (o *DeleteAppSecretForbidden) IsServerError() bool { - return false -} - -// IsCode returns true when this delete app secret forbidden response a status code equal to that given -func (o *DeleteAppSecretForbidden) IsCode(code int) bool { - return code == 403 -} - -// Code gets the status code for the delete app secret forbidden response -func (o *DeleteAppSecretForbidden) Code() int { - return 403 -} - -func (o *DeleteAppSecretForbidden) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[DELETE /v1/apps/{app_id}/secret/{secret_id}][%d] deleteAppSecretForbidden %s", 403, payload) -} - -func (o *DeleteAppSecretForbidden) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[DELETE /v1/apps/{app_id}/secret/{secret_id}][%d] deleteAppSecretForbidden %s", 403, payload) -} - -func (o *DeleteAppSecretForbidden) GetPayload() *models.StderrErrResponse { - return o.Payload -} - -func (o *DeleteAppSecretForbidden) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.StderrErrResponse) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewDeleteAppSecretNotFound creates a DeleteAppSecretNotFound with default headers values -func NewDeleteAppSecretNotFound() *DeleteAppSecretNotFound { - return &DeleteAppSecretNotFound{} -} - -/* -DeleteAppSecretNotFound describes a response with status code 404, with default header values. - -Not Found -*/ -type DeleteAppSecretNotFound struct { - Payload *models.StderrErrResponse -} - -// IsSuccess returns true when this delete app secret not found response has a 2xx status code -func (o *DeleteAppSecretNotFound) IsSuccess() bool { - return false -} - -// IsRedirect returns true when this delete app secret not found response has a 3xx status code -func (o *DeleteAppSecretNotFound) IsRedirect() bool { - return false -} - -// IsClientError returns true when this delete app secret not found response has a 4xx status code -func (o *DeleteAppSecretNotFound) IsClientError() bool { - return true -} - -// IsServerError returns true when this delete app secret not found response has a 5xx status code -func (o *DeleteAppSecretNotFound) IsServerError() bool { - return false -} - -// IsCode returns true when this delete app secret not found response a status code equal to that given -func (o *DeleteAppSecretNotFound) IsCode(code int) bool { - return code == 404 -} - -// Code gets the status code for the delete app secret not found response -func (o *DeleteAppSecretNotFound) Code() int { - return 404 -} - -func (o *DeleteAppSecretNotFound) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[DELETE /v1/apps/{app_id}/secret/{secret_id}][%d] deleteAppSecretNotFound %s", 404, payload) -} - -func (o *DeleteAppSecretNotFound) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[DELETE /v1/apps/{app_id}/secret/{secret_id}][%d] deleteAppSecretNotFound %s", 404, payload) -} - -func (o *DeleteAppSecretNotFound) GetPayload() *models.StderrErrResponse { - return o.Payload -} - -func (o *DeleteAppSecretNotFound) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.StderrErrResponse) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewDeleteAppSecretInternalServerError creates a DeleteAppSecretInternalServerError with default headers values -func NewDeleteAppSecretInternalServerError() *DeleteAppSecretInternalServerError { - return &DeleteAppSecretInternalServerError{} -} - -/* -DeleteAppSecretInternalServerError describes a response with status code 500, with default header values. - -Internal Server Error -*/ -type DeleteAppSecretInternalServerError struct { - Payload *models.StderrErrResponse -} - -// IsSuccess returns true when this delete app secret internal server error response has a 2xx status code -func (o *DeleteAppSecretInternalServerError) IsSuccess() bool { - return false -} - -// IsRedirect returns true when this delete app secret internal server error response has a 3xx status code -func (o *DeleteAppSecretInternalServerError) IsRedirect() bool { - return false -} - -// IsClientError returns true when this delete app secret internal server error response has a 4xx status code -func (o *DeleteAppSecretInternalServerError) IsClientError() bool { - return false -} - -// IsServerError returns true when this delete app secret internal server error response has a 5xx status code -func (o *DeleteAppSecretInternalServerError) IsServerError() bool { - return true -} - -// IsCode returns true when this delete app secret internal server error response a status code equal to that given -func (o *DeleteAppSecretInternalServerError) IsCode(code int) bool { - return code == 500 -} - -// Code gets the status code for the delete app secret internal server error response -func (o *DeleteAppSecretInternalServerError) Code() int { - return 500 -} - -func (o *DeleteAppSecretInternalServerError) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[DELETE /v1/apps/{app_id}/secret/{secret_id}][%d] deleteAppSecretInternalServerError %s", 500, payload) -} - -func (o *DeleteAppSecretInternalServerError) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[DELETE /v1/apps/{app_id}/secret/{secret_id}][%d] deleteAppSecretInternalServerError %s", 500, payload) -} - -func (o *DeleteAppSecretInternalServerError) GetPayload() *models.StderrErrResponse { - return o.Payload -} - -func (o *DeleteAppSecretInternalServerError) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.StderrErrResponse) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} diff --git a/client/operations/delete_component_parameters.go b/client/operations/delete_component_parameters.go deleted file mode 100644 index b1c81d5..0000000 --- a/client/operations/delete_component_parameters.go +++ /dev/null @@ -1,151 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package operations - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "context" - "net/http" - "time" - - "github.com/go-openapi/errors" - "github.com/go-openapi/runtime" - cr "github.com/go-openapi/runtime/client" - "github.com/go-openapi/strfmt" -) - -// NewDeleteComponentParams creates a new DeleteComponentParams object, -// with the default timeout for this client. -// -// Default values are not hydrated, since defaults are normally applied by the API server side. -// -// To enforce default values in parameter, use SetDefaults or WithDefaults. -func NewDeleteComponentParams() *DeleteComponentParams { - return &DeleteComponentParams{ - timeout: cr.DefaultTimeout, - } -} - -// NewDeleteComponentParamsWithTimeout creates a new DeleteComponentParams object -// with the ability to set a timeout on a request. -func NewDeleteComponentParamsWithTimeout(timeout time.Duration) *DeleteComponentParams { - return &DeleteComponentParams{ - timeout: timeout, - } -} - -// NewDeleteComponentParamsWithContext creates a new DeleteComponentParams object -// with the ability to set a context for a request. -func NewDeleteComponentParamsWithContext(ctx context.Context) *DeleteComponentParams { - return &DeleteComponentParams{ - Context: ctx, - } -} - -// NewDeleteComponentParamsWithHTTPClient creates a new DeleteComponentParams object -// with the ability to set a custom HTTPClient for a request. -func NewDeleteComponentParamsWithHTTPClient(client *http.Client) *DeleteComponentParams { - return &DeleteComponentParams{ - HTTPClient: client, - } -} - -/* -DeleteComponentParams contains all the parameters to send to the API endpoint - - for the delete component operation. - - Typically these are written to a http.Request. -*/ -type DeleteComponentParams struct { - - /* ComponentID. - - component ID - */ - ComponentID string - - timeout time.Duration - Context context.Context - HTTPClient *http.Client -} - -// WithDefaults hydrates default values in the delete component params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *DeleteComponentParams) WithDefaults() *DeleteComponentParams { - o.SetDefaults() - return o -} - -// SetDefaults hydrates default values in the delete component params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *DeleteComponentParams) SetDefaults() { - // no default values defined for this parameter -} - -// WithTimeout adds the timeout to the delete component params -func (o *DeleteComponentParams) WithTimeout(timeout time.Duration) *DeleteComponentParams { - o.SetTimeout(timeout) - return o -} - -// SetTimeout adds the timeout to the delete component params -func (o *DeleteComponentParams) SetTimeout(timeout time.Duration) { - o.timeout = timeout -} - -// WithContext adds the context to the delete component params -func (o *DeleteComponentParams) WithContext(ctx context.Context) *DeleteComponentParams { - o.SetContext(ctx) - return o -} - -// SetContext adds the context to the delete component params -func (o *DeleteComponentParams) SetContext(ctx context.Context) { - o.Context = ctx -} - -// WithHTTPClient adds the HTTPClient to the delete component params -func (o *DeleteComponentParams) WithHTTPClient(client *http.Client) *DeleteComponentParams { - o.SetHTTPClient(client) - return o -} - -// SetHTTPClient adds the HTTPClient to the delete component params -func (o *DeleteComponentParams) SetHTTPClient(client *http.Client) { - o.HTTPClient = client -} - -// WithComponentID adds the componentID to the delete component params -func (o *DeleteComponentParams) WithComponentID(componentID string) *DeleteComponentParams { - o.SetComponentID(componentID) - return o -} - -// SetComponentID adds the componentId to the delete component params -func (o *DeleteComponentParams) SetComponentID(componentID string) { - o.ComponentID = componentID -} - -// WriteToRequest writes these params to a swagger request -func (o *DeleteComponentParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { - - if err := r.SetTimeout(o.timeout); err != nil { - return err - } - var res []error - - // path param component_id - if err := r.SetPathParam("component_id", o.ComponentID); err != nil { - return err - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} diff --git a/client/operations/delete_component_responses.go b/client/operations/delete_component_responses.go deleted file mode 100644 index 1badeb4..0000000 --- a/client/operations/delete_component_responses.go +++ /dev/null @@ -1,484 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package operations - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "encoding/json" - "fmt" - "io" - - "github.com/go-openapi/runtime" - "github.com/go-openapi/strfmt" - - "github.com/nuonco/nuon-go/models" -) - -// DeleteComponentReader is a Reader for the DeleteComponent structure. -type DeleteComponentReader struct { - formats strfmt.Registry -} - -// ReadResponse reads a server response into the received o. -func (o *DeleteComponentReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { - switch response.Code() { - case 200: - result := NewDeleteComponentOK() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return result, nil - case 400: - result := NewDeleteComponentBadRequest() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return nil, result - case 401: - result := NewDeleteComponentUnauthorized() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return nil, result - case 403: - result := NewDeleteComponentForbidden() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return nil, result - case 404: - result := NewDeleteComponentNotFound() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return nil, result - case 500: - result := NewDeleteComponentInternalServerError() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return nil, result - default: - return nil, runtime.NewAPIError("[DELETE /v1/components/{component_id}] DeleteComponent", response, response.Code()) - } -} - -// NewDeleteComponentOK creates a DeleteComponentOK with default headers values -func NewDeleteComponentOK() *DeleteComponentOK { - return &DeleteComponentOK{} -} - -/* -DeleteComponentOK describes a response with status code 200, with default header values. - -OK -*/ -type DeleteComponentOK struct { - Payload bool -} - -// IsSuccess returns true when this delete component o k response has a 2xx status code -func (o *DeleteComponentOK) IsSuccess() bool { - return true -} - -// IsRedirect returns true when this delete component o k response has a 3xx status code -func (o *DeleteComponentOK) IsRedirect() bool { - return false -} - -// IsClientError returns true when this delete component o k response has a 4xx status code -func (o *DeleteComponentOK) IsClientError() bool { - return false -} - -// IsServerError returns true when this delete component o k response has a 5xx status code -func (o *DeleteComponentOK) IsServerError() bool { - return false -} - -// IsCode returns true when this delete component o k response a status code equal to that given -func (o *DeleteComponentOK) IsCode(code int) bool { - return code == 200 -} - -// Code gets the status code for the delete component o k response -func (o *DeleteComponentOK) Code() int { - return 200 -} - -func (o *DeleteComponentOK) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[DELETE /v1/components/{component_id}][%d] deleteComponentOK %s", 200, payload) -} - -func (o *DeleteComponentOK) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[DELETE /v1/components/{component_id}][%d] deleteComponentOK %s", 200, payload) -} - -func (o *DeleteComponentOK) GetPayload() bool { - return o.Payload -} - -func (o *DeleteComponentOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - // response payload - if err := consumer.Consume(response.Body(), &o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewDeleteComponentBadRequest creates a DeleteComponentBadRequest with default headers values -func NewDeleteComponentBadRequest() *DeleteComponentBadRequest { - return &DeleteComponentBadRequest{} -} - -/* -DeleteComponentBadRequest describes a response with status code 400, with default header values. - -Bad Request -*/ -type DeleteComponentBadRequest struct { - Payload *models.StderrErrResponse -} - -// IsSuccess returns true when this delete component bad request response has a 2xx status code -func (o *DeleteComponentBadRequest) IsSuccess() bool { - return false -} - -// IsRedirect returns true when this delete component bad request response has a 3xx status code -func (o *DeleteComponentBadRequest) IsRedirect() bool { - return false -} - -// IsClientError returns true when this delete component bad request response has a 4xx status code -func (o *DeleteComponentBadRequest) IsClientError() bool { - return true -} - -// IsServerError returns true when this delete component bad request response has a 5xx status code -func (o *DeleteComponentBadRequest) IsServerError() bool { - return false -} - -// IsCode returns true when this delete component bad request response a status code equal to that given -func (o *DeleteComponentBadRequest) IsCode(code int) bool { - return code == 400 -} - -// Code gets the status code for the delete component bad request response -func (o *DeleteComponentBadRequest) Code() int { - return 400 -} - -func (o *DeleteComponentBadRequest) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[DELETE /v1/components/{component_id}][%d] deleteComponentBadRequest %s", 400, payload) -} - -func (o *DeleteComponentBadRequest) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[DELETE /v1/components/{component_id}][%d] deleteComponentBadRequest %s", 400, payload) -} - -func (o *DeleteComponentBadRequest) GetPayload() *models.StderrErrResponse { - return o.Payload -} - -func (o *DeleteComponentBadRequest) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.StderrErrResponse) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewDeleteComponentUnauthorized creates a DeleteComponentUnauthorized with default headers values -func NewDeleteComponentUnauthorized() *DeleteComponentUnauthorized { - return &DeleteComponentUnauthorized{} -} - -/* -DeleteComponentUnauthorized describes a response with status code 401, with default header values. - -Unauthorized -*/ -type DeleteComponentUnauthorized struct { - Payload *models.StderrErrResponse -} - -// IsSuccess returns true when this delete component unauthorized response has a 2xx status code -func (o *DeleteComponentUnauthorized) IsSuccess() bool { - return false -} - -// IsRedirect returns true when this delete component unauthorized response has a 3xx status code -func (o *DeleteComponentUnauthorized) IsRedirect() bool { - return false -} - -// IsClientError returns true when this delete component unauthorized response has a 4xx status code -func (o *DeleteComponentUnauthorized) IsClientError() bool { - return true -} - -// IsServerError returns true when this delete component unauthorized response has a 5xx status code -func (o *DeleteComponentUnauthorized) IsServerError() bool { - return false -} - -// IsCode returns true when this delete component unauthorized response a status code equal to that given -func (o *DeleteComponentUnauthorized) IsCode(code int) bool { - return code == 401 -} - -// Code gets the status code for the delete component unauthorized response -func (o *DeleteComponentUnauthorized) Code() int { - return 401 -} - -func (o *DeleteComponentUnauthorized) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[DELETE /v1/components/{component_id}][%d] deleteComponentUnauthorized %s", 401, payload) -} - -func (o *DeleteComponentUnauthorized) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[DELETE /v1/components/{component_id}][%d] deleteComponentUnauthorized %s", 401, payload) -} - -func (o *DeleteComponentUnauthorized) GetPayload() *models.StderrErrResponse { - return o.Payload -} - -func (o *DeleteComponentUnauthorized) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.StderrErrResponse) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewDeleteComponentForbidden creates a DeleteComponentForbidden with default headers values -func NewDeleteComponentForbidden() *DeleteComponentForbidden { - return &DeleteComponentForbidden{} -} - -/* -DeleteComponentForbidden describes a response with status code 403, with default header values. - -Forbidden -*/ -type DeleteComponentForbidden struct { - Payload *models.StderrErrResponse -} - -// IsSuccess returns true when this delete component forbidden response has a 2xx status code -func (o *DeleteComponentForbidden) IsSuccess() bool { - return false -} - -// IsRedirect returns true when this delete component forbidden response has a 3xx status code -func (o *DeleteComponentForbidden) IsRedirect() bool { - return false -} - -// IsClientError returns true when this delete component forbidden response has a 4xx status code -func (o *DeleteComponentForbidden) IsClientError() bool { - return true -} - -// IsServerError returns true when this delete component forbidden response has a 5xx status code -func (o *DeleteComponentForbidden) IsServerError() bool { - return false -} - -// IsCode returns true when this delete component forbidden response a status code equal to that given -func (o *DeleteComponentForbidden) IsCode(code int) bool { - return code == 403 -} - -// Code gets the status code for the delete component forbidden response -func (o *DeleteComponentForbidden) Code() int { - return 403 -} - -func (o *DeleteComponentForbidden) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[DELETE /v1/components/{component_id}][%d] deleteComponentForbidden %s", 403, payload) -} - -func (o *DeleteComponentForbidden) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[DELETE /v1/components/{component_id}][%d] deleteComponentForbidden %s", 403, payload) -} - -func (o *DeleteComponentForbidden) GetPayload() *models.StderrErrResponse { - return o.Payload -} - -func (o *DeleteComponentForbidden) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.StderrErrResponse) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewDeleteComponentNotFound creates a DeleteComponentNotFound with default headers values -func NewDeleteComponentNotFound() *DeleteComponentNotFound { - return &DeleteComponentNotFound{} -} - -/* -DeleteComponentNotFound describes a response with status code 404, with default header values. - -Not Found -*/ -type DeleteComponentNotFound struct { - Payload *models.StderrErrResponse -} - -// IsSuccess returns true when this delete component not found response has a 2xx status code -func (o *DeleteComponentNotFound) IsSuccess() bool { - return false -} - -// IsRedirect returns true when this delete component not found response has a 3xx status code -func (o *DeleteComponentNotFound) IsRedirect() bool { - return false -} - -// IsClientError returns true when this delete component not found response has a 4xx status code -func (o *DeleteComponentNotFound) IsClientError() bool { - return true -} - -// IsServerError returns true when this delete component not found response has a 5xx status code -func (o *DeleteComponentNotFound) IsServerError() bool { - return false -} - -// IsCode returns true when this delete component not found response a status code equal to that given -func (o *DeleteComponentNotFound) IsCode(code int) bool { - return code == 404 -} - -// Code gets the status code for the delete component not found response -func (o *DeleteComponentNotFound) Code() int { - return 404 -} - -func (o *DeleteComponentNotFound) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[DELETE /v1/components/{component_id}][%d] deleteComponentNotFound %s", 404, payload) -} - -func (o *DeleteComponentNotFound) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[DELETE /v1/components/{component_id}][%d] deleteComponentNotFound %s", 404, payload) -} - -func (o *DeleteComponentNotFound) GetPayload() *models.StderrErrResponse { - return o.Payload -} - -func (o *DeleteComponentNotFound) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.StderrErrResponse) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewDeleteComponentInternalServerError creates a DeleteComponentInternalServerError with default headers values -func NewDeleteComponentInternalServerError() *DeleteComponentInternalServerError { - return &DeleteComponentInternalServerError{} -} - -/* -DeleteComponentInternalServerError describes a response with status code 500, with default header values. - -Internal Server Error -*/ -type DeleteComponentInternalServerError struct { - Payload *models.StderrErrResponse -} - -// IsSuccess returns true when this delete component internal server error response has a 2xx status code -func (o *DeleteComponentInternalServerError) IsSuccess() bool { - return false -} - -// IsRedirect returns true when this delete component internal server error response has a 3xx status code -func (o *DeleteComponentInternalServerError) IsRedirect() bool { - return false -} - -// IsClientError returns true when this delete component internal server error response has a 4xx status code -func (o *DeleteComponentInternalServerError) IsClientError() bool { - return false -} - -// IsServerError returns true when this delete component internal server error response has a 5xx status code -func (o *DeleteComponentInternalServerError) IsServerError() bool { - return true -} - -// IsCode returns true when this delete component internal server error response a status code equal to that given -func (o *DeleteComponentInternalServerError) IsCode(code int) bool { - return code == 500 -} - -// Code gets the status code for the delete component internal server error response -func (o *DeleteComponentInternalServerError) Code() int { - return 500 -} - -func (o *DeleteComponentInternalServerError) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[DELETE /v1/components/{component_id}][%d] deleteComponentInternalServerError %s", 500, payload) -} - -func (o *DeleteComponentInternalServerError) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[DELETE /v1/components/{component_id}][%d] deleteComponentInternalServerError %s", 500, payload) -} - -func (o *DeleteComponentInternalServerError) GetPayload() *models.StderrErrResponse { - return o.Payload -} - -func (o *DeleteComponentInternalServerError) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.StderrErrResponse) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} diff --git a/client/operations/delete_install_parameters.go b/client/operations/delete_install_parameters.go deleted file mode 100644 index 76fee82..0000000 --- a/client/operations/delete_install_parameters.go +++ /dev/null @@ -1,151 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package operations - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "context" - "net/http" - "time" - - "github.com/go-openapi/errors" - "github.com/go-openapi/runtime" - cr "github.com/go-openapi/runtime/client" - "github.com/go-openapi/strfmt" -) - -// NewDeleteInstallParams creates a new DeleteInstallParams object, -// with the default timeout for this client. -// -// Default values are not hydrated, since defaults are normally applied by the API server side. -// -// To enforce default values in parameter, use SetDefaults or WithDefaults. -func NewDeleteInstallParams() *DeleteInstallParams { - return &DeleteInstallParams{ - timeout: cr.DefaultTimeout, - } -} - -// NewDeleteInstallParamsWithTimeout creates a new DeleteInstallParams object -// with the ability to set a timeout on a request. -func NewDeleteInstallParamsWithTimeout(timeout time.Duration) *DeleteInstallParams { - return &DeleteInstallParams{ - timeout: timeout, - } -} - -// NewDeleteInstallParamsWithContext creates a new DeleteInstallParams object -// with the ability to set a context for a request. -func NewDeleteInstallParamsWithContext(ctx context.Context) *DeleteInstallParams { - return &DeleteInstallParams{ - Context: ctx, - } -} - -// NewDeleteInstallParamsWithHTTPClient creates a new DeleteInstallParams object -// with the ability to set a custom HTTPClient for a request. -func NewDeleteInstallParamsWithHTTPClient(client *http.Client) *DeleteInstallParams { - return &DeleteInstallParams{ - HTTPClient: client, - } -} - -/* -DeleteInstallParams contains all the parameters to send to the API endpoint - - for the delete install operation. - - Typically these are written to a http.Request. -*/ -type DeleteInstallParams struct { - - /* InstallID. - - install ID - */ - InstallID string - - timeout time.Duration - Context context.Context - HTTPClient *http.Client -} - -// WithDefaults hydrates default values in the delete install params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *DeleteInstallParams) WithDefaults() *DeleteInstallParams { - o.SetDefaults() - return o -} - -// SetDefaults hydrates default values in the delete install params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *DeleteInstallParams) SetDefaults() { - // no default values defined for this parameter -} - -// WithTimeout adds the timeout to the delete install params -func (o *DeleteInstallParams) WithTimeout(timeout time.Duration) *DeleteInstallParams { - o.SetTimeout(timeout) - return o -} - -// SetTimeout adds the timeout to the delete install params -func (o *DeleteInstallParams) SetTimeout(timeout time.Duration) { - o.timeout = timeout -} - -// WithContext adds the context to the delete install params -func (o *DeleteInstallParams) WithContext(ctx context.Context) *DeleteInstallParams { - o.SetContext(ctx) - return o -} - -// SetContext adds the context to the delete install params -func (o *DeleteInstallParams) SetContext(ctx context.Context) { - o.Context = ctx -} - -// WithHTTPClient adds the HTTPClient to the delete install params -func (o *DeleteInstallParams) WithHTTPClient(client *http.Client) *DeleteInstallParams { - o.SetHTTPClient(client) - return o -} - -// SetHTTPClient adds the HTTPClient to the delete install params -func (o *DeleteInstallParams) SetHTTPClient(client *http.Client) { - o.HTTPClient = client -} - -// WithInstallID adds the installID to the delete install params -func (o *DeleteInstallParams) WithInstallID(installID string) *DeleteInstallParams { - o.SetInstallID(installID) - return o -} - -// SetInstallID adds the installId to the delete install params -func (o *DeleteInstallParams) SetInstallID(installID string) { - o.InstallID = installID -} - -// WriteToRequest writes these params to a swagger request -func (o *DeleteInstallParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { - - if err := r.SetTimeout(o.timeout); err != nil { - return err - } - var res []error - - // path param install_id - if err := r.SetPathParam("install_id", o.InstallID); err != nil { - return err - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} diff --git a/client/operations/delete_install_responses.go b/client/operations/delete_install_responses.go deleted file mode 100644 index 3403c91..0000000 --- a/client/operations/delete_install_responses.go +++ /dev/null @@ -1,484 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package operations - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "encoding/json" - "fmt" - "io" - - "github.com/go-openapi/runtime" - "github.com/go-openapi/strfmt" - - "github.com/nuonco/nuon-go/models" -) - -// DeleteInstallReader is a Reader for the DeleteInstall structure. -type DeleteInstallReader struct { - formats strfmt.Registry -} - -// ReadResponse reads a server response into the received o. -func (o *DeleteInstallReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { - switch response.Code() { - case 200: - result := NewDeleteInstallOK() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return result, nil - case 400: - result := NewDeleteInstallBadRequest() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return nil, result - case 401: - result := NewDeleteInstallUnauthorized() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return nil, result - case 403: - result := NewDeleteInstallForbidden() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return nil, result - case 404: - result := NewDeleteInstallNotFound() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return nil, result - case 500: - result := NewDeleteInstallInternalServerError() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return nil, result - default: - return nil, runtime.NewAPIError("[DELETE /v1/installs/{install_id}] DeleteInstall", response, response.Code()) - } -} - -// NewDeleteInstallOK creates a DeleteInstallOK with default headers values -func NewDeleteInstallOK() *DeleteInstallOK { - return &DeleteInstallOK{} -} - -/* -DeleteInstallOK describes a response with status code 200, with default header values. - -OK -*/ -type DeleteInstallOK struct { - Payload bool -} - -// IsSuccess returns true when this delete install o k response has a 2xx status code -func (o *DeleteInstallOK) IsSuccess() bool { - return true -} - -// IsRedirect returns true when this delete install o k response has a 3xx status code -func (o *DeleteInstallOK) IsRedirect() bool { - return false -} - -// IsClientError returns true when this delete install o k response has a 4xx status code -func (o *DeleteInstallOK) IsClientError() bool { - return false -} - -// IsServerError returns true when this delete install o k response has a 5xx status code -func (o *DeleteInstallOK) IsServerError() bool { - return false -} - -// IsCode returns true when this delete install o k response a status code equal to that given -func (o *DeleteInstallOK) IsCode(code int) bool { - return code == 200 -} - -// Code gets the status code for the delete install o k response -func (o *DeleteInstallOK) Code() int { - return 200 -} - -func (o *DeleteInstallOK) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[DELETE /v1/installs/{install_id}][%d] deleteInstallOK %s", 200, payload) -} - -func (o *DeleteInstallOK) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[DELETE /v1/installs/{install_id}][%d] deleteInstallOK %s", 200, payload) -} - -func (o *DeleteInstallOK) GetPayload() bool { - return o.Payload -} - -func (o *DeleteInstallOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - // response payload - if err := consumer.Consume(response.Body(), &o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewDeleteInstallBadRequest creates a DeleteInstallBadRequest with default headers values -func NewDeleteInstallBadRequest() *DeleteInstallBadRequest { - return &DeleteInstallBadRequest{} -} - -/* -DeleteInstallBadRequest describes a response with status code 400, with default header values. - -Bad Request -*/ -type DeleteInstallBadRequest struct { - Payload *models.StderrErrResponse -} - -// IsSuccess returns true when this delete install bad request response has a 2xx status code -func (o *DeleteInstallBadRequest) IsSuccess() bool { - return false -} - -// IsRedirect returns true when this delete install bad request response has a 3xx status code -func (o *DeleteInstallBadRequest) IsRedirect() bool { - return false -} - -// IsClientError returns true when this delete install bad request response has a 4xx status code -func (o *DeleteInstallBadRequest) IsClientError() bool { - return true -} - -// IsServerError returns true when this delete install bad request response has a 5xx status code -func (o *DeleteInstallBadRequest) IsServerError() bool { - return false -} - -// IsCode returns true when this delete install bad request response a status code equal to that given -func (o *DeleteInstallBadRequest) IsCode(code int) bool { - return code == 400 -} - -// Code gets the status code for the delete install bad request response -func (o *DeleteInstallBadRequest) Code() int { - return 400 -} - -func (o *DeleteInstallBadRequest) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[DELETE /v1/installs/{install_id}][%d] deleteInstallBadRequest %s", 400, payload) -} - -func (o *DeleteInstallBadRequest) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[DELETE /v1/installs/{install_id}][%d] deleteInstallBadRequest %s", 400, payload) -} - -func (o *DeleteInstallBadRequest) GetPayload() *models.StderrErrResponse { - return o.Payload -} - -func (o *DeleteInstallBadRequest) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.StderrErrResponse) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewDeleteInstallUnauthorized creates a DeleteInstallUnauthorized with default headers values -func NewDeleteInstallUnauthorized() *DeleteInstallUnauthorized { - return &DeleteInstallUnauthorized{} -} - -/* -DeleteInstallUnauthorized describes a response with status code 401, with default header values. - -Unauthorized -*/ -type DeleteInstallUnauthorized struct { - Payload *models.StderrErrResponse -} - -// IsSuccess returns true when this delete install unauthorized response has a 2xx status code -func (o *DeleteInstallUnauthorized) IsSuccess() bool { - return false -} - -// IsRedirect returns true when this delete install unauthorized response has a 3xx status code -func (o *DeleteInstallUnauthorized) IsRedirect() bool { - return false -} - -// IsClientError returns true when this delete install unauthorized response has a 4xx status code -func (o *DeleteInstallUnauthorized) IsClientError() bool { - return true -} - -// IsServerError returns true when this delete install unauthorized response has a 5xx status code -func (o *DeleteInstallUnauthorized) IsServerError() bool { - return false -} - -// IsCode returns true when this delete install unauthorized response a status code equal to that given -func (o *DeleteInstallUnauthorized) IsCode(code int) bool { - return code == 401 -} - -// Code gets the status code for the delete install unauthorized response -func (o *DeleteInstallUnauthorized) Code() int { - return 401 -} - -func (o *DeleteInstallUnauthorized) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[DELETE /v1/installs/{install_id}][%d] deleteInstallUnauthorized %s", 401, payload) -} - -func (o *DeleteInstallUnauthorized) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[DELETE /v1/installs/{install_id}][%d] deleteInstallUnauthorized %s", 401, payload) -} - -func (o *DeleteInstallUnauthorized) GetPayload() *models.StderrErrResponse { - return o.Payload -} - -func (o *DeleteInstallUnauthorized) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.StderrErrResponse) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewDeleteInstallForbidden creates a DeleteInstallForbidden with default headers values -func NewDeleteInstallForbidden() *DeleteInstallForbidden { - return &DeleteInstallForbidden{} -} - -/* -DeleteInstallForbidden describes a response with status code 403, with default header values. - -Forbidden -*/ -type DeleteInstallForbidden struct { - Payload *models.StderrErrResponse -} - -// IsSuccess returns true when this delete install forbidden response has a 2xx status code -func (o *DeleteInstallForbidden) IsSuccess() bool { - return false -} - -// IsRedirect returns true when this delete install forbidden response has a 3xx status code -func (o *DeleteInstallForbidden) IsRedirect() bool { - return false -} - -// IsClientError returns true when this delete install forbidden response has a 4xx status code -func (o *DeleteInstallForbidden) IsClientError() bool { - return true -} - -// IsServerError returns true when this delete install forbidden response has a 5xx status code -func (o *DeleteInstallForbidden) IsServerError() bool { - return false -} - -// IsCode returns true when this delete install forbidden response a status code equal to that given -func (o *DeleteInstallForbidden) IsCode(code int) bool { - return code == 403 -} - -// Code gets the status code for the delete install forbidden response -func (o *DeleteInstallForbidden) Code() int { - return 403 -} - -func (o *DeleteInstallForbidden) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[DELETE /v1/installs/{install_id}][%d] deleteInstallForbidden %s", 403, payload) -} - -func (o *DeleteInstallForbidden) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[DELETE /v1/installs/{install_id}][%d] deleteInstallForbidden %s", 403, payload) -} - -func (o *DeleteInstallForbidden) GetPayload() *models.StderrErrResponse { - return o.Payload -} - -func (o *DeleteInstallForbidden) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.StderrErrResponse) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewDeleteInstallNotFound creates a DeleteInstallNotFound with default headers values -func NewDeleteInstallNotFound() *DeleteInstallNotFound { - return &DeleteInstallNotFound{} -} - -/* -DeleteInstallNotFound describes a response with status code 404, with default header values. - -Not Found -*/ -type DeleteInstallNotFound struct { - Payload *models.StderrErrResponse -} - -// IsSuccess returns true when this delete install not found response has a 2xx status code -func (o *DeleteInstallNotFound) IsSuccess() bool { - return false -} - -// IsRedirect returns true when this delete install not found response has a 3xx status code -func (o *DeleteInstallNotFound) IsRedirect() bool { - return false -} - -// IsClientError returns true when this delete install not found response has a 4xx status code -func (o *DeleteInstallNotFound) IsClientError() bool { - return true -} - -// IsServerError returns true when this delete install not found response has a 5xx status code -func (o *DeleteInstallNotFound) IsServerError() bool { - return false -} - -// IsCode returns true when this delete install not found response a status code equal to that given -func (o *DeleteInstallNotFound) IsCode(code int) bool { - return code == 404 -} - -// Code gets the status code for the delete install not found response -func (o *DeleteInstallNotFound) Code() int { - return 404 -} - -func (o *DeleteInstallNotFound) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[DELETE /v1/installs/{install_id}][%d] deleteInstallNotFound %s", 404, payload) -} - -func (o *DeleteInstallNotFound) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[DELETE /v1/installs/{install_id}][%d] deleteInstallNotFound %s", 404, payload) -} - -func (o *DeleteInstallNotFound) GetPayload() *models.StderrErrResponse { - return o.Payload -} - -func (o *DeleteInstallNotFound) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.StderrErrResponse) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewDeleteInstallInternalServerError creates a DeleteInstallInternalServerError with default headers values -func NewDeleteInstallInternalServerError() *DeleteInstallInternalServerError { - return &DeleteInstallInternalServerError{} -} - -/* -DeleteInstallInternalServerError describes a response with status code 500, with default header values. - -Internal Server Error -*/ -type DeleteInstallInternalServerError struct { - Payload *models.StderrErrResponse -} - -// IsSuccess returns true when this delete install internal server error response has a 2xx status code -func (o *DeleteInstallInternalServerError) IsSuccess() bool { - return false -} - -// IsRedirect returns true when this delete install internal server error response has a 3xx status code -func (o *DeleteInstallInternalServerError) IsRedirect() bool { - return false -} - -// IsClientError returns true when this delete install internal server error response has a 4xx status code -func (o *DeleteInstallInternalServerError) IsClientError() bool { - return false -} - -// IsServerError returns true when this delete install internal server error response has a 5xx status code -func (o *DeleteInstallInternalServerError) IsServerError() bool { - return true -} - -// IsCode returns true when this delete install internal server error response a status code equal to that given -func (o *DeleteInstallInternalServerError) IsCode(code int) bool { - return code == 500 -} - -// Code gets the status code for the delete install internal server error response -func (o *DeleteInstallInternalServerError) Code() int { - return 500 -} - -func (o *DeleteInstallInternalServerError) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[DELETE /v1/installs/{install_id}][%d] deleteInstallInternalServerError %s", 500, payload) -} - -func (o *DeleteInstallInternalServerError) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[DELETE /v1/installs/{install_id}][%d] deleteInstallInternalServerError %s", 500, payload) -} - -func (o *DeleteInstallInternalServerError) GetPayload() *models.StderrErrResponse { - return o.Payload -} - -func (o *DeleteInstallInternalServerError) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.StderrErrResponse) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} diff --git a/client/operations/delete_installer_parameters.go b/client/operations/delete_installer_parameters.go deleted file mode 100644 index e21b2db..0000000 --- a/client/operations/delete_installer_parameters.go +++ /dev/null @@ -1,151 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package operations - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "context" - "net/http" - "time" - - "github.com/go-openapi/errors" - "github.com/go-openapi/runtime" - cr "github.com/go-openapi/runtime/client" - "github.com/go-openapi/strfmt" -) - -// NewDeleteInstallerParams creates a new DeleteInstallerParams object, -// with the default timeout for this client. -// -// Default values are not hydrated, since defaults are normally applied by the API server side. -// -// To enforce default values in parameter, use SetDefaults or WithDefaults. -func NewDeleteInstallerParams() *DeleteInstallerParams { - return &DeleteInstallerParams{ - timeout: cr.DefaultTimeout, - } -} - -// NewDeleteInstallerParamsWithTimeout creates a new DeleteInstallerParams object -// with the ability to set a timeout on a request. -func NewDeleteInstallerParamsWithTimeout(timeout time.Duration) *DeleteInstallerParams { - return &DeleteInstallerParams{ - timeout: timeout, - } -} - -// NewDeleteInstallerParamsWithContext creates a new DeleteInstallerParams object -// with the ability to set a context for a request. -func NewDeleteInstallerParamsWithContext(ctx context.Context) *DeleteInstallerParams { - return &DeleteInstallerParams{ - Context: ctx, - } -} - -// NewDeleteInstallerParamsWithHTTPClient creates a new DeleteInstallerParams object -// with the ability to set a custom HTTPClient for a request. -func NewDeleteInstallerParamsWithHTTPClient(client *http.Client) *DeleteInstallerParams { - return &DeleteInstallerParams{ - HTTPClient: client, - } -} - -/* -DeleteInstallerParams contains all the parameters to send to the API endpoint - - for the delete installer operation. - - Typically these are written to a http.Request. -*/ -type DeleteInstallerParams struct { - - /* InstallerID. - - installer ID - */ - InstallerID string - - timeout time.Duration - Context context.Context - HTTPClient *http.Client -} - -// WithDefaults hydrates default values in the delete installer params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *DeleteInstallerParams) WithDefaults() *DeleteInstallerParams { - o.SetDefaults() - return o -} - -// SetDefaults hydrates default values in the delete installer params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *DeleteInstallerParams) SetDefaults() { - // no default values defined for this parameter -} - -// WithTimeout adds the timeout to the delete installer params -func (o *DeleteInstallerParams) WithTimeout(timeout time.Duration) *DeleteInstallerParams { - o.SetTimeout(timeout) - return o -} - -// SetTimeout adds the timeout to the delete installer params -func (o *DeleteInstallerParams) SetTimeout(timeout time.Duration) { - o.timeout = timeout -} - -// WithContext adds the context to the delete installer params -func (o *DeleteInstallerParams) WithContext(ctx context.Context) *DeleteInstallerParams { - o.SetContext(ctx) - return o -} - -// SetContext adds the context to the delete installer params -func (o *DeleteInstallerParams) SetContext(ctx context.Context) { - o.Context = ctx -} - -// WithHTTPClient adds the HTTPClient to the delete installer params -func (o *DeleteInstallerParams) WithHTTPClient(client *http.Client) *DeleteInstallerParams { - o.SetHTTPClient(client) - return o -} - -// SetHTTPClient adds the HTTPClient to the delete installer params -func (o *DeleteInstallerParams) SetHTTPClient(client *http.Client) { - o.HTTPClient = client -} - -// WithInstallerID adds the installerID to the delete installer params -func (o *DeleteInstallerParams) WithInstallerID(installerID string) *DeleteInstallerParams { - o.SetInstallerID(installerID) - return o -} - -// SetInstallerID adds the installerId to the delete installer params -func (o *DeleteInstallerParams) SetInstallerID(installerID string) { - o.InstallerID = installerID -} - -// WriteToRequest writes these params to a swagger request -func (o *DeleteInstallerParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { - - if err := r.SetTimeout(o.timeout); err != nil { - return err - } - var res []error - - // path param installer_id - if err := r.SetPathParam("installer_id", o.InstallerID); err != nil { - return err - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} diff --git a/client/operations/delete_installer_responses.go b/client/operations/delete_installer_responses.go deleted file mode 100644 index 958b38a..0000000 --- a/client/operations/delete_installer_responses.go +++ /dev/null @@ -1,484 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package operations - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "encoding/json" - "fmt" - "io" - - "github.com/go-openapi/runtime" - "github.com/go-openapi/strfmt" - - "github.com/nuonco/nuon-go/models" -) - -// DeleteInstallerReader is a Reader for the DeleteInstaller structure. -type DeleteInstallerReader struct { - formats strfmt.Registry -} - -// ReadResponse reads a server response into the received o. -func (o *DeleteInstallerReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { - switch response.Code() { - case 200: - result := NewDeleteInstallerOK() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return result, nil - case 400: - result := NewDeleteInstallerBadRequest() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return nil, result - case 401: - result := NewDeleteInstallerUnauthorized() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return nil, result - case 403: - result := NewDeleteInstallerForbidden() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return nil, result - case 404: - result := NewDeleteInstallerNotFound() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return nil, result - case 500: - result := NewDeleteInstallerInternalServerError() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return nil, result - default: - return nil, runtime.NewAPIError("[DELETE /v1/installers/{installer_id}] DeleteInstaller", response, response.Code()) - } -} - -// NewDeleteInstallerOK creates a DeleteInstallerOK with default headers values -func NewDeleteInstallerOK() *DeleteInstallerOK { - return &DeleteInstallerOK{} -} - -/* -DeleteInstallerOK describes a response with status code 200, with default header values. - -OK -*/ -type DeleteInstallerOK struct { - Payload bool -} - -// IsSuccess returns true when this delete installer o k response has a 2xx status code -func (o *DeleteInstallerOK) IsSuccess() bool { - return true -} - -// IsRedirect returns true when this delete installer o k response has a 3xx status code -func (o *DeleteInstallerOK) IsRedirect() bool { - return false -} - -// IsClientError returns true when this delete installer o k response has a 4xx status code -func (o *DeleteInstallerOK) IsClientError() bool { - return false -} - -// IsServerError returns true when this delete installer o k response has a 5xx status code -func (o *DeleteInstallerOK) IsServerError() bool { - return false -} - -// IsCode returns true when this delete installer o k response a status code equal to that given -func (o *DeleteInstallerOK) IsCode(code int) bool { - return code == 200 -} - -// Code gets the status code for the delete installer o k response -func (o *DeleteInstallerOK) Code() int { - return 200 -} - -func (o *DeleteInstallerOK) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[DELETE /v1/installers/{installer_id}][%d] deleteInstallerOK %s", 200, payload) -} - -func (o *DeleteInstallerOK) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[DELETE /v1/installers/{installer_id}][%d] deleteInstallerOK %s", 200, payload) -} - -func (o *DeleteInstallerOK) GetPayload() bool { - return o.Payload -} - -func (o *DeleteInstallerOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - // response payload - if err := consumer.Consume(response.Body(), &o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewDeleteInstallerBadRequest creates a DeleteInstallerBadRequest with default headers values -func NewDeleteInstallerBadRequest() *DeleteInstallerBadRequest { - return &DeleteInstallerBadRequest{} -} - -/* -DeleteInstallerBadRequest describes a response with status code 400, with default header values. - -Bad Request -*/ -type DeleteInstallerBadRequest struct { - Payload *models.StderrErrResponse -} - -// IsSuccess returns true when this delete installer bad request response has a 2xx status code -func (o *DeleteInstallerBadRequest) IsSuccess() bool { - return false -} - -// IsRedirect returns true when this delete installer bad request response has a 3xx status code -func (o *DeleteInstallerBadRequest) IsRedirect() bool { - return false -} - -// IsClientError returns true when this delete installer bad request response has a 4xx status code -func (o *DeleteInstallerBadRequest) IsClientError() bool { - return true -} - -// IsServerError returns true when this delete installer bad request response has a 5xx status code -func (o *DeleteInstallerBadRequest) IsServerError() bool { - return false -} - -// IsCode returns true when this delete installer bad request response a status code equal to that given -func (o *DeleteInstallerBadRequest) IsCode(code int) bool { - return code == 400 -} - -// Code gets the status code for the delete installer bad request response -func (o *DeleteInstallerBadRequest) Code() int { - return 400 -} - -func (o *DeleteInstallerBadRequest) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[DELETE /v1/installers/{installer_id}][%d] deleteInstallerBadRequest %s", 400, payload) -} - -func (o *DeleteInstallerBadRequest) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[DELETE /v1/installers/{installer_id}][%d] deleteInstallerBadRequest %s", 400, payload) -} - -func (o *DeleteInstallerBadRequest) GetPayload() *models.StderrErrResponse { - return o.Payload -} - -func (o *DeleteInstallerBadRequest) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.StderrErrResponse) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewDeleteInstallerUnauthorized creates a DeleteInstallerUnauthorized with default headers values -func NewDeleteInstallerUnauthorized() *DeleteInstallerUnauthorized { - return &DeleteInstallerUnauthorized{} -} - -/* -DeleteInstallerUnauthorized describes a response with status code 401, with default header values. - -Unauthorized -*/ -type DeleteInstallerUnauthorized struct { - Payload *models.StderrErrResponse -} - -// IsSuccess returns true when this delete installer unauthorized response has a 2xx status code -func (o *DeleteInstallerUnauthorized) IsSuccess() bool { - return false -} - -// IsRedirect returns true when this delete installer unauthorized response has a 3xx status code -func (o *DeleteInstallerUnauthorized) IsRedirect() bool { - return false -} - -// IsClientError returns true when this delete installer unauthorized response has a 4xx status code -func (o *DeleteInstallerUnauthorized) IsClientError() bool { - return true -} - -// IsServerError returns true when this delete installer unauthorized response has a 5xx status code -func (o *DeleteInstallerUnauthorized) IsServerError() bool { - return false -} - -// IsCode returns true when this delete installer unauthorized response a status code equal to that given -func (o *DeleteInstallerUnauthorized) IsCode(code int) bool { - return code == 401 -} - -// Code gets the status code for the delete installer unauthorized response -func (o *DeleteInstallerUnauthorized) Code() int { - return 401 -} - -func (o *DeleteInstallerUnauthorized) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[DELETE /v1/installers/{installer_id}][%d] deleteInstallerUnauthorized %s", 401, payload) -} - -func (o *DeleteInstallerUnauthorized) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[DELETE /v1/installers/{installer_id}][%d] deleteInstallerUnauthorized %s", 401, payload) -} - -func (o *DeleteInstallerUnauthorized) GetPayload() *models.StderrErrResponse { - return o.Payload -} - -func (o *DeleteInstallerUnauthorized) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.StderrErrResponse) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewDeleteInstallerForbidden creates a DeleteInstallerForbidden with default headers values -func NewDeleteInstallerForbidden() *DeleteInstallerForbidden { - return &DeleteInstallerForbidden{} -} - -/* -DeleteInstallerForbidden describes a response with status code 403, with default header values. - -Forbidden -*/ -type DeleteInstallerForbidden struct { - Payload *models.StderrErrResponse -} - -// IsSuccess returns true when this delete installer forbidden response has a 2xx status code -func (o *DeleteInstallerForbidden) IsSuccess() bool { - return false -} - -// IsRedirect returns true when this delete installer forbidden response has a 3xx status code -func (o *DeleteInstallerForbidden) IsRedirect() bool { - return false -} - -// IsClientError returns true when this delete installer forbidden response has a 4xx status code -func (o *DeleteInstallerForbidden) IsClientError() bool { - return true -} - -// IsServerError returns true when this delete installer forbidden response has a 5xx status code -func (o *DeleteInstallerForbidden) IsServerError() bool { - return false -} - -// IsCode returns true when this delete installer forbidden response a status code equal to that given -func (o *DeleteInstallerForbidden) IsCode(code int) bool { - return code == 403 -} - -// Code gets the status code for the delete installer forbidden response -func (o *DeleteInstallerForbidden) Code() int { - return 403 -} - -func (o *DeleteInstallerForbidden) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[DELETE /v1/installers/{installer_id}][%d] deleteInstallerForbidden %s", 403, payload) -} - -func (o *DeleteInstallerForbidden) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[DELETE /v1/installers/{installer_id}][%d] deleteInstallerForbidden %s", 403, payload) -} - -func (o *DeleteInstallerForbidden) GetPayload() *models.StderrErrResponse { - return o.Payload -} - -func (o *DeleteInstallerForbidden) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.StderrErrResponse) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewDeleteInstallerNotFound creates a DeleteInstallerNotFound with default headers values -func NewDeleteInstallerNotFound() *DeleteInstallerNotFound { - return &DeleteInstallerNotFound{} -} - -/* -DeleteInstallerNotFound describes a response with status code 404, with default header values. - -Not Found -*/ -type DeleteInstallerNotFound struct { - Payload *models.StderrErrResponse -} - -// IsSuccess returns true when this delete installer not found response has a 2xx status code -func (o *DeleteInstallerNotFound) IsSuccess() bool { - return false -} - -// IsRedirect returns true when this delete installer not found response has a 3xx status code -func (o *DeleteInstallerNotFound) IsRedirect() bool { - return false -} - -// IsClientError returns true when this delete installer not found response has a 4xx status code -func (o *DeleteInstallerNotFound) IsClientError() bool { - return true -} - -// IsServerError returns true when this delete installer not found response has a 5xx status code -func (o *DeleteInstallerNotFound) IsServerError() bool { - return false -} - -// IsCode returns true when this delete installer not found response a status code equal to that given -func (o *DeleteInstallerNotFound) IsCode(code int) bool { - return code == 404 -} - -// Code gets the status code for the delete installer not found response -func (o *DeleteInstallerNotFound) Code() int { - return 404 -} - -func (o *DeleteInstallerNotFound) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[DELETE /v1/installers/{installer_id}][%d] deleteInstallerNotFound %s", 404, payload) -} - -func (o *DeleteInstallerNotFound) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[DELETE /v1/installers/{installer_id}][%d] deleteInstallerNotFound %s", 404, payload) -} - -func (o *DeleteInstallerNotFound) GetPayload() *models.StderrErrResponse { - return o.Payload -} - -func (o *DeleteInstallerNotFound) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.StderrErrResponse) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewDeleteInstallerInternalServerError creates a DeleteInstallerInternalServerError with default headers values -func NewDeleteInstallerInternalServerError() *DeleteInstallerInternalServerError { - return &DeleteInstallerInternalServerError{} -} - -/* -DeleteInstallerInternalServerError describes a response with status code 500, with default header values. - -Internal Server Error -*/ -type DeleteInstallerInternalServerError struct { - Payload *models.StderrErrResponse -} - -// IsSuccess returns true when this delete installer internal server error response has a 2xx status code -func (o *DeleteInstallerInternalServerError) IsSuccess() bool { - return false -} - -// IsRedirect returns true when this delete installer internal server error response has a 3xx status code -func (o *DeleteInstallerInternalServerError) IsRedirect() bool { - return false -} - -// IsClientError returns true when this delete installer internal server error response has a 4xx status code -func (o *DeleteInstallerInternalServerError) IsClientError() bool { - return false -} - -// IsServerError returns true when this delete installer internal server error response has a 5xx status code -func (o *DeleteInstallerInternalServerError) IsServerError() bool { - return true -} - -// IsCode returns true when this delete installer internal server error response a status code equal to that given -func (o *DeleteInstallerInternalServerError) IsCode(code int) bool { - return code == 500 -} - -// Code gets the status code for the delete installer internal server error response -func (o *DeleteInstallerInternalServerError) Code() int { - return 500 -} - -func (o *DeleteInstallerInternalServerError) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[DELETE /v1/installers/{installer_id}][%d] deleteInstallerInternalServerError %s", 500, payload) -} - -func (o *DeleteInstallerInternalServerError) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[DELETE /v1/installers/{installer_id}][%d] deleteInstallerInternalServerError %s", 500, payload) -} - -func (o *DeleteInstallerInternalServerError) GetPayload() *models.StderrErrResponse { - return o.Payload -} - -func (o *DeleteInstallerInternalServerError) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.StderrErrResponse) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} diff --git a/client/operations/delete_org_parameters.go b/client/operations/delete_org_parameters.go deleted file mode 100644 index 7387965..0000000 --- a/client/operations/delete_org_parameters.go +++ /dev/null @@ -1,128 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package operations - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "context" - "net/http" - "time" - - "github.com/go-openapi/errors" - "github.com/go-openapi/runtime" - cr "github.com/go-openapi/runtime/client" - "github.com/go-openapi/strfmt" -) - -// NewDeleteOrgParams creates a new DeleteOrgParams object, -// with the default timeout for this client. -// -// Default values are not hydrated, since defaults are normally applied by the API server side. -// -// To enforce default values in parameter, use SetDefaults or WithDefaults. -func NewDeleteOrgParams() *DeleteOrgParams { - return &DeleteOrgParams{ - timeout: cr.DefaultTimeout, - } -} - -// NewDeleteOrgParamsWithTimeout creates a new DeleteOrgParams object -// with the ability to set a timeout on a request. -func NewDeleteOrgParamsWithTimeout(timeout time.Duration) *DeleteOrgParams { - return &DeleteOrgParams{ - timeout: timeout, - } -} - -// NewDeleteOrgParamsWithContext creates a new DeleteOrgParams object -// with the ability to set a context for a request. -func NewDeleteOrgParamsWithContext(ctx context.Context) *DeleteOrgParams { - return &DeleteOrgParams{ - Context: ctx, - } -} - -// NewDeleteOrgParamsWithHTTPClient creates a new DeleteOrgParams object -// with the ability to set a custom HTTPClient for a request. -func NewDeleteOrgParamsWithHTTPClient(client *http.Client) *DeleteOrgParams { - return &DeleteOrgParams{ - HTTPClient: client, - } -} - -/* -DeleteOrgParams contains all the parameters to send to the API endpoint - - for the delete org operation. - - Typically these are written to a http.Request. -*/ -type DeleteOrgParams struct { - timeout time.Duration - Context context.Context - HTTPClient *http.Client -} - -// WithDefaults hydrates default values in the delete org params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *DeleteOrgParams) WithDefaults() *DeleteOrgParams { - o.SetDefaults() - return o -} - -// SetDefaults hydrates default values in the delete org params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *DeleteOrgParams) SetDefaults() { - // no default values defined for this parameter -} - -// WithTimeout adds the timeout to the delete org params -func (o *DeleteOrgParams) WithTimeout(timeout time.Duration) *DeleteOrgParams { - o.SetTimeout(timeout) - return o -} - -// SetTimeout adds the timeout to the delete org params -func (o *DeleteOrgParams) SetTimeout(timeout time.Duration) { - o.timeout = timeout -} - -// WithContext adds the context to the delete org params -func (o *DeleteOrgParams) WithContext(ctx context.Context) *DeleteOrgParams { - o.SetContext(ctx) - return o -} - -// SetContext adds the context to the delete org params -func (o *DeleteOrgParams) SetContext(ctx context.Context) { - o.Context = ctx -} - -// WithHTTPClient adds the HTTPClient to the delete org params -func (o *DeleteOrgParams) WithHTTPClient(client *http.Client) *DeleteOrgParams { - o.SetHTTPClient(client) - return o -} - -// SetHTTPClient adds the HTTPClient to the delete org params -func (o *DeleteOrgParams) SetHTTPClient(client *http.Client) { - o.HTTPClient = client -} - -// WriteToRequest writes these params to a swagger request -func (o *DeleteOrgParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { - - if err := r.SetTimeout(o.timeout); err != nil { - return err - } - var res []error - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} diff --git a/client/operations/delete_org_responses.go b/client/operations/delete_org_responses.go deleted file mode 100644 index 94c122a..0000000 --- a/client/operations/delete_org_responses.go +++ /dev/null @@ -1,484 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package operations - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "encoding/json" - "fmt" - "io" - - "github.com/go-openapi/runtime" - "github.com/go-openapi/strfmt" - - "github.com/nuonco/nuon-go/models" -) - -// DeleteOrgReader is a Reader for the DeleteOrg structure. -type DeleteOrgReader struct { - formats strfmt.Registry -} - -// ReadResponse reads a server response into the received o. -func (o *DeleteOrgReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { - switch response.Code() { - case 200: - result := NewDeleteOrgOK() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return result, nil - case 400: - result := NewDeleteOrgBadRequest() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return nil, result - case 401: - result := NewDeleteOrgUnauthorized() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return nil, result - case 403: - result := NewDeleteOrgForbidden() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return nil, result - case 404: - result := NewDeleteOrgNotFound() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return nil, result - case 500: - result := NewDeleteOrgInternalServerError() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return nil, result - default: - return nil, runtime.NewAPIError("[DELETE /v1/orgs/current] DeleteOrg", response, response.Code()) - } -} - -// NewDeleteOrgOK creates a DeleteOrgOK with default headers values -func NewDeleteOrgOK() *DeleteOrgOK { - return &DeleteOrgOK{} -} - -/* -DeleteOrgOK describes a response with status code 200, with default header values. - -OK -*/ -type DeleteOrgOK struct { - Payload bool -} - -// IsSuccess returns true when this delete org o k response has a 2xx status code -func (o *DeleteOrgOK) IsSuccess() bool { - return true -} - -// IsRedirect returns true when this delete org o k response has a 3xx status code -func (o *DeleteOrgOK) IsRedirect() bool { - return false -} - -// IsClientError returns true when this delete org o k response has a 4xx status code -func (o *DeleteOrgOK) IsClientError() bool { - return false -} - -// IsServerError returns true when this delete org o k response has a 5xx status code -func (o *DeleteOrgOK) IsServerError() bool { - return false -} - -// IsCode returns true when this delete org o k response a status code equal to that given -func (o *DeleteOrgOK) IsCode(code int) bool { - return code == 200 -} - -// Code gets the status code for the delete org o k response -func (o *DeleteOrgOK) Code() int { - return 200 -} - -func (o *DeleteOrgOK) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[DELETE /v1/orgs/current][%d] deleteOrgOK %s", 200, payload) -} - -func (o *DeleteOrgOK) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[DELETE /v1/orgs/current][%d] deleteOrgOK %s", 200, payload) -} - -func (o *DeleteOrgOK) GetPayload() bool { - return o.Payload -} - -func (o *DeleteOrgOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - // response payload - if err := consumer.Consume(response.Body(), &o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewDeleteOrgBadRequest creates a DeleteOrgBadRequest with default headers values -func NewDeleteOrgBadRequest() *DeleteOrgBadRequest { - return &DeleteOrgBadRequest{} -} - -/* -DeleteOrgBadRequest describes a response with status code 400, with default header values. - -Bad Request -*/ -type DeleteOrgBadRequest struct { - Payload *models.StderrErrResponse -} - -// IsSuccess returns true when this delete org bad request response has a 2xx status code -func (o *DeleteOrgBadRequest) IsSuccess() bool { - return false -} - -// IsRedirect returns true when this delete org bad request response has a 3xx status code -func (o *DeleteOrgBadRequest) IsRedirect() bool { - return false -} - -// IsClientError returns true when this delete org bad request response has a 4xx status code -func (o *DeleteOrgBadRequest) IsClientError() bool { - return true -} - -// IsServerError returns true when this delete org bad request response has a 5xx status code -func (o *DeleteOrgBadRequest) IsServerError() bool { - return false -} - -// IsCode returns true when this delete org bad request response a status code equal to that given -func (o *DeleteOrgBadRequest) IsCode(code int) bool { - return code == 400 -} - -// Code gets the status code for the delete org bad request response -func (o *DeleteOrgBadRequest) Code() int { - return 400 -} - -func (o *DeleteOrgBadRequest) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[DELETE /v1/orgs/current][%d] deleteOrgBadRequest %s", 400, payload) -} - -func (o *DeleteOrgBadRequest) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[DELETE /v1/orgs/current][%d] deleteOrgBadRequest %s", 400, payload) -} - -func (o *DeleteOrgBadRequest) GetPayload() *models.StderrErrResponse { - return o.Payload -} - -func (o *DeleteOrgBadRequest) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.StderrErrResponse) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewDeleteOrgUnauthorized creates a DeleteOrgUnauthorized with default headers values -func NewDeleteOrgUnauthorized() *DeleteOrgUnauthorized { - return &DeleteOrgUnauthorized{} -} - -/* -DeleteOrgUnauthorized describes a response with status code 401, with default header values. - -Unauthorized -*/ -type DeleteOrgUnauthorized struct { - Payload *models.StderrErrResponse -} - -// IsSuccess returns true when this delete org unauthorized response has a 2xx status code -func (o *DeleteOrgUnauthorized) IsSuccess() bool { - return false -} - -// IsRedirect returns true when this delete org unauthorized response has a 3xx status code -func (o *DeleteOrgUnauthorized) IsRedirect() bool { - return false -} - -// IsClientError returns true when this delete org unauthorized response has a 4xx status code -func (o *DeleteOrgUnauthorized) IsClientError() bool { - return true -} - -// IsServerError returns true when this delete org unauthorized response has a 5xx status code -func (o *DeleteOrgUnauthorized) IsServerError() bool { - return false -} - -// IsCode returns true when this delete org unauthorized response a status code equal to that given -func (o *DeleteOrgUnauthorized) IsCode(code int) bool { - return code == 401 -} - -// Code gets the status code for the delete org unauthorized response -func (o *DeleteOrgUnauthorized) Code() int { - return 401 -} - -func (o *DeleteOrgUnauthorized) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[DELETE /v1/orgs/current][%d] deleteOrgUnauthorized %s", 401, payload) -} - -func (o *DeleteOrgUnauthorized) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[DELETE /v1/orgs/current][%d] deleteOrgUnauthorized %s", 401, payload) -} - -func (o *DeleteOrgUnauthorized) GetPayload() *models.StderrErrResponse { - return o.Payload -} - -func (o *DeleteOrgUnauthorized) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.StderrErrResponse) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewDeleteOrgForbidden creates a DeleteOrgForbidden with default headers values -func NewDeleteOrgForbidden() *DeleteOrgForbidden { - return &DeleteOrgForbidden{} -} - -/* -DeleteOrgForbidden describes a response with status code 403, with default header values. - -Forbidden -*/ -type DeleteOrgForbidden struct { - Payload *models.StderrErrResponse -} - -// IsSuccess returns true when this delete org forbidden response has a 2xx status code -func (o *DeleteOrgForbidden) IsSuccess() bool { - return false -} - -// IsRedirect returns true when this delete org forbidden response has a 3xx status code -func (o *DeleteOrgForbidden) IsRedirect() bool { - return false -} - -// IsClientError returns true when this delete org forbidden response has a 4xx status code -func (o *DeleteOrgForbidden) IsClientError() bool { - return true -} - -// IsServerError returns true when this delete org forbidden response has a 5xx status code -func (o *DeleteOrgForbidden) IsServerError() bool { - return false -} - -// IsCode returns true when this delete org forbidden response a status code equal to that given -func (o *DeleteOrgForbidden) IsCode(code int) bool { - return code == 403 -} - -// Code gets the status code for the delete org forbidden response -func (o *DeleteOrgForbidden) Code() int { - return 403 -} - -func (o *DeleteOrgForbidden) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[DELETE /v1/orgs/current][%d] deleteOrgForbidden %s", 403, payload) -} - -func (o *DeleteOrgForbidden) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[DELETE /v1/orgs/current][%d] deleteOrgForbidden %s", 403, payload) -} - -func (o *DeleteOrgForbidden) GetPayload() *models.StderrErrResponse { - return o.Payload -} - -func (o *DeleteOrgForbidden) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.StderrErrResponse) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewDeleteOrgNotFound creates a DeleteOrgNotFound with default headers values -func NewDeleteOrgNotFound() *DeleteOrgNotFound { - return &DeleteOrgNotFound{} -} - -/* -DeleteOrgNotFound describes a response with status code 404, with default header values. - -Not Found -*/ -type DeleteOrgNotFound struct { - Payload *models.StderrErrResponse -} - -// IsSuccess returns true when this delete org not found response has a 2xx status code -func (o *DeleteOrgNotFound) IsSuccess() bool { - return false -} - -// IsRedirect returns true when this delete org not found response has a 3xx status code -func (o *DeleteOrgNotFound) IsRedirect() bool { - return false -} - -// IsClientError returns true when this delete org not found response has a 4xx status code -func (o *DeleteOrgNotFound) IsClientError() bool { - return true -} - -// IsServerError returns true when this delete org not found response has a 5xx status code -func (o *DeleteOrgNotFound) IsServerError() bool { - return false -} - -// IsCode returns true when this delete org not found response a status code equal to that given -func (o *DeleteOrgNotFound) IsCode(code int) bool { - return code == 404 -} - -// Code gets the status code for the delete org not found response -func (o *DeleteOrgNotFound) Code() int { - return 404 -} - -func (o *DeleteOrgNotFound) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[DELETE /v1/orgs/current][%d] deleteOrgNotFound %s", 404, payload) -} - -func (o *DeleteOrgNotFound) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[DELETE /v1/orgs/current][%d] deleteOrgNotFound %s", 404, payload) -} - -func (o *DeleteOrgNotFound) GetPayload() *models.StderrErrResponse { - return o.Payload -} - -func (o *DeleteOrgNotFound) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.StderrErrResponse) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewDeleteOrgInternalServerError creates a DeleteOrgInternalServerError with default headers values -func NewDeleteOrgInternalServerError() *DeleteOrgInternalServerError { - return &DeleteOrgInternalServerError{} -} - -/* -DeleteOrgInternalServerError describes a response with status code 500, with default header values. - -Internal Server Error -*/ -type DeleteOrgInternalServerError struct { - Payload *models.StderrErrResponse -} - -// IsSuccess returns true when this delete org internal server error response has a 2xx status code -func (o *DeleteOrgInternalServerError) IsSuccess() bool { - return false -} - -// IsRedirect returns true when this delete org internal server error response has a 3xx status code -func (o *DeleteOrgInternalServerError) IsRedirect() bool { - return false -} - -// IsClientError returns true when this delete org internal server error response has a 4xx status code -func (o *DeleteOrgInternalServerError) IsClientError() bool { - return false -} - -// IsServerError returns true when this delete org internal server error response has a 5xx status code -func (o *DeleteOrgInternalServerError) IsServerError() bool { - return true -} - -// IsCode returns true when this delete org internal server error response a status code equal to that given -func (o *DeleteOrgInternalServerError) IsCode(code int) bool { - return code == 500 -} - -// Code gets the status code for the delete org internal server error response -func (o *DeleteOrgInternalServerError) Code() int { - return 500 -} - -func (o *DeleteOrgInternalServerError) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[DELETE /v1/orgs/current][%d] deleteOrgInternalServerError %s", 500, payload) -} - -func (o *DeleteOrgInternalServerError) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[DELETE /v1/orgs/current][%d] deleteOrgInternalServerError %s", 500, payload) -} - -func (o *DeleteOrgInternalServerError) GetPayload() *models.StderrErrResponse { - return o.Payload -} - -func (o *DeleteOrgInternalServerError) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.StderrErrResponse) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} diff --git a/client/operations/deploy_install_components_parameters.go b/client/operations/deploy_install_components_parameters.go deleted file mode 100644 index 2301daf..0000000 --- a/client/operations/deploy_install_components_parameters.go +++ /dev/null @@ -1,175 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package operations - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "context" - "net/http" - "time" - - "github.com/go-openapi/errors" - "github.com/go-openapi/runtime" - cr "github.com/go-openapi/runtime/client" - "github.com/go-openapi/strfmt" - - "github.com/nuonco/nuon-go/models" -) - -// NewDeployInstallComponentsParams creates a new DeployInstallComponentsParams object, -// with the default timeout for this client. -// -// Default values are not hydrated, since defaults are normally applied by the API server side. -// -// To enforce default values in parameter, use SetDefaults or WithDefaults. -func NewDeployInstallComponentsParams() *DeployInstallComponentsParams { - return &DeployInstallComponentsParams{ - timeout: cr.DefaultTimeout, - } -} - -// NewDeployInstallComponentsParamsWithTimeout creates a new DeployInstallComponentsParams object -// with the ability to set a timeout on a request. -func NewDeployInstallComponentsParamsWithTimeout(timeout time.Duration) *DeployInstallComponentsParams { - return &DeployInstallComponentsParams{ - timeout: timeout, - } -} - -// NewDeployInstallComponentsParamsWithContext creates a new DeployInstallComponentsParams object -// with the ability to set a context for a request. -func NewDeployInstallComponentsParamsWithContext(ctx context.Context) *DeployInstallComponentsParams { - return &DeployInstallComponentsParams{ - Context: ctx, - } -} - -// NewDeployInstallComponentsParamsWithHTTPClient creates a new DeployInstallComponentsParams object -// with the ability to set a custom HTTPClient for a request. -func NewDeployInstallComponentsParamsWithHTTPClient(client *http.Client) *DeployInstallComponentsParams { - return &DeployInstallComponentsParams{ - HTTPClient: client, - } -} - -/* -DeployInstallComponentsParams contains all the parameters to send to the API endpoint - - for the deploy install components operation. - - Typically these are written to a http.Request. -*/ -type DeployInstallComponentsParams struct { - - /* InstallID. - - install ID - */ - InstallID string - - /* Req. - - Input - */ - Req models.ServiceDeployInstallComponentsRequest - - timeout time.Duration - Context context.Context - HTTPClient *http.Client -} - -// WithDefaults hydrates default values in the deploy install components params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *DeployInstallComponentsParams) WithDefaults() *DeployInstallComponentsParams { - o.SetDefaults() - return o -} - -// SetDefaults hydrates default values in the deploy install components params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *DeployInstallComponentsParams) SetDefaults() { - // no default values defined for this parameter -} - -// WithTimeout adds the timeout to the deploy install components params -func (o *DeployInstallComponentsParams) WithTimeout(timeout time.Duration) *DeployInstallComponentsParams { - o.SetTimeout(timeout) - return o -} - -// SetTimeout adds the timeout to the deploy install components params -func (o *DeployInstallComponentsParams) SetTimeout(timeout time.Duration) { - o.timeout = timeout -} - -// WithContext adds the context to the deploy install components params -func (o *DeployInstallComponentsParams) WithContext(ctx context.Context) *DeployInstallComponentsParams { - o.SetContext(ctx) - return o -} - -// SetContext adds the context to the deploy install components params -func (o *DeployInstallComponentsParams) SetContext(ctx context.Context) { - o.Context = ctx -} - -// WithHTTPClient adds the HTTPClient to the deploy install components params -func (o *DeployInstallComponentsParams) WithHTTPClient(client *http.Client) *DeployInstallComponentsParams { - o.SetHTTPClient(client) - return o -} - -// SetHTTPClient adds the HTTPClient to the deploy install components params -func (o *DeployInstallComponentsParams) SetHTTPClient(client *http.Client) { - o.HTTPClient = client -} - -// WithInstallID adds the installID to the deploy install components params -func (o *DeployInstallComponentsParams) WithInstallID(installID string) *DeployInstallComponentsParams { - o.SetInstallID(installID) - return o -} - -// SetInstallID adds the installId to the deploy install components params -func (o *DeployInstallComponentsParams) SetInstallID(installID string) { - o.InstallID = installID -} - -// WithReq adds the req to the deploy install components params -func (o *DeployInstallComponentsParams) WithReq(req models.ServiceDeployInstallComponentsRequest) *DeployInstallComponentsParams { - o.SetReq(req) - return o -} - -// SetReq adds the req to the deploy install components params -func (o *DeployInstallComponentsParams) SetReq(req models.ServiceDeployInstallComponentsRequest) { - o.Req = req -} - -// WriteToRequest writes these params to a swagger request -func (o *DeployInstallComponentsParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { - - if err := r.SetTimeout(o.timeout); err != nil { - return err - } - var res []error - - // path param install_id - if err := r.SetPathParam("install_id", o.InstallID); err != nil { - return err - } - if o.Req != nil { - if err := r.SetBodyParam(o.Req); err != nil { - return err - } - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} diff --git a/client/operations/deploy_install_components_responses.go b/client/operations/deploy_install_components_responses.go deleted file mode 100644 index bf29518..0000000 --- a/client/operations/deploy_install_components_responses.go +++ /dev/null @@ -1,484 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package operations - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "encoding/json" - "fmt" - "io" - - "github.com/go-openapi/runtime" - "github.com/go-openapi/strfmt" - - "github.com/nuonco/nuon-go/models" -) - -// DeployInstallComponentsReader is a Reader for the DeployInstallComponents structure. -type DeployInstallComponentsReader struct { - formats strfmt.Registry -} - -// ReadResponse reads a server response into the received o. -func (o *DeployInstallComponentsReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { - switch response.Code() { - case 201: - result := NewDeployInstallComponentsCreated() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return result, nil - case 400: - result := NewDeployInstallComponentsBadRequest() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return nil, result - case 401: - result := NewDeployInstallComponentsUnauthorized() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return nil, result - case 403: - result := NewDeployInstallComponentsForbidden() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return nil, result - case 404: - result := NewDeployInstallComponentsNotFound() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return nil, result - case 500: - result := NewDeployInstallComponentsInternalServerError() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return nil, result - default: - return nil, runtime.NewAPIError("[POST /v1/installs/{install_id}/components/deploy-all] DeployInstallComponents", response, response.Code()) - } -} - -// NewDeployInstallComponentsCreated creates a DeployInstallComponentsCreated with default headers values -func NewDeployInstallComponentsCreated() *DeployInstallComponentsCreated { - return &DeployInstallComponentsCreated{} -} - -/* -DeployInstallComponentsCreated describes a response with status code 201, with default header values. - -Created -*/ -type DeployInstallComponentsCreated struct { - Payload string -} - -// IsSuccess returns true when this deploy install components created response has a 2xx status code -func (o *DeployInstallComponentsCreated) IsSuccess() bool { - return true -} - -// IsRedirect returns true when this deploy install components created response has a 3xx status code -func (o *DeployInstallComponentsCreated) IsRedirect() bool { - return false -} - -// IsClientError returns true when this deploy install components created response has a 4xx status code -func (o *DeployInstallComponentsCreated) IsClientError() bool { - return false -} - -// IsServerError returns true when this deploy install components created response has a 5xx status code -func (o *DeployInstallComponentsCreated) IsServerError() bool { - return false -} - -// IsCode returns true when this deploy install components created response a status code equal to that given -func (o *DeployInstallComponentsCreated) IsCode(code int) bool { - return code == 201 -} - -// Code gets the status code for the deploy install components created response -func (o *DeployInstallComponentsCreated) Code() int { - return 201 -} - -func (o *DeployInstallComponentsCreated) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[POST /v1/installs/{install_id}/components/deploy-all][%d] deployInstallComponentsCreated %s", 201, payload) -} - -func (o *DeployInstallComponentsCreated) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[POST /v1/installs/{install_id}/components/deploy-all][%d] deployInstallComponentsCreated %s", 201, payload) -} - -func (o *DeployInstallComponentsCreated) GetPayload() string { - return o.Payload -} - -func (o *DeployInstallComponentsCreated) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - // response payload - if err := consumer.Consume(response.Body(), &o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewDeployInstallComponentsBadRequest creates a DeployInstallComponentsBadRequest with default headers values -func NewDeployInstallComponentsBadRequest() *DeployInstallComponentsBadRequest { - return &DeployInstallComponentsBadRequest{} -} - -/* -DeployInstallComponentsBadRequest describes a response with status code 400, with default header values. - -Bad Request -*/ -type DeployInstallComponentsBadRequest struct { - Payload *models.StderrErrResponse -} - -// IsSuccess returns true when this deploy install components bad request response has a 2xx status code -func (o *DeployInstallComponentsBadRequest) IsSuccess() bool { - return false -} - -// IsRedirect returns true when this deploy install components bad request response has a 3xx status code -func (o *DeployInstallComponentsBadRequest) IsRedirect() bool { - return false -} - -// IsClientError returns true when this deploy install components bad request response has a 4xx status code -func (o *DeployInstallComponentsBadRequest) IsClientError() bool { - return true -} - -// IsServerError returns true when this deploy install components bad request response has a 5xx status code -func (o *DeployInstallComponentsBadRequest) IsServerError() bool { - return false -} - -// IsCode returns true when this deploy install components bad request response a status code equal to that given -func (o *DeployInstallComponentsBadRequest) IsCode(code int) bool { - return code == 400 -} - -// Code gets the status code for the deploy install components bad request response -func (o *DeployInstallComponentsBadRequest) Code() int { - return 400 -} - -func (o *DeployInstallComponentsBadRequest) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[POST /v1/installs/{install_id}/components/deploy-all][%d] deployInstallComponentsBadRequest %s", 400, payload) -} - -func (o *DeployInstallComponentsBadRequest) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[POST /v1/installs/{install_id}/components/deploy-all][%d] deployInstallComponentsBadRequest %s", 400, payload) -} - -func (o *DeployInstallComponentsBadRequest) GetPayload() *models.StderrErrResponse { - return o.Payload -} - -func (o *DeployInstallComponentsBadRequest) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.StderrErrResponse) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewDeployInstallComponentsUnauthorized creates a DeployInstallComponentsUnauthorized with default headers values -func NewDeployInstallComponentsUnauthorized() *DeployInstallComponentsUnauthorized { - return &DeployInstallComponentsUnauthorized{} -} - -/* -DeployInstallComponentsUnauthorized describes a response with status code 401, with default header values. - -Unauthorized -*/ -type DeployInstallComponentsUnauthorized struct { - Payload *models.StderrErrResponse -} - -// IsSuccess returns true when this deploy install components unauthorized response has a 2xx status code -func (o *DeployInstallComponentsUnauthorized) IsSuccess() bool { - return false -} - -// IsRedirect returns true when this deploy install components unauthorized response has a 3xx status code -func (o *DeployInstallComponentsUnauthorized) IsRedirect() bool { - return false -} - -// IsClientError returns true when this deploy install components unauthorized response has a 4xx status code -func (o *DeployInstallComponentsUnauthorized) IsClientError() bool { - return true -} - -// IsServerError returns true when this deploy install components unauthorized response has a 5xx status code -func (o *DeployInstallComponentsUnauthorized) IsServerError() bool { - return false -} - -// IsCode returns true when this deploy install components unauthorized response a status code equal to that given -func (o *DeployInstallComponentsUnauthorized) IsCode(code int) bool { - return code == 401 -} - -// Code gets the status code for the deploy install components unauthorized response -func (o *DeployInstallComponentsUnauthorized) Code() int { - return 401 -} - -func (o *DeployInstallComponentsUnauthorized) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[POST /v1/installs/{install_id}/components/deploy-all][%d] deployInstallComponentsUnauthorized %s", 401, payload) -} - -func (o *DeployInstallComponentsUnauthorized) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[POST /v1/installs/{install_id}/components/deploy-all][%d] deployInstallComponentsUnauthorized %s", 401, payload) -} - -func (o *DeployInstallComponentsUnauthorized) GetPayload() *models.StderrErrResponse { - return o.Payload -} - -func (o *DeployInstallComponentsUnauthorized) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.StderrErrResponse) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewDeployInstallComponentsForbidden creates a DeployInstallComponentsForbidden with default headers values -func NewDeployInstallComponentsForbidden() *DeployInstallComponentsForbidden { - return &DeployInstallComponentsForbidden{} -} - -/* -DeployInstallComponentsForbidden describes a response with status code 403, with default header values. - -Forbidden -*/ -type DeployInstallComponentsForbidden struct { - Payload *models.StderrErrResponse -} - -// IsSuccess returns true when this deploy install components forbidden response has a 2xx status code -func (o *DeployInstallComponentsForbidden) IsSuccess() bool { - return false -} - -// IsRedirect returns true when this deploy install components forbidden response has a 3xx status code -func (o *DeployInstallComponentsForbidden) IsRedirect() bool { - return false -} - -// IsClientError returns true when this deploy install components forbidden response has a 4xx status code -func (o *DeployInstallComponentsForbidden) IsClientError() bool { - return true -} - -// IsServerError returns true when this deploy install components forbidden response has a 5xx status code -func (o *DeployInstallComponentsForbidden) IsServerError() bool { - return false -} - -// IsCode returns true when this deploy install components forbidden response a status code equal to that given -func (o *DeployInstallComponentsForbidden) IsCode(code int) bool { - return code == 403 -} - -// Code gets the status code for the deploy install components forbidden response -func (o *DeployInstallComponentsForbidden) Code() int { - return 403 -} - -func (o *DeployInstallComponentsForbidden) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[POST /v1/installs/{install_id}/components/deploy-all][%d] deployInstallComponentsForbidden %s", 403, payload) -} - -func (o *DeployInstallComponentsForbidden) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[POST /v1/installs/{install_id}/components/deploy-all][%d] deployInstallComponentsForbidden %s", 403, payload) -} - -func (o *DeployInstallComponentsForbidden) GetPayload() *models.StderrErrResponse { - return o.Payload -} - -func (o *DeployInstallComponentsForbidden) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.StderrErrResponse) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewDeployInstallComponentsNotFound creates a DeployInstallComponentsNotFound with default headers values -func NewDeployInstallComponentsNotFound() *DeployInstallComponentsNotFound { - return &DeployInstallComponentsNotFound{} -} - -/* -DeployInstallComponentsNotFound describes a response with status code 404, with default header values. - -Not Found -*/ -type DeployInstallComponentsNotFound struct { - Payload *models.StderrErrResponse -} - -// IsSuccess returns true when this deploy install components not found response has a 2xx status code -func (o *DeployInstallComponentsNotFound) IsSuccess() bool { - return false -} - -// IsRedirect returns true when this deploy install components not found response has a 3xx status code -func (o *DeployInstallComponentsNotFound) IsRedirect() bool { - return false -} - -// IsClientError returns true when this deploy install components not found response has a 4xx status code -func (o *DeployInstallComponentsNotFound) IsClientError() bool { - return true -} - -// IsServerError returns true when this deploy install components not found response has a 5xx status code -func (o *DeployInstallComponentsNotFound) IsServerError() bool { - return false -} - -// IsCode returns true when this deploy install components not found response a status code equal to that given -func (o *DeployInstallComponentsNotFound) IsCode(code int) bool { - return code == 404 -} - -// Code gets the status code for the deploy install components not found response -func (o *DeployInstallComponentsNotFound) Code() int { - return 404 -} - -func (o *DeployInstallComponentsNotFound) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[POST /v1/installs/{install_id}/components/deploy-all][%d] deployInstallComponentsNotFound %s", 404, payload) -} - -func (o *DeployInstallComponentsNotFound) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[POST /v1/installs/{install_id}/components/deploy-all][%d] deployInstallComponentsNotFound %s", 404, payload) -} - -func (o *DeployInstallComponentsNotFound) GetPayload() *models.StderrErrResponse { - return o.Payload -} - -func (o *DeployInstallComponentsNotFound) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.StderrErrResponse) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewDeployInstallComponentsInternalServerError creates a DeployInstallComponentsInternalServerError with default headers values -func NewDeployInstallComponentsInternalServerError() *DeployInstallComponentsInternalServerError { - return &DeployInstallComponentsInternalServerError{} -} - -/* -DeployInstallComponentsInternalServerError describes a response with status code 500, with default header values. - -Internal Server Error -*/ -type DeployInstallComponentsInternalServerError struct { - Payload *models.StderrErrResponse -} - -// IsSuccess returns true when this deploy install components internal server error response has a 2xx status code -func (o *DeployInstallComponentsInternalServerError) IsSuccess() bool { - return false -} - -// IsRedirect returns true when this deploy install components internal server error response has a 3xx status code -func (o *DeployInstallComponentsInternalServerError) IsRedirect() bool { - return false -} - -// IsClientError returns true when this deploy install components internal server error response has a 4xx status code -func (o *DeployInstallComponentsInternalServerError) IsClientError() bool { - return false -} - -// IsServerError returns true when this deploy install components internal server error response has a 5xx status code -func (o *DeployInstallComponentsInternalServerError) IsServerError() bool { - return true -} - -// IsCode returns true when this deploy install components internal server error response a status code equal to that given -func (o *DeployInstallComponentsInternalServerError) IsCode(code int) bool { - return code == 500 -} - -// Code gets the status code for the deploy install components internal server error response -func (o *DeployInstallComponentsInternalServerError) Code() int { - return 500 -} - -func (o *DeployInstallComponentsInternalServerError) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[POST /v1/installs/{install_id}/components/deploy-all][%d] deployInstallComponentsInternalServerError %s", 500, payload) -} - -func (o *DeployInstallComponentsInternalServerError) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[POST /v1/installs/{install_id}/components/deploy-all][%d] deployInstallComponentsInternalServerError %s", 500, payload) -} - -func (o *DeployInstallComponentsInternalServerError) GetPayload() *models.StderrErrResponse { - return o.Payload -} - -func (o *DeployInstallComponentsInternalServerError) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.StderrErrResponse) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} diff --git a/client/operations/deprovision_install_parameters.go b/client/operations/deprovision_install_parameters.go deleted file mode 100644 index 8c8aa0d..0000000 --- a/client/operations/deprovision_install_parameters.go +++ /dev/null @@ -1,175 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package operations - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "context" - "net/http" - "time" - - "github.com/go-openapi/errors" - "github.com/go-openapi/runtime" - cr "github.com/go-openapi/runtime/client" - "github.com/go-openapi/strfmt" - - "github.com/nuonco/nuon-go/models" -) - -// NewDeprovisionInstallParams creates a new DeprovisionInstallParams object, -// with the default timeout for this client. -// -// Default values are not hydrated, since defaults are normally applied by the API server side. -// -// To enforce default values in parameter, use SetDefaults or WithDefaults. -func NewDeprovisionInstallParams() *DeprovisionInstallParams { - return &DeprovisionInstallParams{ - timeout: cr.DefaultTimeout, - } -} - -// NewDeprovisionInstallParamsWithTimeout creates a new DeprovisionInstallParams object -// with the ability to set a timeout on a request. -func NewDeprovisionInstallParamsWithTimeout(timeout time.Duration) *DeprovisionInstallParams { - return &DeprovisionInstallParams{ - timeout: timeout, - } -} - -// NewDeprovisionInstallParamsWithContext creates a new DeprovisionInstallParams object -// with the ability to set a context for a request. -func NewDeprovisionInstallParamsWithContext(ctx context.Context) *DeprovisionInstallParams { - return &DeprovisionInstallParams{ - Context: ctx, - } -} - -// NewDeprovisionInstallParamsWithHTTPClient creates a new DeprovisionInstallParams object -// with the ability to set a custom HTTPClient for a request. -func NewDeprovisionInstallParamsWithHTTPClient(client *http.Client) *DeprovisionInstallParams { - return &DeprovisionInstallParams{ - HTTPClient: client, - } -} - -/* -DeprovisionInstallParams contains all the parameters to send to the API endpoint - - for the deprovision install operation. - - Typically these are written to a http.Request. -*/ -type DeprovisionInstallParams struct { - - /* InstallID. - - install ID - */ - InstallID string - - /* Req. - - Input - */ - Req models.ServiceDeprovisionInstallRequest - - timeout time.Duration - Context context.Context - HTTPClient *http.Client -} - -// WithDefaults hydrates default values in the deprovision install params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *DeprovisionInstallParams) WithDefaults() *DeprovisionInstallParams { - o.SetDefaults() - return o -} - -// SetDefaults hydrates default values in the deprovision install params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *DeprovisionInstallParams) SetDefaults() { - // no default values defined for this parameter -} - -// WithTimeout adds the timeout to the deprovision install params -func (o *DeprovisionInstallParams) WithTimeout(timeout time.Duration) *DeprovisionInstallParams { - o.SetTimeout(timeout) - return o -} - -// SetTimeout adds the timeout to the deprovision install params -func (o *DeprovisionInstallParams) SetTimeout(timeout time.Duration) { - o.timeout = timeout -} - -// WithContext adds the context to the deprovision install params -func (o *DeprovisionInstallParams) WithContext(ctx context.Context) *DeprovisionInstallParams { - o.SetContext(ctx) - return o -} - -// SetContext adds the context to the deprovision install params -func (o *DeprovisionInstallParams) SetContext(ctx context.Context) { - o.Context = ctx -} - -// WithHTTPClient adds the HTTPClient to the deprovision install params -func (o *DeprovisionInstallParams) WithHTTPClient(client *http.Client) *DeprovisionInstallParams { - o.SetHTTPClient(client) - return o -} - -// SetHTTPClient adds the HTTPClient to the deprovision install params -func (o *DeprovisionInstallParams) SetHTTPClient(client *http.Client) { - o.HTTPClient = client -} - -// WithInstallID adds the installID to the deprovision install params -func (o *DeprovisionInstallParams) WithInstallID(installID string) *DeprovisionInstallParams { - o.SetInstallID(installID) - return o -} - -// SetInstallID adds the installId to the deprovision install params -func (o *DeprovisionInstallParams) SetInstallID(installID string) { - o.InstallID = installID -} - -// WithReq adds the req to the deprovision install params -func (o *DeprovisionInstallParams) WithReq(req models.ServiceDeprovisionInstallRequest) *DeprovisionInstallParams { - o.SetReq(req) - return o -} - -// SetReq adds the req to the deprovision install params -func (o *DeprovisionInstallParams) SetReq(req models.ServiceDeprovisionInstallRequest) { - o.Req = req -} - -// WriteToRequest writes these params to a swagger request -func (o *DeprovisionInstallParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { - - if err := r.SetTimeout(o.timeout); err != nil { - return err - } - var res []error - - // path param install_id - if err := r.SetPathParam("install_id", o.InstallID); err != nil { - return err - } - if o.Req != nil { - if err := r.SetBodyParam(o.Req); err != nil { - return err - } - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} diff --git a/client/operations/deprovision_install_responses.go b/client/operations/deprovision_install_responses.go deleted file mode 100644 index 77ec5fb..0000000 --- a/client/operations/deprovision_install_responses.go +++ /dev/null @@ -1,484 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package operations - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "encoding/json" - "fmt" - "io" - - "github.com/go-openapi/runtime" - "github.com/go-openapi/strfmt" - - "github.com/nuonco/nuon-go/models" -) - -// DeprovisionInstallReader is a Reader for the DeprovisionInstall structure. -type DeprovisionInstallReader struct { - formats strfmt.Registry -} - -// ReadResponse reads a server response into the received o. -func (o *DeprovisionInstallReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { - switch response.Code() { - case 201: - result := NewDeprovisionInstallCreated() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return result, nil - case 400: - result := NewDeprovisionInstallBadRequest() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return nil, result - case 401: - result := NewDeprovisionInstallUnauthorized() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return nil, result - case 403: - result := NewDeprovisionInstallForbidden() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return nil, result - case 404: - result := NewDeprovisionInstallNotFound() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return nil, result - case 500: - result := NewDeprovisionInstallInternalServerError() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return nil, result - default: - return nil, runtime.NewAPIError("[POST /v1/installs/{install_id}/deprovision] DeprovisionInstall", response, response.Code()) - } -} - -// NewDeprovisionInstallCreated creates a DeprovisionInstallCreated with default headers values -func NewDeprovisionInstallCreated() *DeprovisionInstallCreated { - return &DeprovisionInstallCreated{} -} - -/* -DeprovisionInstallCreated describes a response with status code 201, with default header values. - -Created -*/ -type DeprovisionInstallCreated struct { - Payload string -} - -// IsSuccess returns true when this deprovision install created response has a 2xx status code -func (o *DeprovisionInstallCreated) IsSuccess() bool { - return true -} - -// IsRedirect returns true when this deprovision install created response has a 3xx status code -func (o *DeprovisionInstallCreated) IsRedirect() bool { - return false -} - -// IsClientError returns true when this deprovision install created response has a 4xx status code -func (o *DeprovisionInstallCreated) IsClientError() bool { - return false -} - -// IsServerError returns true when this deprovision install created response has a 5xx status code -func (o *DeprovisionInstallCreated) IsServerError() bool { - return false -} - -// IsCode returns true when this deprovision install created response a status code equal to that given -func (o *DeprovisionInstallCreated) IsCode(code int) bool { - return code == 201 -} - -// Code gets the status code for the deprovision install created response -func (o *DeprovisionInstallCreated) Code() int { - return 201 -} - -func (o *DeprovisionInstallCreated) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[POST /v1/installs/{install_id}/deprovision][%d] deprovisionInstallCreated %s", 201, payload) -} - -func (o *DeprovisionInstallCreated) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[POST /v1/installs/{install_id}/deprovision][%d] deprovisionInstallCreated %s", 201, payload) -} - -func (o *DeprovisionInstallCreated) GetPayload() string { - return o.Payload -} - -func (o *DeprovisionInstallCreated) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - // response payload - if err := consumer.Consume(response.Body(), &o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewDeprovisionInstallBadRequest creates a DeprovisionInstallBadRequest with default headers values -func NewDeprovisionInstallBadRequest() *DeprovisionInstallBadRequest { - return &DeprovisionInstallBadRequest{} -} - -/* -DeprovisionInstallBadRequest describes a response with status code 400, with default header values. - -Bad Request -*/ -type DeprovisionInstallBadRequest struct { - Payload *models.StderrErrResponse -} - -// IsSuccess returns true when this deprovision install bad request response has a 2xx status code -func (o *DeprovisionInstallBadRequest) IsSuccess() bool { - return false -} - -// IsRedirect returns true when this deprovision install bad request response has a 3xx status code -func (o *DeprovisionInstallBadRequest) IsRedirect() bool { - return false -} - -// IsClientError returns true when this deprovision install bad request response has a 4xx status code -func (o *DeprovisionInstallBadRequest) IsClientError() bool { - return true -} - -// IsServerError returns true when this deprovision install bad request response has a 5xx status code -func (o *DeprovisionInstallBadRequest) IsServerError() bool { - return false -} - -// IsCode returns true when this deprovision install bad request response a status code equal to that given -func (o *DeprovisionInstallBadRequest) IsCode(code int) bool { - return code == 400 -} - -// Code gets the status code for the deprovision install bad request response -func (o *DeprovisionInstallBadRequest) Code() int { - return 400 -} - -func (o *DeprovisionInstallBadRequest) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[POST /v1/installs/{install_id}/deprovision][%d] deprovisionInstallBadRequest %s", 400, payload) -} - -func (o *DeprovisionInstallBadRequest) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[POST /v1/installs/{install_id}/deprovision][%d] deprovisionInstallBadRequest %s", 400, payload) -} - -func (o *DeprovisionInstallBadRequest) GetPayload() *models.StderrErrResponse { - return o.Payload -} - -func (o *DeprovisionInstallBadRequest) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.StderrErrResponse) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewDeprovisionInstallUnauthorized creates a DeprovisionInstallUnauthorized with default headers values -func NewDeprovisionInstallUnauthorized() *DeprovisionInstallUnauthorized { - return &DeprovisionInstallUnauthorized{} -} - -/* -DeprovisionInstallUnauthorized describes a response with status code 401, with default header values. - -Unauthorized -*/ -type DeprovisionInstallUnauthorized struct { - Payload *models.StderrErrResponse -} - -// IsSuccess returns true when this deprovision install unauthorized response has a 2xx status code -func (o *DeprovisionInstallUnauthorized) IsSuccess() bool { - return false -} - -// IsRedirect returns true when this deprovision install unauthorized response has a 3xx status code -func (o *DeprovisionInstallUnauthorized) IsRedirect() bool { - return false -} - -// IsClientError returns true when this deprovision install unauthorized response has a 4xx status code -func (o *DeprovisionInstallUnauthorized) IsClientError() bool { - return true -} - -// IsServerError returns true when this deprovision install unauthorized response has a 5xx status code -func (o *DeprovisionInstallUnauthorized) IsServerError() bool { - return false -} - -// IsCode returns true when this deprovision install unauthorized response a status code equal to that given -func (o *DeprovisionInstallUnauthorized) IsCode(code int) bool { - return code == 401 -} - -// Code gets the status code for the deprovision install unauthorized response -func (o *DeprovisionInstallUnauthorized) Code() int { - return 401 -} - -func (o *DeprovisionInstallUnauthorized) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[POST /v1/installs/{install_id}/deprovision][%d] deprovisionInstallUnauthorized %s", 401, payload) -} - -func (o *DeprovisionInstallUnauthorized) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[POST /v1/installs/{install_id}/deprovision][%d] deprovisionInstallUnauthorized %s", 401, payload) -} - -func (o *DeprovisionInstallUnauthorized) GetPayload() *models.StderrErrResponse { - return o.Payload -} - -func (o *DeprovisionInstallUnauthorized) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.StderrErrResponse) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewDeprovisionInstallForbidden creates a DeprovisionInstallForbidden with default headers values -func NewDeprovisionInstallForbidden() *DeprovisionInstallForbidden { - return &DeprovisionInstallForbidden{} -} - -/* -DeprovisionInstallForbidden describes a response with status code 403, with default header values. - -Forbidden -*/ -type DeprovisionInstallForbidden struct { - Payload *models.StderrErrResponse -} - -// IsSuccess returns true when this deprovision install forbidden response has a 2xx status code -func (o *DeprovisionInstallForbidden) IsSuccess() bool { - return false -} - -// IsRedirect returns true when this deprovision install forbidden response has a 3xx status code -func (o *DeprovisionInstallForbidden) IsRedirect() bool { - return false -} - -// IsClientError returns true when this deprovision install forbidden response has a 4xx status code -func (o *DeprovisionInstallForbidden) IsClientError() bool { - return true -} - -// IsServerError returns true when this deprovision install forbidden response has a 5xx status code -func (o *DeprovisionInstallForbidden) IsServerError() bool { - return false -} - -// IsCode returns true when this deprovision install forbidden response a status code equal to that given -func (o *DeprovisionInstallForbidden) IsCode(code int) bool { - return code == 403 -} - -// Code gets the status code for the deprovision install forbidden response -func (o *DeprovisionInstallForbidden) Code() int { - return 403 -} - -func (o *DeprovisionInstallForbidden) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[POST /v1/installs/{install_id}/deprovision][%d] deprovisionInstallForbidden %s", 403, payload) -} - -func (o *DeprovisionInstallForbidden) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[POST /v1/installs/{install_id}/deprovision][%d] deprovisionInstallForbidden %s", 403, payload) -} - -func (o *DeprovisionInstallForbidden) GetPayload() *models.StderrErrResponse { - return o.Payload -} - -func (o *DeprovisionInstallForbidden) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.StderrErrResponse) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewDeprovisionInstallNotFound creates a DeprovisionInstallNotFound with default headers values -func NewDeprovisionInstallNotFound() *DeprovisionInstallNotFound { - return &DeprovisionInstallNotFound{} -} - -/* -DeprovisionInstallNotFound describes a response with status code 404, with default header values. - -Not Found -*/ -type DeprovisionInstallNotFound struct { - Payload *models.StderrErrResponse -} - -// IsSuccess returns true when this deprovision install not found response has a 2xx status code -func (o *DeprovisionInstallNotFound) IsSuccess() bool { - return false -} - -// IsRedirect returns true when this deprovision install not found response has a 3xx status code -func (o *DeprovisionInstallNotFound) IsRedirect() bool { - return false -} - -// IsClientError returns true when this deprovision install not found response has a 4xx status code -func (o *DeprovisionInstallNotFound) IsClientError() bool { - return true -} - -// IsServerError returns true when this deprovision install not found response has a 5xx status code -func (o *DeprovisionInstallNotFound) IsServerError() bool { - return false -} - -// IsCode returns true when this deprovision install not found response a status code equal to that given -func (o *DeprovisionInstallNotFound) IsCode(code int) bool { - return code == 404 -} - -// Code gets the status code for the deprovision install not found response -func (o *DeprovisionInstallNotFound) Code() int { - return 404 -} - -func (o *DeprovisionInstallNotFound) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[POST /v1/installs/{install_id}/deprovision][%d] deprovisionInstallNotFound %s", 404, payload) -} - -func (o *DeprovisionInstallNotFound) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[POST /v1/installs/{install_id}/deprovision][%d] deprovisionInstallNotFound %s", 404, payload) -} - -func (o *DeprovisionInstallNotFound) GetPayload() *models.StderrErrResponse { - return o.Payload -} - -func (o *DeprovisionInstallNotFound) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.StderrErrResponse) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewDeprovisionInstallInternalServerError creates a DeprovisionInstallInternalServerError with default headers values -func NewDeprovisionInstallInternalServerError() *DeprovisionInstallInternalServerError { - return &DeprovisionInstallInternalServerError{} -} - -/* -DeprovisionInstallInternalServerError describes a response with status code 500, with default header values. - -Internal Server Error -*/ -type DeprovisionInstallInternalServerError struct { - Payload *models.StderrErrResponse -} - -// IsSuccess returns true when this deprovision install internal server error response has a 2xx status code -func (o *DeprovisionInstallInternalServerError) IsSuccess() bool { - return false -} - -// IsRedirect returns true when this deprovision install internal server error response has a 3xx status code -func (o *DeprovisionInstallInternalServerError) IsRedirect() bool { - return false -} - -// IsClientError returns true when this deprovision install internal server error response has a 4xx status code -func (o *DeprovisionInstallInternalServerError) IsClientError() bool { - return false -} - -// IsServerError returns true when this deprovision install internal server error response has a 5xx status code -func (o *DeprovisionInstallInternalServerError) IsServerError() bool { - return true -} - -// IsCode returns true when this deprovision install internal server error response a status code equal to that given -func (o *DeprovisionInstallInternalServerError) IsCode(code int) bool { - return code == 500 -} - -// Code gets the status code for the deprovision install internal server error response -func (o *DeprovisionInstallInternalServerError) Code() int { - return 500 -} - -func (o *DeprovisionInstallInternalServerError) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[POST /v1/installs/{install_id}/deprovision][%d] deprovisionInstallInternalServerError %s", 500, payload) -} - -func (o *DeprovisionInstallInternalServerError) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[POST /v1/installs/{install_id}/deprovision][%d] deprovisionInstallInternalServerError %s", 500, payload) -} - -func (o *DeprovisionInstallInternalServerError) GetPayload() *models.StderrErrResponse { - return o.Payload -} - -func (o *DeprovisionInstallInternalServerError) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.StderrErrResponse) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} diff --git a/client/operations/get_all_v_c_s_connected_repos_parameters.go b/client/operations/get_all_v_c_s_connected_repos_parameters.go deleted file mode 100644 index 5937447..0000000 --- a/client/operations/get_all_v_c_s_connected_repos_parameters.go +++ /dev/null @@ -1,128 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package operations - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "context" - "net/http" - "time" - - "github.com/go-openapi/errors" - "github.com/go-openapi/runtime" - cr "github.com/go-openapi/runtime/client" - "github.com/go-openapi/strfmt" -) - -// NewGetAllVCSConnectedReposParams creates a new GetAllVCSConnectedReposParams object, -// with the default timeout for this client. -// -// Default values are not hydrated, since defaults are normally applied by the API server side. -// -// To enforce default values in parameter, use SetDefaults or WithDefaults. -func NewGetAllVCSConnectedReposParams() *GetAllVCSConnectedReposParams { - return &GetAllVCSConnectedReposParams{ - timeout: cr.DefaultTimeout, - } -} - -// NewGetAllVCSConnectedReposParamsWithTimeout creates a new GetAllVCSConnectedReposParams object -// with the ability to set a timeout on a request. -func NewGetAllVCSConnectedReposParamsWithTimeout(timeout time.Duration) *GetAllVCSConnectedReposParams { - return &GetAllVCSConnectedReposParams{ - timeout: timeout, - } -} - -// NewGetAllVCSConnectedReposParamsWithContext creates a new GetAllVCSConnectedReposParams object -// with the ability to set a context for a request. -func NewGetAllVCSConnectedReposParamsWithContext(ctx context.Context) *GetAllVCSConnectedReposParams { - return &GetAllVCSConnectedReposParams{ - Context: ctx, - } -} - -// NewGetAllVCSConnectedReposParamsWithHTTPClient creates a new GetAllVCSConnectedReposParams object -// with the ability to set a custom HTTPClient for a request. -func NewGetAllVCSConnectedReposParamsWithHTTPClient(client *http.Client) *GetAllVCSConnectedReposParams { - return &GetAllVCSConnectedReposParams{ - HTTPClient: client, - } -} - -/* -GetAllVCSConnectedReposParams contains all the parameters to send to the API endpoint - - for the get all v c s connected repos operation. - - Typically these are written to a http.Request. -*/ -type GetAllVCSConnectedReposParams struct { - timeout time.Duration - Context context.Context - HTTPClient *http.Client -} - -// WithDefaults hydrates default values in the get all v c s connected repos params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *GetAllVCSConnectedReposParams) WithDefaults() *GetAllVCSConnectedReposParams { - o.SetDefaults() - return o -} - -// SetDefaults hydrates default values in the get all v c s connected repos params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *GetAllVCSConnectedReposParams) SetDefaults() { - // no default values defined for this parameter -} - -// WithTimeout adds the timeout to the get all v c s connected repos params -func (o *GetAllVCSConnectedReposParams) WithTimeout(timeout time.Duration) *GetAllVCSConnectedReposParams { - o.SetTimeout(timeout) - return o -} - -// SetTimeout adds the timeout to the get all v c s connected repos params -func (o *GetAllVCSConnectedReposParams) SetTimeout(timeout time.Duration) { - o.timeout = timeout -} - -// WithContext adds the context to the get all v c s connected repos params -func (o *GetAllVCSConnectedReposParams) WithContext(ctx context.Context) *GetAllVCSConnectedReposParams { - o.SetContext(ctx) - return o -} - -// SetContext adds the context to the get all v c s connected repos params -func (o *GetAllVCSConnectedReposParams) SetContext(ctx context.Context) { - o.Context = ctx -} - -// WithHTTPClient adds the HTTPClient to the get all v c s connected repos params -func (o *GetAllVCSConnectedReposParams) WithHTTPClient(client *http.Client) *GetAllVCSConnectedReposParams { - o.SetHTTPClient(client) - return o -} - -// SetHTTPClient adds the HTTPClient to the get all v c s connected repos params -func (o *GetAllVCSConnectedReposParams) SetHTTPClient(client *http.Client) { - o.HTTPClient = client -} - -// WriteToRequest writes these params to a swagger request -func (o *GetAllVCSConnectedReposParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { - - if err := r.SetTimeout(o.timeout); err != nil { - return err - } - var res []error - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} diff --git a/client/operations/get_all_v_c_s_connected_repos_responses.go b/client/operations/get_all_v_c_s_connected_repos_responses.go deleted file mode 100644 index a5c5d81..0000000 --- a/client/operations/get_all_v_c_s_connected_repos_responses.go +++ /dev/null @@ -1,484 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package operations - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "encoding/json" - "fmt" - "io" - - "github.com/go-openapi/runtime" - "github.com/go-openapi/strfmt" - - "github.com/nuonco/nuon-go/models" -) - -// GetAllVCSConnectedReposReader is a Reader for the GetAllVCSConnectedRepos structure. -type GetAllVCSConnectedReposReader struct { - formats strfmt.Registry -} - -// ReadResponse reads a server response into the received o. -func (o *GetAllVCSConnectedReposReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { - switch response.Code() { - case 200: - result := NewGetAllVCSConnectedReposOK() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return result, nil - case 400: - result := NewGetAllVCSConnectedReposBadRequest() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return nil, result - case 401: - result := NewGetAllVCSConnectedReposUnauthorized() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return nil, result - case 403: - result := NewGetAllVCSConnectedReposForbidden() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return nil, result - case 404: - result := NewGetAllVCSConnectedReposNotFound() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return nil, result - case 500: - result := NewGetAllVCSConnectedReposInternalServerError() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return nil, result - default: - return nil, runtime.NewAPIError("[GET /v1/vcs/connected-repos] GetAllVCSConnectedRepos", response, response.Code()) - } -} - -// NewGetAllVCSConnectedReposOK creates a GetAllVCSConnectedReposOK with default headers values -func NewGetAllVCSConnectedReposOK() *GetAllVCSConnectedReposOK { - return &GetAllVCSConnectedReposOK{} -} - -/* -GetAllVCSConnectedReposOK describes a response with status code 200, with default header values. - -OK -*/ -type GetAllVCSConnectedReposOK struct { - Payload []*models.ServiceRepository -} - -// IsSuccess returns true when this get all v c s connected repos o k response has a 2xx status code -func (o *GetAllVCSConnectedReposOK) IsSuccess() bool { - return true -} - -// IsRedirect returns true when this get all v c s connected repos o k response has a 3xx status code -func (o *GetAllVCSConnectedReposOK) IsRedirect() bool { - return false -} - -// IsClientError returns true when this get all v c s connected repos o k response has a 4xx status code -func (o *GetAllVCSConnectedReposOK) IsClientError() bool { - return false -} - -// IsServerError returns true when this get all v c s connected repos o k response has a 5xx status code -func (o *GetAllVCSConnectedReposOK) IsServerError() bool { - return false -} - -// IsCode returns true when this get all v c s connected repos o k response a status code equal to that given -func (o *GetAllVCSConnectedReposOK) IsCode(code int) bool { - return code == 200 -} - -// Code gets the status code for the get all v c s connected repos o k response -func (o *GetAllVCSConnectedReposOK) Code() int { - return 200 -} - -func (o *GetAllVCSConnectedReposOK) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /v1/vcs/connected-repos][%d] getAllVCSConnectedReposOK %s", 200, payload) -} - -func (o *GetAllVCSConnectedReposOK) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /v1/vcs/connected-repos][%d] getAllVCSConnectedReposOK %s", 200, payload) -} - -func (o *GetAllVCSConnectedReposOK) GetPayload() []*models.ServiceRepository { - return o.Payload -} - -func (o *GetAllVCSConnectedReposOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - // response payload - if err := consumer.Consume(response.Body(), &o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewGetAllVCSConnectedReposBadRequest creates a GetAllVCSConnectedReposBadRequest with default headers values -func NewGetAllVCSConnectedReposBadRequest() *GetAllVCSConnectedReposBadRequest { - return &GetAllVCSConnectedReposBadRequest{} -} - -/* -GetAllVCSConnectedReposBadRequest describes a response with status code 400, with default header values. - -Bad Request -*/ -type GetAllVCSConnectedReposBadRequest struct { - Payload *models.StderrErrResponse -} - -// IsSuccess returns true when this get all v c s connected repos bad request response has a 2xx status code -func (o *GetAllVCSConnectedReposBadRequest) IsSuccess() bool { - return false -} - -// IsRedirect returns true when this get all v c s connected repos bad request response has a 3xx status code -func (o *GetAllVCSConnectedReposBadRequest) IsRedirect() bool { - return false -} - -// IsClientError returns true when this get all v c s connected repos bad request response has a 4xx status code -func (o *GetAllVCSConnectedReposBadRequest) IsClientError() bool { - return true -} - -// IsServerError returns true when this get all v c s connected repos bad request response has a 5xx status code -func (o *GetAllVCSConnectedReposBadRequest) IsServerError() bool { - return false -} - -// IsCode returns true when this get all v c s connected repos bad request response a status code equal to that given -func (o *GetAllVCSConnectedReposBadRequest) IsCode(code int) bool { - return code == 400 -} - -// Code gets the status code for the get all v c s connected repos bad request response -func (o *GetAllVCSConnectedReposBadRequest) Code() int { - return 400 -} - -func (o *GetAllVCSConnectedReposBadRequest) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /v1/vcs/connected-repos][%d] getAllVCSConnectedReposBadRequest %s", 400, payload) -} - -func (o *GetAllVCSConnectedReposBadRequest) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /v1/vcs/connected-repos][%d] getAllVCSConnectedReposBadRequest %s", 400, payload) -} - -func (o *GetAllVCSConnectedReposBadRequest) GetPayload() *models.StderrErrResponse { - return o.Payload -} - -func (o *GetAllVCSConnectedReposBadRequest) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.StderrErrResponse) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewGetAllVCSConnectedReposUnauthorized creates a GetAllVCSConnectedReposUnauthorized with default headers values -func NewGetAllVCSConnectedReposUnauthorized() *GetAllVCSConnectedReposUnauthorized { - return &GetAllVCSConnectedReposUnauthorized{} -} - -/* -GetAllVCSConnectedReposUnauthorized describes a response with status code 401, with default header values. - -Unauthorized -*/ -type GetAllVCSConnectedReposUnauthorized struct { - Payload *models.StderrErrResponse -} - -// IsSuccess returns true when this get all v c s connected repos unauthorized response has a 2xx status code -func (o *GetAllVCSConnectedReposUnauthorized) IsSuccess() bool { - return false -} - -// IsRedirect returns true when this get all v c s connected repos unauthorized response has a 3xx status code -func (o *GetAllVCSConnectedReposUnauthorized) IsRedirect() bool { - return false -} - -// IsClientError returns true when this get all v c s connected repos unauthorized response has a 4xx status code -func (o *GetAllVCSConnectedReposUnauthorized) IsClientError() bool { - return true -} - -// IsServerError returns true when this get all v c s connected repos unauthorized response has a 5xx status code -func (o *GetAllVCSConnectedReposUnauthorized) IsServerError() bool { - return false -} - -// IsCode returns true when this get all v c s connected repos unauthorized response a status code equal to that given -func (o *GetAllVCSConnectedReposUnauthorized) IsCode(code int) bool { - return code == 401 -} - -// Code gets the status code for the get all v c s connected repos unauthorized response -func (o *GetAllVCSConnectedReposUnauthorized) Code() int { - return 401 -} - -func (o *GetAllVCSConnectedReposUnauthorized) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /v1/vcs/connected-repos][%d] getAllVCSConnectedReposUnauthorized %s", 401, payload) -} - -func (o *GetAllVCSConnectedReposUnauthorized) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /v1/vcs/connected-repos][%d] getAllVCSConnectedReposUnauthorized %s", 401, payload) -} - -func (o *GetAllVCSConnectedReposUnauthorized) GetPayload() *models.StderrErrResponse { - return o.Payload -} - -func (o *GetAllVCSConnectedReposUnauthorized) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.StderrErrResponse) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewGetAllVCSConnectedReposForbidden creates a GetAllVCSConnectedReposForbidden with default headers values -func NewGetAllVCSConnectedReposForbidden() *GetAllVCSConnectedReposForbidden { - return &GetAllVCSConnectedReposForbidden{} -} - -/* -GetAllVCSConnectedReposForbidden describes a response with status code 403, with default header values. - -Forbidden -*/ -type GetAllVCSConnectedReposForbidden struct { - Payload *models.StderrErrResponse -} - -// IsSuccess returns true when this get all v c s connected repos forbidden response has a 2xx status code -func (o *GetAllVCSConnectedReposForbidden) IsSuccess() bool { - return false -} - -// IsRedirect returns true when this get all v c s connected repos forbidden response has a 3xx status code -func (o *GetAllVCSConnectedReposForbidden) IsRedirect() bool { - return false -} - -// IsClientError returns true when this get all v c s connected repos forbidden response has a 4xx status code -func (o *GetAllVCSConnectedReposForbidden) IsClientError() bool { - return true -} - -// IsServerError returns true when this get all v c s connected repos forbidden response has a 5xx status code -func (o *GetAllVCSConnectedReposForbidden) IsServerError() bool { - return false -} - -// IsCode returns true when this get all v c s connected repos forbidden response a status code equal to that given -func (o *GetAllVCSConnectedReposForbidden) IsCode(code int) bool { - return code == 403 -} - -// Code gets the status code for the get all v c s connected repos forbidden response -func (o *GetAllVCSConnectedReposForbidden) Code() int { - return 403 -} - -func (o *GetAllVCSConnectedReposForbidden) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /v1/vcs/connected-repos][%d] getAllVCSConnectedReposForbidden %s", 403, payload) -} - -func (o *GetAllVCSConnectedReposForbidden) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /v1/vcs/connected-repos][%d] getAllVCSConnectedReposForbidden %s", 403, payload) -} - -func (o *GetAllVCSConnectedReposForbidden) GetPayload() *models.StderrErrResponse { - return o.Payload -} - -func (o *GetAllVCSConnectedReposForbidden) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.StderrErrResponse) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewGetAllVCSConnectedReposNotFound creates a GetAllVCSConnectedReposNotFound with default headers values -func NewGetAllVCSConnectedReposNotFound() *GetAllVCSConnectedReposNotFound { - return &GetAllVCSConnectedReposNotFound{} -} - -/* -GetAllVCSConnectedReposNotFound describes a response with status code 404, with default header values. - -Not Found -*/ -type GetAllVCSConnectedReposNotFound struct { - Payload *models.StderrErrResponse -} - -// IsSuccess returns true when this get all v c s connected repos not found response has a 2xx status code -func (o *GetAllVCSConnectedReposNotFound) IsSuccess() bool { - return false -} - -// IsRedirect returns true when this get all v c s connected repos not found response has a 3xx status code -func (o *GetAllVCSConnectedReposNotFound) IsRedirect() bool { - return false -} - -// IsClientError returns true when this get all v c s connected repos not found response has a 4xx status code -func (o *GetAllVCSConnectedReposNotFound) IsClientError() bool { - return true -} - -// IsServerError returns true when this get all v c s connected repos not found response has a 5xx status code -func (o *GetAllVCSConnectedReposNotFound) IsServerError() bool { - return false -} - -// IsCode returns true when this get all v c s connected repos not found response a status code equal to that given -func (o *GetAllVCSConnectedReposNotFound) IsCode(code int) bool { - return code == 404 -} - -// Code gets the status code for the get all v c s connected repos not found response -func (o *GetAllVCSConnectedReposNotFound) Code() int { - return 404 -} - -func (o *GetAllVCSConnectedReposNotFound) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /v1/vcs/connected-repos][%d] getAllVCSConnectedReposNotFound %s", 404, payload) -} - -func (o *GetAllVCSConnectedReposNotFound) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /v1/vcs/connected-repos][%d] getAllVCSConnectedReposNotFound %s", 404, payload) -} - -func (o *GetAllVCSConnectedReposNotFound) GetPayload() *models.StderrErrResponse { - return o.Payload -} - -func (o *GetAllVCSConnectedReposNotFound) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.StderrErrResponse) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewGetAllVCSConnectedReposInternalServerError creates a GetAllVCSConnectedReposInternalServerError with default headers values -func NewGetAllVCSConnectedReposInternalServerError() *GetAllVCSConnectedReposInternalServerError { - return &GetAllVCSConnectedReposInternalServerError{} -} - -/* -GetAllVCSConnectedReposInternalServerError describes a response with status code 500, with default header values. - -Internal Server Error -*/ -type GetAllVCSConnectedReposInternalServerError struct { - Payload *models.StderrErrResponse -} - -// IsSuccess returns true when this get all v c s connected repos internal server error response has a 2xx status code -func (o *GetAllVCSConnectedReposInternalServerError) IsSuccess() bool { - return false -} - -// IsRedirect returns true when this get all v c s connected repos internal server error response has a 3xx status code -func (o *GetAllVCSConnectedReposInternalServerError) IsRedirect() bool { - return false -} - -// IsClientError returns true when this get all v c s connected repos internal server error response has a 4xx status code -func (o *GetAllVCSConnectedReposInternalServerError) IsClientError() bool { - return false -} - -// IsServerError returns true when this get all v c s connected repos internal server error response has a 5xx status code -func (o *GetAllVCSConnectedReposInternalServerError) IsServerError() bool { - return true -} - -// IsCode returns true when this get all v c s connected repos internal server error response a status code equal to that given -func (o *GetAllVCSConnectedReposInternalServerError) IsCode(code int) bool { - return code == 500 -} - -// Code gets the status code for the get all v c s connected repos internal server error response -func (o *GetAllVCSConnectedReposInternalServerError) Code() int { - return 500 -} - -func (o *GetAllVCSConnectedReposInternalServerError) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /v1/vcs/connected-repos][%d] getAllVCSConnectedReposInternalServerError %s", 500, payload) -} - -func (o *GetAllVCSConnectedReposInternalServerError) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /v1/vcs/connected-repos][%d] getAllVCSConnectedReposInternalServerError %s", 500, payload) -} - -func (o *GetAllVCSConnectedReposInternalServerError) GetPayload() *models.StderrErrResponse { - return o.Payload -} - -func (o *GetAllVCSConnectedReposInternalServerError) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.StderrErrResponse) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} diff --git a/client/operations/get_app_components_parameters.go b/client/operations/get_app_components_parameters.go deleted file mode 100644 index 992b25e..0000000 --- a/client/operations/get_app_components_parameters.go +++ /dev/null @@ -1,151 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package operations - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "context" - "net/http" - "time" - - "github.com/go-openapi/errors" - "github.com/go-openapi/runtime" - cr "github.com/go-openapi/runtime/client" - "github.com/go-openapi/strfmt" -) - -// NewGetAppComponentsParams creates a new GetAppComponentsParams object, -// with the default timeout for this client. -// -// Default values are not hydrated, since defaults are normally applied by the API server side. -// -// To enforce default values in parameter, use SetDefaults or WithDefaults. -func NewGetAppComponentsParams() *GetAppComponentsParams { - return &GetAppComponentsParams{ - timeout: cr.DefaultTimeout, - } -} - -// NewGetAppComponentsParamsWithTimeout creates a new GetAppComponentsParams object -// with the ability to set a timeout on a request. -func NewGetAppComponentsParamsWithTimeout(timeout time.Duration) *GetAppComponentsParams { - return &GetAppComponentsParams{ - timeout: timeout, - } -} - -// NewGetAppComponentsParamsWithContext creates a new GetAppComponentsParams object -// with the ability to set a context for a request. -func NewGetAppComponentsParamsWithContext(ctx context.Context) *GetAppComponentsParams { - return &GetAppComponentsParams{ - Context: ctx, - } -} - -// NewGetAppComponentsParamsWithHTTPClient creates a new GetAppComponentsParams object -// with the ability to set a custom HTTPClient for a request. -func NewGetAppComponentsParamsWithHTTPClient(client *http.Client) *GetAppComponentsParams { - return &GetAppComponentsParams{ - HTTPClient: client, - } -} - -/* -GetAppComponentsParams contains all the parameters to send to the API endpoint - - for the get app components operation. - - Typically these are written to a http.Request. -*/ -type GetAppComponentsParams struct { - - /* AppID. - - app ID - */ - AppID string - - timeout time.Duration - Context context.Context - HTTPClient *http.Client -} - -// WithDefaults hydrates default values in the get app components params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *GetAppComponentsParams) WithDefaults() *GetAppComponentsParams { - o.SetDefaults() - return o -} - -// SetDefaults hydrates default values in the get app components params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *GetAppComponentsParams) SetDefaults() { - // no default values defined for this parameter -} - -// WithTimeout adds the timeout to the get app components params -func (o *GetAppComponentsParams) WithTimeout(timeout time.Duration) *GetAppComponentsParams { - o.SetTimeout(timeout) - return o -} - -// SetTimeout adds the timeout to the get app components params -func (o *GetAppComponentsParams) SetTimeout(timeout time.Duration) { - o.timeout = timeout -} - -// WithContext adds the context to the get app components params -func (o *GetAppComponentsParams) WithContext(ctx context.Context) *GetAppComponentsParams { - o.SetContext(ctx) - return o -} - -// SetContext adds the context to the get app components params -func (o *GetAppComponentsParams) SetContext(ctx context.Context) { - o.Context = ctx -} - -// WithHTTPClient adds the HTTPClient to the get app components params -func (o *GetAppComponentsParams) WithHTTPClient(client *http.Client) *GetAppComponentsParams { - o.SetHTTPClient(client) - return o -} - -// SetHTTPClient adds the HTTPClient to the get app components params -func (o *GetAppComponentsParams) SetHTTPClient(client *http.Client) { - o.HTTPClient = client -} - -// WithAppID adds the appID to the get app components params -func (o *GetAppComponentsParams) WithAppID(appID string) *GetAppComponentsParams { - o.SetAppID(appID) - return o -} - -// SetAppID adds the appId to the get app components params -func (o *GetAppComponentsParams) SetAppID(appID string) { - o.AppID = appID -} - -// WriteToRequest writes these params to a swagger request -func (o *GetAppComponentsParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { - - if err := r.SetTimeout(o.timeout); err != nil { - return err - } - var res []error - - // path param app_id - if err := r.SetPathParam("app_id", o.AppID); err != nil { - return err - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} diff --git a/client/operations/get_app_components_responses.go b/client/operations/get_app_components_responses.go deleted file mode 100644 index e7659b6..0000000 --- a/client/operations/get_app_components_responses.go +++ /dev/null @@ -1,484 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package operations - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "encoding/json" - "fmt" - "io" - - "github.com/go-openapi/runtime" - "github.com/go-openapi/strfmt" - - "github.com/nuonco/nuon-go/models" -) - -// GetAppComponentsReader is a Reader for the GetAppComponents structure. -type GetAppComponentsReader struct { - formats strfmt.Registry -} - -// ReadResponse reads a server response into the received o. -func (o *GetAppComponentsReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { - switch response.Code() { - case 200: - result := NewGetAppComponentsOK() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return result, nil - case 400: - result := NewGetAppComponentsBadRequest() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return nil, result - case 401: - result := NewGetAppComponentsUnauthorized() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return nil, result - case 403: - result := NewGetAppComponentsForbidden() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return nil, result - case 404: - result := NewGetAppComponentsNotFound() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return nil, result - case 500: - result := NewGetAppComponentsInternalServerError() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return nil, result - default: - return nil, runtime.NewAPIError("[GET /v1/apps/{app_id}/components] GetAppComponents", response, response.Code()) - } -} - -// NewGetAppComponentsOK creates a GetAppComponentsOK with default headers values -func NewGetAppComponentsOK() *GetAppComponentsOK { - return &GetAppComponentsOK{} -} - -/* -GetAppComponentsOK describes a response with status code 200, with default header values. - -OK -*/ -type GetAppComponentsOK struct { - Payload []*models.AppComponent -} - -// IsSuccess returns true when this get app components o k response has a 2xx status code -func (o *GetAppComponentsOK) IsSuccess() bool { - return true -} - -// IsRedirect returns true when this get app components o k response has a 3xx status code -func (o *GetAppComponentsOK) IsRedirect() bool { - return false -} - -// IsClientError returns true when this get app components o k response has a 4xx status code -func (o *GetAppComponentsOK) IsClientError() bool { - return false -} - -// IsServerError returns true when this get app components o k response has a 5xx status code -func (o *GetAppComponentsOK) IsServerError() bool { - return false -} - -// IsCode returns true when this get app components o k response a status code equal to that given -func (o *GetAppComponentsOK) IsCode(code int) bool { - return code == 200 -} - -// Code gets the status code for the get app components o k response -func (o *GetAppComponentsOK) Code() int { - return 200 -} - -func (o *GetAppComponentsOK) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /v1/apps/{app_id}/components][%d] getAppComponentsOK %s", 200, payload) -} - -func (o *GetAppComponentsOK) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /v1/apps/{app_id}/components][%d] getAppComponentsOK %s", 200, payload) -} - -func (o *GetAppComponentsOK) GetPayload() []*models.AppComponent { - return o.Payload -} - -func (o *GetAppComponentsOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - // response payload - if err := consumer.Consume(response.Body(), &o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewGetAppComponentsBadRequest creates a GetAppComponentsBadRequest with default headers values -func NewGetAppComponentsBadRequest() *GetAppComponentsBadRequest { - return &GetAppComponentsBadRequest{} -} - -/* -GetAppComponentsBadRequest describes a response with status code 400, with default header values. - -Bad Request -*/ -type GetAppComponentsBadRequest struct { - Payload *models.StderrErrResponse -} - -// IsSuccess returns true when this get app components bad request response has a 2xx status code -func (o *GetAppComponentsBadRequest) IsSuccess() bool { - return false -} - -// IsRedirect returns true when this get app components bad request response has a 3xx status code -func (o *GetAppComponentsBadRequest) IsRedirect() bool { - return false -} - -// IsClientError returns true when this get app components bad request response has a 4xx status code -func (o *GetAppComponentsBadRequest) IsClientError() bool { - return true -} - -// IsServerError returns true when this get app components bad request response has a 5xx status code -func (o *GetAppComponentsBadRequest) IsServerError() bool { - return false -} - -// IsCode returns true when this get app components bad request response a status code equal to that given -func (o *GetAppComponentsBadRequest) IsCode(code int) bool { - return code == 400 -} - -// Code gets the status code for the get app components bad request response -func (o *GetAppComponentsBadRequest) Code() int { - return 400 -} - -func (o *GetAppComponentsBadRequest) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /v1/apps/{app_id}/components][%d] getAppComponentsBadRequest %s", 400, payload) -} - -func (o *GetAppComponentsBadRequest) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /v1/apps/{app_id}/components][%d] getAppComponentsBadRequest %s", 400, payload) -} - -func (o *GetAppComponentsBadRequest) GetPayload() *models.StderrErrResponse { - return o.Payload -} - -func (o *GetAppComponentsBadRequest) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.StderrErrResponse) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewGetAppComponentsUnauthorized creates a GetAppComponentsUnauthorized with default headers values -func NewGetAppComponentsUnauthorized() *GetAppComponentsUnauthorized { - return &GetAppComponentsUnauthorized{} -} - -/* -GetAppComponentsUnauthorized describes a response with status code 401, with default header values. - -Unauthorized -*/ -type GetAppComponentsUnauthorized struct { - Payload *models.StderrErrResponse -} - -// IsSuccess returns true when this get app components unauthorized response has a 2xx status code -func (o *GetAppComponentsUnauthorized) IsSuccess() bool { - return false -} - -// IsRedirect returns true when this get app components unauthorized response has a 3xx status code -func (o *GetAppComponentsUnauthorized) IsRedirect() bool { - return false -} - -// IsClientError returns true when this get app components unauthorized response has a 4xx status code -func (o *GetAppComponentsUnauthorized) IsClientError() bool { - return true -} - -// IsServerError returns true when this get app components unauthorized response has a 5xx status code -func (o *GetAppComponentsUnauthorized) IsServerError() bool { - return false -} - -// IsCode returns true when this get app components unauthorized response a status code equal to that given -func (o *GetAppComponentsUnauthorized) IsCode(code int) bool { - return code == 401 -} - -// Code gets the status code for the get app components unauthorized response -func (o *GetAppComponentsUnauthorized) Code() int { - return 401 -} - -func (o *GetAppComponentsUnauthorized) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /v1/apps/{app_id}/components][%d] getAppComponentsUnauthorized %s", 401, payload) -} - -func (o *GetAppComponentsUnauthorized) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /v1/apps/{app_id}/components][%d] getAppComponentsUnauthorized %s", 401, payload) -} - -func (o *GetAppComponentsUnauthorized) GetPayload() *models.StderrErrResponse { - return o.Payload -} - -func (o *GetAppComponentsUnauthorized) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.StderrErrResponse) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewGetAppComponentsForbidden creates a GetAppComponentsForbidden with default headers values -func NewGetAppComponentsForbidden() *GetAppComponentsForbidden { - return &GetAppComponentsForbidden{} -} - -/* -GetAppComponentsForbidden describes a response with status code 403, with default header values. - -Forbidden -*/ -type GetAppComponentsForbidden struct { - Payload *models.StderrErrResponse -} - -// IsSuccess returns true when this get app components forbidden response has a 2xx status code -func (o *GetAppComponentsForbidden) IsSuccess() bool { - return false -} - -// IsRedirect returns true when this get app components forbidden response has a 3xx status code -func (o *GetAppComponentsForbidden) IsRedirect() bool { - return false -} - -// IsClientError returns true when this get app components forbidden response has a 4xx status code -func (o *GetAppComponentsForbidden) IsClientError() bool { - return true -} - -// IsServerError returns true when this get app components forbidden response has a 5xx status code -func (o *GetAppComponentsForbidden) IsServerError() bool { - return false -} - -// IsCode returns true when this get app components forbidden response a status code equal to that given -func (o *GetAppComponentsForbidden) IsCode(code int) bool { - return code == 403 -} - -// Code gets the status code for the get app components forbidden response -func (o *GetAppComponentsForbidden) Code() int { - return 403 -} - -func (o *GetAppComponentsForbidden) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /v1/apps/{app_id}/components][%d] getAppComponentsForbidden %s", 403, payload) -} - -func (o *GetAppComponentsForbidden) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /v1/apps/{app_id}/components][%d] getAppComponentsForbidden %s", 403, payload) -} - -func (o *GetAppComponentsForbidden) GetPayload() *models.StderrErrResponse { - return o.Payload -} - -func (o *GetAppComponentsForbidden) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.StderrErrResponse) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewGetAppComponentsNotFound creates a GetAppComponentsNotFound with default headers values -func NewGetAppComponentsNotFound() *GetAppComponentsNotFound { - return &GetAppComponentsNotFound{} -} - -/* -GetAppComponentsNotFound describes a response with status code 404, with default header values. - -Not Found -*/ -type GetAppComponentsNotFound struct { - Payload *models.StderrErrResponse -} - -// IsSuccess returns true when this get app components not found response has a 2xx status code -func (o *GetAppComponentsNotFound) IsSuccess() bool { - return false -} - -// IsRedirect returns true when this get app components not found response has a 3xx status code -func (o *GetAppComponentsNotFound) IsRedirect() bool { - return false -} - -// IsClientError returns true when this get app components not found response has a 4xx status code -func (o *GetAppComponentsNotFound) IsClientError() bool { - return true -} - -// IsServerError returns true when this get app components not found response has a 5xx status code -func (o *GetAppComponentsNotFound) IsServerError() bool { - return false -} - -// IsCode returns true when this get app components not found response a status code equal to that given -func (o *GetAppComponentsNotFound) IsCode(code int) bool { - return code == 404 -} - -// Code gets the status code for the get app components not found response -func (o *GetAppComponentsNotFound) Code() int { - return 404 -} - -func (o *GetAppComponentsNotFound) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /v1/apps/{app_id}/components][%d] getAppComponentsNotFound %s", 404, payload) -} - -func (o *GetAppComponentsNotFound) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /v1/apps/{app_id}/components][%d] getAppComponentsNotFound %s", 404, payload) -} - -func (o *GetAppComponentsNotFound) GetPayload() *models.StderrErrResponse { - return o.Payload -} - -func (o *GetAppComponentsNotFound) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.StderrErrResponse) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewGetAppComponentsInternalServerError creates a GetAppComponentsInternalServerError with default headers values -func NewGetAppComponentsInternalServerError() *GetAppComponentsInternalServerError { - return &GetAppComponentsInternalServerError{} -} - -/* -GetAppComponentsInternalServerError describes a response with status code 500, with default header values. - -Internal Server Error -*/ -type GetAppComponentsInternalServerError struct { - Payload *models.StderrErrResponse -} - -// IsSuccess returns true when this get app components internal server error response has a 2xx status code -func (o *GetAppComponentsInternalServerError) IsSuccess() bool { - return false -} - -// IsRedirect returns true when this get app components internal server error response has a 3xx status code -func (o *GetAppComponentsInternalServerError) IsRedirect() bool { - return false -} - -// IsClientError returns true when this get app components internal server error response has a 4xx status code -func (o *GetAppComponentsInternalServerError) IsClientError() bool { - return false -} - -// IsServerError returns true when this get app components internal server error response has a 5xx status code -func (o *GetAppComponentsInternalServerError) IsServerError() bool { - return true -} - -// IsCode returns true when this get app components internal server error response a status code equal to that given -func (o *GetAppComponentsInternalServerError) IsCode(code int) bool { - return code == 500 -} - -// Code gets the status code for the get app components internal server error response -func (o *GetAppComponentsInternalServerError) Code() int { - return 500 -} - -func (o *GetAppComponentsInternalServerError) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /v1/apps/{app_id}/components][%d] getAppComponentsInternalServerError %s", 500, payload) -} - -func (o *GetAppComponentsInternalServerError) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /v1/apps/{app_id}/components][%d] getAppComponentsInternalServerError %s", 500, payload) -} - -func (o *GetAppComponentsInternalServerError) GetPayload() *models.StderrErrResponse { - return o.Payload -} - -func (o *GetAppComponentsInternalServerError) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.StderrErrResponse) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} diff --git a/client/operations/get_app_config_parameters.go b/client/operations/get_app_config_parameters.go deleted file mode 100644 index 80d85bc..0000000 --- a/client/operations/get_app_config_parameters.go +++ /dev/null @@ -1,173 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package operations - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "context" - "net/http" - "time" - - "github.com/go-openapi/errors" - "github.com/go-openapi/runtime" - cr "github.com/go-openapi/runtime/client" - "github.com/go-openapi/strfmt" -) - -// NewGetAppConfigParams creates a new GetAppConfigParams object, -// with the default timeout for this client. -// -// Default values are not hydrated, since defaults are normally applied by the API server side. -// -// To enforce default values in parameter, use SetDefaults or WithDefaults. -func NewGetAppConfigParams() *GetAppConfigParams { - return &GetAppConfigParams{ - timeout: cr.DefaultTimeout, - } -} - -// NewGetAppConfigParamsWithTimeout creates a new GetAppConfigParams object -// with the ability to set a timeout on a request. -func NewGetAppConfigParamsWithTimeout(timeout time.Duration) *GetAppConfigParams { - return &GetAppConfigParams{ - timeout: timeout, - } -} - -// NewGetAppConfigParamsWithContext creates a new GetAppConfigParams object -// with the ability to set a context for a request. -func NewGetAppConfigParamsWithContext(ctx context.Context) *GetAppConfigParams { - return &GetAppConfigParams{ - Context: ctx, - } -} - -// NewGetAppConfigParamsWithHTTPClient creates a new GetAppConfigParams object -// with the ability to set a custom HTTPClient for a request. -func NewGetAppConfigParamsWithHTTPClient(client *http.Client) *GetAppConfigParams { - return &GetAppConfigParams{ - HTTPClient: client, - } -} - -/* -GetAppConfigParams contains all the parameters to send to the API endpoint - - for the get app config operation. - - Typically these are written to a http.Request. -*/ -type GetAppConfigParams struct { - - /* AppConfigID. - - app config ID - */ - AppConfigID string - - /* AppID. - - app ID - */ - AppID string - - timeout time.Duration - Context context.Context - HTTPClient *http.Client -} - -// WithDefaults hydrates default values in the get app config params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *GetAppConfigParams) WithDefaults() *GetAppConfigParams { - o.SetDefaults() - return o -} - -// SetDefaults hydrates default values in the get app config params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *GetAppConfigParams) SetDefaults() { - // no default values defined for this parameter -} - -// WithTimeout adds the timeout to the get app config params -func (o *GetAppConfigParams) WithTimeout(timeout time.Duration) *GetAppConfigParams { - o.SetTimeout(timeout) - return o -} - -// SetTimeout adds the timeout to the get app config params -func (o *GetAppConfigParams) SetTimeout(timeout time.Duration) { - o.timeout = timeout -} - -// WithContext adds the context to the get app config params -func (o *GetAppConfigParams) WithContext(ctx context.Context) *GetAppConfigParams { - o.SetContext(ctx) - return o -} - -// SetContext adds the context to the get app config params -func (o *GetAppConfigParams) SetContext(ctx context.Context) { - o.Context = ctx -} - -// WithHTTPClient adds the HTTPClient to the get app config params -func (o *GetAppConfigParams) WithHTTPClient(client *http.Client) *GetAppConfigParams { - o.SetHTTPClient(client) - return o -} - -// SetHTTPClient adds the HTTPClient to the get app config params -func (o *GetAppConfigParams) SetHTTPClient(client *http.Client) { - o.HTTPClient = client -} - -// WithAppConfigID adds the appConfigID to the get app config params -func (o *GetAppConfigParams) WithAppConfigID(appConfigID string) *GetAppConfigParams { - o.SetAppConfigID(appConfigID) - return o -} - -// SetAppConfigID adds the appConfigId to the get app config params -func (o *GetAppConfigParams) SetAppConfigID(appConfigID string) { - o.AppConfigID = appConfigID -} - -// WithAppID adds the appID to the get app config params -func (o *GetAppConfigParams) WithAppID(appID string) *GetAppConfigParams { - o.SetAppID(appID) - return o -} - -// SetAppID adds the appId to the get app config params -func (o *GetAppConfigParams) SetAppID(appID string) { - o.AppID = appID -} - -// WriteToRequest writes these params to a swagger request -func (o *GetAppConfigParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { - - if err := r.SetTimeout(o.timeout); err != nil { - return err - } - var res []error - - // path param app_config_id - if err := r.SetPathParam("app_config_id", o.AppConfigID); err != nil { - return err - } - - // path param app_id - if err := r.SetPathParam("app_id", o.AppID); err != nil { - return err - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} diff --git a/client/operations/get_app_config_responses.go b/client/operations/get_app_config_responses.go deleted file mode 100644 index a6a69a2..0000000 --- a/client/operations/get_app_config_responses.go +++ /dev/null @@ -1,486 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package operations - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "encoding/json" - "fmt" - "io" - - "github.com/go-openapi/runtime" - "github.com/go-openapi/strfmt" - - "github.com/nuonco/nuon-go/models" -) - -// GetAppConfigReader is a Reader for the GetAppConfig structure. -type GetAppConfigReader struct { - formats strfmt.Registry -} - -// ReadResponse reads a server response into the received o. -func (o *GetAppConfigReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { - switch response.Code() { - case 200: - result := NewGetAppConfigOK() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return result, nil - case 400: - result := NewGetAppConfigBadRequest() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return nil, result - case 401: - result := NewGetAppConfigUnauthorized() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return nil, result - case 403: - result := NewGetAppConfigForbidden() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return nil, result - case 404: - result := NewGetAppConfigNotFound() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return nil, result - case 500: - result := NewGetAppConfigInternalServerError() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return nil, result - default: - return nil, runtime.NewAPIError("[GET /v1/apps/{app_id}/config/{app_config_id}] GetAppConfig", response, response.Code()) - } -} - -// NewGetAppConfigOK creates a GetAppConfigOK with default headers values -func NewGetAppConfigOK() *GetAppConfigOK { - return &GetAppConfigOK{} -} - -/* -GetAppConfigOK describes a response with status code 200, with default header values. - -OK -*/ -type GetAppConfigOK struct { - Payload *models.AppAppConfig -} - -// IsSuccess returns true when this get app config o k response has a 2xx status code -func (o *GetAppConfigOK) IsSuccess() bool { - return true -} - -// IsRedirect returns true when this get app config o k response has a 3xx status code -func (o *GetAppConfigOK) IsRedirect() bool { - return false -} - -// IsClientError returns true when this get app config o k response has a 4xx status code -func (o *GetAppConfigOK) IsClientError() bool { - return false -} - -// IsServerError returns true when this get app config o k response has a 5xx status code -func (o *GetAppConfigOK) IsServerError() bool { - return false -} - -// IsCode returns true when this get app config o k response a status code equal to that given -func (o *GetAppConfigOK) IsCode(code int) bool { - return code == 200 -} - -// Code gets the status code for the get app config o k response -func (o *GetAppConfigOK) Code() int { - return 200 -} - -func (o *GetAppConfigOK) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /v1/apps/{app_id}/config/{app_config_id}][%d] getAppConfigOK %s", 200, payload) -} - -func (o *GetAppConfigOK) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /v1/apps/{app_id}/config/{app_config_id}][%d] getAppConfigOK %s", 200, payload) -} - -func (o *GetAppConfigOK) GetPayload() *models.AppAppConfig { - return o.Payload -} - -func (o *GetAppConfigOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.AppAppConfig) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewGetAppConfigBadRequest creates a GetAppConfigBadRequest with default headers values -func NewGetAppConfigBadRequest() *GetAppConfigBadRequest { - return &GetAppConfigBadRequest{} -} - -/* -GetAppConfigBadRequest describes a response with status code 400, with default header values. - -Bad Request -*/ -type GetAppConfigBadRequest struct { - Payload *models.StderrErrResponse -} - -// IsSuccess returns true when this get app config bad request response has a 2xx status code -func (o *GetAppConfigBadRequest) IsSuccess() bool { - return false -} - -// IsRedirect returns true when this get app config bad request response has a 3xx status code -func (o *GetAppConfigBadRequest) IsRedirect() bool { - return false -} - -// IsClientError returns true when this get app config bad request response has a 4xx status code -func (o *GetAppConfigBadRequest) IsClientError() bool { - return true -} - -// IsServerError returns true when this get app config bad request response has a 5xx status code -func (o *GetAppConfigBadRequest) IsServerError() bool { - return false -} - -// IsCode returns true when this get app config bad request response a status code equal to that given -func (o *GetAppConfigBadRequest) IsCode(code int) bool { - return code == 400 -} - -// Code gets the status code for the get app config bad request response -func (o *GetAppConfigBadRequest) Code() int { - return 400 -} - -func (o *GetAppConfigBadRequest) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /v1/apps/{app_id}/config/{app_config_id}][%d] getAppConfigBadRequest %s", 400, payload) -} - -func (o *GetAppConfigBadRequest) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /v1/apps/{app_id}/config/{app_config_id}][%d] getAppConfigBadRequest %s", 400, payload) -} - -func (o *GetAppConfigBadRequest) GetPayload() *models.StderrErrResponse { - return o.Payload -} - -func (o *GetAppConfigBadRequest) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.StderrErrResponse) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewGetAppConfigUnauthorized creates a GetAppConfigUnauthorized with default headers values -func NewGetAppConfigUnauthorized() *GetAppConfigUnauthorized { - return &GetAppConfigUnauthorized{} -} - -/* -GetAppConfigUnauthorized describes a response with status code 401, with default header values. - -Unauthorized -*/ -type GetAppConfigUnauthorized struct { - Payload *models.StderrErrResponse -} - -// IsSuccess returns true when this get app config unauthorized response has a 2xx status code -func (o *GetAppConfigUnauthorized) IsSuccess() bool { - return false -} - -// IsRedirect returns true when this get app config unauthorized response has a 3xx status code -func (o *GetAppConfigUnauthorized) IsRedirect() bool { - return false -} - -// IsClientError returns true when this get app config unauthorized response has a 4xx status code -func (o *GetAppConfigUnauthorized) IsClientError() bool { - return true -} - -// IsServerError returns true when this get app config unauthorized response has a 5xx status code -func (o *GetAppConfigUnauthorized) IsServerError() bool { - return false -} - -// IsCode returns true when this get app config unauthorized response a status code equal to that given -func (o *GetAppConfigUnauthorized) IsCode(code int) bool { - return code == 401 -} - -// Code gets the status code for the get app config unauthorized response -func (o *GetAppConfigUnauthorized) Code() int { - return 401 -} - -func (o *GetAppConfigUnauthorized) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /v1/apps/{app_id}/config/{app_config_id}][%d] getAppConfigUnauthorized %s", 401, payload) -} - -func (o *GetAppConfigUnauthorized) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /v1/apps/{app_id}/config/{app_config_id}][%d] getAppConfigUnauthorized %s", 401, payload) -} - -func (o *GetAppConfigUnauthorized) GetPayload() *models.StderrErrResponse { - return o.Payload -} - -func (o *GetAppConfigUnauthorized) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.StderrErrResponse) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewGetAppConfigForbidden creates a GetAppConfigForbidden with default headers values -func NewGetAppConfigForbidden() *GetAppConfigForbidden { - return &GetAppConfigForbidden{} -} - -/* -GetAppConfigForbidden describes a response with status code 403, with default header values. - -Forbidden -*/ -type GetAppConfigForbidden struct { - Payload *models.StderrErrResponse -} - -// IsSuccess returns true when this get app config forbidden response has a 2xx status code -func (o *GetAppConfigForbidden) IsSuccess() bool { - return false -} - -// IsRedirect returns true when this get app config forbidden response has a 3xx status code -func (o *GetAppConfigForbidden) IsRedirect() bool { - return false -} - -// IsClientError returns true when this get app config forbidden response has a 4xx status code -func (o *GetAppConfigForbidden) IsClientError() bool { - return true -} - -// IsServerError returns true when this get app config forbidden response has a 5xx status code -func (o *GetAppConfigForbidden) IsServerError() bool { - return false -} - -// IsCode returns true when this get app config forbidden response a status code equal to that given -func (o *GetAppConfigForbidden) IsCode(code int) bool { - return code == 403 -} - -// Code gets the status code for the get app config forbidden response -func (o *GetAppConfigForbidden) Code() int { - return 403 -} - -func (o *GetAppConfigForbidden) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /v1/apps/{app_id}/config/{app_config_id}][%d] getAppConfigForbidden %s", 403, payload) -} - -func (o *GetAppConfigForbidden) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /v1/apps/{app_id}/config/{app_config_id}][%d] getAppConfigForbidden %s", 403, payload) -} - -func (o *GetAppConfigForbidden) GetPayload() *models.StderrErrResponse { - return o.Payload -} - -func (o *GetAppConfigForbidden) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.StderrErrResponse) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewGetAppConfigNotFound creates a GetAppConfigNotFound with default headers values -func NewGetAppConfigNotFound() *GetAppConfigNotFound { - return &GetAppConfigNotFound{} -} - -/* -GetAppConfigNotFound describes a response with status code 404, with default header values. - -Not Found -*/ -type GetAppConfigNotFound struct { - Payload *models.StderrErrResponse -} - -// IsSuccess returns true when this get app config not found response has a 2xx status code -func (o *GetAppConfigNotFound) IsSuccess() bool { - return false -} - -// IsRedirect returns true when this get app config not found response has a 3xx status code -func (o *GetAppConfigNotFound) IsRedirect() bool { - return false -} - -// IsClientError returns true when this get app config not found response has a 4xx status code -func (o *GetAppConfigNotFound) IsClientError() bool { - return true -} - -// IsServerError returns true when this get app config not found response has a 5xx status code -func (o *GetAppConfigNotFound) IsServerError() bool { - return false -} - -// IsCode returns true when this get app config not found response a status code equal to that given -func (o *GetAppConfigNotFound) IsCode(code int) bool { - return code == 404 -} - -// Code gets the status code for the get app config not found response -func (o *GetAppConfigNotFound) Code() int { - return 404 -} - -func (o *GetAppConfigNotFound) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /v1/apps/{app_id}/config/{app_config_id}][%d] getAppConfigNotFound %s", 404, payload) -} - -func (o *GetAppConfigNotFound) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /v1/apps/{app_id}/config/{app_config_id}][%d] getAppConfigNotFound %s", 404, payload) -} - -func (o *GetAppConfigNotFound) GetPayload() *models.StderrErrResponse { - return o.Payload -} - -func (o *GetAppConfigNotFound) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.StderrErrResponse) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewGetAppConfigInternalServerError creates a GetAppConfigInternalServerError with default headers values -func NewGetAppConfigInternalServerError() *GetAppConfigInternalServerError { - return &GetAppConfigInternalServerError{} -} - -/* -GetAppConfigInternalServerError describes a response with status code 500, with default header values. - -Internal Server Error -*/ -type GetAppConfigInternalServerError struct { - Payload *models.StderrErrResponse -} - -// IsSuccess returns true when this get app config internal server error response has a 2xx status code -func (o *GetAppConfigInternalServerError) IsSuccess() bool { - return false -} - -// IsRedirect returns true when this get app config internal server error response has a 3xx status code -func (o *GetAppConfigInternalServerError) IsRedirect() bool { - return false -} - -// IsClientError returns true when this get app config internal server error response has a 4xx status code -func (o *GetAppConfigInternalServerError) IsClientError() bool { - return false -} - -// IsServerError returns true when this get app config internal server error response has a 5xx status code -func (o *GetAppConfigInternalServerError) IsServerError() bool { - return true -} - -// IsCode returns true when this get app config internal server error response a status code equal to that given -func (o *GetAppConfigInternalServerError) IsCode(code int) bool { - return code == 500 -} - -// Code gets the status code for the get app config internal server error response -func (o *GetAppConfigInternalServerError) Code() int { - return 500 -} - -func (o *GetAppConfigInternalServerError) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /v1/apps/{app_id}/config/{app_config_id}][%d] getAppConfigInternalServerError %s", 500, payload) -} - -func (o *GetAppConfigInternalServerError) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /v1/apps/{app_id}/config/{app_config_id}][%d] getAppConfigInternalServerError %s", 500, payload) -} - -func (o *GetAppConfigInternalServerError) GetPayload() *models.StderrErrResponse { - return o.Payload -} - -func (o *GetAppConfigInternalServerError) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.StderrErrResponse) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} diff --git a/client/operations/get_app_config_template_parameters.go b/client/operations/get_app_config_template_parameters.go deleted file mode 100644 index 7e15877..0000000 --- a/client/operations/get_app_config_template_parameters.go +++ /dev/null @@ -1,178 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package operations - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "context" - "net/http" - "time" - - "github.com/go-openapi/errors" - "github.com/go-openapi/runtime" - cr "github.com/go-openapi/runtime/client" - "github.com/go-openapi/strfmt" -) - -// NewGetAppConfigTemplateParams creates a new GetAppConfigTemplateParams object, -// with the default timeout for this client. -// -// Default values are not hydrated, since defaults are normally applied by the API server side. -// -// To enforce default values in parameter, use SetDefaults or WithDefaults. -func NewGetAppConfigTemplateParams() *GetAppConfigTemplateParams { - return &GetAppConfigTemplateParams{ - timeout: cr.DefaultTimeout, - } -} - -// NewGetAppConfigTemplateParamsWithTimeout creates a new GetAppConfigTemplateParams object -// with the ability to set a timeout on a request. -func NewGetAppConfigTemplateParamsWithTimeout(timeout time.Duration) *GetAppConfigTemplateParams { - return &GetAppConfigTemplateParams{ - timeout: timeout, - } -} - -// NewGetAppConfigTemplateParamsWithContext creates a new GetAppConfigTemplateParams object -// with the ability to set a context for a request. -func NewGetAppConfigTemplateParamsWithContext(ctx context.Context) *GetAppConfigTemplateParams { - return &GetAppConfigTemplateParams{ - Context: ctx, - } -} - -// NewGetAppConfigTemplateParamsWithHTTPClient creates a new GetAppConfigTemplateParams object -// with the ability to set a custom HTTPClient for a request. -func NewGetAppConfigTemplateParamsWithHTTPClient(client *http.Client) *GetAppConfigTemplateParams { - return &GetAppConfigTemplateParams{ - HTTPClient: client, - } -} - -/* -GetAppConfigTemplateParams contains all the parameters to send to the API endpoint - - for the get app config template operation. - - Typically these are written to a http.Request. -*/ -type GetAppConfigTemplateParams struct { - - /* AppID. - - app ID - */ - AppID string - - /* Type. - - app template type - */ - Type string - - timeout time.Duration - Context context.Context - HTTPClient *http.Client -} - -// WithDefaults hydrates default values in the get app config template params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *GetAppConfigTemplateParams) WithDefaults() *GetAppConfigTemplateParams { - o.SetDefaults() - return o -} - -// SetDefaults hydrates default values in the get app config template params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *GetAppConfigTemplateParams) SetDefaults() { - // no default values defined for this parameter -} - -// WithTimeout adds the timeout to the get app config template params -func (o *GetAppConfigTemplateParams) WithTimeout(timeout time.Duration) *GetAppConfigTemplateParams { - o.SetTimeout(timeout) - return o -} - -// SetTimeout adds the timeout to the get app config template params -func (o *GetAppConfigTemplateParams) SetTimeout(timeout time.Duration) { - o.timeout = timeout -} - -// WithContext adds the context to the get app config template params -func (o *GetAppConfigTemplateParams) WithContext(ctx context.Context) *GetAppConfigTemplateParams { - o.SetContext(ctx) - return o -} - -// SetContext adds the context to the get app config template params -func (o *GetAppConfigTemplateParams) SetContext(ctx context.Context) { - o.Context = ctx -} - -// WithHTTPClient adds the HTTPClient to the get app config template params -func (o *GetAppConfigTemplateParams) WithHTTPClient(client *http.Client) *GetAppConfigTemplateParams { - o.SetHTTPClient(client) - return o -} - -// SetHTTPClient adds the HTTPClient to the get app config template params -func (o *GetAppConfigTemplateParams) SetHTTPClient(client *http.Client) { - o.HTTPClient = client -} - -// WithAppID adds the appID to the get app config template params -func (o *GetAppConfigTemplateParams) WithAppID(appID string) *GetAppConfigTemplateParams { - o.SetAppID(appID) - return o -} - -// SetAppID adds the appId to the get app config template params -func (o *GetAppConfigTemplateParams) SetAppID(appID string) { - o.AppID = appID -} - -// WithType adds the typeVar to the get app config template params -func (o *GetAppConfigTemplateParams) WithType(typeVar string) *GetAppConfigTemplateParams { - o.SetType(typeVar) - return o -} - -// SetType adds the type to the get app config template params -func (o *GetAppConfigTemplateParams) SetType(typeVar string) { - o.Type = typeVar -} - -// WriteToRequest writes these params to a swagger request -func (o *GetAppConfigTemplateParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { - - if err := r.SetTimeout(o.timeout); err != nil { - return err - } - var res []error - - // path param app_id - if err := r.SetPathParam("app_id", o.AppID); err != nil { - return err - } - - // query param type - qrType := o.Type - qType := qrType - if qType != "" { - - if err := r.SetQueryParam("type", qType); err != nil { - return err - } - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} diff --git a/client/operations/get_app_config_template_responses.go b/client/operations/get_app_config_template_responses.go deleted file mode 100644 index c0331c2..0000000 --- a/client/operations/get_app_config_template_responses.go +++ /dev/null @@ -1,486 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package operations - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "encoding/json" - "fmt" - "io" - - "github.com/go-openapi/runtime" - "github.com/go-openapi/strfmt" - - "github.com/nuonco/nuon-go/models" -) - -// GetAppConfigTemplateReader is a Reader for the GetAppConfigTemplate structure. -type GetAppConfigTemplateReader struct { - formats strfmt.Registry -} - -// ReadResponse reads a server response into the received o. -func (o *GetAppConfigTemplateReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { - switch response.Code() { - case 201: - result := NewGetAppConfigTemplateCreated() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return result, nil - case 400: - result := NewGetAppConfigTemplateBadRequest() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return nil, result - case 401: - result := NewGetAppConfigTemplateUnauthorized() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return nil, result - case 403: - result := NewGetAppConfigTemplateForbidden() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return nil, result - case 404: - result := NewGetAppConfigTemplateNotFound() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return nil, result - case 500: - result := NewGetAppConfigTemplateInternalServerError() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return nil, result - default: - return nil, runtime.NewAPIError("[GET /v1/apps/{app_id}/template-config] GetAppConfigTemplate", response, response.Code()) - } -} - -// NewGetAppConfigTemplateCreated creates a GetAppConfigTemplateCreated with default headers values -func NewGetAppConfigTemplateCreated() *GetAppConfigTemplateCreated { - return &GetAppConfigTemplateCreated{} -} - -/* -GetAppConfigTemplateCreated describes a response with status code 201, with default header values. - -Created -*/ -type GetAppConfigTemplateCreated struct { - Payload *models.ServiceAppConfigTemplate -} - -// IsSuccess returns true when this get app config template created response has a 2xx status code -func (o *GetAppConfigTemplateCreated) IsSuccess() bool { - return true -} - -// IsRedirect returns true when this get app config template created response has a 3xx status code -func (o *GetAppConfigTemplateCreated) IsRedirect() bool { - return false -} - -// IsClientError returns true when this get app config template created response has a 4xx status code -func (o *GetAppConfigTemplateCreated) IsClientError() bool { - return false -} - -// IsServerError returns true when this get app config template created response has a 5xx status code -func (o *GetAppConfigTemplateCreated) IsServerError() bool { - return false -} - -// IsCode returns true when this get app config template created response a status code equal to that given -func (o *GetAppConfigTemplateCreated) IsCode(code int) bool { - return code == 201 -} - -// Code gets the status code for the get app config template created response -func (o *GetAppConfigTemplateCreated) Code() int { - return 201 -} - -func (o *GetAppConfigTemplateCreated) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /v1/apps/{app_id}/template-config][%d] getAppConfigTemplateCreated %s", 201, payload) -} - -func (o *GetAppConfigTemplateCreated) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /v1/apps/{app_id}/template-config][%d] getAppConfigTemplateCreated %s", 201, payload) -} - -func (o *GetAppConfigTemplateCreated) GetPayload() *models.ServiceAppConfigTemplate { - return o.Payload -} - -func (o *GetAppConfigTemplateCreated) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.ServiceAppConfigTemplate) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewGetAppConfigTemplateBadRequest creates a GetAppConfigTemplateBadRequest with default headers values -func NewGetAppConfigTemplateBadRequest() *GetAppConfigTemplateBadRequest { - return &GetAppConfigTemplateBadRequest{} -} - -/* -GetAppConfigTemplateBadRequest describes a response with status code 400, with default header values. - -Bad Request -*/ -type GetAppConfigTemplateBadRequest struct { - Payload *models.StderrErrResponse -} - -// IsSuccess returns true when this get app config template bad request response has a 2xx status code -func (o *GetAppConfigTemplateBadRequest) IsSuccess() bool { - return false -} - -// IsRedirect returns true when this get app config template bad request response has a 3xx status code -func (o *GetAppConfigTemplateBadRequest) IsRedirect() bool { - return false -} - -// IsClientError returns true when this get app config template bad request response has a 4xx status code -func (o *GetAppConfigTemplateBadRequest) IsClientError() bool { - return true -} - -// IsServerError returns true when this get app config template bad request response has a 5xx status code -func (o *GetAppConfigTemplateBadRequest) IsServerError() bool { - return false -} - -// IsCode returns true when this get app config template bad request response a status code equal to that given -func (o *GetAppConfigTemplateBadRequest) IsCode(code int) bool { - return code == 400 -} - -// Code gets the status code for the get app config template bad request response -func (o *GetAppConfigTemplateBadRequest) Code() int { - return 400 -} - -func (o *GetAppConfigTemplateBadRequest) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /v1/apps/{app_id}/template-config][%d] getAppConfigTemplateBadRequest %s", 400, payload) -} - -func (o *GetAppConfigTemplateBadRequest) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /v1/apps/{app_id}/template-config][%d] getAppConfigTemplateBadRequest %s", 400, payload) -} - -func (o *GetAppConfigTemplateBadRequest) GetPayload() *models.StderrErrResponse { - return o.Payload -} - -func (o *GetAppConfigTemplateBadRequest) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.StderrErrResponse) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewGetAppConfigTemplateUnauthorized creates a GetAppConfigTemplateUnauthorized with default headers values -func NewGetAppConfigTemplateUnauthorized() *GetAppConfigTemplateUnauthorized { - return &GetAppConfigTemplateUnauthorized{} -} - -/* -GetAppConfigTemplateUnauthorized describes a response with status code 401, with default header values. - -Unauthorized -*/ -type GetAppConfigTemplateUnauthorized struct { - Payload *models.StderrErrResponse -} - -// IsSuccess returns true when this get app config template unauthorized response has a 2xx status code -func (o *GetAppConfigTemplateUnauthorized) IsSuccess() bool { - return false -} - -// IsRedirect returns true when this get app config template unauthorized response has a 3xx status code -func (o *GetAppConfigTemplateUnauthorized) IsRedirect() bool { - return false -} - -// IsClientError returns true when this get app config template unauthorized response has a 4xx status code -func (o *GetAppConfigTemplateUnauthorized) IsClientError() bool { - return true -} - -// IsServerError returns true when this get app config template unauthorized response has a 5xx status code -func (o *GetAppConfigTemplateUnauthorized) IsServerError() bool { - return false -} - -// IsCode returns true when this get app config template unauthorized response a status code equal to that given -func (o *GetAppConfigTemplateUnauthorized) IsCode(code int) bool { - return code == 401 -} - -// Code gets the status code for the get app config template unauthorized response -func (o *GetAppConfigTemplateUnauthorized) Code() int { - return 401 -} - -func (o *GetAppConfigTemplateUnauthorized) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /v1/apps/{app_id}/template-config][%d] getAppConfigTemplateUnauthorized %s", 401, payload) -} - -func (o *GetAppConfigTemplateUnauthorized) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /v1/apps/{app_id}/template-config][%d] getAppConfigTemplateUnauthorized %s", 401, payload) -} - -func (o *GetAppConfigTemplateUnauthorized) GetPayload() *models.StderrErrResponse { - return o.Payload -} - -func (o *GetAppConfigTemplateUnauthorized) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.StderrErrResponse) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewGetAppConfigTemplateForbidden creates a GetAppConfigTemplateForbidden with default headers values -func NewGetAppConfigTemplateForbidden() *GetAppConfigTemplateForbidden { - return &GetAppConfigTemplateForbidden{} -} - -/* -GetAppConfigTemplateForbidden describes a response with status code 403, with default header values. - -Forbidden -*/ -type GetAppConfigTemplateForbidden struct { - Payload *models.StderrErrResponse -} - -// IsSuccess returns true when this get app config template forbidden response has a 2xx status code -func (o *GetAppConfigTemplateForbidden) IsSuccess() bool { - return false -} - -// IsRedirect returns true when this get app config template forbidden response has a 3xx status code -func (o *GetAppConfigTemplateForbidden) IsRedirect() bool { - return false -} - -// IsClientError returns true when this get app config template forbidden response has a 4xx status code -func (o *GetAppConfigTemplateForbidden) IsClientError() bool { - return true -} - -// IsServerError returns true when this get app config template forbidden response has a 5xx status code -func (o *GetAppConfigTemplateForbidden) IsServerError() bool { - return false -} - -// IsCode returns true when this get app config template forbidden response a status code equal to that given -func (o *GetAppConfigTemplateForbidden) IsCode(code int) bool { - return code == 403 -} - -// Code gets the status code for the get app config template forbidden response -func (o *GetAppConfigTemplateForbidden) Code() int { - return 403 -} - -func (o *GetAppConfigTemplateForbidden) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /v1/apps/{app_id}/template-config][%d] getAppConfigTemplateForbidden %s", 403, payload) -} - -func (o *GetAppConfigTemplateForbidden) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /v1/apps/{app_id}/template-config][%d] getAppConfigTemplateForbidden %s", 403, payload) -} - -func (o *GetAppConfigTemplateForbidden) GetPayload() *models.StderrErrResponse { - return o.Payload -} - -func (o *GetAppConfigTemplateForbidden) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.StderrErrResponse) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewGetAppConfigTemplateNotFound creates a GetAppConfigTemplateNotFound with default headers values -func NewGetAppConfigTemplateNotFound() *GetAppConfigTemplateNotFound { - return &GetAppConfigTemplateNotFound{} -} - -/* -GetAppConfigTemplateNotFound describes a response with status code 404, with default header values. - -Not Found -*/ -type GetAppConfigTemplateNotFound struct { - Payload *models.StderrErrResponse -} - -// IsSuccess returns true when this get app config template not found response has a 2xx status code -func (o *GetAppConfigTemplateNotFound) IsSuccess() bool { - return false -} - -// IsRedirect returns true when this get app config template not found response has a 3xx status code -func (o *GetAppConfigTemplateNotFound) IsRedirect() bool { - return false -} - -// IsClientError returns true when this get app config template not found response has a 4xx status code -func (o *GetAppConfigTemplateNotFound) IsClientError() bool { - return true -} - -// IsServerError returns true when this get app config template not found response has a 5xx status code -func (o *GetAppConfigTemplateNotFound) IsServerError() bool { - return false -} - -// IsCode returns true when this get app config template not found response a status code equal to that given -func (o *GetAppConfigTemplateNotFound) IsCode(code int) bool { - return code == 404 -} - -// Code gets the status code for the get app config template not found response -func (o *GetAppConfigTemplateNotFound) Code() int { - return 404 -} - -func (o *GetAppConfigTemplateNotFound) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /v1/apps/{app_id}/template-config][%d] getAppConfigTemplateNotFound %s", 404, payload) -} - -func (o *GetAppConfigTemplateNotFound) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /v1/apps/{app_id}/template-config][%d] getAppConfigTemplateNotFound %s", 404, payload) -} - -func (o *GetAppConfigTemplateNotFound) GetPayload() *models.StderrErrResponse { - return o.Payload -} - -func (o *GetAppConfigTemplateNotFound) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.StderrErrResponse) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewGetAppConfigTemplateInternalServerError creates a GetAppConfigTemplateInternalServerError with default headers values -func NewGetAppConfigTemplateInternalServerError() *GetAppConfigTemplateInternalServerError { - return &GetAppConfigTemplateInternalServerError{} -} - -/* -GetAppConfigTemplateInternalServerError describes a response with status code 500, with default header values. - -Internal Server Error -*/ -type GetAppConfigTemplateInternalServerError struct { - Payload *models.StderrErrResponse -} - -// IsSuccess returns true when this get app config template internal server error response has a 2xx status code -func (o *GetAppConfigTemplateInternalServerError) IsSuccess() bool { - return false -} - -// IsRedirect returns true when this get app config template internal server error response has a 3xx status code -func (o *GetAppConfigTemplateInternalServerError) IsRedirect() bool { - return false -} - -// IsClientError returns true when this get app config template internal server error response has a 4xx status code -func (o *GetAppConfigTemplateInternalServerError) IsClientError() bool { - return false -} - -// IsServerError returns true when this get app config template internal server error response has a 5xx status code -func (o *GetAppConfigTemplateInternalServerError) IsServerError() bool { - return true -} - -// IsCode returns true when this get app config template internal server error response a status code equal to that given -func (o *GetAppConfigTemplateInternalServerError) IsCode(code int) bool { - return code == 500 -} - -// Code gets the status code for the get app config template internal server error response -func (o *GetAppConfigTemplateInternalServerError) Code() int { - return 500 -} - -func (o *GetAppConfigTemplateInternalServerError) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /v1/apps/{app_id}/template-config][%d] getAppConfigTemplateInternalServerError %s", 500, payload) -} - -func (o *GetAppConfigTemplateInternalServerError) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /v1/apps/{app_id}/template-config][%d] getAppConfigTemplateInternalServerError %s", 500, payload) -} - -func (o *GetAppConfigTemplateInternalServerError) GetPayload() *models.StderrErrResponse { - return o.Payload -} - -func (o *GetAppConfigTemplateInternalServerError) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.StderrErrResponse) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} diff --git a/client/operations/get_app_configs_parameters.go b/client/operations/get_app_configs_parameters.go deleted file mode 100644 index e0fe2c6..0000000 --- a/client/operations/get_app_configs_parameters.go +++ /dev/null @@ -1,151 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package operations - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "context" - "net/http" - "time" - - "github.com/go-openapi/errors" - "github.com/go-openapi/runtime" - cr "github.com/go-openapi/runtime/client" - "github.com/go-openapi/strfmt" -) - -// NewGetAppConfigsParams creates a new GetAppConfigsParams object, -// with the default timeout for this client. -// -// Default values are not hydrated, since defaults are normally applied by the API server side. -// -// To enforce default values in parameter, use SetDefaults or WithDefaults. -func NewGetAppConfigsParams() *GetAppConfigsParams { - return &GetAppConfigsParams{ - timeout: cr.DefaultTimeout, - } -} - -// NewGetAppConfigsParamsWithTimeout creates a new GetAppConfigsParams object -// with the ability to set a timeout on a request. -func NewGetAppConfigsParamsWithTimeout(timeout time.Duration) *GetAppConfigsParams { - return &GetAppConfigsParams{ - timeout: timeout, - } -} - -// NewGetAppConfigsParamsWithContext creates a new GetAppConfigsParams object -// with the ability to set a context for a request. -func NewGetAppConfigsParamsWithContext(ctx context.Context) *GetAppConfigsParams { - return &GetAppConfigsParams{ - Context: ctx, - } -} - -// NewGetAppConfigsParamsWithHTTPClient creates a new GetAppConfigsParams object -// with the ability to set a custom HTTPClient for a request. -func NewGetAppConfigsParamsWithHTTPClient(client *http.Client) *GetAppConfigsParams { - return &GetAppConfigsParams{ - HTTPClient: client, - } -} - -/* -GetAppConfigsParams contains all the parameters to send to the API endpoint - - for the get app configs operation. - - Typically these are written to a http.Request. -*/ -type GetAppConfigsParams struct { - - /* AppID. - - app ID - */ - AppID string - - timeout time.Duration - Context context.Context - HTTPClient *http.Client -} - -// WithDefaults hydrates default values in the get app configs params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *GetAppConfigsParams) WithDefaults() *GetAppConfigsParams { - o.SetDefaults() - return o -} - -// SetDefaults hydrates default values in the get app configs params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *GetAppConfigsParams) SetDefaults() { - // no default values defined for this parameter -} - -// WithTimeout adds the timeout to the get app configs params -func (o *GetAppConfigsParams) WithTimeout(timeout time.Duration) *GetAppConfigsParams { - o.SetTimeout(timeout) - return o -} - -// SetTimeout adds the timeout to the get app configs params -func (o *GetAppConfigsParams) SetTimeout(timeout time.Duration) { - o.timeout = timeout -} - -// WithContext adds the context to the get app configs params -func (o *GetAppConfigsParams) WithContext(ctx context.Context) *GetAppConfigsParams { - o.SetContext(ctx) - return o -} - -// SetContext adds the context to the get app configs params -func (o *GetAppConfigsParams) SetContext(ctx context.Context) { - o.Context = ctx -} - -// WithHTTPClient adds the HTTPClient to the get app configs params -func (o *GetAppConfigsParams) WithHTTPClient(client *http.Client) *GetAppConfigsParams { - o.SetHTTPClient(client) - return o -} - -// SetHTTPClient adds the HTTPClient to the get app configs params -func (o *GetAppConfigsParams) SetHTTPClient(client *http.Client) { - o.HTTPClient = client -} - -// WithAppID adds the appID to the get app configs params -func (o *GetAppConfigsParams) WithAppID(appID string) *GetAppConfigsParams { - o.SetAppID(appID) - return o -} - -// SetAppID adds the appId to the get app configs params -func (o *GetAppConfigsParams) SetAppID(appID string) { - o.AppID = appID -} - -// WriteToRequest writes these params to a swagger request -func (o *GetAppConfigsParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { - - if err := r.SetTimeout(o.timeout); err != nil { - return err - } - var res []error - - // path param app_id - if err := r.SetPathParam("app_id", o.AppID); err != nil { - return err - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} diff --git a/client/operations/get_app_configs_responses.go b/client/operations/get_app_configs_responses.go deleted file mode 100644 index f0d9530..0000000 --- a/client/operations/get_app_configs_responses.go +++ /dev/null @@ -1,484 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package operations - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "encoding/json" - "fmt" - "io" - - "github.com/go-openapi/runtime" - "github.com/go-openapi/strfmt" - - "github.com/nuonco/nuon-go/models" -) - -// GetAppConfigsReader is a Reader for the GetAppConfigs structure. -type GetAppConfigsReader struct { - formats strfmt.Registry -} - -// ReadResponse reads a server response into the received o. -func (o *GetAppConfigsReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { - switch response.Code() { - case 200: - result := NewGetAppConfigsOK() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return result, nil - case 400: - result := NewGetAppConfigsBadRequest() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return nil, result - case 401: - result := NewGetAppConfigsUnauthorized() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return nil, result - case 403: - result := NewGetAppConfigsForbidden() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return nil, result - case 404: - result := NewGetAppConfigsNotFound() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return nil, result - case 500: - result := NewGetAppConfigsInternalServerError() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return nil, result - default: - return nil, runtime.NewAPIError("[GET /v1/apps/{app_id}/configs] GetAppConfigs", response, response.Code()) - } -} - -// NewGetAppConfigsOK creates a GetAppConfigsOK with default headers values -func NewGetAppConfigsOK() *GetAppConfigsOK { - return &GetAppConfigsOK{} -} - -/* -GetAppConfigsOK describes a response with status code 200, with default header values. - -OK -*/ -type GetAppConfigsOK struct { - Payload []*models.AppAppConfig -} - -// IsSuccess returns true when this get app configs o k response has a 2xx status code -func (o *GetAppConfigsOK) IsSuccess() bool { - return true -} - -// IsRedirect returns true when this get app configs o k response has a 3xx status code -func (o *GetAppConfigsOK) IsRedirect() bool { - return false -} - -// IsClientError returns true when this get app configs o k response has a 4xx status code -func (o *GetAppConfigsOK) IsClientError() bool { - return false -} - -// IsServerError returns true when this get app configs o k response has a 5xx status code -func (o *GetAppConfigsOK) IsServerError() bool { - return false -} - -// IsCode returns true when this get app configs o k response a status code equal to that given -func (o *GetAppConfigsOK) IsCode(code int) bool { - return code == 200 -} - -// Code gets the status code for the get app configs o k response -func (o *GetAppConfigsOK) Code() int { - return 200 -} - -func (o *GetAppConfigsOK) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /v1/apps/{app_id}/configs][%d] getAppConfigsOK %s", 200, payload) -} - -func (o *GetAppConfigsOK) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /v1/apps/{app_id}/configs][%d] getAppConfigsOK %s", 200, payload) -} - -func (o *GetAppConfigsOK) GetPayload() []*models.AppAppConfig { - return o.Payload -} - -func (o *GetAppConfigsOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - // response payload - if err := consumer.Consume(response.Body(), &o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewGetAppConfigsBadRequest creates a GetAppConfigsBadRequest with default headers values -func NewGetAppConfigsBadRequest() *GetAppConfigsBadRequest { - return &GetAppConfigsBadRequest{} -} - -/* -GetAppConfigsBadRequest describes a response with status code 400, with default header values. - -Bad Request -*/ -type GetAppConfigsBadRequest struct { - Payload *models.StderrErrResponse -} - -// IsSuccess returns true when this get app configs bad request response has a 2xx status code -func (o *GetAppConfigsBadRequest) IsSuccess() bool { - return false -} - -// IsRedirect returns true when this get app configs bad request response has a 3xx status code -func (o *GetAppConfigsBadRequest) IsRedirect() bool { - return false -} - -// IsClientError returns true when this get app configs bad request response has a 4xx status code -func (o *GetAppConfigsBadRequest) IsClientError() bool { - return true -} - -// IsServerError returns true when this get app configs bad request response has a 5xx status code -func (o *GetAppConfigsBadRequest) IsServerError() bool { - return false -} - -// IsCode returns true when this get app configs bad request response a status code equal to that given -func (o *GetAppConfigsBadRequest) IsCode(code int) bool { - return code == 400 -} - -// Code gets the status code for the get app configs bad request response -func (o *GetAppConfigsBadRequest) Code() int { - return 400 -} - -func (o *GetAppConfigsBadRequest) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /v1/apps/{app_id}/configs][%d] getAppConfigsBadRequest %s", 400, payload) -} - -func (o *GetAppConfigsBadRequest) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /v1/apps/{app_id}/configs][%d] getAppConfigsBadRequest %s", 400, payload) -} - -func (o *GetAppConfigsBadRequest) GetPayload() *models.StderrErrResponse { - return o.Payload -} - -func (o *GetAppConfigsBadRequest) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.StderrErrResponse) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewGetAppConfigsUnauthorized creates a GetAppConfigsUnauthorized with default headers values -func NewGetAppConfigsUnauthorized() *GetAppConfigsUnauthorized { - return &GetAppConfigsUnauthorized{} -} - -/* -GetAppConfigsUnauthorized describes a response with status code 401, with default header values. - -Unauthorized -*/ -type GetAppConfigsUnauthorized struct { - Payload *models.StderrErrResponse -} - -// IsSuccess returns true when this get app configs unauthorized response has a 2xx status code -func (o *GetAppConfigsUnauthorized) IsSuccess() bool { - return false -} - -// IsRedirect returns true when this get app configs unauthorized response has a 3xx status code -func (o *GetAppConfigsUnauthorized) IsRedirect() bool { - return false -} - -// IsClientError returns true when this get app configs unauthorized response has a 4xx status code -func (o *GetAppConfigsUnauthorized) IsClientError() bool { - return true -} - -// IsServerError returns true when this get app configs unauthorized response has a 5xx status code -func (o *GetAppConfigsUnauthorized) IsServerError() bool { - return false -} - -// IsCode returns true when this get app configs unauthorized response a status code equal to that given -func (o *GetAppConfigsUnauthorized) IsCode(code int) bool { - return code == 401 -} - -// Code gets the status code for the get app configs unauthorized response -func (o *GetAppConfigsUnauthorized) Code() int { - return 401 -} - -func (o *GetAppConfigsUnauthorized) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /v1/apps/{app_id}/configs][%d] getAppConfigsUnauthorized %s", 401, payload) -} - -func (o *GetAppConfigsUnauthorized) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /v1/apps/{app_id}/configs][%d] getAppConfigsUnauthorized %s", 401, payload) -} - -func (o *GetAppConfigsUnauthorized) GetPayload() *models.StderrErrResponse { - return o.Payload -} - -func (o *GetAppConfigsUnauthorized) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.StderrErrResponse) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewGetAppConfigsForbidden creates a GetAppConfigsForbidden with default headers values -func NewGetAppConfigsForbidden() *GetAppConfigsForbidden { - return &GetAppConfigsForbidden{} -} - -/* -GetAppConfigsForbidden describes a response with status code 403, with default header values. - -Forbidden -*/ -type GetAppConfigsForbidden struct { - Payload *models.StderrErrResponse -} - -// IsSuccess returns true when this get app configs forbidden response has a 2xx status code -func (o *GetAppConfigsForbidden) IsSuccess() bool { - return false -} - -// IsRedirect returns true when this get app configs forbidden response has a 3xx status code -func (o *GetAppConfigsForbidden) IsRedirect() bool { - return false -} - -// IsClientError returns true when this get app configs forbidden response has a 4xx status code -func (o *GetAppConfigsForbidden) IsClientError() bool { - return true -} - -// IsServerError returns true when this get app configs forbidden response has a 5xx status code -func (o *GetAppConfigsForbidden) IsServerError() bool { - return false -} - -// IsCode returns true when this get app configs forbidden response a status code equal to that given -func (o *GetAppConfigsForbidden) IsCode(code int) bool { - return code == 403 -} - -// Code gets the status code for the get app configs forbidden response -func (o *GetAppConfigsForbidden) Code() int { - return 403 -} - -func (o *GetAppConfigsForbidden) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /v1/apps/{app_id}/configs][%d] getAppConfigsForbidden %s", 403, payload) -} - -func (o *GetAppConfigsForbidden) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /v1/apps/{app_id}/configs][%d] getAppConfigsForbidden %s", 403, payload) -} - -func (o *GetAppConfigsForbidden) GetPayload() *models.StderrErrResponse { - return o.Payload -} - -func (o *GetAppConfigsForbidden) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.StderrErrResponse) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewGetAppConfigsNotFound creates a GetAppConfigsNotFound with default headers values -func NewGetAppConfigsNotFound() *GetAppConfigsNotFound { - return &GetAppConfigsNotFound{} -} - -/* -GetAppConfigsNotFound describes a response with status code 404, with default header values. - -Not Found -*/ -type GetAppConfigsNotFound struct { - Payload *models.StderrErrResponse -} - -// IsSuccess returns true when this get app configs not found response has a 2xx status code -func (o *GetAppConfigsNotFound) IsSuccess() bool { - return false -} - -// IsRedirect returns true when this get app configs not found response has a 3xx status code -func (o *GetAppConfigsNotFound) IsRedirect() bool { - return false -} - -// IsClientError returns true when this get app configs not found response has a 4xx status code -func (o *GetAppConfigsNotFound) IsClientError() bool { - return true -} - -// IsServerError returns true when this get app configs not found response has a 5xx status code -func (o *GetAppConfigsNotFound) IsServerError() bool { - return false -} - -// IsCode returns true when this get app configs not found response a status code equal to that given -func (o *GetAppConfigsNotFound) IsCode(code int) bool { - return code == 404 -} - -// Code gets the status code for the get app configs not found response -func (o *GetAppConfigsNotFound) Code() int { - return 404 -} - -func (o *GetAppConfigsNotFound) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /v1/apps/{app_id}/configs][%d] getAppConfigsNotFound %s", 404, payload) -} - -func (o *GetAppConfigsNotFound) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /v1/apps/{app_id}/configs][%d] getAppConfigsNotFound %s", 404, payload) -} - -func (o *GetAppConfigsNotFound) GetPayload() *models.StderrErrResponse { - return o.Payload -} - -func (o *GetAppConfigsNotFound) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.StderrErrResponse) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewGetAppConfigsInternalServerError creates a GetAppConfigsInternalServerError with default headers values -func NewGetAppConfigsInternalServerError() *GetAppConfigsInternalServerError { - return &GetAppConfigsInternalServerError{} -} - -/* -GetAppConfigsInternalServerError describes a response with status code 500, with default header values. - -Internal Server Error -*/ -type GetAppConfigsInternalServerError struct { - Payload *models.StderrErrResponse -} - -// IsSuccess returns true when this get app configs internal server error response has a 2xx status code -func (o *GetAppConfigsInternalServerError) IsSuccess() bool { - return false -} - -// IsRedirect returns true when this get app configs internal server error response has a 3xx status code -func (o *GetAppConfigsInternalServerError) IsRedirect() bool { - return false -} - -// IsClientError returns true when this get app configs internal server error response has a 4xx status code -func (o *GetAppConfigsInternalServerError) IsClientError() bool { - return false -} - -// IsServerError returns true when this get app configs internal server error response has a 5xx status code -func (o *GetAppConfigsInternalServerError) IsServerError() bool { - return true -} - -// IsCode returns true when this get app configs internal server error response a status code equal to that given -func (o *GetAppConfigsInternalServerError) IsCode(code int) bool { - return code == 500 -} - -// Code gets the status code for the get app configs internal server error response -func (o *GetAppConfigsInternalServerError) Code() int { - return 500 -} - -func (o *GetAppConfigsInternalServerError) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /v1/apps/{app_id}/configs][%d] getAppConfigsInternalServerError %s", 500, payload) -} - -func (o *GetAppConfigsInternalServerError) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /v1/apps/{app_id}/configs][%d] getAppConfigsInternalServerError %s", 500, payload) -} - -func (o *GetAppConfigsInternalServerError) GetPayload() *models.StderrErrResponse { - return o.Payload -} - -func (o *GetAppConfigsInternalServerError) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.StderrErrResponse) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} diff --git a/client/operations/get_app_input_configs_parameters.go b/client/operations/get_app_input_configs_parameters.go deleted file mode 100644 index 1063bac..0000000 --- a/client/operations/get_app_input_configs_parameters.go +++ /dev/null @@ -1,151 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package operations - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "context" - "net/http" - "time" - - "github.com/go-openapi/errors" - "github.com/go-openapi/runtime" - cr "github.com/go-openapi/runtime/client" - "github.com/go-openapi/strfmt" -) - -// NewGetAppInputConfigsParams creates a new GetAppInputConfigsParams object, -// with the default timeout for this client. -// -// Default values are not hydrated, since defaults are normally applied by the API server side. -// -// To enforce default values in parameter, use SetDefaults or WithDefaults. -func NewGetAppInputConfigsParams() *GetAppInputConfigsParams { - return &GetAppInputConfigsParams{ - timeout: cr.DefaultTimeout, - } -} - -// NewGetAppInputConfigsParamsWithTimeout creates a new GetAppInputConfigsParams object -// with the ability to set a timeout on a request. -func NewGetAppInputConfigsParamsWithTimeout(timeout time.Duration) *GetAppInputConfigsParams { - return &GetAppInputConfigsParams{ - timeout: timeout, - } -} - -// NewGetAppInputConfigsParamsWithContext creates a new GetAppInputConfigsParams object -// with the ability to set a context for a request. -func NewGetAppInputConfigsParamsWithContext(ctx context.Context) *GetAppInputConfigsParams { - return &GetAppInputConfigsParams{ - Context: ctx, - } -} - -// NewGetAppInputConfigsParamsWithHTTPClient creates a new GetAppInputConfigsParams object -// with the ability to set a custom HTTPClient for a request. -func NewGetAppInputConfigsParamsWithHTTPClient(client *http.Client) *GetAppInputConfigsParams { - return &GetAppInputConfigsParams{ - HTTPClient: client, - } -} - -/* -GetAppInputConfigsParams contains all the parameters to send to the API endpoint - - for the get app input configs operation. - - Typically these are written to a http.Request. -*/ -type GetAppInputConfigsParams struct { - - /* AppID. - - app ID - */ - AppID string - - timeout time.Duration - Context context.Context - HTTPClient *http.Client -} - -// WithDefaults hydrates default values in the get app input configs params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *GetAppInputConfigsParams) WithDefaults() *GetAppInputConfigsParams { - o.SetDefaults() - return o -} - -// SetDefaults hydrates default values in the get app input configs params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *GetAppInputConfigsParams) SetDefaults() { - // no default values defined for this parameter -} - -// WithTimeout adds the timeout to the get app input configs params -func (o *GetAppInputConfigsParams) WithTimeout(timeout time.Duration) *GetAppInputConfigsParams { - o.SetTimeout(timeout) - return o -} - -// SetTimeout adds the timeout to the get app input configs params -func (o *GetAppInputConfigsParams) SetTimeout(timeout time.Duration) { - o.timeout = timeout -} - -// WithContext adds the context to the get app input configs params -func (o *GetAppInputConfigsParams) WithContext(ctx context.Context) *GetAppInputConfigsParams { - o.SetContext(ctx) - return o -} - -// SetContext adds the context to the get app input configs params -func (o *GetAppInputConfigsParams) SetContext(ctx context.Context) { - o.Context = ctx -} - -// WithHTTPClient adds the HTTPClient to the get app input configs params -func (o *GetAppInputConfigsParams) WithHTTPClient(client *http.Client) *GetAppInputConfigsParams { - o.SetHTTPClient(client) - return o -} - -// SetHTTPClient adds the HTTPClient to the get app input configs params -func (o *GetAppInputConfigsParams) SetHTTPClient(client *http.Client) { - o.HTTPClient = client -} - -// WithAppID adds the appID to the get app input configs params -func (o *GetAppInputConfigsParams) WithAppID(appID string) *GetAppInputConfigsParams { - o.SetAppID(appID) - return o -} - -// SetAppID adds the appId to the get app input configs params -func (o *GetAppInputConfigsParams) SetAppID(appID string) { - o.AppID = appID -} - -// WriteToRequest writes these params to a swagger request -func (o *GetAppInputConfigsParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { - - if err := r.SetTimeout(o.timeout); err != nil { - return err - } - var res []error - - // path param app_id - if err := r.SetPathParam("app_id", o.AppID); err != nil { - return err - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} diff --git a/client/operations/get_app_input_configs_responses.go b/client/operations/get_app_input_configs_responses.go deleted file mode 100644 index f198b82..0000000 --- a/client/operations/get_app_input_configs_responses.go +++ /dev/null @@ -1,484 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package operations - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "encoding/json" - "fmt" - "io" - - "github.com/go-openapi/runtime" - "github.com/go-openapi/strfmt" - - "github.com/nuonco/nuon-go/models" -) - -// GetAppInputConfigsReader is a Reader for the GetAppInputConfigs structure. -type GetAppInputConfigsReader struct { - formats strfmt.Registry -} - -// ReadResponse reads a server response into the received o. -func (o *GetAppInputConfigsReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { - switch response.Code() { - case 200: - result := NewGetAppInputConfigsOK() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return result, nil - case 400: - result := NewGetAppInputConfigsBadRequest() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return nil, result - case 401: - result := NewGetAppInputConfigsUnauthorized() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return nil, result - case 403: - result := NewGetAppInputConfigsForbidden() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return nil, result - case 404: - result := NewGetAppInputConfigsNotFound() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return nil, result - case 500: - result := NewGetAppInputConfigsInternalServerError() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return nil, result - default: - return nil, runtime.NewAPIError("[GET /v1/apps/{app_id}/input-configs] GetAppInputConfigs", response, response.Code()) - } -} - -// NewGetAppInputConfigsOK creates a GetAppInputConfigsOK with default headers values -func NewGetAppInputConfigsOK() *GetAppInputConfigsOK { - return &GetAppInputConfigsOK{} -} - -/* -GetAppInputConfigsOK describes a response with status code 200, with default header values. - -OK -*/ -type GetAppInputConfigsOK struct { - Payload []*models.AppAppInputConfig -} - -// IsSuccess returns true when this get app input configs o k response has a 2xx status code -func (o *GetAppInputConfigsOK) IsSuccess() bool { - return true -} - -// IsRedirect returns true when this get app input configs o k response has a 3xx status code -func (o *GetAppInputConfigsOK) IsRedirect() bool { - return false -} - -// IsClientError returns true when this get app input configs o k response has a 4xx status code -func (o *GetAppInputConfigsOK) IsClientError() bool { - return false -} - -// IsServerError returns true when this get app input configs o k response has a 5xx status code -func (o *GetAppInputConfigsOK) IsServerError() bool { - return false -} - -// IsCode returns true when this get app input configs o k response a status code equal to that given -func (o *GetAppInputConfigsOK) IsCode(code int) bool { - return code == 200 -} - -// Code gets the status code for the get app input configs o k response -func (o *GetAppInputConfigsOK) Code() int { - return 200 -} - -func (o *GetAppInputConfigsOK) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /v1/apps/{app_id}/input-configs][%d] getAppInputConfigsOK %s", 200, payload) -} - -func (o *GetAppInputConfigsOK) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /v1/apps/{app_id}/input-configs][%d] getAppInputConfigsOK %s", 200, payload) -} - -func (o *GetAppInputConfigsOK) GetPayload() []*models.AppAppInputConfig { - return o.Payload -} - -func (o *GetAppInputConfigsOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - // response payload - if err := consumer.Consume(response.Body(), &o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewGetAppInputConfigsBadRequest creates a GetAppInputConfigsBadRequest with default headers values -func NewGetAppInputConfigsBadRequest() *GetAppInputConfigsBadRequest { - return &GetAppInputConfigsBadRequest{} -} - -/* -GetAppInputConfigsBadRequest describes a response with status code 400, with default header values. - -Bad Request -*/ -type GetAppInputConfigsBadRequest struct { - Payload *models.StderrErrResponse -} - -// IsSuccess returns true when this get app input configs bad request response has a 2xx status code -func (o *GetAppInputConfigsBadRequest) IsSuccess() bool { - return false -} - -// IsRedirect returns true when this get app input configs bad request response has a 3xx status code -func (o *GetAppInputConfigsBadRequest) IsRedirect() bool { - return false -} - -// IsClientError returns true when this get app input configs bad request response has a 4xx status code -func (o *GetAppInputConfigsBadRequest) IsClientError() bool { - return true -} - -// IsServerError returns true when this get app input configs bad request response has a 5xx status code -func (o *GetAppInputConfigsBadRequest) IsServerError() bool { - return false -} - -// IsCode returns true when this get app input configs bad request response a status code equal to that given -func (o *GetAppInputConfigsBadRequest) IsCode(code int) bool { - return code == 400 -} - -// Code gets the status code for the get app input configs bad request response -func (o *GetAppInputConfigsBadRequest) Code() int { - return 400 -} - -func (o *GetAppInputConfigsBadRequest) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /v1/apps/{app_id}/input-configs][%d] getAppInputConfigsBadRequest %s", 400, payload) -} - -func (o *GetAppInputConfigsBadRequest) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /v1/apps/{app_id}/input-configs][%d] getAppInputConfigsBadRequest %s", 400, payload) -} - -func (o *GetAppInputConfigsBadRequest) GetPayload() *models.StderrErrResponse { - return o.Payload -} - -func (o *GetAppInputConfigsBadRequest) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.StderrErrResponse) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewGetAppInputConfigsUnauthorized creates a GetAppInputConfigsUnauthorized with default headers values -func NewGetAppInputConfigsUnauthorized() *GetAppInputConfigsUnauthorized { - return &GetAppInputConfigsUnauthorized{} -} - -/* -GetAppInputConfigsUnauthorized describes a response with status code 401, with default header values. - -Unauthorized -*/ -type GetAppInputConfigsUnauthorized struct { - Payload *models.StderrErrResponse -} - -// IsSuccess returns true when this get app input configs unauthorized response has a 2xx status code -func (o *GetAppInputConfigsUnauthorized) IsSuccess() bool { - return false -} - -// IsRedirect returns true when this get app input configs unauthorized response has a 3xx status code -func (o *GetAppInputConfigsUnauthorized) IsRedirect() bool { - return false -} - -// IsClientError returns true when this get app input configs unauthorized response has a 4xx status code -func (o *GetAppInputConfigsUnauthorized) IsClientError() bool { - return true -} - -// IsServerError returns true when this get app input configs unauthorized response has a 5xx status code -func (o *GetAppInputConfigsUnauthorized) IsServerError() bool { - return false -} - -// IsCode returns true when this get app input configs unauthorized response a status code equal to that given -func (o *GetAppInputConfigsUnauthorized) IsCode(code int) bool { - return code == 401 -} - -// Code gets the status code for the get app input configs unauthorized response -func (o *GetAppInputConfigsUnauthorized) Code() int { - return 401 -} - -func (o *GetAppInputConfigsUnauthorized) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /v1/apps/{app_id}/input-configs][%d] getAppInputConfigsUnauthorized %s", 401, payload) -} - -func (o *GetAppInputConfigsUnauthorized) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /v1/apps/{app_id}/input-configs][%d] getAppInputConfigsUnauthorized %s", 401, payload) -} - -func (o *GetAppInputConfigsUnauthorized) GetPayload() *models.StderrErrResponse { - return o.Payload -} - -func (o *GetAppInputConfigsUnauthorized) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.StderrErrResponse) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewGetAppInputConfigsForbidden creates a GetAppInputConfigsForbidden with default headers values -func NewGetAppInputConfigsForbidden() *GetAppInputConfigsForbidden { - return &GetAppInputConfigsForbidden{} -} - -/* -GetAppInputConfigsForbidden describes a response with status code 403, with default header values. - -Forbidden -*/ -type GetAppInputConfigsForbidden struct { - Payload *models.StderrErrResponse -} - -// IsSuccess returns true when this get app input configs forbidden response has a 2xx status code -func (o *GetAppInputConfigsForbidden) IsSuccess() bool { - return false -} - -// IsRedirect returns true when this get app input configs forbidden response has a 3xx status code -func (o *GetAppInputConfigsForbidden) IsRedirect() bool { - return false -} - -// IsClientError returns true when this get app input configs forbidden response has a 4xx status code -func (o *GetAppInputConfigsForbidden) IsClientError() bool { - return true -} - -// IsServerError returns true when this get app input configs forbidden response has a 5xx status code -func (o *GetAppInputConfigsForbidden) IsServerError() bool { - return false -} - -// IsCode returns true when this get app input configs forbidden response a status code equal to that given -func (o *GetAppInputConfigsForbidden) IsCode(code int) bool { - return code == 403 -} - -// Code gets the status code for the get app input configs forbidden response -func (o *GetAppInputConfigsForbidden) Code() int { - return 403 -} - -func (o *GetAppInputConfigsForbidden) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /v1/apps/{app_id}/input-configs][%d] getAppInputConfigsForbidden %s", 403, payload) -} - -func (o *GetAppInputConfigsForbidden) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /v1/apps/{app_id}/input-configs][%d] getAppInputConfigsForbidden %s", 403, payload) -} - -func (o *GetAppInputConfigsForbidden) GetPayload() *models.StderrErrResponse { - return o.Payload -} - -func (o *GetAppInputConfigsForbidden) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.StderrErrResponse) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewGetAppInputConfigsNotFound creates a GetAppInputConfigsNotFound with default headers values -func NewGetAppInputConfigsNotFound() *GetAppInputConfigsNotFound { - return &GetAppInputConfigsNotFound{} -} - -/* -GetAppInputConfigsNotFound describes a response with status code 404, with default header values. - -Not Found -*/ -type GetAppInputConfigsNotFound struct { - Payload *models.StderrErrResponse -} - -// IsSuccess returns true when this get app input configs not found response has a 2xx status code -func (o *GetAppInputConfigsNotFound) IsSuccess() bool { - return false -} - -// IsRedirect returns true when this get app input configs not found response has a 3xx status code -func (o *GetAppInputConfigsNotFound) IsRedirect() bool { - return false -} - -// IsClientError returns true when this get app input configs not found response has a 4xx status code -func (o *GetAppInputConfigsNotFound) IsClientError() bool { - return true -} - -// IsServerError returns true when this get app input configs not found response has a 5xx status code -func (o *GetAppInputConfigsNotFound) IsServerError() bool { - return false -} - -// IsCode returns true when this get app input configs not found response a status code equal to that given -func (o *GetAppInputConfigsNotFound) IsCode(code int) bool { - return code == 404 -} - -// Code gets the status code for the get app input configs not found response -func (o *GetAppInputConfigsNotFound) Code() int { - return 404 -} - -func (o *GetAppInputConfigsNotFound) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /v1/apps/{app_id}/input-configs][%d] getAppInputConfigsNotFound %s", 404, payload) -} - -func (o *GetAppInputConfigsNotFound) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /v1/apps/{app_id}/input-configs][%d] getAppInputConfigsNotFound %s", 404, payload) -} - -func (o *GetAppInputConfigsNotFound) GetPayload() *models.StderrErrResponse { - return o.Payload -} - -func (o *GetAppInputConfigsNotFound) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.StderrErrResponse) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewGetAppInputConfigsInternalServerError creates a GetAppInputConfigsInternalServerError with default headers values -func NewGetAppInputConfigsInternalServerError() *GetAppInputConfigsInternalServerError { - return &GetAppInputConfigsInternalServerError{} -} - -/* -GetAppInputConfigsInternalServerError describes a response with status code 500, with default header values. - -Internal Server Error -*/ -type GetAppInputConfigsInternalServerError struct { - Payload *models.StderrErrResponse -} - -// IsSuccess returns true when this get app input configs internal server error response has a 2xx status code -func (o *GetAppInputConfigsInternalServerError) IsSuccess() bool { - return false -} - -// IsRedirect returns true when this get app input configs internal server error response has a 3xx status code -func (o *GetAppInputConfigsInternalServerError) IsRedirect() bool { - return false -} - -// IsClientError returns true when this get app input configs internal server error response has a 4xx status code -func (o *GetAppInputConfigsInternalServerError) IsClientError() bool { - return false -} - -// IsServerError returns true when this get app input configs internal server error response has a 5xx status code -func (o *GetAppInputConfigsInternalServerError) IsServerError() bool { - return true -} - -// IsCode returns true when this get app input configs internal server error response a status code equal to that given -func (o *GetAppInputConfigsInternalServerError) IsCode(code int) bool { - return code == 500 -} - -// Code gets the status code for the get app input configs internal server error response -func (o *GetAppInputConfigsInternalServerError) Code() int { - return 500 -} - -func (o *GetAppInputConfigsInternalServerError) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /v1/apps/{app_id}/input-configs][%d] getAppInputConfigsInternalServerError %s", 500, payload) -} - -func (o *GetAppInputConfigsInternalServerError) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /v1/apps/{app_id}/input-configs][%d] getAppInputConfigsInternalServerError %s", 500, payload) -} - -func (o *GetAppInputConfigsInternalServerError) GetPayload() *models.StderrErrResponse { - return o.Payload -} - -func (o *GetAppInputConfigsInternalServerError) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.StderrErrResponse) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} diff --git a/client/operations/get_app_input_latest_config_parameters.go b/client/operations/get_app_input_latest_config_parameters.go deleted file mode 100644 index 2840ce1..0000000 --- a/client/operations/get_app_input_latest_config_parameters.go +++ /dev/null @@ -1,151 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package operations - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "context" - "net/http" - "time" - - "github.com/go-openapi/errors" - "github.com/go-openapi/runtime" - cr "github.com/go-openapi/runtime/client" - "github.com/go-openapi/strfmt" -) - -// NewGetAppInputLatestConfigParams creates a new GetAppInputLatestConfigParams object, -// with the default timeout for this client. -// -// Default values are not hydrated, since defaults are normally applied by the API server side. -// -// To enforce default values in parameter, use SetDefaults or WithDefaults. -func NewGetAppInputLatestConfigParams() *GetAppInputLatestConfigParams { - return &GetAppInputLatestConfigParams{ - timeout: cr.DefaultTimeout, - } -} - -// NewGetAppInputLatestConfigParamsWithTimeout creates a new GetAppInputLatestConfigParams object -// with the ability to set a timeout on a request. -func NewGetAppInputLatestConfigParamsWithTimeout(timeout time.Duration) *GetAppInputLatestConfigParams { - return &GetAppInputLatestConfigParams{ - timeout: timeout, - } -} - -// NewGetAppInputLatestConfigParamsWithContext creates a new GetAppInputLatestConfigParams object -// with the ability to set a context for a request. -func NewGetAppInputLatestConfigParamsWithContext(ctx context.Context) *GetAppInputLatestConfigParams { - return &GetAppInputLatestConfigParams{ - Context: ctx, - } -} - -// NewGetAppInputLatestConfigParamsWithHTTPClient creates a new GetAppInputLatestConfigParams object -// with the ability to set a custom HTTPClient for a request. -func NewGetAppInputLatestConfigParamsWithHTTPClient(client *http.Client) *GetAppInputLatestConfigParams { - return &GetAppInputLatestConfigParams{ - HTTPClient: client, - } -} - -/* -GetAppInputLatestConfigParams contains all the parameters to send to the API endpoint - - for the get app input latest config operation. - - Typically these are written to a http.Request. -*/ -type GetAppInputLatestConfigParams struct { - - /* AppID. - - app ID - */ - AppID string - - timeout time.Duration - Context context.Context - HTTPClient *http.Client -} - -// WithDefaults hydrates default values in the get app input latest config params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *GetAppInputLatestConfigParams) WithDefaults() *GetAppInputLatestConfigParams { - o.SetDefaults() - return o -} - -// SetDefaults hydrates default values in the get app input latest config params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *GetAppInputLatestConfigParams) SetDefaults() { - // no default values defined for this parameter -} - -// WithTimeout adds the timeout to the get app input latest config params -func (o *GetAppInputLatestConfigParams) WithTimeout(timeout time.Duration) *GetAppInputLatestConfigParams { - o.SetTimeout(timeout) - return o -} - -// SetTimeout adds the timeout to the get app input latest config params -func (o *GetAppInputLatestConfigParams) SetTimeout(timeout time.Duration) { - o.timeout = timeout -} - -// WithContext adds the context to the get app input latest config params -func (o *GetAppInputLatestConfigParams) WithContext(ctx context.Context) *GetAppInputLatestConfigParams { - o.SetContext(ctx) - return o -} - -// SetContext adds the context to the get app input latest config params -func (o *GetAppInputLatestConfigParams) SetContext(ctx context.Context) { - o.Context = ctx -} - -// WithHTTPClient adds the HTTPClient to the get app input latest config params -func (o *GetAppInputLatestConfigParams) WithHTTPClient(client *http.Client) *GetAppInputLatestConfigParams { - o.SetHTTPClient(client) - return o -} - -// SetHTTPClient adds the HTTPClient to the get app input latest config params -func (o *GetAppInputLatestConfigParams) SetHTTPClient(client *http.Client) { - o.HTTPClient = client -} - -// WithAppID adds the appID to the get app input latest config params -func (o *GetAppInputLatestConfigParams) WithAppID(appID string) *GetAppInputLatestConfigParams { - o.SetAppID(appID) - return o -} - -// SetAppID adds the appId to the get app input latest config params -func (o *GetAppInputLatestConfigParams) SetAppID(appID string) { - o.AppID = appID -} - -// WriteToRequest writes these params to a swagger request -func (o *GetAppInputLatestConfigParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { - - if err := r.SetTimeout(o.timeout); err != nil { - return err - } - var res []error - - // path param app_id - if err := r.SetPathParam("app_id", o.AppID); err != nil { - return err - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} diff --git a/client/operations/get_app_input_latest_config_responses.go b/client/operations/get_app_input_latest_config_responses.go deleted file mode 100644 index 61c6a84..0000000 --- a/client/operations/get_app_input_latest_config_responses.go +++ /dev/null @@ -1,486 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package operations - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "encoding/json" - "fmt" - "io" - - "github.com/go-openapi/runtime" - "github.com/go-openapi/strfmt" - - "github.com/nuonco/nuon-go/models" -) - -// GetAppInputLatestConfigReader is a Reader for the GetAppInputLatestConfig structure. -type GetAppInputLatestConfigReader struct { - formats strfmt.Registry -} - -// ReadResponse reads a server response into the received o. -func (o *GetAppInputLatestConfigReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { - switch response.Code() { - case 200: - result := NewGetAppInputLatestConfigOK() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return result, nil - case 400: - result := NewGetAppInputLatestConfigBadRequest() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return nil, result - case 401: - result := NewGetAppInputLatestConfigUnauthorized() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return nil, result - case 403: - result := NewGetAppInputLatestConfigForbidden() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return nil, result - case 404: - result := NewGetAppInputLatestConfigNotFound() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return nil, result - case 500: - result := NewGetAppInputLatestConfigInternalServerError() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return nil, result - default: - return nil, runtime.NewAPIError("[GET /v1/apps/{app_id}/input-latest-config] GetAppInputLatestConfig", response, response.Code()) - } -} - -// NewGetAppInputLatestConfigOK creates a GetAppInputLatestConfigOK with default headers values -func NewGetAppInputLatestConfigOK() *GetAppInputLatestConfigOK { - return &GetAppInputLatestConfigOK{} -} - -/* -GetAppInputLatestConfigOK describes a response with status code 200, with default header values. - -OK -*/ -type GetAppInputLatestConfigOK struct { - Payload *models.AppAppInputConfig -} - -// IsSuccess returns true when this get app input latest config o k response has a 2xx status code -func (o *GetAppInputLatestConfigOK) IsSuccess() bool { - return true -} - -// IsRedirect returns true when this get app input latest config o k response has a 3xx status code -func (o *GetAppInputLatestConfigOK) IsRedirect() bool { - return false -} - -// IsClientError returns true when this get app input latest config o k response has a 4xx status code -func (o *GetAppInputLatestConfigOK) IsClientError() bool { - return false -} - -// IsServerError returns true when this get app input latest config o k response has a 5xx status code -func (o *GetAppInputLatestConfigOK) IsServerError() bool { - return false -} - -// IsCode returns true when this get app input latest config o k response a status code equal to that given -func (o *GetAppInputLatestConfigOK) IsCode(code int) bool { - return code == 200 -} - -// Code gets the status code for the get app input latest config o k response -func (o *GetAppInputLatestConfigOK) Code() int { - return 200 -} - -func (o *GetAppInputLatestConfigOK) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /v1/apps/{app_id}/input-latest-config][%d] getAppInputLatestConfigOK %s", 200, payload) -} - -func (o *GetAppInputLatestConfigOK) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /v1/apps/{app_id}/input-latest-config][%d] getAppInputLatestConfigOK %s", 200, payload) -} - -func (o *GetAppInputLatestConfigOK) GetPayload() *models.AppAppInputConfig { - return o.Payload -} - -func (o *GetAppInputLatestConfigOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.AppAppInputConfig) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewGetAppInputLatestConfigBadRequest creates a GetAppInputLatestConfigBadRequest with default headers values -func NewGetAppInputLatestConfigBadRequest() *GetAppInputLatestConfigBadRequest { - return &GetAppInputLatestConfigBadRequest{} -} - -/* -GetAppInputLatestConfigBadRequest describes a response with status code 400, with default header values. - -Bad Request -*/ -type GetAppInputLatestConfigBadRequest struct { - Payload *models.StderrErrResponse -} - -// IsSuccess returns true when this get app input latest config bad request response has a 2xx status code -func (o *GetAppInputLatestConfigBadRequest) IsSuccess() bool { - return false -} - -// IsRedirect returns true when this get app input latest config bad request response has a 3xx status code -func (o *GetAppInputLatestConfigBadRequest) IsRedirect() bool { - return false -} - -// IsClientError returns true when this get app input latest config bad request response has a 4xx status code -func (o *GetAppInputLatestConfigBadRequest) IsClientError() bool { - return true -} - -// IsServerError returns true when this get app input latest config bad request response has a 5xx status code -func (o *GetAppInputLatestConfigBadRequest) IsServerError() bool { - return false -} - -// IsCode returns true when this get app input latest config bad request response a status code equal to that given -func (o *GetAppInputLatestConfigBadRequest) IsCode(code int) bool { - return code == 400 -} - -// Code gets the status code for the get app input latest config bad request response -func (o *GetAppInputLatestConfigBadRequest) Code() int { - return 400 -} - -func (o *GetAppInputLatestConfigBadRequest) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /v1/apps/{app_id}/input-latest-config][%d] getAppInputLatestConfigBadRequest %s", 400, payload) -} - -func (o *GetAppInputLatestConfigBadRequest) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /v1/apps/{app_id}/input-latest-config][%d] getAppInputLatestConfigBadRequest %s", 400, payload) -} - -func (o *GetAppInputLatestConfigBadRequest) GetPayload() *models.StderrErrResponse { - return o.Payload -} - -func (o *GetAppInputLatestConfigBadRequest) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.StderrErrResponse) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewGetAppInputLatestConfigUnauthorized creates a GetAppInputLatestConfigUnauthorized with default headers values -func NewGetAppInputLatestConfigUnauthorized() *GetAppInputLatestConfigUnauthorized { - return &GetAppInputLatestConfigUnauthorized{} -} - -/* -GetAppInputLatestConfigUnauthorized describes a response with status code 401, with default header values. - -Unauthorized -*/ -type GetAppInputLatestConfigUnauthorized struct { - Payload *models.StderrErrResponse -} - -// IsSuccess returns true when this get app input latest config unauthorized response has a 2xx status code -func (o *GetAppInputLatestConfigUnauthorized) IsSuccess() bool { - return false -} - -// IsRedirect returns true when this get app input latest config unauthorized response has a 3xx status code -func (o *GetAppInputLatestConfigUnauthorized) IsRedirect() bool { - return false -} - -// IsClientError returns true when this get app input latest config unauthorized response has a 4xx status code -func (o *GetAppInputLatestConfigUnauthorized) IsClientError() bool { - return true -} - -// IsServerError returns true when this get app input latest config unauthorized response has a 5xx status code -func (o *GetAppInputLatestConfigUnauthorized) IsServerError() bool { - return false -} - -// IsCode returns true when this get app input latest config unauthorized response a status code equal to that given -func (o *GetAppInputLatestConfigUnauthorized) IsCode(code int) bool { - return code == 401 -} - -// Code gets the status code for the get app input latest config unauthorized response -func (o *GetAppInputLatestConfigUnauthorized) Code() int { - return 401 -} - -func (o *GetAppInputLatestConfigUnauthorized) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /v1/apps/{app_id}/input-latest-config][%d] getAppInputLatestConfigUnauthorized %s", 401, payload) -} - -func (o *GetAppInputLatestConfigUnauthorized) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /v1/apps/{app_id}/input-latest-config][%d] getAppInputLatestConfigUnauthorized %s", 401, payload) -} - -func (o *GetAppInputLatestConfigUnauthorized) GetPayload() *models.StderrErrResponse { - return o.Payload -} - -func (o *GetAppInputLatestConfigUnauthorized) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.StderrErrResponse) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewGetAppInputLatestConfigForbidden creates a GetAppInputLatestConfigForbidden with default headers values -func NewGetAppInputLatestConfigForbidden() *GetAppInputLatestConfigForbidden { - return &GetAppInputLatestConfigForbidden{} -} - -/* -GetAppInputLatestConfigForbidden describes a response with status code 403, with default header values. - -Forbidden -*/ -type GetAppInputLatestConfigForbidden struct { - Payload *models.StderrErrResponse -} - -// IsSuccess returns true when this get app input latest config forbidden response has a 2xx status code -func (o *GetAppInputLatestConfigForbidden) IsSuccess() bool { - return false -} - -// IsRedirect returns true when this get app input latest config forbidden response has a 3xx status code -func (o *GetAppInputLatestConfigForbidden) IsRedirect() bool { - return false -} - -// IsClientError returns true when this get app input latest config forbidden response has a 4xx status code -func (o *GetAppInputLatestConfigForbidden) IsClientError() bool { - return true -} - -// IsServerError returns true when this get app input latest config forbidden response has a 5xx status code -func (o *GetAppInputLatestConfigForbidden) IsServerError() bool { - return false -} - -// IsCode returns true when this get app input latest config forbidden response a status code equal to that given -func (o *GetAppInputLatestConfigForbidden) IsCode(code int) bool { - return code == 403 -} - -// Code gets the status code for the get app input latest config forbidden response -func (o *GetAppInputLatestConfigForbidden) Code() int { - return 403 -} - -func (o *GetAppInputLatestConfigForbidden) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /v1/apps/{app_id}/input-latest-config][%d] getAppInputLatestConfigForbidden %s", 403, payload) -} - -func (o *GetAppInputLatestConfigForbidden) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /v1/apps/{app_id}/input-latest-config][%d] getAppInputLatestConfigForbidden %s", 403, payload) -} - -func (o *GetAppInputLatestConfigForbidden) GetPayload() *models.StderrErrResponse { - return o.Payload -} - -func (o *GetAppInputLatestConfigForbidden) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.StderrErrResponse) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewGetAppInputLatestConfigNotFound creates a GetAppInputLatestConfigNotFound with default headers values -func NewGetAppInputLatestConfigNotFound() *GetAppInputLatestConfigNotFound { - return &GetAppInputLatestConfigNotFound{} -} - -/* -GetAppInputLatestConfigNotFound describes a response with status code 404, with default header values. - -Not Found -*/ -type GetAppInputLatestConfigNotFound struct { - Payload *models.StderrErrResponse -} - -// IsSuccess returns true when this get app input latest config not found response has a 2xx status code -func (o *GetAppInputLatestConfigNotFound) IsSuccess() bool { - return false -} - -// IsRedirect returns true when this get app input latest config not found response has a 3xx status code -func (o *GetAppInputLatestConfigNotFound) IsRedirect() bool { - return false -} - -// IsClientError returns true when this get app input latest config not found response has a 4xx status code -func (o *GetAppInputLatestConfigNotFound) IsClientError() bool { - return true -} - -// IsServerError returns true when this get app input latest config not found response has a 5xx status code -func (o *GetAppInputLatestConfigNotFound) IsServerError() bool { - return false -} - -// IsCode returns true when this get app input latest config not found response a status code equal to that given -func (o *GetAppInputLatestConfigNotFound) IsCode(code int) bool { - return code == 404 -} - -// Code gets the status code for the get app input latest config not found response -func (o *GetAppInputLatestConfigNotFound) Code() int { - return 404 -} - -func (o *GetAppInputLatestConfigNotFound) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /v1/apps/{app_id}/input-latest-config][%d] getAppInputLatestConfigNotFound %s", 404, payload) -} - -func (o *GetAppInputLatestConfigNotFound) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /v1/apps/{app_id}/input-latest-config][%d] getAppInputLatestConfigNotFound %s", 404, payload) -} - -func (o *GetAppInputLatestConfigNotFound) GetPayload() *models.StderrErrResponse { - return o.Payload -} - -func (o *GetAppInputLatestConfigNotFound) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.StderrErrResponse) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewGetAppInputLatestConfigInternalServerError creates a GetAppInputLatestConfigInternalServerError with default headers values -func NewGetAppInputLatestConfigInternalServerError() *GetAppInputLatestConfigInternalServerError { - return &GetAppInputLatestConfigInternalServerError{} -} - -/* -GetAppInputLatestConfigInternalServerError describes a response with status code 500, with default header values. - -Internal Server Error -*/ -type GetAppInputLatestConfigInternalServerError struct { - Payload *models.StderrErrResponse -} - -// IsSuccess returns true when this get app input latest config internal server error response has a 2xx status code -func (o *GetAppInputLatestConfigInternalServerError) IsSuccess() bool { - return false -} - -// IsRedirect returns true when this get app input latest config internal server error response has a 3xx status code -func (o *GetAppInputLatestConfigInternalServerError) IsRedirect() bool { - return false -} - -// IsClientError returns true when this get app input latest config internal server error response has a 4xx status code -func (o *GetAppInputLatestConfigInternalServerError) IsClientError() bool { - return false -} - -// IsServerError returns true when this get app input latest config internal server error response has a 5xx status code -func (o *GetAppInputLatestConfigInternalServerError) IsServerError() bool { - return true -} - -// IsCode returns true when this get app input latest config internal server error response a status code equal to that given -func (o *GetAppInputLatestConfigInternalServerError) IsCode(code int) bool { - return code == 500 -} - -// Code gets the status code for the get app input latest config internal server error response -func (o *GetAppInputLatestConfigInternalServerError) Code() int { - return 500 -} - -func (o *GetAppInputLatestConfigInternalServerError) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /v1/apps/{app_id}/input-latest-config][%d] getAppInputLatestConfigInternalServerError %s", 500, payload) -} - -func (o *GetAppInputLatestConfigInternalServerError) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /v1/apps/{app_id}/input-latest-config][%d] getAppInputLatestConfigInternalServerError %s", 500, payload) -} - -func (o *GetAppInputLatestConfigInternalServerError) GetPayload() *models.StderrErrResponse { - return o.Payload -} - -func (o *GetAppInputLatestConfigInternalServerError) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.StderrErrResponse) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} diff --git a/client/operations/get_app_installs_parameters.go b/client/operations/get_app_installs_parameters.go deleted file mode 100644 index 060a7e4..0000000 --- a/client/operations/get_app_installs_parameters.go +++ /dev/null @@ -1,151 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package operations - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "context" - "net/http" - "time" - - "github.com/go-openapi/errors" - "github.com/go-openapi/runtime" - cr "github.com/go-openapi/runtime/client" - "github.com/go-openapi/strfmt" -) - -// NewGetAppInstallsParams creates a new GetAppInstallsParams object, -// with the default timeout for this client. -// -// Default values are not hydrated, since defaults are normally applied by the API server side. -// -// To enforce default values in parameter, use SetDefaults or WithDefaults. -func NewGetAppInstallsParams() *GetAppInstallsParams { - return &GetAppInstallsParams{ - timeout: cr.DefaultTimeout, - } -} - -// NewGetAppInstallsParamsWithTimeout creates a new GetAppInstallsParams object -// with the ability to set a timeout on a request. -func NewGetAppInstallsParamsWithTimeout(timeout time.Duration) *GetAppInstallsParams { - return &GetAppInstallsParams{ - timeout: timeout, - } -} - -// NewGetAppInstallsParamsWithContext creates a new GetAppInstallsParams object -// with the ability to set a context for a request. -func NewGetAppInstallsParamsWithContext(ctx context.Context) *GetAppInstallsParams { - return &GetAppInstallsParams{ - Context: ctx, - } -} - -// NewGetAppInstallsParamsWithHTTPClient creates a new GetAppInstallsParams object -// with the ability to set a custom HTTPClient for a request. -func NewGetAppInstallsParamsWithHTTPClient(client *http.Client) *GetAppInstallsParams { - return &GetAppInstallsParams{ - HTTPClient: client, - } -} - -/* -GetAppInstallsParams contains all the parameters to send to the API endpoint - - for the get app installs operation. - - Typically these are written to a http.Request. -*/ -type GetAppInstallsParams struct { - - /* AppID. - - app ID - */ - AppID string - - timeout time.Duration - Context context.Context - HTTPClient *http.Client -} - -// WithDefaults hydrates default values in the get app installs params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *GetAppInstallsParams) WithDefaults() *GetAppInstallsParams { - o.SetDefaults() - return o -} - -// SetDefaults hydrates default values in the get app installs params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *GetAppInstallsParams) SetDefaults() { - // no default values defined for this parameter -} - -// WithTimeout adds the timeout to the get app installs params -func (o *GetAppInstallsParams) WithTimeout(timeout time.Duration) *GetAppInstallsParams { - o.SetTimeout(timeout) - return o -} - -// SetTimeout adds the timeout to the get app installs params -func (o *GetAppInstallsParams) SetTimeout(timeout time.Duration) { - o.timeout = timeout -} - -// WithContext adds the context to the get app installs params -func (o *GetAppInstallsParams) WithContext(ctx context.Context) *GetAppInstallsParams { - o.SetContext(ctx) - return o -} - -// SetContext adds the context to the get app installs params -func (o *GetAppInstallsParams) SetContext(ctx context.Context) { - o.Context = ctx -} - -// WithHTTPClient adds the HTTPClient to the get app installs params -func (o *GetAppInstallsParams) WithHTTPClient(client *http.Client) *GetAppInstallsParams { - o.SetHTTPClient(client) - return o -} - -// SetHTTPClient adds the HTTPClient to the get app installs params -func (o *GetAppInstallsParams) SetHTTPClient(client *http.Client) { - o.HTTPClient = client -} - -// WithAppID adds the appID to the get app installs params -func (o *GetAppInstallsParams) WithAppID(appID string) *GetAppInstallsParams { - o.SetAppID(appID) - return o -} - -// SetAppID adds the appId to the get app installs params -func (o *GetAppInstallsParams) SetAppID(appID string) { - o.AppID = appID -} - -// WriteToRequest writes these params to a swagger request -func (o *GetAppInstallsParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { - - if err := r.SetTimeout(o.timeout); err != nil { - return err - } - var res []error - - // path param app_id - if err := r.SetPathParam("app_id", o.AppID); err != nil { - return err - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} diff --git a/client/operations/get_app_installs_responses.go b/client/operations/get_app_installs_responses.go deleted file mode 100644 index 9c52bc8..0000000 --- a/client/operations/get_app_installs_responses.go +++ /dev/null @@ -1,484 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package operations - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "encoding/json" - "fmt" - "io" - - "github.com/go-openapi/runtime" - "github.com/go-openapi/strfmt" - - "github.com/nuonco/nuon-go/models" -) - -// GetAppInstallsReader is a Reader for the GetAppInstalls structure. -type GetAppInstallsReader struct { - formats strfmt.Registry -} - -// ReadResponse reads a server response into the received o. -func (o *GetAppInstallsReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { - switch response.Code() { - case 200: - result := NewGetAppInstallsOK() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return result, nil - case 400: - result := NewGetAppInstallsBadRequest() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return nil, result - case 401: - result := NewGetAppInstallsUnauthorized() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return nil, result - case 403: - result := NewGetAppInstallsForbidden() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return nil, result - case 404: - result := NewGetAppInstallsNotFound() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return nil, result - case 500: - result := NewGetAppInstallsInternalServerError() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return nil, result - default: - return nil, runtime.NewAPIError("[GET /v1/apps/{app_id}/installs] GetAppInstalls", response, response.Code()) - } -} - -// NewGetAppInstallsOK creates a GetAppInstallsOK with default headers values -func NewGetAppInstallsOK() *GetAppInstallsOK { - return &GetAppInstallsOK{} -} - -/* -GetAppInstallsOK describes a response with status code 200, with default header values. - -OK -*/ -type GetAppInstallsOK struct { - Payload []*models.AppInstall -} - -// IsSuccess returns true when this get app installs o k response has a 2xx status code -func (o *GetAppInstallsOK) IsSuccess() bool { - return true -} - -// IsRedirect returns true when this get app installs o k response has a 3xx status code -func (o *GetAppInstallsOK) IsRedirect() bool { - return false -} - -// IsClientError returns true when this get app installs o k response has a 4xx status code -func (o *GetAppInstallsOK) IsClientError() bool { - return false -} - -// IsServerError returns true when this get app installs o k response has a 5xx status code -func (o *GetAppInstallsOK) IsServerError() bool { - return false -} - -// IsCode returns true when this get app installs o k response a status code equal to that given -func (o *GetAppInstallsOK) IsCode(code int) bool { - return code == 200 -} - -// Code gets the status code for the get app installs o k response -func (o *GetAppInstallsOK) Code() int { - return 200 -} - -func (o *GetAppInstallsOK) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /v1/apps/{app_id}/installs][%d] getAppInstallsOK %s", 200, payload) -} - -func (o *GetAppInstallsOK) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /v1/apps/{app_id}/installs][%d] getAppInstallsOK %s", 200, payload) -} - -func (o *GetAppInstallsOK) GetPayload() []*models.AppInstall { - return o.Payload -} - -func (o *GetAppInstallsOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - // response payload - if err := consumer.Consume(response.Body(), &o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewGetAppInstallsBadRequest creates a GetAppInstallsBadRequest with default headers values -func NewGetAppInstallsBadRequest() *GetAppInstallsBadRequest { - return &GetAppInstallsBadRequest{} -} - -/* -GetAppInstallsBadRequest describes a response with status code 400, with default header values. - -Bad Request -*/ -type GetAppInstallsBadRequest struct { - Payload *models.StderrErrResponse -} - -// IsSuccess returns true when this get app installs bad request response has a 2xx status code -func (o *GetAppInstallsBadRequest) IsSuccess() bool { - return false -} - -// IsRedirect returns true when this get app installs bad request response has a 3xx status code -func (o *GetAppInstallsBadRequest) IsRedirect() bool { - return false -} - -// IsClientError returns true when this get app installs bad request response has a 4xx status code -func (o *GetAppInstallsBadRequest) IsClientError() bool { - return true -} - -// IsServerError returns true when this get app installs bad request response has a 5xx status code -func (o *GetAppInstallsBadRequest) IsServerError() bool { - return false -} - -// IsCode returns true when this get app installs bad request response a status code equal to that given -func (o *GetAppInstallsBadRequest) IsCode(code int) bool { - return code == 400 -} - -// Code gets the status code for the get app installs bad request response -func (o *GetAppInstallsBadRequest) Code() int { - return 400 -} - -func (o *GetAppInstallsBadRequest) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /v1/apps/{app_id}/installs][%d] getAppInstallsBadRequest %s", 400, payload) -} - -func (o *GetAppInstallsBadRequest) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /v1/apps/{app_id}/installs][%d] getAppInstallsBadRequest %s", 400, payload) -} - -func (o *GetAppInstallsBadRequest) GetPayload() *models.StderrErrResponse { - return o.Payload -} - -func (o *GetAppInstallsBadRequest) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.StderrErrResponse) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewGetAppInstallsUnauthorized creates a GetAppInstallsUnauthorized with default headers values -func NewGetAppInstallsUnauthorized() *GetAppInstallsUnauthorized { - return &GetAppInstallsUnauthorized{} -} - -/* -GetAppInstallsUnauthorized describes a response with status code 401, with default header values. - -Unauthorized -*/ -type GetAppInstallsUnauthorized struct { - Payload *models.StderrErrResponse -} - -// IsSuccess returns true when this get app installs unauthorized response has a 2xx status code -func (o *GetAppInstallsUnauthorized) IsSuccess() bool { - return false -} - -// IsRedirect returns true when this get app installs unauthorized response has a 3xx status code -func (o *GetAppInstallsUnauthorized) IsRedirect() bool { - return false -} - -// IsClientError returns true when this get app installs unauthorized response has a 4xx status code -func (o *GetAppInstallsUnauthorized) IsClientError() bool { - return true -} - -// IsServerError returns true when this get app installs unauthorized response has a 5xx status code -func (o *GetAppInstallsUnauthorized) IsServerError() bool { - return false -} - -// IsCode returns true when this get app installs unauthorized response a status code equal to that given -func (o *GetAppInstallsUnauthorized) IsCode(code int) bool { - return code == 401 -} - -// Code gets the status code for the get app installs unauthorized response -func (o *GetAppInstallsUnauthorized) Code() int { - return 401 -} - -func (o *GetAppInstallsUnauthorized) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /v1/apps/{app_id}/installs][%d] getAppInstallsUnauthorized %s", 401, payload) -} - -func (o *GetAppInstallsUnauthorized) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /v1/apps/{app_id}/installs][%d] getAppInstallsUnauthorized %s", 401, payload) -} - -func (o *GetAppInstallsUnauthorized) GetPayload() *models.StderrErrResponse { - return o.Payload -} - -func (o *GetAppInstallsUnauthorized) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.StderrErrResponse) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewGetAppInstallsForbidden creates a GetAppInstallsForbidden with default headers values -func NewGetAppInstallsForbidden() *GetAppInstallsForbidden { - return &GetAppInstallsForbidden{} -} - -/* -GetAppInstallsForbidden describes a response with status code 403, with default header values. - -Forbidden -*/ -type GetAppInstallsForbidden struct { - Payload *models.StderrErrResponse -} - -// IsSuccess returns true when this get app installs forbidden response has a 2xx status code -func (o *GetAppInstallsForbidden) IsSuccess() bool { - return false -} - -// IsRedirect returns true when this get app installs forbidden response has a 3xx status code -func (o *GetAppInstallsForbidden) IsRedirect() bool { - return false -} - -// IsClientError returns true when this get app installs forbidden response has a 4xx status code -func (o *GetAppInstallsForbidden) IsClientError() bool { - return true -} - -// IsServerError returns true when this get app installs forbidden response has a 5xx status code -func (o *GetAppInstallsForbidden) IsServerError() bool { - return false -} - -// IsCode returns true when this get app installs forbidden response a status code equal to that given -func (o *GetAppInstallsForbidden) IsCode(code int) bool { - return code == 403 -} - -// Code gets the status code for the get app installs forbidden response -func (o *GetAppInstallsForbidden) Code() int { - return 403 -} - -func (o *GetAppInstallsForbidden) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /v1/apps/{app_id}/installs][%d] getAppInstallsForbidden %s", 403, payload) -} - -func (o *GetAppInstallsForbidden) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /v1/apps/{app_id}/installs][%d] getAppInstallsForbidden %s", 403, payload) -} - -func (o *GetAppInstallsForbidden) GetPayload() *models.StderrErrResponse { - return o.Payload -} - -func (o *GetAppInstallsForbidden) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.StderrErrResponse) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewGetAppInstallsNotFound creates a GetAppInstallsNotFound with default headers values -func NewGetAppInstallsNotFound() *GetAppInstallsNotFound { - return &GetAppInstallsNotFound{} -} - -/* -GetAppInstallsNotFound describes a response with status code 404, with default header values. - -Not Found -*/ -type GetAppInstallsNotFound struct { - Payload *models.StderrErrResponse -} - -// IsSuccess returns true when this get app installs not found response has a 2xx status code -func (o *GetAppInstallsNotFound) IsSuccess() bool { - return false -} - -// IsRedirect returns true when this get app installs not found response has a 3xx status code -func (o *GetAppInstallsNotFound) IsRedirect() bool { - return false -} - -// IsClientError returns true when this get app installs not found response has a 4xx status code -func (o *GetAppInstallsNotFound) IsClientError() bool { - return true -} - -// IsServerError returns true when this get app installs not found response has a 5xx status code -func (o *GetAppInstallsNotFound) IsServerError() bool { - return false -} - -// IsCode returns true when this get app installs not found response a status code equal to that given -func (o *GetAppInstallsNotFound) IsCode(code int) bool { - return code == 404 -} - -// Code gets the status code for the get app installs not found response -func (o *GetAppInstallsNotFound) Code() int { - return 404 -} - -func (o *GetAppInstallsNotFound) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /v1/apps/{app_id}/installs][%d] getAppInstallsNotFound %s", 404, payload) -} - -func (o *GetAppInstallsNotFound) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /v1/apps/{app_id}/installs][%d] getAppInstallsNotFound %s", 404, payload) -} - -func (o *GetAppInstallsNotFound) GetPayload() *models.StderrErrResponse { - return o.Payload -} - -func (o *GetAppInstallsNotFound) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.StderrErrResponse) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewGetAppInstallsInternalServerError creates a GetAppInstallsInternalServerError with default headers values -func NewGetAppInstallsInternalServerError() *GetAppInstallsInternalServerError { - return &GetAppInstallsInternalServerError{} -} - -/* -GetAppInstallsInternalServerError describes a response with status code 500, with default header values. - -Internal Server Error -*/ -type GetAppInstallsInternalServerError struct { - Payload *models.StderrErrResponse -} - -// IsSuccess returns true when this get app installs internal server error response has a 2xx status code -func (o *GetAppInstallsInternalServerError) IsSuccess() bool { - return false -} - -// IsRedirect returns true when this get app installs internal server error response has a 3xx status code -func (o *GetAppInstallsInternalServerError) IsRedirect() bool { - return false -} - -// IsClientError returns true when this get app installs internal server error response has a 4xx status code -func (o *GetAppInstallsInternalServerError) IsClientError() bool { - return false -} - -// IsServerError returns true when this get app installs internal server error response has a 5xx status code -func (o *GetAppInstallsInternalServerError) IsServerError() bool { - return true -} - -// IsCode returns true when this get app installs internal server error response a status code equal to that given -func (o *GetAppInstallsInternalServerError) IsCode(code int) bool { - return code == 500 -} - -// Code gets the status code for the get app installs internal server error response -func (o *GetAppInstallsInternalServerError) Code() int { - return 500 -} - -func (o *GetAppInstallsInternalServerError) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /v1/apps/{app_id}/installs][%d] getAppInstallsInternalServerError %s", 500, payload) -} - -func (o *GetAppInstallsInternalServerError) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /v1/apps/{app_id}/installs][%d] getAppInstallsInternalServerError %s", 500, payload) -} - -func (o *GetAppInstallsInternalServerError) GetPayload() *models.StderrErrResponse { - return o.Payload -} - -func (o *GetAppInstallsInternalServerError) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.StderrErrResponse) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} diff --git a/client/operations/get_app_latest_config_parameters.go b/client/operations/get_app_latest_config_parameters.go deleted file mode 100644 index 4e857ba..0000000 --- a/client/operations/get_app_latest_config_parameters.go +++ /dev/null @@ -1,151 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package operations - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "context" - "net/http" - "time" - - "github.com/go-openapi/errors" - "github.com/go-openapi/runtime" - cr "github.com/go-openapi/runtime/client" - "github.com/go-openapi/strfmt" -) - -// NewGetAppLatestConfigParams creates a new GetAppLatestConfigParams object, -// with the default timeout for this client. -// -// Default values are not hydrated, since defaults are normally applied by the API server side. -// -// To enforce default values in parameter, use SetDefaults or WithDefaults. -func NewGetAppLatestConfigParams() *GetAppLatestConfigParams { - return &GetAppLatestConfigParams{ - timeout: cr.DefaultTimeout, - } -} - -// NewGetAppLatestConfigParamsWithTimeout creates a new GetAppLatestConfigParams object -// with the ability to set a timeout on a request. -func NewGetAppLatestConfigParamsWithTimeout(timeout time.Duration) *GetAppLatestConfigParams { - return &GetAppLatestConfigParams{ - timeout: timeout, - } -} - -// NewGetAppLatestConfigParamsWithContext creates a new GetAppLatestConfigParams object -// with the ability to set a context for a request. -func NewGetAppLatestConfigParamsWithContext(ctx context.Context) *GetAppLatestConfigParams { - return &GetAppLatestConfigParams{ - Context: ctx, - } -} - -// NewGetAppLatestConfigParamsWithHTTPClient creates a new GetAppLatestConfigParams object -// with the ability to set a custom HTTPClient for a request. -func NewGetAppLatestConfigParamsWithHTTPClient(client *http.Client) *GetAppLatestConfigParams { - return &GetAppLatestConfigParams{ - HTTPClient: client, - } -} - -/* -GetAppLatestConfigParams contains all the parameters to send to the API endpoint - - for the get app latest config operation. - - Typically these are written to a http.Request. -*/ -type GetAppLatestConfigParams struct { - - /* AppID. - - app ID - */ - AppID string - - timeout time.Duration - Context context.Context - HTTPClient *http.Client -} - -// WithDefaults hydrates default values in the get app latest config params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *GetAppLatestConfigParams) WithDefaults() *GetAppLatestConfigParams { - o.SetDefaults() - return o -} - -// SetDefaults hydrates default values in the get app latest config params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *GetAppLatestConfigParams) SetDefaults() { - // no default values defined for this parameter -} - -// WithTimeout adds the timeout to the get app latest config params -func (o *GetAppLatestConfigParams) WithTimeout(timeout time.Duration) *GetAppLatestConfigParams { - o.SetTimeout(timeout) - return o -} - -// SetTimeout adds the timeout to the get app latest config params -func (o *GetAppLatestConfigParams) SetTimeout(timeout time.Duration) { - o.timeout = timeout -} - -// WithContext adds the context to the get app latest config params -func (o *GetAppLatestConfigParams) WithContext(ctx context.Context) *GetAppLatestConfigParams { - o.SetContext(ctx) - return o -} - -// SetContext adds the context to the get app latest config params -func (o *GetAppLatestConfigParams) SetContext(ctx context.Context) { - o.Context = ctx -} - -// WithHTTPClient adds the HTTPClient to the get app latest config params -func (o *GetAppLatestConfigParams) WithHTTPClient(client *http.Client) *GetAppLatestConfigParams { - o.SetHTTPClient(client) - return o -} - -// SetHTTPClient adds the HTTPClient to the get app latest config params -func (o *GetAppLatestConfigParams) SetHTTPClient(client *http.Client) { - o.HTTPClient = client -} - -// WithAppID adds the appID to the get app latest config params -func (o *GetAppLatestConfigParams) WithAppID(appID string) *GetAppLatestConfigParams { - o.SetAppID(appID) - return o -} - -// SetAppID adds the appId to the get app latest config params -func (o *GetAppLatestConfigParams) SetAppID(appID string) { - o.AppID = appID -} - -// WriteToRequest writes these params to a swagger request -func (o *GetAppLatestConfigParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { - - if err := r.SetTimeout(o.timeout); err != nil { - return err - } - var res []error - - // path param app_id - if err := r.SetPathParam("app_id", o.AppID); err != nil { - return err - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} diff --git a/client/operations/get_app_latest_config_responses.go b/client/operations/get_app_latest_config_responses.go deleted file mode 100644 index 89bc12d..0000000 --- a/client/operations/get_app_latest_config_responses.go +++ /dev/null @@ -1,486 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package operations - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "encoding/json" - "fmt" - "io" - - "github.com/go-openapi/runtime" - "github.com/go-openapi/strfmt" - - "github.com/nuonco/nuon-go/models" -) - -// GetAppLatestConfigReader is a Reader for the GetAppLatestConfig structure. -type GetAppLatestConfigReader struct { - formats strfmt.Registry -} - -// ReadResponse reads a server response into the received o. -func (o *GetAppLatestConfigReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { - switch response.Code() { - case 200: - result := NewGetAppLatestConfigOK() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return result, nil - case 400: - result := NewGetAppLatestConfigBadRequest() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return nil, result - case 401: - result := NewGetAppLatestConfigUnauthorized() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return nil, result - case 403: - result := NewGetAppLatestConfigForbidden() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return nil, result - case 404: - result := NewGetAppLatestConfigNotFound() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return nil, result - case 500: - result := NewGetAppLatestConfigInternalServerError() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return nil, result - default: - return nil, runtime.NewAPIError("[GET /v1/apps/{app_id}/latest-config] GetAppLatestConfig", response, response.Code()) - } -} - -// NewGetAppLatestConfigOK creates a GetAppLatestConfigOK with default headers values -func NewGetAppLatestConfigOK() *GetAppLatestConfigOK { - return &GetAppLatestConfigOK{} -} - -/* -GetAppLatestConfigOK describes a response with status code 200, with default header values. - -OK -*/ -type GetAppLatestConfigOK struct { - Payload *models.AppAppConfig -} - -// IsSuccess returns true when this get app latest config o k response has a 2xx status code -func (o *GetAppLatestConfigOK) IsSuccess() bool { - return true -} - -// IsRedirect returns true when this get app latest config o k response has a 3xx status code -func (o *GetAppLatestConfigOK) IsRedirect() bool { - return false -} - -// IsClientError returns true when this get app latest config o k response has a 4xx status code -func (o *GetAppLatestConfigOK) IsClientError() bool { - return false -} - -// IsServerError returns true when this get app latest config o k response has a 5xx status code -func (o *GetAppLatestConfigOK) IsServerError() bool { - return false -} - -// IsCode returns true when this get app latest config o k response a status code equal to that given -func (o *GetAppLatestConfigOK) IsCode(code int) bool { - return code == 200 -} - -// Code gets the status code for the get app latest config o k response -func (o *GetAppLatestConfigOK) Code() int { - return 200 -} - -func (o *GetAppLatestConfigOK) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /v1/apps/{app_id}/latest-config][%d] getAppLatestConfigOK %s", 200, payload) -} - -func (o *GetAppLatestConfigOK) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /v1/apps/{app_id}/latest-config][%d] getAppLatestConfigOK %s", 200, payload) -} - -func (o *GetAppLatestConfigOK) GetPayload() *models.AppAppConfig { - return o.Payload -} - -func (o *GetAppLatestConfigOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.AppAppConfig) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewGetAppLatestConfigBadRequest creates a GetAppLatestConfigBadRequest with default headers values -func NewGetAppLatestConfigBadRequest() *GetAppLatestConfigBadRequest { - return &GetAppLatestConfigBadRequest{} -} - -/* -GetAppLatestConfigBadRequest describes a response with status code 400, with default header values. - -Bad Request -*/ -type GetAppLatestConfigBadRequest struct { - Payload *models.StderrErrResponse -} - -// IsSuccess returns true when this get app latest config bad request response has a 2xx status code -func (o *GetAppLatestConfigBadRequest) IsSuccess() bool { - return false -} - -// IsRedirect returns true when this get app latest config bad request response has a 3xx status code -func (o *GetAppLatestConfigBadRequest) IsRedirect() bool { - return false -} - -// IsClientError returns true when this get app latest config bad request response has a 4xx status code -func (o *GetAppLatestConfigBadRequest) IsClientError() bool { - return true -} - -// IsServerError returns true when this get app latest config bad request response has a 5xx status code -func (o *GetAppLatestConfigBadRequest) IsServerError() bool { - return false -} - -// IsCode returns true when this get app latest config bad request response a status code equal to that given -func (o *GetAppLatestConfigBadRequest) IsCode(code int) bool { - return code == 400 -} - -// Code gets the status code for the get app latest config bad request response -func (o *GetAppLatestConfigBadRequest) Code() int { - return 400 -} - -func (o *GetAppLatestConfigBadRequest) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /v1/apps/{app_id}/latest-config][%d] getAppLatestConfigBadRequest %s", 400, payload) -} - -func (o *GetAppLatestConfigBadRequest) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /v1/apps/{app_id}/latest-config][%d] getAppLatestConfigBadRequest %s", 400, payload) -} - -func (o *GetAppLatestConfigBadRequest) GetPayload() *models.StderrErrResponse { - return o.Payload -} - -func (o *GetAppLatestConfigBadRequest) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.StderrErrResponse) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewGetAppLatestConfigUnauthorized creates a GetAppLatestConfigUnauthorized with default headers values -func NewGetAppLatestConfigUnauthorized() *GetAppLatestConfigUnauthorized { - return &GetAppLatestConfigUnauthorized{} -} - -/* -GetAppLatestConfigUnauthorized describes a response with status code 401, with default header values. - -Unauthorized -*/ -type GetAppLatestConfigUnauthorized struct { - Payload *models.StderrErrResponse -} - -// IsSuccess returns true when this get app latest config unauthorized response has a 2xx status code -func (o *GetAppLatestConfigUnauthorized) IsSuccess() bool { - return false -} - -// IsRedirect returns true when this get app latest config unauthorized response has a 3xx status code -func (o *GetAppLatestConfigUnauthorized) IsRedirect() bool { - return false -} - -// IsClientError returns true when this get app latest config unauthorized response has a 4xx status code -func (o *GetAppLatestConfigUnauthorized) IsClientError() bool { - return true -} - -// IsServerError returns true when this get app latest config unauthorized response has a 5xx status code -func (o *GetAppLatestConfigUnauthorized) IsServerError() bool { - return false -} - -// IsCode returns true when this get app latest config unauthorized response a status code equal to that given -func (o *GetAppLatestConfigUnauthorized) IsCode(code int) bool { - return code == 401 -} - -// Code gets the status code for the get app latest config unauthorized response -func (o *GetAppLatestConfigUnauthorized) Code() int { - return 401 -} - -func (o *GetAppLatestConfigUnauthorized) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /v1/apps/{app_id}/latest-config][%d] getAppLatestConfigUnauthorized %s", 401, payload) -} - -func (o *GetAppLatestConfigUnauthorized) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /v1/apps/{app_id}/latest-config][%d] getAppLatestConfigUnauthorized %s", 401, payload) -} - -func (o *GetAppLatestConfigUnauthorized) GetPayload() *models.StderrErrResponse { - return o.Payload -} - -func (o *GetAppLatestConfigUnauthorized) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.StderrErrResponse) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewGetAppLatestConfigForbidden creates a GetAppLatestConfigForbidden with default headers values -func NewGetAppLatestConfigForbidden() *GetAppLatestConfigForbidden { - return &GetAppLatestConfigForbidden{} -} - -/* -GetAppLatestConfigForbidden describes a response with status code 403, with default header values. - -Forbidden -*/ -type GetAppLatestConfigForbidden struct { - Payload *models.StderrErrResponse -} - -// IsSuccess returns true when this get app latest config forbidden response has a 2xx status code -func (o *GetAppLatestConfigForbidden) IsSuccess() bool { - return false -} - -// IsRedirect returns true when this get app latest config forbidden response has a 3xx status code -func (o *GetAppLatestConfigForbidden) IsRedirect() bool { - return false -} - -// IsClientError returns true when this get app latest config forbidden response has a 4xx status code -func (o *GetAppLatestConfigForbidden) IsClientError() bool { - return true -} - -// IsServerError returns true when this get app latest config forbidden response has a 5xx status code -func (o *GetAppLatestConfigForbidden) IsServerError() bool { - return false -} - -// IsCode returns true when this get app latest config forbidden response a status code equal to that given -func (o *GetAppLatestConfigForbidden) IsCode(code int) bool { - return code == 403 -} - -// Code gets the status code for the get app latest config forbidden response -func (o *GetAppLatestConfigForbidden) Code() int { - return 403 -} - -func (o *GetAppLatestConfigForbidden) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /v1/apps/{app_id}/latest-config][%d] getAppLatestConfigForbidden %s", 403, payload) -} - -func (o *GetAppLatestConfigForbidden) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /v1/apps/{app_id}/latest-config][%d] getAppLatestConfigForbidden %s", 403, payload) -} - -func (o *GetAppLatestConfigForbidden) GetPayload() *models.StderrErrResponse { - return o.Payload -} - -func (o *GetAppLatestConfigForbidden) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.StderrErrResponse) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewGetAppLatestConfigNotFound creates a GetAppLatestConfigNotFound with default headers values -func NewGetAppLatestConfigNotFound() *GetAppLatestConfigNotFound { - return &GetAppLatestConfigNotFound{} -} - -/* -GetAppLatestConfigNotFound describes a response with status code 404, with default header values. - -Not Found -*/ -type GetAppLatestConfigNotFound struct { - Payload *models.StderrErrResponse -} - -// IsSuccess returns true when this get app latest config not found response has a 2xx status code -func (o *GetAppLatestConfigNotFound) IsSuccess() bool { - return false -} - -// IsRedirect returns true when this get app latest config not found response has a 3xx status code -func (o *GetAppLatestConfigNotFound) IsRedirect() bool { - return false -} - -// IsClientError returns true when this get app latest config not found response has a 4xx status code -func (o *GetAppLatestConfigNotFound) IsClientError() bool { - return true -} - -// IsServerError returns true when this get app latest config not found response has a 5xx status code -func (o *GetAppLatestConfigNotFound) IsServerError() bool { - return false -} - -// IsCode returns true when this get app latest config not found response a status code equal to that given -func (o *GetAppLatestConfigNotFound) IsCode(code int) bool { - return code == 404 -} - -// Code gets the status code for the get app latest config not found response -func (o *GetAppLatestConfigNotFound) Code() int { - return 404 -} - -func (o *GetAppLatestConfigNotFound) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /v1/apps/{app_id}/latest-config][%d] getAppLatestConfigNotFound %s", 404, payload) -} - -func (o *GetAppLatestConfigNotFound) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /v1/apps/{app_id}/latest-config][%d] getAppLatestConfigNotFound %s", 404, payload) -} - -func (o *GetAppLatestConfigNotFound) GetPayload() *models.StderrErrResponse { - return o.Payload -} - -func (o *GetAppLatestConfigNotFound) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.StderrErrResponse) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewGetAppLatestConfigInternalServerError creates a GetAppLatestConfigInternalServerError with default headers values -func NewGetAppLatestConfigInternalServerError() *GetAppLatestConfigInternalServerError { - return &GetAppLatestConfigInternalServerError{} -} - -/* -GetAppLatestConfigInternalServerError describes a response with status code 500, with default header values. - -Internal Server Error -*/ -type GetAppLatestConfigInternalServerError struct { - Payload *models.StderrErrResponse -} - -// IsSuccess returns true when this get app latest config internal server error response has a 2xx status code -func (o *GetAppLatestConfigInternalServerError) IsSuccess() bool { - return false -} - -// IsRedirect returns true when this get app latest config internal server error response has a 3xx status code -func (o *GetAppLatestConfigInternalServerError) IsRedirect() bool { - return false -} - -// IsClientError returns true when this get app latest config internal server error response has a 4xx status code -func (o *GetAppLatestConfigInternalServerError) IsClientError() bool { - return false -} - -// IsServerError returns true when this get app latest config internal server error response has a 5xx status code -func (o *GetAppLatestConfigInternalServerError) IsServerError() bool { - return true -} - -// IsCode returns true when this get app latest config internal server error response a status code equal to that given -func (o *GetAppLatestConfigInternalServerError) IsCode(code int) bool { - return code == 500 -} - -// Code gets the status code for the get app latest config internal server error response -func (o *GetAppLatestConfigInternalServerError) Code() int { - return 500 -} - -func (o *GetAppLatestConfigInternalServerError) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /v1/apps/{app_id}/latest-config][%d] getAppLatestConfigInternalServerError %s", 500, payload) -} - -func (o *GetAppLatestConfigInternalServerError) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /v1/apps/{app_id}/latest-config][%d] getAppLatestConfigInternalServerError %s", 500, payload) -} - -func (o *GetAppLatestConfigInternalServerError) GetPayload() *models.StderrErrResponse { - return o.Payload -} - -func (o *GetAppLatestConfigInternalServerError) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.StderrErrResponse) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} diff --git a/client/operations/get_app_parameters.go b/client/operations/get_app_parameters.go deleted file mode 100644 index 90c752c..0000000 --- a/client/operations/get_app_parameters.go +++ /dev/null @@ -1,151 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package operations - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "context" - "net/http" - "time" - - "github.com/go-openapi/errors" - "github.com/go-openapi/runtime" - cr "github.com/go-openapi/runtime/client" - "github.com/go-openapi/strfmt" -) - -// NewGetAppParams creates a new GetAppParams object, -// with the default timeout for this client. -// -// Default values are not hydrated, since defaults are normally applied by the API server side. -// -// To enforce default values in parameter, use SetDefaults or WithDefaults. -func NewGetAppParams() *GetAppParams { - return &GetAppParams{ - timeout: cr.DefaultTimeout, - } -} - -// NewGetAppParamsWithTimeout creates a new GetAppParams object -// with the ability to set a timeout on a request. -func NewGetAppParamsWithTimeout(timeout time.Duration) *GetAppParams { - return &GetAppParams{ - timeout: timeout, - } -} - -// NewGetAppParamsWithContext creates a new GetAppParams object -// with the ability to set a context for a request. -func NewGetAppParamsWithContext(ctx context.Context) *GetAppParams { - return &GetAppParams{ - Context: ctx, - } -} - -// NewGetAppParamsWithHTTPClient creates a new GetAppParams object -// with the ability to set a custom HTTPClient for a request. -func NewGetAppParamsWithHTTPClient(client *http.Client) *GetAppParams { - return &GetAppParams{ - HTTPClient: client, - } -} - -/* -GetAppParams contains all the parameters to send to the API endpoint - - for the get app operation. - - Typically these are written to a http.Request. -*/ -type GetAppParams struct { - - /* AppID. - - app ID - */ - AppID string - - timeout time.Duration - Context context.Context - HTTPClient *http.Client -} - -// WithDefaults hydrates default values in the get app params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *GetAppParams) WithDefaults() *GetAppParams { - o.SetDefaults() - return o -} - -// SetDefaults hydrates default values in the get app params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *GetAppParams) SetDefaults() { - // no default values defined for this parameter -} - -// WithTimeout adds the timeout to the get app params -func (o *GetAppParams) WithTimeout(timeout time.Duration) *GetAppParams { - o.SetTimeout(timeout) - return o -} - -// SetTimeout adds the timeout to the get app params -func (o *GetAppParams) SetTimeout(timeout time.Duration) { - o.timeout = timeout -} - -// WithContext adds the context to the get app params -func (o *GetAppParams) WithContext(ctx context.Context) *GetAppParams { - o.SetContext(ctx) - return o -} - -// SetContext adds the context to the get app params -func (o *GetAppParams) SetContext(ctx context.Context) { - o.Context = ctx -} - -// WithHTTPClient adds the HTTPClient to the get app params -func (o *GetAppParams) WithHTTPClient(client *http.Client) *GetAppParams { - o.SetHTTPClient(client) - return o -} - -// SetHTTPClient adds the HTTPClient to the get app params -func (o *GetAppParams) SetHTTPClient(client *http.Client) { - o.HTTPClient = client -} - -// WithAppID adds the appID to the get app params -func (o *GetAppParams) WithAppID(appID string) *GetAppParams { - o.SetAppID(appID) - return o -} - -// SetAppID adds the appId to the get app params -func (o *GetAppParams) SetAppID(appID string) { - o.AppID = appID -} - -// WriteToRequest writes these params to a swagger request -func (o *GetAppParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { - - if err := r.SetTimeout(o.timeout); err != nil { - return err - } - var res []error - - // path param app_id - if err := r.SetPathParam("app_id", o.AppID); err != nil { - return err - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} diff --git a/client/operations/get_app_releases_parameters.go b/client/operations/get_app_releases_parameters.go deleted file mode 100644 index 47fd992..0000000 --- a/client/operations/get_app_releases_parameters.go +++ /dev/null @@ -1,151 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package operations - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "context" - "net/http" - "time" - - "github.com/go-openapi/errors" - "github.com/go-openapi/runtime" - cr "github.com/go-openapi/runtime/client" - "github.com/go-openapi/strfmt" -) - -// NewGetAppReleasesParams creates a new GetAppReleasesParams object, -// with the default timeout for this client. -// -// Default values are not hydrated, since defaults are normally applied by the API server side. -// -// To enforce default values in parameter, use SetDefaults or WithDefaults. -func NewGetAppReleasesParams() *GetAppReleasesParams { - return &GetAppReleasesParams{ - timeout: cr.DefaultTimeout, - } -} - -// NewGetAppReleasesParamsWithTimeout creates a new GetAppReleasesParams object -// with the ability to set a timeout on a request. -func NewGetAppReleasesParamsWithTimeout(timeout time.Duration) *GetAppReleasesParams { - return &GetAppReleasesParams{ - timeout: timeout, - } -} - -// NewGetAppReleasesParamsWithContext creates a new GetAppReleasesParams object -// with the ability to set a context for a request. -func NewGetAppReleasesParamsWithContext(ctx context.Context) *GetAppReleasesParams { - return &GetAppReleasesParams{ - Context: ctx, - } -} - -// NewGetAppReleasesParamsWithHTTPClient creates a new GetAppReleasesParams object -// with the ability to set a custom HTTPClient for a request. -func NewGetAppReleasesParamsWithHTTPClient(client *http.Client) *GetAppReleasesParams { - return &GetAppReleasesParams{ - HTTPClient: client, - } -} - -/* -GetAppReleasesParams contains all the parameters to send to the API endpoint - - for the get app releases operation. - - Typically these are written to a http.Request. -*/ -type GetAppReleasesParams struct { - - /* AppID. - - app ID - */ - AppID string - - timeout time.Duration - Context context.Context - HTTPClient *http.Client -} - -// WithDefaults hydrates default values in the get app releases params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *GetAppReleasesParams) WithDefaults() *GetAppReleasesParams { - o.SetDefaults() - return o -} - -// SetDefaults hydrates default values in the get app releases params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *GetAppReleasesParams) SetDefaults() { - // no default values defined for this parameter -} - -// WithTimeout adds the timeout to the get app releases params -func (o *GetAppReleasesParams) WithTimeout(timeout time.Duration) *GetAppReleasesParams { - o.SetTimeout(timeout) - return o -} - -// SetTimeout adds the timeout to the get app releases params -func (o *GetAppReleasesParams) SetTimeout(timeout time.Duration) { - o.timeout = timeout -} - -// WithContext adds the context to the get app releases params -func (o *GetAppReleasesParams) WithContext(ctx context.Context) *GetAppReleasesParams { - o.SetContext(ctx) - return o -} - -// SetContext adds the context to the get app releases params -func (o *GetAppReleasesParams) SetContext(ctx context.Context) { - o.Context = ctx -} - -// WithHTTPClient adds the HTTPClient to the get app releases params -func (o *GetAppReleasesParams) WithHTTPClient(client *http.Client) *GetAppReleasesParams { - o.SetHTTPClient(client) - return o -} - -// SetHTTPClient adds the HTTPClient to the get app releases params -func (o *GetAppReleasesParams) SetHTTPClient(client *http.Client) { - o.HTTPClient = client -} - -// WithAppID adds the appID to the get app releases params -func (o *GetAppReleasesParams) WithAppID(appID string) *GetAppReleasesParams { - o.SetAppID(appID) - return o -} - -// SetAppID adds the appId to the get app releases params -func (o *GetAppReleasesParams) SetAppID(appID string) { - o.AppID = appID -} - -// WriteToRequest writes these params to a swagger request -func (o *GetAppReleasesParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { - - if err := r.SetTimeout(o.timeout); err != nil { - return err - } - var res []error - - // path param app_id - if err := r.SetPathParam("app_id", o.AppID); err != nil { - return err - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} diff --git a/client/operations/get_app_releases_responses.go b/client/operations/get_app_releases_responses.go deleted file mode 100644 index b3cd0ea..0000000 --- a/client/operations/get_app_releases_responses.go +++ /dev/null @@ -1,484 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package operations - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "encoding/json" - "fmt" - "io" - - "github.com/go-openapi/runtime" - "github.com/go-openapi/strfmt" - - "github.com/nuonco/nuon-go/models" -) - -// GetAppReleasesReader is a Reader for the GetAppReleases structure. -type GetAppReleasesReader struct { - formats strfmt.Registry -} - -// ReadResponse reads a server response into the received o. -func (o *GetAppReleasesReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { - switch response.Code() { - case 200: - result := NewGetAppReleasesOK() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return result, nil - case 400: - result := NewGetAppReleasesBadRequest() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return nil, result - case 401: - result := NewGetAppReleasesUnauthorized() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return nil, result - case 403: - result := NewGetAppReleasesForbidden() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return nil, result - case 404: - result := NewGetAppReleasesNotFound() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return nil, result - case 500: - result := NewGetAppReleasesInternalServerError() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return nil, result - default: - return nil, runtime.NewAPIError("[GET /v1/apps/{app_id}/releases] GetAppReleases", response, response.Code()) - } -} - -// NewGetAppReleasesOK creates a GetAppReleasesOK with default headers values -func NewGetAppReleasesOK() *GetAppReleasesOK { - return &GetAppReleasesOK{} -} - -/* -GetAppReleasesOK describes a response with status code 200, with default header values. - -OK -*/ -type GetAppReleasesOK struct { - Payload []*models.AppComponentRelease -} - -// IsSuccess returns true when this get app releases o k response has a 2xx status code -func (o *GetAppReleasesOK) IsSuccess() bool { - return true -} - -// IsRedirect returns true when this get app releases o k response has a 3xx status code -func (o *GetAppReleasesOK) IsRedirect() bool { - return false -} - -// IsClientError returns true when this get app releases o k response has a 4xx status code -func (o *GetAppReleasesOK) IsClientError() bool { - return false -} - -// IsServerError returns true when this get app releases o k response has a 5xx status code -func (o *GetAppReleasesOK) IsServerError() bool { - return false -} - -// IsCode returns true when this get app releases o k response a status code equal to that given -func (o *GetAppReleasesOK) IsCode(code int) bool { - return code == 200 -} - -// Code gets the status code for the get app releases o k response -func (o *GetAppReleasesOK) Code() int { - return 200 -} - -func (o *GetAppReleasesOK) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /v1/apps/{app_id}/releases][%d] getAppReleasesOK %s", 200, payload) -} - -func (o *GetAppReleasesOK) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /v1/apps/{app_id}/releases][%d] getAppReleasesOK %s", 200, payload) -} - -func (o *GetAppReleasesOK) GetPayload() []*models.AppComponentRelease { - return o.Payload -} - -func (o *GetAppReleasesOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - // response payload - if err := consumer.Consume(response.Body(), &o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewGetAppReleasesBadRequest creates a GetAppReleasesBadRequest with default headers values -func NewGetAppReleasesBadRequest() *GetAppReleasesBadRequest { - return &GetAppReleasesBadRequest{} -} - -/* -GetAppReleasesBadRequest describes a response with status code 400, with default header values. - -Bad Request -*/ -type GetAppReleasesBadRequest struct { - Payload *models.StderrErrResponse -} - -// IsSuccess returns true when this get app releases bad request response has a 2xx status code -func (o *GetAppReleasesBadRequest) IsSuccess() bool { - return false -} - -// IsRedirect returns true when this get app releases bad request response has a 3xx status code -func (o *GetAppReleasesBadRequest) IsRedirect() bool { - return false -} - -// IsClientError returns true when this get app releases bad request response has a 4xx status code -func (o *GetAppReleasesBadRequest) IsClientError() bool { - return true -} - -// IsServerError returns true when this get app releases bad request response has a 5xx status code -func (o *GetAppReleasesBadRequest) IsServerError() bool { - return false -} - -// IsCode returns true when this get app releases bad request response a status code equal to that given -func (o *GetAppReleasesBadRequest) IsCode(code int) bool { - return code == 400 -} - -// Code gets the status code for the get app releases bad request response -func (o *GetAppReleasesBadRequest) Code() int { - return 400 -} - -func (o *GetAppReleasesBadRequest) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /v1/apps/{app_id}/releases][%d] getAppReleasesBadRequest %s", 400, payload) -} - -func (o *GetAppReleasesBadRequest) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /v1/apps/{app_id}/releases][%d] getAppReleasesBadRequest %s", 400, payload) -} - -func (o *GetAppReleasesBadRequest) GetPayload() *models.StderrErrResponse { - return o.Payload -} - -func (o *GetAppReleasesBadRequest) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.StderrErrResponse) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewGetAppReleasesUnauthorized creates a GetAppReleasesUnauthorized with default headers values -func NewGetAppReleasesUnauthorized() *GetAppReleasesUnauthorized { - return &GetAppReleasesUnauthorized{} -} - -/* -GetAppReleasesUnauthorized describes a response with status code 401, with default header values. - -Unauthorized -*/ -type GetAppReleasesUnauthorized struct { - Payload *models.StderrErrResponse -} - -// IsSuccess returns true when this get app releases unauthorized response has a 2xx status code -func (o *GetAppReleasesUnauthorized) IsSuccess() bool { - return false -} - -// IsRedirect returns true when this get app releases unauthorized response has a 3xx status code -func (o *GetAppReleasesUnauthorized) IsRedirect() bool { - return false -} - -// IsClientError returns true when this get app releases unauthorized response has a 4xx status code -func (o *GetAppReleasesUnauthorized) IsClientError() bool { - return true -} - -// IsServerError returns true when this get app releases unauthorized response has a 5xx status code -func (o *GetAppReleasesUnauthorized) IsServerError() bool { - return false -} - -// IsCode returns true when this get app releases unauthorized response a status code equal to that given -func (o *GetAppReleasesUnauthorized) IsCode(code int) bool { - return code == 401 -} - -// Code gets the status code for the get app releases unauthorized response -func (o *GetAppReleasesUnauthorized) Code() int { - return 401 -} - -func (o *GetAppReleasesUnauthorized) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /v1/apps/{app_id}/releases][%d] getAppReleasesUnauthorized %s", 401, payload) -} - -func (o *GetAppReleasesUnauthorized) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /v1/apps/{app_id}/releases][%d] getAppReleasesUnauthorized %s", 401, payload) -} - -func (o *GetAppReleasesUnauthorized) GetPayload() *models.StderrErrResponse { - return o.Payload -} - -func (o *GetAppReleasesUnauthorized) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.StderrErrResponse) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewGetAppReleasesForbidden creates a GetAppReleasesForbidden with default headers values -func NewGetAppReleasesForbidden() *GetAppReleasesForbidden { - return &GetAppReleasesForbidden{} -} - -/* -GetAppReleasesForbidden describes a response with status code 403, with default header values. - -Forbidden -*/ -type GetAppReleasesForbidden struct { - Payload *models.StderrErrResponse -} - -// IsSuccess returns true when this get app releases forbidden response has a 2xx status code -func (o *GetAppReleasesForbidden) IsSuccess() bool { - return false -} - -// IsRedirect returns true when this get app releases forbidden response has a 3xx status code -func (o *GetAppReleasesForbidden) IsRedirect() bool { - return false -} - -// IsClientError returns true when this get app releases forbidden response has a 4xx status code -func (o *GetAppReleasesForbidden) IsClientError() bool { - return true -} - -// IsServerError returns true when this get app releases forbidden response has a 5xx status code -func (o *GetAppReleasesForbidden) IsServerError() bool { - return false -} - -// IsCode returns true when this get app releases forbidden response a status code equal to that given -func (o *GetAppReleasesForbidden) IsCode(code int) bool { - return code == 403 -} - -// Code gets the status code for the get app releases forbidden response -func (o *GetAppReleasesForbidden) Code() int { - return 403 -} - -func (o *GetAppReleasesForbidden) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /v1/apps/{app_id}/releases][%d] getAppReleasesForbidden %s", 403, payload) -} - -func (o *GetAppReleasesForbidden) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /v1/apps/{app_id}/releases][%d] getAppReleasesForbidden %s", 403, payload) -} - -func (o *GetAppReleasesForbidden) GetPayload() *models.StderrErrResponse { - return o.Payload -} - -func (o *GetAppReleasesForbidden) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.StderrErrResponse) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewGetAppReleasesNotFound creates a GetAppReleasesNotFound with default headers values -func NewGetAppReleasesNotFound() *GetAppReleasesNotFound { - return &GetAppReleasesNotFound{} -} - -/* -GetAppReleasesNotFound describes a response with status code 404, with default header values. - -Not Found -*/ -type GetAppReleasesNotFound struct { - Payload *models.StderrErrResponse -} - -// IsSuccess returns true when this get app releases not found response has a 2xx status code -func (o *GetAppReleasesNotFound) IsSuccess() bool { - return false -} - -// IsRedirect returns true when this get app releases not found response has a 3xx status code -func (o *GetAppReleasesNotFound) IsRedirect() bool { - return false -} - -// IsClientError returns true when this get app releases not found response has a 4xx status code -func (o *GetAppReleasesNotFound) IsClientError() bool { - return true -} - -// IsServerError returns true when this get app releases not found response has a 5xx status code -func (o *GetAppReleasesNotFound) IsServerError() bool { - return false -} - -// IsCode returns true when this get app releases not found response a status code equal to that given -func (o *GetAppReleasesNotFound) IsCode(code int) bool { - return code == 404 -} - -// Code gets the status code for the get app releases not found response -func (o *GetAppReleasesNotFound) Code() int { - return 404 -} - -func (o *GetAppReleasesNotFound) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /v1/apps/{app_id}/releases][%d] getAppReleasesNotFound %s", 404, payload) -} - -func (o *GetAppReleasesNotFound) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /v1/apps/{app_id}/releases][%d] getAppReleasesNotFound %s", 404, payload) -} - -func (o *GetAppReleasesNotFound) GetPayload() *models.StderrErrResponse { - return o.Payload -} - -func (o *GetAppReleasesNotFound) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.StderrErrResponse) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewGetAppReleasesInternalServerError creates a GetAppReleasesInternalServerError with default headers values -func NewGetAppReleasesInternalServerError() *GetAppReleasesInternalServerError { - return &GetAppReleasesInternalServerError{} -} - -/* -GetAppReleasesInternalServerError describes a response with status code 500, with default header values. - -Internal Server Error -*/ -type GetAppReleasesInternalServerError struct { - Payload *models.StderrErrResponse -} - -// IsSuccess returns true when this get app releases internal server error response has a 2xx status code -func (o *GetAppReleasesInternalServerError) IsSuccess() bool { - return false -} - -// IsRedirect returns true when this get app releases internal server error response has a 3xx status code -func (o *GetAppReleasesInternalServerError) IsRedirect() bool { - return false -} - -// IsClientError returns true when this get app releases internal server error response has a 4xx status code -func (o *GetAppReleasesInternalServerError) IsClientError() bool { - return false -} - -// IsServerError returns true when this get app releases internal server error response has a 5xx status code -func (o *GetAppReleasesInternalServerError) IsServerError() bool { - return true -} - -// IsCode returns true when this get app releases internal server error response a status code equal to that given -func (o *GetAppReleasesInternalServerError) IsCode(code int) bool { - return code == 500 -} - -// Code gets the status code for the get app releases internal server error response -func (o *GetAppReleasesInternalServerError) Code() int { - return 500 -} - -func (o *GetAppReleasesInternalServerError) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /v1/apps/{app_id}/releases][%d] getAppReleasesInternalServerError %s", 500, payload) -} - -func (o *GetAppReleasesInternalServerError) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /v1/apps/{app_id}/releases][%d] getAppReleasesInternalServerError %s", 500, payload) -} - -func (o *GetAppReleasesInternalServerError) GetPayload() *models.StderrErrResponse { - return o.Payload -} - -func (o *GetAppReleasesInternalServerError) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.StderrErrResponse) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} diff --git a/client/operations/get_app_responses.go b/client/operations/get_app_responses.go deleted file mode 100644 index a201f9b..0000000 --- a/client/operations/get_app_responses.go +++ /dev/null @@ -1,486 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package operations - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "encoding/json" - "fmt" - "io" - - "github.com/go-openapi/runtime" - "github.com/go-openapi/strfmt" - - "github.com/nuonco/nuon-go/models" -) - -// GetAppReader is a Reader for the GetApp structure. -type GetAppReader struct { - formats strfmt.Registry -} - -// ReadResponse reads a server response into the received o. -func (o *GetAppReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { - switch response.Code() { - case 200: - result := NewGetAppOK() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return result, nil - case 400: - result := NewGetAppBadRequest() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return nil, result - case 401: - result := NewGetAppUnauthorized() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return nil, result - case 403: - result := NewGetAppForbidden() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return nil, result - case 404: - result := NewGetAppNotFound() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return nil, result - case 500: - result := NewGetAppInternalServerError() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return nil, result - default: - return nil, runtime.NewAPIError("[GET /v1/apps/{app_id}] GetApp", response, response.Code()) - } -} - -// NewGetAppOK creates a GetAppOK with default headers values -func NewGetAppOK() *GetAppOK { - return &GetAppOK{} -} - -/* -GetAppOK describes a response with status code 200, with default header values. - -OK -*/ -type GetAppOK struct { - Payload *models.AppApp -} - -// IsSuccess returns true when this get app o k response has a 2xx status code -func (o *GetAppOK) IsSuccess() bool { - return true -} - -// IsRedirect returns true when this get app o k response has a 3xx status code -func (o *GetAppOK) IsRedirect() bool { - return false -} - -// IsClientError returns true when this get app o k response has a 4xx status code -func (o *GetAppOK) IsClientError() bool { - return false -} - -// IsServerError returns true when this get app o k response has a 5xx status code -func (o *GetAppOK) IsServerError() bool { - return false -} - -// IsCode returns true when this get app o k response a status code equal to that given -func (o *GetAppOK) IsCode(code int) bool { - return code == 200 -} - -// Code gets the status code for the get app o k response -func (o *GetAppOK) Code() int { - return 200 -} - -func (o *GetAppOK) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /v1/apps/{app_id}][%d] getAppOK %s", 200, payload) -} - -func (o *GetAppOK) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /v1/apps/{app_id}][%d] getAppOK %s", 200, payload) -} - -func (o *GetAppOK) GetPayload() *models.AppApp { - return o.Payload -} - -func (o *GetAppOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.AppApp) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewGetAppBadRequest creates a GetAppBadRequest with default headers values -func NewGetAppBadRequest() *GetAppBadRequest { - return &GetAppBadRequest{} -} - -/* -GetAppBadRequest describes a response with status code 400, with default header values. - -Bad Request -*/ -type GetAppBadRequest struct { - Payload *models.StderrErrResponse -} - -// IsSuccess returns true when this get app bad request response has a 2xx status code -func (o *GetAppBadRequest) IsSuccess() bool { - return false -} - -// IsRedirect returns true when this get app bad request response has a 3xx status code -func (o *GetAppBadRequest) IsRedirect() bool { - return false -} - -// IsClientError returns true when this get app bad request response has a 4xx status code -func (o *GetAppBadRequest) IsClientError() bool { - return true -} - -// IsServerError returns true when this get app bad request response has a 5xx status code -func (o *GetAppBadRequest) IsServerError() bool { - return false -} - -// IsCode returns true when this get app bad request response a status code equal to that given -func (o *GetAppBadRequest) IsCode(code int) bool { - return code == 400 -} - -// Code gets the status code for the get app bad request response -func (o *GetAppBadRequest) Code() int { - return 400 -} - -func (o *GetAppBadRequest) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /v1/apps/{app_id}][%d] getAppBadRequest %s", 400, payload) -} - -func (o *GetAppBadRequest) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /v1/apps/{app_id}][%d] getAppBadRequest %s", 400, payload) -} - -func (o *GetAppBadRequest) GetPayload() *models.StderrErrResponse { - return o.Payload -} - -func (o *GetAppBadRequest) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.StderrErrResponse) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewGetAppUnauthorized creates a GetAppUnauthorized with default headers values -func NewGetAppUnauthorized() *GetAppUnauthorized { - return &GetAppUnauthorized{} -} - -/* -GetAppUnauthorized describes a response with status code 401, with default header values. - -Unauthorized -*/ -type GetAppUnauthorized struct { - Payload *models.StderrErrResponse -} - -// IsSuccess returns true when this get app unauthorized response has a 2xx status code -func (o *GetAppUnauthorized) IsSuccess() bool { - return false -} - -// IsRedirect returns true when this get app unauthorized response has a 3xx status code -func (o *GetAppUnauthorized) IsRedirect() bool { - return false -} - -// IsClientError returns true when this get app unauthorized response has a 4xx status code -func (o *GetAppUnauthorized) IsClientError() bool { - return true -} - -// IsServerError returns true when this get app unauthorized response has a 5xx status code -func (o *GetAppUnauthorized) IsServerError() bool { - return false -} - -// IsCode returns true when this get app unauthorized response a status code equal to that given -func (o *GetAppUnauthorized) IsCode(code int) bool { - return code == 401 -} - -// Code gets the status code for the get app unauthorized response -func (o *GetAppUnauthorized) Code() int { - return 401 -} - -func (o *GetAppUnauthorized) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /v1/apps/{app_id}][%d] getAppUnauthorized %s", 401, payload) -} - -func (o *GetAppUnauthorized) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /v1/apps/{app_id}][%d] getAppUnauthorized %s", 401, payload) -} - -func (o *GetAppUnauthorized) GetPayload() *models.StderrErrResponse { - return o.Payload -} - -func (o *GetAppUnauthorized) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.StderrErrResponse) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewGetAppForbidden creates a GetAppForbidden with default headers values -func NewGetAppForbidden() *GetAppForbidden { - return &GetAppForbidden{} -} - -/* -GetAppForbidden describes a response with status code 403, with default header values. - -Forbidden -*/ -type GetAppForbidden struct { - Payload *models.StderrErrResponse -} - -// IsSuccess returns true when this get app forbidden response has a 2xx status code -func (o *GetAppForbidden) IsSuccess() bool { - return false -} - -// IsRedirect returns true when this get app forbidden response has a 3xx status code -func (o *GetAppForbidden) IsRedirect() bool { - return false -} - -// IsClientError returns true when this get app forbidden response has a 4xx status code -func (o *GetAppForbidden) IsClientError() bool { - return true -} - -// IsServerError returns true when this get app forbidden response has a 5xx status code -func (o *GetAppForbidden) IsServerError() bool { - return false -} - -// IsCode returns true when this get app forbidden response a status code equal to that given -func (o *GetAppForbidden) IsCode(code int) bool { - return code == 403 -} - -// Code gets the status code for the get app forbidden response -func (o *GetAppForbidden) Code() int { - return 403 -} - -func (o *GetAppForbidden) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /v1/apps/{app_id}][%d] getAppForbidden %s", 403, payload) -} - -func (o *GetAppForbidden) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /v1/apps/{app_id}][%d] getAppForbidden %s", 403, payload) -} - -func (o *GetAppForbidden) GetPayload() *models.StderrErrResponse { - return o.Payload -} - -func (o *GetAppForbidden) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.StderrErrResponse) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewGetAppNotFound creates a GetAppNotFound with default headers values -func NewGetAppNotFound() *GetAppNotFound { - return &GetAppNotFound{} -} - -/* -GetAppNotFound describes a response with status code 404, with default header values. - -Not Found -*/ -type GetAppNotFound struct { - Payload *models.StderrErrResponse -} - -// IsSuccess returns true when this get app not found response has a 2xx status code -func (o *GetAppNotFound) IsSuccess() bool { - return false -} - -// IsRedirect returns true when this get app not found response has a 3xx status code -func (o *GetAppNotFound) IsRedirect() bool { - return false -} - -// IsClientError returns true when this get app not found response has a 4xx status code -func (o *GetAppNotFound) IsClientError() bool { - return true -} - -// IsServerError returns true when this get app not found response has a 5xx status code -func (o *GetAppNotFound) IsServerError() bool { - return false -} - -// IsCode returns true when this get app not found response a status code equal to that given -func (o *GetAppNotFound) IsCode(code int) bool { - return code == 404 -} - -// Code gets the status code for the get app not found response -func (o *GetAppNotFound) Code() int { - return 404 -} - -func (o *GetAppNotFound) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /v1/apps/{app_id}][%d] getAppNotFound %s", 404, payload) -} - -func (o *GetAppNotFound) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /v1/apps/{app_id}][%d] getAppNotFound %s", 404, payload) -} - -func (o *GetAppNotFound) GetPayload() *models.StderrErrResponse { - return o.Payload -} - -func (o *GetAppNotFound) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.StderrErrResponse) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewGetAppInternalServerError creates a GetAppInternalServerError with default headers values -func NewGetAppInternalServerError() *GetAppInternalServerError { - return &GetAppInternalServerError{} -} - -/* -GetAppInternalServerError describes a response with status code 500, with default header values. - -Internal Server Error -*/ -type GetAppInternalServerError struct { - Payload *models.StderrErrResponse -} - -// IsSuccess returns true when this get app internal server error response has a 2xx status code -func (o *GetAppInternalServerError) IsSuccess() bool { - return false -} - -// IsRedirect returns true when this get app internal server error response has a 3xx status code -func (o *GetAppInternalServerError) IsRedirect() bool { - return false -} - -// IsClientError returns true when this get app internal server error response has a 4xx status code -func (o *GetAppInternalServerError) IsClientError() bool { - return false -} - -// IsServerError returns true when this get app internal server error response has a 5xx status code -func (o *GetAppInternalServerError) IsServerError() bool { - return true -} - -// IsCode returns true when this get app internal server error response a status code equal to that given -func (o *GetAppInternalServerError) IsCode(code int) bool { - return code == 500 -} - -// Code gets the status code for the get app internal server error response -func (o *GetAppInternalServerError) Code() int { - return 500 -} - -func (o *GetAppInternalServerError) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /v1/apps/{app_id}][%d] getAppInternalServerError %s", 500, payload) -} - -func (o *GetAppInternalServerError) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /v1/apps/{app_id}][%d] getAppInternalServerError %s", 500, payload) -} - -func (o *GetAppInternalServerError) GetPayload() *models.StderrErrResponse { - return o.Payload -} - -func (o *GetAppInternalServerError) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.StderrErrResponse) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} diff --git a/client/operations/get_app_runner_configs_parameters.go b/client/operations/get_app_runner_configs_parameters.go deleted file mode 100644 index 336e37c..0000000 --- a/client/operations/get_app_runner_configs_parameters.go +++ /dev/null @@ -1,151 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package operations - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "context" - "net/http" - "time" - - "github.com/go-openapi/errors" - "github.com/go-openapi/runtime" - cr "github.com/go-openapi/runtime/client" - "github.com/go-openapi/strfmt" -) - -// NewGetAppRunnerConfigsParams creates a new GetAppRunnerConfigsParams object, -// with the default timeout for this client. -// -// Default values are not hydrated, since defaults are normally applied by the API server side. -// -// To enforce default values in parameter, use SetDefaults or WithDefaults. -func NewGetAppRunnerConfigsParams() *GetAppRunnerConfigsParams { - return &GetAppRunnerConfigsParams{ - timeout: cr.DefaultTimeout, - } -} - -// NewGetAppRunnerConfigsParamsWithTimeout creates a new GetAppRunnerConfigsParams object -// with the ability to set a timeout on a request. -func NewGetAppRunnerConfigsParamsWithTimeout(timeout time.Duration) *GetAppRunnerConfigsParams { - return &GetAppRunnerConfigsParams{ - timeout: timeout, - } -} - -// NewGetAppRunnerConfigsParamsWithContext creates a new GetAppRunnerConfigsParams object -// with the ability to set a context for a request. -func NewGetAppRunnerConfigsParamsWithContext(ctx context.Context) *GetAppRunnerConfigsParams { - return &GetAppRunnerConfigsParams{ - Context: ctx, - } -} - -// NewGetAppRunnerConfigsParamsWithHTTPClient creates a new GetAppRunnerConfigsParams object -// with the ability to set a custom HTTPClient for a request. -func NewGetAppRunnerConfigsParamsWithHTTPClient(client *http.Client) *GetAppRunnerConfigsParams { - return &GetAppRunnerConfigsParams{ - HTTPClient: client, - } -} - -/* -GetAppRunnerConfigsParams contains all the parameters to send to the API endpoint - - for the get app runner configs operation. - - Typically these are written to a http.Request. -*/ -type GetAppRunnerConfigsParams struct { - - /* AppID. - - app ID - */ - AppID string - - timeout time.Duration - Context context.Context - HTTPClient *http.Client -} - -// WithDefaults hydrates default values in the get app runner configs params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *GetAppRunnerConfigsParams) WithDefaults() *GetAppRunnerConfigsParams { - o.SetDefaults() - return o -} - -// SetDefaults hydrates default values in the get app runner configs params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *GetAppRunnerConfigsParams) SetDefaults() { - // no default values defined for this parameter -} - -// WithTimeout adds the timeout to the get app runner configs params -func (o *GetAppRunnerConfigsParams) WithTimeout(timeout time.Duration) *GetAppRunnerConfigsParams { - o.SetTimeout(timeout) - return o -} - -// SetTimeout adds the timeout to the get app runner configs params -func (o *GetAppRunnerConfigsParams) SetTimeout(timeout time.Duration) { - o.timeout = timeout -} - -// WithContext adds the context to the get app runner configs params -func (o *GetAppRunnerConfigsParams) WithContext(ctx context.Context) *GetAppRunnerConfigsParams { - o.SetContext(ctx) - return o -} - -// SetContext adds the context to the get app runner configs params -func (o *GetAppRunnerConfigsParams) SetContext(ctx context.Context) { - o.Context = ctx -} - -// WithHTTPClient adds the HTTPClient to the get app runner configs params -func (o *GetAppRunnerConfigsParams) WithHTTPClient(client *http.Client) *GetAppRunnerConfigsParams { - o.SetHTTPClient(client) - return o -} - -// SetHTTPClient adds the HTTPClient to the get app runner configs params -func (o *GetAppRunnerConfigsParams) SetHTTPClient(client *http.Client) { - o.HTTPClient = client -} - -// WithAppID adds the appID to the get app runner configs params -func (o *GetAppRunnerConfigsParams) WithAppID(appID string) *GetAppRunnerConfigsParams { - o.SetAppID(appID) - return o -} - -// SetAppID adds the appId to the get app runner configs params -func (o *GetAppRunnerConfigsParams) SetAppID(appID string) { - o.AppID = appID -} - -// WriteToRequest writes these params to a swagger request -func (o *GetAppRunnerConfigsParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { - - if err := r.SetTimeout(o.timeout); err != nil { - return err - } - var res []error - - // path param app_id - if err := r.SetPathParam("app_id", o.AppID); err != nil { - return err - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} diff --git a/client/operations/get_app_runner_configs_responses.go b/client/operations/get_app_runner_configs_responses.go deleted file mode 100644 index edea132..0000000 --- a/client/operations/get_app_runner_configs_responses.go +++ /dev/null @@ -1,484 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package operations - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "encoding/json" - "fmt" - "io" - - "github.com/go-openapi/runtime" - "github.com/go-openapi/strfmt" - - "github.com/nuonco/nuon-go/models" -) - -// GetAppRunnerConfigsReader is a Reader for the GetAppRunnerConfigs structure. -type GetAppRunnerConfigsReader struct { - formats strfmt.Registry -} - -// ReadResponse reads a server response into the received o. -func (o *GetAppRunnerConfigsReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { - switch response.Code() { - case 200: - result := NewGetAppRunnerConfigsOK() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return result, nil - case 400: - result := NewGetAppRunnerConfigsBadRequest() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return nil, result - case 401: - result := NewGetAppRunnerConfigsUnauthorized() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return nil, result - case 403: - result := NewGetAppRunnerConfigsForbidden() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return nil, result - case 404: - result := NewGetAppRunnerConfigsNotFound() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return nil, result - case 500: - result := NewGetAppRunnerConfigsInternalServerError() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return nil, result - default: - return nil, runtime.NewAPIError("[GET /v1/apps/{app_id}/runner-configs] GetAppRunnerConfigs", response, response.Code()) - } -} - -// NewGetAppRunnerConfigsOK creates a GetAppRunnerConfigsOK with default headers values -func NewGetAppRunnerConfigsOK() *GetAppRunnerConfigsOK { - return &GetAppRunnerConfigsOK{} -} - -/* -GetAppRunnerConfigsOK describes a response with status code 200, with default header values. - -OK -*/ -type GetAppRunnerConfigsOK struct { - Payload []*models.AppAppRunnerConfig -} - -// IsSuccess returns true when this get app runner configs o k response has a 2xx status code -func (o *GetAppRunnerConfigsOK) IsSuccess() bool { - return true -} - -// IsRedirect returns true when this get app runner configs o k response has a 3xx status code -func (o *GetAppRunnerConfigsOK) IsRedirect() bool { - return false -} - -// IsClientError returns true when this get app runner configs o k response has a 4xx status code -func (o *GetAppRunnerConfigsOK) IsClientError() bool { - return false -} - -// IsServerError returns true when this get app runner configs o k response has a 5xx status code -func (o *GetAppRunnerConfigsOK) IsServerError() bool { - return false -} - -// IsCode returns true when this get app runner configs o k response a status code equal to that given -func (o *GetAppRunnerConfigsOK) IsCode(code int) bool { - return code == 200 -} - -// Code gets the status code for the get app runner configs o k response -func (o *GetAppRunnerConfigsOK) Code() int { - return 200 -} - -func (o *GetAppRunnerConfigsOK) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /v1/apps/{app_id}/runner-configs][%d] getAppRunnerConfigsOK %s", 200, payload) -} - -func (o *GetAppRunnerConfigsOK) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /v1/apps/{app_id}/runner-configs][%d] getAppRunnerConfigsOK %s", 200, payload) -} - -func (o *GetAppRunnerConfigsOK) GetPayload() []*models.AppAppRunnerConfig { - return o.Payload -} - -func (o *GetAppRunnerConfigsOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - // response payload - if err := consumer.Consume(response.Body(), &o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewGetAppRunnerConfigsBadRequest creates a GetAppRunnerConfigsBadRequest with default headers values -func NewGetAppRunnerConfigsBadRequest() *GetAppRunnerConfigsBadRequest { - return &GetAppRunnerConfigsBadRequest{} -} - -/* -GetAppRunnerConfigsBadRequest describes a response with status code 400, with default header values. - -Bad Request -*/ -type GetAppRunnerConfigsBadRequest struct { - Payload *models.StderrErrResponse -} - -// IsSuccess returns true when this get app runner configs bad request response has a 2xx status code -func (o *GetAppRunnerConfigsBadRequest) IsSuccess() bool { - return false -} - -// IsRedirect returns true when this get app runner configs bad request response has a 3xx status code -func (o *GetAppRunnerConfigsBadRequest) IsRedirect() bool { - return false -} - -// IsClientError returns true when this get app runner configs bad request response has a 4xx status code -func (o *GetAppRunnerConfigsBadRequest) IsClientError() bool { - return true -} - -// IsServerError returns true when this get app runner configs bad request response has a 5xx status code -func (o *GetAppRunnerConfigsBadRequest) IsServerError() bool { - return false -} - -// IsCode returns true when this get app runner configs bad request response a status code equal to that given -func (o *GetAppRunnerConfigsBadRequest) IsCode(code int) bool { - return code == 400 -} - -// Code gets the status code for the get app runner configs bad request response -func (o *GetAppRunnerConfigsBadRequest) Code() int { - return 400 -} - -func (o *GetAppRunnerConfigsBadRequest) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /v1/apps/{app_id}/runner-configs][%d] getAppRunnerConfigsBadRequest %s", 400, payload) -} - -func (o *GetAppRunnerConfigsBadRequest) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /v1/apps/{app_id}/runner-configs][%d] getAppRunnerConfigsBadRequest %s", 400, payload) -} - -func (o *GetAppRunnerConfigsBadRequest) GetPayload() *models.StderrErrResponse { - return o.Payload -} - -func (o *GetAppRunnerConfigsBadRequest) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.StderrErrResponse) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewGetAppRunnerConfigsUnauthorized creates a GetAppRunnerConfigsUnauthorized with default headers values -func NewGetAppRunnerConfigsUnauthorized() *GetAppRunnerConfigsUnauthorized { - return &GetAppRunnerConfigsUnauthorized{} -} - -/* -GetAppRunnerConfigsUnauthorized describes a response with status code 401, with default header values. - -Unauthorized -*/ -type GetAppRunnerConfigsUnauthorized struct { - Payload *models.StderrErrResponse -} - -// IsSuccess returns true when this get app runner configs unauthorized response has a 2xx status code -func (o *GetAppRunnerConfigsUnauthorized) IsSuccess() bool { - return false -} - -// IsRedirect returns true when this get app runner configs unauthorized response has a 3xx status code -func (o *GetAppRunnerConfigsUnauthorized) IsRedirect() bool { - return false -} - -// IsClientError returns true when this get app runner configs unauthorized response has a 4xx status code -func (o *GetAppRunnerConfigsUnauthorized) IsClientError() bool { - return true -} - -// IsServerError returns true when this get app runner configs unauthorized response has a 5xx status code -func (o *GetAppRunnerConfigsUnauthorized) IsServerError() bool { - return false -} - -// IsCode returns true when this get app runner configs unauthorized response a status code equal to that given -func (o *GetAppRunnerConfigsUnauthorized) IsCode(code int) bool { - return code == 401 -} - -// Code gets the status code for the get app runner configs unauthorized response -func (o *GetAppRunnerConfigsUnauthorized) Code() int { - return 401 -} - -func (o *GetAppRunnerConfigsUnauthorized) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /v1/apps/{app_id}/runner-configs][%d] getAppRunnerConfigsUnauthorized %s", 401, payload) -} - -func (o *GetAppRunnerConfigsUnauthorized) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /v1/apps/{app_id}/runner-configs][%d] getAppRunnerConfigsUnauthorized %s", 401, payload) -} - -func (o *GetAppRunnerConfigsUnauthorized) GetPayload() *models.StderrErrResponse { - return o.Payload -} - -func (o *GetAppRunnerConfigsUnauthorized) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.StderrErrResponse) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewGetAppRunnerConfigsForbidden creates a GetAppRunnerConfigsForbidden with default headers values -func NewGetAppRunnerConfigsForbidden() *GetAppRunnerConfigsForbidden { - return &GetAppRunnerConfigsForbidden{} -} - -/* -GetAppRunnerConfigsForbidden describes a response with status code 403, with default header values. - -Forbidden -*/ -type GetAppRunnerConfigsForbidden struct { - Payload *models.StderrErrResponse -} - -// IsSuccess returns true when this get app runner configs forbidden response has a 2xx status code -func (o *GetAppRunnerConfigsForbidden) IsSuccess() bool { - return false -} - -// IsRedirect returns true when this get app runner configs forbidden response has a 3xx status code -func (o *GetAppRunnerConfigsForbidden) IsRedirect() bool { - return false -} - -// IsClientError returns true when this get app runner configs forbidden response has a 4xx status code -func (o *GetAppRunnerConfigsForbidden) IsClientError() bool { - return true -} - -// IsServerError returns true when this get app runner configs forbidden response has a 5xx status code -func (o *GetAppRunnerConfigsForbidden) IsServerError() bool { - return false -} - -// IsCode returns true when this get app runner configs forbidden response a status code equal to that given -func (o *GetAppRunnerConfigsForbidden) IsCode(code int) bool { - return code == 403 -} - -// Code gets the status code for the get app runner configs forbidden response -func (o *GetAppRunnerConfigsForbidden) Code() int { - return 403 -} - -func (o *GetAppRunnerConfigsForbidden) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /v1/apps/{app_id}/runner-configs][%d] getAppRunnerConfigsForbidden %s", 403, payload) -} - -func (o *GetAppRunnerConfigsForbidden) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /v1/apps/{app_id}/runner-configs][%d] getAppRunnerConfigsForbidden %s", 403, payload) -} - -func (o *GetAppRunnerConfigsForbidden) GetPayload() *models.StderrErrResponse { - return o.Payload -} - -func (o *GetAppRunnerConfigsForbidden) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.StderrErrResponse) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewGetAppRunnerConfigsNotFound creates a GetAppRunnerConfigsNotFound with default headers values -func NewGetAppRunnerConfigsNotFound() *GetAppRunnerConfigsNotFound { - return &GetAppRunnerConfigsNotFound{} -} - -/* -GetAppRunnerConfigsNotFound describes a response with status code 404, with default header values. - -Not Found -*/ -type GetAppRunnerConfigsNotFound struct { - Payload *models.StderrErrResponse -} - -// IsSuccess returns true when this get app runner configs not found response has a 2xx status code -func (o *GetAppRunnerConfigsNotFound) IsSuccess() bool { - return false -} - -// IsRedirect returns true when this get app runner configs not found response has a 3xx status code -func (o *GetAppRunnerConfigsNotFound) IsRedirect() bool { - return false -} - -// IsClientError returns true when this get app runner configs not found response has a 4xx status code -func (o *GetAppRunnerConfigsNotFound) IsClientError() bool { - return true -} - -// IsServerError returns true when this get app runner configs not found response has a 5xx status code -func (o *GetAppRunnerConfigsNotFound) IsServerError() bool { - return false -} - -// IsCode returns true when this get app runner configs not found response a status code equal to that given -func (o *GetAppRunnerConfigsNotFound) IsCode(code int) bool { - return code == 404 -} - -// Code gets the status code for the get app runner configs not found response -func (o *GetAppRunnerConfigsNotFound) Code() int { - return 404 -} - -func (o *GetAppRunnerConfigsNotFound) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /v1/apps/{app_id}/runner-configs][%d] getAppRunnerConfigsNotFound %s", 404, payload) -} - -func (o *GetAppRunnerConfigsNotFound) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /v1/apps/{app_id}/runner-configs][%d] getAppRunnerConfigsNotFound %s", 404, payload) -} - -func (o *GetAppRunnerConfigsNotFound) GetPayload() *models.StderrErrResponse { - return o.Payload -} - -func (o *GetAppRunnerConfigsNotFound) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.StderrErrResponse) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewGetAppRunnerConfigsInternalServerError creates a GetAppRunnerConfigsInternalServerError with default headers values -func NewGetAppRunnerConfigsInternalServerError() *GetAppRunnerConfigsInternalServerError { - return &GetAppRunnerConfigsInternalServerError{} -} - -/* -GetAppRunnerConfigsInternalServerError describes a response with status code 500, with default header values. - -Internal Server Error -*/ -type GetAppRunnerConfigsInternalServerError struct { - Payload *models.StderrErrResponse -} - -// IsSuccess returns true when this get app runner configs internal server error response has a 2xx status code -func (o *GetAppRunnerConfigsInternalServerError) IsSuccess() bool { - return false -} - -// IsRedirect returns true when this get app runner configs internal server error response has a 3xx status code -func (o *GetAppRunnerConfigsInternalServerError) IsRedirect() bool { - return false -} - -// IsClientError returns true when this get app runner configs internal server error response has a 4xx status code -func (o *GetAppRunnerConfigsInternalServerError) IsClientError() bool { - return false -} - -// IsServerError returns true when this get app runner configs internal server error response has a 5xx status code -func (o *GetAppRunnerConfigsInternalServerError) IsServerError() bool { - return true -} - -// IsCode returns true when this get app runner configs internal server error response a status code equal to that given -func (o *GetAppRunnerConfigsInternalServerError) IsCode(code int) bool { - return code == 500 -} - -// Code gets the status code for the get app runner configs internal server error response -func (o *GetAppRunnerConfigsInternalServerError) Code() int { - return 500 -} - -func (o *GetAppRunnerConfigsInternalServerError) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /v1/apps/{app_id}/runner-configs][%d] getAppRunnerConfigsInternalServerError %s", 500, payload) -} - -func (o *GetAppRunnerConfigsInternalServerError) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /v1/apps/{app_id}/runner-configs][%d] getAppRunnerConfigsInternalServerError %s", 500, payload) -} - -func (o *GetAppRunnerConfigsInternalServerError) GetPayload() *models.StderrErrResponse { - return o.Payload -} - -func (o *GetAppRunnerConfigsInternalServerError) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.StderrErrResponse) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} diff --git a/client/operations/get_app_runner_latest_config_parameters.go b/client/operations/get_app_runner_latest_config_parameters.go deleted file mode 100644 index 1dfee67..0000000 --- a/client/operations/get_app_runner_latest_config_parameters.go +++ /dev/null @@ -1,151 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package operations - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "context" - "net/http" - "time" - - "github.com/go-openapi/errors" - "github.com/go-openapi/runtime" - cr "github.com/go-openapi/runtime/client" - "github.com/go-openapi/strfmt" -) - -// NewGetAppRunnerLatestConfigParams creates a new GetAppRunnerLatestConfigParams object, -// with the default timeout for this client. -// -// Default values are not hydrated, since defaults are normally applied by the API server side. -// -// To enforce default values in parameter, use SetDefaults or WithDefaults. -func NewGetAppRunnerLatestConfigParams() *GetAppRunnerLatestConfigParams { - return &GetAppRunnerLatestConfigParams{ - timeout: cr.DefaultTimeout, - } -} - -// NewGetAppRunnerLatestConfigParamsWithTimeout creates a new GetAppRunnerLatestConfigParams object -// with the ability to set a timeout on a request. -func NewGetAppRunnerLatestConfigParamsWithTimeout(timeout time.Duration) *GetAppRunnerLatestConfigParams { - return &GetAppRunnerLatestConfigParams{ - timeout: timeout, - } -} - -// NewGetAppRunnerLatestConfigParamsWithContext creates a new GetAppRunnerLatestConfigParams object -// with the ability to set a context for a request. -func NewGetAppRunnerLatestConfigParamsWithContext(ctx context.Context) *GetAppRunnerLatestConfigParams { - return &GetAppRunnerLatestConfigParams{ - Context: ctx, - } -} - -// NewGetAppRunnerLatestConfigParamsWithHTTPClient creates a new GetAppRunnerLatestConfigParams object -// with the ability to set a custom HTTPClient for a request. -func NewGetAppRunnerLatestConfigParamsWithHTTPClient(client *http.Client) *GetAppRunnerLatestConfigParams { - return &GetAppRunnerLatestConfigParams{ - HTTPClient: client, - } -} - -/* -GetAppRunnerLatestConfigParams contains all the parameters to send to the API endpoint - - for the get app runner latest config operation. - - Typically these are written to a http.Request. -*/ -type GetAppRunnerLatestConfigParams struct { - - /* AppID. - - app ID - */ - AppID string - - timeout time.Duration - Context context.Context - HTTPClient *http.Client -} - -// WithDefaults hydrates default values in the get app runner latest config params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *GetAppRunnerLatestConfigParams) WithDefaults() *GetAppRunnerLatestConfigParams { - o.SetDefaults() - return o -} - -// SetDefaults hydrates default values in the get app runner latest config params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *GetAppRunnerLatestConfigParams) SetDefaults() { - // no default values defined for this parameter -} - -// WithTimeout adds the timeout to the get app runner latest config params -func (o *GetAppRunnerLatestConfigParams) WithTimeout(timeout time.Duration) *GetAppRunnerLatestConfigParams { - o.SetTimeout(timeout) - return o -} - -// SetTimeout adds the timeout to the get app runner latest config params -func (o *GetAppRunnerLatestConfigParams) SetTimeout(timeout time.Duration) { - o.timeout = timeout -} - -// WithContext adds the context to the get app runner latest config params -func (o *GetAppRunnerLatestConfigParams) WithContext(ctx context.Context) *GetAppRunnerLatestConfigParams { - o.SetContext(ctx) - return o -} - -// SetContext adds the context to the get app runner latest config params -func (o *GetAppRunnerLatestConfigParams) SetContext(ctx context.Context) { - o.Context = ctx -} - -// WithHTTPClient adds the HTTPClient to the get app runner latest config params -func (o *GetAppRunnerLatestConfigParams) WithHTTPClient(client *http.Client) *GetAppRunnerLatestConfigParams { - o.SetHTTPClient(client) - return o -} - -// SetHTTPClient adds the HTTPClient to the get app runner latest config params -func (o *GetAppRunnerLatestConfigParams) SetHTTPClient(client *http.Client) { - o.HTTPClient = client -} - -// WithAppID adds the appID to the get app runner latest config params -func (o *GetAppRunnerLatestConfigParams) WithAppID(appID string) *GetAppRunnerLatestConfigParams { - o.SetAppID(appID) - return o -} - -// SetAppID adds the appId to the get app runner latest config params -func (o *GetAppRunnerLatestConfigParams) SetAppID(appID string) { - o.AppID = appID -} - -// WriteToRequest writes these params to a swagger request -func (o *GetAppRunnerLatestConfigParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { - - if err := r.SetTimeout(o.timeout); err != nil { - return err - } - var res []error - - // path param app_id - if err := r.SetPathParam("app_id", o.AppID); err != nil { - return err - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} diff --git a/client/operations/get_app_runner_latest_config_responses.go b/client/operations/get_app_runner_latest_config_responses.go deleted file mode 100644 index 05db114..0000000 --- a/client/operations/get_app_runner_latest_config_responses.go +++ /dev/null @@ -1,486 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package operations - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "encoding/json" - "fmt" - "io" - - "github.com/go-openapi/runtime" - "github.com/go-openapi/strfmt" - - "github.com/nuonco/nuon-go/models" -) - -// GetAppRunnerLatestConfigReader is a Reader for the GetAppRunnerLatestConfig structure. -type GetAppRunnerLatestConfigReader struct { - formats strfmt.Registry -} - -// ReadResponse reads a server response into the received o. -func (o *GetAppRunnerLatestConfigReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { - switch response.Code() { - case 200: - result := NewGetAppRunnerLatestConfigOK() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return result, nil - case 400: - result := NewGetAppRunnerLatestConfigBadRequest() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return nil, result - case 401: - result := NewGetAppRunnerLatestConfigUnauthorized() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return nil, result - case 403: - result := NewGetAppRunnerLatestConfigForbidden() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return nil, result - case 404: - result := NewGetAppRunnerLatestConfigNotFound() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return nil, result - case 500: - result := NewGetAppRunnerLatestConfigInternalServerError() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return nil, result - default: - return nil, runtime.NewAPIError("[GET /v1/apps/{app_id}/runner-latest-config] GetAppRunnerLatestConfig", response, response.Code()) - } -} - -// NewGetAppRunnerLatestConfigOK creates a GetAppRunnerLatestConfigOK with default headers values -func NewGetAppRunnerLatestConfigOK() *GetAppRunnerLatestConfigOK { - return &GetAppRunnerLatestConfigOK{} -} - -/* -GetAppRunnerLatestConfigOK describes a response with status code 200, with default header values. - -OK -*/ -type GetAppRunnerLatestConfigOK struct { - Payload *models.AppAppRunnerConfig -} - -// IsSuccess returns true when this get app runner latest config o k response has a 2xx status code -func (o *GetAppRunnerLatestConfigOK) IsSuccess() bool { - return true -} - -// IsRedirect returns true when this get app runner latest config o k response has a 3xx status code -func (o *GetAppRunnerLatestConfigOK) IsRedirect() bool { - return false -} - -// IsClientError returns true when this get app runner latest config o k response has a 4xx status code -func (o *GetAppRunnerLatestConfigOK) IsClientError() bool { - return false -} - -// IsServerError returns true when this get app runner latest config o k response has a 5xx status code -func (o *GetAppRunnerLatestConfigOK) IsServerError() bool { - return false -} - -// IsCode returns true when this get app runner latest config o k response a status code equal to that given -func (o *GetAppRunnerLatestConfigOK) IsCode(code int) bool { - return code == 200 -} - -// Code gets the status code for the get app runner latest config o k response -func (o *GetAppRunnerLatestConfigOK) Code() int { - return 200 -} - -func (o *GetAppRunnerLatestConfigOK) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /v1/apps/{app_id}/runner-latest-config][%d] getAppRunnerLatestConfigOK %s", 200, payload) -} - -func (o *GetAppRunnerLatestConfigOK) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /v1/apps/{app_id}/runner-latest-config][%d] getAppRunnerLatestConfigOK %s", 200, payload) -} - -func (o *GetAppRunnerLatestConfigOK) GetPayload() *models.AppAppRunnerConfig { - return o.Payload -} - -func (o *GetAppRunnerLatestConfigOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.AppAppRunnerConfig) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewGetAppRunnerLatestConfigBadRequest creates a GetAppRunnerLatestConfigBadRequest with default headers values -func NewGetAppRunnerLatestConfigBadRequest() *GetAppRunnerLatestConfigBadRequest { - return &GetAppRunnerLatestConfigBadRequest{} -} - -/* -GetAppRunnerLatestConfigBadRequest describes a response with status code 400, with default header values. - -Bad Request -*/ -type GetAppRunnerLatestConfigBadRequest struct { - Payload *models.StderrErrResponse -} - -// IsSuccess returns true when this get app runner latest config bad request response has a 2xx status code -func (o *GetAppRunnerLatestConfigBadRequest) IsSuccess() bool { - return false -} - -// IsRedirect returns true when this get app runner latest config bad request response has a 3xx status code -func (o *GetAppRunnerLatestConfigBadRequest) IsRedirect() bool { - return false -} - -// IsClientError returns true when this get app runner latest config bad request response has a 4xx status code -func (o *GetAppRunnerLatestConfigBadRequest) IsClientError() bool { - return true -} - -// IsServerError returns true when this get app runner latest config bad request response has a 5xx status code -func (o *GetAppRunnerLatestConfigBadRequest) IsServerError() bool { - return false -} - -// IsCode returns true when this get app runner latest config bad request response a status code equal to that given -func (o *GetAppRunnerLatestConfigBadRequest) IsCode(code int) bool { - return code == 400 -} - -// Code gets the status code for the get app runner latest config bad request response -func (o *GetAppRunnerLatestConfigBadRequest) Code() int { - return 400 -} - -func (o *GetAppRunnerLatestConfigBadRequest) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /v1/apps/{app_id}/runner-latest-config][%d] getAppRunnerLatestConfigBadRequest %s", 400, payload) -} - -func (o *GetAppRunnerLatestConfigBadRequest) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /v1/apps/{app_id}/runner-latest-config][%d] getAppRunnerLatestConfigBadRequest %s", 400, payload) -} - -func (o *GetAppRunnerLatestConfigBadRequest) GetPayload() *models.StderrErrResponse { - return o.Payload -} - -func (o *GetAppRunnerLatestConfigBadRequest) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.StderrErrResponse) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewGetAppRunnerLatestConfigUnauthorized creates a GetAppRunnerLatestConfigUnauthorized with default headers values -func NewGetAppRunnerLatestConfigUnauthorized() *GetAppRunnerLatestConfigUnauthorized { - return &GetAppRunnerLatestConfigUnauthorized{} -} - -/* -GetAppRunnerLatestConfigUnauthorized describes a response with status code 401, with default header values. - -Unauthorized -*/ -type GetAppRunnerLatestConfigUnauthorized struct { - Payload *models.StderrErrResponse -} - -// IsSuccess returns true when this get app runner latest config unauthorized response has a 2xx status code -func (o *GetAppRunnerLatestConfigUnauthorized) IsSuccess() bool { - return false -} - -// IsRedirect returns true when this get app runner latest config unauthorized response has a 3xx status code -func (o *GetAppRunnerLatestConfigUnauthorized) IsRedirect() bool { - return false -} - -// IsClientError returns true when this get app runner latest config unauthorized response has a 4xx status code -func (o *GetAppRunnerLatestConfigUnauthorized) IsClientError() bool { - return true -} - -// IsServerError returns true when this get app runner latest config unauthorized response has a 5xx status code -func (o *GetAppRunnerLatestConfigUnauthorized) IsServerError() bool { - return false -} - -// IsCode returns true when this get app runner latest config unauthorized response a status code equal to that given -func (o *GetAppRunnerLatestConfigUnauthorized) IsCode(code int) bool { - return code == 401 -} - -// Code gets the status code for the get app runner latest config unauthorized response -func (o *GetAppRunnerLatestConfigUnauthorized) Code() int { - return 401 -} - -func (o *GetAppRunnerLatestConfigUnauthorized) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /v1/apps/{app_id}/runner-latest-config][%d] getAppRunnerLatestConfigUnauthorized %s", 401, payload) -} - -func (o *GetAppRunnerLatestConfigUnauthorized) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /v1/apps/{app_id}/runner-latest-config][%d] getAppRunnerLatestConfigUnauthorized %s", 401, payload) -} - -func (o *GetAppRunnerLatestConfigUnauthorized) GetPayload() *models.StderrErrResponse { - return o.Payload -} - -func (o *GetAppRunnerLatestConfigUnauthorized) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.StderrErrResponse) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewGetAppRunnerLatestConfigForbidden creates a GetAppRunnerLatestConfigForbidden with default headers values -func NewGetAppRunnerLatestConfigForbidden() *GetAppRunnerLatestConfigForbidden { - return &GetAppRunnerLatestConfigForbidden{} -} - -/* -GetAppRunnerLatestConfigForbidden describes a response with status code 403, with default header values. - -Forbidden -*/ -type GetAppRunnerLatestConfigForbidden struct { - Payload *models.StderrErrResponse -} - -// IsSuccess returns true when this get app runner latest config forbidden response has a 2xx status code -func (o *GetAppRunnerLatestConfigForbidden) IsSuccess() bool { - return false -} - -// IsRedirect returns true when this get app runner latest config forbidden response has a 3xx status code -func (o *GetAppRunnerLatestConfigForbidden) IsRedirect() bool { - return false -} - -// IsClientError returns true when this get app runner latest config forbidden response has a 4xx status code -func (o *GetAppRunnerLatestConfigForbidden) IsClientError() bool { - return true -} - -// IsServerError returns true when this get app runner latest config forbidden response has a 5xx status code -func (o *GetAppRunnerLatestConfigForbidden) IsServerError() bool { - return false -} - -// IsCode returns true when this get app runner latest config forbidden response a status code equal to that given -func (o *GetAppRunnerLatestConfigForbidden) IsCode(code int) bool { - return code == 403 -} - -// Code gets the status code for the get app runner latest config forbidden response -func (o *GetAppRunnerLatestConfigForbidden) Code() int { - return 403 -} - -func (o *GetAppRunnerLatestConfigForbidden) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /v1/apps/{app_id}/runner-latest-config][%d] getAppRunnerLatestConfigForbidden %s", 403, payload) -} - -func (o *GetAppRunnerLatestConfigForbidden) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /v1/apps/{app_id}/runner-latest-config][%d] getAppRunnerLatestConfigForbidden %s", 403, payload) -} - -func (o *GetAppRunnerLatestConfigForbidden) GetPayload() *models.StderrErrResponse { - return o.Payload -} - -func (o *GetAppRunnerLatestConfigForbidden) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.StderrErrResponse) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewGetAppRunnerLatestConfigNotFound creates a GetAppRunnerLatestConfigNotFound with default headers values -func NewGetAppRunnerLatestConfigNotFound() *GetAppRunnerLatestConfigNotFound { - return &GetAppRunnerLatestConfigNotFound{} -} - -/* -GetAppRunnerLatestConfigNotFound describes a response with status code 404, with default header values. - -Not Found -*/ -type GetAppRunnerLatestConfigNotFound struct { - Payload *models.StderrErrResponse -} - -// IsSuccess returns true when this get app runner latest config not found response has a 2xx status code -func (o *GetAppRunnerLatestConfigNotFound) IsSuccess() bool { - return false -} - -// IsRedirect returns true when this get app runner latest config not found response has a 3xx status code -func (o *GetAppRunnerLatestConfigNotFound) IsRedirect() bool { - return false -} - -// IsClientError returns true when this get app runner latest config not found response has a 4xx status code -func (o *GetAppRunnerLatestConfigNotFound) IsClientError() bool { - return true -} - -// IsServerError returns true when this get app runner latest config not found response has a 5xx status code -func (o *GetAppRunnerLatestConfigNotFound) IsServerError() bool { - return false -} - -// IsCode returns true when this get app runner latest config not found response a status code equal to that given -func (o *GetAppRunnerLatestConfigNotFound) IsCode(code int) bool { - return code == 404 -} - -// Code gets the status code for the get app runner latest config not found response -func (o *GetAppRunnerLatestConfigNotFound) Code() int { - return 404 -} - -func (o *GetAppRunnerLatestConfigNotFound) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /v1/apps/{app_id}/runner-latest-config][%d] getAppRunnerLatestConfigNotFound %s", 404, payload) -} - -func (o *GetAppRunnerLatestConfigNotFound) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /v1/apps/{app_id}/runner-latest-config][%d] getAppRunnerLatestConfigNotFound %s", 404, payload) -} - -func (o *GetAppRunnerLatestConfigNotFound) GetPayload() *models.StderrErrResponse { - return o.Payload -} - -func (o *GetAppRunnerLatestConfigNotFound) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.StderrErrResponse) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewGetAppRunnerLatestConfigInternalServerError creates a GetAppRunnerLatestConfigInternalServerError with default headers values -func NewGetAppRunnerLatestConfigInternalServerError() *GetAppRunnerLatestConfigInternalServerError { - return &GetAppRunnerLatestConfigInternalServerError{} -} - -/* -GetAppRunnerLatestConfigInternalServerError describes a response with status code 500, with default header values. - -Internal Server Error -*/ -type GetAppRunnerLatestConfigInternalServerError struct { - Payload *models.StderrErrResponse -} - -// IsSuccess returns true when this get app runner latest config internal server error response has a 2xx status code -func (o *GetAppRunnerLatestConfigInternalServerError) IsSuccess() bool { - return false -} - -// IsRedirect returns true when this get app runner latest config internal server error response has a 3xx status code -func (o *GetAppRunnerLatestConfigInternalServerError) IsRedirect() bool { - return false -} - -// IsClientError returns true when this get app runner latest config internal server error response has a 4xx status code -func (o *GetAppRunnerLatestConfigInternalServerError) IsClientError() bool { - return false -} - -// IsServerError returns true when this get app runner latest config internal server error response has a 5xx status code -func (o *GetAppRunnerLatestConfigInternalServerError) IsServerError() bool { - return true -} - -// IsCode returns true when this get app runner latest config internal server error response a status code equal to that given -func (o *GetAppRunnerLatestConfigInternalServerError) IsCode(code int) bool { - return code == 500 -} - -// Code gets the status code for the get app runner latest config internal server error response -func (o *GetAppRunnerLatestConfigInternalServerError) Code() int { - return 500 -} - -func (o *GetAppRunnerLatestConfigInternalServerError) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /v1/apps/{app_id}/runner-latest-config][%d] getAppRunnerLatestConfigInternalServerError %s", 500, payload) -} - -func (o *GetAppRunnerLatestConfigInternalServerError) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /v1/apps/{app_id}/runner-latest-config][%d] getAppRunnerLatestConfigInternalServerError %s", 500, payload) -} - -func (o *GetAppRunnerLatestConfigInternalServerError) GetPayload() *models.StderrErrResponse { - return o.Payload -} - -func (o *GetAppRunnerLatestConfigInternalServerError) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.StderrErrResponse) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} diff --git a/client/operations/get_app_sandbox_configs_parameters.go b/client/operations/get_app_sandbox_configs_parameters.go deleted file mode 100644 index facc319..0000000 --- a/client/operations/get_app_sandbox_configs_parameters.go +++ /dev/null @@ -1,151 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package operations - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "context" - "net/http" - "time" - - "github.com/go-openapi/errors" - "github.com/go-openapi/runtime" - cr "github.com/go-openapi/runtime/client" - "github.com/go-openapi/strfmt" -) - -// NewGetAppSandboxConfigsParams creates a new GetAppSandboxConfigsParams object, -// with the default timeout for this client. -// -// Default values are not hydrated, since defaults are normally applied by the API server side. -// -// To enforce default values in parameter, use SetDefaults or WithDefaults. -func NewGetAppSandboxConfigsParams() *GetAppSandboxConfigsParams { - return &GetAppSandboxConfigsParams{ - timeout: cr.DefaultTimeout, - } -} - -// NewGetAppSandboxConfigsParamsWithTimeout creates a new GetAppSandboxConfigsParams object -// with the ability to set a timeout on a request. -func NewGetAppSandboxConfigsParamsWithTimeout(timeout time.Duration) *GetAppSandboxConfigsParams { - return &GetAppSandboxConfigsParams{ - timeout: timeout, - } -} - -// NewGetAppSandboxConfigsParamsWithContext creates a new GetAppSandboxConfigsParams object -// with the ability to set a context for a request. -func NewGetAppSandboxConfigsParamsWithContext(ctx context.Context) *GetAppSandboxConfigsParams { - return &GetAppSandboxConfigsParams{ - Context: ctx, - } -} - -// NewGetAppSandboxConfigsParamsWithHTTPClient creates a new GetAppSandboxConfigsParams object -// with the ability to set a custom HTTPClient for a request. -func NewGetAppSandboxConfigsParamsWithHTTPClient(client *http.Client) *GetAppSandboxConfigsParams { - return &GetAppSandboxConfigsParams{ - HTTPClient: client, - } -} - -/* -GetAppSandboxConfigsParams contains all the parameters to send to the API endpoint - - for the get app sandbox configs operation. - - Typically these are written to a http.Request. -*/ -type GetAppSandboxConfigsParams struct { - - /* AppID. - - app ID - */ - AppID string - - timeout time.Duration - Context context.Context - HTTPClient *http.Client -} - -// WithDefaults hydrates default values in the get app sandbox configs params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *GetAppSandboxConfigsParams) WithDefaults() *GetAppSandboxConfigsParams { - o.SetDefaults() - return o -} - -// SetDefaults hydrates default values in the get app sandbox configs params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *GetAppSandboxConfigsParams) SetDefaults() { - // no default values defined for this parameter -} - -// WithTimeout adds the timeout to the get app sandbox configs params -func (o *GetAppSandboxConfigsParams) WithTimeout(timeout time.Duration) *GetAppSandboxConfigsParams { - o.SetTimeout(timeout) - return o -} - -// SetTimeout adds the timeout to the get app sandbox configs params -func (o *GetAppSandboxConfigsParams) SetTimeout(timeout time.Duration) { - o.timeout = timeout -} - -// WithContext adds the context to the get app sandbox configs params -func (o *GetAppSandboxConfigsParams) WithContext(ctx context.Context) *GetAppSandboxConfigsParams { - o.SetContext(ctx) - return o -} - -// SetContext adds the context to the get app sandbox configs params -func (o *GetAppSandboxConfigsParams) SetContext(ctx context.Context) { - o.Context = ctx -} - -// WithHTTPClient adds the HTTPClient to the get app sandbox configs params -func (o *GetAppSandboxConfigsParams) WithHTTPClient(client *http.Client) *GetAppSandboxConfigsParams { - o.SetHTTPClient(client) - return o -} - -// SetHTTPClient adds the HTTPClient to the get app sandbox configs params -func (o *GetAppSandboxConfigsParams) SetHTTPClient(client *http.Client) { - o.HTTPClient = client -} - -// WithAppID adds the appID to the get app sandbox configs params -func (o *GetAppSandboxConfigsParams) WithAppID(appID string) *GetAppSandboxConfigsParams { - o.SetAppID(appID) - return o -} - -// SetAppID adds the appId to the get app sandbox configs params -func (o *GetAppSandboxConfigsParams) SetAppID(appID string) { - o.AppID = appID -} - -// WriteToRequest writes these params to a swagger request -func (o *GetAppSandboxConfigsParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { - - if err := r.SetTimeout(o.timeout); err != nil { - return err - } - var res []error - - // path param app_id - if err := r.SetPathParam("app_id", o.AppID); err != nil { - return err - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} diff --git a/client/operations/get_app_sandbox_configs_responses.go b/client/operations/get_app_sandbox_configs_responses.go deleted file mode 100644 index fd0af63..0000000 --- a/client/operations/get_app_sandbox_configs_responses.go +++ /dev/null @@ -1,484 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package operations - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "encoding/json" - "fmt" - "io" - - "github.com/go-openapi/runtime" - "github.com/go-openapi/strfmt" - - "github.com/nuonco/nuon-go/models" -) - -// GetAppSandboxConfigsReader is a Reader for the GetAppSandboxConfigs structure. -type GetAppSandboxConfigsReader struct { - formats strfmt.Registry -} - -// ReadResponse reads a server response into the received o. -func (o *GetAppSandboxConfigsReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { - switch response.Code() { - case 200: - result := NewGetAppSandboxConfigsOK() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return result, nil - case 400: - result := NewGetAppSandboxConfigsBadRequest() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return nil, result - case 401: - result := NewGetAppSandboxConfigsUnauthorized() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return nil, result - case 403: - result := NewGetAppSandboxConfigsForbidden() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return nil, result - case 404: - result := NewGetAppSandboxConfigsNotFound() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return nil, result - case 500: - result := NewGetAppSandboxConfigsInternalServerError() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return nil, result - default: - return nil, runtime.NewAPIError("[GET /v1/apps/{app_id}/sandbox-configs] GetAppSandboxConfigs", response, response.Code()) - } -} - -// NewGetAppSandboxConfigsOK creates a GetAppSandboxConfigsOK with default headers values -func NewGetAppSandboxConfigsOK() *GetAppSandboxConfigsOK { - return &GetAppSandboxConfigsOK{} -} - -/* -GetAppSandboxConfigsOK describes a response with status code 200, with default header values. - -OK -*/ -type GetAppSandboxConfigsOK struct { - Payload []*models.AppAppSandboxConfig -} - -// IsSuccess returns true when this get app sandbox configs o k response has a 2xx status code -func (o *GetAppSandboxConfigsOK) IsSuccess() bool { - return true -} - -// IsRedirect returns true when this get app sandbox configs o k response has a 3xx status code -func (o *GetAppSandboxConfigsOK) IsRedirect() bool { - return false -} - -// IsClientError returns true when this get app sandbox configs o k response has a 4xx status code -func (o *GetAppSandboxConfigsOK) IsClientError() bool { - return false -} - -// IsServerError returns true when this get app sandbox configs o k response has a 5xx status code -func (o *GetAppSandboxConfigsOK) IsServerError() bool { - return false -} - -// IsCode returns true when this get app sandbox configs o k response a status code equal to that given -func (o *GetAppSandboxConfigsOK) IsCode(code int) bool { - return code == 200 -} - -// Code gets the status code for the get app sandbox configs o k response -func (o *GetAppSandboxConfigsOK) Code() int { - return 200 -} - -func (o *GetAppSandboxConfigsOK) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /v1/apps/{app_id}/sandbox-configs][%d] getAppSandboxConfigsOK %s", 200, payload) -} - -func (o *GetAppSandboxConfigsOK) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /v1/apps/{app_id}/sandbox-configs][%d] getAppSandboxConfigsOK %s", 200, payload) -} - -func (o *GetAppSandboxConfigsOK) GetPayload() []*models.AppAppSandboxConfig { - return o.Payload -} - -func (o *GetAppSandboxConfigsOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - // response payload - if err := consumer.Consume(response.Body(), &o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewGetAppSandboxConfigsBadRequest creates a GetAppSandboxConfigsBadRequest with default headers values -func NewGetAppSandboxConfigsBadRequest() *GetAppSandboxConfigsBadRequest { - return &GetAppSandboxConfigsBadRequest{} -} - -/* -GetAppSandboxConfigsBadRequest describes a response with status code 400, with default header values. - -Bad Request -*/ -type GetAppSandboxConfigsBadRequest struct { - Payload *models.StderrErrResponse -} - -// IsSuccess returns true when this get app sandbox configs bad request response has a 2xx status code -func (o *GetAppSandboxConfigsBadRequest) IsSuccess() bool { - return false -} - -// IsRedirect returns true when this get app sandbox configs bad request response has a 3xx status code -func (o *GetAppSandboxConfigsBadRequest) IsRedirect() bool { - return false -} - -// IsClientError returns true when this get app sandbox configs bad request response has a 4xx status code -func (o *GetAppSandboxConfigsBadRequest) IsClientError() bool { - return true -} - -// IsServerError returns true when this get app sandbox configs bad request response has a 5xx status code -func (o *GetAppSandboxConfigsBadRequest) IsServerError() bool { - return false -} - -// IsCode returns true when this get app sandbox configs bad request response a status code equal to that given -func (o *GetAppSandboxConfigsBadRequest) IsCode(code int) bool { - return code == 400 -} - -// Code gets the status code for the get app sandbox configs bad request response -func (o *GetAppSandboxConfigsBadRequest) Code() int { - return 400 -} - -func (o *GetAppSandboxConfigsBadRequest) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /v1/apps/{app_id}/sandbox-configs][%d] getAppSandboxConfigsBadRequest %s", 400, payload) -} - -func (o *GetAppSandboxConfigsBadRequest) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /v1/apps/{app_id}/sandbox-configs][%d] getAppSandboxConfigsBadRequest %s", 400, payload) -} - -func (o *GetAppSandboxConfigsBadRequest) GetPayload() *models.StderrErrResponse { - return o.Payload -} - -func (o *GetAppSandboxConfigsBadRequest) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.StderrErrResponse) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewGetAppSandboxConfigsUnauthorized creates a GetAppSandboxConfigsUnauthorized with default headers values -func NewGetAppSandboxConfigsUnauthorized() *GetAppSandboxConfigsUnauthorized { - return &GetAppSandboxConfigsUnauthorized{} -} - -/* -GetAppSandboxConfigsUnauthorized describes a response with status code 401, with default header values. - -Unauthorized -*/ -type GetAppSandboxConfigsUnauthorized struct { - Payload *models.StderrErrResponse -} - -// IsSuccess returns true when this get app sandbox configs unauthorized response has a 2xx status code -func (o *GetAppSandboxConfigsUnauthorized) IsSuccess() bool { - return false -} - -// IsRedirect returns true when this get app sandbox configs unauthorized response has a 3xx status code -func (o *GetAppSandboxConfigsUnauthorized) IsRedirect() bool { - return false -} - -// IsClientError returns true when this get app sandbox configs unauthorized response has a 4xx status code -func (o *GetAppSandboxConfigsUnauthorized) IsClientError() bool { - return true -} - -// IsServerError returns true when this get app sandbox configs unauthorized response has a 5xx status code -func (o *GetAppSandboxConfigsUnauthorized) IsServerError() bool { - return false -} - -// IsCode returns true when this get app sandbox configs unauthorized response a status code equal to that given -func (o *GetAppSandboxConfigsUnauthorized) IsCode(code int) bool { - return code == 401 -} - -// Code gets the status code for the get app sandbox configs unauthorized response -func (o *GetAppSandboxConfigsUnauthorized) Code() int { - return 401 -} - -func (o *GetAppSandboxConfigsUnauthorized) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /v1/apps/{app_id}/sandbox-configs][%d] getAppSandboxConfigsUnauthorized %s", 401, payload) -} - -func (o *GetAppSandboxConfigsUnauthorized) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /v1/apps/{app_id}/sandbox-configs][%d] getAppSandboxConfigsUnauthorized %s", 401, payload) -} - -func (o *GetAppSandboxConfigsUnauthorized) GetPayload() *models.StderrErrResponse { - return o.Payload -} - -func (o *GetAppSandboxConfigsUnauthorized) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.StderrErrResponse) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewGetAppSandboxConfigsForbidden creates a GetAppSandboxConfigsForbidden with default headers values -func NewGetAppSandboxConfigsForbidden() *GetAppSandboxConfigsForbidden { - return &GetAppSandboxConfigsForbidden{} -} - -/* -GetAppSandboxConfigsForbidden describes a response with status code 403, with default header values. - -Forbidden -*/ -type GetAppSandboxConfigsForbidden struct { - Payload *models.StderrErrResponse -} - -// IsSuccess returns true when this get app sandbox configs forbidden response has a 2xx status code -func (o *GetAppSandboxConfigsForbidden) IsSuccess() bool { - return false -} - -// IsRedirect returns true when this get app sandbox configs forbidden response has a 3xx status code -func (o *GetAppSandboxConfigsForbidden) IsRedirect() bool { - return false -} - -// IsClientError returns true when this get app sandbox configs forbidden response has a 4xx status code -func (o *GetAppSandboxConfigsForbidden) IsClientError() bool { - return true -} - -// IsServerError returns true when this get app sandbox configs forbidden response has a 5xx status code -func (o *GetAppSandboxConfigsForbidden) IsServerError() bool { - return false -} - -// IsCode returns true when this get app sandbox configs forbidden response a status code equal to that given -func (o *GetAppSandboxConfigsForbidden) IsCode(code int) bool { - return code == 403 -} - -// Code gets the status code for the get app sandbox configs forbidden response -func (o *GetAppSandboxConfigsForbidden) Code() int { - return 403 -} - -func (o *GetAppSandboxConfigsForbidden) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /v1/apps/{app_id}/sandbox-configs][%d] getAppSandboxConfigsForbidden %s", 403, payload) -} - -func (o *GetAppSandboxConfigsForbidden) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /v1/apps/{app_id}/sandbox-configs][%d] getAppSandboxConfigsForbidden %s", 403, payload) -} - -func (o *GetAppSandboxConfigsForbidden) GetPayload() *models.StderrErrResponse { - return o.Payload -} - -func (o *GetAppSandboxConfigsForbidden) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.StderrErrResponse) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewGetAppSandboxConfigsNotFound creates a GetAppSandboxConfigsNotFound with default headers values -func NewGetAppSandboxConfigsNotFound() *GetAppSandboxConfigsNotFound { - return &GetAppSandboxConfigsNotFound{} -} - -/* -GetAppSandboxConfigsNotFound describes a response with status code 404, with default header values. - -Not Found -*/ -type GetAppSandboxConfigsNotFound struct { - Payload *models.StderrErrResponse -} - -// IsSuccess returns true when this get app sandbox configs not found response has a 2xx status code -func (o *GetAppSandboxConfigsNotFound) IsSuccess() bool { - return false -} - -// IsRedirect returns true when this get app sandbox configs not found response has a 3xx status code -func (o *GetAppSandboxConfigsNotFound) IsRedirect() bool { - return false -} - -// IsClientError returns true when this get app sandbox configs not found response has a 4xx status code -func (o *GetAppSandboxConfigsNotFound) IsClientError() bool { - return true -} - -// IsServerError returns true when this get app sandbox configs not found response has a 5xx status code -func (o *GetAppSandboxConfigsNotFound) IsServerError() bool { - return false -} - -// IsCode returns true when this get app sandbox configs not found response a status code equal to that given -func (o *GetAppSandboxConfigsNotFound) IsCode(code int) bool { - return code == 404 -} - -// Code gets the status code for the get app sandbox configs not found response -func (o *GetAppSandboxConfigsNotFound) Code() int { - return 404 -} - -func (o *GetAppSandboxConfigsNotFound) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /v1/apps/{app_id}/sandbox-configs][%d] getAppSandboxConfigsNotFound %s", 404, payload) -} - -func (o *GetAppSandboxConfigsNotFound) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /v1/apps/{app_id}/sandbox-configs][%d] getAppSandboxConfigsNotFound %s", 404, payload) -} - -func (o *GetAppSandboxConfigsNotFound) GetPayload() *models.StderrErrResponse { - return o.Payload -} - -func (o *GetAppSandboxConfigsNotFound) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.StderrErrResponse) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewGetAppSandboxConfigsInternalServerError creates a GetAppSandboxConfigsInternalServerError with default headers values -func NewGetAppSandboxConfigsInternalServerError() *GetAppSandboxConfigsInternalServerError { - return &GetAppSandboxConfigsInternalServerError{} -} - -/* -GetAppSandboxConfigsInternalServerError describes a response with status code 500, with default header values. - -Internal Server Error -*/ -type GetAppSandboxConfigsInternalServerError struct { - Payload *models.StderrErrResponse -} - -// IsSuccess returns true when this get app sandbox configs internal server error response has a 2xx status code -func (o *GetAppSandboxConfigsInternalServerError) IsSuccess() bool { - return false -} - -// IsRedirect returns true when this get app sandbox configs internal server error response has a 3xx status code -func (o *GetAppSandboxConfigsInternalServerError) IsRedirect() bool { - return false -} - -// IsClientError returns true when this get app sandbox configs internal server error response has a 4xx status code -func (o *GetAppSandboxConfigsInternalServerError) IsClientError() bool { - return false -} - -// IsServerError returns true when this get app sandbox configs internal server error response has a 5xx status code -func (o *GetAppSandboxConfigsInternalServerError) IsServerError() bool { - return true -} - -// IsCode returns true when this get app sandbox configs internal server error response a status code equal to that given -func (o *GetAppSandboxConfigsInternalServerError) IsCode(code int) bool { - return code == 500 -} - -// Code gets the status code for the get app sandbox configs internal server error response -func (o *GetAppSandboxConfigsInternalServerError) Code() int { - return 500 -} - -func (o *GetAppSandboxConfigsInternalServerError) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /v1/apps/{app_id}/sandbox-configs][%d] getAppSandboxConfigsInternalServerError %s", 500, payload) -} - -func (o *GetAppSandboxConfigsInternalServerError) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /v1/apps/{app_id}/sandbox-configs][%d] getAppSandboxConfigsInternalServerError %s", 500, payload) -} - -func (o *GetAppSandboxConfigsInternalServerError) GetPayload() *models.StderrErrResponse { - return o.Payload -} - -func (o *GetAppSandboxConfigsInternalServerError) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.StderrErrResponse) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} diff --git a/client/operations/get_app_sandbox_latest_config_parameters.go b/client/operations/get_app_sandbox_latest_config_parameters.go deleted file mode 100644 index 904d9bb..0000000 --- a/client/operations/get_app_sandbox_latest_config_parameters.go +++ /dev/null @@ -1,151 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package operations - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "context" - "net/http" - "time" - - "github.com/go-openapi/errors" - "github.com/go-openapi/runtime" - cr "github.com/go-openapi/runtime/client" - "github.com/go-openapi/strfmt" -) - -// NewGetAppSandboxLatestConfigParams creates a new GetAppSandboxLatestConfigParams object, -// with the default timeout for this client. -// -// Default values are not hydrated, since defaults are normally applied by the API server side. -// -// To enforce default values in parameter, use SetDefaults or WithDefaults. -func NewGetAppSandboxLatestConfigParams() *GetAppSandboxLatestConfigParams { - return &GetAppSandboxLatestConfigParams{ - timeout: cr.DefaultTimeout, - } -} - -// NewGetAppSandboxLatestConfigParamsWithTimeout creates a new GetAppSandboxLatestConfigParams object -// with the ability to set a timeout on a request. -func NewGetAppSandboxLatestConfigParamsWithTimeout(timeout time.Duration) *GetAppSandboxLatestConfigParams { - return &GetAppSandboxLatestConfigParams{ - timeout: timeout, - } -} - -// NewGetAppSandboxLatestConfigParamsWithContext creates a new GetAppSandboxLatestConfigParams object -// with the ability to set a context for a request. -func NewGetAppSandboxLatestConfigParamsWithContext(ctx context.Context) *GetAppSandboxLatestConfigParams { - return &GetAppSandboxLatestConfigParams{ - Context: ctx, - } -} - -// NewGetAppSandboxLatestConfigParamsWithHTTPClient creates a new GetAppSandboxLatestConfigParams object -// with the ability to set a custom HTTPClient for a request. -func NewGetAppSandboxLatestConfigParamsWithHTTPClient(client *http.Client) *GetAppSandboxLatestConfigParams { - return &GetAppSandboxLatestConfigParams{ - HTTPClient: client, - } -} - -/* -GetAppSandboxLatestConfigParams contains all the parameters to send to the API endpoint - - for the get app sandbox latest config operation. - - Typically these are written to a http.Request. -*/ -type GetAppSandboxLatestConfigParams struct { - - /* AppID. - - app ID - */ - AppID string - - timeout time.Duration - Context context.Context - HTTPClient *http.Client -} - -// WithDefaults hydrates default values in the get app sandbox latest config params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *GetAppSandboxLatestConfigParams) WithDefaults() *GetAppSandboxLatestConfigParams { - o.SetDefaults() - return o -} - -// SetDefaults hydrates default values in the get app sandbox latest config params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *GetAppSandboxLatestConfigParams) SetDefaults() { - // no default values defined for this parameter -} - -// WithTimeout adds the timeout to the get app sandbox latest config params -func (o *GetAppSandboxLatestConfigParams) WithTimeout(timeout time.Duration) *GetAppSandboxLatestConfigParams { - o.SetTimeout(timeout) - return o -} - -// SetTimeout adds the timeout to the get app sandbox latest config params -func (o *GetAppSandboxLatestConfigParams) SetTimeout(timeout time.Duration) { - o.timeout = timeout -} - -// WithContext adds the context to the get app sandbox latest config params -func (o *GetAppSandboxLatestConfigParams) WithContext(ctx context.Context) *GetAppSandboxLatestConfigParams { - o.SetContext(ctx) - return o -} - -// SetContext adds the context to the get app sandbox latest config params -func (o *GetAppSandboxLatestConfigParams) SetContext(ctx context.Context) { - o.Context = ctx -} - -// WithHTTPClient adds the HTTPClient to the get app sandbox latest config params -func (o *GetAppSandboxLatestConfigParams) WithHTTPClient(client *http.Client) *GetAppSandboxLatestConfigParams { - o.SetHTTPClient(client) - return o -} - -// SetHTTPClient adds the HTTPClient to the get app sandbox latest config params -func (o *GetAppSandboxLatestConfigParams) SetHTTPClient(client *http.Client) { - o.HTTPClient = client -} - -// WithAppID adds the appID to the get app sandbox latest config params -func (o *GetAppSandboxLatestConfigParams) WithAppID(appID string) *GetAppSandboxLatestConfigParams { - o.SetAppID(appID) - return o -} - -// SetAppID adds the appId to the get app sandbox latest config params -func (o *GetAppSandboxLatestConfigParams) SetAppID(appID string) { - o.AppID = appID -} - -// WriteToRequest writes these params to a swagger request -func (o *GetAppSandboxLatestConfigParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { - - if err := r.SetTimeout(o.timeout); err != nil { - return err - } - var res []error - - // path param app_id - if err := r.SetPathParam("app_id", o.AppID); err != nil { - return err - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} diff --git a/client/operations/get_app_sandbox_latest_config_responses.go b/client/operations/get_app_sandbox_latest_config_responses.go deleted file mode 100644 index 1d1396f..0000000 --- a/client/operations/get_app_sandbox_latest_config_responses.go +++ /dev/null @@ -1,486 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package operations - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "encoding/json" - "fmt" - "io" - - "github.com/go-openapi/runtime" - "github.com/go-openapi/strfmt" - - "github.com/nuonco/nuon-go/models" -) - -// GetAppSandboxLatestConfigReader is a Reader for the GetAppSandboxLatestConfig structure. -type GetAppSandboxLatestConfigReader struct { - formats strfmt.Registry -} - -// ReadResponse reads a server response into the received o. -func (o *GetAppSandboxLatestConfigReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { - switch response.Code() { - case 200: - result := NewGetAppSandboxLatestConfigOK() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return result, nil - case 400: - result := NewGetAppSandboxLatestConfigBadRequest() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return nil, result - case 401: - result := NewGetAppSandboxLatestConfigUnauthorized() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return nil, result - case 403: - result := NewGetAppSandboxLatestConfigForbidden() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return nil, result - case 404: - result := NewGetAppSandboxLatestConfigNotFound() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return nil, result - case 500: - result := NewGetAppSandboxLatestConfigInternalServerError() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return nil, result - default: - return nil, runtime.NewAPIError("[GET /v1/apps/{app_id}/sandbox-latest-config] GetAppSandboxLatestConfig", response, response.Code()) - } -} - -// NewGetAppSandboxLatestConfigOK creates a GetAppSandboxLatestConfigOK with default headers values -func NewGetAppSandboxLatestConfigOK() *GetAppSandboxLatestConfigOK { - return &GetAppSandboxLatestConfigOK{} -} - -/* -GetAppSandboxLatestConfigOK describes a response with status code 200, with default header values. - -OK -*/ -type GetAppSandboxLatestConfigOK struct { - Payload *models.AppAppSandboxConfig -} - -// IsSuccess returns true when this get app sandbox latest config o k response has a 2xx status code -func (o *GetAppSandboxLatestConfigOK) IsSuccess() bool { - return true -} - -// IsRedirect returns true when this get app sandbox latest config o k response has a 3xx status code -func (o *GetAppSandboxLatestConfigOK) IsRedirect() bool { - return false -} - -// IsClientError returns true when this get app sandbox latest config o k response has a 4xx status code -func (o *GetAppSandboxLatestConfigOK) IsClientError() bool { - return false -} - -// IsServerError returns true when this get app sandbox latest config o k response has a 5xx status code -func (o *GetAppSandboxLatestConfigOK) IsServerError() bool { - return false -} - -// IsCode returns true when this get app sandbox latest config o k response a status code equal to that given -func (o *GetAppSandboxLatestConfigOK) IsCode(code int) bool { - return code == 200 -} - -// Code gets the status code for the get app sandbox latest config o k response -func (o *GetAppSandboxLatestConfigOK) Code() int { - return 200 -} - -func (o *GetAppSandboxLatestConfigOK) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /v1/apps/{app_id}/sandbox-latest-config][%d] getAppSandboxLatestConfigOK %s", 200, payload) -} - -func (o *GetAppSandboxLatestConfigOK) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /v1/apps/{app_id}/sandbox-latest-config][%d] getAppSandboxLatestConfigOK %s", 200, payload) -} - -func (o *GetAppSandboxLatestConfigOK) GetPayload() *models.AppAppSandboxConfig { - return o.Payload -} - -func (o *GetAppSandboxLatestConfigOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.AppAppSandboxConfig) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewGetAppSandboxLatestConfigBadRequest creates a GetAppSandboxLatestConfigBadRequest with default headers values -func NewGetAppSandboxLatestConfigBadRequest() *GetAppSandboxLatestConfigBadRequest { - return &GetAppSandboxLatestConfigBadRequest{} -} - -/* -GetAppSandboxLatestConfigBadRequest describes a response with status code 400, with default header values. - -Bad Request -*/ -type GetAppSandboxLatestConfigBadRequest struct { - Payload *models.StderrErrResponse -} - -// IsSuccess returns true when this get app sandbox latest config bad request response has a 2xx status code -func (o *GetAppSandboxLatestConfigBadRequest) IsSuccess() bool { - return false -} - -// IsRedirect returns true when this get app sandbox latest config bad request response has a 3xx status code -func (o *GetAppSandboxLatestConfigBadRequest) IsRedirect() bool { - return false -} - -// IsClientError returns true when this get app sandbox latest config bad request response has a 4xx status code -func (o *GetAppSandboxLatestConfigBadRequest) IsClientError() bool { - return true -} - -// IsServerError returns true when this get app sandbox latest config bad request response has a 5xx status code -func (o *GetAppSandboxLatestConfigBadRequest) IsServerError() bool { - return false -} - -// IsCode returns true when this get app sandbox latest config bad request response a status code equal to that given -func (o *GetAppSandboxLatestConfigBadRequest) IsCode(code int) bool { - return code == 400 -} - -// Code gets the status code for the get app sandbox latest config bad request response -func (o *GetAppSandboxLatestConfigBadRequest) Code() int { - return 400 -} - -func (o *GetAppSandboxLatestConfigBadRequest) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /v1/apps/{app_id}/sandbox-latest-config][%d] getAppSandboxLatestConfigBadRequest %s", 400, payload) -} - -func (o *GetAppSandboxLatestConfigBadRequest) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /v1/apps/{app_id}/sandbox-latest-config][%d] getAppSandboxLatestConfigBadRequest %s", 400, payload) -} - -func (o *GetAppSandboxLatestConfigBadRequest) GetPayload() *models.StderrErrResponse { - return o.Payload -} - -func (o *GetAppSandboxLatestConfigBadRequest) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.StderrErrResponse) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewGetAppSandboxLatestConfigUnauthorized creates a GetAppSandboxLatestConfigUnauthorized with default headers values -func NewGetAppSandboxLatestConfigUnauthorized() *GetAppSandboxLatestConfigUnauthorized { - return &GetAppSandboxLatestConfigUnauthorized{} -} - -/* -GetAppSandboxLatestConfigUnauthorized describes a response with status code 401, with default header values. - -Unauthorized -*/ -type GetAppSandboxLatestConfigUnauthorized struct { - Payload *models.StderrErrResponse -} - -// IsSuccess returns true when this get app sandbox latest config unauthorized response has a 2xx status code -func (o *GetAppSandboxLatestConfigUnauthorized) IsSuccess() bool { - return false -} - -// IsRedirect returns true when this get app sandbox latest config unauthorized response has a 3xx status code -func (o *GetAppSandboxLatestConfigUnauthorized) IsRedirect() bool { - return false -} - -// IsClientError returns true when this get app sandbox latest config unauthorized response has a 4xx status code -func (o *GetAppSandboxLatestConfigUnauthorized) IsClientError() bool { - return true -} - -// IsServerError returns true when this get app sandbox latest config unauthorized response has a 5xx status code -func (o *GetAppSandboxLatestConfigUnauthorized) IsServerError() bool { - return false -} - -// IsCode returns true when this get app sandbox latest config unauthorized response a status code equal to that given -func (o *GetAppSandboxLatestConfigUnauthorized) IsCode(code int) bool { - return code == 401 -} - -// Code gets the status code for the get app sandbox latest config unauthorized response -func (o *GetAppSandboxLatestConfigUnauthorized) Code() int { - return 401 -} - -func (o *GetAppSandboxLatestConfigUnauthorized) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /v1/apps/{app_id}/sandbox-latest-config][%d] getAppSandboxLatestConfigUnauthorized %s", 401, payload) -} - -func (o *GetAppSandboxLatestConfigUnauthorized) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /v1/apps/{app_id}/sandbox-latest-config][%d] getAppSandboxLatestConfigUnauthorized %s", 401, payload) -} - -func (o *GetAppSandboxLatestConfigUnauthorized) GetPayload() *models.StderrErrResponse { - return o.Payload -} - -func (o *GetAppSandboxLatestConfigUnauthorized) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.StderrErrResponse) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewGetAppSandboxLatestConfigForbidden creates a GetAppSandboxLatestConfigForbidden with default headers values -func NewGetAppSandboxLatestConfigForbidden() *GetAppSandboxLatestConfigForbidden { - return &GetAppSandboxLatestConfigForbidden{} -} - -/* -GetAppSandboxLatestConfigForbidden describes a response with status code 403, with default header values. - -Forbidden -*/ -type GetAppSandboxLatestConfigForbidden struct { - Payload *models.StderrErrResponse -} - -// IsSuccess returns true when this get app sandbox latest config forbidden response has a 2xx status code -func (o *GetAppSandboxLatestConfigForbidden) IsSuccess() bool { - return false -} - -// IsRedirect returns true when this get app sandbox latest config forbidden response has a 3xx status code -func (o *GetAppSandboxLatestConfigForbidden) IsRedirect() bool { - return false -} - -// IsClientError returns true when this get app sandbox latest config forbidden response has a 4xx status code -func (o *GetAppSandboxLatestConfigForbidden) IsClientError() bool { - return true -} - -// IsServerError returns true when this get app sandbox latest config forbidden response has a 5xx status code -func (o *GetAppSandboxLatestConfigForbidden) IsServerError() bool { - return false -} - -// IsCode returns true when this get app sandbox latest config forbidden response a status code equal to that given -func (o *GetAppSandboxLatestConfigForbidden) IsCode(code int) bool { - return code == 403 -} - -// Code gets the status code for the get app sandbox latest config forbidden response -func (o *GetAppSandboxLatestConfigForbidden) Code() int { - return 403 -} - -func (o *GetAppSandboxLatestConfigForbidden) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /v1/apps/{app_id}/sandbox-latest-config][%d] getAppSandboxLatestConfigForbidden %s", 403, payload) -} - -func (o *GetAppSandboxLatestConfigForbidden) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /v1/apps/{app_id}/sandbox-latest-config][%d] getAppSandboxLatestConfigForbidden %s", 403, payload) -} - -func (o *GetAppSandboxLatestConfigForbidden) GetPayload() *models.StderrErrResponse { - return o.Payload -} - -func (o *GetAppSandboxLatestConfigForbidden) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.StderrErrResponse) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewGetAppSandboxLatestConfigNotFound creates a GetAppSandboxLatestConfigNotFound with default headers values -func NewGetAppSandboxLatestConfigNotFound() *GetAppSandboxLatestConfigNotFound { - return &GetAppSandboxLatestConfigNotFound{} -} - -/* -GetAppSandboxLatestConfigNotFound describes a response with status code 404, with default header values. - -Not Found -*/ -type GetAppSandboxLatestConfigNotFound struct { - Payload *models.StderrErrResponse -} - -// IsSuccess returns true when this get app sandbox latest config not found response has a 2xx status code -func (o *GetAppSandboxLatestConfigNotFound) IsSuccess() bool { - return false -} - -// IsRedirect returns true when this get app sandbox latest config not found response has a 3xx status code -func (o *GetAppSandboxLatestConfigNotFound) IsRedirect() bool { - return false -} - -// IsClientError returns true when this get app sandbox latest config not found response has a 4xx status code -func (o *GetAppSandboxLatestConfigNotFound) IsClientError() bool { - return true -} - -// IsServerError returns true when this get app sandbox latest config not found response has a 5xx status code -func (o *GetAppSandboxLatestConfigNotFound) IsServerError() bool { - return false -} - -// IsCode returns true when this get app sandbox latest config not found response a status code equal to that given -func (o *GetAppSandboxLatestConfigNotFound) IsCode(code int) bool { - return code == 404 -} - -// Code gets the status code for the get app sandbox latest config not found response -func (o *GetAppSandboxLatestConfigNotFound) Code() int { - return 404 -} - -func (o *GetAppSandboxLatestConfigNotFound) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /v1/apps/{app_id}/sandbox-latest-config][%d] getAppSandboxLatestConfigNotFound %s", 404, payload) -} - -func (o *GetAppSandboxLatestConfigNotFound) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /v1/apps/{app_id}/sandbox-latest-config][%d] getAppSandboxLatestConfigNotFound %s", 404, payload) -} - -func (o *GetAppSandboxLatestConfigNotFound) GetPayload() *models.StderrErrResponse { - return o.Payload -} - -func (o *GetAppSandboxLatestConfigNotFound) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.StderrErrResponse) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewGetAppSandboxLatestConfigInternalServerError creates a GetAppSandboxLatestConfigInternalServerError with default headers values -func NewGetAppSandboxLatestConfigInternalServerError() *GetAppSandboxLatestConfigInternalServerError { - return &GetAppSandboxLatestConfigInternalServerError{} -} - -/* -GetAppSandboxLatestConfigInternalServerError describes a response with status code 500, with default header values. - -Internal Server Error -*/ -type GetAppSandboxLatestConfigInternalServerError struct { - Payload *models.StderrErrResponse -} - -// IsSuccess returns true when this get app sandbox latest config internal server error response has a 2xx status code -func (o *GetAppSandboxLatestConfigInternalServerError) IsSuccess() bool { - return false -} - -// IsRedirect returns true when this get app sandbox latest config internal server error response has a 3xx status code -func (o *GetAppSandboxLatestConfigInternalServerError) IsRedirect() bool { - return false -} - -// IsClientError returns true when this get app sandbox latest config internal server error response has a 4xx status code -func (o *GetAppSandboxLatestConfigInternalServerError) IsClientError() bool { - return false -} - -// IsServerError returns true when this get app sandbox latest config internal server error response has a 5xx status code -func (o *GetAppSandboxLatestConfigInternalServerError) IsServerError() bool { - return true -} - -// IsCode returns true when this get app sandbox latest config internal server error response a status code equal to that given -func (o *GetAppSandboxLatestConfigInternalServerError) IsCode(code int) bool { - return code == 500 -} - -// Code gets the status code for the get app sandbox latest config internal server error response -func (o *GetAppSandboxLatestConfigInternalServerError) Code() int { - return 500 -} - -func (o *GetAppSandboxLatestConfigInternalServerError) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /v1/apps/{app_id}/sandbox-latest-config][%d] getAppSandboxLatestConfigInternalServerError %s", 500, payload) -} - -func (o *GetAppSandboxLatestConfigInternalServerError) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /v1/apps/{app_id}/sandbox-latest-config][%d] getAppSandboxLatestConfigInternalServerError %s", 500, payload) -} - -func (o *GetAppSandboxLatestConfigInternalServerError) GetPayload() *models.StderrErrResponse { - return o.Payload -} - -func (o *GetAppSandboxLatestConfigInternalServerError) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.StderrErrResponse) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} diff --git a/client/operations/get_app_secrets_parameters.go b/client/operations/get_app_secrets_parameters.go deleted file mode 100644 index 27d640b..0000000 --- a/client/operations/get_app_secrets_parameters.go +++ /dev/null @@ -1,151 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package operations - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "context" - "net/http" - "time" - - "github.com/go-openapi/errors" - "github.com/go-openapi/runtime" - cr "github.com/go-openapi/runtime/client" - "github.com/go-openapi/strfmt" -) - -// NewGetAppSecretsParams creates a new GetAppSecretsParams object, -// with the default timeout for this client. -// -// Default values are not hydrated, since defaults are normally applied by the API server side. -// -// To enforce default values in parameter, use SetDefaults or WithDefaults. -func NewGetAppSecretsParams() *GetAppSecretsParams { - return &GetAppSecretsParams{ - timeout: cr.DefaultTimeout, - } -} - -// NewGetAppSecretsParamsWithTimeout creates a new GetAppSecretsParams object -// with the ability to set a timeout on a request. -func NewGetAppSecretsParamsWithTimeout(timeout time.Duration) *GetAppSecretsParams { - return &GetAppSecretsParams{ - timeout: timeout, - } -} - -// NewGetAppSecretsParamsWithContext creates a new GetAppSecretsParams object -// with the ability to set a context for a request. -func NewGetAppSecretsParamsWithContext(ctx context.Context) *GetAppSecretsParams { - return &GetAppSecretsParams{ - Context: ctx, - } -} - -// NewGetAppSecretsParamsWithHTTPClient creates a new GetAppSecretsParams object -// with the ability to set a custom HTTPClient for a request. -func NewGetAppSecretsParamsWithHTTPClient(client *http.Client) *GetAppSecretsParams { - return &GetAppSecretsParams{ - HTTPClient: client, - } -} - -/* -GetAppSecretsParams contains all the parameters to send to the API endpoint - - for the get app secrets operation. - - Typically these are written to a http.Request. -*/ -type GetAppSecretsParams struct { - - /* AppID. - - app ID - */ - AppID string - - timeout time.Duration - Context context.Context - HTTPClient *http.Client -} - -// WithDefaults hydrates default values in the get app secrets params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *GetAppSecretsParams) WithDefaults() *GetAppSecretsParams { - o.SetDefaults() - return o -} - -// SetDefaults hydrates default values in the get app secrets params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *GetAppSecretsParams) SetDefaults() { - // no default values defined for this parameter -} - -// WithTimeout adds the timeout to the get app secrets params -func (o *GetAppSecretsParams) WithTimeout(timeout time.Duration) *GetAppSecretsParams { - o.SetTimeout(timeout) - return o -} - -// SetTimeout adds the timeout to the get app secrets params -func (o *GetAppSecretsParams) SetTimeout(timeout time.Duration) { - o.timeout = timeout -} - -// WithContext adds the context to the get app secrets params -func (o *GetAppSecretsParams) WithContext(ctx context.Context) *GetAppSecretsParams { - o.SetContext(ctx) - return o -} - -// SetContext adds the context to the get app secrets params -func (o *GetAppSecretsParams) SetContext(ctx context.Context) { - o.Context = ctx -} - -// WithHTTPClient adds the HTTPClient to the get app secrets params -func (o *GetAppSecretsParams) WithHTTPClient(client *http.Client) *GetAppSecretsParams { - o.SetHTTPClient(client) - return o -} - -// SetHTTPClient adds the HTTPClient to the get app secrets params -func (o *GetAppSecretsParams) SetHTTPClient(client *http.Client) { - o.HTTPClient = client -} - -// WithAppID adds the appID to the get app secrets params -func (o *GetAppSecretsParams) WithAppID(appID string) *GetAppSecretsParams { - o.SetAppID(appID) - return o -} - -// SetAppID adds the appId to the get app secrets params -func (o *GetAppSecretsParams) SetAppID(appID string) { - o.AppID = appID -} - -// WriteToRequest writes these params to a swagger request -func (o *GetAppSecretsParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { - - if err := r.SetTimeout(o.timeout); err != nil { - return err - } - var res []error - - // path param app_id - if err := r.SetPathParam("app_id", o.AppID); err != nil { - return err - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} diff --git a/client/operations/get_app_secrets_responses.go b/client/operations/get_app_secrets_responses.go deleted file mode 100644 index bc095a7..0000000 --- a/client/operations/get_app_secrets_responses.go +++ /dev/null @@ -1,484 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package operations - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "encoding/json" - "fmt" - "io" - - "github.com/go-openapi/runtime" - "github.com/go-openapi/strfmt" - - "github.com/nuonco/nuon-go/models" -) - -// GetAppSecretsReader is a Reader for the GetAppSecrets structure. -type GetAppSecretsReader struct { - formats strfmt.Registry -} - -// ReadResponse reads a server response into the received o. -func (o *GetAppSecretsReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { - switch response.Code() { - case 200: - result := NewGetAppSecretsOK() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return result, nil - case 400: - result := NewGetAppSecretsBadRequest() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return nil, result - case 401: - result := NewGetAppSecretsUnauthorized() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return nil, result - case 403: - result := NewGetAppSecretsForbidden() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return nil, result - case 404: - result := NewGetAppSecretsNotFound() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return nil, result - case 500: - result := NewGetAppSecretsInternalServerError() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return nil, result - default: - return nil, runtime.NewAPIError("[GET /v1/apps/{app_id}/secrets] GetAppSecrets", response, response.Code()) - } -} - -// NewGetAppSecretsOK creates a GetAppSecretsOK with default headers values -func NewGetAppSecretsOK() *GetAppSecretsOK { - return &GetAppSecretsOK{} -} - -/* -GetAppSecretsOK describes a response with status code 200, with default header values. - -OK -*/ -type GetAppSecretsOK struct { - Payload []*models.AppAppSecret -} - -// IsSuccess returns true when this get app secrets o k response has a 2xx status code -func (o *GetAppSecretsOK) IsSuccess() bool { - return true -} - -// IsRedirect returns true when this get app secrets o k response has a 3xx status code -func (o *GetAppSecretsOK) IsRedirect() bool { - return false -} - -// IsClientError returns true when this get app secrets o k response has a 4xx status code -func (o *GetAppSecretsOK) IsClientError() bool { - return false -} - -// IsServerError returns true when this get app secrets o k response has a 5xx status code -func (o *GetAppSecretsOK) IsServerError() bool { - return false -} - -// IsCode returns true when this get app secrets o k response a status code equal to that given -func (o *GetAppSecretsOK) IsCode(code int) bool { - return code == 200 -} - -// Code gets the status code for the get app secrets o k response -func (o *GetAppSecretsOK) Code() int { - return 200 -} - -func (o *GetAppSecretsOK) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /v1/apps/{app_id}/secrets][%d] getAppSecretsOK %s", 200, payload) -} - -func (o *GetAppSecretsOK) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /v1/apps/{app_id}/secrets][%d] getAppSecretsOK %s", 200, payload) -} - -func (o *GetAppSecretsOK) GetPayload() []*models.AppAppSecret { - return o.Payload -} - -func (o *GetAppSecretsOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - // response payload - if err := consumer.Consume(response.Body(), &o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewGetAppSecretsBadRequest creates a GetAppSecretsBadRequest with default headers values -func NewGetAppSecretsBadRequest() *GetAppSecretsBadRequest { - return &GetAppSecretsBadRequest{} -} - -/* -GetAppSecretsBadRequest describes a response with status code 400, with default header values. - -Bad Request -*/ -type GetAppSecretsBadRequest struct { - Payload *models.StderrErrResponse -} - -// IsSuccess returns true when this get app secrets bad request response has a 2xx status code -func (o *GetAppSecretsBadRequest) IsSuccess() bool { - return false -} - -// IsRedirect returns true when this get app secrets bad request response has a 3xx status code -func (o *GetAppSecretsBadRequest) IsRedirect() bool { - return false -} - -// IsClientError returns true when this get app secrets bad request response has a 4xx status code -func (o *GetAppSecretsBadRequest) IsClientError() bool { - return true -} - -// IsServerError returns true when this get app secrets bad request response has a 5xx status code -func (o *GetAppSecretsBadRequest) IsServerError() bool { - return false -} - -// IsCode returns true when this get app secrets bad request response a status code equal to that given -func (o *GetAppSecretsBadRequest) IsCode(code int) bool { - return code == 400 -} - -// Code gets the status code for the get app secrets bad request response -func (o *GetAppSecretsBadRequest) Code() int { - return 400 -} - -func (o *GetAppSecretsBadRequest) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /v1/apps/{app_id}/secrets][%d] getAppSecretsBadRequest %s", 400, payload) -} - -func (o *GetAppSecretsBadRequest) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /v1/apps/{app_id}/secrets][%d] getAppSecretsBadRequest %s", 400, payload) -} - -func (o *GetAppSecretsBadRequest) GetPayload() *models.StderrErrResponse { - return o.Payload -} - -func (o *GetAppSecretsBadRequest) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.StderrErrResponse) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewGetAppSecretsUnauthorized creates a GetAppSecretsUnauthorized with default headers values -func NewGetAppSecretsUnauthorized() *GetAppSecretsUnauthorized { - return &GetAppSecretsUnauthorized{} -} - -/* -GetAppSecretsUnauthorized describes a response with status code 401, with default header values. - -Unauthorized -*/ -type GetAppSecretsUnauthorized struct { - Payload *models.StderrErrResponse -} - -// IsSuccess returns true when this get app secrets unauthorized response has a 2xx status code -func (o *GetAppSecretsUnauthorized) IsSuccess() bool { - return false -} - -// IsRedirect returns true when this get app secrets unauthorized response has a 3xx status code -func (o *GetAppSecretsUnauthorized) IsRedirect() bool { - return false -} - -// IsClientError returns true when this get app secrets unauthorized response has a 4xx status code -func (o *GetAppSecretsUnauthorized) IsClientError() bool { - return true -} - -// IsServerError returns true when this get app secrets unauthorized response has a 5xx status code -func (o *GetAppSecretsUnauthorized) IsServerError() bool { - return false -} - -// IsCode returns true when this get app secrets unauthorized response a status code equal to that given -func (o *GetAppSecretsUnauthorized) IsCode(code int) bool { - return code == 401 -} - -// Code gets the status code for the get app secrets unauthorized response -func (o *GetAppSecretsUnauthorized) Code() int { - return 401 -} - -func (o *GetAppSecretsUnauthorized) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /v1/apps/{app_id}/secrets][%d] getAppSecretsUnauthorized %s", 401, payload) -} - -func (o *GetAppSecretsUnauthorized) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /v1/apps/{app_id}/secrets][%d] getAppSecretsUnauthorized %s", 401, payload) -} - -func (o *GetAppSecretsUnauthorized) GetPayload() *models.StderrErrResponse { - return o.Payload -} - -func (o *GetAppSecretsUnauthorized) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.StderrErrResponse) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewGetAppSecretsForbidden creates a GetAppSecretsForbidden with default headers values -func NewGetAppSecretsForbidden() *GetAppSecretsForbidden { - return &GetAppSecretsForbidden{} -} - -/* -GetAppSecretsForbidden describes a response with status code 403, with default header values. - -Forbidden -*/ -type GetAppSecretsForbidden struct { - Payload *models.StderrErrResponse -} - -// IsSuccess returns true when this get app secrets forbidden response has a 2xx status code -func (o *GetAppSecretsForbidden) IsSuccess() bool { - return false -} - -// IsRedirect returns true when this get app secrets forbidden response has a 3xx status code -func (o *GetAppSecretsForbidden) IsRedirect() bool { - return false -} - -// IsClientError returns true when this get app secrets forbidden response has a 4xx status code -func (o *GetAppSecretsForbidden) IsClientError() bool { - return true -} - -// IsServerError returns true when this get app secrets forbidden response has a 5xx status code -func (o *GetAppSecretsForbidden) IsServerError() bool { - return false -} - -// IsCode returns true when this get app secrets forbidden response a status code equal to that given -func (o *GetAppSecretsForbidden) IsCode(code int) bool { - return code == 403 -} - -// Code gets the status code for the get app secrets forbidden response -func (o *GetAppSecretsForbidden) Code() int { - return 403 -} - -func (o *GetAppSecretsForbidden) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /v1/apps/{app_id}/secrets][%d] getAppSecretsForbidden %s", 403, payload) -} - -func (o *GetAppSecretsForbidden) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /v1/apps/{app_id}/secrets][%d] getAppSecretsForbidden %s", 403, payload) -} - -func (o *GetAppSecretsForbidden) GetPayload() *models.StderrErrResponse { - return o.Payload -} - -func (o *GetAppSecretsForbidden) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.StderrErrResponse) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewGetAppSecretsNotFound creates a GetAppSecretsNotFound with default headers values -func NewGetAppSecretsNotFound() *GetAppSecretsNotFound { - return &GetAppSecretsNotFound{} -} - -/* -GetAppSecretsNotFound describes a response with status code 404, with default header values. - -Not Found -*/ -type GetAppSecretsNotFound struct { - Payload *models.StderrErrResponse -} - -// IsSuccess returns true when this get app secrets not found response has a 2xx status code -func (o *GetAppSecretsNotFound) IsSuccess() bool { - return false -} - -// IsRedirect returns true when this get app secrets not found response has a 3xx status code -func (o *GetAppSecretsNotFound) IsRedirect() bool { - return false -} - -// IsClientError returns true when this get app secrets not found response has a 4xx status code -func (o *GetAppSecretsNotFound) IsClientError() bool { - return true -} - -// IsServerError returns true when this get app secrets not found response has a 5xx status code -func (o *GetAppSecretsNotFound) IsServerError() bool { - return false -} - -// IsCode returns true when this get app secrets not found response a status code equal to that given -func (o *GetAppSecretsNotFound) IsCode(code int) bool { - return code == 404 -} - -// Code gets the status code for the get app secrets not found response -func (o *GetAppSecretsNotFound) Code() int { - return 404 -} - -func (o *GetAppSecretsNotFound) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /v1/apps/{app_id}/secrets][%d] getAppSecretsNotFound %s", 404, payload) -} - -func (o *GetAppSecretsNotFound) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /v1/apps/{app_id}/secrets][%d] getAppSecretsNotFound %s", 404, payload) -} - -func (o *GetAppSecretsNotFound) GetPayload() *models.StderrErrResponse { - return o.Payload -} - -func (o *GetAppSecretsNotFound) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.StderrErrResponse) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewGetAppSecretsInternalServerError creates a GetAppSecretsInternalServerError with default headers values -func NewGetAppSecretsInternalServerError() *GetAppSecretsInternalServerError { - return &GetAppSecretsInternalServerError{} -} - -/* -GetAppSecretsInternalServerError describes a response with status code 500, with default header values. - -Internal Server Error -*/ -type GetAppSecretsInternalServerError struct { - Payload *models.StderrErrResponse -} - -// IsSuccess returns true when this get app secrets internal server error response has a 2xx status code -func (o *GetAppSecretsInternalServerError) IsSuccess() bool { - return false -} - -// IsRedirect returns true when this get app secrets internal server error response has a 3xx status code -func (o *GetAppSecretsInternalServerError) IsRedirect() bool { - return false -} - -// IsClientError returns true when this get app secrets internal server error response has a 4xx status code -func (o *GetAppSecretsInternalServerError) IsClientError() bool { - return false -} - -// IsServerError returns true when this get app secrets internal server error response has a 5xx status code -func (o *GetAppSecretsInternalServerError) IsServerError() bool { - return true -} - -// IsCode returns true when this get app secrets internal server error response a status code equal to that given -func (o *GetAppSecretsInternalServerError) IsCode(code int) bool { - return code == 500 -} - -// Code gets the status code for the get app secrets internal server error response -func (o *GetAppSecretsInternalServerError) Code() int { - return 500 -} - -func (o *GetAppSecretsInternalServerError) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /v1/apps/{app_id}/secrets][%d] getAppSecretsInternalServerError %s", 500, payload) -} - -func (o *GetAppSecretsInternalServerError) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /v1/apps/{app_id}/secrets][%d] getAppSecretsInternalServerError %s", 500, payload) -} - -func (o *GetAppSecretsInternalServerError) GetPayload() *models.StderrErrResponse { - return o.Payload -} - -func (o *GetAppSecretsInternalServerError) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.StderrErrResponse) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} diff --git a/client/operations/get_apps_parameters.go b/client/operations/get_apps_parameters.go deleted file mode 100644 index 8f01ee6..0000000 --- a/client/operations/get_apps_parameters.go +++ /dev/null @@ -1,128 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package operations - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "context" - "net/http" - "time" - - "github.com/go-openapi/errors" - "github.com/go-openapi/runtime" - cr "github.com/go-openapi/runtime/client" - "github.com/go-openapi/strfmt" -) - -// NewGetAppsParams creates a new GetAppsParams object, -// with the default timeout for this client. -// -// Default values are not hydrated, since defaults are normally applied by the API server side. -// -// To enforce default values in parameter, use SetDefaults or WithDefaults. -func NewGetAppsParams() *GetAppsParams { - return &GetAppsParams{ - timeout: cr.DefaultTimeout, - } -} - -// NewGetAppsParamsWithTimeout creates a new GetAppsParams object -// with the ability to set a timeout on a request. -func NewGetAppsParamsWithTimeout(timeout time.Duration) *GetAppsParams { - return &GetAppsParams{ - timeout: timeout, - } -} - -// NewGetAppsParamsWithContext creates a new GetAppsParams object -// with the ability to set a context for a request. -func NewGetAppsParamsWithContext(ctx context.Context) *GetAppsParams { - return &GetAppsParams{ - Context: ctx, - } -} - -// NewGetAppsParamsWithHTTPClient creates a new GetAppsParams object -// with the ability to set a custom HTTPClient for a request. -func NewGetAppsParamsWithHTTPClient(client *http.Client) *GetAppsParams { - return &GetAppsParams{ - HTTPClient: client, - } -} - -/* -GetAppsParams contains all the parameters to send to the API endpoint - - for the get apps operation. - - Typically these are written to a http.Request. -*/ -type GetAppsParams struct { - timeout time.Duration - Context context.Context - HTTPClient *http.Client -} - -// WithDefaults hydrates default values in the get apps params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *GetAppsParams) WithDefaults() *GetAppsParams { - o.SetDefaults() - return o -} - -// SetDefaults hydrates default values in the get apps params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *GetAppsParams) SetDefaults() { - // no default values defined for this parameter -} - -// WithTimeout adds the timeout to the get apps params -func (o *GetAppsParams) WithTimeout(timeout time.Duration) *GetAppsParams { - o.SetTimeout(timeout) - return o -} - -// SetTimeout adds the timeout to the get apps params -func (o *GetAppsParams) SetTimeout(timeout time.Duration) { - o.timeout = timeout -} - -// WithContext adds the context to the get apps params -func (o *GetAppsParams) WithContext(ctx context.Context) *GetAppsParams { - o.SetContext(ctx) - return o -} - -// SetContext adds the context to the get apps params -func (o *GetAppsParams) SetContext(ctx context.Context) { - o.Context = ctx -} - -// WithHTTPClient adds the HTTPClient to the get apps params -func (o *GetAppsParams) WithHTTPClient(client *http.Client) *GetAppsParams { - o.SetHTTPClient(client) - return o -} - -// SetHTTPClient adds the HTTPClient to the get apps params -func (o *GetAppsParams) SetHTTPClient(client *http.Client) { - o.HTTPClient = client -} - -// WriteToRequest writes these params to a swagger request -func (o *GetAppsParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { - - if err := r.SetTimeout(o.timeout); err != nil { - return err - } - var res []error - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} diff --git a/client/operations/get_apps_responses.go b/client/operations/get_apps_responses.go deleted file mode 100644 index 40bcb0e..0000000 --- a/client/operations/get_apps_responses.go +++ /dev/null @@ -1,484 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package operations - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "encoding/json" - "fmt" - "io" - - "github.com/go-openapi/runtime" - "github.com/go-openapi/strfmt" - - "github.com/nuonco/nuon-go/models" -) - -// GetAppsReader is a Reader for the GetApps structure. -type GetAppsReader struct { - formats strfmt.Registry -} - -// ReadResponse reads a server response into the received o. -func (o *GetAppsReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { - switch response.Code() { - case 200: - result := NewGetAppsOK() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return result, nil - case 400: - result := NewGetAppsBadRequest() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return nil, result - case 401: - result := NewGetAppsUnauthorized() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return nil, result - case 403: - result := NewGetAppsForbidden() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return nil, result - case 404: - result := NewGetAppsNotFound() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return nil, result - case 500: - result := NewGetAppsInternalServerError() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return nil, result - default: - return nil, runtime.NewAPIError("[GET /v1/apps] GetApps", response, response.Code()) - } -} - -// NewGetAppsOK creates a GetAppsOK with default headers values -func NewGetAppsOK() *GetAppsOK { - return &GetAppsOK{} -} - -/* -GetAppsOK describes a response with status code 200, with default header values. - -OK -*/ -type GetAppsOK struct { - Payload []*models.AppApp -} - -// IsSuccess returns true when this get apps o k response has a 2xx status code -func (o *GetAppsOK) IsSuccess() bool { - return true -} - -// IsRedirect returns true when this get apps o k response has a 3xx status code -func (o *GetAppsOK) IsRedirect() bool { - return false -} - -// IsClientError returns true when this get apps o k response has a 4xx status code -func (o *GetAppsOK) IsClientError() bool { - return false -} - -// IsServerError returns true when this get apps o k response has a 5xx status code -func (o *GetAppsOK) IsServerError() bool { - return false -} - -// IsCode returns true when this get apps o k response a status code equal to that given -func (o *GetAppsOK) IsCode(code int) bool { - return code == 200 -} - -// Code gets the status code for the get apps o k response -func (o *GetAppsOK) Code() int { - return 200 -} - -func (o *GetAppsOK) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /v1/apps][%d] getAppsOK %s", 200, payload) -} - -func (o *GetAppsOK) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /v1/apps][%d] getAppsOK %s", 200, payload) -} - -func (o *GetAppsOK) GetPayload() []*models.AppApp { - return o.Payload -} - -func (o *GetAppsOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - // response payload - if err := consumer.Consume(response.Body(), &o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewGetAppsBadRequest creates a GetAppsBadRequest with default headers values -func NewGetAppsBadRequest() *GetAppsBadRequest { - return &GetAppsBadRequest{} -} - -/* -GetAppsBadRequest describes a response with status code 400, with default header values. - -Bad Request -*/ -type GetAppsBadRequest struct { - Payload *models.StderrErrResponse -} - -// IsSuccess returns true when this get apps bad request response has a 2xx status code -func (o *GetAppsBadRequest) IsSuccess() bool { - return false -} - -// IsRedirect returns true when this get apps bad request response has a 3xx status code -func (o *GetAppsBadRequest) IsRedirect() bool { - return false -} - -// IsClientError returns true when this get apps bad request response has a 4xx status code -func (o *GetAppsBadRequest) IsClientError() bool { - return true -} - -// IsServerError returns true when this get apps bad request response has a 5xx status code -func (o *GetAppsBadRequest) IsServerError() bool { - return false -} - -// IsCode returns true when this get apps bad request response a status code equal to that given -func (o *GetAppsBadRequest) IsCode(code int) bool { - return code == 400 -} - -// Code gets the status code for the get apps bad request response -func (o *GetAppsBadRequest) Code() int { - return 400 -} - -func (o *GetAppsBadRequest) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /v1/apps][%d] getAppsBadRequest %s", 400, payload) -} - -func (o *GetAppsBadRequest) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /v1/apps][%d] getAppsBadRequest %s", 400, payload) -} - -func (o *GetAppsBadRequest) GetPayload() *models.StderrErrResponse { - return o.Payload -} - -func (o *GetAppsBadRequest) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.StderrErrResponse) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewGetAppsUnauthorized creates a GetAppsUnauthorized with default headers values -func NewGetAppsUnauthorized() *GetAppsUnauthorized { - return &GetAppsUnauthorized{} -} - -/* -GetAppsUnauthorized describes a response with status code 401, with default header values. - -Unauthorized -*/ -type GetAppsUnauthorized struct { - Payload *models.StderrErrResponse -} - -// IsSuccess returns true when this get apps unauthorized response has a 2xx status code -func (o *GetAppsUnauthorized) IsSuccess() bool { - return false -} - -// IsRedirect returns true when this get apps unauthorized response has a 3xx status code -func (o *GetAppsUnauthorized) IsRedirect() bool { - return false -} - -// IsClientError returns true when this get apps unauthorized response has a 4xx status code -func (o *GetAppsUnauthorized) IsClientError() bool { - return true -} - -// IsServerError returns true when this get apps unauthorized response has a 5xx status code -func (o *GetAppsUnauthorized) IsServerError() bool { - return false -} - -// IsCode returns true when this get apps unauthorized response a status code equal to that given -func (o *GetAppsUnauthorized) IsCode(code int) bool { - return code == 401 -} - -// Code gets the status code for the get apps unauthorized response -func (o *GetAppsUnauthorized) Code() int { - return 401 -} - -func (o *GetAppsUnauthorized) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /v1/apps][%d] getAppsUnauthorized %s", 401, payload) -} - -func (o *GetAppsUnauthorized) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /v1/apps][%d] getAppsUnauthorized %s", 401, payload) -} - -func (o *GetAppsUnauthorized) GetPayload() *models.StderrErrResponse { - return o.Payload -} - -func (o *GetAppsUnauthorized) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.StderrErrResponse) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewGetAppsForbidden creates a GetAppsForbidden with default headers values -func NewGetAppsForbidden() *GetAppsForbidden { - return &GetAppsForbidden{} -} - -/* -GetAppsForbidden describes a response with status code 403, with default header values. - -Forbidden -*/ -type GetAppsForbidden struct { - Payload *models.StderrErrResponse -} - -// IsSuccess returns true when this get apps forbidden response has a 2xx status code -func (o *GetAppsForbidden) IsSuccess() bool { - return false -} - -// IsRedirect returns true when this get apps forbidden response has a 3xx status code -func (o *GetAppsForbidden) IsRedirect() bool { - return false -} - -// IsClientError returns true when this get apps forbidden response has a 4xx status code -func (o *GetAppsForbidden) IsClientError() bool { - return true -} - -// IsServerError returns true when this get apps forbidden response has a 5xx status code -func (o *GetAppsForbidden) IsServerError() bool { - return false -} - -// IsCode returns true when this get apps forbidden response a status code equal to that given -func (o *GetAppsForbidden) IsCode(code int) bool { - return code == 403 -} - -// Code gets the status code for the get apps forbidden response -func (o *GetAppsForbidden) Code() int { - return 403 -} - -func (o *GetAppsForbidden) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /v1/apps][%d] getAppsForbidden %s", 403, payload) -} - -func (o *GetAppsForbidden) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /v1/apps][%d] getAppsForbidden %s", 403, payload) -} - -func (o *GetAppsForbidden) GetPayload() *models.StderrErrResponse { - return o.Payload -} - -func (o *GetAppsForbidden) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.StderrErrResponse) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewGetAppsNotFound creates a GetAppsNotFound with default headers values -func NewGetAppsNotFound() *GetAppsNotFound { - return &GetAppsNotFound{} -} - -/* -GetAppsNotFound describes a response with status code 404, with default header values. - -Not Found -*/ -type GetAppsNotFound struct { - Payload *models.StderrErrResponse -} - -// IsSuccess returns true when this get apps not found response has a 2xx status code -func (o *GetAppsNotFound) IsSuccess() bool { - return false -} - -// IsRedirect returns true when this get apps not found response has a 3xx status code -func (o *GetAppsNotFound) IsRedirect() bool { - return false -} - -// IsClientError returns true when this get apps not found response has a 4xx status code -func (o *GetAppsNotFound) IsClientError() bool { - return true -} - -// IsServerError returns true when this get apps not found response has a 5xx status code -func (o *GetAppsNotFound) IsServerError() bool { - return false -} - -// IsCode returns true when this get apps not found response a status code equal to that given -func (o *GetAppsNotFound) IsCode(code int) bool { - return code == 404 -} - -// Code gets the status code for the get apps not found response -func (o *GetAppsNotFound) Code() int { - return 404 -} - -func (o *GetAppsNotFound) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /v1/apps][%d] getAppsNotFound %s", 404, payload) -} - -func (o *GetAppsNotFound) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /v1/apps][%d] getAppsNotFound %s", 404, payload) -} - -func (o *GetAppsNotFound) GetPayload() *models.StderrErrResponse { - return o.Payload -} - -func (o *GetAppsNotFound) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.StderrErrResponse) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewGetAppsInternalServerError creates a GetAppsInternalServerError with default headers values -func NewGetAppsInternalServerError() *GetAppsInternalServerError { - return &GetAppsInternalServerError{} -} - -/* -GetAppsInternalServerError describes a response with status code 500, with default header values. - -Internal Server Error -*/ -type GetAppsInternalServerError struct { - Payload *models.StderrErrResponse -} - -// IsSuccess returns true when this get apps internal server error response has a 2xx status code -func (o *GetAppsInternalServerError) IsSuccess() bool { - return false -} - -// IsRedirect returns true when this get apps internal server error response has a 3xx status code -func (o *GetAppsInternalServerError) IsRedirect() bool { - return false -} - -// IsClientError returns true when this get apps internal server error response has a 4xx status code -func (o *GetAppsInternalServerError) IsClientError() bool { - return false -} - -// IsServerError returns true when this get apps internal server error response has a 5xx status code -func (o *GetAppsInternalServerError) IsServerError() bool { - return true -} - -// IsCode returns true when this get apps internal server error response a status code equal to that given -func (o *GetAppsInternalServerError) IsCode(code int) bool { - return code == 500 -} - -// Code gets the status code for the get apps internal server error response -func (o *GetAppsInternalServerError) Code() int { - return 500 -} - -func (o *GetAppsInternalServerError) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /v1/apps][%d] getAppsInternalServerError %s", 500, payload) -} - -func (o *GetAppsInternalServerError) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /v1/apps][%d] getAppsInternalServerError %s", 500, payload) -} - -func (o *GetAppsInternalServerError) GetPayload() *models.StderrErrResponse { - return o.Payload -} - -func (o *GetAppsInternalServerError) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.StderrErrResponse) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} diff --git a/client/operations/get_build_parameters.go b/client/operations/get_build_parameters.go deleted file mode 100644 index 305498e..0000000 --- a/client/operations/get_build_parameters.go +++ /dev/null @@ -1,151 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package operations - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "context" - "net/http" - "time" - - "github.com/go-openapi/errors" - "github.com/go-openapi/runtime" - cr "github.com/go-openapi/runtime/client" - "github.com/go-openapi/strfmt" -) - -// NewGetBuildParams creates a new GetBuildParams object, -// with the default timeout for this client. -// -// Default values are not hydrated, since defaults are normally applied by the API server side. -// -// To enforce default values in parameter, use SetDefaults or WithDefaults. -func NewGetBuildParams() *GetBuildParams { - return &GetBuildParams{ - timeout: cr.DefaultTimeout, - } -} - -// NewGetBuildParamsWithTimeout creates a new GetBuildParams object -// with the ability to set a timeout on a request. -func NewGetBuildParamsWithTimeout(timeout time.Duration) *GetBuildParams { - return &GetBuildParams{ - timeout: timeout, - } -} - -// NewGetBuildParamsWithContext creates a new GetBuildParams object -// with the ability to set a context for a request. -func NewGetBuildParamsWithContext(ctx context.Context) *GetBuildParams { - return &GetBuildParams{ - Context: ctx, - } -} - -// NewGetBuildParamsWithHTTPClient creates a new GetBuildParams object -// with the ability to set a custom HTTPClient for a request. -func NewGetBuildParamsWithHTTPClient(client *http.Client) *GetBuildParams { - return &GetBuildParams{ - HTTPClient: client, - } -} - -/* -GetBuildParams contains all the parameters to send to the API endpoint - - for the get build operation. - - Typically these are written to a http.Request. -*/ -type GetBuildParams struct { - - /* BuildID. - - build ID - */ - BuildID string - - timeout time.Duration - Context context.Context - HTTPClient *http.Client -} - -// WithDefaults hydrates default values in the get build params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *GetBuildParams) WithDefaults() *GetBuildParams { - o.SetDefaults() - return o -} - -// SetDefaults hydrates default values in the get build params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *GetBuildParams) SetDefaults() { - // no default values defined for this parameter -} - -// WithTimeout adds the timeout to the get build params -func (o *GetBuildParams) WithTimeout(timeout time.Duration) *GetBuildParams { - o.SetTimeout(timeout) - return o -} - -// SetTimeout adds the timeout to the get build params -func (o *GetBuildParams) SetTimeout(timeout time.Duration) { - o.timeout = timeout -} - -// WithContext adds the context to the get build params -func (o *GetBuildParams) WithContext(ctx context.Context) *GetBuildParams { - o.SetContext(ctx) - return o -} - -// SetContext adds the context to the get build params -func (o *GetBuildParams) SetContext(ctx context.Context) { - o.Context = ctx -} - -// WithHTTPClient adds the HTTPClient to the get build params -func (o *GetBuildParams) WithHTTPClient(client *http.Client) *GetBuildParams { - o.SetHTTPClient(client) - return o -} - -// SetHTTPClient adds the HTTPClient to the get build params -func (o *GetBuildParams) SetHTTPClient(client *http.Client) { - o.HTTPClient = client -} - -// WithBuildID adds the buildID to the get build params -func (o *GetBuildParams) WithBuildID(buildID string) *GetBuildParams { - o.SetBuildID(buildID) - return o -} - -// SetBuildID adds the buildId to the get build params -func (o *GetBuildParams) SetBuildID(buildID string) { - o.BuildID = buildID -} - -// WriteToRequest writes these params to a swagger request -func (o *GetBuildParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { - - if err := r.SetTimeout(o.timeout); err != nil { - return err - } - var res []error - - // path param build_id - if err := r.SetPathParam("build_id", o.BuildID); err != nil { - return err - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} diff --git a/client/operations/get_build_responses.go b/client/operations/get_build_responses.go deleted file mode 100644 index d09ab22..0000000 --- a/client/operations/get_build_responses.go +++ /dev/null @@ -1,486 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package operations - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "encoding/json" - "fmt" - "io" - - "github.com/go-openapi/runtime" - "github.com/go-openapi/strfmt" - - "github.com/nuonco/nuon-go/models" -) - -// GetBuildReader is a Reader for the GetBuild structure. -type GetBuildReader struct { - formats strfmt.Registry -} - -// ReadResponse reads a server response into the received o. -func (o *GetBuildReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { - switch response.Code() { - case 200: - result := NewGetBuildOK() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return result, nil - case 400: - result := NewGetBuildBadRequest() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return nil, result - case 401: - result := NewGetBuildUnauthorized() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return nil, result - case 403: - result := NewGetBuildForbidden() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return nil, result - case 404: - result := NewGetBuildNotFound() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return nil, result - case 500: - result := NewGetBuildInternalServerError() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return nil, result - default: - return nil, runtime.NewAPIError("[GET /v1/components/builds/{build_id}] GetBuild", response, response.Code()) - } -} - -// NewGetBuildOK creates a GetBuildOK with default headers values -func NewGetBuildOK() *GetBuildOK { - return &GetBuildOK{} -} - -/* -GetBuildOK describes a response with status code 200, with default header values. - -OK -*/ -type GetBuildOK struct { - Payload *models.AppComponentBuild -} - -// IsSuccess returns true when this get build o k response has a 2xx status code -func (o *GetBuildOK) IsSuccess() bool { - return true -} - -// IsRedirect returns true when this get build o k response has a 3xx status code -func (o *GetBuildOK) IsRedirect() bool { - return false -} - -// IsClientError returns true when this get build o k response has a 4xx status code -func (o *GetBuildOK) IsClientError() bool { - return false -} - -// IsServerError returns true when this get build o k response has a 5xx status code -func (o *GetBuildOK) IsServerError() bool { - return false -} - -// IsCode returns true when this get build o k response a status code equal to that given -func (o *GetBuildOK) IsCode(code int) bool { - return code == 200 -} - -// Code gets the status code for the get build o k response -func (o *GetBuildOK) Code() int { - return 200 -} - -func (o *GetBuildOK) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /v1/components/builds/{build_id}][%d] getBuildOK %s", 200, payload) -} - -func (o *GetBuildOK) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /v1/components/builds/{build_id}][%d] getBuildOK %s", 200, payload) -} - -func (o *GetBuildOK) GetPayload() *models.AppComponentBuild { - return o.Payload -} - -func (o *GetBuildOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.AppComponentBuild) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewGetBuildBadRequest creates a GetBuildBadRequest with default headers values -func NewGetBuildBadRequest() *GetBuildBadRequest { - return &GetBuildBadRequest{} -} - -/* -GetBuildBadRequest describes a response with status code 400, with default header values. - -Bad Request -*/ -type GetBuildBadRequest struct { - Payload *models.StderrErrResponse -} - -// IsSuccess returns true when this get build bad request response has a 2xx status code -func (o *GetBuildBadRequest) IsSuccess() bool { - return false -} - -// IsRedirect returns true when this get build bad request response has a 3xx status code -func (o *GetBuildBadRequest) IsRedirect() bool { - return false -} - -// IsClientError returns true when this get build bad request response has a 4xx status code -func (o *GetBuildBadRequest) IsClientError() bool { - return true -} - -// IsServerError returns true when this get build bad request response has a 5xx status code -func (o *GetBuildBadRequest) IsServerError() bool { - return false -} - -// IsCode returns true when this get build bad request response a status code equal to that given -func (o *GetBuildBadRequest) IsCode(code int) bool { - return code == 400 -} - -// Code gets the status code for the get build bad request response -func (o *GetBuildBadRequest) Code() int { - return 400 -} - -func (o *GetBuildBadRequest) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /v1/components/builds/{build_id}][%d] getBuildBadRequest %s", 400, payload) -} - -func (o *GetBuildBadRequest) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /v1/components/builds/{build_id}][%d] getBuildBadRequest %s", 400, payload) -} - -func (o *GetBuildBadRequest) GetPayload() *models.StderrErrResponse { - return o.Payload -} - -func (o *GetBuildBadRequest) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.StderrErrResponse) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewGetBuildUnauthorized creates a GetBuildUnauthorized with default headers values -func NewGetBuildUnauthorized() *GetBuildUnauthorized { - return &GetBuildUnauthorized{} -} - -/* -GetBuildUnauthorized describes a response with status code 401, with default header values. - -Unauthorized -*/ -type GetBuildUnauthorized struct { - Payload *models.StderrErrResponse -} - -// IsSuccess returns true when this get build unauthorized response has a 2xx status code -func (o *GetBuildUnauthorized) IsSuccess() bool { - return false -} - -// IsRedirect returns true when this get build unauthorized response has a 3xx status code -func (o *GetBuildUnauthorized) IsRedirect() bool { - return false -} - -// IsClientError returns true when this get build unauthorized response has a 4xx status code -func (o *GetBuildUnauthorized) IsClientError() bool { - return true -} - -// IsServerError returns true when this get build unauthorized response has a 5xx status code -func (o *GetBuildUnauthorized) IsServerError() bool { - return false -} - -// IsCode returns true when this get build unauthorized response a status code equal to that given -func (o *GetBuildUnauthorized) IsCode(code int) bool { - return code == 401 -} - -// Code gets the status code for the get build unauthorized response -func (o *GetBuildUnauthorized) Code() int { - return 401 -} - -func (o *GetBuildUnauthorized) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /v1/components/builds/{build_id}][%d] getBuildUnauthorized %s", 401, payload) -} - -func (o *GetBuildUnauthorized) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /v1/components/builds/{build_id}][%d] getBuildUnauthorized %s", 401, payload) -} - -func (o *GetBuildUnauthorized) GetPayload() *models.StderrErrResponse { - return o.Payload -} - -func (o *GetBuildUnauthorized) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.StderrErrResponse) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewGetBuildForbidden creates a GetBuildForbidden with default headers values -func NewGetBuildForbidden() *GetBuildForbidden { - return &GetBuildForbidden{} -} - -/* -GetBuildForbidden describes a response with status code 403, with default header values. - -Forbidden -*/ -type GetBuildForbidden struct { - Payload *models.StderrErrResponse -} - -// IsSuccess returns true when this get build forbidden response has a 2xx status code -func (o *GetBuildForbidden) IsSuccess() bool { - return false -} - -// IsRedirect returns true when this get build forbidden response has a 3xx status code -func (o *GetBuildForbidden) IsRedirect() bool { - return false -} - -// IsClientError returns true when this get build forbidden response has a 4xx status code -func (o *GetBuildForbidden) IsClientError() bool { - return true -} - -// IsServerError returns true when this get build forbidden response has a 5xx status code -func (o *GetBuildForbidden) IsServerError() bool { - return false -} - -// IsCode returns true when this get build forbidden response a status code equal to that given -func (o *GetBuildForbidden) IsCode(code int) bool { - return code == 403 -} - -// Code gets the status code for the get build forbidden response -func (o *GetBuildForbidden) Code() int { - return 403 -} - -func (o *GetBuildForbidden) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /v1/components/builds/{build_id}][%d] getBuildForbidden %s", 403, payload) -} - -func (o *GetBuildForbidden) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /v1/components/builds/{build_id}][%d] getBuildForbidden %s", 403, payload) -} - -func (o *GetBuildForbidden) GetPayload() *models.StderrErrResponse { - return o.Payload -} - -func (o *GetBuildForbidden) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.StderrErrResponse) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewGetBuildNotFound creates a GetBuildNotFound with default headers values -func NewGetBuildNotFound() *GetBuildNotFound { - return &GetBuildNotFound{} -} - -/* -GetBuildNotFound describes a response with status code 404, with default header values. - -Not Found -*/ -type GetBuildNotFound struct { - Payload *models.StderrErrResponse -} - -// IsSuccess returns true when this get build not found response has a 2xx status code -func (o *GetBuildNotFound) IsSuccess() bool { - return false -} - -// IsRedirect returns true when this get build not found response has a 3xx status code -func (o *GetBuildNotFound) IsRedirect() bool { - return false -} - -// IsClientError returns true when this get build not found response has a 4xx status code -func (o *GetBuildNotFound) IsClientError() bool { - return true -} - -// IsServerError returns true when this get build not found response has a 5xx status code -func (o *GetBuildNotFound) IsServerError() bool { - return false -} - -// IsCode returns true when this get build not found response a status code equal to that given -func (o *GetBuildNotFound) IsCode(code int) bool { - return code == 404 -} - -// Code gets the status code for the get build not found response -func (o *GetBuildNotFound) Code() int { - return 404 -} - -func (o *GetBuildNotFound) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /v1/components/builds/{build_id}][%d] getBuildNotFound %s", 404, payload) -} - -func (o *GetBuildNotFound) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /v1/components/builds/{build_id}][%d] getBuildNotFound %s", 404, payload) -} - -func (o *GetBuildNotFound) GetPayload() *models.StderrErrResponse { - return o.Payload -} - -func (o *GetBuildNotFound) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.StderrErrResponse) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewGetBuildInternalServerError creates a GetBuildInternalServerError with default headers values -func NewGetBuildInternalServerError() *GetBuildInternalServerError { - return &GetBuildInternalServerError{} -} - -/* -GetBuildInternalServerError describes a response with status code 500, with default header values. - -Internal Server Error -*/ -type GetBuildInternalServerError struct { - Payload *models.StderrErrResponse -} - -// IsSuccess returns true when this get build internal server error response has a 2xx status code -func (o *GetBuildInternalServerError) IsSuccess() bool { - return false -} - -// IsRedirect returns true when this get build internal server error response has a 3xx status code -func (o *GetBuildInternalServerError) IsRedirect() bool { - return false -} - -// IsClientError returns true when this get build internal server error response has a 4xx status code -func (o *GetBuildInternalServerError) IsClientError() bool { - return false -} - -// IsServerError returns true when this get build internal server error response has a 5xx status code -func (o *GetBuildInternalServerError) IsServerError() bool { - return true -} - -// IsCode returns true when this get build internal server error response a status code equal to that given -func (o *GetBuildInternalServerError) IsCode(code int) bool { - return code == 500 -} - -// Code gets the status code for the get build internal server error response -func (o *GetBuildInternalServerError) Code() int { - return 500 -} - -func (o *GetBuildInternalServerError) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /v1/components/builds/{build_id}][%d] getBuildInternalServerError %s", 500, payload) -} - -func (o *GetBuildInternalServerError) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /v1/components/builds/{build_id}][%d] getBuildInternalServerError %s", 500, payload) -} - -func (o *GetBuildInternalServerError) GetPayload() *models.StderrErrResponse { - return o.Payload -} - -func (o *GetBuildInternalServerError) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.StderrErrResponse) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} diff --git a/client/operations/get_c_l_i_config_parameters.go b/client/operations/get_c_l_i_config_parameters.go deleted file mode 100644 index e06ff6a..0000000 --- a/client/operations/get_c_l_i_config_parameters.go +++ /dev/null @@ -1,128 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package operations - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "context" - "net/http" - "time" - - "github.com/go-openapi/errors" - "github.com/go-openapi/runtime" - cr "github.com/go-openapi/runtime/client" - "github.com/go-openapi/strfmt" -) - -// NewGetCLIConfigParams creates a new GetCLIConfigParams object, -// with the default timeout for this client. -// -// Default values are not hydrated, since defaults are normally applied by the API server side. -// -// To enforce default values in parameter, use SetDefaults or WithDefaults. -func NewGetCLIConfigParams() *GetCLIConfigParams { - return &GetCLIConfigParams{ - timeout: cr.DefaultTimeout, - } -} - -// NewGetCLIConfigParamsWithTimeout creates a new GetCLIConfigParams object -// with the ability to set a timeout on a request. -func NewGetCLIConfigParamsWithTimeout(timeout time.Duration) *GetCLIConfigParams { - return &GetCLIConfigParams{ - timeout: timeout, - } -} - -// NewGetCLIConfigParamsWithContext creates a new GetCLIConfigParams object -// with the ability to set a context for a request. -func NewGetCLIConfigParamsWithContext(ctx context.Context) *GetCLIConfigParams { - return &GetCLIConfigParams{ - Context: ctx, - } -} - -// NewGetCLIConfigParamsWithHTTPClient creates a new GetCLIConfigParams object -// with the ability to set a custom HTTPClient for a request. -func NewGetCLIConfigParamsWithHTTPClient(client *http.Client) *GetCLIConfigParams { - return &GetCLIConfigParams{ - HTTPClient: client, - } -} - -/* -GetCLIConfigParams contains all the parameters to send to the API endpoint - - for the get c l i config operation. - - Typically these are written to a http.Request. -*/ -type GetCLIConfigParams struct { - timeout time.Duration - Context context.Context - HTTPClient *http.Client -} - -// WithDefaults hydrates default values in the get c l i config params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *GetCLIConfigParams) WithDefaults() *GetCLIConfigParams { - o.SetDefaults() - return o -} - -// SetDefaults hydrates default values in the get c l i config params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *GetCLIConfigParams) SetDefaults() { - // no default values defined for this parameter -} - -// WithTimeout adds the timeout to the get c l i config params -func (o *GetCLIConfigParams) WithTimeout(timeout time.Duration) *GetCLIConfigParams { - o.SetTimeout(timeout) - return o -} - -// SetTimeout adds the timeout to the get c l i config params -func (o *GetCLIConfigParams) SetTimeout(timeout time.Duration) { - o.timeout = timeout -} - -// WithContext adds the context to the get c l i config params -func (o *GetCLIConfigParams) WithContext(ctx context.Context) *GetCLIConfigParams { - o.SetContext(ctx) - return o -} - -// SetContext adds the context to the get c l i config params -func (o *GetCLIConfigParams) SetContext(ctx context.Context) { - o.Context = ctx -} - -// WithHTTPClient adds the HTTPClient to the get c l i config params -func (o *GetCLIConfigParams) WithHTTPClient(client *http.Client) *GetCLIConfigParams { - o.SetHTTPClient(client) - return o -} - -// SetHTTPClient adds the HTTPClient to the get c l i config params -func (o *GetCLIConfigParams) SetHTTPClient(client *http.Client) { - o.HTTPClient = client -} - -// WriteToRequest writes these params to a swagger request -func (o *GetCLIConfigParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { - - if err := r.SetTimeout(o.timeout); err != nil { - return err - } - var res []error - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} diff --git a/client/operations/get_c_l_i_config_responses.go b/client/operations/get_c_l_i_config_responses.go deleted file mode 100644 index 4839d19..0000000 --- a/client/operations/get_c_l_i_config_responses.go +++ /dev/null @@ -1,486 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package operations - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "encoding/json" - "fmt" - "io" - - "github.com/go-openapi/runtime" - "github.com/go-openapi/strfmt" - - "github.com/nuonco/nuon-go/models" -) - -// GetCLIConfigReader is a Reader for the GetCLIConfig structure. -type GetCLIConfigReader struct { - formats strfmt.Registry -} - -// ReadResponse reads a server response into the received o. -func (o *GetCLIConfigReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { - switch response.Code() { - case 200: - result := NewGetCLIConfigOK() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return result, nil - case 400: - result := NewGetCLIConfigBadRequest() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return nil, result - case 401: - result := NewGetCLIConfigUnauthorized() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return nil, result - case 403: - result := NewGetCLIConfigForbidden() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return nil, result - case 404: - result := NewGetCLIConfigNotFound() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return nil, result - case 500: - result := NewGetCLIConfigInternalServerError() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return nil, result - default: - return nil, runtime.NewAPIError("[GET /v1/general/cli-config] GetCLIConfig", response, response.Code()) - } -} - -// NewGetCLIConfigOK creates a GetCLIConfigOK with default headers values -func NewGetCLIConfigOK() *GetCLIConfigOK { - return &GetCLIConfigOK{} -} - -/* -GetCLIConfigOK describes a response with status code 200, with default header values. - -OK -*/ -type GetCLIConfigOK struct { - Payload *models.ServiceCLIConfig -} - -// IsSuccess returns true when this get c l i config o k response has a 2xx status code -func (o *GetCLIConfigOK) IsSuccess() bool { - return true -} - -// IsRedirect returns true when this get c l i config o k response has a 3xx status code -func (o *GetCLIConfigOK) IsRedirect() bool { - return false -} - -// IsClientError returns true when this get c l i config o k response has a 4xx status code -func (o *GetCLIConfigOK) IsClientError() bool { - return false -} - -// IsServerError returns true when this get c l i config o k response has a 5xx status code -func (o *GetCLIConfigOK) IsServerError() bool { - return false -} - -// IsCode returns true when this get c l i config o k response a status code equal to that given -func (o *GetCLIConfigOK) IsCode(code int) bool { - return code == 200 -} - -// Code gets the status code for the get c l i config o k response -func (o *GetCLIConfigOK) Code() int { - return 200 -} - -func (o *GetCLIConfigOK) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /v1/general/cli-config][%d] getCLIConfigOK %s", 200, payload) -} - -func (o *GetCLIConfigOK) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /v1/general/cli-config][%d] getCLIConfigOK %s", 200, payload) -} - -func (o *GetCLIConfigOK) GetPayload() *models.ServiceCLIConfig { - return o.Payload -} - -func (o *GetCLIConfigOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.ServiceCLIConfig) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewGetCLIConfigBadRequest creates a GetCLIConfigBadRequest with default headers values -func NewGetCLIConfigBadRequest() *GetCLIConfigBadRequest { - return &GetCLIConfigBadRequest{} -} - -/* -GetCLIConfigBadRequest describes a response with status code 400, with default header values. - -Bad Request -*/ -type GetCLIConfigBadRequest struct { - Payload *models.StderrErrResponse -} - -// IsSuccess returns true when this get c l i config bad request response has a 2xx status code -func (o *GetCLIConfigBadRequest) IsSuccess() bool { - return false -} - -// IsRedirect returns true when this get c l i config bad request response has a 3xx status code -func (o *GetCLIConfigBadRequest) IsRedirect() bool { - return false -} - -// IsClientError returns true when this get c l i config bad request response has a 4xx status code -func (o *GetCLIConfigBadRequest) IsClientError() bool { - return true -} - -// IsServerError returns true when this get c l i config bad request response has a 5xx status code -func (o *GetCLIConfigBadRequest) IsServerError() bool { - return false -} - -// IsCode returns true when this get c l i config bad request response a status code equal to that given -func (o *GetCLIConfigBadRequest) IsCode(code int) bool { - return code == 400 -} - -// Code gets the status code for the get c l i config bad request response -func (o *GetCLIConfigBadRequest) Code() int { - return 400 -} - -func (o *GetCLIConfigBadRequest) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /v1/general/cli-config][%d] getCLIConfigBadRequest %s", 400, payload) -} - -func (o *GetCLIConfigBadRequest) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /v1/general/cli-config][%d] getCLIConfigBadRequest %s", 400, payload) -} - -func (o *GetCLIConfigBadRequest) GetPayload() *models.StderrErrResponse { - return o.Payload -} - -func (o *GetCLIConfigBadRequest) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.StderrErrResponse) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewGetCLIConfigUnauthorized creates a GetCLIConfigUnauthorized with default headers values -func NewGetCLIConfigUnauthorized() *GetCLIConfigUnauthorized { - return &GetCLIConfigUnauthorized{} -} - -/* -GetCLIConfigUnauthorized describes a response with status code 401, with default header values. - -Unauthorized -*/ -type GetCLIConfigUnauthorized struct { - Payload *models.StderrErrResponse -} - -// IsSuccess returns true when this get c l i config unauthorized response has a 2xx status code -func (o *GetCLIConfigUnauthorized) IsSuccess() bool { - return false -} - -// IsRedirect returns true when this get c l i config unauthorized response has a 3xx status code -func (o *GetCLIConfigUnauthorized) IsRedirect() bool { - return false -} - -// IsClientError returns true when this get c l i config unauthorized response has a 4xx status code -func (o *GetCLIConfigUnauthorized) IsClientError() bool { - return true -} - -// IsServerError returns true when this get c l i config unauthorized response has a 5xx status code -func (o *GetCLIConfigUnauthorized) IsServerError() bool { - return false -} - -// IsCode returns true when this get c l i config unauthorized response a status code equal to that given -func (o *GetCLIConfigUnauthorized) IsCode(code int) bool { - return code == 401 -} - -// Code gets the status code for the get c l i config unauthorized response -func (o *GetCLIConfigUnauthorized) Code() int { - return 401 -} - -func (o *GetCLIConfigUnauthorized) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /v1/general/cli-config][%d] getCLIConfigUnauthorized %s", 401, payload) -} - -func (o *GetCLIConfigUnauthorized) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /v1/general/cli-config][%d] getCLIConfigUnauthorized %s", 401, payload) -} - -func (o *GetCLIConfigUnauthorized) GetPayload() *models.StderrErrResponse { - return o.Payload -} - -func (o *GetCLIConfigUnauthorized) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.StderrErrResponse) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewGetCLIConfigForbidden creates a GetCLIConfigForbidden with default headers values -func NewGetCLIConfigForbidden() *GetCLIConfigForbidden { - return &GetCLIConfigForbidden{} -} - -/* -GetCLIConfigForbidden describes a response with status code 403, with default header values. - -Forbidden -*/ -type GetCLIConfigForbidden struct { - Payload *models.StderrErrResponse -} - -// IsSuccess returns true when this get c l i config forbidden response has a 2xx status code -func (o *GetCLIConfigForbidden) IsSuccess() bool { - return false -} - -// IsRedirect returns true when this get c l i config forbidden response has a 3xx status code -func (o *GetCLIConfigForbidden) IsRedirect() bool { - return false -} - -// IsClientError returns true when this get c l i config forbidden response has a 4xx status code -func (o *GetCLIConfigForbidden) IsClientError() bool { - return true -} - -// IsServerError returns true when this get c l i config forbidden response has a 5xx status code -func (o *GetCLIConfigForbidden) IsServerError() bool { - return false -} - -// IsCode returns true when this get c l i config forbidden response a status code equal to that given -func (o *GetCLIConfigForbidden) IsCode(code int) bool { - return code == 403 -} - -// Code gets the status code for the get c l i config forbidden response -func (o *GetCLIConfigForbidden) Code() int { - return 403 -} - -func (o *GetCLIConfigForbidden) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /v1/general/cli-config][%d] getCLIConfigForbidden %s", 403, payload) -} - -func (o *GetCLIConfigForbidden) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /v1/general/cli-config][%d] getCLIConfigForbidden %s", 403, payload) -} - -func (o *GetCLIConfigForbidden) GetPayload() *models.StderrErrResponse { - return o.Payload -} - -func (o *GetCLIConfigForbidden) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.StderrErrResponse) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewGetCLIConfigNotFound creates a GetCLIConfigNotFound with default headers values -func NewGetCLIConfigNotFound() *GetCLIConfigNotFound { - return &GetCLIConfigNotFound{} -} - -/* -GetCLIConfigNotFound describes a response with status code 404, with default header values. - -Not Found -*/ -type GetCLIConfigNotFound struct { - Payload *models.StderrErrResponse -} - -// IsSuccess returns true when this get c l i config not found response has a 2xx status code -func (o *GetCLIConfigNotFound) IsSuccess() bool { - return false -} - -// IsRedirect returns true when this get c l i config not found response has a 3xx status code -func (o *GetCLIConfigNotFound) IsRedirect() bool { - return false -} - -// IsClientError returns true when this get c l i config not found response has a 4xx status code -func (o *GetCLIConfigNotFound) IsClientError() bool { - return true -} - -// IsServerError returns true when this get c l i config not found response has a 5xx status code -func (o *GetCLIConfigNotFound) IsServerError() bool { - return false -} - -// IsCode returns true when this get c l i config not found response a status code equal to that given -func (o *GetCLIConfigNotFound) IsCode(code int) bool { - return code == 404 -} - -// Code gets the status code for the get c l i config not found response -func (o *GetCLIConfigNotFound) Code() int { - return 404 -} - -func (o *GetCLIConfigNotFound) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /v1/general/cli-config][%d] getCLIConfigNotFound %s", 404, payload) -} - -func (o *GetCLIConfigNotFound) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /v1/general/cli-config][%d] getCLIConfigNotFound %s", 404, payload) -} - -func (o *GetCLIConfigNotFound) GetPayload() *models.StderrErrResponse { - return o.Payload -} - -func (o *GetCLIConfigNotFound) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.StderrErrResponse) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewGetCLIConfigInternalServerError creates a GetCLIConfigInternalServerError with default headers values -func NewGetCLIConfigInternalServerError() *GetCLIConfigInternalServerError { - return &GetCLIConfigInternalServerError{} -} - -/* -GetCLIConfigInternalServerError describes a response with status code 500, with default header values. - -Internal Server Error -*/ -type GetCLIConfigInternalServerError struct { - Payload *models.StderrErrResponse -} - -// IsSuccess returns true when this get c l i config internal server error response has a 2xx status code -func (o *GetCLIConfigInternalServerError) IsSuccess() bool { - return false -} - -// IsRedirect returns true when this get c l i config internal server error response has a 3xx status code -func (o *GetCLIConfigInternalServerError) IsRedirect() bool { - return false -} - -// IsClientError returns true when this get c l i config internal server error response has a 4xx status code -func (o *GetCLIConfigInternalServerError) IsClientError() bool { - return false -} - -// IsServerError returns true when this get c l i config internal server error response has a 5xx status code -func (o *GetCLIConfigInternalServerError) IsServerError() bool { - return true -} - -// IsCode returns true when this get c l i config internal server error response a status code equal to that given -func (o *GetCLIConfigInternalServerError) IsCode(code int) bool { - return code == 500 -} - -// Code gets the status code for the get c l i config internal server error response -func (o *GetCLIConfigInternalServerError) Code() int { - return 500 -} - -func (o *GetCLIConfigInternalServerError) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /v1/general/cli-config][%d] getCLIConfigInternalServerError %s", 500, payload) -} - -func (o *GetCLIConfigInternalServerError) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /v1/general/cli-config][%d] getCLIConfigInternalServerError %s", 500, payload) -} - -func (o *GetCLIConfigInternalServerError) GetPayload() *models.StderrErrResponse { - return o.Payload -} - -func (o *GetCLIConfigInternalServerError) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.StderrErrResponse) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} diff --git a/client/operations/get_cloud_platform_regions_parameters.go b/client/operations/get_cloud_platform_regions_parameters.go deleted file mode 100644 index 2c650e6..0000000 --- a/client/operations/get_cloud_platform_regions_parameters.go +++ /dev/null @@ -1,151 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package operations - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "context" - "net/http" - "time" - - "github.com/go-openapi/errors" - "github.com/go-openapi/runtime" - cr "github.com/go-openapi/runtime/client" - "github.com/go-openapi/strfmt" -) - -// NewGetCloudPlatformRegionsParams creates a new GetCloudPlatformRegionsParams object, -// with the default timeout for this client. -// -// Default values are not hydrated, since defaults are normally applied by the API server side. -// -// To enforce default values in parameter, use SetDefaults or WithDefaults. -func NewGetCloudPlatformRegionsParams() *GetCloudPlatformRegionsParams { - return &GetCloudPlatformRegionsParams{ - timeout: cr.DefaultTimeout, - } -} - -// NewGetCloudPlatformRegionsParamsWithTimeout creates a new GetCloudPlatformRegionsParams object -// with the ability to set a timeout on a request. -func NewGetCloudPlatformRegionsParamsWithTimeout(timeout time.Duration) *GetCloudPlatformRegionsParams { - return &GetCloudPlatformRegionsParams{ - timeout: timeout, - } -} - -// NewGetCloudPlatformRegionsParamsWithContext creates a new GetCloudPlatformRegionsParams object -// with the ability to set a context for a request. -func NewGetCloudPlatformRegionsParamsWithContext(ctx context.Context) *GetCloudPlatformRegionsParams { - return &GetCloudPlatformRegionsParams{ - Context: ctx, - } -} - -// NewGetCloudPlatformRegionsParamsWithHTTPClient creates a new GetCloudPlatformRegionsParams object -// with the ability to set a custom HTTPClient for a request. -func NewGetCloudPlatformRegionsParamsWithHTTPClient(client *http.Client) *GetCloudPlatformRegionsParams { - return &GetCloudPlatformRegionsParams{ - HTTPClient: client, - } -} - -/* -GetCloudPlatformRegionsParams contains all the parameters to send to the API endpoint - - for the get cloud platform regions operation. - - Typically these are written to a http.Request. -*/ -type GetCloudPlatformRegionsParams struct { - - /* CloudPlatform. - - cloud platform - */ - CloudPlatform string - - timeout time.Duration - Context context.Context - HTTPClient *http.Client -} - -// WithDefaults hydrates default values in the get cloud platform regions params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *GetCloudPlatformRegionsParams) WithDefaults() *GetCloudPlatformRegionsParams { - o.SetDefaults() - return o -} - -// SetDefaults hydrates default values in the get cloud platform regions params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *GetCloudPlatformRegionsParams) SetDefaults() { - // no default values defined for this parameter -} - -// WithTimeout adds the timeout to the get cloud platform regions params -func (o *GetCloudPlatformRegionsParams) WithTimeout(timeout time.Duration) *GetCloudPlatformRegionsParams { - o.SetTimeout(timeout) - return o -} - -// SetTimeout adds the timeout to the get cloud platform regions params -func (o *GetCloudPlatformRegionsParams) SetTimeout(timeout time.Duration) { - o.timeout = timeout -} - -// WithContext adds the context to the get cloud platform regions params -func (o *GetCloudPlatformRegionsParams) WithContext(ctx context.Context) *GetCloudPlatformRegionsParams { - o.SetContext(ctx) - return o -} - -// SetContext adds the context to the get cloud platform regions params -func (o *GetCloudPlatformRegionsParams) SetContext(ctx context.Context) { - o.Context = ctx -} - -// WithHTTPClient adds the HTTPClient to the get cloud platform regions params -func (o *GetCloudPlatformRegionsParams) WithHTTPClient(client *http.Client) *GetCloudPlatformRegionsParams { - o.SetHTTPClient(client) - return o -} - -// SetHTTPClient adds the HTTPClient to the get cloud platform regions params -func (o *GetCloudPlatformRegionsParams) SetHTTPClient(client *http.Client) { - o.HTTPClient = client -} - -// WithCloudPlatform adds the cloudPlatform to the get cloud platform regions params -func (o *GetCloudPlatformRegionsParams) WithCloudPlatform(cloudPlatform string) *GetCloudPlatformRegionsParams { - o.SetCloudPlatform(cloudPlatform) - return o -} - -// SetCloudPlatform adds the cloudPlatform to the get cloud platform regions params -func (o *GetCloudPlatformRegionsParams) SetCloudPlatform(cloudPlatform string) { - o.CloudPlatform = cloudPlatform -} - -// WriteToRequest writes these params to a swagger request -func (o *GetCloudPlatformRegionsParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { - - if err := r.SetTimeout(o.timeout); err != nil { - return err - } - var res []error - - // path param cloud_platform - if err := r.SetPathParam("cloud_platform", o.CloudPlatform); err != nil { - return err - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} diff --git a/client/operations/get_cloud_platform_regions_responses.go b/client/operations/get_cloud_platform_regions_responses.go deleted file mode 100644 index 48b24b8..0000000 --- a/client/operations/get_cloud_platform_regions_responses.go +++ /dev/null @@ -1,484 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package operations - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "encoding/json" - "fmt" - "io" - - "github.com/go-openapi/runtime" - "github.com/go-openapi/strfmt" - - "github.com/nuonco/nuon-go/models" -) - -// GetCloudPlatformRegionsReader is a Reader for the GetCloudPlatformRegions structure. -type GetCloudPlatformRegionsReader struct { - formats strfmt.Registry -} - -// ReadResponse reads a server response into the received o. -func (o *GetCloudPlatformRegionsReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { - switch response.Code() { - case 200: - result := NewGetCloudPlatformRegionsOK() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return result, nil - case 400: - result := NewGetCloudPlatformRegionsBadRequest() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return nil, result - case 401: - result := NewGetCloudPlatformRegionsUnauthorized() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return nil, result - case 403: - result := NewGetCloudPlatformRegionsForbidden() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return nil, result - case 404: - result := NewGetCloudPlatformRegionsNotFound() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return nil, result - case 500: - result := NewGetCloudPlatformRegionsInternalServerError() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return nil, result - default: - return nil, runtime.NewAPIError("[GET /v1/general/cloud-platform/{cloud_platform}/regions] GetCloudPlatformRegions", response, response.Code()) - } -} - -// NewGetCloudPlatformRegionsOK creates a GetCloudPlatformRegionsOK with default headers values -func NewGetCloudPlatformRegionsOK() *GetCloudPlatformRegionsOK { - return &GetCloudPlatformRegionsOK{} -} - -/* -GetCloudPlatformRegionsOK describes a response with status code 200, with default header values. - -OK -*/ -type GetCloudPlatformRegionsOK struct { - Payload []*models.AppCloudPlatformRegion -} - -// IsSuccess returns true when this get cloud platform regions o k response has a 2xx status code -func (o *GetCloudPlatformRegionsOK) IsSuccess() bool { - return true -} - -// IsRedirect returns true when this get cloud platform regions o k response has a 3xx status code -func (o *GetCloudPlatformRegionsOK) IsRedirect() bool { - return false -} - -// IsClientError returns true when this get cloud platform regions o k response has a 4xx status code -func (o *GetCloudPlatformRegionsOK) IsClientError() bool { - return false -} - -// IsServerError returns true when this get cloud platform regions o k response has a 5xx status code -func (o *GetCloudPlatformRegionsOK) IsServerError() bool { - return false -} - -// IsCode returns true when this get cloud platform regions o k response a status code equal to that given -func (o *GetCloudPlatformRegionsOK) IsCode(code int) bool { - return code == 200 -} - -// Code gets the status code for the get cloud platform regions o k response -func (o *GetCloudPlatformRegionsOK) Code() int { - return 200 -} - -func (o *GetCloudPlatformRegionsOK) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /v1/general/cloud-platform/{cloud_platform}/regions][%d] getCloudPlatformRegionsOK %s", 200, payload) -} - -func (o *GetCloudPlatformRegionsOK) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /v1/general/cloud-platform/{cloud_platform}/regions][%d] getCloudPlatformRegionsOK %s", 200, payload) -} - -func (o *GetCloudPlatformRegionsOK) GetPayload() []*models.AppCloudPlatformRegion { - return o.Payload -} - -func (o *GetCloudPlatformRegionsOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - // response payload - if err := consumer.Consume(response.Body(), &o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewGetCloudPlatformRegionsBadRequest creates a GetCloudPlatformRegionsBadRequest with default headers values -func NewGetCloudPlatformRegionsBadRequest() *GetCloudPlatformRegionsBadRequest { - return &GetCloudPlatformRegionsBadRequest{} -} - -/* -GetCloudPlatformRegionsBadRequest describes a response with status code 400, with default header values. - -Bad Request -*/ -type GetCloudPlatformRegionsBadRequest struct { - Payload *models.StderrErrResponse -} - -// IsSuccess returns true when this get cloud platform regions bad request response has a 2xx status code -func (o *GetCloudPlatformRegionsBadRequest) IsSuccess() bool { - return false -} - -// IsRedirect returns true when this get cloud platform regions bad request response has a 3xx status code -func (o *GetCloudPlatformRegionsBadRequest) IsRedirect() bool { - return false -} - -// IsClientError returns true when this get cloud platform regions bad request response has a 4xx status code -func (o *GetCloudPlatformRegionsBadRequest) IsClientError() bool { - return true -} - -// IsServerError returns true when this get cloud platform regions bad request response has a 5xx status code -func (o *GetCloudPlatformRegionsBadRequest) IsServerError() bool { - return false -} - -// IsCode returns true when this get cloud platform regions bad request response a status code equal to that given -func (o *GetCloudPlatformRegionsBadRequest) IsCode(code int) bool { - return code == 400 -} - -// Code gets the status code for the get cloud platform regions bad request response -func (o *GetCloudPlatformRegionsBadRequest) Code() int { - return 400 -} - -func (o *GetCloudPlatformRegionsBadRequest) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /v1/general/cloud-platform/{cloud_platform}/regions][%d] getCloudPlatformRegionsBadRequest %s", 400, payload) -} - -func (o *GetCloudPlatformRegionsBadRequest) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /v1/general/cloud-platform/{cloud_platform}/regions][%d] getCloudPlatformRegionsBadRequest %s", 400, payload) -} - -func (o *GetCloudPlatformRegionsBadRequest) GetPayload() *models.StderrErrResponse { - return o.Payload -} - -func (o *GetCloudPlatformRegionsBadRequest) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.StderrErrResponse) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewGetCloudPlatformRegionsUnauthorized creates a GetCloudPlatformRegionsUnauthorized with default headers values -func NewGetCloudPlatformRegionsUnauthorized() *GetCloudPlatformRegionsUnauthorized { - return &GetCloudPlatformRegionsUnauthorized{} -} - -/* -GetCloudPlatformRegionsUnauthorized describes a response with status code 401, with default header values. - -Unauthorized -*/ -type GetCloudPlatformRegionsUnauthorized struct { - Payload *models.StderrErrResponse -} - -// IsSuccess returns true when this get cloud platform regions unauthorized response has a 2xx status code -func (o *GetCloudPlatformRegionsUnauthorized) IsSuccess() bool { - return false -} - -// IsRedirect returns true when this get cloud platform regions unauthorized response has a 3xx status code -func (o *GetCloudPlatformRegionsUnauthorized) IsRedirect() bool { - return false -} - -// IsClientError returns true when this get cloud platform regions unauthorized response has a 4xx status code -func (o *GetCloudPlatformRegionsUnauthorized) IsClientError() bool { - return true -} - -// IsServerError returns true when this get cloud platform regions unauthorized response has a 5xx status code -func (o *GetCloudPlatformRegionsUnauthorized) IsServerError() bool { - return false -} - -// IsCode returns true when this get cloud platform regions unauthorized response a status code equal to that given -func (o *GetCloudPlatformRegionsUnauthorized) IsCode(code int) bool { - return code == 401 -} - -// Code gets the status code for the get cloud platform regions unauthorized response -func (o *GetCloudPlatformRegionsUnauthorized) Code() int { - return 401 -} - -func (o *GetCloudPlatformRegionsUnauthorized) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /v1/general/cloud-platform/{cloud_platform}/regions][%d] getCloudPlatformRegionsUnauthorized %s", 401, payload) -} - -func (o *GetCloudPlatformRegionsUnauthorized) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /v1/general/cloud-platform/{cloud_platform}/regions][%d] getCloudPlatformRegionsUnauthorized %s", 401, payload) -} - -func (o *GetCloudPlatformRegionsUnauthorized) GetPayload() *models.StderrErrResponse { - return o.Payload -} - -func (o *GetCloudPlatformRegionsUnauthorized) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.StderrErrResponse) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewGetCloudPlatformRegionsForbidden creates a GetCloudPlatformRegionsForbidden with default headers values -func NewGetCloudPlatformRegionsForbidden() *GetCloudPlatformRegionsForbidden { - return &GetCloudPlatformRegionsForbidden{} -} - -/* -GetCloudPlatformRegionsForbidden describes a response with status code 403, with default header values. - -Forbidden -*/ -type GetCloudPlatformRegionsForbidden struct { - Payload *models.StderrErrResponse -} - -// IsSuccess returns true when this get cloud platform regions forbidden response has a 2xx status code -func (o *GetCloudPlatformRegionsForbidden) IsSuccess() bool { - return false -} - -// IsRedirect returns true when this get cloud platform regions forbidden response has a 3xx status code -func (o *GetCloudPlatformRegionsForbidden) IsRedirect() bool { - return false -} - -// IsClientError returns true when this get cloud platform regions forbidden response has a 4xx status code -func (o *GetCloudPlatformRegionsForbidden) IsClientError() bool { - return true -} - -// IsServerError returns true when this get cloud platform regions forbidden response has a 5xx status code -func (o *GetCloudPlatformRegionsForbidden) IsServerError() bool { - return false -} - -// IsCode returns true when this get cloud platform regions forbidden response a status code equal to that given -func (o *GetCloudPlatformRegionsForbidden) IsCode(code int) bool { - return code == 403 -} - -// Code gets the status code for the get cloud platform regions forbidden response -func (o *GetCloudPlatformRegionsForbidden) Code() int { - return 403 -} - -func (o *GetCloudPlatformRegionsForbidden) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /v1/general/cloud-platform/{cloud_platform}/regions][%d] getCloudPlatformRegionsForbidden %s", 403, payload) -} - -func (o *GetCloudPlatformRegionsForbidden) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /v1/general/cloud-platform/{cloud_platform}/regions][%d] getCloudPlatformRegionsForbidden %s", 403, payload) -} - -func (o *GetCloudPlatformRegionsForbidden) GetPayload() *models.StderrErrResponse { - return o.Payload -} - -func (o *GetCloudPlatformRegionsForbidden) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.StderrErrResponse) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewGetCloudPlatformRegionsNotFound creates a GetCloudPlatformRegionsNotFound with default headers values -func NewGetCloudPlatformRegionsNotFound() *GetCloudPlatformRegionsNotFound { - return &GetCloudPlatformRegionsNotFound{} -} - -/* -GetCloudPlatformRegionsNotFound describes a response with status code 404, with default header values. - -Not Found -*/ -type GetCloudPlatformRegionsNotFound struct { - Payload *models.StderrErrResponse -} - -// IsSuccess returns true when this get cloud platform regions not found response has a 2xx status code -func (o *GetCloudPlatformRegionsNotFound) IsSuccess() bool { - return false -} - -// IsRedirect returns true when this get cloud platform regions not found response has a 3xx status code -func (o *GetCloudPlatformRegionsNotFound) IsRedirect() bool { - return false -} - -// IsClientError returns true when this get cloud platform regions not found response has a 4xx status code -func (o *GetCloudPlatformRegionsNotFound) IsClientError() bool { - return true -} - -// IsServerError returns true when this get cloud platform regions not found response has a 5xx status code -func (o *GetCloudPlatformRegionsNotFound) IsServerError() bool { - return false -} - -// IsCode returns true when this get cloud platform regions not found response a status code equal to that given -func (o *GetCloudPlatformRegionsNotFound) IsCode(code int) bool { - return code == 404 -} - -// Code gets the status code for the get cloud platform regions not found response -func (o *GetCloudPlatformRegionsNotFound) Code() int { - return 404 -} - -func (o *GetCloudPlatformRegionsNotFound) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /v1/general/cloud-platform/{cloud_platform}/regions][%d] getCloudPlatformRegionsNotFound %s", 404, payload) -} - -func (o *GetCloudPlatformRegionsNotFound) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /v1/general/cloud-platform/{cloud_platform}/regions][%d] getCloudPlatformRegionsNotFound %s", 404, payload) -} - -func (o *GetCloudPlatformRegionsNotFound) GetPayload() *models.StderrErrResponse { - return o.Payload -} - -func (o *GetCloudPlatformRegionsNotFound) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.StderrErrResponse) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewGetCloudPlatformRegionsInternalServerError creates a GetCloudPlatformRegionsInternalServerError with default headers values -func NewGetCloudPlatformRegionsInternalServerError() *GetCloudPlatformRegionsInternalServerError { - return &GetCloudPlatformRegionsInternalServerError{} -} - -/* -GetCloudPlatformRegionsInternalServerError describes a response with status code 500, with default header values. - -Internal Server Error -*/ -type GetCloudPlatformRegionsInternalServerError struct { - Payload *models.StderrErrResponse -} - -// IsSuccess returns true when this get cloud platform regions internal server error response has a 2xx status code -func (o *GetCloudPlatformRegionsInternalServerError) IsSuccess() bool { - return false -} - -// IsRedirect returns true when this get cloud platform regions internal server error response has a 3xx status code -func (o *GetCloudPlatformRegionsInternalServerError) IsRedirect() bool { - return false -} - -// IsClientError returns true when this get cloud platform regions internal server error response has a 4xx status code -func (o *GetCloudPlatformRegionsInternalServerError) IsClientError() bool { - return false -} - -// IsServerError returns true when this get cloud platform regions internal server error response has a 5xx status code -func (o *GetCloudPlatformRegionsInternalServerError) IsServerError() bool { - return true -} - -// IsCode returns true when this get cloud platform regions internal server error response a status code equal to that given -func (o *GetCloudPlatformRegionsInternalServerError) IsCode(code int) bool { - return code == 500 -} - -// Code gets the status code for the get cloud platform regions internal server error response -func (o *GetCloudPlatformRegionsInternalServerError) Code() int { - return 500 -} - -func (o *GetCloudPlatformRegionsInternalServerError) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /v1/general/cloud-platform/{cloud_platform}/regions][%d] getCloudPlatformRegionsInternalServerError %s", 500, payload) -} - -func (o *GetCloudPlatformRegionsInternalServerError) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /v1/general/cloud-platform/{cloud_platform}/regions][%d] getCloudPlatformRegionsInternalServerError %s", 500, payload) -} - -func (o *GetCloudPlatformRegionsInternalServerError) GetPayload() *models.StderrErrResponse { - return o.Payload -} - -func (o *GetCloudPlatformRegionsInternalServerError) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.StderrErrResponse) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} diff --git a/client/operations/get_component_build_logs_parameters.go b/client/operations/get_component_build_logs_parameters.go deleted file mode 100644 index 48eee2f..0000000 --- a/client/operations/get_component_build_logs_parameters.go +++ /dev/null @@ -1,173 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package operations - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "context" - "net/http" - "time" - - "github.com/go-openapi/errors" - "github.com/go-openapi/runtime" - cr "github.com/go-openapi/runtime/client" - "github.com/go-openapi/strfmt" -) - -// NewGetComponentBuildLogsParams creates a new GetComponentBuildLogsParams object, -// with the default timeout for this client. -// -// Default values are not hydrated, since defaults are normally applied by the API server side. -// -// To enforce default values in parameter, use SetDefaults or WithDefaults. -func NewGetComponentBuildLogsParams() *GetComponentBuildLogsParams { - return &GetComponentBuildLogsParams{ - timeout: cr.DefaultTimeout, - } -} - -// NewGetComponentBuildLogsParamsWithTimeout creates a new GetComponentBuildLogsParams object -// with the ability to set a timeout on a request. -func NewGetComponentBuildLogsParamsWithTimeout(timeout time.Duration) *GetComponentBuildLogsParams { - return &GetComponentBuildLogsParams{ - timeout: timeout, - } -} - -// NewGetComponentBuildLogsParamsWithContext creates a new GetComponentBuildLogsParams object -// with the ability to set a context for a request. -func NewGetComponentBuildLogsParamsWithContext(ctx context.Context) *GetComponentBuildLogsParams { - return &GetComponentBuildLogsParams{ - Context: ctx, - } -} - -// NewGetComponentBuildLogsParamsWithHTTPClient creates a new GetComponentBuildLogsParams object -// with the ability to set a custom HTTPClient for a request. -func NewGetComponentBuildLogsParamsWithHTTPClient(client *http.Client) *GetComponentBuildLogsParams { - return &GetComponentBuildLogsParams{ - HTTPClient: client, - } -} - -/* -GetComponentBuildLogsParams contains all the parameters to send to the API endpoint - - for the get component build logs operation. - - Typically these are written to a http.Request. -*/ -type GetComponentBuildLogsParams struct { - - /* BuildID. - - build ID - */ - BuildID string - - /* ComponentID. - - component ID - */ - ComponentID string - - timeout time.Duration - Context context.Context - HTTPClient *http.Client -} - -// WithDefaults hydrates default values in the get component build logs params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *GetComponentBuildLogsParams) WithDefaults() *GetComponentBuildLogsParams { - o.SetDefaults() - return o -} - -// SetDefaults hydrates default values in the get component build logs params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *GetComponentBuildLogsParams) SetDefaults() { - // no default values defined for this parameter -} - -// WithTimeout adds the timeout to the get component build logs params -func (o *GetComponentBuildLogsParams) WithTimeout(timeout time.Duration) *GetComponentBuildLogsParams { - o.SetTimeout(timeout) - return o -} - -// SetTimeout adds the timeout to the get component build logs params -func (o *GetComponentBuildLogsParams) SetTimeout(timeout time.Duration) { - o.timeout = timeout -} - -// WithContext adds the context to the get component build logs params -func (o *GetComponentBuildLogsParams) WithContext(ctx context.Context) *GetComponentBuildLogsParams { - o.SetContext(ctx) - return o -} - -// SetContext adds the context to the get component build logs params -func (o *GetComponentBuildLogsParams) SetContext(ctx context.Context) { - o.Context = ctx -} - -// WithHTTPClient adds the HTTPClient to the get component build logs params -func (o *GetComponentBuildLogsParams) WithHTTPClient(client *http.Client) *GetComponentBuildLogsParams { - o.SetHTTPClient(client) - return o -} - -// SetHTTPClient adds the HTTPClient to the get component build logs params -func (o *GetComponentBuildLogsParams) SetHTTPClient(client *http.Client) { - o.HTTPClient = client -} - -// WithBuildID adds the buildID to the get component build logs params -func (o *GetComponentBuildLogsParams) WithBuildID(buildID string) *GetComponentBuildLogsParams { - o.SetBuildID(buildID) - return o -} - -// SetBuildID adds the buildId to the get component build logs params -func (o *GetComponentBuildLogsParams) SetBuildID(buildID string) { - o.BuildID = buildID -} - -// WithComponentID adds the componentID to the get component build logs params -func (o *GetComponentBuildLogsParams) WithComponentID(componentID string) *GetComponentBuildLogsParams { - o.SetComponentID(componentID) - return o -} - -// SetComponentID adds the componentId to the get component build logs params -func (o *GetComponentBuildLogsParams) SetComponentID(componentID string) { - o.ComponentID = componentID -} - -// WriteToRequest writes these params to a swagger request -func (o *GetComponentBuildLogsParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { - - if err := r.SetTimeout(o.timeout); err != nil { - return err - } - var res []error - - // path param build_id - if err := r.SetPathParam("build_id", o.BuildID); err != nil { - return err - } - - // path param component_id - if err := r.SetPathParam("component_id", o.ComponentID); err != nil { - return err - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} diff --git a/client/operations/get_component_build_logs_responses.go b/client/operations/get_component_build_logs_responses.go deleted file mode 100644 index dfb270b..0000000 --- a/client/operations/get_component_build_logs_responses.go +++ /dev/null @@ -1,484 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package operations - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "encoding/json" - "fmt" - "io" - - "github.com/go-openapi/runtime" - "github.com/go-openapi/strfmt" - - "github.com/nuonco/nuon-go/models" -) - -// GetComponentBuildLogsReader is a Reader for the GetComponentBuildLogs structure. -type GetComponentBuildLogsReader struct { - formats strfmt.Registry -} - -// ReadResponse reads a server response into the received o. -func (o *GetComponentBuildLogsReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { - switch response.Code() { - case 200: - result := NewGetComponentBuildLogsOK() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return result, nil - case 400: - result := NewGetComponentBuildLogsBadRequest() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return nil, result - case 401: - result := NewGetComponentBuildLogsUnauthorized() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return nil, result - case 403: - result := NewGetComponentBuildLogsForbidden() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return nil, result - case 404: - result := NewGetComponentBuildLogsNotFound() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return nil, result - case 500: - result := NewGetComponentBuildLogsInternalServerError() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return nil, result - default: - return nil, runtime.NewAPIError("[GET /v1/components/{component_id}/builds/{build_id}/logs] GetComponentBuildLogs", response, response.Code()) - } -} - -// NewGetComponentBuildLogsOK creates a GetComponentBuildLogsOK with default headers values -func NewGetComponentBuildLogsOK() *GetComponentBuildLogsOK { - return &GetComponentBuildLogsOK{} -} - -/* -GetComponentBuildLogsOK describes a response with status code 200, with default header values. - -OK -*/ -type GetComponentBuildLogsOK struct { - Payload []interface{} -} - -// IsSuccess returns true when this get component build logs o k response has a 2xx status code -func (o *GetComponentBuildLogsOK) IsSuccess() bool { - return true -} - -// IsRedirect returns true when this get component build logs o k response has a 3xx status code -func (o *GetComponentBuildLogsOK) IsRedirect() bool { - return false -} - -// IsClientError returns true when this get component build logs o k response has a 4xx status code -func (o *GetComponentBuildLogsOK) IsClientError() bool { - return false -} - -// IsServerError returns true when this get component build logs o k response has a 5xx status code -func (o *GetComponentBuildLogsOK) IsServerError() bool { - return false -} - -// IsCode returns true when this get component build logs o k response a status code equal to that given -func (o *GetComponentBuildLogsOK) IsCode(code int) bool { - return code == 200 -} - -// Code gets the status code for the get component build logs o k response -func (o *GetComponentBuildLogsOK) Code() int { - return 200 -} - -func (o *GetComponentBuildLogsOK) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /v1/components/{component_id}/builds/{build_id}/logs][%d] getComponentBuildLogsOK %s", 200, payload) -} - -func (o *GetComponentBuildLogsOK) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /v1/components/{component_id}/builds/{build_id}/logs][%d] getComponentBuildLogsOK %s", 200, payload) -} - -func (o *GetComponentBuildLogsOK) GetPayload() []interface{} { - return o.Payload -} - -func (o *GetComponentBuildLogsOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - // response payload - if err := consumer.Consume(response.Body(), &o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewGetComponentBuildLogsBadRequest creates a GetComponentBuildLogsBadRequest with default headers values -func NewGetComponentBuildLogsBadRequest() *GetComponentBuildLogsBadRequest { - return &GetComponentBuildLogsBadRequest{} -} - -/* -GetComponentBuildLogsBadRequest describes a response with status code 400, with default header values. - -Bad Request -*/ -type GetComponentBuildLogsBadRequest struct { - Payload *models.StderrErrResponse -} - -// IsSuccess returns true when this get component build logs bad request response has a 2xx status code -func (o *GetComponentBuildLogsBadRequest) IsSuccess() bool { - return false -} - -// IsRedirect returns true when this get component build logs bad request response has a 3xx status code -func (o *GetComponentBuildLogsBadRequest) IsRedirect() bool { - return false -} - -// IsClientError returns true when this get component build logs bad request response has a 4xx status code -func (o *GetComponentBuildLogsBadRequest) IsClientError() bool { - return true -} - -// IsServerError returns true when this get component build logs bad request response has a 5xx status code -func (o *GetComponentBuildLogsBadRequest) IsServerError() bool { - return false -} - -// IsCode returns true when this get component build logs bad request response a status code equal to that given -func (o *GetComponentBuildLogsBadRequest) IsCode(code int) bool { - return code == 400 -} - -// Code gets the status code for the get component build logs bad request response -func (o *GetComponentBuildLogsBadRequest) Code() int { - return 400 -} - -func (o *GetComponentBuildLogsBadRequest) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /v1/components/{component_id}/builds/{build_id}/logs][%d] getComponentBuildLogsBadRequest %s", 400, payload) -} - -func (o *GetComponentBuildLogsBadRequest) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /v1/components/{component_id}/builds/{build_id}/logs][%d] getComponentBuildLogsBadRequest %s", 400, payload) -} - -func (o *GetComponentBuildLogsBadRequest) GetPayload() *models.StderrErrResponse { - return o.Payload -} - -func (o *GetComponentBuildLogsBadRequest) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.StderrErrResponse) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewGetComponentBuildLogsUnauthorized creates a GetComponentBuildLogsUnauthorized with default headers values -func NewGetComponentBuildLogsUnauthorized() *GetComponentBuildLogsUnauthorized { - return &GetComponentBuildLogsUnauthorized{} -} - -/* -GetComponentBuildLogsUnauthorized describes a response with status code 401, with default header values. - -Unauthorized -*/ -type GetComponentBuildLogsUnauthorized struct { - Payload *models.StderrErrResponse -} - -// IsSuccess returns true when this get component build logs unauthorized response has a 2xx status code -func (o *GetComponentBuildLogsUnauthorized) IsSuccess() bool { - return false -} - -// IsRedirect returns true when this get component build logs unauthorized response has a 3xx status code -func (o *GetComponentBuildLogsUnauthorized) IsRedirect() bool { - return false -} - -// IsClientError returns true when this get component build logs unauthorized response has a 4xx status code -func (o *GetComponentBuildLogsUnauthorized) IsClientError() bool { - return true -} - -// IsServerError returns true when this get component build logs unauthorized response has a 5xx status code -func (o *GetComponentBuildLogsUnauthorized) IsServerError() bool { - return false -} - -// IsCode returns true when this get component build logs unauthorized response a status code equal to that given -func (o *GetComponentBuildLogsUnauthorized) IsCode(code int) bool { - return code == 401 -} - -// Code gets the status code for the get component build logs unauthorized response -func (o *GetComponentBuildLogsUnauthorized) Code() int { - return 401 -} - -func (o *GetComponentBuildLogsUnauthorized) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /v1/components/{component_id}/builds/{build_id}/logs][%d] getComponentBuildLogsUnauthorized %s", 401, payload) -} - -func (o *GetComponentBuildLogsUnauthorized) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /v1/components/{component_id}/builds/{build_id}/logs][%d] getComponentBuildLogsUnauthorized %s", 401, payload) -} - -func (o *GetComponentBuildLogsUnauthorized) GetPayload() *models.StderrErrResponse { - return o.Payload -} - -func (o *GetComponentBuildLogsUnauthorized) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.StderrErrResponse) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewGetComponentBuildLogsForbidden creates a GetComponentBuildLogsForbidden with default headers values -func NewGetComponentBuildLogsForbidden() *GetComponentBuildLogsForbidden { - return &GetComponentBuildLogsForbidden{} -} - -/* -GetComponentBuildLogsForbidden describes a response with status code 403, with default header values. - -Forbidden -*/ -type GetComponentBuildLogsForbidden struct { - Payload *models.StderrErrResponse -} - -// IsSuccess returns true when this get component build logs forbidden response has a 2xx status code -func (o *GetComponentBuildLogsForbidden) IsSuccess() bool { - return false -} - -// IsRedirect returns true when this get component build logs forbidden response has a 3xx status code -func (o *GetComponentBuildLogsForbidden) IsRedirect() bool { - return false -} - -// IsClientError returns true when this get component build logs forbidden response has a 4xx status code -func (o *GetComponentBuildLogsForbidden) IsClientError() bool { - return true -} - -// IsServerError returns true when this get component build logs forbidden response has a 5xx status code -func (o *GetComponentBuildLogsForbidden) IsServerError() bool { - return false -} - -// IsCode returns true when this get component build logs forbidden response a status code equal to that given -func (o *GetComponentBuildLogsForbidden) IsCode(code int) bool { - return code == 403 -} - -// Code gets the status code for the get component build logs forbidden response -func (o *GetComponentBuildLogsForbidden) Code() int { - return 403 -} - -func (o *GetComponentBuildLogsForbidden) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /v1/components/{component_id}/builds/{build_id}/logs][%d] getComponentBuildLogsForbidden %s", 403, payload) -} - -func (o *GetComponentBuildLogsForbidden) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /v1/components/{component_id}/builds/{build_id}/logs][%d] getComponentBuildLogsForbidden %s", 403, payload) -} - -func (o *GetComponentBuildLogsForbidden) GetPayload() *models.StderrErrResponse { - return o.Payload -} - -func (o *GetComponentBuildLogsForbidden) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.StderrErrResponse) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewGetComponentBuildLogsNotFound creates a GetComponentBuildLogsNotFound with default headers values -func NewGetComponentBuildLogsNotFound() *GetComponentBuildLogsNotFound { - return &GetComponentBuildLogsNotFound{} -} - -/* -GetComponentBuildLogsNotFound describes a response with status code 404, with default header values. - -Not Found -*/ -type GetComponentBuildLogsNotFound struct { - Payload *models.StderrErrResponse -} - -// IsSuccess returns true when this get component build logs not found response has a 2xx status code -func (o *GetComponentBuildLogsNotFound) IsSuccess() bool { - return false -} - -// IsRedirect returns true when this get component build logs not found response has a 3xx status code -func (o *GetComponentBuildLogsNotFound) IsRedirect() bool { - return false -} - -// IsClientError returns true when this get component build logs not found response has a 4xx status code -func (o *GetComponentBuildLogsNotFound) IsClientError() bool { - return true -} - -// IsServerError returns true when this get component build logs not found response has a 5xx status code -func (o *GetComponentBuildLogsNotFound) IsServerError() bool { - return false -} - -// IsCode returns true when this get component build logs not found response a status code equal to that given -func (o *GetComponentBuildLogsNotFound) IsCode(code int) bool { - return code == 404 -} - -// Code gets the status code for the get component build logs not found response -func (o *GetComponentBuildLogsNotFound) Code() int { - return 404 -} - -func (o *GetComponentBuildLogsNotFound) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /v1/components/{component_id}/builds/{build_id}/logs][%d] getComponentBuildLogsNotFound %s", 404, payload) -} - -func (o *GetComponentBuildLogsNotFound) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /v1/components/{component_id}/builds/{build_id}/logs][%d] getComponentBuildLogsNotFound %s", 404, payload) -} - -func (o *GetComponentBuildLogsNotFound) GetPayload() *models.StderrErrResponse { - return o.Payload -} - -func (o *GetComponentBuildLogsNotFound) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.StderrErrResponse) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewGetComponentBuildLogsInternalServerError creates a GetComponentBuildLogsInternalServerError with default headers values -func NewGetComponentBuildLogsInternalServerError() *GetComponentBuildLogsInternalServerError { - return &GetComponentBuildLogsInternalServerError{} -} - -/* -GetComponentBuildLogsInternalServerError describes a response with status code 500, with default header values. - -Internal Server Error -*/ -type GetComponentBuildLogsInternalServerError struct { - Payload *models.StderrErrResponse -} - -// IsSuccess returns true when this get component build logs internal server error response has a 2xx status code -func (o *GetComponentBuildLogsInternalServerError) IsSuccess() bool { - return false -} - -// IsRedirect returns true when this get component build logs internal server error response has a 3xx status code -func (o *GetComponentBuildLogsInternalServerError) IsRedirect() bool { - return false -} - -// IsClientError returns true when this get component build logs internal server error response has a 4xx status code -func (o *GetComponentBuildLogsInternalServerError) IsClientError() bool { - return false -} - -// IsServerError returns true when this get component build logs internal server error response has a 5xx status code -func (o *GetComponentBuildLogsInternalServerError) IsServerError() bool { - return true -} - -// IsCode returns true when this get component build logs internal server error response a status code equal to that given -func (o *GetComponentBuildLogsInternalServerError) IsCode(code int) bool { - return code == 500 -} - -// Code gets the status code for the get component build logs internal server error response -func (o *GetComponentBuildLogsInternalServerError) Code() int { - return 500 -} - -func (o *GetComponentBuildLogsInternalServerError) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /v1/components/{component_id}/builds/{build_id}/logs][%d] getComponentBuildLogsInternalServerError %s", 500, payload) -} - -func (o *GetComponentBuildLogsInternalServerError) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /v1/components/{component_id}/builds/{build_id}/logs][%d] getComponentBuildLogsInternalServerError %s", 500, payload) -} - -func (o *GetComponentBuildLogsInternalServerError) GetPayload() *models.StderrErrResponse { - return o.Payload -} - -func (o *GetComponentBuildLogsInternalServerError) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.StderrErrResponse) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} diff --git a/client/operations/get_component_build_parameters.go b/client/operations/get_component_build_parameters.go deleted file mode 100644 index 9d5ee3f..0000000 --- a/client/operations/get_component_build_parameters.go +++ /dev/null @@ -1,173 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package operations - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "context" - "net/http" - "time" - - "github.com/go-openapi/errors" - "github.com/go-openapi/runtime" - cr "github.com/go-openapi/runtime/client" - "github.com/go-openapi/strfmt" -) - -// NewGetComponentBuildParams creates a new GetComponentBuildParams object, -// with the default timeout for this client. -// -// Default values are not hydrated, since defaults are normally applied by the API server side. -// -// To enforce default values in parameter, use SetDefaults or WithDefaults. -func NewGetComponentBuildParams() *GetComponentBuildParams { - return &GetComponentBuildParams{ - timeout: cr.DefaultTimeout, - } -} - -// NewGetComponentBuildParamsWithTimeout creates a new GetComponentBuildParams object -// with the ability to set a timeout on a request. -func NewGetComponentBuildParamsWithTimeout(timeout time.Duration) *GetComponentBuildParams { - return &GetComponentBuildParams{ - timeout: timeout, - } -} - -// NewGetComponentBuildParamsWithContext creates a new GetComponentBuildParams object -// with the ability to set a context for a request. -func NewGetComponentBuildParamsWithContext(ctx context.Context) *GetComponentBuildParams { - return &GetComponentBuildParams{ - Context: ctx, - } -} - -// NewGetComponentBuildParamsWithHTTPClient creates a new GetComponentBuildParams object -// with the ability to set a custom HTTPClient for a request. -func NewGetComponentBuildParamsWithHTTPClient(client *http.Client) *GetComponentBuildParams { - return &GetComponentBuildParams{ - HTTPClient: client, - } -} - -/* -GetComponentBuildParams contains all the parameters to send to the API endpoint - - for the get component build operation. - - Typically these are written to a http.Request. -*/ -type GetComponentBuildParams struct { - - /* BuildID. - - build ID - */ - BuildID string - - /* ComponentID. - - component ID - */ - ComponentID string - - timeout time.Duration - Context context.Context - HTTPClient *http.Client -} - -// WithDefaults hydrates default values in the get component build params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *GetComponentBuildParams) WithDefaults() *GetComponentBuildParams { - o.SetDefaults() - return o -} - -// SetDefaults hydrates default values in the get component build params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *GetComponentBuildParams) SetDefaults() { - // no default values defined for this parameter -} - -// WithTimeout adds the timeout to the get component build params -func (o *GetComponentBuildParams) WithTimeout(timeout time.Duration) *GetComponentBuildParams { - o.SetTimeout(timeout) - return o -} - -// SetTimeout adds the timeout to the get component build params -func (o *GetComponentBuildParams) SetTimeout(timeout time.Duration) { - o.timeout = timeout -} - -// WithContext adds the context to the get component build params -func (o *GetComponentBuildParams) WithContext(ctx context.Context) *GetComponentBuildParams { - o.SetContext(ctx) - return o -} - -// SetContext adds the context to the get component build params -func (o *GetComponentBuildParams) SetContext(ctx context.Context) { - o.Context = ctx -} - -// WithHTTPClient adds the HTTPClient to the get component build params -func (o *GetComponentBuildParams) WithHTTPClient(client *http.Client) *GetComponentBuildParams { - o.SetHTTPClient(client) - return o -} - -// SetHTTPClient adds the HTTPClient to the get component build params -func (o *GetComponentBuildParams) SetHTTPClient(client *http.Client) { - o.HTTPClient = client -} - -// WithBuildID adds the buildID to the get component build params -func (o *GetComponentBuildParams) WithBuildID(buildID string) *GetComponentBuildParams { - o.SetBuildID(buildID) - return o -} - -// SetBuildID adds the buildId to the get component build params -func (o *GetComponentBuildParams) SetBuildID(buildID string) { - o.BuildID = buildID -} - -// WithComponentID adds the componentID to the get component build params -func (o *GetComponentBuildParams) WithComponentID(componentID string) *GetComponentBuildParams { - o.SetComponentID(componentID) - return o -} - -// SetComponentID adds the componentId to the get component build params -func (o *GetComponentBuildParams) SetComponentID(componentID string) { - o.ComponentID = componentID -} - -// WriteToRequest writes these params to a swagger request -func (o *GetComponentBuildParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { - - if err := r.SetTimeout(o.timeout); err != nil { - return err - } - var res []error - - // path param build_id - if err := r.SetPathParam("build_id", o.BuildID); err != nil { - return err - } - - // path param component_id - if err := r.SetPathParam("component_id", o.ComponentID); err != nil { - return err - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} diff --git a/client/operations/get_component_build_plan_parameters.go b/client/operations/get_component_build_plan_parameters.go deleted file mode 100644 index 266329a..0000000 --- a/client/operations/get_component_build_plan_parameters.go +++ /dev/null @@ -1,173 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package operations - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "context" - "net/http" - "time" - - "github.com/go-openapi/errors" - "github.com/go-openapi/runtime" - cr "github.com/go-openapi/runtime/client" - "github.com/go-openapi/strfmt" -) - -// NewGetComponentBuildPlanParams creates a new GetComponentBuildPlanParams object, -// with the default timeout for this client. -// -// Default values are not hydrated, since defaults are normally applied by the API server side. -// -// To enforce default values in parameter, use SetDefaults or WithDefaults. -func NewGetComponentBuildPlanParams() *GetComponentBuildPlanParams { - return &GetComponentBuildPlanParams{ - timeout: cr.DefaultTimeout, - } -} - -// NewGetComponentBuildPlanParamsWithTimeout creates a new GetComponentBuildPlanParams object -// with the ability to set a timeout on a request. -func NewGetComponentBuildPlanParamsWithTimeout(timeout time.Duration) *GetComponentBuildPlanParams { - return &GetComponentBuildPlanParams{ - timeout: timeout, - } -} - -// NewGetComponentBuildPlanParamsWithContext creates a new GetComponentBuildPlanParams object -// with the ability to set a context for a request. -func NewGetComponentBuildPlanParamsWithContext(ctx context.Context) *GetComponentBuildPlanParams { - return &GetComponentBuildPlanParams{ - Context: ctx, - } -} - -// NewGetComponentBuildPlanParamsWithHTTPClient creates a new GetComponentBuildPlanParams object -// with the ability to set a custom HTTPClient for a request. -func NewGetComponentBuildPlanParamsWithHTTPClient(client *http.Client) *GetComponentBuildPlanParams { - return &GetComponentBuildPlanParams{ - HTTPClient: client, - } -} - -/* -GetComponentBuildPlanParams contains all the parameters to send to the API endpoint - - for the get component build plan operation. - - Typically these are written to a http.Request. -*/ -type GetComponentBuildPlanParams struct { - - /* BuildID. - - build ID - */ - BuildID string - - /* ComponentID. - - component ID - */ - ComponentID string - - timeout time.Duration - Context context.Context - HTTPClient *http.Client -} - -// WithDefaults hydrates default values in the get component build plan params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *GetComponentBuildPlanParams) WithDefaults() *GetComponentBuildPlanParams { - o.SetDefaults() - return o -} - -// SetDefaults hydrates default values in the get component build plan params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *GetComponentBuildPlanParams) SetDefaults() { - // no default values defined for this parameter -} - -// WithTimeout adds the timeout to the get component build plan params -func (o *GetComponentBuildPlanParams) WithTimeout(timeout time.Duration) *GetComponentBuildPlanParams { - o.SetTimeout(timeout) - return o -} - -// SetTimeout adds the timeout to the get component build plan params -func (o *GetComponentBuildPlanParams) SetTimeout(timeout time.Duration) { - o.timeout = timeout -} - -// WithContext adds the context to the get component build plan params -func (o *GetComponentBuildPlanParams) WithContext(ctx context.Context) *GetComponentBuildPlanParams { - o.SetContext(ctx) - return o -} - -// SetContext adds the context to the get component build plan params -func (o *GetComponentBuildPlanParams) SetContext(ctx context.Context) { - o.Context = ctx -} - -// WithHTTPClient adds the HTTPClient to the get component build plan params -func (o *GetComponentBuildPlanParams) WithHTTPClient(client *http.Client) *GetComponentBuildPlanParams { - o.SetHTTPClient(client) - return o -} - -// SetHTTPClient adds the HTTPClient to the get component build plan params -func (o *GetComponentBuildPlanParams) SetHTTPClient(client *http.Client) { - o.HTTPClient = client -} - -// WithBuildID adds the buildID to the get component build plan params -func (o *GetComponentBuildPlanParams) WithBuildID(buildID string) *GetComponentBuildPlanParams { - o.SetBuildID(buildID) - return o -} - -// SetBuildID adds the buildId to the get component build plan params -func (o *GetComponentBuildPlanParams) SetBuildID(buildID string) { - o.BuildID = buildID -} - -// WithComponentID adds the componentID to the get component build plan params -func (o *GetComponentBuildPlanParams) WithComponentID(componentID string) *GetComponentBuildPlanParams { - o.SetComponentID(componentID) - return o -} - -// SetComponentID adds the componentId to the get component build plan params -func (o *GetComponentBuildPlanParams) SetComponentID(componentID string) { - o.ComponentID = componentID -} - -// WriteToRequest writes these params to a swagger request -func (o *GetComponentBuildPlanParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { - - if err := r.SetTimeout(o.timeout); err != nil { - return err - } - var res []error - - // path param build_id - if err := r.SetPathParam("build_id", o.BuildID); err != nil { - return err - } - - // path param component_id - if err := r.SetPathParam("component_id", o.ComponentID); err != nil { - return err - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} diff --git a/client/operations/get_component_build_plan_responses.go b/client/operations/get_component_build_plan_responses.go deleted file mode 100644 index 4133236..0000000 --- a/client/operations/get_component_build_plan_responses.go +++ /dev/null @@ -1,486 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package operations - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "encoding/json" - "fmt" - "io" - - "github.com/go-openapi/runtime" - "github.com/go-openapi/strfmt" - - "github.com/nuonco/nuon-go/models" -) - -// GetComponentBuildPlanReader is a Reader for the GetComponentBuildPlan structure. -type GetComponentBuildPlanReader struct { - formats strfmt.Registry -} - -// ReadResponse reads a server response into the received o. -func (o *GetComponentBuildPlanReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { - switch response.Code() { - case 200: - result := NewGetComponentBuildPlanOK() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return result, nil - case 400: - result := NewGetComponentBuildPlanBadRequest() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return nil, result - case 401: - result := NewGetComponentBuildPlanUnauthorized() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return nil, result - case 403: - result := NewGetComponentBuildPlanForbidden() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return nil, result - case 404: - result := NewGetComponentBuildPlanNotFound() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return nil, result - case 500: - result := NewGetComponentBuildPlanInternalServerError() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return nil, result - default: - return nil, runtime.NewAPIError("[GET /v1/components/{component_id}/builds/{build_id}/plan] GetComponentBuildPlan", response, response.Code()) - } -} - -// NewGetComponentBuildPlanOK creates a GetComponentBuildPlanOK with default headers values -func NewGetComponentBuildPlanOK() *GetComponentBuildPlanOK { - return &GetComponentBuildPlanOK{} -} - -/* -GetComponentBuildPlanOK describes a response with status code 200, with default header values. - -OK -*/ -type GetComponentBuildPlanOK struct { - Payload *models.Planv1Plan -} - -// IsSuccess returns true when this get component build plan o k response has a 2xx status code -func (o *GetComponentBuildPlanOK) IsSuccess() bool { - return true -} - -// IsRedirect returns true when this get component build plan o k response has a 3xx status code -func (o *GetComponentBuildPlanOK) IsRedirect() bool { - return false -} - -// IsClientError returns true when this get component build plan o k response has a 4xx status code -func (o *GetComponentBuildPlanOK) IsClientError() bool { - return false -} - -// IsServerError returns true when this get component build plan o k response has a 5xx status code -func (o *GetComponentBuildPlanOK) IsServerError() bool { - return false -} - -// IsCode returns true when this get component build plan o k response a status code equal to that given -func (o *GetComponentBuildPlanOK) IsCode(code int) bool { - return code == 200 -} - -// Code gets the status code for the get component build plan o k response -func (o *GetComponentBuildPlanOK) Code() int { - return 200 -} - -func (o *GetComponentBuildPlanOK) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /v1/components/{component_id}/builds/{build_id}/plan][%d] getComponentBuildPlanOK %s", 200, payload) -} - -func (o *GetComponentBuildPlanOK) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /v1/components/{component_id}/builds/{build_id}/plan][%d] getComponentBuildPlanOK %s", 200, payload) -} - -func (o *GetComponentBuildPlanOK) GetPayload() *models.Planv1Plan { - return o.Payload -} - -func (o *GetComponentBuildPlanOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.Planv1Plan) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewGetComponentBuildPlanBadRequest creates a GetComponentBuildPlanBadRequest with default headers values -func NewGetComponentBuildPlanBadRequest() *GetComponentBuildPlanBadRequest { - return &GetComponentBuildPlanBadRequest{} -} - -/* -GetComponentBuildPlanBadRequest describes a response with status code 400, with default header values. - -Bad Request -*/ -type GetComponentBuildPlanBadRequest struct { - Payload *models.StderrErrResponse -} - -// IsSuccess returns true when this get component build plan bad request response has a 2xx status code -func (o *GetComponentBuildPlanBadRequest) IsSuccess() bool { - return false -} - -// IsRedirect returns true when this get component build plan bad request response has a 3xx status code -func (o *GetComponentBuildPlanBadRequest) IsRedirect() bool { - return false -} - -// IsClientError returns true when this get component build plan bad request response has a 4xx status code -func (o *GetComponentBuildPlanBadRequest) IsClientError() bool { - return true -} - -// IsServerError returns true when this get component build plan bad request response has a 5xx status code -func (o *GetComponentBuildPlanBadRequest) IsServerError() bool { - return false -} - -// IsCode returns true when this get component build plan bad request response a status code equal to that given -func (o *GetComponentBuildPlanBadRequest) IsCode(code int) bool { - return code == 400 -} - -// Code gets the status code for the get component build plan bad request response -func (o *GetComponentBuildPlanBadRequest) Code() int { - return 400 -} - -func (o *GetComponentBuildPlanBadRequest) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /v1/components/{component_id}/builds/{build_id}/plan][%d] getComponentBuildPlanBadRequest %s", 400, payload) -} - -func (o *GetComponentBuildPlanBadRequest) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /v1/components/{component_id}/builds/{build_id}/plan][%d] getComponentBuildPlanBadRequest %s", 400, payload) -} - -func (o *GetComponentBuildPlanBadRequest) GetPayload() *models.StderrErrResponse { - return o.Payload -} - -func (o *GetComponentBuildPlanBadRequest) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.StderrErrResponse) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewGetComponentBuildPlanUnauthorized creates a GetComponentBuildPlanUnauthorized with default headers values -func NewGetComponentBuildPlanUnauthorized() *GetComponentBuildPlanUnauthorized { - return &GetComponentBuildPlanUnauthorized{} -} - -/* -GetComponentBuildPlanUnauthorized describes a response with status code 401, with default header values. - -Unauthorized -*/ -type GetComponentBuildPlanUnauthorized struct { - Payload *models.StderrErrResponse -} - -// IsSuccess returns true when this get component build plan unauthorized response has a 2xx status code -func (o *GetComponentBuildPlanUnauthorized) IsSuccess() bool { - return false -} - -// IsRedirect returns true when this get component build plan unauthorized response has a 3xx status code -func (o *GetComponentBuildPlanUnauthorized) IsRedirect() bool { - return false -} - -// IsClientError returns true when this get component build plan unauthorized response has a 4xx status code -func (o *GetComponentBuildPlanUnauthorized) IsClientError() bool { - return true -} - -// IsServerError returns true when this get component build plan unauthorized response has a 5xx status code -func (o *GetComponentBuildPlanUnauthorized) IsServerError() bool { - return false -} - -// IsCode returns true when this get component build plan unauthorized response a status code equal to that given -func (o *GetComponentBuildPlanUnauthorized) IsCode(code int) bool { - return code == 401 -} - -// Code gets the status code for the get component build plan unauthorized response -func (o *GetComponentBuildPlanUnauthorized) Code() int { - return 401 -} - -func (o *GetComponentBuildPlanUnauthorized) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /v1/components/{component_id}/builds/{build_id}/plan][%d] getComponentBuildPlanUnauthorized %s", 401, payload) -} - -func (o *GetComponentBuildPlanUnauthorized) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /v1/components/{component_id}/builds/{build_id}/plan][%d] getComponentBuildPlanUnauthorized %s", 401, payload) -} - -func (o *GetComponentBuildPlanUnauthorized) GetPayload() *models.StderrErrResponse { - return o.Payload -} - -func (o *GetComponentBuildPlanUnauthorized) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.StderrErrResponse) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewGetComponentBuildPlanForbidden creates a GetComponentBuildPlanForbidden with default headers values -func NewGetComponentBuildPlanForbidden() *GetComponentBuildPlanForbidden { - return &GetComponentBuildPlanForbidden{} -} - -/* -GetComponentBuildPlanForbidden describes a response with status code 403, with default header values. - -Forbidden -*/ -type GetComponentBuildPlanForbidden struct { - Payload *models.StderrErrResponse -} - -// IsSuccess returns true when this get component build plan forbidden response has a 2xx status code -func (o *GetComponentBuildPlanForbidden) IsSuccess() bool { - return false -} - -// IsRedirect returns true when this get component build plan forbidden response has a 3xx status code -func (o *GetComponentBuildPlanForbidden) IsRedirect() bool { - return false -} - -// IsClientError returns true when this get component build plan forbidden response has a 4xx status code -func (o *GetComponentBuildPlanForbidden) IsClientError() bool { - return true -} - -// IsServerError returns true when this get component build plan forbidden response has a 5xx status code -func (o *GetComponentBuildPlanForbidden) IsServerError() bool { - return false -} - -// IsCode returns true when this get component build plan forbidden response a status code equal to that given -func (o *GetComponentBuildPlanForbidden) IsCode(code int) bool { - return code == 403 -} - -// Code gets the status code for the get component build plan forbidden response -func (o *GetComponentBuildPlanForbidden) Code() int { - return 403 -} - -func (o *GetComponentBuildPlanForbidden) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /v1/components/{component_id}/builds/{build_id}/plan][%d] getComponentBuildPlanForbidden %s", 403, payload) -} - -func (o *GetComponentBuildPlanForbidden) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /v1/components/{component_id}/builds/{build_id}/plan][%d] getComponentBuildPlanForbidden %s", 403, payload) -} - -func (o *GetComponentBuildPlanForbidden) GetPayload() *models.StderrErrResponse { - return o.Payload -} - -func (o *GetComponentBuildPlanForbidden) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.StderrErrResponse) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewGetComponentBuildPlanNotFound creates a GetComponentBuildPlanNotFound with default headers values -func NewGetComponentBuildPlanNotFound() *GetComponentBuildPlanNotFound { - return &GetComponentBuildPlanNotFound{} -} - -/* -GetComponentBuildPlanNotFound describes a response with status code 404, with default header values. - -Not Found -*/ -type GetComponentBuildPlanNotFound struct { - Payload *models.StderrErrResponse -} - -// IsSuccess returns true when this get component build plan not found response has a 2xx status code -func (o *GetComponentBuildPlanNotFound) IsSuccess() bool { - return false -} - -// IsRedirect returns true when this get component build plan not found response has a 3xx status code -func (o *GetComponentBuildPlanNotFound) IsRedirect() bool { - return false -} - -// IsClientError returns true when this get component build plan not found response has a 4xx status code -func (o *GetComponentBuildPlanNotFound) IsClientError() bool { - return true -} - -// IsServerError returns true when this get component build plan not found response has a 5xx status code -func (o *GetComponentBuildPlanNotFound) IsServerError() bool { - return false -} - -// IsCode returns true when this get component build plan not found response a status code equal to that given -func (o *GetComponentBuildPlanNotFound) IsCode(code int) bool { - return code == 404 -} - -// Code gets the status code for the get component build plan not found response -func (o *GetComponentBuildPlanNotFound) Code() int { - return 404 -} - -func (o *GetComponentBuildPlanNotFound) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /v1/components/{component_id}/builds/{build_id}/plan][%d] getComponentBuildPlanNotFound %s", 404, payload) -} - -func (o *GetComponentBuildPlanNotFound) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /v1/components/{component_id}/builds/{build_id}/plan][%d] getComponentBuildPlanNotFound %s", 404, payload) -} - -func (o *GetComponentBuildPlanNotFound) GetPayload() *models.StderrErrResponse { - return o.Payload -} - -func (o *GetComponentBuildPlanNotFound) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.StderrErrResponse) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewGetComponentBuildPlanInternalServerError creates a GetComponentBuildPlanInternalServerError with default headers values -func NewGetComponentBuildPlanInternalServerError() *GetComponentBuildPlanInternalServerError { - return &GetComponentBuildPlanInternalServerError{} -} - -/* -GetComponentBuildPlanInternalServerError describes a response with status code 500, with default header values. - -Internal Server Error -*/ -type GetComponentBuildPlanInternalServerError struct { - Payload *models.StderrErrResponse -} - -// IsSuccess returns true when this get component build plan internal server error response has a 2xx status code -func (o *GetComponentBuildPlanInternalServerError) IsSuccess() bool { - return false -} - -// IsRedirect returns true when this get component build plan internal server error response has a 3xx status code -func (o *GetComponentBuildPlanInternalServerError) IsRedirect() bool { - return false -} - -// IsClientError returns true when this get component build plan internal server error response has a 4xx status code -func (o *GetComponentBuildPlanInternalServerError) IsClientError() bool { - return false -} - -// IsServerError returns true when this get component build plan internal server error response has a 5xx status code -func (o *GetComponentBuildPlanInternalServerError) IsServerError() bool { - return true -} - -// IsCode returns true when this get component build plan internal server error response a status code equal to that given -func (o *GetComponentBuildPlanInternalServerError) IsCode(code int) bool { - return code == 500 -} - -// Code gets the status code for the get component build plan internal server error response -func (o *GetComponentBuildPlanInternalServerError) Code() int { - return 500 -} - -func (o *GetComponentBuildPlanInternalServerError) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /v1/components/{component_id}/builds/{build_id}/plan][%d] getComponentBuildPlanInternalServerError %s", 500, payload) -} - -func (o *GetComponentBuildPlanInternalServerError) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /v1/components/{component_id}/builds/{build_id}/plan][%d] getComponentBuildPlanInternalServerError %s", 500, payload) -} - -func (o *GetComponentBuildPlanInternalServerError) GetPayload() *models.StderrErrResponse { - return o.Payload -} - -func (o *GetComponentBuildPlanInternalServerError) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.StderrErrResponse) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} diff --git a/client/operations/get_component_build_responses.go b/client/operations/get_component_build_responses.go deleted file mode 100644 index 293260c..0000000 --- a/client/operations/get_component_build_responses.go +++ /dev/null @@ -1,486 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package operations - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "encoding/json" - "fmt" - "io" - - "github.com/go-openapi/runtime" - "github.com/go-openapi/strfmt" - - "github.com/nuonco/nuon-go/models" -) - -// GetComponentBuildReader is a Reader for the GetComponentBuild structure. -type GetComponentBuildReader struct { - formats strfmt.Registry -} - -// ReadResponse reads a server response into the received o. -func (o *GetComponentBuildReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { - switch response.Code() { - case 200: - result := NewGetComponentBuildOK() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return result, nil - case 400: - result := NewGetComponentBuildBadRequest() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return nil, result - case 401: - result := NewGetComponentBuildUnauthorized() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return nil, result - case 403: - result := NewGetComponentBuildForbidden() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return nil, result - case 404: - result := NewGetComponentBuildNotFound() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return nil, result - case 500: - result := NewGetComponentBuildInternalServerError() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return nil, result - default: - return nil, runtime.NewAPIError("[GET /v1/components/{component_id}/builds/{build_id}] GetComponentBuild", response, response.Code()) - } -} - -// NewGetComponentBuildOK creates a GetComponentBuildOK with default headers values -func NewGetComponentBuildOK() *GetComponentBuildOK { - return &GetComponentBuildOK{} -} - -/* -GetComponentBuildOK describes a response with status code 200, with default header values. - -OK -*/ -type GetComponentBuildOK struct { - Payload *models.AppComponentBuild -} - -// IsSuccess returns true when this get component build o k response has a 2xx status code -func (o *GetComponentBuildOK) IsSuccess() bool { - return true -} - -// IsRedirect returns true when this get component build o k response has a 3xx status code -func (o *GetComponentBuildOK) IsRedirect() bool { - return false -} - -// IsClientError returns true when this get component build o k response has a 4xx status code -func (o *GetComponentBuildOK) IsClientError() bool { - return false -} - -// IsServerError returns true when this get component build o k response has a 5xx status code -func (o *GetComponentBuildOK) IsServerError() bool { - return false -} - -// IsCode returns true when this get component build o k response a status code equal to that given -func (o *GetComponentBuildOK) IsCode(code int) bool { - return code == 200 -} - -// Code gets the status code for the get component build o k response -func (o *GetComponentBuildOK) Code() int { - return 200 -} - -func (o *GetComponentBuildOK) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /v1/components/{component_id}/builds/{build_id}][%d] getComponentBuildOK %s", 200, payload) -} - -func (o *GetComponentBuildOK) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /v1/components/{component_id}/builds/{build_id}][%d] getComponentBuildOK %s", 200, payload) -} - -func (o *GetComponentBuildOK) GetPayload() *models.AppComponentBuild { - return o.Payload -} - -func (o *GetComponentBuildOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.AppComponentBuild) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewGetComponentBuildBadRequest creates a GetComponentBuildBadRequest with default headers values -func NewGetComponentBuildBadRequest() *GetComponentBuildBadRequest { - return &GetComponentBuildBadRequest{} -} - -/* -GetComponentBuildBadRequest describes a response with status code 400, with default header values. - -Bad Request -*/ -type GetComponentBuildBadRequest struct { - Payload *models.StderrErrResponse -} - -// IsSuccess returns true when this get component build bad request response has a 2xx status code -func (o *GetComponentBuildBadRequest) IsSuccess() bool { - return false -} - -// IsRedirect returns true when this get component build bad request response has a 3xx status code -func (o *GetComponentBuildBadRequest) IsRedirect() bool { - return false -} - -// IsClientError returns true when this get component build bad request response has a 4xx status code -func (o *GetComponentBuildBadRequest) IsClientError() bool { - return true -} - -// IsServerError returns true when this get component build bad request response has a 5xx status code -func (o *GetComponentBuildBadRequest) IsServerError() bool { - return false -} - -// IsCode returns true when this get component build bad request response a status code equal to that given -func (o *GetComponentBuildBadRequest) IsCode(code int) bool { - return code == 400 -} - -// Code gets the status code for the get component build bad request response -func (o *GetComponentBuildBadRequest) Code() int { - return 400 -} - -func (o *GetComponentBuildBadRequest) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /v1/components/{component_id}/builds/{build_id}][%d] getComponentBuildBadRequest %s", 400, payload) -} - -func (o *GetComponentBuildBadRequest) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /v1/components/{component_id}/builds/{build_id}][%d] getComponentBuildBadRequest %s", 400, payload) -} - -func (o *GetComponentBuildBadRequest) GetPayload() *models.StderrErrResponse { - return o.Payload -} - -func (o *GetComponentBuildBadRequest) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.StderrErrResponse) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewGetComponentBuildUnauthorized creates a GetComponentBuildUnauthorized with default headers values -func NewGetComponentBuildUnauthorized() *GetComponentBuildUnauthorized { - return &GetComponentBuildUnauthorized{} -} - -/* -GetComponentBuildUnauthorized describes a response with status code 401, with default header values. - -Unauthorized -*/ -type GetComponentBuildUnauthorized struct { - Payload *models.StderrErrResponse -} - -// IsSuccess returns true when this get component build unauthorized response has a 2xx status code -func (o *GetComponentBuildUnauthorized) IsSuccess() bool { - return false -} - -// IsRedirect returns true when this get component build unauthorized response has a 3xx status code -func (o *GetComponentBuildUnauthorized) IsRedirect() bool { - return false -} - -// IsClientError returns true when this get component build unauthorized response has a 4xx status code -func (o *GetComponentBuildUnauthorized) IsClientError() bool { - return true -} - -// IsServerError returns true when this get component build unauthorized response has a 5xx status code -func (o *GetComponentBuildUnauthorized) IsServerError() bool { - return false -} - -// IsCode returns true when this get component build unauthorized response a status code equal to that given -func (o *GetComponentBuildUnauthorized) IsCode(code int) bool { - return code == 401 -} - -// Code gets the status code for the get component build unauthorized response -func (o *GetComponentBuildUnauthorized) Code() int { - return 401 -} - -func (o *GetComponentBuildUnauthorized) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /v1/components/{component_id}/builds/{build_id}][%d] getComponentBuildUnauthorized %s", 401, payload) -} - -func (o *GetComponentBuildUnauthorized) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /v1/components/{component_id}/builds/{build_id}][%d] getComponentBuildUnauthorized %s", 401, payload) -} - -func (o *GetComponentBuildUnauthorized) GetPayload() *models.StderrErrResponse { - return o.Payload -} - -func (o *GetComponentBuildUnauthorized) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.StderrErrResponse) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewGetComponentBuildForbidden creates a GetComponentBuildForbidden with default headers values -func NewGetComponentBuildForbidden() *GetComponentBuildForbidden { - return &GetComponentBuildForbidden{} -} - -/* -GetComponentBuildForbidden describes a response with status code 403, with default header values. - -Forbidden -*/ -type GetComponentBuildForbidden struct { - Payload *models.StderrErrResponse -} - -// IsSuccess returns true when this get component build forbidden response has a 2xx status code -func (o *GetComponentBuildForbidden) IsSuccess() bool { - return false -} - -// IsRedirect returns true when this get component build forbidden response has a 3xx status code -func (o *GetComponentBuildForbidden) IsRedirect() bool { - return false -} - -// IsClientError returns true when this get component build forbidden response has a 4xx status code -func (o *GetComponentBuildForbidden) IsClientError() bool { - return true -} - -// IsServerError returns true when this get component build forbidden response has a 5xx status code -func (o *GetComponentBuildForbidden) IsServerError() bool { - return false -} - -// IsCode returns true when this get component build forbidden response a status code equal to that given -func (o *GetComponentBuildForbidden) IsCode(code int) bool { - return code == 403 -} - -// Code gets the status code for the get component build forbidden response -func (o *GetComponentBuildForbidden) Code() int { - return 403 -} - -func (o *GetComponentBuildForbidden) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /v1/components/{component_id}/builds/{build_id}][%d] getComponentBuildForbidden %s", 403, payload) -} - -func (o *GetComponentBuildForbidden) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /v1/components/{component_id}/builds/{build_id}][%d] getComponentBuildForbidden %s", 403, payload) -} - -func (o *GetComponentBuildForbidden) GetPayload() *models.StderrErrResponse { - return o.Payload -} - -func (o *GetComponentBuildForbidden) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.StderrErrResponse) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewGetComponentBuildNotFound creates a GetComponentBuildNotFound with default headers values -func NewGetComponentBuildNotFound() *GetComponentBuildNotFound { - return &GetComponentBuildNotFound{} -} - -/* -GetComponentBuildNotFound describes a response with status code 404, with default header values. - -Not Found -*/ -type GetComponentBuildNotFound struct { - Payload *models.StderrErrResponse -} - -// IsSuccess returns true when this get component build not found response has a 2xx status code -func (o *GetComponentBuildNotFound) IsSuccess() bool { - return false -} - -// IsRedirect returns true when this get component build not found response has a 3xx status code -func (o *GetComponentBuildNotFound) IsRedirect() bool { - return false -} - -// IsClientError returns true when this get component build not found response has a 4xx status code -func (o *GetComponentBuildNotFound) IsClientError() bool { - return true -} - -// IsServerError returns true when this get component build not found response has a 5xx status code -func (o *GetComponentBuildNotFound) IsServerError() bool { - return false -} - -// IsCode returns true when this get component build not found response a status code equal to that given -func (o *GetComponentBuildNotFound) IsCode(code int) bool { - return code == 404 -} - -// Code gets the status code for the get component build not found response -func (o *GetComponentBuildNotFound) Code() int { - return 404 -} - -func (o *GetComponentBuildNotFound) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /v1/components/{component_id}/builds/{build_id}][%d] getComponentBuildNotFound %s", 404, payload) -} - -func (o *GetComponentBuildNotFound) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /v1/components/{component_id}/builds/{build_id}][%d] getComponentBuildNotFound %s", 404, payload) -} - -func (o *GetComponentBuildNotFound) GetPayload() *models.StderrErrResponse { - return o.Payload -} - -func (o *GetComponentBuildNotFound) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.StderrErrResponse) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewGetComponentBuildInternalServerError creates a GetComponentBuildInternalServerError with default headers values -func NewGetComponentBuildInternalServerError() *GetComponentBuildInternalServerError { - return &GetComponentBuildInternalServerError{} -} - -/* -GetComponentBuildInternalServerError describes a response with status code 500, with default header values. - -Internal Server Error -*/ -type GetComponentBuildInternalServerError struct { - Payload *models.StderrErrResponse -} - -// IsSuccess returns true when this get component build internal server error response has a 2xx status code -func (o *GetComponentBuildInternalServerError) IsSuccess() bool { - return false -} - -// IsRedirect returns true when this get component build internal server error response has a 3xx status code -func (o *GetComponentBuildInternalServerError) IsRedirect() bool { - return false -} - -// IsClientError returns true when this get component build internal server error response has a 4xx status code -func (o *GetComponentBuildInternalServerError) IsClientError() bool { - return false -} - -// IsServerError returns true when this get component build internal server error response has a 5xx status code -func (o *GetComponentBuildInternalServerError) IsServerError() bool { - return true -} - -// IsCode returns true when this get component build internal server error response a status code equal to that given -func (o *GetComponentBuildInternalServerError) IsCode(code int) bool { - return code == 500 -} - -// Code gets the status code for the get component build internal server error response -func (o *GetComponentBuildInternalServerError) Code() int { - return 500 -} - -func (o *GetComponentBuildInternalServerError) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /v1/components/{component_id}/builds/{build_id}][%d] getComponentBuildInternalServerError %s", 500, payload) -} - -func (o *GetComponentBuildInternalServerError) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /v1/components/{component_id}/builds/{build_id}][%d] getComponentBuildInternalServerError %s", 500, payload) -} - -func (o *GetComponentBuildInternalServerError) GetPayload() *models.StderrErrResponse { - return o.Payload -} - -func (o *GetComponentBuildInternalServerError) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.StderrErrResponse) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} diff --git a/client/operations/get_component_builds_parameters.go b/client/operations/get_component_builds_parameters.go deleted file mode 100644 index e016057..0000000 --- a/client/operations/get_component_builds_parameters.go +++ /dev/null @@ -1,245 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package operations - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "context" - "net/http" - "time" - - "github.com/go-openapi/errors" - "github.com/go-openapi/runtime" - cr "github.com/go-openapi/runtime/client" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" -) - -// NewGetComponentBuildsParams creates a new GetComponentBuildsParams object, -// with the default timeout for this client. -// -// Default values are not hydrated, since defaults are normally applied by the API server side. -// -// To enforce default values in parameter, use SetDefaults or WithDefaults. -func NewGetComponentBuildsParams() *GetComponentBuildsParams { - return &GetComponentBuildsParams{ - timeout: cr.DefaultTimeout, - } -} - -// NewGetComponentBuildsParamsWithTimeout creates a new GetComponentBuildsParams object -// with the ability to set a timeout on a request. -func NewGetComponentBuildsParamsWithTimeout(timeout time.Duration) *GetComponentBuildsParams { - return &GetComponentBuildsParams{ - timeout: timeout, - } -} - -// NewGetComponentBuildsParamsWithContext creates a new GetComponentBuildsParams object -// with the ability to set a context for a request. -func NewGetComponentBuildsParamsWithContext(ctx context.Context) *GetComponentBuildsParams { - return &GetComponentBuildsParams{ - Context: ctx, - } -} - -// NewGetComponentBuildsParamsWithHTTPClient creates a new GetComponentBuildsParams object -// with the ability to set a custom HTTPClient for a request. -func NewGetComponentBuildsParamsWithHTTPClient(client *http.Client) *GetComponentBuildsParams { - return &GetComponentBuildsParams{ - HTTPClient: client, - } -} - -/* -GetComponentBuildsParams contains all the parameters to send to the API endpoint - - for the get component builds operation. - - Typically these are written to a http.Request. -*/ -type GetComponentBuildsParams struct { - - /* AppID. - - app id to filter by - */ - AppID *string - - /* ComponentID. - - component id to filter by - */ - ComponentID *string - - /* Limit. - - limit of builds to return - - Default: 60 - */ - Limit *int64 - - timeout time.Duration - Context context.Context - HTTPClient *http.Client -} - -// WithDefaults hydrates default values in the get component builds params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *GetComponentBuildsParams) WithDefaults() *GetComponentBuildsParams { - o.SetDefaults() - return o -} - -// SetDefaults hydrates default values in the get component builds params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *GetComponentBuildsParams) SetDefaults() { - var ( - limitDefault = int64(60) - ) - - val := GetComponentBuildsParams{ - Limit: &limitDefault, - } - - val.timeout = o.timeout - val.Context = o.Context - val.HTTPClient = o.HTTPClient - *o = val -} - -// WithTimeout adds the timeout to the get component builds params -func (o *GetComponentBuildsParams) WithTimeout(timeout time.Duration) *GetComponentBuildsParams { - o.SetTimeout(timeout) - return o -} - -// SetTimeout adds the timeout to the get component builds params -func (o *GetComponentBuildsParams) SetTimeout(timeout time.Duration) { - o.timeout = timeout -} - -// WithContext adds the context to the get component builds params -func (o *GetComponentBuildsParams) WithContext(ctx context.Context) *GetComponentBuildsParams { - o.SetContext(ctx) - return o -} - -// SetContext adds the context to the get component builds params -func (o *GetComponentBuildsParams) SetContext(ctx context.Context) { - o.Context = ctx -} - -// WithHTTPClient adds the HTTPClient to the get component builds params -func (o *GetComponentBuildsParams) WithHTTPClient(client *http.Client) *GetComponentBuildsParams { - o.SetHTTPClient(client) - return o -} - -// SetHTTPClient adds the HTTPClient to the get component builds params -func (o *GetComponentBuildsParams) SetHTTPClient(client *http.Client) { - o.HTTPClient = client -} - -// WithAppID adds the appID to the get component builds params -func (o *GetComponentBuildsParams) WithAppID(appID *string) *GetComponentBuildsParams { - o.SetAppID(appID) - return o -} - -// SetAppID adds the appId to the get component builds params -func (o *GetComponentBuildsParams) SetAppID(appID *string) { - o.AppID = appID -} - -// WithComponentID adds the componentID to the get component builds params -func (o *GetComponentBuildsParams) WithComponentID(componentID *string) *GetComponentBuildsParams { - o.SetComponentID(componentID) - return o -} - -// SetComponentID adds the componentId to the get component builds params -func (o *GetComponentBuildsParams) SetComponentID(componentID *string) { - o.ComponentID = componentID -} - -// WithLimit adds the limit to the get component builds params -func (o *GetComponentBuildsParams) WithLimit(limit *int64) *GetComponentBuildsParams { - o.SetLimit(limit) - return o -} - -// SetLimit adds the limit to the get component builds params -func (o *GetComponentBuildsParams) SetLimit(limit *int64) { - o.Limit = limit -} - -// WriteToRequest writes these params to a swagger request -func (o *GetComponentBuildsParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { - - if err := r.SetTimeout(o.timeout); err != nil { - return err - } - var res []error - - if o.AppID != nil { - - // query param app_id - var qrAppID string - - if o.AppID != nil { - qrAppID = *o.AppID - } - qAppID := qrAppID - if qAppID != "" { - - if err := r.SetQueryParam("app_id", qAppID); err != nil { - return err - } - } - } - - if o.ComponentID != nil { - - // query param component_id - var qrComponentID string - - if o.ComponentID != nil { - qrComponentID = *o.ComponentID - } - qComponentID := qrComponentID - if qComponentID != "" { - - if err := r.SetQueryParam("component_id", qComponentID); err != nil { - return err - } - } - } - - if o.Limit != nil { - - // query param limit - var qrLimit int64 - - if o.Limit != nil { - qrLimit = *o.Limit - } - qLimit := swag.FormatInt64(qrLimit) - if qLimit != "" { - - if err := r.SetQueryParam("limit", qLimit); err != nil { - return err - } - } - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} diff --git a/client/operations/get_component_builds_responses.go b/client/operations/get_component_builds_responses.go deleted file mode 100644 index 6b4cef2..0000000 --- a/client/operations/get_component_builds_responses.go +++ /dev/null @@ -1,484 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package operations - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "encoding/json" - "fmt" - "io" - - "github.com/go-openapi/runtime" - "github.com/go-openapi/strfmt" - - "github.com/nuonco/nuon-go/models" -) - -// GetComponentBuildsReader is a Reader for the GetComponentBuilds structure. -type GetComponentBuildsReader struct { - formats strfmt.Registry -} - -// ReadResponse reads a server response into the received o. -func (o *GetComponentBuildsReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { - switch response.Code() { - case 200: - result := NewGetComponentBuildsOK() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return result, nil - case 400: - result := NewGetComponentBuildsBadRequest() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return nil, result - case 401: - result := NewGetComponentBuildsUnauthorized() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return nil, result - case 403: - result := NewGetComponentBuildsForbidden() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return nil, result - case 404: - result := NewGetComponentBuildsNotFound() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return nil, result - case 500: - result := NewGetComponentBuildsInternalServerError() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return nil, result - default: - return nil, runtime.NewAPIError("[GET /v1/builds] GetComponentBuilds", response, response.Code()) - } -} - -// NewGetComponentBuildsOK creates a GetComponentBuildsOK with default headers values -func NewGetComponentBuildsOK() *GetComponentBuildsOK { - return &GetComponentBuildsOK{} -} - -/* -GetComponentBuildsOK describes a response with status code 200, with default header values. - -OK -*/ -type GetComponentBuildsOK struct { - Payload []*models.AppComponentBuild -} - -// IsSuccess returns true when this get component builds o k response has a 2xx status code -func (o *GetComponentBuildsOK) IsSuccess() bool { - return true -} - -// IsRedirect returns true when this get component builds o k response has a 3xx status code -func (o *GetComponentBuildsOK) IsRedirect() bool { - return false -} - -// IsClientError returns true when this get component builds o k response has a 4xx status code -func (o *GetComponentBuildsOK) IsClientError() bool { - return false -} - -// IsServerError returns true when this get component builds o k response has a 5xx status code -func (o *GetComponentBuildsOK) IsServerError() bool { - return false -} - -// IsCode returns true when this get component builds o k response a status code equal to that given -func (o *GetComponentBuildsOK) IsCode(code int) bool { - return code == 200 -} - -// Code gets the status code for the get component builds o k response -func (o *GetComponentBuildsOK) Code() int { - return 200 -} - -func (o *GetComponentBuildsOK) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /v1/builds][%d] getComponentBuildsOK %s", 200, payload) -} - -func (o *GetComponentBuildsOK) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /v1/builds][%d] getComponentBuildsOK %s", 200, payload) -} - -func (o *GetComponentBuildsOK) GetPayload() []*models.AppComponentBuild { - return o.Payload -} - -func (o *GetComponentBuildsOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - // response payload - if err := consumer.Consume(response.Body(), &o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewGetComponentBuildsBadRequest creates a GetComponentBuildsBadRequest with default headers values -func NewGetComponentBuildsBadRequest() *GetComponentBuildsBadRequest { - return &GetComponentBuildsBadRequest{} -} - -/* -GetComponentBuildsBadRequest describes a response with status code 400, with default header values. - -Bad Request -*/ -type GetComponentBuildsBadRequest struct { - Payload *models.StderrErrResponse -} - -// IsSuccess returns true when this get component builds bad request response has a 2xx status code -func (o *GetComponentBuildsBadRequest) IsSuccess() bool { - return false -} - -// IsRedirect returns true when this get component builds bad request response has a 3xx status code -func (o *GetComponentBuildsBadRequest) IsRedirect() bool { - return false -} - -// IsClientError returns true when this get component builds bad request response has a 4xx status code -func (o *GetComponentBuildsBadRequest) IsClientError() bool { - return true -} - -// IsServerError returns true when this get component builds bad request response has a 5xx status code -func (o *GetComponentBuildsBadRequest) IsServerError() bool { - return false -} - -// IsCode returns true when this get component builds bad request response a status code equal to that given -func (o *GetComponentBuildsBadRequest) IsCode(code int) bool { - return code == 400 -} - -// Code gets the status code for the get component builds bad request response -func (o *GetComponentBuildsBadRequest) Code() int { - return 400 -} - -func (o *GetComponentBuildsBadRequest) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /v1/builds][%d] getComponentBuildsBadRequest %s", 400, payload) -} - -func (o *GetComponentBuildsBadRequest) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /v1/builds][%d] getComponentBuildsBadRequest %s", 400, payload) -} - -func (o *GetComponentBuildsBadRequest) GetPayload() *models.StderrErrResponse { - return o.Payload -} - -func (o *GetComponentBuildsBadRequest) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.StderrErrResponse) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewGetComponentBuildsUnauthorized creates a GetComponentBuildsUnauthorized with default headers values -func NewGetComponentBuildsUnauthorized() *GetComponentBuildsUnauthorized { - return &GetComponentBuildsUnauthorized{} -} - -/* -GetComponentBuildsUnauthorized describes a response with status code 401, with default header values. - -Unauthorized -*/ -type GetComponentBuildsUnauthorized struct { - Payload *models.StderrErrResponse -} - -// IsSuccess returns true when this get component builds unauthorized response has a 2xx status code -func (o *GetComponentBuildsUnauthorized) IsSuccess() bool { - return false -} - -// IsRedirect returns true when this get component builds unauthorized response has a 3xx status code -func (o *GetComponentBuildsUnauthorized) IsRedirect() bool { - return false -} - -// IsClientError returns true when this get component builds unauthorized response has a 4xx status code -func (o *GetComponentBuildsUnauthorized) IsClientError() bool { - return true -} - -// IsServerError returns true when this get component builds unauthorized response has a 5xx status code -func (o *GetComponentBuildsUnauthorized) IsServerError() bool { - return false -} - -// IsCode returns true when this get component builds unauthorized response a status code equal to that given -func (o *GetComponentBuildsUnauthorized) IsCode(code int) bool { - return code == 401 -} - -// Code gets the status code for the get component builds unauthorized response -func (o *GetComponentBuildsUnauthorized) Code() int { - return 401 -} - -func (o *GetComponentBuildsUnauthorized) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /v1/builds][%d] getComponentBuildsUnauthorized %s", 401, payload) -} - -func (o *GetComponentBuildsUnauthorized) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /v1/builds][%d] getComponentBuildsUnauthorized %s", 401, payload) -} - -func (o *GetComponentBuildsUnauthorized) GetPayload() *models.StderrErrResponse { - return o.Payload -} - -func (o *GetComponentBuildsUnauthorized) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.StderrErrResponse) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewGetComponentBuildsForbidden creates a GetComponentBuildsForbidden with default headers values -func NewGetComponentBuildsForbidden() *GetComponentBuildsForbidden { - return &GetComponentBuildsForbidden{} -} - -/* -GetComponentBuildsForbidden describes a response with status code 403, with default header values. - -Forbidden -*/ -type GetComponentBuildsForbidden struct { - Payload *models.StderrErrResponse -} - -// IsSuccess returns true when this get component builds forbidden response has a 2xx status code -func (o *GetComponentBuildsForbidden) IsSuccess() bool { - return false -} - -// IsRedirect returns true when this get component builds forbidden response has a 3xx status code -func (o *GetComponentBuildsForbidden) IsRedirect() bool { - return false -} - -// IsClientError returns true when this get component builds forbidden response has a 4xx status code -func (o *GetComponentBuildsForbidden) IsClientError() bool { - return true -} - -// IsServerError returns true when this get component builds forbidden response has a 5xx status code -func (o *GetComponentBuildsForbidden) IsServerError() bool { - return false -} - -// IsCode returns true when this get component builds forbidden response a status code equal to that given -func (o *GetComponentBuildsForbidden) IsCode(code int) bool { - return code == 403 -} - -// Code gets the status code for the get component builds forbidden response -func (o *GetComponentBuildsForbidden) Code() int { - return 403 -} - -func (o *GetComponentBuildsForbidden) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /v1/builds][%d] getComponentBuildsForbidden %s", 403, payload) -} - -func (o *GetComponentBuildsForbidden) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /v1/builds][%d] getComponentBuildsForbidden %s", 403, payload) -} - -func (o *GetComponentBuildsForbidden) GetPayload() *models.StderrErrResponse { - return o.Payload -} - -func (o *GetComponentBuildsForbidden) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.StderrErrResponse) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewGetComponentBuildsNotFound creates a GetComponentBuildsNotFound with default headers values -func NewGetComponentBuildsNotFound() *GetComponentBuildsNotFound { - return &GetComponentBuildsNotFound{} -} - -/* -GetComponentBuildsNotFound describes a response with status code 404, with default header values. - -Not Found -*/ -type GetComponentBuildsNotFound struct { - Payload *models.StderrErrResponse -} - -// IsSuccess returns true when this get component builds not found response has a 2xx status code -func (o *GetComponentBuildsNotFound) IsSuccess() bool { - return false -} - -// IsRedirect returns true when this get component builds not found response has a 3xx status code -func (o *GetComponentBuildsNotFound) IsRedirect() bool { - return false -} - -// IsClientError returns true when this get component builds not found response has a 4xx status code -func (o *GetComponentBuildsNotFound) IsClientError() bool { - return true -} - -// IsServerError returns true when this get component builds not found response has a 5xx status code -func (o *GetComponentBuildsNotFound) IsServerError() bool { - return false -} - -// IsCode returns true when this get component builds not found response a status code equal to that given -func (o *GetComponentBuildsNotFound) IsCode(code int) bool { - return code == 404 -} - -// Code gets the status code for the get component builds not found response -func (o *GetComponentBuildsNotFound) Code() int { - return 404 -} - -func (o *GetComponentBuildsNotFound) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /v1/builds][%d] getComponentBuildsNotFound %s", 404, payload) -} - -func (o *GetComponentBuildsNotFound) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /v1/builds][%d] getComponentBuildsNotFound %s", 404, payload) -} - -func (o *GetComponentBuildsNotFound) GetPayload() *models.StderrErrResponse { - return o.Payload -} - -func (o *GetComponentBuildsNotFound) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.StderrErrResponse) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewGetComponentBuildsInternalServerError creates a GetComponentBuildsInternalServerError with default headers values -func NewGetComponentBuildsInternalServerError() *GetComponentBuildsInternalServerError { - return &GetComponentBuildsInternalServerError{} -} - -/* -GetComponentBuildsInternalServerError describes a response with status code 500, with default header values. - -Internal Server Error -*/ -type GetComponentBuildsInternalServerError struct { - Payload *models.StderrErrResponse -} - -// IsSuccess returns true when this get component builds internal server error response has a 2xx status code -func (o *GetComponentBuildsInternalServerError) IsSuccess() bool { - return false -} - -// IsRedirect returns true when this get component builds internal server error response has a 3xx status code -func (o *GetComponentBuildsInternalServerError) IsRedirect() bool { - return false -} - -// IsClientError returns true when this get component builds internal server error response has a 4xx status code -func (o *GetComponentBuildsInternalServerError) IsClientError() bool { - return false -} - -// IsServerError returns true when this get component builds internal server error response has a 5xx status code -func (o *GetComponentBuildsInternalServerError) IsServerError() bool { - return true -} - -// IsCode returns true when this get component builds internal server error response a status code equal to that given -func (o *GetComponentBuildsInternalServerError) IsCode(code int) bool { - return code == 500 -} - -// Code gets the status code for the get component builds internal server error response -func (o *GetComponentBuildsInternalServerError) Code() int { - return 500 -} - -func (o *GetComponentBuildsInternalServerError) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /v1/builds][%d] getComponentBuildsInternalServerError %s", 500, payload) -} - -func (o *GetComponentBuildsInternalServerError) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /v1/builds][%d] getComponentBuildsInternalServerError %s", 500, payload) -} - -func (o *GetComponentBuildsInternalServerError) GetPayload() *models.StderrErrResponse { - return o.Payload -} - -func (o *GetComponentBuildsInternalServerError) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.StderrErrResponse) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} diff --git a/client/operations/get_component_configs_parameters.go b/client/operations/get_component_configs_parameters.go deleted file mode 100644 index a40d038..0000000 --- a/client/operations/get_component_configs_parameters.go +++ /dev/null @@ -1,151 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package operations - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "context" - "net/http" - "time" - - "github.com/go-openapi/errors" - "github.com/go-openapi/runtime" - cr "github.com/go-openapi/runtime/client" - "github.com/go-openapi/strfmt" -) - -// NewGetComponentConfigsParams creates a new GetComponentConfigsParams object, -// with the default timeout for this client. -// -// Default values are not hydrated, since defaults are normally applied by the API server side. -// -// To enforce default values in parameter, use SetDefaults or WithDefaults. -func NewGetComponentConfigsParams() *GetComponentConfigsParams { - return &GetComponentConfigsParams{ - timeout: cr.DefaultTimeout, - } -} - -// NewGetComponentConfigsParamsWithTimeout creates a new GetComponentConfigsParams object -// with the ability to set a timeout on a request. -func NewGetComponentConfigsParamsWithTimeout(timeout time.Duration) *GetComponentConfigsParams { - return &GetComponentConfigsParams{ - timeout: timeout, - } -} - -// NewGetComponentConfigsParamsWithContext creates a new GetComponentConfigsParams object -// with the ability to set a context for a request. -func NewGetComponentConfigsParamsWithContext(ctx context.Context) *GetComponentConfigsParams { - return &GetComponentConfigsParams{ - Context: ctx, - } -} - -// NewGetComponentConfigsParamsWithHTTPClient creates a new GetComponentConfigsParams object -// with the ability to set a custom HTTPClient for a request. -func NewGetComponentConfigsParamsWithHTTPClient(client *http.Client) *GetComponentConfigsParams { - return &GetComponentConfigsParams{ - HTTPClient: client, - } -} - -/* -GetComponentConfigsParams contains all the parameters to send to the API endpoint - - for the get component configs operation. - - Typically these are written to a http.Request. -*/ -type GetComponentConfigsParams struct { - - /* ComponentID. - - component ID - */ - ComponentID string - - timeout time.Duration - Context context.Context - HTTPClient *http.Client -} - -// WithDefaults hydrates default values in the get component configs params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *GetComponentConfigsParams) WithDefaults() *GetComponentConfigsParams { - o.SetDefaults() - return o -} - -// SetDefaults hydrates default values in the get component configs params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *GetComponentConfigsParams) SetDefaults() { - // no default values defined for this parameter -} - -// WithTimeout adds the timeout to the get component configs params -func (o *GetComponentConfigsParams) WithTimeout(timeout time.Duration) *GetComponentConfigsParams { - o.SetTimeout(timeout) - return o -} - -// SetTimeout adds the timeout to the get component configs params -func (o *GetComponentConfigsParams) SetTimeout(timeout time.Duration) { - o.timeout = timeout -} - -// WithContext adds the context to the get component configs params -func (o *GetComponentConfigsParams) WithContext(ctx context.Context) *GetComponentConfigsParams { - o.SetContext(ctx) - return o -} - -// SetContext adds the context to the get component configs params -func (o *GetComponentConfigsParams) SetContext(ctx context.Context) { - o.Context = ctx -} - -// WithHTTPClient adds the HTTPClient to the get component configs params -func (o *GetComponentConfigsParams) WithHTTPClient(client *http.Client) *GetComponentConfigsParams { - o.SetHTTPClient(client) - return o -} - -// SetHTTPClient adds the HTTPClient to the get component configs params -func (o *GetComponentConfigsParams) SetHTTPClient(client *http.Client) { - o.HTTPClient = client -} - -// WithComponentID adds the componentID to the get component configs params -func (o *GetComponentConfigsParams) WithComponentID(componentID string) *GetComponentConfigsParams { - o.SetComponentID(componentID) - return o -} - -// SetComponentID adds the componentId to the get component configs params -func (o *GetComponentConfigsParams) SetComponentID(componentID string) { - o.ComponentID = componentID -} - -// WriteToRequest writes these params to a swagger request -func (o *GetComponentConfigsParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { - - if err := r.SetTimeout(o.timeout); err != nil { - return err - } - var res []error - - // path param component_id - if err := r.SetPathParam("component_id", o.ComponentID); err != nil { - return err - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} diff --git a/client/operations/get_component_configs_responses.go b/client/operations/get_component_configs_responses.go deleted file mode 100644 index 2be6de7..0000000 --- a/client/operations/get_component_configs_responses.go +++ /dev/null @@ -1,484 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package operations - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "encoding/json" - "fmt" - "io" - - "github.com/go-openapi/runtime" - "github.com/go-openapi/strfmt" - - "github.com/nuonco/nuon-go/models" -) - -// GetComponentConfigsReader is a Reader for the GetComponentConfigs structure. -type GetComponentConfigsReader struct { - formats strfmt.Registry -} - -// ReadResponse reads a server response into the received o. -func (o *GetComponentConfigsReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { - switch response.Code() { - case 200: - result := NewGetComponentConfigsOK() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return result, nil - case 400: - result := NewGetComponentConfigsBadRequest() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return nil, result - case 401: - result := NewGetComponentConfigsUnauthorized() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return nil, result - case 403: - result := NewGetComponentConfigsForbidden() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return nil, result - case 404: - result := NewGetComponentConfigsNotFound() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return nil, result - case 500: - result := NewGetComponentConfigsInternalServerError() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return nil, result - default: - return nil, runtime.NewAPIError("[GET /v1/components/{component_id}/configs] GetComponentConfigs", response, response.Code()) - } -} - -// NewGetComponentConfigsOK creates a GetComponentConfigsOK with default headers values -func NewGetComponentConfigsOK() *GetComponentConfigsOK { - return &GetComponentConfigsOK{} -} - -/* -GetComponentConfigsOK describes a response with status code 200, with default header values. - -OK -*/ -type GetComponentConfigsOK struct { - Payload []*models.AppComponentConfigConnection -} - -// IsSuccess returns true when this get component configs o k response has a 2xx status code -func (o *GetComponentConfigsOK) IsSuccess() bool { - return true -} - -// IsRedirect returns true when this get component configs o k response has a 3xx status code -func (o *GetComponentConfigsOK) IsRedirect() bool { - return false -} - -// IsClientError returns true when this get component configs o k response has a 4xx status code -func (o *GetComponentConfigsOK) IsClientError() bool { - return false -} - -// IsServerError returns true when this get component configs o k response has a 5xx status code -func (o *GetComponentConfigsOK) IsServerError() bool { - return false -} - -// IsCode returns true when this get component configs o k response a status code equal to that given -func (o *GetComponentConfigsOK) IsCode(code int) bool { - return code == 200 -} - -// Code gets the status code for the get component configs o k response -func (o *GetComponentConfigsOK) Code() int { - return 200 -} - -func (o *GetComponentConfigsOK) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /v1/components/{component_id}/configs][%d] getComponentConfigsOK %s", 200, payload) -} - -func (o *GetComponentConfigsOK) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /v1/components/{component_id}/configs][%d] getComponentConfigsOK %s", 200, payload) -} - -func (o *GetComponentConfigsOK) GetPayload() []*models.AppComponentConfigConnection { - return o.Payload -} - -func (o *GetComponentConfigsOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - // response payload - if err := consumer.Consume(response.Body(), &o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewGetComponentConfigsBadRequest creates a GetComponentConfigsBadRequest with default headers values -func NewGetComponentConfigsBadRequest() *GetComponentConfigsBadRequest { - return &GetComponentConfigsBadRequest{} -} - -/* -GetComponentConfigsBadRequest describes a response with status code 400, with default header values. - -Bad Request -*/ -type GetComponentConfigsBadRequest struct { - Payload *models.StderrErrResponse -} - -// IsSuccess returns true when this get component configs bad request response has a 2xx status code -func (o *GetComponentConfigsBadRequest) IsSuccess() bool { - return false -} - -// IsRedirect returns true when this get component configs bad request response has a 3xx status code -func (o *GetComponentConfigsBadRequest) IsRedirect() bool { - return false -} - -// IsClientError returns true when this get component configs bad request response has a 4xx status code -func (o *GetComponentConfigsBadRequest) IsClientError() bool { - return true -} - -// IsServerError returns true when this get component configs bad request response has a 5xx status code -func (o *GetComponentConfigsBadRequest) IsServerError() bool { - return false -} - -// IsCode returns true when this get component configs bad request response a status code equal to that given -func (o *GetComponentConfigsBadRequest) IsCode(code int) bool { - return code == 400 -} - -// Code gets the status code for the get component configs bad request response -func (o *GetComponentConfigsBadRequest) Code() int { - return 400 -} - -func (o *GetComponentConfigsBadRequest) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /v1/components/{component_id}/configs][%d] getComponentConfigsBadRequest %s", 400, payload) -} - -func (o *GetComponentConfigsBadRequest) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /v1/components/{component_id}/configs][%d] getComponentConfigsBadRequest %s", 400, payload) -} - -func (o *GetComponentConfigsBadRequest) GetPayload() *models.StderrErrResponse { - return o.Payload -} - -func (o *GetComponentConfigsBadRequest) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.StderrErrResponse) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewGetComponentConfigsUnauthorized creates a GetComponentConfigsUnauthorized with default headers values -func NewGetComponentConfigsUnauthorized() *GetComponentConfigsUnauthorized { - return &GetComponentConfigsUnauthorized{} -} - -/* -GetComponentConfigsUnauthorized describes a response with status code 401, with default header values. - -Unauthorized -*/ -type GetComponentConfigsUnauthorized struct { - Payload *models.StderrErrResponse -} - -// IsSuccess returns true when this get component configs unauthorized response has a 2xx status code -func (o *GetComponentConfigsUnauthorized) IsSuccess() bool { - return false -} - -// IsRedirect returns true when this get component configs unauthorized response has a 3xx status code -func (o *GetComponentConfigsUnauthorized) IsRedirect() bool { - return false -} - -// IsClientError returns true when this get component configs unauthorized response has a 4xx status code -func (o *GetComponentConfigsUnauthorized) IsClientError() bool { - return true -} - -// IsServerError returns true when this get component configs unauthorized response has a 5xx status code -func (o *GetComponentConfigsUnauthorized) IsServerError() bool { - return false -} - -// IsCode returns true when this get component configs unauthorized response a status code equal to that given -func (o *GetComponentConfigsUnauthorized) IsCode(code int) bool { - return code == 401 -} - -// Code gets the status code for the get component configs unauthorized response -func (o *GetComponentConfigsUnauthorized) Code() int { - return 401 -} - -func (o *GetComponentConfigsUnauthorized) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /v1/components/{component_id}/configs][%d] getComponentConfigsUnauthorized %s", 401, payload) -} - -func (o *GetComponentConfigsUnauthorized) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /v1/components/{component_id}/configs][%d] getComponentConfigsUnauthorized %s", 401, payload) -} - -func (o *GetComponentConfigsUnauthorized) GetPayload() *models.StderrErrResponse { - return o.Payload -} - -func (o *GetComponentConfigsUnauthorized) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.StderrErrResponse) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewGetComponentConfigsForbidden creates a GetComponentConfigsForbidden with default headers values -func NewGetComponentConfigsForbidden() *GetComponentConfigsForbidden { - return &GetComponentConfigsForbidden{} -} - -/* -GetComponentConfigsForbidden describes a response with status code 403, with default header values. - -Forbidden -*/ -type GetComponentConfigsForbidden struct { - Payload *models.StderrErrResponse -} - -// IsSuccess returns true when this get component configs forbidden response has a 2xx status code -func (o *GetComponentConfigsForbidden) IsSuccess() bool { - return false -} - -// IsRedirect returns true when this get component configs forbidden response has a 3xx status code -func (o *GetComponentConfigsForbidden) IsRedirect() bool { - return false -} - -// IsClientError returns true when this get component configs forbidden response has a 4xx status code -func (o *GetComponentConfigsForbidden) IsClientError() bool { - return true -} - -// IsServerError returns true when this get component configs forbidden response has a 5xx status code -func (o *GetComponentConfigsForbidden) IsServerError() bool { - return false -} - -// IsCode returns true when this get component configs forbidden response a status code equal to that given -func (o *GetComponentConfigsForbidden) IsCode(code int) bool { - return code == 403 -} - -// Code gets the status code for the get component configs forbidden response -func (o *GetComponentConfigsForbidden) Code() int { - return 403 -} - -func (o *GetComponentConfigsForbidden) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /v1/components/{component_id}/configs][%d] getComponentConfigsForbidden %s", 403, payload) -} - -func (o *GetComponentConfigsForbidden) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /v1/components/{component_id}/configs][%d] getComponentConfigsForbidden %s", 403, payload) -} - -func (o *GetComponentConfigsForbidden) GetPayload() *models.StderrErrResponse { - return o.Payload -} - -func (o *GetComponentConfigsForbidden) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.StderrErrResponse) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewGetComponentConfigsNotFound creates a GetComponentConfigsNotFound with default headers values -func NewGetComponentConfigsNotFound() *GetComponentConfigsNotFound { - return &GetComponentConfigsNotFound{} -} - -/* -GetComponentConfigsNotFound describes a response with status code 404, with default header values. - -Not Found -*/ -type GetComponentConfigsNotFound struct { - Payload *models.StderrErrResponse -} - -// IsSuccess returns true when this get component configs not found response has a 2xx status code -func (o *GetComponentConfigsNotFound) IsSuccess() bool { - return false -} - -// IsRedirect returns true when this get component configs not found response has a 3xx status code -func (o *GetComponentConfigsNotFound) IsRedirect() bool { - return false -} - -// IsClientError returns true when this get component configs not found response has a 4xx status code -func (o *GetComponentConfigsNotFound) IsClientError() bool { - return true -} - -// IsServerError returns true when this get component configs not found response has a 5xx status code -func (o *GetComponentConfigsNotFound) IsServerError() bool { - return false -} - -// IsCode returns true when this get component configs not found response a status code equal to that given -func (o *GetComponentConfigsNotFound) IsCode(code int) bool { - return code == 404 -} - -// Code gets the status code for the get component configs not found response -func (o *GetComponentConfigsNotFound) Code() int { - return 404 -} - -func (o *GetComponentConfigsNotFound) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /v1/components/{component_id}/configs][%d] getComponentConfigsNotFound %s", 404, payload) -} - -func (o *GetComponentConfigsNotFound) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /v1/components/{component_id}/configs][%d] getComponentConfigsNotFound %s", 404, payload) -} - -func (o *GetComponentConfigsNotFound) GetPayload() *models.StderrErrResponse { - return o.Payload -} - -func (o *GetComponentConfigsNotFound) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.StderrErrResponse) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewGetComponentConfigsInternalServerError creates a GetComponentConfigsInternalServerError with default headers values -func NewGetComponentConfigsInternalServerError() *GetComponentConfigsInternalServerError { - return &GetComponentConfigsInternalServerError{} -} - -/* -GetComponentConfigsInternalServerError describes a response with status code 500, with default header values. - -Internal Server Error -*/ -type GetComponentConfigsInternalServerError struct { - Payload *models.StderrErrResponse -} - -// IsSuccess returns true when this get component configs internal server error response has a 2xx status code -func (o *GetComponentConfigsInternalServerError) IsSuccess() bool { - return false -} - -// IsRedirect returns true when this get component configs internal server error response has a 3xx status code -func (o *GetComponentConfigsInternalServerError) IsRedirect() bool { - return false -} - -// IsClientError returns true when this get component configs internal server error response has a 4xx status code -func (o *GetComponentConfigsInternalServerError) IsClientError() bool { - return false -} - -// IsServerError returns true when this get component configs internal server error response has a 5xx status code -func (o *GetComponentConfigsInternalServerError) IsServerError() bool { - return true -} - -// IsCode returns true when this get component configs internal server error response a status code equal to that given -func (o *GetComponentConfigsInternalServerError) IsCode(code int) bool { - return code == 500 -} - -// Code gets the status code for the get component configs internal server error response -func (o *GetComponentConfigsInternalServerError) Code() int { - return 500 -} - -func (o *GetComponentConfigsInternalServerError) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /v1/components/{component_id}/configs][%d] getComponentConfigsInternalServerError %s", 500, payload) -} - -func (o *GetComponentConfigsInternalServerError) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /v1/components/{component_id}/configs][%d] getComponentConfigsInternalServerError %s", 500, payload) -} - -func (o *GetComponentConfigsInternalServerError) GetPayload() *models.StderrErrResponse { - return o.Payload -} - -func (o *GetComponentConfigsInternalServerError) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.StderrErrResponse) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} diff --git a/client/operations/get_component_latest_build_parameters.go b/client/operations/get_component_latest_build_parameters.go deleted file mode 100644 index 76c96a2..0000000 --- a/client/operations/get_component_latest_build_parameters.go +++ /dev/null @@ -1,151 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package operations - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "context" - "net/http" - "time" - - "github.com/go-openapi/errors" - "github.com/go-openapi/runtime" - cr "github.com/go-openapi/runtime/client" - "github.com/go-openapi/strfmt" -) - -// NewGetComponentLatestBuildParams creates a new GetComponentLatestBuildParams object, -// with the default timeout for this client. -// -// Default values are not hydrated, since defaults are normally applied by the API server side. -// -// To enforce default values in parameter, use SetDefaults or WithDefaults. -func NewGetComponentLatestBuildParams() *GetComponentLatestBuildParams { - return &GetComponentLatestBuildParams{ - timeout: cr.DefaultTimeout, - } -} - -// NewGetComponentLatestBuildParamsWithTimeout creates a new GetComponentLatestBuildParams object -// with the ability to set a timeout on a request. -func NewGetComponentLatestBuildParamsWithTimeout(timeout time.Duration) *GetComponentLatestBuildParams { - return &GetComponentLatestBuildParams{ - timeout: timeout, - } -} - -// NewGetComponentLatestBuildParamsWithContext creates a new GetComponentLatestBuildParams object -// with the ability to set a context for a request. -func NewGetComponentLatestBuildParamsWithContext(ctx context.Context) *GetComponentLatestBuildParams { - return &GetComponentLatestBuildParams{ - Context: ctx, - } -} - -// NewGetComponentLatestBuildParamsWithHTTPClient creates a new GetComponentLatestBuildParams object -// with the ability to set a custom HTTPClient for a request. -func NewGetComponentLatestBuildParamsWithHTTPClient(client *http.Client) *GetComponentLatestBuildParams { - return &GetComponentLatestBuildParams{ - HTTPClient: client, - } -} - -/* -GetComponentLatestBuildParams contains all the parameters to send to the API endpoint - - for the get component latest build operation. - - Typically these are written to a http.Request. -*/ -type GetComponentLatestBuildParams struct { - - /* ComponentID. - - component ID - */ - ComponentID string - - timeout time.Duration - Context context.Context - HTTPClient *http.Client -} - -// WithDefaults hydrates default values in the get component latest build params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *GetComponentLatestBuildParams) WithDefaults() *GetComponentLatestBuildParams { - o.SetDefaults() - return o -} - -// SetDefaults hydrates default values in the get component latest build params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *GetComponentLatestBuildParams) SetDefaults() { - // no default values defined for this parameter -} - -// WithTimeout adds the timeout to the get component latest build params -func (o *GetComponentLatestBuildParams) WithTimeout(timeout time.Duration) *GetComponentLatestBuildParams { - o.SetTimeout(timeout) - return o -} - -// SetTimeout adds the timeout to the get component latest build params -func (o *GetComponentLatestBuildParams) SetTimeout(timeout time.Duration) { - o.timeout = timeout -} - -// WithContext adds the context to the get component latest build params -func (o *GetComponentLatestBuildParams) WithContext(ctx context.Context) *GetComponentLatestBuildParams { - o.SetContext(ctx) - return o -} - -// SetContext adds the context to the get component latest build params -func (o *GetComponentLatestBuildParams) SetContext(ctx context.Context) { - o.Context = ctx -} - -// WithHTTPClient adds the HTTPClient to the get component latest build params -func (o *GetComponentLatestBuildParams) WithHTTPClient(client *http.Client) *GetComponentLatestBuildParams { - o.SetHTTPClient(client) - return o -} - -// SetHTTPClient adds the HTTPClient to the get component latest build params -func (o *GetComponentLatestBuildParams) SetHTTPClient(client *http.Client) { - o.HTTPClient = client -} - -// WithComponentID adds the componentID to the get component latest build params -func (o *GetComponentLatestBuildParams) WithComponentID(componentID string) *GetComponentLatestBuildParams { - o.SetComponentID(componentID) - return o -} - -// SetComponentID adds the componentId to the get component latest build params -func (o *GetComponentLatestBuildParams) SetComponentID(componentID string) { - o.ComponentID = componentID -} - -// WriteToRequest writes these params to a swagger request -func (o *GetComponentLatestBuildParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { - - if err := r.SetTimeout(o.timeout); err != nil { - return err - } - var res []error - - // path param component_id - if err := r.SetPathParam("component_id", o.ComponentID); err != nil { - return err - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} diff --git a/client/operations/get_component_latest_build_responses.go b/client/operations/get_component_latest_build_responses.go deleted file mode 100644 index 9e8934a..0000000 --- a/client/operations/get_component_latest_build_responses.go +++ /dev/null @@ -1,486 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package operations - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "encoding/json" - "fmt" - "io" - - "github.com/go-openapi/runtime" - "github.com/go-openapi/strfmt" - - "github.com/nuonco/nuon-go/models" -) - -// GetComponentLatestBuildReader is a Reader for the GetComponentLatestBuild structure. -type GetComponentLatestBuildReader struct { - formats strfmt.Registry -} - -// ReadResponse reads a server response into the received o. -func (o *GetComponentLatestBuildReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { - switch response.Code() { - case 200: - result := NewGetComponentLatestBuildOK() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return result, nil - case 400: - result := NewGetComponentLatestBuildBadRequest() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return nil, result - case 401: - result := NewGetComponentLatestBuildUnauthorized() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return nil, result - case 403: - result := NewGetComponentLatestBuildForbidden() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return nil, result - case 404: - result := NewGetComponentLatestBuildNotFound() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return nil, result - case 500: - result := NewGetComponentLatestBuildInternalServerError() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return nil, result - default: - return nil, runtime.NewAPIError("[GET /v1/components/{component_id}/builds/latest] GetComponentLatestBuild", response, response.Code()) - } -} - -// NewGetComponentLatestBuildOK creates a GetComponentLatestBuildOK with default headers values -func NewGetComponentLatestBuildOK() *GetComponentLatestBuildOK { - return &GetComponentLatestBuildOK{} -} - -/* -GetComponentLatestBuildOK describes a response with status code 200, with default header values. - -OK -*/ -type GetComponentLatestBuildOK struct { - Payload *models.AppComponentBuild -} - -// IsSuccess returns true when this get component latest build o k response has a 2xx status code -func (o *GetComponentLatestBuildOK) IsSuccess() bool { - return true -} - -// IsRedirect returns true when this get component latest build o k response has a 3xx status code -func (o *GetComponentLatestBuildOK) IsRedirect() bool { - return false -} - -// IsClientError returns true when this get component latest build o k response has a 4xx status code -func (o *GetComponentLatestBuildOK) IsClientError() bool { - return false -} - -// IsServerError returns true when this get component latest build o k response has a 5xx status code -func (o *GetComponentLatestBuildOK) IsServerError() bool { - return false -} - -// IsCode returns true when this get component latest build o k response a status code equal to that given -func (o *GetComponentLatestBuildOK) IsCode(code int) bool { - return code == 200 -} - -// Code gets the status code for the get component latest build o k response -func (o *GetComponentLatestBuildOK) Code() int { - return 200 -} - -func (o *GetComponentLatestBuildOK) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /v1/components/{component_id}/builds/latest][%d] getComponentLatestBuildOK %s", 200, payload) -} - -func (o *GetComponentLatestBuildOK) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /v1/components/{component_id}/builds/latest][%d] getComponentLatestBuildOK %s", 200, payload) -} - -func (o *GetComponentLatestBuildOK) GetPayload() *models.AppComponentBuild { - return o.Payload -} - -func (o *GetComponentLatestBuildOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.AppComponentBuild) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewGetComponentLatestBuildBadRequest creates a GetComponentLatestBuildBadRequest with default headers values -func NewGetComponentLatestBuildBadRequest() *GetComponentLatestBuildBadRequest { - return &GetComponentLatestBuildBadRequest{} -} - -/* -GetComponentLatestBuildBadRequest describes a response with status code 400, with default header values. - -Bad Request -*/ -type GetComponentLatestBuildBadRequest struct { - Payload *models.StderrErrResponse -} - -// IsSuccess returns true when this get component latest build bad request response has a 2xx status code -func (o *GetComponentLatestBuildBadRequest) IsSuccess() bool { - return false -} - -// IsRedirect returns true when this get component latest build bad request response has a 3xx status code -func (o *GetComponentLatestBuildBadRequest) IsRedirect() bool { - return false -} - -// IsClientError returns true when this get component latest build bad request response has a 4xx status code -func (o *GetComponentLatestBuildBadRequest) IsClientError() bool { - return true -} - -// IsServerError returns true when this get component latest build bad request response has a 5xx status code -func (o *GetComponentLatestBuildBadRequest) IsServerError() bool { - return false -} - -// IsCode returns true when this get component latest build bad request response a status code equal to that given -func (o *GetComponentLatestBuildBadRequest) IsCode(code int) bool { - return code == 400 -} - -// Code gets the status code for the get component latest build bad request response -func (o *GetComponentLatestBuildBadRequest) Code() int { - return 400 -} - -func (o *GetComponentLatestBuildBadRequest) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /v1/components/{component_id}/builds/latest][%d] getComponentLatestBuildBadRequest %s", 400, payload) -} - -func (o *GetComponentLatestBuildBadRequest) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /v1/components/{component_id}/builds/latest][%d] getComponentLatestBuildBadRequest %s", 400, payload) -} - -func (o *GetComponentLatestBuildBadRequest) GetPayload() *models.StderrErrResponse { - return o.Payload -} - -func (o *GetComponentLatestBuildBadRequest) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.StderrErrResponse) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewGetComponentLatestBuildUnauthorized creates a GetComponentLatestBuildUnauthorized with default headers values -func NewGetComponentLatestBuildUnauthorized() *GetComponentLatestBuildUnauthorized { - return &GetComponentLatestBuildUnauthorized{} -} - -/* -GetComponentLatestBuildUnauthorized describes a response with status code 401, with default header values. - -Unauthorized -*/ -type GetComponentLatestBuildUnauthorized struct { - Payload *models.StderrErrResponse -} - -// IsSuccess returns true when this get component latest build unauthorized response has a 2xx status code -func (o *GetComponentLatestBuildUnauthorized) IsSuccess() bool { - return false -} - -// IsRedirect returns true when this get component latest build unauthorized response has a 3xx status code -func (o *GetComponentLatestBuildUnauthorized) IsRedirect() bool { - return false -} - -// IsClientError returns true when this get component latest build unauthorized response has a 4xx status code -func (o *GetComponentLatestBuildUnauthorized) IsClientError() bool { - return true -} - -// IsServerError returns true when this get component latest build unauthorized response has a 5xx status code -func (o *GetComponentLatestBuildUnauthorized) IsServerError() bool { - return false -} - -// IsCode returns true when this get component latest build unauthorized response a status code equal to that given -func (o *GetComponentLatestBuildUnauthorized) IsCode(code int) bool { - return code == 401 -} - -// Code gets the status code for the get component latest build unauthorized response -func (o *GetComponentLatestBuildUnauthorized) Code() int { - return 401 -} - -func (o *GetComponentLatestBuildUnauthorized) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /v1/components/{component_id}/builds/latest][%d] getComponentLatestBuildUnauthorized %s", 401, payload) -} - -func (o *GetComponentLatestBuildUnauthorized) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /v1/components/{component_id}/builds/latest][%d] getComponentLatestBuildUnauthorized %s", 401, payload) -} - -func (o *GetComponentLatestBuildUnauthorized) GetPayload() *models.StderrErrResponse { - return o.Payload -} - -func (o *GetComponentLatestBuildUnauthorized) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.StderrErrResponse) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewGetComponentLatestBuildForbidden creates a GetComponentLatestBuildForbidden with default headers values -func NewGetComponentLatestBuildForbidden() *GetComponentLatestBuildForbidden { - return &GetComponentLatestBuildForbidden{} -} - -/* -GetComponentLatestBuildForbidden describes a response with status code 403, with default header values. - -Forbidden -*/ -type GetComponentLatestBuildForbidden struct { - Payload *models.StderrErrResponse -} - -// IsSuccess returns true when this get component latest build forbidden response has a 2xx status code -func (o *GetComponentLatestBuildForbidden) IsSuccess() bool { - return false -} - -// IsRedirect returns true when this get component latest build forbidden response has a 3xx status code -func (o *GetComponentLatestBuildForbidden) IsRedirect() bool { - return false -} - -// IsClientError returns true when this get component latest build forbidden response has a 4xx status code -func (o *GetComponentLatestBuildForbidden) IsClientError() bool { - return true -} - -// IsServerError returns true when this get component latest build forbidden response has a 5xx status code -func (o *GetComponentLatestBuildForbidden) IsServerError() bool { - return false -} - -// IsCode returns true when this get component latest build forbidden response a status code equal to that given -func (o *GetComponentLatestBuildForbidden) IsCode(code int) bool { - return code == 403 -} - -// Code gets the status code for the get component latest build forbidden response -func (o *GetComponentLatestBuildForbidden) Code() int { - return 403 -} - -func (o *GetComponentLatestBuildForbidden) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /v1/components/{component_id}/builds/latest][%d] getComponentLatestBuildForbidden %s", 403, payload) -} - -func (o *GetComponentLatestBuildForbidden) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /v1/components/{component_id}/builds/latest][%d] getComponentLatestBuildForbidden %s", 403, payload) -} - -func (o *GetComponentLatestBuildForbidden) GetPayload() *models.StderrErrResponse { - return o.Payload -} - -func (o *GetComponentLatestBuildForbidden) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.StderrErrResponse) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewGetComponentLatestBuildNotFound creates a GetComponentLatestBuildNotFound with default headers values -func NewGetComponentLatestBuildNotFound() *GetComponentLatestBuildNotFound { - return &GetComponentLatestBuildNotFound{} -} - -/* -GetComponentLatestBuildNotFound describes a response with status code 404, with default header values. - -Not Found -*/ -type GetComponentLatestBuildNotFound struct { - Payload *models.StderrErrResponse -} - -// IsSuccess returns true when this get component latest build not found response has a 2xx status code -func (o *GetComponentLatestBuildNotFound) IsSuccess() bool { - return false -} - -// IsRedirect returns true when this get component latest build not found response has a 3xx status code -func (o *GetComponentLatestBuildNotFound) IsRedirect() bool { - return false -} - -// IsClientError returns true when this get component latest build not found response has a 4xx status code -func (o *GetComponentLatestBuildNotFound) IsClientError() bool { - return true -} - -// IsServerError returns true when this get component latest build not found response has a 5xx status code -func (o *GetComponentLatestBuildNotFound) IsServerError() bool { - return false -} - -// IsCode returns true when this get component latest build not found response a status code equal to that given -func (o *GetComponentLatestBuildNotFound) IsCode(code int) bool { - return code == 404 -} - -// Code gets the status code for the get component latest build not found response -func (o *GetComponentLatestBuildNotFound) Code() int { - return 404 -} - -func (o *GetComponentLatestBuildNotFound) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /v1/components/{component_id}/builds/latest][%d] getComponentLatestBuildNotFound %s", 404, payload) -} - -func (o *GetComponentLatestBuildNotFound) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /v1/components/{component_id}/builds/latest][%d] getComponentLatestBuildNotFound %s", 404, payload) -} - -func (o *GetComponentLatestBuildNotFound) GetPayload() *models.StderrErrResponse { - return o.Payload -} - -func (o *GetComponentLatestBuildNotFound) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.StderrErrResponse) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewGetComponentLatestBuildInternalServerError creates a GetComponentLatestBuildInternalServerError with default headers values -func NewGetComponentLatestBuildInternalServerError() *GetComponentLatestBuildInternalServerError { - return &GetComponentLatestBuildInternalServerError{} -} - -/* -GetComponentLatestBuildInternalServerError describes a response with status code 500, with default header values. - -Internal Server Error -*/ -type GetComponentLatestBuildInternalServerError struct { - Payload *models.StderrErrResponse -} - -// IsSuccess returns true when this get component latest build internal server error response has a 2xx status code -func (o *GetComponentLatestBuildInternalServerError) IsSuccess() bool { - return false -} - -// IsRedirect returns true when this get component latest build internal server error response has a 3xx status code -func (o *GetComponentLatestBuildInternalServerError) IsRedirect() bool { - return false -} - -// IsClientError returns true when this get component latest build internal server error response has a 4xx status code -func (o *GetComponentLatestBuildInternalServerError) IsClientError() bool { - return false -} - -// IsServerError returns true when this get component latest build internal server error response has a 5xx status code -func (o *GetComponentLatestBuildInternalServerError) IsServerError() bool { - return true -} - -// IsCode returns true when this get component latest build internal server error response a status code equal to that given -func (o *GetComponentLatestBuildInternalServerError) IsCode(code int) bool { - return code == 500 -} - -// Code gets the status code for the get component latest build internal server error response -func (o *GetComponentLatestBuildInternalServerError) Code() int { - return 500 -} - -func (o *GetComponentLatestBuildInternalServerError) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /v1/components/{component_id}/builds/latest][%d] getComponentLatestBuildInternalServerError %s", 500, payload) -} - -func (o *GetComponentLatestBuildInternalServerError) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /v1/components/{component_id}/builds/latest][%d] getComponentLatestBuildInternalServerError %s", 500, payload) -} - -func (o *GetComponentLatestBuildInternalServerError) GetPayload() *models.StderrErrResponse { - return o.Payload -} - -func (o *GetComponentLatestBuildInternalServerError) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.StderrErrResponse) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} diff --git a/client/operations/get_component_latest_config_parameters.go b/client/operations/get_component_latest_config_parameters.go deleted file mode 100644 index 9a29922..0000000 --- a/client/operations/get_component_latest_config_parameters.go +++ /dev/null @@ -1,151 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package operations - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "context" - "net/http" - "time" - - "github.com/go-openapi/errors" - "github.com/go-openapi/runtime" - cr "github.com/go-openapi/runtime/client" - "github.com/go-openapi/strfmt" -) - -// NewGetComponentLatestConfigParams creates a new GetComponentLatestConfigParams object, -// with the default timeout for this client. -// -// Default values are not hydrated, since defaults are normally applied by the API server side. -// -// To enforce default values in parameter, use SetDefaults or WithDefaults. -func NewGetComponentLatestConfigParams() *GetComponentLatestConfigParams { - return &GetComponentLatestConfigParams{ - timeout: cr.DefaultTimeout, - } -} - -// NewGetComponentLatestConfigParamsWithTimeout creates a new GetComponentLatestConfigParams object -// with the ability to set a timeout on a request. -func NewGetComponentLatestConfigParamsWithTimeout(timeout time.Duration) *GetComponentLatestConfigParams { - return &GetComponentLatestConfigParams{ - timeout: timeout, - } -} - -// NewGetComponentLatestConfigParamsWithContext creates a new GetComponentLatestConfigParams object -// with the ability to set a context for a request. -func NewGetComponentLatestConfigParamsWithContext(ctx context.Context) *GetComponentLatestConfigParams { - return &GetComponentLatestConfigParams{ - Context: ctx, - } -} - -// NewGetComponentLatestConfigParamsWithHTTPClient creates a new GetComponentLatestConfigParams object -// with the ability to set a custom HTTPClient for a request. -func NewGetComponentLatestConfigParamsWithHTTPClient(client *http.Client) *GetComponentLatestConfigParams { - return &GetComponentLatestConfigParams{ - HTTPClient: client, - } -} - -/* -GetComponentLatestConfigParams contains all the parameters to send to the API endpoint - - for the get component latest config operation. - - Typically these are written to a http.Request. -*/ -type GetComponentLatestConfigParams struct { - - /* ComponentID. - - component ID - */ - ComponentID string - - timeout time.Duration - Context context.Context - HTTPClient *http.Client -} - -// WithDefaults hydrates default values in the get component latest config params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *GetComponentLatestConfigParams) WithDefaults() *GetComponentLatestConfigParams { - o.SetDefaults() - return o -} - -// SetDefaults hydrates default values in the get component latest config params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *GetComponentLatestConfigParams) SetDefaults() { - // no default values defined for this parameter -} - -// WithTimeout adds the timeout to the get component latest config params -func (o *GetComponentLatestConfigParams) WithTimeout(timeout time.Duration) *GetComponentLatestConfigParams { - o.SetTimeout(timeout) - return o -} - -// SetTimeout adds the timeout to the get component latest config params -func (o *GetComponentLatestConfigParams) SetTimeout(timeout time.Duration) { - o.timeout = timeout -} - -// WithContext adds the context to the get component latest config params -func (o *GetComponentLatestConfigParams) WithContext(ctx context.Context) *GetComponentLatestConfigParams { - o.SetContext(ctx) - return o -} - -// SetContext adds the context to the get component latest config params -func (o *GetComponentLatestConfigParams) SetContext(ctx context.Context) { - o.Context = ctx -} - -// WithHTTPClient adds the HTTPClient to the get component latest config params -func (o *GetComponentLatestConfigParams) WithHTTPClient(client *http.Client) *GetComponentLatestConfigParams { - o.SetHTTPClient(client) - return o -} - -// SetHTTPClient adds the HTTPClient to the get component latest config params -func (o *GetComponentLatestConfigParams) SetHTTPClient(client *http.Client) { - o.HTTPClient = client -} - -// WithComponentID adds the componentID to the get component latest config params -func (o *GetComponentLatestConfigParams) WithComponentID(componentID string) *GetComponentLatestConfigParams { - o.SetComponentID(componentID) - return o -} - -// SetComponentID adds the componentId to the get component latest config params -func (o *GetComponentLatestConfigParams) SetComponentID(componentID string) { - o.ComponentID = componentID -} - -// WriteToRequest writes these params to a swagger request -func (o *GetComponentLatestConfigParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { - - if err := r.SetTimeout(o.timeout); err != nil { - return err - } - var res []error - - // path param component_id - if err := r.SetPathParam("component_id", o.ComponentID); err != nil { - return err - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} diff --git a/client/operations/get_component_latest_config_responses.go b/client/operations/get_component_latest_config_responses.go deleted file mode 100644 index 8c709ec..0000000 --- a/client/operations/get_component_latest_config_responses.go +++ /dev/null @@ -1,486 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package operations - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "encoding/json" - "fmt" - "io" - - "github.com/go-openapi/runtime" - "github.com/go-openapi/strfmt" - - "github.com/nuonco/nuon-go/models" -) - -// GetComponentLatestConfigReader is a Reader for the GetComponentLatestConfig structure. -type GetComponentLatestConfigReader struct { - formats strfmt.Registry -} - -// ReadResponse reads a server response into the received o. -func (o *GetComponentLatestConfigReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { - switch response.Code() { - case 200: - result := NewGetComponentLatestConfigOK() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return result, nil - case 400: - result := NewGetComponentLatestConfigBadRequest() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return nil, result - case 401: - result := NewGetComponentLatestConfigUnauthorized() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return nil, result - case 403: - result := NewGetComponentLatestConfigForbidden() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return nil, result - case 404: - result := NewGetComponentLatestConfigNotFound() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return nil, result - case 500: - result := NewGetComponentLatestConfigInternalServerError() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return nil, result - default: - return nil, runtime.NewAPIError("[GET /v1/components/{component_id}/configs/latest] GetComponentLatestConfig", response, response.Code()) - } -} - -// NewGetComponentLatestConfigOK creates a GetComponentLatestConfigOK with default headers values -func NewGetComponentLatestConfigOK() *GetComponentLatestConfigOK { - return &GetComponentLatestConfigOK{} -} - -/* -GetComponentLatestConfigOK describes a response with status code 200, with default header values. - -OK -*/ -type GetComponentLatestConfigOK struct { - Payload *models.AppComponentConfigConnection -} - -// IsSuccess returns true when this get component latest config o k response has a 2xx status code -func (o *GetComponentLatestConfigOK) IsSuccess() bool { - return true -} - -// IsRedirect returns true when this get component latest config o k response has a 3xx status code -func (o *GetComponentLatestConfigOK) IsRedirect() bool { - return false -} - -// IsClientError returns true when this get component latest config o k response has a 4xx status code -func (o *GetComponentLatestConfigOK) IsClientError() bool { - return false -} - -// IsServerError returns true when this get component latest config o k response has a 5xx status code -func (o *GetComponentLatestConfigOK) IsServerError() bool { - return false -} - -// IsCode returns true when this get component latest config o k response a status code equal to that given -func (o *GetComponentLatestConfigOK) IsCode(code int) bool { - return code == 200 -} - -// Code gets the status code for the get component latest config o k response -func (o *GetComponentLatestConfigOK) Code() int { - return 200 -} - -func (o *GetComponentLatestConfigOK) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /v1/components/{component_id}/configs/latest][%d] getComponentLatestConfigOK %s", 200, payload) -} - -func (o *GetComponentLatestConfigOK) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /v1/components/{component_id}/configs/latest][%d] getComponentLatestConfigOK %s", 200, payload) -} - -func (o *GetComponentLatestConfigOK) GetPayload() *models.AppComponentConfigConnection { - return o.Payload -} - -func (o *GetComponentLatestConfigOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.AppComponentConfigConnection) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewGetComponentLatestConfigBadRequest creates a GetComponentLatestConfigBadRequest with default headers values -func NewGetComponentLatestConfigBadRequest() *GetComponentLatestConfigBadRequest { - return &GetComponentLatestConfigBadRequest{} -} - -/* -GetComponentLatestConfigBadRequest describes a response with status code 400, with default header values. - -Bad Request -*/ -type GetComponentLatestConfigBadRequest struct { - Payload *models.StderrErrResponse -} - -// IsSuccess returns true when this get component latest config bad request response has a 2xx status code -func (o *GetComponentLatestConfigBadRequest) IsSuccess() bool { - return false -} - -// IsRedirect returns true when this get component latest config bad request response has a 3xx status code -func (o *GetComponentLatestConfigBadRequest) IsRedirect() bool { - return false -} - -// IsClientError returns true when this get component latest config bad request response has a 4xx status code -func (o *GetComponentLatestConfigBadRequest) IsClientError() bool { - return true -} - -// IsServerError returns true when this get component latest config bad request response has a 5xx status code -func (o *GetComponentLatestConfigBadRequest) IsServerError() bool { - return false -} - -// IsCode returns true when this get component latest config bad request response a status code equal to that given -func (o *GetComponentLatestConfigBadRequest) IsCode(code int) bool { - return code == 400 -} - -// Code gets the status code for the get component latest config bad request response -func (o *GetComponentLatestConfigBadRequest) Code() int { - return 400 -} - -func (o *GetComponentLatestConfigBadRequest) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /v1/components/{component_id}/configs/latest][%d] getComponentLatestConfigBadRequest %s", 400, payload) -} - -func (o *GetComponentLatestConfigBadRequest) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /v1/components/{component_id}/configs/latest][%d] getComponentLatestConfigBadRequest %s", 400, payload) -} - -func (o *GetComponentLatestConfigBadRequest) GetPayload() *models.StderrErrResponse { - return o.Payload -} - -func (o *GetComponentLatestConfigBadRequest) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.StderrErrResponse) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewGetComponentLatestConfigUnauthorized creates a GetComponentLatestConfigUnauthorized with default headers values -func NewGetComponentLatestConfigUnauthorized() *GetComponentLatestConfigUnauthorized { - return &GetComponentLatestConfigUnauthorized{} -} - -/* -GetComponentLatestConfigUnauthorized describes a response with status code 401, with default header values. - -Unauthorized -*/ -type GetComponentLatestConfigUnauthorized struct { - Payload *models.StderrErrResponse -} - -// IsSuccess returns true when this get component latest config unauthorized response has a 2xx status code -func (o *GetComponentLatestConfigUnauthorized) IsSuccess() bool { - return false -} - -// IsRedirect returns true when this get component latest config unauthorized response has a 3xx status code -func (o *GetComponentLatestConfigUnauthorized) IsRedirect() bool { - return false -} - -// IsClientError returns true when this get component latest config unauthorized response has a 4xx status code -func (o *GetComponentLatestConfigUnauthorized) IsClientError() bool { - return true -} - -// IsServerError returns true when this get component latest config unauthorized response has a 5xx status code -func (o *GetComponentLatestConfigUnauthorized) IsServerError() bool { - return false -} - -// IsCode returns true when this get component latest config unauthorized response a status code equal to that given -func (o *GetComponentLatestConfigUnauthorized) IsCode(code int) bool { - return code == 401 -} - -// Code gets the status code for the get component latest config unauthorized response -func (o *GetComponentLatestConfigUnauthorized) Code() int { - return 401 -} - -func (o *GetComponentLatestConfigUnauthorized) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /v1/components/{component_id}/configs/latest][%d] getComponentLatestConfigUnauthorized %s", 401, payload) -} - -func (o *GetComponentLatestConfigUnauthorized) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /v1/components/{component_id}/configs/latest][%d] getComponentLatestConfigUnauthorized %s", 401, payload) -} - -func (o *GetComponentLatestConfigUnauthorized) GetPayload() *models.StderrErrResponse { - return o.Payload -} - -func (o *GetComponentLatestConfigUnauthorized) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.StderrErrResponse) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewGetComponentLatestConfigForbidden creates a GetComponentLatestConfigForbidden with default headers values -func NewGetComponentLatestConfigForbidden() *GetComponentLatestConfigForbidden { - return &GetComponentLatestConfigForbidden{} -} - -/* -GetComponentLatestConfigForbidden describes a response with status code 403, with default header values. - -Forbidden -*/ -type GetComponentLatestConfigForbidden struct { - Payload *models.StderrErrResponse -} - -// IsSuccess returns true when this get component latest config forbidden response has a 2xx status code -func (o *GetComponentLatestConfigForbidden) IsSuccess() bool { - return false -} - -// IsRedirect returns true when this get component latest config forbidden response has a 3xx status code -func (o *GetComponentLatestConfigForbidden) IsRedirect() bool { - return false -} - -// IsClientError returns true when this get component latest config forbidden response has a 4xx status code -func (o *GetComponentLatestConfigForbidden) IsClientError() bool { - return true -} - -// IsServerError returns true when this get component latest config forbidden response has a 5xx status code -func (o *GetComponentLatestConfigForbidden) IsServerError() bool { - return false -} - -// IsCode returns true when this get component latest config forbidden response a status code equal to that given -func (o *GetComponentLatestConfigForbidden) IsCode(code int) bool { - return code == 403 -} - -// Code gets the status code for the get component latest config forbidden response -func (o *GetComponentLatestConfigForbidden) Code() int { - return 403 -} - -func (o *GetComponentLatestConfigForbidden) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /v1/components/{component_id}/configs/latest][%d] getComponentLatestConfigForbidden %s", 403, payload) -} - -func (o *GetComponentLatestConfigForbidden) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /v1/components/{component_id}/configs/latest][%d] getComponentLatestConfigForbidden %s", 403, payload) -} - -func (o *GetComponentLatestConfigForbidden) GetPayload() *models.StderrErrResponse { - return o.Payload -} - -func (o *GetComponentLatestConfigForbidden) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.StderrErrResponse) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewGetComponentLatestConfigNotFound creates a GetComponentLatestConfigNotFound with default headers values -func NewGetComponentLatestConfigNotFound() *GetComponentLatestConfigNotFound { - return &GetComponentLatestConfigNotFound{} -} - -/* -GetComponentLatestConfigNotFound describes a response with status code 404, with default header values. - -Not Found -*/ -type GetComponentLatestConfigNotFound struct { - Payload *models.StderrErrResponse -} - -// IsSuccess returns true when this get component latest config not found response has a 2xx status code -func (o *GetComponentLatestConfigNotFound) IsSuccess() bool { - return false -} - -// IsRedirect returns true when this get component latest config not found response has a 3xx status code -func (o *GetComponentLatestConfigNotFound) IsRedirect() bool { - return false -} - -// IsClientError returns true when this get component latest config not found response has a 4xx status code -func (o *GetComponentLatestConfigNotFound) IsClientError() bool { - return true -} - -// IsServerError returns true when this get component latest config not found response has a 5xx status code -func (o *GetComponentLatestConfigNotFound) IsServerError() bool { - return false -} - -// IsCode returns true when this get component latest config not found response a status code equal to that given -func (o *GetComponentLatestConfigNotFound) IsCode(code int) bool { - return code == 404 -} - -// Code gets the status code for the get component latest config not found response -func (o *GetComponentLatestConfigNotFound) Code() int { - return 404 -} - -func (o *GetComponentLatestConfigNotFound) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /v1/components/{component_id}/configs/latest][%d] getComponentLatestConfigNotFound %s", 404, payload) -} - -func (o *GetComponentLatestConfigNotFound) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /v1/components/{component_id}/configs/latest][%d] getComponentLatestConfigNotFound %s", 404, payload) -} - -func (o *GetComponentLatestConfigNotFound) GetPayload() *models.StderrErrResponse { - return o.Payload -} - -func (o *GetComponentLatestConfigNotFound) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.StderrErrResponse) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewGetComponentLatestConfigInternalServerError creates a GetComponentLatestConfigInternalServerError with default headers values -func NewGetComponentLatestConfigInternalServerError() *GetComponentLatestConfigInternalServerError { - return &GetComponentLatestConfigInternalServerError{} -} - -/* -GetComponentLatestConfigInternalServerError describes a response with status code 500, with default header values. - -Internal Server Error -*/ -type GetComponentLatestConfigInternalServerError struct { - Payload *models.StderrErrResponse -} - -// IsSuccess returns true when this get component latest config internal server error response has a 2xx status code -func (o *GetComponentLatestConfigInternalServerError) IsSuccess() bool { - return false -} - -// IsRedirect returns true when this get component latest config internal server error response has a 3xx status code -func (o *GetComponentLatestConfigInternalServerError) IsRedirect() bool { - return false -} - -// IsClientError returns true when this get component latest config internal server error response has a 4xx status code -func (o *GetComponentLatestConfigInternalServerError) IsClientError() bool { - return false -} - -// IsServerError returns true when this get component latest config internal server error response has a 5xx status code -func (o *GetComponentLatestConfigInternalServerError) IsServerError() bool { - return true -} - -// IsCode returns true when this get component latest config internal server error response a status code equal to that given -func (o *GetComponentLatestConfigInternalServerError) IsCode(code int) bool { - return code == 500 -} - -// Code gets the status code for the get component latest config internal server error response -func (o *GetComponentLatestConfigInternalServerError) Code() int { - return 500 -} - -func (o *GetComponentLatestConfigInternalServerError) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /v1/components/{component_id}/configs/latest][%d] getComponentLatestConfigInternalServerError %s", 500, payload) -} - -func (o *GetComponentLatestConfigInternalServerError) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /v1/components/{component_id}/configs/latest][%d] getComponentLatestConfigInternalServerError %s", 500, payload) -} - -func (o *GetComponentLatestConfigInternalServerError) GetPayload() *models.StderrErrResponse { - return o.Payload -} - -func (o *GetComponentLatestConfigInternalServerError) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.StderrErrResponse) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} diff --git a/client/operations/get_component_parameters.go b/client/operations/get_component_parameters.go deleted file mode 100644 index f83c77f..0000000 --- a/client/operations/get_component_parameters.go +++ /dev/null @@ -1,151 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package operations - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "context" - "net/http" - "time" - - "github.com/go-openapi/errors" - "github.com/go-openapi/runtime" - cr "github.com/go-openapi/runtime/client" - "github.com/go-openapi/strfmt" -) - -// NewGetComponentParams creates a new GetComponentParams object, -// with the default timeout for this client. -// -// Default values are not hydrated, since defaults are normally applied by the API server side. -// -// To enforce default values in parameter, use SetDefaults or WithDefaults. -func NewGetComponentParams() *GetComponentParams { - return &GetComponentParams{ - timeout: cr.DefaultTimeout, - } -} - -// NewGetComponentParamsWithTimeout creates a new GetComponentParams object -// with the ability to set a timeout on a request. -func NewGetComponentParamsWithTimeout(timeout time.Duration) *GetComponentParams { - return &GetComponentParams{ - timeout: timeout, - } -} - -// NewGetComponentParamsWithContext creates a new GetComponentParams object -// with the ability to set a context for a request. -func NewGetComponentParamsWithContext(ctx context.Context) *GetComponentParams { - return &GetComponentParams{ - Context: ctx, - } -} - -// NewGetComponentParamsWithHTTPClient creates a new GetComponentParams object -// with the ability to set a custom HTTPClient for a request. -func NewGetComponentParamsWithHTTPClient(client *http.Client) *GetComponentParams { - return &GetComponentParams{ - HTTPClient: client, - } -} - -/* -GetComponentParams contains all the parameters to send to the API endpoint - - for the get component operation. - - Typically these are written to a http.Request. -*/ -type GetComponentParams struct { - - /* ComponentID. - - component ID - */ - ComponentID string - - timeout time.Duration - Context context.Context - HTTPClient *http.Client -} - -// WithDefaults hydrates default values in the get component params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *GetComponentParams) WithDefaults() *GetComponentParams { - o.SetDefaults() - return o -} - -// SetDefaults hydrates default values in the get component params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *GetComponentParams) SetDefaults() { - // no default values defined for this parameter -} - -// WithTimeout adds the timeout to the get component params -func (o *GetComponentParams) WithTimeout(timeout time.Duration) *GetComponentParams { - o.SetTimeout(timeout) - return o -} - -// SetTimeout adds the timeout to the get component params -func (o *GetComponentParams) SetTimeout(timeout time.Duration) { - o.timeout = timeout -} - -// WithContext adds the context to the get component params -func (o *GetComponentParams) WithContext(ctx context.Context) *GetComponentParams { - o.SetContext(ctx) - return o -} - -// SetContext adds the context to the get component params -func (o *GetComponentParams) SetContext(ctx context.Context) { - o.Context = ctx -} - -// WithHTTPClient adds the HTTPClient to the get component params -func (o *GetComponentParams) WithHTTPClient(client *http.Client) *GetComponentParams { - o.SetHTTPClient(client) - return o -} - -// SetHTTPClient adds the HTTPClient to the get component params -func (o *GetComponentParams) SetHTTPClient(client *http.Client) { - o.HTTPClient = client -} - -// WithComponentID adds the componentID to the get component params -func (o *GetComponentParams) WithComponentID(componentID string) *GetComponentParams { - o.SetComponentID(componentID) - return o -} - -// SetComponentID adds the componentId to the get component params -func (o *GetComponentParams) SetComponentID(componentID string) { - o.ComponentID = componentID -} - -// WriteToRequest writes these params to a swagger request -func (o *GetComponentParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { - - if err := r.SetTimeout(o.timeout); err != nil { - return err - } - var res []error - - // path param component_id - if err := r.SetPathParam("component_id", o.ComponentID); err != nil { - return err - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} diff --git a/client/operations/get_component_releases_parameters.go b/client/operations/get_component_releases_parameters.go deleted file mode 100644 index 7522d6e..0000000 --- a/client/operations/get_component_releases_parameters.go +++ /dev/null @@ -1,151 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package operations - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "context" - "net/http" - "time" - - "github.com/go-openapi/errors" - "github.com/go-openapi/runtime" - cr "github.com/go-openapi/runtime/client" - "github.com/go-openapi/strfmt" -) - -// NewGetComponentReleasesParams creates a new GetComponentReleasesParams object, -// with the default timeout for this client. -// -// Default values are not hydrated, since defaults are normally applied by the API server side. -// -// To enforce default values in parameter, use SetDefaults or WithDefaults. -func NewGetComponentReleasesParams() *GetComponentReleasesParams { - return &GetComponentReleasesParams{ - timeout: cr.DefaultTimeout, - } -} - -// NewGetComponentReleasesParamsWithTimeout creates a new GetComponentReleasesParams object -// with the ability to set a timeout on a request. -func NewGetComponentReleasesParamsWithTimeout(timeout time.Duration) *GetComponentReleasesParams { - return &GetComponentReleasesParams{ - timeout: timeout, - } -} - -// NewGetComponentReleasesParamsWithContext creates a new GetComponentReleasesParams object -// with the ability to set a context for a request. -func NewGetComponentReleasesParamsWithContext(ctx context.Context) *GetComponentReleasesParams { - return &GetComponentReleasesParams{ - Context: ctx, - } -} - -// NewGetComponentReleasesParamsWithHTTPClient creates a new GetComponentReleasesParams object -// with the ability to set a custom HTTPClient for a request. -func NewGetComponentReleasesParamsWithHTTPClient(client *http.Client) *GetComponentReleasesParams { - return &GetComponentReleasesParams{ - HTTPClient: client, - } -} - -/* -GetComponentReleasesParams contains all the parameters to send to the API endpoint - - for the get component releases operation. - - Typically these are written to a http.Request. -*/ -type GetComponentReleasesParams struct { - - /* ComponentID. - - component ID - */ - ComponentID string - - timeout time.Duration - Context context.Context - HTTPClient *http.Client -} - -// WithDefaults hydrates default values in the get component releases params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *GetComponentReleasesParams) WithDefaults() *GetComponentReleasesParams { - o.SetDefaults() - return o -} - -// SetDefaults hydrates default values in the get component releases params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *GetComponentReleasesParams) SetDefaults() { - // no default values defined for this parameter -} - -// WithTimeout adds the timeout to the get component releases params -func (o *GetComponentReleasesParams) WithTimeout(timeout time.Duration) *GetComponentReleasesParams { - o.SetTimeout(timeout) - return o -} - -// SetTimeout adds the timeout to the get component releases params -func (o *GetComponentReleasesParams) SetTimeout(timeout time.Duration) { - o.timeout = timeout -} - -// WithContext adds the context to the get component releases params -func (o *GetComponentReleasesParams) WithContext(ctx context.Context) *GetComponentReleasesParams { - o.SetContext(ctx) - return o -} - -// SetContext adds the context to the get component releases params -func (o *GetComponentReleasesParams) SetContext(ctx context.Context) { - o.Context = ctx -} - -// WithHTTPClient adds the HTTPClient to the get component releases params -func (o *GetComponentReleasesParams) WithHTTPClient(client *http.Client) *GetComponentReleasesParams { - o.SetHTTPClient(client) - return o -} - -// SetHTTPClient adds the HTTPClient to the get component releases params -func (o *GetComponentReleasesParams) SetHTTPClient(client *http.Client) { - o.HTTPClient = client -} - -// WithComponentID adds the componentID to the get component releases params -func (o *GetComponentReleasesParams) WithComponentID(componentID string) *GetComponentReleasesParams { - o.SetComponentID(componentID) - return o -} - -// SetComponentID adds the componentId to the get component releases params -func (o *GetComponentReleasesParams) SetComponentID(componentID string) { - o.ComponentID = componentID -} - -// WriteToRequest writes these params to a swagger request -func (o *GetComponentReleasesParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { - - if err := r.SetTimeout(o.timeout); err != nil { - return err - } - var res []error - - // path param component_id - if err := r.SetPathParam("component_id", o.ComponentID); err != nil { - return err - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} diff --git a/client/operations/get_component_releases_responses.go b/client/operations/get_component_releases_responses.go deleted file mode 100644 index 7d01ee9..0000000 --- a/client/operations/get_component_releases_responses.go +++ /dev/null @@ -1,484 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package operations - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "encoding/json" - "fmt" - "io" - - "github.com/go-openapi/runtime" - "github.com/go-openapi/strfmt" - - "github.com/nuonco/nuon-go/models" -) - -// GetComponentReleasesReader is a Reader for the GetComponentReleases structure. -type GetComponentReleasesReader struct { - formats strfmt.Registry -} - -// ReadResponse reads a server response into the received o. -func (o *GetComponentReleasesReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { - switch response.Code() { - case 200: - result := NewGetComponentReleasesOK() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return result, nil - case 400: - result := NewGetComponentReleasesBadRequest() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return nil, result - case 401: - result := NewGetComponentReleasesUnauthorized() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return nil, result - case 403: - result := NewGetComponentReleasesForbidden() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return nil, result - case 404: - result := NewGetComponentReleasesNotFound() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return nil, result - case 500: - result := NewGetComponentReleasesInternalServerError() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return nil, result - default: - return nil, runtime.NewAPIError("[GET /v1/components/{component_id}/releases] GetComponentReleases", response, response.Code()) - } -} - -// NewGetComponentReleasesOK creates a GetComponentReleasesOK with default headers values -func NewGetComponentReleasesOK() *GetComponentReleasesOK { - return &GetComponentReleasesOK{} -} - -/* -GetComponentReleasesOK describes a response with status code 200, with default header values. - -OK -*/ -type GetComponentReleasesOK struct { - Payload []*models.AppComponentRelease -} - -// IsSuccess returns true when this get component releases o k response has a 2xx status code -func (o *GetComponentReleasesOK) IsSuccess() bool { - return true -} - -// IsRedirect returns true when this get component releases o k response has a 3xx status code -func (o *GetComponentReleasesOK) IsRedirect() bool { - return false -} - -// IsClientError returns true when this get component releases o k response has a 4xx status code -func (o *GetComponentReleasesOK) IsClientError() bool { - return false -} - -// IsServerError returns true when this get component releases o k response has a 5xx status code -func (o *GetComponentReleasesOK) IsServerError() bool { - return false -} - -// IsCode returns true when this get component releases o k response a status code equal to that given -func (o *GetComponentReleasesOK) IsCode(code int) bool { - return code == 200 -} - -// Code gets the status code for the get component releases o k response -func (o *GetComponentReleasesOK) Code() int { - return 200 -} - -func (o *GetComponentReleasesOK) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /v1/components/{component_id}/releases][%d] getComponentReleasesOK %s", 200, payload) -} - -func (o *GetComponentReleasesOK) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /v1/components/{component_id}/releases][%d] getComponentReleasesOK %s", 200, payload) -} - -func (o *GetComponentReleasesOK) GetPayload() []*models.AppComponentRelease { - return o.Payload -} - -func (o *GetComponentReleasesOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - // response payload - if err := consumer.Consume(response.Body(), &o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewGetComponentReleasesBadRequest creates a GetComponentReleasesBadRequest with default headers values -func NewGetComponentReleasesBadRequest() *GetComponentReleasesBadRequest { - return &GetComponentReleasesBadRequest{} -} - -/* -GetComponentReleasesBadRequest describes a response with status code 400, with default header values. - -Bad Request -*/ -type GetComponentReleasesBadRequest struct { - Payload *models.StderrErrResponse -} - -// IsSuccess returns true when this get component releases bad request response has a 2xx status code -func (o *GetComponentReleasesBadRequest) IsSuccess() bool { - return false -} - -// IsRedirect returns true when this get component releases bad request response has a 3xx status code -func (o *GetComponentReleasesBadRequest) IsRedirect() bool { - return false -} - -// IsClientError returns true when this get component releases bad request response has a 4xx status code -func (o *GetComponentReleasesBadRequest) IsClientError() bool { - return true -} - -// IsServerError returns true when this get component releases bad request response has a 5xx status code -func (o *GetComponentReleasesBadRequest) IsServerError() bool { - return false -} - -// IsCode returns true when this get component releases bad request response a status code equal to that given -func (o *GetComponentReleasesBadRequest) IsCode(code int) bool { - return code == 400 -} - -// Code gets the status code for the get component releases bad request response -func (o *GetComponentReleasesBadRequest) Code() int { - return 400 -} - -func (o *GetComponentReleasesBadRequest) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /v1/components/{component_id}/releases][%d] getComponentReleasesBadRequest %s", 400, payload) -} - -func (o *GetComponentReleasesBadRequest) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /v1/components/{component_id}/releases][%d] getComponentReleasesBadRequest %s", 400, payload) -} - -func (o *GetComponentReleasesBadRequest) GetPayload() *models.StderrErrResponse { - return o.Payload -} - -func (o *GetComponentReleasesBadRequest) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.StderrErrResponse) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewGetComponentReleasesUnauthorized creates a GetComponentReleasesUnauthorized with default headers values -func NewGetComponentReleasesUnauthorized() *GetComponentReleasesUnauthorized { - return &GetComponentReleasesUnauthorized{} -} - -/* -GetComponentReleasesUnauthorized describes a response with status code 401, with default header values. - -Unauthorized -*/ -type GetComponentReleasesUnauthorized struct { - Payload *models.StderrErrResponse -} - -// IsSuccess returns true when this get component releases unauthorized response has a 2xx status code -func (o *GetComponentReleasesUnauthorized) IsSuccess() bool { - return false -} - -// IsRedirect returns true when this get component releases unauthorized response has a 3xx status code -func (o *GetComponentReleasesUnauthorized) IsRedirect() bool { - return false -} - -// IsClientError returns true when this get component releases unauthorized response has a 4xx status code -func (o *GetComponentReleasesUnauthorized) IsClientError() bool { - return true -} - -// IsServerError returns true when this get component releases unauthorized response has a 5xx status code -func (o *GetComponentReleasesUnauthorized) IsServerError() bool { - return false -} - -// IsCode returns true when this get component releases unauthorized response a status code equal to that given -func (o *GetComponentReleasesUnauthorized) IsCode(code int) bool { - return code == 401 -} - -// Code gets the status code for the get component releases unauthorized response -func (o *GetComponentReleasesUnauthorized) Code() int { - return 401 -} - -func (o *GetComponentReleasesUnauthorized) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /v1/components/{component_id}/releases][%d] getComponentReleasesUnauthorized %s", 401, payload) -} - -func (o *GetComponentReleasesUnauthorized) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /v1/components/{component_id}/releases][%d] getComponentReleasesUnauthorized %s", 401, payload) -} - -func (o *GetComponentReleasesUnauthorized) GetPayload() *models.StderrErrResponse { - return o.Payload -} - -func (o *GetComponentReleasesUnauthorized) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.StderrErrResponse) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewGetComponentReleasesForbidden creates a GetComponentReleasesForbidden with default headers values -func NewGetComponentReleasesForbidden() *GetComponentReleasesForbidden { - return &GetComponentReleasesForbidden{} -} - -/* -GetComponentReleasesForbidden describes a response with status code 403, with default header values. - -Forbidden -*/ -type GetComponentReleasesForbidden struct { - Payload *models.StderrErrResponse -} - -// IsSuccess returns true when this get component releases forbidden response has a 2xx status code -func (o *GetComponentReleasesForbidden) IsSuccess() bool { - return false -} - -// IsRedirect returns true when this get component releases forbidden response has a 3xx status code -func (o *GetComponentReleasesForbidden) IsRedirect() bool { - return false -} - -// IsClientError returns true when this get component releases forbidden response has a 4xx status code -func (o *GetComponentReleasesForbidden) IsClientError() bool { - return true -} - -// IsServerError returns true when this get component releases forbidden response has a 5xx status code -func (o *GetComponentReleasesForbidden) IsServerError() bool { - return false -} - -// IsCode returns true when this get component releases forbidden response a status code equal to that given -func (o *GetComponentReleasesForbidden) IsCode(code int) bool { - return code == 403 -} - -// Code gets the status code for the get component releases forbidden response -func (o *GetComponentReleasesForbidden) Code() int { - return 403 -} - -func (o *GetComponentReleasesForbidden) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /v1/components/{component_id}/releases][%d] getComponentReleasesForbidden %s", 403, payload) -} - -func (o *GetComponentReleasesForbidden) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /v1/components/{component_id}/releases][%d] getComponentReleasesForbidden %s", 403, payload) -} - -func (o *GetComponentReleasesForbidden) GetPayload() *models.StderrErrResponse { - return o.Payload -} - -func (o *GetComponentReleasesForbidden) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.StderrErrResponse) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewGetComponentReleasesNotFound creates a GetComponentReleasesNotFound with default headers values -func NewGetComponentReleasesNotFound() *GetComponentReleasesNotFound { - return &GetComponentReleasesNotFound{} -} - -/* -GetComponentReleasesNotFound describes a response with status code 404, with default header values. - -Not Found -*/ -type GetComponentReleasesNotFound struct { - Payload *models.StderrErrResponse -} - -// IsSuccess returns true when this get component releases not found response has a 2xx status code -func (o *GetComponentReleasesNotFound) IsSuccess() bool { - return false -} - -// IsRedirect returns true when this get component releases not found response has a 3xx status code -func (o *GetComponentReleasesNotFound) IsRedirect() bool { - return false -} - -// IsClientError returns true when this get component releases not found response has a 4xx status code -func (o *GetComponentReleasesNotFound) IsClientError() bool { - return true -} - -// IsServerError returns true when this get component releases not found response has a 5xx status code -func (o *GetComponentReleasesNotFound) IsServerError() bool { - return false -} - -// IsCode returns true when this get component releases not found response a status code equal to that given -func (o *GetComponentReleasesNotFound) IsCode(code int) bool { - return code == 404 -} - -// Code gets the status code for the get component releases not found response -func (o *GetComponentReleasesNotFound) Code() int { - return 404 -} - -func (o *GetComponentReleasesNotFound) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /v1/components/{component_id}/releases][%d] getComponentReleasesNotFound %s", 404, payload) -} - -func (o *GetComponentReleasesNotFound) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /v1/components/{component_id}/releases][%d] getComponentReleasesNotFound %s", 404, payload) -} - -func (o *GetComponentReleasesNotFound) GetPayload() *models.StderrErrResponse { - return o.Payload -} - -func (o *GetComponentReleasesNotFound) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.StderrErrResponse) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewGetComponentReleasesInternalServerError creates a GetComponentReleasesInternalServerError with default headers values -func NewGetComponentReleasesInternalServerError() *GetComponentReleasesInternalServerError { - return &GetComponentReleasesInternalServerError{} -} - -/* -GetComponentReleasesInternalServerError describes a response with status code 500, with default header values. - -Internal Server Error -*/ -type GetComponentReleasesInternalServerError struct { - Payload *models.StderrErrResponse -} - -// IsSuccess returns true when this get component releases internal server error response has a 2xx status code -func (o *GetComponentReleasesInternalServerError) IsSuccess() bool { - return false -} - -// IsRedirect returns true when this get component releases internal server error response has a 3xx status code -func (o *GetComponentReleasesInternalServerError) IsRedirect() bool { - return false -} - -// IsClientError returns true when this get component releases internal server error response has a 4xx status code -func (o *GetComponentReleasesInternalServerError) IsClientError() bool { - return false -} - -// IsServerError returns true when this get component releases internal server error response has a 5xx status code -func (o *GetComponentReleasesInternalServerError) IsServerError() bool { - return true -} - -// IsCode returns true when this get component releases internal server error response a status code equal to that given -func (o *GetComponentReleasesInternalServerError) IsCode(code int) bool { - return code == 500 -} - -// Code gets the status code for the get component releases internal server error response -func (o *GetComponentReleasesInternalServerError) Code() int { - return 500 -} - -func (o *GetComponentReleasesInternalServerError) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /v1/components/{component_id}/releases][%d] getComponentReleasesInternalServerError %s", 500, payload) -} - -func (o *GetComponentReleasesInternalServerError) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /v1/components/{component_id}/releases][%d] getComponentReleasesInternalServerError %s", 500, payload) -} - -func (o *GetComponentReleasesInternalServerError) GetPayload() *models.StderrErrResponse { - return o.Payload -} - -func (o *GetComponentReleasesInternalServerError) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.StderrErrResponse) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} diff --git a/client/operations/get_component_responses.go b/client/operations/get_component_responses.go deleted file mode 100644 index bcc2e1b..0000000 --- a/client/operations/get_component_responses.go +++ /dev/null @@ -1,486 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package operations - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "encoding/json" - "fmt" - "io" - - "github.com/go-openapi/runtime" - "github.com/go-openapi/strfmt" - - "github.com/nuonco/nuon-go/models" -) - -// GetComponentReader is a Reader for the GetComponent structure. -type GetComponentReader struct { - formats strfmt.Registry -} - -// ReadResponse reads a server response into the received o. -func (o *GetComponentReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { - switch response.Code() { - case 200: - result := NewGetComponentOK() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return result, nil - case 400: - result := NewGetComponentBadRequest() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return nil, result - case 401: - result := NewGetComponentUnauthorized() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return nil, result - case 403: - result := NewGetComponentForbidden() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return nil, result - case 404: - result := NewGetComponentNotFound() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return nil, result - case 500: - result := NewGetComponentInternalServerError() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return nil, result - default: - return nil, runtime.NewAPIError("[GET /v1/components/{component_id}] GetComponent", response, response.Code()) - } -} - -// NewGetComponentOK creates a GetComponentOK with default headers values -func NewGetComponentOK() *GetComponentOK { - return &GetComponentOK{} -} - -/* -GetComponentOK describes a response with status code 200, with default header values. - -OK -*/ -type GetComponentOK struct { - Payload *models.AppComponent -} - -// IsSuccess returns true when this get component o k response has a 2xx status code -func (o *GetComponentOK) IsSuccess() bool { - return true -} - -// IsRedirect returns true when this get component o k response has a 3xx status code -func (o *GetComponentOK) IsRedirect() bool { - return false -} - -// IsClientError returns true when this get component o k response has a 4xx status code -func (o *GetComponentOK) IsClientError() bool { - return false -} - -// IsServerError returns true when this get component o k response has a 5xx status code -func (o *GetComponentOK) IsServerError() bool { - return false -} - -// IsCode returns true when this get component o k response a status code equal to that given -func (o *GetComponentOK) IsCode(code int) bool { - return code == 200 -} - -// Code gets the status code for the get component o k response -func (o *GetComponentOK) Code() int { - return 200 -} - -func (o *GetComponentOK) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /v1/components/{component_id}][%d] getComponentOK %s", 200, payload) -} - -func (o *GetComponentOK) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /v1/components/{component_id}][%d] getComponentOK %s", 200, payload) -} - -func (o *GetComponentOK) GetPayload() *models.AppComponent { - return o.Payload -} - -func (o *GetComponentOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.AppComponent) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewGetComponentBadRequest creates a GetComponentBadRequest with default headers values -func NewGetComponentBadRequest() *GetComponentBadRequest { - return &GetComponentBadRequest{} -} - -/* -GetComponentBadRequest describes a response with status code 400, with default header values. - -Bad Request -*/ -type GetComponentBadRequest struct { - Payload *models.StderrErrResponse -} - -// IsSuccess returns true when this get component bad request response has a 2xx status code -func (o *GetComponentBadRequest) IsSuccess() bool { - return false -} - -// IsRedirect returns true when this get component bad request response has a 3xx status code -func (o *GetComponentBadRequest) IsRedirect() bool { - return false -} - -// IsClientError returns true when this get component bad request response has a 4xx status code -func (o *GetComponentBadRequest) IsClientError() bool { - return true -} - -// IsServerError returns true when this get component bad request response has a 5xx status code -func (o *GetComponentBadRequest) IsServerError() bool { - return false -} - -// IsCode returns true when this get component bad request response a status code equal to that given -func (o *GetComponentBadRequest) IsCode(code int) bool { - return code == 400 -} - -// Code gets the status code for the get component bad request response -func (o *GetComponentBadRequest) Code() int { - return 400 -} - -func (o *GetComponentBadRequest) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /v1/components/{component_id}][%d] getComponentBadRequest %s", 400, payload) -} - -func (o *GetComponentBadRequest) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /v1/components/{component_id}][%d] getComponentBadRequest %s", 400, payload) -} - -func (o *GetComponentBadRequest) GetPayload() *models.StderrErrResponse { - return o.Payload -} - -func (o *GetComponentBadRequest) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.StderrErrResponse) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewGetComponentUnauthorized creates a GetComponentUnauthorized with default headers values -func NewGetComponentUnauthorized() *GetComponentUnauthorized { - return &GetComponentUnauthorized{} -} - -/* -GetComponentUnauthorized describes a response with status code 401, with default header values. - -Unauthorized -*/ -type GetComponentUnauthorized struct { - Payload *models.StderrErrResponse -} - -// IsSuccess returns true when this get component unauthorized response has a 2xx status code -func (o *GetComponentUnauthorized) IsSuccess() bool { - return false -} - -// IsRedirect returns true when this get component unauthorized response has a 3xx status code -func (o *GetComponentUnauthorized) IsRedirect() bool { - return false -} - -// IsClientError returns true when this get component unauthorized response has a 4xx status code -func (o *GetComponentUnauthorized) IsClientError() bool { - return true -} - -// IsServerError returns true when this get component unauthorized response has a 5xx status code -func (o *GetComponentUnauthorized) IsServerError() bool { - return false -} - -// IsCode returns true when this get component unauthorized response a status code equal to that given -func (o *GetComponentUnauthorized) IsCode(code int) bool { - return code == 401 -} - -// Code gets the status code for the get component unauthorized response -func (o *GetComponentUnauthorized) Code() int { - return 401 -} - -func (o *GetComponentUnauthorized) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /v1/components/{component_id}][%d] getComponentUnauthorized %s", 401, payload) -} - -func (o *GetComponentUnauthorized) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /v1/components/{component_id}][%d] getComponentUnauthorized %s", 401, payload) -} - -func (o *GetComponentUnauthorized) GetPayload() *models.StderrErrResponse { - return o.Payload -} - -func (o *GetComponentUnauthorized) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.StderrErrResponse) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewGetComponentForbidden creates a GetComponentForbidden with default headers values -func NewGetComponentForbidden() *GetComponentForbidden { - return &GetComponentForbidden{} -} - -/* -GetComponentForbidden describes a response with status code 403, with default header values. - -Forbidden -*/ -type GetComponentForbidden struct { - Payload *models.StderrErrResponse -} - -// IsSuccess returns true when this get component forbidden response has a 2xx status code -func (o *GetComponentForbidden) IsSuccess() bool { - return false -} - -// IsRedirect returns true when this get component forbidden response has a 3xx status code -func (o *GetComponentForbidden) IsRedirect() bool { - return false -} - -// IsClientError returns true when this get component forbidden response has a 4xx status code -func (o *GetComponentForbidden) IsClientError() bool { - return true -} - -// IsServerError returns true when this get component forbidden response has a 5xx status code -func (o *GetComponentForbidden) IsServerError() bool { - return false -} - -// IsCode returns true when this get component forbidden response a status code equal to that given -func (o *GetComponentForbidden) IsCode(code int) bool { - return code == 403 -} - -// Code gets the status code for the get component forbidden response -func (o *GetComponentForbidden) Code() int { - return 403 -} - -func (o *GetComponentForbidden) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /v1/components/{component_id}][%d] getComponentForbidden %s", 403, payload) -} - -func (o *GetComponentForbidden) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /v1/components/{component_id}][%d] getComponentForbidden %s", 403, payload) -} - -func (o *GetComponentForbidden) GetPayload() *models.StderrErrResponse { - return o.Payload -} - -func (o *GetComponentForbidden) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.StderrErrResponse) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewGetComponentNotFound creates a GetComponentNotFound with default headers values -func NewGetComponentNotFound() *GetComponentNotFound { - return &GetComponentNotFound{} -} - -/* -GetComponentNotFound describes a response with status code 404, with default header values. - -Not Found -*/ -type GetComponentNotFound struct { - Payload *models.StderrErrResponse -} - -// IsSuccess returns true when this get component not found response has a 2xx status code -func (o *GetComponentNotFound) IsSuccess() bool { - return false -} - -// IsRedirect returns true when this get component not found response has a 3xx status code -func (o *GetComponentNotFound) IsRedirect() bool { - return false -} - -// IsClientError returns true when this get component not found response has a 4xx status code -func (o *GetComponentNotFound) IsClientError() bool { - return true -} - -// IsServerError returns true when this get component not found response has a 5xx status code -func (o *GetComponentNotFound) IsServerError() bool { - return false -} - -// IsCode returns true when this get component not found response a status code equal to that given -func (o *GetComponentNotFound) IsCode(code int) bool { - return code == 404 -} - -// Code gets the status code for the get component not found response -func (o *GetComponentNotFound) Code() int { - return 404 -} - -func (o *GetComponentNotFound) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /v1/components/{component_id}][%d] getComponentNotFound %s", 404, payload) -} - -func (o *GetComponentNotFound) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /v1/components/{component_id}][%d] getComponentNotFound %s", 404, payload) -} - -func (o *GetComponentNotFound) GetPayload() *models.StderrErrResponse { - return o.Payload -} - -func (o *GetComponentNotFound) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.StderrErrResponse) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewGetComponentInternalServerError creates a GetComponentInternalServerError with default headers values -func NewGetComponentInternalServerError() *GetComponentInternalServerError { - return &GetComponentInternalServerError{} -} - -/* -GetComponentInternalServerError describes a response with status code 500, with default header values. - -Internal Server Error -*/ -type GetComponentInternalServerError struct { - Payload *models.StderrErrResponse -} - -// IsSuccess returns true when this get component internal server error response has a 2xx status code -func (o *GetComponentInternalServerError) IsSuccess() bool { - return false -} - -// IsRedirect returns true when this get component internal server error response has a 3xx status code -func (o *GetComponentInternalServerError) IsRedirect() bool { - return false -} - -// IsClientError returns true when this get component internal server error response has a 4xx status code -func (o *GetComponentInternalServerError) IsClientError() bool { - return false -} - -// IsServerError returns true when this get component internal server error response has a 5xx status code -func (o *GetComponentInternalServerError) IsServerError() bool { - return true -} - -// IsCode returns true when this get component internal server error response a status code equal to that given -func (o *GetComponentInternalServerError) IsCode(code int) bool { - return code == 500 -} - -// Code gets the status code for the get component internal server error response -func (o *GetComponentInternalServerError) Code() int { - return 500 -} - -func (o *GetComponentInternalServerError) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /v1/components/{component_id}][%d] getComponentInternalServerError %s", 500, payload) -} - -func (o *GetComponentInternalServerError) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /v1/components/{component_id}][%d] getComponentInternalServerError %s", 500, payload) -} - -func (o *GetComponentInternalServerError) GetPayload() *models.StderrErrResponse { - return o.Payload -} - -func (o *GetComponentInternalServerError) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.StderrErrResponse) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} diff --git a/client/operations/get_current_install_inputs_parameters.go b/client/operations/get_current_install_inputs_parameters.go deleted file mode 100644 index ace9225..0000000 --- a/client/operations/get_current_install_inputs_parameters.go +++ /dev/null @@ -1,151 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package operations - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "context" - "net/http" - "time" - - "github.com/go-openapi/errors" - "github.com/go-openapi/runtime" - cr "github.com/go-openapi/runtime/client" - "github.com/go-openapi/strfmt" -) - -// NewGetCurrentInstallInputsParams creates a new GetCurrentInstallInputsParams object, -// with the default timeout for this client. -// -// Default values are not hydrated, since defaults are normally applied by the API server side. -// -// To enforce default values in parameter, use SetDefaults or WithDefaults. -func NewGetCurrentInstallInputsParams() *GetCurrentInstallInputsParams { - return &GetCurrentInstallInputsParams{ - timeout: cr.DefaultTimeout, - } -} - -// NewGetCurrentInstallInputsParamsWithTimeout creates a new GetCurrentInstallInputsParams object -// with the ability to set a timeout on a request. -func NewGetCurrentInstallInputsParamsWithTimeout(timeout time.Duration) *GetCurrentInstallInputsParams { - return &GetCurrentInstallInputsParams{ - timeout: timeout, - } -} - -// NewGetCurrentInstallInputsParamsWithContext creates a new GetCurrentInstallInputsParams object -// with the ability to set a context for a request. -func NewGetCurrentInstallInputsParamsWithContext(ctx context.Context) *GetCurrentInstallInputsParams { - return &GetCurrentInstallInputsParams{ - Context: ctx, - } -} - -// NewGetCurrentInstallInputsParamsWithHTTPClient creates a new GetCurrentInstallInputsParams object -// with the ability to set a custom HTTPClient for a request. -func NewGetCurrentInstallInputsParamsWithHTTPClient(client *http.Client) *GetCurrentInstallInputsParams { - return &GetCurrentInstallInputsParams{ - HTTPClient: client, - } -} - -/* -GetCurrentInstallInputsParams contains all the parameters to send to the API endpoint - - for the get current install inputs operation. - - Typically these are written to a http.Request. -*/ -type GetCurrentInstallInputsParams struct { - - /* InstallID. - - install ID - */ - InstallID string - - timeout time.Duration - Context context.Context - HTTPClient *http.Client -} - -// WithDefaults hydrates default values in the get current install inputs params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *GetCurrentInstallInputsParams) WithDefaults() *GetCurrentInstallInputsParams { - o.SetDefaults() - return o -} - -// SetDefaults hydrates default values in the get current install inputs params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *GetCurrentInstallInputsParams) SetDefaults() { - // no default values defined for this parameter -} - -// WithTimeout adds the timeout to the get current install inputs params -func (o *GetCurrentInstallInputsParams) WithTimeout(timeout time.Duration) *GetCurrentInstallInputsParams { - o.SetTimeout(timeout) - return o -} - -// SetTimeout adds the timeout to the get current install inputs params -func (o *GetCurrentInstallInputsParams) SetTimeout(timeout time.Duration) { - o.timeout = timeout -} - -// WithContext adds the context to the get current install inputs params -func (o *GetCurrentInstallInputsParams) WithContext(ctx context.Context) *GetCurrentInstallInputsParams { - o.SetContext(ctx) - return o -} - -// SetContext adds the context to the get current install inputs params -func (o *GetCurrentInstallInputsParams) SetContext(ctx context.Context) { - o.Context = ctx -} - -// WithHTTPClient adds the HTTPClient to the get current install inputs params -func (o *GetCurrentInstallInputsParams) WithHTTPClient(client *http.Client) *GetCurrentInstallInputsParams { - o.SetHTTPClient(client) - return o -} - -// SetHTTPClient adds the HTTPClient to the get current install inputs params -func (o *GetCurrentInstallInputsParams) SetHTTPClient(client *http.Client) { - o.HTTPClient = client -} - -// WithInstallID adds the installID to the get current install inputs params -func (o *GetCurrentInstallInputsParams) WithInstallID(installID string) *GetCurrentInstallInputsParams { - o.SetInstallID(installID) - return o -} - -// SetInstallID adds the installId to the get current install inputs params -func (o *GetCurrentInstallInputsParams) SetInstallID(installID string) { - o.InstallID = installID -} - -// WriteToRequest writes these params to a swagger request -func (o *GetCurrentInstallInputsParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { - - if err := r.SetTimeout(o.timeout); err != nil { - return err - } - var res []error - - // path param install_id - if err := r.SetPathParam("install_id", o.InstallID); err != nil { - return err - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} diff --git a/client/operations/get_current_install_inputs_responses.go b/client/operations/get_current_install_inputs_responses.go deleted file mode 100644 index cffa67a..0000000 --- a/client/operations/get_current_install_inputs_responses.go +++ /dev/null @@ -1,486 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package operations - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "encoding/json" - "fmt" - "io" - - "github.com/go-openapi/runtime" - "github.com/go-openapi/strfmt" - - "github.com/nuonco/nuon-go/models" -) - -// GetCurrentInstallInputsReader is a Reader for the GetCurrentInstallInputs structure. -type GetCurrentInstallInputsReader struct { - formats strfmt.Registry -} - -// ReadResponse reads a server response into the received o. -func (o *GetCurrentInstallInputsReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { - switch response.Code() { - case 200: - result := NewGetCurrentInstallInputsOK() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return result, nil - case 400: - result := NewGetCurrentInstallInputsBadRequest() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return nil, result - case 401: - result := NewGetCurrentInstallInputsUnauthorized() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return nil, result - case 403: - result := NewGetCurrentInstallInputsForbidden() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return nil, result - case 404: - result := NewGetCurrentInstallInputsNotFound() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return nil, result - case 500: - result := NewGetCurrentInstallInputsInternalServerError() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return nil, result - default: - return nil, runtime.NewAPIError("[GET /v1/installs/{install_id}/inputs/current] GetCurrentInstallInputs", response, response.Code()) - } -} - -// NewGetCurrentInstallInputsOK creates a GetCurrentInstallInputsOK with default headers values -func NewGetCurrentInstallInputsOK() *GetCurrentInstallInputsOK { - return &GetCurrentInstallInputsOK{} -} - -/* -GetCurrentInstallInputsOK describes a response with status code 200, with default header values. - -OK -*/ -type GetCurrentInstallInputsOK struct { - Payload *models.AppInstallInputs -} - -// IsSuccess returns true when this get current install inputs o k response has a 2xx status code -func (o *GetCurrentInstallInputsOK) IsSuccess() bool { - return true -} - -// IsRedirect returns true when this get current install inputs o k response has a 3xx status code -func (o *GetCurrentInstallInputsOK) IsRedirect() bool { - return false -} - -// IsClientError returns true when this get current install inputs o k response has a 4xx status code -func (o *GetCurrentInstallInputsOK) IsClientError() bool { - return false -} - -// IsServerError returns true when this get current install inputs o k response has a 5xx status code -func (o *GetCurrentInstallInputsOK) IsServerError() bool { - return false -} - -// IsCode returns true when this get current install inputs o k response a status code equal to that given -func (o *GetCurrentInstallInputsOK) IsCode(code int) bool { - return code == 200 -} - -// Code gets the status code for the get current install inputs o k response -func (o *GetCurrentInstallInputsOK) Code() int { - return 200 -} - -func (o *GetCurrentInstallInputsOK) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /v1/installs/{install_id}/inputs/current][%d] getCurrentInstallInputsOK %s", 200, payload) -} - -func (o *GetCurrentInstallInputsOK) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /v1/installs/{install_id}/inputs/current][%d] getCurrentInstallInputsOK %s", 200, payload) -} - -func (o *GetCurrentInstallInputsOK) GetPayload() *models.AppInstallInputs { - return o.Payload -} - -func (o *GetCurrentInstallInputsOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.AppInstallInputs) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewGetCurrentInstallInputsBadRequest creates a GetCurrentInstallInputsBadRequest with default headers values -func NewGetCurrentInstallInputsBadRequest() *GetCurrentInstallInputsBadRequest { - return &GetCurrentInstallInputsBadRequest{} -} - -/* -GetCurrentInstallInputsBadRequest describes a response with status code 400, with default header values. - -Bad Request -*/ -type GetCurrentInstallInputsBadRequest struct { - Payload *models.StderrErrResponse -} - -// IsSuccess returns true when this get current install inputs bad request response has a 2xx status code -func (o *GetCurrentInstallInputsBadRequest) IsSuccess() bool { - return false -} - -// IsRedirect returns true when this get current install inputs bad request response has a 3xx status code -func (o *GetCurrentInstallInputsBadRequest) IsRedirect() bool { - return false -} - -// IsClientError returns true when this get current install inputs bad request response has a 4xx status code -func (o *GetCurrentInstallInputsBadRequest) IsClientError() bool { - return true -} - -// IsServerError returns true when this get current install inputs bad request response has a 5xx status code -func (o *GetCurrentInstallInputsBadRequest) IsServerError() bool { - return false -} - -// IsCode returns true when this get current install inputs bad request response a status code equal to that given -func (o *GetCurrentInstallInputsBadRequest) IsCode(code int) bool { - return code == 400 -} - -// Code gets the status code for the get current install inputs bad request response -func (o *GetCurrentInstallInputsBadRequest) Code() int { - return 400 -} - -func (o *GetCurrentInstallInputsBadRequest) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /v1/installs/{install_id}/inputs/current][%d] getCurrentInstallInputsBadRequest %s", 400, payload) -} - -func (o *GetCurrentInstallInputsBadRequest) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /v1/installs/{install_id}/inputs/current][%d] getCurrentInstallInputsBadRequest %s", 400, payload) -} - -func (o *GetCurrentInstallInputsBadRequest) GetPayload() *models.StderrErrResponse { - return o.Payload -} - -func (o *GetCurrentInstallInputsBadRequest) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.StderrErrResponse) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewGetCurrentInstallInputsUnauthorized creates a GetCurrentInstallInputsUnauthorized with default headers values -func NewGetCurrentInstallInputsUnauthorized() *GetCurrentInstallInputsUnauthorized { - return &GetCurrentInstallInputsUnauthorized{} -} - -/* -GetCurrentInstallInputsUnauthorized describes a response with status code 401, with default header values. - -Unauthorized -*/ -type GetCurrentInstallInputsUnauthorized struct { - Payload *models.StderrErrResponse -} - -// IsSuccess returns true when this get current install inputs unauthorized response has a 2xx status code -func (o *GetCurrentInstallInputsUnauthorized) IsSuccess() bool { - return false -} - -// IsRedirect returns true when this get current install inputs unauthorized response has a 3xx status code -func (o *GetCurrentInstallInputsUnauthorized) IsRedirect() bool { - return false -} - -// IsClientError returns true when this get current install inputs unauthorized response has a 4xx status code -func (o *GetCurrentInstallInputsUnauthorized) IsClientError() bool { - return true -} - -// IsServerError returns true when this get current install inputs unauthorized response has a 5xx status code -func (o *GetCurrentInstallInputsUnauthorized) IsServerError() bool { - return false -} - -// IsCode returns true when this get current install inputs unauthorized response a status code equal to that given -func (o *GetCurrentInstallInputsUnauthorized) IsCode(code int) bool { - return code == 401 -} - -// Code gets the status code for the get current install inputs unauthorized response -func (o *GetCurrentInstallInputsUnauthorized) Code() int { - return 401 -} - -func (o *GetCurrentInstallInputsUnauthorized) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /v1/installs/{install_id}/inputs/current][%d] getCurrentInstallInputsUnauthorized %s", 401, payload) -} - -func (o *GetCurrentInstallInputsUnauthorized) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /v1/installs/{install_id}/inputs/current][%d] getCurrentInstallInputsUnauthorized %s", 401, payload) -} - -func (o *GetCurrentInstallInputsUnauthorized) GetPayload() *models.StderrErrResponse { - return o.Payload -} - -func (o *GetCurrentInstallInputsUnauthorized) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.StderrErrResponse) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewGetCurrentInstallInputsForbidden creates a GetCurrentInstallInputsForbidden with default headers values -func NewGetCurrentInstallInputsForbidden() *GetCurrentInstallInputsForbidden { - return &GetCurrentInstallInputsForbidden{} -} - -/* -GetCurrentInstallInputsForbidden describes a response with status code 403, with default header values. - -Forbidden -*/ -type GetCurrentInstallInputsForbidden struct { - Payload *models.StderrErrResponse -} - -// IsSuccess returns true when this get current install inputs forbidden response has a 2xx status code -func (o *GetCurrentInstallInputsForbidden) IsSuccess() bool { - return false -} - -// IsRedirect returns true when this get current install inputs forbidden response has a 3xx status code -func (o *GetCurrentInstallInputsForbidden) IsRedirect() bool { - return false -} - -// IsClientError returns true when this get current install inputs forbidden response has a 4xx status code -func (o *GetCurrentInstallInputsForbidden) IsClientError() bool { - return true -} - -// IsServerError returns true when this get current install inputs forbidden response has a 5xx status code -func (o *GetCurrentInstallInputsForbidden) IsServerError() bool { - return false -} - -// IsCode returns true when this get current install inputs forbidden response a status code equal to that given -func (o *GetCurrentInstallInputsForbidden) IsCode(code int) bool { - return code == 403 -} - -// Code gets the status code for the get current install inputs forbidden response -func (o *GetCurrentInstallInputsForbidden) Code() int { - return 403 -} - -func (o *GetCurrentInstallInputsForbidden) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /v1/installs/{install_id}/inputs/current][%d] getCurrentInstallInputsForbidden %s", 403, payload) -} - -func (o *GetCurrentInstallInputsForbidden) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /v1/installs/{install_id}/inputs/current][%d] getCurrentInstallInputsForbidden %s", 403, payload) -} - -func (o *GetCurrentInstallInputsForbidden) GetPayload() *models.StderrErrResponse { - return o.Payload -} - -func (o *GetCurrentInstallInputsForbidden) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.StderrErrResponse) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewGetCurrentInstallInputsNotFound creates a GetCurrentInstallInputsNotFound with default headers values -func NewGetCurrentInstallInputsNotFound() *GetCurrentInstallInputsNotFound { - return &GetCurrentInstallInputsNotFound{} -} - -/* -GetCurrentInstallInputsNotFound describes a response with status code 404, with default header values. - -Not Found -*/ -type GetCurrentInstallInputsNotFound struct { - Payload *models.StderrErrResponse -} - -// IsSuccess returns true when this get current install inputs not found response has a 2xx status code -func (o *GetCurrentInstallInputsNotFound) IsSuccess() bool { - return false -} - -// IsRedirect returns true when this get current install inputs not found response has a 3xx status code -func (o *GetCurrentInstallInputsNotFound) IsRedirect() bool { - return false -} - -// IsClientError returns true when this get current install inputs not found response has a 4xx status code -func (o *GetCurrentInstallInputsNotFound) IsClientError() bool { - return true -} - -// IsServerError returns true when this get current install inputs not found response has a 5xx status code -func (o *GetCurrentInstallInputsNotFound) IsServerError() bool { - return false -} - -// IsCode returns true when this get current install inputs not found response a status code equal to that given -func (o *GetCurrentInstallInputsNotFound) IsCode(code int) bool { - return code == 404 -} - -// Code gets the status code for the get current install inputs not found response -func (o *GetCurrentInstallInputsNotFound) Code() int { - return 404 -} - -func (o *GetCurrentInstallInputsNotFound) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /v1/installs/{install_id}/inputs/current][%d] getCurrentInstallInputsNotFound %s", 404, payload) -} - -func (o *GetCurrentInstallInputsNotFound) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /v1/installs/{install_id}/inputs/current][%d] getCurrentInstallInputsNotFound %s", 404, payload) -} - -func (o *GetCurrentInstallInputsNotFound) GetPayload() *models.StderrErrResponse { - return o.Payload -} - -func (o *GetCurrentInstallInputsNotFound) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.StderrErrResponse) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewGetCurrentInstallInputsInternalServerError creates a GetCurrentInstallInputsInternalServerError with default headers values -func NewGetCurrentInstallInputsInternalServerError() *GetCurrentInstallInputsInternalServerError { - return &GetCurrentInstallInputsInternalServerError{} -} - -/* -GetCurrentInstallInputsInternalServerError describes a response with status code 500, with default header values. - -Internal Server Error -*/ -type GetCurrentInstallInputsInternalServerError struct { - Payload *models.StderrErrResponse -} - -// IsSuccess returns true when this get current install inputs internal server error response has a 2xx status code -func (o *GetCurrentInstallInputsInternalServerError) IsSuccess() bool { - return false -} - -// IsRedirect returns true when this get current install inputs internal server error response has a 3xx status code -func (o *GetCurrentInstallInputsInternalServerError) IsRedirect() bool { - return false -} - -// IsClientError returns true when this get current install inputs internal server error response has a 4xx status code -func (o *GetCurrentInstallInputsInternalServerError) IsClientError() bool { - return false -} - -// IsServerError returns true when this get current install inputs internal server error response has a 5xx status code -func (o *GetCurrentInstallInputsInternalServerError) IsServerError() bool { - return true -} - -// IsCode returns true when this get current install inputs internal server error response a status code equal to that given -func (o *GetCurrentInstallInputsInternalServerError) IsCode(code int) bool { - return code == 500 -} - -// Code gets the status code for the get current install inputs internal server error response -func (o *GetCurrentInstallInputsInternalServerError) Code() int { - return 500 -} - -func (o *GetCurrentInstallInputsInternalServerError) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /v1/installs/{install_id}/inputs/current][%d] getCurrentInstallInputsInternalServerError %s", 500, payload) -} - -func (o *GetCurrentInstallInputsInternalServerError) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /v1/installs/{install_id}/inputs/current][%d] getCurrentInstallInputsInternalServerError %s", 500, payload) -} - -func (o *GetCurrentInstallInputsInternalServerError) GetPayload() *models.StderrErrResponse { - return o.Payload -} - -func (o *GetCurrentInstallInputsInternalServerError) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.StderrErrResponse) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} diff --git a/client/operations/get_current_user_parameters.go b/client/operations/get_current_user_parameters.go deleted file mode 100644 index 0fadbca..0000000 --- a/client/operations/get_current_user_parameters.go +++ /dev/null @@ -1,128 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package operations - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "context" - "net/http" - "time" - - "github.com/go-openapi/errors" - "github.com/go-openapi/runtime" - cr "github.com/go-openapi/runtime/client" - "github.com/go-openapi/strfmt" -) - -// NewGetCurrentUserParams creates a new GetCurrentUserParams object, -// with the default timeout for this client. -// -// Default values are not hydrated, since defaults are normally applied by the API server side. -// -// To enforce default values in parameter, use SetDefaults or WithDefaults. -func NewGetCurrentUserParams() *GetCurrentUserParams { - return &GetCurrentUserParams{ - timeout: cr.DefaultTimeout, - } -} - -// NewGetCurrentUserParamsWithTimeout creates a new GetCurrentUserParams object -// with the ability to set a timeout on a request. -func NewGetCurrentUserParamsWithTimeout(timeout time.Duration) *GetCurrentUserParams { - return &GetCurrentUserParams{ - timeout: timeout, - } -} - -// NewGetCurrentUserParamsWithContext creates a new GetCurrentUserParams object -// with the ability to set a context for a request. -func NewGetCurrentUserParamsWithContext(ctx context.Context) *GetCurrentUserParams { - return &GetCurrentUserParams{ - Context: ctx, - } -} - -// NewGetCurrentUserParamsWithHTTPClient creates a new GetCurrentUserParams object -// with the ability to set a custom HTTPClient for a request. -func NewGetCurrentUserParamsWithHTTPClient(client *http.Client) *GetCurrentUserParams { - return &GetCurrentUserParams{ - HTTPClient: client, - } -} - -/* -GetCurrentUserParams contains all the parameters to send to the API endpoint - - for the get current user operation. - - Typically these are written to a http.Request. -*/ -type GetCurrentUserParams struct { - timeout time.Duration - Context context.Context - HTTPClient *http.Client -} - -// WithDefaults hydrates default values in the get current user params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *GetCurrentUserParams) WithDefaults() *GetCurrentUserParams { - o.SetDefaults() - return o -} - -// SetDefaults hydrates default values in the get current user params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *GetCurrentUserParams) SetDefaults() { - // no default values defined for this parameter -} - -// WithTimeout adds the timeout to the get current user params -func (o *GetCurrentUserParams) WithTimeout(timeout time.Duration) *GetCurrentUserParams { - o.SetTimeout(timeout) - return o -} - -// SetTimeout adds the timeout to the get current user params -func (o *GetCurrentUserParams) SetTimeout(timeout time.Duration) { - o.timeout = timeout -} - -// WithContext adds the context to the get current user params -func (o *GetCurrentUserParams) WithContext(ctx context.Context) *GetCurrentUserParams { - o.SetContext(ctx) - return o -} - -// SetContext adds the context to the get current user params -func (o *GetCurrentUserParams) SetContext(ctx context.Context) { - o.Context = ctx -} - -// WithHTTPClient adds the HTTPClient to the get current user params -func (o *GetCurrentUserParams) WithHTTPClient(client *http.Client) *GetCurrentUserParams { - o.SetHTTPClient(client) - return o -} - -// SetHTTPClient adds the HTTPClient to the get current user params -func (o *GetCurrentUserParams) SetHTTPClient(client *http.Client) { - o.HTTPClient = client -} - -// WriteToRequest writes these params to a swagger request -func (o *GetCurrentUserParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { - - if err := r.SetTimeout(o.timeout); err != nil { - return err - } - var res []error - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} diff --git a/client/operations/get_current_user_responses.go b/client/operations/get_current_user_responses.go deleted file mode 100644 index 62a667c..0000000 --- a/client/operations/get_current_user_responses.go +++ /dev/null @@ -1,486 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package operations - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "encoding/json" - "fmt" - "io" - - "github.com/go-openapi/runtime" - "github.com/go-openapi/strfmt" - - "github.com/nuonco/nuon-go/models" -) - -// GetCurrentUserReader is a Reader for the GetCurrentUser structure. -type GetCurrentUserReader struct { - formats strfmt.Registry -} - -// ReadResponse reads a server response into the received o. -func (o *GetCurrentUserReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { - switch response.Code() { - case 200: - result := NewGetCurrentUserOK() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return result, nil - case 400: - result := NewGetCurrentUserBadRequest() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return nil, result - case 401: - result := NewGetCurrentUserUnauthorized() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return nil, result - case 403: - result := NewGetCurrentUserForbidden() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return nil, result - case 404: - result := NewGetCurrentUserNotFound() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return nil, result - case 500: - result := NewGetCurrentUserInternalServerError() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return nil, result - default: - return nil, runtime.NewAPIError("[GET /v1/general/current-user] GetCurrentUser", response, response.Code()) - } -} - -// NewGetCurrentUserOK creates a GetCurrentUserOK with default headers values -func NewGetCurrentUserOK() *GetCurrentUserOK { - return &GetCurrentUserOK{} -} - -/* -GetCurrentUserOK describes a response with status code 200, with default header values. - -OK -*/ -type GetCurrentUserOK struct { - Payload *models.AppAccount -} - -// IsSuccess returns true when this get current user o k response has a 2xx status code -func (o *GetCurrentUserOK) IsSuccess() bool { - return true -} - -// IsRedirect returns true when this get current user o k response has a 3xx status code -func (o *GetCurrentUserOK) IsRedirect() bool { - return false -} - -// IsClientError returns true when this get current user o k response has a 4xx status code -func (o *GetCurrentUserOK) IsClientError() bool { - return false -} - -// IsServerError returns true when this get current user o k response has a 5xx status code -func (o *GetCurrentUserOK) IsServerError() bool { - return false -} - -// IsCode returns true when this get current user o k response a status code equal to that given -func (o *GetCurrentUserOK) IsCode(code int) bool { - return code == 200 -} - -// Code gets the status code for the get current user o k response -func (o *GetCurrentUserOK) Code() int { - return 200 -} - -func (o *GetCurrentUserOK) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /v1/general/current-user][%d] getCurrentUserOK %s", 200, payload) -} - -func (o *GetCurrentUserOK) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /v1/general/current-user][%d] getCurrentUserOK %s", 200, payload) -} - -func (o *GetCurrentUserOK) GetPayload() *models.AppAccount { - return o.Payload -} - -func (o *GetCurrentUserOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.AppAccount) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewGetCurrentUserBadRequest creates a GetCurrentUserBadRequest with default headers values -func NewGetCurrentUserBadRequest() *GetCurrentUserBadRequest { - return &GetCurrentUserBadRequest{} -} - -/* -GetCurrentUserBadRequest describes a response with status code 400, with default header values. - -Bad Request -*/ -type GetCurrentUserBadRequest struct { - Payload *models.StderrErrResponse -} - -// IsSuccess returns true when this get current user bad request response has a 2xx status code -func (o *GetCurrentUserBadRequest) IsSuccess() bool { - return false -} - -// IsRedirect returns true when this get current user bad request response has a 3xx status code -func (o *GetCurrentUserBadRequest) IsRedirect() bool { - return false -} - -// IsClientError returns true when this get current user bad request response has a 4xx status code -func (o *GetCurrentUserBadRequest) IsClientError() bool { - return true -} - -// IsServerError returns true when this get current user bad request response has a 5xx status code -func (o *GetCurrentUserBadRequest) IsServerError() bool { - return false -} - -// IsCode returns true when this get current user bad request response a status code equal to that given -func (o *GetCurrentUserBadRequest) IsCode(code int) bool { - return code == 400 -} - -// Code gets the status code for the get current user bad request response -func (o *GetCurrentUserBadRequest) Code() int { - return 400 -} - -func (o *GetCurrentUserBadRequest) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /v1/general/current-user][%d] getCurrentUserBadRequest %s", 400, payload) -} - -func (o *GetCurrentUserBadRequest) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /v1/general/current-user][%d] getCurrentUserBadRequest %s", 400, payload) -} - -func (o *GetCurrentUserBadRequest) GetPayload() *models.StderrErrResponse { - return o.Payload -} - -func (o *GetCurrentUserBadRequest) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.StderrErrResponse) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewGetCurrentUserUnauthorized creates a GetCurrentUserUnauthorized with default headers values -func NewGetCurrentUserUnauthorized() *GetCurrentUserUnauthorized { - return &GetCurrentUserUnauthorized{} -} - -/* -GetCurrentUserUnauthorized describes a response with status code 401, with default header values. - -Unauthorized -*/ -type GetCurrentUserUnauthorized struct { - Payload *models.StderrErrResponse -} - -// IsSuccess returns true when this get current user unauthorized response has a 2xx status code -func (o *GetCurrentUserUnauthorized) IsSuccess() bool { - return false -} - -// IsRedirect returns true when this get current user unauthorized response has a 3xx status code -func (o *GetCurrentUserUnauthorized) IsRedirect() bool { - return false -} - -// IsClientError returns true when this get current user unauthorized response has a 4xx status code -func (o *GetCurrentUserUnauthorized) IsClientError() bool { - return true -} - -// IsServerError returns true when this get current user unauthorized response has a 5xx status code -func (o *GetCurrentUserUnauthorized) IsServerError() bool { - return false -} - -// IsCode returns true when this get current user unauthorized response a status code equal to that given -func (o *GetCurrentUserUnauthorized) IsCode(code int) bool { - return code == 401 -} - -// Code gets the status code for the get current user unauthorized response -func (o *GetCurrentUserUnauthorized) Code() int { - return 401 -} - -func (o *GetCurrentUserUnauthorized) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /v1/general/current-user][%d] getCurrentUserUnauthorized %s", 401, payload) -} - -func (o *GetCurrentUserUnauthorized) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /v1/general/current-user][%d] getCurrentUserUnauthorized %s", 401, payload) -} - -func (o *GetCurrentUserUnauthorized) GetPayload() *models.StderrErrResponse { - return o.Payload -} - -func (o *GetCurrentUserUnauthorized) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.StderrErrResponse) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewGetCurrentUserForbidden creates a GetCurrentUserForbidden with default headers values -func NewGetCurrentUserForbidden() *GetCurrentUserForbidden { - return &GetCurrentUserForbidden{} -} - -/* -GetCurrentUserForbidden describes a response with status code 403, with default header values. - -Forbidden -*/ -type GetCurrentUserForbidden struct { - Payload *models.StderrErrResponse -} - -// IsSuccess returns true when this get current user forbidden response has a 2xx status code -func (o *GetCurrentUserForbidden) IsSuccess() bool { - return false -} - -// IsRedirect returns true when this get current user forbidden response has a 3xx status code -func (o *GetCurrentUserForbidden) IsRedirect() bool { - return false -} - -// IsClientError returns true when this get current user forbidden response has a 4xx status code -func (o *GetCurrentUserForbidden) IsClientError() bool { - return true -} - -// IsServerError returns true when this get current user forbidden response has a 5xx status code -func (o *GetCurrentUserForbidden) IsServerError() bool { - return false -} - -// IsCode returns true when this get current user forbidden response a status code equal to that given -func (o *GetCurrentUserForbidden) IsCode(code int) bool { - return code == 403 -} - -// Code gets the status code for the get current user forbidden response -func (o *GetCurrentUserForbidden) Code() int { - return 403 -} - -func (o *GetCurrentUserForbidden) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /v1/general/current-user][%d] getCurrentUserForbidden %s", 403, payload) -} - -func (o *GetCurrentUserForbidden) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /v1/general/current-user][%d] getCurrentUserForbidden %s", 403, payload) -} - -func (o *GetCurrentUserForbidden) GetPayload() *models.StderrErrResponse { - return o.Payload -} - -func (o *GetCurrentUserForbidden) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.StderrErrResponse) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewGetCurrentUserNotFound creates a GetCurrentUserNotFound with default headers values -func NewGetCurrentUserNotFound() *GetCurrentUserNotFound { - return &GetCurrentUserNotFound{} -} - -/* -GetCurrentUserNotFound describes a response with status code 404, with default header values. - -Not Found -*/ -type GetCurrentUserNotFound struct { - Payload *models.StderrErrResponse -} - -// IsSuccess returns true when this get current user not found response has a 2xx status code -func (o *GetCurrentUserNotFound) IsSuccess() bool { - return false -} - -// IsRedirect returns true when this get current user not found response has a 3xx status code -func (o *GetCurrentUserNotFound) IsRedirect() bool { - return false -} - -// IsClientError returns true when this get current user not found response has a 4xx status code -func (o *GetCurrentUserNotFound) IsClientError() bool { - return true -} - -// IsServerError returns true when this get current user not found response has a 5xx status code -func (o *GetCurrentUserNotFound) IsServerError() bool { - return false -} - -// IsCode returns true when this get current user not found response a status code equal to that given -func (o *GetCurrentUserNotFound) IsCode(code int) bool { - return code == 404 -} - -// Code gets the status code for the get current user not found response -func (o *GetCurrentUserNotFound) Code() int { - return 404 -} - -func (o *GetCurrentUserNotFound) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /v1/general/current-user][%d] getCurrentUserNotFound %s", 404, payload) -} - -func (o *GetCurrentUserNotFound) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /v1/general/current-user][%d] getCurrentUserNotFound %s", 404, payload) -} - -func (o *GetCurrentUserNotFound) GetPayload() *models.StderrErrResponse { - return o.Payload -} - -func (o *GetCurrentUserNotFound) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.StderrErrResponse) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewGetCurrentUserInternalServerError creates a GetCurrentUserInternalServerError with default headers values -func NewGetCurrentUserInternalServerError() *GetCurrentUserInternalServerError { - return &GetCurrentUserInternalServerError{} -} - -/* -GetCurrentUserInternalServerError describes a response with status code 500, with default header values. - -Internal Server Error -*/ -type GetCurrentUserInternalServerError struct { - Payload *models.StderrErrResponse -} - -// IsSuccess returns true when this get current user internal server error response has a 2xx status code -func (o *GetCurrentUserInternalServerError) IsSuccess() bool { - return false -} - -// IsRedirect returns true when this get current user internal server error response has a 3xx status code -func (o *GetCurrentUserInternalServerError) IsRedirect() bool { - return false -} - -// IsClientError returns true when this get current user internal server error response has a 4xx status code -func (o *GetCurrentUserInternalServerError) IsClientError() bool { - return false -} - -// IsServerError returns true when this get current user internal server error response has a 5xx status code -func (o *GetCurrentUserInternalServerError) IsServerError() bool { - return true -} - -// IsCode returns true when this get current user internal server error response a status code equal to that given -func (o *GetCurrentUserInternalServerError) IsCode(code int) bool { - return code == 500 -} - -// Code gets the status code for the get current user internal server error response -func (o *GetCurrentUserInternalServerError) Code() int { - return 500 -} - -func (o *GetCurrentUserInternalServerError) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /v1/general/current-user][%d] getCurrentUserInternalServerError %s", 500, payload) -} - -func (o *GetCurrentUserInternalServerError) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /v1/general/current-user][%d] getCurrentUserInternalServerError %s", 500, payload) -} - -func (o *GetCurrentUserInternalServerError) GetPayload() *models.StderrErrResponse { - return o.Payload -} - -func (o *GetCurrentUserInternalServerError) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.StderrErrResponse) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} diff --git a/client/operations/get_install_component_deploys_parameters.go b/client/operations/get_install_component_deploys_parameters.go deleted file mode 100644 index 991ce67..0000000 --- a/client/operations/get_install_component_deploys_parameters.go +++ /dev/null @@ -1,173 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package operations - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "context" - "net/http" - "time" - - "github.com/go-openapi/errors" - "github.com/go-openapi/runtime" - cr "github.com/go-openapi/runtime/client" - "github.com/go-openapi/strfmt" -) - -// NewGetInstallComponentDeploysParams creates a new GetInstallComponentDeploysParams object, -// with the default timeout for this client. -// -// Default values are not hydrated, since defaults are normally applied by the API server side. -// -// To enforce default values in parameter, use SetDefaults or WithDefaults. -func NewGetInstallComponentDeploysParams() *GetInstallComponentDeploysParams { - return &GetInstallComponentDeploysParams{ - timeout: cr.DefaultTimeout, - } -} - -// NewGetInstallComponentDeploysParamsWithTimeout creates a new GetInstallComponentDeploysParams object -// with the ability to set a timeout on a request. -func NewGetInstallComponentDeploysParamsWithTimeout(timeout time.Duration) *GetInstallComponentDeploysParams { - return &GetInstallComponentDeploysParams{ - timeout: timeout, - } -} - -// NewGetInstallComponentDeploysParamsWithContext creates a new GetInstallComponentDeploysParams object -// with the ability to set a context for a request. -func NewGetInstallComponentDeploysParamsWithContext(ctx context.Context) *GetInstallComponentDeploysParams { - return &GetInstallComponentDeploysParams{ - Context: ctx, - } -} - -// NewGetInstallComponentDeploysParamsWithHTTPClient creates a new GetInstallComponentDeploysParams object -// with the ability to set a custom HTTPClient for a request. -func NewGetInstallComponentDeploysParamsWithHTTPClient(client *http.Client) *GetInstallComponentDeploysParams { - return &GetInstallComponentDeploysParams{ - HTTPClient: client, - } -} - -/* -GetInstallComponentDeploysParams contains all the parameters to send to the API endpoint - - for the get install component deploys operation. - - Typically these are written to a http.Request. -*/ -type GetInstallComponentDeploysParams struct { - - /* ComponentID. - - component ID - */ - ComponentID string - - /* InstallID. - - install ID - */ - InstallID string - - timeout time.Duration - Context context.Context - HTTPClient *http.Client -} - -// WithDefaults hydrates default values in the get install component deploys params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *GetInstallComponentDeploysParams) WithDefaults() *GetInstallComponentDeploysParams { - o.SetDefaults() - return o -} - -// SetDefaults hydrates default values in the get install component deploys params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *GetInstallComponentDeploysParams) SetDefaults() { - // no default values defined for this parameter -} - -// WithTimeout adds the timeout to the get install component deploys params -func (o *GetInstallComponentDeploysParams) WithTimeout(timeout time.Duration) *GetInstallComponentDeploysParams { - o.SetTimeout(timeout) - return o -} - -// SetTimeout adds the timeout to the get install component deploys params -func (o *GetInstallComponentDeploysParams) SetTimeout(timeout time.Duration) { - o.timeout = timeout -} - -// WithContext adds the context to the get install component deploys params -func (o *GetInstallComponentDeploysParams) WithContext(ctx context.Context) *GetInstallComponentDeploysParams { - o.SetContext(ctx) - return o -} - -// SetContext adds the context to the get install component deploys params -func (o *GetInstallComponentDeploysParams) SetContext(ctx context.Context) { - o.Context = ctx -} - -// WithHTTPClient adds the HTTPClient to the get install component deploys params -func (o *GetInstallComponentDeploysParams) WithHTTPClient(client *http.Client) *GetInstallComponentDeploysParams { - o.SetHTTPClient(client) - return o -} - -// SetHTTPClient adds the HTTPClient to the get install component deploys params -func (o *GetInstallComponentDeploysParams) SetHTTPClient(client *http.Client) { - o.HTTPClient = client -} - -// WithComponentID adds the componentID to the get install component deploys params -func (o *GetInstallComponentDeploysParams) WithComponentID(componentID string) *GetInstallComponentDeploysParams { - o.SetComponentID(componentID) - return o -} - -// SetComponentID adds the componentId to the get install component deploys params -func (o *GetInstallComponentDeploysParams) SetComponentID(componentID string) { - o.ComponentID = componentID -} - -// WithInstallID adds the installID to the get install component deploys params -func (o *GetInstallComponentDeploysParams) WithInstallID(installID string) *GetInstallComponentDeploysParams { - o.SetInstallID(installID) - return o -} - -// SetInstallID adds the installId to the get install component deploys params -func (o *GetInstallComponentDeploysParams) SetInstallID(installID string) { - o.InstallID = installID -} - -// WriteToRequest writes these params to a swagger request -func (o *GetInstallComponentDeploysParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { - - if err := r.SetTimeout(o.timeout); err != nil { - return err - } - var res []error - - // path param component_id - if err := r.SetPathParam("component_id", o.ComponentID); err != nil { - return err - } - - // path param install_id - if err := r.SetPathParam("install_id", o.InstallID); err != nil { - return err - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} diff --git a/client/operations/get_install_component_deploys_responses.go b/client/operations/get_install_component_deploys_responses.go deleted file mode 100644 index d6f2850..0000000 --- a/client/operations/get_install_component_deploys_responses.go +++ /dev/null @@ -1,484 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package operations - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "encoding/json" - "fmt" - "io" - - "github.com/go-openapi/runtime" - "github.com/go-openapi/strfmt" - - "github.com/nuonco/nuon-go/models" -) - -// GetInstallComponentDeploysReader is a Reader for the GetInstallComponentDeploys structure. -type GetInstallComponentDeploysReader struct { - formats strfmt.Registry -} - -// ReadResponse reads a server response into the received o. -func (o *GetInstallComponentDeploysReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { - switch response.Code() { - case 200: - result := NewGetInstallComponentDeploysOK() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return result, nil - case 400: - result := NewGetInstallComponentDeploysBadRequest() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return nil, result - case 401: - result := NewGetInstallComponentDeploysUnauthorized() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return nil, result - case 403: - result := NewGetInstallComponentDeploysForbidden() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return nil, result - case 404: - result := NewGetInstallComponentDeploysNotFound() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return nil, result - case 500: - result := NewGetInstallComponentDeploysInternalServerError() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return nil, result - default: - return nil, runtime.NewAPIError("[GET /v1/installs/{install_id}/components/{component_id}/deploys] GetInstallComponentDeploys", response, response.Code()) - } -} - -// NewGetInstallComponentDeploysOK creates a GetInstallComponentDeploysOK with default headers values -func NewGetInstallComponentDeploysOK() *GetInstallComponentDeploysOK { - return &GetInstallComponentDeploysOK{} -} - -/* -GetInstallComponentDeploysOK describes a response with status code 200, with default header values. - -OK -*/ -type GetInstallComponentDeploysOK struct { - Payload []*models.AppInstallDeploy -} - -// IsSuccess returns true when this get install component deploys o k response has a 2xx status code -func (o *GetInstallComponentDeploysOK) IsSuccess() bool { - return true -} - -// IsRedirect returns true when this get install component deploys o k response has a 3xx status code -func (o *GetInstallComponentDeploysOK) IsRedirect() bool { - return false -} - -// IsClientError returns true when this get install component deploys o k response has a 4xx status code -func (o *GetInstallComponentDeploysOK) IsClientError() bool { - return false -} - -// IsServerError returns true when this get install component deploys o k response has a 5xx status code -func (o *GetInstallComponentDeploysOK) IsServerError() bool { - return false -} - -// IsCode returns true when this get install component deploys o k response a status code equal to that given -func (o *GetInstallComponentDeploysOK) IsCode(code int) bool { - return code == 200 -} - -// Code gets the status code for the get install component deploys o k response -func (o *GetInstallComponentDeploysOK) Code() int { - return 200 -} - -func (o *GetInstallComponentDeploysOK) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /v1/installs/{install_id}/components/{component_id}/deploys][%d] getInstallComponentDeploysOK %s", 200, payload) -} - -func (o *GetInstallComponentDeploysOK) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /v1/installs/{install_id}/components/{component_id}/deploys][%d] getInstallComponentDeploysOK %s", 200, payload) -} - -func (o *GetInstallComponentDeploysOK) GetPayload() []*models.AppInstallDeploy { - return o.Payload -} - -func (o *GetInstallComponentDeploysOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - // response payload - if err := consumer.Consume(response.Body(), &o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewGetInstallComponentDeploysBadRequest creates a GetInstallComponentDeploysBadRequest with default headers values -func NewGetInstallComponentDeploysBadRequest() *GetInstallComponentDeploysBadRequest { - return &GetInstallComponentDeploysBadRequest{} -} - -/* -GetInstallComponentDeploysBadRequest describes a response with status code 400, with default header values. - -Bad Request -*/ -type GetInstallComponentDeploysBadRequest struct { - Payload *models.StderrErrResponse -} - -// IsSuccess returns true when this get install component deploys bad request response has a 2xx status code -func (o *GetInstallComponentDeploysBadRequest) IsSuccess() bool { - return false -} - -// IsRedirect returns true when this get install component deploys bad request response has a 3xx status code -func (o *GetInstallComponentDeploysBadRequest) IsRedirect() bool { - return false -} - -// IsClientError returns true when this get install component deploys bad request response has a 4xx status code -func (o *GetInstallComponentDeploysBadRequest) IsClientError() bool { - return true -} - -// IsServerError returns true when this get install component deploys bad request response has a 5xx status code -func (o *GetInstallComponentDeploysBadRequest) IsServerError() bool { - return false -} - -// IsCode returns true when this get install component deploys bad request response a status code equal to that given -func (o *GetInstallComponentDeploysBadRequest) IsCode(code int) bool { - return code == 400 -} - -// Code gets the status code for the get install component deploys bad request response -func (o *GetInstallComponentDeploysBadRequest) Code() int { - return 400 -} - -func (o *GetInstallComponentDeploysBadRequest) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /v1/installs/{install_id}/components/{component_id}/deploys][%d] getInstallComponentDeploysBadRequest %s", 400, payload) -} - -func (o *GetInstallComponentDeploysBadRequest) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /v1/installs/{install_id}/components/{component_id}/deploys][%d] getInstallComponentDeploysBadRequest %s", 400, payload) -} - -func (o *GetInstallComponentDeploysBadRequest) GetPayload() *models.StderrErrResponse { - return o.Payload -} - -func (o *GetInstallComponentDeploysBadRequest) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.StderrErrResponse) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewGetInstallComponentDeploysUnauthorized creates a GetInstallComponentDeploysUnauthorized with default headers values -func NewGetInstallComponentDeploysUnauthorized() *GetInstallComponentDeploysUnauthorized { - return &GetInstallComponentDeploysUnauthorized{} -} - -/* -GetInstallComponentDeploysUnauthorized describes a response with status code 401, with default header values. - -Unauthorized -*/ -type GetInstallComponentDeploysUnauthorized struct { - Payload *models.StderrErrResponse -} - -// IsSuccess returns true when this get install component deploys unauthorized response has a 2xx status code -func (o *GetInstallComponentDeploysUnauthorized) IsSuccess() bool { - return false -} - -// IsRedirect returns true when this get install component deploys unauthorized response has a 3xx status code -func (o *GetInstallComponentDeploysUnauthorized) IsRedirect() bool { - return false -} - -// IsClientError returns true when this get install component deploys unauthorized response has a 4xx status code -func (o *GetInstallComponentDeploysUnauthorized) IsClientError() bool { - return true -} - -// IsServerError returns true when this get install component deploys unauthorized response has a 5xx status code -func (o *GetInstallComponentDeploysUnauthorized) IsServerError() bool { - return false -} - -// IsCode returns true when this get install component deploys unauthorized response a status code equal to that given -func (o *GetInstallComponentDeploysUnauthorized) IsCode(code int) bool { - return code == 401 -} - -// Code gets the status code for the get install component deploys unauthorized response -func (o *GetInstallComponentDeploysUnauthorized) Code() int { - return 401 -} - -func (o *GetInstallComponentDeploysUnauthorized) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /v1/installs/{install_id}/components/{component_id}/deploys][%d] getInstallComponentDeploysUnauthorized %s", 401, payload) -} - -func (o *GetInstallComponentDeploysUnauthorized) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /v1/installs/{install_id}/components/{component_id}/deploys][%d] getInstallComponentDeploysUnauthorized %s", 401, payload) -} - -func (o *GetInstallComponentDeploysUnauthorized) GetPayload() *models.StderrErrResponse { - return o.Payload -} - -func (o *GetInstallComponentDeploysUnauthorized) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.StderrErrResponse) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewGetInstallComponentDeploysForbidden creates a GetInstallComponentDeploysForbidden with default headers values -func NewGetInstallComponentDeploysForbidden() *GetInstallComponentDeploysForbidden { - return &GetInstallComponentDeploysForbidden{} -} - -/* -GetInstallComponentDeploysForbidden describes a response with status code 403, with default header values. - -Forbidden -*/ -type GetInstallComponentDeploysForbidden struct { - Payload *models.StderrErrResponse -} - -// IsSuccess returns true when this get install component deploys forbidden response has a 2xx status code -func (o *GetInstallComponentDeploysForbidden) IsSuccess() bool { - return false -} - -// IsRedirect returns true when this get install component deploys forbidden response has a 3xx status code -func (o *GetInstallComponentDeploysForbidden) IsRedirect() bool { - return false -} - -// IsClientError returns true when this get install component deploys forbidden response has a 4xx status code -func (o *GetInstallComponentDeploysForbidden) IsClientError() bool { - return true -} - -// IsServerError returns true when this get install component deploys forbidden response has a 5xx status code -func (o *GetInstallComponentDeploysForbidden) IsServerError() bool { - return false -} - -// IsCode returns true when this get install component deploys forbidden response a status code equal to that given -func (o *GetInstallComponentDeploysForbidden) IsCode(code int) bool { - return code == 403 -} - -// Code gets the status code for the get install component deploys forbidden response -func (o *GetInstallComponentDeploysForbidden) Code() int { - return 403 -} - -func (o *GetInstallComponentDeploysForbidden) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /v1/installs/{install_id}/components/{component_id}/deploys][%d] getInstallComponentDeploysForbidden %s", 403, payload) -} - -func (o *GetInstallComponentDeploysForbidden) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /v1/installs/{install_id}/components/{component_id}/deploys][%d] getInstallComponentDeploysForbidden %s", 403, payload) -} - -func (o *GetInstallComponentDeploysForbidden) GetPayload() *models.StderrErrResponse { - return o.Payload -} - -func (o *GetInstallComponentDeploysForbidden) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.StderrErrResponse) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewGetInstallComponentDeploysNotFound creates a GetInstallComponentDeploysNotFound with default headers values -func NewGetInstallComponentDeploysNotFound() *GetInstallComponentDeploysNotFound { - return &GetInstallComponentDeploysNotFound{} -} - -/* -GetInstallComponentDeploysNotFound describes a response with status code 404, with default header values. - -Not Found -*/ -type GetInstallComponentDeploysNotFound struct { - Payload *models.StderrErrResponse -} - -// IsSuccess returns true when this get install component deploys not found response has a 2xx status code -func (o *GetInstallComponentDeploysNotFound) IsSuccess() bool { - return false -} - -// IsRedirect returns true when this get install component deploys not found response has a 3xx status code -func (o *GetInstallComponentDeploysNotFound) IsRedirect() bool { - return false -} - -// IsClientError returns true when this get install component deploys not found response has a 4xx status code -func (o *GetInstallComponentDeploysNotFound) IsClientError() bool { - return true -} - -// IsServerError returns true when this get install component deploys not found response has a 5xx status code -func (o *GetInstallComponentDeploysNotFound) IsServerError() bool { - return false -} - -// IsCode returns true when this get install component deploys not found response a status code equal to that given -func (o *GetInstallComponentDeploysNotFound) IsCode(code int) bool { - return code == 404 -} - -// Code gets the status code for the get install component deploys not found response -func (o *GetInstallComponentDeploysNotFound) Code() int { - return 404 -} - -func (o *GetInstallComponentDeploysNotFound) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /v1/installs/{install_id}/components/{component_id}/deploys][%d] getInstallComponentDeploysNotFound %s", 404, payload) -} - -func (o *GetInstallComponentDeploysNotFound) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /v1/installs/{install_id}/components/{component_id}/deploys][%d] getInstallComponentDeploysNotFound %s", 404, payload) -} - -func (o *GetInstallComponentDeploysNotFound) GetPayload() *models.StderrErrResponse { - return o.Payload -} - -func (o *GetInstallComponentDeploysNotFound) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.StderrErrResponse) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewGetInstallComponentDeploysInternalServerError creates a GetInstallComponentDeploysInternalServerError with default headers values -func NewGetInstallComponentDeploysInternalServerError() *GetInstallComponentDeploysInternalServerError { - return &GetInstallComponentDeploysInternalServerError{} -} - -/* -GetInstallComponentDeploysInternalServerError describes a response with status code 500, with default header values. - -Internal Server Error -*/ -type GetInstallComponentDeploysInternalServerError struct { - Payload *models.StderrErrResponse -} - -// IsSuccess returns true when this get install component deploys internal server error response has a 2xx status code -func (o *GetInstallComponentDeploysInternalServerError) IsSuccess() bool { - return false -} - -// IsRedirect returns true when this get install component deploys internal server error response has a 3xx status code -func (o *GetInstallComponentDeploysInternalServerError) IsRedirect() bool { - return false -} - -// IsClientError returns true when this get install component deploys internal server error response has a 4xx status code -func (o *GetInstallComponentDeploysInternalServerError) IsClientError() bool { - return false -} - -// IsServerError returns true when this get install component deploys internal server error response has a 5xx status code -func (o *GetInstallComponentDeploysInternalServerError) IsServerError() bool { - return true -} - -// IsCode returns true when this get install component deploys internal server error response a status code equal to that given -func (o *GetInstallComponentDeploysInternalServerError) IsCode(code int) bool { - return code == 500 -} - -// Code gets the status code for the get install component deploys internal server error response -func (o *GetInstallComponentDeploysInternalServerError) Code() int { - return 500 -} - -func (o *GetInstallComponentDeploysInternalServerError) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /v1/installs/{install_id}/components/{component_id}/deploys][%d] getInstallComponentDeploysInternalServerError %s", 500, payload) -} - -func (o *GetInstallComponentDeploysInternalServerError) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /v1/installs/{install_id}/components/{component_id}/deploys][%d] getInstallComponentDeploysInternalServerError %s", 500, payload) -} - -func (o *GetInstallComponentDeploysInternalServerError) GetPayload() *models.StderrErrResponse { - return o.Payload -} - -func (o *GetInstallComponentDeploysInternalServerError) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.StderrErrResponse) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} diff --git a/client/operations/get_install_component_latest_deploy_parameters.go b/client/operations/get_install_component_latest_deploy_parameters.go deleted file mode 100644 index b46bbde..0000000 --- a/client/operations/get_install_component_latest_deploy_parameters.go +++ /dev/null @@ -1,173 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package operations - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "context" - "net/http" - "time" - - "github.com/go-openapi/errors" - "github.com/go-openapi/runtime" - cr "github.com/go-openapi/runtime/client" - "github.com/go-openapi/strfmt" -) - -// NewGetInstallComponentLatestDeployParams creates a new GetInstallComponentLatestDeployParams object, -// with the default timeout for this client. -// -// Default values are not hydrated, since defaults are normally applied by the API server side. -// -// To enforce default values in parameter, use SetDefaults or WithDefaults. -func NewGetInstallComponentLatestDeployParams() *GetInstallComponentLatestDeployParams { - return &GetInstallComponentLatestDeployParams{ - timeout: cr.DefaultTimeout, - } -} - -// NewGetInstallComponentLatestDeployParamsWithTimeout creates a new GetInstallComponentLatestDeployParams object -// with the ability to set a timeout on a request. -func NewGetInstallComponentLatestDeployParamsWithTimeout(timeout time.Duration) *GetInstallComponentLatestDeployParams { - return &GetInstallComponentLatestDeployParams{ - timeout: timeout, - } -} - -// NewGetInstallComponentLatestDeployParamsWithContext creates a new GetInstallComponentLatestDeployParams object -// with the ability to set a context for a request. -func NewGetInstallComponentLatestDeployParamsWithContext(ctx context.Context) *GetInstallComponentLatestDeployParams { - return &GetInstallComponentLatestDeployParams{ - Context: ctx, - } -} - -// NewGetInstallComponentLatestDeployParamsWithHTTPClient creates a new GetInstallComponentLatestDeployParams object -// with the ability to set a custom HTTPClient for a request. -func NewGetInstallComponentLatestDeployParamsWithHTTPClient(client *http.Client) *GetInstallComponentLatestDeployParams { - return &GetInstallComponentLatestDeployParams{ - HTTPClient: client, - } -} - -/* -GetInstallComponentLatestDeployParams contains all the parameters to send to the API endpoint - - for the get install component latest deploy operation. - - Typically these are written to a http.Request. -*/ -type GetInstallComponentLatestDeployParams struct { - - /* ComponentID. - - component ID - */ - ComponentID string - - /* InstallID. - - install ID - */ - InstallID string - - timeout time.Duration - Context context.Context - HTTPClient *http.Client -} - -// WithDefaults hydrates default values in the get install component latest deploy params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *GetInstallComponentLatestDeployParams) WithDefaults() *GetInstallComponentLatestDeployParams { - o.SetDefaults() - return o -} - -// SetDefaults hydrates default values in the get install component latest deploy params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *GetInstallComponentLatestDeployParams) SetDefaults() { - // no default values defined for this parameter -} - -// WithTimeout adds the timeout to the get install component latest deploy params -func (o *GetInstallComponentLatestDeployParams) WithTimeout(timeout time.Duration) *GetInstallComponentLatestDeployParams { - o.SetTimeout(timeout) - return o -} - -// SetTimeout adds the timeout to the get install component latest deploy params -func (o *GetInstallComponentLatestDeployParams) SetTimeout(timeout time.Duration) { - o.timeout = timeout -} - -// WithContext adds the context to the get install component latest deploy params -func (o *GetInstallComponentLatestDeployParams) WithContext(ctx context.Context) *GetInstallComponentLatestDeployParams { - o.SetContext(ctx) - return o -} - -// SetContext adds the context to the get install component latest deploy params -func (o *GetInstallComponentLatestDeployParams) SetContext(ctx context.Context) { - o.Context = ctx -} - -// WithHTTPClient adds the HTTPClient to the get install component latest deploy params -func (o *GetInstallComponentLatestDeployParams) WithHTTPClient(client *http.Client) *GetInstallComponentLatestDeployParams { - o.SetHTTPClient(client) - return o -} - -// SetHTTPClient adds the HTTPClient to the get install component latest deploy params -func (o *GetInstallComponentLatestDeployParams) SetHTTPClient(client *http.Client) { - o.HTTPClient = client -} - -// WithComponentID adds the componentID to the get install component latest deploy params -func (o *GetInstallComponentLatestDeployParams) WithComponentID(componentID string) *GetInstallComponentLatestDeployParams { - o.SetComponentID(componentID) - return o -} - -// SetComponentID adds the componentId to the get install component latest deploy params -func (o *GetInstallComponentLatestDeployParams) SetComponentID(componentID string) { - o.ComponentID = componentID -} - -// WithInstallID adds the installID to the get install component latest deploy params -func (o *GetInstallComponentLatestDeployParams) WithInstallID(installID string) *GetInstallComponentLatestDeployParams { - o.SetInstallID(installID) - return o -} - -// SetInstallID adds the installId to the get install component latest deploy params -func (o *GetInstallComponentLatestDeployParams) SetInstallID(installID string) { - o.InstallID = installID -} - -// WriteToRequest writes these params to a swagger request -func (o *GetInstallComponentLatestDeployParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { - - if err := r.SetTimeout(o.timeout); err != nil { - return err - } - var res []error - - // path param component_id - if err := r.SetPathParam("component_id", o.ComponentID); err != nil { - return err - } - - // path param install_id - if err := r.SetPathParam("install_id", o.InstallID); err != nil { - return err - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} diff --git a/client/operations/get_install_component_latest_deploy_responses.go b/client/operations/get_install_component_latest_deploy_responses.go deleted file mode 100644 index ee71ab3..0000000 --- a/client/operations/get_install_component_latest_deploy_responses.go +++ /dev/null @@ -1,486 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package operations - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "encoding/json" - "fmt" - "io" - - "github.com/go-openapi/runtime" - "github.com/go-openapi/strfmt" - - "github.com/nuonco/nuon-go/models" -) - -// GetInstallComponentLatestDeployReader is a Reader for the GetInstallComponentLatestDeploy structure. -type GetInstallComponentLatestDeployReader struct { - formats strfmt.Registry -} - -// ReadResponse reads a server response into the received o. -func (o *GetInstallComponentLatestDeployReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { - switch response.Code() { - case 200: - result := NewGetInstallComponentLatestDeployOK() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return result, nil - case 400: - result := NewGetInstallComponentLatestDeployBadRequest() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return nil, result - case 401: - result := NewGetInstallComponentLatestDeployUnauthorized() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return nil, result - case 403: - result := NewGetInstallComponentLatestDeployForbidden() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return nil, result - case 404: - result := NewGetInstallComponentLatestDeployNotFound() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return nil, result - case 500: - result := NewGetInstallComponentLatestDeployInternalServerError() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return nil, result - default: - return nil, runtime.NewAPIError("[GET /v1/installs/{install_id}/components/{component_id}/deploys/latest] GetInstallComponentLatestDeploy", response, response.Code()) - } -} - -// NewGetInstallComponentLatestDeployOK creates a GetInstallComponentLatestDeployOK with default headers values -func NewGetInstallComponentLatestDeployOK() *GetInstallComponentLatestDeployOK { - return &GetInstallComponentLatestDeployOK{} -} - -/* -GetInstallComponentLatestDeployOK describes a response with status code 200, with default header values. - -OK -*/ -type GetInstallComponentLatestDeployOK struct { - Payload *models.AppInstallDeploy -} - -// IsSuccess returns true when this get install component latest deploy o k response has a 2xx status code -func (o *GetInstallComponentLatestDeployOK) IsSuccess() bool { - return true -} - -// IsRedirect returns true when this get install component latest deploy o k response has a 3xx status code -func (o *GetInstallComponentLatestDeployOK) IsRedirect() bool { - return false -} - -// IsClientError returns true when this get install component latest deploy o k response has a 4xx status code -func (o *GetInstallComponentLatestDeployOK) IsClientError() bool { - return false -} - -// IsServerError returns true when this get install component latest deploy o k response has a 5xx status code -func (o *GetInstallComponentLatestDeployOK) IsServerError() bool { - return false -} - -// IsCode returns true when this get install component latest deploy o k response a status code equal to that given -func (o *GetInstallComponentLatestDeployOK) IsCode(code int) bool { - return code == 200 -} - -// Code gets the status code for the get install component latest deploy o k response -func (o *GetInstallComponentLatestDeployOK) Code() int { - return 200 -} - -func (o *GetInstallComponentLatestDeployOK) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /v1/installs/{install_id}/components/{component_id}/deploys/latest][%d] getInstallComponentLatestDeployOK %s", 200, payload) -} - -func (o *GetInstallComponentLatestDeployOK) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /v1/installs/{install_id}/components/{component_id}/deploys/latest][%d] getInstallComponentLatestDeployOK %s", 200, payload) -} - -func (o *GetInstallComponentLatestDeployOK) GetPayload() *models.AppInstallDeploy { - return o.Payload -} - -func (o *GetInstallComponentLatestDeployOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.AppInstallDeploy) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewGetInstallComponentLatestDeployBadRequest creates a GetInstallComponentLatestDeployBadRequest with default headers values -func NewGetInstallComponentLatestDeployBadRequest() *GetInstallComponentLatestDeployBadRequest { - return &GetInstallComponentLatestDeployBadRequest{} -} - -/* -GetInstallComponentLatestDeployBadRequest describes a response with status code 400, with default header values. - -Bad Request -*/ -type GetInstallComponentLatestDeployBadRequest struct { - Payload *models.StderrErrResponse -} - -// IsSuccess returns true when this get install component latest deploy bad request response has a 2xx status code -func (o *GetInstallComponentLatestDeployBadRequest) IsSuccess() bool { - return false -} - -// IsRedirect returns true when this get install component latest deploy bad request response has a 3xx status code -func (o *GetInstallComponentLatestDeployBadRequest) IsRedirect() bool { - return false -} - -// IsClientError returns true when this get install component latest deploy bad request response has a 4xx status code -func (o *GetInstallComponentLatestDeployBadRequest) IsClientError() bool { - return true -} - -// IsServerError returns true when this get install component latest deploy bad request response has a 5xx status code -func (o *GetInstallComponentLatestDeployBadRequest) IsServerError() bool { - return false -} - -// IsCode returns true when this get install component latest deploy bad request response a status code equal to that given -func (o *GetInstallComponentLatestDeployBadRequest) IsCode(code int) bool { - return code == 400 -} - -// Code gets the status code for the get install component latest deploy bad request response -func (o *GetInstallComponentLatestDeployBadRequest) Code() int { - return 400 -} - -func (o *GetInstallComponentLatestDeployBadRequest) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /v1/installs/{install_id}/components/{component_id}/deploys/latest][%d] getInstallComponentLatestDeployBadRequest %s", 400, payload) -} - -func (o *GetInstallComponentLatestDeployBadRequest) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /v1/installs/{install_id}/components/{component_id}/deploys/latest][%d] getInstallComponentLatestDeployBadRequest %s", 400, payload) -} - -func (o *GetInstallComponentLatestDeployBadRequest) GetPayload() *models.StderrErrResponse { - return o.Payload -} - -func (o *GetInstallComponentLatestDeployBadRequest) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.StderrErrResponse) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewGetInstallComponentLatestDeployUnauthorized creates a GetInstallComponentLatestDeployUnauthorized with default headers values -func NewGetInstallComponentLatestDeployUnauthorized() *GetInstallComponentLatestDeployUnauthorized { - return &GetInstallComponentLatestDeployUnauthorized{} -} - -/* -GetInstallComponentLatestDeployUnauthorized describes a response with status code 401, with default header values. - -Unauthorized -*/ -type GetInstallComponentLatestDeployUnauthorized struct { - Payload *models.StderrErrResponse -} - -// IsSuccess returns true when this get install component latest deploy unauthorized response has a 2xx status code -func (o *GetInstallComponentLatestDeployUnauthorized) IsSuccess() bool { - return false -} - -// IsRedirect returns true when this get install component latest deploy unauthorized response has a 3xx status code -func (o *GetInstallComponentLatestDeployUnauthorized) IsRedirect() bool { - return false -} - -// IsClientError returns true when this get install component latest deploy unauthorized response has a 4xx status code -func (o *GetInstallComponentLatestDeployUnauthorized) IsClientError() bool { - return true -} - -// IsServerError returns true when this get install component latest deploy unauthorized response has a 5xx status code -func (o *GetInstallComponentLatestDeployUnauthorized) IsServerError() bool { - return false -} - -// IsCode returns true when this get install component latest deploy unauthorized response a status code equal to that given -func (o *GetInstallComponentLatestDeployUnauthorized) IsCode(code int) bool { - return code == 401 -} - -// Code gets the status code for the get install component latest deploy unauthorized response -func (o *GetInstallComponentLatestDeployUnauthorized) Code() int { - return 401 -} - -func (o *GetInstallComponentLatestDeployUnauthorized) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /v1/installs/{install_id}/components/{component_id}/deploys/latest][%d] getInstallComponentLatestDeployUnauthorized %s", 401, payload) -} - -func (o *GetInstallComponentLatestDeployUnauthorized) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /v1/installs/{install_id}/components/{component_id}/deploys/latest][%d] getInstallComponentLatestDeployUnauthorized %s", 401, payload) -} - -func (o *GetInstallComponentLatestDeployUnauthorized) GetPayload() *models.StderrErrResponse { - return o.Payload -} - -func (o *GetInstallComponentLatestDeployUnauthorized) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.StderrErrResponse) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewGetInstallComponentLatestDeployForbidden creates a GetInstallComponentLatestDeployForbidden with default headers values -func NewGetInstallComponentLatestDeployForbidden() *GetInstallComponentLatestDeployForbidden { - return &GetInstallComponentLatestDeployForbidden{} -} - -/* -GetInstallComponentLatestDeployForbidden describes a response with status code 403, with default header values. - -Forbidden -*/ -type GetInstallComponentLatestDeployForbidden struct { - Payload *models.StderrErrResponse -} - -// IsSuccess returns true when this get install component latest deploy forbidden response has a 2xx status code -func (o *GetInstallComponentLatestDeployForbidden) IsSuccess() bool { - return false -} - -// IsRedirect returns true when this get install component latest deploy forbidden response has a 3xx status code -func (o *GetInstallComponentLatestDeployForbidden) IsRedirect() bool { - return false -} - -// IsClientError returns true when this get install component latest deploy forbidden response has a 4xx status code -func (o *GetInstallComponentLatestDeployForbidden) IsClientError() bool { - return true -} - -// IsServerError returns true when this get install component latest deploy forbidden response has a 5xx status code -func (o *GetInstallComponentLatestDeployForbidden) IsServerError() bool { - return false -} - -// IsCode returns true when this get install component latest deploy forbidden response a status code equal to that given -func (o *GetInstallComponentLatestDeployForbidden) IsCode(code int) bool { - return code == 403 -} - -// Code gets the status code for the get install component latest deploy forbidden response -func (o *GetInstallComponentLatestDeployForbidden) Code() int { - return 403 -} - -func (o *GetInstallComponentLatestDeployForbidden) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /v1/installs/{install_id}/components/{component_id}/deploys/latest][%d] getInstallComponentLatestDeployForbidden %s", 403, payload) -} - -func (o *GetInstallComponentLatestDeployForbidden) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /v1/installs/{install_id}/components/{component_id}/deploys/latest][%d] getInstallComponentLatestDeployForbidden %s", 403, payload) -} - -func (o *GetInstallComponentLatestDeployForbidden) GetPayload() *models.StderrErrResponse { - return o.Payload -} - -func (o *GetInstallComponentLatestDeployForbidden) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.StderrErrResponse) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewGetInstallComponentLatestDeployNotFound creates a GetInstallComponentLatestDeployNotFound with default headers values -func NewGetInstallComponentLatestDeployNotFound() *GetInstallComponentLatestDeployNotFound { - return &GetInstallComponentLatestDeployNotFound{} -} - -/* -GetInstallComponentLatestDeployNotFound describes a response with status code 404, with default header values. - -Not Found -*/ -type GetInstallComponentLatestDeployNotFound struct { - Payload *models.StderrErrResponse -} - -// IsSuccess returns true when this get install component latest deploy not found response has a 2xx status code -func (o *GetInstallComponentLatestDeployNotFound) IsSuccess() bool { - return false -} - -// IsRedirect returns true when this get install component latest deploy not found response has a 3xx status code -func (o *GetInstallComponentLatestDeployNotFound) IsRedirect() bool { - return false -} - -// IsClientError returns true when this get install component latest deploy not found response has a 4xx status code -func (o *GetInstallComponentLatestDeployNotFound) IsClientError() bool { - return true -} - -// IsServerError returns true when this get install component latest deploy not found response has a 5xx status code -func (o *GetInstallComponentLatestDeployNotFound) IsServerError() bool { - return false -} - -// IsCode returns true when this get install component latest deploy not found response a status code equal to that given -func (o *GetInstallComponentLatestDeployNotFound) IsCode(code int) bool { - return code == 404 -} - -// Code gets the status code for the get install component latest deploy not found response -func (o *GetInstallComponentLatestDeployNotFound) Code() int { - return 404 -} - -func (o *GetInstallComponentLatestDeployNotFound) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /v1/installs/{install_id}/components/{component_id}/deploys/latest][%d] getInstallComponentLatestDeployNotFound %s", 404, payload) -} - -func (o *GetInstallComponentLatestDeployNotFound) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /v1/installs/{install_id}/components/{component_id}/deploys/latest][%d] getInstallComponentLatestDeployNotFound %s", 404, payload) -} - -func (o *GetInstallComponentLatestDeployNotFound) GetPayload() *models.StderrErrResponse { - return o.Payload -} - -func (o *GetInstallComponentLatestDeployNotFound) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.StderrErrResponse) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewGetInstallComponentLatestDeployInternalServerError creates a GetInstallComponentLatestDeployInternalServerError with default headers values -func NewGetInstallComponentLatestDeployInternalServerError() *GetInstallComponentLatestDeployInternalServerError { - return &GetInstallComponentLatestDeployInternalServerError{} -} - -/* -GetInstallComponentLatestDeployInternalServerError describes a response with status code 500, with default header values. - -Internal Server Error -*/ -type GetInstallComponentLatestDeployInternalServerError struct { - Payload *models.StderrErrResponse -} - -// IsSuccess returns true when this get install component latest deploy internal server error response has a 2xx status code -func (o *GetInstallComponentLatestDeployInternalServerError) IsSuccess() bool { - return false -} - -// IsRedirect returns true when this get install component latest deploy internal server error response has a 3xx status code -func (o *GetInstallComponentLatestDeployInternalServerError) IsRedirect() bool { - return false -} - -// IsClientError returns true when this get install component latest deploy internal server error response has a 4xx status code -func (o *GetInstallComponentLatestDeployInternalServerError) IsClientError() bool { - return false -} - -// IsServerError returns true when this get install component latest deploy internal server error response has a 5xx status code -func (o *GetInstallComponentLatestDeployInternalServerError) IsServerError() bool { - return true -} - -// IsCode returns true when this get install component latest deploy internal server error response a status code equal to that given -func (o *GetInstallComponentLatestDeployInternalServerError) IsCode(code int) bool { - return code == 500 -} - -// Code gets the status code for the get install component latest deploy internal server error response -func (o *GetInstallComponentLatestDeployInternalServerError) Code() int { - return 500 -} - -func (o *GetInstallComponentLatestDeployInternalServerError) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /v1/installs/{install_id}/components/{component_id}/deploys/latest][%d] getInstallComponentLatestDeployInternalServerError %s", 500, payload) -} - -func (o *GetInstallComponentLatestDeployInternalServerError) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /v1/installs/{install_id}/components/{component_id}/deploys/latest][%d] getInstallComponentLatestDeployInternalServerError %s", 500, payload) -} - -func (o *GetInstallComponentLatestDeployInternalServerError) GetPayload() *models.StderrErrResponse { - return o.Payload -} - -func (o *GetInstallComponentLatestDeployInternalServerError) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.StderrErrResponse) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} diff --git a/client/operations/get_install_component_parameters.go b/client/operations/get_install_component_parameters.go deleted file mode 100644 index d87a049..0000000 --- a/client/operations/get_install_component_parameters.go +++ /dev/null @@ -1,173 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package operations - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "context" - "net/http" - "time" - - "github.com/go-openapi/errors" - "github.com/go-openapi/runtime" - cr "github.com/go-openapi/runtime/client" - "github.com/go-openapi/strfmt" -) - -// NewGetInstallComponentParams creates a new GetInstallComponentParams object, -// with the default timeout for this client. -// -// Default values are not hydrated, since defaults are normally applied by the API server side. -// -// To enforce default values in parameter, use SetDefaults or WithDefaults. -func NewGetInstallComponentParams() *GetInstallComponentParams { - return &GetInstallComponentParams{ - timeout: cr.DefaultTimeout, - } -} - -// NewGetInstallComponentParamsWithTimeout creates a new GetInstallComponentParams object -// with the ability to set a timeout on a request. -func NewGetInstallComponentParamsWithTimeout(timeout time.Duration) *GetInstallComponentParams { - return &GetInstallComponentParams{ - timeout: timeout, - } -} - -// NewGetInstallComponentParamsWithContext creates a new GetInstallComponentParams object -// with the ability to set a context for a request. -func NewGetInstallComponentParamsWithContext(ctx context.Context) *GetInstallComponentParams { - return &GetInstallComponentParams{ - Context: ctx, - } -} - -// NewGetInstallComponentParamsWithHTTPClient creates a new GetInstallComponentParams object -// with the ability to set a custom HTTPClient for a request. -func NewGetInstallComponentParamsWithHTTPClient(client *http.Client) *GetInstallComponentParams { - return &GetInstallComponentParams{ - HTTPClient: client, - } -} - -/* -GetInstallComponentParams contains all the parameters to send to the API endpoint - - for the get install component operation. - - Typically these are written to a http.Request. -*/ -type GetInstallComponentParams struct { - - /* ComponentID. - - component ID - */ - ComponentID string - - /* InstallID. - - install ID - */ - InstallID string - - timeout time.Duration - Context context.Context - HTTPClient *http.Client -} - -// WithDefaults hydrates default values in the get install component params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *GetInstallComponentParams) WithDefaults() *GetInstallComponentParams { - o.SetDefaults() - return o -} - -// SetDefaults hydrates default values in the get install component params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *GetInstallComponentParams) SetDefaults() { - // no default values defined for this parameter -} - -// WithTimeout adds the timeout to the get install component params -func (o *GetInstallComponentParams) WithTimeout(timeout time.Duration) *GetInstallComponentParams { - o.SetTimeout(timeout) - return o -} - -// SetTimeout adds the timeout to the get install component params -func (o *GetInstallComponentParams) SetTimeout(timeout time.Duration) { - o.timeout = timeout -} - -// WithContext adds the context to the get install component params -func (o *GetInstallComponentParams) WithContext(ctx context.Context) *GetInstallComponentParams { - o.SetContext(ctx) - return o -} - -// SetContext adds the context to the get install component params -func (o *GetInstallComponentParams) SetContext(ctx context.Context) { - o.Context = ctx -} - -// WithHTTPClient adds the HTTPClient to the get install component params -func (o *GetInstallComponentParams) WithHTTPClient(client *http.Client) *GetInstallComponentParams { - o.SetHTTPClient(client) - return o -} - -// SetHTTPClient adds the HTTPClient to the get install component params -func (o *GetInstallComponentParams) SetHTTPClient(client *http.Client) { - o.HTTPClient = client -} - -// WithComponentID adds the componentID to the get install component params -func (o *GetInstallComponentParams) WithComponentID(componentID string) *GetInstallComponentParams { - o.SetComponentID(componentID) - return o -} - -// SetComponentID adds the componentId to the get install component params -func (o *GetInstallComponentParams) SetComponentID(componentID string) { - o.ComponentID = componentID -} - -// WithInstallID adds the installID to the get install component params -func (o *GetInstallComponentParams) WithInstallID(installID string) *GetInstallComponentParams { - o.SetInstallID(installID) - return o -} - -// SetInstallID adds the installId to the get install component params -func (o *GetInstallComponentParams) SetInstallID(installID string) { - o.InstallID = installID -} - -// WriteToRequest writes these params to a swagger request -func (o *GetInstallComponentParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { - - if err := r.SetTimeout(o.timeout); err != nil { - return err - } - var res []error - - // path param component_id - if err := r.SetPathParam("component_id", o.ComponentID); err != nil { - return err - } - - // path param install_id - if err := r.SetPathParam("install_id", o.InstallID); err != nil { - return err - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} diff --git a/client/operations/get_install_component_responses.go b/client/operations/get_install_component_responses.go deleted file mode 100644 index 1c42aa3..0000000 --- a/client/operations/get_install_component_responses.go +++ /dev/null @@ -1,486 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package operations - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "encoding/json" - "fmt" - "io" - - "github.com/go-openapi/runtime" - "github.com/go-openapi/strfmt" - - "github.com/nuonco/nuon-go/models" -) - -// GetInstallComponentReader is a Reader for the GetInstallComponent structure. -type GetInstallComponentReader struct { - formats strfmt.Registry -} - -// ReadResponse reads a server response into the received o. -func (o *GetInstallComponentReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { - switch response.Code() { - case 200: - result := NewGetInstallComponentOK() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return result, nil - case 400: - result := NewGetInstallComponentBadRequest() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return nil, result - case 401: - result := NewGetInstallComponentUnauthorized() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return nil, result - case 403: - result := NewGetInstallComponentForbidden() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return nil, result - case 404: - result := NewGetInstallComponentNotFound() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return nil, result - case 500: - result := NewGetInstallComponentInternalServerError() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return nil, result - default: - return nil, runtime.NewAPIError("[GET /v1/installs/{install_id}/component/{component_id}] GetInstallComponent", response, response.Code()) - } -} - -// NewGetInstallComponentOK creates a GetInstallComponentOK with default headers values -func NewGetInstallComponentOK() *GetInstallComponentOK { - return &GetInstallComponentOK{} -} - -/* -GetInstallComponentOK describes a response with status code 200, with default header values. - -OK -*/ -type GetInstallComponentOK struct { - Payload *models.AppInstallComponent -} - -// IsSuccess returns true when this get install component o k response has a 2xx status code -func (o *GetInstallComponentOK) IsSuccess() bool { - return true -} - -// IsRedirect returns true when this get install component o k response has a 3xx status code -func (o *GetInstallComponentOK) IsRedirect() bool { - return false -} - -// IsClientError returns true when this get install component o k response has a 4xx status code -func (o *GetInstallComponentOK) IsClientError() bool { - return false -} - -// IsServerError returns true when this get install component o k response has a 5xx status code -func (o *GetInstallComponentOK) IsServerError() bool { - return false -} - -// IsCode returns true when this get install component o k response a status code equal to that given -func (o *GetInstallComponentOK) IsCode(code int) bool { - return code == 200 -} - -// Code gets the status code for the get install component o k response -func (o *GetInstallComponentOK) Code() int { - return 200 -} - -func (o *GetInstallComponentOK) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /v1/installs/{install_id}/component/{component_id}][%d] getInstallComponentOK %s", 200, payload) -} - -func (o *GetInstallComponentOK) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /v1/installs/{install_id}/component/{component_id}][%d] getInstallComponentOK %s", 200, payload) -} - -func (o *GetInstallComponentOK) GetPayload() *models.AppInstallComponent { - return o.Payload -} - -func (o *GetInstallComponentOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.AppInstallComponent) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewGetInstallComponentBadRequest creates a GetInstallComponentBadRequest with default headers values -func NewGetInstallComponentBadRequest() *GetInstallComponentBadRequest { - return &GetInstallComponentBadRequest{} -} - -/* -GetInstallComponentBadRequest describes a response with status code 400, with default header values. - -Bad Request -*/ -type GetInstallComponentBadRequest struct { - Payload *models.StderrErrResponse -} - -// IsSuccess returns true when this get install component bad request response has a 2xx status code -func (o *GetInstallComponentBadRequest) IsSuccess() bool { - return false -} - -// IsRedirect returns true when this get install component bad request response has a 3xx status code -func (o *GetInstallComponentBadRequest) IsRedirect() bool { - return false -} - -// IsClientError returns true when this get install component bad request response has a 4xx status code -func (o *GetInstallComponentBadRequest) IsClientError() bool { - return true -} - -// IsServerError returns true when this get install component bad request response has a 5xx status code -func (o *GetInstallComponentBadRequest) IsServerError() bool { - return false -} - -// IsCode returns true when this get install component bad request response a status code equal to that given -func (o *GetInstallComponentBadRequest) IsCode(code int) bool { - return code == 400 -} - -// Code gets the status code for the get install component bad request response -func (o *GetInstallComponentBadRequest) Code() int { - return 400 -} - -func (o *GetInstallComponentBadRequest) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /v1/installs/{install_id}/component/{component_id}][%d] getInstallComponentBadRequest %s", 400, payload) -} - -func (o *GetInstallComponentBadRequest) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /v1/installs/{install_id}/component/{component_id}][%d] getInstallComponentBadRequest %s", 400, payload) -} - -func (o *GetInstallComponentBadRequest) GetPayload() *models.StderrErrResponse { - return o.Payload -} - -func (o *GetInstallComponentBadRequest) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.StderrErrResponse) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewGetInstallComponentUnauthorized creates a GetInstallComponentUnauthorized with default headers values -func NewGetInstallComponentUnauthorized() *GetInstallComponentUnauthorized { - return &GetInstallComponentUnauthorized{} -} - -/* -GetInstallComponentUnauthorized describes a response with status code 401, with default header values. - -Unauthorized -*/ -type GetInstallComponentUnauthorized struct { - Payload *models.StderrErrResponse -} - -// IsSuccess returns true when this get install component unauthorized response has a 2xx status code -func (o *GetInstallComponentUnauthorized) IsSuccess() bool { - return false -} - -// IsRedirect returns true when this get install component unauthorized response has a 3xx status code -func (o *GetInstallComponentUnauthorized) IsRedirect() bool { - return false -} - -// IsClientError returns true when this get install component unauthorized response has a 4xx status code -func (o *GetInstallComponentUnauthorized) IsClientError() bool { - return true -} - -// IsServerError returns true when this get install component unauthorized response has a 5xx status code -func (o *GetInstallComponentUnauthorized) IsServerError() bool { - return false -} - -// IsCode returns true when this get install component unauthorized response a status code equal to that given -func (o *GetInstallComponentUnauthorized) IsCode(code int) bool { - return code == 401 -} - -// Code gets the status code for the get install component unauthorized response -func (o *GetInstallComponentUnauthorized) Code() int { - return 401 -} - -func (o *GetInstallComponentUnauthorized) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /v1/installs/{install_id}/component/{component_id}][%d] getInstallComponentUnauthorized %s", 401, payload) -} - -func (o *GetInstallComponentUnauthorized) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /v1/installs/{install_id}/component/{component_id}][%d] getInstallComponentUnauthorized %s", 401, payload) -} - -func (o *GetInstallComponentUnauthorized) GetPayload() *models.StderrErrResponse { - return o.Payload -} - -func (o *GetInstallComponentUnauthorized) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.StderrErrResponse) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewGetInstallComponentForbidden creates a GetInstallComponentForbidden with default headers values -func NewGetInstallComponentForbidden() *GetInstallComponentForbidden { - return &GetInstallComponentForbidden{} -} - -/* -GetInstallComponentForbidden describes a response with status code 403, with default header values. - -Forbidden -*/ -type GetInstallComponentForbidden struct { - Payload *models.StderrErrResponse -} - -// IsSuccess returns true when this get install component forbidden response has a 2xx status code -func (o *GetInstallComponentForbidden) IsSuccess() bool { - return false -} - -// IsRedirect returns true when this get install component forbidden response has a 3xx status code -func (o *GetInstallComponentForbidden) IsRedirect() bool { - return false -} - -// IsClientError returns true when this get install component forbidden response has a 4xx status code -func (o *GetInstallComponentForbidden) IsClientError() bool { - return true -} - -// IsServerError returns true when this get install component forbidden response has a 5xx status code -func (o *GetInstallComponentForbidden) IsServerError() bool { - return false -} - -// IsCode returns true when this get install component forbidden response a status code equal to that given -func (o *GetInstallComponentForbidden) IsCode(code int) bool { - return code == 403 -} - -// Code gets the status code for the get install component forbidden response -func (o *GetInstallComponentForbidden) Code() int { - return 403 -} - -func (o *GetInstallComponentForbidden) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /v1/installs/{install_id}/component/{component_id}][%d] getInstallComponentForbidden %s", 403, payload) -} - -func (o *GetInstallComponentForbidden) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /v1/installs/{install_id}/component/{component_id}][%d] getInstallComponentForbidden %s", 403, payload) -} - -func (o *GetInstallComponentForbidden) GetPayload() *models.StderrErrResponse { - return o.Payload -} - -func (o *GetInstallComponentForbidden) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.StderrErrResponse) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewGetInstallComponentNotFound creates a GetInstallComponentNotFound with default headers values -func NewGetInstallComponentNotFound() *GetInstallComponentNotFound { - return &GetInstallComponentNotFound{} -} - -/* -GetInstallComponentNotFound describes a response with status code 404, with default header values. - -Not Found -*/ -type GetInstallComponentNotFound struct { - Payload *models.StderrErrResponse -} - -// IsSuccess returns true when this get install component not found response has a 2xx status code -func (o *GetInstallComponentNotFound) IsSuccess() bool { - return false -} - -// IsRedirect returns true when this get install component not found response has a 3xx status code -func (o *GetInstallComponentNotFound) IsRedirect() bool { - return false -} - -// IsClientError returns true when this get install component not found response has a 4xx status code -func (o *GetInstallComponentNotFound) IsClientError() bool { - return true -} - -// IsServerError returns true when this get install component not found response has a 5xx status code -func (o *GetInstallComponentNotFound) IsServerError() bool { - return false -} - -// IsCode returns true when this get install component not found response a status code equal to that given -func (o *GetInstallComponentNotFound) IsCode(code int) bool { - return code == 404 -} - -// Code gets the status code for the get install component not found response -func (o *GetInstallComponentNotFound) Code() int { - return 404 -} - -func (o *GetInstallComponentNotFound) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /v1/installs/{install_id}/component/{component_id}][%d] getInstallComponentNotFound %s", 404, payload) -} - -func (o *GetInstallComponentNotFound) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /v1/installs/{install_id}/component/{component_id}][%d] getInstallComponentNotFound %s", 404, payload) -} - -func (o *GetInstallComponentNotFound) GetPayload() *models.StderrErrResponse { - return o.Payload -} - -func (o *GetInstallComponentNotFound) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.StderrErrResponse) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewGetInstallComponentInternalServerError creates a GetInstallComponentInternalServerError with default headers values -func NewGetInstallComponentInternalServerError() *GetInstallComponentInternalServerError { - return &GetInstallComponentInternalServerError{} -} - -/* -GetInstallComponentInternalServerError describes a response with status code 500, with default header values. - -Internal Server Error -*/ -type GetInstallComponentInternalServerError struct { - Payload *models.StderrErrResponse -} - -// IsSuccess returns true when this get install component internal server error response has a 2xx status code -func (o *GetInstallComponentInternalServerError) IsSuccess() bool { - return false -} - -// IsRedirect returns true when this get install component internal server error response has a 3xx status code -func (o *GetInstallComponentInternalServerError) IsRedirect() bool { - return false -} - -// IsClientError returns true when this get install component internal server error response has a 4xx status code -func (o *GetInstallComponentInternalServerError) IsClientError() bool { - return false -} - -// IsServerError returns true when this get install component internal server error response has a 5xx status code -func (o *GetInstallComponentInternalServerError) IsServerError() bool { - return true -} - -// IsCode returns true when this get install component internal server error response a status code equal to that given -func (o *GetInstallComponentInternalServerError) IsCode(code int) bool { - return code == 500 -} - -// Code gets the status code for the get install component internal server error response -func (o *GetInstallComponentInternalServerError) Code() int { - return 500 -} - -func (o *GetInstallComponentInternalServerError) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /v1/installs/{install_id}/component/{component_id}][%d] getInstallComponentInternalServerError %s", 500, payload) -} - -func (o *GetInstallComponentInternalServerError) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /v1/installs/{install_id}/component/{component_id}][%d] getInstallComponentInternalServerError %s", 500, payload) -} - -func (o *GetInstallComponentInternalServerError) GetPayload() *models.StderrErrResponse { - return o.Payload -} - -func (o *GetInstallComponentInternalServerError) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.StderrErrResponse) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} diff --git a/client/operations/get_install_components_parameters.go b/client/operations/get_install_components_parameters.go deleted file mode 100644 index c5549aa..0000000 --- a/client/operations/get_install_components_parameters.go +++ /dev/null @@ -1,151 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package operations - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "context" - "net/http" - "time" - - "github.com/go-openapi/errors" - "github.com/go-openapi/runtime" - cr "github.com/go-openapi/runtime/client" - "github.com/go-openapi/strfmt" -) - -// NewGetInstallComponentsParams creates a new GetInstallComponentsParams object, -// with the default timeout for this client. -// -// Default values are not hydrated, since defaults are normally applied by the API server side. -// -// To enforce default values in parameter, use SetDefaults or WithDefaults. -func NewGetInstallComponentsParams() *GetInstallComponentsParams { - return &GetInstallComponentsParams{ - timeout: cr.DefaultTimeout, - } -} - -// NewGetInstallComponentsParamsWithTimeout creates a new GetInstallComponentsParams object -// with the ability to set a timeout on a request. -func NewGetInstallComponentsParamsWithTimeout(timeout time.Duration) *GetInstallComponentsParams { - return &GetInstallComponentsParams{ - timeout: timeout, - } -} - -// NewGetInstallComponentsParamsWithContext creates a new GetInstallComponentsParams object -// with the ability to set a context for a request. -func NewGetInstallComponentsParamsWithContext(ctx context.Context) *GetInstallComponentsParams { - return &GetInstallComponentsParams{ - Context: ctx, - } -} - -// NewGetInstallComponentsParamsWithHTTPClient creates a new GetInstallComponentsParams object -// with the ability to set a custom HTTPClient for a request. -func NewGetInstallComponentsParamsWithHTTPClient(client *http.Client) *GetInstallComponentsParams { - return &GetInstallComponentsParams{ - HTTPClient: client, - } -} - -/* -GetInstallComponentsParams contains all the parameters to send to the API endpoint - - for the get install components operation. - - Typically these are written to a http.Request. -*/ -type GetInstallComponentsParams struct { - - /* InstallID. - - install ID - */ - InstallID string - - timeout time.Duration - Context context.Context - HTTPClient *http.Client -} - -// WithDefaults hydrates default values in the get install components params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *GetInstallComponentsParams) WithDefaults() *GetInstallComponentsParams { - o.SetDefaults() - return o -} - -// SetDefaults hydrates default values in the get install components params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *GetInstallComponentsParams) SetDefaults() { - // no default values defined for this parameter -} - -// WithTimeout adds the timeout to the get install components params -func (o *GetInstallComponentsParams) WithTimeout(timeout time.Duration) *GetInstallComponentsParams { - o.SetTimeout(timeout) - return o -} - -// SetTimeout adds the timeout to the get install components params -func (o *GetInstallComponentsParams) SetTimeout(timeout time.Duration) { - o.timeout = timeout -} - -// WithContext adds the context to the get install components params -func (o *GetInstallComponentsParams) WithContext(ctx context.Context) *GetInstallComponentsParams { - o.SetContext(ctx) - return o -} - -// SetContext adds the context to the get install components params -func (o *GetInstallComponentsParams) SetContext(ctx context.Context) { - o.Context = ctx -} - -// WithHTTPClient adds the HTTPClient to the get install components params -func (o *GetInstallComponentsParams) WithHTTPClient(client *http.Client) *GetInstallComponentsParams { - o.SetHTTPClient(client) - return o -} - -// SetHTTPClient adds the HTTPClient to the get install components params -func (o *GetInstallComponentsParams) SetHTTPClient(client *http.Client) { - o.HTTPClient = client -} - -// WithInstallID adds the installID to the get install components params -func (o *GetInstallComponentsParams) WithInstallID(installID string) *GetInstallComponentsParams { - o.SetInstallID(installID) - return o -} - -// SetInstallID adds the installId to the get install components params -func (o *GetInstallComponentsParams) SetInstallID(installID string) { - o.InstallID = installID -} - -// WriteToRequest writes these params to a swagger request -func (o *GetInstallComponentsParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { - - if err := r.SetTimeout(o.timeout); err != nil { - return err - } - var res []error - - // path param install_id - if err := r.SetPathParam("install_id", o.InstallID); err != nil { - return err - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} diff --git a/client/operations/get_install_components_responses.go b/client/operations/get_install_components_responses.go deleted file mode 100644 index 7f9dce6..0000000 --- a/client/operations/get_install_components_responses.go +++ /dev/null @@ -1,484 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package operations - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "encoding/json" - "fmt" - "io" - - "github.com/go-openapi/runtime" - "github.com/go-openapi/strfmt" - - "github.com/nuonco/nuon-go/models" -) - -// GetInstallComponentsReader is a Reader for the GetInstallComponents structure. -type GetInstallComponentsReader struct { - formats strfmt.Registry -} - -// ReadResponse reads a server response into the received o. -func (o *GetInstallComponentsReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { - switch response.Code() { - case 200: - result := NewGetInstallComponentsOK() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return result, nil - case 400: - result := NewGetInstallComponentsBadRequest() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return nil, result - case 401: - result := NewGetInstallComponentsUnauthorized() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return nil, result - case 403: - result := NewGetInstallComponentsForbidden() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return nil, result - case 404: - result := NewGetInstallComponentsNotFound() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return nil, result - case 500: - result := NewGetInstallComponentsInternalServerError() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return nil, result - default: - return nil, runtime.NewAPIError("[GET /v1/installs/{install_id}/components] GetInstallComponents", response, response.Code()) - } -} - -// NewGetInstallComponentsOK creates a GetInstallComponentsOK with default headers values -func NewGetInstallComponentsOK() *GetInstallComponentsOK { - return &GetInstallComponentsOK{} -} - -/* -GetInstallComponentsOK describes a response with status code 200, with default header values. - -OK -*/ -type GetInstallComponentsOK struct { - Payload []*models.AppInstallComponent -} - -// IsSuccess returns true when this get install components o k response has a 2xx status code -func (o *GetInstallComponentsOK) IsSuccess() bool { - return true -} - -// IsRedirect returns true when this get install components o k response has a 3xx status code -func (o *GetInstallComponentsOK) IsRedirect() bool { - return false -} - -// IsClientError returns true when this get install components o k response has a 4xx status code -func (o *GetInstallComponentsOK) IsClientError() bool { - return false -} - -// IsServerError returns true when this get install components o k response has a 5xx status code -func (o *GetInstallComponentsOK) IsServerError() bool { - return false -} - -// IsCode returns true when this get install components o k response a status code equal to that given -func (o *GetInstallComponentsOK) IsCode(code int) bool { - return code == 200 -} - -// Code gets the status code for the get install components o k response -func (o *GetInstallComponentsOK) Code() int { - return 200 -} - -func (o *GetInstallComponentsOK) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /v1/installs/{install_id}/components][%d] getInstallComponentsOK %s", 200, payload) -} - -func (o *GetInstallComponentsOK) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /v1/installs/{install_id}/components][%d] getInstallComponentsOK %s", 200, payload) -} - -func (o *GetInstallComponentsOK) GetPayload() []*models.AppInstallComponent { - return o.Payload -} - -func (o *GetInstallComponentsOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - // response payload - if err := consumer.Consume(response.Body(), &o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewGetInstallComponentsBadRequest creates a GetInstallComponentsBadRequest with default headers values -func NewGetInstallComponentsBadRequest() *GetInstallComponentsBadRequest { - return &GetInstallComponentsBadRequest{} -} - -/* -GetInstallComponentsBadRequest describes a response with status code 400, with default header values. - -Bad Request -*/ -type GetInstallComponentsBadRequest struct { - Payload *models.StderrErrResponse -} - -// IsSuccess returns true when this get install components bad request response has a 2xx status code -func (o *GetInstallComponentsBadRequest) IsSuccess() bool { - return false -} - -// IsRedirect returns true when this get install components bad request response has a 3xx status code -func (o *GetInstallComponentsBadRequest) IsRedirect() bool { - return false -} - -// IsClientError returns true when this get install components bad request response has a 4xx status code -func (o *GetInstallComponentsBadRequest) IsClientError() bool { - return true -} - -// IsServerError returns true when this get install components bad request response has a 5xx status code -func (o *GetInstallComponentsBadRequest) IsServerError() bool { - return false -} - -// IsCode returns true when this get install components bad request response a status code equal to that given -func (o *GetInstallComponentsBadRequest) IsCode(code int) bool { - return code == 400 -} - -// Code gets the status code for the get install components bad request response -func (o *GetInstallComponentsBadRequest) Code() int { - return 400 -} - -func (o *GetInstallComponentsBadRequest) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /v1/installs/{install_id}/components][%d] getInstallComponentsBadRequest %s", 400, payload) -} - -func (o *GetInstallComponentsBadRequest) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /v1/installs/{install_id}/components][%d] getInstallComponentsBadRequest %s", 400, payload) -} - -func (o *GetInstallComponentsBadRequest) GetPayload() *models.StderrErrResponse { - return o.Payload -} - -func (o *GetInstallComponentsBadRequest) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.StderrErrResponse) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewGetInstallComponentsUnauthorized creates a GetInstallComponentsUnauthorized with default headers values -func NewGetInstallComponentsUnauthorized() *GetInstallComponentsUnauthorized { - return &GetInstallComponentsUnauthorized{} -} - -/* -GetInstallComponentsUnauthorized describes a response with status code 401, with default header values. - -Unauthorized -*/ -type GetInstallComponentsUnauthorized struct { - Payload *models.StderrErrResponse -} - -// IsSuccess returns true when this get install components unauthorized response has a 2xx status code -func (o *GetInstallComponentsUnauthorized) IsSuccess() bool { - return false -} - -// IsRedirect returns true when this get install components unauthorized response has a 3xx status code -func (o *GetInstallComponentsUnauthorized) IsRedirect() bool { - return false -} - -// IsClientError returns true when this get install components unauthorized response has a 4xx status code -func (o *GetInstallComponentsUnauthorized) IsClientError() bool { - return true -} - -// IsServerError returns true when this get install components unauthorized response has a 5xx status code -func (o *GetInstallComponentsUnauthorized) IsServerError() bool { - return false -} - -// IsCode returns true when this get install components unauthorized response a status code equal to that given -func (o *GetInstallComponentsUnauthorized) IsCode(code int) bool { - return code == 401 -} - -// Code gets the status code for the get install components unauthorized response -func (o *GetInstallComponentsUnauthorized) Code() int { - return 401 -} - -func (o *GetInstallComponentsUnauthorized) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /v1/installs/{install_id}/components][%d] getInstallComponentsUnauthorized %s", 401, payload) -} - -func (o *GetInstallComponentsUnauthorized) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /v1/installs/{install_id}/components][%d] getInstallComponentsUnauthorized %s", 401, payload) -} - -func (o *GetInstallComponentsUnauthorized) GetPayload() *models.StderrErrResponse { - return o.Payload -} - -func (o *GetInstallComponentsUnauthorized) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.StderrErrResponse) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewGetInstallComponentsForbidden creates a GetInstallComponentsForbidden with default headers values -func NewGetInstallComponentsForbidden() *GetInstallComponentsForbidden { - return &GetInstallComponentsForbidden{} -} - -/* -GetInstallComponentsForbidden describes a response with status code 403, with default header values. - -Forbidden -*/ -type GetInstallComponentsForbidden struct { - Payload *models.StderrErrResponse -} - -// IsSuccess returns true when this get install components forbidden response has a 2xx status code -func (o *GetInstallComponentsForbidden) IsSuccess() bool { - return false -} - -// IsRedirect returns true when this get install components forbidden response has a 3xx status code -func (o *GetInstallComponentsForbidden) IsRedirect() bool { - return false -} - -// IsClientError returns true when this get install components forbidden response has a 4xx status code -func (o *GetInstallComponentsForbidden) IsClientError() bool { - return true -} - -// IsServerError returns true when this get install components forbidden response has a 5xx status code -func (o *GetInstallComponentsForbidden) IsServerError() bool { - return false -} - -// IsCode returns true when this get install components forbidden response a status code equal to that given -func (o *GetInstallComponentsForbidden) IsCode(code int) bool { - return code == 403 -} - -// Code gets the status code for the get install components forbidden response -func (o *GetInstallComponentsForbidden) Code() int { - return 403 -} - -func (o *GetInstallComponentsForbidden) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /v1/installs/{install_id}/components][%d] getInstallComponentsForbidden %s", 403, payload) -} - -func (o *GetInstallComponentsForbidden) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /v1/installs/{install_id}/components][%d] getInstallComponentsForbidden %s", 403, payload) -} - -func (o *GetInstallComponentsForbidden) GetPayload() *models.StderrErrResponse { - return o.Payload -} - -func (o *GetInstallComponentsForbidden) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.StderrErrResponse) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewGetInstallComponentsNotFound creates a GetInstallComponentsNotFound with default headers values -func NewGetInstallComponentsNotFound() *GetInstallComponentsNotFound { - return &GetInstallComponentsNotFound{} -} - -/* -GetInstallComponentsNotFound describes a response with status code 404, with default header values. - -Not Found -*/ -type GetInstallComponentsNotFound struct { - Payload *models.StderrErrResponse -} - -// IsSuccess returns true when this get install components not found response has a 2xx status code -func (o *GetInstallComponentsNotFound) IsSuccess() bool { - return false -} - -// IsRedirect returns true when this get install components not found response has a 3xx status code -func (o *GetInstallComponentsNotFound) IsRedirect() bool { - return false -} - -// IsClientError returns true when this get install components not found response has a 4xx status code -func (o *GetInstallComponentsNotFound) IsClientError() bool { - return true -} - -// IsServerError returns true when this get install components not found response has a 5xx status code -func (o *GetInstallComponentsNotFound) IsServerError() bool { - return false -} - -// IsCode returns true when this get install components not found response a status code equal to that given -func (o *GetInstallComponentsNotFound) IsCode(code int) bool { - return code == 404 -} - -// Code gets the status code for the get install components not found response -func (o *GetInstallComponentsNotFound) Code() int { - return 404 -} - -func (o *GetInstallComponentsNotFound) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /v1/installs/{install_id}/components][%d] getInstallComponentsNotFound %s", 404, payload) -} - -func (o *GetInstallComponentsNotFound) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /v1/installs/{install_id}/components][%d] getInstallComponentsNotFound %s", 404, payload) -} - -func (o *GetInstallComponentsNotFound) GetPayload() *models.StderrErrResponse { - return o.Payload -} - -func (o *GetInstallComponentsNotFound) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.StderrErrResponse) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewGetInstallComponentsInternalServerError creates a GetInstallComponentsInternalServerError with default headers values -func NewGetInstallComponentsInternalServerError() *GetInstallComponentsInternalServerError { - return &GetInstallComponentsInternalServerError{} -} - -/* -GetInstallComponentsInternalServerError describes a response with status code 500, with default header values. - -Internal Server Error -*/ -type GetInstallComponentsInternalServerError struct { - Payload *models.StderrErrResponse -} - -// IsSuccess returns true when this get install components internal server error response has a 2xx status code -func (o *GetInstallComponentsInternalServerError) IsSuccess() bool { - return false -} - -// IsRedirect returns true when this get install components internal server error response has a 3xx status code -func (o *GetInstallComponentsInternalServerError) IsRedirect() bool { - return false -} - -// IsClientError returns true when this get install components internal server error response has a 4xx status code -func (o *GetInstallComponentsInternalServerError) IsClientError() bool { - return false -} - -// IsServerError returns true when this get install components internal server error response has a 5xx status code -func (o *GetInstallComponentsInternalServerError) IsServerError() bool { - return true -} - -// IsCode returns true when this get install components internal server error response a status code equal to that given -func (o *GetInstallComponentsInternalServerError) IsCode(code int) bool { - return code == 500 -} - -// Code gets the status code for the get install components internal server error response -func (o *GetInstallComponentsInternalServerError) Code() int { - return 500 -} - -func (o *GetInstallComponentsInternalServerError) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /v1/installs/{install_id}/components][%d] getInstallComponentsInternalServerError %s", 500, payload) -} - -func (o *GetInstallComponentsInternalServerError) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /v1/installs/{install_id}/components][%d] getInstallComponentsInternalServerError %s", 500, payload) -} - -func (o *GetInstallComponentsInternalServerError) GetPayload() *models.StderrErrResponse { - return o.Payload -} - -func (o *GetInstallComponentsInternalServerError) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.StderrErrResponse) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} diff --git a/client/operations/get_install_deploy_logs_parameters.go b/client/operations/get_install_deploy_logs_parameters.go deleted file mode 100644 index 82b83b6..0000000 --- a/client/operations/get_install_deploy_logs_parameters.go +++ /dev/null @@ -1,173 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package operations - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "context" - "net/http" - "time" - - "github.com/go-openapi/errors" - "github.com/go-openapi/runtime" - cr "github.com/go-openapi/runtime/client" - "github.com/go-openapi/strfmt" -) - -// NewGetInstallDeployLogsParams creates a new GetInstallDeployLogsParams object, -// with the default timeout for this client. -// -// Default values are not hydrated, since defaults are normally applied by the API server side. -// -// To enforce default values in parameter, use SetDefaults or WithDefaults. -func NewGetInstallDeployLogsParams() *GetInstallDeployLogsParams { - return &GetInstallDeployLogsParams{ - timeout: cr.DefaultTimeout, - } -} - -// NewGetInstallDeployLogsParamsWithTimeout creates a new GetInstallDeployLogsParams object -// with the ability to set a timeout on a request. -func NewGetInstallDeployLogsParamsWithTimeout(timeout time.Duration) *GetInstallDeployLogsParams { - return &GetInstallDeployLogsParams{ - timeout: timeout, - } -} - -// NewGetInstallDeployLogsParamsWithContext creates a new GetInstallDeployLogsParams object -// with the ability to set a context for a request. -func NewGetInstallDeployLogsParamsWithContext(ctx context.Context) *GetInstallDeployLogsParams { - return &GetInstallDeployLogsParams{ - Context: ctx, - } -} - -// NewGetInstallDeployLogsParamsWithHTTPClient creates a new GetInstallDeployLogsParams object -// with the ability to set a custom HTTPClient for a request. -func NewGetInstallDeployLogsParamsWithHTTPClient(client *http.Client) *GetInstallDeployLogsParams { - return &GetInstallDeployLogsParams{ - HTTPClient: client, - } -} - -/* -GetInstallDeployLogsParams contains all the parameters to send to the API endpoint - - for the get install deploy logs operation. - - Typically these are written to a http.Request. -*/ -type GetInstallDeployLogsParams struct { - - /* DeployID. - - deploy ID - */ - DeployID string - - /* InstallID. - - install ID - */ - InstallID string - - timeout time.Duration - Context context.Context - HTTPClient *http.Client -} - -// WithDefaults hydrates default values in the get install deploy logs params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *GetInstallDeployLogsParams) WithDefaults() *GetInstallDeployLogsParams { - o.SetDefaults() - return o -} - -// SetDefaults hydrates default values in the get install deploy logs params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *GetInstallDeployLogsParams) SetDefaults() { - // no default values defined for this parameter -} - -// WithTimeout adds the timeout to the get install deploy logs params -func (o *GetInstallDeployLogsParams) WithTimeout(timeout time.Duration) *GetInstallDeployLogsParams { - o.SetTimeout(timeout) - return o -} - -// SetTimeout adds the timeout to the get install deploy logs params -func (o *GetInstallDeployLogsParams) SetTimeout(timeout time.Duration) { - o.timeout = timeout -} - -// WithContext adds the context to the get install deploy logs params -func (o *GetInstallDeployLogsParams) WithContext(ctx context.Context) *GetInstallDeployLogsParams { - o.SetContext(ctx) - return o -} - -// SetContext adds the context to the get install deploy logs params -func (o *GetInstallDeployLogsParams) SetContext(ctx context.Context) { - o.Context = ctx -} - -// WithHTTPClient adds the HTTPClient to the get install deploy logs params -func (o *GetInstallDeployLogsParams) WithHTTPClient(client *http.Client) *GetInstallDeployLogsParams { - o.SetHTTPClient(client) - return o -} - -// SetHTTPClient adds the HTTPClient to the get install deploy logs params -func (o *GetInstallDeployLogsParams) SetHTTPClient(client *http.Client) { - o.HTTPClient = client -} - -// WithDeployID adds the deployID to the get install deploy logs params -func (o *GetInstallDeployLogsParams) WithDeployID(deployID string) *GetInstallDeployLogsParams { - o.SetDeployID(deployID) - return o -} - -// SetDeployID adds the deployId to the get install deploy logs params -func (o *GetInstallDeployLogsParams) SetDeployID(deployID string) { - o.DeployID = deployID -} - -// WithInstallID adds the installID to the get install deploy logs params -func (o *GetInstallDeployLogsParams) WithInstallID(installID string) *GetInstallDeployLogsParams { - o.SetInstallID(installID) - return o -} - -// SetInstallID adds the installId to the get install deploy logs params -func (o *GetInstallDeployLogsParams) SetInstallID(installID string) { - o.InstallID = installID -} - -// WriteToRequest writes these params to a swagger request -func (o *GetInstallDeployLogsParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { - - if err := r.SetTimeout(o.timeout); err != nil { - return err - } - var res []error - - // path param deploy_id - if err := r.SetPathParam("deploy_id", o.DeployID); err != nil { - return err - } - - // path param install_id - if err := r.SetPathParam("install_id", o.InstallID); err != nil { - return err - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} diff --git a/client/operations/get_install_deploy_logs_responses.go b/client/operations/get_install_deploy_logs_responses.go deleted file mode 100644 index 083934b..0000000 --- a/client/operations/get_install_deploy_logs_responses.go +++ /dev/null @@ -1,484 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package operations - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "encoding/json" - "fmt" - "io" - - "github.com/go-openapi/runtime" - "github.com/go-openapi/strfmt" - - "github.com/nuonco/nuon-go/models" -) - -// GetInstallDeployLogsReader is a Reader for the GetInstallDeployLogs structure. -type GetInstallDeployLogsReader struct { - formats strfmt.Registry -} - -// ReadResponse reads a server response into the received o. -func (o *GetInstallDeployLogsReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { - switch response.Code() { - case 200: - result := NewGetInstallDeployLogsOK() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return result, nil - case 400: - result := NewGetInstallDeployLogsBadRequest() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return nil, result - case 401: - result := NewGetInstallDeployLogsUnauthorized() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return nil, result - case 403: - result := NewGetInstallDeployLogsForbidden() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return nil, result - case 404: - result := NewGetInstallDeployLogsNotFound() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return nil, result - case 500: - result := NewGetInstallDeployLogsInternalServerError() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return nil, result - default: - return nil, runtime.NewAPIError("[GET /v1/installs/{install_id}/deploys/{deploy_id}/logs] GetInstallDeployLogs", response, response.Code()) - } -} - -// NewGetInstallDeployLogsOK creates a GetInstallDeployLogsOK with default headers values -func NewGetInstallDeployLogsOK() *GetInstallDeployLogsOK { - return &GetInstallDeployLogsOK{} -} - -/* -GetInstallDeployLogsOK describes a response with status code 200, with default header values. - -OK -*/ -type GetInstallDeployLogsOK struct { - Payload []interface{} -} - -// IsSuccess returns true when this get install deploy logs o k response has a 2xx status code -func (o *GetInstallDeployLogsOK) IsSuccess() bool { - return true -} - -// IsRedirect returns true when this get install deploy logs o k response has a 3xx status code -func (o *GetInstallDeployLogsOK) IsRedirect() bool { - return false -} - -// IsClientError returns true when this get install deploy logs o k response has a 4xx status code -func (o *GetInstallDeployLogsOK) IsClientError() bool { - return false -} - -// IsServerError returns true when this get install deploy logs o k response has a 5xx status code -func (o *GetInstallDeployLogsOK) IsServerError() bool { - return false -} - -// IsCode returns true when this get install deploy logs o k response a status code equal to that given -func (o *GetInstallDeployLogsOK) IsCode(code int) bool { - return code == 200 -} - -// Code gets the status code for the get install deploy logs o k response -func (o *GetInstallDeployLogsOK) Code() int { - return 200 -} - -func (o *GetInstallDeployLogsOK) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /v1/installs/{install_id}/deploys/{deploy_id}/logs][%d] getInstallDeployLogsOK %s", 200, payload) -} - -func (o *GetInstallDeployLogsOK) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /v1/installs/{install_id}/deploys/{deploy_id}/logs][%d] getInstallDeployLogsOK %s", 200, payload) -} - -func (o *GetInstallDeployLogsOK) GetPayload() []interface{} { - return o.Payload -} - -func (o *GetInstallDeployLogsOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - // response payload - if err := consumer.Consume(response.Body(), &o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewGetInstallDeployLogsBadRequest creates a GetInstallDeployLogsBadRequest with default headers values -func NewGetInstallDeployLogsBadRequest() *GetInstallDeployLogsBadRequest { - return &GetInstallDeployLogsBadRequest{} -} - -/* -GetInstallDeployLogsBadRequest describes a response with status code 400, with default header values. - -Bad Request -*/ -type GetInstallDeployLogsBadRequest struct { - Payload *models.StderrErrResponse -} - -// IsSuccess returns true when this get install deploy logs bad request response has a 2xx status code -func (o *GetInstallDeployLogsBadRequest) IsSuccess() bool { - return false -} - -// IsRedirect returns true when this get install deploy logs bad request response has a 3xx status code -func (o *GetInstallDeployLogsBadRequest) IsRedirect() bool { - return false -} - -// IsClientError returns true when this get install deploy logs bad request response has a 4xx status code -func (o *GetInstallDeployLogsBadRequest) IsClientError() bool { - return true -} - -// IsServerError returns true when this get install deploy logs bad request response has a 5xx status code -func (o *GetInstallDeployLogsBadRequest) IsServerError() bool { - return false -} - -// IsCode returns true when this get install deploy logs bad request response a status code equal to that given -func (o *GetInstallDeployLogsBadRequest) IsCode(code int) bool { - return code == 400 -} - -// Code gets the status code for the get install deploy logs bad request response -func (o *GetInstallDeployLogsBadRequest) Code() int { - return 400 -} - -func (o *GetInstallDeployLogsBadRequest) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /v1/installs/{install_id}/deploys/{deploy_id}/logs][%d] getInstallDeployLogsBadRequest %s", 400, payload) -} - -func (o *GetInstallDeployLogsBadRequest) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /v1/installs/{install_id}/deploys/{deploy_id}/logs][%d] getInstallDeployLogsBadRequest %s", 400, payload) -} - -func (o *GetInstallDeployLogsBadRequest) GetPayload() *models.StderrErrResponse { - return o.Payload -} - -func (o *GetInstallDeployLogsBadRequest) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.StderrErrResponse) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewGetInstallDeployLogsUnauthorized creates a GetInstallDeployLogsUnauthorized with default headers values -func NewGetInstallDeployLogsUnauthorized() *GetInstallDeployLogsUnauthorized { - return &GetInstallDeployLogsUnauthorized{} -} - -/* -GetInstallDeployLogsUnauthorized describes a response with status code 401, with default header values. - -Unauthorized -*/ -type GetInstallDeployLogsUnauthorized struct { - Payload *models.StderrErrResponse -} - -// IsSuccess returns true when this get install deploy logs unauthorized response has a 2xx status code -func (o *GetInstallDeployLogsUnauthorized) IsSuccess() bool { - return false -} - -// IsRedirect returns true when this get install deploy logs unauthorized response has a 3xx status code -func (o *GetInstallDeployLogsUnauthorized) IsRedirect() bool { - return false -} - -// IsClientError returns true when this get install deploy logs unauthorized response has a 4xx status code -func (o *GetInstallDeployLogsUnauthorized) IsClientError() bool { - return true -} - -// IsServerError returns true when this get install deploy logs unauthorized response has a 5xx status code -func (o *GetInstallDeployLogsUnauthorized) IsServerError() bool { - return false -} - -// IsCode returns true when this get install deploy logs unauthorized response a status code equal to that given -func (o *GetInstallDeployLogsUnauthorized) IsCode(code int) bool { - return code == 401 -} - -// Code gets the status code for the get install deploy logs unauthorized response -func (o *GetInstallDeployLogsUnauthorized) Code() int { - return 401 -} - -func (o *GetInstallDeployLogsUnauthorized) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /v1/installs/{install_id}/deploys/{deploy_id}/logs][%d] getInstallDeployLogsUnauthorized %s", 401, payload) -} - -func (o *GetInstallDeployLogsUnauthorized) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /v1/installs/{install_id}/deploys/{deploy_id}/logs][%d] getInstallDeployLogsUnauthorized %s", 401, payload) -} - -func (o *GetInstallDeployLogsUnauthorized) GetPayload() *models.StderrErrResponse { - return o.Payload -} - -func (o *GetInstallDeployLogsUnauthorized) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.StderrErrResponse) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewGetInstallDeployLogsForbidden creates a GetInstallDeployLogsForbidden with default headers values -func NewGetInstallDeployLogsForbidden() *GetInstallDeployLogsForbidden { - return &GetInstallDeployLogsForbidden{} -} - -/* -GetInstallDeployLogsForbidden describes a response with status code 403, with default header values. - -Forbidden -*/ -type GetInstallDeployLogsForbidden struct { - Payload *models.StderrErrResponse -} - -// IsSuccess returns true when this get install deploy logs forbidden response has a 2xx status code -func (o *GetInstallDeployLogsForbidden) IsSuccess() bool { - return false -} - -// IsRedirect returns true when this get install deploy logs forbidden response has a 3xx status code -func (o *GetInstallDeployLogsForbidden) IsRedirect() bool { - return false -} - -// IsClientError returns true when this get install deploy logs forbidden response has a 4xx status code -func (o *GetInstallDeployLogsForbidden) IsClientError() bool { - return true -} - -// IsServerError returns true when this get install deploy logs forbidden response has a 5xx status code -func (o *GetInstallDeployLogsForbidden) IsServerError() bool { - return false -} - -// IsCode returns true when this get install deploy logs forbidden response a status code equal to that given -func (o *GetInstallDeployLogsForbidden) IsCode(code int) bool { - return code == 403 -} - -// Code gets the status code for the get install deploy logs forbidden response -func (o *GetInstallDeployLogsForbidden) Code() int { - return 403 -} - -func (o *GetInstallDeployLogsForbidden) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /v1/installs/{install_id}/deploys/{deploy_id}/logs][%d] getInstallDeployLogsForbidden %s", 403, payload) -} - -func (o *GetInstallDeployLogsForbidden) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /v1/installs/{install_id}/deploys/{deploy_id}/logs][%d] getInstallDeployLogsForbidden %s", 403, payload) -} - -func (o *GetInstallDeployLogsForbidden) GetPayload() *models.StderrErrResponse { - return o.Payload -} - -func (o *GetInstallDeployLogsForbidden) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.StderrErrResponse) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewGetInstallDeployLogsNotFound creates a GetInstallDeployLogsNotFound with default headers values -func NewGetInstallDeployLogsNotFound() *GetInstallDeployLogsNotFound { - return &GetInstallDeployLogsNotFound{} -} - -/* -GetInstallDeployLogsNotFound describes a response with status code 404, with default header values. - -Not Found -*/ -type GetInstallDeployLogsNotFound struct { - Payload *models.StderrErrResponse -} - -// IsSuccess returns true when this get install deploy logs not found response has a 2xx status code -func (o *GetInstallDeployLogsNotFound) IsSuccess() bool { - return false -} - -// IsRedirect returns true when this get install deploy logs not found response has a 3xx status code -func (o *GetInstallDeployLogsNotFound) IsRedirect() bool { - return false -} - -// IsClientError returns true when this get install deploy logs not found response has a 4xx status code -func (o *GetInstallDeployLogsNotFound) IsClientError() bool { - return true -} - -// IsServerError returns true when this get install deploy logs not found response has a 5xx status code -func (o *GetInstallDeployLogsNotFound) IsServerError() bool { - return false -} - -// IsCode returns true when this get install deploy logs not found response a status code equal to that given -func (o *GetInstallDeployLogsNotFound) IsCode(code int) bool { - return code == 404 -} - -// Code gets the status code for the get install deploy logs not found response -func (o *GetInstallDeployLogsNotFound) Code() int { - return 404 -} - -func (o *GetInstallDeployLogsNotFound) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /v1/installs/{install_id}/deploys/{deploy_id}/logs][%d] getInstallDeployLogsNotFound %s", 404, payload) -} - -func (o *GetInstallDeployLogsNotFound) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /v1/installs/{install_id}/deploys/{deploy_id}/logs][%d] getInstallDeployLogsNotFound %s", 404, payload) -} - -func (o *GetInstallDeployLogsNotFound) GetPayload() *models.StderrErrResponse { - return o.Payload -} - -func (o *GetInstallDeployLogsNotFound) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.StderrErrResponse) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewGetInstallDeployLogsInternalServerError creates a GetInstallDeployLogsInternalServerError with default headers values -func NewGetInstallDeployLogsInternalServerError() *GetInstallDeployLogsInternalServerError { - return &GetInstallDeployLogsInternalServerError{} -} - -/* -GetInstallDeployLogsInternalServerError describes a response with status code 500, with default header values. - -Internal Server Error -*/ -type GetInstallDeployLogsInternalServerError struct { - Payload *models.StderrErrResponse -} - -// IsSuccess returns true when this get install deploy logs internal server error response has a 2xx status code -func (o *GetInstallDeployLogsInternalServerError) IsSuccess() bool { - return false -} - -// IsRedirect returns true when this get install deploy logs internal server error response has a 3xx status code -func (o *GetInstallDeployLogsInternalServerError) IsRedirect() bool { - return false -} - -// IsClientError returns true when this get install deploy logs internal server error response has a 4xx status code -func (o *GetInstallDeployLogsInternalServerError) IsClientError() bool { - return false -} - -// IsServerError returns true when this get install deploy logs internal server error response has a 5xx status code -func (o *GetInstallDeployLogsInternalServerError) IsServerError() bool { - return true -} - -// IsCode returns true when this get install deploy logs internal server error response a status code equal to that given -func (o *GetInstallDeployLogsInternalServerError) IsCode(code int) bool { - return code == 500 -} - -// Code gets the status code for the get install deploy logs internal server error response -func (o *GetInstallDeployLogsInternalServerError) Code() int { - return 500 -} - -func (o *GetInstallDeployLogsInternalServerError) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /v1/installs/{install_id}/deploys/{deploy_id}/logs][%d] getInstallDeployLogsInternalServerError %s", 500, payload) -} - -func (o *GetInstallDeployLogsInternalServerError) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /v1/installs/{install_id}/deploys/{deploy_id}/logs][%d] getInstallDeployLogsInternalServerError %s", 500, payload) -} - -func (o *GetInstallDeployLogsInternalServerError) GetPayload() *models.StderrErrResponse { - return o.Payload -} - -func (o *GetInstallDeployLogsInternalServerError) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.StderrErrResponse) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} diff --git a/client/operations/get_install_deploy_parameters.go b/client/operations/get_install_deploy_parameters.go deleted file mode 100644 index d6cc118..0000000 --- a/client/operations/get_install_deploy_parameters.go +++ /dev/null @@ -1,173 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package operations - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "context" - "net/http" - "time" - - "github.com/go-openapi/errors" - "github.com/go-openapi/runtime" - cr "github.com/go-openapi/runtime/client" - "github.com/go-openapi/strfmt" -) - -// NewGetInstallDeployParams creates a new GetInstallDeployParams object, -// with the default timeout for this client. -// -// Default values are not hydrated, since defaults are normally applied by the API server side. -// -// To enforce default values in parameter, use SetDefaults or WithDefaults. -func NewGetInstallDeployParams() *GetInstallDeployParams { - return &GetInstallDeployParams{ - timeout: cr.DefaultTimeout, - } -} - -// NewGetInstallDeployParamsWithTimeout creates a new GetInstallDeployParams object -// with the ability to set a timeout on a request. -func NewGetInstallDeployParamsWithTimeout(timeout time.Duration) *GetInstallDeployParams { - return &GetInstallDeployParams{ - timeout: timeout, - } -} - -// NewGetInstallDeployParamsWithContext creates a new GetInstallDeployParams object -// with the ability to set a context for a request. -func NewGetInstallDeployParamsWithContext(ctx context.Context) *GetInstallDeployParams { - return &GetInstallDeployParams{ - Context: ctx, - } -} - -// NewGetInstallDeployParamsWithHTTPClient creates a new GetInstallDeployParams object -// with the ability to set a custom HTTPClient for a request. -func NewGetInstallDeployParamsWithHTTPClient(client *http.Client) *GetInstallDeployParams { - return &GetInstallDeployParams{ - HTTPClient: client, - } -} - -/* -GetInstallDeployParams contains all the parameters to send to the API endpoint - - for the get install deploy operation. - - Typically these are written to a http.Request. -*/ -type GetInstallDeployParams struct { - - /* DeployID. - - deploy ID - */ - DeployID string - - /* InstallID. - - install ID - */ - InstallID string - - timeout time.Duration - Context context.Context - HTTPClient *http.Client -} - -// WithDefaults hydrates default values in the get install deploy params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *GetInstallDeployParams) WithDefaults() *GetInstallDeployParams { - o.SetDefaults() - return o -} - -// SetDefaults hydrates default values in the get install deploy params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *GetInstallDeployParams) SetDefaults() { - // no default values defined for this parameter -} - -// WithTimeout adds the timeout to the get install deploy params -func (o *GetInstallDeployParams) WithTimeout(timeout time.Duration) *GetInstallDeployParams { - o.SetTimeout(timeout) - return o -} - -// SetTimeout adds the timeout to the get install deploy params -func (o *GetInstallDeployParams) SetTimeout(timeout time.Duration) { - o.timeout = timeout -} - -// WithContext adds the context to the get install deploy params -func (o *GetInstallDeployParams) WithContext(ctx context.Context) *GetInstallDeployParams { - o.SetContext(ctx) - return o -} - -// SetContext adds the context to the get install deploy params -func (o *GetInstallDeployParams) SetContext(ctx context.Context) { - o.Context = ctx -} - -// WithHTTPClient adds the HTTPClient to the get install deploy params -func (o *GetInstallDeployParams) WithHTTPClient(client *http.Client) *GetInstallDeployParams { - o.SetHTTPClient(client) - return o -} - -// SetHTTPClient adds the HTTPClient to the get install deploy params -func (o *GetInstallDeployParams) SetHTTPClient(client *http.Client) { - o.HTTPClient = client -} - -// WithDeployID adds the deployID to the get install deploy params -func (o *GetInstallDeployParams) WithDeployID(deployID string) *GetInstallDeployParams { - o.SetDeployID(deployID) - return o -} - -// SetDeployID adds the deployId to the get install deploy params -func (o *GetInstallDeployParams) SetDeployID(deployID string) { - o.DeployID = deployID -} - -// WithInstallID adds the installID to the get install deploy params -func (o *GetInstallDeployParams) WithInstallID(installID string) *GetInstallDeployParams { - o.SetInstallID(installID) - return o -} - -// SetInstallID adds the installId to the get install deploy params -func (o *GetInstallDeployParams) SetInstallID(installID string) { - o.InstallID = installID -} - -// WriteToRequest writes these params to a swagger request -func (o *GetInstallDeployParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { - - if err := r.SetTimeout(o.timeout); err != nil { - return err - } - var res []error - - // path param deploy_id - if err := r.SetPathParam("deploy_id", o.DeployID); err != nil { - return err - } - - // path param install_id - if err := r.SetPathParam("install_id", o.InstallID); err != nil { - return err - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} diff --git a/client/operations/get_install_deploy_plan_parameters.go b/client/operations/get_install_deploy_plan_parameters.go deleted file mode 100644 index c3d21d7..0000000 --- a/client/operations/get_install_deploy_plan_parameters.go +++ /dev/null @@ -1,173 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package operations - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "context" - "net/http" - "time" - - "github.com/go-openapi/errors" - "github.com/go-openapi/runtime" - cr "github.com/go-openapi/runtime/client" - "github.com/go-openapi/strfmt" -) - -// NewGetInstallDeployPlanParams creates a new GetInstallDeployPlanParams object, -// with the default timeout for this client. -// -// Default values are not hydrated, since defaults are normally applied by the API server side. -// -// To enforce default values in parameter, use SetDefaults or WithDefaults. -func NewGetInstallDeployPlanParams() *GetInstallDeployPlanParams { - return &GetInstallDeployPlanParams{ - timeout: cr.DefaultTimeout, - } -} - -// NewGetInstallDeployPlanParamsWithTimeout creates a new GetInstallDeployPlanParams object -// with the ability to set a timeout on a request. -func NewGetInstallDeployPlanParamsWithTimeout(timeout time.Duration) *GetInstallDeployPlanParams { - return &GetInstallDeployPlanParams{ - timeout: timeout, - } -} - -// NewGetInstallDeployPlanParamsWithContext creates a new GetInstallDeployPlanParams object -// with the ability to set a context for a request. -func NewGetInstallDeployPlanParamsWithContext(ctx context.Context) *GetInstallDeployPlanParams { - return &GetInstallDeployPlanParams{ - Context: ctx, - } -} - -// NewGetInstallDeployPlanParamsWithHTTPClient creates a new GetInstallDeployPlanParams object -// with the ability to set a custom HTTPClient for a request. -func NewGetInstallDeployPlanParamsWithHTTPClient(client *http.Client) *GetInstallDeployPlanParams { - return &GetInstallDeployPlanParams{ - HTTPClient: client, - } -} - -/* -GetInstallDeployPlanParams contains all the parameters to send to the API endpoint - - for the get install deploy plan operation. - - Typically these are written to a http.Request. -*/ -type GetInstallDeployPlanParams struct { - - /* DeployID. - - deploy ID - */ - DeployID string - - /* InstallID. - - install ID - */ - InstallID string - - timeout time.Duration - Context context.Context - HTTPClient *http.Client -} - -// WithDefaults hydrates default values in the get install deploy plan params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *GetInstallDeployPlanParams) WithDefaults() *GetInstallDeployPlanParams { - o.SetDefaults() - return o -} - -// SetDefaults hydrates default values in the get install deploy plan params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *GetInstallDeployPlanParams) SetDefaults() { - // no default values defined for this parameter -} - -// WithTimeout adds the timeout to the get install deploy plan params -func (o *GetInstallDeployPlanParams) WithTimeout(timeout time.Duration) *GetInstallDeployPlanParams { - o.SetTimeout(timeout) - return o -} - -// SetTimeout adds the timeout to the get install deploy plan params -func (o *GetInstallDeployPlanParams) SetTimeout(timeout time.Duration) { - o.timeout = timeout -} - -// WithContext adds the context to the get install deploy plan params -func (o *GetInstallDeployPlanParams) WithContext(ctx context.Context) *GetInstallDeployPlanParams { - o.SetContext(ctx) - return o -} - -// SetContext adds the context to the get install deploy plan params -func (o *GetInstallDeployPlanParams) SetContext(ctx context.Context) { - o.Context = ctx -} - -// WithHTTPClient adds the HTTPClient to the get install deploy plan params -func (o *GetInstallDeployPlanParams) WithHTTPClient(client *http.Client) *GetInstallDeployPlanParams { - o.SetHTTPClient(client) - return o -} - -// SetHTTPClient adds the HTTPClient to the get install deploy plan params -func (o *GetInstallDeployPlanParams) SetHTTPClient(client *http.Client) { - o.HTTPClient = client -} - -// WithDeployID adds the deployID to the get install deploy plan params -func (o *GetInstallDeployPlanParams) WithDeployID(deployID string) *GetInstallDeployPlanParams { - o.SetDeployID(deployID) - return o -} - -// SetDeployID adds the deployId to the get install deploy plan params -func (o *GetInstallDeployPlanParams) SetDeployID(deployID string) { - o.DeployID = deployID -} - -// WithInstallID adds the installID to the get install deploy plan params -func (o *GetInstallDeployPlanParams) WithInstallID(installID string) *GetInstallDeployPlanParams { - o.SetInstallID(installID) - return o -} - -// SetInstallID adds the installId to the get install deploy plan params -func (o *GetInstallDeployPlanParams) SetInstallID(installID string) { - o.InstallID = installID -} - -// WriteToRequest writes these params to a swagger request -func (o *GetInstallDeployPlanParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { - - if err := r.SetTimeout(o.timeout); err != nil { - return err - } - var res []error - - // path param deploy_id - if err := r.SetPathParam("deploy_id", o.DeployID); err != nil { - return err - } - - // path param install_id - if err := r.SetPathParam("install_id", o.InstallID); err != nil { - return err - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} diff --git a/client/operations/get_install_deploy_plan_responses.go b/client/operations/get_install_deploy_plan_responses.go deleted file mode 100644 index 4adcdba..0000000 --- a/client/operations/get_install_deploy_plan_responses.go +++ /dev/null @@ -1,486 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package operations - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "encoding/json" - "fmt" - "io" - - "github.com/go-openapi/runtime" - "github.com/go-openapi/strfmt" - - "github.com/nuonco/nuon-go/models" -) - -// GetInstallDeployPlanReader is a Reader for the GetInstallDeployPlan structure. -type GetInstallDeployPlanReader struct { - formats strfmt.Registry -} - -// ReadResponse reads a server response into the received o. -func (o *GetInstallDeployPlanReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { - switch response.Code() { - case 200: - result := NewGetInstallDeployPlanOK() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return result, nil - case 400: - result := NewGetInstallDeployPlanBadRequest() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return nil, result - case 401: - result := NewGetInstallDeployPlanUnauthorized() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return nil, result - case 403: - result := NewGetInstallDeployPlanForbidden() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return nil, result - case 404: - result := NewGetInstallDeployPlanNotFound() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return nil, result - case 500: - result := NewGetInstallDeployPlanInternalServerError() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return nil, result - default: - return nil, runtime.NewAPIError("[GET /v1/installs/{install_id}/deploys/{deploy_id}/plan] GetInstallDeployPlan", response, response.Code()) - } -} - -// NewGetInstallDeployPlanOK creates a GetInstallDeployPlanOK with default headers values -func NewGetInstallDeployPlanOK() *GetInstallDeployPlanOK { - return &GetInstallDeployPlanOK{} -} - -/* -GetInstallDeployPlanOK describes a response with status code 200, with default header values. - -OK -*/ -type GetInstallDeployPlanOK struct { - Payload *models.Planv1Plan -} - -// IsSuccess returns true when this get install deploy plan o k response has a 2xx status code -func (o *GetInstallDeployPlanOK) IsSuccess() bool { - return true -} - -// IsRedirect returns true when this get install deploy plan o k response has a 3xx status code -func (o *GetInstallDeployPlanOK) IsRedirect() bool { - return false -} - -// IsClientError returns true when this get install deploy plan o k response has a 4xx status code -func (o *GetInstallDeployPlanOK) IsClientError() bool { - return false -} - -// IsServerError returns true when this get install deploy plan o k response has a 5xx status code -func (o *GetInstallDeployPlanOK) IsServerError() bool { - return false -} - -// IsCode returns true when this get install deploy plan o k response a status code equal to that given -func (o *GetInstallDeployPlanOK) IsCode(code int) bool { - return code == 200 -} - -// Code gets the status code for the get install deploy plan o k response -func (o *GetInstallDeployPlanOK) Code() int { - return 200 -} - -func (o *GetInstallDeployPlanOK) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /v1/installs/{install_id}/deploys/{deploy_id}/plan][%d] getInstallDeployPlanOK %s", 200, payload) -} - -func (o *GetInstallDeployPlanOK) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /v1/installs/{install_id}/deploys/{deploy_id}/plan][%d] getInstallDeployPlanOK %s", 200, payload) -} - -func (o *GetInstallDeployPlanOK) GetPayload() *models.Planv1Plan { - return o.Payload -} - -func (o *GetInstallDeployPlanOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.Planv1Plan) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewGetInstallDeployPlanBadRequest creates a GetInstallDeployPlanBadRequest with default headers values -func NewGetInstallDeployPlanBadRequest() *GetInstallDeployPlanBadRequest { - return &GetInstallDeployPlanBadRequest{} -} - -/* -GetInstallDeployPlanBadRequest describes a response with status code 400, with default header values. - -Bad Request -*/ -type GetInstallDeployPlanBadRequest struct { - Payload *models.StderrErrResponse -} - -// IsSuccess returns true when this get install deploy plan bad request response has a 2xx status code -func (o *GetInstallDeployPlanBadRequest) IsSuccess() bool { - return false -} - -// IsRedirect returns true when this get install deploy plan bad request response has a 3xx status code -func (o *GetInstallDeployPlanBadRequest) IsRedirect() bool { - return false -} - -// IsClientError returns true when this get install deploy plan bad request response has a 4xx status code -func (o *GetInstallDeployPlanBadRequest) IsClientError() bool { - return true -} - -// IsServerError returns true when this get install deploy plan bad request response has a 5xx status code -func (o *GetInstallDeployPlanBadRequest) IsServerError() bool { - return false -} - -// IsCode returns true when this get install deploy plan bad request response a status code equal to that given -func (o *GetInstallDeployPlanBadRequest) IsCode(code int) bool { - return code == 400 -} - -// Code gets the status code for the get install deploy plan bad request response -func (o *GetInstallDeployPlanBadRequest) Code() int { - return 400 -} - -func (o *GetInstallDeployPlanBadRequest) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /v1/installs/{install_id}/deploys/{deploy_id}/plan][%d] getInstallDeployPlanBadRequest %s", 400, payload) -} - -func (o *GetInstallDeployPlanBadRequest) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /v1/installs/{install_id}/deploys/{deploy_id}/plan][%d] getInstallDeployPlanBadRequest %s", 400, payload) -} - -func (o *GetInstallDeployPlanBadRequest) GetPayload() *models.StderrErrResponse { - return o.Payload -} - -func (o *GetInstallDeployPlanBadRequest) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.StderrErrResponse) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewGetInstallDeployPlanUnauthorized creates a GetInstallDeployPlanUnauthorized with default headers values -func NewGetInstallDeployPlanUnauthorized() *GetInstallDeployPlanUnauthorized { - return &GetInstallDeployPlanUnauthorized{} -} - -/* -GetInstallDeployPlanUnauthorized describes a response with status code 401, with default header values. - -Unauthorized -*/ -type GetInstallDeployPlanUnauthorized struct { - Payload *models.StderrErrResponse -} - -// IsSuccess returns true when this get install deploy plan unauthorized response has a 2xx status code -func (o *GetInstallDeployPlanUnauthorized) IsSuccess() bool { - return false -} - -// IsRedirect returns true when this get install deploy plan unauthorized response has a 3xx status code -func (o *GetInstallDeployPlanUnauthorized) IsRedirect() bool { - return false -} - -// IsClientError returns true when this get install deploy plan unauthorized response has a 4xx status code -func (o *GetInstallDeployPlanUnauthorized) IsClientError() bool { - return true -} - -// IsServerError returns true when this get install deploy plan unauthorized response has a 5xx status code -func (o *GetInstallDeployPlanUnauthorized) IsServerError() bool { - return false -} - -// IsCode returns true when this get install deploy plan unauthorized response a status code equal to that given -func (o *GetInstallDeployPlanUnauthorized) IsCode(code int) bool { - return code == 401 -} - -// Code gets the status code for the get install deploy plan unauthorized response -func (o *GetInstallDeployPlanUnauthorized) Code() int { - return 401 -} - -func (o *GetInstallDeployPlanUnauthorized) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /v1/installs/{install_id}/deploys/{deploy_id}/plan][%d] getInstallDeployPlanUnauthorized %s", 401, payload) -} - -func (o *GetInstallDeployPlanUnauthorized) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /v1/installs/{install_id}/deploys/{deploy_id}/plan][%d] getInstallDeployPlanUnauthorized %s", 401, payload) -} - -func (o *GetInstallDeployPlanUnauthorized) GetPayload() *models.StderrErrResponse { - return o.Payload -} - -func (o *GetInstallDeployPlanUnauthorized) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.StderrErrResponse) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewGetInstallDeployPlanForbidden creates a GetInstallDeployPlanForbidden with default headers values -func NewGetInstallDeployPlanForbidden() *GetInstallDeployPlanForbidden { - return &GetInstallDeployPlanForbidden{} -} - -/* -GetInstallDeployPlanForbidden describes a response with status code 403, with default header values. - -Forbidden -*/ -type GetInstallDeployPlanForbidden struct { - Payload *models.StderrErrResponse -} - -// IsSuccess returns true when this get install deploy plan forbidden response has a 2xx status code -func (o *GetInstallDeployPlanForbidden) IsSuccess() bool { - return false -} - -// IsRedirect returns true when this get install deploy plan forbidden response has a 3xx status code -func (o *GetInstallDeployPlanForbidden) IsRedirect() bool { - return false -} - -// IsClientError returns true when this get install deploy plan forbidden response has a 4xx status code -func (o *GetInstallDeployPlanForbidden) IsClientError() bool { - return true -} - -// IsServerError returns true when this get install deploy plan forbidden response has a 5xx status code -func (o *GetInstallDeployPlanForbidden) IsServerError() bool { - return false -} - -// IsCode returns true when this get install deploy plan forbidden response a status code equal to that given -func (o *GetInstallDeployPlanForbidden) IsCode(code int) bool { - return code == 403 -} - -// Code gets the status code for the get install deploy plan forbidden response -func (o *GetInstallDeployPlanForbidden) Code() int { - return 403 -} - -func (o *GetInstallDeployPlanForbidden) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /v1/installs/{install_id}/deploys/{deploy_id}/plan][%d] getInstallDeployPlanForbidden %s", 403, payload) -} - -func (o *GetInstallDeployPlanForbidden) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /v1/installs/{install_id}/deploys/{deploy_id}/plan][%d] getInstallDeployPlanForbidden %s", 403, payload) -} - -func (o *GetInstallDeployPlanForbidden) GetPayload() *models.StderrErrResponse { - return o.Payload -} - -func (o *GetInstallDeployPlanForbidden) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.StderrErrResponse) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewGetInstallDeployPlanNotFound creates a GetInstallDeployPlanNotFound with default headers values -func NewGetInstallDeployPlanNotFound() *GetInstallDeployPlanNotFound { - return &GetInstallDeployPlanNotFound{} -} - -/* -GetInstallDeployPlanNotFound describes a response with status code 404, with default header values. - -Not Found -*/ -type GetInstallDeployPlanNotFound struct { - Payload *models.StderrErrResponse -} - -// IsSuccess returns true when this get install deploy plan not found response has a 2xx status code -func (o *GetInstallDeployPlanNotFound) IsSuccess() bool { - return false -} - -// IsRedirect returns true when this get install deploy plan not found response has a 3xx status code -func (o *GetInstallDeployPlanNotFound) IsRedirect() bool { - return false -} - -// IsClientError returns true when this get install deploy plan not found response has a 4xx status code -func (o *GetInstallDeployPlanNotFound) IsClientError() bool { - return true -} - -// IsServerError returns true when this get install deploy plan not found response has a 5xx status code -func (o *GetInstallDeployPlanNotFound) IsServerError() bool { - return false -} - -// IsCode returns true when this get install deploy plan not found response a status code equal to that given -func (o *GetInstallDeployPlanNotFound) IsCode(code int) bool { - return code == 404 -} - -// Code gets the status code for the get install deploy plan not found response -func (o *GetInstallDeployPlanNotFound) Code() int { - return 404 -} - -func (o *GetInstallDeployPlanNotFound) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /v1/installs/{install_id}/deploys/{deploy_id}/plan][%d] getInstallDeployPlanNotFound %s", 404, payload) -} - -func (o *GetInstallDeployPlanNotFound) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /v1/installs/{install_id}/deploys/{deploy_id}/plan][%d] getInstallDeployPlanNotFound %s", 404, payload) -} - -func (o *GetInstallDeployPlanNotFound) GetPayload() *models.StderrErrResponse { - return o.Payload -} - -func (o *GetInstallDeployPlanNotFound) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.StderrErrResponse) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewGetInstallDeployPlanInternalServerError creates a GetInstallDeployPlanInternalServerError with default headers values -func NewGetInstallDeployPlanInternalServerError() *GetInstallDeployPlanInternalServerError { - return &GetInstallDeployPlanInternalServerError{} -} - -/* -GetInstallDeployPlanInternalServerError describes a response with status code 500, with default header values. - -Internal Server Error -*/ -type GetInstallDeployPlanInternalServerError struct { - Payload *models.StderrErrResponse -} - -// IsSuccess returns true when this get install deploy plan internal server error response has a 2xx status code -func (o *GetInstallDeployPlanInternalServerError) IsSuccess() bool { - return false -} - -// IsRedirect returns true when this get install deploy plan internal server error response has a 3xx status code -func (o *GetInstallDeployPlanInternalServerError) IsRedirect() bool { - return false -} - -// IsClientError returns true when this get install deploy plan internal server error response has a 4xx status code -func (o *GetInstallDeployPlanInternalServerError) IsClientError() bool { - return false -} - -// IsServerError returns true when this get install deploy plan internal server error response has a 5xx status code -func (o *GetInstallDeployPlanInternalServerError) IsServerError() bool { - return true -} - -// IsCode returns true when this get install deploy plan internal server error response a status code equal to that given -func (o *GetInstallDeployPlanInternalServerError) IsCode(code int) bool { - return code == 500 -} - -// Code gets the status code for the get install deploy plan internal server error response -func (o *GetInstallDeployPlanInternalServerError) Code() int { - return 500 -} - -func (o *GetInstallDeployPlanInternalServerError) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /v1/installs/{install_id}/deploys/{deploy_id}/plan][%d] getInstallDeployPlanInternalServerError %s", 500, payload) -} - -func (o *GetInstallDeployPlanInternalServerError) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /v1/installs/{install_id}/deploys/{deploy_id}/plan][%d] getInstallDeployPlanInternalServerError %s", 500, payload) -} - -func (o *GetInstallDeployPlanInternalServerError) GetPayload() *models.StderrErrResponse { - return o.Payload -} - -func (o *GetInstallDeployPlanInternalServerError) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.StderrErrResponse) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} diff --git a/client/operations/get_install_deploy_responses.go b/client/operations/get_install_deploy_responses.go deleted file mode 100644 index dbb39b6..0000000 --- a/client/operations/get_install_deploy_responses.go +++ /dev/null @@ -1,486 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package operations - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "encoding/json" - "fmt" - "io" - - "github.com/go-openapi/runtime" - "github.com/go-openapi/strfmt" - - "github.com/nuonco/nuon-go/models" -) - -// GetInstallDeployReader is a Reader for the GetInstallDeploy structure. -type GetInstallDeployReader struct { - formats strfmt.Registry -} - -// ReadResponse reads a server response into the received o. -func (o *GetInstallDeployReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { - switch response.Code() { - case 200: - result := NewGetInstallDeployOK() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return result, nil - case 400: - result := NewGetInstallDeployBadRequest() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return nil, result - case 401: - result := NewGetInstallDeployUnauthorized() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return nil, result - case 403: - result := NewGetInstallDeployForbidden() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return nil, result - case 404: - result := NewGetInstallDeployNotFound() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return nil, result - case 500: - result := NewGetInstallDeployInternalServerError() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return nil, result - default: - return nil, runtime.NewAPIError("[GET /v1/installs/{install_id}/deploys/{deploy_id}] GetInstallDeploy", response, response.Code()) - } -} - -// NewGetInstallDeployOK creates a GetInstallDeployOK with default headers values -func NewGetInstallDeployOK() *GetInstallDeployOK { - return &GetInstallDeployOK{} -} - -/* -GetInstallDeployOK describes a response with status code 200, with default header values. - -OK -*/ -type GetInstallDeployOK struct { - Payload *models.AppInstallDeploy -} - -// IsSuccess returns true when this get install deploy o k response has a 2xx status code -func (o *GetInstallDeployOK) IsSuccess() bool { - return true -} - -// IsRedirect returns true when this get install deploy o k response has a 3xx status code -func (o *GetInstallDeployOK) IsRedirect() bool { - return false -} - -// IsClientError returns true when this get install deploy o k response has a 4xx status code -func (o *GetInstallDeployOK) IsClientError() bool { - return false -} - -// IsServerError returns true when this get install deploy o k response has a 5xx status code -func (o *GetInstallDeployOK) IsServerError() bool { - return false -} - -// IsCode returns true when this get install deploy o k response a status code equal to that given -func (o *GetInstallDeployOK) IsCode(code int) bool { - return code == 200 -} - -// Code gets the status code for the get install deploy o k response -func (o *GetInstallDeployOK) Code() int { - return 200 -} - -func (o *GetInstallDeployOK) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /v1/installs/{install_id}/deploys/{deploy_id}][%d] getInstallDeployOK %s", 200, payload) -} - -func (o *GetInstallDeployOK) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /v1/installs/{install_id}/deploys/{deploy_id}][%d] getInstallDeployOK %s", 200, payload) -} - -func (o *GetInstallDeployOK) GetPayload() *models.AppInstallDeploy { - return o.Payload -} - -func (o *GetInstallDeployOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.AppInstallDeploy) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewGetInstallDeployBadRequest creates a GetInstallDeployBadRequest with default headers values -func NewGetInstallDeployBadRequest() *GetInstallDeployBadRequest { - return &GetInstallDeployBadRequest{} -} - -/* -GetInstallDeployBadRequest describes a response with status code 400, with default header values. - -Bad Request -*/ -type GetInstallDeployBadRequest struct { - Payload *models.StderrErrResponse -} - -// IsSuccess returns true when this get install deploy bad request response has a 2xx status code -func (o *GetInstallDeployBadRequest) IsSuccess() bool { - return false -} - -// IsRedirect returns true when this get install deploy bad request response has a 3xx status code -func (o *GetInstallDeployBadRequest) IsRedirect() bool { - return false -} - -// IsClientError returns true when this get install deploy bad request response has a 4xx status code -func (o *GetInstallDeployBadRequest) IsClientError() bool { - return true -} - -// IsServerError returns true when this get install deploy bad request response has a 5xx status code -func (o *GetInstallDeployBadRequest) IsServerError() bool { - return false -} - -// IsCode returns true when this get install deploy bad request response a status code equal to that given -func (o *GetInstallDeployBadRequest) IsCode(code int) bool { - return code == 400 -} - -// Code gets the status code for the get install deploy bad request response -func (o *GetInstallDeployBadRequest) Code() int { - return 400 -} - -func (o *GetInstallDeployBadRequest) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /v1/installs/{install_id}/deploys/{deploy_id}][%d] getInstallDeployBadRequest %s", 400, payload) -} - -func (o *GetInstallDeployBadRequest) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /v1/installs/{install_id}/deploys/{deploy_id}][%d] getInstallDeployBadRequest %s", 400, payload) -} - -func (o *GetInstallDeployBadRequest) GetPayload() *models.StderrErrResponse { - return o.Payload -} - -func (o *GetInstallDeployBadRequest) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.StderrErrResponse) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewGetInstallDeployUnauthorized creates a GetInstallDeployUnauthorized with default headers values -func NewGetInstallDeployUnauthorized() *GetInstallDeployUnauthorized { - return &GetInstallDeployUnauthorized{} -} - -/* -GetInstallDeployUnauthorized describes a response with status code 401, with default header values. - -Unauthorized -*/ -type GetInstallDeployUnauthorized struct { - Payload *models.StderrErrResponse -} - -// IsSuccess returns true when this get install deploy unauthorized response has a 2xx status code -func (o *GetInstallDeployUnauthorized) IsSuccess() bool { - return false -} - -// IsRedirect returns true when this get install deploy unauthorized response has a 3xx status code -func (o *GetInstallDeployUnauthorized) IsRedirect() bool { - return false -} - -// IsClientError returns true when this get install deploy unauthorized response has a 4xx status code -func (o *GetInstallDeployUnauthorized) IsClientError() bool { - return true -} - -// IsServerError returns true when this get install deploy unauthorized response has a 5xx status code -func (o *GetInstallDeployUnauthorized) IsServerError() bool { - return false -} - -// IsCode returns true when this get install deploy unauthorized response a status code equal to that given -func (o *GetInstallDeployUnauthorized) IsCode(code int) bool { - return code == 401 -} - -// Code gets the status code for the get install deploy unauthorized response -func (o *GetInstallDeployUnauthorized) Code() int { - return 401 -} - -func (o *GetInstallDeployUnauthorized) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /v1/installs/{install_id}/deploys/{deploy_id}][%d] getInstallDeployUnauthorized %s", 401, payload) -} - -func (o *GetInstallDeployUnauthorized) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /v1/installs/{install_id}/deploys/{deploy_id}][%d] getInstallDeployUnauthorized %s", 401, payload) -} - -func (o *GetInstallDeployUnauthorized) GetPayload() *models.StderrErrResponse { - return o.Payload -} - -func (o *GetInstallDeployUnauthorized) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.StderrErrResponse) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewGetInstallDeployForbidden creates a GetInstallDeployForbidden with default headers values -func NewGetInstallDeployForbidden() *GetInstallDeployForbidden { - return &GetInstallDeployForbidden{} -} - -/* -GetInstallDeployForbidden describes a response with status code 403, with default header values. - -Forbidden -*/ -type GetInstallDeployForbidden struct { - Payload *models.StderrErrResponse -} - -// IsSuccess returns true when this get install deploy forbidden response has a 2xx status code -func (o *GetInstallDeployForbidden) IsSuccess() bool { - return false -} - -// IsRedirect returns true when this get install deploy forbidden response has a 3xx status code -func (o *GetInstallDeployForbidden) IsRedirect() bool { - return false -} - -// IsClientError returns true when this get install deploy forbidden response has a 4xx status code -func (o *GetInstallDeployForbidden) IsClientError() bool { - return true -} - -// IsServerError returns true when this get install deploy forbidden response has a 5xx status code -func (o *GetInstallDeployForbidden) IsServerError() bool { - return false -} - -// IsCode returns true when this get install deploy forbidden response a status code equal to that given -func (o *GetInstallDeployForbidden) IsCode(code int) bool { - return code == 403 -} - -// Code gets the status code for the get install deploy forbidden response -func (o *GetInstallDeployForbidden) Code() int { - return 403 -} - -func (o *GetInstallDeployForbidden) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /v1/installs/{install_id}/deploys/{deploy_id}][%d] getInstallDeployForbidden %s", 403, payload) -} - -func (o *GetInstallDeployForbidden) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /v1/installs/{install_id}/deploys/{deploy_id}][%d] getInstallDeployForbidden %s", 403, payload) -} - -func (o *GetInstallDeployForbidden) GetPayload() *models.StderrErrResponse { - return o.Payload -} - -func (o *GetInstallDeployForbidden) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.StderrErrResponse) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewGetInstallDeployNotFound creates a GetInstallDeployNotFound with default headers values -func NewGetInstallDeployNotFound() *GetInstallDeployNotFound { - return &GetInstallDeployNotFound{} -} - -/* -GetInstallDeployNotFound describes a response with status code 404, with default header values. - -Not Found -*/ -type GetInstallDeployNotFound struct { - Payload *models.StderrErrResponse -} - -// IsSuccess returns true when this get install deploy not found response has a 2xx status code -func (o *GetInstallDeployNotFound) IsSuccess() bool { - return false -} - -// IsRedirect returns true when this get install deploy not found response has a 3xx status code -func (o *GetInstallDeployNotFound) IsRedirect() bool { - return false -} - -// IsClientError returns true when this get install deploy not found response has a 4xx status code -func (o *GetInstallDeployNotFound) IsClientError() bool { - return true -} - -// IsServerError returns true when this get install deploy not found response has a 5xx status code -func (o *GetInstallDeployNotFound) IsServerError() bool { - return false -} - -// IsCode returns true when this get install deploy not found response a status code equal to that given -func (o *GetInstallDeployNotFound) IsCode(code int) bool { - return code == 404 -} - -// Code gets the status code for the get install deploy not found response -func (o *GetInstallDeployNotFound) Code() int { - return 404 -} - -func (o *GetInstallDeployNotFound) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /v1/installs/{install_id}/deploys/{deploy_id}][%d] getInstallDeployNotFound %s", 404, payload) -} - -func (o *GetInstallDeployNotFound) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /v1/installs/{install_id}/deploys/{deploy_id}][%d] getInstallDeployNotFound %s", 404, payload) -} - -func (o *GetInstallDeployNotFound) GetPayload() *models.StderrErrResponse { - return o.Payload -} - -func (o *GetInstallDeployNotFound) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.StderrErrResponse) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewGetInstallDeployInternalServerError creates a GetInstallDeployInternalServerError with default headers values -func NewGetInstallDeployInternalServerError() *GetInstallDeployInternalServerError { - return &GetInstallDeployInternalServerError{} -} - -/* -GetInstallDeployInternalServerError describes a response with status code 500, with default header values. - -Internal Server Error -*/ -type GetInstallDeployInternalServerError struct { - Payload *models.StderrErrResponse -} - -// IsSuccess returns true when this get install deploy internal server error response has a 2xx status code -func (o *GetInstallDeployInternalServerError) IsSuccess() bool { - return false -} - -// IsRedirect returns true when this get install deploy internal server error response has a 3xx status code -func (o *GetInstallDeployInternalServerError) IsRedirect() bool { - return false -} - -// IsClientError returns true when this get install deploy internal server error response has a 4xx status code -func (o *GetInstallDeployInternalServerError) IsClientError() bool { - return false -} - -// IsServerError returns true when this get install deploy internal server error response has a 5xx status code -func (o *GetInstallDeployInternalServerError) IsServerError() bool { - return true -} - -// IsCode returns true when this get install deploy internal server error response a status code equal to that given -func (o *GetInstallDeployInternalServerError) IsCode(code int) bool { - return code == 500 -} - -// Code gets the status code for the get install deploy internal server error response -func (o *GetInstallDeployInternalServerError) Code() int { - return 500 -} - -func (o *GetInstallDeployInternalServerError) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /v1/installs/{install_id}/deploys/{deploy_id}][%d] getInstallDeployInternalServerError %s", 500, payload) -} - -func (o *GetInstallDeployInternalServerError) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /v1/installs/{install_id}/deploys/{deploy_id}][%d] getInstallDeployInternalServerError %s", 500, payload) -} - -func (o *GetInstallDeployInternalServerError) GetPayload() *models.StderrErrResponse { - return o.Payload -} - -func (o *GetInstallDeployInternalServerError) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.StderrErrResponse) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} diff --git a/client/operations/get_install_deploys_parameters.go b/client/operations/get_install_deploys_parameters.go deleted file mode 100644 index 9e68f80..0000000 --- a/client/operations/get_install_deploys_parameters.go +++ /dev/null @@ -1,151 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package operations - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "context" - "net/http" - "time" - - "github.com/go-openapi/errors" - "github.com/go-openapi/runtime" - cr "github.com/go-openapi/runtime/client" - "github.com/go-openapi/strfmt" -) - -// NewGetInstallDeploysParams creates a new GetInstallDeploysParams object, -// with the default timeout for this client. -// -// Default values are not hydrated, since defaults are normally applied by the API server side. -// -// To enforce default values in parameter, use SetDefaults or WithDefaults. -func NewGetInstallDeploysParams() *GetInstallDeploysParams { - return &GetInstallDeploysParams{ - timeout: cr.DefaultTimeout, - } -} - -// NewGetInstallDeploysParamsWithTimeout creates a new GetInstallDeploysParams object -// with the ability to set a timeout on a request. -func NewGetInstallDeploysParamsWithTimeout(timeout time.Duration) *GetInstallDeploysParams { - return &GetInstallDeploysParams{ - timeout: timeout, - } -} - -// NewGetInstallDeploysParamsWithContext creates a new GetInstallDeploysParams object -// with the ability to set a context for a request. -func NewGetInstallDeploysParamsWithContext(ctx context.Context) *GetInstallDeploysParams { - return &GetInstallDeploysParams{ - Context: ctx, - } -} - -// NewGetInstallDeploysParamsWithHTTPClient creates a new GetInstallDeploysParams object -// with the ability to set a custom HTTPClient for a request. -func NewGetInstallDeploysParamsWithHTTPClient(client *http.Client) *GetInstallDeploysParams { - return &GetInstallDeploysParams{ - HTTPClient: client, - } -} - -/* -GetInstallDeploysParams contains all the parameters to send to the API endpoint - - for the get install deploys operation. - - Typically these are written to a http.Request. -*/ -type GetInstallDeploysParams struct { - - /* InstallID. - - install ID - */ - InstallID string - - timeout time.Duration - Context context.Context - HTTPClient *http.Client -} - -// WithDefaults hydrates default values in the get install deploys params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *GetInstallDeploysParams) WithDefaults() *GetInstallDeploysParams { - o.SetDefaults() - return o -} - -// SetDefaults hydrates default values in the get install deploys params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *GetInstallDeploysParams) SetDefaults() { - // no default values defined for this parameter -} - -// WithTimeout adds the timeout to the get install deploys params -func (o *GetInstallDeploysParams) WithTimeout(timeout time.Duration) *GetInstallDeploysParams { - o.SetTimeout(timeout) - return o -} - -// SetTimeout adds the timeout to the get install deploys params -func (o *GetInstallDeploysParams) SetTimeout(timeout time.Duration) { - o.timeout = timeout -} - -// WithContext adds the context to the get install deploys params -func (o *GetInstallDeploysParams) WithContext(ctx context.Context) *GetInstallDeploysParams { - o.SetContext(ctx) - return o -} - -// SetContext adds the context to the get install deploys params -func (o *GetInstallDeploysParams) SetContext(ctx context.Context) { - o.Context = ctx -} - -// WithHTTPClient adds the HTTPClient to the get install deploys params -func (o *GetInstallDeploysParams) WithHTTPClient(client *http.Client) *GetInstallDeploysParams { - o.SetHTTPClient(client) - return o -} - -// SetHTTPClient adds the HTTPClient to the get install deploys params -func (o *GetInstallDeploysParams) SetHTTPClient(client *http.Client) { - o.HTTPClient = client -} - -// WithInstallID adds the installID to the get install deploys params -func (o *GetInstallDeploysParams) WithInstallID(installID string) *GetInstallDeploysParams { - o.SetInstallID(installID) - return o -} - -// SetInstallID adds the installId to the get install deploys params -func (o *GetInstallDeploysParams) SetInstallID(installID string) { - o.InstallID = installID -} - -// WriteToRequest writes these params to a swagger request -func (o *GetInstallDeploysParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { - - if err := r.SetTimeout(o.timeout); err != nil { - return err - } - var res []error - - // path param install_id - if err := r.SetPathParam("install_id", o.InstallID); err != nil { - return err - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} diff --git a/client/operations/get_install_deploys_responses.go b/client/operations/get_install_deploys_responses.go deleted file mode 100644 index 59e89f5..0000000 --- a/client/operations/get_install_deploys_responses.go +++ /dev/null @@ -1,484 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package operations - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "encoding/json" - "fmt" - "io" - - "github.com/go-openapi/runtime" - "github.com/go-openapi/strfmt" - - "github.com/nuonco/nuon-go/models" -) - -// GetInstallDeploysReader is a Reader for the GetInstallDeploys structure. -type GetInstallDeploysReader struct { - formats strfmt.Registry -} - -// ReadResponse reads a server response into the received o. -func (o *GetInstallDeploysReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { - switch response.Code() { - case 200: - result := NewGetInstallDeploysOK() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return result, nil - case 400: - result := NewGetInstallDeploysBadRequest() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return nil, result - case 401: - result := NewGetInstallDeploysUnauthorized() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return nil, result - case 403: - result := NewGetInstallDeploysForbidden() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return nil, result - case 404: - result := NewGetInstallDeploysNotFound() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return nil, result - case 500: - result := NewGetInstallDeploysInternalServerError() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return nil, result - default: - return nil, runtime.NewAPIError("[GET /v1/installs/{install_id}/deploys] GetInstallDeploys", response, response.Code()) - } -} - -// NewGetInstallDeploysOK creates a GetInstallDeploysOK with default headers values -func NewGetInstallDeploysOK() *GetInstallDeploysOK { - return &GetInstallDeploysOK{} -} - -/* -GetInstallDeploysOK describes a response with status code 200, with default header values. - -OK -*/ -type GetInstallDeploysOK struct { - Payload []*models.AppInstallDeploy -} - -// IsSuccess returns true when this get install deploys o k response has a 2xx status code -func (o *GetInstallDeploysOK) IsSuccess() bool { - return true -} - -// IsRedirect returns true when this get install deploys o k response has a 3xx status code -func (o *GetInstallDeploysOK) IsRedirect() bool { - return false -} - -// IsClientError returns true when this get install deploys o k response has a 4xx status code -func (o *GetInstallDeploysOK) IsClientError() bool { - return false -} - -// IsServerError returns true when this get install deploys o k response has a 5xx status code -func (o *GetInstallDeploysOK) IsServerError() bool { - return false -} - -// IsCode returns true when this get install deploys o k response a status code equal to that given -func (o *GetInstallDeploysOK) IsCode(code int) bool { - return code == 200 -} - -// Code gets the status code for the get install deploys o k response -func (o *GetInstallDeploysOK) Code() int { - return 200 -} - -func (o *GetInstallDeploysOK) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /v1/installs/{install_id}/deploys][%d] getInstallDeploysOK %s", 200, payload) -} - -func (o *GetInstallDeploysOK) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /v1/installs/{install_id}/deploys][%d] getInstallDeploysOK %s", 200, payload) -} - -func (o *GetInstallDeploysOK) GetPayload() []*models.AppInstallDeploy { - return o.Payload -} - -func (o *GetInstallDeploysOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - // response payload - if err := consumer.Consume(response.Body(), &o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewGetInstallDeploysBadRequest creates a GetInstallDeploysBadRequest with default headers values -func NewGetInstallDeploysBadRequest() *GetInstallDeploysBadRequest { - return &GetInstallDeploysBadRequest{} -} - -/* -GetInstallDeploysBadRequest describes a response with status code 400, with default header values. - -Bad Request -*/ -type GetInstallDeploysBadRequest struct { - Payload *models.StderrErrResponse -} - -// IsSuccess returns true when this get install deploys bad request response has a 2xx status code -func (o *GetInstallDeploysBadRequest) IsSuccess() bool { - return false -} - -// IsRedirect returns true when this get install deploys bad request response has a 3xx status code -func (o *GetInstallDeploysBadRequest) IsRedirect() bool { - return false -} - -// IsClientError returns true when this get install deploys bad request response has a 4xx status code -func (o *GetInstallDeploysBadRequest) IsClientError() bool { - return true -} - -// IsServerError returns true when this get install deploys bad request response has a 5xx status code -func (o *GetInstallDeploysBadRequest) IsServerError() bool { - return false -} - -// IsCode returns true when this get install deploys bad request response a status code equal to that given -func (o *GetInstallDeploysBadRequest) IsCode(code int) bool { - return code == 400 -} - -// Code gets the status code for the get install deploys bad request response -func (o *GetInstallDeploysBadRequest) Code() int { - return 400 -} - -func (o *GetInstallDeploysBadRequest) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /v1/installs/{install_id}/deploys][%d] getInstallDeploysBadRequest %s", 400, payload) -} - -func (o *GetInstallDeploysBadRequest) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /v1/installs/{install_id}/deploys][%d] getInstallDeploysBadRequest %s", 400, payload) -} - -func (o *GetInstallDeploysBadRequest) GetPayload() *models.StderrErrResponse { - return o.Payload -} - -func (o *GetInstallDeploysBadRequest) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.StderrErrResponse) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewGetInstallDeploysUnauthorized creates a GetInstallDeploysUnauthorized with default headers values -func NewGetInstallDeploysUnauthorized() *GetInstallDeploysUnauthorized { - return &GetInstallDeploysUnauthorized{} -} - -/* -GetInstallDeploysUnauthorized describes a response with status code 401, with default header values. - -Unauthorized -*/ -type GetInstallDeploysUnauthorized struct { - Payload *models.StderrErrResponse -} - -// IsSuccess returns true when this get install deploys unauthorized response has a 2xx status code -func (o *GetInstallDeploysUnauthorized) IsSuccess() bool { - return false -} - -// IsRedirect returns true when this get install deploys unauthorized response has a 3xx status code -func (o *GetInstallDeploysUnauthorized) IsRedirect() bool { - return false -} - -// IsClientError returns true when this get install deploys unauthorized response has a 4xx status code -func (o *GetInstallDeploysUnauthorized) IsClientError() bool { - return true -} - -// IsServerError returns true when this get install deploys unauthorized response has a 5xx status code -func (o *GetInstallDeploysUnauthorized) IsServerError() bool { - return false -} - -// IsCode returns true when this get install deploys unauthorized response a status code equal to that given -func (o *GetInstallDeploysUnauthorized) IsCode(code int) bool { - return code == 401 -} - -// Code gets the status code for the get install deploys unauthorized response -func (o *GetInstallDeploysUnauthorized) Code() int { - return 401 -} - -func (o *GetInstallDeploysUnauthorized) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /v1/installs/{install_id}/deploys][%d] getInstallDeploysUnauthorized %s", 401, payload) -} - -func (o *GetInstallDeploysUnauthorized) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /v1/installs/{install_id}/deploys][%d] getInstallDeploysUnauthorized %s", 401, payload) -} - -func (o *GetInstallDeploysUnauthorized) GetPayload() *models.StderrErrResponse { - return o.Payload -} - -func (o *GetInstallDeploysUnauthorized) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.StderrErrResponse) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewGetInstallDeploysForbidden creates a GetInstallDeploysForbidden with default headers values -func NewGetInstallDeploysForbidden() *GetInstallDeploysForbidden { - return &GetInstallDeploysForbidden{} -} - -/* -GetInstallDeploysForbidden describes a response with status code 403, with default header values. - -Forbidden -*/ -type GetInstallDeploysForbidden struct { - Payload *models.StderrErrResponse -} - -// IsSuccess returns true when this get install deploys forbidden response has a 2xx status code -func (o *GetInstallDeploysForbidden) IsSuccess() bool { - return false -} - -// IsRedirect returns true when this get install deploys forbidden response has a 3xx status code -func (o *GetInstallDeploysForbidden) IsRedirect() bool { - return false -} - -// IsClientError returns true when this get install deploys forbidden response has a 4xx status code -func (o *GetInstallDeploysForbidden) IsClientError() bool { - return true -} - -// IsServerError returns true when this get install deploys forbidden response has a 5xx status code -func (o *GetInstallDeploysForbidden) IsServerError() bool { - return false -} - -// IsCode returns true when this get install deploys forbidden response a status code equal to that given -func (o *GetInstallDeploysForbidden) IsCode(code int) bool { - return code == 403 -} - -// Code gets the status code for the get install deploys forbidden response -func (o *GetInstallDeploysForbidden) Code() int { - return 403 -} - -func (o *GetInstallDeploysForbidden) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /v1/installs/{install_id}/deploys][%d] getInstallDeploysForbidden %s", 403, payload) -} - -func (o *GetInstallDeploysForbidden) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /v1/installs/{install_id}/deploys][%d] getInstallDeploysForbidden %s", 403, payload) -} - -func (o *GetInstallDeploysForbidden) GetPayload() *models.StderrErrResponse { - return o.Payload -} - -func (o *GetInstallDeploysForbidden) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.StderrErrResponse) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewGetInstallDeploysNotFound creates a GetInstallDeploysNotFound with default headers values -func NewGetInstallDeploysNotFound() *GetInstallDeploysNotFound { - return &GetInstallDeploysNotFound{} -} - -/* -GetInstallDeploysNotFound describes a response with status code 404, with default header values. - -Not Found -*/ -type GetInstallDeploysNotFound struct { - Payload *models.StderrErrResponse -} - -// IsSuccess returns true when this get install deploys not found response has a 2xx status code -func (o *GetInstallDeploysNotFound) IsSuccess() bool { - return false -} - -// IsRedirect returns true when this get install deploys not found response has a 3xx status code -func (o *GetInstallDeploysNotFound) IsRedirect() bool { - return false -} - -// IsClientError returns true when this get install deploys not found response has a 4xx status code -func (o *GetInstallDeploysNotFound) IsClientError() bool { - return true -} - -// IsServerError returns true when this get install deploys not found response has a 5xx status code -func (o *GetInstallDeploysNotFound) IsServerError() bool { - return false -} - -// IsCode returns true when this get install deploys not found response a status code equal to that given -func (o *GetInstallDeploysNotFound) IsCode(code int) bool { - return code == 404 -} - -// Code gets the status code for the get install deploys not found response -func (o *GetInstallDeploysNotFound) Code() int { - return 404 -} - -func (o *GetInstallDeploysNotFound) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /v1/installs/{install_id}/deploys][%d] getInstallDeploysNotFound %s", 404, payload) -} - -func (o *GetInstallDeploysNotFound) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /v1/installs/{install_id}/deploys][%d] getInstallDeploysNotFound %s", 404, payload) -} - -func (o *GetInstallDeploysNotFound) GetPayload() *models.StderrErrResponse { - return o.Payload -} - -func (o *GetInstallDeploysNotFound) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.StderrErrResponse) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewGetInstallDeploysInternalServerError creates a GetInstallDeploysInternalServerError with default headers values -func NewGetInstallDeploysInternalServerError() *GetInstallDeploysInternalServerError { - return &GetInstallDeploysInternalServerError{} -} - -/* -GetInstallDeploysInternalServerError describes a response with status code 500, with default header values. - -Internal Server Error -*/ -type GetInstallDeploysInternalServerError struct { - Payload *models.StderrErrResponse -} - -// IsSuccess returns true when this get install deploys internal server error response has a 2xx status code -func (o *GetInstallDeploysInternalServerError) IsSuccess() bool { - return false -} - -// IsRedirect returns true when this get install deploys internal server error response has a 3xx status code -func (o *GetInstallDeploysInternalServerError) IsRedirect() bool { - return false -} - -// IsClientError returns true when this get install deploys internal server error response has a 4xx status code -func (o *GetInstallDeploysInternalServerError) IsClientError() bool { - return false -} - -// IsServerError returns true when this get install deploys internal server error response has a 5xx status code -func (o *GetInstallDeploysInternalServerError) IsServerError() bool { - return true -} - -// IsCode returns true when this get install deploys internal server error response a status code equal to that given -func (o *GetInstallDeploysInternalServerError) IsCode(code int) bool { - return code == 500 -} - -// Code gets the status code for the get install deploys internal server error response -func (o *GetInstallDeploysInternalServerError) Code() int { - return 500 -} - -func (o *GetInstallDeploysInternalServerError) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /v1/installs/{install_id}/deploys][%d] getInstallDeploysInternalServerError %s", 500, payload) -} - -func (o *GetInstallDeploysInternalServerError) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /v1/installs/{install_id}/deploys][%d] getInstallDeploysInternalServerError %s", 500, payload) -} - -func (o *GetInstallDeploysInternalServerError) GetPayload() *models.StderrErrResponse { - return o.Payload -} - -func (o *GetInstallDeploysInternalServerError) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.StderrErrResponse) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} diff --git a/client/operations/get_install_event_parameters.go b/client/operations/get_install_event_parameters.go deleted file mode 100644 index 5724891..0000000 --- a/client/operations/get_install_event_parameters.go +++ /dev/null @@ -1,173 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package operations - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "context" - "net/http" - "time" - - "github.com/go-openapi/errors" - "github.com/go-openapi/runtime" - cr "github.com/go-openapi/runtime/client" - "github.com/go-openapi/strfmt" -) - -// NewGetInstallEventParams creates a new GetInstallEventParams object, -// with the default timeout for this client. -// -// Default values are not hydrated, since defaults are normally applied by the API server side. -// -// To enforce default values in parameter, use SetDefaults or WithDefaults. -func NewGetInstallEventParams() *GetInstallEventParams { - return &GetInstallEventParams{ - timeout: cr.DefaultTimeout, - } -} - -// NewGetInstallEventParamsWithTimeout creates a new GetInstallEventParams object -// with the ability to set a timeout on a request. -func NewGetInstallEventParamsWithTimeout(timeout time.Duration) *GetInstallEventParams { - return &GetInstallEventParams{ - timeout: timeout, - } -} - -// NewGetInstallEventParamsWithContext creates a new GetInstallEventParams object -// with the ability to set a context for a request. -func NewGetInstallEventParamsWithContext(ctx context.Context) *GetInstallEventParams { - return &GetInstallEventParams{ - Context: ctx, - } -} - -// NewGetInstallEventParamsWithHTTPClient creates a new GetInstallEventParams object -// with the ability to set a custom HTTPClient for a request. -func NewGetInstallEventParamsWithHTTPClient(client *http.Client) *GetInstallEventParams { - return &GetInstallEventParams{ - HTTPClient: client, - } -} - -/* -GetInstallEventParams contains all the parameters to send to the API endpoint - - for the get install event operation. - - Typically these are written to a http.Request. -*/ -type GetInstallEventParams struct { - - /* EventID. - - event ID - */ - EventID string - - /* InstallID. - - install ID - */ - InstallID string - - timeout time.Duration - Context context.Context - HTTPClient *http.Client -} - -// WithDefaults hydrates default values in the get install event params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *GetInstallEventParams) WithDefaults() *GetInstallEventParams { - o.SetDefaults() - return o -} - -// SetDefaults hydrates default values in the get install event params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *GetInstallEventParams) SetDefaults() { - // no default values defined for this parameter -} - -// WithTimeout adds the timeout to the get install event params -func (o *GetInstallEventParams) WithTimeout(timeout time.Duration) *GetInstallEventParams { - o.SetTimeout(timeout) - return o -} - -// SetTimeout adds the timeout to the get install event params -func (o *GetInstallEventParams) SetTimeout(timeout time.Duration) { - o.timeout = timeout -} - -// WithContext adds the context to the get install event params -func (o *GetInstallEventParams) WithContext(ctx context.Context) *GetInstallEventParams { - o.SetContext(ctx) - return o -} - -// SetContext adds the context to the get install event params -func (o *GetInstallEventParams) SetContext(ctx context.Context) { - o.Context = ctx -} - -// WithHTTPClient adds the HTTPClient to the get install event params -func (o *GetInstallEventParams) WithHTTPClient(client *http.Client) *GetInstallEventParams { - o.SetHTTPClient(client) - return o -} - -// SetHTTPClient adds the HTTPClient to the get install event params -func (o *GetInstallEventParams) SetHTTPClient(client *http.Client) { - o.HTTPClient = client -} - -// WithEventID adds the eventID to the get install event params -func (o *GetInstallEventParams) WithEventID(eventID string) *GetInstallEventParams { - o.SetEventID(eventID) - return o -} - -// SetEventID adds the eventId to the get install event params -func (o *GetInstallEventParams) SetEventID(eventID string) { - o.EventID = eventID -} - -// WithInstallID adds the installID to the get install event params -func (o *GetInstallEventParams) WithInstallID(installID string) *GetInstallEventParams { - o.SetInstallID(installID) - return o -} - -// SetInstallID adds the installId to the get install event params -func (o *GetInstallEventParams) SetInstallID(installID string) { - o.InstallID = installID -} - -// WriteToRequest writes these params to a swagger request -func (o *GetInstallEventParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { - - if err := r.SetTimeout(o.timeout); err != nil { - return err - } - var res []error - - // path param event_id - if err := r.SetPathParam("event_id", o.EventID); err != nil { - return err - } - - // path param install_id - if err := r.SetPathParam("install_id", o.InstallID); err != nil { - return err - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} diff --git a/client/operations/get_install_event_responses.go b/client/operations/get_install_event_responses.go deleted file mode 100644 index a797f99..0000000 --- a/client/operations/get_install_event_responses.go +++ /dev/null @@ -1,486 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package operations - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "encoding/json" - "fmt" - "io" - - "github.com/go-openapi/runtime" - "github.com/go-openapi/strfmt" - - "github.com/nuonco/nuon-go/models" -) - -// GetInstallEventReader is a Reader for the GetInstallEvent structure. -type GetInstallEventReader struct { - formats strfmt.Registry -} - -// ReadResponse reads a server response into the received o. -func (o *GetInstallEventReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { - switch response.Code() { - case 200: - result := NewGetInstallEventOK() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return result, nil - case 400: - result := NewGetInstallEventBadRequest() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return nil, result - case 401: - result := NewGetInstallEventUnauthorized() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return nil, result - case 403: - result := NewGetInstallEventForbidden() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return nil, result - case 404: - result := NewGetInstallEventNotFound() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return nil, result - case 500: - result := NewGetInstallEventInternalServerError() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return nil, result - default: - return nil, runtime.NewAPIError("[GET /v1/installs/{install_id}/events/{event_id}] GetInstallEvent", response, response.Code()) - } -} - -// NewGetInstallEventOK creates a GetInstallEventOK with default headers values -func NewGetInstallEventOK() *GetInstallEventOK { - return &GetInstallEventOK{} -} - -/* -GetInstallEventOK describes a response with status code 200, with default header values. - -OK -*/ -type GetInstallEventOK struct { - Payload *models.AppInstallEvent -} - -// IsSuccess returns true when this get install event o k response has a 2xx status code -func (o *GetInstallEventOK) IsSuccess() bool { - return true -} - -// IsRedirect returns true when this get install event o k response has a 3xx status code -func (o *GetInstallEventOK) IsRedirect() bool { - return false -} - -// IsClientError returns true when this get install event o k response has a 4xx status code -func (o *GetInstallEventOK) IsClientError() bool { - return false -} - -// IsServerError returns true when this get install event o k response has a 5xx status code -func (o *GetInstallEventOK) IsServerError() bool { - return false -} - -// IsCode returns true when this get install event o k response a status code equal to that given -func (o *GetInstallEventOK) IsCode(code int) bool { - return code == 200 -} - -// Code gets the status code for the get install event o k response -func (o *GetInstallEventOK) Code() int { - return 200 -} - -func (o *GetInstallEventOK) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /v1/installs/{install_id}/events/{event_id}][%d] getInstallEventOK %s", 200, payload) -} - -func (o *GetInstallEventOK) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /v1/installs/{install_id}/events/{event_id}][%d] getInstallEventOK %s", 200, payload) -} - -func (o *GetInstallEventOK) GetPayload() *models.AppInstallEvent { - return o.Payload -} - -func (o *GetInstallEventOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.AppInstallEvent) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewGetInstallEventBadRequest creates a GetInstallEventBadRequest with default headers values -func NewGetInstallEventBadRequest() *GetInstallEventBadRequest { - return &GetInstallEventBadRequest{} -} - -/* -GetInstallEventBadRequest describes a response with status code 400, with default header values. - -Bad Request -*/ -type GetInstallEventBadRequest struct { - Payload *models.StderrErrResponse -} - -// IsSuccess returns true when this get install event bad request response has a 2xx status code -func (o *GetInstallEventBadRequest) IsSuccess() bool { - return false -} - -// IsRedirect returns true when this get install event bad request response has a 3xx status code -func (o *GetInstallEventBadRequest) IsRedirect() bool { - return false -} - -// IsClientError returns true when this get install event bad request response has a 4xx status code -func (o *GetInstallEventBadRequest) IsClientError() bool { - return true -} - -// IsServerError returns true when this get install event bad request response has a 5xx status code -func (o *GetInstallEventBadRequest) IsServerError() bool { - return false -} - -// IsCode returns true when this get install event bad request response a status code equal to that given -func (o *GetInstallEventBadRequest) IsCode(code int) bool { - return code == 400 -} - -// Code gets the status code for the get install event bad request response -func (o *GetInstallEventBadRequest) Code() int { - return 400 -} - -func (o *GetInstallEventBadRequest) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /v1/installs/{install_id}/events/{event_id}][%d] getInstallEventBadRequest %s", 400, payload) -} - -func (o *GetInstallEventBadRequest) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /v1/installs/{install_id}/events/{event_id}][%d] getInstallEventBadRequest %s", 400, payload) -} - -func (o *GetInstallEventBadRequest) GetPayload() *models.StderrErrResponse { - return o.Payload -} - -func (o *GetInstallEventBadRequest) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.StderrErrResponse) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewGetInstallEventUnauthorized creates a GetInstallEventUnauthorized with default headers values -func NewGetInstallEventUnauthorized() *GetInstallEventUnauthorized { - return &GetInstallEventUnauthorized{} -} - -/* -GetInstallEventUnauthorized describes a response with status code 401, with default header values. - -Unauthorized -*/ -type GetInstallEventUnauthorized struct { - Payload *models.StderrErrResponse -} - -// IsSuccess returns true when this get install event unauthorized response has a 2xx status code -func (o *GetInstallEventUnauthorized) IsSuccess() bool { - return false -} - -// IsRedirect returns true when this get install event unauthorized response has a 3xx status code -func (o *GetInstallEventUnauthorized) IsRedirect() bool { - return false -} - -// IsClientError returns true when this get install event unauthorized response has a 4xx status code -func (o *GetInstallEventUnauthorized) IsClientError() bool { - return true -} - -// IsServerError returns true when this get install event unauthorized response has a 5xx status code -func (o *GetInstallEventUnauthorized) IsServerError() bool { - return false -} - -// IsCode returns true when this get install event unauthorized response a status code equal to that given -func (o *GetInstallEventUnauthorized) IsCode(code int) bool { - return code == 401 -} - -// Code gets the status code for the get install event unauthorized response -func (o *GetInstallEventUnauthorized) Code() int { - return 401 -} - -func (o *GetInstallEventUnauthorized) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /v1/installs/{install_id}/events/{event_id}][%d] getInstallEventUnauthorized %s", 401, payload) -} - -func (o *GetInstallEventUnauthorized) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /v1/installs/{install_id}/events/{event_id}][%d] getInstallEventUnauthorized %s", 401, payload) -} - -func (o *GetInstallEventUnauthorized) GetPayload() *models.StderrErrResponse { - return o.Payload -} - -func (o *GetInstallEventUnauthorized) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.StderrErrResponse) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewGetInstallEventForbidden creates a GetInstallEventForbidden with default headers values -func NewGetInstallEventForbidden() *GetInstallEventForbidden { - return &GetInstallEventForbidden{} -} - -/* -GetInstallEventForbidden describes a response with status code 403, with default header values. - -Forbidden -*/ -type GetInstallEventForbidden struct { - Payload *models.StderrErrResponse -} - -// IsSuccess returns true when this get install event forbidden response has a 2xx status code -func (o *GetInstallEventForbidden) IsSuccess() bool { - return false -} - -// IsRedirect returns true when this get install event forbidden response has a 3xx status code -func (o *GetInstallEventForbidden) IsRedirect() bool { - return false -} - -// IsClientError returns true when this get install event forbidden response has a 4xx status code -func (o *GetInstallEventForbidden) IsClientError() bool { - return true -} - -// IsServerError returns true when this get install event forbidden response has a 5xx status code -func (o *GetInstallEventForbidden) IsServerError() bool { - return false -} - -// IsCode returns true when this get install event forbidden response a status code equal to that given -func (o *GetInstallEventForbidden) IsCode(code int) bool { - return code == 403 -} - -// Code gets the status code for the get install event forbidden response -func (o *GetInstallEventForbidden) Code() int { - return 403 -} - -func (o *GetInstallEventForbidden) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /v1/installs/{install_id}/events/{event_id}][%d] getInstallEventForbidden %s", 403, payload) -} - -func (o *GetInstallEventForbidden) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /v1/installs/{install_id}/events/{event_id}][%d] getInstallEventForbidden %s", 403, payload) -} - -func (o *GetInstallEventForbidden) GetPayload() *models.StderrErrResponse { - return o.Payload -} - -func (o *GetInstallEventForbidden) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.StderrErrResponse) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewGetInstallEventNotFound creates a GetInstallEventNotFound with default headers values -func NewGetInstallEventNotFound() *GetInstallEventNotFound { - return &GetInstallEventNotFound{} -} - -/* -GetInstallEventNotFound describes a response with status code 404, with default header values. - -Not Found -*/ -type GetInstallEventNotFound struct { - Payload *models.StderrErrResponse -} - -// IsSuccess returns true when this get install event not found response has a 2xx status code -func (o *GetInstallEventNotFound) IsSuccess() bool { - return false -} - -// IsRedirect returns true when this get install event not found response has a 3xx status code -func (o *GetInstallEventNotFound) IsRedirect() bool { - return false -} - -// IsClientError returns true when this get install event not found response has a 4xx status code -func (o *GetInstallEventNotFound) IsClientError() bool { - return true -} - -// IsServerError returns true when this get install event not found response has a 5xx status code -func (o *GetInstallEventNotFound) IsServerError() bool { - return false -} - -// IsCode returns true when this get install event not found response a status code equal to that given -func (o *GetInstallEventNotFound) IsCode(code int) bool { - return code == 404 -} - -// Code gets the status code for the get install event not found response -func (o *GetInstallEventNotFound) Code() int { - return 404 -} - -func (o *GetInstallEventNotFound) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /v1/installs/{install_id}/events/{event_id}][%d] getInstallEventNotFound %s", 404, payload) -} - -func (o *GetInstallEventNotFound) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /v1/installs/{install_id}/events/{event_id}][%d] getInstallEventNotFound %s", 404, payload) -} - -func (o *GetInstallEventNotFound) GetPayload() *models.StderrErrResponse { - return o.Payload -} - -func (o *GetInstallEventNotFound) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.StderrErrResponse) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewGetInstallEventInternalServerError creates a GetInstallEventInternalServerError with default headers values -func NewGetInstallEventInternalServerError() *GetInstallEventInternalServerError { - return &GetInstallEventInternalServerError{} -} - -/* -GetInstallEventInternalServerError describes a response with status code 500, with default header values. - -Internal Server Error -*/ -type GetInstallEventInternalServerError struct { - Payload *models.StderrErrResponse -} - -// IsSuccess returns true when this get install event internal server error response has a 2xx status code -func (o *GetInstallEventInternalServerError) IsSuccess() bool { - return false -} - -// IsRedirect returns true when this get install event internal server error response has a 3xx status code -func (o *GetInstallEventInternalServerError) IsRedirect() bool { - return false -} - -// IsClientError returns true when this get install event internal server error response has a 4xx status code -func (o *GetInstallEventInternalServerError) IsClientError() bool { - return false -} - -// IsServerError returns true when this get install event internal server error response has a 5xx status code -func (o *GetInstallEventInternalServerError) IsServerError() bool { - return true -} - -// IsCode returns true when this get install event internal server error response a status code equal to that given -func (o *GetInstallEventInternalServerError) IsCode(code int) bool { - return code == 500 -} - -// Code gets the status code for the get install event internal server error response -func (o *GetInstallEventInternalServerError) Code() int { - return 500 -} - -func (o *GetInstallEventInternalServerError) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /v1/installs/{install_id}/events/{event_id}][%d] getInstallEventInternalServerError %s", 500, payload) -} - -func (o *GetInstallEventInternalServerError) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /v1/installs/{install_id}/events/{event_id}][%d] getInstallEventInternalServerError %s", 500, payload) -} - -func (o *GetInstallEventInternalServerError) GetPayload() *models.StderrErrResponse { - return o.Payload -} - -func (o *GetInstallEventInternalServerError) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.StderrErrResponse) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} diff --git a/client/operations/get_install_events_parameters.go b/client/operations/get_install_events_parameters.go deleted file mode 100644 index ee55144..0000000 --- a/client/operations/get_install_events_parameters.go +++ /dev/null @@ -1,151 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package operations - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "context" - "net/http" - "time" - - "github.com/go-openapi/errors" - "github.com/go-openapi/runtime" - cr "github.com/go-openapi/runtime/client" - "github.com/go-openapi/strfmt" -) - -// NewGetInstallEventsParams creates a new GetInstallEventsParams object, -// with the default timeout for this client. -// -// Default values are not hydrated, since defaults are normally applied by the API server side. -// -// To enforce default values in parameter, use SetDefaults or WithDefaults. -func NewGetInstallEventsParams() *GetInstallEventsParams { - return &GetInstallEventsParams{ - timeout: cr.DefaultTimeout, - } -} - -// NewGetInstallEventsParamsWithTimeout creates a new GetInstallEventsParams object -// with the ability to set a timeout on a request. -func NewGetInstallEventsParamsWithTimeout(timeout time.Duration) *GetInstallEventsParams { - return &GetInstallEventsParams{ - timeout: timeout, - } -} - -// NewGetInstallEventsParamsWithContext creates a new GetInstallEventsParams object -// with the ability to set a context for a request. -func NewGetInstallEventsParamsWithContext(ctx context.Context) *GetInstallEventsParams { - return &GetInstallEventsParams{ - Context: ctx, - } -} - -// NewGetInstallEventsParamsWithHTTPClient creates a new GetInstallEventsParams object -// with the ability to set a custom HTTPClient for a request. -func NewGetInstallEventsParamsWithHTTPClient(client *http.Client) *GetInstallEventsParams { - return &GetInstallEventsParams{ - HTTPClient: client, - } -} - -/* -GetInstallEventsParams contains all the parameters to send to the API endpoint - - for the get install events operation. - - Typically these are written to a http.Request. -*/ -type GetInstallEventsParams struct { - - /* InstallID. - - install ID - */ - InstallID string - - timeout time.Duration - Context context.Context - HTTPClient *http.Client -} - -// WithDefaults hydrates default values in the get install events params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *GetInstallEventsParams) WithDefaults() *GetInstallEventsParams { - o.SetDefaults() - return o -} - -// SetDefaults hydrates default values in the get install events params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *GetInstallEventsParams) SetDefaults() { - // no default values defined for this parameter -} - -// WithTimeout adds the timeout to the get install events params -func (o *GetInstallEventsParams) WithTimeout(timeout time.Duration) *GetInstallEventsParams { - o.SetTimeout(timeout) - return o -} - -// SetTimeout adds the timeout to the get install events params -func (o *GetInstallEventsParams) SetTimeout(timeout time.Duration) { - o.timeout = timeout -} - -// WithContext adds the context to the get install events params -func (o *GetInstallEventsParams) WithContext(ctx context.Context) *GetInstallEventsParams { - o.SetContext(ctx) - return o -} - -// SetContext adds the context to the get install events params -func (o *GetInstallEventsParams) SetContext(ctx context.Context) { - o.Context = ctx -} - -// WithHTTPClient adds the HTTPClient to the get install events params -func (o *GetInstallEventsParams) WithHTTPClient(client *http.Client) *GetInstallEventsParams { - o.SetHTTPClient(client) - return o -} - -// SetHTTPClient adds the HTTPClient to the get install events params -func (o *GetInstallEventsParams) SetHTTPClient(client *http.Client) { - o.HTTPClient = client -} - -// WithInstallID adds the installID to the get install events params -func (o *GetInstallEventsParams) WithInstallID(installID string) *GetInstallEventsParams { - o.SetInstallID(installID) - return o -} - -// SetInstallID adds the installId to the get install events params -func (o *GetInstallEventsParams) SetInstallID(installID string) { - o.InstallID = installID -} - -// WriteToRequest writes these params to a swagger request -func (o *GetInstallEventsParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { - - if err := r.SetTimeout(o.timeout); err != nil { - return err - } - var res []error - - // path param install_id - if err := r.SetPathParam("install_id", o.InstallID); err != nil { - return err - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} diff --git a/client/operations/get_install_events_responses.go b/client/operations/get_install_events_responses.go deleted file mode 100644 index dd1d1d3..0000000 --- a/client/operations/get_install_events_responses.go +++ /dev/null @@ -1,484 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package operations - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "encoding/json" - "fmt" - "io" - - "github.com/go-openapi/runtime" - "github.com/go-openapi/strfmt" - - "github.com/nuonco/nuon-go/models" -) - -// GetInstallEventsReader is a Reader for the GetInstallEvents structure. -type GetInstallEventsReader struct { - formats strfmt.Registry -} - -// ReadResponse reads a server response into the received o. -func (o *GetInstallEventsReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { - switch response.Code() { - case 200: - result := NewGetInstallEventsOK() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return result, nil - case 400: - result := NewGetInstallEventsBadRequest() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return nil, result - case 401: - result := NewGetInstallEventsUnauthorized() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return nil, result - case 403: - result := NewGetInstallEventsForbidden() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return nil, result - case 404: - result := NewGetInstallEventsNotFound() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return nil, result - case 500: - result := NewGetInstallEventsInternalServerError() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return nil, result - default: - return nil, runtime.NewAPIError("[GET /v1/installs/{install_id}/events] GetInstallEvents", response, response.Code()) - } -} - -// NewGetInstallEventsOK creates a GetInstallEventsOK with default headers values -func NewGetInstallEventsOK() *GetInstallEventsOK { - return &GetInstallEventsOK{} -} - -/* -GetInstallEventsOK describes a response with status code 200, with default header values. - -OK -*/ -type GetInstallEventsOK struct { - Payload []*models.AppInstallEvent -} - -// IsSuccess returns true when this get install events o k response has a 2xx status code -func (o *GetInstallEventsOK) IsSuccess() bool { - return true -} - -// IsRedirect returns true when this get install events o k response has a 3xx status code -func (o *GetInstallEventsOK) IsRedirect() bool { - return false -} - -// IsClientError returns true when this get install events o k response has a 4xx status code -func (o *GetInstallEventsOK) IsClientError() bool { - return false -} - -// IsServerError returns true when this get install events o k response has a 5xx status code -func (o *GetInstallEventsOK) IsServerError() bool { - return false -} - -// IsCode returns true when this get install events o k response a status code equal to that given -func (o *GetInstallEventsOK) IsCode(code int) bool { - return code == 200 -} - -// Code gets the status code for the get install events o k response -func (o *GetInstallEventsOK) Code() int { - return 200 -} - -func (o *GetInstallEventsOK) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /v1/installs/{install_id}/events][%d] getInstallEventsOK %s", 200, payload) -} - -func (o *GetInstallEventsOK) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /v1/installs/{install_id}/events][%d] getInstallEventsOK %s", 200, payload) -} - -func (o *GetInstallEventsOK) GetPayload() []*models.AppInstallEvent { - return o.Payload -} - -func (o *GetInstallEventsOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - // response payload - if err := consumer.Consume(response.Body(), &o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewGetInstallEventsBadRequest creates a GetInstallEventsBadRequest with default headers values -func NewGetInstallEventsBadRequest() *GetInstallEventsBadRequest { - return &GetInstallEventsBadRequest{} -} - -/* -GetInstallEventsBadRequest describes a response with status code 400, with default header values. - -Bad Request -*/ -type GetInstallEventsBadRequest struct { - Payload *models.StderrErrResponse -} - -// IsSuccess returns true when this get install events bad request response has a 2xx status code -func (o *GetInstallEventsBadRequest) IsSuccess() bool { - return false -} - -// IsRedirect returns true when this get install events bad request response has a 3xx status code -func (o *GetInstallEventsBadRequest) IsRedirect() bool { - return false -} - -// IsClientError returns true when this get install events bad request response has a 4xx status code -func (o *GetInstallEventsBadRequest) IsClientError() bool { - return true -} - -// IsServerError returns true when this get install events bad request response has a 5xx status code -func (o *GetInstallEventsBadRequest) IsServerError() bool { - return false -} - -// IsCode returns true when this get install events bad request response a status code equal to that given -func (o *GetInstallEventsBadRequest) IsCode(code int) bool { - return code == 400 -} - -// Code gets the status code for the get install events bad request response -func (o *GetInstallEventsBadRequest) Code() int { - return 400 -} - -func (o *GetInstallEventsBadRequest) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /v1/installs/{install_id}/events][%d] getInstallEventsBadRequest %s", 400, payload) -} - -func (o *GetInstallEventsBadRequest) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /v1/installs/{install_id}/events][%d] getInstallEventsBadRequest %s", 400, payload) -} - -func (o *GetInstallEventsBadRequest) GetPayload() *models.StderrErrResponse { - return o.Payload -} - -func (o *GetInstallEventsBadRequest) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.StderrErrResponse) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewGetInstallEventsUnauthorized creates a GetInstallEventsUnauthorized with default headers values -func NewGetInstallEventsUnauthorized() *GetInstallEventsUnauthorized { - return &GetInstallEventsUnauthorized{} -} - -/* -GetInstallEventsUnauthorized describes a response with status code 401, with default header values. - -Unauthorized -*/ -type GetInstallEventsUnauthorized struct { - Payload *models.StderrErrResponse -} - -// IsSuccess returns true when this get install events unauthorized response has a 2xx status code -func (o *GetInstallEventsUnauthorized) IsSuccess() bool { - return false -} - -// IsRedirect returns true when this get install events unauthorized response has a 3xx status code -func (o *GetInstallEventsUnauthorized) IsRedirect() bool { - return false -} - -// IsClientError returns true when this get install events unauthorized response has a 4xx status code -func (o *GetInstallEventsUnauthorized) IsClientError() bool { - return true -} - -// IsServerError returns true when this get install events unauthorized response has a 5xx status code -func (o *GetInstallEventsUnauthorized) IsServerError() bool { - return false -} - -// IsCode returns true when this get install events unauthorized response a status code equal to that given -func (o *GetInstallEventsUnauthorized) IsCode(code int) bool { - return code == 401 -} - -// Code gets the status code for the get install events unauthorized response -func (o *GetInstallEventsUnauthorized) Code() int { - return 401 -} - -func (o *GetInstallEventsUnauthorized) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /v1/installs/{install_id}/events][%d] getInstallEventsUnauthorized %s", 401, payload) -} - -func (o *GetInstallEventsUnauthorized) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /v1/installs/{install_id}/events][%d] getInstallEventsUnauthorized %s", 401, payload) -} - -func (o *GetInstallEventsUnauthorized) GetPayload() *models.StderrErrResponse { - return o.Payload -} - -func (o *GetInstallEventsUnauthorized) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.StderrErrResponse) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewGetInstallEventsForbidden creates a GetInstallEventsForbidden with default headers values -func NewGetInstallEventsForbidden() *GetInstallEventsForbidden { - return &GetInstallEventsForbidden{} -} - -/* -GetInstallEventsForbidden describes a response with status code 403, with default header values. - -Forbidden -*/ -type GetInstallEventsForbidden struct { - Payload *models.StderrErrResponse -} - -// IsSuccess returns true when this get install events forbidden response has a 2xx status code -func (o *GetInstallEventsForbidden) IsSuccess() bool { - return false -} - -// IsRedirect returns true when this get install events forbidden response has a 3xx status code -func (o *GetInstallEventsForbidden) IsRedirect() bool { - return false -} - -// IsClientError returns true when this get install events forbidden response has a 4xx status code -func (o *GetInstallEventsForbidden) IsClientError() bool { - return true -} - -// IsServerError returns true when this get install events forbidden response has a 5xx status code -func (o *GetInstallEventsForbidden) IsServerError() bool { - return false -} - -// IsCode returns true when this get install events forbidden response a status code equal to that given -func (o *GetInstallEventsForbidden) IsCode(code int) bool { - return code == 403 -} - -// Code gets the status code for the get install events forbidden response -func (o *GetInstallEventsForbidden) Code() int { - return 403 -} - -func (o *GetInstallEventsForbidden) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /v1/installs/{install_id}/events][%d] getInstallEventsForbidden %s", 403, payload) -} - -func (o *GetInstallEventsForbidden) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /v1/installs/{install_id}/events][%d] getInstallEventsForbidden %s", 403, payload) -} - -func (o *GetInstallEventsForbidden) GetPayload() *models.StderrErrResponse { - return o.Payload -} - -func (o *GetInstallEventsForbidden) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.StderrErrResponse) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewGetInstallEventsNotFound creates a GetInstallEventsNotFound with default headers values -func NewGetInstallEventsNotFound() *GetInstallEventsNotFound { - return &GetInstallEventsNotFound{} -} - -/* -GetInstallEventsNotFound describes a response with status code 404, with default header values. - -Not Found -*/ -type GetInstallEventsNotFound struct { - Payload *models.StderrErrResponse -} - -// IsSuccess returns true when this get install events not found response has a 2xx status code -func (o *GetInstallEventsNotFound) IsSuccess() bool { - return false -} - -// IsRedirect returns true when this get install events not found response has a 3xx status code -func (o *GetInstallEventsNotFound) IsRedirect() bool { - return false -} - -// IsClientError returns true when this get install events not found response has a 4xx status code -func (o *GetInstallEventsNotFound) IsClientError() bool { - return true -} - -// IsServerError returns true when this get install events not found response has a 5xx status code -func (o *GetInstallEventsNotFound) IsServerError() bool { - return false -} - -// IsCode returns true when this get install events not found response a status code equal to that given -func (o *GetInstallEventsNotFound) IsCode(code int) bool { - return code == 404 -} - -// Code gets the status code for the get install events not found response -func (o *GetInstallEventsNotFound) Code() int { - return 404 -} - -func (o *GetInstallEventsNotFound) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /v1/installs/{install_id}/events][%d] getInstallEventsNotFound %s", 404, payload) -} - -func (o *GetInstallEventsNotFound) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /v1/installs/{install_id}/events][%d] getInstallEventsNotFound %s", 404, payload) -} - -func (o *GetInstallEventsNotFound) GetPayload() *models.StderrErrResponse { - return o.Payload -} - -func (o *GetInstallEventsNotFound) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.StderrErrResponse) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewGetInstallEventsInternalServerError creates a GetInstallEventsInternalServerError with default headers values -func NewGetInstallEventsInternalServerError() *GetInstallEventsInternalServerError { - return &GetInstallEventsInternalServerError{} -} - -/* -GetInstallEventsInternalServerError describes a response with status code 500, with default header values. - -Internal Server Error -*/ -type GetInstallEventsInternalServerError struct { - Payload *models.StderrErrResponse -} - -// IsSuccess returns true when this get install events internal server error response has a 2xx status code -func (o *GetInstallEventsInternalServerError) IsSuccess() bool { - return false -} - -// IsRedirect returns true when this get install events internal server error response has a 3xx status code -func (o *GetInstallEventsInternalServerError) IsRedirect() bool { - return false -} - -// IsClientError returns true when this get install events internal server error response has a 4xx status code -func (o *GetInstallEventsInternalServerError) IsClientError() bool { - return false -} - -// IsServerError returns true when this get install events internal server error response has a 5xx status code -func (o *GetInstallEventsInternalServerError) IsServerError() bool { - return true -} - -// IsCode returns true when this get install events internal server error response a status code equal to that given -func (o *GetInstallEventsInternalServerError) IsCode(code int) bool { - return code == 500 -} - -// Code gets the status code for the get install events internal server error response -func (o *GetInstallEventsInternalServerError) Code() int { - return 500 -} - -func (o *GetInstallEventsInternalServerError) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /v1/installs/{install_id}/events][%d] getInstallEventsInternalServerError %s", 500, payload) -} - -func (o *GetInstallEventsInternalServerError) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /v1/installs/{install_id}/events][%d] getInstallEventsInternalServerError %s", 500, payload) -} - -func (o *GetInstallEventsInternalServerError) GetPayload() *models.StderrErrResponse { - return o.Payload -} - -func (o *GetInstallEventsInternalServerError) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.StderrErrResponse) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} diff --git a/client/operations/get_install_inputs_parameters.go b/client/operations/get_install_inputs_parameters.go deleted file mode 100644 index 12a6aa6..0000000 --- a/client/operations/get_install_inputs_parameters.go +++ /dev/null @@ -1,151 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package operations - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "context" - "net/http" - "time" - - "github.com/go-openapi/errors" - "github.com/go-openapi/runtime" - cr "github.com/go-openapi/runtime/client" - "github.com/go-openapi/strfmt" -) - -// NewGetInstallInputsParams creates a new GetInstallInputsParams object, -// with the default timeout for this client. -// -// Default values are not hydrated, since defaults are normally applied by the API server side. -// -// To enforce default values in parameter, use SetDefaults or WithDefaults. -func NewGetInstallInputsParams() *GetInstallInputsParams { - return &GetInstallInputsParams{ - timeout: cr.DefaultTimeout, - } -} - -// NewGetInstallInputsParamsWithTimeout creates a new GetInstallInputsParams object -// with the ability to set a timeout on a request. -func NewGetInstallInputsParamsWithTimeout(timeout time.Duration) *GetInstallInputsParams { - return &GetInstallInputsParams{ - timeout: timeout, - } -} - -// NewGetInstallInputsParamsWithContext creates a new GetInstallInputsParams object -// with the ability to set a context for a request. -func NewGetInstallInputsParamsWithContext(ctx context.Context) *GetInstallInputsParams { - return &GetInstallInputsParams{ - Context: ctx, - } -} - -// NewGetInstallInputsParamsWithHTTPClient creates a new GetInstallInputsParams object -// with the ability to set a custom HTTPClient for a request. -func NewGetInstallInputsParamsWithHTTPClient(client *http.Client) *GetInstallInputsParams { - return &GetInstallInputsParams{ - HTTPClient: client, - } -} - -/* -GetInstallInputsParams contains all the parameters to send to the API endpoint - - for the get install inputs operation. - - Typically these are written to a http.Request. -*/ -type GetInstallInputsParams struct { - - /* InstallID. - - install ID - */ - InstallID string - - timeout time.Duration - Context context.Context - HTTPClient *http.Client -} - -// WithDefaults hydrates default values in the get install inputs params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *GetInstallInputsParams) WithDefaults() *GetInstallInputsParams { - o.SetDefaults() - return o -} - -// SetDefaults hydrates default values in the get install inputs params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *GetInstallInputsParams) SetDefaults() { - // no default values defined for this parameter -} - -// WithTimeout adds the timeout to the get install inputs params -func (o *GetInstallInputsParams) WithTimeout(timeout time.Duration) *GetInstallInputsParams { - o.SetTimeout(timeout) - return o -} - -// SetTimeout adds the timeout to the get install inputs params -func (o *GetInstallInputsParams) SetTimeout(timeout time.Duration) { - o.timeout = timeout -} - -// WithContext adds the context to the get install inputs params -func (o *GetInstallInputsParams) WithContext(ctx context.Context) *GetInstallInputsParams { - o.SetContext(ctx) - return o -} - -// SetContext adds the context to the get install inputs params -func (o *GetInstallInputsParams) SetContext(ctx context.Context) { - o.Context = ctx -} - -// WithHTTPClient adds the HTTPClient to the get install inputs params -func (o *GetInstallInputsParams) WithHTTPClient(client *http.Client) *GetInstallInputsParams { - o.SetHTTPClient(client) - return o -} - -// SetHTTPClient adds the HTTPClient to the get install inputs params -func (o *GetInstallInputsParams) SetHTTPClient(client *http.Client) { - o.HTTPClient = client -} - -// WithInstallID adds the installID to the get install inputs params -func (o *GetInstallInputsParams) WithInstallID(installID string) *GetInstallInputsParams { - o.SetInstallID(installID) - return o -} - -// SetInstallID adds the installId to the get install inputs params -func (o *GetInstallInputsParams) SetInstallID(installID string) { - o.InstallID = installID -} - -// WriteToRequest writes these params to a swagger request -func (o *GetInstallInputsParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { - - if err := r.SetTimeout(o.timeout); err != nil { - return err - } - var res []error - - // path param install_id - if err := r.SetPathParam("install_id", o.InstallID); err != nil { - return err - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} diff --git a/client/operations/get_install_inputs_responses.go b/client/operations/get_install_inputs_responses.go deleted file mode 100644 index 063e38e..0000000 --- a/client/operations/get_install_inputs_responses.go +++ /dev/null @@ -1,484 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package operations - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "encoding/json" - "fmt" - "io" - - "github.com/go-openapi/runtime" - "github.com/go-openapi/strfmt" - - "github.com/nuonco/nuon-go/models" -) - -// GetInstallInputsReader is a Reader for the GetInstallInputs structure. -type GetInstallInputsReader struct { - formats strfmt.Registry -} - -// ReadResponse reads a server response into the received o. -func (o *GetInstallInputsReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { - switch response.Code() { - case 200: - result := NewGetInstallInputsOK() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return result, nil - case 400: - result := NewGetInstallInputsBadRequest() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return nil, result - case 401: - result := NewGetInstallInputsUnauthorized() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return nil, result - case 403: - result := NewGetInstallInputsForbidden() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return nil, result - case 404: - result := NewGetInstallInputsNotFound() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return nil, result - case 500: - result := NewGetInstallInputsInternalServerError() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return nil, result - default: - return nil, runtime.NewAPIError("[GET /v1/installs/{install_id}/inputs] GetInstallInputs", response, response.Code()) - } -} - -// NewGetInstallInputsOK creates a GetInstallInputsOK with default headers values -func NewGetInstallInputsOK() *GetInstallInputsOK { - return &GetInstallInputsOK{} -} - -/* -GetInstallInputsOK describes a response with status code 200, with default header values. - -OK -*/ -type GetInstallInputsOK struct { - Payload []*models.AppInstallInputs -} - -// IsSuccess returns true when this get install inputs o k response has a 2xx status code -func (o *GetInstallInputsOK) IsSuccess() bool { - return true -} - -// IsRedirect returns true when this get install inputs o k response has a 3xx status code -func (o *GetInstallInputsOK) IsRedirect() bool { - return false -} - -// IsClientError returns true when this get install inputs o k response has a 4xx status code -func (o *GetInstallInputsOK) IsClientError() bool { - return false -} - -// IsServerError returns true when this get install inputs o k response has a 5xx status code -func (o *GetInstallInputsOK) IsServerError() bool { - return false -} - -// IsCode returns true when this get install inputs o k response a status code equal to that given -func (o *GetInstallInputsOK) IsCode(code int) bool { - return code == 200 -} - -// Code gets the status code for the get install inputs o k response -func (o *GetInstallInputsOK) Code() int { - return 200 -} - -func (o *GetInstallInputsOK) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /v1/installs/{install_id}/inputs][%d] getInstallInputsOK %s", 200, payload) -} - -func (o *GetInstallInputsOK) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /v1/installs/{install_id}/inputs][%d] getInstallInputsOK %s", 200, payload) -} - -func (o *GetInstallInputsOK) GetPayload() []*models.AppInstallInputs { - return o.Payload -} - -func (o *GetInstallInputsOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - // response payload - if err := consumer.Consume(response.Body(), &o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewGetInstallInputsBadRequest creates a GetInstallInputsBadRequest with default headers values -func NewGetInstallInputsBadRequest() *GetInstallInputsBadRequest { - return &GetInstallInputsBadRequest{} -} - -/* -GetInstallInputsBadRequest describes a response with status code 400, with default header values. - -Bad Request -*/ -type GetInstallInputsBadRequest struct { - Payload *models.StderrErrResponse -} - -// IsSuccess returns true when this get install inputs bad request response has a 2xx status code -func (o *GetInstallInputsBadRequest) IsSuccess() bool { - return false -} - -// IsRedirect returns true when this get install inputs bad request response has a 3xx status code -func (o *GetInstallInputsBadRequest) IsRedirect() bool { - return false -} - -// IsClientError returns true when this get install inputs bad request response has a 4xx status code -func (o *GetInstallInputsBadRequest) IsClientError() bool { - return true -} - -// IsServerError returns true when this get install inputs bad request response has a 5xx status code -func (o *GetInstallInputsBadRequest) IsServerError() bool { - return false -} - -// IsCode returns true when this get install inputs bad request response a status code equal to that given -func (o *GetInstallInputsBadRequest) IsCode(code int) bool { - return code == 400 -} - -// Code gets the status code for the get install inputs bad request response -func (o *GetInstallInputsBadRequest) Code() int { - return 400 -} - -func (o *GetInstallInputsBadRequest) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /v1/installs/{install_id}/inputs][%d] getInstallInputsBadRequest %s", 400, payload) -} - -func (o *GetInstallInputsBadRequest) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /v1/installs/{install_id}/inputs][%d] getInstallInputsBadRequest %s", 400, payload) -} - -func (o *GetInstallInputsBadRequest) GetPayload() *models.StderrErrResponse { - return o.Payload -} - -func (o *GetInstallInputsBadRequest) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.StderrErrResponse) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewGetInstallInputsUnauthorized creates a GetInstallInputsUnauthorized with default headers values -func NewGetInstallInputsUnauthorized() *GetInstallInputsUnauthorized { - return &GetInstallInputsUnauthorized{} -} - -/* -GetInstallInputsUnauthorized describes a response with status code 401, with default header values. - -Unauthorized -*/ -type GetInstallInputsUnauthorized struct { - Payload *models.StderrErrResponse -} - -// IsSuccess returns true when this get install inputs unauthorized response has a 2xx status code -func (o *GetInstallInputsUnauthorized) IsSuccess() bool { - return false -} - -// IsRedirect returns true when this get install inputs unauthorized response has a 3xx status code -func (o *GetInstallInputsUnauthorized) IsRedirect() bool { - return false -} - -// IsClientError returns true when this get install inputs unauthorized response has a 4xx status code -func (o *GetInstallInputsUnauthorized) IsClientError() bool { - return true -} - -// IsServerError returns true when this get install inputs unauthorized response has a 5xx status code -func (o *GetInstallInputsUnauthorized) IsServerError() bool { - return false -} - -// IsCode returns true when this get install inputs unauthorized response a status code equal to that given -func (o *GetInstallInputsUnauthorized) IsCode(code int) bool { - return code == 401 -} - -// Code gets the status code for the get install inputs unauthorized response -func (o *GetInstallInputsUnauthorized) Code() int { - return 401 -} - -func (o *GetInstallInputsUnauthorized) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /v1/installs/{install_id}/inputs][%d] getInstallInputsUnauthorized %s", 401, payload) -} - -func (o *GetInstallInputsUnauthorized) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /v1/installs/{install_id}/inputs][%d] getInstallInputsUnauthorized %s", 401, payload) -} - -func (o *GetInstallInputsUnauthorized) GetPayload() *models.StderrErrResponse { - return o.Payload -} - -func (o *GetInstallInputsUnauthorized) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.StderrErrResponse) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewGetInstallInputsForbidden creates a GetInstallInputsForbidden with default headers values -func NewGetInstallInputsForbidden() *GetInstallInputsForbidden { - return &GetInstallInputsForbidden{} -} - -/* -GetInstallInputsForbidden describes a response with status code 403, with default header values. - -Forbidden -*/ -type GetInstallInputsForbidden struct { - Payload *models.StderrErrResponse -} - -// IsSuccess returns true when this get install inputs forbidden response has a 2xx status code -func (o *GetInstallInputsForbidden) IsSuccess() bool { - return false -} - -// IsRedirect returns true when this get install inputs forbidden response has a 3xx status code -func (o *GetInstallInputsForbidden) IsRedirect() bool { - return false -} - -// IsClientError returns true when this get install inputs forbidden response has a 4xx status code -func (o *GetInstallInputsForbidden) IsClientError() bool { - return true -} - -// IsServerError returns true when this get install inputs forbidden response has a 5xx status code -func (o *GetInstallInputsForbidden) IsServerError() bool { - return false -} - -// IsCode returns true when this get install inputs forbidden response a status code equal to that given -func (o *GetInstallInputsForbidden) IsCode(code int) bool { - return code == 403 -} - -// Code gets the status code for the get install inputs forbidden response -func (o *GetInstallInputsForbidden) Code() int { - return 403 -} - -func (o *GetInstallInputsForbidden) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /v1/installs/{install_id}/inputs][%d] getInstallInputsForbidden %s", 403, payload) -} - -func (o *GetInstallInputsForbidden) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /v1/installs/{install_id}/inputs][%d] getInstallInputsForbidden %s", 403, payload) -} - -func (o *GetInstallInputsForbidden) GetPayload() *models.StderrErrResponse { - return o.Payload -} - -func (o *GetInstallInputsForbidden) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.StderrErrResponse) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewGetInstallInputsNotFound creates a GetInstallInputsNotFound with default headers values -func NewGetInstallInputsNotFound() *GetInstallInputsNotFound { - return &GetInstallInputsNotFound{} -} - -/* -GetInstallInputsNotFound describes a response with status code 404, with default header values. - -Not Found -*/ -type GetInstallInputsNotFound struct { - Payload *models.StderrErrResponse -} - -// IsSuccess returns true when this get install inputs not found response has a 2xx status code -func (o *GetInstallInputsNotFound) IsSuccess() bool { - return false -} - -// IsRedirect returns true when this get install inputs not found response has a 3xx status code -func (o *GetInstallInputsNotFound) IsRedirect() bool { - return false -} - -// IsClientError returns true when this get install inputs not found response has a 4xx status code -func (o *GetInstallInputsNotFound) IsClientError() bool { - return true -} - -// IsServerError returns true when this get install inputs not found response has a 5xx status code -func (o *GetInstallInputsNotFound) IsServerError() bool { - return false -} - -// IsCode returns true when this get install inputs not found response a status code equal to that given -func (o *GetInstallInputsNotFound) IsCode(code int) bool { - return code == 404 -} - -// Code gets the status code for the get install inputs not found response -func (o *GetInstallInputsNotFound) Code() int { - return 404 -} - -func (o *GetInstallInputsNotFound) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /v1/installs/{install_id}/inputs][%d] getInstallInputsNotFound %s", 404, payload) -} - -func (o *GetInstallInputsNotFound) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /v1/installs/{install_id}/inputs][%d] getInstallInputsNotFound %s", 404, payload) -} - -func (o *GetInstallInputsNotFound) GetPayload() *models.StderrErrResponse { - return o.Payload -} - -func (o *GetInstallInputsNotFound) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.StderrErrResponse) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewGetInstallInputsInternalServerError creates a GetInstallInputsInternalServerError with default headers values -func NewGetInstallInputsInternalServerError() *GetInstallInputsInternalServerError { - return &GetInstallInputsInternalServerError{} -} - -/* -GetInstallInputsInternalServerError describes a response with status code 500, with default header values. - -Internal Server Error -*/ -type GetInstallInputsInternalServerError struct { - Payload *models.StderrErrResponse -} - -// IsSuccess returns true when this get install inputs internal server error response has a 2xx status code -func (o *GetInstallInputsInternalServerError) IsSuccess() bool { - return false -} - -// IsRedirect returns true when this get install inputs internal server error response has a 3xx status code -func (o *GetInstallInputsInternalServerError) IsRedirect() bool { - return false -} - -// IsClientError returns true when this get install inputs internal server error response has a 4xx status code -func (o *GetInstallInputsInternalServerError) IsClientError() bool { - return false -} - -// IsServerError returns true when this get install inputs internal server error response has a 5xx status code -func (o *GetInstallInputsInternalServerError) IsServerError() bool { - return true -} - -// IsCode returns true when this get install inputs internal server error response a status code equal to that given -func (o *GetInstallInputsInternalServerError) IsCode(code int) bool { - return code == 500 -} - -// Code gets the status code for the get install inputs internal server error response -func (o *GetInstallInputsInternalServerError) Code() int { - return 500 -} - -func (o *GetInstallInputsInternalServerError) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /v1/installs/{install_id}/inputs][%d] getInstallInputsInternalServerError %s", 500, payload) -} - -func (o *GetInstallInputsInternalServerError) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /v1/installs/{install_id}/inputs][%d] getInstallInputsInternalServerError %s", 500, payload) -} - -func (o *GetInstallInputsInternalServerError) GetPayload() *models.StderrErrResponse { - return o.Payload -} - -func (o *GetInstallInputsInternalServerError) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.StderrErrResponse) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} diff --git a/client/operations/get_install_latest_deploy_parameters.go b/client/operations/get_install_latest_deploy_parameters.go deleted file mode 100644 index ff87517..0000000 --- a/client/operations/get_install_latest_deploy_parameters.go +++ /dev/null @@ -1,151 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package operations - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "context" - "net/http" - "time" - - "github.com/go-openapi/errors" - "github.com/go-openapi/runtime" - cr "github.com/go-openapi/runtime/client" - "github.com/go-openapi/strfmt" -) - -// NewGetInstallLatestDeployParams creates a new GetInstallLatestDeployParams object, -// with the default timeout for this client. -// -// Default values are not hydrated, since defaults are normally applied by the API server side. -// -// To enforce default values in parameter, use SetDefaults or WithDefaults. -func NewGetInstallLatestDeployParams() *GetInstallLatestDeployParams { - return &GetInstallLatestDeployParams{ - timeout: cr.DefaultTimeout, - } -} - -// NewGetInstallLatestDeployParamsWithTimeout creates a new GetInstallLatestDeployParams object -// with the ability to set a timeout on a request. -func NewGetInstallLatestDeployParamsWithTimeout(timeout time.Duration) *GetInstallLatestDeployParams { - return &GetInstallLatestDeployParams{ - timeout: timeout, - } -} - -// NewGetInstallLatestDeployParamsWithContext creates a new GetInstallLatestDeployParams object -// with the ability to set a context for a request. -func NewGetInstallLatestDeployParamsWithContext(ctx context.Context) *GetInstallLatestDeployParams { - return &GetInstallLatestDeployParams{ - Context: ctx, - } -} - -// NewGetInstallLatestDeployParamsWithHTTPClient creates a new GetInstallLatestDeployParams object -// with the ability to set a custom HTTPClient for a request. -func NewGetInstallLatestDeployParamsWithHTTPClient(client *http.Client) *GetInstallLatestDeployParams { - return &GetInstallLatestDeployParams{ - HTTPClient: client, - } -} - -/* -GetInstallLatestDeployParams contains all the parameters to send to the API endpoint - - for the get install latest deploy operation. - - Typically these are written to a http.Request. -*/ -type GetInstallLatestDeployParams struct { - - /* InstallID. - - install ID - */ - InstallID string - - timeout time.Duration - Context context.Context - HTTPClient *http.Client -} - -// WithDefaults hydrates default values in the get install latest deploy params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *GetInstallLatestDeployParams) WithDefaults() *GetInstallLatestDeployParams { - o.SetDefaults() - return o -} - -// SetDefaults hydrates default values in the get install latest deploy params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *GetInstallLatestDeployParams) SetDefaults() { - // no default values defined for this parameter -} - -// WithTimeout adds the timeout to the get install latest deploy params -func (o *GetInstallLatestDeployParams) WithTimeout(timeout time.Duration) *GetInstallLatestDeployParams { - o.SetTimeout(timeout) - return o -} - -// SetTimeout adds the timeout to the get install latest deploy params -func (o *GetInstallLatestDeployParams) SetTimeout(timeout time.Duration) { - o.timeout = timeout -} - -// WithContext adds the context to the get install latest deploy params -func (o *GetInstallLatestDeployParams) WithContext(ctx context.Context) *GetInstallLatestDeployParams { - o.SetContext(ctx) - return o -} - -// SetContext adds the context to the get install latest deploy params -func (o *GetInstallLatestDeployParams) SetContext(ctx context.Context) { - o.Context = ctx -} - -// WithHTTPClient adds the HTTPClient to the get install latest deploy params -func (o *GetInstallLatestDeployParams) WithHTTPClient(client *http.Client) *GetInstallLatestDeployParams { - o.SetHTTPClient(client) - return o -} - -// SetHTTPClient adds the HTTPClient to the get install latest deploy params -func (o *GetInstallLatestDeployParams) SetHTTPClient(client *http.Client) { - o.HTTPClient = client -} - -// WithInstallID adds the installID to the get install latest deploy params -func (o *GetInstallLatestDeployParams) WithInstallID(installID string) *GetInstallLatestDeployParams { - o.SetInstallID(installID) - return o -} - -// SetInstallID adds the installId to the get install latest deploy params -func (o *GetInstallLatestDeployParams) SetInstallID(installID string) { - o.InstallID = installID -} - -// WriteToRequest writes these params to a swagger request -func (o *GetInstallLatestDeployParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { - - if err := r.SetTimeout(o.timeout); err != nil { - return err - } - var res []error - - // path param install_id - if err := r.SetPathParam("install_id", o.InstallID); err != nil { - return err - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} diff --git a/client/operations/get_install_latest_deploy_responses.go b/client/operations/get_install_latest_deploy_responses.go deleted file mode 100644 index 871955c..0000000 --- a/client/operations/get_install_latest_deploy_responses.go +++ /dev/null @@ -1,486 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package operations - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "encoding/json" - "fmt" - "io" - - "github.com/go-openapi/runtime" - "github.com/go-openapi/strfmt" - - "github.com/nuonco/nuon-go/models" -) - -// GetInstallLatestDeployReader is a Reader for the GetInstallLatestDeploy structure. -type GetInstallLatestDeployReader struct { - formats strfmt.Registry -} - -// ReadResponse reads a server response into the received o. -func (o *GetInstallLatestDeployReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { - switch response.Code() { - case 200: - result := NewGetInstallLatestDeployOK() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return result, nil - case 400: - result := NewGetInstallLatestDeployBadRequest() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return nil, result - case 401: - result := NewGetInstallLatestDeployUnauthorized() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return nil, result - case 403: - result := NewGetInstallLatestDeployForbidden() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return nil, result - case 404: - result := NewGetInstallLatestDeployNotFound() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return nil, result - case 500: - result := NewGetInstallLatestDeployInternalServerError() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return nil, result - default: - return nil, runtime.NewAPIError("[GET /v1/installs/{install_id}/deploys/latest] GetInstallLatestDeploy", response, response.Code()) - } -} - -// NewGetInstallLatestDeployOK creates a GetInstallLatestDeployOK with default headers values -func NewGetInstallLatestDeployOK() *GetInstallLatestDeployOK { - return &GetInstallLatestDeployOK{} -} - -/* -GetInstallLatestDeployOK describes a response with status code 200, with default header values. - -OK -*/ -type GetInstallLatestDeployOK struct { - Payload *models.AppInstallDeploy -} - -// IsSuccess returns true when this get install latest deploy o k response has a 2xx status code -func (o *GetInstallLatestDeployOK) IsSuccess() bool { - return true -} - -// IsRedirect returns true when this get install latest deploy o k response has a 3xx status code -func (o *GetInstallLatestDeployOK) IsRedirect() bool { - return false -} - -// IsClientError returns true when this get install latest deploy o k response has a 4xx status code -func (o *GetInstallLatestDeployOK) IsClientError() bool { - return false -} - -// IsServerError returns true when this get install latest deploy o k response has a 5xx status code -func (o *GetInstallLatestDeployOK) IsServerError() bool { - return false -} - -// IsCode returns true when this get install latest deploy o k response a status code equal to that given -func (o *GetInstallLatestDeployOK) IsCode(code int) bool { - return code == 200 -} - -// Code gets the status code for the get install latest deploy o k response -func (o *GetInstallLatestDeployOK) Code() int { - return 200 -} - -func (o *GetInstallLatestDeployOK) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /v1/installs/{install_id}/deploys/latest][%d] getInstallLatestDeployOK %s", 200, payload) -} - -func (o *GetInstallLatestDeployOK) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /v1/installs/{install_id}/deploys/latest][%d] getInstallLatestDeployOK %s", 200, payload) -} - -func (o *GetInstallLatestDeployOK) GetPayload() *models.AppInstallDeploy { - return o.Payload -} - -func (o *GetInstallLatestDeployOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.AppInstallDeploy) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewGetInstallLatestDeployBadRequest creates a GetInstallLatestDeployBadRequest with default headers values -func NewGetInstallLatestDeployBadRequest() *GetInstallLatestDeployBadRequest { - return &GetInstallLatestDeployBadRequest{} -} - -/* -GetInstallLatestDeployBadRequest describes a response with status code 400, with default header values. - -Bad Request -*/ -type GetInstallLatestDeployBadRequest struct { - Payload *models.StderrErrResponse -} - -// IsSuccess returns true when this get install latest deploy bad request response has a 2xx status code -func (o *GetInstallLatestDeployBadRequest) IsSuccess() bool { - return false -} - -// IsRedirect returns true when this get install latest deploy bad request response has a 3xx status code -func (o *GetInstallLatestDeployBadRequest) IsRedirect() bool { - return false -} - -// IsClientError returns true when this get install latest deploy bad request response has a 4xx status code -func (o *GetInstallLatestDeployBadRequest) IsClientError() bool { - return true -} - -// IsServerError returns true when this get install latest deploy bad request response has a 5xx status code -func (o *GetInstallLatestDeployBadRequest) IsServerError() bool { - return false -} - -// IsCode returns true when this get install latest deploy bad request response a status code equal to that given -func (o *GetInstallLatestDeployBadRequest) IsCode(code int) bool { - return code == 400 -} - -// Code gets the status code for the get install latest deploy bad request response -func (o *GetInstallLatestDeployBadRequest) Code() int { - return 400 -} - -func (o *GetInstallLatestDeployBadRequest) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /v1/installs/{install_id}/deploys/latest][%d] getInstallLatestDeployBadRequest %s", 400, payload) -} - -func (o *GetInstallLatestDeployBadRequest) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /v1/installs/{install_id}/deploys/latest][%d] getInstallLatestDeployBadRequest %s", 400, payload) -} - -func (o *GetInstallLatestDeployBadRequest) GetPayload() *models.StderrErrResponse { - return o.Payload -} - -func (o *GetInstallLatestDeployBadRequest) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.StderrErrResponse) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewGetInstallLatestDeployUnauthorized creates a GetInstallLatestDeployUnauthorized with default headers values -func NewGetInstallLatestDeployUnauthorized() *GetInstallLatestDeployUnauthorized { - return &GetInstallLatestDeployUnauthorized{} -} - -/* -GetInstallLatestDeployUnauthorized describes a response with status code 401, with default header values. - -Unauthorized -*/ -type GetInstallLatestDeployUnauthorized struct { - Payload *models.StderrErrResponse -} - -// IsSuccess returns true when this get install latest deploy unauthorized response has a 2xx status code -func (o *GetInstallLatestDeployUnauthorized) IsSuccess() bool { - return false -} - -// IsRedirect returns true when this get install latest deploy unauthorized response has a 3xx status code -func (o *GetInstallLatestDeployUnauthorized) IsRedirect() bool { - return false -} - -// IsClientError returns true when this get install latest deploy unauthorized response has a 4xx status code -func (o *GetInstallLatestDeployUnauthorized) IsClientError() bool { - return true -} - -// IsServerError returns true when this get install latest deploy unauthorized response has a 5xx status code -func (o *GetInstallLatestDeployUnauthorized) IsServerError() bool { - return false -} - -// IsCode returns true when this get install latest deploy unauthorized response a status code equal to that given -func (o *GetInstallLatestDeployUnauthorized) IsCode(code int) bool { - return code == 401 -} - -// Code gets the status code for the get install latest deploy unauthorized response -func (o *GetInstallLatestDeployUnauthorized) Code() int { - return 401 -} - -func (o *GetInstallLatestDeployUnauthorized) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /v1/installs/{install_id}/deploys/latest][%d] getInstallLatestDeployUnauthorized %s", 401, payload) -} - -func (o *GetInstallLatestDeployUnauthorized) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /v1/installs/{install_id}/deploys/latest][%d] getInstallLatestDeployUnauthorized %s", 401, payload) -} - -func (o *GetInstallLatestDeployUnauthorized) GetPayload() *models.StderrErrResponse { - return o.Payload -} - -func (o *GetInstallLatestDeployUnauthorized) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.StderrErrResponse) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewGetInstallLatestDeployForbidden creates a GetInstallLatestDeployForbidden with default headers values -func NewGetInstallLatestDeployForbidden() *GetInstallLatestDeployForbidden { - return &GetInstallLatestDeployForbidden{} -} - -/* -GetInstallLatestDeployForbidden describes a response with status code 403, with default header values. - -Forbidden -*/ -type GetInstallLatestDeployForbidden struct { - Payload *models.StderrErrResponse -} - -// IsSuccess returns true when this get install latest deploy forbidden response has a 2xx status code -func (o *GetInstallLatestDeployForbidden) IsSuccess() bool { - return false -} - -// IsRedirect returns true when this get install latest deploy forbidden response has a 3xx status code -func (o *GetInstallLatestDeployForbidden) IsRedirect() bool { - return false -} - -// IsClientError returns true when this get install latest deploy forbidden response has a 4xx status code -func (o *GetInstallLatestDeployForbidden) IsClientError() bool { - return true -} - -// IsServerError returns true when this get install latest deploy forbidden response has a 5xx status code -func (o *GetInstallLatestDeployForbidden) IsServerError() bool { - return false -} - -// IsCode returns true when this get install latest deploy forbidden response a status code equal to that given -func (o *GetInstallLatestDeployForbidden) IsCode(code int) bool { - return code == 403 -} - -// Code gets the status code for the get install latest deploy forbidden response -func (o *GetInstallLatestDeployForbidden) Code() int { - return 403 -} - -func (o *GetInstallLatestDeployForbidden) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /v1/installs/{install_id}/deploys/latest][%d] getInstallLatestDeployForbidden %s", 403, payload) -} - -func (o *GetInstallLatestDeployForbidden) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /v1/installs/{install_id}/deploys/latest][%d] getInstallLatestDeployForbidden %s", 403, payload) -} - -func (o *GetInstallLatestDeployForbidden) GetPayload() *models.StderrErrResponse { - return o.Payload -} - -func (o *GetInstallLatestDeployForbidden) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.StderrErrResponse) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewGetInstallLatestDeployNotFound creates a GetInstallLatestDeployNotFound with default headers values -func NewGetInstallLatestDeployNotFound() *GetInstallLatestDeployNotFound { - return &GetInstallLatestDeployNotFound{} -} - -/* -GetInstallLatestDeployNotFound describes a response with status code 404, with default header values. - -Not Found -*/ -type GetInstallLatestDeployNotFound struct { - Payload *models.StderrErrResponse -} - -// IsSuccess returns true when this get install latest deploy not found response has a 2xx status code -func (o *GetInstallLatestDeployNotFound) IsSuccess() bool { - return false -} - -// IsRedirect returns true when this get install latest deploy not found response has a 3xx status code -func (o *GetInstallLatestDeployNotFound) IsRedirect() bool { - return false -} - -// IsClientError returns true when this get install latest deploy not found response has a 4xx status code -func (o *GetInstallLatestDeployNotFound) IsClientError() bool { - return true -} - -// IsServerError returns true when this get install latest deploy not found response has a 5xx status code -func (o *GetInstallLatestDeployNotFound) IsServerError() bool { - return false -} - -// IsCode returns true when this get install latest deploy not found response a status code equal to that given -func (o *GetInstallLatestDeployNotFound) IsCode(code int) bool { - return code == 404 -} - -// Code gets the status code for the get install latest deploy not found response -func (o *GetInstallLatestDeployNotFound) Code() int { - return 404 -} - -func (o *GetInstallLatestDeployNotFound) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /v1/installs/{install_id}/deploys/latest][%d] getInstallLatestDeployNotFound %s", 404, payload) -} - -func (o *GetInstallLatestDeployNotFound) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /v1/installs/{install_id}/deploys/latest][%d] getInstallLatestDeployNotFound %s", 404, payload) -} - -func (o *GetInstallLatestDeployNotFound) GetPayload() *models.StderrErrResponse { - return o.Payload -} - -func (o *GetInstallLatestDeployNotFound) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.StderrErrResponse) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewGetInstallLatestDeployInternalServerError creates a GetInstallLatestDeployInternalServerError with default headers values -func NewGetInstallLatestDeployInternalServerError() *GetInstallLatestDeployInternalServerError { - return &GetInstallLatestDeployInternalServerError{} -} - -/* -GetInstallLatestDeployInternalServerError describes a response with status code 500, with default header values. - -Internal Server Error -*/ -type GetInstallLatestDeployInternalServerError struct { - Payload *models.StderrErrResponse -} - -// IsSuccess returns true when this get install latest deploy internal server error response has a 2xx status code -func (o *GetInstallLatestDeployInternalServerError) IsSuccess() bool { - return false -} - -// IsRedirect returns true when this get install latest deploy internal server error response has a 3xx status code -func (o *GetInstallLatestDeployInternalServerError) IsRedirect() bool { - return false -} - -// IsClientError returns true when this get install latest deploy internal server error response has a 4xx status code -func (o *GetInstallLatestDeployInternalServerError) IsClientError() bool { - return false -} - -// IsServerError returns true when this get install latest deploy internal server error response has a 5xx status code -func (o *GetInstallLatestDeployInternalServerError) IsServerError() bool { - return true -} - -// IsCode returns true when this get install latest deploy internal server error response a status code equal to that given -func (o *GetInstallLatestDeployInternalServerError) IsCode(code int) bool { - return code == 500 -} - -// Code gets the status code for the get install latest deploy internal server error response -func (o *GetInstallLatestDeployInternalServerError) Code() int { - return 500 -} - -func (o *GetInstallLatestDeployInternalServerError) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /v1/installs/{install_id}/deploys/latest][%d] getInstallLatestDeployInternalServerError %s", 500, payload) -} - -func (o *GetInstallLatestDeployInternalServerError) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /v1/installs/{install_id}/deploys/latest][%d] getInstallLatestDeployInternalServerError %s", 500, payload) -} - -func (o *GetInstallLatestDeployInternalServerError) GetPayload() *models.StderrErrResponse { - return o.Payload -} - -func (o *GetInstallLatestDeployInternalServerError) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.StderrErrResponse) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} diff --git a/client/operations/get_install_parameters.go b/client/operations/get_install_parameters.go deleted file mode 100644 index 5743899..0000000 --- a/client/operations/get_install_parameters.go +++ /dev/null @@ -1,151 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package operations - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "context" - "net/http" - "time" - - "github.com/go-openapi/errors" - "github.com/go-openapi/runtime" - cr "github.com/go-openapi/runtime/client" - "github.com/go-openapi/strfmt" -) - -// NewGetInstallParams creates a new GetInstallParams object, -// with the default timeout for this client. -// -// Default values are not hydrated, since defaults are normally applied by the API server side. -// -// To enforce default values in parameter, use SetDefaults or WithDefaults. -func NewGetInstallParams() *GetInstallParams { - return &GetInstallParams{ - timeout: cr.DefaultTimeout, - } -} - -// NewGetInstallParamsWithTimeout creates a new GetInstallParams object -// with the ability to set a timeout on a request. -func NewGetInstallParamsWithTimeout(timeout time.Duration) *GetInstallParams { - return &GetInstallParams{ - timeout: timeout, - } -} - -// NewGetInstallParamsWithContext creates a new GetInstallParams object -// with the ability to set a context for a request. -func NewGetInstallParamsWithContext(ctx context.Context) *GetInstallParams { - return &GetInstallParams{ - Context: ctx, - } -} - -// NewGetInstallParamsWithHTTPClient creates a new GetInstallParams object -// with the ability to set a custom HTTPClient for a request. -func NewGetInstallParamsWithHTTPClient(client *http.Client) *GetInstallParams { - return &GetInstallParams{ - HTTPClient: client, - } -} - -/* -GetInstallParams contains all the parameters to send to the API endpoint - - for the get install operation. - - Typically these are written to a http.Request. -*/ -type GetInstallParams struct { - - /* InstallID. - - install ID - */ - InstallID string - - timeout time.Duration - Context context.Context - HTTPClient *http.Client -} - -// WithDefaults hydrates default values in the get install params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *GetInstallParams) WithDefaults() *GetInstallParams { - o.SetDefaults() - return o -} - -// SetDefaults hydrates default values in the get install params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *GetInstallParams) SetDefaults() { - // no default values defined for this parameter -} - -// WithTimeout adds the timeout to the get install params -func (o *GetInstallParams) WithTimeout(timeout time.Duration) *GetInstallParams { - o.SetTimeout(timeout) - return o -} - -// SetTimeout adds the timeout to the get install params -func (o *GetInstallParams) SetTimeout(timeout time.Duration) { - o.timeout = timeout -} - -// WithContext adds the context to the get install params -func (o *GetInstallParams) WithContext(ctx context.Context) *GetInstallParams { - o.SetContext(ctx) - return o -} - -// SetContext adds the context to the get install params -func (o *GetInstallParams) SetContext(ctx context.Context) { - o.Context = ctx -} - -// WithHTTPClient adds the HTTPClient to the get install params -func (o *GetInstallParams) WithHTTPClient(client *http.Client) *GetInstallParams { - o.SetHTTPClient(client) - return o -} - -// SetHTTPClient adds the HTTPClient to the get install params -func (o *GetInstallParams) SetHTTPClient(client *http.Client) { - o.HTTPClient = client -} - -// WithInstallID adds the installID to the get install params -func (o *GetInstallParams) WithInstallID(installID string) *GetInstallParams { - o.SetInstallID(installID) - return o -} - -// SetInstallID adds the installId to the get install params -func (o *GetInstallParams) SetInstallID(installID string) { - o.InstallID = installID -} - -// WriteToRequest writes these params to a swagger request -func (o *GetInstallParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { - - if err := r.SetTimeout(o.timeout); err != nil { - return err - } - var res []error - - // path param install_id - if err := r.SetPathParam("install_id", o.InstallID); err != nil { - return err - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} diff --git a/client/operations/get_install_responses.go b/client/operations/get_install_responses.go deleted file mode 100644 index cf13c4c..0000000 --- a/client/operations/get_install_responses.go +++ /dev/null @@ -1,486 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package operations - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "encoding/json" - "fmt" - "io" - - "github.com/go-openapi/runtime" - "github.com/go-openapi/strfmt" - - "github.com/nuonco/nuon-go/models" -) - -// GetInstallReader is a Reader for the GetInstall structure. -type GetInstallReader struct { - formats strfmt.Registry -} - -// ReadResponse reads a server response into the received o. -func (o *GetInstallReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { - switch response.Code() { - case 200: - result := NewGetInstallOK() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return result, nil - case 400: - result := NewGetInstallBadRequest() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return nil, result - case 401: - result := NewGetInstallUnauthorized() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return nil, result - case 403: - result := NewGetInstallForbidden() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return nil, result - case 404: - result := NewGetInstallNotFound() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return nil, result - case 500: - result := NewGetInstallInternalServerError() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return nil, result - default: - return nil, runtime.NewAPIError("[GET /v1/installs/{install_id}] GetInstall", response, response.Code()) - } -} - -// NewGetInstallOK creates a GetInstallOK with default headers values -func NewGetInstallOK() *GetInstallOK { - return &GetInstallOK{} -} - -/* -GetInstallOK describes a response with status code 200, with default header values. - -OK -*/ -type GetInstallOK struct { - Payload *models.AppInstall -} - -// IsSuccess returns true when this get install o k response has a 2xx status code -func (o *GetInstallOK) IsSuccess() bool { - return true -} - -// IsRedirect returns true when this get install o k response has a 3xx status code -func (o *GetInstallOK) IsRedirect() bool { - return false -} - -// IsClientError returns true when this get install o k response has a 4xx status code -func (o *GetInstallOK) IsClientError() bool { - return false -} - -// IsServerError returns true when this get install o k response has a 5xx status code -func (o *GetInstallOK) IsServerError() bool { - return false -} - -// IsCode returns true when this get install o k response a status code equal to that given -func (o *GetInstallOK) IsCode(code int) bool { - return code == 200 -} - -// Code gets the status code for the get install o k response -func (o *GetInstallOK) Code() int { - return 200 -} - -func (o *GetInstallOK) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /v1/installs/{install_id}][%d] getInstallOK %s", 200, payload) -} - -func (o *GetInstallOK) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /v1/installs/{install_id}][%d] getInstallOK %s", 200, payload) -} - -func (o *GetInstallOK) GetPayload() *models.AppInstall { - return o.Payload -} - -func (o *GetInstallOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.AppInstall) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewGetInstallBadRequest creates a GetInstallBadRequest with default headers values -func NewGetInstallBadRequest() *GetInstallBadRequest { - return &GetInstallBadRequest{} -} - -/* -GetInstallBadRequest describes a response with status code 400, with default header values. - -Bad Request -*/ -type GetInstallBadRequest struct { - Payload *models.StderrErrResponse -} - -// IsSuccess returns true when this get install bad request response has a 2xx status code -func (o *GetInstallBadRequest) IsSuccess() bool { - return false -} - -// IsRedirect returns true when this get install bad request response has a 3xx status code -func (o *GetInstallBadRequest) IsRedirect() bool { - return false -} - -// IsClientError returns true when this get install bad request response has a 4xx status code -func (o *GetInstallBadRequest) IsClientError() bool { - return true -} - -// IsServerError returns true when this get install bad request response has a 5xx status code -func (o *GetInstallBadRequest) IsServerError() bool { - return false -} - -// IsCode returns true when this get install bad request response a status code equal to that given -func (o *GetInstallBadRequest) IsCode(code int) bool { - return code == 400 -} - -// Code gets the status code for the get install bad request response -func (o *GetInstallBadRequest) Code() int { - return 400 -} - -func (o *GetInstallBadRequest) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /v1/installs/{install_id}][%d] getInstallBadRequest %s", 400, payload) -} - -func (o *GetInstallBadRequest) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /v1/installs/{install_id}][%d] getInstallBadRequest %s", 400, payload) -} - -func (o *GetInstallBadRequest) GetPayload() *models.StderrErrResponse { - return o.Payload -} - -func (o *GetInstallBadRequest) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.StderrErrResponse) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewGetInstallUnauthorized creates a GetInstallUnauthorized with default headers values -func NewGetInstallUnauthorized() *GetInstallUnauthorized { - return &GetInstallUnauthorized{} -} - -/* -GetInstallUnauthorized describes a response with status code 401, with default header values. - -Unauthorized -*/ -type GetInstallUnauthorized struct { - Payload *models.StderrErrResponse -} - -// IsSuccess returns true when this get install unauthorized response has a 2xx status code -func (o *GetInstallUnauthorized) IsSuccess() bool { - return false -} - -// IsRedirect returns true when this get install unauthorized response has a 3xx status code -func (o *GetInstallUnauthorized) IsRedirect() bool { - return false -} - -// IsClientError returns true when this get install unauthorized response has a 4xx status code -func (o *GetInstallUnauthorized) IsClientError() bool { - return true -} - -// IsServerError returns true when this get install unauthorized response has a 5xx status code -func (o *GetInstallUnauthorized) IsServerError() bool { - return false -} - -// IsCode returns true when this get install unauthorized response a status code equal to that given -func (o *GetInstallUnauthorized) IsCode(code int) bool { - return code == 401 -} - -// Code gets the status code for the get install unauthorized response -func (o *GetInstallUnauthorized) Code() int { - return 401 -} - -func (o *GetInstallUnauthorized) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /v1/installs/{install_id}][%d] getInstallUnauthorized %s", 401, payload) -} - -func (o *GetInstallUnauthorized) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /v1/installs/{install_id}][%d] getInstallUnauthorized %s", 401, payload) -} - -func (o *GetInstallUnauthorized) GetPayload() *models.StderrErrResponse { - return o.Payload -} - -func (o *GetInstallUnauthorized) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.StderrErrResponse) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewGetInstallForbidden creates a GetInstallForbidden with default headers values -func NewGetInstallForbidden() *GetInstallForbidden { - return &GetInstallForbidden{} -} - -/* -GetInstallForbidden describes a response with status code 403, with default header values. - -Forbidden -*/ -type GetInstallForbidden struct { - Payload *models.StderrErrResponse -} - -// IsSuccess returns true when this get install forbidden response has a 2xx status code -func (o *GetInstallForbidden) IsSuccess() bool { - return false -} - -// IsRedirect returns true when this get install forbidden response has a 3xx status code -func (o *GetInstallForbidden) IsRedirect() bool { - return false -} - -// IsClientError returns true when this get install forbidden response has a 4xx status code -func (o *GetInstallForbidden) IsClientError() bool { - return true -} - -// IsServerError returns true when this get install forbidden response has a 5xx status code -func (o *GetInstallForbidden) IsServerError() bool { - return false -} - -// IsCode returns true when this get install forbidden response a status code equal to that given -func (o *GetInstallForbidden) IsCode(code int) bool { - return code == 403 -} - -// Code gets the status code for the get install forbidden response -func (o *GetInstallForbidden) Code() int { - return 403 -} - -func (o *GetInstallForbidden) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /v1/installs/{install_id}][%d] getInstallForbidden %s", 403, payload) -} - -func (o *GetInstallForbidden) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /v1/installs/{install_id}][%d] getInstallForbidden %s", 403, payload) -} - -func (o *GetInstallForbidden) GetPayload() *models.StderrErrResponse { - return o.Payload -} - -func (o *GetInstallForbidden) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.StderrErrResponse) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewGetInstallNotFound creates a GetInstallNotFound with default headers values -func NewGetInstallNotFound() *GetInstallNotFound { - return &GetInstallNotFound{} -} - -/* -GetInstallNotFound describes a response with status code 404, with default header values. - -Not Found -*/ -type GetInstallNotFound struct { - Payload *models.StderrErrResponse -} - -// IsSuccess returns true when this get install not found response has a 2xx status code -func (o *GetInstallNotFound) IsSuccess() bool { - return false -} - -// IsRedirect returns true when this get install not found response has a 3xx status code -func (o *GetInstallNotFound) IsRedirect() bool { - return false -} - -// IsClientError returns true when this get install not found response has a 4xx status code -func (o *GetInstallNotFound) IsClientError() bool { - return true -} - -// IsServerError returns true when this get install not found response has a 5xx status code -func (o *GetInstallNotFound) IsServerError() bool { - return false -} - -// IsCode returns true when this get install not found response a status code equal to that given -func (o *GetInstallNotFound) IsCode(code int) bool { - return code == 404 -} - -// Code gets the status code for the get install not found response -func (o *GetInstallNotFound) Code() int { - return 404 -} - -func (o *GetInstallNotFound) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /v1/installs/{install_id}][%d] getInstallNotFound %s", 404, payload) -} - -func (o *GetInstallNotFound) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /v1/installs/{install_id}][%d] getInstallNotFound %s", 404, payload) -} - -func (o *GetInstallNotFound) GetPayload() *models.StderrErrResponse { - return o.Payload -} - -func (o *GetInstallNotFound) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.StderrErrResponse) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewGetInstallInternalServerError creates a GetInstallInternalServerError with default headers values -func NewGetInstallInternalServerError() *GetInstallInternalServerError { - return &GetInstallInternalServerError{} -} - -/* -GetInstallInternalServerError describes a response with status code 500, with default header values. - -Internal Server Error -*/ -type GetInstallInternalServerError struct { - Payload *models.StderrErrResponse -} - -// IsSuccess returns true when this get install internal server error response has a 2xx status code -func (o *GetInstallInternalServerError) IsSuccess() bool { - return false -} - -// IsRedirect returns true when this get install internal server error response has a 3xx status code -func (o *GetInstallInternalServerError) IsRedirect() bool { - return false -} - -// IsClientError returns true when this get install internal server error response has a 4xx status code -func (o *GetInstallInternalServerError) IsClientError() bool { - return false -} - -// IsServerError returns true when this get install internal server error response has a 5xx status code -func (o *GetInstallInternalServerError) IsServerError() bool { - return true -} - -// IsCode returns true when this get install internal server error response a status code equal to that given -func (o *GetInstallInternalServerError) IsCode(code int) bool { - return code == 500 -} - -// Code gets the status code for the get install internal server error response -func (o *GetInstallInternalServerError) Code() int { - return 500 -} - -func (o *GetInstallInternalServerError) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /v1/installs/{install_id}][%d] getInstallInternalServerError %s", 500, payload) -} - -func (o *GetInstallInternalServerError) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /v1/installs/{install_id}][%d] getInstallInternalServerError %s", 500, payload) -} - -func (o *GetInstallInternalServerError) GetPayload() *models.StderrErrResponse { - return o.Payload -} - -func (o *GetInstallInternalServerError) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.StderrErrResponse) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} diff --git a/client/operations/get_install_sandbox_run_logs_parameters.go b/client/operations/get_install_sandbox_run_logs_parameters.go deleted file mode 100644 index 5374695..0000000 --- a/client/operations/get_install_sandbox_run_logs_parameters.go +++ /dev/null @@ -1,173 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package operations - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "context" - "net/http" - "time" - - "github.com/go-openapi/errors" - "github.com/go-openapi/runtime" - cr "github.com/go-openapi/runtime/client" - "github.com/go-openapi/strfmt" -) - -// NewGetInstallSandboxRunLogsParams creates a new GetInstallSandboxRunLogsParams object, -// with the default timeout for this client. -// -// Default values are not hydrated, since defaults are normally applied by the API server side. -// -// To enforce default values in parameter, use SetDefaults or WithDefaults. -func NewGetInstallSandboxRunLogsParams() *GetInstallSandboxRunLogsParams { - return &GetInstallSandboxRunLogsParams{ - timeout: cr.DefaultTimeout, - } -} - -// NewGetInstallSandboxRunLogsParamsWithTimeout creates a new GetInstallSandboxRunLogsParams object -// with the ability to set a timeout on a request. -func NewGetInstallSandboxRunLogsParamsWithTimeout(timeout time.Duration) *GetInstallSandboxRunLogsParams { - return &GetInstallSandboxRunLogsParams{ - timeout: timeout, - } -} - -// NewGetInstallSandboxRunLogsParamsWithContext creates a new GetInstallSandboxRunLogsParams object -// with the ability to set a context for a request. -func NewGetInstallSandboxRunLogsParamsWithContext(ctx context.Context) *GetInstallSandboxRunLogsParams { - return &GetInstallSandboxRunLogsParams{ - Context: ctx, - } -} - -// NewGetInstallSandboxRunLogsParamsWithHTTPClient creates a new GetInstallSandboxRunLogsParams object -// with the ability to set a custom HTTPClient for a request. -func NewGetInstallSandboxRunLogsParamsWithHTTPClient(client *http.Client) *GetInstallSandboxRunLogsParams { - return &GetInstallSandboxRunLogsParams{ - HTTPClient: client, - } -} - -/* -GetInstallSandboxRunLogsParams contains all the parameters to send to the API endpoint - - for the get install sandbox run logs operation. - - Typically these are written to a http.Request. -*/ -type GetInstallSandboxRunLogsParams struct { - - /* InstallID. - - install ID - */ - InstallID string - - /* RunID. - - run ID - */ - RunID string - - timeout time.Duration - Context context.Context - HTTPClient *http.Client -} - -// WithDefaults hydrates default values in the get install sandbox run logs params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *GetInstallSandboxRunLogsParams) WithDefaults() *GetInstallSandboxRunLogsParams { - o.SetDefaults() - return o -} - -// SetDefaults hydrates default values in the get install sandbox run logs params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *GetInstallSandboxRunLogsParams) SetDefaults() { - // no default values defined for this parameter -} - -// WithTimeout adds the timeout to the get install sandbox run logs params -func (o *GetInstallSandboxRunLogsParams) WithTimeout(timeout time.Duration) *GetInstallSandboxRunLogsParams { - o.SetTimeout(timeout) - return o -} - -// SetTimeout adds the timeout to the get install sandbox run logs params -func (o *GetInstallSandboxRunLogsParams) SetTimeout(timeout time.Duration) { - o.timeout = timeout -} - -// WithContext adds the context to the get install sandbox run logs params -func (o *GetInstallSandboxRunLogsParams) WithContext(ctx context.Context) *GetInstallSandboxRunLogsParams { - o.SetContext(ctx) - return o -} - -// SetContext adds the context to the get install sandbox run logs params -func (o *GetInstallSandboxRunLogsParams) SetContext(ctx context.Context) { - o.Context = ctx -} - -// WithHTTPClient adds the HTTPClient to the get install sandbox run logs params -func (o *GetInstallSandboxRunLogsParams) WithHTTPClient(client *http.Client) *GetInstallSandboxRunLogsParams { - o.SetHTTPClient(client) - return o -} - -// SetHTTPClient adds the HTTPClient to the get install sandbox run logs params -func (o *GetInstallSandboxRunLogsParams) SetHTTPClient(client *http.Client) { - o.HTTPClient = client -} - -// WithInstallID adds the installID to the get install sandbox run logs params -func (o *GetInstallSandboxRunLogsParams) WithInstallID(installID string) *GetInstallSandboxRunLogsParams { - o.SetInstallID(installID) - return o -} - -// SetInstallID adds the installId to the get install sandbox run logs params -func (o *GetInstallSandboxRunLogsParams) SetInstallID(installID string) { - o.InstallID = installID -} - -// WithRunID adds the runID to the get install sandbox run logs params -func (o *GetInstallSandboxRunLogsParams) WithRunID(runID string) *GetInstallSandboxRunLogsParams { - o.SetRunID(runID) - return o -} - -// SetRunID adds the runId to the get install sandbox run logs params -func (o *GetInstallSandboxRunLogsParams) SetRunID(runID string) { - o.RunID = runID -} - -// WriteToRequest writes these params to a swagger request -func (o *GetInstallSandboxRunLogsParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { - - if err := r.SetTimeout(o.timeout); err != nil { - return err - } - var res []error - - // path param install_id - if err := r.SetPathParam("install_id", o.InstallID); err != nil { - return err - } - - // path param run_id - if err := r.SetPathParam("run_id", o.RunID); err != nil { - return err - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} diff --git a/client/operations/get_install_sandbox_run_logs_responses.go b/client/operations/get_install_sandbox_run_logs_responses.go deleted file mode 100644 index 3c08034..0000000 --- a/client/operations/get_install_sandbox_run_logs_responses.go +++ /dev/null @@ -1,484 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package operations - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "encoding/json" - "fmt" - "io" - - "github.com/go-openapi/runtime" - "github.com/go-openapi/strfmt" - - "github.com/nuonco/nuon-go/models" -) - -// GetInstallSandboxRunLogsReader is a Reader for the GetInstallSandboxRunLogs structure. -type GetInstallSandboxRunLogsReader struct { - formats strfmt.Registry -} - -// ReadResponse reads a server response into the received o. -func (o *GetInstallSandboxRunLogsReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { - switch response.Code() { - case 200: - result := NewGetInstallSandboxRunLogsOK() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return result, nil - case 400: - result := NewGetInstallSandboxRunLogsBadRequest() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return nil, result - case 401: - result := NewGetInstallSandboxRunLogsUnauthorized() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return nil, result - case 403: - result := NewGetInstallSandboxRunLogsForbidden() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return nil, result - case 404: - result := NewGetInstallSandboxRunLogsNotFound() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return nil, result - case 500: - result := NewGetInstallSandboxRunLogsInternalServerError() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return nil, result - default: - return nil, runtime.NewAPIError("[GET /v1/installs/{install_id}/sandbox-run/{run_id}/logs] GetInstallSandboxRunLogs", response, response.Code()) - } -} - -// NewGetInstallSandboxRunLogsOK creates a GetInstallSandboxRunLogsOK with default headers values -func NewGetInstallSandboxRunLogsOK() *GetInstallSandboxRunLogsOK { - return &GetInstallSandboxRunLogsOK{} -} - -/* -GetInstallSandboxRunLogsOK describes a response with status code 200, with default header values. - -OK -*/ -type GetInstallSandboxRunLogsOK struct { - Payload []interface{} -} - -// IsSuccess returns true when this get install sandbox run logs o k response has a 2xx status code -func (o *GetInstallSandboxRunLogsOK) IsSuccess() bool { - return true -} - -// IsRedirect returns true when this get install sandbox run logs o k response has a 3xx status code -func (o *GetInstallSandboxRunLogsOK) IsRedirect() bool { - return false -} - -// IsClientError returns true when this get install sandbox run logs o k response has a 4xx status code -func (o *GetInstallSandboxRunLogsOK) IsClientError() bool { - return false -} - -// IsServerError returns true when this get install sandbox run logs o k response has a 5xx status code -func (o *GetInstallSandboxRunLogsOK) IsServerError() bool { - return false -} - -// IsCode returns true when this get install sandbox run logs o k response a status code equal to that given -func (o *GetInstallSandboxRunLogsOK) IsCode(code int) bool { - return code == 200 -} - -// Code gets the status code for the get install sandbox run logs o k response -func (o *GetInstallSandboxRunLogsOK) Code() int { - return 200 -} - -func (o *GetInstallSandboxRunLogsOK) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /v1/installs/{install_id}/sandbox-run/{run_id}/logs][%d] getInstallSandboxRunLogsOK %s", 200, payload) -} - -func (o *GetInstallSandboxRunLogsOK) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /v1/installs/{install_id}/sandbox-run/{run_id}/logs][%d] getInstallSandboxRunLogsOK %s", 200, payload) -} - -func (o *GetInstallSandboxRunLogsOK) GetPayload() []interface{} { - return o.Payload -} - -func (o *GetInstallSandboxRunLogsOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - // response payload - if err := consumer.Consume(response.Body(), &o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewGetInstallSandboxRunLogsBadRequest creates a GetInstallSandboxRunLogsBadRequest with default headers values -func NewGetInstallSandboxRunLogsBadRequest() *GetInstallSandboxRunLogsBadRequest { - return &GetInstallSandboxRunLogsBadRequest{} -} - -/* -GetInstallSandboxRunLogsBadRequest describes a response with status code 400, with default header values. - -Bad Request -*/ -type GetInstallSandboxRunLogsBadRequest struct { - Payload *models.StderrErrResponse -} - -// IsSuccess returns true when this get install sandbox run logs bad request response has a 2xx status code -func (o *GetInstallSandboxRunLogsBadRequest) IsSuccess() bool { - return false -} - -// IsRedirect returns true when this get install sandbox run logs bad request response has a 3xx status code -func (o *GetInstallSandboxRunLogsBadRequest) IsRedirect() bool { - return false -} - -// IsClientError returns true when this get install sandbox run logs bad request response has a 4xx status code -func (o *GetInstallSandboxRunLogsBadRequest) IsClientError() bool { - return true -} - -// IsServerError returns true when this get install sandbox run logs bad request response has a 5xx status code -func (o *GetInstallSandboxRunLogsBadRequest) IsServerError() bool { - return false -} - -// IsCode returns true when this get install sandbox run logs bad request response a status code equal to that given -func (o *GetInstallSandboxRunLogsBadRequest) IsCode(code int) bool { - return code == 400 -} - -// Code gets the status code for the get install sandbox run logs bad request response -func (o *GetInstallSandboxRunLogsBadRequest) Code() int { - return 400 -} - -func (o *GetInstallSandboxRunLogsBadRequest) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /v1/installs/{install_id}/sandbox-run/{run_id}/logs][%d] getInstallSandboxRunLogsBadRequest %s", 400, payload) -} - -func (o *GetInstallSandboxRunLogsBadRequest) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /v1/installs/{install_id}/sandbox-run/{run_id}/logs][%d] getInstallSandboxRunLogsBadRequest %s", 400, payload) -} - -func (o *GetInstallSandboxRunLogsBadRequest) GetPayload() *models.StderrErrResponse { - return o.Payload -} - -func (o *GetInstallSandboxRunLogsBadRequest) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.StderrErrResponse) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewGetInstallSandboxRunLogsUnauthorized creates a GetInstallSandboxRunLogsUnauthorized with default headers values -func NewGetInstallSandboxRunLogsUnauthorized() *GetInstallSandboxRunLogsUnauthorized { - return &GetInstallSandboxRunLogsUnauthorized{} -} - -/* -GetInstallSandboxRunLogsUnauthorized describes a response with status code 401, with default header values. - -Unauthorized -*/ -type GetInstallSandboxRunLogsUnauthorized struct { - Payload *models.StderrErrResponse -} - -// IsSuccess returns true when this get install sandbox run logs unauthorized response has a 2xx status code -func (o *GetInstallSandboxRunLogsUnauthorized) IsSuccess() bool { - return false -} - -// IsRedirect returns true when this get install sandbox run logs unauthorized response has a 3xx status code -func (o *GetInstallSandboxRunLogsUnauthorized) IsRedirect() bool { - return false -} - -// IsClientError returns true when this get install sandbox run logs unauthorized response has a 4xx status code -func (o *GetInstallSandboxRunLogsUnauthorized) IsClientError() bool { - return true -} - -// IsServerError returns true when this get install sandbox run logs unauthorized response has a 5xx status code -func (o *GetInstallSandboxRunLogsUnauthorized) IsServerError() bool { - return false -} - -// IsCode returns true when this get install sandbox run logs unauthorized response a status code equal to that given -func (o *GetInstallSandboxRunLogsUnauthorized) IsCode(code int) bool { - return code == 401 -} - -// Code gets the status code for the get install sandbox run logs unauthorized response -func (o *GetInstallSandboxRunLogsUnauthorized) Code() int { - return 401 -} - -func (o *GetInstallSandboxRunLogsUnauthorized) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /v1/installs/{install_id}/sandbox-run/{run_id}/logs][%d] getInstallSandboxRunLogsUnauthorized %s", 401, payload) -} - -func (o *GetInstallSandboxRunLogsUnauthorized) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /v1/installs/{install_id}/sandbox-run/{run_id}/logs][%d] getInstallSandboxRunLogsUnauthorized %s", 401, payload) -} - -func (o *GetInstallSandboxRunLogsUnauthorized) GetPayload() *models.StderrErrResponse { - return o.Payload -} - -func (o *GetInstallSandboxRunLogsUnauthorized) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.StderrErrResponse) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewGetInstallSandboxRunLogsForbidden creates a GetInstallSandboxRunLogsForbidden with default headers values -func NewGetInstallSandboxRunLogsForbidden() *GetInstallSandboxRunLogsForbidden { - return &GetInstallSandboxRunLogsForbidden{} -} - -/* -GetInstallSandboxRunLogsForbidden describes a response with status code 403, with default header values. - -Forbidden -*/ -type GetInstallSandboxRunLogsForbidden struct { - Payload *models.StderrErrResponse -} - -// IsSuccess returns true when this get install sandbox run logs forbidden response has a 2xx status code -func (o *GetInstallSandboxRunLogsForbidden) IsSuccess() bool { - return false -} - -// IsRedirect returns true when this get install sandbox run logs forbidden response has a 3xx status code -func (o *GetInstallSandboxRunLogsForbidden) IsRedirect() bool { - return false -} - -// IsClientError returns true when this get install sandbox run logs forbidden response has a 4xx status code -func (o *GetInstallSandboxRunLogsForbidden) IsClientError() bool { - return true -} - -// IsServerError returns true when this get install sandbox run logs forbidden response has a 5xx status code -func (o *GetInstallSandboxRunLogsForbidden) IsServerError() bool { - return false -} - -// IsCode returns true when this get install sandbox run logs forbidden response a status code equal to that given -func (o *GetInstallSandboxRunLogsForbidden) IsCode(code int) bool { - return code == 403 -} - -// Code gets the status code for the get install sandbox run logs forbidden response -func (o *GetInstallSandboxRunLogsForbidden) Code() int { - return 403 -} - -func (o *GetInstallSandboxRunLogsForbidden) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /v1/installs/{install_id}/sandbox-run/{run_id}/logs][%d] getInstallSandboxRunLogsForbidden %s", 403, payload) -} - -func (o *GetInstallSandboxRunLogsForbidden) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /v1/installs/{install_id}/sandbox-run/{run_id}/logs][%d] getInstallSandboxRunLogsForbidden %s", 403, payload) -} - -func (o *GetInstallSandboxRunLogsForbidden) GetPayload() *models.StderrErrResponse { - return o.Payload -} - -func (o *GetInstallSandboxRunLogsForbidden) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.StderrErrResponse) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewGetInstallSandboxRunLogsNotFound creates a GetInstallSandboxRunLogsNotFound with default headers values -func NewGetInstallSandboxRunLogsNotFound() *GetInstallSandboxRunLogsNotFound { - return &GetInstallSandboxRunLogsNotFound{} -} - -/* -GetInstallSandboxRunLogsNotFound describes a response with status code 404, with default header values. - -Not Found -*/ -type GetInstallSandboxRunLogsNotFound struct { - Payload *models.StderrErrResponse -} - -// IsSuccess returns true when this get install sandbox run logs not found response has a 2xx status code -func (o *GetInstallSandboxRunLogsNotFound) IsSuccess() bool { - return false -} - -// IsRedirect returns true when this get install sandbox run logs not found response has a 3xx status code -func (o *GetInstallSandboxRunLogsNotFound) IsRedirect() bool { - return false -} - -// IsClientError returns true when this get install sandbox run logs not found response has a 4xx status code -func (o *GetInstallSandboxRunLogsNotFound) IsClientError() bool { - return true -} - -// IsServerError returns true when this get install sandbox run logs not found response has a 5xx status code -func (o *GetInstallSandboxRunLogsNotFound) IsServerError() bool { - return false -} - -// IsCode returns true when this get install sandbox run logs not found response a status code equal to that given -func (o *GetInstallSandboxRunLogsNotFound) IsCode(code int) bool { - return code == 404 -} - -// Code gets the status code for the get install sandbox run logs not found response -func (o *GetInstallSandboxRunLogsNotFound) Code() int { - return 404 -} - -func (o *GetInstallSandboxRunLogsNotFound) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /v1/installs/{install_id}/sandbox-run/{run_id}/logs][%d] getInstallSandboxRunLogsNotFound %s", 404, payload) -} - -func (o *GetInstallSandboxRunLogsNotFound) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /v1/installs/{install_id}/sandbox-run/{run_id}/logs][%d] getInstallSandboxRunLogsNotFound %s", 404, payload) -} - -func (o *GetInstallSandboxRunLogsNotFound) GetPayload() *models.StderrErrResponse { - return o.Payload -} - -func (o *GetInstallSandboxRunLogsNotFound) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.StderrErrResponse) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewGetInstallSandboxRunLogsInternalServerError creates a GetInstallSandboxRunLogsInternalServerError with default headers values -func NewGetInstallSandboxRunLogsInternalServerError() *GetInstallSandboxRunLogsInternalServerError { - return &GetInstallSandboxRunLogsInternalServerError{} -} - -/* -GetInstallSandboxRunLogsInternalServerError describes a response with status code 500, with default header values. - -Internal Server Error -*/ -type GetInstallSandboxRunLogsInternalServerError struct { - Payload *models.StderrErrResponse -} - -// IsSuccess returns true when this get install sandbox run logs internal server error response has a 2xx status code -func (o *GetInstallSandboxRunLogsInternalServerError) IsSuccess() bool { - return false -} - -// IsRedirect returns true when this get install sandbox run logs internal server error response has a 3xx status code -func (o *GetInstallSandboxRunLogsInternalServerError) IsRedirect() bool { - return false -} - -// IsClientError returns true when this get install sandbox run logs internal server error response has a 4xx status code -func (o *GetInstallSandboxRunLogsInternalServerError) IsClientError() bool { - return false -} - -// IsServerError returns true when this get install sandbox run logs internal server error response has a 5xx status code -func (o *GetInstallSandboxRunLogsInternalServerError) IsServerError() bool { - return true -} - -// IsCode returns true when this get install sandbox run logs internal server error response a status code equal to that given -func (o *GetInstallSandboxRunLogsInternalServerError) IsCode(code int) bool { - return code == 500 -} - -// Code gets the status code for the get install sandbox run logs internal server error response -func (o *GetInstallSandboxRunLogsInternalServerError) Code() int { - return 500 -} - -func (o *GetInstallSandboxRunLogsInternalServerError) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /v1/installs/{install_id}/sandbox-run/{run_id}/logs][%d] getInstallSandboxRunLogsInternalServerError %s", 500, payload) -} - -func (o *GetInstallSandboxRunLogsInternalServerError) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /v1/installs/{install_id}/sandbox-run/{run_id}/logs][%d] getInstallSandboxRunLogsInternalServerError %s", 500, payload) -} - -func (o *GetInstallSandboxRunLogsInternalServerError) GetPayload() *models.StderrErrResponse { - return o.Payload -} - -func (o *GetInstallSandboxRunLogsInternalServerError) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.StderrErrResponse) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} diff --git a/client/operations/get_install_sandbox_runs_parameters.go b/client/operations/get_install_sandbox_runs_parameters.go deleted file mode 100644 index c29e767..0000000 --- a/client/operations/get_install_sandbox_runs_parameters.go +++ /dev/null @@ -1,151 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package operations - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "context" - "net/http" - "time" - - "github.com/go-openapi/errors" - "github.com/go-openapi/runtime" - cr "github.com/go-openapi/runtime/client" - "github.com/go-openapi/strfmt" -) - -// NewGetInstallSandboxRunsParams creates a new GetInstallSandboxRunsParams object, -// with the default timeout for this client. -// -// Default values are not hydrated, since defaults are normally applied by the API server side. -// -// To enforce default values in parameter, use SetDefaults or WithDefaults. -func NewGetInstallSandboxRunsParams() *GetInstallSandboxRunsParams { - return &GetInstallSandboxRunsParams{ - timeout: cr.DefaultTimeout, - } -} - -// NewGetInstallSandboxRunsParamsWithTimeout creates a new GetInstallSandboxRunsParams object -// with the ability to set a timeout on a request. -func NewGetInstallSandboxRunsParamsWithTimeout(timeout time.Duration) *GetInstallSandboxRunsParams { - return &GetInstallSandboxRunsParams{ - timeout: timeout, - } -} - -// NewGetInstallSandboxRunsParamsWithContext creates a new GetInstallSandboxRunsParams object -// with the ability to set a context for a request. -func NewGetInstallSandboxRunsParamsWithContext(ctx context.Context) *GetInstallSandboxRunsParams { - return &GetInstallSandboxRunsParams{ - Context: ctx, - } -} - -// NewGetInstallSandboxRunsParamsWithHTTPClient creates a new GetInstallSandboxRunsParams object -// with the ability to set a custom HTTPClient for a request. -func NewGetInstallSandboxRunsParamsWithHTTPClient(client *http.Client) *GetInstallSandboxRunsParams { - return &GetInstallSandboxRunsParams{ - HTTPClient: client, - } -} - -/* -GetInstallSandboxRunsParams contains all the parameters to send to the API endpoint - - for the get install sandbox runs operation. - - Typically these are written to a http.Request. -*/ -type GetInstallSandboxRunsParams struct { - - /* InstallID. - - install ID - */ - InstallID string - - timeout time.Duration - Context context.Context - HTTPClient *http.Client -} - -// WithDefaults hydrates default values in the get install sandbox runs params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *GetInstallSandboxRunsParams) WithDefaults() *GetInstallSandboxRunsParams { - o.SetDefaults() - return o -} - -// SetDefaults hydrates default values in the get install sandbox runs params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *GetInstallSandboxRunsParams) SetDefaults() { - // no default values defined for this parameter -} - -// WithTimeout adds the timeout to the get install sandbox runs params -func (o *GetInstallSandboxRunsParams) WithTimeout(timeout time.Duration) *GetInstallSandboxRunsParams { - o.SetTimeout(timeout) - return o -} - -// SetTimeout adds the timeout to the get install sandbox runs params -func (o *GetInstallSandboxRunsParams) SetTimeout(timeout time.Duration) { - o.timeout = timeout -} - -// WithContext adds the context to the get install sandbox runs params -func (o *GetInstallSandboxRunsParams) WithContext(ctx context.Context) *GetInstallSandboxRunsParams { - o.SetContext(ctx) - return o -} - -// SetContext adds the context to the get install sandbox runs params -func (o *GetInstallSandboxRunsParams) SetContext(ctx context.Context) { - o.Context = ctx -} - -// WithHTTPClient adds the HTTPClient to the get install sandbox runs params -func (o *GetInstallSandboxRunsParams) WithHTTPClient(client *http.Client) *GetInstallSandboxRunsParams { - o.SetHTTPClient(client) - return o -} - -// SetHTTPClient adds the HTTPClient to the get install sandbox runs params -func (o *GetInstallSandboxRunsParams) SetHTTPClient(client *http.Client) { - o.HTTPClient = client -} - -// WithInstallID adds the installID to the get install sandbox runs params -func (o *GetInstallSandboxRunsParams) WithInstallID(installID string) *GetInstallSandboxRunsParams { - o.SetInstallID(installID) - return o -} - -// SetInstallID adds the installId to the get install sandbox runs params -func (o *GetInstallSandboxRunsParams) SetInstallID(installID string) { - o.InstallID = installID -} - -// WriteToRequest writes these params to a swagger request -func (o *GetInstallSandboxRunsParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { - - if err := r.SetTimeout(o.timeout); err != nil { - return err - } - var res []error - - // path param install_id - if err := r.SetPathParam("install_id", o.InstallID); err != nil { - return err - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} diff --git a/client/operations/get_install_sandbox_runs_responses.go b/client/operations/get_install_sandbox_runs_responses.go deleted file mode 100644 index 4e75de5..0000000 --- a/client/operations/get_install_sandbox_runs_responses.go +++ /dev/null @@ -1,484 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package operations - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "encoding/json" - "fmt" - "io" - - "github.com/go-openapi/runtime" - "github.com/go-openapi/strfmt" - - "github.com/nuonco/nuon-go/models" -) - -// GetInstallSandboxRunsReader is a Reader for the GetInstallSandboxRuns structure. -type GetInstallSandboxRunsReader struct { - formats strfmt.Registry -} - -// ReadResponse reads a server response into the received o. -func (o *GetInstallSandboxRunsReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { - switch response.Code() { - case 200: - result := NewGetInstallSandboxRunsOK() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return result, nil - case 400: - result := NewGetInstallSandboxRunsBadRequest() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return nil, result - case 401: - result := NewGetInstallSandboxRunsUnauthorized() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return nil, result - case 403: - result := NewGetInstallSandboxRunsForbidden() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return nil, result - case 404: - result := NewGetInstallSandboxRunsNotFound() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return nil, result - case 500: - result := NewGetInstallSandboxRunsInternalServerError() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return nil, result - default: - return nil, runtime.NewAPIError("[GET /v1/installs/{install_id}/sandbox-runs] GetInstallSandboxRuns", response, response.Code()) - } -} - -// NewGetInstallSandboxRunsOK creates a GetInstallSandboxRunsOK with default headers values -func NewGetInstallSandboxRunsOK() *GetInstallSandboxRunsOK { - return &GetInstallSandboxRunsOK{} -} - -/* -GetInstallSandboxRunsOK describes a response with status code 200, with default header values. - -OK -*/ -type GetInstallSandboxRunsOK struct { - Payload []*models.AppInstallSandboxRun -} - -// IsSuccess returns true when this get install sandbox runs o k response has a 2xx status code -func (o *GetInstallSandboxRunsOK) IsSuccess() bool { - return true -} - -// IsRedirect returns true when this get install sandbox runs o k response has a 3xx status code -func (o *GetInstallSandboxRunsOK) IsRedirect() bool { - return false -} - -// IsClientError returns true when this get install sandbox runs o k response has a 4xx status code -func (o *GetInstallSandboxRunsOK) IsClientError() bool { - return false -} - -// IsServerError returns true when this get install sandbox runs o k response has a 5xx status code -func (o *GetInstallSandboxRunsOK) IsServerError() bool { - return false -} - -// IsCode returns true when this get install sandbox runs o k response a status code equal to that given -func (o *GetInstallSandboxRunsOK) IsCode(code int) bool { - return code == 200 -} - -// Code gets the status code for the get install sandbox runs o k response -func (o *GetInstallSandboxRunsOK) Code() int { - return 200 -} - -func (o *GetInstallSandboxRunsOK) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /v1/installs/{install_id}/sandbox-runs][%d] getInstallSandboxRunsOK %s", 200, payload) -} - -func (o *GetInstallSandboxRunsOK) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /v1/installs/{install_id}/sandbox-runs][%d] getInstallSandboxRunsOK %s", 200, payload) -} - -func (o *GetInstallSandboxRunsOK) GetPayload() []*models.AppInstallSandboxRun { - return o.Payload -} - -func (o *GetInstallSandboxRunsOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - // response payload - if err := consumer.Consume(response.Body(), &o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewGetInstallSandboxRunsBadRequest creates a GetInstallSandboxRunsBadRequest with default headers values -func NewGetInstallSandboxRunsBadRequest() *GetInstallSandboxRunsBadRequest { - return &GetInstallSandboxRunsBadRequest{} -} - -/* -GetInstallSandboxRunsBadRequest describes a response with status code 400, with default header values. - -Bad Request -*/ -type GetInstallSandboxRunsBadRequest struct { - Payload *models.StderrErrResponse -} - -// IsSuccess returns true when this get install sandbox runs bad request response has a 2xx status code -func (o *GetInstallSandboxRunsBadRequest) IsSuccess() bool { - return false -} - -// IsRedirect returns true when this get install sandbox runs bad request response has a 3xx status code -func (o *GetInstallSandboxRunsBadRequest) IsRedirect() bool { - return false -} - -// IsClientError returns true when this get install sandbox runs bad request response has a 4xx status code -func (o *GetInstallSandboxRunsBadRequest) IsClientError() bool { - return true -} - -// IsServerError returns true when this get install sandbox runs bad request response has a 5xx status code -func (o *GetInstallSandboxRunsBadRequest) IsServerError() bool { - return false -} - -// IsCode returns true when this get install sandbox runs bad request response a status code equal to that given -func (o *GetInstallSandboxRunsBadRequest) IsCode(code int) bool { - return code == 400 -} - -// Code gets the status code for the get install sandbox runs bad request response -func (o *GetInstallSandboxRunsBadRequest) Code() int { - return 400 -} - -func (o *GetInstallSandboxRunsBadRequest) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /v1/installs/{install_id}/sandbox-runs][%d] getInstallSandboxRunsBadRequest %s", 400, payload) -} - -func (o *GetInstallSandboxRunsBadRequest) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /v1/installs/{install_id}/sandbox-runs][%d] getInstallSandboxRunsBadRequest %s", 400, payload) -} - -func (o *GetInstallSandboxRunsBadRequest) GetPayload() *models.StderrErrResponse { - return o.Payload -} - -func (o *GetInstallSandboxRunsBadRequest) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.StderrErrResponse) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewGetInstallSandboxRunsUnauthorized creates a GetInstallSandboxRunsUnauthorized with default headers values -func NewGetInstallSandboxRunsUnauthorized() *GetInstallSandboxRunsUnauthorized { - return &GetInstallSandboxRunsUnauthorized{} -} - -/* -GetInstallSandboxRunsUnauthorized describes a response with status code 401, with default header values. - -Unauthorized -*/ -type GetInstallSandboxRunsUnauthorized struct { - Payload *models.StderrErrResponse -} - -// IsSuccess returns true when this get install sandbox runs unauthorized response has a 2xx status code -func (o *GetInstallSandboxRunsUnauthorized) IsSuccess() bool { - return false -} - -// IsRedirect returns true when this get install sandbox runs unauthorized response has a 3xx status code -func (o *GetInstallSandboxRunsUnauthorized) IsRedirect() bool { - return false -} - -// IsClientError returns true when this get install sandbox runs unauthorized response has a 4xx status code -func (o *GetInstallSandboxRunsUnauthorized) IsClientError() bool { - return true -} - -// IsServerError returns true when this get install sandbox runs unauthorized response has a 5xx status code -func (o *GetInstallSandboxRunsUnauthorized) IsServerError() bool { - return false -} - -// IsCode returns true when this get install sandbox runs unauthorized response a status code equal to that given -func (o *GetInstallSandboxRunsUnauthorized) IsCode(code int) bool { - return code == 401 -} - -// Code gets the status code for the get install sandbox runs unauthorized response -func (o *GetInstallSandboxRunsUnauthorized) Code() int { - return 401 -} - -func (o *GetInstallSandboxRunsUnauthorized) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /v1/installs/{install_id}/sandbox-runs][%d] getInstallSandboxRunsUnauthorized %s", 401, payload) -} - -func (o *GetInstallSandboxRunsUnauthorized) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /v1/installs/{install_id}/sandbox-runs][%d] getInstallSandboxRunsUnauthorized %s", 401, payload) -} - -func (o *GetInstallSandboxRunsUnauthorized) GetPayload() *models.StderrErrResponse { - return o.Payload -} - -func (o *GetInstallSandboxRunsUnauthorized) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.StderrErrResponse) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewGetInstallSandboxRunsForbidden creates a GetInstallSandboxRunsForbidden with default headers values -func NewGetInstallSandboxRunsForbidden() *GetInstallSandboxRunsForbidden { - return &GetInstallSandboxRunsForbidden{} -} - -/* -GetInstallSandboxRunsForbidden describes a response with status code 403, with default header values. - -Forbidden -*/ -type GetInstallSandboxRunsForbidden struct { - Payload *models.StderrErrResponse -} - -// IsSuccess returns true when this get install sandbox runs forbidden response has a 2xx status code -func (o *GetInstallSandboxRunsForbidden) IsSuccess() bool { - return false -} - -// IsRedirect returns true when this get install sandbox runs forbidden response has a 3xx status code -func (o *GetInstallSandboxRunsForbidden) IsRedirect() bool { - return false -} - -// IsClientError returns true when this get install sandbox runs forbidden response has a 4xx status code -func (o *GetInstallSandboxRunsForbidden) IsClientError() bool { - return true -} - -// IsServerError returns true when this get install sandbox runs forbidden response has a 5xx status code -func (o *GetInstallSandboxRunsForbidden) IsServerError() bool { - return false -} - -// IsCode returns true when this get install sandbox runs forbidden response a status code equal to that given -func (o *GetInstallSandboxRunsForbidden) IsCode(code int) bool { - return code == 403 -} - -// Code gets the status code for the get install sandbox runs forbidden response -func (o *GetInstallSandboxRunsForbidden) Code() int { - return 403 -} - -func (o *GetInstallSandboxRunsForbidden) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /v1/installs/{install_id}/sandbox-runs][%d] getInstallSandboxRunsForbidden %s", 403, payload) -} - -func (o *GetInstallSandboxRunsForbidden) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /v1/installs/{install_id}/sandbox-runs][%d] getInstallSandboxRunsForbidden %s", 403, payload) -} - -func (o *GetInstallSandboxRunsForbidden) GetPayload() *models.StderrErrResponse { - return o.Payload -} - -func (o *GetInstallSandboxRunsForbidden) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.StderrErrResponse) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewGetInstallSandboxRunsNotFound creates a GetInstallSandboxRunsNotFound with default headers values -func NewGetInstallSandboxRunsNotFound() *GetInstallSandboxRunsNotFound { - return &GetInstallSandboxRunsNotFound{} -} - -/* -GetInstallSandboxRunsNotFound describes a response with status code 404, with default header values. - -Not Found -*/ -type GetInstallSandboxRunsNotFound struct { - Payload *models.StderrErrResponse -} - -// IsSuccess returns true when this get install sandbox runs not found response has a 2xx status code -func (o *GetInstallSandboxRunsNotFound) IsSuccess() bool { - return false -} - -// IsRedirect returns true when this get install sandbox runs not found response has a 3xx status code -func (o *GetInstallSandboxRunsNotFound) IsRedirect() bool { - return false -} - -// IsClientError returns true when this get install sandbox runs not found response has a 4xx status code -func (o *GetInstallSandboxRunsNotFound) IsClientError() bool { - return true -} - -// IsServerError returns true when this get install sandbox runs not found response has a 5xx status code -func (o *GetInstallSandboxRunsNotFound) IsServerError() bool { - return false -} - -// IsCode returns true when this get install sandbox runs not found response a status code equal to that given -func (o *GetInstallSandboxRunsNotFound) IsCode(code int) bool { - return code == 404 -} - -// Code gets the status code for the get install sandbox runs not found response -func (o *GetInstallSandboxRunsNotFound) Code() int { - return 404 -} - -func (o *GetInstallSandboxRunsNotFound) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /v1/installs/{install_id}/sandbox-runs][%d] getInstallSandboxRunsNotFound %s", 404, payload) -} - -func (o *GetInstallSandboxRunsNotFound) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /v1/installs/{install_id}/sandbox-runs][%d] getInstallSandboxRunsNotFound %s", 404, payload) -} - -func (o *GetInstallSandboxRunsNotFound) GetPayload() *models.StderrErrResponse { - return o.Payload -} - -func (o *GetInstallSandboxRunsNotFound) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.StderrErrResponse) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewGetInstallSandboxRunsInternalServerError creates a GetInstallSandboxRunsInternalServerError with default headers values -func NewGetInstallSandboxRunsInternalServerError() *GetInstallSandboxRunsInternalServerError { - return &GetInstallSandboxRunsInternalServerError{} -} - -/* -GetInstallSandboxRunsInternalServerError describes a response with status code 500, with default header values. - -Internal Server Error -*/ -type GetInstallSandboxRunsInternalServerError struct { - Payload *models.StderrErrResponse -} - -// IsSuccess returns true when this get install sandbox runs internal server error response has a 2xx status code -func (o *GetInstallSandboxRunsInternalServerError) IsSuccess() bool { - return false -} - -// IsRedirect returns true when this get install sandbox runs internal server error response has a 3xx status code -func (o *GetInstallSandboxRunsInternalServerError) IsRedirect() bool { - return false -} - -// IsClientError returns true when this get install sandbox runs internal server error response has a 4xx status code -func (o *GetInstallSandboxRunsInternalServerError) IsClientError() bool { - return false -} - -// IsServerError returns true when this get install sandbox runs internal server error response has a 5xx status code -func (o *GetInstallSandboxRunsInternalServerError) IsServerError() bool { - return true -} - -// IsCode returns true when this get install sandbox runs internal server error response a status code equal to that given -func (o *GetInstallSandboxRunsInternalServerError) IsCode(code int) bool { - return code == 500 -} - -// Code gets the status code for the get install sandbox runs internal server error response -func (o *GetInstallSandboxRunsInternalServerError) Code() int { - return 500 -} - -func (o *GetInstallSandboxRunsInternalServerError) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /v1/installs/{install_id}/sandbox-runs][%d] getInstallSandboxRunsInternalServerError %s", 500, payload) -} - -func (o *GetInstallSandboxRunsInternalServerError) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /v1/installs/{install_id}/sandbox-runs][%d] getInstallSandboxRunsInternalServerError %s", 500, payload) -} - -func (o *GetInstallSandboxRunsInternalServerError) GetPayload() *models.StderrErrResponse { - return o.Payload -} - -func (o *GetInstallSandboxRunsInternalServerError) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.StderrErrResponse) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} diff --git a/client/operations/get_installer_install_parameters.go b/client/operations/get_installer_install_parameters.go deleted file mode 100644 index fd15de7..0000000 --- a/client/operations/get_installer_install_parameters.go +++ /dev/null @@ -1,173 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package operations - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "context" - "net/http" - "time" - - "github.com/go-openapi/errors" - "github.com/go-openapi/runtime" - cr "github.com/go-openapi/runtime/client" - "github.com/go-openapi/strfmt" -) - -// NewGetInstallerInstallParams creates a new GetInstallerInstallParams object, -// with the default timeout for this client. -// -// Default values are not hydrated, since defaults are normally applied by the API server side. -// -// To enforce default values in parameter, use SetDefaults or WithDefaults. -func NewGetInstallerInstallParams() *GetInstallerInstallParams { - return &GetInstallerInstallParams{ - timeout: cr.DefaultTimeout, - } -} - -// NewGetInstallerInstallParamsWithTimeout creates a new GetInstallerInstallParams object -// with the ability to set a timeout on a request. -func NewGetInstallerInstallParamsWithTimeout(timeout time.Duration) *GetInstallerInstallParams { - return &GetInstallerInstallParams{ - timeout: timeout, - } -} - -// NewGetInstallerInstallParamsWithContext creates a new GetInstallerInstallParams object -// with the ability to set a context for a request. -func NewGetInstallerInstallParamsWithContext(ctx context.Context) *GetInstallerInstallParams { - return &GetInstallerInstallParams{ - Context: ctx, - } -} - -// NewGetInstallerInstallParamsWithHTTPClient creates a new GetInstallerInstallParams object -// with the ability to set a custom HTTPClient for a request. -func NewGetInstallerInstallParamsWithHTTPClient(client *http.Client) *GetInstallerInstallParams { - return &GetInstallerInstallParams{ - HTTPClient: client, - } -} - -/* -GetInstallerInstallParams contains all the parameters to send to the API endpoint - - for the get installer install operation. - - Typically these are written to a http.Request. -*/ -type GetInstallerInstallParams struct { - - /* InstallID. - - install id - */ - InstallID string - - /* InstallerSlug. - - installer slug or ID - */ - InstallerSlug string - - timeout time.Duration - Context context.Context - HTTPClient *http.Client -} - -// WithDefaults hydrates default values in the get installer install params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *GetInstallerInstallParams) WithDefaults() *GetInstallerInstallParams { - o.SetDefaults() - return o -} - -// SetDefaults hydrates default values in the get installer install params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *GetInstallerInstallParams) SetDefaults() { - // no default values defined for this parameter -} - -// WithTimeout adds the timeout to the get installer install params -func (o *GetInstallerInstallParams) WithTimeout(timeout time.Duration) *GetInstallerInstallParams { - o.SetTimeout(timeout) - return o -} - -// SetTimeout adds the timeout to the get installer install params -func (o *GetInstallerInstallParams) SetTimeout(timeout time.Duration) { - o.timeout = timeout -} - -// WithContext adds the context to the get installer install params -func (o *GetInstallerInstallParams) WithContext(ctx context.Context) *GetInstallerInstallParams { - o.SetContext(ctx) - return o -} - -// SetContext adds the context to the get installer install params -func (o *GetInstallerInstallParams) SetContext(ctx context.Context) { - o.Context = ctx -} - -// WithHTTPClient adds the HTTPClient to the get installer install params -func (o *GetInstallerInstallParams) WithHTTPClient(client *http.Client) *GetInstallerInstallParams { - o.SetHTTPClient(client) - return o -} - -// SetHTTPClient adds the HTTPClient to the get installer install params -func (o *GetInstallerInstallParams) SetHTTPClient(client *http.Client) { - o.HTTPClient = client -} - -// WithInstallID adds the installID to the get installer install params -func (o *GetInstallerInstallParams) WithInstallID(installID string) *GetInstallerInstallParams { - o.SetInstallID(installID) - return o -} - -// SetInstallID adds the installId to the get installer install params -func (o *GetInstallerInstallParams) SetInstallID(installID string) { - o.InstallID = installID -} - -// WithInstallerSlug adds the installerSlug to the get installer install params -func (o *GetInstallerInstallParams) WithInstallerSlug(installerSlug string) *GetInstallerInstallParams { - o.SetInstallerSlug(installerSlug) - return o -} - -// SetInstallerSlug adds the installerSlug to the get installer install params -func (o *GetInstallerInstallParams) SetInstallerSlug(installerSlug string) { - o.InstallerSlug = installerSlug -} - -// WriteToRequest writes these params to a swagger request -func (o *GetInstallerInstallParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { - - if err := r.SetTimeout(o.timeout); err != nil { - return err - } - var res []error - - // path param install_id - if err := r.SetPathParam("install_id", o.InstallID); err != nil { - return err - } - - // path param installer_slug - if err := r.SetPathParam("installer_slug", o.InstallerSlug); err != nil { - return err - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} diff --git a/client/operations/get_installer_install_responses.go b/client/operations/get_installer_install_responses.go deleted file mode 100644 index 0f61d1d..0000000 --- a/client/operations/get_installer_install_responses.go +++ /dev/null @@ -1,473 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package operations - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "fmt" - "io" - - "github.com/go-openapi/runtime" - "github.com/go-openapi/strfmt" - - "github.com/nuonco/nuon-go/models" -) - -// GetInstallerInstallReader is a Reader for the GetInstallerInstall structure. -type GetInstallerInstallReader struct { - formats strfmt.Registry -} - -// ReadResponse reads a server response into the received o. -func (o *GetInstallerInstallReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { - switch response.Code() { - case 200: - result := NewGetInstallerInstallOK() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return result, nil - case 400: - result := NewGetInstallerInstallBadRequest() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return nil, result - case 401: - result := NewGetInstallerInstallUnauthorized() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return nil, result - case 403: - result := NewGetInstallerInstallForbidden() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return nil, result - case 404: - result := NewGetInstallerInstallNotFound() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return nil, result - case 500: - result := NewGetInstallerInstallInternalServerError() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return nil, result - default: - return nil, runtime.NewAPIError("[GET /v1/installer/{installer_slug}/install/{install_id}] GetInstallerInstall", response, response.Code()) - } -} - -// NewGetInstallerInstallOK creates a GetInstallerInstallOK with default headers values -func NewGetInstallerInstallOK() *GetInstallerInstallOK { - return &GetInstallerInstallOK{} -} - -/* -GetInstallerInstallOK describes a response with status code 200, with default header values. - -OK -*/ -type GetInstallerInstallOK struct { - Payload *models.AppInstall -} - -// IsSuccess returns true when this get installer install o k response has a 2xx status code -func (o *GetInstallerInstallOK) IsSuccess() bool { - return true -} - -// IsRedirect returns true when this get installer install o k response has a 3xx status code -func (o *GetInstallerInstallOK) IsRedirect() bool { - return false -} - -// IsClientError returns true when this get installer install o k response has a 4xx status code -func (o *GetInstallerInstallOK) IsClientError() bool { - return false -} - -// IsServerError returns true when this get installer install o k response has a 5xx status code -func (o *GetInstallerInstallOK) IsServerError() bool { - return false -} - -// IsCode returns true when this get installer install o k response a status code equal to that given -func (o *GetInstallerInstallOK) IsCode(code int) bool { - return code == 200 -} - -// Code gets the status code for the get installer install o k response -func (o *GetInstallerInstallOK) Code() int { - return 200 -} - -func (o *GetInstallerInstallOK) Error() string { - return fmt.Sprintf("[GET /v1/installer/{installer_slug}/install/{install_id}][%d] getInstallerInstallOK %+v", 200, o.Payload) -} - -func (o *GetInstallerInstallOK) String() string { - return fmt.Sprintf("[GET /v1/installer/{installer_slug}/install/{install_id}][%d] getInstallerInstallOK %+v", 200, o.Payload) -} - -func (o *GetInstallerInstallOK) GetPayload() *models.AppInstall { - return o.Payload -} - -func (o *GetInstallerInstallOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.AppInstall) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewGetInstallerInstallBadRequest creates a GetInstallerInstallBadRequest with default headers values -func NewGetInstallerInstallBadRequest() *GetInstallerInstallBadRequest { - return &GetInstallerInstallBadRequest{} -} - -/* -GetInstallerInstallBadRequest describes a response with status code 400, with default header values. - -Bad Request -*/ -type GetInstallerInstallBadRequest struct { - Payload *models.StderrErrResponse -} - -// IsSuccess returns true when this get installer install bad request response has a 2xx status code -func (o *GetInstallerInstallBadRequest) IsSuccess() bool { - return false -} - -// IsRedirect returns true when this get installer install bad request response has a 3xx status code -func (o *GetInstallerInstallBadRequest) IsRedirect() bool { - return false -} - -// IsClientError returns true when this get installer install bad request response has a 4xx status code -func (o *GetInstallerInstallBadRequest) IsClientError() bool { - return true -} - -// IsServerError returns true when this get installer install bad request response has a 5xx status code -func (o *GetInstallerInstallBadRequest) IsServerError() bool { - return false -} - -// IsCode returns true when this get installer install bad request response a status code equal to that given -func (o *GetInstallerInstallBadRequest) IsCode(code int) bool { - return code == 400 -} - -// Code gets the status code for the get installer install bad request response -func (o *GetInstallerInstallBadRequest) Code() int { - return 400 -} - -func (o *GetInstallerInstallBadRequest) Error() string { - return fmt.Sprintf("[GET /v1/installer/{installer_slug}/install/{install_id}][%d] getInstallerInstallBadRequest %+v", 400, o.Payload) -} - -func (o *GetInstallerInstallBadRequest) String() string { - return fmt.Sprintf("[GET /v1/installer/{installer_slug}/install/{install_id}][%d] getInstallerInstallBadRequest %+v", 400, o.Payload) -} - -func (o *GetInstallerInstallBadRequest) GetPayload() *models.StderrErrResponse { - return o.Payload -} - -func (o *GetInstallerInstallBadRequest) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.StderrErrResponse) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewGetInstallerInstallUnauthorized creates a GetInstallerInstallUnauthorized with default headers values -func NewGetInstallerInstallUnauthorized() *GetInstallerInstallUnauthorized { - return &GetInstallerInstallUnauthorized{} -} - -/* -GetInstallerInstallUnauthorized describes a response with status code 401, with default header values. - -Unauthorized -*/ -type GetInstallerInstallUnauthorized struct { - Payload *models.StderrErrResponse -} - -// IsSuccess returns true when this get installer install unauthorized response has a 2xx status code -func (o *GetInstallerInstallUnauthorized) IsSuccess() bool { - return false -} - -// IsRedirect returns true when this get installer install unauthorized response has a 3xx status code -func (o *GetInstallerInstallUnauthorized) IsRedirect() bool { - return false -} - -// IsClientError returns true when this get installer install unauthorized response has a 4xx status code -func (o *GetInstallerInstallUnauthorized) IsClientError() bool { - return true -} - -// IsServerError returns true when this get installer install unauthorized response has a 5xx status code -func (o *GetInstallerInstallUnauthorized) IsServerError() bool { - return false -} - -// IsCode returns true when this get installer install unauthorized response a status code equal to that given -func (o *GetInstallerInstallUnauthorized) IsCode(code int) bool { - return code == 401 -} - -// Code gets the status code for the get installer install unauthorized response -func (o *GetInstallerInstallUnauthorized) Code() int { - return 401 -} - -func (o *GetInstallerInstallUnauthorized) Error() string { - return fmt.Sprintf("[GET /v1/installer/{installer_slug}/install/{install_id}][%d] getInstallerInstallUnauthorized %+v", 401, o.Payload) -} - -func (o *GetInstallerInstallUnauthorized) String() string { - return fmt.Sprintf("[GET /v1/installer/{installer_slug}/install/{install_id}][%d] getInstallerInstallUnauthorized %+v", 401, o.Payload) -} - -func (o *GetInstallerInstallUnauthorized) GetPayload() *models.StderrErrResponse { - return o.Payload -} - -func (o *GetInstallerInstallUnauthorized) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.StderrErrResponse) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewGetInstallerInstallForbidden creates a GetInstallerInstallForbidden with default headers values -func NewGetInstallerInstallForbidden() *GetInstallerInstallForbidden { - return &GetInstallerInstallForbidden{} -} - -/* -GetInstallerInstallForbidden describes a response with status code 403, with default header values. - -Forbidden -*/ -type GetInstallerInstallForbidden struct { - Payload *models.StderrErrResponse -} - -// IsSuccess returns true when this get installer install forbidden response has a 2xx status code -func (o *GetInstallerInstallForbidden) IsSuccess() bool { - return false -} - -// IsRedirect returns true when this get installer install forbidden response has a 3xx status code -func (o *GetInstallerInstallForbidden) IsRedirect() bool { - return false -} - -// IsClientError returns true when this get installer install forbidden response has a 4xx status code -func (o *GetInstallerInstallForbidden) IsClientError() bool { - return true -} - -// IsServerError returns true when this get installer install forbidden response has a 5xx status code -func (o *GetInstallerInstallForbidden) IsServerError() bool { - return false -} - -// IsCode returns true when this get installer install forbidden response a status code equal to that given -func (o *GetInstallerInstallForbidden) IsCode(code int) bool { - return code == 403 -} - -// Code gets the status code for the get installer install forbidden response -func (o *GetInstallerInstallForbidden) Code() int { - return 403 -} - -func (o *GetInstallerInstallForbidden) Error() string { - return fmt.Sprintf("[GET /v1/installer/{installer_slug}/install/{install_id}][%d] getInstallerInstallForbidden %+v", 403, o.Payload) -} - -func (o *GetInstallerInstallForbidden) String() string { - return fmt.Sprintf("[GET /v1/installer/{installer_slug}/install/{install_id}][%d] getInstallerInstallForbidden %+v", 403, o.Payload) -} - -func (o *GetInstallerInstallForbidden) GetPayload() *models.StderrErrResponse { - return o.Payload -} - -func (o *GetInstallerInstallForbidden) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.StderrErrResponse) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewGetInstallerInstallNotFound creates a GetInstallerInstallNotFound with default headers values -func NewGetInstallerInstallNotFound() *GetInstallerInstallNotFound { - return &GetInstallerInstallNotFound{} -} - -/* -GetInstallerInstallNotFound describes a response with status code 404, with default header values. - -Not Found -*/ -type GetInstallerInstallNotFound struct { - Payload *models.StderrErrResponse -} - -// IsSuccess returns true when this get installer install not found response has a 2xx status code -func (o *GetInstallerInstallNotFound) IsSuccess() bool { - return false -} - -// IsRedirect returns true when this get installer install not found response has a 3xx status code -func (o *GetInstallerInstallNotFound) IsRedirect() bool { - return false -} - -// IsClientError returns true when this get installer install not found response has a 4xx status code -func (o *GetInstallerInstallNotFound) IsClientError() bool { - return true -} - -// IsServerError returns true when this get installer install not found response has a 5xx status code -func (o *GetInstallerInstallNotFound) IsServerError() bool { - return false -} - -// IsCode returns true when this get installer install not found response a status code equal to that given -func (o *GetInstallerInstallNotFound) IsCode(code int) bool { - return code == 404 -} - -// Code gets the status code for the get installer install not found response -func (o *GetInstallerInstallNotFound) Code() int { - return 404 -} - -func (o *GetInstallerInstallNotFound) Error() string { - return fmt.Sprintf("[GET /v1/installer/{installer_slug}/install/{install_id}][%d] getInstallerInstallNotFound %+v", 404, o.Payload) -} - -func (o *GetInstallerInstallNotFound) String() string { - return fmt.Sprintf("[GET /v1/installer/{installer_slug}/install/{install_id}][%d] getInstallerInstallNotFound %+v", 404, o.Payload) -} - -func (o *GetInstallerInstallNotFound) GetPayload() *models.StderrErrResponse { - return o.Payload -} - -func (o *GetInstallerInstallNotFound) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.StderrErrResponse) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewGetInstallerInstallInternalServerError creates a GetInstallerInstallInternalServerError with default headers values -func NewGetInstallerInstallInternalServerError() *GetInstallerInstallInternalServerError { - return &GetInstallerInstallInternalServerError{} -} - -/* -GetInstallerInstallInternalServerError describes a response with status code 500, with default header values. - -Internal Server Error -*/ -type GetInstallerInstallInternalServerError struct { - Payload *models.StderrErrResponse -} - -// IsSuccess returns true when this get installer install internal server error response has a 2xx status code -func (o *GetInstallerInstallInternalServerError) IsSuccess() bool { - return false -} - -// IsRedirect returns true when this get installer install internal server error response has a 3xx status code -func (o *GetInstallerInstallInternalServerError) IsRedirect() bool { - return false -} - -// IsClientError returns true when this get installer install internal server error response has a 4xx status code -func (o *GetInstallerInstallInternalServerError) IsClientError() bool { - return false -} - -// IsServerError returns true when this get installer install internal server error response has a 5xx status code -func (o *GetInstallerInstallInternalServerError) IsServerError() bool { - return true -} - -// IsCode returns true when this get installer install internal server error response a status code equal to that given -func (o *GetInstallerInstallInternalServerError) IsCode(code int) bool { - return code == 500 -} - -// Code gets the status code for the get installer install internal server error response -func (o *GetInstallerInstallInternalServerError) Code() int { - return 500 -} - -func (o *GetInstallerInstallInternalServerError) Error() string { - return fmt.Sprintf("[GET /v1/installer/{installer_slug}/install/{install_id}][%d] getInstallerInstallInternalServerError %+v", 500, o.Payload) -} - -func (o *GetInstallerInstallInternalServerError) String() string { - return fmt.Sprintf("[GET /v1/installer/{installer_slug}/install/{install_id}][%d] getInstallerInstallInternalServerError %+v", 500, o.Payload) -} - -func (o *GetInstallerInstallInternalServerError) GetPayload() *models.StderrErrResponse { - return o.Payload -} - -func (o *GetInstallerInstallInternalServerError) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.StderrErrResponse) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} diff --git a/client/operations/get_installer_parameters.go b/client/operations/get_installer_parameters.go deleted file mode 100644 index b321658..0000000 --- a/client/operations/get_installer_parameters.go +++ /dev/null @@ -1,151 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package operations - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "context" - "net/http" - "time" - - "github.com/go-openapi/errors" - "github.com/go-openapi/runtime" - cr "github.com/go-openapi/runtime/client" - "github.com/go-openapi/strfmt" -) - -// NewGetInstallerParams creates a new GetInstallerParams object, -// with the default timeout for this client. -// -// Default values are not hydrated, since defaults are normally applied by the API server side. -// -// To enforce default values in parameter, use SetDefaults or WithDefaults. -func NewGetInstallerParams() *GetInstallerParams { - return &GetInstallerParams{ - timeout: cr.DefaultTimeout, - } -} - -// NewGetInstallerParamsWithTimeout creates a new GetInstallerParams object -// with the ability to set a timeout on a request. -func NewGetInstallerParamsWithTimeout(timeout time.Duration) *GetInstallerParams { - return &GetInstallerParams{ - timeout: timeout, - } -} - -// NewGetInstallerParamsWithContext creates a new GetInstallerParams object -// with the ability to set a context for a request. -func NewGetInstallerParamsWithContext(ctx context.Context) *GetInstallerParams { - return &GetInstallerParams{ - Context: ctx, - } -} - -// NewGetInstallerParamsWithHTTPClient creates a new GetInstallerParams object -// with the ability to set a custom HTTPClient for a request. -func NewGetInstallerParamsWithHTTPClient(client *http.Client) *GetInstallerParams { - return &GetInstallerParams{ - HTTPClient: client, - } -} - -/* -GetInstallerParams contains all the parameters to send to the API endpoint - - for the get installer operation. - - Typically these are written to a http.Request. -*/ -type GetInstallerParams struct { - - /* InstallerID. - - installer ID - */ - InstallerID string - - timeout time.Duration - Context context.Context - HTTPClient *http.Client -} - -// WithDefaults hydrates default values in the get installer params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *GetInstallerParams) WithDefaults() *GetInstallerParams { - o.SetDefaults() - return o -} - -// SetDefaults hydrates default values in the get installer params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *GetInstallerParams) SetDefaults() { - // no default values defined for this parameter -} - -// WithTimeout adds the timeout to the get installer params -func (o *GetInstallerParams) WithTimeout(timeout time.Duration) *GetInstallerParams { - o.SetTimeout(timeout) - return o -} - -// SetTimeout adds the timeout to the get installer params -func (o *GetInstallerParams) SetTimeout(timeout time.Duration) { - o.timeout = timeout -} - -// WithContext adds the context to the get installer params -func (o *GetInstallerParams) WithContext(ctx context.Context) *GetInstallerParams { - o.SetContext(ctx) - return o -} - -// SetContext adds the context to the get installer params -func (o *GetInstallerParams) SetContext(ctx context.Context) { - o.Context = ctx -} - -// WithHTTPClient adds the HTTPClient to the get installer params -func (o *GetInstallerParams) WithHTTPClient(client *http.Client) *GetInstallerParams { - o.SetHTTPClient(client) - return o -} - -// SetHTTPClient adds the HTTPClient to the get installer params -func (o *GetInstallerParams) SetHTTPClient(client *http.Client) { - o.HTTPClient = client -} - -// WithInstallerID adds the installerID to the get installer params -func (o *GetInstallerParams) WithInstallerID(installerID string) *GetInstallerParams { - o.SetInstallerID(installerID) - return o -} - -// SetInstallerID adds the installerId to the get installer params -func (o *GetInstallerParams) SetInstallerID(installerID string) { - o.InstallerID = installerID -} - -// WriteToRequest writes these params to a swagger request -func (o *GetInstallerParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { - - if err := r.SetTimeout(o.timeout); err != nil { - return err - } - var res []error - - // path param installer_id - if err := r.SetPathParam("installer_id", o.InstallerID); err != nil { - return err - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} diff --git a/client/operations/get_installer_responses.go b/client/operations/get_installer_responses.go deleted file mode 100644 index df75582..0000000 --- a/client/operations/get_installer_responses.go +++ /dev/null @@ -1,486 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package operations - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "encoding/json" - "fmt" - "io" - - "github.com/go-openapi/runtime" - "github.com/go-openapi/strfmt" - - "github.com/nuonco/nuon-go/models" -) - -// GetInstallerReader is a Reader for the GetInstaller structure. -type GetInstallerReader struct { - formats strfmt.Registry -} - -// ReadResponse reads a server response into the received o. -func (o *GetInstallerReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { - switch response.Code() { - case 200: - result := NewGetInstallerOK() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return result, nil - case 400: - result := NewGetInstallerBadRequest() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return nil, result - case 401: - result := NewGetInstallerUnauthorized() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return nil, result - case 403: - result := NewGetInstallerForbidden() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return nil, result - case 404: - result := NewGetInstallerNotFound() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return nil, result - case 500: - result := NewGetInstallerInternalServerError() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return nil, result - default: - return nil, runtime.NewAPIError("[GET /v1/installers/{installer_id}] GetInstaller", response, response.Code()) - } -} - -// NewGetInstallerOK creates a GetInstallerOK with default headers values -func NewGetInstallerOK() *GetInstallerOK { - return &GetInstallerOK{} -} - -/* -GetInstallerOK describes a response with status code 200, with default header values. - -OK -*/ -type GetInstallerOK struct { - Payload *models.AppInstaller -} - -// IsSuccess returns true when this get installer o k response has a 2xx status code -func (o *GetInstallerOK) IsSuccess() bool { - return true -} - -// IsRedirect returns true when this get installer o k response has a 3xx status code -func (o *GetInstallerOK) IsRedirect() bool { - return false -} - -// IsClientError returns true when this get installer o k response has a 4xx status code -func (o *GetInstallerOK) IsClientError() bool { - return false -} - -// IsServerError returns true when this get installer o k response has a 5xx status code -func (o *GetInstallerOK) IsServerError() bool { - return false -} - -// IsCode returns true when this get installer o k response a status code equal to that given -func (o *GetInstallerOK) IsCode(code int) bool { - return code == 200 -} - -// Code gets the status code for the get installer o k response -func (o *GetInstallerOK) Code() int { - return 200 -} - -func (o *GetInstallerOK) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /v1/installers/{installer_id}][%d] getInstallerOK %s", 200, payload) -} - -func (o *GetInstallerOK) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /v1/installers/{installer_id}][%d] getInstallerOK %s", 200, payload) -} - -func (o *GetInstallerOK) GetPayload() *models.AppInstaller { - return o.Payload -} - -func (o *GetInstallerOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.AppInstaller) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewGetInstallerBadRequest creates a GetInstallerBadRequest with default headers values -func NewGetInstallerBadRequest() *GetInstallerBadRequest { - return &GetInstallerBadRequest{} -} - -/* -GetInstallerBadRequest describes a response with status code 400, with default header values. - -Bad Request -*/ -type GetInstallerBadRequest struct { - Payload *models.StderrErrResponse -} - -// IsSuccess returns true when this get installer bad request response has a 2xx status code -func (o *GetInstallerBadRequest) IsSuccess() bool { - return false -} - -// IsRedirect returns true when this get installer bad request response has a 3xx status code -func (o *GetInstallerBadRequest) IsRedirect() bool { - return false -} - -// IsClientError returns true when this get installer bad request response has a 4xx status code -func (o *GetInstallerBadRequest) IsClientError() bool { - return true -} - -// IsServerError returns true when this get installer bad request response has a 5xx status code -func (o *GetInstallerBadRequest) IsServerError() bool { - return false -} - -// IsCode returns true when this get installer bad request response a status code equal to that given -func (o *GetInstallerBadRequest) IsCode(code int) bool { - return code == 400 -} - -// Code gets the status code for the get installer bad request response -func (o *GetInstallerBadRequest) Code() int { - return 400 -} - -func (o *GetInstallerBadRequest) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /v1/installers/{installer_id}][%d] getInstallerBadRequest %s", 400, payload) -} - -func (o *GetInstallerBadRequest) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /v1/installers/{installer_id}][%d] getInstallerBadRequest %s", 400, payload) -} - -func (o *GetInstallerBadRequest) GetPayload() *models.StderrErrResponse { - return o.Payload -} - -func (o *GetInstallerBadRequest) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.StderrErrResponse) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewGetInstallerUnauthorized creates a GetInstallerUnauthorized with default headers values -func NewGetInstallerUnauthorized() *GetInstallerUnauthorized { - return &GetInstallerUnauthorized{} -} - -/* -GetInstallerUnauthorized describes a response with status code 401, with default header values. - -Unauthorized -*/ -type GetInstallerUnauthorized struct { - Payload *models.StderrErrResponse -} - -// IsSuccess returns true when this get installer unauthorized response has a 2xx status code -func (o *GetInstallerUnauthorized) IsSuccess() bool { - return false -} - -// IsRedirect returns true when this get installer unauthorized response has a 3xx status code -func (o *GetInstallerUnauthorized) IsRedirect() bool { - return false -} - -// IsClientError returns true when this get installer unauthorized response has a 4xx status code -func (o *GetInstallerUnauthorized) IsClientError() bool { - return true -} - -// IsServerError returns true when this get installer unauthorized response has a 5xx status code -func (o *GetInstallerUnauthorized) IsServerError() bool { - return false -} - -// IsCode returns true when this get installer unauthorized response a status code equal to that given -func (o *GetInstallerUnauthorized) IsCode(code int) bool { - return code == 401 -} - -// Code gets the status code for the get installer unauthorized response -func (o *GetInstallerUnauthorized) Code() int { - return 401 -} - -func (o *GetInstallerUnauthorized) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /v1/installers/{installer_id}][%d] getInstallerUnauthorized %s", 401, payload) -} - -func (o *GetInstallerUnauthorized) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /v1/installers/{installer_id}][%d] getInstallerUnauthorized %s", 401, payload) -} - -func (o *GetInstallerUnauthorized) GetPayload() *models.StderrErrResponse { - return o.Payload -} - -func (o *GetInstallerUnauthorized) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.StderrErrResponse) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewGetInstallerForbidden creates a GetInstallerForbidden with default headers values -func NewGetInstallerForbidden() *GetInstallerForbidden { - return &GetInstallerForbidden{} -} - -/* -GetInstallerForbidden describes a response with status code 403, with default header values. - -Forbidden -*/ -type GetInstallerForbidden struct { - Payload *models.StderrErrResponse -} - -// IsSuccess returns true when this get installer forbidden response has a 2xx status code -func (o *GetInstallerForbidden) IsSuccess() bool { - return false -} - -// IsRedirect returns true when this get installer forbidden response has a 3xx status code -func (o *GetInstallerForbidden) IsRedirect() bool { - return false -} - -// IsClientError returns true when this get installer forbidden response has a 4xx status code -func (o *GetInstallerForbidden) IsClientError() bool { - return true -} - -// IsServerError returns true when this get installer forbidden response has a 5xx status code -func (o *GetInstallerForbidden) IsServerError() bool { - return false -} - -// IsCode returns true when this get installer forbidden response a status code equal to that given -func (o *GetInstallerForbidden) IsCode(code int) bool { - return code == 403 -} - -// Code gets the status code for the get installer forbidden response -func (o *GetInstallerForbidden) Code() int { - return 403 -} - -func (o *GetInstallerForbidden) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /v1/installers/{installer_id}][%d] getInstallerForbidden %s", 403, payload) -} - -func (o *GetInstallerForbidden) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /v1/installers/{installer_id}][%d] getInstallerForbidden %s", 403, payload) -} - -func (o *GetInstallerForbidden) GetPayload() *models.StderrErrResponse { - return o.Payload -} - -func (o *GetInstallerForbidden) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.StderrErrResponse) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewGetInstallerNotFound creates a GetInstallerNotFound with default headers values -func NewGetInstallerNotFound() *GetInstallerNotFound { - return &GetInstallerNotFound{} -} - -/* -GetInstallerNotFound describes a response with status code 404, with default header values. - -Not Found -*/ -type GetInstallerNotFound struct { - Payload *models.StderrErrResponse -} - -// IsSuccess returns true when this get installer not found response has a 2xx status code -func (o *GetInstallerNotFound) IsSuccess() bool { - return false -} - -// IsRedirect returns true when this get installer not found response has a 3xx status code -func (o *GetInstallerNotFound) IsRedirect() bool { - return false -} - -// IsClientError returns true when this get installer not found response has a 4xx status code -func (o *GetInstallerNotFound) IsClientError() bool { - return true -} - -// IsServerError returns true when this get installer not found response has a 5xx status code -func (o *GetInstallerNotFound) IsServerError() bool { - return false -} - -// IsCode returns true when this get installer not found response a status code equal to that given -func (o *GetInstallerNotFound) IsCode(code int) bool { - return code == 404 -} - -// Code gets the status code for the get installer not found response -func (o *GetInstallerNotFound) Code() int { - return 404 -} - -func (o *GetInstallerNotFound) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /v1/installers/{installer_id}][%d] getInstallerNotFound %s", 404, payload) -} - -func (o *GetInstallerNotFound) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /v1/installers/{installer_id}][%d] getInstallerNotFound %s", 404, payload) -} - -func (o *GetInstallerNotFound) GetPayload() *models.StderrErrResponse { - return o.Payload -} - -func (o *GetInstallerNotFound) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.StderrErrResponse) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewGetInstallerInternalServerError creates a GetInstallerInternalServerError with default headers values -func NewGetInstallerInternalServerError() *GetInstallerInternalServerError { - return &GetInstallerInternalServerError{} -} - -/* -GetInstallerInternalServerError describes a response with status code 500, with default header values. - -Internal Server Error -*/ -type GetInstallerInternalServerError struct { - Payload *models.StderrErrResponse -} - -// IsSuccess returns true when this get installer internal server error response has a 2xx status code -func (o *GetInstallerInternalServerError) IsSuccess() bool { - return false -} - -// IsRedirect returns true when this get installer internal server error response has a 3xx status code -func (o *GetInstallerInternalServerError) IsRedirect() bool { - return false -} - -// IsClientError returns true when this get installer internal server error response has a 4xx status code -func (o *GetInstallerInternalServerError) IsClientError() bool { - return false -} - -// IsServerError returns true when this get installer internal server error response has a 5xx status code -func (o *GetInstallerInternalServerError) IsServerError() bool { - return true -} - -// IsCode returns true when this get installer internal server error response a status code equal to that given -func (o *GetInstallerInternalServerError) IsCode(code int) bool { - return code == 500 -} - -// Code gets the status code for the get installer internal server error response -func (o *GetInstallerInternalServerError) Code() int { - return 500 -} - -func (o *GetInstallerInternalServerError) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /v1/installers/{installer_id}][%d] getInstallerInternalServerError %s", 500, payload) -} - -func (o *GetInstallerInternalServerError) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /v1/installers/{installer_id}][%d] getInstallerInternalServerError %s", 500, payload) -} - -func (o *GetInstallerInternalServerError) GetPayload() *models.StderrErrResponse { - return o.Payload -} - -func (o *GetInstallerInternalServerError) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.StderrErrResponse) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} diff --git a/client/operations/get_installers_parameters.go b/client/operations/get_installers_parameters.go deleted file mode 100644 index df0b5a1..0000000 --- a/client/operations/get_installers_parameters.go +++ /dev/null @@ -1,128 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package operations - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "context" - "net/http" - "time" - - "github.com/go-openapi/errors" - "github.com/go-openapi/runtime" - cr "github.com/go-openapi/runtime/client" - "github.com/go-openapi/strfmt" -) - -// NewGetInstallersParams creates a new GetInstallersParams object, -// with the default timeout for this client. -// -// Default values are not hydrated, since defaults are normally applied by the API server side. -// -// To enforce default values in parameter, use SetDefaults or WithDefaults. -func NewGetInstallersParams() *GetInstallersParams { - return &GetInstallersParams{ - timeout: cr.DefaultTimeout, - } -} - -// NewGetInstallersParamsWithTimeout creates a new GetInstallersParams object -// with the ability to set a timeout on a request. -func NewGetInstallersParamsWithTimeout(timeout time.Duration) *GetInstallersParams { - return &GetInstallersParams{ - timeout: timeout, - } -} - -// NewGetInstallersParamsWithContext creates a new GetInstallersParams object -// with the ability to set a context for a request. -func NewGetInstallersParamsWithContext(ctx context.Context) *GetInstallersParams { - return &GetInstallersParams{ - Context: ctx, - } -} - -// NewGetInstallersParamsWithHTTPClient creates a new GetInstallersParams object -// with the ability to set a custom HTTPClient for a request. -func NewGetInstallersParamsWithHTTPClient(client *http.Client) *GetInstallersParams { - return &GetInstallersParams{ - HTTPClient: client, - } -} - -/* -GetInstallersParams contains all the parameters to send to the API endpoint - - for the get installers operation. - - Typically these are written to a http.Request. -*/ -type GetInstallersParams struct { - timeout time.Duration - Context context.Context - HTTPClient *http.Client -} - -// WithDefaults hydrates default values in the get installers params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *GetInstallersParams) WithDefaults() *GetInstallersParams { - o.SetDefaults() - return o -} - -// SetDefaults hydrates default values in the get installers params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *GetInstallersParams) SetDefaults() { - // no default values defined for this parameter -} - -// WithTimeout adds the timeout to the get installers params -func (o *GetInstallersParams) WithTimeout(timeout time.Duration) *GetInstallersParams { - o.SetTimeout(timeout) - return o -} - -// SetTimeout adds the timeout to the get installers params -func (o *GetInstallersParams) SetTimeout(timeout time.Duration) { - o.timeout = timeout -} - -// WithContext adds the context to the get installers params -func (o *GetInstallersParams) WithContext(ctx context.Context) *GetInstallersParams { - o.SetContext(ctx) - return o -} - -// SetContext adds the context to the get installers params -func (o *GetInstallersParams) SetContext(ctx context.Context) { - o.Context = ctx -} - -// WithHTTPClient adds the HTTPClient to the get installers params -func (o *GetInstallersParams) WithHTTPClient(client *http.Client) *GetInstallersParams { - o.SetHTTPClient(client) - return o -} - -// SetHTTPClient adds the HTTPClient to the get installers params -func (o *GetInstallersParams) SetHTTPClient(client *http.Client) { - o.HTTPClient = client -} - -// WriteToRequest writes these params to a swagger request -func (o *GetInstallersParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { - - if err := r.SetTimeout(o.timeout); err != nil { - return err - } - var res []error - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} diff --git a/client/operations/get_installers_responses.go b/client/operations/get_installers_responses.go deleted file mode 100644 index 1a2c636..0000000 --- a/client/operations/get_installers_responses.go +++ /dev/null @@ -1,484 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package operations - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "encoding/json" - "fmt" - "io" - - "github.com/go-openapi/runtime" - "github.com/go-openapi/strfmt" - - "github.com/nuonco/nuon-go/models" -) - -// GetInstallersReader is a Reader for the GetInstallers structure. -type GetInstallersReader struct { - formats strfmt.Registry -} - -// ReadResponse reads a server response into the received o. -func (o *GetInstallersReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { - switch response.Code() { - case 200: - result := NewGetInstallersOK() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return result, nil - case 400: - result := NewGetInstallersBadRequest() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return nil, result - case 401: - result := NewGetInstallersUnauthorized() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return nil, result - case 403: - result := NewGetInstallersForbidden() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return nil, result - case 404: - result := NewGetInstallersNotFound() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return nil, result - case 500: - result := NewGetInstallersInternalServerError() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return nil, result - default: - return nil, runtime.NewAPIError("[GET /v1/installers] GetInstallers", response, response.Code()) - } -} - -// NewGetInstallersOK creates a GetInstallersOK with default headers values -func NewGetInstallersOK() *GetInstallersOK { - return &GetInstallersOK{} -} - -/* -GetInstallersOK describes a response with status code 200, with default header values. - -OK -*/ -type GetInstallersOK struct { - Payload []*models.AppInstaller -} - -// IsSuccess returns true when this get installers o k response has a 2xx status code -func (o *GetInstallersOK) IsSuccess() bool { - return true -} - -// IsRedirect returns true when this get installers o k response has a 3xx status code -func (o *GetInstallersOK) IsRedirect() bool { - return false -} - -// IsClientError returns true when this get installers o k response has a 4xx status code -func (o *GetInstallersOK) IsClientError() bool { - return false -} - -// IsServerError returns true when this get installers o k response has a 5xx status code -func (o *GetInstallersOK) IsServerError() bool { - return false -} - -// IsCode returns true when this get installers o k response a status code equal to that given -func (o *GetInstallersOK) IsCode(code int) bool { - return code == 200 -} - -// Code gets the status code for the get installers o k response -func (o *GetInstallersOK) Code() int { - return 200 -} - -func (o *GetInstallersOK) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /v1/installers][%d] getInstallersOK %s", 200, payload) -} - -func (o *GetInstallersOK) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /v1/installers][%d] getInstallersOK %s", 200, payload) -} - -func (o *GetInstallersOK) GetPayload() []*models.AppInstaller { - return o.Payload -} - -func (o *GetInstallersOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - // response payload - if err := consumer.Consume(response.Body(), &o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewGetInstallersBadRequest creates a GetInstallersBadRequest with default headers values -func NewGetInstallersBadRequest() *GetInstallersBadRequest { - return &GetInstallersBadRequest{} -} - -/* -GetInstallersBadRequest describes a response with status code 400, with default header values. - -Bad Request -*/ -type GetInstallersBadRequest struct { - Payload *models.StderrErrResponse -} - -// IsSuccess returns true when this get installers bad request response has a 2xx status code -func (o *GetInstallersBadRequest) IsSuccess() bool { - return false -} - -// IsRedirect returns true when this get installers bad request response has a 3xx status code -func (o *GetInstallersBadRequest) IsRedirect() bool { - return false -} - -// IsClientError returns true when this get installers bad request response has a 4xx status code -func (o *GetInstallersBadRequest) IsClientError() bool { - return true -} - -// IsServerError returns true when this get installers bad request response has a 5xx status code -func (o *GetInstallersBadRequest) IsServerError() bool { - return false -} - -// IsCode returns true when this get installers bad request response a status code equal to that given -func (o *GetInstallersBadRequest) IsCode(code int) bool { - return code == 400 -} - -// Code gets the status code for the get installers bad request response -func (o *GetInstallersBadRequest) Code() int { - return 400 -} - -func (o *GetInstallersBadRequest) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /v1/installers][%d] getInstallersBadRequest %s", 400, payload) -} - -func (o *GetInstallersBadRequest) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /v1/installers][%d] getInstallersBadRequest %s", 400, payload) -} - -func (o *GetInstallersBadRequest) GetPayload() *models.StderrErrResponse { - return o.Payload -} - -func (o *GetInstallersBadRequest) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.StderrErrResponse) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewGetInstallersUnauthorized creates a GetInstallersUnauthorized with default headers values -func NewGetInstallersUnauthorized() *GetInstallersUnauthorized { - return &GetInstallersUnauthorized{} -} - -/* -GetInstallersUnauthorized describes a response with status code 401, with default header values. - -Unauthorized -*/ -type GetInstallersUnauthorized struct { - Payload *models.StderrErrResponse -} - -// IsSuccess returns true when this get installers unauthorized response has a 2xx status code -func (o *GetInstallersUnauthorized) IsSuccess() bool { - return false -} - -// IsRedirect returns true when this get installers unauthorized response has a 3xx status code -func (o *GetInstallersUnauthorized) IsRedirect() bool { - return false -} - -// IsClientError returns true when this get installers unauthorized response has a 4xx status code -func (o *GetInstallersUnauthorized) IsClientError() bool { - return true -} - -// IsServerError returns true when this get installers unauthorized response has a 5xx status code -func (o *GetInstallersUnauthorized) IsServerError() bool { - return false -} - -// IsCode returns true when this get installers unauthorized response a status code equal to that given -func (o *GetInstallersUnauthorized) IsCode(code int) bool { - return code == 401 -} - -// Code gets the status code for the get installers unauthorized response -func (o *GetInstallersUnauthorized) Code() int { - return 401 -} - -func (o *GetInstallersUnauthorized) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /v1/installers][%d] getInstallersUnauthorized %s", 401, payload) -} - -func (o *GetInstallersUnauthorized) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /v1/installers][%d] getInstallersUnauthorized %s", 401, payload) -} - -func (o *GetInstallersUnauthorized) GetPayload() *models.StderrErrResponse { - return o.Payload -} - -func (o *GetInstallersUnauthorized) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.StderrErrResponse) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewGetInstallersForbidden creates a GetInstallersForbidden with default headers values -func NewGetInstallersForbidden() *GetInstallersForbidden { - return &GetInstallersForbidden{} -} - -/* -GetInstallersForbidden describes a response with status code 403, with default header values. - -Forbidden -*/ -type GetInstallersForbidden struct { - Payload *models.StderrErrResponse -} - -// IsSuccess returns true when this get installers forbidden response has a 2xx status code -func (o *GetInstallersForbidden) IsSuccess() bool { - return false -} - -// IsRedirect returns true when this get installers forbidden response has a 3xx status code -func (o *GetInstallersForbidden) IsRedirect() bool { - return false -} - -// IsClientError returns true when this get installers forbidden response has a 4xx status code -func (o *GetInstallersForbidden) IsClientError() bool { - return true -} - -// IsServerError returns true when this get installers forbidden response has a 5xx status code -func (o *GetInstallersForbidden) IsServerError() bool { - return false -} - -// IsCode returns true when this get installers forbidden response a status code equal to that given -func (o *GetInstallersForbidden) IsCode(code int) bool { - return code == 403 -} - -// Code gets the status code for the get installers forbidden response -func (o *GetInstallersForbidden) Code() int { - return 403 -} - -func (o *GetInstallersForbidden) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /v1/installers][%d] getInstallersForbidden %s", 403, payload) -} - -func (o *GetInstallersForbidden) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /v1/installers][%d] getInstallersForbidden %s", 403, payload) -} - -func (o *GetInstallersForbidden) GetPayload() *models.StderrErrResponse { - return o.Payload -} - -func (o *GetInstallersForbidden) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.StderrErrResponse) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewGetInstallersNotFound creates a GetInstallersNotFound with default headers values -func NewGetInstallersNotFound() *GetInstallersNotFound { - return &GetInstallersNotFound{} -} - -/* -GetInstallersNotFound describes a response with status code 404, with default header values. - -Not Found -*/ -type GetInstallersNotFound struct { - Payload *models.StderrErrResponse -} - -// IsSuccess returns true when this get installers not found response has a 2xx status code -func (o *GetInstallersNotFound) IsSuccess() bool { - return false -} - -// IsRedirect returns true when this get installers not found response has a 3xx status code -func (o *GetInstallersNotFound) IsRedirect() bool { - return false -} - -// IsClientError returns true when this get installers not found response has a 4xx status code -func (o *GetInstallersNotFound) IsClientError() bool { - return true -} - -// IsServerError returns true when this get installers not found response has a 5xx status code -func (o *GetInstallersNotFound) IsServerError() bool { - return false -} - -// IsCode returns true when this get installers not found response a status code equal to that given -func (o *GetInstallersNotFound) IsCode(code int) bool { - return code == 404 -} - -// Code gets the status code for the get installers not found response -func (o *GetInstallersNotFound) Code() int { - return 404 -} - -func (o *GetInstallersNotFound) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /v1/installers][%d] getInstallersNotFound %s", 404, payload) -} - -func (o *GetInstallersNotFound) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /v1/installers][%d] getInstallersNotFound %s", 404, payload) -} - -func (o *GetInstallersNotFound) GetPayload() *models.StderrErrResponse { - return o.Payload -} - -func (o *GetInstallersNotFound) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.StderrErrResponse) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewGetInstallersInternalServerError creates a GetInstallersInternalServerError with default headers values -func NewGetInstallersInternalServerError() *GetInstallersInternalServerError { - return &GetInstallersInternalServerError{} -} - -/* -GetInstallersInternalServerError describes a response with status code 500, with default header values. - -Internal Server Error -*/ -type GetInstallersInternalServerError struct { - Payload *models.StderrErrResponse -} - -// IsSuccess returns true when this get installers internal server error response has a 2xx status code -func (o *GetInstallersInternalServerError) IsSuccess() bool { - return false -} - -// IsRedirect returns true when this get installers internal server error response has a 3xx status code -func (o *GetInstallersInternalServerError) IsRedirect() bool { - return false -} - -// IsClientError returns true when this get installers internal server error response has a 4xx status code -func (o *GetInstallersInternalServerError) IsClientError() bool { - return false -} - -// IsServerError returns true when this get installers internal server error response has a 5xx status code -func (o *GetInstallersInternalServerError) IsServerError() bool { - return true -} - -// IsCode returns true when this get installers internal server error response a status code equal to that given -func (o *GetInstallersInternalServerError) IsCode(code int) bool { - return code == 500 -} - -// Code gets the status code for the get installers internal server error response -func (o *GetInstallersInternalServerError) Code() int { - return 500 -} - -func (o *GetInstallersInternalServerError) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /v1/installers][%d] getInstallersInternalServerError %s", 500, payload) -} - -func (o *GetInstallersInternalServerError) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /v1/installers][%d] getInstallersInternalServerError %s", 500, payload) -} - -func (o *GetInstallersInternalServerError) GetPayload() *models.StderrErrResponse { - return o.Payload -} - -func (o *GetInstallersInternalServerError) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.StderrErrResponse) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} diff --git a/client/operations/get_org_components_parameters.go b/client/operations/get_org_components_parameters.go deleted file mode 100644 index fb64687..0000000 --- a/client/operations/get_org_components_parameters.go +++ /dev/null @@ -1,128 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package operations - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "context" - "net/http" - "time" - - "github.com/go-openapi/errors" - "github.com/go-openapi/runtime" - cr "github.com/go-openapi/runtime/client" - "github.com/go-openapi/strfmt" -) - -// NewGetOrgComponentsParams creates a new GetOrgComponentsParams object, -// with the default timeout for this client. -// -// Default values are not hydrated, since defaults are normally applied by the API server side. -// -// To enforce default values in parameter, use SetDefaults or WithDefaults. -func NewGetOrgComponentsParams() *GetOrgComponentsParams { - return &GetOrgComponentsParams{ - timeout: cr.DefaultTimeout, - } -} - -// NewGetOrgComponentsParamsWithTimeout creates a new GetOrgComponentsParams object -// with the ability to set a timeout on a request. -func NewGetOrgComponentsParamsWithTimeout(timeout time.Duration) *GetOrgComponentsParams { - return &GetOrgComponentsParams{ - timeout: timeout, - } -} - -// NewGetOrgComponentsParamsWithContext creates a new GetOrgComponentsParams object -// with the ability to set a context for a request. -func NewGetOrgComponentsParamsWithContext(ctx context.Context) *GetOrgComponentsParams { - return &GetOrgComponentsParams{ - Context: ctx, - } -} - -// NewGetOrgComponentsParamsWithHTTPClient creates a new GetOrgComponentsParams object -// with the ability to set a custom HTTPClient for a request. -func NewGetOrgComponentsParamsWithHTTPClient(client *http.Client) *GetOrgComponentsParams { - return &GetOrgComponentsParams{ - HTTPClient: client, - } -} - -/* -GetOrgComponentsParams contains all the parameters to send to the API endpoint - - for the get org components operation. - - Typically these are written to a http.Request. -*/ -type GetOrgComponentsParams struct { - timeout time.Duration - Context context.Context - HTTPClient *http.Client -} - -// WithDefaults hydrates default values in the get org components params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *GetOrgComponentsParams) WithDefaults() *GetOrgComponentsParams { - o.SetDefaults() - return o -} - -// SetDefaults hydrates default values in the get org components params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *GetOrgComponentsParams) SetDefaults() { - // no default values defined for this parameter -} - -// WithTimeout adds the timeout to the get org components params -func (o *GetOrgComponentsParams) WithTimeout(timeout time.Duration) *GetOrgComponentsParams { - o.SetTimeout(timeout) - return o -} - -// SetTimeout adds the timeout to the get org components params -func (o *GetOrgComponentsParams) SetTimeout(timeout time.Duration) { - o.timeout = timeout -} - -// WithContext adds the context to the get org components params -func (o *GetOrgComponentsParams) WithContext(ctx context.Context) *GetOrgComponentsParams { - o.SetContext(ctx) - return o -} - -// SetContext adds the context to the get org components params -func (o *GetOrgComponentsParams) SetContext(ctx context.Context) { - o.Context = ctx -} - -// WithHTTPClient adds the HTTPClient to the get org components params -func (o *GetOrgComponentsParams) WithHTTPClient(client *http.Client) *GetOrgComponentsParams { - o.SetHTTPClient(client) - return o -} - -// SetHTTPClient adds the HTTPClient to the get org components params -func (o *GetOrgComponentsParams) SetHTTPClient(client *http.Client) { - o.HTTPClient = client -} - -// WriteToRequest writes these params to a swagger request -func (o *GetOrgComponentsParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { - - if err := r.SetTimeout(o.timeout); err != nil { - return err - } - var res []error - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} diff --git a/client/operations/get_org_components_responses.go b/client/operations/get_org_components_responses.go deleted file mode 100644 index 17ed031..0000000 --- a/client/operations/get_org_components_responses.go +++ /dev/null @@ -1,484 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package operations - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "encoding/json" - "fmt" - "io" - - "github.com/go-openapi/runtime" - "github.com/go-openapi/strfmt" - - "github.com/nuonco/nuon-go/models" -) - -// GetOrgComponentsReader is a Reader for the GetOrgComponents structure. -type GetOrgComponentsReader struct { - formats strfmt.Registry -} - -// ReadResponse reads a server response into the received o. -func (o *GetOrgComponentsReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { - switch response.Code() { - case 200: - result := NewGetOrgComponentsOK() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return result, nil - case 400: - result := NewGetOrgComponentsBadRequest() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return nil, result - case 401: - result := NewGetOrgComponentsUnauthorized() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return nil, result - case 403: - result := NewGetOrgComponentsForbidden() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return nil, result - case 404: - result := NewGetOrgComponentsNotFound() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return nil, result - case 500: - result := NewGetOrgComponentsInternalServerError() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return nil, result - default: - return nil, runtime.NewAPIError("[GET /v1/components] GetOrgComponents", response, response.Code()) - } -} - -// NewGetOrgComponentsOK creates a GetOrgComponentsOK with default headers values -func NewGetOrgComponentsOK() *GetOrgComponentsOK { - return &GetOrgComponentsOK{} -} - -/* -GetOrgComponentsOK describes a response with status code 200, with default header values. - -OK -*/ -type GetOrgComponentsOK struct { - Payload []*models.AppComponent -} - -// IsSuccess returns true when this get org components o k response has a 2xx status code -func (o *GetOrgComponentsOK) IsSuccess() bool { - return true -} - -// IsRedirect returns true when this get org components o k response has a 3xx status code -func (o *GetOrgComponentsOK) IsRedirect() bool { - return false -} - -// IsClientError returns true when this get org components o k response has a 4xx status code -func (o *GetOrgComponentsOK) IsClientError() bool { - return false -} - -// IsServerError returns true when this get org components o k response has a 5xx status code -func (o *GetOrgComponentsOK) IsServerError() bool { - return false -} - -// IsCode returns true when this get org components o k response a status code equal to that given -func (o *GetOrgComponentsOK) IsCode(code int) bool { - return code == 200 -} - -// Code gets the status code for the get org components o k response -func (o *GetOrgComponentsOK) Code() int { - return 200 -} - -func (o *GetOrgComponentsOK) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /v1/components][%d] getOrgComponentsOK %s", 200, payload) -} - -func (o *GetOrgComponentsOK) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /v1/components][%d] getOrgComponentsOK %s", 200, payload) -} - -func (o *GetOrgComponentsOK) GetPayload() []*models.AppComponent { - return o.Payload -} - -func (o *GetOrgComponentsOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - // response payload - if err := consumer.Consume(response.Body(), &o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewGetOrgComponentsBadRequest creates a GetOrgComponentsBadRequest with default headers values -func NewGetOrgComponentsBadRequest() *GetOrgComponentsBadRequest { - return &GetOrgComponentsBadRequest{} -} - -/* -GetOrgComponentsBadRequest describes a response with status code 400, with default header values. - -Bad Request -*/ -type GetOrgComponentsBadRequest struct { - Payload *models.StderrErrResponse -} - -// IsSuccess returns true when this get org components bad request response has a 2xx status code -func (o *GetOrgComponentsBadRequest) IsSuccess() bool { - return false -} - -// IsRedirect returns true when this get org components bad request response has a 3xx status code -func (o *GetOrgComponentsBadRequest) IsRedirect() bool { - return false -} - -// IsClientError returns true when this get org components bad request response has a 4xx status code -func (o *GetOrgComponentsBadRequest) IsClientError() bool { - return true -} - -// IsServerError returns true when this get org components bad request response has a 5xx status code -func (o *GetOrgComponentsBadRequest) IsServerError() bool { - return false -} - -// IsCode returns true when this get org components bad request response a status code equal to that given -func (o *GetOrgComponentsBadRequest) IsCode(code int) bool { - return code == 400 -} - -// Code gets the status code for the get org components bad request response -func (o *GetOrgComponentsBadRequest) Code() int { - return 400 -} - -func (o *GetOrgComponentsBadRequest) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /v1/components][%d] getOrgComponentsBadRequest %s", 400, payload) -} - -func (o *GetOrgComponentsBadRequest) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /v1/components][%d] getOrgComponentsBadRequest %s", 400, payload) -} - -func (o *GetOrgComponentsBadRequest) GetPayload() *models.StderrErrResponse { - return o.Payload -} - -func (o *GetOrgComponentsBadRequest) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.StderrErrResponse) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewGetOrgComponentsUnauthorized creates a GetOrgComponentsUnauthorized with default headers values -func NewGetOrgComponentsUnauthorized() *GetOrgComponentsUnauthorized { - return &GetOrgComponentsUnauthorized{} -} - -/* -GetOrgComponentsUnauthorized describes a response with status code 401, with default header values. - -Unauthorized -*/ -type GetOrgComponentsUnauthorized struct { - Payload *models.StderrErrResponse -} - -// IsSuccess returns true when this get org components unauthorized response has a 2xx status code -func (o *GetOrgComponentsUnauthorized) IsSuccess() bool { - return false -} - -// IsRedirect returns true when this get org components unauthorized response has a 3xx status code -func (o *GetOrgComponentsUnauthorized) IsRedirect() bool { - return false -} - -// IsClientError returns true when this get org components unauthorized response has a 4xx status code -func (o *GetOrgComponentsUnauthorized) IsClientError() bool { - return true -} - -// IsServerError returns true when this get org components unauthorized response has a 5xx status code -func (o *GetOrgComponentsUnauthorized) IsServerError() bool { - return false -} - -// IsCode returns true when this get org components unauthorized response a status code equal to that given -func (o *GetOrgComponentsUnauthorized) IsCode(code int) bool { - return code == 401 -} - -// Code gets the status code for the get org components unauthorized response -func (o *GetOrgComponentsUnauthorized) Code() int { - return 401 -} - -func (o *GetOrgComponentsUnauthorized) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /v1/components][%d] getOrgComponentsUnauthorized %s", 401, payload) -} - -func (o *GetOrgComponentsUnauthorized) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /v1/components][%d] getOrgComponentsUnauthorized %s", 401, payload) -} - -func (o *GetOrgComponentsUnauthorized) GetPayload() *models.StderrErrResponse { - return o.Payload -} - -func (o *GetOrgComponentsUnauthorized) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.StderrErrResponse) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewGetOrgComponentsForbidden creates a GetOrgComponentsForbidden with default headers values -func NewGetOrgComponentsForbidden() *GetOrgComponentsForbidden { - return &GetOrgComponentsForbidden{} -} - -/* -GetOrgComponentsForbidden describes a response with status code 403, with default header values. - -Forbidden -*/ -type GetOrgComponentsForbidden struct { - Payload *models.StderrErrResponse -} - -// IsSuccess returns true when this get org components forbidden response has a 2xx status code -func (o *GetOrgComponentsForbidden) IsSuccess() bool { - return false -} - -// IsRedirect returns true when this get org components forbidden response has a 3xx status code -func (o *GetOrgComponentsForbidden) IsRedirect() bool { - return false -} - -// IsClientError returns true when this get org components forbidden response has a 4xx status code -func (o *GetOrgComponentsForbidden) IsClientError() bool { - return true -} - -// IsServerError returns true when this get org components forbidden response has a 5xx status code -func (o *GetOrgComponentsForbidden) IsServerError() bool { - return false -} - -// IsCode returns true when this get org components forbidden response a status code equal to that given -func (o *GetOrgComponentsForbidden) IsCode(code int) bool { - return code == 403 -} - -// Code gets the status code for the get org components forbidden response -func (o *GetOrgComponentsForbidden) Code() int { - return 403 -} - -func (o *GetOrgComponentsForbidden) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /v1/components][%d] getOrgComponentsForbidden %s", 403, payload) -} - -func (o *GetOrgComponentsForbidden) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /v1/components][%d] getOrgComponentsForbidden %s", 403, payload) -} - -func (o *GetOrgComponentsForbidden) GetPayload() *models.StderrErrResponse { - return o.Payload -} - -func (o *GetOrgComponentsForbidden) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.StderrErrResponse) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewGetOrgComponentsNotFound creates a GetOrgComponentsNotFound with default headers values -func NewGetOrgComponentsNotFound() *GetOrgComponentsNotFound { - return &GetOrgComponentsNotFound{} -} - -/* -GetOrgComponentsNotFound describes a response with status code 404, with default header values. - -Not Found -*/ -type GetOrgComponentsNotFound struct { - Payload *models.StderrErrResponse -} - -// IsSuccess returns true when this get org components not found response has a 2xx status code -func (o *GetOrgComponentsNotFound) IsSuccess() bool { - return false -} - -// IsRedirect returns true when this get org components not found response has a 3xx status code -func (o *GetOrgComponentsNotFound) IsRedirect() bool { - return false -} - -// IsClientError returns true when this get org components not found response has a 4xx status code -func (o *GetOrgComponentsNotFound) IsClientError() bool { - return true -} - -// IsServerError returns true when this get org components not found response has a 5xx status code -func (o *GetOrgComponentsNotFound) IsServerError() bool { - return false -} - -// IsCode returns true when this get org components not found response a status code equal to that given -func (o *GetOrgComponentsNotFound) IsCode(code int) bool { - return code == 404 -} - -// Code gets the status code for the get org components not found response -func (o *GetOrgComponentsNotFound) Code() int { - return 404 -} - -func (o *GetOrgComponentsNotFound) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /v1/components][%d] getOrgComponentsNotFound %s", 404, payload) -} - -func (o *GetOrgComponentsNotFound) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /v1/components][%d] getOrgComponentsNotFound %s", 404, payload) -} - -func (o *GetOrgComponentsNotFound) GetPayload() *models.StderrErrResponse { - return o.Payload -} - -func (o *GetOrgComponentsNotFound) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.StderrErrResponse) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewGetOrgComponentsInternalServerError creates a GetOrgComponentsInternalServerError with default headers values -func NewGetOrgComponentsInternalServerError() *GetOrgComponentsInternalServerError { - return &GetOrgComponentsInternalServerError{} -} - -/* -GetOrgComponentsInternalServerError describes a response with status code 500, with default header values. - -Internal Server Error -*/ -type GetOrgComponentsInternalServerError struct { - Payload *models.StderrErrResponse -} - -// IsSuccess returns true when this get org components internal server error response has a 2xx status code -func (o *GetOrgComponentsInternalServerError) IsSuccess() bool { - return false -} - -// IsRedirect returns true when this get org components internal server error response has a 3xx status code -func (o *GetOrgComponentsInternalServerError) IsRedirect() bool { - return false -} - -// IsClientError returns true when this get org components internal server error response has a 4xx status code -func (o *GetOrgComponentsInternalServerError) IsClientError() bool { - return false -} - -// IsServerError returns true when this get org components internal server error response has a 5xx status code -func (o *GetOrgComponentsInternalServerError) IsServerError() bool { - return true -} - -// IsCode returns true when this get org components internal server error response a status code equal to that given -func (o *GetOrgComponentsInternalServerError) IsCode(code int) bool { - return code == 500 -} - -// Code gets the status code for the get org components internal server error response -func (o *GetOrgComponentsInternalServerError) Code() int { - return 500 -} - -func (o *GetOrgComponentsInternalServerError) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /v1/components][%d] getOrgComponentsInternalServerError %s", 500, payload) -} - -func (o *GetOrgComponentsInternalServerError) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /v1/components][%d] getOrgComponentsInternalServerError %s", 500, payload) -} - -func (o *GetOrgComponentsInternalServerError) GetPayload() *models.StderrErrResponse { - return o.Payload -} - -func (o *GetOrgComponentsInternalServerError) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.StderrErrResponse) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} diff --git a/client/operations/get_org_health_checks_parameters.go b/client/operations/get_org_health_checks_parameters.go deleted file mode 100644 index 9f787e8..0000000 --- a/client/operations/get_org_health_checks_parameters.go +++ /dev/null @@ -1,177 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package operations - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "context" - "net/http" - "time" - - "github.com/go-openapi/errors" - "github.com/go-openapi/runtime" - cr "github.com/go-openapi/runtime/client" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" -) - -// NewGetOrgHealthChecksParams creates a new GetOrgHealthChecksParams object, -// with the default timeout for this client. -// -// Default values are not hydrated, since defaults are normally applied by the API server side. -// -// To enforce default values in parameter, use SetDefaults or WithDefaults. -func NewGetOrgHealthChecksParams() *GetOrgHealthChecksParams { - return &GetOrgHealthChecksParams{ - timeout: cr.DefaultTimeout, - } -} - -// NewGetOrgHealthChecksParamsWithTimeout creates a new GetOrgHealthChecksParams object -// with the ability to set a timeout on a request. -func NewGetOrgHealthChecksParamsWithTimeout(timeout time.Duration) *GetOrgHealthChecksParams { - return &GetOrgHealthChecksParams{ - timeout: timeout, - } -} - -// NewGetOrgHealthChecksParamsWithContext creates a new GetOrgHealthChecksParams object -// with the ability to set a context for a request. -func NewGetOrgHealthChecksParamsWithContext(ctx context.Context) *GetOrgHealthChecksParams { - return &GetOrgHealthChecksParams{ - Context: ctx, - } -} - -// NewGetOrgHealthChecksParamsWithHTTPClient creates a new GetOrgHealthChecksParams object -// with the ability to set a custom HTTPClient for a request. -func NewGetOrgHealthChecksParamsWithHTTPClient(client *http.Client) *GetOrgHealthChecksParams { - return &GetOrgHealthChecksParams{ - HTTPClient: client, - } -} - -/* -GetOrgHealthChecksParams contains all the parameters to send to the API endpoint - - for the get org health checks operation. - - Typically these are written to a http.Request. -*/ -type GetOrgHealthChecksParams struct { - - /* Limit. - - limit of health checks to return - - Default: 60 - */ - Limit *int64 - - timeout time.Duration - Context context.Context - HTTPClient *http.Client -} - -// WithDefaults hydrates default values in the get org health checks params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *GetOrgHealthChecksParams) WithDefaults() *GetOrgHealthChecksParams { - o.SetDefaults() - return o -} - -// SetDefaults hydrates default values in the get org health checks params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *GetOrgHealthChecksParams) SetDefaults() { - var ( - limitDefault = int64(60) - ) - - val := GetOrgHealthChecksParams{ - Limit: &limitDefault, - } - - val.timeout = o.timeout - val.Context = o.Context - val.HTTPClient = o.HTTPClient - *o = val -} - -// WithTimeout adds the timeout to the get org health checks params -func (o *GetOrgHealthChecksParams) WithTimeout(timeout time.Duration) *GetOrgHealthChecksParams { - o.SetTimeout(timeout) - return o -} - -// SetTimeout adds the timeout to the get org health checks params -func (o *GetOrgHealthChecksParams) SetTimeout(timeout time.Duration) { - o.timeout = timeout -} - -// WithContext adds the context to the get org health checks params -func (o *GetOrgHealthChecksParams) WithContext(ctx context.Context) *GetOrgHealthChecksParams { - o.SetContext(ctx) - return o -} - -// SetContext adds the context to the get org health checks params -func (o *GetOrgHealthChecksParams) SetContext(ctx context.Context) { - o.Context = ctx -} - -// WithHTTPClient adds the HTTPClient to the get org health checks params -func (o *GetOrgHealthChecksParams) WithHTTPClient(client *http.Client) *GetOrgHealthChecksParams { - o.SetHTTPClient(client) - return o -} - -// SetHTTPClient adds the HTTPClient to the get org health checks params -func (o *GetOrgHealthChecksParams) SetHTTPClient(client *http.Client) { - o.HTTPClient = client -} - -// WithLimit adds the limit to the get org health checks params -func (o *GetOrgHealthChecksParams) WithLimit(limit *int64) *GetOrgHealthChecksParams { - o.SetLimit(limit) - return o -} - -// SetLimit adds the limit to the get org health checks params -func (o *GetOrgHealthChecksParams) SetLimit(limit *int64) { - o.Limit = limit -} - -// WriteToRequest writes these params to a swagger request -func (o *GetOrgHealthChecksParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { - - if err := r.SetTimeout(o.timeout); err != nil { - return err - } - var res []error - - if o.Limit != nil { - - // query param limit - var qrLimit int64 - - if o.Limit != nil { - qrLimit = *o.Limit - } - qLimit := swag.FormatInt64(qrLimit) - if qLimit != "" { - - if err := r.SetQueryParam("limit", qLimit); err != nil { - return err - } - } - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} diff --git a/client/operations/get_org_health_checks_responses.go b/client/operations/get_org_health_checks_responses.go deleted file mode 100644 index 4636001..0000000 --- a/client/operations/get_org_health_checks_responses.go +++ /dev/null @@ -1,484 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package operations - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "encoding/json" - "fmt" - "io" - - "github.com/go-openapi/runtime" - "github.com/go-openapi/strfmt" - - "github.com/nuonco/nuon-go/models" -) - -// GetOrgHealthChecksReader is a Reader for the GetOrgHealthChecks structure. -type GetOrgHealthChecksReader struct { - formats strfmt.Registry -} - -// ReadResponse reads a server response into the received o. -func (o *GetOrgHealthChecksReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { - switch response.Code() { - case 200: - result := NewGetOrgHealthChecksOK() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return result, nil - case 400: - result := NewGetOrgHealthChecksBadRequest() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return nil, result - case 401: - result := NewGetOrgHealthChecksUnauthorized() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return nil, result - case 403: - result := NewGetOrgHealthChecksForbidden() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return nil, result - case 404: - result := NewGetOrgHealthChecksNotFound() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return nil, result - case 500: - result := NewGetOrgHealthChecksInternalServerError() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return nil, result - default: - return nil, runtime.NewAPIError("[GET /v1/orgs/current/health-checks] GetOrgHealthChecks", response, response.Code()) - } -} - -// NewGetOrgHealthChecksOK creates a GetOrgHealthChecksOK with default headers values -func NewGetOrgHealthChecksOK() *GetOrgHealthChecksOK { - return &GetOrgHealthChecksOK{} -} - -/* -GetOrgHealthChecksOK describes a response with status code 200, with default header values. - -OK -*/ -type GetOrgHealthChecksOK struct { - Payload []*models.AppOrgHealthCheck -} - -// IsSuccess returns true when this get org health checks o k response has a 2xx status code -func (o *GetOrgHealthChecksOK) IsSuccess() bool { - return true -} - -// IsRedirect returns true when this get org health checks o k response has a 3xx status code -func (o *GetOrgHealthChecksOK) IsRedirect() bool { - return false -} - -// IsClientError returns true when this get org health checks o k response has a 4xx status code -func (o *GetOrgHealthChecksOK) IsClientError() bool { - return false -} - -// IsServerError returns true when this get org health checks o k response has a 5xx status code -func (o *GetOrgHealthChecksOK) IsServerError() bool { - return false -} - -// IsCode returns true when this get org health checks o k response a status code equal to that given -func (o *GetOrgHealthChecksOK) IsCode(code int) bool { - return code == 200 -} - -// Code gets the status code for the get org health checks o k response -func (o *GetOrgHealthChecksOK) Code() int { - return 200 -} - -func (o *GetOrgHealthChecksOK) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /v1/orgs/current/health-checks][%d] getOrgHealthChecksOK %s", 200, payload) -} - -func (o *GetOrgHealthChecksOK) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /v1/orgs/current/health-checks][%d] getOrgHealthChecksOK %s", 200, payload) -} - -func (o *GetOrgHealthChecksOK) GetPayload() []*models.AppOrgHealthCheck { - return o.Payload -} - -func (o *GetOrgHealthChecksOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - // response payload - if err := consumer.Consume(response.Body(), &o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewGetOrgHealthChecksBadRequest creates a GetOrgHealthChecksBadRequest with default headers values -func NewGetOrgHealthChecksBadRequest() *GetOrgHealthChecksBadRequest { - return &GetOrgHealthChecksBadRequest{} -} - -/* -GetOrgHealthChecksBadRequest describes a response with status code 400, with default header values. - -Bad Request -*/ -type GetOrgHealthChecksBadRequest struct { - Payload *models.StderrErrResponse -} - -// IsSuccess returns true when this get org health checks bad request response has a 2xx status code -func (o *GetOrgHealthChecksBadRequest) IsSuccess() bool { - return false -} - -// IsRedirect returns true when this get org health checks bad request response has a 3xx status code -func (o *GetOrgHealthChecksBadRequest) IsRedirect() bool { - return false -} - -// IsClientError returns true when this get org health checks bad request response has a 4xx status code -func (o *GetOrgHealthChecksBadRequest) IsClientError() bool { - return true -} - -// IsServerError returns true when this get org health checks bad request response has a 5xx status code -func (o *GetOrgHealthChecksBadRequest) IsServerError() bool { - return false -} - -// IsCode returns true when this get org health checks bad request response a status code equal to that given -func (o *GetOrgHealthChecksBadRequest) IsCode(code int) bool { - return code == 400 -} - -// Code gets the status code for the get org health checks bad request response -func (o *GetOrgHealthChecksBadRequest) Code() int { - return 400 -} - -func (o *GetOrgHealthChecksBadRequest) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /v1/orgs/current/health-checks][%d] getOrgHealthChecksBadRequest %s", 400, payload) -} - -func (o *GetOrgHealthChecksBadRequest) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /v1/orgs/current/health-checks][%d] getOrgHealthChecksBadRequest %s", 400, payload) -} - -func (o *GetOrgHealthChecksBadRequest) GetPayload() *models.StderrErrResponse { - return o.Payload -} - -func (o *GetOrgHealthChecksBadRequest) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.StderrErrResponse) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewGetOrgHealthChecksUnauthorized creates a GetOrgHealthChecksUnauthorized with default headers values -func NewGetOrgHealthChecksUnauthorized() *GetOrgHealthChecksUnauthorized { - return &GetOrgHealthChecksUnauthorized{} -} - -/* -GetOrgHealthChecksUnauthorized describes a response with status code 401, with default header values. - -Unauthorized -*/ -type GetOrgHealthChecksUnauthorized struct { - Payload *models.StderrErrResponse -} - -// IsSuccess returns true when this get org health checks unauthorized response has a 2xx status code -func (o *GetOrgHealthChecksUnauthorized) IsSuccess() bool { - return false -} - -// IsRedirect returns true when this get org health checks unauthorized response has a 3xx status code -func (o *GetOrgHealthChecksUnauthorized) IsRedirect() bool { - return false -} - -// IsClientError returns true when this get org health checks unauthorized response has a 4xx status code -func (o *GetOrgHealthChecksUnauthorized) IsClientError() bool { - return true -} - -// IsServerError returns true when this get org health checks unauthorized response has a 5xx status code -func (o *GetOrgHealthChecksUnauthorized) IsServerError() bool { - return false -} - -// IsCode returns true when this get org health checks unauthorized response a status code equal to that given -func (o *GetOrgHealthChecksUnauthorized) IsCode(code int) bool { - return code == 401 -} - -// Code gets the status code for the get org health checks unauthorized response -func (o *GetOrgHealthChecksUnauthorized) Code() int { - return 401 -} - -func (o *GetOrgHealthChecksUnauthorized) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /v1/orgs/current/health-checks][%d] getOrgHealthChecksUnauthorized %s", 401, payload) -} - -func (o *GetOrgHealthChecksUnauthorized) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /v1/orgs/current/health-checks][%d] getOrgHealthChecksUnauthorized %s", 401, payload) -} - -func (o *GetOrgHealthChecksUnauthorized) GetPayload() *models.StderrErrResponse { - return o.Payload -} - -func (o *GetOrgHealthChecksUnauthorized) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.StderrErrResponse) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewGetOrgHealthChecksForbidden creates a GetOrgHealthChecksForbidden with default headers values -func NewGetOrgHealthChecksForbidden() *GetOrgHealthChecksForbidden { - return &GetOrgHealthChecksForbidden{} -} - -/* -GetOrgHealthChecksForbidden describes a response with status code 403, with default header values. - -Forbidden -*/ -type GetOrgHealthChecksForbidden struct { - Payload *models.StderrErrResponse -} - -// IsSuccess returns true when this get org health checks forbidden response has a 2xx status code -func (o *GetOrgHealthChecksForbidden) IsSuccess() bool { - return false -} - -// IsRedirect returns true when this get org health checks forbidden response has a 3xx status code -func (o *GetOrgHealthChecksForbidden) IsRedirect() bool { - return false -} - -// IsClientError returns true when this get org health checks forbidden response has a 4xx status code -func (o *GetOrgHealthChecksForbidden) IsClientError() bool { - return true -} - -// IsServerError returns true when this get org health checks forbidden response has a 5xx status code -func (o *GetOrgHealthChecksForbidden) IsServerError() bool { - return false -} - -// IsCode returns true when this get org health checks forbidden response a status code equal to that given -func (o *GetOrgHealthChecksForbidden) IsCode(code int) bool { - return code == 403 -} - -// Code gets the status code for the get org health checks forbidden response -func (o *GetOrgHealthChecksForbidden) Code() int { - return 403 -} - -func (o *GetOrgHealthChecksForbidden) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /v1/orgs/current/health-checks][%d] getOrgHealthChecksForbidden %s", 403, payload) -} - -func (o *GetOrgHealthChecksForbidden) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /v1/orgs/current/health-checks][%d] getOrgHealthChecksForbidden %s", 403, payload) -} - -func (o *GetOrgHealthChecksForbidden) GetPayload() *models.StderrErrResponse { - return o.Payload -} - -func (o *GetOrgHealthChecksForbidden) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.StderrErrResponse) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewGetOrgHealthChecksNotFound creates a GetOrgHealthChecksNotFound with default headers values -func NewGetOrgHealthChecksNotFound() *GetOrgHealthChecksNotFound { - return &GetOrgHealthChecksNotFound{} -} - -/* -GetOrgHealthChecksNotFound describes a response with status code 404, with default header values. - -Not Found -*/ -type GetOrgHealthChecksNotFound struct { - Payload *models.StderrErrResponse -} - -// IsSuccess returns true when this get org health checks not found response has a 2xx status code -func (o *GetOrgHealthChecksNotFound) IsSuccess() bool { - return false -} - -// IsRedirect returns true when this get org health checks not found response has a 3xx status code -func (o *GetOrgHealthChecksNotFound) IsRedirect() bool { - return false -} - -// IsClientError returns true when this get org health checks not found response has a 4xx status code -func (o *GetOrgHealthChecksNotFound) IsClientError() bool { - return true -} - -// IsServerError returns true when this get org health checks not found response has a 5xx status code -func (o *GetOrgHealthChecksNotFound) IsServerError() bool { - return false -} - -// IsCode returns true when this get org health checks not found response a status code equal to that given -func (o *GetOrgHealthChecksNotFound) IsCode(code int) bool { - return code == 404 -} - -// Code gets the status code for the get org health checks not found response -func (o *GetOrgHealthChecksNotFound) Code() int { - return 404 -} - -func (o *GetOrgHealthChecksNotFound) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /v1/orgs/current/health-checks][%d] getOrgHealthChecksNotFound %s", 404, payload) -} - -func (o *GetOrgHealthChecksNotFound) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /v1/orgs/current/health-checks][%d] getOrgHealthChecksNotFound %s", 404, payload) -} - -func (o *GetOrgHealthChecksNotFound) GetPayload() *models.StderrErrResponse { - return o.Payload -} - -func (o *GetOrgHealthChecksNotFound) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.StderrErrResponse) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewGetOrgHealthChecksInternalServerError creates a GetOrgHealthChecksInternalServerError with default headers values -func NewGetOrgHealthChecksInternalServerError() *GetOrgHealthChecksInternalServerError { - return &GetOrgHealthChecksInternalServerError{} -} - -/* -GetOrgHealthChecksInternalServerError describes a response with status code 500, with default header values. - -Internal Server Error -*/ -type GetOrgHealthChecksInternalServerError struct { - Payload *models.StderrErrResponse -} - -// IsSuccess returns true when this get org health checks internal server error response has a 2xx status code -func (o *GetOrgHealthChecksInternalServerError) IsSuccess() bool { - return false -} - -// IsRedirect returns true when this get org health checks internal server error response has a 3xx status code -func (o *GetOrgHealthChecksInternalServerError) IsRedirect() bool { - return false -} - -// IsClientError returns true when this get org health checks internal server error response has a 4xx status code -func (o *GetOrgHealthChecksInternalServerError) IsClientError() bool { - return false -} - -// IsServerError returns true when this get org health checks internal server error response has a 5xx status code -func (o *GetOrgHealthChecksInternalServerError) IsServerError() bool { - return true -} - -// IsCode returns true when this get org health checks internal server error response a status code equal to that given -func (o *GetOrgHealthChecksInternalServerError) IsCode(code int) bool { - return code == 500 -} - -// Code gets the status code for the get org health checks internal server error response -func (o *GetOrgHealthChecksInternalServerError) Code() int { - return 500 -} - -func (o *GetOrgHealthChecksInternalServerError) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /v1/orgs/current/health-checks][%d] getOrgHealthChecksInternalServerError %s", 500, payload) -} - -func (o *GetOrgHealthChecksInternalServerError) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /v1/orgs/current/health-checks][%d] getOrgHealthChecksInternalServerError %s", 500, payload) -} - -func (o *GetOrgHealthChecksInternalServerError) GetPayload() *models.StderrErrResponse { - return o.Payload -} - -func (o *GetOrgHealthChecksInternalServerError) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.StderrErrResponse) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} diff --git a/client/operations/get_org_installs_parameters.go b/client/operations/get_org_installs_parameters.go deleted file mode 100644 index a7a98e5..0000000 --- a/client/operations/get_org_installs_parameters.go +++ /dev/null @@ -1,128 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package operations - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "context" - "net/http" - "time" - - "github.com/go-openapi/errors" - "github.com/go-openapi/runtime" - cr "github.com/go-openapi/runtime/client" - "github.com/go-openapi/strfmt" -) - -// NewGetOrgInstallsParams creates a new GetOrgInstallsParams object, -// with the default timeout for this client. -// -// Default values are not hydrated, since defaults are normally applied by the API server side. -// -// To enforce default values in parameter, use SetDefaults or WithDefaults. -func NewGetOrgInstallsParams() *GetOrgInstallsParams { - return &GetOrgInstallsParams{ - timeout: cr.DefaultTimeout, - } -} - -// NewGetOrgInstallsParamsWithTimeout creates a new GetOrgInstallsParams object -// with the ability to set a timeout on a request. -func NewGetOrgInstallsParamsWithTimeout(timeout time.Duration) *GetOrgInstallsParams { - return &GetOrgInstallsParams{ - timeout: timeout, - } -} - -// NewGetOrgInstallsParamsWithContext creates a new GetOrgInstallsParams object -// with the ability to set a context for a request. -func NewGetOrgInstallsParamsWithContext(ctx context.Context) *GetOrgInstallsParams { - return &GetOrgInstallsParams{ - Context: ctx, - } -} - -// NewGetOrgInstallsParamsWithHTTPClient creates a new GetOrgInstallsParams object -// with the ability to set a custom HTTPClient for a request. -func NewGetOrgInstallsParamsWithHTTPClient(client *http.Client) *GetOrgInstallsParams { - return &GetOrgInstallsParams{ - HTTPClient: client, - } -} - -/* -GetOrgInstallsParams contains all the parameters to send to the API endpoint - - for the get org installs operation. - - Typically these are written to a http.Request. -*/ -type GetOrgInstallsParams struct { - timeout time.Duration - Context context.Context - HTTPClient *http.Client -} - -// WithDefaults hydrates default values in the get org installs params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *GetOrgInstallsParams) WithDefaults() *GetOrgInstallsParams { - o.SetDefaults() - return o -} - -// SetDefaults hydrates default values in the get org installs params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *GetOrgInstallsParams) SetDefaults() { - // no default values defined for this parameter -} - -// WithTimeout adds the timeout to the get org installs params -func (o *GetOrgInstallsParams) WithTimeout(timeout time.Duration) *GetOrgInstallsParams { - o.SetTimeout(timeout) - return o -} - -// SetTimeout adds the timeout to the get org installs params -func (o *GetOrgInstallsParams) SetTimeout(timeout time.Duration) { - o.timeout = timeout -} - -// WithContext adds the context to the get org installs params -func (o *GetOrgInstallsParams) WithContext(ctx context.Context) *GetOrgInstallsParams { - o.SetContext(ctx) - return o -} - -// SetContext adds the context to the get org installs params -func (o *GetOrgInstallsParams) SetContext(ctx context.Context) { - o.Context = ctx -} - -// WithHTTPClient adds the HTTPClient to the get org installs params -func (o *GetOrgInstallsParams) WithHTTPClient(client *http.Client) *GetOrgInstallsParams { - o.SetHTTPClient(client) - return o -} - -// SetHTTPClient adds the HTTPClient to the get org installs params -func (o *GetOrgInstallsParams) SetHTTPClient(client *http.Client) { - o.HTTPClient = client -} - -// WriteToRequest writes these params to a swagger request -func (o *GetOrgInstallsParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { - - if err := r.SetTimeout(o.timeout); err != nil { - return err - } - var res []error - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} diff --git a/client/operations/get_org_installs_responses.go b/client/operations/get_org_installs_responses.go deleted file mode 100644 index 1f8b43f..0000000 --- a/client/operations/get_org_installs_responses.go +++ /dev/null @@ -1,484 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package operations - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "encoding/json" - "fmt" - "io" - - "github.com/go-openapi/runtime" - "github.com/go-openapi/strfmt" - - "github.com/nuonco/nuon-go/models" -) - -// GetOrgInstallsReader is a Reader for the GetOrgInstalls structure. -type GetOrgInstallsReader struct { - formats strfmt.Registry -} - -// ReadResponse reads a server response into the received o. -func (o *GetOrgInstallsReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { - switch response.Code() { - case 200: - result := NewGetOrgInstallsOK() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return result, nil - case 400: - result := NewGetOrgInstallsBadRequest() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return nil, result - case 401: - result := NewGetOrgInstallsUnauthorized() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return nil, result - case 403: - result := NewGetOrgInstallsForbidden() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return nil, result - case 404: - result := NewGetOrgInstallsNotFound() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return nil, result - case 500: - result := NewGetOrgInstallsInternalServerError() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return nil, result - default: - return nil, runtime.NewAPIError("[GET /v1/installs] GetOrgInstalls", response, response.Code()) - } -} - -// NewGetOrgInstallsOK creates a GetOrgInstallsOK with default headers values -func NewGetOrgInstallsOK() *GetOrgInstallsOK { - return &GetOrgInstallsOK{} -} - -/* -GetOrgInstallsOK describes a response with status code 200, with default header values. - -OK -*/ -type GetOrgInstallsOK struct { - Payload []*models.AppInstall -} - -// IsSuccess returns true when this get org installs o k response has a 2xx status code -func (o *GetOrgInstallsOK) IsSuccess() bool { - return true -} - -// IsRedirect returns true when this get org installs o k response has a 3xx status code -func (o *GetOrgInstallsOK) IsRedirect() bool { - return false -} - -// IsClientError returns true when this get org installs o k response has a 4xx status code -func (o *GetOrgInstallsOK) IsClientError() bool { - return false -} - -// IsServerError returns true when this get org installs o k response has a 5xx status code -func (o *GetOrgInstallsOK) IsServerError() bool { - return false -} - -// IsCode returns true when this get org installs o k response a status code equal to that given -func (o *GetOrgInstallsOK) IsCode(code int) bool { - return code == 200 -} - -// Code gets the status code for the get org installs o k response -func (o *GetOrgInstallsOK) Code() int { - return 200 -} - -func (o *GetOrgInstallsOK) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /v1/installs][%d] getOrgInstallsOK %s", 200, payload) -} - -func (o *GetOrgInstallsOK) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /v1/installs][%d] getOrgInstallsOK %s", 200, payload) -} - -func (o *GetOrgInstallsOK) GetPayload() []*models.AppInstall { - return o.Payload -} - -func (o *GetOrgInstallsOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - // response payload - if err := consumer.Consume(response.Body(), &o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewGetOrgInstallsBadRequest creates a GetOrgInstallsBadRequest with default headers values -func NewGetOrgInstallsBadRequest() *GetOrgInstallsBadRequest { - return &GetOrgInstallsBadRequest{} -} - -/* -GetOrgInstallsBadRequest describes a response with status code 400, with default header values. - -Bad Request -*/ -type GetOrgInstallsBadRequest struct { - Payload *models.StderrErrResponse -} - -// IsSuccess returns true when this get org installs bad request response has a 2xx status code -func (o *GetOrgInstallsBadRequest) IsSuccess() bool { - return false -} - -// IsRedirect returns true when this get org installs bad request response has a 3xx status code -func (o *GetOrgInstallsBadRequest) IsRedirect() bool { - return false -} - -// IsClientError returns true when this get org installs bad request response has a 4xx status code -func (o *GetOrgInstallsBadRequest) IsClientError() bool { - return true -} - -// IsServerError returns true when this get org installs bad request response has a 5xx status code -func (o *GetOrgInstallsBadRequest) IsServerError() bool { - return false -} - -// IsCode returns true when this get org installs bad request response a status code equal to that given -func (o *GetOrgInstallsBadRequest) IsCode(code int) bool { - return code == 400 -} - -// Code gets the status code for the get org installs bad request response -func (o *GetOrgInstallsBadRequest) Code() int { - return 400 -} - -func (o *GetOrgInstallsBadRequest) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /v1/installs][%d] getOrgInstallsBadRequest %s", 400, payload) -} - -func (o *GetOrgInstallsBadRequest) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /v1/installs][%d] getOrgInstallsBadRequest %s", 400, payload) -} - -func (o *GetOrgInstallsBadRequest) GetPayload() *models.StderrErrResponse { - return o.Payload -} - -func (o *GetOrgInstallsBadRequest) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.StderrErrResponse) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewGetOrgInstallsUnauthorized creates a GetOrgInstallsUnauthorized with default headers values -func NewGetOrgInstallsUnauthorized() *GetOrgInstallsUnauthorized { - return &GetOrgInstallsUnauthorized{} -} - -/* -GetOrgInstallsUnauthorized describes a response with status code 401, with default header values. - -Unauthorized -*/ -type GetOrgInstallsUnauthorized struct { - Payload *models.StderrErrResponse -} - -// IsSuccess returns true when this get org installs unauthorized response has a 2xx status code -func (o *GetOrgInstallsUnauthorized) IsSuccess() bool { - return false -} - -// IsRedirect returns true when this get org installs unauthorized response has a 3xx status code -func (o *GetOrgInstallsUnauthorized) IsRedirect() bool { - return false -} - -// IsClientError returns true when this get org installs unauthorized response has a 4xx status code -func (o *GetOrgInstallsUnauthorized) IsClientError() bool { - return true -} - -// IsServerError returns true when this get org installs unauthorized response has a 5xx status code -func (o *GetOrgInstallsUnauthorized) IsServerError() bool { - return false -} - -// IsCode returns true when this get org installs unauthorized response a status code equal to that given -func (o *GetOrgInstallsUnauthorized) IsCode(code int) bool { - return code == 401 -} - -// Code gets the status code for the get org installs unauthorized response -func (o *GetOrgInstallsUnauthorized) Code() int { - return 401 -} - -func (o *GetOrgInstallsUnauthorized) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /v1/installs][%d] getOrgInstallsUnauthorized %s", 401, payload) -} - -func (o *GetOrgInstallsUnauthorized) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /v1/installs][%d] getOrgInstallsUnauthorized %s", 401, payload) -} - -func (o *GetOrgInstallsUnauthorized) GetPayload() *models.StderrErrResponse { - return o.Payload -} - -func (o *GetOrgInstallsUnauthorized) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.StderrErrResponse) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewGetOrgInstallsForbidden creates a GetOrgInstallsForbidden with default headers values -func NewGetOrgInstallsForbidden() *GetOrgInstallsForbidden { - return &GetOrgInstallsForbidden{} -} - -/* -GetOrgInstallsForbidden describes a response with status code 403, with default header values. - -Forbidden -*/ -type GetOrgInstallsForbidden struct { - Payload *models.StderrErrResponse -} - -// IsSuccess returns true when this get org installs forbidden response has a 2xx status code -func (o *GetOrgInstallsForbidden) IsSuccess() bool { - return false -} - -// IsRedirect returns true when this get org installs forbidden response has a 3xx status code -func (o *GetOrgInstallsForbidden) IsRedirect() bool { - return false -} - -// IsClientError returns true when this get org installs forbidden response has a 4xx status code -func (o *GetOrgInstallsForbidden) IsClientError() bool { - return true -} - -// IsServerError returns true when this get org installs forbidden response has a 5xx status code -func (o *GetOrgInstallsForbidden) IsServerError() bool { - return false -} - -// IsCode returns true when this get org installs forbidden response a status code equal to that given -func (o *GetOrgInstallsForbidden) IsCode(code int) bool { - return code == 403 -} - -// Code gets the status code for the get org installs forbidden response -func (o *GetOrgInstallsForbidden) Code() int { - return 403 -} - -func (o *GetOrgInstallsForbidden) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /v1/installs][%d] getOrgInstallsForbidden %s", 403, payload) -} - -func (o *GetOrgInstallsForbidden) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /v1/installs][%d] getOrgInstallsForbidden %s", 403, payload) -} - -func (o *GetOrgInstallsForbidden) GetPayload() *models.StderrErrResponse { - return o.Payload -} - -func (o *GetOrgInstallsForbidden) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.StderrErrResponse) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewGetOrgInstallsNotFound creates a GetOrgInstallsNotFound with default headers values -func NewGetOrgInstallsNotFound() *GetOrgInstallsNotFound { - return &GetOrgInstallsNotFound{} -} - -/* -GetOrgInstallsNotFound describes a response with status code 404, with default header values. - -Not Found -*/ -type GetOrgInstallsNotFound struct { - Payload *models.StderrErrResponse -} - -// IsSuccess returns true when this get org installs not found response has a 2xx status code -func (o *GetOrgInstallsNotFound) IsSuccess() bool { - return false -} - -// IsRedirect returns true when this get org installs not found response has a 3xx status code -func (o *GetOrgInstallsNotFound) IsRedirect() bool { - return false -} - -// IsClientError returns true when this get org installs not found response has a 4xx status code -func (o *GetOrgInstallsNotFound) IsClientError() bool { - return true -} - -// IsServerError returns true when this get org installs not found response has a 5xx status code -func (o *GetOrgInstallsNotFound) IsServerError() bool { - return false -} - -// IsCode returns true when this get org installs not found response a status code equal to that given -func (o *GetOrgInstallsNotFound) IsCode(code int) bool { - return code == 404 -} - -// Code gets the status code for the get org installs not found response -func (o *GetOrgInstallsNotFound) Code() int { - return 404 -} - -func (o *GetOrgInstallsNotFound) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /v1/installs][%d] getOrgInstallsNotFound %s", 404, payload) -} - -func (o *GetOrgInstallsNotFound) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /v1/installs][%d] getOrgInstallsNotFound %s", 404, payload) -} - -func (o *GetOrgInstallsNotFound) GetPayload() *models.StderrErrResponse { - return o.Payload -} - -func (o *GetOrgInstallsNotFound) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.StderrErrResponse) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewGetOrgInstallsInternalServerError creates a GetOrgInstallsInternalServerError with default headers values -func NewGetOrgInstallsInternalServerError() *GetOrgInstallsInternalServerError { - return &GetOrgInstallsInternalServerError{} -} - -/* -GetOrgInstallsInternalServerError describes a response with status code 500, with default header values. - -Internal Server Error -*/ -type GetOrgInstallsInternalServerError struct { - Payload *models.StderrErrResponse -} - -// IsSuccess returns true when this get org installs internal server error response has a 2xx status code -func (o *GetOrgInstallsInternalServerError) IsSuccess() bool { - return false -} - -// IsRedirect returns true when this get org installs internal server error response has a 3xx status code -func (o *GetOrgInstallsInternalServerError) IsRedirect() bool { - return false -} - -// IsClientError returns true when this get org installs internal server error response has a 4xx status code -func (o *GetOrgInstallsInternalServerError) IsClientError() bool { - return false -} - -// IsServerError returns true when this get org installs internal server error response has a 5xx status code -func (o *GetOrgInstallsInternalServerError) IsServerError() bool { - return true -} - -// IsCode returns true when this get org installs internal server error response a status code equal to that given -func (o *GetOrgInstallsInternalServerError) IsCode(code int) bool { - return code == 500 -} - -// Code gets the status code for the get org installs internal server error response -func (o *GetOrgInstallsInternalServerError) Code() int { - return 500 -} - -func (o *GetOrgInstallsInternalServerError) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /v1/installs][%d] getOrgInstallsInternalServerError %s", 500, payload) -} - -func (o *GetOrgInstallsInternalServerError) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /v1/installs][%d] getOrgInstallsInternalServerError %s", 500, payload) -} - -func (o *GetOrgInstallsInternalServerError) GetPayload() *models.StderrErrResponse { - return o.Payload -} - -func (o *GetOrgInstallsInternalServerError) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.StderrErrResponse) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} diff --git a/client/operations/get_org_invites_parameters.go b/client/operations/get_org_invites_parameters.go deleted file mode 100644 index 406ef0b..0000000 --- a/client/operations/get_org_invites_parameters.go +++ /dev/null @@ -1,177 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package operations - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "context" - "net/http" - "time" - - "github.com/go-openapi/errors" - "github.com/go-openapi/runtime" - cr "github.com/go-openapi/runtime/client" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" -) - -// NewGetOrgInvitesParams creates a new GetOrgInvitesParams object, -// with the default timeout for this client. -// -// Default values are not hydrated, since defaults are normally applied by the API server side. -// -// To enforce default values in parameter, use SetDefaults or WithDefaults. -func NewGetOrgInvitesParams() *GetOrgInvitesParams { - return &GetOrgInvitesParams{ - timeout: cr.DefaultTimeout, - } -} - -// NewGetOrgInvitesParamsWithTimeout creates a new GetOrgInvitesParams object -// with the ability to set a timeout on a request. -func NewGetOrgInvitesParamsWithTimeout(timeout time.Duration) *GetOrgInvitesParams { - return &GetOrgInvitesParams{ - timeout: timeout, - } -} - -// NewGetOrgInvitesParamsWithContext creates a new GetOrgInvitesParams object -// with the ability to set a context for a request. -func NewGetOrgInvitesParamsWithContext(ctx context.Context) *GetOrgInvitesParams { - return &GetOrgInvitesParams{ - Context: ctx, - } -} - -// NewGetOrgInvitesParamsWithHTTPClient creates a new GetOrgInvitesParams object -// with the ability to set a custom HTTPClient for a request. -func NewGetOrgInvitesParamsWithHTTPClient(client *http.Client) *GetOrgInvitesParams { - return &GetOrgInvitesParams{ - HTTPClient: client, - } -} - -/* -GetOrgInvitesParams contains all the parameters to send to the API endpoint - - for the get org invites operation. - - Typically these are written to a http.Request. -*/ -type GetOrgInvitesParams struct { - - /* Limit. - - limit of health checks to return - - Default: 60 - */ - Limit *int64 - - timeout time.Duration - Context context.Context - HTTPClient *http.Client -} - -// WithDefaults hydrates default values in the get org invites params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *GetOrgInvitesParams) WithDefaults() *GetOrgInvitesParams { - o.SetDefaults() - return o -} - -// SetDefaults hydrates default values in the get org invites params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *GetOrgInvitesParams) SetDefaults() { - var ( - limitDefault = int64(60) - ) - - val := GetOrgInvitesParams{ - Limit: &limitDefault, - } - - val.timeout = o.timeout - val.Context = o.Context - val.HTTPClient = o.HTTPClient - *o = val -} - -// WithTimeout adds the timeout to the get org invites params -func (o *GetOrgInvitesParams) WithTimeout(timeout time.Duration) *GetOrgInvitesParams { - o.SetTimeout(timeout) - return o -} - -// SetTimeout adds the timeout to the get org invites params -func (o *GetOrgInvitesParams) SetTimeout(timeout time.Duration) { - o.timeout = timeout -} - -// WithContext adds the context to the get org invites params -func (o *GetOrgInvitesParams) WithContext(ctx context.Context) *GetOrgInvitesParams { - o.SetContext(ctx) - return o -} - -// SetContext adds the context to the get org invites params -func (o *GetOrgInvitesParams) SetContext(ctx context.Context) { - o.Context = ctx -} - -// WithHTTPClient adds the HTTPClient to the get org invites params -func (o *GetOrgInvitesParams) WithHTTPClient(client *http.Client) *GetOrgInvitesParams { - o.SetHTTPClient(client) - return o -} - -// SetHTTPClient adds the HTTPClient to the get org invites params -func (o *GetOrgInvitesParams) SetHTTPClient(client *http.Client) { - o.HTTPClient = client -} - -// WithLimit adds the limit to the get org invites params -func (o *GetOrgInvitesParams) WithLimit(limit *int64) *GetOrgInvitesParams { - o.SetLimit(limit) - return o -} - -// SetLimit adds the limit to the get org invites params -func (o *GetOrgInvitesParams) SetLimit(limit *int64) { - o.Limit = limit -} - -// WriteToRequest writes these params to a swagger request -func (o *GetOrgInvitesParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { - - if err := r.SetTimeout(o.timeout); err != nil { - return err - } - var res []error - - if o.Limit != nil { - - // query param limit - var qrLimit int64 - - if o.Limit != nil { - qrLimit = *o.Limit - } - qLimit := swag.FormatInt64(qrLimit) - if qLimit != "" { - - if err := r.SetQueryParam("limit", qLimit); err != nil { - return err - } - } - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} diff --git a/client/operations/get_org_invites_responses.go b/client/operations/get_org_invites_responses.go deleted file mode 100644 index 0e77bbc..0000000 --- a/client/operations/get_org_invites_responses.go +++ /dev/null @@ -1,484 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package operations - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "encoding/json" - "fmt" - "io" - - "github.com/go-openapi/runtime" - "github.com/go-openapi/strfmt" - - "github.com/nuonco/nuon-go/models" -) - -// GetOrgInvitesReader is a Reader for the GetOrgInvites structure. -type GetOrgInvitesReader struct { - formats strfmt.Registry -} - -// ReadResponse reads a server response into the received o. -func (o *GetOrgInvitesReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { - switch response.Code() { - case 200: - result := NewGetOrgInvitesOK() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return result, nil - case 400: - result := NewGetOrgInvitesBadRequest() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return nil, result - case 401: - result := NewGetOrgInvitesUnauthorized() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return nil, result - case 403: - result := NewGetOrgInvitesForbidden() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return nil, result - case 404: - result := NewGetOrgInvitesNotFound() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return nil, result - case 500: - result := NewGetOrgInvitesInternalServerError() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return nil, result - default: - return nil, runtime.NewAPIError("[GET /v1/orgs/current/invites] GetOrgInvites", response, response.Code()) - } -} - -// NewGetOrgInvitesOK creates a GetOrgInvitesOK with default headers values -func NewGetOrgInvitesOK() *GetOrgInvitesOK { - return &GetOrgInvitesOK{} -} - -/* -GetOrgInvitesOK describes a response with status code 200, with default header values. - -OK -*/ -type GetOrgInvitesOK struct { - Payload []*models.AppOrgInvite -} - -// IsSuccess returns true when this get org invites o k response has a 2xx status code -func (o *GetOrgInvitesOK) IsSuccess() bool { - return true -} - -// IsRedirect returns true when this get org invites o k response has a 3xx status code -func (o *GetOrgInvitesOK) IsRedirect() bool { - return false -} - -// IsClientError returns true when this get org invites o k response has a 4xx status code -func (o *GetOrgInvitesOK) IsClientError() bool { - return false -} - -// IsServerError returns true when this get org invites o k response has a 5xx status code -func (o *GetOrgInvitesOK) IsServerError() bool { - return false -} - -// IsCode returns true when this get org invites o k response a status code equal to that given -func (o *GetOrgInvitesOK) IsCode(code int) bool { - return code == 200 -} - -// Code gets the status code for the get org invites o k response -func (o *GetOrgInvitesOK) Code() int { - return 200 -} - -func (o *GetOrgInvitesOK) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /v1/orgs/current/invites][%d] getOrgInvitesOK %s", 200, payload) -} - -func (o *GetOrgInvitesOK) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /v1/orgs/current/invites][%d] getOrgInvitesOK %s", 200, payload) -} - -func (o *GetOrgInvitesOK) GetPayload() []*models.AppOrgInvite { - return o.Payload -} - -func (o *GetOrgInvitesOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - // response payload - if err := consumer.Consume(response.Body(), &o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewGetOrgInvitesBadRequest creates a GetOrgInvitesBadRequest with default headers values -func NewGetOrgInvitesBadRequest() *GetOrgInvitesBadRequest { - return &GetOrgInvitesBadRequest{} -} - -/* -GetOrgInvitesBadRequest describes a response with status code 400, with default header values. - -Bad Request -*/ -type GetOrgInvitesBadRequest struct { - Payload *models.StderrErrResponse -} - -// IsSuccess returns true when this get org invites bad request response has a 2xx status code -func (o *GetOrgInvitesBadRequest) IsSuccess() bool { - return false -} - -// IsRedirect returns true when this get org invites bad request response has a 3xx status code -func (o *GetOrgInvitesBadRequest) IsRedirect() bool { - return false -} - -// IsClientError returns true when this get org invites bad request response has a 4xx status code -func (o *GetOrgInvitesBadRequest) IsClientError() bool { - return true -} - -// IsServerError returns true when this get org invites bad request response has a 5xx status code -func (o *GetOrgInvitesBadRequest) IsServerError() bool { - return false -} - -// IsCode returns true when this get org invites bad request response a status code equal to that given -func (o *GetOrgInvitesBadRequest) IsCode(code int) bool { - return code == 400 -} - -// Code gets the status code for the get org invites bad request response -func (o *GetOrgInvitesBadRequest) Code() int { - return 400 -} - -func (o *GetOrgInvitesBadRequest) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /v1/orgs/current/invites][%d] getOrgInvitesBadRequest %s", 400, payload) -} - -func (o *GetOrgInvitesBadRequest) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /v1/orgs/current/invites][%d] getOrgInvitesBadRequest %s", 400, payload) -} - -func (o *GetOrgInvitesBadRequest) GetPayload() *models.StderrErrResponse { - return o.Payload -} - -func (o *GetOrgInvitesBadRequest) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.StderrErrResponse) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewGetOrgInvitesUnauthorized creates a GetOrgInvitesUnauthorized with default headers values -func NewGetOrgInvitesUnauthorized() *GetOrgInvitesUnauthorized { - return &GetOrgInvitesUnauthorized{} -} - -/* -GetOrgInvitesUnauthorized describes a response with status code 401, with default header values. - -Unauthorized -*/ -type GetOrgInvitesUnauthorized struct { - Payload *models.StderrErrResponse -} - -// IsSuccess returns true when this get org invites unauthorized response has a 2xx status code -func (o *GetOrgInvitesUnauthorized) IsSuccess() bool { - return false -} - -// IsRedirect returns true when this get org invites unauthorized response has a 3xx status code -func (o *GetOrgInvitesUnauthorized) IsRedirect() bool { - return false -} - -// IsClientError returns true when this get org invites unauthorized response has a 4xx status code -func (o *GetOrgInvitesUnauthorized) IsClientError() bool { - return true -} - -// IsServerError returns true when this get org invites unauthorized response has a 5xx status code -func (o *GetOrgInvitesUnauthorized) IsServerError() bool { - return false -} - -// IsCode returns true when this get org invites unauthorized response a status code equal to that given -func (o *GetOrgInvitesUnauthorized) IsCode(code int) bool { - return code == 401 -} - -// Code gets the status code for the get org invites unauthorized response -func (o *GetOrgInvitesUnauthorized) Code() int { - return 401 -} - -func (o *GetOrgInvitesUnauthorized) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /v1/orgs/current/invites][%d] getOrgInvitesUnauthorized %s", 401, payload) -} - -func (o *GetOrgInvitesUnauthorized) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /v1/orgs/current/invites][%d] getOrgInvitesUnauthorized %s", 401, payload) -} - -func (o *GetOrgInvitesUnauthorized) GetPayload() *models.StderrErrResponse { - return o.Payload -} - -func (o *GetOrgInvitesUnauthorized) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.StderrErrResponse) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewGetOrgInvitesForbidden creates a GetOrgInvitesForbidden with default headers values -func NewGetOrgInvitesForbidden() *GetOrgInvitesForbidden { - return &GetOrgInvitesForbidden{} -} - -/* -GetOrgInvitesForbidden describes a response with status code 403, with default header values. - -Forbidden -*/ -type GetOrgInvitesForbidden struct { - Payload *models.StderrErrResponse -} - -// IsSuccess returns true when this get org invites forbidden response has a 2xx status code -func (o *GetOrgInvitesForbidden) IsSuccess() bool { - return false -} - -// IsRedirect returns true when this get org invites forbidden response has a 3xx status code -func (o *GetOrgInvitesForbidden) IsRedirect() bool { - return false -} - -// IsClientError returns true when this get org invites forbidden response has a 4xx status code -func (o *GetOrgInvitesForbidden) IsClientError() bool { - return true -} - -// IsServerError returns true when this get org invites forbidden response has a 5xx status code -func (o *GetOrgInvitesForbidden) IsServerError() bool { - return false -} - -// IsCode returns true when this get org invites forbidden response a status code equal to that given -func (o *GetOrgInvitesForbidden) IsCode(code int) bool { - return code == 403 -} - -// Code gets the status code for the get org invites forbidden response -func (o *GetOrgInvitesForbidden) Code() int { - return 403 -} - -func (o *GetOrgInvitesForbidden) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /v1/orgs/current/invites][%d] getOrgInvitesForbidden %s", 403, payload) -} - -func (o *GetOrgInvitesForbidden) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /v1/orgs/current/invites][%d] getOrgInvitesForbidden %s", 403, payload) -} - -func (o *GetOrgInvitesForbidden) GetPayload() *models.StderrErrResponse { - return o.Payload -} - -func (o *GetOrgInvitesForbidden) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.StderrErrResponse) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewGetOrgInvitesNotFound creates a GetOrgInvitesNotFound with default headers values -func NewGetOrgInvitesNotFound() *GetOrgInvitesNotFound { - return &GetOrgInvitesNotFound{} -} - -/* -GetOrgInvitesNotFound describes a response with status code 404, with default header values. - -Not Found -*/ -type GetOrgInvitesNotFound struct { - Payload *models.StderrErrResponse -} - -// IsSuccess returns true when this get org invites not found response has a 2xx status code -func (o *GetOrgInvitesNotFound) IsSuccess() bool { - return false -} - -// IsRedirect returns true when this get org invites not found response has a 3xx status code -func (o *GetOrgInvitesNotFound) IsRedirect() bool { - return false -} - -// IsClientError returns true when this get org invites not found response has a 4xx status code -func (o *GetOrgInvitesNotFound) IsClientError() bool { - return true -} - -// IsServerError returns true when this get org invites not found response has a 5xx status code -func (o *GetOrgInvitesNotFound) IsServerError() bool { - return false -} - -// IsCode returns true when this get org invites not found response a status code equal to that given -func (o *GetOrgInvitesNotFound) IsCode(code int) bool { - return code == 404 -} - -// Code gets the status code for the get org invites not found response -func (o *GetOrgInvitesNotFound) Code() int { - return 404 -} - -func (o *GetOrgInvitesNotFound) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /v1/orgs/current/invites][%d] getOrgInvitesNotFound %s", 404, payload) -} - -func (o *GetOrgInvitesNotFound) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /v1/orgs/current/invites][%d] getOrgInvitesNotFound %s", 404, payload) -} - -func (o *GetOrgInvitesNotFound) GetPayload() *models.StderrErrResponse { - return o.Payload -} - -func (o *GetOrgInvitesNotFound) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.StderrErrResponse) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewGetOrgInvitesInternalServerError creates a GetOrgInvitesInternalServerError with default headers values -func NewGetOrgInvitesInternalServerError() *GetOrgInvitesInternalServerError { - return &GetOrgInvitesInternalServerError{} -} - -/* -GetOrgInvitesInternalServerError describes a response with status code 500, with default header values. - -Internal Server Error -*/ -type GetOrgInvitesInternalServerError struct { - Payload *models.StderrErrResponse -} - -// IsSuccess returns true when this get org invites internal server error response has a 2xx status code -func (o *GetOrgInvitesInternalServerError) IsSuccess() bool { - return false -} - -// IsRedirect returns true when this get org invites internal server error response has a 3xx status code -func (o *GetOrgInvitesInternalServerError) IsRedirect() bool { - return false -} - -// IsClientError returns true when this get org invites internal server error response has a 4xx status code -func (o *GetOrgInvitesInternalServerError) IsClientError() bool { - return false -} - -// IsServerError returns true when this get org invites internal server error response has a 5xx status code -func (o *GetOrgInvitesInternalServerError) IsServerError() bool { - return true -} - -// IsCode returns true when this get org invites internal server error response a status code equal to that given -func (o *GetOrgInvitesInternalServerError) IsCode(code int) bool { - return code == 500 -} - -// Code gets the status code for the get org invites internal server error response -func (o *GetOrgInvitesInternalServerError) Code() int { - return 500 -} - -func (o *GetOrgInvitesInternalServerError) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /v1/orgs/current/invites][%d] getOrgInvitesInternalServerError %s", 500, payload) -} - -func (o *GetOrgInvitesInternalServerError) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /v1/orgs/current/invites][%d] getOrgInvitesInternalServerError %s", 500, payload) -} - -func (o *GetOrgInvitesInternalServerError) GetPayload() *models.StderrErrResponse { - return o.Payload -} - -func (o *GetOrgInvitesInternalServerError) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.StderrErrResponse) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} diff --git a/client/operations/get_org_parameters.go b/client/operations/get_org_parameters.go deleted file mode 100644 index cb0cb3b..0000000 --- a/client/operations/get_org_parameters.go +++ /dev/null @@ -1,128 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package operations - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "context" - "net/http" - "time" - - "github.com/go-openapi/errors" - "github.com/go-openapi/runtime" - cr "github.com/go-openapi/runtime/client" - "github.com/go-openapi/strfmt" -) - -// NewGetOrgParams creates a new GetOrgParams object, -// with the default timeout for this client. -// -// Default values are not hydrated, since defaults are normally applied by the API server side. -// -// To enforce default values in parameter, use SetDefaults or WithDefaults. -func NewGetOrgParams() *GetOrgParams { - return &GetOrgParams{ - timeout: cr.DefaultTimeout, - } -} - -// NewGetOrgParamsWithTimeout creates a new GetOrgParams object -// with the ability to set a timeout on a request. -func NewGetOrgParamsWithTimeout(timeout time.Duration) *GetOrgParams { - return &GetOrgParams{ - timeout: timeout, - } -} - -// NewGetOrgParamsWithContext creates a new GetOrgParams object -// with the ability to set a context for a request. -func NewGetOrgParamsWithContext(ctx context.Context) *GetOrgParams { - return &GetOrgParams{ - Context: ctx, - } -} - -// NewGetOrgParamsWithHTTPClient creates a new GetOrgParams object -// with the ability to set a custom HTTPClient for a request. -func NewGetOrgParamsWithHTTPClient(client *http.Client) *GetOrgParams { - return &GetOrgParams{ - HTTPClient: client, - } -} - -/* -GetOrgParams contains all the parameters to send to the API endpoint - - for the get org operation. - - Typically these are written to a http.Request. -*/ -type GetOrgParams struct { - timeout time.Duration - Context context.Context - HTTPClient *http.Client -} - -// WithDefaults hydrates default values in the get org params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *GetOrgParams) WithDefaults() *GetOrgParams { - o.SetDefaults() - return o -} - -// SetDefaults hydrates default values in the get org params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *GetOrgParams) SetDefaults() { - // no default values defined for this parameter -} - -// WithTimeout adds the timeout to the get org params -func (o *GetOrgParams) WithTimeout(timeout time.Duration) *GetOrgParams { - o.SetTimeout(timeout) - return o -} - -// SetTimeout adds the timeout to the get org params -func (o *GetOrgParams) SetTimeout(timeout time.Duration) { - o.timeout = timeout -} - -// WithContext adds the context to the get org params -func (o *GetOrgParams) WithContext(ctx context.Context) *GetOrgParams { - o.SetContext(ctx) - return o -} - -// SetContext adds the context to the get org params -func (o *GetOrgParams) SetContext(ctx context.Context) { - o.Context = ctx -} - -// WithHTTPClient adds the HTTPClient to the get org params -func (o *GetOrgParams) WithHTTPClient(client *http.Client) *GetOrgParams { - o.SetHTTPClient(client) - return o -} - -// SetHTTPClient adds the HTTPClient to the get org params -func (o *GetOrgParams) SetHTTPClient(client *http.Client) { - o.HTTPClient = client -} - -// WriteToRequest writes these params to a swagger request -func (o *GetOrgParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { - - if err := r.SetTimeout(o.timeout); err != nil { - return err - } - var res []error - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} diff --git a/client/operations/get_org_responses.go b/client/operations/get_org_responses.go deleted file mode 100644 index 5d672ba..0000000 --- a/client/operations/get_org_responses.go +++ /dev/null @@ -1,486 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package operations - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "encoding/json" - "fmt" - "io" - - "github.com/go-openapi/runtime" - "github.com/go-openapi/strfmt" - - "github.com/nuonco/nuon-go/models" -) - -// GetOrgReader is a Reader for the GetOrg structure. -type GetOrgReader struct { - formats strfmt.Registry -} - -// ReadResponse reads a server response into the received o. -func (o *GetOrgReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { - switch response.Code() { - case 200: - result := NewGetOrgOK() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return result, nil - case 400: - result := NewGetOrgBadRequest() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return nil, result - case 401: - result := NewGetOrgUnauthorized() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return nil, result - case 403: - result := NewGetOrgForbidden() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return nil, result - case 404: - result := NewGetOrgNotFound() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return nil, result - case 500: - result := NewGetOrgInternalServerError() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return nil, result - default: - return nil, runtime.NewAPIError("[GET /v1/orgs/current] GetOrg", response, response.Code()) - } -} - -// NewGetOrgOK creates a GetOrgOK with default headers values -func NewGetOrgOK() *GetOrgOK { - return &GetOrgOK{} -} - -/* -GetOrgOK describes a response with status code 200, with default header values. - -OK -*/ -type GetOrgOK struct { - Payload *models.AppOrg -} - -// IsSuccess returns true when this get org o k response has a 2xx status code -func (o *GetOrgOK) IsSuccess() bool { - return true -} - -// IsRedirect returns true when this get org o k response has a 3xx status code -func (o *GetOrgOK) IsRedirect() bool { - return false -} - -// IsClientError returns true when this get org o k response has a 4xx status code -func (o *GetOrgOK) IsClientError() bool { - return false -} - -// IsServerError returns true when this get org o k response has a 5xx status code -func (o *GetOrgOK) IsServerError() bool { - return false -} - -// IsCode returns true when this get org o k response a status code equal to that given -func (o *GetOrgOK) IsCode(code int) bool { - return code == 200 -} - -// Code gets the status code for the get org o k response -func (o *GetOrgOK) Code() int { - return 200 -} - -func (o *GetOrgOK) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /v1/orgs/current][%d] getOrgOK %s", 200, payload) -} - -func (o *GetOrgOK) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /v1/orgs/current][%d] getOrgOK %s", 200, payload) -} - -func (o *GetOrgOK) GetPayload() *models.AppOrg { - return o.Payload -} - -func (o *GetOrgOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.AppOrg) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewGetOrgBadRequest creates a GetOrgBadRequest with default headers values -func NewGetOrgBadRequest() *GetOrgBadRequest { - return &GetOrgBadRequest{} -} - -/* -GetOrgBadRequest describes a response with status code 400, with default header values. - -Bad Request -*/ -type GetOrgBadRequest struct { - Payload *models.StderrErrResponse -} - -// IsSuccess returns true when this get org bad request response has a 2xx status code -func (o *GetOrgBadRequest) IsSuccess() bool { - return false -} - -// IsRedirect returns true when this get org bad request response has a 3xx status code -func (o *GetOrgBadRequest) IsRedirect() bool { - return false -} - -// IsClientError returns true when this get org bad request response has a 4xx status code -func (o *GetOrgBadRequest) IsClientError() bool { - return true -} - -// IsServerError returns true when this get org bad request response has a 5xx status code -func (o *GetOrgBadRequest) IsServerError() bool { - return false -} - -// IsCode returns true when this get org bad request response a status code equal to that given -func (o *GetOrgBadRequest) IsCode(code int) bool { - return code == 400 -} - -// Code gets the status code for the get org bad request response -func (o *GetOrgBadRequest) Code() int { - return 400 -} - -func (o *GetOrgBadRequest) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /v1/orgs/current][%d] getOrgBadRequest %s", 400, payload) -} - -func (o *GetOrgBadRequest) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /v1/orgs/current][%d] getOrgBadRequest %s", 400, payload) -} - -func (o *GetOrgBadRequest) GetPayload() *models.StderrErrResponse { - return o.Payload -} - -func (o *GetOrgBadRequest) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.StderrErrResponse) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewGetOrgUnauthorized creates a GetOrgUnauthorized with default headers values -func NewGetOrgUnauthorized() *GetOrgUnauthorized { - return &GetOrgUnauthorized{} -} - -/* -GetOrgUnauthorized describes a response with status code 401, with default header values. - -Unauthorized -*/ -type GetOrgUnauthorized struct { - Payload *models.StderrErrResponse -} - -// IsSuccess returns true when this get org unauthorized response has a 2xx status code -func (o *GetOrgUnauthorized) IsSuccess() bool { - return false -} - -// IsRedirect returns true when this get org unauthorized response has a 3xx status code -func (o *GetOrgUnauthorized) IsRedirect() bool { - return false -} - -// IsClientError returns true when this get org unauthorized response has a 4xx status code -func (o *GetOrgUnauthorized) IsClientError() bool { - return true -} - -// IsServerError returns true when this get org unauthorized response has a 5xx status code -func (o *GetOrgUnauthorized) IsServerError() bool { - return false -} - -// IsCode returns true when this get org unauthorized response a status code equal to that given -func (o *GetOrgUnauthorized) IsCode(code int) bool { - return code == 401 -} - -// Code gets the status code for the get org unauthorized response -func (o *GetOrgUnauthorized) Code() int { - return 401 -} - -func (o *GetOrgUnauthorized) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /v1/orgs/current][%d] getOrgUnauthorized %s", 401, payload) -} - -func (o *GetOrgUnauthorized) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /v1/orgs/current][%d] getOrgUnauthorized %s", 401, payload) -} - -func (o *GetOrgUnauthorized) GetPayload() *models.StderrErrResponse { - return o.Payload -} - -func (o *GetOrgUnauthorized) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.StderrErrResponse) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewGetOrgForbidden creates a GetOrgForbidden with default headers values -func NewGetOrgForbidden() *GetOrgForbidden { - return &GetOrgForbidden{} -} - -/* -GetOrgForbidden describes a response with status code 403, with default header values. - -Forbidden -*/ -type GetOrgForbidden struct { - Payload *models.StderrErrResponse -} - -// IsSuccess returns true when this get org forbidden response has a 2xx status code -func (o *GetOrgForbidden) IsSuccess() bool { - return false -} - -// IsRedirect returns true when this get org forbidden response has a 3xx status code -func (o *GetOrgForbidden) IsRedirect() bool { - return false -} - -// IsClientError returns true when this get org forbidden response has a 4xx status code -func (o *GetOrgForbidden) IsClientError() bool { - return true -} - -// IsServerError returns true when this get org forbidden response has a 5xx status code -func (o *GetOrgForbidden) IsServerError() bool { - return false -} - -// IsCode returns true when this get org forbidden response a status code equal to that given -func (o *GetOrgForbidden) IsCode(code int) bool { - return code == 403 -} - -// Code gets the status code for the get org forbidden response -func (o *GetOrgForbidden) Code() int { - return 403 -} - -func (o *GetOrgForbidden) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /v1/orgs/current][%d] getOrgForbidden %s", 403, payload) -} - -func (o *GetOrgForbidden) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /v1/orgs/current][%d] getOrgForbidden %s", 403, payload) -} - -func (o *GetOrgForbidden) GetPayload() *models.StderrErrResponse { - return o.Payload -} - -func (o *GetOrgForbidden) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.StderrErrResponse) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewGetOrgNotFound creates a GetOrgNotFound with default headers values -func NewGetOrgNotFound() *GetOrgNotFound { - return &GetOrgNotFound{} -} - -/* -GetOrgNotFound describes a response with status code 404, with default header values. - -Not Found -*/ -type GetOrgNotFound struct { - Payload *models.StderrErrResponse -} - -// IsSuccess returns true when this get org not found response has a 2xx status code -func (o *GetOrgNotFound) IsSuccess() bool { - return false -} - -// IsRedirect returns true when this get org not found response has a 3xx status code -func (o *GetOrgNotFound) IsRedirect() bool { - return false -} - -// IsClientError returns true when this get org not found response has a 4xx status code -func (o *GetOrgNotFound) IsClientError() bool { - return true -} - -// IsServerError returns true when this get org not found response has a 5xx status code -func (o *GetOrgNotFound) IsServerError() bool { - return false -} - -// IsCode returns true when this get org not found response a status code equal to that given -func (o *GetOrgNotFound) IsCode(code int) bool { - return code == 404 -} - -// Code gets the status code for the get org not found response -func (o *GetOrgNotFound) Code() int { - return 404 -} - -func (o *GetOrgNotFound) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /v1/orgs/current][%d] getOrgNotFound %s", 404, payload) -} - -func (o *GetOrgNotFound) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /v1/orgs/current][%d] getOrgNotFound %s", 404, payload) -} - -func (o *GetOrgNotFound) GetPayload() *models.StderrErrResponse { - return o.Payload -} - -func (o *GetOrgNotFound) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.StderrErrResponse) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewGetOrgInternalServerError creates a GetOrgInternalServerError with default headers values -func NewGetOrgInternalServerError() *GetOrgInternalServerError { - return &GetOrgInternalServerError{} -} - -/* -GetOrgInternalServerError describes a response with status code 500, with default header values. - -Internal Server Error -*/ -type GetOrgInternalServerError struct { - Payload *models.StderrErrResponse -} - -// IsSuccess returns true when this get org internal server error response has a 2xx status code -func (o *GetOrgInternalServerError) IsSuccess() bool { - return false -} - -// IsRedirect returns true when this get org internal server error response has a 3xx status code -func (o *GetOrgInternalServerError) IsRedirect() bool { - return false -} - -// IsClientError returns true when this get org internal server error response has a 4xx status code -func (o *GetOrgInternalServerError) IsClientError() bool { - return false -} - -// IsServerError returns true when this get org internal server error response has a 5xx status code -func (o *GetOrgInternalServerError) IsServerError() bool { - return true -} - -// IsCode returns true when this get org internal server error response a status code equal to that given -func (o *GetOrgInternalServerError) IsCode(code int) bool { - return code == 500 -} - -// Code gets the status code for the get org internal server error response -func (o *GetOrgInternalServerError) Code() int { - return 500 -} - -func (o *GetOrgInternalServerError) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /v1/orgs/current][%d] getOrgInternalServerError %s", 500, payload) -} - -func (o *GetOrgInternalServerError) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /v1/orgs/current][%d] getOrgInternalServerError %s", 500, payload) -} - -func (o *GetOrgInternalServerError) GetPayload() *models.StderrErrResponse { - return o.Payload -} - -func (o *GetOrgInternalServerError) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.StderrErrResponse) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} diff --git a/client/operations/get_org_v_c_s_connections_parameters.go b/client/operations/get_org_v_c_s_connections_parameters.go deleted file mode 100644 index a52c796..0000000 --- a/client/operations/get_org_v_c_s_connections_parameters.go +++ /dev/null @@ -1,128 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package operations - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "context" - "net/http" - "time" - - "github.com/go-openapi/errors" - "github.com/go-openapi/runtime" - cr "github.com/go-openapi/runtime/client" - "github.com/go-openapi/strfmt" -) - -// NewGetOrgVCSConnectionsParams creates a new GetOrgVCSConnectionsParams object, -// with the default timeout for this client. -// -// Default values are not hydrated, since defaults are normally applied by the API server side. -// -// To enforce default values in parameter, use SetDefaults or WithDefaults. -func NewGetOrgVCSConnectionsParams() *GetOrgVCSConnectionsParams { - return &GetOrgVCSConnectionsParams{ - timeout: cr.DefaultTimeout, - } -} - -// NewGetOrgVCSConnectionsParamsWithTimeout creates a new GetOrgVCSConnectionsParams object -// with the ability to set a timeout on a request. -func NewGetOrgVCSConnectionsParamsWithTimeout(timeout time.Duration) *GetOrgVCSConnectionsParams { - return &GetOrgVCSConnectionsParams{ - timeout: timeout, - } -} - -// NewGetOrgVCSConnectionsParamsWithContext creates a new GetOrgVCSConnectionsParams object -// with the ability to set a context for a request. -func NewGetOrgVCSConnectionsParamsWithContext(ctx context.Context) *GetOrgVCSConnectionsParams { - return &GetOrgVCSConnectionsParams{ - Context: ctx, - } -} - -// NewGetOrgVCSConnectionsParamsWithHTTPClient creates a new GetOrgVCSConnectionsParams object -// with the ability to set a custom HTTPClient for a request. -func NewGetOrgVCSConnectionsParamsWithHTTPClient(client *http.Client) *GetOrgVCSConnectionsParams { - return &GetOrgVCSConnectionsParams{ - HTTPClient: client, - } -} - -/* -GetOrgVCSConnectionsParams contains all the parameters to send to the API endpoint - - for the get org v c s connections operation. - - Typically these are written to a http.Request. -*/ -type GetOrgVCSConnectionsParams struct { - timeout time.Duration - Context context.Context - HTTPClient *http.Client -} - -// WithDefaults hydrates default values in the get org v c s connections params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *GetOrgVCSConnectionsParams) WithDefaults() *GetOrgVCSConnectionsParams { - o.SetDefaults() - return o -} - -// SetDefaults hydrates default values in the get org v c s connections params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *GetOrgVCSConnectionsParams) SetDefaults() { - // no default values defined for this parameter -} - -// WithTimeout adds the timeout to the get org v c s connections params -func (o *GetOrgVCSConnectionsParams) WithTimeout(timeout time.Duration) *GetOrgVCSConnectionsParams { - o.SetTimeout(timeout) - return o -} - -// SetTimeout adds the timeout to the get org v c s connections params -func (o *GetOrgVCSConnectionsParams) SetTimeout(timeout time.Duration) { - o.timeout = timeout -} - -// WithContext adds the context to the get org v c s connections params -func (o *GetOrgVCSConnectionsParams) WithContext(ctx context.Context) *GetOrgVCSConnectionsParams { - o.SetContext(ctx) - return o -} - -// SetContext adds the context to the get org v c s connections params -func (o *GetOrgVCSConnectionsParams) SetContext(ctx context.Context) { - o.Context = ctx -} - -// WithHTTPClient adds the HTTPClient to the get org v c s connections params -func (o *GetOrgVCSConnectionsParams) WithHTTPClient(client *http.Client) *GetOrgVCSConnectionsParams { - o.SetHTTPClient(client) - return o -} - -// SetHTTPClient adds the HTTPClient to the get org v c s connections params -func (o *GetOrgVCSConnectionsParams) SetHTTPClient(client *http.Client) { - o.HTTPClient = client -} - -// WriteToRequest writes these params to a swagger request -func (o *GetOrgVCSConnectionsParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { - - if err := r.SetTimeout(o.timeout); err != nil { - return err - } - var res []error - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} diff --git a/client/operations/get_org_v_c_s_connections_responses.go b/client/operations/get_org_v_c_s_connections_responses.go deleted file mode 100644 index 37b3421..0000000 --- a/client/operations/get_org_v_c_s_connections_responses.go +++ /dev/null @@ -1,484 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package operations - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "encoding/json" - "fmt" - "io" - - "github.com/go-openapi/runtime" - "github.com/go-openapi/strfmt" - - "github.com/nuonco/nuon-go/models" -) - -// GetOrgVCSConnectionsReader is a Reader for the GetOrgVCSConnections structure. -type GetOrgVCSConnectionsReader struct { - formats strfmt.Registry -} - -// ReadResponse reads a server response into the received o. -func (o *GetOrgVCSConnectionsReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { - switch response.Code() { - case 200: - result := NewGetOrgVCSConnectionsOK() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return result, nil - case 400: - result := NewGetOrgVCSConnectionsBadRequest() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return nil, result - case 401: - result := NewGetOrgVCSConnectionsUnauthorized() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return nil, result - case 403: - result := NewGetOrgVCSConnectionsForbidden() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return nil, result - case 404: - result := NewGetOrgVCSConnectionsNotFound() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return nil, result - case 500: - result := NewGetOrgVCSConnectionsInternalServerError() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return nil, result - default: - return nil, runtime.NewAPIError("[GET /v1/vcs/connections] GetOrgVCSConnections", response, response.Code()) - } -} - -// NewGetOrgVCSConnectionsOK creates a GetOrgVCSConnectionsOK with default headers values -func NewGetOrgVCSConnectionsOK() *GetOrgVCSConnectionsOK { - return &GetOrgVCSConnectionsOK{} -} - -/* -GetOrgVCSConnectionsOK describes a response with status code 200, with default header values. - -OK -*/ -type GetOrgVCSConnectionsOK struct { - Payload []*models.AppVCSConnection -} - -// IsSuccess returns true when this get org v c s connections o k response has a 2xx status code -func (o *GetOrgVCSConnectionsOK) IsSuccess() bool { - return true -} - -// IsRedirect returns true when this get org v c s connections o k response has a 3xx status code -func (o *GetOrgVCSConnectionsOK) IsRedirect() bool { - return false -} - -// IsClientError returns true when this get org v c s connections o k response has a 4xx status code -func (o *GetOrgVCSConnectionsOK) IsClientError() bool { - return false -} - -// IsServerError returns true when this get org v c s connections o k response has a 5xx status code -func (o *GetOrgVCSConnectionsOK) IsServerError() bool { - return false -} - -// IsCode returns true when this get org v c s connections o k response a status code equal to that given -func (o *GetOrgVCSConnectionsOK) IsCode(code int) bool { - return code == 200 -} - -// Code gets the status code for the get org v c s connections o k response -func (o *GetOrgVCSConnectionsOK) Code() int { - return 200 -} - -func (o *GetOrgVCSConnectionsOK) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /v1/vcs/connections][%d] getOrgVCSConnectionsOK %s", 200, payload) -} - -func (o *GetOrgVCSConnectionsOK) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /v1/vcs/connections][%d] getOrgVCSConnectionsOK %s", 200, payload) -} - -func (o *GetOrgVCSConnectionsOK) GetPayload() []*models.AppVCSConnection { - return o.Payload -} - -func (o *GetOrgVCSConnectionsOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - // response payload - if err := consumer.Consume(response.Body(), &o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewGetOrgVCSConnectionsBadRequest creates a GetOrgVCSConnectionsBadRequest with default headers values -func NewGetOrgVCSConnectionsBadRequest() *GetOrgVCSConnectionsBadRequest { - return &GetOrgVCSConnectionsBadRequest{} -} - -/* -GetOrgVCSConnectionsBadRequest describes a response with status code 400, with default header values. - -Bad Request -*/ -type GetOrgVCSConnectionsBadRequest struct { - Payload *models.StderrErrResponse -} - -// IsSuccess returns true when this get org v c s connections bad request response has a 2xx status code -func (o *GetOrgVCSConnectionsBadRequest) IsSuccess() bool { - return false -} - -// IsRedirect returns true when this get org v c s connections bad request response has a 3xx status code -func (o *GetOrgVCSConnectionsBadRequest) IsRedirect() bool { - return false -} - -// IsClientError returns true when this get org v c s connections bad request response has a 4xx status code -func (o *GetOrgVCSConnectionsBadRequest) IsClientError() bool { - return true -} - -// IsServerError returns true when this get org v c s connections bad request response has a 5xx status code -func (o *GetOrgVCSConnectionsBadRequest) IsServerError() bool { - return false -} - -// IsCode returns true when this get org v c s connections bad request response a status code equal to that given -func (o *GetOrgVCSConnectionsBadRequest) IsCode(code int) bool { - return code == 400 -} - -// Code gets the status code for the get org v c s connections bad request response -func (o *GetOrgVCSConnectionsBadRequest) Code() int { - return 400 -} - -func (o *GetOrgVCSConnectionsBadRequest) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /v1/vcs/connections][%d] getOrgVCSConnectionsBadRequest %s", 400, payload) -} - -func (o *GetOrgVCSConnectionsBadRequest) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /v1/vcs/connections][%d] getOrgVCSConnectionsBadRequest %s", 400, payload) -} - -func (o *GetOrgVCSConnectionsBadRequest) GetPayload() *models.StderrErrResponse { - return o.Payload -} - -func (o *GetOrgVCSConnectionsBadRequest) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.StderrErrResponse) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewGetOrgVCSConnectionsUnauthorized creates a GetOrgVCSConnectionsUnauthorized with default headers values -func NewGetOrgVCSConnectionsUnauthorized() *GetOrgVCSConnectionsUnauthorized { - return &GetOrgVCSConnectionsUnauthorized{} -} - -/* -GetOrgVCSConnectionsUnauthorized describes a response with status code 401, with default header values. - -Unauthorized -*/ -type GetOrgVCSConnectionsUnauthorized struct { - Payload *models.StderrErrResponse -} - -// IsSuccess returns true when this get org v c s connections unauthorized response has a 2xx status code -func (o *GetOrgVCSConnectionsUnauthorized) IsSuccess() bool { - return false -} - -// IsRedirect returns true when this get org v c s connections unauthorized response has a 3xx status code -func (o *GetOrgVCSConnectionsUnauthorized) IsRedirect() bool { - return false -} - -// IsClientError returns true when this get org v c s connections unauthorized response has a 4xx status code -func (o *GetOrgVCSConnectionsUnauthorized) IsClientError() bool { - return true -} - -// IsServerError returns true when this get org v c s connections unauthorized response has a 5xx status code -func (o *GetOrgVCSConnectionsUnauthorized) IsServerError() bool { - return false -} - -// IsCode returns true when this get org v c s connections unauthorized response a status code equal to that given -func (o *GetOrgVCSConnectionsUnauthorized) IsCode(code int) bool { - return code == 401 -} - -// Code gets the status code for the get org v c s connections unauthorized response -func (o *GetOrgVCSConnectionsUnauthorized) Code() int { - return 401 -} - -func (o *GetOrgVCSConnectionsUnauthorized) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /v1/vcs/connections][%d] getOrgVCSConnectionsUnauthorized %s", 401, payload) -} - -func (o *GetOrgVCSConnectionsUnauthorized) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /v1/vcs/connections][%d] getOrgVCSConnectionsUnauthorized %s", 401, payload) -} - -func (o *GetOrgVCSConnectionsUnauthorized) GetPayload() *models.StderrErrResponse { - return o.Payload -} - -func (o *GetOrgVCSConnectionsUnauthorized) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.StderrErrResponse) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewGetOrgVCSConnectionsForbidden creates a GetOrgVCSConnectionsForbidden with default headers values -func NewGetOrgVCSConnectionsForbidden() *GetOrgVCSConnectionsForbidden { - return &GetOrgVCSConnectionsForbidden{} -} - -/* -GetOrgVCSConnectionsForbidden describes a response with status code 403, with default header values. - -Forbidden -*/ -type GetOrgVCSConnectionsForbidden struct { - Payload *models.StderrErrResponse -} - -// IsSuccess returns true when this get org v c s connections forbidden response has a 2xx status code -func (o *GetOrgVCSConnectionsForbidden) IsSuccess() bool { - return false -} - -// IsRedirect returns true when this get org v c s connections forbidden response has a 3xx status code -func (o *GetOrgVCSConnectionsForbidden) IsRedirect() bool { - return false -} - -// IsClientError returns true when this get org v c s connections forbidden response has a 4xx status code -func (o *GetOrgVCSConnectionsForbidden) IsClientError() bool { - return true -} - -// IsServerError returns true when this get org v c s connections forbidden response has a 5xx status code -func (o *GetOrgVCSConnectionsForbidden) IsServerError() bool { - return false -} - -// IsCode returns true when this get org v c s connections forbidden response a status code equal to that given -func (o *GetOrgVCSConnectionsForbidden) IsCode(code int) bool { - return code == 403 -} - -// Code gets the status code for the get org v c s connections forbidden response -func (o *GetOrgVCSConnectionsForbidden) Code() int { - return 403 -} - -func (o *GetOrgVCSConnectionsForbidden) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /v1/vcs/connections][%d] getOrgVCSConnectionsForbidden %s", 403, payload) -} - -func (o *GetOrgVCSConnectionsForbidden) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /v1/vcs/connections][%d] getOrgVCSConnectionsForbidden %s", 403, payload) -} - -func (o *GetOrgVCSConnectionsForbidden) GetPayload() *models.StderrErrResponse { - return o.Payload -} - -func (o *GetOrgVCSConnectionsForbidden) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.StderrErrResponse) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewGetOrgVCSConnectionsNotFound creates a GetOrgVCSConnectionsNotFound with default headers values -func NewGetOrgVCSConnectionsNotFound() *GetOrgVCSConnectionsNotFound { - return &GetOrgVCSConnectionsNotFound{} -} - -/* -GetOrgVCSConnectionsNotFound describes a response with status code 404, with default header values. - -Not Found -*/ -type GetOrgVCSConnectionsNotFound struct { - Payload *models.StderrErrResponse -} - -// IsSuccess returns true when this get org v c s connections not found response has a 2xx status code -func (o *GetOrgVCSConnectionsNotFound) IsSuccess() bool { - return false -} - -// IsRedirect returns true when this get org v c s connections not found response has a 3xx status code -func (o *GetOrgVCSConnectionsNotFound) IsRedirect() bool { - return false -} - -// IsClientError returns true when this get org v c s connections not found response has a 4xx status code -func (o *GetOrgVCSConnectionsNotFound) IsClientError() bool { - return true -} - -// IsServerError returns true when this get org v c s connections not found response has a 5xx status code -func (o *GetOrgVCSConnectionsNotFound) IsServerError() bool { - return false -} - -// IsCode returns true when this get org v c s connections not found response a status code equal to that given -func (o *GetOrgVCSConnectionsNotFound) IsCode(code int) bool { - return code == 404 -} - -// Code gets the status code for the get org v c s connections not found response -func (o *GetOrgVCSConnectionsNotFound) Code() int { - return 404 -} - -func (o *GetOrgVCSConnectionsNotFound) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /v1/vcs/connections][%d] getOrgVCSConnectionsNotFound %s", 404, payload) -} - -func (o *GetOrgVCSConnectionsNotFound) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /v1/vcs/connections][%d] getOrgVCSConnectionsNotFound %s", 404, payload) -} - -func (o *GetOrgVCSConnectionsNotFound) GetPayload() *models.StderrErrResponse { - return o.Payload -} - -func (o *GetOrgVCSConnectionsNotFound) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.StderrErrResponse) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewGetOrgVCSConnectionsInternalServerError creates a GetOrgVCSConnectionsInternalServerError with default headers values -func NewGetOrgVCSConnectionsInternalServerError() *GetOrgVCSConnectionsInternalServerError { - return &GetOrgVCSConnectionsInternalServerError{} -} - -/* -GetOrgVCSConnectionsInternalServerError describes a response with status code 500, with default header values. - -Internal Server Error -*/ -type GetOrgVCSConnectionsInternalServerError struct { - Payload *models.StderrErrResponse -} - -// IsSuccess returns true when this get org v c s connections internal server error response has a 2xx status code -func (o *GetOrgVCSConnectionsInternalServerError) IsSuccess() bool { - return false -} - -// IsRedirect returns true when this get org v c s connections internal server error response has a 3xx status code -func (o *GetOrgVCSConnectionsInternalServerError) IsRedirect() bool { - return false -} - -// IsClientError returns true when this get org v c s connections internal server error response has a 4xx status code -func (o *GetOrgVCSConnectionsInternalServerError) IsClientError() bool { - return false -} - -// IsServerError returns true when this get org v c s connections internal server error response has a 5xx status code -func (o *GetOrgVCSConnectionsInternalServerError) IsServerError() bool { - return true -} - -// IsCode returns true when this get org v c s connections internal server error response a status code equal to that given -func (o *GetOrgVCSConnectionsInternalServerError) IsCode(code int) bool { - return code == 500 -} - -// Code gets the status code for the get org v c s connections internal server error response -func (o *GetOrgVCSConnectionsInternalServerError) Code() int { - return 500 -} - -func (o *GetOrgVCSConnectionsInternalServerError) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /v1/vcs/connections][%d] getOrgVCSConnectionsInternalServerError %s", 500, payload) -} - -func (o *GetOrgVCSConnectionsInternalServerError) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /v1/vcs/connections][%d] getOrgVCSConnectionsInternalServerError %s", 500, payload) -} - -func (o *GetOrgVCSConnectionsInternalServerError) GetPayload() *models.StderrErrResponse { - return o.Payload -} - -func (o *GetOrgVCSConnectionsInternalServerError) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.StderrErrResponse) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} diff --git a/client/operations/get_orgs_parameters.go b/client/operations/get_orgs_parameters.go deleted file mode 100644 index d8be850..0000000 --- a/client/operations/get_orgs_parameters.go +++ /dev/null @@ -1,128 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package operations - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "context" - "net/http" - "time" - - "github.com/go-openapi/errors" - "github.com/go-openapi/runtime" - cr "github.com/go-openapi/runtime/client" - "github.com/go-openapi/strfmt" -) - -// NewGetOrgsParams creates a new GetOrgsParams object, -// with the default timeout for this client. -// -// Default values are not hydrated, since defaults are normally applied by the API server side. -// -// To enforce default values in parameter, use SetDefaults or WithDefaults. -func NewGetOrgsParams() *GetOrgsParams { - return &GetOrgsParams{ - timeout: cr.DefaultTimeout, - } -} - -// NewGetOrgsParamsWithTimeout creates a new GetOrgsParams object -// with the ability to set a timeout on a request. -func NewGetOrgsParamsWithTimeout(timeout time.Duration) *GetOrgsParams { - return &GetOrgsParams{ - timeout: timeout, - } -} - -// NewGetOrgsParamsWithContext creates a new GetOrgsParams object -// with the ability to set a context for a request. -func NewGetOrgsParamsWithContext(ctx context.Context) *GetOrgsParams { - return &GetOrgsParams{ - Context: ctx, - } -} - -// NewGetOrgsParamsWithHTTPClient creates a new GetOrgsParams object -// with the ability to set a custom HTTPClient for a request. -func NewGetOrgsParamsWithHTTPClient(client *http.Client) *GetOrgsParams { - return &GetOrgsParams{ - HTTPClient: client, - } -} - -/* -GetOrgsParams contains all the parameters to send to the API endpoint - - for the get orgs operation. - - Typically these are written to a http.Request. -*/ -type GetOrgsParams struct { - timeout time.Duration - Context context.Context - HTTPClient *http.Client -} - -// WithDefaults hydrates default values in the get orgs params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *GetOrgsParams) WithDefaults() *GetOrgsParams { - o.SetDefaults() - return o -} - -// SetDefaults hydrates default values in the get orgs params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *GetOrgsParams) SetDefaults() { - // no default values defined for this parameter -} - -// WithTimeout adds the timeout to the get orgs params -func (o *GetOrgsParams) WithTimeout(timeout time.Duration) *GetOrgsParams { - o.SetTimeout(timeout) - return o -} - -// SetTimeout adds the timeout to the get orgs params -func (o *GetOrgsParams) SetTimeout(timeout time.Duration) { - o.timeout = timeout -} - -// WithContext adds the context to the get orgs params -func (o *GetOrgsParams) WithContext(ctx context.Context) *GetOrgsParams { - o.SetContext(ctx) - return o -} - -// SetContext adds the context to the get orgs params -func (o *GetOrgsParams) SetContext(ctx context.Context) { - o.Context = ctx -} - -// WithHTTPClient adds the HTTPClient to the get orgs params -func (o *GetOrgsParams) WithHTTPClient(client *http.Client) *GetOrgsParams { - o.SetHTTPClient(client) - return o -} - -// SetHTTPClient adds the HTTPClient to the get orgs params -func (o *GetOrgsParams) SetHTTPClient(client *http.Client) { - o.HTTPClient = client -} - -// WriteToRequest writes these params to a swagger request -func (o *GetOrgsParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { - - if err := r.SetTimeout(o.timeout); err != nil { - return err - } - var res []error - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} diff --git a/client/operations/get_orgs_responses.go b/client/operations/get_orgs_responses.go deleted file mode 100644 index 60f1dde..0000000 --- a/client/operations/get_orgs_responses.go +++ /dev/null @@ -1,484 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package operations - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "encoding/json" - "fmt" - "io" - - "github.com/go-openapi/runtime" - "github.com/go-openapi/strfmt" - - "github.com/nuonco/nuon-go/models" -) - -// GetOrgsReader is a Reader for the GetOrgs structure. -type GetOrgsReader struct { - formats strfmt.Registry -} - -// ReadResponse reads a server response into the received o. -func (o *GetOrgsReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { - switch response.Code() { - case 200: - result := NewGetOrgsOK() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return result, nil - case 400: - result := NewGetOrgsBadRequest() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return nil, result - case 401: - result := NewGetOrgsUnauthorized() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return nil, result - case 403: - result := NewGetOrgsForbidden() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return nil, result - case 404: - result := NewGetOrgsNotFound() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return nil, result - case 500: - result := NewGetOrgsInternalServerError() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return nil, result - default: - return nil, runtime.NewAPIError("[GET /v1/orgs] GetOrgs", response, response.Code()) - } -} - -// NewGetOrgsOK creates a GetOrgsOK with default headers values -func NewGetOrgsOK() *GetOrgsOK { - return &GetOrgsOK{} -} - -/* -GetOrgsOK describes a response with status code 200, with default header values. - -OK -*/ -type GetOrgsOK struct { - Payload []*models.AppOrg -} - -// IsSuccess returns true when this get orgs o k response has a 2xx status code -func (o *GetOrgsOK) IsSuccess() bool { - return true -} - -// IsRedirect returns true when this get orgs o k response has a 3xx status code -func (o *GetOrgsOK) IsRedirect() bool { - return false -} - -// IsClientError returns true when this get orgs o k response has a 4xx status code -func (o *GetOrgsOK) IsClientError() bool { - return false -} - -// IsServerError returns true when this get orgs o k response has a 5xx status code -func (o *GetOrgsOK) IsServerError() bool { - return false -} - -// IsCode returns true when this get orgs o k response a status code equal to that given -func (o *GetOrgsOK) IsCode(code int) bool { - return code == 200 -} - -// Code gets the status code for the get orgs o k response -func (o *GetOrgsOK) Code() int { - return 200 -} - -func (o *GetOrgsOK) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /v1/orgs][%d] getOrgsOK %s", 200, payload) -} - -func (o *GetOrgsOK) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /v1/orgs][%d] getOrgsOK %s", 200, payload) -} - -func (o *GetOrgsOK) GetPayload() []*models.AppOrg { - return o.Payload -} - -func (o *GetOrgsOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - // response payload - if err := consumer.Consume(response.Body(), &o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewGetOrgsBadRequest creates a GetOrgsBadRequest with default headers values -func NewGetOrgsBadRequest() *GetOrgsBadRequest { - return &GetOrgsBadRequest{} -} - -/* -GetOrgsBadRequest describes a response with status code 400, with default header values. - -Bad Request -*/ -type GetOrgsBadRequest struct { - Payload *models.StderrErrResponse -} - -// IsSuccess returns true when this get orgs bad request response has a 2xx status code -func (o *GetOrgsBadRequest) IsSuccess() bool { - return false -} - -// IsRedirect returns true when this get orgs bad request response has a 3xx status code -func (o *GetOrgsBadRequest) IsRedirect() bool { - return false -} - -// IsClientError returns true when this get orgs bad request response has a 4xx status code -func (o *GetOrgsBadRequest) IsClientError() bool { - return true -} - -// IsServerError returns true when this get orgs bad request response has a 5xx status code -func (o *GetOrgsBadRequest) IsServerError() bool { - return false -} - -// IsCode returns true when this get orgs bad request response a status code equal to that given -func (o *GetOrgsBadRequest) IsCode(code int) bool { - return code == 400 -} - -// Code gets the status code for the get orgs bad request response -func (o *GetOrgsBadRequest) Code() int { - return 400 -} - -func (o *GetOrgsBadRequest) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /v1/orgs][%d] getOrgsBadRequest %s", 400, payload) -} - -func (o *GetOrgsBadRequest) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /v1/orgs][%d] getOrgsBadRequest %s", 400, payload) -} - -func (o *GetOrgsBadRequest) GetPayload() *models.StderrErrResponse { - return o.Payload -} - -func (o *GetOrgsBadRequest) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.StderrErrResponse) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewGetOrgsUnauthorized creates a GetOrgsUnauthorized with default headers values -func NewGetOrgsUnauthorized() *GetOrgsUnauthorized { - return &GetOrgsUnauthorized{} -} - -/* -GetOrgsUnauthorized describes a response with status code 401, with default header values. - -Unauthorized -*/ -type GetOrgsUnauthorized struct { - Payload *models.StderrErrResponse -} - -// IsSuccess returns true when this get orgs unauthorized response has a 2xx status code -func (o *GetOrgsUnauthorized) IsSuccess() bool { - return false -} - -// IsRedirect returns true when this get orgs unauthorized response has a 3xx status code -func (o *GetOrgsUnauthorized) IsRedirect() bool { - return false -} - -// IsClientError returns true when this get orgs unauthorized response has a 4xx status code -func (o *GetOrgsUnauthorized) IsClientError() bool { - return true -} - -// IsServerError returns true when this get orgs unauthorized response has a 5xx status code -func (o *GetOrgsUnauthorized) IsServerError() bool { - return false -} - -// IsCode returns true when this get orgs unauthorized response a status code equal to that given -func (o *GetOrgsUnauthorized) IsCode(code int) bool { - return code == 401 -} - -// Code gets the status code for the get orgs unauthorized response -func (o *GetOrgsUnauthorized) Code() int { - return 401 -} - -func (o *GetOrgsUnauthorized) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /v1/orgs][%d] getOrgsUnauthorized %s", 401, payload) -} - -func (o *GetOrgsUnauthorized) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /v1/orgs][%d] getOrgsUnauthorized %s", 401, payload) -} - -func (o *GetOrgsUnauthorized) GetPayload() *models.StderrErrResponse { - return o.Payload -} - -func (o *GetOrgsUnauthorized) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.StderrErrResponse) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewGetOrgsForbidden creates a GetOrgsForbidden with default headers values -func NewGetOrgsForbidden() *GetOrgsForbidden { - return &GetOrgsForbidden{} -} - -/* -GetOrgsForbidden describes a response with status code 403, with default header values. - -Forbidden -*/ -type GetOrgsForbidden struct { - Payload *models.StderrErrResponse -} - -// IsSuccess returns true when this get orgs forbidden response has a 2xx status code -func (o *GetOrgsForbidden) IsSuccess() bool { - return false -} - -// IsRedirect returns true when this get orgs forbidden response has a 3xx status code -func (o *GetOrgsForbidden) IsRedirect() bool { - return false -} - -// IsClientError returns true when this get orgs forbidden response has a 4xx status code -func (o *GetOrgsForbidden) IsClientError() bool { - return true -} - -// IsServerError returns true when this get orgs forbidden response has a 5xx status code -func (o *GetOrgsForbidden) IsServerError() bool { - return false -} - -// IsCode returns true when this get orgs forbidden response a status code equal to that given -func (o *GetOrgsForbidden) IsCode(code int) bool { - return code == 403 -} - -// Code gets the status code for the get orgs forbidden response -func (o *GetOrgsForbidden) Code() int { - return 403 -} - -func (o *GetOrgsForbidden) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /v1/orgs][%d] getOrgsForbidden %s", 403, payload) -} - -func (o *GetOrgsForbidden) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /v1/orgs][%d] getOrgsForbidden %s", 403, payload) -} - -func (o *GetOrgsForbidden) GetPayload() *models.StderrErrResponse { - return o.Payload -} - -func (o *GetOrgsForbidden) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.StderrErrResponse) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewGetOrgsNotFound creates a GetOrgsNotFound with default headers values -func NewGetOrgsNotFound() *GetOrgsNotFound { - return &GetOrgsNotFound{} -} - -/* -GetOrgsNotFound describes a response with status code 404, with default header values. - -Not Found -*/ -type GetOrgsNotFound struct { - Payload *models.StderrErrResponse -} - -// IsSuccess returns true when this get orgs not found response has a 2xx status code -func (o *GetOrgsNotFound) IsSuccess() bool { - return false -} - -// IsRedirect returns true when this get orgs not found response has a 3xx status code -func (o *GetOrgsNotFound) IsRedirect() bool { - return false -} - -// IsClientError returns true when this get orgs not found response has a 4xx status code -func (o *GetOrgsNotFound) IsClientError() bool { - return true -} - -// IsServerError returns true when this get orgs not found response has a 5xx status code -func (o *GetOrgsNotFound) IsServerError() bool { - return false -} - -// IsCode returns true when this get orgs not found response a status code equal to that given -func (o *GetOrgsNotFound) IsCode(code int) bool { - return code == 404 -} - -// Code gets the status code for the get orgs not found response -func (o *GetOrgsNotFound) Code() int { - return 404 -} - -func (o *GetOrgsNotFound) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /v1/orgs][%d] getOrgsNotFound %s", 404, payload) -} - -func (o *GetOrgsNotFound) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /v1/orgs][%d] getOrgsNotFound %s", 404, payload) -} - -func (o *GetOrgsNotFound) GetPayload() *models.StderrErrResponse { - return o.Payload -} - -func (o *GetOrgsNotFound) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.StderrErrResponse) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewGetOrgsInternalServerError creates a GetOrgsInternalServerError with default headers values -func NewGetOrgsInternalServerError() *GetOrgsInternalServerError { - return &GetOrgsInternalServerError{} -} - -/* -GetOrgsInternalServerError describes a response with status code 500, with default header values. - -Internal Server Error -*/ -type GetOrgsInternalServerError struct { - Payload *models.StderrErrResponse -} - -// IsSuccess returns true when this get orgs internal server error response has a 2xx status code -func (o *GetOrgsInternalServerError) IsSuccess() bool { - return false -} - -// IsRedirect returns true when this get orgs internal server error response has a 3xx status code -func (o *GetOrgsInternalServerError) IsRedirect() bool { - return false -} - -// IsClientError returns true when this get orgs internal server error response has a 4xx status code -func (o *GetOrgsInternalServerError) IsClientError() bool { - return false -} - -// IsServerError returns true when this get orgs internal server error response has a 5xx status code -func (o *GetOrgsInternalServerError) IsServerError() bool { - return true -} - -// IsCode returns true when this get orgs internal server error response a status code equal to that given -func (o *GetOrgsInternalServerError) IsCode(code int) bool { - return code == 500 -} - -// Code gets the status code for the get orgs internal server error response -func (o *GetOrgsInternalServerError) Code() int { - return 500 -} - -func (o *GetOrgsInternalServerError) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /v1/orgs][%d] getOrgsInternalServerError %s", 500, payload) -} - -func (o *GetOrgsInternalServerError) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /v1/orgs][%d] getOrgsInternalServerError %s", 500, payload) -} - -func (o *GetOrgsInternalServerError) GetPayload() *models.StderrErrResponse { - return o.Payload -} - -func (o *GetOrgsInternalServerError) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.StderrErrResponse) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} diff --git a/client/operations/get_release_parameters.go b/client/operations/get_release_parameters.go deleted file mode 100644 index ee2be3c..0000000 --- a/client/operations/get_release_parameters.go +++ /dev/null @@ -1,151 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package operations - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "context" - "net/http" - "time" - - "github.com/go-openapi/errors" - "github.com/go-openapi/runtime" - cr "github.com/go-openapi/runtime/client" - "github.com/go-openapi/strfmt" -) - -// NewGetReleaseParams creates a new GetReleaseParams object, -// with the default timeout for this client. -// -// Default values are not hydrated, since defaults are normally applied by the API server side. -// -// To enforce default values in parameter, use SetDefaults or WithDefaults. -func NewGetReleaseParams() *GetReleaseParams { - return &GetReleaseParams{ - timeout: cr.DefaultTimeout, - } -} - -// NewGetReleaseParamsWithTimeout creates a new GetReleaseParams object -// with the ability to set a timeout on a request. -func NewGetReleaseParamsWithTimeout(timeout time.Duration) *GetReleaseParams { - return &GetReleaseParams{ - timeout: timeout, - } -} - -// NewGetReleaseParamsWithContext creates a new GetReleaseParams object -// with the ability to set a context for a request. -func NewGetReleaseParamsWithContext(ctx context.Context) *GetReleaseParams { - return &GetReleaseParams{ - Context: ctx, - } -} - -// NewGetReleaseParamsWithHTTPClient creates a new GetReleaseParams object -// with the ability to set a custom HTTPClient for a request. -func NewGetReleaseParamsWithHTTPClient(client *http.Client) *GetReleaseParams { - return &GetReleaseParams{ - HTTPClient: client, - } -} - -/* -GetReleaseParams contains all the parameters to send to the API endpoint - - for the get release operation. - - Typically these are written to a http.Request. -*/ -type GetReleaseParams struct { - - /* ReleaseID. - - release ID - */ - ReleaseID string - - timeout time.Duration - Context context.Context - HTTPClient *http.Client -} - -// WithDefaults hydrates default values in the get release params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *GetReleaseParams) WithDefaults() *GetReleaseParams { - o.SetDefaults() - return o -} - -// SetDefaults hydrates default values in the get release params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *GetReleaseParams) SetDefaults() { - // no default values defined for this parameter -} - -// WithTimeout adds the timeout to the get release params -func (o *GetReleaseParams) WithTimeout(timeout time.Duration) *GetReleaseParams { - o.SetTimeout(timeout) - return o -} - -// SetTimeout adds the timeout to the get release params -func (o *GetReleaseParams) SetTimeout(timeout time.Duration) { - o.timeout = timeout -} - -// WithContext adds the context to the get release params -func (o *GetReleaseParams) WithContext(ctx context.Context) *GetReleaseParams { - o.SetContext(ctx) - return o -} - -// SetContext adds the context to the get release params -func (o *GetReleaseParams) SetContext(ctx context.Context) { - o.Context = ctx -} - -// WithHTTPClient adds the HTTPClient to the get release params -func (o *GetReleaseParams) WithHTTPClient(client *http.Client) *GetReleaseParams { - o.SetHTTPClient(client) - return o -} - -// SetHTTPClient adds the HTTPClient to the get release params -func (o *GetReleaseParams) SetHTTPClient(client *http.Client) { - o.HTTPClient = client -} - -// WithReleaseID adds the releaseID to the get release params -func (o *GetReleaseParams) WithReleaseID(releaseID string) *GetReleaseParams { - o.SetReleaseID(releaseID) - return o -} - -// SetReleaseID adds the releaseId to the get release params -func (o *GetReleaseParams) SetReleaseID(releaseID string) { - o.ReleaseID = releaseID -} - -// WriteToRequest writes these params to a swagger request -func (o *GetReleaseParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { - - if err := r.SetTimeout(o.timeout); err != nil { - return err - } - var res []error - - // path param release_id - if err := r.SetPathParam("release_id", o.ReleaseID); err != nil { - return err - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} diff --git a/client/operations/get_release_responses.go b/client/operations/get_release_responses.go deleted file mode 100644 index af00db8..0000000 --- a/client/operations/get_release_responses.go +++ /dev/null @@ -1,486 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package operations - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "encoding/json" - "fmt" - "io" - - "github.com/go-openapi/runtime" - "github.com/go-openapi/strfmt" - - "github.com/nuonco/nuon-go/models" -) - -// GetReleaseReader is a Reader for the GetRelease structure. -type GetReleaseReader struct { - formats strfmt.Registry -} - -// ReadResponse reads a server response into the received o. -func (o *GetReleaseReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { - switch response.Code() { - case 200: - result := NewGetReleaseOK() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return result, nil - case 400: - result := NewGetReleaseBadRequest() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return nil, result - case 401: - result := NewGetReleaseUnauthorized() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return nil, result - case 403: - result := NewGetReleaseForbidden() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return nil, result - case 404: - result := NewGetReleaseNotFound() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return nil, result - case 500: - result := NewGetReleaseInternalServerError() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return nil, result - default: - return nil, runtime.NewAPIError("[GET /v1/releases/{release_id}] GetRelease", response, response.Code()) - } -} - -// NewGetReleaseOK creates a GetReleaseOK with default headers values -func NewGetReleaseOK() *GetReleaseOK { - return &GetReleaseOK{} -} - -/* -GetReleaseOK describes a response with status code 200, with default header values. - -OK -*/ -type GetReleaseOK struct { - Payload *models.AppComponentRelease -} - -// IsSuccess returns true when this get release o k response has a 2xx status code -func (o *GetReleaseOK) IsSuccess() bool { - return true -} - -// IsRedirect returns true when this get release o k response has a 3xx status code -func (o *GetReleaseOK) IsRedirect() bool { - return false -} - -// IsClientError returns true when this get release o k response has a 4xx status code -func (o *GetReleaseOK) IsClientError() bool { - return false -} - -// IsServerError returns true when this get release o k response has a 5xx status code -func (o *GetReleaseOK) IsServerError() bool { - return false -} - -// IsCode returns true when this get release o k response a status code equal to that given -func (o *GetReleaseOK) IsCode(code int) bool { - return code == 200 -} - -// Code gets the status code for the get release o k response -func (o *GetReleaseOK) Code() int { - return 200 -} - -func (o *GetReleaseOK) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /v1/releases/{release_id}][%d] getReleaseOK %s", 200, payload) -} - -func (o *GetReleaseOK) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /v1/releases/{release_id}][%d] getReleaseOK %s", 200, payload) -} - -func (o *GetReleaseOK) GetPayload() *models.AppComponentRelease { - return o.Payload -} - -func (o *GetReleaseOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.AppComponentRelease) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewGetReleaseBadRequest creates a GetReleaseBadRequest with default headers values -func NewGetReleaseBadRequest() *GetReleaseBadRequest { - return &GetReleaseBadRequest{} -} - -/* -GetReleaseBadRequest describes a response with status code 400, with default header values. - -Bad Request -*/ -type GetReleaseBadRequest struct { - Payload *models.StderrErrResponse -} - -// IsSuccess returns true when this get release bad request response has a 2xx status code -func (o *GetReleaseBadRequest) IsSuccess() bool { - return false -} - -// IsRedirect returns true when this get release bad request response has a 3xx status code -func (o *GetReleaseBadRequest) IsRedirect() bool { - return false -} - -// IsClientError returns true when this get release bad request response has a 4xx status code -func (o *GetReleaseBadRequest) IsClientError() bool { - return true -} - -// IsServerError returns true when this get release bad request response has a 5xx status code -func (o *GetReleaseBadRequest) IsServerError() bool { - return false -} - -// IsCode returns true when this get release bad request response a status code equal to that given -func (o *GetReleaseBadRequest) IsCode(code int) bool { - return code == 400 -} - -// Code gets the status code for the get release bad request response -func (o *GetReleaseBadRequest) Code() int { - return 400 -} - -func (o *GetReleaseBadRequest) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /v1/releases/{release_id}][%d] getReleaseBadRequest %s", 400, payload) -} - -func (o *GetReleaseBadRequest) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /v1/releases/{release_id}][%d] getReleaseBadRequest %s", 400, payload) -} - -func (o *GetReleaseBadRequest) GetPayload() *models.StderrErrResponse { - return o.Payload -} - -func (o *GetReleaseBadRequest) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.StderrErrResponse) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewGetReleaseUnauthorized creates a GetReleaseUnauthorized with default headers values -func NewGetReleaseUnauthorized() *GetReleaseUnauthorized { - return &GetReleaseUnauthorized{} -} - -/* -GetReleaseUnauthorized describes a response with status code 401, with default header values. - -Unauthorized -*/ -type GetReleaseUnauthorized struct { - Payload *models.StderrErrResponse -} - -// IsSuccess returns true when this get release unauthorized response has a 2xx status code -func (o *GetReleaseUnauthorized) IsSuccess() bool { - return false -} - -// IsRedirect returns true when this get release unauthorized response has a 3xx status code -func (o *GetReleaseUnauthorized) IsRedirect() bool { - return false -} - -// IsClientError returns true when this get release unauthorized response has a 4xx status code -func (o *GetReleaseUnauthorized) IsClientError() bool { - return true -} - -// IsServerError returns true when this get release unauthorized response has a 5xx status code -func (o *GetReleaseUnauthorized) IsServerError() bool { - return false -} - -// IsCode returns true when this get release unauthorized response a status code equal to that given -func (o *GetReleaseUnauthorized) IsCode(code int) bool { - return code == 401 -} - -// Code gets the status code for the get release unauthorized response -func (o *GetReleaseUnauthorized) Code() int { - return 401 -} - -func (o *GetReleaseUnauthorized) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /v1/releases/{release_id}][%d] getReleaseUnauthorized %s", 401, payload) -} - -func (o *GetReleaseUnauthorized) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /v1/releases/{release_id}][%d] getReleaseUnauthorized %s", 401, payload) -} - -func (o *GetReleaseUnauthorized) GetPayload() *models.StderrErrResponse { - return o.Payload -} - -func (o *GetReleaseUnauthorized) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.StderrErrResponse) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewGetReleaseForbidden creates a GetReleaseForbidden with default headers values -func NewGetReleaseForbidden() *GetReleaseForbidden { - return &GetReleaseForbidden{} -} - -/* -GetReleaseForbidden describes a response with status code 403, with default header values. - -Forbidden -*/ -type GetReleaseForbidden struct { - Payload *models.StderrErrResponse -} - -// IsSuccess returns true when this get release forbidden response has a 2xx status code -func (o *GetReleaseForbidden) IsSuccess() bool { - return false -} - -// IsRedirect returns true when this get release forbidden response has a 3xx status code -func (o *GetReleaseForbidden) IsRedirect() bool { - return false -} - -// IsClientError returns true when this get release forbidden response has a 4xx status code -func (o *GetReleaseForbidden) IsClientError() bool { - return true -} - -// IsServerError returns true when this get release forbidden response has a 5xx status code -func (o *GetReleaseForbidden) IsServerError() bool { - return false -} - -// IsCode returns true when this get release forbidden response a status code equal to that given -func (o *GetReleaseForbidden) IsCode(code int) bool { - return code == 403 -} - -// Code gets the status code for the get release forbidden response -func (o *GetReleaseForbidden) Code() int { - return 403 -} - -func (o *GetReleaseForbidden) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /v1/releases/{release_id}][%d] getReleaseForbidden %s", 403, payload) -} - -func (o *GetReleaseForbidden) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /v1/releases/{release_id}][%d] getReleaseForbidden %s", 403, payload) -} - -func (o *GetReleaseForbidden) GetPayload() *models.StderrErrResponse { - return o.Payload -} - -func (o *GetReleaseForbidden) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.StderrErrResponse) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewGetReleaseNotFound creates a GetReleaseNotFound with default headers values -func NewGetReleaseNotFound() *GetReleaseNotFound { - return &GetReleaseNotFound{} -} - -/* -GetReleaseNotFound describes a response with status code 404, with default header values. - -Not Found -*/ -type GetReleaseNotFound struct { - Payload *models.StderrErrResponse -} - -// IsSuccess returns true when this get release not found response has a 2xx status code -func (o *GetReleaseNotFound) IsSuccess() bool { - return false -} - -// IsRedirect returns true when this get release not found response has a 3xx status code -func (o *GetReleaseNotFound) IsRedirect() bool { - return false -} - -// IsClientError returns true when this get release not found response has a 4xx status code -func (o *GetReleaseNotFound) IsClientError() bool { - return true -} - -// IsServerError returns true when this get release not found response has a 5xx status code -func (o *GetReleaseNotFound) IsServerError() bool { - return false -} - -// IsCode returns true when this get release not found response a status code equal to that given -func (o *GetReleaseNotFound) IsCode(code int) bool { - return code == 404 -} - -// Code gets the status code for the get release not found response -func (o *GetReleaseNotFound) Code() int { - return 404 -} - -func (o *GetReleaseNotFound) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /v1/releases/{release_id}][%d] getReleaseNotFound %s", 404, payload) -} - -func (o *GetReleaseNotFound) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /v1/releases/{release_id}][%d] getReleaseNotFound %s", 404, payload) -} - -func (o *GetReleaseNotFound) GetPayload() *models.StderrErrResponse { - return o.Payload -} - -func (o *GetReleaseNotFound) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.StderrErrResponse) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewGetReleaseInternalServerError creates a GetReleaseInternalServerError with default headers values -func NewGetReleaseInternalServerError() *GetReleaseInternalServerError { - return &GetReleaseInternalServerError{} -} - -/* -GetReleaseInternalServerError describes a response with status code 500, with default header values. - -Internal Server Error -*/ -type GetReleaseInternalServerError struct { - Payload *models.StderrErrResponse -} - -// IsSuccess returns true when this get release internal server error response has a 2xx status code -func (o *GetReleaseInternalServerError) IsSuccess() bool { - return false -} - -// IsRedirect returns true when this get release internal server error response has a 3xx status code -func (o *GetReleaseInternalServerError) IsRedirect() bool { - return false -} - -// IsClientError returns true when this get release internal server error response has a 4xx status code -func (o *GetReleaseInternalServerError) IsClientError() bool { - return false -} - -// IsServerError returns true when this get release internal server error response has a 5xx status code -func (o *GetReleaseInternalServerError) IsServerError() bool { - return true -} - -// IsCode returns true when this get release internal server error response a status code equal to that given -func (o *GetReleaseInternalServerError) IsCode(code int) bool { - return code == 500 -} - -// Code gets the status code for the get release internal server error response -func (o *GetReleaseInternalServerError) Code() int { - return 500 -} - -func (o *GetReleaseInternalServerError) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /v1/releases/{release_id}][%d] getReleaseInternalServerError %s", 500, payload) -} - -func (o *GetReleaseInternalServerError) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /v1/releases/{release_id}][%d] getReleaseInternalServerError %s", 500, payload) -} - -func (o *GetReleaseInternalServerError) GetPayload() *models.StderrErrResponse { - return o.Payload -} - -func (o *GetReleaseInternalServerError) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.StderrErrResponse) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} diff --git a/client/operations/get_release_steps_parameters.go b/client/operations/get_release_steps_parameters.go deleted file mode 100644 index d8b956a..0000000 --- a/client/operations/get_release_steps_parameters.go +++ /dev/null @@ -1,151 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package operations - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "context" - "net/http" - "time" - - "github.com/go-openapi/errors" - "github.com/go-openapi/runtime" - cr "github.com/go-openapi/runtime/client" - "github.com/go-openapi/strfmt" -) - -// NewGetReleaseStepsParams creates a new GetReleaseStepsParams object, -// with the default timeout for this client. -// -// Default values are not hydrated, since defaults are normally applied by the API server side. -// -// To enforce default values in parameter, use SetDefaults or WithDefaults. -func NewGetReleaseStepsParams() *GetReleaseStepsParams { - return &GetReleaseStepsParams{ - timeout: cr.DefaultTimeout, - } -} - -// NewGetReleaseStepsParamsWithTimeout creates a new GetReleaseStepsParams object -// with the ability to set a timeout on a request. -func NewGetReleaseStepsParamsWithTimeout(timeout time.Duration) *GetReleaseStepsParams { - return &GetReleaseStepsParams{ - timeout: timeout, - } -} - -// NewGetReleaseStepsParamsWithContext creates a new GetReleaseStepsParams object -// with the ability to set a context for a request. -func NewGetReleaseStepsParamsWithContext(ctx context.Context) *GetReleaseStepsParams { - return &GetReleaseStepsParams{ - Context: ctx, - } -} - -// NewGetReleaseStepsParamsWithHTTPClient creates a new GetReleaseStepsParams object -// with the ability to set a custom HTTPClient for a request. -func NewGetReleaseStepsParamsWithHTTPClient(client *http.Client) *GetReleaseStepsParams { - return &GetReleaseStepsParams{ - HTTPClient: client, - } -} - -/* -GetReleaseStepsParams contains all the parameters to send to the API endpoint - - for the get release steps operation. - - Typically these are written to a http.Request. -*/ -type GetReleaseStepsParams struct { - - /* ReleaseID. - - release ID - */ - ReleaseID string - - timeout time.Duration - Context context.Context - HTTPClient *http.Client -} - -// WithDefaults hydrates default values in the get release steps params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *GetReleaseStepsParams) WithDefaults() *GetReleaseStepsParams { - o.SetDefaults() - return o -} - -// SetDefaults hydrates default values in the get release steps params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *GetReleaseStepsParams) SetDefaults() { - // no default values defined for this parameter -} - -// WithTimeout adds the timeout to the get release steps params -func (o *GetReleaseStepsParams) WithTimeout(timeout time.Duration) *GetReleaseStepsParams { - o.SetTimeout(timeout) - return o -} - -// SetTimeout adds the timeout to the get release steps params -func (o *GetReleaseStepsParams) SetTimeout(timeout time.Duration) { - o.timeout = timeout -} - -// WithContext adds the context to the get release steps params -func (o *GetReleaseStepsParams) WithContext(ctx context.Context) *GetReleaseStepsParams { - o.SetContext(ctx) - return o -} - -// SetContext adds the context to the get release steps params -func (o *GetReleaseStepsParams) SetContext(ctx context.Context) { - o.Context = ctx -} - -// WithHTTPClient adds the HTTPClient to the get release steps params -func (o *GetReleaseStepsParams) WithHTTPClient(client *http.Client) *GetReleaseStepsParams { - o.SetHTTPClient(client) - return o -} - -// SetHTTPClient adds the HTTPClient to the get release steps params -func (o *GetReleaseStepsParams) SetHTTPClient(client *http.Client) { - o.HTTPClient = client -} - -// WithReleaseID adds the releaseID to the get release steps params -func (o *GetReleaseStepsParams) WithReleaseID(releaseID string) *GetReleaseStepsParams { - o.SetReleaseID(releaseID) - return o -} - -// SetReleaseID adds the releaseId to the get release steps params -func (o *GetReleaseStepsParams) SetReleaseID(releaseID string) { - o.ReleaseID = releaseID -} - -// WriteToRequest writes these params to a swagger request -func (o *GetReleaseStepsParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { - - if err := r.SetTimeout(o.timeout); err != nil { - return err - } - var res []error - - // path param release_id - if err := r.SetPathParam("release_id", o.ReleaseID); err != nil { - return err - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} diff --git a/client/operations/get_release_steps_responses.go b/client/operations/get_release_steps_responses.go deleted file mode 100644 index ca8fa4a..0000000 --- a/client/operations/get_release_steps_responses.go +++ /dev/null @@ -1,484 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package operations - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "encoding/json" - "fmt" - "io" - - "github.com/go-openapi/runtime" - "github.com/go-openapi/strfmt" - - "github.com/nuonco/nuon-go/models" -) - -// GetReleaseStepsReader is a Reader for the GetReleaseSteps structure. -type GetReleaseStepsReader struct { - formats strfmt.Registry -} - -// ReadResponse reads a server response into the received o. -func (o *GetReleaseStepsReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { - switch response.Code() { - case 200: - result := NewGetReleaseStepsOK() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return result, nil - case 400: - result := NewGetReleaseStepsBadRequest() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return nil, result - case 401: - result := NewGetReleaseStepsUnauthorized() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return nil, result - case 403: - result := NewGetReleaseStepsForbidden() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return nil, result - case 404: - result := NewGetReleaseStepsNotFound() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return nil, result - case 500: - result := NewGetReleaseStepsInternalServerError() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return nil, result - default: - return nil, runtime.NewAPIError("[GET /v1/releases/{release_id}/steps] GetReleaseSteps", response, response.Code()) - } -} - -// NewGetReleaseStepsOK creates a GetReleaseStepsOK with default headers values -func NewGetReleaseStepsOK() *GetReleaseStepsOK { - return &GetReleaseStepsOK{} -} - -/* -GetReleaseStepsOK describes a response with status code 200, with default header values. - -OK -*/ -type GetReleaseStepsOK struct { - Payload []*models.AppComponentReleaseStep -} - -// IsSuccess returns true when this get release steps o k response has a 2xx status code -func (o *GetReleaseStepsOK) IsSuccess() bool { - return true -} - -// IsRedirect returns true when this get release steps o k response has a 3xx status code -func (o *GetReleaseStepsOK) IsRedirect() bool { - return false -} - -// IsClientError returns true when this get release steps o k response has a 4xx status code -func (o *GetReleaseStepsOK) IsClientError() bool { - return false -} - -// IsServerError returns true when this get release steps o k response has a 5xx status code -func (o *GetReleaseStepsOK) IsServerError() bool { - return false -} - -// IsCode returns true when this get release steps o k response a status code equal to that given -func (o *GetReleaseStepsOK) IsCode(code int) bool { - return code == 200 -} - -// Code gets the status code for the get release steps o k response -func (o *GetReleaseStepsOK) Code() int { - return 200 -} - -func (o *GetReleaseStepsOK) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /v1/releases/{release_id}/steps][%d] getReleaseStepsOK %s", 200, payload) -} - -func (o *GetReleaseStepsOK) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /v1/releases/{release_id}/steps][%d] getReleaseStepsOK %s", 200, payload) -} - -func (o *GetReleaseStepsOK) GetPayload() []*models.AppComponentReleaseStep { - return o.Payload -} - -func (o *GetReleaseStepsOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - // response payload - if err := consumer.Consume(response.Body(), &o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewGetReleaseStepsBadRequest creates a GetReleaseStepsBadRequest with default headers values -func NewGetReleaseStepsBadRequest() *GetReleaseStepsBadRequest { - return &GetReleaseStepsBadRequest{} -} - -/* -GetReleaseStepsBadRequest describes a response with status code 400, with default header values. - -Bad Request -*/ -type GetReleaseStepsBadRequest struct { - Payload *models.StderrErrResponse -} - -// IsSuccess returns true when this get release steps bad request response has a 2xx status code -func (o *GetReleaseStepsBadRequest) IsSuccess() bool { - return false -} - -// IsRedirect returns true when this get release steps bad request response has a 3xx status code -func (o *GetReleaseStepsBadRequest) IsRedirect() bool { - return false -} - -// IsClientError returns true when this get release steps bad request response has a 4xx status code -func (o *GetReleaseStepsBadRequest) IsClientError() bool { - return true -} - -// IsServerError returns true when this get release steps bad request response has a 5xx status code -func (o *GetReleaseStepsBadRequest) IsServerError() bool { - return false -} - -// IsCode returns true when this get release steps bad request response a status code equal to that given -func (o *GetReleaseStepsBadRequest) IsCode(code int) bool { - return code == 400 -} - -// Code gets the status code for the get release steps bad request response -func (o *GetReleaseStepsBadRequest) Code() int { - return 400 -} - -func (o *GetReleaseStepsBadRequest) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /v1/releases/{release_id}/steps][%d] getReleaseStepsBadRequest %s", 400, payload) -} - -func (o *GetReleaseStepsBadRequest) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /v1/releases/{release_id}/steps][%d] getReleaseStepsBadRequest %s", 400, payload) -} - -func (o *GetReleaseStepsBadRequest) GetPayload() *models.StderrErrResponse { - return o.Payload -} - -func (o *GetReleaseStepsBadRequest) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.StderrErrResponse) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewGetReleaseStepsUnauthorized creates a GetReleaseStepsUnauthorized with default headers values -func NewGetReleaseStepsUnauthorized() *GetReleaseStepsUnauthorized { - return &GetReleaseStepsUnauthorized{} -} - -/* -GetReleaseStepsUnauthorized describes a response with status code 401, with default header values. - -Unauthorized -*/ -type GetReleaseStepsUnauthorized struct { - Payload *models.StderrErrResponse -} - -// IsSuccess returns true when this get release steps unauthorized response has a 2xx status code -func (o *GetReleaseStepsUnauthorized) IsSuccess() bool { - return false -} - -// IsRedirect returns true when this get release steps unauthorized response has a 3xx status code -func (o *GetReleaseStepsUnauthorized) IsRedirect() bool { - return false -} - -// IsClientError returns true when this get release steps unauthorized response has a 4xx status code -func (o *GetReleaseStepsUnauthorized) IsClientError() bool { - return true -} - -// IsServerError returns true when this get release steps unauthorized response has a 5xx status code -func (o *GetReleaseStepsUnauthorized) IsServerError() bool { - return false -} - -// IsCode returns true when this get release steps unauthorized response a status code equal to that given -func (o *GetReleaseStepsUnauthorized) IsCode(code int) bool { - return code == 401 -} - -// Code gets the status code for the get release steps unauthorized response -func (o *GetReleaseStepsUnauthorized) Code() int { - return 401 -} - -func (o *GetReleaseStepsUnauthorized) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /v1/releases/{release_id}/steps][%d] getReleaseStepsUnauthorized %s", 401, payload) -} - -func (o *GetReleaseStepsUnauthorized) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /v1/releases/{release_id}/steps][%d] getReleaseStepsUnauthorized %s", 401, payload) -} - -func (o *GetReleaseStepsUnauthorized) GetPayload() *models.StderrErrResponse { - return o.Payload -} - -func (o *GetReleaseStepsUnauthorized) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.StderrErrResponse) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewGetReleaseStepsForbidden creates a GetReleaseStepsForbidden with default headers values -func NewGetReleaseStepsForbidden() *GetReleaseStepsForbidden { - return &GetReleaseStepsForbidden{} -} - -/* -GetReleaseStepsForbidden describes a response with status code 403, with default header values. - -Forbidden -*/ -type GetReleaseStepsForbidden struct { - Payload *models.StderrErrResponse -} - -// IsSuccess returns true when this get release steps forbidden response has a 2xx status code -func (o *GetReleaseStepsForbidden) IsSuccess() bool { - return false -} - -// IsRedirect returns true when this get release steps forbidden response has a 3xx status code -func (o *GetReleaseStepsForbidden) IsRedirect() bool { - return false -} - -// IsClientError returns true when this get release steps forbidden response has a 4xx status code -func (o *GetReleaseStepsForbidden) IsClientError() bool { - return true -} - -// IsServerError returns true when this get release steps forbidden response has a 5xx status code -func (o *GetReleaseStepsForbidden) IsServerError() bool { - return false -} - -// IsCode returns true when this get release steps forbidden response a status code equal to that given -func (o *GetReleaseStepsForbidden) IsCode(code int) bool { - return code == 403 -} - -// Code gets the status code for the get release steps forbidden response -func (o *GetReleaseStepsForbidden) Code() int { - return 403 -} - -func (o *GetReleaseStepsForbidden) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /v1/releases/{release_id}/steps][%d] getReleaseStepsForbidden %s", 403, payload) -} - -func (o *GetReleaseStepsForbidden) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /v1/releases/{release_id}/steps][%d] getReleaseStepsForbidden %s", 403, payload) -} - -func (o *GetReleaseStepsForbidden) GetPayload() *models.StderrErrResponse { - return o.Payload -} - -func (o *GetReleaseStepsForbidden) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.StderrErrResponse) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewGetReleaseStepsNotFound creates a GetReleaseStepsNotFound with default headers values -func NewGetReleaseStepsNotFound() *GetReleaseStepsNotFound { - return &GetReleaseStepsNotFound{} -} - -/* -GetReleaseStepsNotFound describes a response with status code 404, with default header values. - -Not Found -*/ -type GetReleaseStepsNotFound struct { - Payload *models.StderrErrResponse -} - -// IsSuccess returns true when this get release steps not found response has a 2xx status code -func (o *GetReleaseStepsNotFound) IsSuccess() bool { - return false -} - -// IsRedirect returns true when this get release steps not found response has a 3xx status code -func (o *GetReleaseStepsNotFound) IsRedirect() bool { - return false -} - -// IsClientError returns true when this get release steps not found response has a 4xx status code -func (o *GetReleaseStepsNotFound) IsClientError() bool { - return true -} - -// IsServerError returns true when this get release steps not found response has a 5xx status code -func (o *GetReleaseStepsNotFound) IsServerError() bool { - return false -} - -// IsCode returns true when this get release steps not found response a status code equal to that given -func (o *GetReleaseStepsNotFound) IsCode(code int) bool { - return code == 404 -} - -// Code gets the status code for the get release steps not found response -func (o *GetReleaseStepsNotFound) Code() int { - return 404 -} - -func (o *GetReleaseStepsNotFound) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /v1/releases/{release_id}/steps][%d] getReleaseStepsNotFound %s", 404, payload) -} - -func (o *GetReleaseStepsNotFound) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /v1/releases/{release_id}/steps][%d] getReleaseStepsNotFound %s", 404, payload) -} - -func (o *GetReleaseStepsNotFound) GetPayload() *models.StderrErrResponse { - return o.Payload -} - -func (o *GetReleaseStepsNotFound) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.StderrErrResponse) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewGetReleaseStepsInternalServerError creates a GetReleaseStepsInternalServerError with default headers values -func NewGetReleaseStepsInternalServerError() *GetReleaseStepsInternalServerError { - return &GetReleaseStepsInternalServerError{} -} - -/* -GetReleaseStepsInternalServerError describes a response with status code 500, with default header values. - -Internal Server Error -*/ -type GetReleaseStepsInternalServerError struct { - Payload *models.StderrErrResponse -} - -// IsSuccess returns true when this get release steps internal server error response has a 2xx status code -func (o *GetReleaseStepsInternalServerError) IsSuccess() bool { - return false -} - -// IsRedirect returns true when this get release steps internal server error response has a 3xx status code -func (o *GetReleaseStepsInternalServerError) IsRedirect() bool { - return false -} - -// IsClientError returns true when this get release steps internal server error response has a 4xx status code -func (o *GetReleaseStepsInternalServerError) IsClientError() bool { - return false -} - -// IsServerError returns true when this get release steps internal server error response has a 5xx status code -func (o *GetReleaseStepsInternalServerError) IsServerError() bool { - return true -} - -// IsCode returns true when this get release steps internal server error response a status code equal to that given -func (o *GetReleaseStepsInternalServerError) IsCode(code int) bool { - return code == 500 -} - -// Code gets the status code for the get release steps internal server error response -func (o *GetReleaseStepsInternalServerError) Code() int { - return 500 -} - -func (o *GetReleaseStepsInternalServerError) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /v1/releases/{release_id}/steps][%d] getReleaseStepsInternalServerError %s", 500, payload) -} - -func (o *GetReleaseStepsInternalServerError) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /v1/releases/{release_id}/steps][%d] getReleaseStepsInternalServerError %s", 500, payload) -} - -func (o *GetReleaseStepsInternalServerError) GetPayload() *models.StderrErrResponse { - return o.Payload -} - -func (o *GetReleaseStepsInternalServerError) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.StderrErrResponse) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} diff --git a/client/operations/get_runner_job_plan_responses.go b/client/operations/get_runner_job_plan_responses.go index 3d9e4d5..0553f94 100644 --- a/client/operations/get_runner_job_plan_responses.go +++ b/client/operations/get_runner_job_plan_responses.go @@ -76,7 +76,7 @@ GetRunnerJobPlanOK describes a response with status code 200, with default heade OK */ type GetRunnerJobPlanOK struct { - Payload *models.Planv1Plan + Payload string } // IsSuccess returns true when this get runner job plan o k response has a 2xx status code @@ -119,16 +119,14 @@ func (o *GetRunnerJobPlanOK) String() string { return fmt.Sprintf("[GET /v1/runner-jobs/{runner_job_id}/plan][%d] getRunnerJobPlanOK %s", 200, payload) } -func (o *GetRunnerJobPlanOK) GetPayload() *models.Planv1Plan { +func (o *GetRunnerJobPlanOK) GetPayload() string { return o.Payload } func (o *GetRunnerJobPlanOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - o.Payload = new(models.Planv1Plan) - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), &o.Payload); err != nil && err != io.EOF { return err } diff --git a/client/operations/get_sandbox_parameters.go b/client/operations/get_sandbox_parameters.go deleted file mode 100644 index 8a5bba3..0000000 --- a/client/operations/get_sandbox_parameters.go +++ /dev/null @@ -1,151 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package operations - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "context" - "net/http" - "time" - - "github.com/go-openapi/errors" - "github.com/go-openapi/runtime" - cr "github.com/go-openapi/runtime/client" - "github.com/go-openapi/strfmt" -) - -// NewGetSandboxParams creates a new GetSandboxParams object, -// with the default timeout for this client. -// -// Default values are not hydrated, since defaults are normally applied by the API server side. -// -// To enforce default values in parameter, use SetDefaults or WithDefaults. -func NewGetSandboxParams() *GetSandboxParams { - return &GetSandboxParams{ - timeout: cr.DefaultTimeout, - } -} - -// NewGetSandboxParamsWithTimeout creates a new GetSandboxParams object -// with the ability to set a timeout on a request. -func NewGetSandboxParamsWithTimeout(timeout time.Duration) *GetSandboxParams { - return &GetSandboxParams{ - timeout: timeout, - } -} - -// NewGetSandboxParamsWithContext creates a new GetSandboxParams object -// with the ability to set a context for a request. -func NewGetSandboxParamsWithContext(ctx context.Context) *GetSandboxParams { - return &GetSandboxParams{ - Context: ctx, - } -} - -// NewGetSandboxParamsWithHTTPClient creates a new GetSandboxParams object -// with the ability to set a custom HTTPClient for a request. -func NewGetSandboxParamsWithHTTPClient(client *http.Client) *GetSandboxParams { - return &GetSandboxParams{ - HTTPClient: client, - } -} - -/* -GetSandboxParams contains all the parameters to send to the API endpoint - - for the get sandbox operation. - - Typically these are written to a http.Request. -*/ -type GetSandboxParams struct { - - /* SandboxID. - - sandbox ID - */ - SandboxID string - - timeout time.Duration - Context context.Context - HTTPClient *http.Client -} - -// WithDefaults hydrates default values in the get sandbox params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *GetSandboxParams) WithDefaults() *GetSandboxParams { - o.SetDefaults() - return o -} - -// SetDefaults hydrates default values in the get sandbox params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *GetSandboxParams) SetDefaults() { - // no default values defined for this parameter -} - -// WithTimeout adds the timeout to the get sandbox params -func (o *GetSandboxParams) WithTimeout(timeout time.Duration) *GetSandboxParams { - o.SetTimeout(timeout) - return o -} - -// SetTimeout adds the timeout to the get sandbox params -func (o *GetSandboxParams) SetTimeout(timeout time.Duration) { - o.timeout = timeout -} - -// WithContext adds the context to the get sandbox params -func (o *GetSandboxParams) WithContext(ctx context.Context) *GetSandboxParams { - o.SetContext(ctx) - return o -} - -// SetContext adds the context to the get sandbox params -func (o *GetSandboxParams) SetContext(ctx context.Context) { - o.Context = ctx -} - -// WithHTTPClient adds the HTTPClient to the get sandbox params -func (o *GetSandboxParams) WithHTTPClient(client *http.Client) *GetSandboxParams { - o.SetHTTPClient(client) - return o -} - -// SetHTTPClient adds the HTTPClient to the get sandbox params -func (o *GetSandboxParams) SetHTTPClient(client *http.Client) { - o.HTTPClient = client -} - -// WithSandboxID adds the sandboxID to the get sandbox params -func (o *GetSandboxParams) WithSandboxID(sandboxID string) *GetSandboxParams { - o.SetSandboxID(sandboxID) - return o -} - -// SetSandboxID adds the sandboxId to the get sandbox params -func (o *GetSandboxParams) SetSandboxID(sandboxID string) { - o.SandboxID = sandboxID -} - -// WriteToRequest writes these params to a swagger request -func (o *GetSandboxParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { - - if err := r.SetTimeout(o.timeout); err != nil { - return err - } - var res []error - - // path param sandbox_id - if err := r.SetPathParam("sandbox_id", o.SandboxID); err != nil { - return err - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} diff --git a/client/operations/get_sandbox_releases_parameters.go b/client/operations/get_sandbox_releases_parameters.go deleted file mode 100644 index 159181f..0000000 --- a/client/operations/get_sandbox_releases_parameters.go +++ /dev/null @@ -1,151 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package operations - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "context" - "net/http" - "time" - - "github.com/go-openapi/errors" - "github.com/go-openapi/runtime" - cr "github.com/go-openapi/runtime/client" - "github.com/go-openapi/strfmt" -) - -// NewGetSandboxReleasesParams creates a new GetSandboxReleasesParams object, -// with the default timeout for this client. -// -// Default values are not hydrated, since defaults are normally applied by the API server side. -// -// To enforce default values in parameter, use SetDefaults or WithDefaults. -func NewGetSandboxReleasesParams() *GetSandboxReleasesParams { - return &GetSandboxReleasesParams{ - timeout: cr.DefaultTimeout, - } -} - -// NewGetSandboxReleasesParamsWithTimeout creates a new GetSandboxReleasesParams object -// with the ability to set a timeout on a request. -func NewGetSandboxReleasesParamsWithTimeout(timeout time.Duration) *GetSandboxReleasesParams { - return &GetSandboxReleasesParams{ - timeout: timeout, - } -} - -// NewGetSandboxReleasesParamsWithContext creates a new GetSandboxReleasesParams object -// with the ability to set a context for a request. -func NewGetSandboxReleasesParamsWithContext(ctx context.Context) *GetSandboxReleasesParams { - return &GetSandboxReleasesParams{ - Context: ctx, - } -} - -// NewGetSandboxReleasesParamsWithHTTPClient creates a new GetSandboxReleasesParams object -// with the ability to set a custom HTTPClient for a request. -func NewGetSandboxReleasesParamsWithHTTPClient(client *http.Client) *GetSandboxReleasesParams { - return &GetSandboxReleasesParams{ - HTTPClient: client, - } -} - -/* -GetSandboxReleasesParams contains all the parameters to send to the API endpoint - - for the get sandbox releases operation. - - Typically these are written to a http.Request. -*/ -type GetSandboxReleasesParams struct { - - /* SandboxID. - - sandbox ID - */ - SandboxID string - - timeout time.Duration - Context context.Context - HTTPClient *http.Client -} - -// WithDefaults hydrates default values in the get sandbox releases params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *GetSandboxReleasesParams) WithDefaults() *GetSandboxReleasesParams { - o.SetDefaults() - return o -} - -// SetDefaults hydrates default values in the get sandbox releases params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *GetSandboxReleasesParams) SetDefaults() { - // no default values defined for this parameter -} - -// WithTimeout adds the timeout to the get sandbox releases params -func (o *GetSandboxReleasesParams) WithTimeout(timeout time.Duration) *GetSandboxReleasesParams { - o.SetTimeout(timeout) - return o -} - -// SetTimeout adds the timeout to the get sandbox releases params -func (o *GetSandboxReleasesParams) SetTimeout(timeout time.Duration) { - o.timeout = timeout -} - -// WithContext adds the context to the get sandbox releases params -func (o *GetSandboxReleasesParams) WithContext(ctx context.Context) *GetSandboxReleasesParams { - o.SetContext(ctx) - return o -} - -// SetContext adds the context to the get sandbox releases params -func (o *GetSandboxReleasesParams) SetContext(ctx context.Context) { - o.Context = ctx -} - -// WithHTTPClient adds the HTTPClient to the get sandbox releases params -func (o *GetSandboxReleasesParams) WithHTTPClient(client *http.Client) *GetSandboxReleasesParams { - o.SetHTTPClient(client) - return o -} - -// SetHTTPClient adds the HTTPClient to the get sandbox releases params -func (o *GetSandboxReleasesParams) SetHTTPClient(client *http.Client) { - o.HTTPClient = client -} - -// WithSandboxID adds the sandboxID to the get sandbox releases params -func (o *GetSandboxReleasesParams) WithSandboxID(sandboxID string) *GetSandboxReleasesParams { - o.SetSandboxID(sandboxID) - return o -} - -// SetSandboxID adds the sandboxId to the get sandbox releases params -func (o *GetSandboxReleasesParams) SetSandboxID(sandboxID string) { - o.SandboxID = sandboxID -} - -// WriteToRequest writes these params to a swagger request -func (o *GetSandboxReleasesParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { - - if err := r.SetTimeout(o.timeout); err != nil { - return err - } - var res []error - - // path param sandbox_id - if err := r.SetPathParam("sandbox_id", o.SandboxID); err != nil { - return err - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} diff --git a/client/operations/get_sandbox_releases_responses.go b/client/operations/get_sandbox_releases_responses.go deleted file mode 100644 index 19ea2cf..0000000 --- a/client/operations/get_sandbox_releases_responses.go +++ /dev/null @@ -1,484 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package operations - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "encoding/json" - "fmt" - "io" - - "github.com/go-openapi/runtime" - "github.com/go-openapi/strfmt" - - "github.com/nuonco/nuon-go/models" -) - -// GetSandboxReleasesReader is a Reader for the GetSandboxReleases structure. -type GetSandboxReleasesReader struct { - formats strfmt.Registry -} - -// ReadResponse reads a server response into the received o. -func (o *GetSandboxReleasesReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { - switch response.Code() { - case 200: - result := NewGetSandboxReleasesOK() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return result, nil - case 400: - result := NewGetSandboxReleasesBadRequest() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return nil, result - case 401: - result := NewGetSandboxReleasesUnauthorized() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return nil, result - case 403: - result := NewGetSandboxReleasesForbidden() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return nil, result - case 404: - result := NewGetSandboxReleasesNotFound() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return nil, result - case 500: - result := NewGetSandboxReleasesInternalServerError() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return nil, result - default: - return nil, runtime.NewAPIError("[GET /v1/sandboxes/{sandbox_id}/releases] GetSandboxReleases", response, response.Code()) - } -} - -// NewGetSandboxReleasesOK creates a GetSandboxReleasesOK with default headers values -func NewGetSandboxReleasesOK() *GetSandboxReleasesOK { - return &GetSandboxReleasesOK{} -} - -/* -GetSandboxReleasesOK describes a response with status code 200, with default header values. - -OK -*/ -type GetSandboxReleasesOK struct { - Payload []*models.AppSandboxRelease -} - -// IsSuccess returns true when this get sandbox releases o k response has a 2xx status code -func (o *GetSandboxReleasesOK) IsSuccess() bool { - return true -} - -// IsRedirect returns true when this get sandbox releases o k response has a 3xx status code -func (o *GetSandboxReleasesOK) IsRedirect() bool { - return false -} - -// IsClientError returns true when this get sandbox releases o k response has a 4xx status code -func (o *GetSandboxReleasesOK) IsClientError() bool { - return false -} - -// IsServerError returns true when this get sandbox releases o k response has a 5xx status code -func (o *GetSandboxReleasesOK) IsServerError() bool { - return false -} - -// IsCode returns true when this get sandbox releases o k response a status code equal to that given -func (o *GetSandboxReleasesOK) IsCode(code int) bool { - return code == 200 -} - -// Code gets the status code for the get sandbox releases o k response -func (o *GetSandboxReleasesOK) Code() int { - return 200 -} - -func (o *GetSandboxReleasesOK) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /v1/sandboxes/{sandbox_id}/releases][%d] getSandboxReleasesOK %s", 200, payload) -} - -func (o *GetSandboxReleasesOK) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /v1/sandboxes/{sandbox_id}/releases][%d] getSandboxReleasesOK %s", 200, payload) -} - -func (o *GetSandboxReleasesOK) GetPayload() []*models.AppSandboxRelease { - return o.Payload -} - -func (o *GetSandboxReleasesOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - // response payload - if err := consumer.Consume(response.Body(), &o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewGetSandboxReleasesBadRequest creates a GetSandboxReleasesBadRequest with default headers values -func NewGetSandboxReleasesBadRequest() *GetSandboxReleasesBadRequest { - return &GetSandboxReleasesBadRequest{} -} - -/* -GetSandboxReleasesBadRequest describes a response with status code 400, with default header values. - -Bad Request -*/ -type GetSandboxReleasesBadRequest struct { - Payload *models.StderrErrResponse -} - -// IsSuccess returns true when this get sandbox releases bad request response has a 2xx status code -func (o *GetSandboxReleasesBadRequest) IsSuccess() bool { - return false -} - -// IsRedirect returns true when this get sandbox releases bad request response has a 3xx status code -func (o *GetSandboxReleasesBadRequest) IsRedirect() bool { - return false -} - -// IsClientError returns true when this get sandbox releases bad request response has a 4xx status code -func (o *GetSandboxReleasesBadRequest) IsClientError() bool { - return true -} - -// IsServerError returns true when this get sandbox releases bad request response has a 5xx status code -func (o *GetSandboxReleasesBadRequest) IsServerError() bool { - return false -} - -// IsCode returns true when this get sandbox releases bad request response a status code equal to that given -func (o *GetSandboxReleasesBadRequest) IsCode(code int) bool { - return code == 400 -} - -// Code gets the status code for the get sandbox releases bad request response -func (o *GetSandboxReleasesBadRequest) Code() int { - return 400 -} - -func (o *GetSandboxReleasesBadRequest) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /v1/sandboxes/{sandbox_id}/releases][%d] getSandboxReleasesBadRequest %s", 400, payload) -} - -func (o *GetSandboxReleasesBadRequest) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /v1/sandboxes/{sandbox_id}/releases][%d] getSandboxReleasesBadRequest %s", 400, payload) -} - -func (o *GetSandboxReleasesBadRequest) GetPayload() *models.StderrErrResponse { - return o.Payload -} - -func (o *GetSandboxReleasesBadRequest) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.StderrErrResponse) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewGetSandboxReleasesUnauthorized creates a GetSandboxReleasesUnauthorized with default headers values -func NewGetSandboxReleasesUnauthorized() *GetSandboxReleasesUnauthorized { - return &GetSandboxReleasesUnauthorized{} -} - -/* -GetSandboxReleasesUnauthorized describes a response with status code 401, with default header values. - -Unauthorized -*/ -type GetSandboxReleasesUnauthorized struct { - Payload *models.StderrErrResponse -} - -// IsSuccess returns true when this get sandbox releases unauthorized response has a 2xx status code -func (o *GetSandboxReleasesUnauthorized) IsSuccess() bool { - return false -} - -// IsRedirect returns true when this get sandbox releases unauthorized response has a 3xx status code -func (o *GetSandboxReleasesUnauthorized) IsRedirect() bool { - return false -} - -// IsClientError returns true when this get sandbox releases unauthorized response has a 4xx status code -func (o *GetSandboxReleasesUnauthorized) IsClientError() bool { - return true -} - -// IsServerError returns true when this get sandbox releases unauthorized response has a 5xx status code -func (o *GetSandboxReleasesUnauthorized) IsServerError() bool { - return false -} - -// IsCode returns true when this get sandbox releases unauthorized response a status code equal to that given -func (o *GetSandboxReleasesUnauthorized) IsCode(code int) bool { - return code == 401 -} - -// Code gets the status code for the get sandbox releases unauthorized response -func (o *GetSandboxReleasesUnauthorized) Code() int { - return 401 -} - -func (o *GetSandboxReleasesUnauthorized) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /v1/sandboxes/{sandbox_id}/releases][%d] getSandboxReleasesUnauthorized %s", 401, payload) -} - -func (o *GetSandboxReleasesUnauthorized) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /v1/sandboxes/{sandbox_id}/releases][%d] getSandboxReleasesUnauthorized %s", 401, payload) -} - -func (o *GetSandboxReleasesUnauthorized) GetPayload() *models.StderrErrResponse { - return o.Payload -} - -func (o *GetSandboxReleasesUnauthorized) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.StderrErrResponse) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewGetSandboxReleasesForbidden creates a GetSandboxReleasesForbidden with default headers values -func NewGetSandboxReleasesForbidden() *GetSandboxReleasesForbidden { - return &GetSandboxReleasesForbidden{} -} - -/* -GetSandboxReleasesForbidden describes a response with status code 403, with default header values. - -Forbidden -*/ -type GetSandboxReleasesForbidden struct { - Payload *models.StderrErrResponse -} - -// IsSuccess returns true when this get sandbox releases forbidden response has a 2xx status code -func (o *GetSandboxReleasesForbidden) IsSuccess() bool { - return false -} - -// IsRedirect returns true when this get sandbox releases forbidden response has a 3xx status code -func (o *GetSandboxReleasesForbidden) IsRedirect() bool { - return false -} - -// IsClientError returns true when this get sandbox releases forbidden response has a 4xx status code -func (o *GetSandboxReleasesForbidden) IsClientError() bool { - return true -} - -// IsServerError returns true when this get sandbox releases forbidden response has a 5xx status code -func (o *GetSandboxReleasesForbidden) IsServerError() bool { - return false -} - -// IsCode returns true when this get sandbox releases forbidden response a status code equal to that given -func (o *GetSandboxReleasesForbidden) IsCode(code int) bool { - return code == 403 -} - -// Code gets the status code for the get sandbox releases forbidden response -func (o *GetSandboxReleasesForbidden) Code() int { - return 403 -} - -func (o *GetSandboxReleasesForbidden) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /v1/sandboxes/{sandbox_id}/releases][%d] getSandboxReleasesForbidden %s", 403, payload) -} - -func (o *GetSandboxReleasesForbidden) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /v1/sandboxes/{sandbox_id}/releases][%d] getSandboxReleasesForbidden %s", 403, payload) -} - -func (o *GetSandboxReleasesForbidden) GetPayload() *models.StderrErrResponse { - return o.Payload -} - -func (o *GetSandboxReleasesForbidden) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.StderrErrResponse) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewGetSandboxReleasesNotFound creates a GetSandboxReleasesNotFound with default headers values -func NewGetSandboxReleasesNotFound() *GetSandboxReleasesNotFound { - return &GetSandboxReleasesNotFound{} -} - -/* -GetSandboxReleasesNotFound describes a response with status code 404, with default header values. - -Not Found -*/ -type GetSandboxReleasesNotFound struct { - Payload *models.StderrErrResponse -} - -// IsSuccess returns true when this get sandbox releases not found response has a 2xx status code -func (o *GetSandboxReleasesNotFound) IsSuccess() bool { - return false -} - -// IsRedirect returns true when this get sandbox releases not found response has a 3xx status code -func (o *GetSandboxReleasesNotFound) IsRedirect() bool { - return false -} - -// IsClientError returns true when this get sandbox releases not found response has a 4xx status code -func (o *GetSandboxReleasesNotFound) IsClientError() bool { - return true -} - -// IsServerError returns true when this get sandbox releases not found response has a 5xx status code -func (o *GetSandboxReleasesNotFound) IsServerError() bool { - return false -} - -// IsCode returns true when this get sandbox releases not found response a status code equal to that given -func (o *GetSandboxReleasesNotFound) IsCode(code int) bool { - return code == 404 -} - -// Code gets the status code for the get sandbox releases not found response -func (o *GetSandboxReleasesNotFound) Code() int { - return 404 -} - -func (o *GetSandboxReleasesNotFound) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /v1/sandboxes/{sandbox_id}/releases][%d] getSandboxReleasesNotFound %s", 404, payload) -} - -func (o *GetSandboxReleasesNotFound) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /v1/sandboxes/{sandbox_id}/releases][%d] getSandboxReleasesNotFound %s", 404, payload) -} - -func (o *GetSandboxReleasesNotFound) GetPayload() *models.StderrErrResponse { - return o.Payload -} - -func (o *GetSandboxReleasesNotFound) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.StderrErrResponse) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewGetSandboxReleasesInternalServerError creates a GetSandboxReleasesInternalServerError with default headers values -func NewGetSandboxReleasesInternalServerError() *GetSandboxReleasesInternalServerError { - return &GetSandboxReleasesInternalServerError{} -} - -/* -GetSandboxReleasesInternalServerError describes a response with status code 500, with default header values. - -Internal Server Error -*/ -type GetSandboxReleasesInternalServerError struct { - Payload *models.StderrErrResponse -} - -// IsSuccess returns true when this get sandbox releases internal server error response has a 2xx status code -func (o *GetSandboxReleasesInternalServerError) IsSuccess() bool { - return false -} - -// IsRedirect returns true when this get sandbox releases internal server error response has a 3xx status code -func (o *GetSandboxReleasesInternalServerError) IsRedirect() bool { - return false -} - -// IsClientError returns true when this get sandbox releases internal server error response has a 4xx status code -func (o *GetSandboxReleasesInternalServerError) IsClientError() bool { - return false -} - -// IsServerError returns true when this get sandbox releases internal server error response has a 5xx status code -func (o *GetSandboxReleasesInternalServerError) IsServerError() bool { - return true -} - -// IsCode returns true when this get sandbox releases internal server error response a status code equal to that given -func (o *GetSandboxReleasesInternalServerError) IsCode(code int) bool { - return code == 500 -} - -// Code gets the status code for the get sandbox releases internal server error response -func (o *GetSandboxReleasesInternalServerError) Code() int { - return 500 -} - -func (o *GetSandboxReleasesInternalServerError) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /v1/sandboxes/{sandbox_id}/releases][%d] getSandboxReleasesInternalServerError %s", 500, payload) -} - -func (o *GetSandboxReleasesInternalServerError) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /v1/sandboxes/{sandbox_id}/releases][%d] getSandboxReleasesInternalServerError %s", 500, payload) -} - -func (o *GetSandboxReleasesInternalServerError) GetPayload() *models.StderrErrResponse { - return o.Payload -} - -func (o *GetSandboxReleasesInternalServerError) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.StderrErrResponse) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} diff --git a/client/operations/get_sandbox_responses.go b/client/operations/get_sandbox_responses.go deleted file mode 100644 index 3c0d314..0000000 --- a/client/operations/get_sandbox_responses.go +++ /dev/null @@ -1,486 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package operations - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "encoding/json" - "fmt" - "io" - - "github.com/go-openapi/runtime" - "github.com/go-openapi/strfmt" - - "github.com/nuonco/nuon-go/models" -) - -// GetSandboxReader is a Reader for the GetSandbox structure. -type GetSandboxReader struct { - formats strfmt.Registry -} - -// ReadResponse reads a server response into the received o. -func (o *GetSandboxReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { - switch response.Code() { - case 200: - result := NewGetSandboxOK() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return result, nil - case 400: - result := NewGetSandboxBadRequest() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return nil, result - case 401: - result := NewGetSandboxUnauthorized() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return nil, result - case 403: - result := NewGetSandboxForbidden() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return nil, result - case 404: - result := NewGetSandboxNotFound() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return nil, result - case 500: - result := NewGetSandboxInternalServerError() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return nil, result - default: - return nil, runtime.NewAPIError("[GET /v1/sandboxes/{sandbox_id}] GetSandbox", response, response.Code()) - } -} - -// NewGetSandboxOK creates a GetSandboxOK with default headers values -func NewGetSandboxOK() *GetSandboxOK { - return &GetSandboxOK{} -} - -/* -GetSandboxOK describes a response with status code 200, with default header values. - -OK -*/ -type GetSandboxOK struct { - Payload *models.AppSandbox -} - -// IsSuccess returns true when this get sandbox o k response has a 2xx status code -func (o *GetSandboxOK) IsSuccess() bool { - return true -} - -// IsRedirect returns true when this get sandbox o k response has a 3xx status code -func (o *GetSandboxOK) IsRedirect() bool { - return false -} - -// IsClientError returns true when this get sandbox o k response has a 4xx status code -func (o *GetSandboxOK) IsClientError() bool { - return false -} - -// IsServerError returns true when this get sandbox o k response has a 5xx status code -func (o *GetSandboxOK) IsServerError() bool { - return false -} - -// IsCode returns true when this get sandbox o k response a status code equal to that given -func (o *GetSandboxOK) IsCode(code int) bool { - return code == 200 -} - -// Code gets the status code for the get sandbox o k response -func (o *GetSandboxOK) Code() int { - return 200 -} - -func (o *GetSandboxOK) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /v1/sandboxes/{sandbox_id}][%d] getSandboxOK %s", 200, payload) -} - -func (o *GetSandboxOK) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /v1/sandboxes/{sandbox_id}][%d] getSandboxOK %s", 200, payload) -} - -func (o *GetSandboxOK) GetPayload() *models.AppSandbox { - return o.Payload -} - -func (o *GetSandboxOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.AppSandbox) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewGetSandboxBadRequest creates a GetSandboxBadRequest with default headers values -func NewGetSandboxBadRequest() *GetSandboxBadRequest { - return &GetSandboxBadRequest{} -} - -/* -GetSandboxBadRequest describes a response with status code 400, with default header values. - -Bad Request -*/ -type GetSandboxBadRequest struct { - Payload *models.StderrErrResponse -} - -// IsSuccess returns true when this get sandbox bad request response has a 2xx status code -func (o *GetSandboxBadRequest) IsSuccess() bool { - return false -} - -// IsRedirect returns true when this get sandbox bad request response has a 3xx status code -func (o *GetSandboxBadRequest) IsRedirect() bool { - return false -} - -// IsClientError returns true when this get sandbox bad request response has a 4xx status code -func (o *GetSandboxBadRequest) IsClientError() bool { - return true -} - -// IsServerError returns true when this get sandbox bad request response has a 5xx status code -func (o *GetSandboxBadRequest) IsServerError() bool { - return false -} - -// IsCode returns true when this get sandbox bad request response a status code equal to that given -func (o *GetSandboxBadRequest) IsCode(code int) bool { - return code == 400 -} - -// Code gets the status code for the get sandbox bad request response -func (o *GetSandboxBadRequest) Code() int { - return 400 -} - -func (o *GetSandboxBadRequest) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /v1/sandboxes/{sandbox_id}][%d] getSandboxBadRequest %s", 400, payload) -} - -func (o *GetSandboxBadRequest) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /v1/sandboxes/{sandbox_id}][%d] getSandboxBadRequest %s", 400, payload) -} - -func (o *GetSandboxBadRequest) GetPayload() *models.StderrErrResponse { - return o.Payload -} - -func (o *GetSandboxBadRequest) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.StderrErrResponse) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewGetSandboxUnauthorized creates a GetSandboxUnauthorized with default headers values -func NewGetSandboxUnauthorized() *GetSandboxUnauthorized { - return &GetSandboxUnauthorized{} -} - -/* -GetSandboxUnauthorized describes a response with status code 401, with default header values. - -Unauthorized -*/ -type GetSandboxUnauthorized struct { - Payload *models.StderrErrResponse -} - -// IsSuccess returns true when this get sandbox unauthorized response has a 2xx status code -func (o *GetSandboxUnauthorized) IsSuccess() bool { - return false -} - -// IsRedirect returns true when this get sandbox unauthorized response has a 3xx status code -func (o *GetSandboxUnauthorized) IsRedirect() bool { - return false -} - -// IsClientError returns true when this get sandbox unauthorized response has a 4xx status code -func (o *GetSandboxUnauthorized) IsClientError() bool { - return true -} - -// IsServerError returns true when this get sandbox unauthorized response has a 5xx status code -func (o *GetSandboxUnauthorized) IsServerError() bool { - return false -} - -// IsCode returns true when this get sandbox unauthorized response a status code equal to that given -func (o *GetSandboxUnauthorized) IsCode(code int) bool { - return code == 401 -} - -// Code gets the status code for the get sandbox unauthorized response -func (o *GetSandboxUnauthorized) Code() int { - return 401 -} - -func (o *GetSandboxUnauthorized) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /v1/sandboxes/{sandbox_id}][%d] getSandboxUnauthorized %s", 401, payload) -} - -func (o *GetSandboxUnauthorized) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /v1/sandboxes/{sandbox_id}][%d] getSandboxUnauthorized %s", 401, payload) -} - -func (o *GetSandboxUnauthorized) GetPayload() *models.StderrErrResponse { - return o.Payload -} - -func (o *GetSandboxUnauthorized) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.StderrErrResponse) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewGetSandboxForbidden creates a GetSandboxForbidden with default headers values -func NewGetSandboxForbidden() *GetSandboxForbidden { - return &GetSandboxForbidden{} -} - -/* -GetSandboxForbidden describes a response with status code 403, with default header values. - -Forbidden -*/ -type GetSandboxForbidden struct { - Payload *models.StderrErrResponse -} - -// IsSuccess returns true when this get sandbox forbidden response has a 2xx status code -func (o *GetSandboxForbidden) IsSuccess() bool { - return false -} - -// IsRedirect returns true when this get sandbox forbidden response has a 3xx status code -func (o *GetSandboxForbidden) IsRedirect() bool { - return false -} - -// IsClientError returns true when this get sandbox forbidden response has a 4xx status code -func (o *GetSandboxForbidden) IsClientError() bool { - return true -} - -// IsServerError returns true when this get sandbox forbidden response has a 5xx status code -func (o *GetSandboxForbidden) IsServerError() bool { - return false -} - -// IsCode returns true when this get sandbox forbidden response a status code equal to that given -func (o *GetSandboxForbidden) IsCode(code int) bool { - return code == 403 -} - -// Code gets the status code for the get sandbox forbidden response -func (o *GetSandboxForbidden) Code() int { - return 403 -} - -func (o *GetSandboxForbidden) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /v1/sandboxes/{sandbox_id}][%d] getSandboxForbidden %s", 403, payload) -} - -func (o *GetSandboxForbidden) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /v1/sandboxes/{sandbox_id}][%d] getSandboxForbidden %s", 403, payload) -} - -func (o *GetSandboxForbidden) GetPayload() *models.StderrErrResponse { - return o.Payload -} - -func (o *GetSandboxForbidden) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.StderrErrResponse) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewGetSandboxNotFound creates a GetSandboxNotFound with default headers values -func NewGetSandboxNotFound() *GetSandboxNotFound { - return &GetSandboxNotFound{} -} - -/* -GetSandboxNotFound describes a response with status code 404, with default header values. - -Not Found -*/ -type GetSandboxNotFound struct { - Payload *models.StderrErrResponse -} - -// IsSuccess returns true when this get sandbox not found response has a 2xx status code -func (o *GetSandboxNotFound) IsSuccess() bool { - return false -} - -// IsRedirect returns true when this get sandbox not found response has a 3xx status code -func (o *GetSandboxNotFound) IsRedirect() bool { - return false -} - -// IsClientError returns true when this get sandbox not found response has a 4xx status code -func (o *GetSandboxNotFound) IsClientError() bool { - return true -} - -// IsServerError returns true when this get sandbox not found response has a 5xx status code -func (o *GetSandboxNotFound) IsServerError() bool { - return false -} - -// IsCode returns true when this get sandbox not found response a status code equal to that given -func (o *GetSandboxNotFound) IsCode(code int) bool { - return code == 404 -} - -// Code gets the status code for the get sandbox not found response -func (o *GetSandboxNotFound) Code() int { - return 404 -} - -func (o *GetSandboxNotFound) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /v1/sandboxes/{sandbox_id}][%d] getSandboxNotFound %s", 404, payload) -} - -func (o *GetSandboxNotFound) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /v1/sandboxes/{sandbox_id}][%d] getSandboxNotFound %s", 404, payload) -} - -func (o *GetSandboxNotFound) GetPayload() *models.StderrErrResponse { - return o.Payload -} - -func (o *GetSandboxNotFound) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.StderrErrResponse) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewGetSandboxInternalServerError creates a GetSandboxInternalServerError with default headers values -func NewGetSandboxInternalServerError() *GetSandboxInternalServerError { - return &GetSandboxInternalServerError{} -} - -/* -GetSandboxInternalServerError describes a response with status code 500, with default header values. - -Internal Server Error -*/ -type GetSandboxInternalServerError struct { - Payload *models.StderrErrResponse -} - -// IsSuccess returns true when this get sandbox internal server error response has a 2xx status code -func (o *GetSandboxInternalServerError) IsSuccess() bool { - return false -} - -// IsRedirect returns true when this get sandbox internal server error response has a 3xx status code -func (o *GetSandboxInternalServerError) IsRedirect() bool { - return false -} - -// IsClientError returns true when this get sandbox internal server error response has a 4xx status code -func (o *GetSandboxInternalServerError) IsClientError() bool { - return false -} - -// IsServerError returns true when this get sandbox internal server error response has a 5xx status code -func (o *GetSandboxInternalServerError) IsServerError() bool { - return true -} - -// IsCode returns true when this get sandbox internal server error response a status code equal to that given -func (o *GetSandboxInternalServerError) IsCode(code int) bool { - return code == 500 -} - -// Code gets the status code for the get sandbox internal server error response -func (o *GetSandboxInternalServerError) Code() int { - return 500 -} - -func (o *GetSandboxInternalServerError) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /v1/sandboxes/{sandbox_id}][%d] getSandboxInternalServerError %s", 500, payload) -} - -func (o *GetSandboxInternalServerError) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /v1/sandboxes/{sandbox_id}][%d] getSandboxInternalServerError %s", 500, payload) -} - -func (o *GetSandboxInternalServerError) GetPayload() *models.StderrErrResponse { - return o.Payload -} - -func (o *GetSandboxInternalServerError) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.StderrErrResponse) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} diff --git a/client/operations/get_sandboxes_parameters.go b/client/operations/get_sandboxes_parameters.go deleted file mode 100644 index 670223c..0000000 --- a/client/operations/get_sandboxes_parameters.go +++ /dev/null @@ -1,128 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package operations - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "context" - "net/http" - "time" - - "github.com/go-openapi/errors" - "github.com/go-openapi/runtime" - cr "github.com/go-openapi/runtime/client" - "github.com/go-openapi/strfmt" -) - -// NewGetSandboxesParams creates a new GetSandboxesParams object, -// with the default timeout for this client. -// -// Default values are not hydrated, since defaults are normally applied by the API server side. -// -// To enforce default values in parameter, use SetDefaults or WithDefaults. -func NewGetSandboxesParams() *GetSandboxesParams { - return &GetSandboxesParams{ - timeout: cr.DefaultTimeout, - } -} - -// NewGetSandboxesParamsWithTimeout creates a new GetSandboxesParams object -// with the ability to set a timeout on a request. -func NewGetSandboxesParamsWithTimeout(timeout time.Duration) *GetSandboxesParams { - return &GetSandboxesParams{ - timeout: timeout, - } -} - -// NewGetSandboxesParamsWithContext creates a new GetSandboxesParams object -// with the ability to set a context for a request. -func NewGetSandboxesParamsWithContext(ctx context.Context) *GetSandboxesParams { - return &GetSandboxesParams{ - Context: ctx, - } -} - -// NewGetSandboxesParamsWithHTTPClient creates a new GetSandboxesParams object -// with the ability to set a custom HTTPClient for a request. -func NewGetSandboxesParamsWithHTTPClient(client *http.Client) *GetSandboxesParams { - return &GetSandboxesParams{ - HTTPClient: client, - } -} - -/* -GetSandboxesParams contains all the parameters to send to the API endpoint - - for the get sandboxes operation. - - Typically these are written to a http.Request. -*/ -type GetSandboxesParams struct { - timeout time.Duration - Context context.Context - HTTPClient *http.Client -} - -// WithDefaults hydrates default values in the get sandboxes params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *GetSandboxesParams) WithDefaults() *GetSandboxesParams { - o.SetDefaults() - return o -} - -// SetDefaults hydrates default values in the get sandboxes params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *GetSandboxesParams) SetDefaults() { - // no default values defined for this parameter -} - -// WithTimeout adds the timeout to the get sandboxes params -func (o *GetSandboxesParams) WithTimeout(timeout time.Duration) *GetSandboxesParams { - o.SetTimeout(timeout) - return o -} - -// SetTimeout adds the timeout to the get sandboxes params -func (o *GetSandboxesParams) SetTimeout(timeout time.Duration) { - o.timeout = timeout -} - -// WithContext adds the context to the get sandboxes params -func (o *GetSandboxesParams) WithContext(ctx context.Context) *GetSandboxesParams { - o.SetContext(ctx) - return o -} - -// SetContext adds the context to the get sandboxes params -func (o *GetSandboxesParams) SetContext(ctx context.Context) { - o.Context = ctx -} - -// WithHTTPClient adds the HTTPClient to the get sandboxes params -func (o *GetSandboxesParams) WithHTTPClient(client *http.Client) *GetSandboxesParams { - o.SetHTTPClient(client) - return o -} - -// SetHTTPClient adds the HTTPClient to the get sandboxes params -func (o *GetSandboxesParams) SetHTTPClient(client *http.Client) { - o.HTTPClient = client -} - -// WriteToRequest writes these params to a swagger request -func (o *GetSandboxesParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { - - if err := r.SetTimeout(o.timeout); err != nil { - return err - } - var res []error - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} diff --git a/client/operations/get_sandboxes_responses.go b/client/operations/get_sandboxes_responses.go deleted file mode 100644 index ca8f82a..0000000 --- a/client/operations/get_sandboxes_responses.go +++ /dev/null @@ -1,104 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package operations - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "encoding/json" - "fmt" - "io" - - "github.com/go-openapi/runtime" - "github.com/go-openapi/strfmt" - - "github.com/nuonco/nuon-go/models" -) - -// GetSandboxesReader is a Reader for the GetSandboxes structure. -type GetSandboxesReader struct { - formats strfmt.Registry -} - -// ReadResponse reads a server response into the received o. -func (o *GetSandboxesReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { - switch response.Code() { - case 200: - result := NewGetSandboxesOK() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return result, nil - default: - return nil, runtime.NewAPIError("[GET /v1/sandboxes] GetSandboxes", response, response.Code()) - } -} - -// NewGetSandboxesOK creates a GetSandboxesOK with default headers values -func NewGetSandboxesOK() *GetSandboxesOK { - return &GetSandboxesOK{} -} - -/* -GetSandboxesOK describes a response with status code 200, with default header values. - -OK -*/ -type GetSandboxesOK struct { - Payload []*models.AppSandbox -} - -// IsSuccess returns true when this get sandboxes o k response has a 2xx status code -func (o *GetSandboxesOK) IsSuccess() bool { - return true -} - -// IsRedirect returns true when this get sandboxes o k response has a 3xx status code -func (o *GetSandboxesOK) IsRedirect() bool { - return false -} - -// IsClientError returns true when this get sandboxes o k response has a 4xx status code -func (o *GetSandboxesOK) IsClientError() bool { - return false -} - -// IsServerError returns true when this get sandboxes o k response has a 5xx status code -func (o *GetSandboxesOK) IsServerError() bool { - return false -} - -// IsCode returns true when this get sandboxes o k response a status code equal to that given -func (o *GetSandboxesOK) IsCode(code int) bool { - return code == 200 -} - -// Code gets the status code for the get sandboxes o k response -func (o *GetSandboxesOK) Code() int { - return 200 -} - -func (o *GetSandboxesOK) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /v1/sandboxes][%d] getSandboxesOK %s", 200, payload) -} - -func (o *GetSandboxesOK) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /v1/sandboxes][%d] getSandboxesOK %s", 200, payload) -} - -func (o *GetSandboxesOK) GetPayload() []*models.AppSandbox { - return o.Payload -} - -func (o *GetSandboxesOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - // response payload - if err := consumer.Consume(response.Body(), &o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} diff --git a/client/operations/get_v_c_s_connection_parameters.go b/client/operations/get_v_c_s_connection_parameters.go deleted file mode 100644 index e0222fb..0000000 --- a/client/operations/get_v_c_s_connection_parameters.go +++ /dev/null @@ -1,151 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package operations - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "context" - "net/http" - "time" - - "github.com/go-openapi/errors" - "github.com/go-openapi/runtime" - cr "github.com/go-openapi/runtime/client" - "github.com/go-openapi/strfmt" -) - -// NewGetVCSConnectionParams creates a new GetVCSConnectionParams object, -// with the default timeout for this client. -// -// Default values are not hydrated, since defaults are normally applied by the API server side. -// -// To enforce default values in parameter, use SetDefaults or WithDefaults. -func NewGetVCSConnectionParams() *GetVCSConnectionParams { - return &GetVCSConnectionParams{ - timeout: cr.DefaultTimeout, - } -} - -// NewGetVCSConnectionParamsWithTimeout creates a new GetVCSConnectionParams object -// with the ability to set a timeout on a request. -func NewGetVCSConnectionParamsWithTimeout(timeout time.Duration) *GetVCSConnectionParams { - return &GetVCSConnectionParams{ - timeout: timeout, - } -} - -// NewGetVCSConnectionParamsWithContext creates a new GetVCSConnectionParams object -// with the ability to set a context for a request. -func NewGetVCSConnectionParamsWithContext(ctx context.Context) *GetVCSConnectionParams { - return &GetVCSConnectionParams{ - Context: ctx, - } -} - -// NewGetVCSConnectionParamsWithHTTPClient creates a new GetVCSConnectionParams object -// with the ability to set a custom HTTPClient for a request. -func NewGetVCSConnectionParamsWithHTTPClient(client *http.Client) *GetVCSConnectionParams { - return &GetVCSConnectionParams{ - HTTPClient: client, - } -} - -/* -GetVCSConnectionParams contains all the parameters to send to the API endpoint - - for the get v c s connection operation. - - Typically these are written to a http.Request. -*/ -type GetVCSConnectionParams struct { - - /* ConnectionID. - - connection ID - */ - ConnectionID string - - timeout time.Duration - Context context.Context - HTTPClient *http.Client -} - -// WithDefaults hydrates default values in the get v c s connection params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *GetVCSConnectionParams) WithDefaults() *GetVCSConnectionParams { - o.SetDefaults() - return o -} - -// SetDefaults hydrates default values in the get v c s connection params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *GetVCSConnectionParams) SetDefaults() { - // no default values defined for this parameter -} - -// WithTimeout adds the timeout to the get v c s connection params -func (o *GetVCSConnectionParams) WithTimeout(timeout time.Duration) *GetVCSConnectionParams { - o.SetTimeout(timeout) - return o -} - -// SetTimeout adds the timeout to the get v c s connection params -func (o *GetVCSConnectionParams) SetTimeout(timeout time.Duration) { - o.timeout = timeout -} - -// WithContext adds the context to the get v c s connection params -func (o *GetVCSConnectionParams) WithContext(ctx context.Context) *GetVCSConnectionParams { - o.SetContext(ctx) - return o -} - -// SetContext adds the context to the get v c s connection params -func (o *GetVCSConnectionParams) SetContext(ctx context.Context) { - o.Context = ctx -} - -// WithHTTPClient adds the HTTPClient to the get v c s connection params -func (o *GetVCSConnectionParams) WithHTTPClient(client *http.Client) *GetVCSConnectionParams { - o.SetHTTPClient(client) - return o -} - -// SetHTTPClient adds the HTTPClient to the get v c s connection params -func (o *GetVCSConnectionParams) SetHTTPClient(client *http.Client) { - o.HTTPClient = client -} - -// WithConnectionID adds the connectionID to the get v c s connection params -func (o *GetVCSConnectionParams) WithConnectionID(connectionID string) *GetVCSConnectionParams { - o.SetConnectionID(connectionID) - return o -} - -// SetConnectionID adds the connectionId to the get v c s connection params -func (o *GetVCSConnectionParams) SetConnectionID(connectionID string) { - o.ConnectionID = connectionID -} - -// WriteToRequest writes these params to a swagger request -func (o *GetVCSConnectionParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { - - if err := r.SetTimeout(o.timeout); err != nil { - return err - } - var res []error - - // path param connection_id - if err := r.SetPathParam("connection_id", o.ConnectionID); err != nil { - return err - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} diff --git a/client/operations/get_v_c_s_connection_responses.go b/client/operations/get_v_c_s_connection_responses.go deleted file mode 100644 index ab7298d..0000000 --- a/client/operations/get_v_c_s_connection_responses.go +++ /dev/null @@ -1,486 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package operations - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "encoding/json" - "fmt" - "io" - - "github.com/go-openapi/runtime" - "github.com/go-openapi/strfmt" - - "github.com/nuonco/nuon-go/models" -) - -// GetVCSConnectionReader is a Reader for the GetVCSConnection structure. -type GetVCSConnectionReader struct { - formats strfmt.Registry -} - -// ReadResponse reads a server response into the received o. -func (o *GetVCSConnectionReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { - switch response.Code() { - case 200: - result := NewGetVCSConnectionOK() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return result, nil - case 400: - result := NewGetVCSConnectionBadRequest() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return nil, result - case 401: - result := NewGetVCSConnectionUnauthorized() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return nil, result - case 403: - result := NewGetVCSConnectionForbidden() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return nil, result - case 404: - result := NewGetVCSConnectionNotFound() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return nil, result - case 500: - result := NewGetVCSConnectionInternalServerError() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return nil, result - default: - return nil, runtime.NewAPIError("[GET /v1/vcs/connections/{connection_id}] GetVCSConnection", response, response.Code()) - } -} - -// NewGetVCSConnectionOK creates a GetVCSConnectionOK with default headers values -func NewGetVCSConnectionOK() *GetVCSConnectionOK { - return &GetVCSConnectionOK{} -} - -/* -GetVCSConnectionOK describes a response with status code 200, with default header values. - -OK -*/ -type GetVCSConnectionOK struct { - Payload *models.AppVCSConnection -} - -// IsSuccess returns true when this get v c s connection o k response has a 2xx status code -func (o *GetVCSConnectionOK) IsSuccess() bool { - return true -} - -// IsRedirect returns true when this get v c s connection o k response has a 3xx status code -func (o *GetVCSConnectionOK) IsRedirect() bool { - return false -} - -// IsClientError returns true when this get v c s connection o k response has a 4xx status code -func (o *GetVCSConnectionOK) IsClientError() bool { - return false -} - -// IsServerError returns true when this get v c s connection o k response has a 5xx status code -func (o *GetVCSConnectionOK) IsServerError() bool { - return false -} - -// IsCode returns true when this get v c s connection o k response a status code equal to that given -func (o *GetVCSConnectionOK) IsCode(code int) bool { - return code == 200 -} - -// Code gets the status code for the get v c s connection o k response -func (o *GetVCSConnectionOK) Code() int { - return 200 -} - -func (o *GetVCSConnectionOK) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /v1/vcs/connections/{connection_id}][%d] getVCSConnectionOK %s", 200, payload) -} - -func (o *GetVCSConnectionOK) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /v1/vcs/connections/{connection_id}][%d] getVCSConnectionOK %s", 200, payload) -} - -func (o *GetVCSConnectionOK) GetPayload() *models.AppVCSConnection { - return o.Payload -} - -func (o *GetVCSConnectionOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.AppVCSConnection) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewGetVCSConnectionBadRequest creates a GetVCSConnectionBadRequest with default headers values -func NewGetVCSConnectionBadRequest() *GetVCSConnectionBadRequest { - return &GetVCSConnectionBadRequest{} -} - -/* -GetVCSConnectionBadRequest describes a response with status code 400, with default header values. - -Bad Request -*/ -type GetVCSConnectionBadRequest struct { - Payload *models.StderrErrResponse -} - -// IsSuccess returns true when this get v c s connection bad request response has a 2xx status code -func (o *GetVCSConnectionBadRequest) IsSuccess() bool { - return false -} - -// IsRedirect returns true when this get v c s connection bad request response has a 3xx status code -func (o *GetVCSConnectionBadRequest) IsRedirect() bool { - return false -} - -// IsClientError returns true when this get v c s connection bad request response has a 4xx status code -func (o *GetVCSConnectionBadRequest) IsClientError() bool { - return true -} - -// IsServerError returns true when this get v c s connection bad request response has a 5xx status code -func (o *GetVCSConnectionBadRequest) IsServerError() bool { - return false -} - -// IsCode returns true when this get v c s connection bad request response a status code equal to that given -func (o *GetVCSConnectionBadRequest) IsCode(code int) bool { - return code == 400 -} - -// Code gets the status code for the get v c s connection bad request response -func (o *GetVCSConnectionBadRequest) Code() int { - return 400 -} - -func (o *GetVCSConnectionBadRequest) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /v1/vcs/connections/{connection_id}][%d] getVCSConnectionBadRequest %s", 400, payload) -} - -func (o *GetVCSConnectionBadRequest) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /v1/vcs/connections/{connection_id}][%d] getVCSConnectionBadRequest %s", 400, payload) -} - -func (o *GetVCSConnectionBadRequest) GetPayload() *models.StderrErrResponse { - return o.Payload -} - -func (o *GetVCSConnectionBadRequest) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.StderrErrResponse) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewGetVCSConnectionUnauthorized creates a GetVCSConnectionUnauthorized with default headers values -func NewGetVCSConnectionUnauthorized() *GetVCSConnectionUnauthorized { - return &GetVCSConnectionUnauthorized{} -} - -/* -GetVCSConnectionUnauthorized describes a response with status code 401, with default header values. - -Unauthorized -*/ -type GetVCSConnectionUnauthorized struct { - Payload *models.StderrErrResponse -} - -// IsSuccess returns true when this get v c s connection unauthorized response has a 2xx status code -func (o *GetVCSConnectionUnauthorized) IsSuccess() bool { - return false -} - -// IsRedirect returns true when this get v c s connection unauthorized response has a 3xx status code -func (o *GetVCSConnectionUnauthorized) IsRedirect() bool { - return false -} - -// IsClientError returns true when this get v c s connection unauthorized response has a 4xx status code -func (o *GetVCSConnectionUnauthorized) IsClientError() bool { - return true -} - -// IsServerError returns true when this get v c s connection unauthorized response has a 5xx status code -func (o *GetVCSConnectionUnauthorized) IsServerError() bool { - return false -} - -// IsCode returns true when this get v c s connection unauthorized response a status code equal to that given -func (o *GetVCSConnectionUnauthorized) IsCode(code int) bool { - return code == 401 -} - -// Code gets the status code for the get v c s connection unauthorized response -func (o *GetVCSConnectionUnauthorized) Code() int { - return 401 -} - -func (o *GetVCSConnectionUnauthorized) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /v1/vcs/connections/{connection_id}][%d] getVCSConnectionUnauthorized %s", 401, payload) -} - -func (o *GetVCSConnectionUnauthorized) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /v1/vcs/connections/{connection_id}][%d] getVCSConnectionUnauthorized %s", 401, payload) -} - -func (o *GetVCSConnectionUnauthorized) GetPayload() *models.StderrErrResponse { - return o.Payload -} - -func (o *GetVCSConnectionUnauthorized) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.StderrErrResponse) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewGetVCSConnectionForbidden creates a GetVCSConnectionForbidden with default headers values -func NewGetVCSConnectionForbidden() *GetVCSConnectionForbidden { - return &GetVCSConnectionForbidden{} -} - -/* -GetVCSConnectionForbidden describes a response with status code 403, with default header values. - -Forbidden -*/ -type GetVCSConnectionForbidden struct { - Payload *models.StderrErrResponse -} - -// IsSuccess returns true when this get v c s connection forbidden response has a 2xx status code -func (o *GetVCSConnectionForbidden) IsSuccess() bool { - return false -} - -// IsRedirect returns true when this get v c s connection forbidden response has a 3xx status code -func (o *GetVCSConnectionForbidden) IsRedirect() bool { - return false -} - -// IsClientError returns true when this get v c s connection forbidden response has a 4xx status code -func (o *GetVCSConnectionForbidden) IsClientError() bool { - return true -} - -// IsServerError returns true when this get v c s connection forbidden response has a 5xx status code -func (o *GetVCSConnectionForbidden) IsServerError() bool { - return false -} - -// IsCode returns true when this get v c s connection forbidden response a status code equal to that given -func (o *GetVCSConnectionForbidden) IsCode(code int) bool { - return code == 403 -} - -// Code gets the status code for the get v c s connection forbidden response -func (o *GetVCSConnectionForbidden) Code() int { - return 403 -} - -func (o *GetVCSConnectionForbidden) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /v1/vcs/connections/{connection_id}][%d] getVCSConnectionForbidden %s", 403, payload) -} - -func (o *GetVCSConnectionForbidden) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /v1/vcs/connections/{connection_id}][%d] getVCSConnectionForbidden %s", 403, payload) -} - -func (o *GetVCSConnectionForbidden) GetPayload() *models.StderrErrResponse { - return o.Payload -} - -func (o *GetVCSConnectionForbidden) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.StderrErrResponse) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewGetVCSConnectionNotFound creates a GetVCSConnectionNotFound with default headers values -func NewGetVCSConnectionNotFound() *GetVCSConnectionNotFound { - return &GetVCSConnectionNotFound{} -} - -/* -GetVCSConnectionNotFound describes a response with status code 404, with default header values. - -Not Found -*/ -type GetVCSConnectionNotFound struct { - Payload *models.StderrErrResponse -} - -// IsSuccess returns true when this get v c s connection not found response has a 2xx status code -func (o *GetVCSConnectionNotFound) IsSuccess() bool { - return false -} - -// IsRedirect returns true when this get v c s connection not found response has a 3xx status code -func (o *GetVCSConnectionNotFound) IsRedirect() bool { - return false -} - -// IsClientError returns true when this get v c s connection not found response has a 4xx status code -func (o *GetVCSConnectionNotFound) IsClientError() bool { - return true -} - -// IsServerError returns true when this get v c s connection not found response has a 5xx status code -func (o *GetVCSConnectionNotFound) IsServerError() bool { - return false -} - -// IsCode returns true when this get v c s connection not found response a status code equal to that given -func (o *GetVCSConnectionNotFound) IsCode(code int) bool { - return code == 404 -} - -// Code gets the status code for the get v c s connection not found response -func (o *GetVCSConnectionNotFound) Code() int { - return 404 -} - -func (o *GetVCSConnectionNotFound) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /v1/vcs/connections/{connection_id}][%d] getVCSConnectionNotFound %s", 404, payload) -} - -func (o *GetVCSConnectionNotFound) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /v1/vcs/connections/{connection_id}][%d] getVCSConnectionNotFound %s", 404, payload) -} - -func (o *GetVCSConnectionNotFound) GetPayload() *models.StderrErrResponse { - return o.Payload -} - -func (o *GetVCSConnectionNotFound) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.StderrErrResponse) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewGetVCSConnectionInternalServerError creates a GetVCSConnectionInternalServerError with default headers values -func NewGetVCSConnectionInternalServerError() *GetVCSConnectionInternalServerError { - return &GetVCSConnectionInternalServerError{} -} - -/* -GetVCSConnectionInternalServerError describes a response with status code 500, with default header values. - -Internal Server Error -*/ -type GetVCSConnectionInternalServerError struct { - Payload *models.StderrErrResponse -} - -// IsSuccess returns true when this get v c s connection internal server error response has a 2xx status code -func (o *GetVCSConnectionInternalServerError) IsSuccess() bool { - return false -} - -// IsRedirect returns true when this get v c s connection internal server error response has a 3xx status code -func (o *GetVCSConnectionInternalServerError) IsRedirect() bool { - return false -} - -// IsClientError returns true when this get v c s connection internal server error response has a 4xx status code -func (o *GetVCSConnectionInternalServerError) IsClientError() bool { - return false -} - -// IsServerError returns true when this get v c s connection internal server error response has a 5xx status code -func (o *GetVCSConnectionInternalServerError) IsServerError() bool { - return true -} - -// IsCode returns true when this get v c s connection internal server error response a status code equal to that given -func (o *GetVCSConnectionInternalServerError) IsCode(code int) bool { - return code == 500 -} - -// Code gets the status code for the get v c s connection internal server error response -func (o *GetVCSConnectionInternalServerError) Code() int { - return 500 -} - -func (o *GetVCSConnectionInternalServerError) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /v1/vcs/connections/{connection_id}][%d] getVCSConnectionInternalServerError %s", 500, payload) -} - -func (o *GetVCSConnectionInternalServerError) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /v1/vcs/connections/{connection_id}][%d] getVCSConnectionInternalServerError %s", 500, payload) -} - -func (o *GetVCSConnectionInternalServerError) GetPayload() *models.StderrErrResponse { - return o.Payload -} - -func (o *GetVCSConnectionInternalServerError) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.StderrErrResponse) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} diff --git a/client/operations/installer_create_install_parameters.go b/client/operations/installer_create_install_parameters.go deleted file mode 100644 index 377c694..0000000 --- a/client/operations/installer_create_install_parameters.go +++ /dev/null @@ -1,175 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package operations - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "context" - "net/http" - "time" - - "github.com/go-openapi/errors" - "github.com/go-openapi/runtime" - cr "github.com/go-openapi/runtime/client" - "github.com/go-openapi/strfmt" - - "github.com/nuonco/nuon-go/models" -) - -// NewInstallerCreateInstallParams creates a new InstallerCreateInstallParams object, -// with the default timeout for this client. -// -// Default values are not hydrated, since defaults are normally applied by the API server side. -// -// To enforce default values in parameter, use SetDefaults or WithDefaults. -func NewInstallerCreateInstallParams() *InstallerCreateInstallParams { - return &InstallerCreateInstallParams{ - timeout: cr.DefaultTimeout, - } -} - -// NewInstallerCreateInstallParamsWithTimeout creates a new InstallerCreateInstallParams object -// with the ability to set a timeout on a request. -func NewInstallerCreateInstallParamsWithTimeout(timeout time.Duration) *InstallerCreateInstallParams { - return &InstallerCreateInstallParams{ - timeout: timeout, - } -} - -// NewInstallerCreateInstallParamsWithContext creates a new InstallerCreateInstallParams object -// with the ability to set a context for a request. -func NewInstallerCreateInstallParamsWithContext(ctx context.Context) *InstallerCreateInstallParams { - return &InstallerCreateInstallParams{ - Context: ctx, - } -} - -// NewInstallerCreateInstallParamsWithHTTPClient creates a new InstallerCreateInstallParams object -// with the ability to set a custom HTTPClient for a request. -func NewInstallerCreateInstallParamsWithHTTPClient(client *http.Client) *InstallerCreateInstallParams { - return &InstallerCreateInstallParams{ - HTTPClient: client, - } -} - -/* -InstallerCreateInstallParams contains all the parameters to send to the API endpoint - - for the installer create install operation. - - Typically these are written to a http.Request. -*/ -type InstallerCreateInstallParams struct { - - /* InstallerSlug. - - installer slug or ID - */ - InstallerSlug string - - /* Req. - - Input - */ - Req *models.ServiceCreateInstallRequest - - timeout time.Duration - Context context.Context - HTTPClient *http.Client -} - -// WithDefaults hydrates default values in the installer create install params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *InstallerCreateInstallParams) WithDefaults() *InstallerCreateInstallParams { - o.SetDefaults() - return o -} - -// SetDefaults hydrates default values in the installer create install params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *InstallerCreateInstallParams) SetDefaults() { - // no default values defined for this parameter -} - -// WithTimeout adds the timeout to the installer create install params -func (o *InstallerCreateInstallParams) WithTimeout(timeout time.Duration) *InstallerCreateInstallParams { - o.SetTimeout(timeout) - return o -} - -// SetTimeout adds the timeout to the installer create install params -func (o *InstallerCreateInstallParams) SetTimeout(timeout time.Duration) { - o.timeout = timeout -} - -// WithContext adds the context to the installer create install params -func (o *InstallerCreateInstallParams) WithContext(ctx context.Context) *InstallerCreateInstallParams { - o.SetContext(ctx) - return o -} - -// SetContext adds the context to the installer create install params -func (o *InstallerCreateInstallParams) SetContext(ctx context.Context) { - o.Context = ctx -} - -// WithHTTPClient adds the HTTPClient to the installer create install params -func (o *InstallerCreateInstallParams) WithHTTPClient(client *http.Client) *InstallerCreateInstallParams { - o.SetHTTPClient(client) - return o -} - -// SetHTTPClient adds the HTTPClient to the installer create install params -func (o *InstallerCreateInstallParams) SetHTTPClient(client *http.Client) { - o.HTTPClient = client -} - -// WithInstallerSlug adds the installerSlug to the installer create install params -func (o *InstallerCreateInstallParams) WithInstallerSlug(installerSlug string) *InstallerCreateInstallParams { - o.SetInstallerSlug(installerSlug) - return o -} - -// SetInstallerSlug adds the installerSlug to the installer create install params -func (o *InstallerCreateInstallParams) SetInstallerSlug(installerSlug string) { - o.InstallerSlug = installerSlug -} - -// WithReq adds the req to the installer create install params -func (o *InstallerCreateInstallParams) WithReq(req *models.ServiceCreateInstallRequest) *InstallerCreateInstallParams { - o.SetReq(req) - return o -} - -// SetReq adds the req to the installer create install params -func (o *InstallerCreateInstallParams) SetReq(req *models.ServiceCreateInstallRequest) { - o.Req = req -} - -// WriteToRequest writes these params to a swagger request -func (o *InstallerCreateInstallParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { - - if err := r.SetTimeout(o.timeout); err != nil { - return err - } - var res []error - - // path param installer_slug - if err := r.SetPathParam("installer_slug", o.InstallerSlug); err != nil { - return err - } - if o.Req != nil { - if err := r.SetBodyParam(o.Req); err != nil { - return err - } - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} diff --git a/client/operations/installer_create_install_responses.go b/client/operations/installer_create_install_responses.go deleted file mode 100644 index c5009dc..0000000 --- a/client/operations/installer_create_install_responses.go +++ /dev/null @@ -1,473 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package operations - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "fmt" - "io" - - "github.com/go-openapi/runtime" - "github.com/go-openapi/strfmt" - - "github.com/nuonco/nuon-go/models" -) - -// InstallerCreateInstallReader is a Reader for the InstallerCreateInstall structure. -type InstallerCreateInstallReader struct { - formats strfmt.Registry -} - -// ReadResponse reads a server response into the received o. -func (o *InstallerCreateInstallReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { - switch response.Code() { - case 201: - result := NewInstallerCreateInstallCreated() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return result, nil - case 400: - result := NewInstallerCreateInstallBadRequest() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return nil, result - case 401: - result := NewInstallerCreateInstallUnauthorized() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return nil, result - case 403: - result := NewInstallerCreateInstallForbidden() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return nil, result - case 404: - result := NewInstallerCreateInstallNotFound() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return nil, result - case 500: - result := NewInstallerCreateInstallInternalServerError() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return nil, result - default: - return nil, runtime.NewAPIError("[POST /v1/installer/{installer_slug}/installs] InstallerCreateInstall", response, response.Code()) - } -} - -// NewInstallerCreateInstallCreated creates a InstallerCreateInstallCreated with default headers values -func NewInstallerCreateInstallCreated() *InstallerCreateInstallCreated { - return &InstallerCreateInstallCreated{} -} - -/* -InstallerCreateInstallCreated describes a response with status code 201, with default header values. - -Created -*/ -type InstallerCreateInstallCreated struct { - Payload *models.AppInstall -} - -// IsSuccess returns true when this installer create install created response has a 2xx status code -func (o *InstallerCreateInstallCreated) IsSuccess() bool { - return true -} - -// IsRedirect returns true when this installer create install created response has a 3xx status code -func (o *InstallerCreateInstallCreated) IsRedirect() bool { - return false -} - -// IsClientError returns true when this installer create install created response has a 4xx status code -func (o *InstallerCreateInstallCreated) IsClientError() bool { - return false -} - -// IsServerError returns true when this installer create install created response has a 5xx status code -func (o *InstallerCreateInstallCreated) IsServerError() bool { - return false -} - -// IsCode returns true when this installer create install created response a status code equal to that given -func (o *InstallerCreateInstallCreated) IsCode(code int) bool { - return code == 201 -} - -// Code gets the status code for the installer create install created response -func (o *InstallerCreateInstallCreated) Code() int { - return 201 -} - -func (o *InstallerCreateInstallCreated) Error() string { - return fmt.Sprintf("[POST /v1/installer/{installer_slug}/installs][%d] installerCreateInstallCreated %+v", 201, o.Payload) -} - -func (o *InstallerCreateInstallCreated) String() string { - return fmt.Sprintf("[POST /v1/installer/{installer_slug}/installs][%d] installerCreateInstallCreated %+v", 201, o.Payload) -} - -func (o *InstallerCreateInstallCreated) GetPayload() *models.AppInstall { - return o.Payload -} - -func (o *InstallerCreateInstallCreated) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.AppInstall) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewInstallerCreateInstallBadRequest creates a InstallerCreateInstallBadRequest with default headers values -func NewInstallerCreateInstallBadRequest() *InstallerCreateInstallBadRequest { - return &InstallerCreateInstallBadRequest{} -} - -/* -InstallerCreateInstallBadRequest describes a response with status code 400, with default header values. - -Bad Request -*/ -type InstallerCreateInstallBadRequest struct { - Payload *models.StderrErrResponse -} - -// IsSuccess returns true when this installer create install bad request response has a 2xx status code -func (o *InstallerCreateInstallBadRequest) IsSuccess() bool { - return false -} - -// IsRedirect returns true when this installer create install bad request response has a 3xx status code -func (o *InstallerCreateInstallBadRequest) IsRedirect() bool { - return false -} - -// IsClientError returns true when this installer create install bad request response has a 4xx status code -func (o *InstallerCreateInstallBadRequest) IsClientError() bool { - return true -} - -// IsServerError returns true when this installer create install bad request response has a 5xx status code -func (o *InstallerCreateInstallBadRequest) IsServerError() bool { - return false -} - -// IsCode returns true when this installer create install bad request response a status code equal to that given -func (o *InstallerCreateInstallBadRequest) IsCode(code int) bool { - return code == 400 -} - -// Code gets the status code for the installer create install bad request response -func (o *InstallerCreateInstallBadRequest) Code() int { - return 400 -} - -func (o *InstallerCreateInstallBadRequest) Error() string { - return fmt.Sprintf("[POST /v1/installer/{installer_slug}/installs][%d] installerCreateInstallBadRequest %+v", 400, o.Payload) -} - -func (o *InstallerCreateInstallBadRequest) String() string { - return fmt.Sprintf("[POST /v1/installer/{installer_slug}/installs][%d] installerCreateInstallBadRequest %+v", 400, o.Payload) -} - -func (o *InstallerCreateInstallBadRequest) GetPayload() *models.StderrErrResponse { - return o.Payload -} - -func (o *InstallerCreateInstallBadRequest) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.StderrErrResponse) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewInstallerCreateInstallUnauthorized creates a InstallerCreateInstallUnauthorized with default headers values -func NewInstallerCreateInstallUnauthorized() *InstallerCreateInstallUnauthorized { - return &InstallerCreateInstallUnauthorized{} -} - -/* -InstallerCreateInstallUnauthorized describes a response with status code 401, with default header values. - -Unauthorized -*/ -type InstallerCreateInstallUnauthorized struct { - Payload *models.StderrErrResponse -} - -// IsSuccess returns true when this installer create install unauthorized response has a 2xx status code -func (o *InstallerCreateInstallUnauthorized) IsSuccess() bool { - return false -} - -// IsRedirect returns true when this installer create install unauthorized response has a 3xx status code -func (o *InstallerCreateInstallUnauthorized) IsRedirect() bool { - return false -} - -// IsClientError returns true when this installer create install unauthorized response has a 4xx status code -func (o *InstallerCreateInstallUnauthorized) IsClientError() bool { - return true -} - -// IsServerError returns true when this installer create install unauthorized response has a 5xx status code -func (o *InstallerCreateInstallUnauthorized) IsServerError() bool { - return false -} - -// IsCode returns true when this installer create install unauthorized response a status code equal to that given -func (o *InstallerCreateInstallUnauthorized) IsCode(code int) bool { - return code == 401 -} - -// Code gets the status code for the installer create install unauthorized response -func (o *InstallerCreateInstallUnauthorized) Code() int { - return 401 -} - -func (o *InstallerCreateInstallUnauthorized) Error() string { - return fmt.Sprintf("[POST /v1/installer/{installer_slug}/installs][%d] installerCreateInstallUnauthorized %+v", 401, o.Payload) -} - -func (o *InstallerCreateInstallUnauthorized) String() string { - return fmt.Sprintf("[POST /v1/installer/{installer_slug}/installs][%d] installerCreateInstallUnauthorized %+v", 401, o.Payload) -} - -func (o *InstallerCreateInstallUnauthorized) GetPayload() *models.StderrErrResponse { - return o.Payload -} - -func (o *InstallerCreateInstallUnauthorized) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.StderrErrResponse) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewInstallerCreateInstallForbidden creates a InstallerCreateInstallForbidden with default headers values -func NewInstallerCreateInstallForbidden() *InstallerCreateInstallForbidden { - return &InstallerCreateInstallForbidden{} -} - -/* -InstallerCreateInstallForbidden describes a response with status code 403, with default header values. - -Forbidden -*/ -type InstallerCreateInstallForbidden struct { - Payload *models.StderrErrResponse -} - -// IsSuccess returns true when this installer create install forbidden response has a 2xx status code -func (o *InstallerCreateInstallForbidden) IsSuccess() bool { - return false -} - -// IsRedirect returns true when this installer create install forbidden response has a 3xx status code -func (o *InstallerCreateInstallForbidden) IsRedirect() bool { - return false -} - -// IsClientError returns true when this installer create install forbidden response has a 4xx status code -func (o *InstallerCreateInstallForbidden) IsClientError() bool { - return true -} - -// IsServerError returns true when this installer create install forbidden response has a 5xx status code -func (o *InstallerCreateInstallForbidden) IsServerError() bool { - return false -} - -// IsCode returns true when this installer create install forbidden response a status code equal to that given -func (o *InstallerCreateInstallForbidden) IsCode(code int) bool { - return code == 403 -} - -// Code gets the status code for the installer create install forbidden response -func (o *InstallerCreateInstallForbidden) Code() int { - return 403 -} - -func (o *InstallerCreateInstallForbidden) Error() string { - return fmt.Sprintf("[POST /v1/installer/{installer_slug}/installs][%d] installerCreateInstallForbidden %+v", 403, o.Payload) -} - -func (o *InstallerCreateInstallForbidden) String() string { - return fmt.Sprintf("[POST /v1/installer/{installer_slug}/installs][%d] installerCreateInstallForbidden %+v", 403, o.Payload) -} - -func (o *InstallerCreateInstallForbidden) GetPayload() *models.StderrErrResponse { - return o.Payload -} - -func (o *InstallerCreateInstallForbidden) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.StderrErrResponse) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewInstallerCreateInstallNotFound creates a InstallerCreateInstallNotFound with default headers values -func NewInstallerCreateInstallNotFound() *InstallerCreateInstallNotFound { - return &InstallerCreateInstallNotFound{} -} - -/* -InstallerCreateInstallNotFound describes a response with status code 404, with default header values. - -Not Found -*/ -type InstallerCreateInstallNotFound struct { - Payload *models.StderrErrResponse -} - -// IsSuccess returns true when this installer create install not found response has a 2xx status code -func (o *InstallerCreateInstallNotFound) IsSuccess() bool { - return false -} - -// IsRedirect returns true when this installer create install not found response has a 3xx status code -func (o *InstallerCreateInstallNotFound) IsRedirect() bool { - return false -} - -// IsClientError returns true when this installer create install not found response has a 4xx status code -func (o *InstallerCreateInstallNotFound) IsClientError() bool { - return true -} - -// IsServerError returns true when this installer create install not found response has a 5xx status code -func (o *InstallerCreateInstallNotFound) IsServerError() bool { - return false -} - -// IsCode returns true when this installer create install not found response a status code equal to that given -func (o *InstallerCreateInstallNotFound) IsCode(code int) bool { - return code == 404 -} - -// Code gets the status code for the installer create install not found response -func (o *InstallerCreateInstallNotFound) Code() int { - return 404 -} - -func (o *InstallerCreateInstallNotFound) Error() string { - return fmt.Sprintf("[POST /v1/installer/{installer_slug}/installs][%d] installerCreateInstallNotFound %+v", 404, o.Payload) -} - -func (o *InstallerCreateInstallNotFound) String() string { - return fmt.Sprintf("[POST /v1/installer/{installer_slug}/installs][%d] installerCreateInstallNotFound %+v", 404, o.Payload) -} - -func (o *InstallerCreateInstallNotFound) GetPayload() *models.StderrErrResponse { - return o.Payload -} - -func (o *InstallerCreateInstallNotFound) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.StderrErrResponse) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewInstallerCreateInstallInternalServerError creates a InstallerCreateInstallInternalServerError with default headers values -func NewInstallerCreateInstallInternalServerError() *InstallerCreateInstallInternalServerError { - return &InstallerCreateInstallInternalServerError{} -} - -/* -InstallerCreateInstallInternalServerError describes a response with status code 500, with default header values. - -Internal Server Error -*/ -type InstallerCreateInstallInternalServerError struct { - Payload *models.StderrErrResponse -} - -// IsSuccess returns true when this installer create install internal server error response has a 2xx status code -func (o *InstallerCreateInstallInternalServerError) IsSuccess() bool { - return false -} - -// IsRedirect returns true when this installer create install internal server error response has a 3xx status code -func (o *InstallerCreateInstallInternalServerError) IsRedirect() bool { - return false -} - -// IsClientError returns true when this installer create install internal server error response has a 4xx status code -func (o *InstallerCreateInstallInternalServerError) IsClientError() bool { - return false -} - -// IsServerError returns true when this installer create install internal server error response has a 5xx status code -func (o *InstallerCreateInstallInternalServerError) IsServerError() bool { - return true -} - -// IsCode returns true when this installer create install internal server error response a status code equal to that given -func (o *InstallerCreateInstallInternalServerError) IsCode(code int) bool { - return code == 500 -} - -// Code gets the status code for the installer create install internal server error response -func (o *InstallerCreateInstallInternalServerError) Code() int { - return 500 -} - -func (o *InstallerCreateInstallInternalServerError) Error() string { - return fmt.Sprintf("[POST /v1/installer/{installer_slug}/installs][%d] installerCreateInstallInternalServerError %+v", 500, o.Payload) -} - -func (o *InstallerCreateInstallInternalServerError) String() string { - return fmt.Sprintf("[POST /v1/installer/{installer_slug}/installs][%d] installerCreateInstallInternalServerError %+v", 500, o.Payload) -} - -func (o *InstallerCreateInstallInternalServerError) GetPayload() *models.StderrErrResponse { - return o.Payload -} - -func (o *InstallerCreateInstallInternalServerError) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.StderrErrResponse) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} diff --git a/client/operations/operations_client.go b/client/operations/operations_client.go index 1e38611..ea12420 100644 --- a/client/operations/operations_client.go +++ b/client/operations/operations_client.go @@ -457,9 +457,10 @@ func (a *Client) GetRunnerSettings(params *GetRunnerSettingsParams, authInfo run /* RunnerOtelWriteLogs runners write logs - OTEL Exporter compatible endpoint for writing logs. Designed to work with the custom, runner otel collector/exporter + OTEL Exporter compatible endpoint for writing logs. Designed to work with the -stack. +custom, runner otel collector/exporter stack. The inbound data schema is the +schema defined by the spec. We use the official otel go SDK for this. */ func (a *Client) RunnerOtelWriteLogs(params *RunnerOtelWriteLogsParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*RunnerOtelWriteLogsCreated, error) { // TODO: Validate the params before sending diff --git a/client/operations/publish_metrics_parameters.go b/client/operations/publish_metrics_parameters.go deleted file mode 100644 index 25db697..0000000 --- a/client/operations/publish_metrics_parameters.go +++ /dev/null @@ -1,153 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package operations - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "context" - "net/http" - "time" - - "github.com/go-openapi/errors" - "github.com/go-openapi/runtime" - cr "github.com/go-openapi/runtime/client" - "github.com/go-openapi/strfmt" - - "github.com/nuonco/nuon-go/models" -) - -// NewPublishMetricsParams creates a new PublishMetricsParams object, -// with the default timeout for this client. -// -// Default values are not hydrated, since defaults are normally applied by the API server side. -// -// To enforce default values in parameter, use SetDefaults or WithDefaults. -func NewPublishMetricsParams() *PublishMetricsParams { - return &PublishMetricsParams{ - timeout: cr.DefaultTimeout, - } -} - -// NewPublishMetricsParamsWithTimeout creates a new PublishMetricsParams object -// with the ability to set a timeout on a request. -func NewPublishMetricsParamsWithTimeout(timeout time.Duration) *PublishMetricsParams { - return &PublishMetricsParams{ - timeout: timeout, - } -} - -// NewPublishMetricsParamsWithContext creates a new PublishMetricsParams object -// with the ability to set a context for a request. -func NewPublishMetricsParamsWithContext(ctx context.Context) *PublishMetricsParams { - return &PublishMetricsParams{ - Context: ctx, - } -} - -// NewPublishMetricsParamsWithHTTPClient creates a new PublishMetricsParams object -// with the ability to set a custom HTTPClient for a request. -func NewPublishMetricsParamsWithHTTPClient(client *http.Client) *PublishMetricsParams { - return &PublishMetricsParams{ - HTTPClient: client, - } -} - -/* -PublishMetricsParams contains all the parameters to send to the API endpoint - - for the publish metrics operation. - - Typically these are written to a http.Request. -*/ -type PublishMetricsParams struct { - - /* Req. - - Input - */ - Req []*models.ServicePublishMetricInput - - timeout time.Duration - Context context.Context - HTTPClient *http.Client -} - -// WithDefaults hydrates default values in the publish metrics params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *PublishMetricsParams) WithDefaults() *PublishMetricsParams { - o.SetDefaults() - return o -} - -// SetDefaults hydrates default values in the publish metrics params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *PublishMetricsParams) SetDefaults() { - // no default values defined for this parameter -} - -// WithTimeout adds the timeout to the publish metrics params -func (o *PublishMetricsParams) WithTimeout(timeout time.Duration) *PublishMetricsParams { - o.SetTimeout(timeout) - return o -} - -// SetTimeout adds the timeout to the publish metrics params -func (o *PublishMetricsParams) SetTimeout(timeout time.Duration) { - o.timeout = timeout -} - -// WithContext adds the context to the publish metrics params -func (o *PublishMetricsParams) WithContext(ctx context.Context) *PublishMetricsParams { - o.SetContext(ctx) - return o -} - -// SetContext adds the context to the publish metrics params -func (o *PublishMetricsParams) SetContext(ctx context.Context) { - o.Context = ctx -} - -// WithHTTPClient adds the HTTPClient to the publish metrics params -func (o *PublishMetricsParams) WithHTTPClient(client *http.Client) *PublishMetricsParams { - o.SetHTTPClient(client) - return o -} - -// SetHTTPClient adds the HTTPClient to the publish metrics params -func (o *PublishMetricsParams) SetHTTPClient(client *http.Client) { - o.HTTPClient = client -} - -// WithReq adds the req to the publish metrics params -func (o *PublishMetricsParams) WithReq(req []*models.ServicePublishMetricInput) *PublishMetricsParams { - o.SetReq(req) - return o -} - -// SetReq adds the req to the publish metrics params -func (o *PublishMetricsParams) SetReq(req []*models.ServicePublishMetricInput) { - o.Req = req -} - -// WriteToRequest writes these params to a swagger request -func (o *PublishMetricsParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { - - if err := r.SetTimeout(o.timeout); err != nil { - return err - } - var res []error - if o.Req != nil { - if err := r.SetBodyParam(o.Req); err != nil { - return err - } - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} diff --git a/client/operations/publish_metrics_responses.go b/client/operations/publish_metrics_responses.go deleted file mode 100644 index bfbc71b..0000000 --- a/client/operations/publish_metrics_responses.go +++ /dev/null @@ -1,484 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package operations - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "encoding/json" - "fmt" - "io" - - "github.com/go-openapi/runtime" - "github.com/go-openapi/strfmt" - - "github.com/nuonco/nuon-go/models" -) - -// PublishMetricsReader is a Reader for the PublishMetrics structure. -type PublishMetricsReader struct { - formats strfmt.Registry -} - -// ReadResponse reads a server response into the received o. -func (o *PublishMetricsReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { - switch response.Code() { - case 200: - result := NewPublishMetricsOK() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return result, nil - case 400: - result := NewPublishMetricsBadRequest() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return nil, result - case 401: - result := NewPublishMetricsUnauthorized() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return nil, result - case 403: - result := NewPublishMetricsForbidden() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return nil, result - case 404: - result := NewPublishMetricsNotFound() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return nil, result - case 500: - result := NewPublishMetricsInternalServerError() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return nil, result - default: - return nil, runtime.NewAPIError("[POST /v1/general/metrics] PublishMetrics", response, response.Code()) - } -} - -// NewPublishMetricsOK creates a PublishMetricsOK with default headers values -func NewPublishMetricsOK() *PublishMetricsOK { - return &PublishMetricsOK{} -} - -/* -PublishMetricsOK describes a response with status code 200, with default header values. - -OK -*/ -type PublishMetricsOK struct { - Payload string -} - -// IsSuccess returns true when this publish metrics o k response has a 2xx status code -func (o *PublishMetricsOK) IsSuccess() bool { - return true -} - -// IsRedirect returns true when this publish metrics o k response has a 3xx status code -func (o *PublishMetricsOK) IsRedirect() bool { - return false -} - -// IsClientError returns true when this publish metrics o k response has a 4xx status code -func (o *PublishMetricsOK) IsClientError() bool { - return false -} - -// IsServerError returns true when this publish metrics o k response has a 5xx status code -func (o *PublishMetricsOK) IsServerError() bool { - return false -} - -// IsCode returns true when this publish metrics o k response a status code equal to that given -func (o *PublishMetricsOK) IsCode(code int) bool { - return code == 200 -} - -// Code gets the status code for the publish metrics o k response -func (o *PublishMetricsOK) Code() int { - return 200 -} - -func (o *PublishMetricsOK) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[POST /v1/general/metrics][%d] publishMetricsOK %s", 200, payload) -} - -func (o *PublishMetricsOK) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[POST /v1/general/metrics][%d] publishMetricsOK %s", 200, payload) -} - -func (o *PublishMetricsOK) GetPayload() string { - return o.Payload -} - -func (o *PublishMetricsOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - // response payload - if err := consumer.Consume(response.Body(), &o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewPublishMetricsBadRequest creates a PublishMetricsBadRequest with default headers values -func NewPublishMetricsBadRequest() *PublishMetricsBadRequest { - return &PublishMetricsBadRequest{} -} - -/* -PublishMetricsBadRequest describes a response with status code 400, with default header values. - -Bad Request -*/ -type PublishMetricsBadRequest struct { - Payload *models.StderrErrResponse -} - -// IsSuccess returns true when this publish metrics bad request response has a 2xx status code -func (o *PublishMetricsBadRequest) IsSuccess() bool { - return false -} - -// IsRedirect returns true when this publish metrics bad request response has a 3xx status code -func (o *PublishMetricsBadRequest) IsRedirect() bool { - return false -} - -// IsClientError returns true when this publish metrics bad request response has a 4xx status code -func (o *PublishMetricsBadRequest) IsClientError() bool { - return true -} - -// IsServerError returns true when this publish metrics bad request response has a 5xx status code -func (o *PublishMetricsBadRequest) IsServerError() bool { - return false -} - -// IsCode returns true when this publish metrics bad request response a status code equal to that given -func (o *PublishMetricsBadRequest) IsCode(code int) bool { - return code == 400 -} - -// Code gets the status code for the publish metrics bad request response -func (o *PublishMetricsBadRequest) Code() int { - return 400 -} - -func (o *PublishMetricsBadRequest) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[POST /v1/general/metrics][%d] publishMetricsBadRequest %s", 400, payload) -} - -func (o *PublishMetricsBadRequest) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[POST /v1/general/metrics][%d] publishMetricsBadRequest %s", 400, payload) -} - -func (o *PublishMetricsBadRequest) GetPayload() *models.StderrErrResponse { - return o.Payload -} - -func (o *PublishMetricsBadRequest) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.StderrErrResponse) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewPublishMetricsUnauthorized creates a PublishMetricsUnauthorized with default headers values -func NewPublishMetricsUnauthorized() *PublishMetricsUnauthorized { - return &PublishMetricsUnauthorized{} -} - -/* -PublishMetricsUnauthorized describes a response with status code 401, with default header values. - -Unauthorized -*/ -type PublishMetricsUnauthorized struct { - Payload *models.StderrErrResponse -} - -// IsSuccess returns true when this publish metrics unauthorized response has a 2xx status code -func (o *PublishMetricsUnauthorized) IsSuccess() bool { - return false -} - -// IsRedirect returns true when this publish metrics unauthorized response has a 3xx status code -func (o *PublishMetricsUnauthorized) IsRedirect() bool { - return false -} - -// IsClientError returns true when this publish metrics unauthorized response has a 4xx status code -func (o *PublishMetricsUnauthorized) IsClientError() bool { - return true -} - -// IsServerError returns true when this publish metrics unauthorized response has a 5xx status code -func (o *PublishMetricsUnauthorized) IsServerError() bool { - return false -} - -// IsCode returns true when this publish metrics unauthorized response a status code equal to that given -func (o *PublishMetricsUnauthorized) IsCode(code int) bool { - return code == 401 -} - -// Code gets the status code for the publish metrics unauthorized response -func (o *PublishMetricsUnauthorized) Code() int { - return 401 -} - -func (o *PublishMetricsUnauthorized) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[POST /v1/general/metrics][%d] publishMetricsUnauthorized %s", 401, payload) -} - -func (o *PublishMetricsUnauthorized) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[POST /v1/general/metrics][%d] publishMetricsUnauthorized %s", 401, payload) -} - -func (o *PublishMetricsUnauthorized) GetPayload() *models.StderrErrResponse { - return o.Payload -} - -func (o *PublishMetricsUnauthorized) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.StderrErrResponse) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewPublishMetricsForbidden creates a PublishMetricsForbidden with default headers values -func NewPublishMetricsForbidden() *PublishMetricsForbidden { - return &PublishMetricsForbidden{} -} - -/* -PublishMetricsForbidden describes a response with status code 403, with default header values. - -Forbidden -*/ -type PublishMetricsForbidden struct { - Payload *models.StderrErrResponse -} - -// IsSuccess returns true when this publish metrics forbidden response has a 2xx status code -func (o *PublishMetricsForbidden) IsSuccess() bool { - return false -} - -// IsRedirect returns true when this publish metrics forbidden response has a 3xx status code -func (o *PublishMetricsForbidden) IsRedirect() bool { - return false -} - -// IsClientError returns true when this publish metrics forbidden response has a 4xx status code -func (o *PublishMetricsForbidden) IsClientError() bool { - return true -} - -// IsServerError returns true when this publish metrics forbidden response has a 5xx status code -func (o *PublishMetricsForbidden) IsServerError() bool { - return false -} - -// IsCode returns true when this publish metrics forbidden response a status code equal to that given -func (o *PublishMetricsForbidden) IsCode(code int) bool { - return code == 403 -} - -// Code gets the status code for the publish metrics forbidden response -func (o *PublishMetricsForbidden) Code() int { - return 403 -} - -func (o *PublishMetricsForbidden) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[POST /v1/general/metrics][%d] publishMetricsForbidden %s", 403, payload) -} - -func (o *PublishMetricsForbidden) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[POST /v1/general/metrics][%d] publishMetricsForbidden %s", 403, payload) -} - -func (o *PublishMetricsForbidden) GetPayload() *models.StderrErrResponse { - return o.Payload -} - -func (o *PublishMetricsForbidden) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.StderrErrResponse) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewPublishMetricsNotFound creates a PublishMetricsNotFound with default headers values -func NewPublishMetricsNotFound() *PublishMetricsNotFound { - return &PublishMetricsNotFound{} -} - -/* -PublishMetricsNotFound describes a response with status code 404, with default header values. - -Not Found -*/ -type PublishMetricsNotFound struct { - Payload *models.StderrErrResponse -} - -// IsSuccess returns true when this publish metrics not found response has a 2xx status code -func (o *PublishMetricsNotFound) IsSuccess() bool { - return false -} - -// IsRedirect returns true when this publish metrics not found response has a 3xx status code -func (o *PublishMetricsNotFound) IsRedirect() bool { - return false -} - -// IsClientError returns true when this publish metrics not found response has a 4xx status code -func (o *PublishMetricsNotFound) IsClientError() bool { - return true -} - -// IsServerError returns true when this publish metrics not found response has a 5xx status code -func (o *PublishMetricsNotFound) IsServerError() bool { - return false -} - -// IsCode returns true when this publish metrics not found response a status code equal to that given -func (o *PublishMetricsNotFound) IsCode(code int) bool { - return code == 404 -} - -// Code gets the status code for the publish metrics not found response -func (o *PublishMetricsNotFound) Code() int { - return 404 -} - -func (o *PublishMetricsNotFound) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[POST /v1/general/metrics][%d] publishMetricsNotFound %s", 404, payload) -} - -func (o *PublishMetricsNotFound) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[POST /v1/general/metrics][%d] publishMetricsNotFound %s", 404, payload) -} - -func (o *PublishMetricsNotFound) GetPayload() *models.StderrErrResponse { - return o.Payload -} - -func (o *PublishMetricsNotFound) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.StderrErrResponse) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewPublishMetricsInternalServerError creates a PublishMetricsInternalServerError with default headers values -func NewPublishMetricsInternalServerError() *PublishMetricsInternalServerError { - return &PublishMetricsInternalServerError{} -} - -/* -PublishMetricsInternalServerError describes a response with status code 500, with default header values. - -Internal Server Error -*/ -type PublishMetricsInternalServerError struct { - Payload *models.StderrErrResponse -} - -// IsSuccess returns true when this publish metrics internal server error response has a 2xx status code -func (o *PublishMetricsInternalServerError) IsSuccess() bool { - return false -} - -// IsRedirect returns true when this publish metrics internal server error response has a 3xx status code -func (o *PublishMetricsInternalServerError) IsRedirect() bool { - return false -} - -// IsClientError returns true when this publish metrics internal server error response has a 4xx status code -func (o *PublishMetricsInternalServerError) IsClientError() bool { - return false -} - -// IsServerError returns true when this publish metrics internal server error response has a 5xx status code -func (o *PublishMetricsInternalServerError) IsServerError() bool { - return true -} - -// IsCode returns true when this publish metrics internal server error response a status code equal to that given -func (o *PublishMetricsInternalServerError) IsCode(code int) bool { - return code == 500 -} - -// Code gets the status code for the publish metrics internal server error response -func (o *PublishMetricsInternalServerError) Code() int { - return 500 -} - -func (o *PublishMetricsInternalServerError) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[POST /v1/general/metrics][%d] publishMetricsInternalServerError %s", 500, payload) -} - -func (o *PublishMetricsInternalServerError) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[POST /v1/general/metrics][%d] publishMetricsInternalServerError %s", 500, payload) -} - -func (o *PublishMetricsInternalServerError) GetPayload() *models.StderrErrResponse { - return o.Payload -} - -func (o *PublishMetricsInternalServerError) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.StderrErrResponse) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} diff --git a/client/operations/render_installer_install_parameters.go b/client/operations/render_installer_install_parameters.go deleted file mode 100644 index 6ed12e6..0000000 --- a/client/operations/render_installer_install_parameters.go +++ /dev/null @@ -1,173 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package operations - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "context" - "net/http" - "time" - - "github.com/go-openapi/errors" - "github.com/go-openapi/runtime" - cr "github.com/go-openapi/runtime/client" - "github.com/go-openapi/strfmt" -) - -// NewRenderInstallerInstallParams creates a new RenderInstallerInstallParams object, -// with the default timeout for this client. -// -// Default values are not hydrated, since defaults are normally applied by the API server side. -// -// To enforce default values in parameter, use SetDefaults or WithDefaults. -func NewRenderInstallerInstallParams() *RenderInstallerInstallParams { - return &RenderInstallerInstallParams{ - timeout: cr.DefaultTimeout, - } -} - -// NewRenderInstallerInstallParamsWithTimeout creates a new RenderInstallerInstallParams object -// with the ability to set a timeout on a request. -func NewRenderInstallerInstallParamsWithTimeout(timeout time.Duration) *RenderInstallerInstallParams { - return &RenderInstallerInstallParams{ - timeout: timeout, - } -} - -// NewRenderInstallerInstallParamsWithContext creates a new RenderInstallerInstallParams object -// with the ability to set a context for a request. -func NewRenderInstallerInstallParamsWithContext(ctx context.Context) *RenderInstallerInstallParams { - return &RenderInstallerInstallParams{ - Context: ctx, - } -} - -// NewRenderInstallerInstallParamsWithHTTPClient creates a new RenderInstallerInstallParams object -// with the ability to set a custom HTTPClient for a request. -func NewRenderInstallerInstallParamsWithHTTPClient(client *http.Client) *RenderInstallerInstallParams { - return &RenderInstallerInstallParams{ - HTTPClient: client, - } -} - -/* -RenderInstallerInstallParams contains all the parameters to send to the API endpoint - - for the render installer install operation. - - Typically these are written to a http.Request. -*/ -type RenderInstallerInstallParams struct { - - /* InstallID. - - install id - */ - InstallID string - - /* InstallerID. - - installer ID - */ - InstallerID string - - timeout time.Duration - Context context.Context - HTTPClient *http.Client -} - -// WithDefaults hydrates default values in the render installer install params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *RenderInstallerInstallParams) WithDefaults() *RenderInstallerInstallParams { - o.SetDefaults() - return o -} - -// SetDefaults hydrates default values in the render installer install params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *RenderInstallerInstallParams) SetDefaults() { - // no default values defined for this parameter -} - -// WithTimeout adds the timeout to the render installer install params -func (o *RenderInstallerInstallParams) WithTimeout(timeout time.Duration) *RenderInstallerInstallParams { - o.SetTimeout(timeout) - return o -} - -// SetTimeout adds the timeout to the render installer install params -func (o *RenderInstallerInstallParams) SetTimeout(timeout time.Duration) { - o.timeout = timeout -} - -// WithContext adds the context to the render installer install params -func (o *RenderInstallerInstallParams) WithContext(ctx context.Context) *RenderInstallerInstallParams { - o.SetContext(ctx) - return o -} - -// SetContext adds the context to the render installer install params -func (o *RenderInstallerInstallParams) SetContext(ctx context.Context) { - o.Context = ctx -} - -// WithHTTPClient adds the HTTPClient to the render installer install params -func (o *RenderInstallerInstallParams) WithHTTPClient(client *http.Client) *RenderInstallerInstallParams { - o.SetHTTPClient(client) - return o -} - -// SetHTTPClient adds the HTTPClient to the render installer install params -func (o *RenderInstallerInstallParams) SetHTTPClient(client *http.Client) { - o.HTTPClient = client -} - -// WithInstallID adds the installID to the render installer install params -func (o *RenderInstallerInstallParams) WithInstallID(installID string) *RenderInstallerInstallParams { - o.SetInstallID(installID) - return o -} - -// SetInstallID adds the installId to the render installer install params -func (o *RenderInstallerInstallParams) SetInstallID(installID string) { - o.InstallID = installID -} - -// WithInstallerID adds the installerID to the render installer install params -func (o *RenderInstallerInstallParams) WithInstallerID(installerID string) *RenderInstallerInstallParams { - o.SetInstallerID(installerID) - return o -} - -// SetInstallerID adds the installerId to the render installer install params -func (o *RenderInstallerInstallParams) SetInstallerID(installerID string) { - o.InstallerID = installerID -} - -// WriteToRequest writes these params to a swagger request -func (o *RenderInstallerInstallParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { - - if err := r.SetTimeout(o.timeout); err != nil { - return err - } - var res []error - - // path param install_id - if err := r.SetPathParam("install_id", o.InstallID); err != nil { - return err - } - - // path param installer_id - if err := r.SetPathParam("installer_id", o.InstallerID); err != nil { - return err - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} diff --git a/client/operations/render_installer_install_responses.go b/client/operations/render_installer_install_responses.go deleted file mode 100644 index 9c2f8e8..0000000 --- a/client/operations/render_installer_install_responses.go +++ /dev/null @@ -1,473 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package operations - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "fmt" - "io" - - "github.com/go-openapi/runtime" - "github.com/go-openapi/strfmt" - - "github.com/nuonco/nuon-go/models" -) - -// RenderInstallerInstallReader is a Reader for the RenderInstallerInstall structure. -type RenderInstallerInstallReader struct { - formats strfmt.Registry -} - -// ReadResponse reads a server response into the received o. -func (o *RenderInstallerInstallReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { - switch response.Code() { - case 200: - result := NewRenderInstallerInstallOK() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return result, nil - case 400: - result := NewRenderInstallerInstallBadRequest() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return nil, result - case 401: - result := NewRenderInstallerInstallUnauthorized() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return nil, result - case 403: - result := NewRenderInstallerInstallForbidden() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return nil, result - case 404: - result := NewRenderInstallerInstallNotFound() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return nil, result - case 500: - result := NewRenderInstallerInstallInternalServerError() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return nil, result - default: - return nil, runtime.NewAPIError("[GET /v1/installer/{installer_id}/install/{install_id}/render] RenderInstallerInstall", response, response.Code()) - } -} - -// NewRenderInstallerInstallOK creates a RenderInstallerInstallOK with default headers values -func NewRenderInstallerInstallOK() *RenderInstallerInstallOK { - return &RenderInstallerInstallOK{} -} - -/* -RenderInstallerInstallOK describes a response with status code 200, with default header values. - -OK -*/ -type RenderInstallerInstallOK struct { - Payload *models.ServiceRenderedInstall -} - -// IsSuccess returns true when this render installer install o k response has a 2xx status code -func (o *RenderInstallerInstallOK) IsSuccess() bool { - return true -} - -// IsRedirect returns true when this render installer install o k response has a 3xx status code -func (o *RenderInstallerInstallOK) IsRedirect() bool { - return false -} - -// IsClientError returns true when this render installer install o k response has a 4xx status code -func (o *RenderInstallerInstallOK) IsClientError() bool { - return false -} - -// IsServerError returns true when this render installer install o k response has a 5xx status code -func (o *RenderInstallerInstallOK) IsServerError() bool { - return false -} - -// IsCode returns true when this render installer install o k response a status code equal to that given -func (o *RenderInstallerInstallOK) IsCode(code int) bool { - return code == 200 -} - -// Code gets the status code for the render installer install o k response -func (o *RenderInstallerInstallOK) Code() int { - return 200 -} - -func (o *RenderInstallerInstallOK) Error() string { - return fmt.Sprintf("[GET /v1/installer/{installer_id}/install/{install_id}/render][%d] renderInstallerInstallOK %+v", 200, o.Payload) -} - -func (o *RenderInstallerInstallOK) String() string { - return fmt.Sprintf("[GET /v1/installer/{installer_id}/install/{install_id}/render][%d] renderInstallerInstallOK %+v", 200, o.Payload) -} - -func (o *RenderInstallerInstallOK) GetPayload() *models.ServiceRenderedInstall { - return o.Payload -} - -func (o *RenderInstallerInstallOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.ServiceRenderedInstall) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewRenderInstallerInstallBadRequest creates a RenderInstallerInstallBadRequest with default headers values -func NewRenderInstallerInstallBadRequest() *RenderInstallerInstallBadRequest { - return &RenderInstallerInstallBadRequest{} -} - -/* -RenderInstallerInstallBadRequest describes a response with status code 400, with default header values. - -Bad Request -*/ -type RenderInstallerInstallBadRequest struct { - Payload *models.StderrErrResponse -} - -// IsSuccess returns true when this render installer install bad request response has a 2xx status code -func (o *RenderInstallerInstallBadRequest) IsSuccess() bool { - return false -} - -// IsRedirect returns true when this render installer install bad request response has a 3xx status code -func (o *RenderInstallerInstallBadRequest) IsRedirect() bool { - return false -} - -// IsClientError returns true when this render installer install bad request response has a 4xx status code -func (o *RenderInstallerInstallBadRequest) IsClientError() bool { - return true -} - -// IsServerError returns true when this render installer install bad request response has a 5xx status code -func (o *RenderInstallerInstallBadRequest) IsServerError() bool { - return false -} - -// IsCode returns true when this render installer install bad request response a status code equal to that given -func (o *RenderInstallerInstallBadRequest) IsCode(code int) bool { - return code == 400 -} - -// Code gets the status code for the render installer install bad request response -func (o *RenderInstallerInstallBadRequest) Code() int { - return 400 -} - -func (o *RenderInstallerInstallBadRequest) Error() string { - return fmt.Sprintf("[GET /v1/installer/{installer_id}/install/{install_id}/render][%d] renderInstallerInstallBadRequest %+v", 400, o.Payload) -} - -func (o *RenderInstallerInstallBadRequest) String() string { - return fmt.Sprintf("[GET /v1/installer/{installer_id}/install/{install_id}/render][%d] renderInstallerInstallBadRequest %+v", 400, o.Payload) -} - -func (o *RenderInstallerInstallBadRequest) GetPayload() *models.StderrErrResponse { - return o.Payload -} - -func (o *RenderInstallerInstallBadRequest) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.StderrErrResponse) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewRenderInstallerInstallUnauthorized creates a RenderInstallerInstallUnauthorized with default headers values -func NewRenderInstallerInstallUnauthorized() *RenderInstallerInstallUnauthorized { - return &RenderInstallerInstallUnauthorized{} -} - -/* -RenderInstallerInstallUnauthorized describes a response with status code 401, with default header values. - -Unauthorized -*/ -type RenderInstallerInstallUnauthorized struct { - Payload *models.StderrErrResponse -} - -// IsSuccess returns true when this render installer install unauthorized response has a 2xx status code -func (o *RenderInstallerInstallUnauthorized) IsSuccess() bool { - return false -} - -// IsRedirect returns true when this render installer install unauthorized response has a 3xx status code -func (o *RenderInstallerInstallUnauthorized) IsRedirect() bool { - return false -} - -// IsClientError returns true when this render installer install unauthorized response has a 4xx status code -func (o *RenderInstallerInstallUnauthorized) IsClientError() bool { - return true -} - -// IsServerError returns true when this render installer install unauthorized response has a 5xx status code -func (o *RenderInstallerInstallUnauthorized) IsServerError() bool { - return false -} - -// IsCode returns true when this render installer install unauthorized response a status code equal to that given -func (o *RenderInstallerInstallUnauthorized) IsCode(code int) bool { - return code == 401 -} - -// Code gets the status code for the render installer install unauthorized response -func (o *RenderInstallerInstallUnauthorized) Code() int { - return 401 -} - -func (o *RenderInstallerInstallUnauthorized) Error() string { - return fmt.Sprintf("[GET /v1/installer/{installer_id}/install/{install_id}/render][%d] renderInstallerInstallUnauthorized %+v", 401, o.Payload) -} - -func (o *RenderInstallerInstallUnauthorized) String() string { - return fmt.Sprintf("[GET /v1/installer/{installer_id}/install/{install_id}/render][%d] renderInstallerInstallUnauthorized %+v", 401, o.Payload) -} - -func (o *RenderInstallerInstallUnauthorized) GetPayload() *models.StderrErrResponse { - return o.Payload -} - -func (o *RenderInstallerInstallUnauthorized) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.StderrErrResponse) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewRenderInstallerInstallForbidden creates a RenderInstallerInstallForbidden with default headers values -func NewRenderInstallerInstallForbidden() *RenderInstallerInstallForbidden { - return &RenderInstallerInstallForbidden{} -} - -/* -RenderInstallerInstallForbidden describes a response with status code 403, with default header values. - -Forbidden -*/ -type RenderInstallerInstallForbidden struct { - Payload *models.StderrErrResponse -} - -// IsSuccess returns true when this render installer install forbidden response has a 2xx status code -func (o *RenderInstallerInstallForbidden) IsSuccess() bool { - return false -} - -// IsRedirect returns true when this render installer install forbidden response has a 3xx status code -func (o *RenderInstallerInstallForbidden) IsRedirect() bool { - return false -} - -// IsClientError returns true when this render installer install forbidden response has a 4xx status code -func (o *RenderInstallerInstallForbidden) IsClientError() bool { - return true -} - -// IsServerError returns true when this render installer install forbidden response has a 5xx status code -func (o *RenderInstallerInstallForbidden) IsServerError() bool { - return false -} - -// IsCode returns true when this render installer install forbidden response a status code equal to that given -func (o *RenderInstallerInstallForbidden) IsCode(code int) bool { - return code == 403 -} - -// Code gets the status code for the render installer install forbidden response -func (o *RenderInstallerInstallForbidden) Code() int { - return 403 -} - -func (o *RenderInstallerInstallForbidden) Error() string { - return fmt.Sprintf("[GET /v1/installer/{installer_id}/install/{install_id}/render][%d] renderInstallerInstallForbidden %+v", 403, o.Payload) -} - -func (o *RenderInstallerInstallForbidden) String() string { - return fmt.Sprintf("[GET /v1/installer/{installer_id}/install/{install_id}/render][%d] renderInstallerInstallForbidden %+v", 403, o.Payload) -} - -func (o *RenderInstallerInstallForbidden) GetPayload() *models.StderrErrResponse { - return o.Payload -} - -func (o *RenderInstallerInstallForbidden) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.StderrErrResponse) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewRenderInstallerInstallNotFound creates a RenderInstallerInstallNotFound with default headers values -func NewRenderInstallerInstallNotFound() *RenderInstallerInstallNotFound { - return &RenderInstallerInstallNotFound{} -} - -/* -RenderInstallerInstallNotFound describes a response with status code 404, with default header values. - -Not Found -*/ -type RenderInstallerInstallNotFound struct { - Payload *models.StderrErrResponse -} - -// IsSuccess returns true when this render installer install not found response has a 2xx status code -func (o *RenderInstallerInstallNotFound) IsSuccess() bool { - return false -} - -// IsRedirect returns true when this render installer install not found response has a 3xx status code -func (o *RenderInstallerInstallNotFound) IsRedirect() bool { - return false -} - -// IsClientError returns true when this render installer install not found response has a 4xx status code -func (o *RenderInstallerInstallNotFound) IsClientError() bool { - return true -} - -// IsServerError returns true when this render installer install not found response has a 5xx status code -func (o *RenderInstallerInstallNotFound) IsServerError() bool { - return false -} - -// IsCode returns true when this render installer install not found response a status code equal to that given -func (o *RenderInstallerInstallNotFound) IsCode(code int) bool { - return code == 404 -} - -// Code gets the status code for the render installer install not found response -func (o *RenderInstallerInstallNotFound) Code() int { - return 404 -} - -func (o *RenderInstallerInstallNotFound) Error() string { - return fmt.Sprintf("[GET /v1/installer/{installer_id}/install/{install_id}/render][%d] renderInstallerInstallNotFound %+v", 404, o.Payload) -} - -func (o *RenderInstallerInstallNotFound) String() string { - return fmt.Sprintf("[GET /v1/installer/{installer_id}/install/{install_id}/render][%d] renderInstallerInstallNotFound %+v", 404, o.Payload) -} - -func (o *RenderInstallerInstallNotFound) GetPayload() *models.StderrErrResponse { - return o.Payload -} - -func (o *RenderInstallerInstallNotFound) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.StderrErrResponse) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewRenderInstallerInstallInternalServerError creates a RenderInstallerInstallInternalServerError with default headers values -func NewRenderInstallerInstallInternalServerError() *RenderInstallerInstallInternalServerError { - return &RenderInstallerInstallInternalServerError{} -} - -/* -RenderInstallerInstallInternalServerError describes a response with status code 500, with default header values. - -Internal Server Error -*/ -type RenderInstallerInstallInternalServerError struct { - Payload *models.StderrErrResponse -} - -// IsSuccess returns true when this render installer install internal server error response has a 2xx status code -func (o *RenderInstallerInstallInternalServerError) IsSuccess() bool { - return false -} - -// IsRedirect returns true when this render installer install internal server error response has a 3xx status code -func (o *RenderInstallerInstallInternalServerError) IsRedirect() bool { - return false -} - -// IsClientError returns true when this render installer install internal server error response has a 4xx status code -func (o *RenderInstallerInstallInternalServerError) IsClientError() bool { - return false -} - -// IsServerError returns true when this render installer install internal server error response has a 5xx status code -func (o *RenderInstallerInstallInternalServerError) IsServerError() bool { - return true -} - -// IsCode returns true when this render installer install internal server error response a status code equal to that given -func (o *RenderInstallerInstallInternalServerError) IsCode(code int) bool { - return code == 500 -} - -// Code gets the status code for the render installer install internal server error response -func (o *RenderInstallerInstallInternalServerError) Code() int { - return 500 -} - -func (o *RenderInstallerInstallInternalServerError) Error() string { - return fmt.Sprintf("[GET /v1/installer/{installer_id}/install/{install_id}/render][%d] renderInstallerInstallInternalServerError %+v", 500, o.Payload) -} - -func (o *RenderInstallerInstallInternalServerError) String() string { - return fmt.Sprintf("[GET /v1/installer/{installer_id}/install/{install_id}/render][%d] renderInstallerInstallInternalServerError %+v", 500, o.Payload) -} - -func (o *RenderInstallerInstallInternalServerError) GetPayload() *models.StderrErrResponse { - return o.Payload -} - -func (o *RenderInstallerInstallInternalServerError) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.StderrErrResponse) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} diff --git a/client/operations/render_installer_parameters.go b/client/operations/render_installer_parameters.go deleted file mode 100644 index 102921c..0000000 --- a/client/operations/render_installer_parameters.go +++ /dev/null @@ -1,151 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package operations - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "context" - "net/http" - "time" - - "github.com/go-openapi/errors" - "github.com/go-openapi/runtime" - cr "github.com/go-openapi/runtime/client" - "github.com/go-openapi/strfmt" -) - -// NewRenderInstallerParams creates a new RenderInstallerParams object, -// with the default timeout for this client. -// -// Default values are not hydrated, since defaults are normally applied by the API server side. -// -// To enforce default values in parameter, use SetDefaults or WithDefaults. -func NewRenderInstallerParams() *RenderInstallerParams { - return &RenderInstallerParams{ - timeout: cr.DefaultTimeout, - } -} - -// NewRenderInstallerParamsWithTimeout creates a new RenderInstallerParams object -// with the ability to set a timeout on a request. -func NewRenderInstallerParamsWithTimeout(timeout time.Duration) *RenderInstallerParams { - return &RenderInstallerParams{ - timeout: timeout, - } -} - -// NewRenderInstallerParamsWithContext creates a new RenderInstallerParams object -// with the ability to set a context for a request. -func NewRenderInstallerParamsWithContext(ctx context.Context) *RenderInstallerParams { - return &RenderInstallerParams{ - Context: ctx, - } -} - -// NewRenderInstallerParamsWithHTTPClient creates a new RenderInstallerParams object -// with the ability to set a custom HTTPClient for a request. -func NewRenderInstallerParamsWithHTTPClient(client *http.Client) *RenderInstallerParams { - return &RenderInstallerParams{ - HTTPClient: client, - } -} - -/* -RenderInstallerParams contains all the parameters to send to the API endpoint - - for the render installer operation. - - Typically these are written to a http.Request. -*/ -type RenderInstallerParams struct { - - /* InstallerID. - - installer ID - */ - InstallerID string - - timeout time.Duration - Context context.Context - HTTPClient *http.Client -} - -// WithDefaults hydrates default values in the render installer params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *RenderInstallerParams) WithDefaults() *RenderInstallerParams { - o.SetDefaults() - return o -} - -// SetDefaults hydrates default values in the render installer params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *RenderInstallerParams) SetDefaults() { - // no default values defined for this parameter -} - -// WithTimeout adds the timeout to the render installer params -func (o *RenderInstallerParams) WithTimeout(timeout time.Duration) *RenderInstallerParams { - o.SetTimeout(timeout) - return o -} - -// SetTimeout adds the timeout to the render installer params -func (o *RenderInstallerParams) SetTimeout(timeout time.Duration) { - o.timeout = timeout -} - -// WithContext adds the context to the render installer params -func (o *RenderInstallerParams) WithContext(ctx context.Context) *RenderInstallerParams { - o.SetContext(ctx) - return o -} - -// SetContext adds the context to the render installer params -func (o *RenderInstallerParams) SetContext(ctx context.Context) { - o.Context = ctx -} - -// WithHTTPClient adds the HTTPClient to the render installer params -func (o *RenderInstallerParams) WithHTTPClient(client *http.Client) *RenderInstallerParams { - o.SetHTTPClient(client) - return o -} - -// SetHTTPClient adds the HTTPClient to the render installer params -func (o *RenderInstallerParams) SetHTTPClient(client *http.Client) { - o.HTTPClient = client -} - -// WithInstallerID adds the installerID to the render installer params -func (o *RenderInstallerParams) WithInstallerID(installerID string) *RenderInstallerParams { - o.SetInstallerID(installerID) - return o -} - -// SetInstallerID adds the installerId to the render installer params -func (o *RenderInstallerParams) SetInstallerID(installerID string) { - o.InstallerID = installerID -} - -// WriteToRequest writes these params to a swagger request -func (o *RenderInstallerParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { - - if err := r.SetTimeout(o.timeout); err != nil { - return err - } - var res []error - - // path param installer_id - if err := r.SetPathParam("installer_id", o.InstallerID); err != nil { - return err - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} diff --git a/client/operations/render_installer_responses.go b/client/operations/render_installer_responses.go deleted file mode 100644 index 9df0b7a..0000000 --- a/client/operations/render_installer_responses.go +++ /dev/null @@ -1,486 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package operations - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "encoding/json" - "fmt" - "io" - - "github.com/go-openapi/runtime" - "github.com/go-openapi/strfmt" - - "github.com/nuonco/nuon-go/models" -) - -// RenderInstallerReader is a Reader for the RenderInstaller structure. -type RenderInstallerReader struct { - formats strfmt.Registry -} - -// ReadResponse reads a server response into the received o. -func (o *RenderInstallerReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { - switch response.Code() { - case 200: - result := NewRenderInstallerOK() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return result, nil - case 400: - result := NewRenderInstallerBadRequest() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return nil, result - case 401: - result := NewRenderInstallerUnauthorized() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return nil, result - case 403: - result := NewRenderInstallerForbidden() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return nil, result - case 404: - result := NewRenderInstallerNotFound() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return nil, result - case 500: - result := NewRenderInstallerInternalServerError() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return nil, result - default: - return nil, runtime.NewAPIError("[GET /v1/installer/{installer_id}/render] RenderInstaller", response, response.Code()) - } -} - -// NewRenderInstallerOK creates a RenderInstallerOK with default headers values -func NewRenderInstallerOK() *RenderInstallerOK { - return &RenderInstallerOK{} -} - -/* -RenderInstallerOK describes a response with status code 200, with default header values. - -OK -*/ -type RenderInstallerOK struct { - Payload *models.ServiceRenderedInstaller -} - -// IsSuccess returns true when this render installer o k response has a 2xx status code -func (o *RenderInstallerOK) IsSuccess() bool { - return true -} - -// IsRedirect returns true when this render installer o k response has a 3xx status code -func (o *RenderInstallerOK) IsRedirect() bool { - return false -} - -// IsClientError returns true when this render installer o k response has a 4xx status code -func (o *RenderInstallerOK) IsClientError() bool { - return false -} - -// IsServerError returns true when this render installer o k response has a 5xx status code -func (o *RenderInstallerOK) IsServerError() bool { - return false -} - -// IsCode returns true when this render installer o k response a status code equal to that given -func (o *RenderInstallerOK) IsCode(code int) bool { - return code == 200 -} - -// Code gets the status code for the render installer o k response -func (o *RenderInstallerOK) Code() int { - return 200 -} - -func (o *RenderInstallerOK) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /v1/installer/{installer_id}/render][%d] renderInstallerOK %s", 200, payload) -} - -func (o *RenderInstallerOK) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /v1/installer/{installer_id}/render][%d] renderInstallerOK %s", 200, payload) -} - -func (o *RenderInstallerOK) GetPayload() *models.ServiceRenderedInstaller { - return o.Payload -} - -func (o *RenderInstallerOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.ServiceRenderedInstaller) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewRenderInstallerBadRequest creates a RenderInstallerBadRequest with default headers values -func NewRenderInstallerBadRequest() *RenderInstallerBadRequest { - return &RenderInstallerBadRequest{} -} - -/* -RenderInstallerBadRequest describes a response with status code 400, with default header values. - -Bad Request -*/ -type RenderInstallerBadRequest struct { - Payload *models.StderrErrResponse -} - -// IsSuccess returns true when this render installer bad request response has a 2xx status code -func (o *RenderInstallerBadRequest) IsSuccess() bool { - return false -} - -// IsRedirect returns true when this render installer bad request response has a 3xx status code -func (o *RenderInstallerBadRequest) IsRedirect() bool { - return false -} - -// IsClientError returns true when this render installer bad request response has a 4xx status code -func (o *RenderInstallerBadRequest) IsClientError() bool { - return true -} - -// IsServerError returns true when this render installer bad request response has a 5xx status code -func (o *RenderInstallerBadRequest) IsServerError() bool { - return false -} - -// IsCode returns true when this render installer bad request response a status code equal to that given -func (o *RenderInstallerBadRequest) IsCode(code int) bool { - return code == 400 -} - -// Code gets the status code for the render installer bad request response -func (o *RenderInstallerBadRequest) Code() int { - return 400 -} - -func (o *RenderInstallerBadRequest) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /v1/installer/{installer_id}/render][%d] renderInstallerBadRequest %s", 400, payload) -} - -func (o *RenderInstallerBadRequest) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /v1/installer/{installer_id}/render][%d] renderInstallerBadRequest %s", 400, payload) -} - -func (o *RenderInstallerBadRequest) GetPayload() *models.StderrErrResponse { - return o.Payload -} - -func (o *RenderInstallerBadRequest) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.StderrErrResponse) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewRenderInstallerUnauthorized creates a RenderInstallerUnauthorized with default headers values -func NewRenderInstallerUnauthorized() *RenderInstallerUnauthorized { - return &RenderInstallerUnauthorized{} -} - -/* -RenderInstallerUnauthorized describes a response with status code 401, with default header values. - -Unauthorized -*/ -type RenderInstallerUnauthorized struct { - Payload *models.StderrErrResponse -} - -// IsSuccess returns true when this render installer unauthorized response has a 2xx status code -func (o *RenderInstallerUnauthorized) IsSuccess() bool { - return false -} - -// IsRedirect returns true when this render installer unauthorized response has a 3xx status code -func (o *RenderInstallerUnauthorized) IsRedirect() bool { - return false -} - -// IsClientError returns true when this render installer unauthorized response has a 4xx status code -func (o *RenderInstallerUnauthorized) IsClientError() bool { - return true -} - -// IsServerError returns true when this render installer unauthorized response has a 5xx status code -func (o *RenderInstallerUnauthorized) IsServerError() bool { - return false -} - -// IsCode returns true when this render installer unauthorized response a status code equal to that given -func (o *RenderInstallerUnauthorized) IsCode(code int) bool { - return code == 401 -} - -// Code gets the status code for the render installer unauthorized response -func (o *RenderInstallerUnauthorized) Code() int { - return 401 -} - -func (o *RenderInstallerUnauthorized) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /v1/installer/{installer_id}/render][%d] renderInstallerUnauthorized %s", 401, payload) -} - -func (o *RenderInstallerUnauthorized) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /v1/installer/{installer_id}/render][%d] renderInstallerUnauthorized %s", 401, payload) -} - -func (o *RenderInstallerUnauthorized) GetPayload() *models.StderrErrResponse { - return o.Payload -} - -func (o *RenderInstallerUnauthorized) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.StderrErrResponse) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewRenderInstallerForbidden creates a RenderInstallerForbidden with default headers values -func NewRenderInstallerForbidden() *RenderInstallerForbidden { - return &RenderInstallerForbidden{} -} - -/* -RenderInstallerForbidden describes a response with status code 403, with default header values. - -Forbidden -*/ -type RenderInstallerForbidden struct { - Payload *models.StderrErrResponse -} - -// IsSuccess returns true when this render installer forbidden response has a 2xx status code -func (o *RenderInstallerForbidden) IsSuccess() bool { - return false -} - -// IsRedirect returns true when this render installer forbidden response has a 3xx status code -func (o *RenderInstallerForbidden) IsRedirect() bool { - return false -} - -// IsClientError returns true when this render installer forbidden response has a 4xx status code -func (o *RenderInstallerForbidden) IsClientError() bool { - return true -} - -// IsServerError returns true when this render installer forbidden response has a 5xx status code -func (o *RenderInstallerForbidden) IsServerError() bool { - return false -} - -// IsCode returns true when this render installer forbidden response a status code equal to that given -func (o *RenderInstallerForbidden) IsCode(code int) bool { - return code == 403 -} - -// Code gets the status code for the render installer forbidden response -func (o *RenderInstallerForbidden) Code() int { - return 403 -} - -func (o *RenderInstallerForbidden) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /v1/installer/{installer_id}/render][%d] renderInstallerForbidden %s", 403, payload) -} - -func (o *RenderInstallerForbidden) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /v1/installer/{installer_id}/render][%d] renderInstallerForbidden %s", 403, payload) -} - -func (o *RenderInstallerForbidden) GetPayload() *models.StderrErrResponse { - return o.Payload -} - -func (o *RenderInstallerForbidden) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.StderrErrResponse) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewRenderInstallerNotFound creates a RenderInstallerNotFound with default headers values -func NewRenderInstallerNotFound() *RenderInstallerNotFound { - return &RenderInstallerNotFound{} -} - -/* -RenderInstallerNotFound describes a response with status code 404, with default header values. - -Not Found -*/ -type RenderInstallerNotFound struct { - Payload *models.StderrErrResponse -} - -// IsSuccess returns true when this render installer not found response has a 2xx status code -func (o *RenderInstallerNotFound) IsSuccess() bool { - return false -} - -// IsRedirect returns true when this render installer not found response has a 3xx status code -func (o *RenderInstallerNotFound) IsRedirect() bool { - return false -} - -// IsClientError returns true when this render installer not found response has a 4xx status code -func (o *RenderInstallerNotFound) IsClientError() bool { - return true -} - -// IsServerError returns true when this render installer not found response has a 5xx status code -func (o *RenderInstallerNotFound) IsServerError() bool { - return false -} - -// IsCode returns true when this render installer not found response a status code equal to that given -func (o *RenderInstallerNotFound) IsCode(code int) bool { - return code == 404 -} - -// Code gets the status code for the render installer not found response -func (o *RenderInstallerNotFound) Code() int { - return 404 -} - -func (o *RenderInstallerNotFound) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /v1/installer/{installer_id}/render][%d] renderInstallerNotFound %s", 404, payload) -} - -func (o *RenderInstallerNotFound) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /v1/installer/{installer_id}/render][%d] renderInstallerNotFound %s", 404, payload) -} - -func (o *RenderInstallerNotFound) GetPayload() *models.StderrErrResponse { - return o.Payload -} - -func (o *RenderInstallerNotFound) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.StderrErrResponse) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewRenderInstallerInternalServerError creates a RenderInstallerInternalServerError with default headers values -func NewRenderInstallerInternalServerError() *RenderInstallerInternalServerError { - return &RenderInstallerInternalServerError{} -} - -/* -RenderInstallerInternalServerError describes a response with status code 500, with default header values. - -Internal Server Error -*/ -type RenderInstallerInternalServerError struct { - Payload *models.StderrErrResponse -} - -// IsSuccess returns true when this render installer internal server error response has a 2xx status code -func (o *RenderInstallerInternalServerError) IsSuccess() bool { - return false -} - -// IsRedirect returns true when this render installer internal server error response has a 3xx status code -func (o *RenderInstallerInternalServerError) IsRedirect() bool { - return false -} - -// IsClientError returns true when this render installer internal server error response has a 4xx status code -func (o *RenderInstallerInternalServerError) IsClientError() bool { - return false -} - -// IsServerError returns true when this render installer internal server error response has a 5xx status code -func (o *RenderInstallerInternalServerError) IsServerError() bool { - return true -} - -// IsCode returns true when this render installer internal server error response a status code equal to that given -func (o *RenderInstallerInternalServerError) IsCode(code int) bool { - return code == 500 -} - -// Code gets the status code for the render installer internal server error response -func (o *RenderInstallerInternalServerError) Code() int { - return 500 -} - -func (o *RenderInstallerInternalServerError) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /v1/installer/{installer_id}/render][%d] renderInstallerInternalServerError %s", 500, payload) -} - -func (o *RenderInstallerInternalServerError) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /v1/installer/{installer_id}/render][%d] renderInstallerInternalServerError %s", 500, payload) -} - -func (o *RenderInstallerInternalServerError) GetPayload() *models.StderrErrResponse { - return o.Payload -} - -func (o *RenderInstallerInternalServerError) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.StderrErrResponse) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} diff --git a/client/operations/reprovision_install_parameters.go b/client/operations/reprovision_install_parameters.go deleted file mode 100644 index d9e2a0b..0000000 --- a/client/operations/reprovision_install_parameters.go +++ /dev/null @@ -1,175 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package operations - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "context" - "net/http" - "time" - - "github.com/go-openapi/errors" - "github.com/go-openapi/runtime" - cr "github.com/go-openapi/runtime/client" - "github.com/go-openapi/strfmt" - - "github.com/nuonco/nuon-go/models" -) - -// NewReprovisionInstallParams creates a new ReprovisionInstallParams object, -// with the default timeout for this client. -// -// Default values are not hydrated, since defaults are normally applied by the API server side. -// -// To enforce default values in parameter, use SetDefaults or WithDefaults. -func NewReprovisionInstallParams() *ReprovisionInstallParams { - return &ReprovisionInstallParams{ - timeout: cr.DefaultTimeout, - } -} - -// NewReprovisionInstallParamsWithTimeout creates a new ReprovisionInstallParams object -// with the ability to set a timeout on a request. -func NewReprovisionInstallParamsWithTimeout(timeout time.Duration) *ReprovisionInstallParams { - return &ReprovisionInstallParams{ - timeout: timeout, - } -} - -// NewReprovisionInstallParamsWithContext creates a new ReprovisionInstallParams object -// with the ability to set a context for a request. -func NewReprovisionInstallParamsWithContext(ctx context.Context) *ReprovisionInstallParams { - return &ReprovisionInstallParams{ - Context: ctx, - } -} - -// NewReprovisionInstallParamsWithHTTPClient creates a new ReprovisionInstallParams object -// with the ability to set a custom HTTPClient for a request. -func NewReprovisionInstallParamsWithHTTPClient(client *http.Client) *ReprovisionInstallParams { - return &ReprovisionInstallParams{ - HTTPClient: client, - } -} - -/* -ReprovisionInstallParams contains all the parameters to send to the API endpoint - - for the reprovision install operation. - - Typically these are written to a http.Request. -*/ -type ReprovisionInstallParams struct { - - /* InstallID. - - install ID - */ - InstallID string - - /* Req. - - Input - */ - Req models.ServiceReprovisionInstallRequest - - timeout time.Duration - Context context.Context - HTTPClient *http.Client -} - -// WithDefaults hydrates default values in the reprovision install params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *ReprovisionInstallParams) WithDefaults() *ReprovisionInstallParams { - o.SetDefaults() - return o -} - -// SetDefaults hydrates default values in the reprovision install params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *ReprovisionInstallParams) SetDefaults() { - // no default values defined for this parameter -} - -// WithTimeout adds the timeout to the reprovision install params -func (o *ReprovisionInstallParams) WithTimeout(timeout time.Duration) *ReprovisionInstallParams { - o.SetTimeout(timeout) - return o -} - -// SetTimeout adds the timeout to the reprovision install params -func (o *ReprovisionInstallParams) SetTimeout(timeout time.Duration) { - o.timeout = timeout -} - -// WithContext adds the context to the reprovision install params -func (o *ReprovisionInstallParams) WithContext(ctx context.Context) *ReprovisionInstallParams { - o.SetContext(ctx) - return o -} - -// SetContext adds the context to the reprovision install params -func (o *ReprovisionInstallParams) SetContext(ctx context.Context) { - o.Context = ctx -} - -// WithHTTPClient adds the HTTPClient to the reprovision install params -func (o *ReprovisionInstallParams) WithHTTPClient(client *http.Client) *ReprovisionInstallParams { - o.SetHTTPClient(client) - return o -} - -// SetHTTPClient adds the HTTPClient to the reprovision install params -func (o *ReprovisionInstallParams) SetHTTPClient(client *http.Client) { - o.HTTPClient = client -} - -// WithInstallID adds the installID to the reprovision install params -func (o *ReprovisionInstallParams) WithInstallID(installID string) *ReprovisionInstallParams { - o.SetInstallID(installID) - return o -} - -// SetInstallID adds the installId to the reprovision install params -func (o *ReprovisionInstallParams) SetInstallID(installID string) { - o.InstallID = installID -} - -// WithReq adds the req to the reprovision install params -func (o *ReprovisionInstallParams) WithReq(req models.ServiceReprovisionInstallRequest) *ReprovisionInstallParams { - o.SetReq(req) - return o -} - -// SetReq adds the req to the reprovision install params -func (o *ReprovisionInstallParams) SetReq(req models.ServiceReprovisionInstallRequest) { - o.Req = req -} - -// WriteToRequest writes these params to a swagger request -func (o *ReprovisionInstallParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { - - if err := r.SetTimeout(o.timeout); err != nil { - return err - } - var res []error - - // path param install_id - if err := r.SetPathParam("install_id", o.InstallID); err != nil { - return err - } - if o.Req != nil { - if err := r.SetBodyParam(o.Req); err != nil { - return err - } - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} diff --git a/client/operations/reprovision_install_responses.go b/client/operations/reprovision_install_responses.go deleted file mode 100644 index 7e6cebd..0000000 --- a/client/operations/reprovision_install_responses.go +++ /dev/null @@ -1,484 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package operations - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "encoding/json" - "fmt" - "io" - - "github.com/go-openapi/runtime" - "github.com/go-openapi/strfmt" - - "github.com/nuonco/nuon-go/models" -) - -// ReprovisionInstallReader is a Reader for the ReprovisionInstall structure. -type ReprovisionInstallReader struct { - formats strfmt.Registry -} - -// ReadResponse reads a server response into the received o. -func (o *ReprovisionInstallReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { - switch response.Code() { - case 201: - result := NewReprovisionInstallCreated() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return result, nil - case 400: - result := NewReprovisionInstallBadRequest() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return nil, result - case 401: - result := NewReprovisionInstallUnauthorized() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return nil, result - case 403: - result := NewReprovisionInstallForbidden() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return nil, result - case 404: - result := NewReprovisionInstallNotFound() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return nil, result - case 500: - result := NewReprovisionInstallInternalServerError() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return nil, result - default: - return nil, runtime.NewAPIError("[POST /v1/installs/{install_id}/reprovision] ReprovisionInstall", response, response.Code()) - } -} - -// NewReprovisionInstallCreated creates a ReprovisionInstallCreated with default headers values -func NewReprovisionInstallCreated() *ReprovisionInstallCreated { - return &ReprovisionInstallCreated{} -} - -/* -ReprovisionInstallCreated describes a response with status code 201, with default header values. - -Created -*/ -type ReprovisionInstallCreated struct { - Payload string -} - -// IsSuccess returns true when this reprovision install created response has a 2xx status code -func (o *ReprovisionInstallCreated) IsSuccess() bool { - return true -} - -// IsRedirect returns true when this reprovision install created response has a 3xx status code -func (o *ReprovisionInstallCreated) IsRedirect() bool { - return false -} - -// IsClientError returns true when this reprovision install created response has a 4xx status code -func (o *ReprovisionInstallCreated) IsClientError() bool { - return false -} - -// IsServerError returns true when this reprovision install created response has a 5xx status code -func (o *ReprovisionInstallCreated) IsServerError() bool { - return false -} - -// IsCode returns true when this reprovision install created response a status code equal to that given -func (o *ReprovisionInstallCreated) IsCode(code int) bool { - return code == 201 -} - -// Code gets the status code for the reprovision install created response -func (o *ReprovisionInstallCreated) Code() int { - return 201 -} - -func (o *ReprovisionInstallCreated) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[POST /v1/installs/{install_id}/reprovision][%d] reprovisionInstallCreated %s", 201, payload) -} - -func (o *ReprovisionInstallCreated) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[POST /v1/installs/{install_id}/reprovision][%d] reprovisionInstallCreated %s", 201, payload) -} - -func (o *ReprovisionInstallCreated) GetPayload() string { - return o.Payload -} - -func (o *ReprovisionInstallCreated) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - // response payload - if err := consumer.Consume(response.Body(), &o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewReprovisionInstallBadRequest creates a ReprovisionInstallBadRequest with default headers values -func NewReprovisionInstallBadRequest() *ReprovisionInstallBadRequest { - return &ReprovisionInstallBadRequest{} -} - -/* -ReprovisionInstallBadRequest describes a response with status code 400, with default header values. - -Bad Request -*/ -type ReprovisionInstallBadRequest struct { - Payload *models.StderrErrResponse -} - -// IsSuccess returns true when this reprovision install bad request response has a 2xx status code -func (o *ReprovisionInstallBadRequest) IsSuccess() bool { - return false -} - -// IsRedirect returns true when this reprovision install bad request response has a 3xx status code -func (o *ReprovisionInstallBadRequest) IsRedirect() bool { - return false -} - -// IsClientError returns true when this reprovision install bad request response has a 4xx status code -func (o *ReprovisionInstallBadRequest) IsClientError() bool { - return true -} - -// IsServerError returns true when this reprovision install bad request response has a 5xx status code -func (o *ReprovisionInstallBadRequest) IsServerError() bool { - return false -} - -// IsCode returns true when this reprovision install bad request response a status code equal to that given -func (o *ReprovisionInstallBadRequest) IsCode(code int) bool { - return code == 400 -} - -// Code gets the status code for the reprovision install bad request response -func (o *ReprovisionInstallBadRequest) Code() int { - return 400 -} - -func (o *ReprovisionInstallBadRequest) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[POST /v1/installs/{install_id}/reprovision][%d] reprovisionInstallBadRequest %s", 400, payload) -} - -func (o *ReprovisionInstallBadRequest) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[POST /v1/installs/{install_id}/reprovision][%d] reprovisionInstallBadRequest %s", 400, payload) -} - -func (o *ReprovisionInstallBadRequest) GetPayload() *models.StderrErrResponse { - return o.Payload -} - -func (o *ReprovisionInstallBadRequest) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.StderrErrResponse) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewReprovisionInstallUnauthorized creates a ReprovisionInstallUnauthorized with default headers values -func NewReprovisionInstallUnauthorized() *ReprovisionInstallUnauthorized { - return &ReprovisionInstallUnauthorized{} -} - -/* -ReprovisionInstallUnauthorized describes a response with status code 401, with default header values. - -Unauthorized -*/ -type ReprovisionInstallUnauthorized struct { - Payload *models.StderrErrResponse -} - -// IsSuccess returns true when this reprovision install unauthorized response has a 2xx status code -func (o *ReprovisionInstallUnauthorized) IsSuccess() bool { - return false -} - -// IsRedirect returns true when this reprovision install unauthorized response has a 3xx status code -func (o *ReprovisionInstallUnauthorized) IsRedirect() bool { - return false -} - -// IsClientError returns true when this reprovision install unauthorized response has a 4xx status code -func (o *ReprovisionInstallUnauthorized) IsClientError() bool { - return true -} - -// IsServerError returns true when this reprovision install unauthorized response has a 5xx status code -func (o *ReprovisionInstallUnauthorized) IsServerError() bool { - return false -} - -// IsCode returns true when this reprovision install unauthorized response a status code equal to that given -func (o *ReprovisionInstallUnauthorized) IsCode(code int) bool { - return code == 401 -} - -// Code gets the status code for the reprovision install unauthorized response -func (o *ReprovisionInstallUnauthorized) Code() int { - return 401 -} - -func (o *ReprovisionInstallUnauthorized) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[POST /v1/installs/{install_id}/reprovision][%d] reprovisionInstallUnauthorized %s", 401, payload) -} - -func (o *ReprovisionInstallUnauthorized) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[POST /v1/installs/{install_id}/reprovision][%d] reprovisionInstallUnauthorized %s", 401, payload) -} - -func (o *ReprovisionInstallUnauthorized) GetPayload() *models.StderrErrResponse { - return o.Payload -} - -func (o *ReprovisionInstallUnauthorized) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.StderrErrResponse) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewReprovisionInstallForbidden creates a ReprovisionInstallForbidden with default headers values -func NewReprovisionInstallForbidden() *ReprovisionInstallForbidden { - return &ReprovisionInstallForbidden{} -} - -/* -ReprovisionInstallForbidden describes a response with status code 403, with default header values. - -Forbidden -*/ -type ReprovisionInstallForbidden struct { - Payload *models.StderrErrResponse -} - -// IsSuccess returns true when this reprovision install forbidden response has a 2xx status code -func (o *ReprovisionInstallForbidden) IsSuccess() bool { - return false -} - -// IsRedirect returns true when this reprovision install forbidden response has a 3xx status code -func (o *ReprovisionInstallForbidden) IsRedirect() bool { - return false -} - -// IsClientError returns true when this reprovision install forbidden response has a 4xx status code -func (o *ReprovisionInstallForbidden) IsClientError() bool { - return true -} - -// IsServerError returns true when this reprovision install forbidden response has a 5xx status code -func (o *ReprovisionInstallForbidden) IsServerError() bool { - return false -} - -// IsCode returns true when this reprovision install forbidden response a status code equal to that given -func (o *ReprovisionInstallForbidden) IsCode(code int) bool { - return code == 403 -} - -// Code gets the status code for the reprovision install forbidden response -func (o *ReprovisionInstallForbidden) Code() int { - return 403 -} - -func (o *ReprovisionInstallForbidden) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[POST /v1/installs/{install_id}/reprovision][%d] reprovisionInstallForbidden %s", 403, payload) -} - -func (o *ReprovisionInstallForbidden) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[POST /v1/installs/{install_id}/reprovision][%d] reprovisionInstallForbidden %s", 403, payload) -} - -func (o *ReprovisionInstallForbidden) GetPayload() *models.StderrErrResponse { - return o.Payload -} - -func (o *ReprovisionInstallForbidden) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.StderrErrResponse) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewReprovisionInstallNotFound creates a ReprovisionInstallNotFound with default headers values -func NewReprovisionInstallNotFound() *ReprovisionInstallNotFound { - return &ReprovisionInstallNotFound{} -} - -/* -ReprovisionInstallNotFound describes a response with status code 404, with default header values. - -Not Found -*/ -type ReprovisionInstallNotFound struct { - Payload *models.StderrErrResponse -} - -// IsSuccess returns true when this reprovision install not found response has a 2xx status code -func (o *ReprovisionInstallNotFound) IsSuccess() bool { - return false -} - -// IsRedirect returns true when this reprovision install not found response has a 3xx status code -func (o *ReprovisionInstallNotFound) IsRedirect() bool { - return false -} - -// IsClientError returns true when this reprovision install not found response has a 4xx status code -func (o *ReprovisionInstallNotFound) IsClientError() bool { - return true -} - -// IsServerError returns true when this reprovision install not found response has a 5xx status code -func (o *ReprovisionInstallNotFound) IsServerError() bool { - return false -} - -// IsCode returns true when this reprovision install not found response a status code equal to that given -func (o *ReprovisionInstallNotFound) IsCode(code int) bool { - return code == 404 -} - -// Code gets the status code for the reprovision install not found response -func (o *ReprovisionInstallNotFound) Code() int { - return 404 -} - -func (o *ReprovisionInstallNotFound) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[POST /v1/installs/{install_id}/reprovision][%d] reprovisionInstallNotFound %s", 404, payload) -} - -func (o *ReprovisionInstallNotFound) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[POST /v1/installs/{install_id}/reprovision][%d] reprovisionInstallNotFound %s", 404, payload) -} - -func (o *ReprovisionInstallNotFound) GetPayload() *models.StderrErrResponse { - return o.Payload -} - -func (o *ReprovisionInstallNotFound) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.StderrErrResponse) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewReprovisionInstallInternalServerError creates a ReprovisionInstallInternalServerError with default headers values -func NewReprovisionInstallInternalServerError() *ReprovisionInstallInternalServerError { - return &ReprovisionInstallInternalServerError{} -} - -/* -ReprovisionInstallInternalServerError describes a response with status code 500, with default header values. - -Internal Server Error -*/ -type ReprovisionInstallInternalServerError struct { - Payload *models.StderrErrResponse -} - -// IsSuccess returns true when this reprovision install internal server error response has a 2xx status code -func (o *ReprovisionInstallInternalServerError) IsSuccess() bool { - return false -} - -// IsRedirect returns true when this reprovision install internal server error response has a 3xx status code -func (o *ReprovisionInstallInternalServerError) IsRedirect() bool { - return false -} - -// IsClientError returns true when this reprovision install internal server error response has a 4xx status code -func (o *ReprovisionInstallInternalServerError) IsClientError() bool { - return false -} - -// IsServerError returns true when this reprovision install internal server error response has a 5xx status code -func (o *ReprovisionInstallInternalServerError) IsServerError() bool { - return true -} - -// IsCode returns true when this reprovision install internal server error response a status code equal to that given -func (o *ReprovisionInstallInternalServerError) IsCode(code int) bool { - return code == 500 -} - -// Code gets the status code for the reprovision install internal server error response -func (o *ReprovisionInstallInternalServerError) Code() int { - return 500 -} - -func (o *ReprovisionInstallInternalServerError) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[POST /v1/installs/{install_id}/reprovision][%d] reprovisionInstallInternalServerError %s", 500, payload) -} - -func (o *ReprovisionInstallInternalServerError) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[POST /v1/installs/{install_id}/reprovision][%d] reprovisionInstallInternalServerError %s", 500, payload) -} - -func (o *ReprovisionInstallInternalServerError) GetPayload() *models.StderrErrResponse { - return o.Payload -} - -func (o *ReprovisionInstallInternalServerError) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.StderrErrResponse) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} diff --git a/client/operations/runner_otel_write_logs_parameters.go b/client/operations/runner_otel_write_logs_parameters.go index b237816..57431f9 100644 --- a/client/operations/runner_otel_write_logs_parameters.go +++ b/client/operations/runner_otel_write_logs_parameters.go @@ -14,6 +14,8 @@ import ( "github.com/go-openapi/runtime" cr "github.com/go-openapi/runtime/client" "github.com/go-openapi/strfmt" + + "github.com/nuonco/nuon-runner-go/models" ) // NewRunnerOtelWriteLogsParams creates a new RunnerOtelWriteLogsParams object, @@ -65,7 +67,7 @@ type RunnerOtelWriteLogsParams struct { Input */ - Req interface{} + Req *models.ServiceOTLPLogExportRequest /* RunnerID. @@ -127,13 +129,13 @@ func (o *RunnerOtelWriteLogsParams) SetHTTPClient(client *http.Client) { } // WithReq adds the req to the runner otel write logs params -func (o *RunnerOtelWriteLogsParams) WithReq(req interface{}) *RunnerOtelWriteLogsParams { +func (o *RunnerOtelWriteLogsParams) WithReq(req *models.ServiceOTLPLogExportRequest) *RunnerOtelWriteLogsParams { o.SetReq(req) return o } // SetReq adds the req to the runner otel write logs params -func (o *RunnerOtelWriteLogsParams) SetReq(req interface{}) { +func (o *RunnerOtelWriteLogsParams) SetReq(req *models.ServiceOTLPLogExportRequest) { o.Req = req } diff --git a/client/operations/runner_otel_write_traces_parameters.go b/client/operations/runner_otel_write_traces_parameters.go index 671ff26..603719e 100644 --- a/client/operations/runner_otel_write_traces_parameters.go +++ b/client/operations/runner_otel_write_traces_parameters.go @@ -14,6 +14,8 @@ import ( "github.com/go-openapi/runtime" cr "github.com/go-openapi/runtime/client" "github.com/go-openapi/strfmt" + + "github.com/nuonco/nuon-runner-go/models" ) // NewRunnerOtelWriteTracesParams creates a new RunnerOtelWriteTracesParams object, @@ -65,7 +67,7 @@ type RunnerOtelWriteTracesParams struct { Input */ - Req interface{} + Req *models.ServiceOTLPTraceExportRequest /* RunnerID. @@ -127,13 +129,13 @@ func (o *RunnerOtelWriteTracesParams) SetHTTPClient(client *http.Client) { } // WithReq adds the req to the runner otel write traces params -func (o *RunnerOtelWriteTracesParams) WithReq(req interface{}) *RunnerOtelWriteTracesParams { +func (o *RunnerOtelWriteTracesParams) WithReq(req *models.ServiceOTLPTraceExportRequest) *RunnerOtelWriteTracesParams { o.SetReq(req) return o } // SetReq adds the req to the runner otel write traces params -func (o *RunnerOtelWriteTracesParams) SetReq(req interface{}) { +func (o *RunnerOtelWriteTracesParams) SetReq(req *models.ServiceOTLPTraceExportRequest) { o.Req = req } diff --git a/client/operations/teardown_install_component_parameters.go b/client/operations/teardown_install_component_parameters.go deleted file mode 100644 index 90b14f8..0000000 --- a/client/operations/teardown_install_component_parameters.go +++ /dev/null @@ -1,173 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package operations - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "context" - "net/http" - "time" - - "github.com/go-openapi/errors" - "github.com/go-openapi/runtime" - cr "github.com/go-openapi/runtime/client" - "github.com/go-openapi/strfmt" -) - -// NewTeardownInstallComponentParams creates a new TeardownInstallComponentParams object, -// with the default timeout for this client. -// -// Default values are not hydrated, since defaults are normally applied by the API server side. -// -// To enforce default values in parameter, use SetDefaults or WithDefaults. -func NewTeardownInstallComponentParams() *TeardownInstallComponentParams { - return &TeardownInstallComponentParams{ - timeout: cr.DefaultTimeout, - } -} - -// NewTeardownInstallComponentParamsWithTimeout creates a new TeardownInstallComponentParams object -// with the ability to set a timeout on a request. -func NewTeardownInstallComponentParamsWithTimeout(timeout time.Duration) *TeardownInstallComponentParams { - return &TeardownInstallComponentParams{ - timeout: timeout, - } -} - -// NewTeardownInstallComponentParamsWithContext creates a new TeardownInstallComponentParams object -// with the ability to set a context for a request. -func NewTeardownInstallComponentParamsWithContext(ctx context.Context) *TeardownInstallComponentParams { - return &TeardownInstallComponentParams{ - Context: ctx, - } -} - -// NewTeardownInstallComponentParamsWithHTTPClient creates a new TeardownInstallComponentParams object -// with the ability to set a custom HTTPClient for a request. -func NewTeardownInstallComponentParamsWithHTTPClient(client *http.Client) *TeardownInstallComponentParams { - return &TeardownInstallComponentParams{ - HTTPClient: client, - } -} - -/* -TeardownInstallComponentParams contains all the parameters to send to the API endpoint - - for the teardown install component operation. - - Typically these are written to a http.Request. -*/ -type TeardownInstallComponentParams struct { - - /* ComponentID. - - component ID - */ - ComponentID string - - /* InstallID. - - install ID - */ - InstallID string - - timeout time.Duration - Context context.Context - HTTPClient *http.Client -} - -// WithDefaults hydrates default values in the teardown install component params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *TeardownInstallComponentParams) WithDefaults() *TeardownInstallComponentParams { - o.SetDefaults() - return o -} - -// SetDefaults hydrates default values in the teardown install component params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *TeardownInstallComponentParams) SetDefaults() { - // no default values defined for this parameter -} - -// WithTimeout adds the timeout to the teardown install component params -func (o *TeardownInstallComponentParams) WithTimeout(timeout time.Duration) *TeardownInstallComponentParams { - o.SetTimeout(timeout) - return o -} - -// SetTimeout adds the timeout to the teardown install component params -func (o *TeardownInstallComponentParams) SetTimeout(timeout time.Duration) { - o.timeout = timeout -} - -// WithContext adds the context to the teardown install component params -func (o *TeardownInstallComponentParams) WithContext(ctx context.Context) *TeardownInstallComponentParams { - o.SetContext(ctx) - return o -} - -// SetContext adds the context to the teardown install component params -func (o *TeardownInstallComponentParams) SetContext(ctx context.Context) { - o.Context = ctx -} - -// WithHTTPClient adds the HTTPClient to the teardown install component params -func (o *TeardownInstallComponentParams) WithHTTPClient(client *http.Client) *TeardownInstallComponentParams { - o.SetHTTPClient(client) - return o -} - -// SetHTTPClient adds the HTTPClient to the teardown install component params -func (o *TeardownInstallComponentParams) SetHTTPClient(client *http.Client) { - o.HTTPClient = client -} - -// WithComponentID adds the componentID to the teardown install component params -func (o *TeardownInstallComponentParams) WithComponentID(componentID string) *TeardownInstallComponentParams { - o.SetComponentID(componentID) - return o -} - -// SetComponentID adds the componentId to the teardown install component params -func (o *TeardownInstallComponentParams) SetComponentID(componentID string) { - o.ComponentID = componentID -} - -// WithInstallID adds the installID to the teardown install component params -func (o *TeardownInstallComponentParams) WithInstallID(installID string) *TeardownInstallComponentParams { - o.SetInstallID(installID) - return o -} - -// SetInstallID adds the installId to the teardown install component params -func (o *TeardownInstallComponentParams) SetInstallID(installID string) { - o.InstallID = installID -} - -// WriteToRequest writes these params to a swagger request -func (o *TeardownInstallComponentParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { - - if err := r.SetTimeout(o.timeout); err != nil { - return err - } - var res []error - - // path param component_id - if err := r.SetPathParam("component_id", o.ComponentID); err != nil { - return err - } - - // path param install_id - if err := r.SetPathParam("install_id", o.InstallID); err != nil { - return err - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} diff --git a/client/operations/teardown_install_component_responses.go b/client/operations/teardown_install_component_responses.go deleted file mode 100644 index e6f7312..0000000 --- a/client/operations/teardown_install_component_responses.go +++ /dev/null @@ -1,486 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package operations - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "encoding/json" - "fmt" - "io" - - "github.com/go-openapi/runtime" - "github.com/go-openapi/strfmt" - - "github.com/nuonco/nuon-go/models" -) - -// TeardownInstallComponentReader is a Reader for the TeardownInstallComponent structure. -type TeardownInstallComponentReader struct { - formats strfmt.Registry -} - -// ReadResponse reads a server response into the received o. -func (o *TeardownInstallComponentReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { - switch response.Code() { - case 201: - result := NewTeardownInstallComponentCreated() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return result, nil - case 400: - result := NewTeardownInstallComponentBadRequest() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return nil, result - case 401: - result := NewTeardownInstallComponentUnauthorized() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return nil, result - case 403: - result := NewTeardownInstallComponentForbidden() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return nil, result - case 404: - result := NewTeardownInstallComponentNotFound() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return nil, result - case 500: - result := NewTeardownInstallComponentInternalServerError() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return nil, result - default: - return nil, runtime.NewAPIError("[POST /v1/installs/{install_id}/components/{component_id}/teardown] TeardownInstallComponent", response, response.Code()) - } -} - -// NewTeardownInstallComponentCreated creates a TeardownInstallComponentCreated with default headers values -func NewTeardownInstallComponentCreated() *TeardownInstallComponentCreated { - return &TeardownInstallComponentCreated{} -} - -/* -TeardownInstallComponentCreated describes a response with status code 201, with default header values. - -Created -*/ -type TeardownInstallComponentCreated struct { - Payload *models.AppInstallDeploy -} - -// IsSuccess returns true when this teardown install component created response has a 2xx status code -func (o *TeardownInstallComponentCreated) IsSuccess() bool { - return true -} - -// IsRedirect returns true when this teardown install component created response has a 3xx status code -func (o *TeardownInstallComponentCreated) IsRedirect() bool { - return false -} - -// IsClientError returns true when this teardown install component created response has a 4xx status code -func (o *TeardownInstallComponentCreated) IsClientError() bool { - return false -} - -// IsServerError returns true when this teardown install component created response has a 5xx status code -func (o *TeardownInstallComponentCreated) IsServerError() bool { - return false -} - -// IsCode returns true when this teardown install component created response a status code equal to that given -func (o *TeardownInstallComponentCreated) IsCode(code int) bool { - return code == 201 -} - -// Code gets the status code for the teardown install component created response -func (o *TeardownInstallComponentCreated) Code() int { - return 201 -} - -func (o *TeardownInstallComponentCreated) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[POST /v1/installs/{install_id}/components/{component_id}/teardown][%d] teardownInstallComponentCreated %s", 201, payload) -} - -func (o *TeardownInstallComponentCreated) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[POST /v1/installs/{install_id}/components/{component_id}/teardown][%d] teardownInstallComponentCreated %s", 201, payload) -} - -func (o *TeardownInstallComponentCreated) GetPayload() *models.AppInstallDeploy { - return o.Payload -} - -func (o *TeardownInstallComponentCreated) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.AppInstallDeploy) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewTeardownInstallComponentBadRequest creates a TeardownInstallComponentBadRequest with default headers values -func NewTeardownInstallComponentBadRequest() *TeardownInstallComponentBadRequest { - return &TeardownInstallComponentBadRequest{} -} - -/* -TeardownInstallComponentBadRequest describes a response with status code 400, with default header values. - -Bad Request -*/ -type TeardownInstallComponentBadRequest struct { - Payload *models.StderrErrResponse -} - -// IsSuccess returns true when this teardown install component bad request response has a 2xx status code -func (o *TeardownInstallComponentBadRequest) IsSuccess() bool { - return false -} - -// IsRedirect returns true when this teardown install component bad request response has a 3xx status code -func (o *TeardownInstallComponentBadRequest) IsRedirect() bool { - return false -} - -// IsClientError returns true when this teardown install component bad request response has a 4xx status code -func (o *TeardownInstallComponentBadRequest) IsClientError() bool { - return true -} - -// IsServerError returns true when this teardown install component bad request response has a 5xx status code -func (o *TeardownInstallComponentBadRequest) IsServerError() bool { - return false -} - -// IsCode returns true when this teardown install component bad request response a status code equal to that given -func (o *TeardownInstallComponentBadRequest) IsCode(code int) bool { - return code == 400 -} - -// Code gets the status code for the teardown install component bad request response -func (o *TeardownInstallComponentBadRequest) Code() int { - return 400 -} - -func (o *TeardownInstallComponentBadRequest) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[POST /v1/installs/{install_id}/components/{component_id}/teardown][%d] teardownInstallComponentBadRequest %s", 400, payload) -} - -func (o *TeardownInstallComponentBadRequest) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[POST /v1/installs/{install_id}/components/{component_id}/teardown][%d] teardownInstallComponentBadRequest %s", 400, payload) -} - -func (o *TeardownInstallComponentBadRequest) GetPayload() *models.StderrErrResponse { - return o.Payload -} - -func (o *TeardownInstallComponentBadRequest) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.StderrErrResponse) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewTeardownInstallComponentUnauthorized creates a TeardownInstallComponentUnauthorized with default headers values -func NewTeardownInstallComponentUnauthorized() *TeardownInstallComponentUnauthorized { - return &TeardownInstallComponentUnauthorized{} -} - -/* -TeardownInstallComponentUnauthorized describes a response with status code 401, with default header values. - -Unauthorized -*/ -type TeardownInstallComponentUnauthorized struct { - Payload *models.StderrErrResponse -} - -// IsSuccess returns true when this teardown install component unauthorized response has a 2xx status code -func (o *TeardownInstallComponentUnauthorized) IsSuccess() bool { - return false -} - -// IsRedirect returns true when this teardown install component unauthorized response has a 3xx status code -func (o *TeardownInstallComponentUnauthorized) IsRedirect() bool { - return false -} - -// IsClientError returns true when this teardown install component unauthorized response has a 4xx status code -func (o *TeardownInstallComponentUnauthorized) IsClientError() bool { - return true -} - -// IsServerError returns true when this teardown install component unauthorized response has a 5xx status code -func (o *TeardownInstallComponentUnauthorized) IsServerError() bool { - return false -} - -// IsCode returns true when this teardown install component unauthorized response a status code equal to that given -func (o *TeardownInstallComponentUnauthorized) IsCode(code int) bool { - return code == 401 -} - -// Code gets the status code for the teardown install component unauthorized response -func (o *TeardownInstallComponentUnauthorized) Code() int { - return 401 -} - -func (o *TeardownInstallComponentUnauthorized) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[POST /v1/installs/{install_id}/components/{component_id}/teardown][%d] teardownInstallComponentUnauthorized %s", 401, payload) -} - -func (o *TeardownInstallComponentUnauthorized) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[POST /v1/installs/{install_id}/components/{component_id}/teardown][%d] teardownInstallComponentUnauthorized %s", 401, payload) -} - -func (o *TeardownInstallComponentUnauthorized) GetPayload() *models.StderrErrResponse { - return o.Payload -} - -func (o *TeardownInstallComponentUnauthorized) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.StderrErrResponse) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewTeardownInstallComponentForbidden creates a TeardownInstallComponentForbidden with default headers values -func NewTeardownInstallComponentForbidden() *TeardownInstallComponentForbidden { - return &TeardownInstallComponentForbidden{} -} - -/* -TeardownInstallComponentForbidden describes a response with status code 403, with default header values. - -Forbidden -*/ -type TeardownInstallComponentForbidden struct { - Payload *models.StderrErrResponse -} - -// IsSuccess returns true when this teardown install component forbidden response has a 2xx status code -func (o *TeardownInstallComponentForbidden) IsSuccess() bool { - return false -} - -// IsRedirect returns true when this teardown install component forbidden response has a 3xx status code -func (o *TeardownInstallComponentForbidden) IsRedirect() bool { - return false -} - -// IsClientError returns true when this teardown install component forbidden response has a 4xx status code -func (o *TeardownInstallComponentForbidden) IsClientError() bool { - return true -} - -// IsServerError returns true when this teardown install component forbidden response has a 5xx status code -func (o *TeardownInstallComponentForbidden) IsServerError() bool { - return false -} - -// IsCode returns true when this teardown install component forbidden response a status code equal to that given -func (o *TeardownInstallComponentForbidden) IsCode(code int) bool { - return code == 403 -} - -// Code gets the status code for the teardown install component forbidden response -func (o *TeardownInstallComponentForbidden) Code() int { - return 403 -} - -func (o *TeardownInstallComponentForbidden) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[POST /v1/installs/{install_id}/components/{component_id}/teardown][%d] teardownInstallComponentForbidden %s", 403, payload) -} - -func (o *TeardownInstallComponentForbidden) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[POST /v1/installs/{install_id}/components/{component_id}/teardown][%d] teardownInstallComponentForbidden %s", 403, payload) -} - -func (o *TeardownInstallComponentForbidden) GetPayload() *models.StderrErrResponse { - return o.Payload -} - -func (o *TeardownInstallComponentForbidden) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.StderrErrResponse) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewTeardownInstallComponentNotFound creates a TeardownInstallComponentNotFound with default headers values -func NewTeardownInstallComponentNotFound() *TeardownInstallComponentNotFound { - return &TeardownInstallComponentNotFound{} -} - -/* -TeardownInstallComponentNotFound describes a response with status code 404, with default header values. - -Not Found -*/ -type TeardownInstallComponentNotFound struct { - Payload *models.StderrErrResponse -} - -// IsSuccess returns true when this teardown install component not found response has a 2xx status code -func (o *TeardownInstallComponentNotFound) IsSuccess() bool { - return false -} - -// IsRedirect returns true when this teardown install component not found response has a 3xx status code -func (o *TeardownInstallComponentNotFound) IsRedirect() bool { - return false -} - -// IsClientError returns true when this teardown install component not found response has a 4xx status code -func (o *TeardownInstallComponentNotFound) IsClientError() bool { - return true -} - -// IsServerError returns true when this teardown install component not found response has a 5xx status code -func (o *TeardownInstallComponentNotFound) IsServerError() bool { - return false -} - -// IsCode returns true when this teardown install component not found response a status code equal to that given -func (o *TeardownInstallComponentNotFound) IsCode(code int) bool { - return code == 404 -} - -// Code gets the status code for the teardown install component not found response -func (o *TeardownInstallComponentNotFound) Code() int { - return 404 -} - -func (o *TeardownInstallComponentNotFound) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[POST /v1/installs/{install_id}/components/{component_id}/teardown][%d] teardownInstallComponentNotFound %s", 404, payload) -} - -func (o *TeardownInstallComponentNotFound) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[POST /v1/installs/{install_id}/components/{component_id}/teardown][%d] teardownInstallComponentNotFound %s", 404, payload) -} - -func (o *TeardownInstallComponentNotFound) GetPayload() *models.StderrErrResponse { - return o.Payload -} - -func (o *TeardownInstallComponentNotFound) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.StderrErrResponse) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewTeardownInstallComponentInternalServerError creates a TeardownInstallComponentInternalServerError with default headers values -func NewTeardownInstallComponentInternalServerError() *TeardownInstallComponentInternalServerError { - return &TeardownInstallComponentInternalServerError{} -} - -/* -TeardownInstallComponentInternalServerError describes a response with status code 500, with default header values. - -Internal Server Error -*/ -type TeardownInstallComponentInternalServerError struct { - Payload *models.StderrErrResponse -} - -// IsSuccess returns true when this teardown install component internal server error response has a 2xx status code -func (o *TeardownInstallComponentInternalServerError) IsSuccess() bool { - return false -} - -// IsRedirect returns true when this teardown install component internal server error response has a 3xx status code -func (o *TeardownInstallComponentInternalServerError) IsRedirect() bool { - return false -} - -// IsClientError returns true when this teardown install component internal server error response has a 4xx status code -func (o *TeardownInstallComponentInternalServerError) IsClientError() bool { - return false -} - -// IsServerError returns true when this teardown install component internal server error response has a 5xx status code -func (o *TeardownInstallComponentInternalServerError) IsServerError() bool { - return true -} - -// IsCode returns true when this teardown install component internal server error response a status code equal to that given -func (o *TeardownInstallComponentInternalServerError) IsCode(code int) bool { - return code == 500 -} - -// Code gets the status code for the teardown install component internal server error response -func (o *TeardownInstallComponentInternalServerError) Code() int { - return 500 -} - -func (o *TeardownInstallComponentInternalServerError) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[POST /v1/installs/{install_id}/components/{component_id}/teardown][%d] teardownInstallComponentInternalServerError %s", 500, payload) -} - -func (o *TeardownInstallComponentInternalServerError) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[POST /v1/installs/{install_id}/components/{component_id}/teardown][%d] teardownInstallComponentInternalServerError %s", 500, payload) -} - -func (o *TeardownInstallComponentInternalServerError) GetPayload() *models.StderrErrResponse { - return o.Payload -} - -func (o *TeardownInstallComponentInternalServerError) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.StderrErrResponse) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} diff --git a/client/operations/teardown_install_components_parameters.go b/client/operations/teardown_install_components_parameters.go deleted file mode 100644 index bdcb352..0000000 --- a/client/operations/teardown_install_components_parameters.go +++ /dev/null @@ -1,175 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package operations - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "context" - "net/http" - "time" - - "github.com/go-openapi/errors" - "github.com/go-openapi/runtime" - cr "github.com/go-openapi/runtime/client" - "github.com/go-openapi/strfmt" - - "github.com/nuonco/nuon-go/models" -) - -// NewTeardownInstallComponentsParams creates a new TeardownInstallComponentsParams object, -// with the default timeout for this client. -// -// Default values are not hydrated, since defaults are normally applied by the API server side. -// -// To enforce default values in parameter, use SetDefaults or WithDefaults. -func NewTeardownInstallComponentsParams() *TeardownInstallComponentsParams { - return &TeardownInstallComponentsParams{ - timeout: cr.DefaultTimeout, - } -} - -// NewTeardownInstallComponentsParamsWithTimeout creates a new TeardownInstallComponentsParams object -// with the ability to set a timeout on a request. -func NewTeardownInstallComponentsParamsWithTimeout(timeout time.Duration) *TeardownInstallComponentsParams { - return &TeardownInstallComponentsParams{ - timeout: timeout, - } -} - -// NewTeardownInstallComponentsParamsWithContext creates a new TeardownInstallComponentsParams object -// with the ability to set a context for a request. -func NewTeardownInstallComponentsParamsWithContext(ctx context.Context) *TeardownInstallComponentsParams { - return &TeardownInstallComponentsParams{ - Context: ctx, - } -} - -// NewTeardownInstallComponentsParamsWithHTTPClient creates a new TeardownInstallComponentsParams object -// with the ability to set a custom HTTPClient for a request. -func NewTeardownInstallComponentsParamsWithHTTPClient(client *http.Client) *TeardownInstallComponentsParams { - return &TeardownInstallComponentsParams{ - HTTPClient: client, - } -} - -/* -TeardownInstallComponentsParams contains all the parameters to send to the API endpoint - - for the teardown install components operation. - - Typically these are written to a http.Request. -*/ -type TeardownInstallComponentsParams struct { - - /* InstallID. - - install ID - */ - InstallID string - - /* Req. - - Input - */ - Req models.ServiceTeardownInstallComponentsRequest - - timeout time.Duration - Context context.Context - HTTPClient *http.Client -} - -// WithDefaults hydrates default values in the teardown install components params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *TeardownInstallComponentsParams) WithDefaults() *TeardownInstallComponentsParams { - o.SetDefaults() - return o -} - -// SetDefaults hydrates default values in the teardown install components params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *TeardownInstallComponentsParams) SetDefaults() { - // no default values defined for this parameter -} - -// WithTimeout adds the timeout to the teardown install components params -func (o *TeardownInstallComponentsParams) WithTimeout(timeout time.Duration) *TeardownInstallComponentsParams { - o.SetTimeout(timeout) - return o -} - -// SetTimeout adds the timeout to the teardown install components params -func (o *TeardownInstallComponentsParams) SetTimeout(timeout time.Duration) { - o.timeout = timeout -} - -// WithContext adds the context to the teardown install components params -func (o *TeardownInstallComponentsParams) WithContext(ctx context.Context) *TeardownInstallComponentsParams { - o.SetContext(ctx) - return o -} - -// SetContext adds the context to the teardown install components params -func (o *TeardownInstallComponentsParams) SetContext(ctx context.Context) { - o.Context = ctx -} - -// WithHTTPClient adds the HTTPClient to the teardown install components params -func (o *TeardownInstallComponentsParams) WithHTTPClient(client *http.Client) *TeardownInstallComponentsParams { - o.SetHTTPClient(client) - return o -} - -// SetHTTPClient adds the HTTPClient to the teardown install components params -func (o *TeardownInstallComponentsParams) SetHTTPClient(client *http.Client) { - o.HTTPClient = client -} - -// WithInstallID adds the installID to the teardown install components params -func (o *TeardownInstallComponentsParams) WithInstallID(installID string) *TeardownInstallComponentsParams { - o.SetInstallID(installID) - return o -} - -// SetInstallID adds the installId to the teardown install components params -func (o *TeardownInstallComponentsParams) SetInstallID(installID string) { - o.InstallID = installID -} - -// WithReq adds the req to the teardown install components params -func (o *TeardownInstallComponentsParams) WithReq(req models.ServiceTeardownInstallComponentsRequest) *TeardownInstallComponentsParams { - o.SetReq(req) - return o -} - -// SetReq adds the req to the teardown install components params -func (o *TeardownInstallComponentsParams) SetReq(req models.ServiceTeardownInstallComponentsRequest) { - o.Req = req -} - -// WriteToRequest writes these params to a swagger request -func (o *TeardownInstallComponentsParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { - - if err := r.SetTimeout(o.timeout); err != nil { - return err - } - var res []error - - // path param install_id - if err := r.SetPathParam("install_id", o.InstallID); err != nil { - return err - } - if o.Req != nil { - if err := r.SetBodyParam(o.Req); err != nil { - return err - } - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} diff --git a/client/operations/teardown_install_components_responses.go b/client/operations/teardown_install_components_responses.go deleted file mode 100644 index e233178..0000000 --- a/client/operations/teardown_install_components_responses.go +++ /dev/null @@ -1,484 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package operations - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "encoding/json" - "fmt" - "io" - - "github.com/go-openapi/runtime" - "github.com/go-openapi/strfmt" - - "github.com/nuonco/nuon-go/models" -) - -// TeardownInstallComponentsReader is a Reader for the TeardownInstallComponents structure. -type TeardownInstallComponentsReader struct { - formats strfmt.Registry -} - -// ReadResponse reads a server response into the received o. -func (o *TeardownInstallComponentsReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { - switch response.Code() { - case 201: - result := NewTeardownInstallComponentsCreated() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return result, nil - case 400: - result := NewTeardownInstallComponentsBadRequest() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return nil, result - case 401: - result := NewTeardownInstallComponentsUnauthorized() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return nil, result - case 403: - result := NewTeardownInstallComponentsForbidden() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return nil, result - case 404: - result := NewTeardownInstallComponentsNotFound() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return nil, result - case 500: - result := NewTeardownInstallComponentsInternalServerError() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return nil, result - default: - return nil, runtime.NewAPIError("[POST /v1/installs/{install_id}/components/teardown-all] TeardownInstallComponents", response, response.Code()) - } -} - -// NewTeardownInstallComponentsCreated creates a TeardownInstallComponentsCreated with default headers values -func NewTeardownInstallComponentsCreated() *TeardownInstallComponentsCreated { - return &TeardownInstallComponentsCreated{} -} - -/* -TeardownInstallComponentsCreated describes a response with status code 201, with default header values. - -Created -*/ -type TeardownInstallComponentsCreated struct { - Payload string -} - -// IsSuccess returns true when this teardown install components created response has a 2xx status code -func (o *TeardownInstallComponentsCreated) IsSuccess() bool { - return true -} - -// IsRedirect returns true when this teardown install components created response has a 3xx status code -func (o *TeardownInstallComponentsCreated) IsRedirect() bool { - return false -} - -// IsClientError returns true when this teardown install components created response has a 4xx status code -func (o *TeardownInstallComponentsCreated) IsClientError() bool { - return false -} - -// IsServerError returns true when this teardown install components created response has a 5xx status code -func (o *TeardownInstallComponentsCreated) IsServerError() bool { - return false -} - -// IsCode returns true when this teardown install components created response a status code equal to that given -func (o *TeardownInstallComponentsCreated) IsCode(code int) bool { - return code == 201 -} - -// Code gets the status code for the teardown install components created response -func (o *TeardownInstallComponentsCreated) Code() int { - return 201 -} - -func (o *TeardownInstallComponentsCreated) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[POST /v1/installs/{install_id}/components/teardown-all][%d] teardownInstallComponentsCreated %s", 201, payload) -} - -func (o *TeardownInstallComponentsCreated) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[POST /v1/installs/{install_id}/components/teardown-all][%d] teardownInstallComponentsCreated %s", 201, payload) -} - -func (o *TeardownInstallComponentsCreated) GetPayload() string { - return o.Payload -} - -func (o *TeardownInstallComponentsCreated) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - // response payload - if err := consumer.Consume(response.Body(), &o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewTeardownInstallComponentsBadRequest creates a TeardownInstallComponentsBadRequest with default headers values -func NewTeardownInstallComponentsBadRequest() *TeardownInstallComponentsBadRequest { - return &TeardownInstallComponentsBadRequest{} -} - -/* -TeardownInstallComponentsBadRequest describes a response with status code 400, with default header values. - -Bad Request -*/ -type TeardownInstallComponentsBadRequest struct { - Payload *models.StderrErrResponse -} - -// IsSuccess returns true when this teardown install components bad request response has a 2xx status code -func (o *TeardownInstallComponentsBadRequest) IsSuccess() bool { - return false -} - -// IsRedirect returns true when this teardown install components bad request response has a 3xx status code -func (o *TeardownInstallComponentsBadRequest) IsRedirect() bool { - return false -} - -// IsClientError returns true when this teardown install components bad request response has a 4xx status code -func (o *TeardownInstallComponentsBadRequest) IsClientError() bool { - return true -} - -// IsServerError returns true when this teardown install components bad request response has a 5xx status code -func (o *TeardownInstallComponentsBadRequest) IsServerError() bool { - return false -} - -// IsCode returns true when this teardown install components bad request response a status code equal to that given -func (o *TeardownInstallComponentsBadRequest) IsCode(code int) bool { - return code == 400 -} - -// Code gets the status code for the teardown install components bad request response -func (o *TeardownInstallComponentsBadRequest) Code() int { - return 400 -} - -func (o *TeardownInstallComponentsBadRequest) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[POST /v1/installs/{install_id}/components/teardown-all][%d] teardownInstallComponentsBadRequest %s", 400, payload) -} - -func (o *TeardownInstallComponentsBadRequest) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[POST /v1/installs/{install_id}/components/teardown-all][%d] teardownInstallComponentsBadRequest %s", 400, payload) -} - -func (o *TeardownInstallComponentsBadRequest) GetPayload() *models.StderrErrResponse { - return o.Payload -} - -func (o *TeardownInstallComponentsBadRequest) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.StderrErrResponse) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewTeardownInstallComponentsUnauthorized creates a TeardownInstallComponentsUnauthorized with default headers values -func NewTeardownInstallComponentsUnauthorized() *TeardownInstallComponentsUnauthorized { - return &TeardownInstallComponentsUnauthorized{} -} - -/* -TeardownInstallComponentsUnauthorized describes a response with status code 401, with default header values. - -Unauthorized -*/ -type TeardownInstallComponentsUnauthorized struct { - Payload *models.StderrErrResponse -} - -// IsSuccess returns true when this teardown install components unauthorized response has a 2xx status code -func (o *TeardownInstallComponentsUnauthorized) IsSuccess() bool { - return false -} - -// IsRedirect returns true when this teardown install components unauthorized response has a 3xx status code -func (o *TeardownInstallComponentsUnauthorized) IsRedirect() bool { - return false -} - -// IsClientError returns true when this teardown install components unauthorized response has a 4xx status code -func (o *TeardownInstallComponentsUnauthorized) IsClientError() bool { - return true -} - -// IsServerError returns true when this teardown install components unauthorized response has a 5xx status code -func (o *TeardownInstallComponentsUnauthorized) IsServerError() bool { - return false -} - -// IsCode returns true when this teardown install components unauthorized response a status code equal to that given -func (o *TeardownInstallComponentsUnauthorized) IsCode(code int) bool { - return code == 401 -} - -// Code gets the status code for the teardown install components unauthorized response -func (o *TeardownInstallComponentsUnauthorized) Code() int { - return 401 -} - -func (o *TeardownInstallComponentsUnauthorized) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[POST /v1/installs/{install_id}/components/teardown-all][%d] teardownInstallComponentsUnauthorized %s", 401, payload) -} - -func (o *TeardownInstallComponentsUnauthorized) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[POST /v1/installs/{install_id}/components/teardown-all][%d] teardownInstallComponentsUnauthorized %s", 401, payload) -} - -func (o *TeardownInstallComponentsUnauthorized) GetPayload() *models.StderrErrResponse { - return o.Payload -} - -func (o *TeardownInstallComponentsUnauthorized) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.StderrErrResponse) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewTeardownInstallComponentsForbidden creates a TeardownInstallComponentsForbidden with default headers values -func NewTeardownInstallComponentsForbidden() *TeardownInstallComponentsForbidden { - return &TeardownInstallComponentsForbidden{} -} - -/* -TeardownInstallComponentsForbidden describes a response with status code 403, with default header values. - -Forbidden -*/ -type TeardownInstallComponentsForbidden struct { - Payload *models.StderrErrResponse -} - -// IsSuccess returns true when this teardown install components forbidden response has a 2xx status code -func (o *TeardownInstallComponentsForbidden) IsSuccess() bool { - return false -} - -// IsRedirect returns true when this teardown install components forbidden response has a 3xx status code -func (o *TeardownInstallComponentsForbidden) IsRedirect() bool { - return false -} - -// IsClientError returns true when this teardown install components forbidden response has a 4xx status code -func (o *TeardownInstallComponentsForbidden) IsClientError() bool { - return true -} - -// IsServerError returns true when this teardown install components forbidden response has a 5xx status code -func (o *TeardownInstallComponentsForbidden) IsServerError() bool { - return false -} - -// IsCode returns true when this teardown install components forbidden response a status code equal to that given -func (o *TeardownInstallComponentsForbidden) IsCode(code int) bool { - return code == 403 -} - -// Code gets the status code for the teardown install components forbidden response -func (o *TeardownInstallComponentsForbidden) Code() int { - return 403 -} - -func (o *TeardownInstallComponentsForbidden) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[POST /v1/installs/{install_id}/components/teardown-all][%d] teardownInstallComponentsForbidden %s", 403, payload) -} - -func (o *TeardownInstallComponentsForbidden) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[POST /v1/installs/{install_id}/components/teardown-all][%d] teardownInstallComponentsForbidden %s", 403, payload) -} - -func (o *TeardownInstallComponentsForbidden) GetPayload() *models.StderrErrResponse { - return o.Payload -} - -func (o *TeardownInstallComponentsForbidden) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.StderrErrResponse) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewTeardownInstallComponentsNotFound creates a TeardownInstallComponentsNotFound with default headers values -func NewTeardownInstallComponentsNotFound() *TeardownInstallComponentsNotFound { - return &TeardownInstallComponentsNotFound{} -} - -/* -TeardownInstallComponentsNotFound describes a response with status code 404, with default header values. - -Not Found -*/ -type TeardownInstallComponentsNotFound struct { - Payload *models.StderrErrResponse -} - -// IsSuccess returns true when this teardown install components not found response has a 2xx status code -func (o *TeardownInstallComponentsNotFound) IsSuccess() bool { - return false -} - -// IsRedirect returns true when this teardown install components not found response has a 3xx status code -func (o *TeardownInstallComponentsNotFound) IsRedirect() bool { - return false -} - -// IsClientError returns true when this teardown install components not found response has a 4xx status code -func (o *TeardownInstallComponentsNotFound) IsClientError() bool { - return true -} - -// IsServerError returns true when this teardown install components not found response has a 5xx status code -func (o *TeardownInstallComponentsNotFound) IsServerError() bool { - return false -} - -// IsCode returns true when this teardown install components not found response a status code equal to that given -func (o *TeardownInstallComponentsNotFound) IsCode(code int) bool { - return code == 404 -} - -// Code gets the status code for the teardown install components not found response -func (o *TeardownInstallComponentsNotFound) Code() int { - return 404 -} - -func (o *TeardownInstallComponentsNotFound) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[POST /v1/installs/{install_id}/components/teardown-all][%d] teardownInstallComponentsNotFound %s", 404, payload) -} - -func (o *TeardownInstallComponentsNotFound) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[POST /v1/installs/{install_id}/components/teardown-all][%d] teardownInstallComponentsNotFound %s", 404, payload) -} - -func (o *TeardownInstallComponentsNotFound) GetPayload() *models.StderrErrResponse { - return o.Payload -} - -func (o *TeardownInstallComponentsNotFound) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.StderrErrResponse) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewTeardownInstallComponentsInternalServerError creates a TeardownInstallComponentsInternalServerError with default headers values -func NewTeardownInstallComponentsInternalServerError() *TeardownInstallComponentsInternalServerError { - return &TeardownInstallComponentsInternalServerError{} -} - -/* -TeardownInstallComponentsInternalServerError describes a response with status code 500, with default header values. - -Internal Server Error -*/ -type TeardownInstallComponentsInternalServerError struct { - Payload *models.StderrErrResponse -} - -// IsSuccess returns true when this teardown install components internal server error response has a 2xx status code -func (o *TeardownInstallComponentsInternalServerError) IsSuccess() bool { - return false -} - -// IsRedirect returns true when this teardown install components internal server error response has a 3xx status code -func (o *TeardownInstallComponentsInternalServerError) IsRedirect() bool { - return false -} - -// IsClientError returns true when this teardown install components internal server error response has a 4xx status code -func (o *TeardownInstallComponentsInternalServerError) IsClientError() bool { - return false -} - -// IsServerError returns true when this teardown install components internal server error response has a 5xx status code -func (o *TeardownInstallComponentsInternalServerError) IsServerError() bool { - return true -} - -// IsCode returns true when this teardown install components internal server error response a status code equal to that given -func (o *TeardownInstallComponentsInternalServerError) IsCode(code int) bool { - return code == 500 -} - -// Code gets the status code for the teardown install components internal server error response -func (o *TeardownInstallComponentsInternalServerError) Code() int { - return 500 -} - -func (o *TeardownInstallComponentsInternalServerError) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[POST /v1/installs/{install_id}/components/teardown-all][%d] teardownInstallComponentsInternalServerError %s", 500, payload) -} - -func (o *TeardownInstallComponentsInternalServerError) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[POST /v1/installs/{install_id}/components/teardown-all][%d] teardownInstallComponentsInternalServerError %s", 500, payload) -} - -func (o *TeardownInstallComponentsInternalServerError) GetPayload() *models.StderrErrResponse { - return o.Payload -} - -func (o *TeardownInstallComponentsInternalServerError) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.StderrErrResponse) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} diff --git a/client/operations/update_app_parameters.go b/client/operations/update_app_parameters.go deleted file mode 100644 index 1713c5f..0000000 --- a/client/operations/update_app_parameters.go +++ /dev/null @@ -1,175 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package operations - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "context" - "net/http" - "time" - - "github.com/go-openapi/errors" - "github.com/go-openapi/runtime" - cr "github.com/go-openapi/runtime/client" - "github.com/go-openapi/strfmt" - - "github.com/nuonco/nuon-go/models" -) - -// NewUpdateAppParams creates a new UpdateAppParams object, -// with the default timeout for this client. -// -// Default values are not hydrated, since defaults are normally applied by the API server side. -// -// To enforce default values in parameter, use SetDefaults or WithDefaults. -func NewUpdateAppParams() *UpdateAppParams { - return &UpdateAppParams{ - timeout: cr.DefaultTimeout, - } -} - -// NewUpdateAppParamsWithTimeout creates a new UpdateAppParams object -// with the ability to set a timeout on a request. -func NewUpdateAppParamsWithTimeout(timeout time.Duration) *UpdateAppParams { - return &UpdateAppParams{ - timeout: timeout, - } -} - -// NewUpdateAppParamsWithContext creates a new UpdateAppParams object -// with the ability to set a context for a request. -func NewUpdateAppParamsWithContext(ctx context.Context) *UpdateAppParams { - return &UpdateAppParams{ - Context: ctx, - } -} - -// NewUpdateAppParamsWithHTTPClient creates a new UpdateAppParams object -// with the ability to set a custom HTTPClient for a request. -func NewUpdateAppParamsWithHTTPClient(client *http.Client) *UpdateAppParams { - return &UpdateAppParams{ - HTTPClient: client, - } -} - -/* -UpdateAppParams contains all the parameters to send to the API endpoint - - for the update app operation. - - Typically these are written to a http.Request. -*/ -type UpdateAppParams struct { - - /* AppID. - - app ID - */ - AppID string - - /* Req. - - Input - */ - Req *models.ServiceUpdateAppRequest - - timeout time.Duration - Context context.Context - HTTPClient *http.Client -} - -// WithDefaults hydrates default values in the update app params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *UpdateAppParams) WithDefaults() *UpdateAppParams { - o.SetDefaults() - return o -} - -// SetDefaults hydrates default values in the update app params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *UpdateAppParams) SetDefaults() { - // no default values defined for this parameter -} - -// WithTimeout adds the timeout to the update app params -func (o *UpdateAppParams) WithTimeout(timeout time.Duration) *UpdateAppParams { - o.SetTimeout(timeout) - return o -} - -// SetTimeout adds the timeout to the update app params -func (o *UpdateAppParams) SetTimeout(timeout time.Duration) { - o.timeout = timeout -} - -// WithContext adds the context to the update app params -func (o *UpdateAppParams) WithContext(ctx context.Context) *UpdateAppParams { - o.SetContext(ctx) - return o -} - -// SetContext adds the context to the update app params -func (o *UpdateAppParams) SetContext(ctx context.Context) { - o.Context = ctx -} - -// WithHTTPClient adds the HTTPClient to the update app params -func (o *UpdateAppParams) WithHTTPClient(client *http.Client) *UpdateAppParams { - o.SetHTTPClient(client) - return o -} - -// SetHTTPClient adds the HTTPClient to the update app params -func (o *UpdateAppParams) SetHTTPClient(client *http.Client) { - o.HTTPClient = client -} - -// WithAppID adds the appID to the update app params -func (o *UpdateAppParams) WithAppID(appID string) *UpdateAppParams { - o.SetAppID(appID) - return o -} - -// SetAppID adds the appId to the update app params -func (o *UpdateAppParams) SetAppID(appID string) { - o.AppID = appID -} - -// WithReq adds the req to the update app params -func (o *UpdateAppParams) WithReq(req *models.ServiceUpdateAppRequest) *UpdateAppParams { - o.SetReq(req) - return o -} - -// SetReq adds the req to the update app params -func (o *UpdateAppParams) SetReq(req *models.ServiceUpdateAppRequest) { - o.Req = req -} - -// WriteToRequest writes these params to a swagger request -func (o *UpdateAppParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { - - if err := r.SetTimeout(o.timeout); err != nil { - return err - } - var res []error - - // path param app_id - if err := r.SetPathParam("app_id", o.AppID); err != nil { - return err - } - if o.Req != nil { - if err := r.SetBodyParam(o.Req); err != nil { - return err - } - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} diff --git a/client/operations/update_app_responses.go b/client/operations/update_app_responses.go deleted file mode 100644 index f54a463..0000000 --- a/client/operations/update_app_responses.go +++ /dev/null @@ -1,486 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package operations - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "encoding/json" - "fmt" - "io" - - "github.com/go-openapi/runtime" - "github.com/go-openapi/strfmt" - - "github.com/nuonco/nuon-go/models" -) - -// UpdateAppReader is a Reader for the UpdateApp structure. -type UpdateAppReader struct { - formats strfmt.Registry -} - -// ReadResponse reads a server response into the received o. -func (o *UpdateAppReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { - switch response.Code() { - case 200: - result := NewUpdateAppOK() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return result, nil - case 400: - result := NewUpdateAppBadRequest() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return nil, result - case 401: - result := NewUpdateAppUnauthorized() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return nil, result - case 403: - result := NewUpdateAppForbidden() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return nil, result - case 404: - result := NewUpdateAppNotFound() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return nil, result - case 500: - result := NewUpdateAppInternalServerError() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return nil, result - default: - return nil, runtime.NewAPIError("[PATCH /v1/apps/{app_id}] UpdateApp", response, response.Code()) - } -} - -// NewUpdateAppOK creates a UpdateAppOK with default headers values -func NewUpdateAppOK() *UpdateAppOK { - return &UpdateAppOK{} -} - -/* -UpdateAppOK describes a response with status code 200, with default header values. - -OK -*/ -type UpdateAppOK struct { - Payload *models.AppApp -} - -// IsSuccess returns true when this update app o k response has a 2xx status code -func (o *UpdateAppOK) IsSuccess() bool { - return true -} - -// IsRedirect returns true when this update app o k response has a 3xx status code -func (o *UpdateAppOK) IsRedirect() bool { - return false -} - -// IsClientError returns true when this update app o k response has a 4xx status code -func (o *UpdateAppOK) IsClientError() bool { - return false -} - -// IsServerError returns true when this update app o k response has a 5xx status code -func (o *UpdateAppOK) IsServerError() bool { - return false -} - -// IsCode returns true when this update app o k response a status code equal to that given -func (o *UpdateAppOK) IsCode(code int) bool { - return code == 200 -} - -// Code gets the status code for the update app o k response -func (o *UpdateAppOK) Code() int { - return 200 -} - -func (o *UpdateAppOK) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[PATCH /v1/apps/{app_id}][%d] updateAppOK %s", 200, payload) -} - -func (o *UpdateAppOK) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[PATCH /v1/apps/{app_id}][%d] updateAppOK %s", 200, payload) -} - -func (o *UpdateAppOK) GetPayload() *models.AppApp { - return o.Payload -} - -func (o *UpdateAppOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.AppApp) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewUpdateAppBadRequest creates a UpdateAppBadRequest with default headers values -func NewUpdateAppBadRequest() *UpdateAppBadRequest { - return &UpdateAppBadRequest{} -} - -/* -UpdateAppBadRequest describes a response with status code 400, with default header values. - -Bad Request -*/ -type UpdateAppBadRequest struct { - Payload *models.StderrErrResponse -} - -// IsSuccess returns true when this update app bad request response has a 2xx status code -func (o *UpdateAppBadRequest) IsSuccess() bool { - return false -} - -// IsRedirect returns true when this update app bad request response has a 3xx status code -func (o *UpdateAppBadRequest) IsRedirect() bool { - return false -} - -// IsClientError returns true when this update app bad request response has a 4xx status code -func (o *UpdateAppBadRequest) IsClientError() bool { - return true -} - -// IsServerError returns true when this update app bad request response has a 5xx status code -func (o *UpdateAppBadRequest) IsServerError() bool { - return false -} - -// IsCode returns true when this update app bad request response a status code equal to that given -func (o *UpdateAppBadRequest) IsCode(code int) bool { - return code == 400 -} - -// Code gets the status code for the update app bad request response -func (o *UpdateAppBadRequest) Code() int { - return 400 -} - -func (o *UpdateAppBadRequest) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[PATCH /v1/apps/{app_id}][%d] updateAppBadRequest %s", 400, payload) -} - -func (o *UpdateAppBadRequest) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[PATCH /v1/apps/{app_id}][%d] updateAppBadRequest %s", 400, payload) -} - -func (o *UpdateAppBadRequest) GetPayload() *models.StderrErrResponse { - return o.Payload -} - -func (o *UpdateAppBadRequest) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.StderrErrResponse) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewUpdateAppUnauthorized creates a UpdateAppUnauthorized with default headers values -func NewUpdateAppUnauthorized() *UpdateAppUnauthorized { - return &UpdateAppUnauthorized{} -} - -/* -UpdateAppUnauthorized describes a response with status code 401, with default header values. - -Unauthorized -*/ -type UpdateAppUnauthorized struct { - Payload *models.StderrErrResponse -} - -// IsSuccess returns true when this update app unauthorized response has a 2xx status code -func (o *UpdateAppUnauthorized) IsSuccess() bool { - return false -} - -// IsRedirect returns true when this update app unauthorized response has a 3xx status code -func (o *UpdateAppUnauthorized) IsRedirect() bool { - return false -} - -// IsClientError returns true when this update app unauthorized response has a 4xx status code -func (o *UpdateAppUnauthorized) IsClientError() bool { - return true -} - -// IsServerError returns true when this update app unauthorized response has a 5xx status code -func (o *UpdateAppUnauthorized) IsServerError() bool { - return false -} - -// IsCode returns true when this update app unauthorized response a status code equal to that given -func (o *UpdateAppUnauthorized) IsCode(code int) bool { - return code == 401 -} - -// Code gets the status code for the update app unauthorized response -func (o *UpdateAppUnauthorized) Code() int { - return 401 -} - -func (o *UpdateAppUnauthorized) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[PATCH /v1/apps/{app_id}][%d] updateAppUnauthorized %s", 401, payload) -} - -func (o *UpdateAppUnauthorized) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[PATCH /v1/apps/{app_id}][%d] updateAppUnauthorized %s", 401, payload) -} - -func (o *UpdateAppUnauthorized) GetPayload() *models.StderrErrResponse { - return o.Payload -} - -func (o *UpdateAppUnauthorized) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.StderrErrResponse) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewUpdateAppForbidden creates a UpdateAppForbidden with default headers values -func NewUpdateAppForbidden() *UpdateAppForbidden { - return &UpdateAppForbidden{} -} - -/* -UpdateAppForbidden describes a response with status code 403, with default header values. - -Forbidden -*/ -type UpdateAppForbidden struct { - Payload *models.StderrErrResponse -} - -// IsSuccess returns true when this update app forbidden response has a 2xx status code -func (o *UpdateAppForbidden) IsSuccess() bool { - return false -} - -// IsRedirect returns true when this update app forbidden response has a 3xx status code -func (o *UpdateAppForbidden) IsRedirect() bool { - return false -} - -// IsClientError returns true when this update app forbidden response has a 4xx status code -func (o *UpdateAppForbidden) IsClientError() bool { - return true -} - -// IsServerError returns true when this update app forbidden response has a 5xx status code -func (o *UpdateAppForbidden) IsServerError() bool { - return false -} - -// IsCode returns true when this update app forbidden response a status code equal to that given -func (o *UpdateAppForbidden) IsCode(code int) bool { - return code == 403 -} - -// Code gets the status code for the update app forbidden response -func (o *UpdateAppForbidden) Code() int { - return 403 -} - -func (o *UpdateAppForbidden) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[PATCH /v1/apps/{app_id}][%d] updateAppForbidden %s", 403, payload) -} - -func (o *UpdateAppForbidden) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[PATCH /v1/apps/{app_id}][%d] updateAppForbidden %s", 403, payload) -} - -func (o *UpdateAppForbidden) GetPayload() *models.StderrErrResponse { - return o.Payload -} - -func (o *UpdateAppForbidden) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.StderrErrResponse) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewUpdateAppNotFound creates a UpdateAppNotFound with default headers values -func NewUpdateAppNotFound() *UpdateAppNotFound { - return &UpdateAppNotFound{} -} - -/* -UpdateAppNotFound describes a response with status code 404, with default header values. - -Not Found -*/ -type UpdateAppNotFound struct { - Payload *models.StderrErrResponse -} - -// IsSuccess returns true when this update app not found response has a 2xx status code -func (o *UpdateAppNotFound) IsSuccess() bool { - return false -} - -// IsRedirect returns true when this update app not found response has a 3xx status code -func (o *UpdateAppNotFound) IsRedirect() bool { - return false -} - -// IsClientError returns true when this update app not found response has a 4xx status code -func (o *UpdateAppNotFound) IsClientError() bool { - return true -} - -// IsServerError returns true when this update app not found response has a 5xx status code -func (o *UpdateAppNotFound) IsServerError() bool { - return false -} - -// IsCode returns true when this update app not found response a status code equal to that given -func (o *UpdateAppNotFound) IsCode(code int) bool { - return code == 404 -} - -// Code gets the status code for the update app not found response -func (o *UpdateAppNotFound) Code() int { - return 404 -} - -func (o *UpdateAppNotFound) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[PATCH /v1/apps/{app_id}][%d] updateAppNotFound %s", 404, payload) -} - -func (o *UpdateAppNotFound) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[PATCH /v1/apps/{app_id}][%d] updateAppNotFound %s", 404, payload) -} - -func (o *UpdateAppNotFound) GetPayload() *models.StderrErrResponse { - return o.Payload -} - -func (o *UpdateAppNotFound) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.StderrErrResponse) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewUpdateAppInternalServerError creates a UpdateAppInternalServerError with default headers values -func NewUpdateAppInternalServerError() *UpdateAppInternalServerError { - return &UpdateAppInternalServerError{} -} - -/* -UpdateAppInternalServerError describes a response with status code 500, with default header values. - -Internal Server Error -*/ -type UpdateAppInternalServerError struct { - Payload *models.StderrErrResponse -} - -// IsSuccess returns true when this update app internal server error response has a 2xx status code -func (o *UpdateAppInternalServerError) IsSuccess() bool { - return false -} - -// IsRedirect returns true when this update app internal server error response has a 3xx status code -func (o *UpdateAppInternalServerError) IsRedirect() bool { - return false -} - -// IsClientError returns true when this update app internal server error response has a 4xx status code -func (o *UpdateAppInternalServerError) IsClientError() bool { - return false -} - -// IsServerError returns true when this update app internal server error response has a 5xx status code -func (o *UpdateAppInternalServerError) IsServerError() bool { - return true -} - -// IsCode returns true when this update app internal server error response a status code equal to that given -func (o *UpdateAppInternalServerError) IsCode(code int) bool { - return code == 500 -} - -// Code gets the status code for the update app internal server error response -func (o *UpdateAppInternalServerError) Code() int { - return 500 -} - -func (o *UpdateAppInternalServerError) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[PATCH /v1/apps/{app_id}][%d] updateAppInternalServerError %s", 500, payload) -} - -func (o *UpdateAppInternalServerError) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[PATCH /v1/apps/{app_id}][%d] updateAppInternalServerError %s", 500, payload) -} - -func (o *UpdateAppInternalServerError) GetPayload() *models.StderrErrResponse { - return o.Payload -} - -func (o *UpdateAppInternalServerError) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.StderrErrResponse) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} diff --git a/client/operations/update_component_parameters.go b/client/operations/update_component_parameters.go deleted file mode 100644 index f743683..0000000 --- a/client/operations/update_component_parameters.go +++ /dev/null @@ -1,175 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package operations - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "context" - "net/http" - "time" - - "github.com/go-openapi/errors" - "github.com/go-openapi/runtime" - cr "github.com/go-openapi/runtime/client" - "github.com/go-openapi/strfmt" - - "github.com/nuonco/nuon-go/models" -) - -// NewUpdateComponentParams creates a new UpdateComponentParams object, -// with the default timeout for this client. -// -// Default values are not hydrated, since defaults are normally applied by the API server side. -// -// To enforce default values in parameter, use SetDefaults or WithDefaults. -func NewUpdateComponentParams() *UpdateComponentParams { - return &UpdateComponentParams{ - timeout: cr.DefaultTimeout, - } -} - -// NewUpdateComponentParamsWithTimeout creates a new UpdateComponentParams object -// with the ability to set a timeout on a request. -func NewUpdateComponentParamsWithTimeout(timeout time.Duration) *UpdateComponentParams { - return &UpdateComponentParams{ - timeout: timeout, - } -} - -// NewUpdateComponentParamsWithContext creates a new UpdateComponentParams object -// with the ability to set a context for a request. -func NewUpdateComponentParamsWithContext(ctx context.Context) *UpdateComponentParams { - return &UpdateComponentParams{ - Context: ctx, - } -} - -// NewUpdateComponentParamsWithHTTPClient creates a new UpdateComponentParams object -// with the ability to set a custom HTTPClient for a request. -func NewUpdateComponentParamsWithHTTPClient(client *http.Client) *UpdateComponentParams { - return &UpdateComponentParams{ - HTTPClient: client, - } -} - -/* -UpdateComponentParams contains all the parameters to send to the API endpoint - - for the update component operation. - - Typically these are written to a http.Request. -*/ -type UpdateComponentParams struct { - - /* ComponentID. - - component ID - */ - ComponentID string - - /* Req. - - Input - */ - Req *models.ServiceUpdateComponentRequest - - timeout time.Duration - Context context.Context - HTTPClient *http.Client -} - -// WithDefaults hydrates default values in the update component params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *UpdateComponentParams) WithDefaults() *UpdateComponentParams { - o.SetDefaults() - return o -} - -// SetDefaults hydrates default values in the update component params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *UpdateComponentParams) SetDefaults() { - // no default values defined for this parameter -} - -// WithTimeout adds the timeout to the update component params -func (o *UpdateComponentParams) WithTimeout(timeout time.Duration) *UpdateComponentParams { - o.SetTimeout(timeout) - return o -} - -// SetTimeout adds the timeout to the update component params -func (o *UpdateComponentParams) SetTimeout(timeout time.Duration) { - o.timeout = timeout -} - -// WithContext adds the context to the update component params -func (o *UpdateComponentParams) WithContext(ctx context.Context) *UpdateComponentParams { - o.SetContext(ctx) - return o -} - -// SetContext adds the context to the update component params -func (o *UpdateComponentParams) SetContext(ctx context.Context) { - o.Context = ctx -} - -// WithHTTPClient adds the HTTPClient to the update component params -func (o *UpdateComponentParams) WithHTTPClient(client *http.Client) *UpdateComponentParams { - o.SetHTTPClient(client) - return o -} - -// SetHTTPClient adds the HTTPClient to the update component params -func (o *UpdateComponentParams) SetHTTPClient(client *http.Client) { - o.HTTPClient = client -} - -// WithComponentID adds the componentID to the update component params -func (o *UpdateComponentParams) WithComponentID(componentID string) *UpdateComponentParams { - o.SetComponentID(componentID) - return o -} - -// SetComponentID adds the componentId to the update component params -func (o *UpdateComponentParams) SetComponentID(componentID string) { - o.ComponentID = componentID -} - -// WithReq adds the req to the update component params -func (o *UpdateComponentParams) WithReq(req *models.ServiceUpdateComponentRequest) *UpdateComponentParams { - o.SetReq(req) - return o -} - -// SetReq adds the req to the update component params -func (o *UpdateComponentParams) SetReq(req *models.ServiceUpdateComponentRequest) { - o.Req = req -} - -// WriteToRequest writes these params to a swagger request -func (o *UpdateComponentParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { - - if err := r.SetTimeout(o.timeout); err != nil { - return err - } - var res []error - - // path param component_id - if err := r.SetPathParam("component_id", o.ComponentID); err != nil { - return err - } - if o.Req != nil { - if err := r.SetBodyParam(o.Req); err != nil { - return err - } - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} diff --git a/client/operations/update_component_responses.go b/client/operations/update_component_responses.go deleted file mode 100644 index 925fa3b..0000000 --- a/client/operations/update_component_responses.go +++ /dev/null @@ -1,486 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package operations - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "encoding/json" - "fmt" - "io" - - "github.com/go-openapi/runtime" - "github.com/go-openapi/strfmt" - - "github.com/nuonco/nuon-go/models" -) - -// UpdateComponentReader is a Reader for the UpdateComponent structure. -type UpdateComponentReader struct { - formats strfmt.Registry -} - -// ReadResponse reads a server response into the received o. -func (o *UpdateComponentReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { - switch response.Code() { - case 200: - result := NewUpdateComponentOK() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return result, nil - case 400: - result := NewUpdateComponentBadRequest() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return nil, result - case 401: - result := NewUpdateComponentUnauthorized() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return nil, result - case 403: - result := NewUpdateComponentForbidden() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return nil, result - case 404: - result := NewUpdateComponentNotFound() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return nil, result - case 500: - result := NewUpdateComponentInternalServerError() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return nil, result - default: - return nil, runtime.NewAPIError("[PATCH /v1/components/{component_id}] UpdateComponent", response, response.Code()) - } -} - -// NewUpdateComponentOK creates a UpdateComponentOK with default headers values -func NewUpdateComponentOK() *UpdateComponentOK { - return &UpdateComponentOK{} -} - -/* -UpdateComponentOK describes a response with status code 200, with default header values. - -OK -*/ -type UpdateComponentOK struct { - Payload *models.AppComponent -} - -// IsSuccess returns true when this update component o k response has a 2xx status code -func (o *UpdateComponentOK) IsSuccess() bool { - return true -} - -// IsRedirect returns true when this update component o k response has a 3xx status code -func (o *UpdateComponentOK) IsRedirect() bool { - return false -} - -// IsClientError returns true when this update component o k response has a 4xx status code -func (o *UpdateComponentOK) IsClientError() bool { - return false -} - -// IsServerError returns true when this update component o k response has a 5xx status code -func (o *UpdateComponentOK) IsServerError() bool { - return false -} - -// IsCode returns true when this update component o k response a status code equal to that given -func (o *UpdateComponentOK) IsCode(code int) bool { - return code == 200 -} - -// Code gets the status code for the update component o k response -func (o *UpdateComponentOK) Code() int { - return 200 -} - -func (o *UpdateComponentOK) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[PATCH /v1/components/{component_id}][%d] updateComponentOK %s", 200, payload) -} - -func (o *UpdateComponentOK) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[PATCH /v1/components/{component_id}][%d] updateComponentOK %s", 200, payload) -} - -func (o *UpdateComponentOK) GetPayload() *models.AppComponent { - return o.Payload -} - -func (o *UpdateComponentOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.AppComponent) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewUpdateComponentBadRequest creates a UpdateComponentBadRequest with default headers values -func NewUpdateComponentBadRequest() *UpdateComponentBadRequest { - return &UpdateComponentBadRequest{} -} - -/* -UpdateComponentBadRequest describes a response with status code 400, with default header values. - -Bad Request -*/ -type UpdateComponentBadRequest struct { - Payload *models.StderrErrResponse -} - -// IsSuccess returns true when this update component bad request response has a 2xx status code -func (o *UpdateComponentBadRequest) IsSuccess() bool { - return false -} - -// IsRedirect returns true when this update component bad request response has a 3xx status code -func (o *UpdateComponentBadRequest) IsRedirect() bool { - return false -} - -// IsClientError returns true when this update component bad request response has a 4xx status code -func (o *UpdateComponentBadRequest) IsClientError() bool { - return true -} - -// IsServerError returns true when this update component bad request response has a 5xx status code -func (o *UpdateComponentBadRequest) IsServerError() bool { - return false -} - -// IsCode returns true when this update component bad request response a status code equal to that given -func (o *UpdateComponentBadRequest) IsCode(code int) bool { - return code == 400 -} - -// Code gets the status code for the update component bad request response -func (o *UpdateComponentBadRequest) Code() int { - return 400 -} - -func (o *UpdateComponentBadRequest) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[PATCH /v1/components/{component_id}][%d] updateComponentBadRequest %s", 400, payload) -} - -func (o *UpdateComponentBadRequest) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[PATCH /v1/components/{component_id}][%d] updateComponentBadRequest %s", 400, payload) -} - -func (o *UpdateComponentBadRequest) GetPayload() *models.StderrErrResponse { - return o.Payload -} - -func (o *UpdateComponentBadRequest) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.StderrErrResponse) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewUpdateComponentUnauthorized creates a UpdateComponentUnauthorized with default headers values -func NewUpdateComponentUnauthorized() *UpdateComponentUnauthorized { - return &UpdateComponentUnauthorized{} -} - -/* -UpdateComponentUnauthorized describes a response with status code 401, with default header values. - -Unauthorized -*/ -type UpdateComponentUnauthorized struct { - Payload *models.StderrErrResponse -} - -// IsSuccess returns true when this update component unauthorized response has a 2xx status code -func (o *UpdateComponentUnauthorized) IsSuccess() bool { - return false -} - -// IsRedirect returns true when this update component unauthorized response has a 3xx status code -func (o *UpdateComponentUnauthorized) IsRedirect() bool { - return false -} - -// IsClientError returns true when this update component unauthorized response has a 4xx status code -func (o *UpdateComponentUnauthorized) IsClientError() bool { - return true -} - -// IsServerError returns true when this update component unauthorized response has a 5xx status code -func (o *UpdateComponentUnauthorized) IsServerError() bool { - return false -} - -// IsCode returns true when this update component unauthorized response a status code equal to that given -func (o *UpdateComponentUnauthorized) IsCode(code int) bool { - return code == 401 -} - -// Code gets the status code for the update component unauthorized response -func (o *UpdateComponentUnauthorized) Code() int { - return 401 -} - -func (o *UpdateComponentUnauthorized) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[PATCH /v1/components/{component_id}][%d] updateComponentUnauthorized %s", 401, payload) -} - -func (o *UpdateComponentUnauthorized) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[PATCH /v1/components/{component_id}][%d] updateComponentUnauthorized %s", 401, payload) -} - -func (o *UpdateComponentUnauthorized) GetPayload() *models.StderrErrResponse { - return o.Payload -} - -func (o *UpdateComponentUnauthorized) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.StderrErrResponse) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewUpdateComponentForbidden creates a UpdateComponentForbidden with default headers values -func NewUpdateComponentForbidden() *UpdateComponentForbidden { - return &UpdateComponentForbidden{} -} - -/* -UpdateComponentForbidden describes a response with status code 403, with default header values. - -Forbidden -*/ -type UpdateComponentForbidden struct { - Payload *models.StderrErrResponse -} - -// IsSuccess returns true when this update component forbidden response has a 2xx status code -func (o *UpdateComponentForbidden) IsSuccess() bool { - return false -} - -// IsRedirect returns true when this update component forbidden response has a 3xx status code -func (o *UpdateComponentForbidden) IsRedirect() bool { - return false -} - -// IsClientError returns true when this update component forbidden response has a 4xx status code -func (o *UpdateComponentForbidden) IsClientError() bool { - return true -} - -// IsServerError returns true when this update component forbidden response has a 5xx status code -func (o *UpdateComponentForbidden) IsServerError() bool { - return false -} - -// IsCode returns true when this update component forbidden response a status code equal to that given -func (o *UpdateComponentForbidden) IsCode(code int) bool { - return code == 403 -} - -// Code gets the status code for the update component forbidden response -func (o *UpdateComponentForbidden) Code() int { - return 403 -} - -func (o *UpdateComponentForbidden) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[PATCH /v1/components/{component_id}][%d] updateComponentForbidden %s", 403, payload) -} - -func (o *UpdateComponentForbidden) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[PATCH /v1/components/{component_id}][%d] updateComponentForbidden %s", 403, payload) -} - -func (o *UpdateComponentForbidden) GetPayload() *models.StderrErrResponse { - return o.Payload -} - -func (o *UpdateComponentForbidden) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.StderrErrResponse) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewUpdateComponentNotFound creates a UpdateComponentNotFound with default headers values -func NewUpdateComponentNotFound() *UpdateComponentNotFound { - return &UpdateComponentNotFound{} -} - -/* -UpdateComponentNotFound describes a response with status code 404, with default header values. - -Not Found -*/ -type UpdateComponentNotFound struct { - Payload *models.StderrErrResponse -} - -// IsSuccess returns true when this update component not found response has a 2xx status code -func (o *UpdateComponentNotFound) IsSuccess() bool { - return false -} - -// IsRedirect returns true when this update component not found response has a 3xx status code -func (o *UpdateComponentNotFound) IsRedirect() bool { - return false -} - -// IsClientError returns true when this update component not found response has a 4xx status code -func (o *UpdateComponentNotFound) IsClientError() bool { - return true -} - -// IsServerError returns true when this update component not found response has a 5xx status code -func (o *UpdateComponentNotFound) IsServerError() bool { - return false -} - -// IsCode returns true when this update component not found response a status code equal to that given -func (o *UpdateComponentNotFound) IsCode(code int) bool { - return code == 404 -} - -// Code gets the status code for the update component not found response -func (o *UpdateComponentNotFound) Code() int { - return 404 -} - -func (o *UpdateComponentNotFound) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[PATCH /v1/components/{component_id}][%d] updateComponentNotFound %s", 404, payload) -} - -func (o *UpdateComponentNotFound) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[PATCH /v1/components/{component_id}][%d] updateComponentNotFound %s", 404, payload) -} - -func (o *UpdateComponentNotFound) GetPayload() *models.StderrErrResponse { - return o.Payload -} - -func (o *UpdateComponentNotFound) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.StderrErrResponse) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewUpdateComponentInternalServerError creates a UpdateComponentInternalServerError with default headers values -func NewUpdateComponentInternalServerError() *UpdateComponentInternalServerError { - return &UpdateComponentInternalServerError{} -} - -/* -UpdateComponentInternalServerError describes a response with status code 500, with default header values. - -Internal Server Error -*/ -type UpdateComponentInternalServerError struct { - Payload *models.StderrErrResponse -} - -// IsSuccess returns true when this update component internal server error response has a 2xx status code -func (o *UpdateComponentInternalServerError) IsSuccess() bool { - return false -} - -// IsRedirect returns true when this update component internal server error response has a 3xx status code -func (o *UpdateComponentInternalServerError) IsRedirect() bool { - return false -} - -// IsClientError returns true when this update component internal server error response has a 4xx status code -func (o *UpdateComponentInternalServerError) IsClientError() bool { - return false -} - -// IsServerError returns true when this update component internal server error response has a 5xx status code -func (o *UpdateComponentInternalServerError) IsServerError() bool { - return true -} - -// IsCode returns true when this update component internal server error response a status code equal to that given -func (o *UpdateComponentInternalServerError) IsCode(code int) bool { - return code == 500 -} - -// Code gets the status code for the update component internal server error response -func (o *UpdateComponentInternalServerError) Code() int { - return 500 -} - -func (o *UpdateComponentInternalServerError) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[PATCH /v1/components/{component_id}][%d] updateComponentInternalServerError %s", 500, payload) -} - -func (o *UpdateComponentInternalServerError) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[PATCH /v1/components/{component_id}][%d] updateComponentInternalServerError %s", 500, payload) -} - -func (o *UpdateComponentInternalServerError) GetPayload() *models.StderrErrResponse { - return o.Payload -} - -func (o *UpdateComponentInternalServerError) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.StderrErrResponse) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} diff --git a/client/operations/update_install_parameters.go b/client/operations/update_install_parameters.go deleted file mode 100644 index 0af74b5..0000000 --- a/client/operations/update_install_parameters.go +++ /dev/null @@ -1,175 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package operations - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "context" - "net/http" - "time" - - "github.com/go-openapi/errors" - "github.com/go-openapi/runtime" - cr "github.com/go-openapi/runtime/client" - "github.com/go-openapi/strfmt" - - "github.com/nuonco/nuon-go/models" -) - -// NewUpdateInstallParams creates a new UpdateInstallParams object, -// with the default timeout for this client. -// -// Default values are not hydrated, since defaults are normally applied by the API server side. -// -// To enforce default values in parameter, use SetDefaults or WithDefaults. -func NewUpdateInstallParams() *UpdateInstallParams { - return &UpdateInstallParams{ - timeout: cr.DefaultTimeout, - } -} - -// NewUpdateInstallParamsWithTimeout creates a new UpdateInstallParams object -// with the ability to set a timeout on a request. -func NewUpdateInstallParamsWithTimeout(timeout time.Duration) *UpdateInstallParams { - return &UpdateInstallParams{ - timeout: timeout, - } -} - -// NewUpdateInstallParamsWithContext creates a new UpdateInstallParams object -// with the ability to set a context for a request. -func NewUpdateInstallParamsWithContext(ctx context.Context) *UpdateInstallParams { - return &UpdateInstallParams{ - Context: ctx, - } -} - -// NewUpdateInstallParamsWithHTTPClient creates a new UpdateInstallParams object -// with the ability to set a custom HTTPClient for a request. -func NewUpdateInstallParamsWithHTTPClient(client *http.Client) *UpdateInstallParams { - return &UpdateInstallParams{ - HTTPClient: client, - } -} - -/* -UpdateInstallParams contains all the parameters to send to the API endpoint - - for the update install operation. - - Typically these are written to a http.Request. -*/ -type UpdateInstallParams struct { - - /* InstallID. - - app ID - */ - InstallID string - - /* Req. - - Input - */ - Req *models.ServiceUpdateInstallRequest - - timeout time.Duration - Context context.Context - HTTPClient *http.Client -} - -// WithDefaults hydrates default values in the update install params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *UpdateInstallParams) WithDefaults() *UpdateInstallParams { - o.SetDefaults() - return o -} - -// SetDefaults hydrates default values in the update install params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *UpdateInstallParams) SetDefaults() { - // no default values defined for this parameter -} - -// WithTimeout adds the timeout to the update install params -func (o *UpdateInstallParams) WithTimeout(timeout time.Duration) *UpdateInstallParams { - o.SetTimeout(timeout) - return o -} - -// SetTimeout adds the timeout to the update install params -func (o *UpdateInstallParams) SetTimeout(timeout time.Duration) { - o.timeout = timeout -} - -// WithContext adds the context to the update install params -func (o *UpdateInstallParams) WithContext(ctx context.Context) *UpdateInstallParams { - o.SetContext(ctx) - return o -} - -// SetContext adds the context to the update install params -func (o *UpdateInstallParams) SetContext(ctx context.Context) { - o.Context = ctx -} - -// WithHTTPClient adds the HTTPClient to the update install params -func (o *UpdateInstallParams) WithHTTPClient(client *http.Client) *UpdateInstallParams { - o.SetHTTPClient(client) - return o -} - -// SetHTTPClient adds the HTTPClient to the update install params -func (o *UpdateInstallParams) SetHTTPClient(client *http.Client) { - o.HTTPClient = client -} - -// WithInstallID adds the installID to the update install params -func (o *UpdateInstallParams) WithInstallID(installID string) *UpdateInstallParams { - o.SetInstallID(installID) - return o -} - -// SetInstallID adds the installId to the update install params -func (o *UpdateInstallParams) SetInstallID(installID string) { - o.InstallID = installID -} - -// WithReq adds the req to the update install params -func (o *UpdateInstallParams) WithReq(req *models.ServiceUpdateInstallRequest) *UpdateInstallParams { - o.SetReq(req) - return o -} - -// SetReq adds the req to the update install params -func (o *UpdateInstallParams) SetReq(req *models.ServiceUpdateInstallRequest) { - o.Req = req -} - -// WriteToRequest writes these params to a swagger request -func (o *UpdateInstallParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { - - if err := r.SetTimeout(o.timeout); err != nil { - return err - } - var res []error - - // path param install_id - if err := r.SetPathParam("install_id", o.InstallID); err != nil { - return err - } - if o.Req != nil { - if err := r.SetBodyParam(o.Req); err != nil { - return err - } - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} diff --git a/client/operations/update_install_responses.go b/client/operations/update_install_responses.go deleted file mode 100644 index dbe268a..0000000 --- a/client/operations/update_install_responses.go +++ /dev/null @@ -1,486 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package operations - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "encoding/json" - "fmt" - "io" - - "github.com/go-openapi/runtime" - "github.com/go-openapi/strfmt" - - "github.com/nuonco/nuon-go/models" -) - -// UpdateInstallReader is a Reader for the UpdateInstall structure. -type UpdateInstallReader struct { - formats strfmt.Registry -} - -// ReadResponse reads a server response into the received o. -func (o *UpdateInstallReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { - switch response.Code() { - case 200: - result := NewUpdateInstallOK() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return result, nil - case 400: - result := NewUpdateInstallBadRequest() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return nil, result - case 401: - result := NewUpdateInstallUnauthorized() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return nil, result - case 403: - result := NewUpdateInstallForbidden() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return nil, result - case 404: - result := NewUpdateInstallNotFound() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return nil, result - case 500: - result := NewUpdateInstallInternalServerError() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return nil, result - default: - return nil, runtime.NewAPIError("[PATCH /v1/installs/{install_id}] UpdateInstall", response, response.Code()) - } -} - -// NewUpdateInstallOK creates a UpdateInstallOK with default headers values -func NewUpdateInstallOK() *UpdateInstallOK { - return &UpdateInstallOK{} -} - -/* -UpdateInstallOK describes a response with status code 200, with default header values. - -OK -*/ -type UpdateInstallOK struct { - Payload *models.AppInstall -} - -// IsSuccess returns true when this update install o k response has a 2xx status code -func (o *UpdateInstallOK) IsSuccess() bool { - return true -} - -// IsRedirect returns true when this update install o k response has a 3xx status code -func (o *UpdateInstallOK) IsRedirect() bool { - return false -} - -// IsClientError returns true when this update install o k response has a 4xx status code -func (o *UpdateInstallOK) IsClientError() bool { - return false -} - -// IsServerError returns true when this update install o k response has a 5xx status code -func (o *UpdateInstallOK) IsServerError() bool { - return false -} - -// IsCode returns true when this update install o k response a status code equal to that given -func (o *UpdateInstallOK) IsCode(code int) bool { - return code == 200 -} - -// Code gets the status code for the update install o k response -func (o *UpdateInstallOK) Code() int { - return 200 -} - -func (o *UpdateInstallOK) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[PATCH /v1/installs/{install_id}][%d] updateInstallOK %s", 200, payload) -} - -func (o *UpdateInstallOK) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[PATCH /v1/installs/{install_id}][%d] updateInstallOK %s", 200, payload) -} - -func (o *UpdateInstallOK) GetPayload() *models.AppInstall { - return o.Payload -} - -func (o *UpdateInstallOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.AppInstall) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewUpdateInstallBadRequest creates a UpdateInstallBadRequest with default headers values -func NewUpdateInstallBadRequest() *UpdateInstallBadRequest { - return &UpdateInstallBadRequest{} -} - -/* -UpdateInstallBadRequest describes a response with status code 400, with default header values. - -Bad Request -*/ -type UpdateInstallBadRequest struct { - Payload *models.StderrErrResponse -} - -// IsSuccess returns true when this update install bad request response has a 2xx status code -func (o *UpdateInstallBadRequest) IsSuccess() bool { - return false -} - -// IsRedirect returns true when this update install bad request response has a 3xx status code -func (o *UpdateInstallBadRequest) IsRedirect() bool { - return false -} - -// IsClientError returns true when this update install bad request response has a 4xx status code -func (o *UpdateInstallBadRequest) IsClientError() bool { - return true -} - -// IsServerError returns true when this update install bad request response has a 5xx status code -func (o *UpdateInstallBadRequest) IsServerError() bool { - return false -} - -// IsCode returns true when this update install bad request response a status code equal to that given -func (o *UpdateInstallBadRequest) IsCode(code int) bool { - return code == 400 -} - -// Code gets the status code for the update install bad request response -func (o *UpdateInstallBadRequest) Code() int { - return 400 -} - -func (o *UpdateInstallBadRequest) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[PATCH /v1/installs/{install_id}][%d] updateInstallBadRequest %s", 400, payload) -} - -func (o *UpdateInstallBadRequest) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[PATCH /v1/installs/{install_id}][%d] updateInstallBadRequest %s", 400, payload) -} - -func (o *UpdateInstallBadRequest) GetPayload() *models.StderrErrResponse { - return o.Payload -} - -func (o *UpdateInstallBadRequest) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.StderrErrResponse) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewUpdateInstallUnauthorized creates a UpdateInstallUnauthorized with default headers values -func NewUpdateInstallUnauthorized() *UpdateInstallUnauthorized { - return &UpdateInstallUnauthorized{} -} - -/* -UpdateInstallUnauthorized describes a response with status code 401, with default header values. - -Unauthorized -*/ -type UpdateInstallUnauthorized struct { - Payload *models.StderrErrResponse -} - -// IsSuccess returns true when this update install unauthorized response has a 2xx status code -func (o *UpdateInstallUnauthorized) IsSuccess() bool { - return false -} - -// IsRedirect returns true when this update install unauthorized response has a 3xx status code -func (o *UpdateInstallUnauthorized) IsRedirect() bool { - return false -} - -// IsClientError returns true when this update install unauthorized response has a 4xx status code -func (o *UpdateInstallUnauthorized) IsClientError() bool { - return true -} - -// IsServerError returns true when this update install unauthorized response has a 5xx status code -func (o *UpdateInstallUnauthorized) IsServerError() bool { - return false -} - -// IsCode returns true when this update install unauthorized response a status code equal to that given -func (o *UpdateInstallUnauthorized) IsCode(code int) bool { - return code == 401 -} - -// Code gets the status code for the update install unauthorized response -func (o *UpdateInstallUnauthorized) Code() int { - return 401 -} - -func (o *UpdateInstallUnauthorized) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[PATCH /v1/installs/{install_id}][%d] updateInstallUnauthorized %s", 401, payload) -} - -func (o *UpdateInstallUnauthorized) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[PATCH /v1/installs/{install_id}][%d] updateInstallUnauthorized %s", 401, payload) -} - -func (o *UpdateInstallUnauthorized) GetPayload() *models.StderrErrResponse { - return o.Payload -} - -func (o *UpdateInstallUnauthorized) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.StderrErrResponse) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewUpdateInstallForbidden creates a UpdateInstallForbidden with default headers values -func NewUpdateInstallForbidden() *UpdateInstallForbidden { - return &UpdateInstallForbidden{} -} - -/* -UpdateInstallForbidden describes a response with status code 403, with default header values. - -Forbidden -*/ -type UpdateInstallForbidden struct { - Payload *models.StderrErrResponse -} - -// IsSuccess returns true when this update install forbidden response has a 2xx status code -func (o *UpdateInstallForbidden) IsSuccess() bool { - return false -} - -// IsRedirect returns true when this update install forbidden response has a 3xx status code -func (o *UpdateInstallForbidden) IsRedirect() bool { - return false -} - -// IsClientError returns true when this update install forbidden response has a 4xx status code -func (o *UpdateInstallForbidden) IsClientError() bool { - return true -} - -// IsServerError returns true when this update install forbidden response has a 5xx status code -func (o *UpdateInstallForbidden) IsServerError() bool { - return false -} - -// IsCode returns true when this update install forbidden response a status code equal to that given -func (o *UpdateInstallForbidden) IsCode(code int) bool { - return code == 403 -} - -// Code gets the status code for the update install forbidden response -func (o *UpdateInstallForbidden) Code() int { - return 403 -} - -func (o *UpdateInstallForbidden) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[PATCH /v1/installs/{install_id}][%d] updateInstallForbidden %s", 403, payload) -} - -func (o *UpdateInstallForbidden) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[PATCH /v1/installs/{install_id}][%d] updateInstallForbidden %s", 403, payload) -} - -func (o *UpdateInstallForbidden) GetPayload() *models.StderrErrResponse { - return o.Payload -} - -func (o *UpdateInstallForbidden) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.StderrErrResponse) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewUpdateInstallNotFound creates a UpdateInstallNotFound with default headers values -func NewUpdateInstallNotFound() *UpdateInstallNotFound { - return &UpdateInstallNotFound{} -} - -/* -UpdateInstallNotFound describes a response with status code 404, with default header values. - -Not Found -*/ -type UpdateInstallNotFound struct { - Payload *models.StderrErrResponse -} - -// IsSuccess returns true when this update install not found response has a 2xx status code -func (o *UpdateInstallNotFound) IsSuccess() bool { - return false -} - -// IsRedirect returns true when this update install not found response has a 3xx status code -func (o *UpdateInstallNotFound) IsRedirect() bool { - return false -} - -// IsClientError returns true when this update install not found response has a 4xx status code -func (o *UpdateInstallNotFound) IsClientError() bool { - return true -} - -// IsServerError returns true when this update install not found response has a 5xx status code -func (o *UpdateInstallNotFound) IsServerError() bool { - return false -} - -// IsCode returns true when this update install not found response a status code equal to that given -func (o *UpdateInstallNotFound) IsCode(code int) bool { - return code == 404 -} - -// Code gets the status code for the update install not found response -func (o *UpdateInstallNotFound) Code() int { - return 404 -} - -func (o *UpdateInstallNotFound) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[PATCH /v1/installs/{install_id}][%d] updateInstallNotFound %s", 404, payload) -} - -func (o *UpdateInstallNotFound) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[PATCH /v1/installs/{install_id}][%d] updateInstallNotFound %s", 404, payload) -} - -func (o *UpdateInstallNotFound) GetPayload() *models.StderrErrResponse { - return o.Payload -} - -func (o *UpdateInstallNotFound) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.StderrErrResponse) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewUpdateInstallInternalServerError creates a UpdateInstallInternalServerError with default headers values -func NewUpdateInstallInternalServerError() *UpdateInstallInternalServerError { - return &UpdateInstallInternalServerError{} -} - -/* -UpdateInstallInternalServerError describes a response with status code 500, with default header values. - -Internal Server Error -*/ -type UpdateInstallInternalServerError struct { - Payload *models.StderrErrResponse -} - -// IsSuccess returns true when this update install internal server error response has a 2xx status code -func (o *UpdateInstallInternalServerError) IsSuccess() bool { - return false -} - -// IsRedirect returns true when this update install internal server error response has a 3xx status code -func (o *UpdateInstallInternalServerError) IsRedirect() bool { - return false -} - -// IsClientError returns true when this update install internal server error response has a 4xx status code -func (o *UpdateInstallInternalServerError) IsClientError() bool { - return false -} - -// IsServerError returns true when this update install internal server error response has a 5xx status code -func (o *UpdateInstallInternalServerError) IsServerError() bool { - return true -} - -// IsCode returns true when this update install internal server error response a status code equal to that given -func (o *UpdateInstallInternalServerError) IsCode(code int) bool { - return code == 500 -} - -// Code gets the status code for the update install internal server error response -func (o *UpdateInstallInternalServerError) Code() int { - return 500 -} - -func (o *UpdateInstallInternalServerError) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[PATCH /v1/installs/{install_id}][%d] updateInstallInternalServerError %s", 500, payload) -} - -func (o *UpdateInstallInternalServerError) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[PATCH /v1/installs/{install_id}][%d] updateInstallInternalServerError %s", 500, payload) -} - -func (o *UpdateInstallInternalServerError) GetPayload() *models.StderrErrResponse { - return o.Payload -} - -func (o *UpdateInstallInternalServerError) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.StderrErrResponse) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} diff --git a/client/operations/update_installer_parameters.go b/client/operations/update_installer_parameters.go deleted file mode 100644 index 1a0b653..0000000 --- a/client/operations/update_installer_parameters.go +++ /dev/null @@ -1,175 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package operations - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "context" - "net/http" - "time" - - "github.com/go-openapi/errors" - "github.com/go-openapi/runtime" - cr "github.com/go-openapi/runtime/client" - "github.com/go-openapi/strfmt" - - "github.com/nuonco/nuon-go/models" -) - -// NewUpdateInstallerParams creates a new UpdateInstallerParams object, -// with the default timeout for this client. -// -// Default values are not hydrated, since defaults are normally applied by the API server side. -// -// To enforce default values in parameter, use SetDefaults or WithDefaults. -func NewUpdateInstallerParams() *UpdateInstallerParams { - return &UpdateInstallerParams{ - timeout: cr.DefaultTimeout, - } -} - -// NewUpdateInstallerParamsWithTimeout creates a new UpdateInstallerParams object -// with the ability to set a timeout on a request. -func NewUpdateInstallerParamsWithTimeout(timeout time.Duration) *UpdateInstallerParams { - return &UpdateInstallerParams{ - timeout: timeout, - } -} - -// NewUpdateInstallerParamsWithContext creates a new UpdateInstallerParams object -// with the ability to set a context for a request. -func NewUpdateInstallerParamsWithContext(ctx context.Context) *UpdateInstallerParams { - return &UpdateInstallerParams{ - Context: ctx, - } -} - -// NewUpdateInstallerParamsWithHTTPClient creates a new UpdateInstallerParams object -// with the ability to set a custom HTTPClient for a request. -func NewUpdateInstallerParamsWithHTTPClient(client *http.Client) *UpdateInstallerParams { - return &UpdateInstallerParams{ - HTTPClient: client, - } -} - -/* -UpdateInstallerParams contains all the parameters to send to the API endpoint - - for the update installer operation. - - Typically these are written to a http.Request. -*/ -type UpdateInstallerParams struct { - - /* InstallerID. - - installer ID - */ - InstallerID string - - /* Req. - - Input - */ - Req *models.ServiceUpdateInstallerRequest - - timeout time.Duration - Context context.Context - HTTPClient *http.Client -} - -// WithDefaults hydrates default values in the update installer params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *UpdateInstallerParams) WithDefaults() *UpdateInstallerParams { - o.SetDefaults() - return o -} - -// SetDefaults hydrates default values in the update installer params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *UpdateInstallerParams) SetDefaults() { - // no default values defined for this parameter -} - -// WithTimeout adds the timeout to the update installer params -func (o *UpdateInstallerParams) WithTimeout(timeout time.Duration) *UpdateInstallerParams { - o.SetTimeout(timeout) - return o -} - -// SetTimeout adds the timeout to the update installer params -func (o *UpdateInstallerParams) SetTimeout(timeout time.Duration) { - o.timeout = timeout -} - -// WithContext adds the context to the update installer params -func (o *UpdateInstallerParams) WithContext(ctx context.Context) *UpdateInstallerParams { - o.SetContext(ctx) - return o -} - -// SetContext adds the context to the update installer params -func (o *UpdateInstallerParams) SetContext(ctx context.Context) { - o.Context = ctx -} - -// WithHTTPClient adds the HTTPClient to the update installer params -func (o *UpdateInstallerParams) WithHTTPClient(client *http.Client) *UpdateInstallerParams { - o.SetHTTPClient(client) - return o -} - -// SetHTTPClient adds the HTTPClient to the update installer params -func (o *UpdateInstallerParams) SetHTTPClient(client *http.Client) { - o.HTTPClient = client -} - -// WithInstallerID adds the installerID to the update installer params -func (o *UpdateInstallerParams) WithInstallerID(installerID string) *UpdateInstallerParams { - o.SetInstallerID(installerID) - return o -} - -// SetInstallerID adds the installerId to the update installer params -func (o *UpdateInstallerParams) SetInstallerID(installerID string) { - o.InstallerID = installerID -} - -// WithReq adds the req to the update installer params -func (o *UpdateInstallerParams) WithReq(req *models.ServiceUpdateInstallerRequest) *UpdateInstallerParams { - o.SetReq(req) - return o -} - -// SetReq adds the req to the update installer params -func (o *UpdateInstallerParams) SetReq(req *models.ServiceUpdateInstallerRequest) { - o.Req = req -} - -// WriteToRequest writes these params to a swagger request -func (o *UpdateInstallerParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { - - if err := r.SetTimeout(o.timeout); err != nil { - return err - } - var res []error - - // path param installer_id - if err := r.SetPathParam("installer_id", o.InstallerID); err != nil { - return err - } - if o.Req != nil { - if err := r.SetBodyParam(o.Req); err != nil { - return err - } - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} diff --git a/client/operations/update_installer_responses.go b/client/operations/update_installer_responses.go deleted file mode 100644 index fb504e6..0000000 --- a/client/operations/update_installer_responses.go +++ /dev/null @@ -1,486 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package operations - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "encoding/json" - "fmt" - "io" - - "github.com/go-openapi/runtime" - "github.com/go-openapi/strfmt" - - "github.com/nuonco/nuon-go/models" -) - -// UpdateInstallerReader is a Reader for the UpdateInstaller structure. -type UpdateInstallerReader struct { - formats strfmt.Registry -} - -// ReadResponse reads a server response into the received o. -func (o *UpdateInstallerReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { - switch response.Code() { - case 201: - result := NewUpdateInstallerCreated() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return result, nil - case 400: - result := NewUpdateInstallerBadRequest() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return nil, result - case 401: - result := NewUpdateInstallerUnauthorized() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return nil, result - case 403: - result := NewUpdateInstallerForbidden() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return nil, result - case 404: - result := NewUpdateInstallerNotFound() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return nil, result - case 500: - result := NewUpdateInstallerInternalServerError() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return nil, result - default: - return nil, runtime.NewAPIError("[PATCH /v1/installers/{installer_id}] UpdateInstaller", response, response.Code()) - } -} - -// NewUpdateInstallerCreated creates a UpdateInstallerCreated with default headers values -func NewUpdateInstallerCreated() *UpdateInstallerCreated { - return &UpdateInstallerCreated{} -} - -/* -UpdateInstallerCreated describes a response with status code 201, with default header values. - -Created -*/ -type UpdateInstallerCreated struct { - Payload *models.AppInstaller -} - -// IsSuccess returns true when this update installer created response has a 2xx status code -func (o *UpdateInstallerCreated) IsSuccess() bool { - return true -} - -// IsRedirect returns true when this update installer created response has a 3xx status code -func (o *UpdateInstallerCreated) IsRedirect() bool { - return false -} - -// IsClientError returns true when this update installer created response has a 4xx status code -func (o *UpdateInstallerCreated) IsClientError() bool { - return false -} - -// IsServerError returns true when this update installer created response has a 5xx status code -func (o *UpdateInstallerCreated) IsServerError() bool { - return false -} - -// IsCode returns true when this update installer created response a status code equal to that given -func (o *UpdateInstallerCreated) IsCode(code int) bool { - return code == 201 -} - -// Code gets the status code for the update installer created response -func (o *UpdateInstallerCreated) Code() int { - return 201 -} - -func (o *UpdateInstallerCreated) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[PATCH /v1/installers/{installer_id}][%d] updateInstallerCreated %s", 201, payload) -} - -func (o *UpdateInstallerCreated) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[PATCH /v1/installers/{installer_id}][%d] updateInstallerCreated %s", 201, payload) -} - -func (o *UpdateInstallerCreated) GetPayload() *models.AppInstaller { - return o.Payload -} - -func (o *UpdateInstallerCreated) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.AppInstaller) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewUpdateInstallerBadRequest creates a UpdateInstallerBadRequest with default headers values -func NewUpdateInstallerBadRequest() *UpdateInstallerBadRequest { - return &UpdateInstallerBadRequest{} -} - -/* -UpdateInstallerBadRequest describes a response with status code 400, with default header values. - -Bad Request -*/ -type UpdateInstallerBadRequest struct { - Payload *models.StderrErrResponse -} - -// IsSuccess returns true when this update installer bad request response has a 2xx status code -func (o *UpdateInstallerBadRequest) IsSuccess() bool { - return false -} - -// IsRedirect returns true when this update installer bad request response has a 3xx status code -func (o *UpdateInstallerBadRequest) IsRedirect() bool { - return false -} - -// IsClientError returns true when this update installer bad request response has a 4xx status code -func (o *UpdateInstallerBadRequest) IsClientError() bool { - return true -} - -// IsServerError returns true when this update installer bad request response has a 5xx status code -func (o *UpdateInstallerBadRequest) IsServerError() bool { - return false -} - -// IsCode returns true when this update installer bad request response a status code equal to that given -func (o *UpdateInstallerBadRequest) IsCode(code int) bool { - return code == 400 -} - -// Code gets the status code for the update installer bad request response -func (o *UpdateInstallerBadRequest) Code() int { - return 400 -} - -func (o *UpdateInstallerBadRequest) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[PATCH /v1/installers/{installer_id}][%d] updateInstallerBadRequest %s", 400, payload) -} - -func (o *UpdateInstallerBadRequest) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[PATCH /v1/installers/{installer_id}][%d] updateInstallerBadRequest %s", 400, payload) -} - -func (o *UpdateInstallerBadRequest) GetPayload() *models.StderrErrResponse { - return o.Payload -} - -func (o *UpdateInstallerBadRequest) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.StderrErrResponse) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewUpdateInstallerUnauthorized creates a UpdateInstallerUnauthorized with default headers values -func NewUpdateInstallerUnauthorized() *UpdateInstallerUnauthorized { - return &UpdateInstallerUnauthorized{} -} - -/* -UpdateInstallerUnauthorized describes a response with status code 401, with default header values. - -Unauthorized -*/ -type UpdateInstallerUnauthorized struct { - Payload *models.StderrErrResponse -} - -// IsSuccess returns true when this update installer unauthorized response has a 2xx status code -func (o *UpdateInstallerUnauthorized) IsSuccess() bool { - return false -} - -// IsRedirect returns true when this update installer unauthorized response has a 3xx status code -func (o *UpdateInstallerUnauthorized) IsRedirect() bool { - return false -} - -// IsClientError returns true when this update installer unauthorized response has a 4xx status code -func (o *UpdateInstallerUnauthorized) IsClientError() bool { - return true -} - -// IsServerError returns true when this update installer unauthorized response has a 5xx status code -func (o *UpdateInstallerUnauthorized) IsServerError() bool { - return false -} - -// IsCode returns true when this update installer unauthorized response a status code equal to that given -func (o *UpdateInstallerUnauthorized) IsCode(code int) bool { - return code == 401 -} - -// Code gets the status code for the update installer unauthorized response -func (o *UpdateInstallerUnauthorized) Code() int { - return 401 -} - -func (o *UpdateInstallerUnauthorized) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[PATCH /v1/installers/{installer_id}][%d] updateInstallerUnauthorized %s", 401, payload) -} - -func (o *UpdateInstallerUnauthorized) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[PATCH /v1/installers/{installer_id}][%d] updateInstallerUnauthorized %s", 401, payload) -} - -func (o *UpdateInstallerUnauthorized) GetPayload() *models.StderrErrResponse { - return o.Payload -} - -func (o *UpdateInstallerUnauthorized) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.StderrErrResponse) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewUpdateInstallerForbidden creates a UpdateInstallerForbidden with default headers values -func NewUpdateInstallerForbidden() *UpdateInstallerForbidden { - return &UpdateInstallerForbidden{} -} - -/* -UpdateInstallerForbidden describes a response with status code 403, with default header values. - -Forbidden -*/ -type UpdateInstallerForbidden struct { - Payload *models.StderrErrResponse -} - -// IsSuccess returns true when this update installer forbidden response has a 2xx status code -func (o *UpdateInstallerForbidden) IsSuccess() bool { - return false -} - -// IsRedirect returns true when this update installer forbidden response has a 3xx status code -func (o *UpdateInstallerForbidden) IsRedirect() bool { - return false -} - -// IsClientError returns true when this update installer forbidden response has a 4xx status code -func (o *UpdateInstallerForbidden) IsClientError() bool { - return true -} - -// IsServerError returns true when this update installer forbidden response has a 5xx status code -func (o *UpdateInstallerForbidden) IsServerError() bool { - return false -} - -// IsCode returns true when this update installer forbidden response a status code equal to that given -func (o *UpdateInstallerForbidden) IsCode(code int) bool { - return code == 403 -} - -// Code gets the status code for the update installer forbidden response -func (o *UpdateInstallerForbidden) Code() int { - return 403 -} - -func (o *UpdateInstallerForbidden) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[PATCH /v1/installers/{installer_id}][%d] updateInstallerForbidden %s", 403, payload) -} - -func (o *UpdateInstallerForbidden) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[PATCH /v1/installers/{installer_id}][%d] updateInstallerForbidden %s", 403, payload) -} - -func (o *UpdateInstallerForbidden) GetPayload() *models.StderrErrResponse { - return o.Payload -} - -func (o *UpdateInstallerForbidden) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.StderrErrResponse) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewUpdateInstallerNotFound creates a UpdateInstallerNotFound with default headers values -func NewUpdateInstallerNotFound() *UpdateInstallerNotFound { - return &UpdateInstallerNotFound{} -} - -/* -UpdateInstallerNotFound describes a response with status code 404, with default header values. - -Not Found -*/ -type UpdateInstallerNotFound struct { - Payload *models.StderrErrResponse -} - -// IsSuccess returns true when this update installer not found response has a 2xx status code -func (o *UpdateInstallerNotFound) IsSuccess() bool { - return false -} - -// IsRedirect returns true when this update installer not found response has a 3xx status code -func (o *UpdateInstallerNotFound) IsRedirect() bool { - return false -} - -// IsClientError returns true when this update installer not found response has a 4xx status code -func (o *UpdateInstallerNotFound) IsClientError() bool { - return true -} - -// IsServerError returns true when this update installer not found response has a 5xx status code -func (o *UpdateInstallerNotFound) IsServerError() bool { - return false -} - -// IsCode returns true when this update installer not found response a status code equal to that given -func (o *UpdateInstallerNotFound) IsCode(code int) bool { - return code == 404 -} - -// Code gets the status code for the update installer not found response -func (o *UpdateInstallerNotFound) Code() int { - return 404 -} - -func (o *UpdateInstallerNotFound) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[PATCH /v1/installers/{installer_id}][%d] updateInstallerNotFound %s", 404, payload) -} - -func (o *UpdateInstallerNotFound) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[PATCH /v1/installers/{installer_id}][%d] updateInstallerNotFound %s", 404, payload) -} - -func (o *UpdateInstallerNotFound) GetPayload() *models.StderrErrResponse { - return o.Payload -} - -func (o *UpdateInstallerNotFound) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.StderrErrResponse) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewUpdateInstallerInternalServerError creates a UpdateInstallerInternalServerError with default headers values -func NewUpdateInstallerInternalServerError() *UpdateInstallerInternalServerError { - return &UpdateInstallerInternalServerError{} -} - -/* -UpdateInstallerInternalServerError describes a response with status code 500, with default header values. - -Internal Server Error -*/ -type UpdateInstallerInternalServerError struct { - Payload *models.StderrErrResponse -} - -// IsSuccess returns true when this update installer internal server error response has a 2xx status code -func (o *UpdateInstallerInternalServerError) IsSuccess() bool { - return false -} - -// IsRedirect returns true when this update installer internal server error response has a 3xx status code -func (o *UpdateInstallerInternalServerError) IsRedirect() bool { - return false -} - -// IsClientError returns true when this update installer internal server error response has a 4xx status code -func (o *UpdateInstallerInternalServerError) IsClientError() bool { - return false -} - -// IsServerError returns true when this update installer internal server error response has a 5xx status code -func (o *UpdateInstallerInternalServerError) IsServerError() bool { - return true -} - -// IsCode returns true when this update installer internal server error response a status code equal to that given -func (o *UpdateInstallerInternalServerError) IsCode(code int) bool { - return code == 500 -} - -// Code gets the status code for the update installer internal server error response -func (o *UpdateInstallerInternalServerError) Code() int { - return 500 -} - -func (o *UpdateInstallerInternalServerError) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[PATCH /v1/installers/{installer_id}][%d] updateInstallerInternalServerError %s", 500, payload) -} - -func (o *UpdateInstallerInternalServerError) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[PATCH /v1/installers/{installer_id}][%d] updateInstallerInternalServerError %s", 500, payload) -} - -func (o *UpdateInstallerInternalServerError) GetPayload() *models.StderrErrResponse { - return o.Payload -} - -func (o *UpdateInstallerInternalServerError) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.StderrErrResponse) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} diff --git a/client/operations/update_org_parameters.go b/client/operations/update_org_parameters.go deleted file mode 100644 index b4819df..0000000 --- a/client/operations/update_org_parameters.go +++ /dev/null @@ -1,153 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package operations - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "context" - "net/http" - "time" - - "github.com/go-openapi/errors" - "github.com/go-openapi/runtime" - cr "github.com/go-openapi/runtime/client" - "github.com/go-openapi/strfmt" - - "github.com/nuonco/nuon-go/models" -) - -// NewUpdateOrgParams creates a new UpdateOrgParams object, -// with the default timeout for this client. -// -// Default values are not hydrated, since defaults are normally applied by the API server side. -// -// To enforce default values in parameter, use SetDefaults or WithDefaults. -func NewUpdateOrgParams() *UpdateOrgParams { - return &UpdateOrgParams{ - timeout: cr.DefaultTimeout, - } -} - -// NewUpdateOrgParamsWithTimeout creates a new UpdateOrgParams object -// with the ability to set a timeout on a request. -func NewUpdateOrgParamsWithTimeout(timeout time.Duration) *UpdateOrgParams { - return &UpdateOrgParams{ - timeout: timeout, - } -} - -// NewUpdateOrgParamsWithContext creates a new UpdateOrgParams object -// with the ability to set a context for a request. -func NewUpdateOrgParamsWithContext(ctx context.Context) *UpdateOrgParams { - return &UpdateOrgParams{ - Context: ctx, - } -} - -// NewUpdateOrgParamsWithHTTPClient creates a new UpdateOrgParams object -// with the ability to set a custom HTTPClient for a request. -func NewUpdateOrgParamsWithHTTPClient(client *http.Client) *UpdateOrgParams { - return &UpdateOrgParams{ - HTTPClient: client, - } -} - -/* -UpdateOrgParams contains all the parameters to send to the API endpoint - - for the update org operation. - - Typically these are written to a http.Request. -*/ -type UpdateOrgParams struct { - - /* Req. - - Input - */ - Req *models.ServiceUpdateOrgRequest - - timeout time.Duration - Context context.Context - HTTPClient *http.Client -} - -// WithDefaults hydrates default values in the update org params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *UpdateOrgParams) WithDefaults() *UpdateOrgParams { - o.SetDefaults() - return o -} - -// SetDefaults hydrates default values in the update org params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *UpdateOrgParams) SetDefaults() { - // no default values defined for this parameter -} - -// WithTimeout adds the timeout to the update org params -func (o *UpdateOrgParams) WithTimeout(timeout time.Duration) *UpdateOrgParams { - o.SetTimeout(timeout) - return o -} - -// SetTimeout adds the timeout to the update org params -func (o *UpdateOrgParams) SetTimeout(timeout time.Duration) { - o.timeout = timeout -} - -// WithContext adds the context to the update org params -func (o *UpdateOrgParams) WithContext(ctx context.Context) *UpdateOrgParams { - o.SetContext(ctx) - return o -} - -// SetContext adds the context to the update org params -func (o *UpdateOrgParams) SetContext(ctx context.Context) { - o.Context = ctx -} - -// WithHTTPClient adds the HTTPClient to the update org params -func (o *UpdateOrgParams) WithHTTPClient(client *http.Client) *UpdateOrgParams { - o.SetHTTPClient(client) - return o -} - -// SetHTTPClient adds the HTTPClient to the update org params -func (o *UpdateOrgParams) SetHTTPClient(client *http.Client) { - o.HTTPClient = client -} - -// WithReq adds the req to the update org params -func (o *UpdateOrgParams) WithReq(req *models.ServiceUpdateOrgRequest) *UpdateOrgParams { - o.SetReq(req) - return o -} - -// SetReq adds the req to the update org params -func (o *UpdateOrgParams) SetReq(req *models.ServiceUpdateOrgRequest) { - o.Req = req -} - -// WriteToRequest writes these params to a swagger request -func (o *UpdateOrgParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { - - if err := r.SetTimeout(o.timeout); err != nil { - return err - } - var res []error - if o.Req != nil { - if err := r.SetBodyParam(o.Req); err != nil { - return err - } - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} diff --git a/client/operations/update_org_responses.go b/client/operations/update_org_responses.go deleted file mode 100644 index 80de034..0000000 --- a/client/operations/update_org_responses.go +++ /dev/null @@ -1,486 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package operations - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "encoding/json" - "fmt" - "io" - - "github.com/go-openapi/runtime" - "github.com/go-openapi/strfmt" - - "github.com/nuonco/nuon-go/models" -) - -// UpdateOrgReader is a Reader for the UpdateOrg structure. -type UpdateOrgReader struct { - formats strfmt.Registry -} - -// ReadResponse reads a server response into the received o. -func (o *UpdateOrgReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { - switch response.Code() { - case 200: - result := NewUpdateOrgOK() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return result, nil - case 400: - result := NewUpdateOrgBadRequest() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return nil, result - case 401: - result := NewUpdateOrgUnauthorized() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return nil, result - case 403: - result := NewUpdateOrgForbidden() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return nil, result - case 404: - result := NewUpdateOrgNotFound() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return nil, result - case 500: - result := NewUpdateOrgInternalServerError() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return nil, result - default: - return nil, runtime.NewAPIError("[PATCH /v1/orgs/current] UpdateOrg", response, response.Code()) - } -} - -// NewUpdateOrgOK creates a UpdateOrgOK with default headers values -func NewUpdateOrgOK() *UpdateOrgOK { - return &UpdateOrgOK{} -} - -/* -UpdateOrgOK describes a response with status code 200, with default header values. - -OK -*/ -type UpdateOrgOK struct { - Payload *models.AppOrg -} - -// IsSuccess returns true when this update org o k response has a 2xx status code -func (o *UpdateOrgOK) IsSuccess() bool { - return true -} - -// IsRedirect returns true when this update org o k response has a 3xx status code -func (o *UpdateOrgOK) IsRedirect() bool { - return false -} - -// IsClientError returns true when this update org o k response has a 4xx status code -func (o *UpdateOrgOK) IsClientError() bool { - return false -} - -// IsServerError returns true when this update org o k response has a 5xx status code -func (o *UpdateOrgOK) IsServerError() bool { - return false -} - -// IsCode returns true when this update org o k response a status code equal to that given -func (o *UpdateOrgOK) IsCode(code int) bool { - return code == 200 -} - -// Code gets the status code for the update org o k response -func (o *UpdateOrgOK) Code() int { - return 200 -} - -func (o *UpdateOrgOK) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[PATCH /v1/orgs/current][%d] updateOrgOK %s", 200, payload) -} - -func (o *UpdateOrgOK) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[PATCH /v1/orgs/current][%d] updateOrgOK %s", 200, payload) -} - -func (o *UpdateOrgOK) GetPayload() *models.AppOrg { - return o.Payload -} - -func (o *UpdateOrgOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.AppOrg) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewUpdateOrgBadRequest creates a UpdateOrgBadRequest with default headers values -func NewUpdateOrgBadRequest() *UpdateOrgBadRequest { - return &UpdateOrgBadRequest{} -} - -/* -UpdateOrgBadRequest describes a response with status code 400, with default header values. - -Bad Request -*/ -type UpdateOrgBadRequest struct { - Payload *models.StderrErrResponse -} - -// IsSuccess returns true when this update org bad request response has a 2xx status code -func (o *UpdateOrgBadRequest) IsSuccess() bool { - return false -} - -// IsRedirect returns true when this update org bad request response has a 3xx status code -func (o *UpdateOrgBadRequest) IsRedirect() bool { - return false -} - -// IsClientError returns true when this update org bad request response has a 4xx status code -func (o *UpdateOrgBadRequest) IsClientError() bool { - return true -} - -// IsServerError returns true when this update org bad request response has a 5xx status code -func (o *UpdateOrgBadRequest) IsServerError() bool { - return false -} - -// IsCode returns true when this update org bad request response a status code equal to that given -func (o *UpdateOrgBadRequest) IsCode(code int) bool { - return code == 400 -} - -// Code gets the status code for the update org bad request response -func (o *UpdateOrgBadRequest) Code() int { - return 400 -} - -func (o *UpdateOrgBadRequest) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[PATCH /v1/orgs/current][%d] updateOrgBadRequest %s", 400, payload) -} - -func (o *UpdateOrgBadRequest) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[PATCH /v1/orgs/current][%d] updateOrgBadRequest %s", 400, payload) -} - -func (o *UpdateOrgBadRequest) GetPayload() *models.StderrErrResponse { - return o.Payload -} - -func (o *UpdateOrgBadRequest) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.StderrErrResponse) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewUpdateOrgUnauthorized creates a UpdateOrgUnauthorized with default headers values -func NewUpdateOrgUnauthorized() *UpdateOrgUnauthorized { - return &UpdateOrgUnauthorized{} -} - -/* -UpdateOrgUnauthorized describes a response with status code 401, with default header values. - -Unauthorized -*/ -type UpdateOrgUnauthorized struct { - Payload *models.StderrErrResponse -} - -// IsSuccess returns true when this update org unauthorized response has a 2xx status code -func (o *UpdateOrgUnauthorized) IsSuccess() bool { - return false -} - -// IsRedirect returns true when this update org unauthorized response has a 3xx status code -func (o *UpdateOrgUnauthorized) IsRedirect() bool { - return false -} - -// IsClientError returns true when this update org unauthorized response has a 4xx status code -func (o *UpdateOrgUnauthorized) IsClientError() bool { - return true -} - -// IsServerError returns true when this update org unauthorized response has a 5xx status code -func (o *UpdateOrgUnauthorized) IsServerError() bool { - return false -} - -// IsCode returns true when this update org unauthorized response a status code equal to that given -func (o *UpdateOrgUnauthorized) IsCode(code int) bool { - return code == 401 -} - -// Code gets the status code for the update org unauthorized response -func (o *UpdateOrgUnauthorized) Code() int { - return 401 -} - -func (o *UpdateOrgUnauthorized) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[PATCH /v1/orgs/current][%d] updateOrgUnauthorized %s", 401, payload) -} - -func (o *UpdateOrgUnauthorized) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[PATCH /v1/orgs/current][%d] updateOrgUnauthorized %s", 401, payload) -} - -func (o *UpdateOrgUnauthorized) GetPayload() *models.StderrErrResponse { - return o.Payload -} - -func (o *UpdateOrgUnauthorized) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.StderrErrResponse) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewUpdateOrgForbidden creates a UpdateOrgForbidden with default headers values -func NewUpdateOrgForbidden() *UpdateOrgForbidden { - return &UpdateOrgForbidden{} -} - -/* -UpdateOrgForbidden describes a response with status code 403, with default header values. - -Forbidden -*/ -type UpdateOrgForbidden struct { - Payload *models.StderrErrResponse -} - -// IsSuccess returns true when this update org forbidden response has a 2xx status code -func (o *UpdateOrgForbidden) IsSuccess() bool { - return false -} - -// IsRedirect returns true when this update org forbidden response has a 3xx status code -func (o *UpdateOrgForbidden) IsRedirect() bool { - return false -} - -// IsClientError returns true when this update org forbidden response has a 4xx status code -func (o *UpdateOrgForbidden) IsClientError() bool { - return true -} - -// IsServerError returns true when this update org forbidden response has a 5xx status code -func (o *UpdateOrgForbidden) IsServerError() bool { - return false -} - -// IsCode returns true when this update org forbidden response a status code equal to that given -func (o *UpdateOrgForbidden) IsCode(code int) bool { - return code == 403 -} - -// Code gets the status code for the update org forbidden response -func (o *UpdateOrgForbidden) Code() int { - return 403 -} - -func (o *UpdateOrgForbidden) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[PATCH /v1/orgs/current][%d] updateOrgForbidden %s", 403, payload) -} - -func (o *UpdateOrgForbidden) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[PATCH /v1/orgs/current][%d] updateOrgForbidden %s", 403, payload) -} - -func (o *UpdateOrgForbidden) GetPayload() *models.StderrErrResponse { - return o.Payload -} - -func (o *UpdateOrgForbidden) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.StderrErrResponse) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewUpdateOrgNotFound creates a UpdateOrgNotFound with default headers values -func NewUpdateOrgNotFound() *UpdateOrgNotFound { - return &UpdateOrgNotFound{} -} - -/* -UpdateOrgNotFound describes a response with status code 404, with default header values. - -Not Found -*/ -type UpdateOrgNotFound struct { - Payload *models.StderrErrResponse -} - -// IsSuccess returns true when this update org not found response has a 2xx status code -func (o *UpdateOrgNotFound) IsSuccess() bool { - return false -} - -// IsRedirect returns true when this update org not found response has a 3xx status code -func (o *UpdateOrgNotFound) IsRedirect() bool { - return false -} - -// IsClientError returns true when this update org not found response has a 4xx status code -func (o *UpdateOrgNotFound) IsClientError() bool { - return true -} - -// IsServerError returns true when this update org not found response has a 5xx status code -func (o *UpdateOrgNotFound) IsServerError() bool { - return false -} - -// IsCode returns true when this update org not found response a status code equal to that given -func (o *UpdateOrgNotFound) IsCode(code int) bool { - return code == 404 -} - -// Code gets the status code for the update org not found response -func (o *UpdateOrgNotFound) Code() int { - return 404 -} - -func (o *UpdateOrgNotFound) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[PATCH /v1/orgs/current][%d] updateOrgNotFound %s", 404, payload) -} - -func (o *UpdateOrgNotFound) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[PATCH /v1/orgs/current][%d] updateOrgNotFound %s", 404, payload) -} - -func (o *UpdateOrgNotFound) GetPayload() *models.StderrErrResponse { - return o.Payload -} - -func (o *UpdateOrgNotFound) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.StderrErrResponse) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewUpdateOrgInternalServerError creates a UpdateOrgInternalServerError with default headers values -func NewUpdateOrgInternalServerError() *UpdateOrgInternalServerError { - return &UpdateOrgInternalServerError{} -} - -/* -UpdateOrgInternalServerError describes a response with status code 500, with default header values. - -Internal Server Error -*/ -type UpdateOrgInternalServerError struct { - Payload *models.StderrErrResponse -} - -// IsSuccess returns true when this update org internal server error response has a 2xx status code -func (o *UpdateOrgInternalServerError) IsSuccess() bool { - return false -} - -// IsRedirect returns true when this update org internal server error response has a 3xx status code -func (o *UpdateOrgInternalServerError) IsRedirect() bool { - return false -} - -// IsClientError returns true when this update org internal server error response has a 4xx status code -func (o *UpdateOrgInternalServerError) IsClientError() bool { - return false -} - -// IsServerError returns true when this update org internal server error response has a 5xx status code -func (o *UpdateOrgInternalServerError) IsServerError() bool { - return true -} - -// IsCode returns true when this update org internal server error response a status code equal to that given -func (o *UpdateOrgInternalServerError) IsCode(code int) bool { - return code == 500 -} - -// Code gets the status code for the update org internal server error response -func (o *UpdateOrgInternalServerError) Code() int { - return 500 -} - -func (o *UpdateOrgInternalServerError) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[PATCH /v1/orgs/current][%d] updateOrgInternalServerError %s", 500, payload) -} - -func (o *UpdateOrgInternalServerError) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[PATCH /v1/orgs/current][%d] updateOrgInternalServerError %s", 500, payload) -} - -func (o *UpdateOrgInternalServerError) GetPayload() *models.StderrErrResponse { - return o.Payload -} - -func (o *UpdateOrgInternalServerError) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.StderrErrResponse) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} diff --git a/errors.go b/errors.go index cadc86e..f197c78 100644 --- a/errors.go +++ b/errors.go @@ -4,7 +4,7 @@ import ( "errors" "fmt" - "github.com/nuonco/nuon-go/models" + "github.com/nuonco/nuon-runner-go/models" ) type statusErr struct { diff --git a/jobs.go b/jobs.go index aacd4dd..1f866d8 100644 --- a/jobs.go +++ b/jobs.go @@ -37,13 +37,13 @@ func (c *client) GetJob(ctx context.Context, jobID string) (*models.AppRunnerJob return resp.Payload, nil } -func (c *client) GetJobPlan(ctx context.Context, jobID string) (*models.Planv1Plan, error) { +func (c *client) GetJobPlanJSON(ctx context.Context, jobID string) (string, error) { resp, err := c.genClient.Operations.GetRunnerJobPlan(&operations.GetRunnerJobPlanParams{ RunnerJobID: jobID, Context: ctx, }, c.getAuthInfo()) if err != nil { - return nil, err + return "", err } return resp.Payload, nil diff --git a/mock.go b/mock.go index b62177d..ae8b42b 100644 --- a/mock.go +++ b/mock.go @@ -126,10 +126,10 @@ func (mr *MockClientMockRecorder) GetJobExecutions(ctx, jobID interface{}) *gomo } // GetJobPlan mocks base method. -func (m *MockClient) GetJobPlan(ctx context.Context, jobID string) (*models.Planv1Plan, error) { +func (m *MockClient) GetJobPlan(ctx context.Context, jobID string) (interface{}, error) { m.ctrl.T.Helper() ret := m.ctrl.Call(m, "GetJobPlan", ctx, jobID) - ret0, _ := ret[0].(*models.Planv1Plan) + ret0, _ := ret[0].(interface{}) ret1, _ := ret[1].(error) return ret0, ret1 } diff --git a/models/app_runner_group_settings.go b/models/app_runner_group_settings.go index e2d32d8..5565a6e 100644 --- a/models/app_runner_group_settings.go +++ b/models/app_runner_group_settings.go @@ -18,6 +18,12 @@ import ( // swagger:model app.RunnerGroupSettings type AppRunnerGroupSettings struct { + // container image tag + ContainerImageTag string `json:"container_image_tag,omitempty"` + + // configuration for deploying the runner + ContainerImageURL string `json:"container_image_url,omitempty"` + // created at CreatedAt string `json:"created_at,omitempty"` @@ -27,27 +33,27 @@ type AppRunnerGroupSettings struct { // created by id CreatedByID string `json:"created_by_id,omitempty"` - // health check timeout - HealthCheckTimeout int64 `json:"health_check_timeout,omitempty"` - - // Various settings for the runner group + // Various settings for the runner to handle internally HeartBeatTimeout int64 `json:"heart_beat_timeout,omitempty"` // id ID string `json:"id,omitempty"` - // job execution heart beat timeout - JobExecutionHeartBeatTimeout int64 `json:"job_execution_heart_beat_timeout,omitempty"` - // org id OrgID string `json:"org_id,omitempty"` // otel collector config OtelCollectorConfig string `json:"otel_collector_config,omitempty"` + // runner api url + RunnerAPIURL string `json:"runner_api_url,omitempty"` + // runner group id RunnerGroupID string `json:"runner_group_id,omitempty"` + // settings refresh timeout + SettingsRefreshTimeout int64 `json:"settings_refresh_timeout,omitempty"` + // updated at UpdatedAt string `json:"updated_at,omitempty"` } diff --git a/models/app_runner_job_operation_type.go b/models/app_runner_job_operation_type.go index b072555..707edbb 100644 --- a/models/app_runner_job_operation_type.go +++ b/models/app_runner_job_operation_type.go @@ -41,6 +41,12 @@ const ( // AppRunnerJobOperationTypePlanDashOnly captures enum value "plan-only" AppRunnerJobOperationTypePlanDashOnly AppRunnerJobOperationType = "plan-only" + + // AppRunnerJobOperationTypeBuild captures enum value "build" + AppRunnerJobOperationTypeBuild AppRunnerJobOperationType = "build" + + // AppRunnerJobOperationTypeUnknown captures enum value "unknown" + AppRunnerJobOperationTypeUnknown AppRunnerJobOperationType = "unknown" ) // for schema @@ -48,7 +54,7 @@ var appRunnerJobOperationTypeEnum []interface{} func init() { var res []AppRunnerJobOperationType - if err := json.Unmarshal([]byte(`["exec","apply","destroy","plan-only"]`), &res); err != nil { + if err := json.Unmarshal([]byte(`["exec","apply","destroy","plan-only","build","unknown"]`), &res); err != nil { panic(err) } for _, v := range res { diff --git a/models/app_runner_job_type.go b/models/app_runner_job_type.go index ad96621..6360663 100644 --- a/models/app_runner_job_type.go +++ b/models/app_runner_job_type.go @@ -83,6 +83,9 @@ const ( // AppRunnerJobTypeRunnerDashTerraform captures enum value "runner-terraform" AppRunnerJobTypeRunnerDashTerraform AppRunnerJobType = "runner-terraform" + + // AppRunnerJobTypeRunnerDashLocal captures enum value "runner-local" + AppRunnerJobTypeRunnerDashLocal AppRunnerJobType = "runner-local" ) // for schema @@ -90,7 +93,7 @@ var appRunnerJobTypeEnum []interface{} func init() { var res []AppRunnerJobType - if err := json.Unmarshal([]byte(`["health-check","docker-build","container-image-build","terraform-module-build","helm-chart-build","noop-build","oci-sync","container-image-sync","noop-sync","terraform-deploy","helm-chart-deploy","job-deploy","noop-deploy","shut-down","noop","sandbox-terraform","runner-helm","runner-terraform"]`), &res); err != nil { + if err := json.Unmarshal([]byte(`["health-check","docker-build","container-image-build","terraform-module-build","helm-chart-build","noop-build","oci-sync","container-image-sync","noop-sync","terraform-deploy","helm-chart-deploy","job-deploy","noop-deploy","shut-down","noop","sandbox-terraform","runner-helm","runner-terraform","runner-local"]`), &res); err != nil { panic(err) } for _, v := range res { diff --git a/models/service_attribute.go b/models/service_attribute.go new file mode 100644 index 0000000..d4453da --- /dev/null +++ b/models/service_attribute.go @@ -0,0 +1,449 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "strconv" + + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// ServiceAttribute service attribute +// +// swagger:model service.Attribute +type ServiceAttribute struct { + + // key + Key string `json:"key,omitempty"` + + // value + Value *ServiceAttributeValue `json:"value,omitempty"` +} + +// Validate validates this service attribute +func (m *ServiceAttribute) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateValue(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *ServiceAttribute) validateValue(formats strfmt.Registry) error { + if swag.IsZero(m.Value) { // not required + return nil + } + + if m.Value != nil { + if err := m.Value.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("value") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("value") + } + return err + } + } + + return nil +} + +// ContextValidate validate this service attribute based on the context it is used +func (m *ServiceAttribute) ContextValidate(ctx context.Context, formats strfmt.Registry) error { + var res []error + + if err := m.contextValidateValue(ctx, formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *ServiceAttribute) contextValidateValue(ctx context.Context, formats strfmt.Registry) error { + + if m.Value != nil { + + if swag.IsZero(m.Value) { // not required + return nil + } + + if err := m.Value.ContextValidate(ctx, formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("value") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("value") + } + return err + } + } + + return nil +} + +// MarshalBinary interface implementation +func (m *ServiceAttribute) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *ServiceAttribute) UnmarshalBinary(b []byte) error { + var res ServiceAttribute + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} + +// ServiceAttributeValue service attribute value +// +// swagger:model ServiceAttributeValue +type ServiceAttributeValue struct { + + // kvlist value + KvlistValue *ServiceAttributeValueKvlistValue `json:"kvlistValue,omitempty"` +} + +// Validate validates this service attribute value +func (m *ServiceAttributeValue) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateKvlistValue(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *ServiceAttributeValue) validateKvlistValue(formats strfmt.Registry) error { + if swag.IsZero(m.KvlistValue) { // not required + return nil + } + + if m.KvlistValue != nil { + if err := m.KvlistValue.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("value" + "." + "kvlistValue") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("value" + "." + "kvlistValue") + } + return err + } + } + + return nil +} + +// ContextValidate validate this service attribute value based on the context it is used +func (m *ServiceAttributeValue) ContextValidate(ctx context.Context, formats strfmt.Registry) error { + var res []error + + if err := m.contextValidateKvlistValue(ctx, formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *ServiceAttributeValue) contextValidateKvlistValue(ctx context.Context, formats strfmt.Registry) error { + + if m.KvlistValue != nil { + + if swag.IsZero(m.KvlistValue) { // not required + return nil + } + + if err := m.KvlistValue.ContextValidate(ctx, formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("value" + "." + "kvlistValue") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("value" + "." + "kvlistValue") + } + return err + } + } + + return nil +} + +// MarshalBinary interface implementation +func (m *ServiceAttributeValue) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *ServiceAttributeValue) UnmarshalBinary(b []byte) error { + var res ServiceAttributeValue + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} + +// ServiceAttributeValueKvlistValue service attribute value kvlist value +// +// swagger:model ServiceAttributeValueKvlistValue +type ServiceAttributeValueKvlistValue struct { + + // values + Values []*ServiceAttributeValueKvlistValueValuesItems0 `json:"values"` +} + +// Validate validates this service attribute value kvlist value +func (m *ServiceAttributeValueKvlistValue) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateValues(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *ServiceAttributeValueKvlistValue) validateValues(formats strfmt.Registry) error { + if swag.IsZero(m.Values) { // not required + return nil + } + + for i := 0; i < len(m.Values); i++ { + if swag.IsZero(m.Values[i]) { // not required + continue + } + + if m.Values[i] != nil { + if err := m.Values[i].Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("value" + "." + "kvlistValue" + "." + "values" + "." + strconv.Itoa(i)) + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("value" + "." + "kvlistValue" + "." + "values" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +// ContextValidate validate this service attribute value kvlist value based on the context it is used +func (m *ServiceAttributeValueKvlistValue) ContextValidate(ctx context.Context, formats strfmt.Registry) error { + var res []error + + if err := m.contextValidateValues(ctx, formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *ServiceAttributeValueKvlistValue) contextValidateValues(ctx context.Context, formats strfmt.Registry) error { + + for i := 0; i < len(m.Values); i++ { + + if m.Values[i] != nil { + + if swag.IsZero(m.Values[i]) { // not required + return nil + } + + if err := m.Values[i].ContextValidate(ctx, formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("value" + "." + "kvlistValue" + "." + "values" + "." + strconv.Itoa(i)) + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("value" + "." + "kvlistValue" + "." + "values" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +// MarshalBinary interface implementation +func (m *ServiceAttributeValueKvlistValue) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *ServiceAttributeValueKvlistValue) UnmarshalBinary(b []byte) error { + var res ServiceAttributeValueKvlistValue + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} + +// ServiceAttributeValueKvlistValueValuesItems0 service attribute value kvlist value values items0 +// +// swagger:model ServiceAttributeValueKvlistValueValuesItems0 +type ServiceAttributeValueKvlistValueValuesItems0 struct { + + // key + Key string `json:"key,omitempty"` + + // value + Value *ServiceAttributeValueKvlistValueValuesItems0Value `json:"value,omitempty"` +} + +// Validate validates this service attribute value kvlist value values items0 +func (m *ServiceAttributeValueKvlistValueValuesItems0) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateValue(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *ServiceAttributeValueKvlistValueValuesItems0) validateValue(formats strfmt.Registry) error { + if swag.IsZero(m.Value) { // not required + return nil + } + + if m.Value != nil { + if err := m.Value.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("value") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("value") + } + return err + } + } + + return nil +} + +// ContextValidate validate this service attribute value kvlist value values items0 based on the context it is used +func (m *ServiceAttributeValueKvlistValueValuesItems0) ContextValidate(ctx context.Context, formats strfmt.Registry) error { + var res []error + + if err := m.contextValidateValue(ctx, formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *ServiceAttributeValueKvlistValueValuesItems0) contextValidateValue(ctx context.Context, formats strfmt.Registry) error { + + if m.Value != nil { + + if swag.IsZero(m.Value) { // not required + return nil + } + + if err := m.Value.ContextValidate(ctx, formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("value") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("value") + } + return err + } + } + + return nil +} + +// MarshalBinary interface implementation +func (m *ServiceAttributeValueKvlistValueValuesItems0) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *ServiceAttributeValueKvlistValueValuesItems0) UnmarshalBinary(b []byte) error { + var res ServiceAttributeValueKvlistValueValuesItems0 + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} + +// ServiceAttributeValueKvlistValueValuesItems0Value service attribute value kvlist value values items0 value +// +// swagger:model ServiceAttributeValueKvlistValueValuesItems0Value +type ServiceAttributeValueKvlistValueValuesItems0Value struct { + + // string value + StringValue string `json:"stringValue,omitempty"` +} + +// Validate validates this service attribute value kvlist value values items0 value +func (m *ServiceAttributeValueKvlistValueValuesItems0Value) Validate(formats strfmt.Registry) error { + return nil +} + +// ContextValidate validates this service attribute value kvlist value values items0 value based on context it is used +func (m *ServiceAttributeValueKvlistValueValuesItems0Value) ContextValidate(ctx context.Context, formats strfmt.Registry) error { + return nil +} + +// MarshalBinary interface implementation +func (m *ServiceAttributeValueKvlistValueValuesItems0Value) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *ServiceAttributeValueKvlistValueValuesItems0Value) UnmarshalBinary(b []byte) error { + var res ServiceAttributeValueKvlistValueValuesItems0Value + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/models/service_body.go b/models/service_body.go new file mode 100644 index 0000000..9f42c92 --- /dev/null +++ b/models/service_body.go @@ -0,0 +1,50 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// ServiceBody service body +// +// swagger:model service.Body +type ServiceBody struct { + + // string value + StringValue string `json:"stringValue,omitempty"` +} + +// Validate validates this service body +func (m *ServiceBody) Validate(formats strfmt.Registry) error { + return nil +} + +// ContextValidate validates this service body based on context it is used +func (m *ServiceBody) ContextValidate(ctx context.Context, formats strfmt.Registry) error { + return nil +} + +// MarshalBinary interface implementation +func (m *ServiceBody) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *ServiceBody) UnmarshalBinary(b []byte) error { + var res ServiceBody + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/models/service_o_t_l_p_log_export_request.go b/models/service_o_t_l_p_log_export_request.go new file mode 100644 index 0000000..b52f500 --- /dev/null +++ b/models/service_o_t_l_p_log_export_request.go @@ -0,0 +1,619 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "strconv" + + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// ServiceOTLPLogExportRequest service o t l p log export request +// +// swagger:model service.OTLPLogExportRequest +type ServiceOTLPLogExportRequest struct { + + // resource logs + ResourceLogs []*ServiceOTLPLogExportRequestResourceLogsItems0 `json:"resourceLogs"` +} + +// Validate validates this service o t l p log export request +func (m *ServiceOTLPLogExportRequest) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateResourceLogs(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *ServiceOTLPLogExportRequest) validateResourceLogs(formats strfmt.Registry) error { + if swag.IsZero(m.ResourceLogs) { // not required + return nil + } + + for i := 0; i < len(m.ResourceLogs); i++ { + if swag.IsZero(m.ResourceLogs[i]) { // not required + continue + } + + if m.ResourceLogs[i] != nil { + if err := m.ResourceLogs[i].Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("resourceLogs" + "." + strconv.Itoa(i)) + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("resourceLogs" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +// ContextValidate validate this service o t l p log export request based on the context it is used +func (m *ServiceOTLPLogExportRequest) ContextValidate(ctx context.Context, formats strfmt.Registry) error { + var res []error + + if err := m.contextValidateResourceLogs(ctx, formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *ServiceOTLPLogExportRequest) contextValidateResourceLogs(ctx context.Context, formats strfmt.Registry) error { + + for i := 0; i < len(m.ResourceLogs); i++ { + + if m.ResourceLogs[i] != nil { + + if swag.IsZero(m.ResourceLogs[i]) { // not required + return nil + } + + if err := m.ResourceLogs[i].ContextValidate(ctx, formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("resourceLogs" + "." + strconv.Itoa(i)) + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("resourceLogs" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +// MarshalBinary interface implementation +func (m *ServiceOTLPLogExportRequest) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *ServiceOTLPLogExportRequest) UnmarshalBinary(b []byte) error { + var res ServiceOTLPLogExportRequest + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} + +// ServiceOTLPLogExportRequestResourceLogsItems0 service o t l p log export request resource logs items0 +// +// swagger:model ServiceOTLPLogExportRequestResourceLogsItems0 +type ServiceOTLPLogExportRequestResourceLogsItems0 struct { + + // resource + Resource *ServiceResource `json:"resource,omitempty"` + + // scope logs + ScopeLogs []*ServiceOTLPLogExportRequestResourceLogsItems0ScopeLogsItems0 `json:"scopeLogs"` +} + +// Validate validates this service o t l p log export request resource logs items0 +func (m *ServiceOTLPLogExportRequestResourceLogsItems0) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateResource(formats); err != nil { + res = append(res, err) + } + + if err := m.validateScopeLogs(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *ServiceOTLPLogExportRequestResourceLogsItems0) validateResource(formats strfmt.Registry) error { + if swag.IsZero(m.Resource) { // not required + return nil + } + + if m.Resource != nil { + if err := m.Resource.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("resource") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("resource") + } + return err + } + } + + return nil +} + +func (m *ServiceOTLPLogExportRequestResourceLogsItems0) validateScopeLogs(formats strfmt.Registry) error { + if swag.IsZero(m.ScopeLogs) { // not required + return nil + } + + for i := 0; i < len(m.ScopeLogs); i++ { + if swag.IsZero(m.ScopeLogs[i]) { // not required + continue + } + + if m.ScopeLogs[i] != nil { + if err := m.ScopeLogs[i].Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("scopeLogs" + "." + strconv.Itoa(i)) + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("scopeLogs" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +// ContextValidate validate this service o t l p log export request resource logs items0 based on the context it is used +func (m *ServiceOTLPLogExportRequestResourceLogsItems0) ContextValidate(ctx context.Context, formats strfmt.Registry) error { + var res []error + + if err := m.contextValidateResource(ctx, formats); err != nil { + res = append(res, err) + } + + if err := m.contextValidateScopeLogs(ctx, formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *ServiceOTLPLogExportRequestResourceLogsItems0) contextValidateResource(ctx context.Context, formats strfmt.Registry) error { + + if m.Resource != nil { + + if swag.IsZero(m.Resource) { // not required + return nil + } + + if err := m.Resource.ContextValidate(ctx, formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("resource") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("resource") + } + return err + } + } + + return nil +} + +func (m *ServiceOTLPLogExportRequestResourceLogsItems0) contextValidateScopeLogs(ctx context.Context, formats strfmt.Registry) error { + + for i := 0; i < len(m.ScopeLogs); i++ { + + if m.ScopeLogs[i] != nil { + + if swag.IsZero(m.ScopeLogs[i]) { // not required + return nil + } + + if err := m.ScopeLogs[i].ContextValidate(ctx, formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("scopeLogs" + "." + strconv.Itoa(i)) + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("scopeLogs" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +// MarshalBinary interface implementation +func (m *ServiceOTLPLogExportRequestResourceLogsItems0) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *ServiceOTLPLogExportRequestResourceLogsItems0) UnmarshalBinary(b []byte) error { + var res ServiceOTLPLogExportRequestResourceLogsItems0 + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} + +// ServiceOTLPLogExportRequestResourceLogsItems0ScopeLogsItems0 service o t l p log export request resource logs items0 scope logs items0 +// +// swagger:model ServiceOTLPLogExportRequestResourceLogsItems0ScopeLogsItems0 +type ServiceOTLPLogExportRequestResourceLogsItems0ScopeLogsItems0 struct { + + // log records + LogRecords []*ServiceOTLPLogExportRequestResourceLogsItems0ScopeLogsItems0LogRecordsItems0 `json:"logRecords"` + + // schema Url + SchemaURL string `json:"schemaUrl,omitempty"` + + // scope + Scope *ServiceScope `json:"scope,omitempty"` +} + +// Validate validates this service o t l p log export request resource logs items0 scope logs items0 +func (m *ServiceOTLPLogExportRequestResourceLogsItems0ScopeLogsItems0) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateLogRecords(formats); err != nil { + res = append(res, err) + } + + if err := m.validateScope(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *ServiceOTLPLogExportRequestResourceLogsItems0ScopeLogsItems0) validateLogRecords(formats strfmt.Registry) error { + if swag.IsZero(m.LogRecords) { // not required + return nil + } + + for i := 0; i < len(m.LogRecords); i++ { + if swag.IsZero(m.LogRecords[i]) { // not required + continue + } + + if m.LogRecords[i] != nil { + if err := m.LogRecords[i].Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("logRecords" + "." + strconv.Itoa(i)) + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("logRecords" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +func (m *ServiceOTLPLogExportRequestResourceLogsItems0ScopeLogsItems0) validateScope(formats strfmt.Registry) error { + if swag.IsZero(m.Scope) { // not required + return nil + } + + if m.Scope != nil { + if err := m.Scope.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("scope") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("scope") + } + return err + } + } + + return nil +} + +// ContextValidate validate this service o t l p log export request resource logs items0 scope logs items0 based on the context it is used +func (m *ServiceOTLPLogExportRequestResourceLogsItems0ScopeLogsItems0) ContextValidate(ctx context.Context, formats strfmt.Registry) error { + var res []error + + if err := m.contextValidateLogRecords(ctx, formats); err != nil { + res = append(res, err) + } + + if err := m.contextValidateScope(ctx, formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *ServiceOTLPLogExportRequestResourceLogsItems0ScopeLogsItems0) contextValidateLogRecords(ctx context.Context, formats strfmt.Registry) error { + + for i := 0; i < len(m.LogRecords); i++ { + + if m.LogRecords[i] != nil { + + if swag.IsZero(m.LogRecords[i]) { // not required + return nil + } + + if err := m.LogRecords[i].ContextValidate(ctx, formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("logRecords" + "." + strconv.Itoa(i)) + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("logRecords" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +func (m *ServiceOTLPLogExportRequestResourceLogsItems0ScopeLogsItems0) contextValidateScope(ctx context.Context, formats strfmt.Registry) error { + + if m.Scope != nil { + + if swag.IsZero(m.Scope) { // not required + return nil + } + + if err := m.Scope.ContextValidate(ctx, formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("scope") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("scope") + } + return err + } + } + + return nil +} + +// MarshalBinary interface implementation +func (m *ServiceOTLPLogExportRequestResourceLogsItems0ScopeLogsItems0) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *ServiceOTLPLogExportRequestResourceLogsItems0ScopeLogsItems0) UnmarshalBinary(b []byte) error { + var res ServiceOTLPLogExportRequestResourceLogsItems0ScopeLogsItems0 + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} + +// ServiceOTLPLogExportRequestResourceLogsItems0ScopeLogsItems0LogRecordsItems0 service o t l p log export request resource logs items0 scope logs items0 log records items0 +// +// swagger:model ServiceOTLPLogExportRequestResourceLogsItems0ScopeLogsItems0LogRecordsItems0 +type ServiceOTLPLogExportRequestResourceLogsItems0ScopeLogsItems0LogRecordsItems0 struct { + + // attributes + Attributes []*ServiceAttribute `json:"attributes"` + + // body + Body *ServiceBody `json:"body,omitempty"` + + // dropped attributes count + DroppedAttributesCount int64 `json:"droppedAttributesCount,omitempty"` + + // flags + Flags int64 `json:"flags,omitempty"` + + // service name + ServiceName string `json:"serviceName,omitempty"` + + // severity number + SeverityNumber int64 `json:"severityNumber,omitempty"` + + // severity text + SeverityText string `json:"severityText,omitempty"` + + // span Id + SpanID string `json:"spanId,omitempty"` + + // time unix nano + TimeUnixNano string `json:"timeUnixNano,omitempty"` + + // trace Id + TraceID string `json:"traceId,omitempty"` +} + +// Validate validates this service o t l p log export request resource logs items0 scope logs items0 log records items0 +func (m *ServiceOTLPLogExportRequestResourceLogsItems0ScopeLogsItems0LogRecordsItems0) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateAttributes(formats); err != nil { + res = append(res, err) + } + + if err := m.validateBody(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *ServiceOTLPLogExportRequestResourceLogsItems0ScopeLogsItems0LogRecordsItems0) validateAttributes(formats strfmt.Registry) error { + if swag.IsZero(m.Attributes) { // not required + return nil + } + + for i := 0; i < len(m.Attributes); i++ { + if swag.IsZero(m.Attributes[i]) { // not required + continue + } + + if m.Attributes[i] != nil { + if err := m.Attributes[i].Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("attributes" + "." + strconv.Itoa(i)) + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("attributes" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +func (m *ServiceOTLPLogExportRequestResourceLogsItems0ScopeLogsItems0LogRecordsItems0) validateBody(formats strfmt.Registry) error { + if swag.IsZero(m.Body) { // not required + return nil + } + + if m.Body != nil { + if err := m.Body.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("body") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("body") + } + return err + } + } + + return nil +} + +// ContextValidate validate this service o t l p log export request resource logs items0 scope logs items0 log records items0 based on the context it is used +func (m *ServiceOTLPLogExportRequestResourceLogsItems0ScopeLogsItems0LogRecordsItems0) ContextValidate(ctx context.Context, formats strfmt.Registry) error { + var res []error + + if err := m.contextValidateAttributes(ctx, formats); err != nil { + res = append(res, err) + } + + if err := m.contextValidateBody(ctx, formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *ServiceOTLPLogExportRequestResourceLogsItems0ScopeLogsItems0LogRecordsItems0) contextValidateAttributes(ctx context.Context, formats strfmt.Registry) error { + + for i := 0; i < len(m.Attributes); i++ { + + if m.Attributes[i] != nil { + + if swag.IsZero(m.Attributes[i]) { // not required + return nil + } + + if err := m.Attributes[i].ContextValidate(ctx, formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("attributes" + "." + strconv.Itoa(i)) + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("attributes" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +func (m *ServiceOTLPLogExportRequestResourceLogsItems0ScopeLogsItems0LogRecordsItems0) contextValidateBody(ctx context.Context, formats strfmt.Registry) error { + + if m.Body != nil { + + if swag.IsZero(m.Body) { // not required + return nil + } + + if err := m.Body.ContextValidate(ctx, formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("body") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("body") + } + return err + } + } + + return nil +} + +// MarshalBinary interface implementation +func (m *ServiceOTLPLogExportRequestResourceLogsItems0ScopeLogsItems0LogRecordsItems0) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *ServiceOTLPLogExportRequestResourceLogsItems0ScopeLogsItems0LogRecordsItems0) UnmarshalBinary(b []byte) error { + var res ServiceOTLPLogExportRequestResourceLogsItems0ScopeLogsItems0LogRecordsItems0 + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/models/service_o_t_l_p_trace_export_request.go b/models/service_o_t_l_p_trace_export_request.go new file mode 100644 index 0000000..b170905 --- /dev/null +++ b/models/service_o_t_l_p_trace_export_request.go @@ -0,0 +1,1185 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "strconv" + + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// ServiceOTLPTraceExportRequest service o t l p trace export request +// +// swagger:model service.OTLPTraceExportRequest +type ServiceOTLPTraceExportRequest struct { + + // resource spans + ResourceSpans []*ServiceOTLPTraceExportRequestResourceSpansItems0 `json:"resourceSpans"` +} + +// Validate validates this service o t l p trace export request +func (m *ServiceOTLPTraceExportRequest) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateResourceSpans(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *ServiceOTLPTraceExportRequest) validateResourceSpans(formats strfmt.Registry) error { + if swag.IsZero(m.ResourceSpans) { // not required + return nil + } + + for i := 0; i < len(m.ResourceSpans); i++ { + if swag.IsZero(m.ResourceSpans[i]) { // not required + continue + } + + if m.ResourceSpans[i] != nil { + if err := m.ResourceSpans[i].Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("resourceSpans" + "." + strconv.Itoa(i)) + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("resourceSpans" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +// ContextValidate validate this service o t l p trace export request based on the context it is used +func (m *ServiceOTLPTraceExportRequest) ContextValidate(ctx context.Context, formats strfmt.Registry) error { + var res []error + + if err := m.contextValidateResourceSpans(ctx, formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *ServiceOTLPTraceExportRequest) contextValidateResourceSpans(ctx context.Context, formats strfmt.Registry) error { + + for i := 0; i < len(m.ResourceSpans); i++ { + + if m.ResourceSpans[i] != nil { + + if swag.IsZero(m.ResourceSpans[i]) { // not required + return nil + } + + if err := m.ResourceSpans[i].ContextValidate(ctx, formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("resourceSpans" + "." + strconv.Itoa(i)) + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("resourceSpans" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +// MarshalBinary interface implementation +func (m *ServiceOTLPTraceExportRequest) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *ServiceOTLPTraceExportRequest) UnmarshalBinary(b []byte) error { + var res ServiceOTLPTraceExportRequest + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} + +// ServiceOTLPTraceExportRequestResourceSpansItems0 service o t l p trace export request resource spans items0 +// +// swagger:model ServiceOTLPTraceExportRequestResourceSpansItems0 +type ServiceOTLPTraceExportRequestResourceSpansItems0 struct { + + // resource + Resource *ServiceOTLPTraceExportRequestResourceSpansItems0Resource `json:"resource,omitempty"` + + // scope spans + ScopeSpans []*ServiceOTLPTraceExportRequestResourceSpansItems0ScopeSpansItems0 `json:"scopeSpans"` +} + +// Validate validates this service o t l p trace export request resource spans items0 +func (m *ServiceOTLPTraceExportRequestResourceSpansItems0) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateResource(formats); err != nil { + res = append(res, err) + } + + if err := m.validateScopeSpans(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *ServiceOTLPTraceExportRequestResourceSpansItems0) validateResource(formats strfmt.Registry) error { + if swag.IsZero(m.Resource) { // not required + return nil + } + + if m.Resource != nil { + if err := m.Resource.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("resource") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("resource") + } + return err + } + } + + return nil +} + +func (m *ServiceOTLPTraceExportRequestResourceSpansItems0) validateScopeSpans(formats strfmt.Registry) error { + if swag.IsZero(m.ScopeSpans) { // not required + return nil + } + + for i := 0; i < len(m.ScopeSpans); i++ { + if swag.IsZero(m.ScopeSpans[i]) { // not required + continue + } + + if m.ScopeSpans[i] != nil { + if err := m.ScopeSpans[i].Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("scopeSpans" + "." + strconv.Itoa(i)) + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("scopeSpans" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +// ContextValidate validate this service o t l p trace export request resource spans items0 based on the context it is used +func (m *ServiceOTLPTraceExportRequestResourceSpansItems0) ContextValidate(ctx context.Context, formats strfmt.Registry) error { + var res []error + + if err := m.contextValidateResource(ctx, formats); err != nil { + res = append(res, err) + } + + if err := m.contextValidateScopeSpans(ctx, formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *ServiceOTLPTraceExportRequestResourceSpansItems0) contextValidateResource(ctx context.Context, formats strfmt.Registry) error { + + if m.Resource != nil { + + if swag.IsZero(m.Resource) { // not required + return nil + } + + if err := m.Resource.ContextValidate(ctx, formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("resource") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("resource") + } + return err + } + } + + return nil +} + +func (m *ServiceOTLPTraceExportRequestResourceSpansItems0) contextValidateScopeSpans(ctx context.Context, formats strfmt.Registry) error { + + for i := 0; i < len(m.ScopeSpans); i++ { + + if m.ScopeSpans[i] != nil { + + if swag.IsZero(m.ScopeSpans[i]) { // not required + return nil + } + + if err := m.ScopeSpans[i].ContextValidate(ctx, formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("scopeSpans" + "." + strconv.Itoa(i)) + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("scopeSpans" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +// MarshalBinary interface implementation +func (m *ServiceOTLPTraceExportRequestResourceSpansItems0) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *ServiceOTLPTraceExportRequestResourceSpansItems0) UnmarshalBinary(b []byte) error { + var res ServiceOTLPTraceExportRequestResourceSpansItems0 + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} + +// ServiceOTLPTraceExportRequestResourceSpansItems0Resource service o t l p trace export request resource spans items0 resource +// +// swagger:model ServiceOTLPTraceExportRequestResourceSpansItems0Resource +type ServiceOTLPTraceExportRequestResourceSpansItems0Resource struct { + + // attributes + Attributes []*ServiceOTLPTraceExportRequestResourceSpansItems0ResourceAttributesItems0 `json:"attributes"` +} + +// Validate validates this service o t l p trace export request resource spans items0 resource +func (m *ServiceOTLPTraceExportRequestResourceSpansItems0Resource) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateAttributes(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *ServiceOTLPTraceExportRequestResourceSpansItems0Resource) validateAttributes(formats strfmt.Registry) error { + if swag.IsZero(m.Attributes) { // not required + return nil + } + + for i := 0; i < len(m.Attributes); i++ { + if swag.IsZero(m.Attributes[i]) { // not required + continue + } + + if m.Attributes[i] != nil { + if err := m.Attributes[i].Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("resource" + "." + "attributes" + "." + strconv.Itoa(i)) + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("resource" + "." + "attributes" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +// ContextValidate validate this service o t l p trace export request resource spans items0 resource based on the context it is used +func (m *ServiceOTLPTraceExportRequestResourceSpansItems0Resource) ContextValidate(ctx context.Context, formats strfmt.Registry) error { + var res []error + + if err := m.contextValidateAttributes(ctx, formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *ServiceOTLPTraceExportRequestResourceSpansItems0Resource) contextValidateAttributes(ctx context.Context, formats strfmt.Registry) error { + + for i := 0; i < len(m.Attributes); i++ { + + if m.Attributes[i] != nil { + + if swag.IsZero(m.Attributes[i]) { // not required + return nil + } + + if err := m.Attributes[i].ContextValidate(ctx, formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("resource" + "." + "attributes" + "." + strconv.Itoa(i)) + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("resource" + "." + "attributes" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +// MarshalBinary interface implementation +func (m *ServiceOTLPTraceExportRequestResourceSpansItems0Resource) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *ServiceOTLPTraceExportRequestResourceSpansItems0Resource) UnmarshalBinary(b []byte) error { + var res ServiceOTLPTraceExportRequestResourceSpansItems0Resource + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} + +// ServiceOTLPTraceExportRequestResourceSpansItems0ResourceAttributesItems0 service o t l p trace export request resource spans items0 resource attributes items0 +// +// swagger:model ServiceOTLPTraceExportRequestResourceSpansItems0ResourceAttributesItems0 +type ServiceOTLPTraceExportRequestResourceSpansItems0ResourceAttributesItems0 struct { + + // key + Key string `json:"key,omitempty"` + + // value + Value *ServiceOTLPTraceExportRequestResourceSpansItems0ResourceAttributesItems0Value `json:"value,omitempty"` +} + +// Validate validates this service o t l p trace export request resource spans items0 resource attributes items0 +func (m *ServiceOTLPTraceExportRequestResourceSpansItems0ResourceAttributesItems0) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateValue(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *ServiceOTLPTraceExportRequestResourceSpansItems0ResourceAttributesItems0) validateValue(formats strfmt.Registry) error { + if swag.IsZero(m.Value) { // not required + return nil + } + + if m.Value != nil { + if err := m.Value.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("value") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("value") + } + return err + } + } + + return nil +} + +// ContextValidate validate this service o t l p trace export request resource spans items0 resource attributes items0 based on the context it is used +func (m *ServiceOTLPTraceExportRequestResourceSpansItems0ResourceAttributesItems0) ContextValidate(ctx context.Context, formats strfmt.Registry) error { + var res []error + + if err := m.contextValidateValue(ctx, formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *ServiceOTLPTraceExportRequestResourceSpansItems0ResourceAttributesItems0) contextValidateValue(ctx context.Context, formats strfmt.Registry) error { + + if m.Value != nil { + + if swag.IsZero(m.Value) { // not required + return nil + } + + if err := m.Value.ContextValidate(ctx, formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("value") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("value") + } + return err + } + } + + return nil +} + +// MarshalBinary interface implementation +func (m *ServiceOTLPTraceExportRequestResourceSpansItems0ResourceAttributesItems0) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *ServiceOTLPTraceExportRequestResourceSpansItems0ResourceAttributesItems0) UnmarshalBinary(b []byte) error { + var res ServiceOTLPTraceExportRequestResourceSpansItems0ResourceAttributesItems0 + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} + +// ServiceOTLPTraceExportRequestResourceSpansItems0ResourceAttributesItems0Value service o t l p trace export request resource spans items0 resource attributes items0 value +// +// swagger:model ServiceOTLPTraceExportRequestResourceSpansItems0ResourceAttributesItems0Value +type ServiceOTLPTraceExportRequestResourceSpansItems0ResourceAttributesItems0Value struct { + + // string value + StringValue string `json:"stringValue,omitempty"` +} + +// Validate validates this service o t l p trace export request resource spans items0 resource attributes items0 value +func (m *ServiceOTLPTraceExportRequestResourceSpansItems0ResourceAttributesItems0Value) Validate(formats strfmt.Registry) error { + return nil +} + +// ContextValidate validates this service o t l p trace export request resource spans items0 resource attributes items0 value based on context it is used +func (m *ServiceOTLPTraceExportRequestResourceSpansItems0ResourceAttributesItems0Value) ContextValidate(ctx context.Context, formats strfmt.Registry) error { + return nil +} + +// MarshalBinary interface implementation +func (m *ServiceOTLPTraceExportRequestResourceSpansItems0ResourceAttributesItems0Value) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *ServiceOTLPTraceExportRequestResourceSpansItems0ResourceAttributesItems0Value) UnmarshalBinary(b []byte) error { + var res ServiceOTLPTraceExportRequestResourceSpansItems0ResourceAttributesItems0Value + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} + +// ServiceOTLPTraceExportRequestResourceSpansItems0ScopeSpansItems0 service o t l p trace export request resource spans items0 scope spans items0 +// +// swagger:model ServiceOTLPTraceExportRequestResourceSpansItems0ScopeSpansItems0 +type ServiceOTLPTraceExportRequestResourceSpansItems0ScopeSpansItems0 struct { + + // scope + Scope *ServiceOTLPTraceExportRequestResourceSpansItems0ScopeSpansItems0Scope `json:"scope,omitempty"` + + // spans + Spans []*ServiceOTLPTraceExportRequestResourceSpansItems0ScopeSpansItems0SpansItems0 `json:"spans"` +} + +// Validate validates this service o t l p trace export request resource spans items0 scope spans items0 +func (m *ServiceOTLPTraceExportRequestResourceSpansItems0ScopeSpansItems0) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateScope(formats); err != nil { + res = append(res, err) + } + + if err := m.validateSpans(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *ServiceOTLPTraceExportRequestResourceSpansItems0ScopeSpansItems0) validateScope(formats strfmt.Registry) error { + if swag.IsZero(m.Scope) { // not required + return nil + } + + if m.Scope != nil { + if err := m.Scope.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("scope") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("scope") + } + return err + } + } + + return nil +} + +func (m *ServiceOTLPTraceExportRequestResourceSpansItems0ScopeSpansItems0) validateSpans(formats strfmt.Registry) error { + if swag.IsZero(m.Spans) { // not required + return nil + } + + for i := 0; i < len(m.Spans); i++ { + if swag.IsZero(m.Spans[i]) { // not required + continue + } + + if m.Spans[i] != nil { + if err := m.Spans[i].Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("spans" + "." + strconv.Itoa(i)) + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("spans" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +// ContextValidate validate this service o t l p trace export request resource spans items0 scope spans items0 based on the context it is used +func (m *ServiceOTLPTraceExportRequestResourceSpansItems0ScopeSpansItems0) ContextValidate(ctx context.Context, formats strfmt.Registry) error { + var res []error + + if err := m.contextValidateScope(ctx, formats); err != nil { + res = append(res, err) + } + + if err := m.contextValidateSpans(ctx, formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *ServiceOTLPTraceExportRequestResourceSpansItems0ScopeSpansItems0) contextValidateScope(ctx context.Context, formats strfmt.Registry) error { + + if m.Scope != nil { + + if swag.IsZero(m.Scope) { // not required + return nil + } + + if err := m.Scope.ContextValidate(ctx, formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("scope") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("scope") + } + return err + } + } + + return nil +} + +func (m *ServiceOTLPTraceExportRequestResourceSpansItems0ScopeSpansItems0) contextValidateSpans(ctx context.Context, formats strfmt.Registry) error { + + for i := 0; i < len(m.Spans); i++ { + + if m.Spans[i] != nil { + + if swag.IsZero(m.Spans[i]) { // not required + return nil + } + + if err := m.Spans[i].ContextValidate(ctx, formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("spans" + "." + strconv.Itoa(i)) + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("spans" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +// MarshalBinary interface implementation +func (m *ServiceOTLPTraceExportRequestResourceSpansItems0ScopeSpansItems0) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *ServiceOTLPTraceExportRequestResourceSpansItems0ScopeSpansItems0) UnmarshalBinary(b []byte) error { + var res ServiceOTLPTraceExportRequestResourceSpansItems0ScopeSpansItems0 + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} + +// ServiceOTLPTraceExportRequestResourceSpansItems0ScopeSpansItems0Scope service o t l p trace export request resource spans items0 scope spans items0 scope +// +// swagger:model ServiceOTLPTraceExportRequestResourceSpansItems0ScopeSpansItems0Scope +type ServiceOTLPTraceExportRequestResourceSpansItems0ScopeSpansItems0Scope struct { + + // attributes + Attributes []*ServiceOTLPTraceExportRequestResourceSpansItems0ScopeSpansItems0ScopeAttributesItems0 `json:"attributes"` + + // name + Name string `json:"name,omitempty"` + + // version + Version string `json:"version,omitempty"` +} + +// Validate validates this service o t l p trace export request resource spans items0 scope spans items0 scope +func (m *ServiceOTLPTraceExportRequestResourceSpansItems0ScopeSpansItems0Scope) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateAttributes(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *ServiceOTLPTraceExportRequestResourceSpansItems0ScopeSpansItems0Scope) validateAttributes(formats strfmt.Registry) error { + if swag.IsZero(m.Attributes) { // not required + return nil + } + + for i := 0; i < len(m.Attributes); i++ { + if swag.IsZero(m.Attributes[i]) { // not required + continue + } + + if m.Attributes[i] != nil { + if err := m.Attributes[i].Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("scope" + "." + "attributes" + "." + strconv.Itoa(i)) + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("scope" + "." + "attributes" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +// ContextValidate validate this service o t l p trace export request resource spans items0 scope spans items0 scope based on the context it is used +func (m *ServiceOTLPTraceExportRequestResourceSpansItems0ScopeSpansItems0Scope) ContextValidate(ctx context.Context, formats strfmt.Registry) error { + var res []error + + if err := m.contextValidateAttributes(ctx, formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *ServiceOTLPTraceExportRequestResourceSpansItems0ScopeSpansItems0Scope) contextValidateAttributes(ctx context.Context, formats strfmt.Registry) error { + + for i := 0; i < len(m.Attributes); i++ { + + if m.Attributes[i] != nil { + + if swag.IsZero(m.Attributes[i]) { // not required + return nil + } + + if err := m.Attributes[i].ContextValidate(ctx, formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("scope" + "." + "attributes" + "." + strconv.Itoa(i)) + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("scope" + "." + "attributes" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +// MarshalBinary interface implementation +func (m *ServiceOTLPTraceExportRequestResourceSpansItems0ScopeSpansItems0Scope) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *ServiceOTLPTraceExportRequestResourceSpansItems0ScopeSpansItems0Scope) UnmarshalBinary(b []byte) error { + var res ServiceOTLPTraceExportRequestResourceSpansItems0ScopeSpansItems0Scope + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} + +// ServiceOTLPTraceExportRequestResourceSpansItems0ScopeSpansItems0ScopeAttributesItems0 service o t l p trace export request resource spans items0 scope spans items0 scope attributes items0 +// +// swagger:model ServiceOTLPTraceExportRequestResourceSpansItems0ScopeSpansItems0ScopeAttributesItems0 +type ServiceOTLPTraceExportRequestResourceSpansItems0ScopeSpansItems0ScopeAttributesItems0 struct { + + // key + Key string `json:"key,omitempty"` + + // value + Value *ServiceOTLPTraceExportRequestResourceSpansItems0ScopeSpansItems0ScopeAttributesItems0Value `json:"value,omitempty"` +} + +// Validate validates this service o t l p trace export request resource spans items0 scope spans items0 scope attributes items0 +func (m *ServiceOTLPTraceExportRequestResourceSpansItems0ScopeSpansItems0ScopeAttributesItems0) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateValue(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *ServiceOTLPTraceExportRequestResourceSpansItems0ScopeSpansItems0ScopeAttributesItems0) validateValue(formats strfmt.Registry) error { + if swag.IsZero(m.Value) { // not required + return nil + } + + if m.Value != nil { + if err := m.Value.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("value") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("value") + } + return err + } + } + + return nil +} + +// ContextValidate validate this service o t l p trace export request resource spans items0 scope spans items0 scope attributes items0 based on the context it is used +func (m *ServiceOTLPTraceExportRequestResourceSpansItems0ScopeSpansItems0ScopeAttributesItems0) ContextValidate(ctx context.Context, formats strfmt.Registry) error { + var res []error + + if err := m.contextValidateValue(ctx, formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *ServiceOTLPTraceExportRequestResourceSpansItems0ScopeSpansItems0ScopeAttributesItems0) contextValidateValue(ctx context.Context, formats strfmt.Registry) error { + + if m.Value != nil { + + if swag.IsZero(m.Value) { // not required + return nil + } + + if err := m.Value.ContextValidate(ctx, formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("value") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("value") + } + return err + } + } + + return nil +} + +// MarshalBinary interface implementation +func (m *ServiceOTLPTraceExportRequestResourceSpansItems0ScopeSpansItems0ScopeAttributesItems0) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *ServiceOTLPTraceExportRequestResourceSpansItems0ScopeSpansItems0ScopeAttributesItems0) UnmarshalBinary(b []byte) error { + var res ServiceOTLPTraceExportRequestResourceSpansItems0ScopeSpansItems0ScopeAttributesItems0 + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} + +// ServiceOTLPTraceExportRequestResourceSpansItems0ScopeSpansItems0ScopeAttributesItems0Value service o t l p trace export request resource spans items0 scope spans items0 scope attributes items0 value +// +// swagger:model ServiceOTLPTraceExportRequestResourceSpansItems0ScopeSpansItems0ScopeAttributesItems0Value +type ServiceOTLPTraceExportRequestResourceSpansItems0ScopeSpansItems0ScopeAttributesItems0Value struct { + + // string value + StringValue string `json:"stringValue,omitempty"` +} + +// Validate validates this service o t l p trace export request resource spans items0 scope spans items0 scope attributes items0 value +func (m *ServiceOTLPTraceExportRequestResourceSpansItems0ScopeSpansItems0ScopeAttributesItems0Value) Validate(formats strfmt.Registry) error { + return nil +} + +// ContextValidate validates this service o t l p trace export request resource spans items0 scope spans items0 scope attributes items0 value based on context it is used +func (m *ServiceOTLPTraceExportRequestResourceSpansItems0ScopeSpansItems0ScopeAttributesItems0Value) ContextValidate(ctx context.Context, formats strfmt.Registry) error { + return nil +} + +// MarshalBinary interface implementation +func (m *ServiceOTLPTraceExportRequestResourceSpansItems0ScopeSpansItems0ScopeAttributesItems0Value) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *ServiceOTLPTraceExportRequestResourceSpansItems0ScopeSpansItems0ScopeAttributesItems0Value) UnmarshalBinary(b []byte) error { + var res ServiceOTLPTraceExportRequestResourceSpansItems0ScopeSpansItems0ScopeAttributesItems0Value + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} + +// ServiceOTLPTraceExportRequestResourceSpansItems0ScopeSpansItems0SpansItems0 service o t l p trace export request resource spans items0 scope spans items0 spans items0 +// +// swagger:model ServiceOTLPTraceExportRequestResourceSpansItems0ScopeSpansItems0SpansItems0 +type ServiceOTLPTraceExportRequestResourceSpansItems0ScopeSpansItems0SpansItems0 struct { + + // attributes + Attributes []*ServiceOTLPTraceExportRequestResourceSpansItems0ScopeSpansItems0SpansItems0AttributesItems0 `json:"attributes"` + + // end time unix nano + EndTimeUnixNano string `json:"endTimeUnixNano,omitempty"` + + // kind + Kind int64 `json:"kind,omitempty"` + + // name + Name string `json:"name,omitempty"` + + // parent span Id + ParentSpanID string `json:"parentSpanId,omitempty"` + + // span Id + SpanID string `json:"spanId,omitempty"` + + // start time unix nano + StartTimeUnixNano string `json:"startTimeUnixNano,omitempty"` + + // trace Id + TraceID string `json:"traceId,omitempty"` +} + +// Validate validates this service o t l p trace export request resource spans items0 scope spans items0 spans items0 +func (m *ServiceOTLPTraceExportRequestResourceSpansItems0ScopeSpansItems0SpansItems0) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateAttributes(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *ServiceOTLPTraceExportRequestResourceSpansItems0ScopeSpansItems0SpansItems0) validateAttributes(formats strfmt.Registry) error { + if swag.IsZero(m.Attributes) { // not required + return nil + } + + for i := 0; i < len(m.Attributes); i++ { + if swag.IsZero(m.Attributes[i]) { // not required + continue + } + + if m.Attributes[i] != nil { + if err := m.Attributes[i].Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("attributes" + "." + strconv.Itoa(i)) + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("attributes" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +// ContextValidate validate this service o t l p trace export request resource spans items0 scope spans items0 spans items0 based on the context it is used +func (m *ServiceOTLPTraceExportRequestResourceSpansItems0ScopeSpansItems0SpansItems0) ContextValidate(ctx context.Context, formats strfmt.Registry) error { + var res []error + + if err := m.contextValidateAttributes(ctx, formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *ServiceOTLPTraceExportRequestResourceSpansItems0ScopeSpansItems0SpansItems0) contextValidateAttributes(ctx context.Context, formats strfmt.Registry) error { + + for i := 0; i < len(m.Attributes); i++ { + + if m.Attributes[i] != nil { + + if swag.IsZero(m.Attributes[i]) { // not required + return nil + } + + if err := m.Attributes[i].ContextValidate(ctx, formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("attributes" + "." + strconv.Itoa(i)) + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("attributes" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +// MarshalBinary interface implementation +func (m *ServiceOTLPTraceExportRequestResourceSpansItems0ScopeSpansItems0SpansItems0) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *ServiceOTLPTraceExportRequestResourceSpansItems0ScopeSpansItems0SpansItems0) UnmarshalBinary(b []byte) error { + var res ServiceOTLPTraceExportRequestResourceSpansItems0ScopeSpansItems0SpansItems0 + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} + +// ServiceOTLPTraceExportRequestResourceSpansItems0ScopeSpansItems0SpansItems0AttributesItems0 service o t l p trace export request resource spans items0 scope spans items0 spans items0 attributes items0 +// +// swagger:model ServiceOTLPTraceExportRequestResourceSpansItems0ScopeSpansItems0SpansItems0AttributesItems0 +type ServiceOTLPTraceExportRequestResourceSpansItems0ScopeSpansItems0SpansItems0AttributesItems0 struct { + + // key + Key string `json:"key,omitempty"` + + // value + Value *ServiceOTLPTraceExportRequestResourceSpansItems0ScopeSpansItems0SpansItems0AttributesItems0Value `json:"value,omitempty"` +} + +// Validate validates this service o t l p trace export request resource spans items0 scope spans items0 spans items0 attributes items0 +func (m *ServiceOTLPTraceExportRequestResourceSpansItems0ScopeSpansItems0SpansItems0AttributesItems0) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateValue(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *ServiceOTLPTraceExportRequestResourceSpansItems0ScopeSpansItems0SpansItems0AttributesItems0) validateValue(formats strfmt.Registry) error { + if swag.IsZero(m.Value) { // not required + return nil + } + + if m.Value != nil { + if err := m.Value.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("value") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("value") + } + return err + } + } + + return nil +} + +// ContextValidate validate this service o t l p trace export request resource spans items0 scope spans items0 spans items0 attributes items0 based on the context it is used +func (m *ServiceOTLPTraceExportRequestResourceSpansItems0ScopeSpansItems0SpansItems0AttributesItems0) ContextValidate(ctx context.Context, formats strfmt.Registry) error { + var res []error + + if err := m.contextValidateValue(ctx, formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *ServiceOTLPTraceExportRequestResourceSpansItems0ScopeSpansItems0SpansItems0AttributesItems0) contextValidateValue(ctx context.Context, formats strfmt.Registry) error { + + if m.Value != nil { + + if swag.IsZero(m.Value) { // not required + return nil + } + + if err := m.Value.ContextValidate(ctx, formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("value") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("value") + } + return err + } + } + + return nil +} + +// MarshalBinary interface implementation +func (m *ServiceOTLPTraceExportRequestResourceSpansItems0ScopeSpansItems0SpansItems0AttributesItems0) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *ServiceOTLPTraceExportRequestResourceSpansItems0ScopeSpansItems0SpansItems0AttributesItems0) UnmarshalBinary(b []byte) error { + var res ServiceOTLPTraceExportRequestResourceSpansItems0ScopeSpansItems0SpansItems0AttributesItems0 + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} + +// ServiceOTLPTraceExportRequestResourceSpansItems0ScopeSpansItems0SpansItems0AttributesItems0Value service o t l p trace export request resource spans items0 scope spans items0 spans items0 attributes items0 value +// +// swagger:model ServiceOTLPTraceExportRequestResourceSpansItems0ScopeSpansItems0SpansItems0AttributesItems0Value +type ServiceOTLPTraceExportRequestResourceSpansItems0ScopeSpansItems0SpansItems0AttributesItems0Value struct { + + // string value + StringValue string `json:"stringValue,omitempty"` +} + +// Validate validates this service o t l p trace export request resource spans items0 scope spans items0 spans items0 attributes items0 value +func (m *ServiceOTLPTraceExportRequestResourceSpansItems0ScopeSpansItems0SpansItems0AttributesItems0Value) Validate(formats strfmt.Registry) error { + return nil +} + +// ContextValidate validates this service o t l p trace export request resource spans items0 scope spans items0 spans items0 attributes items0 value based on context it is used +func (m *ServiceOTLPTraceExportRequestResourceSpansItems0ScopeSpansItems0SpansItems0AttributesItems0Value) ContextValidate(ctx context.Context, formats strfmt.Registry) error { + return nil +} + +// MarshalBinary interface implementation +func (m *ServiceOTLPTraceExportRequestResourceSpansItems0ScopeSpansItems0SpansItems0AttributesItems0Value) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *ServiceOTLPTraceExportRequestResourceSpansItems0ScopeSpansItems0SpansItems0AttributesItems0Value) UnmarshalBinary(b []byte) error { + var res ServiceOTLPTraceExportRequestResourceSpansItems0ScopeSpansItems0SpansItems0AttributesItems0Value + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/models/service_resource.go b/models/service_resource.go new file mode 100644 index 0000000..aba967e --- /dev/null +++ b/models/service_resource.go @@ -0,0 +1,121 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "strconv" + + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// ServiceResource service resource +// +// swagger:model service.Resource +type ServiceResource struct { + + // attributes + Attributes []*ServiceAttribute `json:"attributes"` +} + +// Validate validates this service resource +func (m *ServiceResource) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateAttributes(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *ServiceResource) validateAttributes(formats strfmt.Registry) error { + if swag.IsZero(m.Attributes) { // not required + return nil + } + + for i := 0; i < len(m.Attributes); i++ { + if swag.IsZero(m.Attributes[i]) { // not required + continue + } + + if m.Attributes[i] != nil { + if err := m.Attributes[i].Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("attributes" + "." + strconv.Itoa(i)) + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("attributes" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +// ContextValidate validate this service resource based on the context it is used +func (m *ServiceResource) ContextValidate(ctx context.Context, formats strfmt.Registry) error { + var res []error + + if err := m.contextValidateAttributes(ctx, formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *ServiceResource) contextValidateAttributes(ctx context.Context, formats strfmt.Registry) error { + + for i := 0; i < len(m.Attributes); i++ { + + if m.Attributes[i] != nil { + + if swag.IsZero(m.Attributes[i]) { // not required + return nil + } + + if err := m.Attributes[i].ContextValidate(ctx, formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("attributes" + "." + strconv.Itoa(i)) + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("attributes" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +// MarshalBinary interface implementation +func (m *ServiceResource) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *ServiceResource) UnmarshalBinary(b []byte) error { + var res ServiceResource + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/models/service_scope.go b/models/service_scope.go new file mode 100644 index 0000000..15030de --- /dev/null +++ b/models/service_scope.go @@ -0,0 +1,130 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "strconv" + + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// ServiceScope service scope +// +// swagger:model service.Scope +type ServiceScope struct { + + // attributes + Attributes []*ServiceAttribute `json:"attributes"` + + // dropped attributes count + DroppedAttributesCount int64 `json:"droppedAttributesCount,omitempty"` + + // name + Name string `json:"name,omitempty"` + + // version + Version string `json:"version,omitempty"` +} + +// Validate validates this service scope +func (m *ServiceScope) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateAttributes(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *ServiceScope) validateAttributes(formats strfmt.Registry) error { + if swag.IsZero(m.Attributes) { // not required + return nil + } + + for i := 0; i < len(m.Attributes); i++ { + if swag.IsZero(m.Attributes[i]) { // not required + continue + } + + if m.Attributes[i] != nil { + if err := m.Attributes[i].Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("attributes" + "." + strconv.Itoa(i)) + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("attributes" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +// ContextValidate validate this service scope based on the context it is used +func (m *ServiceScope) ContextValidate(ctx context.Context, formats strfmt.Registry) error { + var res []error + + if err := m.contextValidateAttributes(ctx, formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *ServiceScope) contextValidateAttributes(ctx context.Context, formats strfmt.Registry) error { + + for i := 0; i < len(m.Attributes); i++ { + + if m.Attributes[i] != nil { + + if swag.IsZero(m.Attributes[i]) { // not required + return nil + } + + if err := m.Attributes[i].ContextValidate(ctx, formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("attributes" + "." + strconv.Itoa(i)) + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("attributes" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +// MarshalBinary interface implementation +func (m *ServiceScope) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *ServiceScope) UnmarshalBinary(b []byte) error { + var res ServiceScope + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/models/time_duration.go b/models/time_duration.go deleted file mode 100644 index 6799f91..0000000 --- a/models/time_duration.go +++ /dev/null @@ -1,16 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package models - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( -) - -// TimeDuration time duration -// -// swagger:model time.Duration - - -// ContextValidate validates this time duration based on context it is used