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

// IssueResetTimeReader is a Reader for the IssueResetTime structure.
type IssueResetTimeReader struct {
	formats strfmt.Registry
}

// ReadResponse reads a server response into the received o.
func (o *IssueResetTimeReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) {
	switch response.Code() {
	case 204:
		result := NewIssueResetTimeNoContent()
		if err := result.readResponse(response, consumer, o.formats); err != nil {
			return nil, err
		}
		return result, nil
	case 400:
		result := NewIssueResetTimeBadRequest()
		if err := result.readResponse(response, consumer, o.formats); err != nil {
			return nil, err
		}
		return nil, result
	case 403:
		result := NewIssueResetTimeForbidden()
		if err := result.readResponse(response, consumer, o.formats); err != nil {
			return nil, err
		}
		return nil, result
	case 404:
		result := NewIssueResetTimeNotFound()
		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}/times] issueResetTime", response, response.Code())
	}
}

// NewIssueResetTimeNoContent creates a IssueResetTimeNoContent with default headers values
func NewIssueResetTimeNoContent() *IssueResetTimeNoContent {
	return &IssueResetTimeNoContent{}
}

/*
IssueResetTimeNoContent describes a response with status code 204, with default header values.

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

// IsSuccess returns true when this issue reset time no content response has a 2xx status code
func (o *IssueResetTimeNoContent) IsSuccess() bool {
	return true
}

// IsRedirect returns true when this issue reset time no content response has a 3xx status code
func (o *IssueResetTimeNoContent) IsRedirect() bool {
	return false
}

// IsClientError returns true when this issue reset time no content response has a 4xx status code
func (o *IssueResetTimeNoContent) IsClientError() bool {
	return false
}

// IsServerError returns true when this issue reset time no content response has a 5xx status code
func (o *IssueResetTimeNoContent) IsServerError() bool {
	return false
}

// IsCode returns true when this issue reset time no content response a status code equal to that given
func (o *IssueResetTimeNoContent) IsCode(code int) bool {
	return code == 204
}

// Code gets the status code for the issue reset time no content response
func (o *IssueResetTimeNoContent) Code() int {
	return 204
}

func (o *IssueResetTimeNoContent) Error() string {
	return fmt.Sprintf("[DELETE /repos/{owner}/{repo}/issues/{index}/times][%d] issueResetTimeNoContent", 204)
}

func (o *IssueResetTimeNoContent) String() string {
	return fmt.Sprintf("[DELETE /repos/{owner}/{repo}/issues/{index}/times][%d] issueResetTimeNoContent", 204)
}

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

	return nil
}

// NewIssueResetTimeBadRequest creates a IssueResetTimeBadRequest with default headers values
func NewIssueResetTimeBadRequest() *IssueResetTimeBadRequest {
	return &IssueResetTimeBadRequest{}
}

/*
IssueResetTimeBadRequest describes a response with status code 400, with default header values.

APIError is error format response
*/
type IssueResetTimeBadRequest struct {
	Message string
	URL     string
}

// IsSuccess returns true when this issue reset time bad request response has a 2xx status code
func (o *IssueResetTimeBadRequest) IsSuccess() bool {
	return false
}

// IsRedirect returns true when this issue reset time bad request response has a 3xx status code
func (o *IssueResetTimeBadRequest) IsRedirect() bool {
	return false
}

// IsClientError returns true when this issue reset time bad request response has a 4xx status code
func (o *IssueResetTimeBadRequest) IsClientError() bool {
	return true
}

// IsServerError returns true when this issue reset time bad request response has a 5xx status code
func (o *IssueResetTimeBadRequest) IsServerError() bool {
	return false
}

// IsCode returns true when this issue reset time bad request response a status code equal to that given
func (o *IssueResetTimeBadRequest) IsCode(code int) bool {
	return code == 400
}

// Code gets the status code for the issue reset time bad request response
func (o *IssueResetTimeBadRequest) Code() int {
	return 400
}

func (o *IssueResetTimeBadRequest) Error() string {
	return fmt.Sprintf("[DELETE /repos/{owner}/{repo}/issues/{index}/times][%d] issueResetTimeBadRequest", 400)
}

func (o *IssueResetTimeBadRequest) String() string {
	return fmt.Sprintf("[DELETE /repos/{owner}/{repo}/issues/{index}/times][%d] issueResetTimeBadRequest", 400)
}

func (o *IssueResetTimeBadRequest) 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
}

// NewIssueResetTimeForbidden creates a IssueResetTimeForbidden with default headers values
func NewIssueResetTimeForbidden() *IssueResetTimeForbidden {
	return &IssueResetTimeForbidden{}
}

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

APIForbiddenError is a forbidden error response
*/
type IssueResetTimeForbidden struct {
	Message string
	URL     string
}

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

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

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

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

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

// Code gets the status code for the issue reset time forbidden response
func (o *IssueResetTimeForbidden) Code() int {
	return 403
}

func (o *IssueResetTimeForbidden) Error() string {
	return fmt.Sprintf("[DELETE /repos/{owner}/{repo}/issues/{index}/times][%d] issueResetTimeForbidden", 403)
}

func (o *IssueResetTimeForbidden) String() string {
	return fmt.Sprintf("[DELETE /repos/{owner}/{repo}/issues/{index}/times][%d] issueResetTimeForbidden", 403)
}

func (o *IssueResetTimeForbidden) 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
}

// NewIssueResetTimeNotFound creates a IssueResetTimeNotFound with default headers values
func NewIssueResetTimeNotFound() *IssueResetTimeNotFound {
	return &IssueResetTimeNotFound{}
}

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

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

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

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

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

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

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

// Code gets the status code for the issue reset time not found response
func (o *IssueResetTimeNotFound) Code() int {
	return 404
}

func (o *IssueResetTimeNotFound) Error() string {
	return fmt.Sprintf("[DELETE /repos/{owner}/{repo}/issues/{index}/times][%d] issueResetTimeNotFound", 404)
}

func (o *IssueResetTimeNotFound) String() string {
	return fmt.Sprintf("[DELETE /repos/{owner}/{repo}/issues/{index}/times][%d] issueResetTimeNotFound", 404)
}

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

	return nil
}
