gtslib/client/accounts/account_follow_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"
)
// AccountFollowReader is a Reader for the AccountFollow structure.
type AccountFollowReader struct {
formats strfmt.Registry
}
// ReadResponse reads a server response into the received o.
func (o *AccountFollowReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) {
switch response.Code() {
case 200:
result := NewAccountFollowOK()
if err := result.readResponse(response, consumer, o.formats); err != nil {
return nil, err
}
return result, nil
case 400:
result := NewAccountFollowBadRequest()
if err := result.readResponse(response, consumer, o.formats); err != nil {
return nil, err
}
return nil, result
case 401:
result := NewAccountFollowUnauthorized()
if err := result.readResponse(response, consumer, o.formats); err != nil {
return nil, err
}
return nil, result
case 404:
result := NewAccountFollowNotFound()
if err := result.readResponse(response, consumer, o.formats); err != nil {
return nil, err
}
return nil, result
case 406:
result := NewAccountFollowNotAcceptable()
if err := result.readResponse(response, consumer, o.formats); err != nil {
return nil, err
}
return nil, result
case 500:
result := NewAccountFollowInternalServerError()
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}/follow] accountFollow", response, response.Code())
}
}
// NewAccountFollowOK creates a AccountFollowOK with default headers values
func NewAccountFollowOK() *AccountFollowOK {
return &AccountFollowOK{}
}
/*
AccountFollowOK describes a response with status code 200, with default header values.
Your relationship to this account.
*/
type AccountFollowOK struct {
Payload *models.Relationship
}
// IsSuccess returns true when this account follow o k response has a 2xx status code
func (o *AccountFollowOK) IsSuccess() bool {
return true
}
// IsRedirect returns true when this account follow o k response has a 3xx status code
func (o *AccountFollowOK) IsRedirect() bool {
return false
}
// IsClientError returns true when this account follow o k response has a 4xx status code
func (o *AccountFollowOK) IsClientError() bool {
return false
}
// IsServerError returns true when this account follow o k response has a 5xx status code
func (o *AccountFollowOK) IsServerError() bool {
return false
}
// IsCode returns true when this account follow o k response a status code equal to that given
func (o *AccountFollowOK) IsCode(code int) bool {
return code == 200
}
// Code gets the status code for the account follow o k response
func (o *AccountFollowOK) Code() int {
return 200
}
func (o *AccountFollowOK) Error() string {
payload, _ := json.Marshal(o.Payload)
return fmt.Sprintf("[POST /api/v1/accounts/{id}/follow][%d] accountFollowOK %s", 200, payload)
}
func (o *AccountFollowOK) String() string {
payload, _ := json.Marshal(o.Payload)
return fmt.Sprintf("[POST /api/v1/accounts/{id}/follow][%d] accountFollowOK %s", 200, payload)
}
func (o *AccountFollowOK) GetPayload() *models.Relationship {
return o.Payload
}
func (o *AccountFollowOK) 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
}
// NewAccountFollowBadRequest creates a AccountFollowBadRequest with default headers values
func NewAccountFollowBadRequest() *AccountFollowBadRequest {
return &AccountFollowBadRequest{}
}
/*
AccountFollowBadRequest describes a response with status code 400, with default header values.
bad request
*/
type AccountFollowBadRequest struct {
}
// IsSuccess returns true when this account follow bad request response has a 2xx status code
func (o *AccountFollowBadRequest) IsSuccess() bool {
return false
}
// IsRedirect returns true when this account follow bad request response has a 3xx status code
func (o *AccountFollowBadRequest) IsRedirect() bool {
return false
}
// IsClientError returns true when this account follow bad request response has a 4xx status code
func (o *AccountFollowBadRequest) IsClientError() bool {
return true
}
// IsServerError returns true when this account follow bad request response has a 5xx status code
func (o *AccountFollowBadRequest) IsServerError() bool {
return false
}
// IsCode returns true when this account follow bad request response a status code equal to that given
func (o *AccountFollowBadRequest) IsCode(code int) bool {
return code == 400
}
// Code gets the status code for the account follow bad request response
func (o *AccountFollowBadRequest) Code() int {
return 400
}
func (o *AccountFollowBadRequest) Error() string {
return fmt.Sprintf("[POST /api/v1/accounts/{id}/follow][%d] accountFollowBadRequest", 400)
}
func (o *AccountFollowBadRequest) String() string {
return fmt.Sprintf("[POST /api/v1/accounts/{id}/follow][%d] accountFollowBadRequest", 400)
}
func (o *AccountFollowBadRequest) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
return nil
}
// NewAccountFollowUnauthorized creates a AccountFollowUnauthorized with default headers values
func NewAccountFollowUnauthorized() *AccountFollowUnauthorized {
return &AccountFollowUnauthorized{}
}
/*
AccountFollowUnauthorized describes a response with status code 401, with default header values.
unauthorized
*/
type AccountFollowUnauthorized struct {
}
// IsSuccess returns true when this account follow unauthorized response has a 2xx status code
func (o *AccountFollowUnauthorized) IsSuccess() bool {
return false
}
// IsRedirect returns true when this account follow unauthorized response has a 3xx status code
func (o *AccountFollowUnauthorized) IsRedirect() bool {
return false
}
// IsClientError returns true when this account follow unauthorized response has a 4xx status code
func (o *AccountFollowUnauthorized) IsClientError() bool {
return true
}
// IsServerError returns true when this account follow unauthorized response has a 5xx status code
func (o *AccountFollowUnauthorized) IsServerError() bool {
return false
}
// IsCode returns true when this account follow unauthorized response a status code equal to that given
func (o *AccountFollowUnauthorized) IsCode(code int) bool {
return code == 401
}
// Code gets the status code for the account follow unauthorized response
func (o *AccountFollowUnauthorized) Code() int {
return 401
}
func (o *AccountFollowUnauthorized) Error() string {
return fmt.Sprintf("[POST /api/v1/accounts/{id}/follow][%d] accountFollowUnauthorized", 401)
}
func (o *AccountFollowUnauthorized) String() string {
return fmt.Sprintf("[POST /api/v1/accounts/{id}/follow][%d] accountFollowUnauthorized", 401)
}
func (o *AccountFollowUnauthorized) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
return nil
}
// NewAccountFollowNotFound creates a AccountFollowNotFound with default headers values
func NewAccountFollowNotFound() *AccountFollowNotFound {
return &AccountFollowNotFound{}
}
/*
AccountFollowNotFound describes a response with status code 404, with default header values.
not found
*/
type AccountFollowNotFound struct {
}
// IsSuccess returns true when this account follow not found response has a 2xx status code
func (o *AccountFollowNotFound) IsSuccess() bool {
return false
}
// IsRedirect returns true when this account follow not found response has a 3xx status code
func (o *AccountFollowNotFound) IsRedirect() bool {
return false
}
// IsClientError returns true when this account follow not found response has a 4xx status code
func (o *AccountFollowNotFound) IsClientError() bool {
return true
}
// IsServerError returns true when this account follow not found response has a 5xx status code
func (o *AccountFollowNotFound) IsServerError() bool {
return false
}
// IsCode returns true when this account follow not found response a status code equal to that given
func (o *AccountFollowNotFound) IsCode(code int) bool {
return code == 404
}
// Code gets the status code for the account follow not found response
func (o *AccountFollowNotFound) Code() int {
return 404
}
func (o *AccountFollowNotFound) Error() string {
return fmt.Sprintf("[POST /api/v1/accounts/{id}/follow][%d] accountFollowNotFound", 404)
}
func (o *AccountFollowNotFound) String() string {
return fmt.Sprintf("[POST /api/v1/accounts/{id}/follow][%d] accountFollowNotFound", 404)
}
func (o *AccountFollowNotFound) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
return nil
}
// NewAccountFollowNotAcceptable creates a AccountFollowNotAcceptable with default headers values
func NewAccountFollowNotAcceptable() *AccountFollowNotAcceptable {
return &AccountFollowNotAcceptable{}
}
/*
AccountFollowNotAcceptable describes a response with status code 406, with default header values.
not acceptable
*/
type AccountFollowNotAcceptable struct {
}
// IsSuccess returns true when this account follow not acceptable response has a 2xx status code
func (o *AccountFollowNotAcceptable) IsSuccess() bool {
return false
}
// IsRedirect returns true when this account follow not acceptable response has a 3xx status code
func (o *AccountFollowNotAcceptable) IsRedirect() bool {
return false
}
// IsClientError returns true when this account follow not acceptable response has a 4xx status code
func (o *AccountFollowNotAcceptable) IsClientError() bool {
return true
}
// IsServerError returns true when this account follow not acceptable response has a 5xx status code
func (o *AccountFollowNotAcceptable) IsServerError() bool {
return false
}
// IsCode returns true when this account follow not acceptable response a status code equal to that given
func (o *AccountFollowNotAcceptable) IsCode(code int) bool {
return code == 406
}
// Code gets the status code for the account follow not acceptable response
func (o *AccountFollowNotAcceptable) Code() int {
return 406
}
func (o *AccountFollowNotAcceptable) Error() string {
return fmt.Sprintf("[POST /api/v1/accounts/{id}/follow][%d] accountFollowNotAcceptable", 406)
}
func (o *AccountFollowNotAcceptable) String() string {
return fmt.Sprintf("[POST /api/v1/accounts/{id}/follow][%d] accountFollowNotAcceptable", 406)
}
func (o *AccountFollowNotAcceptable) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
return nil
}
// NewAccountFollowInternalServerError creates a AccountFollowInternalServerError with default headers values
func NewAccountFollowInternalServerError() *AccountFollowInternalServerError {
return &AccountFollowInternalServerError{}
}
/*
AccountFollowInternalServerError describes a response with status code 500, with default header values.
internal server error
*/
type AccountFollowInternalServerError struct {
}
// IsSuccess returns true when this account follow internal server error response has a 2xx status code
func (o *AccountFollowInternalServerError) IsSuccess() bool {
return false
}
// IsRedirect returns true when this account follow internal server error response has a 3xx status code
func (o *AccountFollowInternalServerError) IsRedirect() bool {
return false
}
// IsClientError returns true when this account follow internal server error response has a 4xx status code
func (o *AccountFollowInternalServerError) IsClientError() bool {
return false
}
// IsServerError returns true when this account follow internal server error response has a 5xx status code
func (o *AccountFollowInternalServerError) IsServerError() bool {
return true
}
// IsCode returns true when this account follow internal server error response a status code equal to that given
func (o *AccountFollowInternalServerError) IsCode(code int) bool {
return code == 500
}
// Code gets the status code for the account follow internal server error response
func (o *AccountFollowInternalServerError) Code() int {
return 500
}
func (o *AccountFollowInternalServerError) Error() string {
return fmt.Sprintf("[POST /api/v1/accounts/{id}/follow][%d] accountFollowInternalServerError", 500)
}
func (o *AccountFollowInternalServerError) String() string {
return fmt.Sprintf("[POST /api/v1/accounts/{id}/follow][%d] accountFollowInternalServerError", 500)
}
func (o *AccountFollowInternalServerError) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
return nil
}