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

// IssueDeleteIssueCommentAttachmentReader is a Reader for the IssueDeleteIssueCommentAttachment structure.
type IssueDeleteIssueCommentAttachmentReader struct {
	formats strfmt.Registry
}

// ReadResponse reads a server response into the received o.
func (o *IssueDeleteIssueCommentAttachmentReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) {
	switch response.Code() {
	case 204:
		result := NewIssueDeleteIssueCommentAttachmentNoContent()
		if err := result.readResponse(response, consumer, o.formats); err != nil {
			return nil, err
		}
		return result, nil
	case 404:
		result := NewIssueDeleteIssueCommentAttachmentNotFound()
		if err := result.readResponse(response, consumer, o.formats); err != nil {
			return nil, err
		}
		return nil, result
	case 423:
		result := NewIssueDeleteIssueCommentAttachmentLocked()
		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/comments/{id}/assets/{attachment_id}] issueDeleteIssueCommentAttachment", response, response.Code())
	}
}

// NewIssueDeleteIssueCommentAttachmentNoContent creates a IssueDeleteIssueCommentAttachmentNoContent with default headers values
func NewIssueDeleteIssueCommentAttachmentNoContent() *IssueDeleteIssueCommentAttachmentNoContent {
	return &IssueDeleteIssueCommentAttachmentNoContent{}
}

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

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

// IsSuccess returns true when this issue delete issue comment attachment no content response has a 2xx status code
func (o *IssueDeleteIssueCommentAttachmentNoContent) IsSuccess() bool {
	return true
}

// IsRedirect returns true when this issue delete issue comment attachment no content response has a 3xx status code
func (o *IssueDeleteIssueCommentAttachmentNoContent) IsRedirect() bool {
	return false
}

// IsClientError returns true when this issue delete issue comment attachment no content response has a 4xx status code
func (o *IssueDeleteIssueCommentAttachmentNoContent) IsClientError() bool {
	return false
}

// IsServerError returns true when this issue delete issue comment attachment no content response has a 5xx status code
func (o *IssueDeleteIssueCommentAttachmentNoContent) IsServerError() bool {
	return false
}

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

// Code gets the status code for the issue delete issue comment attachment no content response
func (o *IssueDeleteIssueCommentAttachmentNoContent) Code() int {
	return 204
}

func (o *IssueDeleteIssueCommentAttachmentNoContent) Error() string {
	return fmt.Sprintf("[DELETE /repos/{owner}/{repo}/issues/comments/{id}/assets/{attachment_id}][%d] issueDeleteIssueCommentAttachmentNoContent", 204)
}

func (o *IssueDeleteIssueCommentAttachmentNoContent) String() string {
	return fmt.Sprintf("[DELETE /repos/{owner}/{repo}/issues/comments/{id}/assets/{attachment_id}][%d] issueDeleteIssueCommentAttachmentNoContent", 204)
}

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

	return nil
}

// NewIssueDeleteIssueCommentAttachmentNotFound creates a IssueDeleteIssueCommentAttachmentNotFound with default headers values
func NewIssueDeleteIssueCommentAttachmentNotFound() *IssueDeleteIssueCommentAttachmentNotFound {
	return &IssueDeleteIssueCommentAttachmentNotFound{}
}

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

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

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

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

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

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

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

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

func (o *IssueDeleteIssueCommentAttachmentNotFound) Error() string {
	return fmt.Sprintf("[DELETE /repos/{owner}/{repo}/issues/comments/{id}/assets/{attachment_id}][%d] issueDeleteIssueCommentAttachmentNotFound", 404)
}

func (o *IssueDeleteIssueCommentAttachmentNotFound) String() string {
	return fmt.Sprintf("[DELETE /repos/{owner}/{repo}/issues/comments/{id}/assets/{attachment_id}][%d] issueDeleteIssueCommentAttachmentNotFound", 404)
}

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

// NewIssueDeleteIssueCommentAttachmentLocked creates a IssueDeleteIssueCommentAttachmentLocked with default headers values
func NewIssueDeleteIssueCommentAttachmentLocked() *IssueDeleteIssueCommentAttachmentLocked {
	return &IssueDeleteIssueCommentAttachmentLocked{}
}

/*
IssueDeleteIssueCommentAttachmentLocked describes a response with status code 423, with default header values.

APIRepoArchivedError is an error that is raised when an archived repo should be modified
*/
type IssueDeleteIssueCommentAttachmentLocked struct {
	Message string
	URL     string
}

// IsSuccess returns true when this issue delete issue comment attachment locked response has a 2xx status code
func (o *IssueDeleteIssueCommentAttachmentLocked) IsSuccess() bool {
	return false
}

// IsRedirect returns true when this issue delete issue comment attachment locked response has a 3xx status code
func (o *IssueDeleteIssueCommentAttachmentLocked) IsRedirect() bool {
	return false
}

// IsClientError returns true when this issue delete issue comment attachment locked response has a 4xx status code
func (o *IssueDeleteIssueCommentAttachmentLocked) IsClientError() bool {
	return true
}

// IsServerError returns true when this issue delete issue comment attachment locked response has a 5xx status code
func (o *IssueDeleteIssueCommentAttachmentLocked) IsServerError() bool {
	return false
}

// IsCode returns true when this issue delete issue comment attachment locked response a status code equal to that given
func (o *IssueDeleteIssueCommentAttachmentLocked) IsCode(code int) bool {
	return code == 423
}

// Code gets the status code for the issue delete issue comment attachment locked response
func (o *IssueDeleteIssueCommentAttachmentLocked) Code() int {
	return 423
}

func (o *IssueDeleteIssueCommentAttachmentLocked) Error() string {
	return fmt.Sprintf("[DELETE /repos/{owner}/{repo}/issues/comments/{id}/assets/{attachment_id}][%d] issueDeleteIssueCommentAttachmentLocked", 423)
}

func (o *IssueDeleteIssueCommentAttachmentLocked) String() string {
	return fmt.Sprintf("[DELETE /repos/{owner}/{repo}/issues/comments/{id}/assets/{attachment_id}][%d] issueDeleteIssueCommentAttachmentLocked", 423)
}

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