gtslib/client/statuses/status_faved_by_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

477 lines
15 KiB
Go

// Code generated by go-swagger; DO NOT EDIT.
package statuses
// 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"
)
// StatusFavedByReader is a Reader for the StatusFavedBy structure.
type StatusFavedByReader struct {
formats strfmt.Registry
}
// ReadResponse reads a server response into the received o.
func (o *StatusFavedByReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) {
switch response.Code() {
case 200:
result := NewStatusFavedByOK()
if err := result.readResponse(response, consumer, o.formats); err != nil {
return nil, err
}
return result, nil
case 400:
result := NewStatusFavedByBadRequest()
if err := result.readResponse(response, consumer, o.formats); err != nil {
return nil, err
}
return nil, result
case 401:
result := NewStatusFavedByUnauthorized()
if err := result.readResponse(response, consumer, o.formats); err != nil {
return nil, err
}
return nil, result
case 403:
result := NewStatusFavedByForbidden()
if err := result.readResponse(response, consumer, o.formats); err != nil {
return nil, err
}
return nil, result
case 404:
result := NewStatusFavedByNotFound()
if err := result.readResponse(response, consumer, o.formats); err != nil {
return nil, err
}
return nil, result
case 406:
result := NewStatusFavedByNotAcceptable()
if err := result.readResponse(response, consumer, o.formats); err != nil {
return nil, err
}
return nil, result
case 500:
result := NewStatusFavedByInternalServerError()
if err := result.readResponse(response, consumer, o.formats); err != nil {
return nil, err
}
return nil, result
default:
return nil, runtime.NewAPIError("[GET /api/v1/statuses/{id}/favourited_by] statusFavedBy", response, response.Code())
}
}
// NewStatusFavedByOK creates a StatusFavedByOK with default headers values
func NewStatusFavedByOK() *StatusFavedByOK {
return &StatusFavedByOK{}
}
/*
StatusFavedByOK describes a response with status code 200, with default header values.
StatusFavedByOK status faved by o k
*/
type StatusFavedByOK struct {
Payload []*models.Account
}
// IsSuccess returns true when this status faved by o k response has a 2xx status code
func (o *StatusFavedByOK) IsSuccess() bool {
return true
}
// IsRedirect returns true when this status faved by o k response has a 3xx status code
func (o *StatusFavedByOK) IsRedirect() bool {
return false
}
// IsClientError returns true when this status faved by o k response has a 4xx status code
func (o *StatusFavedByOK) IsClientError() bool {
return false
}
// IsServerError returns true when this status faved by o k response has a 5xx status code
func (o *StatusFavedByOK) IsServerError() bool {
return false
}
// IsCode returns true when this status faved by o k response a status code equal to that given
func (o *StatusFavedByOK) IsCode(code int) bool {
return code == 200
}
// Code gets the status code for the status faved by o k response
func (o *StatusFavedByOK) Code() int {
return 200
}
func (o *StatusFavedByOK) Error() string {
payload, _ := json.Marshal(o.Payload)
return fmt.Sprintf("[GET /api/v1/statuses/{id}/favourited_by][%d] statusFavedByOK %s", 200, payload)
}
func (o *StatusFavedByOK) String() string {
payload, _ := json.Marshal(o.Payload)
return fmt.Sprintf("[GET /api/v1/statuses/{id}/favourited_by][%d] statusFavedByOK %s", 200, payload)
}
func (o *StatusFavedByOK) GetPayload() []*models.Account {
return o.Payload
}
func (o *StatusFavedByOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
// response payload
if err := consumer.Consume(response.Body(), &o.Payload); err != nil && err != io.EOF {
return err
}
return nil
}
// NewStatusFavedByBadRequest creates a StatusFavedByBadRequest with default headers values
func NewStatusFavedByBadRequest() *StatusFavedByBadRequest {
return &StatusFavedByBadRequest{}
}
/*
StatusFavedByBadRequest describes a response with status code 400, with default header values.
bad request
*/
type StatusFavedByBadRequest struct {
}
// IsSuccess returns true when this status faved by bad request response has a 2xx status code
func (o *StatusFavedByBadRequest) IsSuccess() bool {
return false
}
// IsRedirect returns true when this status faved by bad request response has a 3xx status code
func (o *StatusFavedByBadRequest) IsRedirect() bool {
return false
}
// IsClientError returns true when this status faved by bad request response has a 4xx status code
func (o *StatusFavedByBadRequest) IsClientError() bool {
return true
}
// IsServerError returns true when this status faved by bad request response has a 5xx status code
func (o *StatusFavedByBadRequest) IsServerError() bool {
return false
}
// IsCode returns true when this status faved by bad request response a status code equal to that given
func (o *StatusFavedByBadRequest) IsCode(code int) bool {
return code == 400
}
// Code gets the status code for the status faved by bad request response
func (o *StatusFavedByBadRequest) Code() int {
return 400
}
func (o *StatusFavedByBadRequest) Error() string {
return fmt.Sprintf("[GET /api/v1/statuses/{id}/favourited_by][%d] statusFavedByBadRequest", 400)
}
func (o *StatusFavedByBadRequest) String() string {
return fmt.Sprintf("[GET /api/v1/statuses/{id}/favourited_by][%d] statusFavedByBadRequest", 400)
}
func (o *StatusFavedByBadRequest) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
return nil
}
// NewStatusFavedByUnauthorized creates a StatusFavedByUnauthorized with default headers values
func NewStatusFavedByUnauthorized() *StatusFavedByUnauthorized {
return &StatusFavedByUnauthorized{}
}
/*
StatusFavedByUnauthorized describes a response with status code 401, with default header values.
unauthorized
*/
type StatusFavedByUnauthorized struct {
}
// IsSuccess returns true when this status faved by unauthorized response has a 2xx status code
func (o *StatusFavedByUnauthorized) IsSuccess() bool {
return false
}
// IsRedirect returns true when this status faved by unauthorized response has a 3xx status code
func (o *StatusFavedByUnauthorized) IsRedirect() bool {
return false
}
// IsClientError returns true when this status faved by unauthorized response has a 4xx status code
func (o *StatusFavedByUnauthorized) IsClientError() bool {
return true
}
// IsServerError returns true when this status faved by unauthorized response has a 5xx status code
func (o *StatusFavedByUnauthorized) IsServerError() bool {
return false
}
// IsCode returns true when this status faved by unauthorized response a status code equal to that given
func (o *StatusFavedByUnauthorized) IsCode(code int) bool {
return code == 401
}
// Code gets the status code for the status faved by unauthorized response
func (o *StatusFavedByUnauthorized) Code() int {
return 401
}
func (o *StatusFavedByUnauthorized) Error() string {
return fmt.Sprintf("[GET /api/v1/statuses/{id}/favourited_by][%d] statusFavedByUnauthorized", 401)
}
func (o *StatusFavedByUnauthorized) String() string {
return fmt.Sprintf("[GET /api/v1/statuses/{id}/favourited_by][%d] statusFavedByUnauthorized", 401)
}
func (o *StatusFavedByUnauthorized) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
return nil
}
// NewStatusFavedByForbidden creates a StatusFavedByForbidden with default headers values
func NewStatusFavedByForbidden() *StatusFavedByForbidden {
return &StatusFavedByForbidden{}
}
/*
StatusFavedByForbidden describes a response with status code 403, with default header values.
forbidden
*/
type StatusFavedByForbidden struct {
}
// IsSuccess returns true when this status faved by forbidden response has a 2xx status code
func (o *StatusFavedByForbidden) IsSuccess() bool {
return false
}
// IsRedirect returns true when this status faved by forbidden response has a 3xx status code
func (o *StatusFavedByForbidden) IsRedirect() bool {
return false
}
// IsClientError returns true when this status faved by forbidden response has a 4xx status code
func (o *StatusFavedByForbidden) IsClientError() bool {
return true
}
// IsServerError returns true when this status faved by forbidden response has a 5xx status code
func (o *StatusFavedByForbidden) IsServerError() bool {
return false
}
// IsCode returns true when this status faved by forbidden response a status code equal to that given
func (o *StatusFavedByForbidden) IsCode(code int) bool {
return code == 403
}
// Code gets the status code for the status faved by forbidden response
func (o *StatusFavedByForbidden) Code() int {
return 403
}
func (o *StatusFavedByForbidden) Error() string {
return fmt.Sprintf("[GET /api/v1/statuses/{id}/favourited_by][%d] statusFavedByForbidden", 403)
}
func (o *StatusFavedByForbidden) String() string {
return fmt.Sprintf("[GET /api/v1/statuses/{id}/favourited_by][%d] statusFavedByForbidden", 403)
}
func (o *StatusFavedByForbidden) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
return nil
}
// NewStatusFavedByNotFound creates a StatusFavedByNotFound with default headers values
func NewStatusFavedByNotFound() *StatusFavedByNotFound {
return &StatusFavedByNotFound{}
}
/*
StatusFavedByNotFound describes a response with status code 404, with default header values.
not found
*/
type StatusFavedByNotFound struct {
}
// IsSuccess returns true when this status faved by not found response has a 2xx status code
func (o *StatusFavedByNotFound) IsSuccess() bool {
return false
}
// IsRedirect returns true when this status faved by not found response has a 3xx status code
func (o *StatusFavedByNotFound) IsRedirect() bool {
return false
}
// IsClientError returns true when this status faved by not found response has a 4xx status code
func (o *StatusFavedByNotFound) IsClientError() bool {
return true
}
// IsServerError returns true when this status faved by not found response has a 5xx status code
func (o *StatusFavedByNotFound) IsServerError() bool {
return false
}
// IsCode returns true when this status faved by not found response a status code equal to that given
func (o *StatusFavedByNotFound) IsCode(code int) bool {
return code == 404
}
// Code gets the status code for the status faved by not found response
func (o *StatusFavedByNotFound) Code() int {
return 404
}
func (o *StatusFavedByNotFound) Error() string {
return fmt.Sprintf("[GET /api/v1/statuses/{id}/favourited_by][%d] statusFavedByNotFound", 404)
}
func (o *StatusFavedByNotFound) String() string {
return fmt.Sprintf("[GET /api/v1/statuses/{id}/favourited_by][%d] statusFavedByNotFound", 404)
}
func (o *StatusFavedByNotFound) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
return nil
}
// NewStatusFavedByNotAcceptable creates a StatusFavedByNotAcceptable with default headers values
func NewStatusFavedByNotAcceptable() *StatusFavedByNotAcceptable {
return &StatusFavedByNotAcceptable{}
}
/*
StatusFavedByNotAcceptable describes a response with status code 406, with default header values.
not acceptable
*/
type StatusFavedByNotAcceptable struct {
}
// IsSuccess returns true when this status faved by not acceptable response has a 2xx status code
func (o *StatusFavedByNotAcceptable) IsSuccess() bool {
return false
}
// IsRedirect returns true when this status faved by not acceptable response has a 3xx status code
func (o *StatusFavedByNotAcceptable) IsRedirect() bool {
return false
}
// IsClientError returns true when this status faved by not acceptable response has a 4xx status code
func (o *StatusFavedByNotAcceptable) IsClientError() bool {
return true
}
// IsServerError returns true when this status faved by not acceptable response has a 5xx status code
func (o *StatusFavedByNotAcceptable) IsServerError() bool {
return false
}
// IsCode returns true when this status faved by not acceptable response a status code equal to that given
func (o *StatusFavedByNotAcceptable) IsCode(code int) bool {
return code == 406
}
// Code gets the status code for the status faved by not acceptable response
func (o *StatusFavedByNotAcceptable) Code() int {
return 406
}
func (o *StatusFavedByNotAcceptable) Error() string {
return fmt.Sprintf("[GET /api/v1/statuses/{id}/favourited_by][%d] statusFavedByNotAcceptable", 406)
}
func (o *StatusFavedByNotAcceptable) String() string {
return fmt.Sprintf("[GET /api/v1/statuses/{id}/favourited_by][%d] statusFavedByNotAcceptable", 406)
}
func (o *StatusFavedByNotAcceptable) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
return nil
}
// NewStatusFavedByInternalServerError creates a StatusFavedByInternalServerError with default headers values
func NewStatusFavedByInternalServerError() *StatusFavedByInternalServerError {
return &StatusFavedByInternalServerError{}
}
/*
StatusFavedByInternalServerError describes a response with status code 500, with default header values.
internal server error
*/
type StatusFavedByInternalServerError struct {
}
// IsSuccess returns true when this status faved by internal server error response has a 2xx status code
func (o *StatusFavedByInternalServerError) IsSuccess() bool {
return false
}
// IsRedirect returns true when this status faved by internal server error response has a 3xx status code
func (o *StatusFavedByInternalServerError) IsRedirect() bool {
return false
}
// IsClientError returns true when this status faved by internal server error response has a 4xx status code
func (o *StatusFavedByInternalServerError) IsClientError() bool {
return false
}
// IsServerError returns true when this status faved by internal server error response has a 5xx status code
func (o *StatusFavedByInternalServerError) IsServerError() bool {
return true
}
// IsCode returns true when this status faved by internal server error response a status code equal to that given
func (o *StatusFavedByInternalServerError) IsCode(code int) bool {
return code == 500
}
// Code gets the status code for the status faved by internal server error response
func (o *StatusFavedByInternalServerError) Code() int {
return 500
}
func (o *StatusFavedByInternalServerError) Error() string {
return fmt.Sprintf("[GET /api/v1/statuses/{id}/favourited_by][%d] statusFavedByInternalServerError", 500)
}
func (o *StatusFavedByInternalServerError) String() string {
return fmt.Sprintf("[GET /api/v1/statuses/{id}/favourited_by][%d] statusFavedByInternalServerError", 500)
}
func (o *StatusFavedByInternalServerError) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
return nil
}