decentral1se
e4ade9c758
All checks were successful
continuous-integration/drone/push Build is passing
417 lines
13 KiB
Go
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"
|
|
)
|
|
|
|
// AccountUnfollowReader is a Reader for the AccountUnfollow structure.
|
|
type AccountUnfollowReader struct {
|
|
formats strfmt.Registry
|
|
}
|
|
|
|
// ReadResponse reads a server response into the received o.
|
|
func (o *AccountUnfollowReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) {
|
|
switch response.Code() {
|
|
case 200:
|
|
result := NewAccountUnfollowOK()
|
|
if err := result.readResponse(response, consumer, o.formats); err != nil {
|
|
return nil, err
|
|
}
|
|
return result, nil
|
|
case 400:
|
|
result := NewAccountUnfollowBadRequest()
|
|
if err := result.readResponse(response, consumer, o.formats); err != nil {
|
|
return nil, err
|
|
}
|
|
return nil, result
|
|
case 401:
|
|
result := NewAccountUnfollowUnauthorized()
|
|
if err := result.readResponse(response, consumer, o.formats); err != nil {
|
|
return nil, err
|
|
}
|
|
return nil, result
|
|
case 404:
|
|
result := NewAccountUnfollowNotFound()
|
|
if err := result.readResponse(response, consumer, o.formats); err != nil {
|
|
return nil, err
|
|
}
|
|
return nil, result
|
|
case 406:
|
|
result := NewAccountUnfollowNotAcceptable()
|
|
if err := result.readResponse(response, consumer, o.formats); err != nil {
|
|
return nil, err
|
|
}
|
|
return nil, result
|
|
case 500:
|
|
result := NewAccountUnfollowInternalServerError()
|
|
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}/unfollow] accountUnfollow", response, response.Code())
|
|
}
|
|
}
|
|
|
|
// NewAccountUnfollowOK creates a AccountUnfollowOK with default headers values
|
|
func NewAccountUnfollowOK() *AccountUnfollowOK {
|
|
return &AccountUnfollowOK{}
|
|
}
|
|
|
|
/*
|
|
AccountUnfollowOK describes a response with status code 200, with default header values.
|
|
|
|
Your relationship to this account.
|
|
*/
|
|
type AccountUnfollowOK struct {
|
|
Payload *models.Relationship
|
|
}
|
|
|
|
// IsSuccess returns true when this account unfollow o k response has a 2xx status code
|
|
func (o *AccountUnfollowOK) IsSuccess() bool {
|
|
return true
|
|
}
|
|
|
|
// IsRedirect returns true when this account unfollow o k response has a 3xx status code
|
|
func (o *AccountUnfollowOK) IsRedirect() bool {
|
|
return false
|
|
}
|
|
|
|
// IsClientError returns true when this account unfollow o k response has a 4xx status code
|
|
func (o *AccountUnfollowOK) IsClientError() bool {
|
|
return false
|
|
}
|
|
|
|
// IsServerError returns true when this account unfollow o k response has a 5xx status code
|
|
func (o *AccountUnfollowOK) IsServerError() bool {
|
|
return false
|
|
}
|
|
|
|
// IsCode returns true when this account unfollow o k response a status code equal to that given
|
|
func (o *AccountUnfollowOK) IsCode(code int) bool {
|
|
return code == 200
|
|
}
|
|
|
|
// Code gets the status code for the account unfollow o k response
|
|
func (o *AccountUnfollowOK) Code() int {
|
|
return 200
|
|
}
|
|
|
|
func (o *AccountUnfollowOK) Error() string {
|
|
payload, _ := json.Marshal(o.Payload)
|
|
return fmt.Sprintf("[POST /api/v1/accounts/{id}/unfollow][%d] accountUnfollowOK %s", 200, payload)
|
|
}
|
|
|
|
func (o *AccountUnfollowOK) String() string {
|
|
payload, _ := json.Marshal(o.Payload)
|
|
return fmt.Sprintf("[POST /api/v1/accounts/{id}/unfollow][%d] accountUnfollowOK %s", 200, payload)
|
|
}
|
|
|
|
func (o *AccountUnfollowOK) GetPayload() *models.Relationship {
|
|
return o.Payload
|
|
}
|
|
|
|
func (o *AccountUnfollowOK) 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
|
|
}
|
|
|
|
// NewAccountUnfollowBadRequest creates a AccountUnfollowBadRequest with default headers values
|
|
func NewAccountUnfollowBadRequest() *AccountUnfollowBadRequest {
|
|
return &AccountUnfollowBadRequest{}
|
|
}
|
|
|
|
/*
|
|
AccountUnfollowBadRequest describes a response with status code 400, with default header values.
|
|
|
|
bad request
|
|
*/
|
|
type AccountUnfollowBadRequest struct {
|
|
}
|
|
|
|
// IsSuccess returns true when this account unfollow bad request response has a 2xx status code
|
|
func (o *AccountUnfollowBadRequest) IsSuccess() bool {
|
|
return false
|
|
}
|
|
|
|
// IsRedirect returns true when this account unfollow bad request response has a 3xx status code
|
|
func (o *AccountUnfollowBadRequest) IsRedirect() bool {
|
|
return false
|
|
}
|
|
|
|
// IsClientError returns true when this account unfollow bad request response has a 4xx status code
|
|
func (o *AccountUnfollowBadRequest) IsClientError() bool {
|
|
return true
|
|
}
|
|
|
|
// IsServerError returns true when this account unfollow bad request response has a 5xx status code
|
|
func (o *AccountUnfollowBadRequest) IsServerError() bool {
|
|
return false
|
|
}
|
|
|
|
// IsCode returns true when this account unfollow bad request response a status code equal to that given
|
|
func (o *AccountUnfollowBadRequest) IsCode(code int) bool {
|
|
return code == 400
|
|
}
|
|
|
|
// Code gets the status code for the account unfollow bad request response
|
|
func (o *AccountUnfollowBadRequest) Code() int {
|
|
return 400
|
|
}
|
|
|
|
func (o *AccountUnfollowBadRequest) Error() string {
|
|
return fmt.Sprintf("[POST /api/v1/accounts/{id}/unfollow][%d] accountUnfollowBadRequest", 400)
|
|
}
|
|
|
|
func (o *AccountUnfollowBadRequest) String() string {
|
|
return fmt.Sprintf("[POST /api/v1/accounts/{id}/unfollow][%d] accountUnfollowBadRequest", 400)
|
|
}
|
|
|
|
func (o *AccountUnfollowBadRequest) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
|
|
|
|
return nil
|
|
}
|
|
|
|
// NewAccountUnfollowUnauthorized creates a AccountUnfollowUnauthorized with default headers values
|
|
func NewAccountUnfollowUnauthorized() *AccountUnfollowUnauthorized {
|
|
return &AccountUnfollowUnauthorized{}
|
|
}
|
|
|
|
/*
|
|
AccountUnfollowUnauthorized describes a response with status code 401, with default header values.
|
|
|
|
unauthorized
|
|
*/
|
|
type AccountUnfollowUnauthorized struct {
|
|
}
|
|
|
|
// IsSuccess returns true when this account unfollow unauthorized response has a 2xx status code
|
|
func (o *AccountUnfollowUnauthorized) IsSuccess() bool {
|
|
return false
|
|
}
|
|
|
|
// IsRedirect returns true when this account unfollow unauthorized response has a 3xx status code
|
|
func (o *AccountUnfollowUnauthorized) IsRedirect() bool {
|
|
return false
|
|
}
|
|
|
|
// IsClientError returns true when this account unfollow unauthorized response has a 4xx status code
|
|
func (o *AccountUnfollowUnauthorized) IsClientError() bool {
|
|
return true
|
|
}
|
|
|
|
// IsServerError returns true when this account unfollow unauthorized response has a 5xx status code
|
|
func (o *AccountUnfollowUnauthorized) IsServerError() bool {
|
|
return false
|
|
}
|
|
|
|
// IsCode returns true when this account unfollow unauthorized response a status code equal to that given
|
|
func (o *AccountUnfollowUnauthorized) IsCode(code int) bool {
|
|
return code == 401
|
|
}
|
|
|
|
// Code gets the status code for the account unfollow unauthorized response
|
|
func (o *AccountUnfollowUnauthorized) Code() int {
|
|
return 401
|
|
}
|
|
|
|
func (o *AccountUnfollowUnauthorized) Error() string {
|
|
return fmt.Sprintf("[POST /api/v1/accounts/{id}/unfollow][%d] accountUnfollowUnauthorized", 401)
|
|
}
|
|
|
|
func (o *AccountUnfollowUnauthorized) String() string {
|
|
return fmt.Sprintf("[POST /api/v1/accounts/{id}/unfollow][%d] accountUnfollowUnauthorized", 401)
|
|
}
|
|
|
|
func (o *AccountUnfollowUnauthorized) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
|
|
|
|
return nil
|
|
}
|
|
|
|
// NewAccountUnfollowNotFound creates a AccountUnfollowNotFound with default headers values
|
|
func NewAccountUnfollowNotFound() *AccountUnfollowNotFound {
|
|
return &AccountUnfollowNotFound{}
|
|
}
|
|
|
|
/*
|
|
AccountUnfollowNotFound describes a response with status code 404, with default header values.
|
|
|
|
not found
|
|
*/
|
|
type AccountUnfollowNotFound struct {
|
|
}
|
|
|
|
// IsSuccess returns true when this account unfollow not found response has a 2xx status code
|
|
func (o *AccountUnfollowNotFound) IsSuccess() bool {
|
|
return false
|
|
}
|
|
|
|
// IsRedirect returns true when this account unfollow not found response has a 3xx status code
|
|
func (o *AccountUnfollowNotFound) IsRedirect() bool {
|
|
return false
|
|
}
|
|
|
|
// IsClientError returns true when this account unfollow not found response has a 4xx status code
|
|
func (o *AccountUnfollowNotFound) IsClientError() bool {
|
|
return true
|
|
}
|
|
|
|
// IsServerError returns true when this account unfollow not found response has a 5xx status code
|
|
func (o *AccountUnfollowNotFound) IsServerError() bool {
|
|
return false
|
|
}
|
|
|
|
// IsCode returns true when this account unfollow not found response a status code equal to that given
|
|
func (o *AccountUnfollowNotFound) IsCode(code int) bool {
|
|
return code == 404
|
|
}
|
|
|
|
// Code gets the status code for the account unfollow not found response
|
|
func (o *AccountUnfollowNotFound) Code() int {
|
|
return 404
|
|
}
|
|
|
|
func (o *AccountUnfollowNotFound) Error() string {
|
|
return fmt.Sprintf("[POST /api/v1/accounts/{id}/unfollow][%d] accountUnfollowNotFound", 404)
|
|
}
|
|
|
|
func (o *AccountUnfollowNotFound) String() string {
|
|
return fmt.Sprintf("[POST /api/v1/accounts/{id}/unfollow][%d] accountUnfollowNotFound", 404)
|
|
}
|
|
|
|
func (o *AccountUnfollowNotFound) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
|
|
|
|
return nil
|
|
}
|
|
|
|
// NewAccountUnfollowNotAcceptable creates a AccountUnfollowNotAcceptable with default headers values
|
|
func NewAccountUnfollowNotAcceptable() *AccountUnfollowNotAcceptable {
|
|
return &AccountUnfollowNotAcceptable{}
|
|
}
|
|
|
|
/*
|
|
AccountUnfollowNotAcceptable describes a response with status code 406, with default header values.
|
|
|
|
not acceptable
|
|
*/
|
|
type AccountUnfollowNotAcceptable struct {
|
|
}
|
|
|
|
// IsSuccess returns true when this account unfollow not acceptable response has a 2xx status code
|
|
func (o *AccountUnfollowNotAcceptable) IsSuccess() bool {
|
|
return false
|
|
}
|
|
|
|
// IsRedirect returns true when this account unfollow not acceptable response has a 3xx status code
|
|
func (o *AccountUnfollowNotAcceptable) IsRedirect() bool {
|
|
return false
|
|
}
|
|
|
|
// IsClientError returns true when this account unfollow not acceptable response has a 4xx status code
|
|
func (o *AccountUnfollowNotAcceptable) IsClientError() bool {
|
|
return true
|
|
}
|
|
|
|
// IsServerError returns true when this account unfollow not acceptable response has a 5xx status code
|
|
func (o *AccountUnfollowNotAcceptable) IsServerError() bool {
|
|
return false
|
|
}
|
|
|
|
// IsCode returns true when this account unfollow not acceptable response a status code equal to that given
|
|
func (o *AccountUnfollowNotAcceptable) IsCode(code int) bool {
|
|
return code == 406
|
|
}
|
|
|
|
// Code gets the status code for the account unfollow not acceptable response
|
|
func (o *AccountUnfollowNotAcceptable) Code() int {
|
|
return 406
|
|
}
|
|
|
|
func (o *AccountUnfollowNotAcceptable) Error() string {
|
|
return fmt.Sprintf("[POST /api/v1/accounts/{id}/unfollow][%d] accountUnfollowNotAcceptable", 406)
|
|
}
|
|
|
|
func (o *AccountUnfollowNotAcceptable) String() string {
|
|
return fmt.Sprintf("[POST /api/v1/accounts/{id}/unfollow][%d] accountUnfollowNotAcceptable", 406)
|
|
}
|
|
|
|
func (o *AccountUnfollowNotAcceptable) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
|
|
|
|
return nil
|
|
}
|
|
|
|
// NewAccountUnfollowInternalServerError creates a AccountUnfollowInternalServerError with default headers values
|
|
func NewAccountUnfollowInternalServerError() *AccountUnfollowInternalServerError {
|
|
return &AccountUnfollowInternalServerError{}
|
|
}
|
|
|
|
/*
|
|
AccountUnfollowInternalServerError describes a response with status code 500, with default header values.
|
|
|
|
internal server error
|
|
*/
|
|
type AccountUnfollowInternalServerError struct {
|
|
}
|
|
|
|
// IsSuccess returns true when this account unfollow internal server error response has a 2xx status code
|
|
func (o *AccountUnfollowInternalServerError) IsSuccess() bool {
|
|
return false
|
|
}
|
|
|
|
// IsRedirect returns true when this account unfollow internal server error response has a 3xx status code
|
|
func (o *AccountUnfollowInternalServerError) IsRedirect() bool {
|
|
return false
|
|
}
|
|
|
|
// IsClientError returns true when this account unfollow internal server error response has a 4xx status code
|
|
func (o *AccountUnfollowInternalServerError) IsClientError() bool {
|
|
return false
|
|
}
|
|
|
|
// IsServerError returns true when this account unfollow internal server error response has a 5xx status code
|
|
func (o *AccountUnfollowInternalServerError) IsServerError() bool {
|
|
return true
|
|
}
|
|
|
|
// IsCode returns true when this account unfollow internal server error response a status code equal to that given
|
|
func (o *AccountUnfollowInternalServerError) IsCode(code int) bool {
|
|
return code == 500
|
|
}
|
|
|
|
// Code gets the status code for the account unfollow internal server error response
|
|
func (o *AccountUnfollowInternalServerError) Code() int {
|
|
return 500
|
|
}
|
|
|
|
func (o *AccountUnfollowInternalServerError) Error() string {
|
|
return fmt.Sprintf("[POST /api/v1/accounts/{id}/unfollow][%d] accountUnfollowInternalServerError", 500)
|
|
}
|
|
|
|
func (o *AccountUnfollowInternalServerError) String() string {
|
|
return fmt.Sprintf("[POST /api/v1/accounts/{id}/unfollow][%d] accountUnfollowInternalServerError", 500)
|
|
}
|
|
|
|
func (o *AccountUnfollowInternalServerError) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
|
|
|
|
return nil
|
|
}
|