// 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" ) // IssueDeleteStopWatchReader is a Reader for the IssueDeleteStopWatch structure. type IssueDeleteStopWatchReader struct { formats strfmt.Registry } // ReadResponse reads a server response into the received o. func (o *IssueDeleteStopWatchReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { switch response.Code() { case 204: result := NewIssueDeleteStopWatchNoContent() if err := result.readResponse(response, consumer, o.formats); err != nil { return nil, err } return result, nil case 403: result := NewIssueDeleteStopWatchForbidden() if err := result.readResponse(response, consumer, o.formats); err != nil { return nil, err } return nil, result case 404: result := NewIssueDeleteStopWatchNotFound() if err := result.readResponse(response, consumer, o.formats); err != nil { return nil, err } return nil, result case 409: result := NewIssueDeleteStopWatchConflict() 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}/stopwatch/delete] issueDeleteStopWatch", response, response.Code()) } } // NewIssueDeleteStopWatchNoContent creates a IssueDeleteStopWatchNoContent with default headers values func NewIssueDeleteStopWatchNoContent() *IssueDeleteStopWatchNoContent { return &IssueDeleteStopWatchNoContent{} } /* IssueDeleteStopWatchNoContent describes a response with status code 204, with default header values. APIEmpty is an empty response */ type IssueDeleteStopWatchNoContent struct { } // IsSuccess returns true when this issue delete stop watch no content response has a 2xx status code func (o *IssueDeleteStopWatchNoContent) IsSuccess() bool { return true } // IsRedirect returns true when this issue delete stop watch no content response has a 3xx status code func (o *IssueDeleteStopWatchNoContent) IsRedirect() bool { return false } // IsClientError returns true when this issue delete stop watch no content response has a 4xx status code func (o *IssueDeleteStopWatchNoContent) IsClientError() bool { return false } // IsServerError returns true when this issue delete stop watch no content response has a 5xx status code func (o *IssueDeleteStopWatchNoContent) IsServerError() bool { return false } // IsCode returns true when this issue delete stop watch no content response a status code equal to that given func (o *IssueDeleteStopWatchNoContent) IsCode(code int) bool { return code == 204 } // Code gets the status code for the issue delete stop watch no content response func (o *IssueDeleteStopWatchNoContent) Code() int { return 204 } func (o *IssueDeleteStopWatchNoContent) Error() string { return fmt.Sprintf("[DELETE /repos/{owner}/{repo}/issues/{index}/stopwatch/delete][%d] issueDeleteStopWatchNoContent", 204) } func (o *IssueDeleteStopWatchNoContent) String() string { return fmt.Sprintf("[DELETE /repos/{owner}/{repo}/issues/{index}/stopwatch/delete][%d] issueDeleteStopWatchNoContent", 204) } func (o *IssueDeleteStopWatchNoContent) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { return nil } // NewIssueDeleteStopWatchForbidden creates a IssueDeleteStopWatchForbidden with default headers values func NewIssueDeleteStopWatchForbidden() *IssueDeleteStopWatchForbidden { return &IssueDeleteStopWatchForbidden{} } /* IssueDeleteStopWatchForbidden describes a response with status code 403, with default header values. Not repo writer, user does not have rights to toggle stopwatch */ type IssueDeleteStopWatchForbidden struct { } // IsSuccess returns true when this issue delete stop watch forbidden response has a 2xx status code func (o *IssueDeleteStopWatchForbidden) IsSuccess() bool { return false } // IsRedirect returns true when this issue delete stop watch forbidden response has a 3xx status code func (o *IssueDeleteStopWatchForbidden) IsRedirect() bool { return false } // IsClientError returns true when this issue delete stop watch forbidden response has a 4xx status code func (o *IssueDeleteStopWatchForbidden) IsClientError() bool { return true } // IsServerError returns true when this issue delete stop watch forbidden response has a 5xx status code func (o *IssueDeleteStopWatchForbidden) IsServerError() bool { return false } // IsCode returns true when this issue delete stop watch forbidden response a status code equal to that given func (o *IssueDeleteStopWatchForbidden) IsCode(code int) bool { return code == 403 } // Code gets the status code for the issue delete stop watch forbidden response func (o *IssueDeleteStopWatchForbidden) Code() int { return 403 } func (o *IssueDeleteStopWatchForbidden) Error() string { return fmt.Sprintf("[DELETE /repos/{owner}/{repo}/issues/{index}/stopwatch/delete][%d] issueDeleteStopWatchForbidden", 403) } func (o *IssueDeleteStopWatchForbidden) String() string { return fmt.Sprintf("[DELETE /repos/{owner}/{repo}/issues/{index}/stopwatch/delete][%d] issueDeleteStopWatchForbidden", 403) } func (o *IssueDeleteStopWatchForbidden) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { return nil } // NewIssueDeleteStopWatchNotFound creates a IssueDeleteStopWatchNotFound with default headers values func NewIssueDeleteStopWatchNotFound() *IssueDeleteStopWatchNotFound { return &IssueDeleteStopWatchNotFound{} } /* IssueDeleteStopWatchNotFound describes a response with status code 404, with default header values. APINotFound is a not found empty response */ type IssueDeleteStopWatchNotFound struct { } // IsSuccess returns true when this issue delete stop watch not found response has a 2xx status code func (o *IssueDeleteStopWatchNotFound) IsSuccess() bool { return false } // IsRedirect returns true when this issue delete stop watch not found response has a 3xx status code func (o *IssueDeleteStopWatchNotFound) IsRedirect() bool { return false } // IsClientError returns true when this issue delete stop watch not found response has a 4xx status code func (o *IssueDeleteStopWatchNotFound) IsClientError() bool { return true } // IsServerError returns true when this issue delete stop watch not found response has a 5xx status code func (o *IssueDeleteStopWatchNotFound) IsServerError() bool { return false } // IsCode returns true when this issue delete stop watch not found response a status code equal to that given func (o *IssueDeleteStopWatchNotFound) IsCode(code int) bool { return code == 404 } // Code gets the status code for the issue delete stop watch not found response func (o *IssueDeleteStopWatchNotFound) Code() int { return 404 } func (o *IssueDeleteStopWatchNotFound) Error() string { return fmt.Sprintf("[DELETE /repos/{owner}/{repo}/issues/{index}/stopwatch/delete][%d] issueDeleteStopWatchNotFound", 404) } func (o *IssueDeleteStopWatchNotFound) String() string { return fmt.Sprintf("[DELETE /repos/{owner}/{repo}/issues/{index}/stopwatch/delete][%d] issueDeleteStopWatchNotFound", 404) } func (o *IssueDeleteStopWatchNotFound) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { return nil } // NewIssueDeleteStopWatchConflict creates a IssueDeleteStopWatchConflict with default headers values func NewIssueDeleteStopWatchConflict() *IssueDeleteStopWatchConflict { return &IssueDeleteStopWatchConflict{} } /* IssueDeleteStopWatchConflict describes a response with status code 409, with default header values. Cannot cancel a non existent stopwatch */ type IssueDeleteStopWatchConflict struct { } // IsSuccess returns true when this issue delete stop watch conflict response has a 2xx status code func (o *IssueDeleteStopWatchConflict) IsSuccess() bool { return false } // IsRedirect returns true when this issue delete stop watch conflict response has a 3xx status code func (o *IssueDeleteStopWatchConflict) IsRedirect() bool { return false } // IsClientError returns true when this issue delete stop watch conflict response has a 4xx status code func (o *IssueDeleteStopWatchConflict) IsClientError() bool { return true } // IsServerError returns true when this issue delete stop watch conflict response has a 5xx status code func (o *IssueDeleteStopWatchConflict) IsServerError() bool { return false } // IsCode returns true when this issue delete stop watch conflict response a status code equal to that given func (o *IssueDeleteStopWatchConflict) IsCode(code int) bool { return code == 409 } // Code gets the status code for the issue delete stop watch conflict response func (o *IssueDeleteStopWatchConflict) Code() int { return 409 } func (o *IssueDeleteStopWatchConflict) Error() string { return fmt.Sprintf("[DELETE /repos/{owner}/{repo}/issues/{index}/stopwatch/delete][%d] issueDeleteStopWatchConflict", 409) } func (o *IssueDeleteStopWatchConflict) String() string { return fmt.Sprintf("[DELETE /repos/{owner}/{repo}/issues/{index}/stopwatch/delete][%d] issueDeleteStopWatchConflict", 409) } func (o *IssueDeleteStopWatchConflict) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { return nil }