gtslib/client/follow_requests/reject_follow_request_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

417 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"
)
// RejectFollowRequestReader is a Reader for the RejectFollowRequest structure.
type RejectFollowRequestReader struct {
formats strfmt.Registry
}
// ReadResponse reads a server response into the received o.
func (o *RejectFollowRequestReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) {
switch response.Code() {
case 200:
result := NewRejectFollowRequestOK()
if err := result.readResponse(response, consumer, o.formats); err != nil {
return nil, err
}
return result, nil
case 400:
result := NewRejectFollowRequestBadRequest()
if err := result.readResponse(response, consumer, o.formats); err != nil {
return nil, err
}
return nil, result
case 401:
result := NewRejectFollowRequestUnauthorized()
if err := result.readResponse(response, consumer, o.formats); err != nil {
return nil, err
}
return nil, result
case 404:
result := NewRejectFollowRequestNotFound()
if err := result.readResponse(response, consumer, o.formats); err != nil {
return nil, err
}
return nil, result
case 406:
result := NewRejectFollowRequestNotAcceptable()
if err := result.readResponse(response, consumer, o.formats); err != nil {
return nil, err
}
return nil, result
case 500:
result := NewRejectFollowRequestInternalServerError()
if err := result.readResponse(response, consumer, o.formats); err != nil {
return nil, err
}
return nil, result
default:
return nil, runtime.NewAPIError("[POST /api/v1/follow_requests/{account_id}/reject] rejectFollowRequest", response, response.Code())
}
}
// NewRejectFollowRequestOK creates a RejectFollowRequestOK with default headers values
func NewRejectFollowRequestOK() *RejectFollowRequestOK {
return &RejectFollowRequestOK{}
}
/*
RejectFollowRequestOK describes a response with status code 200, with default header values.
Your relationship to this account.
*/
type RejectFollowRequestOK struct {
Payload *models.Relationship
}
// IsSuccess returns true when this reject follow request o k response has a 2xx status code
func (o *RejectFollowRequestOK) IsSuccess() bool {
return true
}
// IsRedirect returns true when this reject follow request o k response has a 3xx status code
func (o *RejectFollowRequestOK) IsRedirect() bool {
return false
}
// IsClientError returns true when this reject follow request o k response has a 4xx status code
func (o *RejectFollowRequestOK) IsClientError() bool {
return false
}
// IsServerError returns true when this reject follow request o k response has a 5xx status code
func (o *RejectFollowRequestOK) IsServerError() bool {
return false
}
// IsCode returns true when this reject follow request o k response a status code equal to that given
func (o *RejectFollowRequestOK) IsCode(code int) bool {
return code == 200
}
// Code gets the status code for the reject follow request o k response
func (o *RejectFollowRequestOK) Code() int {
return 200
}
func (o *RejectFollowRequestOK) Error() string {
payload, _ := json.Marshal(o.Payload)
return fmt.Sprintf("[POST /api/v1/follow_requests/{account_id}/reject][%d] rejectFollowRequestOK %s", 200, payload)
}
func (o *RejectFollowRequestOK) String() string {
payload, _ := json.Marshal(o.Payload)
return fmt.Sprintf("[POST /api/v1/follow_requests/{account_id}/reject][%d] rejectFollowRequestOK %s", 200, payload)
}
func (o *RejectFollowRequestOK) GetPayload() *models.Relationship {
return o.Payload
}
func (o *RejectFollowRequestOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
o.Payload = new(models.Relationship)
// response payload
if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF {
return err
}
return nil
}
// NewRejectFollowRequestBadRequest creates a RejectFollowRequestBadRequest with default headers values
func NewRejectFollowRequestBadRequest() *RejectFollowRequestBadRequest {
return &RejectFollowRequestBadRequest{}
}
/*
RejectFollowRequestBadRequest describes a response with status code 400, with default header values.
bad request
*/
type RejectFollowRequestBadRequest struct {
}
// IsSuccess returns true when this reject follow request bad request response has a 2xx status code
func (o *RejectFollowRequestBadRequest) IsSuccess() bool {
return false
}
// IsRedirect returns true when this reject follow request bad request response has a 3xx status code
func (o *RejectFollowRequestBadRequest) IsRedirect() bool {
return false
}
// IsClientError returns true when this reject follow request bad request response has a 4xx status code
func (o *RejectFollowRequestBadRequest) IsClientError() bool {
return true
}
// IsServerError returns true when this reject follow request bad request response has a 5xx status code
func (o *RejectFollowRequestBadRequest) IsServerError() bool {
return false
}
// IsCode returns true when this reject follow request bad request response a status code equal to that given
func (o *RejectFollowRequestBadRequest) IsCode(code int) bool {
return code == 400
}
// Code gets the status code for the reject follow request bad request response
func (o *RejectFollowRequestBadRequest) Code() int {
return 400
}
func (o *RejectFollowRequestBadRequest) Error() string {
return fmt.Sprintf("[POST /api/v1/follow_requests/{account_id}/reject][%d] rejectFollowRequestBadRequest", 400)
}
func (o *RejectFollowRequestBadRequest) String() string {
return fmt.Sprintf("[POST /api/v1/follow_requests/{account_id}/reject][%d] rejectFollowRequestBadRequest", 400)
}
func (o *RejectFollowRequestBadRequest) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
return nil
}
// NewRejectFollowRequestUnauthorized creates a RejectFollowRequestUnauthorized with default headers values
func NewRejectFollowRequestUnauthorized() *RejectFollowRequestUnauthorized {
return &RejectFollowRequestUnauthorized{}
}
/*
RejectFollowRequestUnauthorized describes a response with status code 401, with default header values.
unauthorized
*/
type RejectFollowRequestUnauthorized struct {
}
// IsSuccess returns true when this reject follow request unauthorized response has a 2xx status code
func (o *RejectFollowRequestUnauthorized) IsSuccess() bool {
return false
}
// IsRedirect returns true when this reject follow request unauthorized response has a 3xx status code
func (o *RejectFollowRequestUnauthorized) IsRedirect() bool {
return false
}
// IsClientError returns true when this reject follow request unauthorized response has a 4xx status code
func (o *RejectFollowRequestUnauthorized) IsClientError() bool {
return true
}
// IsServerError returns true when this reject follow request unauthorized response has a 5xx status code
func (o *RejectFollowRequestUnauthorized) IsServerError() bool {
return false
}
// IsCode returns true when this reject follow request unauthorized response a status code equal to that given
func (o *RejectFollowRequestUnauthorized) IsCode(code int) bool {
return code == 401
}
// Code gets the status code for the reject follow request unauthorized response
func (o *RejectFollowRequestUnauthorized) Code() int {
return 401
}
func (o *RejectFollowRequestUnauthorized) Error() string {
return fmt.Sprintf("[POST /api/v1/follow_requests/{account_id}/reject][%d] rejectFollowRequestUnauthorized", 401)
}
func (o *RejectFollowRequestUnauthorized) String() string {
return fmt.Sprintf("[POST /api/v1/follow_requests/{account_id}/reject][%d] rejectFollowRequestUnauthorized", 401)
}
func (o *RejectFollowRequestUnauthorized) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
return nil
}
// NewRejectFollowRequestNotFound creates a RejectFollowRequestNotFound with default headers values
func NewRejectFollowRequestNotFound() *RejectFollowRequestNotFound {
return &RejectFollowRequestNotFound{}
}
/*
RejectFollowRequestNotFound describes a response with status code 404, with default header values.
not found
*/
type RejectFollowRequestNotFound struct {
}
// IsSuccess returns true when this reject follow request not found response has a 2xx status code
func (o *RejectFollowRequestNotFound) IsSuccess() bool {
return false
}
// IsRedirect returns true when this reject follow request not found response has a 3xx status code
func (o *RejectFollowRequestNotFound) IsRedirect() bool {
return false
}
// IsClientError returns true when this reject follow request not found response has a 4xx status code
func (o *RejectFollowRequestNotFound) IsClientError() bool {
return true
}
// IsServerError returns true when this reject follow request not found response has a 5xx status code
func (o *RejectFollowRequestNotFound) IsServerError() bool {
return false
}
// IsCode returns true when this reject follow request not found response a status code equal to that given
func (o *RejectFollowRequestNotFound) IsCode(code int) bool {
return code == 404
}
// Code gets the status code for the reject follow request not found response
func (o *RejectFollowRequestNotFound) Code() int {
return 404
}
func (o *RejectFollowRequestNotFound) Error() string {
return fmt.Sprintf("[POST /api/v1/follow_requests/{account_id}/reject][%d] rejectFollowRequestNotFound", 404)
}
func (o *RejectFollowRequestNotFound) String() string {
return fmt.Sprintf("[POST /api/v1/follow_requests/{account_id}/reject][%d] rejectFollowRequestNotFound", 404)
}
func (o *RejectFollowRequestNotFound) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
return nil
}
// NewRejectFollowRequestNotAcceptable creates a RejectFollowRequestNotAcceptable with default headers values
func NewRejectFollowRequestNotAcceptable() *RejectFollowRequestNotAcceptable {
return &RejectFollowRequestNotAcceptable{}
}
/*
RejectFollowRequestNotAcceptable describes a response with status code 406, with default header values.
not acceptable
*/
type RejectFollowRequestNotAcceptable struct {
}
// IsSuccess returns true when this reject follow request not acceptable response has a 2xx status code
func (o *RejectFollowRequestNotAcceptable) IsSuccess() bool {
return false
}
// IsRedirect returns true when this reject follow request not acceptable response has a 3xx status code
func (o *RejectFollowRequestNotAcceptable) IsRedirect() bool {
return false
}
// IsClientError returns true when this reject follow request not acceptable response has a 4xx status code
func (o *RejectFollowRequestNotAcceptable) IsClientError() bool {
return true
}
// IsServerError returns true when this reject follow request not acceptable response has a 5xx status code
func (o *RejectFollowRequestNotAcceptable) IsServerError() bool {
return false
}
// IsCode returns true when this reject follow request not acceptable response a status code equal to that given
func (o *RejectFollowRequestNotAcceptable) IsCode(code int) bool {
return code == 406
}
// Code gets the status code for the reject follow request not acceptable response
func (o *RejectFollowRequestNotAcceptable) Code() int {
return 406
}
func (o *RejectFollowRequestNotAcceptable) Error() string {
return fmt.Sprintf("[POST /api/v1/follow_requests/{account_id}/reject][%d] rejectFollowRequestNotAcceptable", 406)
}
func (o *RejectFollowRequestNotAcceptable) String() string {
return fmt.Sprintf("[POST /api/v1/follow_requests/{account_id}/reject][%d] rejectFollowRequestNotAcceptable", 406)
}
func (o *RejectFollowRequestNotAcceptable) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
return nil
}
// NewRejectFollowRequestInternalServerError creates a RejectFollowRequestInternalServerError with default headers values
func NewRejectFollowRequestInternalServerError() *RejectFollowRequestInternalServerError {
return &RejectFollowRequestInternalServerError{}
}
/*
RejectFollowRequestInternalServerError describes a response with status code 500, with default header values.
internal server error
*/
type RejectFollowRequestInternalServerError struct {
}
// IsSuccess returns true when this reject follow request internal server error response has a 2xx status code
func (o *RejectFollowRequestInternalServerError) IsSuccess() bool {
return false
}
// IsRedirect returns true when this reject follow request internal server error response has a 3xx status code
func (o *RejectFollowRequestInternalServerError) IsRedirect() bool {
return false
}
// IsClientError returns true when this reject follow request internal server error response has a 4xx status code
func (o *RejectFollowRequestInternalServerError) IsClientError() bool {
return false
}
// IsServerError returns true when this reject follow request internal server error response has a 5xx status code
func (o *RejectFollowRequestInternalServerError) IsServerError() bool {
return true
}
// IsCode returns true when this reject follow request internal server error response a status code equal to that given
func (o *RejectFollowRequestInternalServerError) IsCode(code int) bool {
return code == 500
}
// Code gets the status code for the reject follow request internal server error response
func (o *RejectFollowRequestInternalServerError) Code() int {
return 500
}
func (o *RejectFollowRequestInternalServerError) Error() string {
return fmt.Sprintf("[POST /api/v1/follow_requests/{account_id}/reject][%d] rejectFollowRequestInternalServerError", 500)
}
func (o *RejectFollowRequestInternalServerError) String() string {
return fmt.Sprintf("[POST /api/v1/follow_requests/{account_id}/reject][%d] rejectFollowRequestInternalServerError", 500)
}
func (o *RejectFollowRequestInternalServerError) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
return nil
}