All checks were successful
continuous-integration/drone/push Build is passing
427 lines
14 KiB
Go
427 lines
14 KiB
Go
// Code generated by go-swagger; DO NOT EDIT.
|
|
|
|
package follow_requests
|
|
|
|
// 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"
|
|
)
|
|
|
|
// GetFollowRequestsReader is a Reader for the GetFollowRequests structure.
|
|
type GetFollowRequestsReader struct {
|
|
formats strfmt.Registry
|
|
}
|
|
|
|
// ReadResponse reads a server response into the received o.
|
|
func (o *GetFollowRequestsReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) {
|
|
switch response.Code() {
|
|
case 200:
|
|
result := NewGetFollowRequestsOK()
|
|
if err := result.readResponse(response, consumer, o.formats); err != nil {
|
|
return nil, err
|
|
}
|
|
return result, nil
|
|
case 400:
|
|
result := NewGetFollowRequestsBadRequest()
|
|
if err := result.readResponse(response, consumer, o.formats); err != nil {
|
|
return nil, err
|
|
}
|
|
return nil, result
|
|
case 401:
|
|
result := NewGetFollowRequestsUnauthorized()
|
|
if err := result.readResponse(response, consumer, o.formats); err != nil {
|
|
return nil, err
|
|
}
|
|
return nil, result
|
|
case 404:
|
|
result := NewGetFollowRequestsNotFound()
|
|
if err := result.readResponse(response, consumer, o.formats); err != nil {
|
|
return nil, err
|
|
}
|
|
return nil, result
|
|
case 406:
|
|
result := NewGetFollowRequestsNotAcceptable()
|
|
if err := result.readResponse(response, consumer, o.formats); err != nil {
|
|
return nil, err
|
|
}
|
|
return nil, result
|
|
case 500:
|
|
result := NewGetFollowRequestsInternalServerError()
|
|
if err := result.readResponse(response, consumer, o.formats); err != nil {
|
|
return nil, err
|
|
}
|
|
return nil, result
|
|
default:
|
|
return nil, runtime.NewAPIError("[GET /api/v1/follow_requests] getFollowRequests", response, response.Code())
|
|
}
|
|
}
|
|
|
|
// NewGetFollowRequestsOK creates a GetFollowRequestsOK with default headers values
|
|
func NewGetFollowRequestsOK() *GetFollowRequestsOK {
|
|
return &GetFollowRequestsOK{}
|
|
}
|
|
|
|
/*
|
|
GetFollowRequestsOK describes a response with status code 200, with default header values.
|
|
|
|
GetFollowRequestsOK get follow requests o k
|
|
*/
|
|
type GetFollowRequestsOK struct {
|
|
|
|
/* Links to the next and previous queries.
|
|
*/
|
|
Link string
|
|
|
|
Payload []*models.Account
|
|
}
|
|
|
|
// IsSuccess returns true when this get follow requests o k response has a 2xx status code
|
|
func (o *GetFollowRequestsOK) IsSuccess() bool {
|
|
return true
|
|
}
|
|
|
|
// IsRedirect returns true when this get follow requests o k response has a 3xx status code
|
|
func (o *GetFollowRequestsOK) IsRedirect() bool {
|
|
return false
|
|
}
|
|
|
|
// IsClientError returns true when this get follow requests o k response has a 4xx status code
|
|
func (o *GetFollowRequestsOK) IsClientError() bool {
|
|
return false
|
|
}
|
|
|
|
// IsServerError returns true when this get follow requests o k response has a 5xx status code
|
|
func (o *GetFollowRequestsOK) IsServerError() bool {
|
|
return false
|
|
}
|
|
|
|
// IsCode returns true when this get follow requests o k response a status code equal to that given
|
|
func (o *GetFollowRequestsOK) IsCode(code int) bool {
|
|
return code == 200
|
|
}
|
|
|
|
// Code gets the status code for the get follow requests o k response
|
|
func (o *GetFollowRequestsOK) Code() int {
|
|
return 200
|
|
}
|
|
|
|
func (o *GetFollowRequestsOK) Error() string {
|
|
payload, _ := json.Marshal(o.Payload)
|
|
return fmt.Sprintf("[GET /api/v1/follow_requests][%d] getFollowRequestsOK %s", 200, payload)
|
|
}
|
|
|
|
func (o *GetFollowRequestsOK) String() string {
|
|
payload, _ := json.Marshal(o.Payload)
|
|
return fmt.Sprintf("[GET /api/v1/follow_requests][%d] getFollowRequestsOK %s", 200, payload)
|
|
}
|
|
|
|
func (o *GetFollowRequestsOK) GetPayload() []*models.Account {
|
|
return o.Payload
|
|
}
|
|
|
|
func (o *GetFollowRequestsOK) 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
|
|
}
|
|
|
|
// NewGetFollowRequestsBadRequest creates a GetFollowRequestsBadRequest with default headers values
|
|
func NewGetFollowRequestsBadRequest() *GetFollowRequestsBadRequest {
|
|
return &GetFollowRequestsBadRequest{}
|
|
}
|
|
|
|
/*
|
|
GetFollowRequestsBadRequest describes a response with status code 400, with default header values.
|
|
|
|
bad request
|
|
*/
|
|
type GetFollowRequestsBadRequest struct {
|
|
}
|
|
|
|
// IsSuccess returns true when this get follow requests bad request response has a 2xx status code
|
|
func (o *GetFollowRequestsBadRequest) IsSuccess() bool {
|
|
return false
|
|
}
|
|
|
|
// IsRedirect returns true when this get follow requests bad request response has a 3xx status code
|
|
func (o *GetFollowRequestsBadRequest) IsRedirect() bool {
|
|
return false
|
|
}
|
|
|
|
// IsClientError returns true when this get follow requests bad request response has a 4xx status code
|
|
func (o *GetFollowRequestsBadRequest) IsClientError() bool {
|
|
return true
|
|
}
|
|
|
|
// IsServerError returns true when this get follow requests bad request response has a 5xx status code
|
|
func (o *GetFollowRequestsBadRequest) IsServerError() bool {
|
|
return false
|
|
}
|
|
|
|
// IsCode returns true when this get follow requests bad request response a status code equal to that given
|
|
func (o *GetFollowRequestsBadRequest) IsCode(code int) bool {
|
|
return code == 400
|
|
}
|
|
|
|
// Code gets the status code for the get follow requests bad request response
|
|
func (o *GetFollowRequestsBadRequest) Code() int {
|
|
return 400
|
|
}
|
|
|
|
func (o *GetFollowRequestsBadRequest) Error() string {
|
|
return fmt.Sprintf("[GET /api/v1/follow_requests][%d] getFollowRequestsBadRequest", 400)
|
|
}
|
|
|
|
func (o *GetFollowRequestsBadRequest) String() string {
|
|
return fmt.Sprintf("[GET /api/v1/follow_requests][%d] getFollowRequestsBadRequest", 400)
|
|
}
|
|
|
|
func (o *GetFollowRequestsBadRequest) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
|
|
|
|
return nil
|
|
}
|
|
|
|
// NewGetFollowRequestsUnauthorized creates a GetFollowRequestsUnauthorized with default headers values
|
|
func NewGetFollowRequestsUnauthorized() *GetFollowRequestsUnauthorized {
|
|
return &GetFollowRequestsUnauthorized{}
|
|
}
|
|
|
|
/*
|
|
GetFollowRequestsUnauthorized describes a response with status code 401, with default header values.
|
|
|
|
unauthorized
|
|
*/
|
|
type GetFollowRequestsUnauthorized struct {
|
|
}
|
|
|
|
// IsSuccess returns true when this get follow requests unauthorized response has a 2xx status code
|
|
func (o *GetFollowRequestsUnauthorized) IsSuccess() bool {
|
|
return false
|
|
}
|
|
|
|
// IsRedirect returns true when this get follow requests unauthorized response has a 3xx status code
|
|
func (o *GetFollowRequestsUnauthorized) IsRedirect() bool {
|
|
return false
|
|
}
|
|
|
|
// IsClientError returns true when this get follow requests unauthorized response has a 4xx status code
|
|
func (o *GetFollowRequestsUnauthorized) IsClientError() bool {
|
|
return true
|
|
}
|
|
|
|
// IsServerError returns true when this get follow requests unauthorized response has a 5xx status code
|
|
func (o *GetFollowRequestsUnauthorized) IsServerError() bool {
|
|
return false
|
|
}
|
|
|
|
// IsCode returns true when this get follow requests unauthorized response a status code equal to that given
|
|
func (o *GetFollowRequestsUnauthorized) IsCode(code int) bool {
|
|
return code == 401
|
|
}
|
|
|
|
// Code gets the status code for the get follow requests unauthorized response
|
|
func (o *GetFollowRequestsUnauthorized) Code() int {
|
|
return 401
|
|
}
|
|
|
|
func (o *GetFollowRequestsUnauthorized) Error() string {
|
|
return fmt.Sprintf("[GET /api/v1/follow_requests][%d] getFollowRequestsUnauthorized", 401)
|
|
}
|
|
|
|
func (o *GetFollowRequestsUnauthorized) String() string {
|
|
return fmt.Sprintf("[GET /api/v1/follow_requests][%d] getFollowRequestsUnauthorized", 401)
|
|
}
|
|
|
|
func (o *GetFollowRequestsUnauthorized) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
|
|
|
|
return nil
|
|
}
|
|
|
|
// NewGetFollowRequestsNotFound creates a GetFollowRequestsNotFound with default headers values
|
|
func NewGetFollowRequestsNotFound() *GetFollowRequestsNotFound {
|
|
return &GetFollowRequestsNotFound{}
|
|
}
|
|
|
|
/*
|
|
GetFollowRequestsNotFound describes a response with status code 404, with default header values.
|
|
|
|
not found
|
|
*/
|
|
type GetFollowRequestsNotFound struct {
|
|
}
|
|
|
|
// IsSuccess returns true when this get follow requests not found response has a 2xx status code
|
|
func (o *GetFollowRequestsNotFound) IsSuccess() bool {
|
|
return false
|
|
}
|
|
|
|
// IsRedirect returns true when this get follow requests not found response has a 3xx status code
|
|
func (o *GetFollowRequestsNotFound) IsRedirect() bool {
|
|
return false
|
|
}
|
|
|
|
// IsClientError returns true when this get follow requests not found response has a 4xx status code
|
|
func (o *GetFollowRequestsNotFound) IsClientError() bool {
|
|
return true
|
|
}
|
|
|
|
// IsServerError returns true when this get follow requests not found response has a 5xx status code
|
|
func (o *GetFollowRequestsNotFound) IsServerError() bool {
|
|
return false
|
|
}
|
|
|
|
// IsCode returns true when this get follow requests not found response a status code equal to that given
|
|
func (o *GetFollowRequestsNotFound) IsCode(code int) bool {
|
|
return code == 404
|
|
}
|
|
|
|
// Code gets the status code for the get follow requests not found response
|
|
func (o *GetFollowRequestsNotFound) Code() int {
|
|
return 404
|
|
}
|
|
|
|
func (o *GetFollowRequestsNotFound) Error() string {
|
|
return fmt.Sprintf("[GET /api/v1/follow_requests][%d] getFollowRequestsNotFound", 404)
|
|
}
|
|
|
|
func (o *GetFollowRequestsNotFound) String() string {
|
|
return fmt.Sprintf("[GET /api/v1/follow_requests][%d] getFollowRequestsNotFound", 404)
|
|
}
|
|
|
|
func (o *GetFollowRequestsNotFound) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
|
|
|
|
return nil
|
|
}
|
|
|
|
// NewGetFollowRequestsNotAcceptable creates a GetFollowRequestsNotAcceptable with default headers values
|
|
func NewGetFollowRequestsNotAcceptable() *GetFollowRequestsNotAcceptable {
|
|
return &GetFollowRequestsNotAcceptable{}
|
|
}
|
|
|
|
/*
|
|
GetFollowRequestsNotAcceptable describes a response with status code 406, with default header values.
|
|
|
|
not acceptable
|
|
*/
|
|
type GetFollowRequestsNotAcceptable struct {
|
|
}
|
|
|
|
// IsSuccess returns true when this get follow requests not acceptable response has a 2xx status code
|
|
func (o *GetFollowRequestsNotAcceptable) IsSuccess() bool {
|
|
return false
|
|
}
|
|
|
|
// IsRedirect returns true when this get follow requests not acceptable response has a 3xx status code
|
|
func (o *GetFollowRequestsNotAcceptable) IsRedirect() bool {
|
|
return false
|
|
}
|
|
|
|
// IsClientError returns true when this get follow requests not acceptable response has a 4xx status code
|
|
func (o *GetFollowRequestsNotAcceptable) IsClientError() bool {
|
|
return true
|
|
}
|
|
|
|
// IsServerError returns true when this get follow requests not acceptable response has a 5xx status code
|
|
func (o *GetFollowRequestsNotAcceptable) IsServerError() bool {
|
|
return false
|
|
}
|
|
|
|
// IsCode returns true when this get follow requests not acceptable response a status code equal to that given
|
|
func (o *GetFollowRequestsNotAcceptable) IsCode(code int) bool {
|
|
return code == 406
|
|
}
|
|
|
|
// Code gets the status code for the get follow requests not acceptable response
|
|
func (o *GetFollowRequestsNotAcceptable) Code() int {
|
|
return 406
|
|
}
|
|
|
|
func (o *GetFollowRequestsNotAcceptable) Error() string {
|
|
return fmt.Sprintf("[GET /api/v1/follow_requests][%d] getFollowRequestsNotAcceptable", 406)
|
|
}
|
|
|
|
func (o *GetFollowRequestsNotAcceptable) String() string {
|
|
return fmt.Sprintf("[GET /api/v1/follow_requests][%d] getFollowRequestsNotAcceptable", 406)
|
|
}
|
|
|
|
func (o *GetFollowRequestsNotAcceptable) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
|
|
|
|
return nil
|
|
}
|
|
|
|
// NewGetFollowRequestsInternalServerError creates a GetFollowRequestsInternalServerError with default headers values
|
|
func NewGetFollowRequestsInternalServerError() *GetFollowRequestsInternalServerError {
|
|
return &GetFollowRequestsInternalServerError{}
|
|
}
|
|
|
|
/*
|
|
GetFollowRequestsInternalServerError describes a response with status code 500, with default header values.
|
|
|
|
internal server error
|
|
*/
|
|
type GetFollowRequestsInternalServerError struct {
|
|
}
|
|
|
|
// IsSuccess returns true when this get follow requests internal server error response has a 2xx status code
|
|
func (o *GetFollowRequestsInternalServerError) IsSuccess() bool {
|
|
return false
|
|
}
|
|
|
|
// IsRedirect returns true when this get follow requests internal server error response has a 3xx status code
|
|
func (o *GetFollowRequestsInternalServerError) IsRedirect() bool {
|
|
return false
|
|
}
|
|
|
|
// IsClientError returns true when this get follow requests internal server error response has a 4xx status code
|
|
func (o *GetFollowRequestsInternalServerError) IsClientError() bool {
|
|
return false
|
|
}
|
|
|
|
// IsServerError returns true when this get follow requests internal server error response has a 5xx status code
|
|
func (o *GetFollowRequestsInternalServerError) IsServerError() bool {
|
|
return true
|
|
}
|
|
|
|
// IsCode returns true when this get follow requests internal server error response a status code equal to that given
|
|
func (o *GetFollowRequestsInternalServerError) IsCode(code int) bool {
|
|
return code == 500
|
|
}
|
|
|
|
// Code gets the status code for the get follow requests internal server error response
|
|
func (o *GetFollowRequestsInternalServerError) Code() int {
|
|
return 500
|
|
}
|
|
|
|
func (o *GetFollowRequestsInternalServerError) Error() string {
|
|
return fmt.Sprintf("[GET /api/v1/follow_requests][%d] getFollowRequestsInternalServerError", 500)
|
|
}
|
|
|
|
func (o *GetFollowRequestsInternalServerError) String() string {
|
|
return fmt.Sprintf("[GET /api/v1/follow_requests][%d] getFollowRequestsInternalServerError", 500)
|
|
}
|
|
|
|
func (o *GetFollowRequestsInternalServerError) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
|
|
|
|
return nil
|
|
}
|