autogits/bots-common/gitea-generated/client/issue/issue_delete_label_responses.go

151 lines
4.7 KiB
Go
Raw Normal View History

2024-07-07 21:08:41 +02:00
// 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"
)
// IssueDeleteLabelReader is a Reader for the IssueDeleteLabel structure.
type IssueDeleteLabelReader struct {
formats strfmt.Registry
}
// ReadResponse reads a server response into the received o.
func (o *IssueDeleteLabelReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) {
switch response.Code() {
case 204:
result := NewIssueDeleteLabelNoContent()
if err := result.readResponse(response, consumer, o.formats); err != nil {
return nil, err
}
return result, nil
case 404:
result := NewIssueDeleteLabelNotFound()
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}/labels/{id}] issueDeleteLabel", response, response.Code())
}
}
// NewIssueDeleteLabelNoContent creates a IssueDeleteLabelNoContent with default headers values
func NewIssueDeleteLabelNoContent() *IssueDeleteLabelNoContent {
return &IssueDeleteLabelNoContent{}
}
/*
IssueDeleteLabelNoContent describes a response with status code 204, with default header values.
APIEmpty is an empty response
*/
type IssueDeleteLabelNoContent struct {
}
// IsSuccess returns true when this issue delete label no content response has a 2xx status code
func (o *IssueDeleteLabelNoContent) IsSuccess() bool {
return true
}
// IsRedirect returns true when this issue delete label no content response has a 3xx status code
func (o *IssueDeleteLabelNoContent) IsRedirect() bool {
return false
}
// IsClientError returns true when this issue delete label no content response has a 4xx status code
func (o *IssueDeleteLabelNoContent) IsClientError() bool {
return false
}
// IsServerError returns true when this issue delete label no content response has a 5xx status code
func (o *IssueDeleteLabelNoContent) IsServerError() bool {
return false
}
// IsCode returns true when this issue delete label no content response a status code equal to that given
func (o *IssueDeleteLabelNoContent) IsCode(code int) bool {
return code == 204
}
// Code gets the status code for the issue delete label no content response
func (o *IssueDeleteLabelNoContent) Code() int {
return 204
}
func (o *IssueDeleteLabelNoContent) Error() string {
return fmt.Sprintf("[DELETE /repos/{owner}/{repo}/labels/{id}][%d] issueDeleteLabelNoContent", 204)
}
func (o *IssueDeleteLabelNoContent) String() string {
return fmt.Sprintf("[DELETE /repos/{owner}/{repo}/labels/{id}][%d] issueDeleteLabelNoContent", 204)
}
func (o *IssueDeleteLabelNoContent) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
return nil
}
// NewIssueDeleteLabelNotFound creates a IssueDeleteLabelNotFound with default headers values
func NewIssueDeleteLabelNotFound() *IssueDeleteLabelNotFound {
return &IssueDeleteLabelNotFound{}
}
/*
IssueDeleteLabelNotFound describes a response with status code 404, with default header values.
APINotFound is a not found empty response
*/
type IssueDeleteLabelNotFound struct {
}
// IsSuccess returns true when this issue delete label not found response has a 2xx status code
func (o *IssueDeleteLabelNotFound) IsSuccess() bool {
return false
}
// IsRedirect returns true when this issue delete label not found response has a 3xx status code
func (o *IssueDeleteLabelNotFound) IsRedirect() bool {
return false
}
// IsClientError returns true when this issue delete label not found response has a 4xx status code
func (o *IssueDeleteLabelNotFound) IsClientError() bool {
return true
}
// IsServerError returns true when this issue delete label not found response has a 5xx status code
func (o *IssueDeleteLabelNotFound) IsServerError() bool {
return false
}
// IsCode returns true when this issue delete label not found response a status code equal to that given
func (o *IssueDeleteLabelNotFound) IsCode(code int) bool {
return code == 404
}
// Code gets the status code for the issue delete label not found response
func (o *IssueDeleteLabelNotFound) Code() int {
return 404
}
func (o *IssueDeleteLabelNotFound) Error() string {
return fmt.Sprintf("[DELETE /repos/{owner}/{repo}/labels/{id}][%d] issueDeleteLabelNotFound", 404)
}
func (o *IssueDeleteLabelNotFound) String() string {
return fmt.Sprintf("[DELETE /repos/{owner}/{repo}/labels/{id}][%d] issueDeleteLabelNotFound", 404)
}
func (o *IssueDeleteLabelNotFound) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
return nil
}