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

479 lines
14 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"
)
// StatusUnmuteReader is a Reader for the StatusUnmute structure.
type StatusUnmuteReader struct {
formats strfmt.Registry
}
// ReadResponse reads a server response into the received o.
func (o *StatusUnmuteReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) {
switch response.Code() {
case 200:
result := NewStatusUnmuteOK()
if err := result.readResponse(response, consumer, o.formats); err != nil {
return nil, err
}
return result, nil
case 400:
result := NewStatusUnmuteBadRequest()
if err := result.readResponse(response, consumer, o.formats); err != nil {
return nil, err
}
return nil, result
case 401:
result := NewStatusUnmuteUnauthorized()
if err := result.readResponse(response, consumer, o.formats); err != nil {
return nil, err
}
return nil, result
case 403:
result := NewStatusUnmuteForbidden()
if err := result.readResponse(response, consumer, o.formats); err != nil {
return nil, err
}
return nil, result
case 404:
result := NewStatusUnmuteNotFound()
if err := result.readResponse(response, consumer, o.formats); err != nil {
return nil, err
}
return nil, result
case 406:
result := NewStatusUnmuteNotAcceptable()
if err := result.readResponse(response, consumer, o.formats); err != nil {
return nil, err
}
return nil, result
case 500:
result := NewStatusUnmuteInternalServerError()
if err := result.readResponse(response, consumer, o.formats); err != nil {
return nil, err
}
return nil, result
default:
return nil, runtime.NewAPIError("[POST /api/v1/statuses/{id}/unmute] statusUnmute", response, response.Code())
}
}
// NewStatusUnmuteOK creates a StatusUnmuteOK with default headers values
func NewStatusUnmuteOK() *StatusUnmuteOK {
return &StatusUnmuteOK{}
}
/*
StatusUnmuteOK describes a response with status code 200, with default header values.
The now-unmuted status.
*/
type StatusUnmuteOK struct {
Payload *models.Status
}
// IsSuccess returns true when this status unmute o k response has a 2xx status code
func (o *StatusUnmuteOK) IsSuccess() bool {
return true
}
// IsRedirect returns true when this status unmute o k response has a 3xx status code
func (o *StatusUnmuteOK) IsRedirect() bool {
return false
}
// IsClientError returns true when this status unmute o k response has a 4xx status code
func (o *StatusUnmuteOK) IsClientError() bool {
return false
}
// IsServerError returns true when this status unmute o k response has a 5xx status code
func (o *StatusUnmuteOK) IsServerError() bool {
return false
}
// IsCode returns true when this status unmute o k response a status code equal to that given
func (o *StatusUnmuteOK) IsCode(code int) bool {
return code == 200
}
// Code gets the status code for the status unmute o k response
func (o *StatusUnmuteOK) Code() int {
return 200
}
func (o *StatusUnmuteOK) Error() string {
payload, _ := json.Marshal(o.Payload)
return fmt.Sprintf("[POST /api/v1/statuses/{id}/unmute][%d] statusUnmuteOK %s", 200, payload)
}
func (o *StatusUnmuteOK) String() string {
payload, _ := json.Marshal(o.Payload)
return fmt.Sprintf("[POST /api/v1/statuses/{id}/unmute][%d] statusUnmuteOK %s", 200, payload)
}
func (o *StatusUnmuteOK) GetPayload() *models.Status {
return o.Payload
}
func (o *StatusUnmuteOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
o.Payload = new(models.Status)
// response payload
if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF {
return err
}
return nil
}
// NewStatusUnmuteBadRequest creates a StatusUnmuteBadRequest with default headers values
func NewStatusUnmuteBadRequest() *StatusUnmuteBadRequest {
return &StatusUnmuteBadRequest{}
}
/*
StatusUnmuteBadRequest describes a response with status code 400, with default header values.
bad request; you're not part of the target status thread
*/
type StatusUnmuteBadRequest struct {
}
// IsSuccess returns true when this status unmute bad request response has a 2xx status code
func (o *StatusUnmuteBadRequest) IsSuccess() bool {
return false
}
// IsRedirect returns true when this status unmute bad request response has a 3xx status code
func (o *StatusUnmuteBadRequest) IsRedirect() bool {
return false
}
// IsClientError returns true when this status unmute bad request response has a 4xx status code
func (o *StatusUnmuteBadRequest) IsClientError() bool {
return true
}
// IsServerError returns true when this status unmute bad request response has a 5xx status code
func (o *StatusUnmuteBadRequest) IsServerError() bool {
return false
}
// IsCode returns true when this status unmute bad request response a status code equal to that given
func (o *StatusUnmuteBadRequest) IsCode(code int) bool {
return code == 400
}
// Code gets the status code for the status unmute bad request response
func (o *StatusUnmuteBadRequest) Code() int {
return 400
}
func (o *StatusUnmuteBadRequest) Error() string {
return fmt.Sprintf("[POST /api/v1/statuses/{id}/unmute][%d] statusUnmuteBadRequest", 400)
}
func (o *StatusUnmuteBadRequest) String() string {
return fmt.Sprintf("[POST /api/v1/statuses/{id}/unmute][%d] statusUnmuteBadRequest", 400)
}
func (o *StatusUnmuteBadRequest) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
return nil
}
// NewStatusUnmuteUnauthorized creates a StatusUnmuteUnauthorized with default headers values
func NewStatusUnmuteUnauthorized() *StatusUnmuteUnauthorized {
return &StatusUnmuteUnauthorized{}
}
/*
StatusUnmuteUnauthorized describes a response with status code 401, with default header values.
unauthorized
*/
type StatusUnmuteUnauthorized struct {
}
// IsSuccess returns true when this status unmute unauthorized response has a 2xx status code
func (o *StatusUnmuteUnauthorized) IsSuccess() bool {
return false
}
// IsRedirect returns true when this status unmute unauthorized response has a 3xx status code
func (o *StatusUnmuteUnauthorized) IsRedirect() bool {
return false
}
// IsClientError returns true when this status unmute unauthorized response has a 4xx status code
func (o *StatusUnmuteUnauthorized) IsClientError() bool {
return true
}
// IsServerError returns true when this status unmute unauthorized response has a 5xx status code
func (o *StatusUnmuteUnauthorized) IsServerError() bool {
return false
}
// IsCode returns true when this status unmute unauthorized response a status code equal to that given
func (o *StatusUnmuteUnauthorized) IsCode(code int) bool {
return code == 401
}
// Code gets the status code for the status unmute unauthorized response
func (o *StatusUnmuteUnauthorized) Code() int {
return 401
}
func (o *StatusUnmuteUnauthorized) Error() string {
return fmt.Sprintf("[POST /api/v1/statuses/{id}/unmute][%d] statusUnmuteUnauthorized", 401)
}
func (o *StatusUnmuteUnauthorized) String() string {
return fmt.Sprintf("[POST /api/v1/statuses/{id}/unmute][%d] statusUnmuteUnauthorized", 401)
}
func (o *StatusUnmuteUnauthorized) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
return nil
}
// NewStatusUnmuteForbidden creates a StatusUnmuteForbidden with default headers values
func NewStatusUnmuteForbidden() *StatusUnmuteForbidden {
return &StatusUnmuteForbidden{}
}
/*
StatusUnmuteForbidden describes a response with status code 403, with default header values.
forbidden
*/
type StatusUnmuteForbidden struct {
}
// IsSuccess returns true when this status unmute forbidden response has a 2xx status code
func (o *StatusUnmuteForbidden) IsSuccess() bool {
return false
}
// IsRedirect returns true when this status unmute forbidden response has a 3xx status code
func (o *StatusUnmuteForbidden) IsRedirect() bool {
return false
}
// IsClientError returns true when this status unmute forbidden response has a 4xx status code
func (o *StatusUnmuteForbidden) IsClientError() bool {
return true
}
// IsServerError returns true when this status unmute forbidden response has a 5xx status code
func (o *StatusUnmuteForbidden) IsServerError() bool {
return false
}
// IsCode returns true when this status unmute forbidden response a status code equal to that given
func (o *StatusUnmuteForbidden) IsCode(code int) bool {
return code == 403
}
// Code gets the status code for the status unmute forbidden response
func (o *StatusUnmuteForbidden) Code() int {
return 403
}
func (o *StatusUnmuteForbidden) Error() string {
return fmt.Sprintf("[POST /api/v1/statuses/{id}/unmute][%d] statusUnmuteForbidden", 403)
}
func (o *StatusUnmuteForbidden) String() string {
return fmt.Sprintf("[POST /api/v1/statuses/{id}/unmute][%d] statusUnmuteForbidden", 403)
}
func (o *StatusUnmuteForbidden) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
return nil
}
// NewStatusUnmuteNotFound creates a StatusUnmuteNotFound with default headers values
func NewStatusUnmuteNotFound() *StatusUnmuteNotFound {
return &StatusUnmuteNotFound{}
}
/*
StatusUnmuteNotFound describes a response with status code 404, with default header values.
not found
*/
type StatusUnmuteNotFound struct {
}
// IsSuccess returns true when this status unmute not found response has a 2xx status code
func (o *StatusUnmuteNotFound) IsSuccess() bool {
return false
}
// IsRedirect returns true when this status unmute not found response has a 3xx status code
func (o *StatusUnmuteNotFound) IsRedirect() bool {
return false
}
// IsClientError returns true when this status unmute not found response has a 4xx status code
func (o *StatusUnmuteNotFound) IsClientError() bool {
return true
}
// IsServerError returns true when this status unmute not found response has a 5xx status code
func (o *StatusUnmuteNotFound) IsServerError() bool {
return false
}
// IsCode returns true when this status unmute not found response a status code equal to that given
func (o *StatusUnmuteNotFound) IsCode(code int) bool {
return code == 404
}
// Code gets the status code for the status unmute not found response
func (o *StatusUnmuteNotFound) Code() int {
return 404
}
func (o *StatusUnmuteNotFound) Error() string {
return fmt.Sprintf("[POST /api/v1/statuses/{id}/unmute][%d] statusUnmuteNotFound", 404)
}
func (o *StatusUnmuteNotFound) String() string {
return fmt.Sprintf("[POST /api/v1/statuses/{id}/unmute][%d] statusUnmuteNotFound", 404)
}
func (o *StatusUnmuteNotFound) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
return nil
}
// NewStatusUnmuteNotAcceptable creates a StatusUnmuteNotAcceptable with default headers values
func NewStatusUnmuteNotAcceptable() *StatusUnmuteNotAcceptable {
return &StatusUnmuteNotAcceptable{}
}
/*
StatusUnmuteNotAcceptable describes a response with status code 406, with default header values.
not acceptable
*/
type StatusUnmuteNotAcceptable struct {
}
// IsSuccess returns true when this status unmute not acceptable response has a 2xx status code
func (o *StatusUnmuteNotAcceptable) IsSuccess() bool {
return false
}
// IsRedirect returns true when this status unmute not acceptable response has a 3xx status code
func (o *StatusUnmuteNotAcceptable) IsRedirect() bool {
return false
}
// IsClientError returns true when this status unmute not acceptable response has a 4xx status code
func (o *StatusUnmuteNotAcceptable) IsClientError() bool {
return true
}
// IsServerError returns true when this status unmute not acceptable response has a 5xx status code
func (o *StatusUnmuteNotAcceptable) IsServerError() bool {
return false
}
// IsCode returns true when this status unmute not acceptable response a status code equal to that given
func (o *StatusUnmuteNotAcceptable) IsCode(code int) bool {
return code == 406
}
// Code gets the status code for the status unmute not acceptable response
func (o *StatusUnmuteNotAcceptable) Code() int {
return 406
}
func (o *StatusUnmuteNotAcceptable) Error() string {
return fmt.Sprintf("[POST /api/v1/statuses/{id}/unmute][%d] statusUnmuteNotAcceptable", 406)
}
func (o *StatusUnmuteNotAcceptable) String() string {
return fmt.Sprintf("[POST /api/v1/statuses/{id}/unmute][%d] statusUnmuteNotAcceptable", 406)
}
func (o *StatusUnmuteNotAcceptable) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
return nil
}
// NewStatusUnmuteInternalServerError creates a StatusUnmuteInternalServerError with default headers values
func NewStatusUnmuteInternalServerError() *StatusUnmuteInternalServerError {
return &StatusUnmuteInternalServerError{}
}
/*
StatusUnmuteInternalServerError describes a response with status code 500, with default header values.
internal server error
*/
type StatusUnmuteInternalServerError struct {
}
// IsSuccess returns true when this status unmute internal server error response has a 2xx status code
func (o *StatusUnmuteInternalServerError) IsSuccess() bool {
return false
}
// IsRedirect returns true when this status unmute internal server error response has a 3xx status code
func (o *StatusUnmuteInternalServerError) IsRedirect() bool {
return false
}
// IsClientError returns true when this status unmute internal server error response has a 4xx status code
func (o *StatusUnmuteInternalServerError) IsClientError() bool {
return false
}
// IsServerError returns true when this status unmute internal server error response has a 5xx status code
func (o *StatusUnmuteInternalServerError) IsServerError() bool {
return true
}
// IsCode returns true when this status unmute internal server error response a status code equal to that given
func (o *StatusUnmuteInternalServerError) IsCode(code int) bool {
return code == 500
}
// Code gets the status code for the status unmute internal server error response
func (o *StatusUnmuteInternalServerError) Code() int {
return 500
}
func (o *StatusUnmuteInternalServerError) Error() string {
return fmt.Sprintf("[POST /api/v1/statuses/{id}/unmute][%d] statusUnmuteInternalServerError", 500)
}
func (o *StatusUnmuteInternalServerError) String() string {
return fmt.Sprintf("[POST /api/v1/statuses/{id}/unmute][%d] statusUnmuteInternalServerError", 500)
}
func (o *StatusUnmuteInternalServerError) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
return nil
}