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

package repository_management

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

// DeleteRepositoryReader is a Reader for the DeleteRepository structure.
type DeleteRepositoryReader struct {
	formats strfmt.Registry
}

// ReadResponse reads a server response into the received o.
func (o *DeleteRepositoryReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) {
	switch response.Code() {
	case 204:
		result := NewDeleteRepositoryNoContent()
		if err := result.readResponse(response, consumer, o.formats); err != nil {
			return nil, err
		}
		return result, nil
	case 401:
		result := NewDeleteRepositoryUnauthorized()
		if err := result.readResponse(response, consumer, o.formats); err != nil {
			return nil, err
		}
		return nil, result
	case 403:
		result := NewDeleteRepositoryForbidden()
		if err := result.readResponse(response, consumer, o.formats); err != nil {
			return nil, err
		}
		return nil, result
	case 404:
		result := NewDeleteRepositoryNotFound()
		if err := result.readResponse(response, consumer, o.formats); err != nil {
			return nil, err
		}
		return nil, result
	default:
		return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code())
	}
}

// NewDeleteRepositoryNoContent creates a DeleteRepositoryNoContent with default headers values
func NewDeleteRepositoryNoContent() *DeleteRepositoryNoContent {
	return &DeleteRepositoryNoContent{}
}

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

Repository deleted
*/
type DeleteRepositoryNoContent struct {
}

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

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

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

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

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

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

func (o *DeleteRepositoryNoContent) Error() string {
	return fmt.Sprintf("[DELETE /v1/repositories/{repositoryName}][%d] deleteRepositoryNoContent ", 204)
}

func (o *DeleteRepositoryNoContent) String() string {
	return fmt.Sprintf("[DELETE /v1/repositories/{repositoryName}][%d] deleteRepositoryNoContent ", 204)
}

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

	return nil
}

// NewDeleteRepositoryUnauthorized creates a DeleteRepositoryUnauthorized with default headers values
func NewDeleteRepositoryUnauthorized() *DeleteRepositoryUnauthorized {
	return &DeleteRepositoryUnauthorized{}
}

/*
DeleteRepositoryUnauthorized describes a response with status code 401, with default header values.

Authentication required
*/
type DeleteRepositoryUnauthorized struct {
}

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

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

// IsClientError returns true when this delete repository unauthorized response has a 4xx status code
func (o *DeleteRepositoryUnauthorized) IsClientError() bool {
	return true
}

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

// IsCode returns true when this delete repository unauthorized response a status code equal to that given
func (o *DeleteRepositoryUnauthorized) IsCode(code int) bool {
	return code == 401
}

// Code gets the status code for the delete repository unauthorized response
func (o *DeleteRepositoryUnauthorized) Code() int {
	return 401
}

func (o *DeleteRepositoryUnauthorized) Error() string {
	return fmt.Sprintf("[DELETE /v1/repositories/{repositoryName}][%d] deleteRepositoryUnauthorized ", 401)
}

func (o *DeleteRepositoryUnauthorized) String() string {
	return fmt.Sprintf("[DELETE /v1/repositories/{repositoryName}][%d] deleteRepositoryUnauthorized ", 401)
}

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

	return nil
}

// NewDeleteRepositoryForbidden creates a DeleteRepositoryForbidden with default headers values
func NewDeleteRepositoryForbidden() *DeleteRepositoryForbidden {
	return &DeleteRepositoryForbidden{}
}

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

Insufficient permissions
*/
type DeleteRepositoryForbidden struct {
}

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

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

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

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

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

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

func (o *DeleteRepositoryForbidden) Error() string {
	return fmt.Sprintf("[DELETE /v1/repositories/{repositoryName}][%d] deleteRepositoryForbidden ", 403)
}

func (o *DeleteRepositoryForbidden) String() string {
	return fmt.Sprintf("[DELETE /v1/repositories/{repositoryName}][%d] deleteRepositoryForbidden ", 403)
}

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

	return nil
}

// NewDeleteRepositoryNotFound creates a DeleteRepositoryNotFound with default headers values
func NewDeleteRepositoryNotFound() *DeleteRepositoryNotFound {
	return &DeleteRepositoryNotFound{}
}

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

Repository not found
*/
type DeleteRepositoryNotFound struct {
}

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

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

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

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

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

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

func (o *DeleteRepositoryNotFound) Error() string {
	return fmt.Sprintf("[DELETE /v1/repositories/{repositoryName}][%d] deleteRepositoryNotFound ", 404)
}

func (o *DeleteRepositoryNotFound) String() string {
	return fmt.Sprintf("[DELETE /v1/repositories/{repositoryName}][%d] deleteRepositoryNotFound ", 404)
}

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

	return nil
}
