decentral1se
e4ade9c758
All checks were successful
continuous-integration/drone/push Build is passing
427 lines
12 KiB
Go
427 lines
12 KiB
Go
// Code generated by go-swagger; DO NOT EDIT.
|
|
|
|
package mutes
|
|
|
|
// 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"
|
|
)
|
|
|
|
// MutesGetReader is a Reader for the MutesGet structure.
|
|
type MutesGetReader struct {
|
|
formats strfmt.Registry
|
|
}
|
|
|
|
// ReadResponse reads a server response into the received o.
|
|
func (o *MutesGetReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) {
|
|
switch response.Code() {
|
|
case 200:
|
|
result := NewMutesGetOK()
|
|
if err := result.readResponse(response, consumer, o.formats); err != nil {
|
|
return nil, err
|
|
}
|
|
return result, nil
|
|
case 400:
|
|
result := NewMutesGetBadRequest()
|
|
if err := result.readResponse(response, consumer, o.formats); err != nil {
|
|
return nil, err
|
|
}
|
|
return nil, result
|
|
case 401:
|
|
result := NewMutesGetUnauthorized()
|
|
if err := result.readResponse(response, consumer, o.formats); err != nil {
|
|
return nil, err
|
|
}
|
|
return nil, result
|
|
case 404:
|
|
result := NewMutesGetNotFound()
|
|
if err := result.readResponse(response, consumer, o.formats); err != nil {
|
|
return nil, err
|
|
}
|
|
return nil, result
|
|
case 406:
|
|
result := NewMutesGetNotAcceptable()
|
|
if err := result.readResponse(response, consumer, o.formats); err != nil {
|
|
return nil, err
|
|
}
|
|
return nil, result
|
|
case 500:
|
|
result := NewMutesGetInternalServerError()
|
|
if err := result.readResponse(response, consumer, o.formats); err != nil {
|
|
return nil, err
|
|
}
|
|
return nil, result
|
|
default:
|
|
return nil, runtime.NewAPIError("[GET /api/v1/mutes] mutesGet", response, response.Code())
|
|
}
|
|
}
|
|
|
|
// NewMutesGetOK creates a MutesGetOK with default headers values
|
|
func NewMutesGetOK() *MutesGetOK {
|
|
return &MutesGetOK{}
|
|
}
|
|
|
|
/*
|
|
MutesGetOK describes a response with status code 200, with default header values.
|
|
|
|
List of muted accounts, including when their mutes expire (if applicable).
|
|
*/
|
|
type MutesGetOK struct {
|
|
|
|
/* Links to the next and previous queries.
|
|
*/
|
|
Link string
|
|
|
|
Payload []*models.MutedAccount
|
|
}
|
|
|
|
// IsSuccess returns true when this mutes get o k response has a 2xx status code
|
|
func (o *MutesGetOK) IsSuccess() bool {
|
|
return true
|
|
}
|
|
|
|
// IsRedirect returns true when this mutes get o k response has a 3xx status code
|
|
func (o *MutesGetOK) IsRedirect() bool {
|
|
return false
|
|
}
|
|
|
|
// IsClientError returns true when this mutes get o k response has a 4xx status code
|
|
func (o *MutesGetOK) IsClientError() bool {
|
|
return false
|
|
}
|
|
|
|
// IsServerError returns true when this mutes get o k response has a 5xx status code
|
|
func (o *MutesGetOK) IsServerError() bool {
|
|
return false
|
|
}
|
|
|
|
// IsCode returns true when this mutes get o k response a status code equal to that given
|
|
func (o *MutesGetOK) IsCode(code int) bool {
|
|
return code == 200
|
|
}
|
|
|
|
// Code gets the status code for the mutes get o k response
|
|
func (o *MutesGetOK) Code() int {
|
|
return 200
|
|
}
|
|
|
|
func (o *MutesGetOK) Error() string {
|
|
payload, _ := json.Marshal(o.Payload)
|
|
return fmt.Sprintf("[GET /api/v1/mutes][%d] mutesGetOK %s", 200, payload)
|
|
}
|
|
|
|
func (o *MutesGetOK) String() string {
|
|
payload, _ := json.Marshal(o.Payload)
|
|
return fmt.Sprintf("[GET /api/v1/mutes][%d] mutesGetOK %s", 200, payload)
|
|
}
|
|
|
|
func (o *MutesGetOK) GetPayload() []*models.MutedAccount {
|
|
return o.Payload
|
|
}
|
|
|
|
func (o *MutesGetOK) 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
|
|
}
|
|
|
|
// NewMutesGetBadRequest creates a MutesGetBadRequest with default headers values
|
|
func NewMutesGetBadRequest() *MutesGetBadRequest {
|
|
return &MutesGetBadRequest{}
|
|
}
|
|
|
|
/*
|
|
MutesGetBadRequest describes a response with status code 400, with default header values.
|
|
|
|
bad request
|
|
*/
|
|
type MutesGetBadRequest struct {
|
|
}
|
|
|
|
// IsSuccess returns true when this mutes get bad request response has a 2xx status code
|
|
func (o *MutesGetBadRequest) IsSuccess() bool {
|
|
return false
|
|
}
|
|
|
|
// IsRedirect returns true when this mutes get bad request response has a 3xx status code
|
|
func (o *MutesGetBadRequest) IsRedirect() bool {
|
|
return false
|
|
}
|
|
|
|
// IsClientError returns true when this mutes get bad request response has a 4xx status code
|
|
func (o *MutesGetBadRequest) IsClientError() bool {
|
|
return true
|
|
}
|
|
|
|
// IsServerError returns true when this mutes get bad request response has a 5xx status code
|
|
func (o *MutesGetBadRequest) IsServerError() bool {
|
|
return false
|
|
}
|
|
|
|
// IsCode returns true when this mutes get bad request response a status code equal to that given
|
|
func (o *MutesGetBadRequest) IsCode(code int) bool {
|
|
return code == 400
|
|
}
|
|
|
|
// Code gets the status code for the mutes get bad request response
|
|
func (o *MutesGetBadRequest) Code() int {
|
|
return 400
|
|
}
|
|
|
|
func (o *MutesGetBadRequest) Error() string {
|
|
return fmt.Sprintf("[GET /api/v1/mutes][%d] mutesGetBadRequest", 400)
|
|
}
|
|
|
|
func (o *MutesGetBadRequest) String() string {
|
|
return fmt.Sprintf("[GET /api/v1/mutes][%d] mutesGetBadRequest", 400)
|
|
}
|
|
|
|
func (o *MutesGetBadRequest) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
|
|
|
|
return nil
|
|
}
|
|
|
|
// NewMutesGetUnauthorized creates a MutesGetUnauthorized with default headers values
|
|
func NewMutesGetUnauthorized() *MutesGetUnauthorized {
|
|
return &MutesGetUnauthorized{}
|
|
}
|
|
|
|
/*
|
|
MutesGetUnauthorized describes a response with status code 401, with default header values.
|
|
|
|
unauthorized
|
|
*/
|
|
type MutesGetUnauthorized struct {
|
|
}
|
|
|
|
// IsSuccess returns true when this mutes get unauthorized response has a 2xx status code
|
|
func (o *MutesGetUnauthorized) IsSuccess() bool {
|
|
return false
|
|
}
|
|
|
|
// IsRedirect returns true when this mutes get unauthorized response has a 3xx status code
|
|
func (o *MutesGetUnauthorized) IsRedirect() bool {
|
|
return false
|
|
}
|
|
|
|
// IsClientError returns true when this mutes get unauthorized response has a 4xx status code
|
|
func (o *MutesGetUnauthorized) IsClientError() bool {
|
|
return true
|
|
}
|
|
|
|
// IsServerError returns true when this mutes get unauthorized response has a 5xx status code
|
|
func (o *MutesGetUnauthorized) IsServerError() bool {
|
|
return false
|
|
}
|
|
|
|
// IsCode returns true when this mutes get unauthorized response a status code equal to that given
|
|
func (o *MutesGetUnauthorized) IsCode(code int) bool {
|
|
return code == 401
|
|
}
|
|
|
|
// Code gets the status code for the mutes get unauthorized response
|
|
func (o *MutesGetUnauthorized) Code() int {
|
|
return 401
|
|
}
|
|
|
|
func (o *MutesGetUnauthorized) Error() string {
|
|
return fmt.Sprintf("[GET /api/v1/mutes][%d] mutesGetUnauthorized", 401)
|
|
}
|
|
|
|
func (o *MutesGetUnauthorized) String() string {
|
|
return fmt.Sprintf("[GET /api/v1/mutes][%d] mutesGetUnauthorized", 401)
|
|
}
|
|
|
|
func (o *MutesGetUnauthorized) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
|
|
|
|
return nil
|
|
}
|
|
|
|
// NewMutesGetNotFound creates a MutesGetNotFound with default headers values
|
|
func NewMutesGetNotFound() *MutesGetNotFound {
|
|
return &MutesGetNotFound{}
|
|
}
|
|
|
|
/*
|
|
MutesGetNotFound describes a response with status code 404, with default header values.
|
|
|
|
not found
|
|
*/
|
|
type MutesGetNotFound struct {
|
|
}
|
|
|
|
// IsSuccess returns true when this mutes get not found response has a 2xx status code
|
|
func (o *MutesGetNotFound) IsSuccess() bool {
|
|
return false
|
|
}
|
|
|
|
// IsRedirect returns true when this mutes get not found response has a 3xx status code
|
|
func (o *MutesGetNotFound) IsRedirect() bool {
|
|
return false
|
|
}
|
|
|
|
// IsClientError returns true when this mutes get not found response has a 4xx status code
|
|
func (o *MutesGetNotFound) IsClientError() bool {
|
|
return true
|
|
}
|
|
|
|
// IsServerError returns true when this mutes get not found response has a 5xx status code
|
|
func (o *MutesGetNotFound) IsServerError() bool {
|
|
return false
|
|
}
|
|
|
|
// IsCode returns true when this mutes get not found response a status code equal to that given
|
|
func (o *MutesGetNotFound) IsCode(code int) bool {
|
|
return code == 404
|
|
}
|
|
|
|
// Code gets the status code for the mutes get not found response
|
|
func (o *MutesGetNotFound) Code() int {
|
|
return 404
|
|
}
|
|
|
|
func (o *MutesGetNotFound) Error() string {
|
|
return fmt.Sprintf("[GET /api/v1/mutes][%d] mutesGetNotFound", 404)
|
|
}
|
|
|
|
func (o *MutesGetNotFound) String() string {
|
|
return fmt.Sprintf("[GET /api/v1/mutes][%d] mutesGetNotFound", 404)
|
|
}
|
|
|
|
func (o *MutesGetNotFound) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
|
|
|
|
return nil
|
|
}
|
|
|
|
// NewMutesGetNotAcceptable creates a MutesGetNotAcceptable with default headers values
|
|
func NewMutesGetNotAcceptable() *MutesGetNotAcceptable {
|
|
return &MutesGetNotAcceptable{}
|
|
}
|
|
|
|
/*
|
|
MutesGetNotAcceptable describes a response with status code 406, with default header values.
|
|
|
|
not acceptable
|
|
*/
|
|
type MutesGetNotAcceptable struct {
|
|
}
|
|
|
|
// IsSuccess returns true when this mutes get not acceptable response has a 2xx status code
|
|
func (o *MutesGetNotAcceptable) IsSuccess() bool {
|
|
return false
|
|
}
|
|
|
|
// IsRedirect returns true when this mutes get not acceptable response has a 3xx status code
|
|
func (o *MutesGetNotAcceptable) IsRedirect() bool {
|
|
return false
|
|
}
|
|
|
|
// IsClientError returns true when this mutes get not acceptable response has a 4xx status code
|
|
func (o *MutesGetNotAcceptable) IsClientError() bool {
|
|
return true
|
|
}
|
|
|
|
// IsServerError returns true when this mutes get not acceptable response has a 5xx status code
|
|
func (o *MutesGetNotAcceptable) IsServerError() bool {
|
|
return false
|
|
}
|
|
|
|
// IsCode returns true when this mutes get not acceptable response a status code equal to that given
|
|
func (o *MutesGetNotAcceptable) IsCode(code int) bool {
|
|
return code == 406
|
|
}
|
|
|
|
// Code gets the status code for the mutes get not acceptable response
|
|
func (o *MutesGetNotAcceptable) Code() int {
|
|
return 406
|
|
}
|
|
|
|
func (o *MutesGetNotAcceptable) Error() string {
|
|
return fmt.Sprintf("[GET /api/v1/mutes][%d] mutesGetNotAcceptable", 406)
|
|
}
|
|
|
|
func (o *MutesGetNotAcceptable) String() string {
|
|
return fmt.Sprintf("[GET /api/v1/mutes][%d] mutesGetNotAcceptable", 406)
|
|
}
|
|
|
|
func (o *MutesGetNotAcceptable) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
|
|
|
|
return nil
|
|
}
|
|
|
|
// NewMutesGetInternalServerError creates a MutesGetInternalServerError with default headers values
|
|
func NewMutesGetInternalServerError() *MutesGetInternalServerError {
|
|
return &MutesGetInternalServerError{}
|
|
}
|
|
|
|
/*
|
|
MutesGetInternalServerError describes a response with status code 500, with default header values.
|
|
|
|
internal server error
|
|
*/
|
|
type MutesGetInternalServerError struct {
|
|
}
|
|
|
|
// IsSuccess returns true when this mutes get internal server error response has a 2xx status code
|
|
func (o *MutesGetInternalServerError) IsSuccess() bool {
|
|
return false
|
|
}
|
|
|
|
// IsRedirect returns true when this mutes get internal server error response has a 3xx status code
|
|
func (o *MutesGetInternalServerError) IsRedirect() bool {
|
|
return false
|
|
}
|
|
|
|
// IsClientError returns true when this mutes get internal server error response has a 4xx status code
|
|
func (o *MutesGetInternalServerError) IsClientError() bool {
|
|
return false
|
|
}
|
|
|
|
// IsServerError returns true when this mutes get internal server error response has a 5xx status code
|
|
func (o *MutesGetInternalServerError) IsServerError() bool {
|
|
return true
|
|
}
|
|
|
|
// IsCode returns true when this mutes get internal server error response a status code equal to that given
|
|
func (o *MutesGetInternalServerError) IsCode(code int) bool {
|
|
return code == 500
|
|
}
|
|
|
|
// Code gets the status code for the mutes get internal server error response
|
|
func (o *MutesGetInternalServerError) Code() int {
|
|
return 500
|
|
}
|
|
|
|
func (o *MutesGetInternalServerError) Error() string {
|
|
return fmt.Sprintf("[GET /api/v1/mutes][%d] mutesGetInternalServerError", 500)
|
|
}
|
|
|
|
func (o *MutesGetInternalServerError) String() string {
|
|
return fmt.Sprintf("[GET /api/v1/mutes][%d] mutesGetInternalServerError", 500)
|
|
}
|
|
|
|
func (o *MutesGetInternalServerError) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
|
|
|
|
return nil
|
|
}
|