// 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"
)

// IssueStopStopWatchReader is a Reader for the IssueStopStopWatch structure.
type IssueStopStopWatchReader struct {
	formats strfmt.Registry
}

// ReadResponse reads a server response into the received o.
func (o *IssueStopStopWatchReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) {
	switch response.Code() {
	case 201:
		result := NewIssueStopStopWatchCreated()
		if err := result.readResponse(response, consumer, o.formats); err != nil {
			return nil, err
		}
		return result, nil
	case 403:
		result := NewIssueStopStopWatchForbidden()
		if err := result.readResponse(response, consumer, o.formats); err != nil {
			return nil, err
		}
		return nil, result
	case 404:
		result := NewIssueStopStopWatchNotFound()
		if err := result.readResponse(response, consumer, o.formats); err != nil {
			return nil, err
		}
		return nil, result
	case 409:
		result := NewIssueStopStopWatchConflict()
		if err := result.readResponse(response, consumer, o.formats); err != nil {
			return nil, err
		}
		return nil, result
	default:
		return nil, runtime.NewAPIError("[POST /repos/{owner}/{repo}/issues/{index}/stopwatch/stop] issueStopStopWatch", response, response.Code())
	}
}

// NewIssueStopStopWatchCreated creates a IssueStopStopWatchCreated with default headers values
func NewIssueStopStopWatchCreated() *IssueStopStopWatchCreated {
	return &IssueStopStopWatchCreated{}
}

/*
IssueStopStopWatchCreated describes a response with status code 201, with default header values.

APIEmpty is an empty response
*/
type IssueStopStopWatchCreated struct {
}

// IsSuccess returns true when this issue stop stop watch created response has a 2xx status code
func (o *IssueStopStopWatchCreated) IsSuccess() bool {
	return true
}

// IsRedirect returns true when this issue stop stop watch created response has a 3xx status code
func (o *IssueStopStopWatchCreated) IsRedirect() bool {
	return false
}

// IsClientError returns true when this issue stop stop watch created response has a 4xx status code
func (o *IssueStopStopWatchCreated) IsClientError() bool {
	return false
}

// IsServerError returns true when this issue stop stop watch created response has a 5xx status code
func (o *IssueStopStopWatchCreated) IsServerError() bool {
	return false
}

// IsCode returns true when this issue stop stop watch created response a status code equal to that given
func (o *IssueStopStopWatchCreated) IsCode(code int) bool {
	return code == 201
}

// Code gets the status code for the issue stop stop watch created response
func (o *IssueStopStopWatchCreated) Code() int {
	return 201
}

func (o *IssueStopStopWatchCreated) Error() string {
	return fmt.Sprintf("[POST /repos/{owner}/{repo}/issues/{index}/stopwatch/stop][%d] issueStopStopWatchCreated", 201)
}

func (o *IssueStopStopWatchCreated) String() string {
	return fmt.Sprintf("[POST /repos/{owner}/{repo}/issues/{index}/stopwatch/stop][%d] issueStopStopWatchCreated", 201)
}

func (o *IssueStopStopWatchCreated) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {

	return nil
}

// NewIssueStopStopWatchForbidden creates a IssueStopStopWatchForbidden with default headers values
func NewIssueStopStopWatchForbidden() *IssueStopStopWatchForbidden {
	return &IssueStopStopWatchForbidden{}
}

/*
IssueStopStopWatchForbidden describes a response with status code 403, with default header values.

Not repo writer, user does not have rights to toggle stopwatch
*/
type IssueStopStopWatchForbidden struct {
}

// IsSuccess returns true when this issue stop stop watch forbidden response has a 2xx status code
func (o *IssueStopStopWatchForbidden) IsSuccess() bool {
	return false
}

// IsRedirect returns true when this issue stop stop watch forbidden response has a 3xx status code
func (o *IssueStopStopWatchForbidden) IsRedirect() bool {
	return false
}

// IsClientError returns true when this issue stop stop watch forbidden response has a 4xx status code
func (o *IssueStopStopWatchForbidden) IsClientError() bool {
	return true
}

// IsServerError returns true when this issue stop stop watch forbidden response has a 5xx status code
func (o *IssueStopStopWatchForbidden) IsServerError() bool {
	return false
}

// IsCode returns true when this issue stop stop watch forbidden response a status code equal to that given
func (o *IssueStopStopWatchForbidden) IsCode(code int) bool {
	return code == 403
}

