gtslib/client/accounts/account_note_responses.go

417 lines
12 KiB
Go
Raw Normal View History

2024-07-28 20:36:17 +00:00
// 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"
)
// AccountNoteReader is a Reader for the AccountNote structure.
type AccountNoteReader struct {
formats strfmt.Registry
}
// ReadResponse reads a server response into the received o.
func (o *AccountNoteReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) {
switch response.Code() {
case 200:
result := NewAccountNoteOK()
if err := result.readResponse(response, consumer, o.formats); err != nil {
return nil, err
}
return result, nil
case 400:
result := NewAccountNoteBadRequest()
if err := result.readResponse(response, consumer, o.formats); err != nil {
return nil, err
}
return nil, result
case 401:
result := NewAccountNoteUnauthorized()
if err := result.readResponse(response, consumer, o.formats); err != nil {
return nil, err
}
return nil, result
case 404:
result := NewAccountNoteNotFound()
if err := result.readResponse(response, consumer, o.formats); err != nil {
return nil, err
}
return nil, result
case 406:
result := NewAccountNoteNotAcceptable()
if err := result.readResponse(response, consumer, o.formats); err != nil {
return nil, err
}
return nil, result
case 500:
result := NewAccountNoteInternalServerError()
if err := result.readResponse(response, consumer, o.formats); err != nil {
return nil, err
}
return nil, result
default:
return nil, runtime.NewAPIError("[POST /api/v1/accounts/{id}/note] accountNote", response, response.Code())
}
}
// NewAccountNoteOK creates a AccountNoteOK with default headers values
func NewAccountNoteOK() *AccountNoteOK {
return &AccountNoteOK{}
}
/*
AccountNoteOK describes a response with status code 200, with default header values.
Your relationship to the account.
*/
type AccountNoteOK struct {
Payload *models.Relationship
}
// IsSuccess returns true when this account note o k response has a 2xx status code
func (o *AccountNoteOK) IsSuccess() bool {
return true
}
// IsRedirect returns true when this account note o k response has a 3xx status code
func (o *AccountNoteOK) IsRedirect() bool {
return false
}
// IsClientError returns true when this account note o k response has a 4xx status code
func (o *AccountNoteOK) IsClientError() bool {
return false
}
// IsServerError returns true when this account note o k response has a 5xx status code
func (o *AccountNoteOK) IsServerError() bool {
return false
}
// IsCode returns true when this account note o k response a status code equal to that given
func (o *AccountNoteOK) IsCode(code int) bool {
return code == 200
}
// Code gets the status code for the account note o k response
func (o *AccountNoteOK) Code() int {
return 200
}
func (o *AccountNoteOK) Error() string {
payload, _ := json.Marshal(o.Payload)
return fmt.Sprintf("[POST /api/v1/accounts/{id}/note][%d] accountNoteOK %s", 200, payload)
}
func (o *AccountNoteOK) String() string {
payload, _ := json.Marshal(o.Payload)
return fmt.Sprintf("[POST /api/v1/accounts/{id}/note][%d] accountNoteOK %s", 200, payload)
}
func (o *AccountNoteOK) GetPayload() *models.Relationship {
return o.Payload
}
func (o *AccountNoteOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
o.Payload = new(models.Relationship)
// response payload
if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF {
return err
}
return nil
}
// NewAccountNoteBadRequest creates a AccountNoteBadRequest with default headers values
func NewAccountNoteBadRequest() *AccountNoteBadRequest {
return &AccountNoteBadRequest{}
}
/*
AccountNoteBadRequest describes a response with status code 400, with default header values.
bad request
*/
type AccountNoteBadRequest struct {
}
// IsSuccess returns true when this account note bad request response has a 2xx status code
func (o *AccountNoteBadRequest) IsSuccess() bool {
return false
}
// IsRedirect returns true when this account note bad request response has a 3xx status code
func (o *AccountNoteBadRequest) IsRedirect() bool {
return false
}
// IsClientError returns true when this account note bad request response has a 4xx status code
func (o *AccountNoteBadRequest) IsClientError() bool {
return true
}
// IsServerError returns true when this account note bad request response has a 5xx status code
func (o *AccountNoteBadRequest) IsServerError() bool {
return false
}
// IsCode returns true when this account note bad request response a status code equal to that given
func (o *AccountNoteBadRequest) IsCode(code int) bool {
return code == 400
}
// Code gets the status code for the account note bad request response
func (o *AccountNoteBadRequest) Code() int {
return 400
}
func (o *AccountNoteBadRequest) Error() string {
return fmt.Sprintf("[POST /api/v1/accounts/{id}/note][%d] accountNoteBadRequest", 400)
}
func (o *AccountNoteBadRequest) String() string {
return fmt.Sprintf("[POST /api/v1/accounts/{id}/note][%d] accountNoteBadRequest", 400)
}
func (o *AccountNoteBadRequest) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
return nil
}
// NewAccountNoteUnauthorized creates a AccountNoteUnauthorized with default headers values
func NewAccountNoteUnauthorized() *AccountNoteUnauthorized {
return &AccountNoteUnauthorized{}
}
/*
AccountNoteUnauthorized describes a response with status code 401, with default header values.
unauthorized
*/
type AccountNoteUnauthorized struct {
}
// IsSuccess returns true when this account note unauthorized response has a 2xx status code
func (o *AccountNoteUnauthorized) IsSuccess() bool {
return false
}
// IsRedirect returns true when this account note unauthorized response has a 3xx status code
func (o *AccountNoteUnauthorized) IsRedirect() bool {
return false
}
// IsClientError returns true when this account note unauthorized response has a 4xx status code
func (o *AccountNoteUnauthorized) IsClientError() bool {
return true
}
// IsServerError returns true when this account note unauthorized response has a 5xx status code
func (o *AccountNoteUnauthorized) IsServerError() bool {
return false
}
// IsCode returns true when this account note unauthorized response a status code equal to that given
func (o *AccountNoteUnauthorized) IsCode(code int) bool {
return code == 401
}
// Code gets the status code for the account note unauthorized response
func (o *AccountNoteUnauthorized) Code() int {
return 401
}
func (o *AccountNoteUnauthorized) Error() string {
return fmt.Sprintf("[POST /api/v1/accounts/{id}/note][%d] accountNoteUnauthorized", 401)
}
func (o *AccountNoteUnauthorized) String() string {
return fmt.Sprintf("[POST /api/v1/accounts/{id}/note][%d] accountNoteUnauthorized", 401)
}
func (o *AccountNoteUnauthorized) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
return nil
}
// NewAccountNoteNotFound creates a AccountNoteNotFound with default headers values
func NewAccountNoteNotFound() *AccountNoteNotFound {
return &AccountNoteNotFound{}
}
/*
AccountNoteNotFound describes a response with status code 404, with default header values.
not found
*/
type AccountNoteNotFound struct {
}
// IsSuccess returns true when this account note not found response has a 2xx status code
func (o *AccountNoteNotFound) IsSuccess() bool {
return false
}
// IsRedirect returns true when this account note not found response has a 3xx status code
func (o *AccountNoteNotFound) IsRedirect() bool {
return false
}
// IsClientError returns true when this account note not found response has a 4xx status code
func (o *AccountNoteNotFound) IsClientError() bool {
return true
}
// IsServerError returns true when this account note not found response has a 5xx status code
func (o *AccountNoteNotFound) IsServerError() bool {
return false
}
// IsCode returns true when this account note not found response a status code equal to that given
func (o *AccountNoteNotFound) IsCode(code int) bool {
return code == 404
}
// Code gets the status code for the account note not found response
func (o *AccountNoteNotFound) Code() int {
return 404
}
func (o *AccountNoteNotFound) Error() string {
return fmt.Sprintf("[POST /api/v1/accounts/{id}/note][%d] accountNoteNotFound", 404)
}
func (o *AccountNoteNotFound) String() string {
return fmt.Sprintf("[POST /api/v1/accounts/{id}/note][%d] accountNoteNotFound", 404)
}
func (o *AccountNoteNotFound) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
return nil
}
// NewAccountNoteNotAcceptable creates a AccountNoteNotAcceptable with default headers values
func NewAccountNoteNotAcceptable() *AccountNoteNotAcceptable {
return &AccountNoteNotAcceptable{}
}
/*
AccountNoteNotAcceptable describes a response with status code 406, with default header values.
not acceptable
*/
type AccountNoteNotAcceptable struct {
}
// IsSuccess returns true when this account note not acceptable response has a 2xx status code
func (o *AccountNoteNotAcceptable) IsSuccess() bool {
return false
}
// IsRedirect returns true when this account note not acceptable response has a 3xx status code
func (o *AccountNoteNotAcceptable) IsRedirect() bool {
return false
}
// IsClientError returns true when this account note not acceptable response has a 4xx status code
func (o *AccountNoteNotAcceptable) IsClientError() bool {
return true
}
// IsServerError returns true when this account note not acceptable response has a 5xx status code
func (o *AccountNoteNotAcceptable) IsServerError() bool {
return false
}
// IsCode returns true when this account note not acceptable response a status code equal to that given
func (o *AccountNoteNotAcceptable) IsCode(code int) bool {
return code == 406
}
// Code gets the status code for the account note not acceptable response
func (o *AccountNoteNotAcceptable) Code() int {
return 406
}
func (o *AccountNoteNotAcceptable) Error() string {
return fmt.Sprintf("[POST /api/v1/accounts/{id}/note][%d] accountNoteNotAcceptable", 406)
}
func (o *AccountNoteNotAcceptable) String() string {
return fmt.Sprintf("[POST /api/v1/accounts/{id}/note][%d] accountNoteNotAcceptable", 406)
}
func (o *AccountNoteNotAcceptable) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
return nil
}
// NewAccountNoteInternalServerError creates a AccountNoteInternalServerError with default headers values
func NewAccountNoteInternalServerError() *AccountNoteInternalServerError {
return &AccountNoteInternalServerError{}
}
/*
AccountNoteInternalServerError describes a response with status code 500, with default header values.
internal server error
*/
type AccountNoteInternalServerError struct {
}
// IsSuccess returns true when this account note internal server error response has a 2xx status code
func (o *AccountNoteInternalServerError) IsSuccess() bool {
return false
}
// IsRedirect returns true when this account note internal server error response has a 3xx status code
func (o *AccountNoteInternalServerError) IsRedirect() bool {
return false
}
// IsClientError returns true when this account note internal server error response has a 4xx status code
func (o *AccountNoteInternalServerError) IsClientError() bool {
return false
}
// IsServerError returns true when this account note internal server error response has a 5xx status code
func (o *AccountNoteInternalServerError) IsServerError() bool {
return true
}
// IsCode returns true when this account note internal server error response a status code equal to that given
func (o *AccountNoteInternalServerError) IsCode(code int) bool {
return code == 500
}
// Code gets the status code for the account note internal server error response
func (o *AccountNoteInternalServerError) Code() int {
return 500
}
func (o *AccountNoteInternalServerError) Error() string {
return fmt.Sprintf("[POST /api/v1/accounts/{id}/note][%d] accountNoteInternalServerError", 500)
}
func (o *AccountNoteInternalServerError) String() string {
return fmt.Sprintf("[POST /api/v1/accounts/{id}/note][%d] accountNoteInternalServerError", 500)
}
func (o *AccountNoteInternalServerError) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
return nil
}