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

// IssueDeleteSubscriptionReader is a Reader for the IssueDeleteSubscription structure.
type IssueDeleteSubscriptionReader struct {
	formats strfmt.Registry
}

// ReadResponse reads a server response into the received o.
func (o *IssueDeleteSubscriptionReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) {
	switch response.Code() {
	case 200:
		result := NewIssueDeleteSubscriptionOK()
		if err := result.readResponse(response, consumer, o.formats); err != nil {
			return nil, err
		}
		return result, nil
	case 201:
		result := NewIssueDeleteSubscriptionCreated()
		if err := result.readResponse(response, consumer, o.formats); err != nil {
			return nil, err
		}
		return result, nil
	case 304:
		result := NewIssueDeleteSubscriptionNotModified()
		if err := result.readResponse(response, consumer, o.formats); err != nil {
			return nil, err
		}
		return nil, result
	case 404:
		result := NewIssueDeleteSubscriptionNotFound()
		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}/subscriptions/{user}] issueDeleteSubscription", response, response.Code())
	}
}

// NewIssueDeleteSubscriptionOK creates a IssueDeleteSubscriptionOK with default headers values
func NewIssueDeleteSubscriptionOK() *IssueDeleteSubscriptionOK {
	return &IssueDeleteSubscriptionOK{}
}

/*
IssueDeleteSubscriptionOK describes a response with status code 200, with default header values.

Already unsubscribed
*/
type IssueDeleteSubscriptionOK struct {
}

// IsSuccess returns true when this issue delete subscription o k response has a 2xx status code
func (o *IssueDeleteSubscriptionOK) IsSuccess() bool {
	return true
}

// IsRedirect returns true when this issue delete subscription o k response has a 3xx status code
func (o *IssueDeleteSubscriptionOK) IsRedirect() bool {
	return false
}

// IsClientError returns true when this issue delete subscription o k response has a 4xx status code
func (o *IssueDeleteSubscriptionOK) IsClientError() bool {
	return false
}

// IsServerError returns true when this issue delete subscription o k response has a 5xx status code
func (o *IssueDeleteSubscriptionOK) IsServerError() bool {
	return false
}

// IsCode returns true when this issue delete subscription o k response a status code equal to that given
func (o *IssueDeleteSubscriptionOK) IsCode(code int) bool {
	return code == 200
}

// Code gets the status code for the issue delete subscription o k response
func (o *IssueDeleteSubscriptionOK) Code() int {
	return 200
}

func (o *IssueDeleteSubscriptionOK) Error() string {
	return fmt.Sprintf("[DELETE /repos/{owner}/{repo}/issues/{index}/subscriptions/{user}][%d] issueDeleteSubscriptionOK", 200)
}

func (o *IssueDeleteSubscriptionOK) String() string {
	return fmt.Sprintf("[DELETE /repos/{owner}/{repo}/issues/{index}/subscriptions/{user}][%d] issueDeleteSubscriptionOK", 200)
}

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

	return nil
}

// NewIssueDeleteSubscriptionCreated creates a IssueDeleteSubscriptionCreated with default headers values
func NewIssueDeleteSubscriptionCreated() *IssueDeleteSubscriptionCreated {
	return &IssueDeleteSubscriptionCreated{}
}

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

Successfully Unsubscribed
*/
type IssueDeleteSubscriptionCreated struct {
}

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

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

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

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

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

// Code gets the status code for the issue delete subscription created response
func (o *IssueDeleteSubscriptionCreated) Code() int {
	return 201
}

func (o *IssueDeleteSubscriptionCreated) Error() string {
	return fmt.Sprintf("[DELETE /repos/{owner}/{repo}/issues/{index}/subscriptions/{user}][%d] issueDeleteSubscriptionCreated", 201)
}

func (o *IssueDeleteSubscriptionCreated) String() string {
	return fmt.Sprintf("[DELETE /repos/{owner}/{repo}/issues/{index}/subscriptions/{user}][%d] issueDeleteSubscriptionCreated", 201)
}

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

	return nil
}

// NewIssueDeleteSubscriptionNotModified creates a IssueDeleteSubscriptionNotModified with default headers values
func NewIssueDeleteSubscriptionNotModified() *IssueDeleteSubscriptionNotModified {
	return &IssueDeleteSubscriptionNotModified{}
}

/*
IssueDeleteSubscriptionNotModified describes a response with status code 304, with default header values.

User can only subscribe itself if he is no admin
*/
type IssueDeleteSubscriptionNotModified struct {
}

// IsSuccess returns true when this issue delete subscription not modified response has a 2xx status code
func (o *IssueDeleteSubscriptionNotModified) IsSuccess() bool {
	return false
}

// IsRedirect returns true when this issue delete subscription not modified response has a 3xx status code
func (o *IssueDeleteSubscriptionNotModified) IsRedirect() bool {
	return true
}

// IsClientError returns true when this issue delete subscription not modified response has a 4xx status code
func (o *IssueDeleteSubscriptionNotModified) IsClientError() bool {
	return false
}

// IsServerError returns true when this issue delete subscription not modified response has a 5xx status code
func (o *IssueDeleteSubscriptionNotModified) IsServerError() bool {
	return false
}

// IsCode returns true when this issue delete subscription not modified response a status code equal to that given
func (o *IssueDeleteSubscriptionNotModified) IsCode(code int) bool {
	return code == 304
}

// Code gets the status code for the issue delete subscription not modified response
func (o *IssueDeleteSubscriptionNotModified) Code() int {
	return 304
}

func (o *IssueDeleteSubscriptionNotModified) Error() string {
	return fmt.Sprintf("[DELETE /repos/{owner}/{repo}/issues/{index}/subscriptions/{user}][%d] issueDeleteSubscriptionNotModified", 304)
}

func (o *IssueDeleteSubscriptionNotModified) String() string {
	return fmt.Sprintf("[DELETE /repos/{owner}/{repo}/issues/{index}/subscriptions/{user}][%d] issueDeleteSubscriptionNotModified", 304)
}

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

	return nil
}

// NewIssueDeleteSubscriptionNotFound creates a IssueDeleteSubscriptionNotFound with default headers values
func NewIssueDeleteSubscriptionNotFound() *IssueDeleteSubscriptionNotFound {
	return &IssueDeleteSubscriptionNotFound{}
}

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

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

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

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

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

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

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

// Code gets the status code for the issue delete subscription not found response
func (o *IssueDeleteSubscriptionNotFound) Code() int {
	return 404
}

func (o *IssueDeleteSubscriptionNotFound) Error() string {
	return fmt.Sprintf("[DELETE /repos/{owner}/{repo}/issues/{index}/subscriptions/{user}][%d] issueDeleteSubscriptionNotFound", 404)
}

func (o *IssueDeleteSubscriptionNotFound) String() string {
	return fmt.Sprintf("[DELETE /repos/{owner}/{repo}/issues/{index}/subscriptions/{user}][%d] issueDeleteSubscriptionNotFound", 404)
}

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

	return nil
}