All checks were successful
continuous-integration/drone/push Build is passing
427 lines
13 KiB
Go
427 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"
|
|
)
|
|
|
|
// AccountFollowersReader is a Reader for the AccountFollowers structure.
|
|
type AccountFollowersReader struct {
|
|
formats strfmt.Registry
|
|
}
|
|
|
|
// ReadResponse reads a server response into the received o.
|
|
func (o *AccountFollowersReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) {
|
|
switch response.Code() {
|
|
case 200:
|
|
result := NewAccountFollowersOK()
|
|
if err := result.readResponse(response, consumer, o.formats); err != nil {
|
|
return nil, err
|
|
}
|
|
return result, nil
|
|
case 400:
|
|
result := NewAccountFollowersBadRequest()
|
|
if err := result.readResponse(response, consumer, o.formats); err != nil {
|
|
return nil, err
|
|
}
|
|
return nil, result
|
|
case 401:
|
|
result := NewAccountFollowersUnauthorized()
|
|
if err := result.readResponse(response, consumer, o.formats); err != nil {
|
|
return nil, err
|
|
}
|
|
return nil, result
|
|
case 404:
|
|
result := NewAccountFollowersNotFound()
|
|
if err := result.readResponse(response, consumer, o.formats); err != nil {
|
|
return nil, err
|
|
}
|
|
return nil, result
|
|
case 406:
|
|
result := NewAccountFollowersNotAcceptable()
|
|
if err := result.readResponse(response, consumer, o.formats); err != nil {
|
|
return nil, err
|
|
}
|
|
return nil, result
|
|
case 500:
|
|
result := NewAccountFollowersInternalServerError()
|
|
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/{id}/followers] accountFollowers", response, response.Code())
|
|
}
|
|
}
|
|
|
|
// NewAccountFollowersOK creates a AccountFollowersOK with default headers values
|
|
func NewAccountFollowersOK() *AccountFollowersOK {
|
|
return &AccountFollowersOK{}
|
|
}
|
|
|
|
/*
|
|
AccountFollowersOK describes a response with status code 200, with default header values.
|
|
|
|
Array of accounts that follow this account.
|
|
*/
|
|
type AccountFollowersOK struct {
|
|
|
|
/* Links to the next and previous queries.
|
|
*/
|
|
Link string
|
|
|
|
Payload []*models.Account
|
|
}
|
|
|
|
// IsSuccess returns true when this account followers o k response has a 2xx status code
|
|
func (o *AccountFollowersOK) IsSuccess() bool {
|
|
return true
|
|
}
|
|
|
|
// IsRedirect returns true when this account followers o k response has a 3xx status code
|
|
func (o *AccountFollowersOK) IsRedirect() bool {
|
|
return false
|
|
}
|
|
|
|
// IsClientError returns true when this account followers o k response has a 4xx status code
|
|
func (o *AccountFollowersOK) IsClientError() bool {
|
|
return false
|
|
}
|
|
|
|
// IsServerError returns true when this account followers o k response has a 5xx status code
|
|
func (o *AccountFollowersOK) IsServerError() bool {
|
|
return false
|
|
}
|
|
|
|
// IsCode returns true when this account followers o k response a status code equal to that given
|
|
func (o *AccountFollowersOK) IsCode(code int) bool {
|
|
return code == 200
|
|
}
|
|
|
|
// Code gets the status code for the account followers o k response
|
|
func (o *AccountFollowersOK) Code() int {
|
|
return 200
|
|
}
|
|
|
|
func (o *AccountFollowersOK) Error() string {
|
|
payload, _ := json.Marshal(o.Payload)
|
|
return fmt.Sprintf("[GET /api/v1/accounts/{id}/followers][%d] accountFollowersOK %s", 200, payload)
|
|
}
|
|
|
|
func (o *AccountFollowersOK) String() string {
|
|
payload, _ := json.Marshal(o.Payload)
|
|
return fmt.Sprintf("[GET /api/v1/accounts/{id}/followers][%d] accountFollowersOK %s", 200, payload)
|
|
}
|
|
|
|
func (o *AccountFollowersOK) GetPayload() []*models.Account {
|
|
return o.Payload
|
|
}
|
|
|
|
func (o *AccountFollowersOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
|
|
|
|
// hydrates response header Link
|
|
hdrLink := response.GetHeader("Link")
|
|
|
|
if hdrLink != "" {
|
|
o.Link = hdrLink
|
|
}
|
|
|
|
// response payload
|
|
if err := consumer.Consume(response.Body(), &o.Payload); err != nil && err != io.EOF {
|
|
return err
|
|
}
|
|
|
|
return nil
|
|
}
|
|
|
|
// NewAccountFollowersBadRequest creates a AccountFollowersBadRequest with default headers values
|
|
func NewAccountFollowersBadRequest() *AccountFollowersBadRequest {
|
|
return &AccountFollowersBadRequest{}
|
|
}
|
|
|
|
/*
|
|
AccountFollowersBadRequest describes a response with status code 400, with default header values.
|
|
|
|
bad request
|
|
*/
|
|
type AccountFollowersBadRequest struct {
|
|
}
|
|
|
|
// IsSuccess returns true when this account followers bad request response has a 2xx status code
|
|
func (o *AccountFollowersBadRequest) IsSuccess() bool {
|
|
return false
|
|
}
|
|
|
|
// IsRedirect returns true when this account followers bad request response has a 3xx status code
|
|
func (o *AccountFollowersBadRequest) IsRedirect() bool {
|
|
return false
|
|
}
|
|
|
|
// IsClientError returns true when this account followers bad request response has a 4xx status code
|
|
func (o *AccountFollowersBadRequest) IsClientError() bool {
|
|
return true
|
|
}
|
|
|
|
// IsServerError returns true when this account followers bad request response has a 5xx status code
|
|
func (o *AccountFollowersBadRequest) IsServerError() bool {
|
|
return false
|
|
}
|
|
|
|
// IsCode returns true when this account followers bad request response a status code equal to that given
|
|
func (o *AccountFollowersBadRequest) IsCode(code int) bool {
|
|
return code == 400
|
|
}
|
|
|
|
// Code gets the status code for the account followers bad request response
|
|
func (o *AccountFollowersBadRequest) Code() int {
|
|
return 400
|
|
}
|
|
|
|
func (o *AccountFollowersBadRequest) Error() string {
|
|
return fmt.Sprintf("[GET /api/v1/accounts/{id}/followers][%d] accountFollowersBadRequest", 400)
|
|
}
|
|
|
|
func (o *AccountFollowersBadRequest) String() string {
|
|
return fmt.Sprintf("[GET /api/v1/accounts/{id}/followers][%d] accountFollowersBadRequest", 400)
|
|
}
|
|
|
|
func (o *AccountFollowersBadRequest) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
|
|
|
|
return nil
|
|
}
|
|
|
|
// NewAccountFollowersUnauthorized creates a AccountFollowersUnauthorized with default headers values
|
|
func NewAccountFollowersUnauthorized() *AccountFollowersUnauthorized {
|
|
return &AccountFollowersUnauthorized{}
|
|
}
|
|
|
|
/*
|
|
AccountFollowersUnauthorized describes a response with status code 401, with default header values.
|
|
|
|
unauthorized
|
|
*/
|
|
type AccountFollowersUnauthorized struct {
|
|
}
|
|
|
|
// IsSuccess returns true when this account followers unauthorized response has a 2xx status code
|
|
func (o *AccountFollowersUnauthorized) IsSuccess() bool {
|
|
return false
|
|
}
|
|
|
|
// IsRedirect returns true when this account followers unauthorized response has a 3xx status code
|
|
func (o *AccountFollowersUnauthorized) IsRedirect() bool {
|
|
return false
|
|
}
|
|
|
|
// IsClientError returns true when this account followers unauthorized response has a 4xx status code
|
|
func (o *AccountFollowersUnauthorized) IsClientError() bool {
|
|
return true
|
|
}
|
|
|
|
// IsServerError returns true when this account followers unauthorized response has a 5xx status code
|
|
func (o *AccountFollowersUnauthorized) IsServerError() bool {
|
|
return false
|
|
}
|
|
|
|
// IsCode returns true when this account followers unauthorized response a status code equal to that given
|
|
func (o *AccountFollowersUnauthorized) IsCode(code int) bool {
|
|
return code == 401
|
|
}
|
|
|
|
// Code gets the status code for the account followers unauthorized response
|
|
func (o *AccountFollowersUnauthorized) Code() int {
|
|
return 401
|
|
}
|
|
|
|
func (o *AccountFollowersUnauthorized) Error() string {
|
|
return fmt.Sprintf("[GET /api/v1/accounts/{id}/followers][%d] accountFollowersUnauthorized", 401)
|
|
}
|
|
|
|
func (o *AccountFollowersUnauthorized) String() string {
|
|
return fmt.Sprintf("[GET /api/v1/accounts/{id}/followers][%d] accountFollowersUnauthorized", 401)
|
|
}
|
|
|
|
func (o *AccountFollowersUnauthorized) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
|
|
|
|
return nil
|
|
}
|
|
|
|
// NewAccountFollowersNotFound creates a AccountFollowersNotFound with default headers values
|
|
func NewAccountFollowersNotFound() *AccountFollowersNotFound {
|
|
return &AccountFollowersNotFound{}
|
|
}
|
|
|
|
/*
|
|
AccountFollowersNotFound describes a response with status code 404, with default header values.
|
|
|
|
not found
|
|
*/
|
|
type AccountFollowersNotFound struct {
|
|
}
|
|
|
|
// IsSuccess returns true when this account followers not found response has a 2xx status code
|
|
func (o *AccountFollowersNotFound) IsSuccess() bool {
|
|
return false
|
|
}
|
|
|
|
// IsRedirect returns true when this account followers not found response has a 3xx status code
|
|
func (o *AccountFollowersNotFound) IsRedirect() bool {
|
|
return false
|
|
}
|
|
|
|
// IsClientError returns true when this account followers not found response has a 4xx status code
|
|
func (o *AccountFollowersNotFound) IsClientError() bool {
|
|
return true
|
|
}
|
|
|
|
// IsServerError returns true when this account followers not found response has a 5xx status code
|
|
func (o *AccountFollowersNotFound) IsServerError() bool {
|
|
return false
|
|
}
|
|
|
|
// IsCode returns true when this account followers not found response a status code equal to that given
|
|
func (o *AccountFollowersNotFound) IsCode(code int) bool {
|
|
return code == 404
|
|
}
|
|
|
|
// Code gets the status code for the account followers not found response
|
|
func (o *AccountFollowersNotFound) Code() int {
|
|
return 404
|
|
}
|
|
|
|
func (o *AccountFollowersNotFound) Error() string {
|
|
return fmt.Sprintf("[GET /api/v1/accounts/{id}/followers][%d] accountFollowersNotFound", 404)
|
|
}
|
|
|
|
func (o *AccountFollowersNotFound) String() string {
|
|
return fmt.Sprintf("[GET /api/v1/accounts/{id}/followers][%d] accountFollowersNotFound", 404)
|
|
}
|
|
|
|
func (o *AccountFollowersNotFound) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
|
|
|
|
return nil
|
|
}
|
|
|
|
// NewAccountFollowersNotAcceptable creates a AccountFollowersNotAcceptable with default headers values
|
|
func NewAccountFollowersNotAcceptable() *AccountFollowersNotAcceptable {
|
|
return &AccountFollowersNotAcceptable{}
|
|
}
|
|
|
|
/*
|
|
AccountFollowersNotAcceptable describes a response with status code 406, with default header values.
|
|
|
|
not acceptable
|
|
*/
|
|
type AccountFollowersNotAcceptable struct {
|
|
}
|
|
|
|
// IsSuccess returns true when this account followers not acceptable response has a 2xx status code
|
|
func (o *AccountFollowersNotAcceptable) IsSuccess() bool {
|
|
return false
|
|
}
|
|
|
|
// IsRedirect returns true when this account followers not acceptable response has a 3xx status code
|
|
func (o *AccountFollowersNotAcceptable) IsRedirect() bool {
|
|
return false
|
|
}
|
|
|
|
// IsClientError returns true when this account followers not acceptable response has a 4xx status code
|
|
func (o *AccountFollowersNotAcceptable) IsClientError() bool {
|
|
return true
|
|
}
|
|
|
|
// IsServerError returns true when this account followers not acceptable response has a 5xx status code
|
|
func (o *AccountFollowersNotAcceptable) IsServerError() bool {
|
|
return false
|
|
}
|
|
|
|
// IsCode returns true when this account followers not acceptable response a status code equal to that given
|
|
func (o *AccountFollowersNotAcceptable) IsCode(code int) bool {
|
|
return code == 406
|
|
}
|
|
|
|
// Code gets the status code for the account followers not acceptable response
|
|
func (o *AccountFollowersNotAcceptable) Code() int {
|
|
return 406
|
|
}
|
|
|
|
func (o *AccountFollowersNotAcceptable) Error() string {
|
|
return fmt.Sprintf("[GET /api/v1/accounts/{id}/followers][%d] accountFollowersNotAcceptable", 406)
|
|
}
|
|
|
|
func (o *AccountFollowersNotAcceptable) String() string {
|
|
return fmt.Sprintf("[GET /api/v1/accounts/{id}/followers][%d] accountFollowersNotAcceptable", 406)
|
|
}
|
|
|
|
func (o *AccountFollowersNotAcceptable) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
|
|
|
|
return nil
|
|
}
|
|
|
|
// NewAccountFollowersInternalServerError creates a AccountFollowersInternalServerError with default headers values
|
|
func NewAccountFollowersInternalServerError() *AccountFollowersInternalServerError {
|
|
return &AccountFollowersInternalServerError{}
|
|
}
|
|
|
|
/*
|
|
AccountFollowersInternalServerError describes a response with status code 500, with default header values.
|
|
|
|
internal server error
|
|
*/
|
|
type AccountFollowersInternalServerError struct {
|
|
}
|
|
|
|
// IsSuccess returns true when this account followers internal server error response has a 2xx status code
|
|
func (o *AccountFollowersInternalServerError) IsSuccess() bool {
|
|
return false
|
|
}
|
|
|
|
// IsRedirect returns true when this account followers internal server error response has a 3xx status code
|
|
func (o *AccountFollowersInternalServerError) IsRedirect() bool {
|
|
return false
|
|
}
|
|
|
|
// IsClientError returns true when this account followers internal server error response has a 4xx status code
|
|
func (o *AccountFollowersInternalServerError) IsClientError() bool {
|
|
return false
|
|
}
|
|
|
|
// IsServerError returns true when this account followers internal server error response has a 5xx status code
|
|
func (o *AccountFollowersInternalServerError) IsServerError() bool {
|
|
return true
|
|
}
|
|
|
|
// IsCode returns true when this account followers internal server error response a status code equal to that given
|
|
func (o *AccountFollowersInternalServerError) IsCode(code int) bool {
|
|
return code == 500
|
|
}
|
|
|
|
// Code gets the status code for the account followers internal server error response
|
|
func (o *AccountFollowersInternalServerError) Code() int {
|
|
return 500
|
|
}
|
|
|
|
func (o *AccountFollowersInternalServerError) Error() string {
|
|
return fmt.Sprintf("[GET /api/v1/accounts/{id}/followers][%d] accountFollowersInternalServerError", 500)
|
|
}
|
|
|
|
func (o *AccountFollowersInternalServerError) String() string {
|
|
return fmt.Sprintf("[GET /api/v1/accounts/{id}/followers][%d] accountFollowersInternalServerError", 500)
|
|
}
|
|
|
|
func (o *AccountFollowersInternalServerError) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
|
|
|
|
return nil
|
|
}
|