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

package admin

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

// AdminDeleteUnadoptedRepositoryReader is a Reader for the AdminDeleteUnadoptedRepository structure.
type AdminDeleteUnadoptedRepositoryReader struct {
	formats strfmt.Registry
}

// ReadResponse reads a server response into the received o.
func (o *AdminDeleteUnadoptedRepositoryReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) {
	switch response.Code() {
	case 204:
		result := NewAdminDeleteUnadoptedRepositoryNoContent()
		if err := result.readResponse(response, consumer, o.formats); err != nil {
			return nil, err
		}
		return result, nil
	case 403:
		result := NewAdminDeleteUnadoptedRepositoryForbidden()
		if err := result.readResponse(response, consumer, o.formats); err != nil {
			return nil, err
		}
		return nil, result
	default:
		return nil, runtime.NewAPIError("[DELETE /admin/unadopted/{owner}/{repo}] adminDeleteUnadoptedRepository", response, response.Code())
	}
}

// NewAdminDeleteUnadoptedRepositoryNoContent creates a AdminDeleteUnadoptedRepositoryNoContent with default headers values
func NewAdminDeleteUnadoptedRepositoryNoContent() *AdminDeleteUnadoptedRepositoryNoContent {
	return &AdminDeleteUnadoptedRepositoryNoContent{}
}

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

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

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

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

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

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

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

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

func (o *AdminDeleteUnadoptedRepositoryNoContent) Error() string {
	return fmt.Sprintf("[DELETE /admin/unadopted/{owner}/{repo}][%d] adminDeleteUnadoptedRepositoryNoContent", 204)
}

func (o *AdminDeleteUnadoptedRepositoryNoContent) String() string {
	return fmt.Sprintf("[DELETE /admin/unadopted/{owner}/{repo}][%d] adminDeleteUnadoptedRepositoryNoContent", 204)
}

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

	return nil
}

// NewAdminDeleteUnadoptedRepositoryForbidden creates a AdminDeleteUnadoptedRepositoryForbidden with default headers values
func NewAdminDeleteUnadoptedRepositoryForbidden() *AdminDeleteUnadoptedRepositoryForbidden {
	return &AdminDeleteUnadoptedRepositoryForbidden{}
}

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

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

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

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

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

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

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

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

func (o *AdminDeleteUnadoptedRepositoryForbidden) Error() string {
	return fmt.Sprintf("[DELETE /admin/unadopted/{owner}/{repo}][%d] adminDeleteUnadoptedRepositoryForbidden", 403)
}

func (o *AdminDeleteUnadoptedRepositoryForbidden) String() string {
	return fmt.Sprintf("[DELETE /admin/unadopted/{owner}/{repo}][%d] adminDeleteUnadoptedRepositoryForbidden", 403)
}

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