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

// RepoDeleteReader is a Reader for the RepoDelete structure.
type RepoDeleteReader struct {
	formats strfmt.Registry
}

// ReadResponse reads a server response into the received o.
func (o *RepoDeleteReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) {
	switch response.Code() {
	case 204:
		result := NewRepoDeleteNoContent()
		if err := result.readResponse(response, consumer, o.formats); err != nil {
			return nil, err
		}
		return result, nil
	case 403:
		result := NewRepoDeleteForbidden()
		if err := result.readResponse(response, consumer, o.formats); err != nil {
			return nil, err
		}
		return nil, result
	case 404:
		result := NewRepoDeleteNotFound()
		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}] repoDelete", response, response.Code())
	}
}

// NewRepoDeleteNoContent creates a RepoDeleteNoContent with default headers values
func NewRepoDeleteNoContent() *RepoDeleteNoContent {
	return &RepoDeleteNoContent{}
}

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

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

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

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

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

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

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

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

func (o *RepoDeleteNoContent) Error() string {
	return fmt.Sprintf("[DELETE /repos/{owner}/{repo}][%d] repoDeleteNoContent", 204)
}

func (o *RepoDeleteNoContent) String() string {
	return fmt.Sprintf("[DELETE /repos/{owner}/{repo}][%d] repoDeleteNoContent", 204)
}

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

	return nil
}

// NewRepoDeleteForbidden creates a RepoDeleteForbidden with default headers values
func NewRepoDeleteForbidden() *RepoDeleteForbidden {
	return &RepoDeleteForbidden{}
}

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

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

// IsSuccess returns true when this repo delete forbidden response has a 2xx status code
func (o *RepoDeleteForbidden) IsSuccess() bool {
	return false
}

// IsRedirect returns true when this repo delete forbidden response has a 3xx status code
func (o *RepoDeleteForbidden) IsRedirect() bool {
	return false
}

// IsClientError returns true when this repo delete forbidden response has a 4xx status code
func (o *RepoDeleteForbidden) IsClientError() bool {
	return true
}

// IsServerError returns true when this repo delete forbidden response has a 5xx status code
func (o *RepoDeleteForbidden) IsServerError() bool {
	return false
}

// IsCode returns true when this repo delete forbidden response a status code equal to that given
func (o *RepoDeleteForbidden) IsCode(code int) bool {
	return code == 403
}

// Code gets the status code for the repo delete forbidden response
func (o *RepoDeleteForbidden) Code() int {
	return 403
}

func (o *RepoDeleteForbidden) Error() string {
	return fmt.Sprintf("[DELETE /repos/{owner}/{repo}][%d] repoDeleteForbidden", 403)
}

func (o *RepoDeleteForbidden) String() string {
	return fmt.Sprintf("[DELETE /repos/{owner}/{repo}][%d] repoDeleteForbidden", 403)
}

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

// NewRepoDeleteNotFound creates a RepoDeleteNotFound with default headers values
func NewRepoDeleteNotFound() *RepoDeleteNotFound {
	return &RepoDeleteNotFound{}
}

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

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

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

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

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

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

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

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

func (o *RepoDeleteNotFound) Error() string {
	return fmt.Sprintf("[DELETE /repos/{owner}/{repo}][%d] repoDeleteNotFound", 404)
}

func (o *RepoDeleteNotFound) String() string {
	return fmt.Sprintf("[DELETE /repos/{owner}/{repo}][%d] repoDeleteNotFound", 404)
}

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

	return nil
}
