gtslib/client/accounts/account_update_responses.go
decentral1se e4ade9c758
All checks were successful
continuous-integration/drone/push Build is passing
feat: init
2024-07-31 22:47:18 +02:00

417 lines
13 KiB
Go

// Code generated by go-swagger; DO NOT EDIT.
package accounts
// 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"
"git.coopcloud.tech/decentral1se/gtslib/models"
)
// AccountUpdateReader is a Reader for the AccountUpdate structure.
type AccountUpdateReader struct {
formats strfmt.Registry
}
// ReadResponse reads a server response into the received o.
func (o *AccountUpdateReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) {
switch response.Code() {
case 200:
result := NewAccountUpdateOK()
if err := result.readResponse(response, consumer, o.formats); err != nil {
return nil, err
}
return result, nil
case 400:
result := NewAccountUpdateBadRequest()
if err := result.readResponse(response, consumer, o.formats); err != nil {
return nil, err
}
return nil, result
case 401:
result := NewAccountUpdateUnauthorized()
if err := result.readResponse(response, consumer, o.formats); err != nil {
return nil, err
}
return nil, result
case 404:
result := NewAccountUpdateNotFound()
if err := result.readResponse(response, consumer, o.formats); err != nil {
return nil, err
}
return nil, result
case 406:
result := NewAccountUpdateNotAcceptable()
if err := result.readResponse(response, consumer, o.formats); err != nil {
return nil, err
}
return nil, result
case 500:
result := NewAccountUpdateInternalServerError()
if err := result.readResponse(response, consumer, o.formats); err != nil {
return nil, err
}
return nil, result
default:
return nil, runtime.NewAPIError("[PATCH /api/v1/accounts/update_credentials] accountUpdate", response, response.Code())
}
}
// NewAccountUpdateOK creates a AccountUpdateOK with default headers values
func NewAccountUpdateOK() *AccountUpdateOK {
return &AccountUpdateOK{}
}
/*
AccountUpdateOK describes a response with status code 200, with default header values.
The newly updated account.
*/
type AccountUpdateOK struct {
Payload *models.Account
}
// IsSuccess returns true when this account update o k response has a 2xx status code
func (o *AccountUpdateOK) IsSuccess() bool {
return true
}
// IsRedirect returns true when this account update o k response has a 3xx status code
func (o *AccountUpdateOK) IsRedirect() bool {
return false
}
// IsClientError returns true when this account update o k response has a 4xx status code
func (o *AccountUpdateOK) IsClientError() bool {
return false
}
// IsServerError returns true when this account update o k response has a 5xx status code
func (o *AccountUpdateOK) IsServerError() bool {
return false
}
// IsCode returns true when this account update o k response a status code equal to that given
func (o *AccountUpdateOK) IsCode(code int) bool {
return code == 200
}
// Code gets the status code for the account update o k response
func (o *AccountUpdateOK) Code() int {
return 200
}
func (o *AccountUpdateOK) Error() string {
payload, _ := json.Marshal(o.Payload)
return fmt.Sprintf("[PATCH /api/v1/accounts/update_credentials][%d] accountUpdateOK %s", 200, payload)
}
func (o *AccountUpdateOK) String() string {
payload, _ := json.Marshal(o.Payload)
return fmt.Sprintf("[PATCH /api/v1/accounts/update_credentials][%d] accountUpdateOK %s", 200, payload)
}
func (o *AccountUpdateOK) GetPayload() *models.Account {
return o.Payload
}
func (o *AccountUpdateOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
o.Payload = new(models.Account)
// response payload
if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF {
return err
}
return nil
}
// NewAccountUpdateBadRequest creates a AccountUpdateBadRequest with default headers values
func NewAccountUpdateBadRequest() *AccountUpdateBadRequest {
return &AccountUpdateBadRequest{}
}
/*
AccountUpdateBadRequest describes a response with status code 400, with default header values.
bad request
*/
type AccountUpdateBadRequest struct {
}
// IsSuccess returns true when this account update bad request response has a 2xx status code
func (o *AccountUpdateBadRequest) IsSuccess() bool {
return false
}
// IsRedirect returns true when this account update bad request response has a 3xx status code
func (o *AccountUpdateBadRequest) IsRedirect() bool {
return false
}
// IsClientError returns true when this account update bad request response has a 4xx status code
func (o *AccountUpdateBadRequest) IsClientError() bool {
return true
}
// IsServerError returns true when this account update bad request response has a 5xx status code
func (o *AccountUpdateBadRequest) IsServerError() bool {
return false
}
// IsCode returns true when this account update bad request response a status code equal to that given
func (o *AccountUpdateBadRequest) IsCode(code int) bool {
return code == 400
}
// Code gets the status code for the account update bad request response
func (o *AccountUpdateBadRequest) Code() int {
return 400
}
func (o *AccountUpdateBadRequest) Error() string {
return fmt.Sprintf("[PATCH /api/v1/accounts/update_credentials][%d] accountUpdateBadRequest", 400)
}
func (o *AccountUpdateBadRequest) String() string {
return fmt.Sprintf("[PATCH /api/v1/accounts/update_credentials][%d] accountUpdateBadRequest", 400)
}
func (o *AccountUpdateBadRequest) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
return nil
}
// NewAccountUpdateUnauthorized creates a AccountUpdateUnauthorized with default headers values
func NewAccountUpdateUnauthorized() *AccountUpdateUnauthorized {
return &AccountUpdateUnauthorized{}
}
/*
AccountUpdateUnauthorized describes a response with status code 401, with default header values.
unauthorized
*/
type AccountUpdateUnauthorized struct {
}
// IsSuccess returns true when this account update unauthorized response has a 2xx status code
func (o *AccountUpdateUnauthorized) IsSuccess() bool {
return false
}
// IsRedirect returns true when this account update unauthorized response has a 3xx status code
func (o *AccountUpdateUnauthorized) IsRedirect() bool {
return false
}
// IsClientError returns true when this account update unauthorized response has a 4xx status code
func (o *AccountUpdateUnauthorized) IsClientError() bool {
return true
}
// IsServerError returns true when this account update unauthorized response has a 5xx status code
func (o *AccountUpdateUnauthorized) IsServerError() bool {
return false
}
// IsCode returns true when this account update unauthorized response a status code equal to that given
func (o *AccountUpdateUnauthorized) IsCode(code int) bool {
return code == 401
}
// Code gets the status code for the account update unauthorized response
func (o *AccountUpdateUnauthorized) Code() int {
return 401
}
func (o *AccountUpdateUnauthorized) Error() string {
return fmt.Sprintf("[PATCH /api/v1/accounts/update_credentials][%d] accountUpdateUnauthorized", 401)
}
func (o *AccountUpdateUnauthorized) String() string {
return fmt.Sprintf("[PATCH /api/v1/accounts/update_credentials][%d] accountUpdateUnauthorized", 401)
}
func (o *AccountUpdateUnauthorized) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
return nil
}
// NewAccountUpdateNotFound creates a AccountUpdateNotFound with default headers values
func NewAccountUpdateNotFound() *AccountUpdateNotFound {
return &AccountUpdateNotFound{}
}
/*
AccountUpdateNotFound describes a response with status code 404, with default header values.
not found
*/
type AccountUpdateNotFound struct {
}
// IsSuccess returns true when this account update not found response has a 2xx status code
func (o *AccountUpdateNotFound) IsSuccess() bool {
return false
}
// IsRedirect returns true when this account update not found response has a 3xx status code
func (o *AccountUpdateNotFound) IsRedirect() bool {
return false
}
// IsClientError returns true when this account update not found response has a 4xx status code
func (o *AccountUpdateNotFound) IsClientError() bool {
return true
}
// IsServerError returns true when this account update not found response has a 5xx status code
func (o *AccountUpdateNotFound) IsServerError() bool {
return false
}
// IsCode returns true when this account update not found response a status code equal to that given
func (o *AccountUpdateNotFound) IsCode(code int) bool {
return code == 404
}
// Code gets the status code for the account update not found response
func (o *AccountUpdateNotFound) Code() int {
return 404
}
func (o *AccountUpdateNotFound) Error() string {
return fmt.Sprintf("[PATCH /api/v1/accounts/update_credentials][%d] accountUpdateNotFound", 404)
}
func (o *AccountUpdateNotFound) String() string {
return fmt.Sprintf("[PATCH /api/v1/accounts/update_credentials][%d] accountUpdateNotFound", 404)
}
func (o *AccountUpdateNotFound) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
return nil
}
// NewAccountUpdateNotAcceptable creates a AccountUpdateNotAcceptable with default headers values
func NewAccountUpdateNotAcceptable() *AccountUpdateNotAcceptable {
return &AccountUpdateNotAcceptable{}
}
/*
AccountUpdateNotAcceptable describes a response with status code 406, with default header values.
not acceptable
*/
type AccountUpdateNotAcceptable struct {
}
// IsSuccess returns true when this account update not acceptable response has a 2xx status code
func (o *AccountUpdateNotAcceptable) IsSuccess() bool {
return false
}
// IsRedirect returns true when this account update not acceptable response has a 3xx status code
func (o *AccountUpdateNotAcceptable) IsRedirect() bool {
return false
}
// IsClientError returns true when this account update not acceptable response has a 4xx status code
func (o *AccountUpdateNotAcceptable) IsClientError() bool {
return true
}
// IsServerError returns true when this account update not acceptable response has a 5xx status code
func (o *AccountUpdateNotAcceptable) IsServerError() bool {
return false
}
// IsCode returns true when this account update not acceptable response a status code equal to that given
func (o *AccountUpdateNotAcceptable) IsCode(code int) bool {
return code == 406
}
// Code gets the status code for the account update not acceptable response
func (o *AccountUpdateNotAcceptable) Code() int {
return 406
}
func (o *AccountUpdateNotAcceptable) Error() string {
return fmt.Sprintf("[PATCH /api/v1/accounts/update_credentials][%d] accountUpdateNotAcceptable", 406)
}
func (o *AccountUpdateNotAcceptable) String() string {
return fmt.Sprintf("[PATCH /api/v1/accounts/update_credentials][%d] accountUpdateNotAcceptable", 406)
}
func (o *AccountUpdateNotAcceptable) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
return nil
}
// NewAccountUpdateInternalServerError creates a AccountUpdateInternalServerError with default headers values
func NewAccountUpdateInternalServerError() *AccountUpdateInternalServerError {
return &AccountUpdateInternalServerError{}
}
/*
AccountUpdateInternalServerError describes a response with status code 500, with default header values.
internal server error
*/
type AccountUpdateInternalServerError struct {
}
// IsSuccess returns true when this account update internal server error response has a 2xx status code
func (o *AccountUpdateInternalServerError) IsSuccess() bool {
return false
}
// IsRedirect returns true when this account update internal server error response has a 3xx status code
func (o *AccountUpdateInternalServerError) IsRedirect() bool {
return false
}
// IsClientError returns true when this account update internal server error response has a 4xx status code
func (o *AccountUpdateInternalServerError) IsClientError() bool {
return false
}
// IsServerError returns true when this account update internal server error response has a 5xx status code
func (o *AccountUpdateInternalServerError) IsServerError() bool {
return true
}
// IsCode returns true when this account update internal server error response a status code equal to that given
func (o *AccountUpdateInternalServerError) IsCode(code int) bool {
return code == 500
}
// Code gets the status code for the account update internal server error response
func (o *AccountUpdateInternalServerError) Code() int {
return 500
}
func (o *AccountUpdateInternalServerError) Error() string {
return fmt.Sprintf("[PATCH /api/v1/accounts/update_credentials][%d] accountUpdateInternalServerError", 500)
}
func (o *AccountUpdateInternalServerError) String() string {
return fmt.Sprintf("[PATCH /api/v1/accounts/update_credentials][%d] accountUpdateInternalServerError", 500)
}
func (o *AccountUpdateInternalServerError) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
return nil
}