// Code gets the status code for the issue stop stop watch forbidden response
func (o *IssueStopStopWatchForbidden) Code() int {
	return 403
}

func (o *IssueStopStopWatchForbidden) Error() string {
	return fmt.Sprintf("[POST /repos/{owner}/{repo}/issues/{index}/stopwatch/stop][%d] issueStopStopWatchForbidden", 403)
}

func (o *IssueStopStopWatchForbidden) String() string {
	return fmt.Sprintf("[POST /repos/{owner}/{repo}/issues/{index}/stopwatch/stop][%d] issueStopStopWatchForbidden", 403)
}

func (o *IssueStopStopWatchForbidden) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {

	return nil
}

// NewIssueStopStopWatchNotFound creates a IssueStopStopWatchNotFound with default headers values
func NewIssueStopStopWatchNotFound() *IssueStopStopWatchNotFound {
	return &IssueStopStopWatchNotFound{}
}

/*
IssueStopStopWatchNotFound describes a response with status code 404, with default header values.

APINotFound is a not found empty response
*/
type IssueStopStopWatchNotFound struct {
}

// IsSuccess returns true when this issue stop stop watch not found response has a 2xx status code
func (o *IssueStopStopWatchNotFound) IsSuccess() bool {
	return false
}

// IsRedirect returns true when this issue stop stop watch not found response has a 3xx status code
func (o *IssueStopStopWatchNotFound) IsRedirect() bool {
	return false
}

// IsClientError returns true when this issue stop stop watch not found response has a 4xx status code
func (o *IssueStopStopWatchNotFound) IsClientError() bool {
	return true
}

// IsServerError returns true when this issue stop stop watch not found response has a 5xx status code
func (o *IssueStopStopWatchNotFound) IsServerError() bool {
	return false
}

// IsCode returns true when this issue stop stop watch not found response a status code equal to that given
func (o *IssueStopStopWatchNotFound) IsCode(code int) bool {
	return code == 404
}

// Code gets the status code for the issue stop stop watch not found response
func (o *IssueStopStopWatchNotFound) Code() int {
	return 404
}

func (o *IssueStopStopWatchNotFound) Error() string {
	return fmt.Sprintf("[POST /repos/{owner}/{repo}/issues/{index}/stopwatch/stop][%d] issueStopStopWatchNotFound", 404)
}

func (o *IssueStopStopWatchNotFound) String() string {
	return fmt.Sprintf("[POST /repos/{owner}/{repo}/issues/{index}/stopwatch/stop][%d] issueStopStopWatchNotFound", 404)
}

func (o *IssueStopStopWatchNotFound) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {

	return nil
}

// NewIssueStopStopWatchConflict creates a IssueStopStopWatchConflict with default headers values
func NewIssueStopStopWatchConflict() *IssueStopStopWatchConflict {
	return &IssueStopStopWatchConflict{}
}

/*
IssueStopStopWatchConflict describes a response with status code 409, with default header values.

Cannot stop a non existent stopwatch
*/
type IssueStopStopWatchConflict struct {
}

// IsSuccess returns true when this issue stop stop watch conflict response has a 2xx status code
func (o *IssueStopStopWatchConflict) IsSuccess() bool {
	return false
}

// IsRedirect returns true when this issue stop stop watch conflict response has a 3xx status code
func (o *IssueStopStopWatchConflict) IsRedirect() bool {
	return false
}

// IsClientError returns true when this issue stop stop watch conflict response has a 4xx status code
func (o *IssueStopStopWatchConflict) IsClientError() bool {
	return true
}

// IsServerError returns true when this issue stop stop watch conflict response has a 5xx status code
func (o *IssueStopStopWatchConflict) IsServerError() bool {
	return false
}

// IsCode returns true when this issue stop stop watch conflict response a status code equal to that given
func (o *IssueStopStopWatchConflict) IsCode(code int) bool {
	return code == 409
}

// Code gets the status code for the issue stop stop watch conflict response
func (o *IssueStopStopWatchConflict) Code() int {
	return 409
}

func (o *IssueStopStopWatchConflict) Error() string {
	return fmt.Sprintf("[POST /repos/{owner}/{repo}/issues/{index}/stopwatch/stop][%d] issueStopStopWatchConflict", 409)
}

func (o *IssueStopStopWatchConflict) String() string {
	return fmt.Sprintf("[POST /repos/{owner}/{repo}/issues/{index}/stopwatch/stop][%d] issueStopStopWatchConflict", 409)
}

func (o *IssueStopStopWatchConflict) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {

	return nil
}
