autogits/bots-common/gitea-generated/client/issue/issue_delete_issue_reaction_responses.go
Adam Majer 598ecbbd5a .
2024-07-07 21:12:40 +02:00

229 lines
7.6 KiB
Go

// Code generated by go-swagger; DO NOT EDIT.
package issue
// This file was generated by the swagger tool.
// Editing this file might prove futile when you re-run the swagger generate command
import (
"fmt"
"github.com/go-openapi/runtime"
"github.com/go-openapi/strfmt"
)
// IssueDeleteIssueReactionReader is a Reader for the IssueDeleteIssueReaction structure.
type IssueDeleteIssueReactionReader struct {
formats strfmt.Registry
}
// ReadResponse reads a server response into the received o.
func (o *IssueDeleteIssueReactionReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) {
switch response.Code() {
case 200:
result := NewIssueDeleteIssueReactionOK()
if err := result.readResponse(response, consumer, o.formats); err != nil {
return nil, err
}
return result, nil
case 403:
result := NewIssueDeleteIssueReactionForbidden()
if err := result.readResponse(response, consumer, o.formats); err != nil {
return nil, err
}
return nil, result
case 404:
result := NewIssueDeleteIssueReactionNotFound()
if err := result.readResponse(response, consumer, o.formats); err != nil {
return nil, err
}
return nil, result
default:
return nil, runtime.NewAPIError("[DELETE /repos/{owner}/{repo}/issues/{index}/reactions] issueDeleteIssueReaction", response, response.Code())
}
}
// NewIssueDeleteIssueReactionOK creates a IssueDeleteIssueReactionOK with default headers values
func NewIssueDeleteIssueReactionOK() *IssueDeleteIssueReactionOK {
return &IssueDeleteIssueReactionOK{}
}
/*
IssueDeleteIssueReactionOK describes a response with status code 200, with default header values.
APIEmpty is an empty response
*/
type IssueDeleteIssueReactionOK struct {
}
// IsSuccess returns true when this issue delete issue reaction o k response has a 2xx status code
func (o *IssueDeleteIssueReactionOK) IsSuccess() bool {
return true
}
// IsRedirect returns true when this issue delete issue reaction o k response has a 3xx status code
func (o *IssueDeleteIssueReactionOK) IsRedirect() bool {
return false
}
// IsClientError returns true when this issue delete issue reaction o k response has a 4xx status code
func (o *IssueDeleteIssueReactionOK) IsClientError() bool {
return false
}
// IsServerError returns true when this issue delete issue reaction o k response has a 5xx status code
func (o *IssueDeleteIssueReactionOK) IsServerError() bool {
return false
}
// IsCode returns true when this issue delete issue reaction o k response a status code equal to that given
func (o *IssueDeleteIssueReactionOK) IsCode(code int) bool {
return code == 200
}
// Code gets the status code for the issue delete issue reaction o k response
func (o *IssueDeleteIssueReactionOK) Code() int {
return 200
}
func (o *IssueDeleteIssueReactionOK) Error() string {
return fmt.Sprintf("[DELETE /repos/{owner}/{repo}/issues/{index}/reactions][%d] issueDeleteIssueReactionOK", 200)
}
func (o *IssueDeleteIssueReactionOK) String() string {
return fmt.Sprintf("[DELETE /repos/{owner}/{repo}/issues/{index}/reactions][%d] issueDeleteIssueReactionOK", 200)
}
func (o *IssueDeleteIssueReactionOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
return nil
}
// NewIssueDeleteIssueReactionForbidden creates a IssueDeleteIssueReactionForbidden with default headers values
func NewIssueDeleteIssueReactionForbidden() *IssueDeleteIssueReactionForbidden {
return &IssueDeleteIssueReactionForbidden{}
}
/*
IssueDeleteIssueReactionForbidden describes a response with status code 403, with default header values.
APIForbiddenError is a forbidden error response
*/
type IssueDeleteIssueReactionForbidden struct {
Message string
URL string
}
// IsSuccess returns true when this issue delete issue reaction forbidden response has a 2xx status code
func (o *IssueDeleteIssueReactionForbidden) IsSuccess() bool {
return false
}
// IsRedirect returns true when this issue delete issue reaction forbidden response has a 3xx status code
func (o *IssueDeleteIssueReactionForbidden) IsRedirect() bool {
return false
}
// IsClientError returns true when this issue delete issue reaction forbidden response has a 4xx status code
func (o *IssueDeleteIssueReactionForbidden) IsClientError() bool {
return true
}
// IsServerError returns true when this issue delete issue reaction forbidden response has a 5xx status code
func (o *IssueDeleteIssueReactionForbidden) IsServerError() bool {
return false
}
// IsCode returns true when this issue delete issue reaction forbidden response a status code equal to that given
func (o *IssueDeleteIssueReactionForbidden) IsCode(code int) bool {
return code == 403
}
// Code gets the status code for the issue delete issue reaction forbidden response
func (o *IssueDeleteIssueReactionForbidden) Code() int {
return 403
}
func (o *IssueDeleteIssueReactionForbidden) Error() string {
return fmt.Sprintf("[DELETE /repos/{owner}/{repo}/issues/{index}/reactions][%d] issueDeleteIssueReactionForbidden", 403)
}
func (o *IssueDeleteIssueReactionForbidden) String() string {
return fmt.Sprintf("[DELETE /repos/{owner}/{repo}/issues/{index}/reactions][%d] issueDeleteIssueReactionForbidden", 403)
}
func (o *IssueDeleteIssueReactionForbidden) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
// hydrates response header message
hdrMessage := response.GetHeader("message")
if hdrMessage != "" {
o.Message = hdrMessage
}
// hydrates response header url
hdrURL := response.GetHeader("url")
if hdrURL != "" {
o.URL = hdrURL
}
return nil
}
// NewIssueDeleteIssueReactionNotFound creates a IssueDeleteIssueReactionNotFound with default headers values
func NewIssueDeleteIssueReactionNotFound() *IssueDeleteIssueReactionNotFound {
return &IssueDeleteIssueReactionNotFound{}
}
/*
IssueDeleteIssueReactionNotFound describes a response with status code 404, with default header values.
APINotFound is a not found empty response
*/
type IssueDeleteIssueReactionNotFound struct {
}
// IsSuccess returns true when this issue delete issue reaction not found response has a 2xx status code
func (o *IssueDeleteIssueReactionNotFound) IsSuccess() bool {
return false
}
// IsRedirect returns true when this issue delete issue reaction not found response has a 3xx status code
func (o *IssueDeleteIssueReactionNotFound) IsRedirect() bool {
return false
}
// IsClientError returns true when this issue delete issue reaction not found response has a 4xx status code
func (o *IssueDeleteIssueReactionNotFound) IsClientError() bool {
return true
}
// IsServerError returns true when this issue delete issue reaction not found response has a 5xx status code
func (o *IssueDeleteIssueReactionNotFound) IsServerError() bool {
return false
}
// IsCode returns true when this issue delete issue reaction not found response a status code equal to that given
func (o *IssueDeleteIssueReactionNotFound) IsCode(code int) bool {
return code == 404
}
// Code gets the status code for the issue delete issue reaction not found response
func (o *IssueDeleteIssueReactionNotFound) Code() int {
return 404
}
func (o *IssueDeleteIssueReactionNotFound) Error() string {
return fmt.Sprintf("[DELETE /repos/{owner}/{repo}/issues/{index}/reactions][%d] issueDeleteIssueReactionNotFound", 404)
}
func (o *IssueDeleteIssueReactionNotFound) String() string {
return fmt.Sprintf("[DELETE /repos/{owner}/{repo}/issues/{index}/reactions][%d] issueDeleteIssueReactionNotFound", 404)
}
func (o *IssueDeleteIssueReactionNotFound) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
return nil
}