// Code generated by go-swagger; DO NOT EDIT.

package repository

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

// RepoDeleteReleaseAttachmentReader is a Reader for the RepoDeleteReleaseAttachment structure.
type RepoDeleteReleaseAttachmentReader struct {
	formats strfmt.Registry
}

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

// NewRepoDeleteReleaseAttachmentNoContent creates a RepoDeleteReleaseAttachmentNoContent with default headers values
func NewRepoDeleteReleaseAttachmentNoContent() *RepoDeleteReleaseAttachmentNoContent {
	return &RepoDeleteReleaseAttachmentNoContent{}
}

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

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

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

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

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

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

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

// Code gets the status code for the repo delete release attachment no content response
func (o *RepoDeleteReleaseAttachmentNoContent) Code() int {
	return 204
}

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

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

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

	return nil
}

// NewRepoDeleteReleaseAttachmentNotFound creates a RepoDeleteReleaseAttachmentNotFound with default headers values
func NewRepoDeleteReleaseAttachmentNotFound() *RepoDeleteReleaseAttachmentNotFound {
	return &RepoDeleteReleaseAttachmentNotFound{}
}

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

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

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

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

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

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

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

// Code gets the status code for the repo delete release attachment not found response
func (o *RepoDeleteReleaseAttachmentNotFound) Code() int {
	return 404
}

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

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

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

	return nil
}
