gtslib/client/accounts/account_relationships_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

415 lines
14 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"
)
// AccountRelationshipsReader is a Reader for the AccountRelationships structure.
type AccountRelationshipsReader struct {
formats strfmt.Registry
}
// ReadResponse reads a server response into the received o.
func (o *AccountRelationshipsReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) {
switch response.Code() {
case 200:
result := NewAccountRelationshipsOK()
if err := result.readResponse(response, consumer, o.formats); err != nil {
return nil, err
}
return result, nil
case 400:
result := NewAccountRelationshipsBadRequest()
if err := result.readResponse(response, consumer, o.formats); err != nil {
return nil, err
}
return nil, result
case 401:
result := NewAccountRelationshipsUnauthorized()
if err := result.readResponse(response, consumer, o.formats); err != nil {
return nil, err
}
return nil, result
case 404:
result := NewAccountRelationshipsNotFound()
if err := result.readResponse(response, consumer, o.formats); err != nil {
return nil, err
}
return nil, result
case 406:
result := NewAccountRelationshipsNotAcceptable()
if err := result.readResponse(response, consumer, o.formats); err != nil {
return nil, err
}
return nil, result
case 500:
result := NewAccountRelationshipsInternalServerError()
if err := result.readResponse(response, consumer, o.formats); err != nil {
return nil, err
}
return nil, result
default:
return nil, runtime.NewAPIError("[GET /api/v1/accounts/relationships] accountRelationships", response, response.Code())
}
}
// NewAccountRelationshipsOK creates a AccountRelationshipsOK with default headers values
func NewAccountRelationshipsOK() *AccountRelationshipsOK {
return &AccountRelationshipsOK{}
}
/*
AccountRelationshipsOK describes a response with status code 200, with default header values.
Array of account relationships.
*/
type AccountRelationshipsOK struct {
Payload []*models.Relationship
}
// IsSuccess returns true when this account relationships o k response has a 2xx status code
func (o *AccountRelationshipsOK) IsSuccess() bool {
return true
}
// IsRedirect returns true when this account relationships o k response has a 3xx status code
func (o *AccountRelationshipsOK) IsRedirect() bool {
return false
}
// IsClientError returns true when this account relationships o k response has a 4xx status code
func (o *AccountRelationshipsOK) IsClientError() bool {
return false
}
// IsServerError returns true when this account relationships o k response has a 5xx status code
func (o *AccountRelationshipsOK) IsServerError() bool {
return false
}
// IsCode returns true when this account relationships o k response a status code equal to that given
func (o *AccountRelationshipsOK) IsCode(code int) bool {
return code == 200
}
// Code gets the status code for the account relationships o k response
func (o *AccountRelationshipsOK) Code() int {
return 200
}
func (o *AccountRelationshipsOK) Error() string {
payload, _ := json.Marshal(o.Payload)
return fmt.Sprintf("[GET /api/v1/accounts/relationships][%d] accountRelationshipsOK %s", 200, payload)
}
func (o *AccountRelationshipsOK) String() string {
payload, _ := json.Marshal(o.Payload)
return fmt.Sprintf("[GET /api/v1/accounts/relationships][%d] accountRelationshipsOK %s", 200, payload)
}
func (o *AccountRelationshipsOK) GetPayload() []*models.Relationship {
return o.Payload
}
func (o *AccountRelationshipsOK) 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
}
// NewAccountRelationshipsBadRequest creates a AccountRelationshipsBadRequest with default headers values
func NewAccountRelationshipsBadRequest() *AccountRelationshipsBadRequest {
return &AccountRelationshipsBadRequest{}
}
/*
AccountRelationshipsBadRequest describes a response with status code 400, with default header values.
bad request
*/
type AccountRelationshipsBadRequest struct {
}
// IsSuccess returns true when this account relationships bad request response has a 2xx status code
func (o *AccountRelationshipsBadRequest) IsSuccess() bool {
return false
}
// IsRedirect returns true when this account relationships bad request response has a 3xx status code
func (o *AccountRelationshipsBadRequest) IsRedirect() bool {
return false
}
// IsClientError returns true when this account relationships bad request response has a 4xx status code
func (o *AccountRelationshipsBadRequest) IsClientError() bool {
return true
}
// IsServerError returns true when this account relationships bad request response has a 5xx status code
func (o *AccountRelationshipsBadRequest) IsServerError() bool {
return false
}
// IsCode returns true when this account relationships bad request response a status code equal to that given
func (o *AccountRelationshipsBadRequest) IsCode(code int) bool {
return code == 400
}
// Code gets the status code for the account relationships bad request response
func (o *AccountRelationshipsBadRequest) Code() int {
return 400
}
func (o *AccountRelationshipsBadRequest) Error() string {
return fmt.Sprintf("[GET /api/v1/accounts/relationships][%d] accountRelationshipsBadRequest", 400)
}
func (o *AccountRelationshipsBadRequest) String() string {
return fmt.Sprintf("[GET /api/v1/accounts/relationships][%d] accountRelationshipsBadRequest", 400)
}
func (o *AccountRelationshipsBadRequest) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
return nil
}
// NewAccountRelationshipsUnauthorized creates a AccountRelationshipsUnauthorized with default headers values
func NewAccountRelationshipsUnauthorized() *AccountRelationshipsUnauthorized {
return &AccountRelationshipsUnauthorized{}
}
/*
AccountRelationshipsUnauthorized describes a response with status code 401, with default header values.
unauthorized
*/
type AccountRelationshipsUnauthorized struct {
}
// IsSuccess returns true when this account relationships unauthorized response has a 2xx status code
func (o *AccountRelationshipsUnauthorized) IsSuccess() bool {
return false
}
// IsRedirect returns true when this account relationships unauthorized response has a 3xx status code
func (o *AccountRelationshipsUnauthorized) IsRedirect() bool {
return false
}
// IsClientError returns true when this account relationships unauthorized response has a 4xx status code
func (o *AccountRelationshipsUnauthorized) IsClientError() bool {
return true
}
// IsServerError returns true when this account relationships unauthorized response has a 5xx status code
func (o *AccountRelationshipsUnauthorized) IsServerError() bool {
return false
}
// IsCode returns true when this account relationships unauthorized response a status code equal to that given
func (o *AccountRelationshipsUnauthorized) IsCode(code int) bool {
return code == 401
}
// Code gets the status code for the account relationships unauthorized response
func (o *AccountRelationshipsUnauthorized) Code() int {
return 401
}
func (o *AccountRelationshipsUnauthorized) Error() string {
return fmt.Sprintf("[GET /api/v1/accounts/relationships][%d] accountRelationshipsUnauthorized", 401)
}
func (o *AccountRelationshipsUnauthorized) String() string {
return fmt.Sprintf("[GET /api/v1/accounts/relationships][%d] accountRelationshipsUnauthorized", 401)
}
func (o *AccountRelationshipsUnauthorized) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
return nil
}
// NewAccountRelationshipsNotFound creates a AccountRelationshipsNotFound with default headers values
func NewAccountRelationshipsNotFound() *AccountRelationshipsNotFound {
return &AccountRelationshipsNotFound{}
}
/*
AccountRelationshipsNotFound describes a response with status code 404, with default header values.
not found
*/
type AccountRelationshipsNotFound struct {
}
// IsSuccess returns true when this account relationships not found response has a 2xx status code
func (o *AccountRelationshipsNotFound) IsSuccess() bool {
return false
}
// IsRedirect returns true when this account relationships not found response has a 3xx status code
func (o *AccountRelationshipsNotFound) IsRedirect() bool {
return false
}
// IsClientError returns true when this account relationships not found response has a 4xx status code
func (o *AccountRelationshipsNotFound) IsClientError() bool {
return true
}
// IsServerError returns true when this account relationships not found response has a 5xx status code
func (o *AccountRelationshipsNotFound) IsServerError() bool {
return false
}
// IsCode returns true when this account relationships not found response a status code equal to that given
func (o *AccountRelationshipsNotFound) IsCode(code int) bool {
return code == 404
}
// Code gets the status code for the account relationships not found response
func (o *AccountRelationshipsNotFound) Code() int {
return 404
}
func (o *AccountRelationshipsNotFound) Error() string {
return fmt.Sprintf("[GET /api/v1/accounts/relationships][%d] accountRelationshipsNotFound", 404)
}
func (o *AccountRelationshipsNotFound) String() string {
return fmt.Sprintf("[GET /api/v1/accounts/relationships][%d] accountRelationshipsNotFound", 404)
}
func (o *AccountRelationshipsNotFound) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
return nil
}
// NewAccountRelationshipsNotAcceptable creates a AccountRelationshipsNotAcceptable with default headers values
func NewAccountRelationshipsNotAcceptable() *AccountRelationshipsNotAcceptable {
return &AccountRelationshipsNotAcceptable{}
}
/*
AccountRelationshipsNotAcceptable describes a response with status code 406, with default header values.
not acceptable
*/
type AccountRelationshipsNotAcceptable struct {
}
// IsSuccess returns true when this account relationships not acceptable response has a 2xx status code
func (o *AccountRelationshipsNotAcceptable) IsSuccess() bool {
return false
}
// IsRedirect returns true when this account relationships not acceptable response has a 3xx status code
func (o *AccountRelationshipsNotAcceptable) IsRedirect() bool {
return false
}
// IsClientError returns true when this account relationships not acceptable response has a 4xx status code
func (o *AccountRelationshipsNotAcceptable) IsClientError() bool {
return true
}
// IsServerError returns true when this account relationships not acceptable response has a 5xx status code
func (o *AccountRelationshipsNotAcceptable) IsServerError() bool {
return false
}
// IsCode returns true when this account relationships not acceptable response a status code equal to that given
func (o *AccountRelationshipsNotAcceptable) IsCode(code int) bool {
return code == 406
}
// Code gets the status code for the account relationships not acceptable response
func (o *AccountRelationshipsNotAcceptable) Code() int {
return 406
}
func (o *AccountRelationshipsNotAcceptable) Error() string {
return fmt.Sprintf("[GET /api/v1/accounts/relationships][%d] accountRelationshipsNotAcceptable", 406)
}
func (o *AccountRelationshipsNotAcceptable) String() string {
return fmt.Sprintf("[GET /api/v1/accounts/relationships][%d] accountRelationshipsNotAcceptable", 406)
}
func (o *AccountRelationshipsNotAcceptable) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
return nil
}
// NewAccountRelationshipsInternalServerError creates a AccountRelationshipsInternalServerError with default headers values
func NewAccountRelationshipsInternalServerError() *AccountRelationshipsInternalServerError {
return &AccountRelationshipsInternalServerError{}
}
/*
AccountRelationshipsInternalServerError describes a response with status code 500, with default header values.
internal server error
*/
type AccountRelationshipsInternalServerError struct {
}
// IsSuccess returns true when this account relationships internal server error response has a 2xx status code
func (o *AccountRelationshipsInternalServerError) IsSuccess() bool {
return false
}
// IsRedirect returns true when this account relationships internal server error response has a 3xx status code
func (o *AccountRelationshipsInternalServerError) IsRedirect() bool {
return false
}
// IsClientError returns true when this account relationships internal server error response has a 4xx status code
func (o *AccountRelationshipsInternalServerError) IsClientError() bool {
return false
}
// IsServerError returns true when this account relationships internal server error response has a 5xx status code
func (o *AccountRelationshipsInternalServerError) IsServerError() bool {
return true
}
// IsCode returns true when this account relationships internal server error response a status code equal to that given
func (o *AccountRelationshipsInternalServerError) IsCode(code int) bool {
return code == 500
}
// Code gets the status code for the account relationships internal server error response
func (o *AccountRelationshipsInternalServerError) Code() int {
return 500
}
func (o *AccountRelationshipsInternalServerError) Error() string {
return fmt.Sprintf("[GET /api/v1/accounts/relationships][%d] accountRelationshipsInternalServerError", 500)
}
func (o *AccountRelationshipsInternalServerError) String() string {
return fmt.Sprintf("[GET /api/v1/accounts/relationships][%d] accountRelationshipsInternalServerError", 500)
}
func (o *AccountRelationshipsInternalServerError) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
return nil
}