gtslib/client/federation/s2s_replies_get_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

355 lines
11 KiB
Go

// Code generated by go-swagger; DO NOT EDIT.
package federation
// 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"
)
// S2sRepliesGetReader is a Reader for the S2sRepliesGet structure.
type S2sRepliesGetReader struct {
formats strfmt.Registry
}
// ReadResponse reads a server response into the received o.
func (o *S2sRepliesGetReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) {
switch response.Code() {
case 200:
result := NewS2sRepliesGetOK()
if err := result.readResponse(response, consumer, o.formats); err != nil {
return nil, err
}
return result, nil
case 400:
result := NewS2sRepliesGetBadRequest()
if err := result.readResponse(response, consumer, o.formats); err != nil {
return nil, err
}
return nil, result
case 401:
result := NewS2sRepliesGetUnauthorized()
if err := result.readResponse(response, consumer, o.formats); err != nil {
return nil, err
}
return nil, result
case 403:
result := NewS2sRepliesGetForbidden()
if err := result.readResponse(response, consumer, o.formats); err != nil {
return nil, err
}
return nil, result
case 404:
result := NewS2sRepliesGetNotFound()
if err := result.readResponse(response, consumer, o.formats); err != nil {
return nil, err
}
return nil, result
default:
return nil, runtime.NewAPIError("[GET /users/{username}/statuses/{status}/replies] s2sRepliesGet", response, response.Code())
}
}
// NewS2sRepliesGetOK creates a S2sRepliesGetOK with default headers values
func NewS2sRepliesGetOK() *S2sRepliesGetOK {
return &S2sRepliesGetOK{}
}
/*
S2sRepliesGetOK describes a response with status code 200, with default header values.
S2sRepliesGetOK s2s replies get o k
*/
type S2sRepliesGetOK struct {
Payload *models.SwaggerCollection
}
// IsSuccess returns true when this s2s replies get o k response has a 2xx status code
func (o *S2sRepliesGetOK) IsSuccess() bool {
return true
}
// IsRedirect returns true when this s2s replies get o k response has a 3xx status code
func (o *S2sRepliesGetOK) IsRedirect() bool {
return false
}
// IsClientError returns true when this s2s replies get o k response has a 4xx status code
func (o *S2sRepliesGetOK) IsClientError() bool {
return false
}
// IsServerError returns true when this s2s replies get o k response has a 5xx status code
func (o *S2sRepliesGetOK) IsServerError() bool {
return false
}
// IsCode returns true when this s2s replies get o k response a status code equal to that given
func (o *S2sRepliesGetOK) IsCode(code int) bool {
return code == 200
}
// Code gets the status code for the s2s replies get o k response
func (o *S2sRepliesGetOK) Code() int {
return 200
}
func (o *S2sRepliesGetOK) Error() string {
payload, _ := json.Marshal(o.Payload)
return fmt.Sprintf("[GET /users/{username}/statuses/{status}/replies][%d] s2sRepliesGetOK %s", 200, payload)
}
func (o *S2sRepliesGetOK) String() string {
payload, _ := json.Marshal(o.Payload)
return fmt.Sprintf("[GET /users/{username}/statuses/{status}/replies][%d] s2sRepliesGetOK %s", 200, payload)
}
func (o *S2sRepliesGetOK) GetPayload() *models.SwaggerCollection {
return o.Payload
}
func (o *S2sRepliesGetOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
o.Payload = new(models.SwaggerCollection)
// response payload
if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF {
return err
}
return nil
}
// NewS2sRepliesGetBadRequest creates a S2sRepliesGetBadRequest with default headers values
func NewS2sRepliesGetBadRequest() *S2sRepliesGetBadRequest {
return &S2sRepliesGetBadRequest{}
}
/*
S2sRepliesGetBadRequest describes a response with status code 400, with default header values.
bad request
*/
type S2sRepliesGetBadRequest struct {
}
// IsSuccess returns true when this s2s replies get bad request response has a 2xx status code
func (o *S2sRepliesGetBadRequest) IsSuccess() bool {
return false
}
// IsRedirect returns true when this s2s replies get bad request response has a 3xx status code
func (o *S2sRepliesGetBadRequest) IsRedirect() bool {
return false
}
// IsClientError returns true when this s2s replies get bad request response has a 4xx status code
func (o *S2sRepliesGetBadRequest) IsClientError() bool {
return true
}
// IsServerError returns true when this s2s replies get bad request response has a 5xx status code
func (o *S2sRepliesGetBadRequest) IsServerError() bool {
return false
}
// IsCode returns true when this s2s replies get bad request response a status code equal to that given
func (o *S2sRepliesGetBadRequest) IsCode(code int) bool {
return code == 400
}
// Code gets the status code for the s2s replies get bad request response
func (o *S2sRepliesGetBadRequest) Code() int {
return 400
}
func (o *S2sRepliesGetBadRequest) Error() string {
return fmt.Sprintf("[GET /users/{username}/statuses/{status}/replies][%d] s2sRepliesGetBadRequest", 400)
}
func (o *S2sRepliesGetBadRequest) String() string {
return fmt.Sprintf("[GET /users/{username}/statuses/{status}/replies][%d] s2sRepliesGetBadRequest", 400)
}
func (o *S2sRepliesGetBadRequest) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
return nil
}
// NewS2sRepliesGetUnauthorized creates a S2sRepliesGetUnauthorized with default headers values
func NewS2sRepliesGetUnauthorized() *S2sRepliesGetUnauthorized {
return &S2sRepliesGetUnauthorized{}
}
/*
S2sRepliesGetUnauthorized describes a response with status code 401, with default header values.
unauthorized
*/
type S2sRepliesGetUnauthorized struct {
}
// IsSuccess returns true when this s2s replies get unauthorized response has a 2xx status code
func (o *S2sRepliesGetUnauthorized) IsSuccess() bool {
return false
}
// IsRedirect returns true when this s2s replies get unauthorized response has a 3xx status code
func (o *S2sRepliesGetUnauthorized) IsRedirect() bool {
return false
}
// IsClientError returns true when this s2s replies get unauthorized response has a 4xx status code
func (o *S2sRepliesGetUnauthorized) IsClientError() bool {
return true
}
// IsServerError returns true when this s2s replies get unauthorized response has a 5xx status code
func (o *S2sRepliesGetUnauthorized) IsServerError() bool {
return false
}
// IsCode returns true when this s2s replies get unauthorized response a status code equal to that given
func (o *S2sRepliesGetUnauthorized) IsCode(code int) bool {
return code == 401
}
// Code gets the status code for the s2s replies get unauthorized response
func (o *S2sRepliesGetUnauthorized) Code() int {
return 401
}
func (o *S2sRepliesGetUnauthorized) Error() string {
return fmt.Sprintf("[GET /users/{username}/statuses/{status}/replies][%d] s2sRepliesGetUnauthorized", 401)
}
func (o *S2sRepliesGetUnauthorized) String() string {
return fmt.Sprintf("[GET /users/{username}/statuses/{status}/replies][%d] s2sRepliesGetUnauthorized", 401)
}
func (o *S2sRepliesGetUnauthorized) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
return nil
}
// NewS2sRepliesGetForbidden creates a S2sRepliesGetForbidden with default headers values
func NewS2sRepliesGetForbidden() *S2sRepliesGetForbidden {
return &S2sRepliesGetForbidden{}
}
/*
S2sRepliesGetForbidden describes a response with status code 403, with default header values.
forbidden
*/
type S2sRepliesGetForbidden struct {
}
// IsSuccess returns true when this s2s replies get forbidden response has a 2xx status code
func (o *S2sRepliesGetForbidden) IsSuccess() bool {
return false
}
// IsRedirect returns true when this s2s replies get forbidden response has a 3xx status code
func (o *S2sRepliesGetForbidden) IsRedirect() bool {
return false
}
// IsClientError returns true when this s2s replies get forbidden response has a 4xx status code
func (o *S2sRepliesGetForbidden) IsClientError() bool {
return true
}
// IsServerError returns true when this s2s replies get forbidden response has a 5xx status code
func (o *S2sRepliesGetForbidden) IsServerError() bool {
return false
}
// IsCode returns true when this s2s replies get forbidden response a status code equal to that given
func (o *S2sRepliesGetForbidden) IsCode(code int) bool {
return code == 403
}
// Code gets the status code for the s2s replies get forbidden response
func (o *S2sRepliesGetForbidden) Code() int {
return 403
}
func (o *S2sRepliesGetForbidden) Error() string {
return fmt.Sprintf("[GET /users/{username}/statuses/{status}/replies][%d] s2sRepliesGetForbidden", 403)
}
func (o *S2sRepliesGetForbidden) String() string {
return fmt.Sprintf("[GET /users/{username}/statuses/{status}/replies][%d] s2sRepliesGetForbidden", 403)
}
func (o *S2sRepliesGetForbidden) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
return nil
}
// NewS2sRepliesGetNotFound creates a S2sRepliesGetNotFound with default headers values
func NewS2sRepliesGetNotFound() *S2sRepliesGetNotFound {
return &S2sRepliesGetNotFound{}
}
/*
S2sRepliesGetNotFound describes a response with status code 404, with default header values.
not found
*/
type S2sRepliesGetNotFound struct {
}
// IsSuccess returns true when this s2s replies get not found response has a 2xx status code
func (o *S2sRepliesGetNotFound) IsSuccess() bool {
return false
}
// IsRedirect returns true when this s2s replies get not found response has a 3xx status code
func (o *S2sRepliesGetNotFound) IsRedirect() bool {
return false
}
// IsClientError returns true when this s2s replies get not found response has a 4xx status code
func (o *S2sRepliesGetNotFound) IsClientError() bool {
return true
}
// IsServerError returns true when this s2s replies get not found response has a 5xx status code
func (o *S2sRepliesGetNotFound) IsServerError() bool {
return false
}
// IsCode returns true when this s2s replies get not found response a status code equal to that given
func (o *S2sRepliesGetNotFound) IsCode(code int) bool {
return code == 404
}
// Code gets the status code for the s2s replies get not found response
func (o *S2sRepliesGetNotFound) Code() int {
return 404
}
func (o *S2sRepliesGetNotFound) Error() string {
return fmt.Sprintf("[GET /users/{username}/statuses/{status}/replies][%d] s2sRepliesGetNotFound", 404)
}
func (o *S2sRepliesGetNotFound) String() string {
return fmt.Sprintf("[GET /users/{username}/statuses/{status}/replies][%d] s2sRepliesGetNotFound", 404)
}
func (o *S2sRepliesGetNotFound) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
return nil
}