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

// IssueStartStopWatchReader is a Reader for the IssueStartStopWatch structure.
type IssueStartStopWatchReader struct {
	formats strfmt.Registry
}

// ReadResponse reads a server response into the received o.
func (o *IssueStartStopWatchReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) {
	switch response.Code() {
	case 201:
		result := NewIssueStartStopWatchCreated()
		if err := result.readResponse(response, consumer, o.formats); err != nil {
			return nil, err
		}
		return result, nil
	case 403:
		result := NewIssueStartStopWatchForbidden()
		if err := result.readResponse(response, consumer, o.formats); err != nil {
			return nil, err
		}
		return nil, result
	case 404:
		result := NewIssueStartStopWatchNotFound()
		if err := result.readResponse(response, consumer, o.formats); err != nil {
			return nil, err
		}
		return nil, result
	case 409:
		result := NewIssueStartStopWatchConflict()
		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/start] issueStartStopWatch", response, response.Code())
	}
}

// NewIssueStartStopWatchCreated creates a IssueStartStopWatchCreated with default headers values
func NewIssueStartStopWatchCreated() *IssueStartStopWatchCreated {
	return &IssueStartStopWatchCreated{}
}

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

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

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

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

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

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

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

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

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

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

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

	return nil
}

// NewIssueStartStopWatchForbidden creates a IssueStartStopWatchForbidden with default headers values
func NewIssueStartStopWatchForbidden() *IssueStartStopWatchForbidden {
	return &IssueStartStopWatchForbidden{}
}

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

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

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

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

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

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

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

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

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

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

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

	return nil
}

// NewIssueStartStopWatchNotFound creates a IssueStartStopWatchNotFound with default headers values
func NewIssueStartStopWatchNotFound() *IssueStartStopWatchNotFound {
	return &IssueStartStopWatchNotFound{}
}

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

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

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

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

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

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

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

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

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

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

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

	return nil
}

// NewIssueStartStopWatchConflict creates a IssueStartStopWatchConflict with default headers values
func NewIssueStartStopWatchConflict() *IssueStartStopWatchConflict {
	return &IssueStartStopWatchConflict{}
}

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

Cannot start a stopwatch again if it already exists
*/
type IssueStartStopWatchConflict struct {
}

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

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

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

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

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

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

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

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

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

	return nil
}