229 lines
8.1 KiB
Go
229 lines
8.1 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"
|
|
)
|
|
|
|
// IssueDeleteCommentDeprecatedReader is a Reader for the IssueDeleteCommentDeprecated structure.
|
|
type IssueDeleteCommentDeprecatedReader struct {
|
|
formats strfmt.Registry
|
|
}
|
|
|
|
// ReadResponse reads a server response into the received o.
|
|
func (o *IssueDeleteCommentDeprecatedReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) {
|
|
switch response.Code() {
|
|
case 204:
|
|
result := NewIssueDeleteCommentDeprecatedNoContent()
|
|
if err := result.readResponse(response, consumer, o.formats); err != nil {
|
|
return nil, err
|
|
}
|
|
return result, nil
|
|
case 403:
|
|
result := NewIssueDeleteCommentDeprecatedForbidden()
|
|
if err := result.readResponse(response, consumer, o.formats); err != nil {
|
|
return nil, err
|
|
}
|
|
return nil, result
|
|
case 404:
|
|
result := NewIssueDeleteCommentDeprecatedNotFound()
|
|
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}/comments/{id}] issueDeleteCommentDeprecated", response, response.Code())
|
|
}
|
|
}
|
|
|
|
// NewIssueDeleteCommentDeprecatedNoContent creates a IssueDeleteCommentDeprecatedNoContent with default headers values
|
|
func NewIssueDeleteCommentDeprecatedNoContent() *IssueDeleteCommentDeprecatedNoContent {
|
|
return &IssueDeleteCommentDeprecatedNoContent{}
|
|
}
|
|
|
|
/*
|
|
IssueDeleteCommentDeprecatedNoContent describes a response with status code 204, with default header values.
|
|
|
|
APIEmpty is an empty response
|
|
*/
|
|
type IssueDeleteCommentDeprecatedNoContent struct {
|
|
}
|
|
|
|
// IsSuccess returns true when this issue delete comment deprecated no content response has a 2xx status code
|
|
func (o *IssueDeleteCommentDeprecatedNoContent) IsSuccess() bool {
|
|
return true
|
|
}
|
|
|
|
// IsRedirect returns true when this issue delete comment deprecated no content response has a 3xx status code
|
|
func (o *IssueDeleteCommentDeprecatedNoContent) IsRedirect() bool {
|
|
return false
|
|
}
|
|
|
|
// IsClientError returns true when this issue delete comment deprecated no content response has a 4xx status code
|
|
func (o *IssueDeleteCommentDeprecatedNoContent) IsClientError() bool {
|
|
return false
|
|
}
|
|
|
|
// IsServerError returns true when this issue delete comment deprecated no content response has a 5xx status code
|
|
func (o *IssueDeleteCommentDeprecatedNoContent) IsServerError() bool {
|
|
return false
|
|
}
|
|
|
|
// IsCode returns true when this issue delete comment deprecated no content response a status code equal to that given
|
|
func (o *IssueDeleteCommentDeprecatedNoContent) IsCode(code int) bool {
|
|
return code == 204
|
|
}
|
|
|
|
// Code gets the status code for the issue delete comment deprecated no content response
|
|
func (o *IssueDeleteCommentDeprecatedNoContent) Code() int {
|
|
return 204
|
|
}
|
|
|
|
func (o *IssueDeleteCommentDeprecatedNoContent) Error() string {
|
|
return fmt.Sprintf("[DELETE /repos/{owner}/{repo}/issues/{index}/comments/{id}][%d] issueDeleteCommentDeprecatedNoContent", 204)
|
|
}
|
|
|
|
func (o *IssueDeleteCommentDeprecatedNoContent) String() string {
|
|
return fmt.Sprintf("[DELETE /repos/{owner}/{repo}/issues/{index}/comments/{id}][%d] issueDeleteCommentDeprecatedNoContent", 204)
|
|
}
|
|
|
|
func (o *IssueDeleteCommentDeprecatedNoContent) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
|
|
|
|
return nil
|
|
}
|
|
|
|
// NewIssueDeleteCommentDeprecatedForbidden creates a IssueDeleteCommentDeprecatedForbidden with default headers values
|
|
func NewIssueDeleteCommentDeprecatedForbidden() *IssueDeleteCommentDeprecatedForbidden {
|
|
return &IssueDeleteCommentDeprecatedForbidden{}
|
|
}
|
|
|
|
/*
|
|
IssueDeleteCommentDeprecatedForbidden describes a response with status code 403, with default header values.
|
|
|
|
APIForbiddenError is a forbidden error response
|
|
*/
|
|
type IssueDeleteCommentDeprecatedForbidden struct {
|
|
Message string
|
|
URL string
|
|
}
|
|
|
|
// IsSuccess returns true when this issue delete comment deprecated forbidden response has a 2xx status code
|
|
func (o *IssueDeleteCommentDeprecatedForbidden) IsSuccess() bool {
|
|
return false
|
|
}
|
|
|
|
// IsRedirect returns true when this issue delete comment deprecated forbidden response has a 3xx status code
|
|
func (o *IssueDeleteCommentDeprecatedForbidden) IsRedirect() bool {
|
|
return false
|
|
}
|
|
|
|
// IsClientError returns true when this issue delete comment deprecated forbidden response has a 4xx status code
|
|
func (o *IssueDeleteCommentDeprecatedForbidden) IsClientError() bool {
|
|
return true
|
|
}
|
|
|
|
// IsServerError returns true when this issue delete comment deprecated forbidden response has a 5xx status code
|
|
func (o *IssueDeleteCommentDeprecatedForbidden) IsServerError() bool {
|
|
return false
|
|
}
|
|
|
|
// IsCode returns true when this issue delete comment deprecated forbidden response a status code equal to that given
|
|
func (o *IssueDeleteCommentDeprecatedForbidden) IsCode(code int) bool {
|
|
return code == 403
|
|
}
|
|
|
|
// Code gets the status code for the issue delete comment deprecated forbidden response
|
|
func (o *IssueDeleteCommentDeprecatedForbidden) Code() int {
|
|
return 403
|
|
}
|
|
|
|
func (o *IssueDeleteCommentDeprecatedForbidden) Error() string {
|
|
return fmt.Sprintf("[DELETE /repos/{owner}/{repo}/issues/{index}/comments/{id}][%d] issueDeleteCommentDeprecatedForbidden", 403)
|
|
}
|
|
|
|
func (o *IssueDeleteCommentDeprecatedForbidden) String() string {
|
|
return fmt.Sprintf("[DELETE /repos/{owner}/{repo}/issues/{index}/comments/{id}][%d] issueDeleteCommentDeprecatedForbidden", 403)
|
|
}
|
|
|
|
func (o *IssueDeleteCommentDeprecatedForbidden) 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
|
|
}
|
|
|
|
// NewIssueDeleteCommentDeprecatedNotFound creates a IssueDeleteCommentDeprecatedNotFound with default headers values
|
|
func NewIssueDeleteCommentDeprecatedNotFound() *IssueDeleteCommentDeprecatedNotFound {
|
|
return &IssueDeleteCommentDeprecatedNotFound{}
|
|
}
|
|
|
|
/*
|
|
IssueDeleteCommentDeprecatedNotFound describes a response with status code 404, with default header values.
|
|
|
|
APINotFound is a not found empty response
|
|
*/
|
|
type IssueDeleteCommentDeprecatedNotFound struct {
|
|
}
|
|
|
|
// IsSuccess returns true when this issue delete comment deprecated not found response has a 2xx status code
|
|
func (o *IssueDeleteCommentDeprecatedNotFound) IsSuccess() bool {
|
|
return false
|
|
}
|
|
|
|
// IsRedirect returns true when this issue delete comment deprecated not found response has a 3xx status code
|
|
func (o *IssueDeleteCommentDeprecatedNotFound) IsRedirect() bool {
|
|
return false
|
|
}
|
|
|
|
// IsClientError returns true when this issue delete comment deprecated not found response has a 4xx status code
|
|
func (o *IssueDeleteCommentDeprecatedNotFound) IsClientError() bool {
|
|
return true
|
|
}
|
|
|
|
// IsServerError returns true when this issue delete comment deprecated not found response has a 5xx status code
|
|
func (o *IssueDeleteCommentDeprecatedNotFound) IsServerError() bool {
|
|
return false
|
|
}
|
|
|
|
// IsCode returns true when this issue delete comment deprecated not found response a status code equal to that given
|
|
func (o *IssueDeleteCommentDeprecatedNotFound) IsCode(code int) bool {
|
|
return code == 404
|
|
}
|
|
|
|
// Code gets the status code for the issue delete comment deprecated not found response
|
|
func (o *IssueDeleteCommentDeprecatedNotFound) Code() int {
|
|
return 404
|
|
}
|
|
|
|
func (o *IssueDeleteCommentDeprecatedNotFound) Error() string {
|
|
return fmt.Sprintf("[DELETE /repos/{owner}/{repo}/issues/{index}/comments/{id}][%d] issueDeleteCommentDeprecatedNotFound", 404)
|
|
}
|
|
|
|
func (o *IssueDeleteCommentDeprecatedNotFound) String() string {
|
|
return fmt.Sprintf("[DELETE /repos/{owner}/{repo}/issues/{index}/comments/{id}][%d] issueDeleteCommentDeprecatedNotFound", 404)
|
|
}
|
|
|
|
func (o *IssueDeleteCommentDeprecatedNotFound) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
|
|
|
|
return nil
|
|
}
|