gtslib/client/accounts/account_unblock_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"
)
// AccountUnblockReader is a Reader for the AccountUnblock structure.
type AccountUnblockReader struct {
formats strfmt.Registry
}
// ReadResponse reads a server response into the received o.
func (o *AccountUnblockReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) {
switch response.Code() {
case 200:
result := NewAccountUnblockOK()
if err := result.readResponse(response, consumer, o.formats); err != nil {
return nil, err
}
return result, nil
case 400:
result := NewAccountUnblockBadRequest()
if err := result.readResponse(response, consumer, o.formats); err != nil {
return nil, err
}
return nil, result
case 401:
result := NewAccountUnblockUnauthorized()
if err := result.readResponse(response, consumer, o.formats); err != nil {
return nil, err
}
return nil, result
case 404:
result := NewAccountUnblockNotFound()
if err := result.readResponse(response, consumer, o.formats); err != nil {
return nil, err
}
return nil, result
case 406:
result := NewAccountUnblockNotAcceptable()
if err := result.readResponse(response, consumer, o.formats); err != nil {
return nil, err
}
return nil, result
case 500:
result := NewAccountUnblockInternalServerError()
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}/unblock] accountUnblock", response, response.Code())
}
}
// NewAccountUnblockOK creates a AccountUnblockOK with default headers values
func NewAccountUnblockOK() *AccountUnblockOK {
return &AccountUnblockOK{}
}
/*
AccountUnblockOK describes a response with status code 200, with default header values.
Your relationship to this account.
*/
type AccountUnblockOK struct {
Payload *models.Relationship
}
// IsSuccess returns true when this account unblock o k response has a 2xx status code
func (o *AccountUnblockOK) IsSuccess() bool {
return true
}
// IsRedirect returns true when this account unblock o k response has a 3xx status code
func (o *AccountUnblockOK) IsRedirect() bool {
return false
}
// IsClientError returns true when this account unblock o k response has a 4xx status code
func (o *AccountUnblockOK) IsClientError() bool {
return false
}
// IsServerError returns true when this account unblock o k response has a 5xx status code
func (o *AccountUnblockOK) IsServerError() bool {
return false
}
// IsCode returns true when this account unblock o k response a status code equal to that given
func (o *AccountUnblockOK) IsCode(code int) bool {
return code == 200
}
// Code gets the status code for the account unblock o k response
func (o *AccountUnblockOK) Code() int {
return 200
}
func (o *AccountUnblockOK) Error() string {
payload, _ := json.Marshal(o.Payload)
return fmt.Sprintf("[POST /api/v1/accounts/{id}/unblock][%d] accountUnblockOK %s", 200, payload)
}
func (o *AccountUnblockOK) String() string {
payload, _ := json.Marshal(o.Payload)
return fmt.Sprintf("[POST /api/v1/accounts/{id}/unblock][%d] accountUnblockOK %s", 200, payload)
}
func (o *AccountUnblockOK) GetPayload() *models.Relationship {
return o.Payload
}
func (o *AccountUnblockOK) 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
}
// NewAccountUnblockBadRequest creates a AccountUnblockBadRequest with default headers values
func NewAccountUnblockBadRequest() *AccountUnblockBadRequest {
return &AccountUnblockBadRequest{}
}
/*
AccountUnblockBadRequest describes a response with status code 400, with default header values.
bad request
*/
type AccountUnblockBadRequest struct {
}
// IsSuccess returns true when this account unblock bad request response has a 2xx status code
func (o *AccountUnblockBadRequest) IsSuccess() bool {
return false
}
// IsRedirect returns true when this account unblock bad request response has a 3xx status code
func (o *AccountUnblockBadRequest) IsRedirect() bool {
return false
}
// IsClientError returns true when this account unblock bad request response has a 4xx status code
func (o *AccountUnblockBadRequest) IsClientError() bool {
return true
}
// IsServerError returns true when this account unblock bad request response has a 5xx status code
func (o *AccountUnblockBadRequest) IsServerError() bool {
return false
}
// IsCode returns true when this account unblock bad request response a status code equal to that given
func (o *AccountUnblockBadRequest) IsCode(code int) bool {
return code == 400
}
// Code gets the status code for the account unblock bad request response
func (o *AccountUnblockBadRequest) Code() int {
return 400
}
func (o *AccountUnblockBadRequest) Error() string {
return fmt.Sprintf("[POST /api/v1/accounts/{id}/unblock][%d] accountUnblockBadRequest", 400)
}
func (o *AccountUnblockBadRequest) String() string {
return fmt.Sprintf("[POST /api/v1/accounts/{id}/unblock][%d] accountUnblockBadRequest", 400)
}
func (o *AccountUnblockBadRequest) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
return nil
}
// NewAccountUnblockUnauthorized creates a AccountUnblockUnauthorized with default headers values
func NewAccountUnblockUnauthorized() *AccountUnblockUnauthorized {
return &AccountUnblockUnauthorized{}
}
/*
AccountUnblockUnauthorized describes a response with status code 401, with default header values.
unauthorized
*/
type AccountUnblockUnauthorized struct {
}
// IsSuccess returns true when this account unblock unauthorized response has a 2xx status code
func (o *AccountUnblockUnauthorized) IsSuccess() bool {
return false
}
// IsRedirect returns true when this account unblock unauthorized response has a 3xx status code
func (o *AccountUnblockUnauthorized) IsRedirect() bool {
return false
}
// IsClientError returns true when this account unblock unauthorized response has a 4xx status code
func (o *AccountUnblockUnauthorized) IsClientError() bool {
return true
}
// IsServerError returns true when this account unblock unauthorized response has a 5xx status code
func (o *AccountUnblockUnauthorized) IsServerError() bool {
return false
}
// IsCode returns true when this account unblock unauthorized response a status code equal to that given
func (o *AccountUnblockUnauthorized) IsCode(code int) bool {
return code == 401
}
// Code gets the status code for the account unblock unauthorized response
func (o *AccountUnblockUnauthorized) Code() int {
return 401
}
func (o *AccountUnblockUnauthorized) Error() string {
return fmt.Sprintf("[POST /api/v1/accounts/{id}/unblock][%d] accountUnblockUnauthorized", 401)
}
func (o *AccountUnblockUnauthorized) String() string {
return fmt.Sprintf("[POST /api/v1/accounts/{id}/unblock][%d] accountUnblockUnauthorized", 401)
}
func (o *AccountUnblockUnauthorized) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
return nil
}
// NewAccountUnblockNotFound creates a AccountUnblockNotFound with default headers values
func NewAccountUnblockNotFound() *AccountUnblockNotFound {
return &AccountUnblockNotFound{}
}
/*
AccountUnblockNotFound describes a response with status code 404, with default header values.
not found
*/
type AccountUnblockNotFound struct {
}
// IsSuccess returns true when this account unblock not found response has a 2xx status code
func (o *AccountUnblockNotFound) IsSuccess() bool {
return false
}
// IsRedirect returns true when this account unblock not found response has a 3xx status code
func (o *AccountUnblockNotFound) IsRedirect() bool {
return false
}
// IsClientError returns true when this account unblock not found response has a 4xx status code
func (o *AccountUnblockNotFound) IsClientError() bool {
return true
}
// IsServerError returns true when this account unblock not found response has a 5xx status code
func (o *AccountUnblockNotFound) IsServerError() bool {
return false
}
// IsCode returns true when this account unblock not found response a status code equal to that given
func (o *AccountUnblockNotFound) IsCode(code int) bool {
return code == 404
}
// Code gets the status code for the account unblock not found response
func (o *AccountUnblockNotFound) Code() int {
return 404
}
func (o *AccountUnblockNotFound) Error() string {
return fmt.Sprintf("[POST /api/v1/accounts/{id}/unblock][%d] accountUnblockNotFound", 404)
}
func (o *AccountUnblockNotFound) String() string {
return fmt.Sprintf("[POST /api/v1/accounts/{id}/unblock][%d] accountUnblockNotFound", 404)
}
func (o *AccountUnblockNotFound) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
return nil
}
// NewAccountUnblockNotAcceptable creates a AccountUnblockNotAcceptable with default headers values
func NewAccountUnblockNotAcceptable() *AccountUnblockNotAcceptable {
return &AccountUnblockNotAcceptable{}
}
/*
AccountUnblockNotAcceptable describes a response with status code 406, with default header values.
not acceptable
*/
type AccountUnblockNotAcceptable struct {
}
// IsSuccess returns true when this account unblock not acceptable response has a 2xx status code
func (o *AccountUnblockNotAcceptable) IsSuccess() bool {
return false
}
// IsRedirect returns true when this account unblock not acceptable response has a 3xx status code
func (o *AccountUnblockNotAcceptable) IsRedirect() bool {
return false
}
// IsClientError returns true when this account unblock not acceptable response has a 4xx status code
func (o *AccountUnblockNotAcceptable) IsClientError() bool {
return true
}
// IsServerError returns true when this account unblock not acceptable response has a 5xx status code
func (o *AccountUnblockNotAcceptable) IsServerError() bool {
return false
}
// IsCode returns true when this account unblock not acceptable response a status code equal to that given
func (o *AccountUnblockNotAcceptable) IsCode(code int) bool {
return code == 406
}
// Code gets the status code for the account unblock not acceptable response
func (o *AccountUnblockNotAcceptable) Code() int {
return 406
}
func (o *AccountUnblockNotAcceptable) Error() string {
return fmt.Sprintf("[POST /api/v1/accounts/{id}/unblock][%d] accountUnblockNotAcceptable", 406)
}
func (o *AccountUnblockNotAcceptable) String() string {
return fmt.Sprintf("[POST /api/v1/accounts/{id}/unblock][%d] accountUnblockNotAcceptable", 406)
}
func (o *AccountUnblockNotAcceptable) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
return nil
}
// NewAccountUnblockInternalServerError creates a AccountUnblockInternalServerError with default headers values
func NewAccountUnblockInternalServerError() *AccountUnblockInternalServerError {
return &AccountUnblockInternalServerError{}
}
/*
AccountUnblockInternalServerError describes a response with status code 500, with default header values.
internal server error
*/
type AccountUnblockInternalServerError struct {
}
// IsSuccess returns true when this account unblock internal server error response has a 2xx status code
func (o *AccountUnblockInternalServerError) IsSuccess() bool {
return false
}
// IsRedirect returns true when this account unblock internal server error response has a 3xx status code
func (o *AccountUnblockInternalServerError) IsRedirect() bool {
return false
}
// IsClientError returns true when this account unblock internal server error response has a 4xx status code
func (o *AccountUnblockInternalServerError) IsClientError() bool {
return false
}
// IsServerError returns true when this account unblock internal server error response has a 5xx status code
func (o *AccountUnblockInternalServerError) IsServerError() bool {
return true
}
// IsCode returns true when this account unblock internal server error response a status code equal to that given
func (o *AccountUnblockInternalServerError) IsCode(code int) bool {
return code == 500
}
// Code gets the status code for the account unblock internal server error response
func (o *AccountUnblockInternalServerError) Code() int {
return 500
}
func (o *AccountUnblockInternalServerError) Error() string {
return fmt.Sprintf("[POST /api/v1/accounts/{id}/unblock][%d] accountUnblockInternalServerError", 500)
}
func (o *AccountUnblockInternalServerError) String() string {
return fmt.Sprintf("[POST /api/v1/accounts/{id}/unblock][%d] accountUnblockInternalServerError", 500)
}
func (o *AccountUnblockInternalServerError) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
return nil
}