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

151 lines
5.0 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"
)
// IssueDeleteMilestoneReader is a Reader for the IssueDeleteMilestone structure.
type IssueDeleteMilestoneReader struct {
formats strfmt.Registry
}
// ReadResponse reads a server response into the received o.
func (o *IssueDeleteMilestoneReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) {
switch response.Code() {
case 204:
result := NewIssueDeleteMilestoneNoContent()
if err := result.readResponse(response, consumer, o.formats); err != nil {
return nil, err
}
return result, nil
case 404:
result := NewIssueDeleteMilestoneNotFound()
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}/milestones/{id}] issueDeleteMilestone", response, response.Code())
}
}
// NewIssueDeleteMilestoneNoContent creates a IssueDeleteMilestoneNoContent with default headers values
func NewIssueDeleteMilestoneNoContent() *IssueDeleteMilestoneNoContent {
return &IssueDeleteMilestoneNoContent{}
}
/*
IssueDeleteMilestoneNoContent describes a response with status code 204, with default header values.
APIEmpty is an empty response
*/
type IssueDeleteMilestoneNoContent struct {
}
// IsSuccess returns true when this issue delete milestone no content response has a 2xx status code
func (o *IssueDeleteMilestoneNoContent) IsSuccess() bool {
return true
}
// IsRedirect returns true when this issue delete milestone no content response has a 3xx status code
func (o *IssueDeleteMilestoneNoContent) IsRedirect() bool {
return false
}
// IsClientError returns true when this issue delete milestone no content response has a 4xx status code
func (o *IssueDeleteMilestoneNoContent) IsClientError() bool {
return false
}
// IsServerError returns true when this issue delete milestone no content response has a 5xx status code
func (o *IssueDeleteMilestoneNoContent) IsServerError() bool {
return false
}
// IsCode returns true when this issue delete milestone no content response a status code equal to that given
func (o *IssueDeleteMilestoneNoContent) IsCode(code int) bool {
return code == 204
}
// Code gets the status code for the issue delete milestone no content response
func (o *IssueDeleteMilestoneNoContent) Code() int {
return 204
}
func (o *IssueDeleteMilestoneNoContent) Error() string {
return fmt.Sprintf("[DELETE /repos/{owner}/{repo}/milestones/{id}][%d] issueDeleteMilestoneNoContent", 204)
}
func (o *IssueDeleteMilestoneNoContent) String() string {
return fmt.Sprintf("[DELETE /repos/{owner}/{repo}/milestones/{id}][%d] issueDeleteMilestoneNoContent", 204)
}
func (o *IssueDeleteMilestoneNoContent) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
return nil
}
// NewIssueDeleteMilestoneNotFound creates a IssueDeleteMilestoneNotFound with default headers values
func NewIssueDeleteMilestoneNotFound() *IssueDeleteMilestoneNotFound {
return &IssueDeleteMilestoneNotFound{}
}
/*
IssueDeleteMilestoneNotFound describes a response with status code 404, with default header values.
APINotFound is a not found empty response
*/
type IssueDeleteMilestoneNotFound struct {
}
// IsSuccess returns true when this issue delete milestone not found response has a 2xx status code
func (o *IssueDeleteMilestoneNotFound) IsSuccess() bool {
return false
}
// IsRedirect returns true when this issue delete milestone not found response has a 3xx status code
func (o *IssueDeleteMilestoneNotFound) IsRedirect() bool {
return false
}
// IsClientError returns true when this issue delete milestone not found response has a 4xx status code
func (o *IssueDeleteMilestoneNotFound) IsClientError() bool {
return true
}
// IsServerError returns true when this issue delete milestone not found response has a 5xx status code
func (o *IssueDeleteMilestoneNotFound) IsServerError() bool {
return false
}
// IsCode returns true when this issue delete milestone not found response a status code equal to that given
func (o *IssueDeleteMilestoneNotFound) IsCode(code int) bool {
return code == 404
}
// Code gets the status code for the issue delete milestone not found response
func (o *IssueDeleteMilestoneNotFound) Code() int {
return 404
}
func (o *IssueDeleteMilestoneNotFound) Error() string {
return fmt.Sprintf("[DELETE /repos/{owner}/{repo}/milestones/{id}][%d] issueDeleteMilestoneNotFound", 404)
}
func (o *IssueDeleteMilestoneNotFound) String() string {
return fmt.Sprintf("[DELETE /repos/{owner}/{repo}/milestones/{id}][%d] issueDeleteMilestoneNotFound", 404)
}
func (o *IssueDeleteMilestoneNotFound) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
return nil
}