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

// RepoDeletePullReviewRequestsReader is a Reader for the RepoDeletePullReviewRequests structure.
type RepoDeletePullReviewRequestsReader struct {
	formats strfmt.Registry
}

// ReadResponse reads a server response into the received o.
func (o *RepoDeletePullReviewRequestsReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) {
	switch response.Code() {
	case 204:
		result := NewRepoDeletePullReviewRequestsNoContent()
		if err := result.readResponse(response, consumer, o.formats); err != nil {
			return nil, err
		}
		return result, nil
	case 403:
		result := NewRepoDeletePullReviewRequestsForbidden()
		if err := result.readResponse(response, consumer, o.formats); err != nil {
			return nil, err
		}
		return nil, result
	case 404:
		result := NewRepoDeletePullReviewRequestsNotFound()
		if err := result.readResponse(response, consumer, o.formats); err != nil {
			return nil, err
		}
		return nil, result
	case 422:
		result := NewRepoDeletePullReviewRequestsUnprocessableEntity()
		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}/pulls/{index}/requested_reviewers] repoDeletePullReviewRequests", response, response.Code())
	}
}

// NewRepoDeletePullReviewRequestsNoContent creates a RepoDeletePullReviewRequestsNoContent with default headers values
func NewRepoDeletePullReviewRequestsNoContent() *RepoDeletePullReviewRequestsNoContent {
	return &RepoDeletePullReviewRequestsNoContent{}
}

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

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

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

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

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

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

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

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

func (o *RepoDeletePullReviewRequestsNoContent) Error() string {
	return fmt.Sprintf("[DELETE /repos/{owner}/{repo}/pulls/{index}/requested_reviewers][%d] repoDeletePullReviewRequestsNoContent", 204)
}

func (o *RepoDeletePullReviewRequestsNoContent) String() string {
	return fmt.Sprintf("[DELETE /repos/{owner}/{repo}/pulls/{index}/requested_reviewers][%d] repoDeletePullReviewRequestsNoContent", 204)
}

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

	return nil
}

// NewRepoDeletePullReviewRequestsForbidden creates a RepoDeletePullReviewRequestsForbidden with default headers values
func NewRepoDeletePullReviewRequestsForbidden() *RepoDeletePullReviewRequestsForbidden {
	return &RepoDeletePullReviewRequestsForbidden{}
}

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

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

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

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

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

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

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

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

func (o *RepoDeletePullReviewRequestsForbidden) Error() string {
	return fmt.Sprintf("[DELETE /repos/{owner}/{repo}/pulls/{index}/requested_reviewers][%d] repoDeletePullReviewRequestsForbidden", 403)
}

func (o *RepoDeletePullReviewRequestsForbidden) String() string {
	return fmt.Sprintf("[DELETE /repos/{owner}/{repo}/pulls/{index}/requested_reviewers][%d] repoDeletePullReviewRequestsForbidden", 403)
}

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

// NewRepoDeletePullReviewRequestsNotFound creates a RepoDeletePullReviewRequestsNotFound with default headers values
func NewRepoDeletePullReviewRequestsNotFound() *RepoDeletePullReviewRequestsNotFound {
	return &RepoDeletePullReviewRequestsNotFound{}
}

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

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

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

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

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

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

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

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

func (o *RepoDeletePullReviewRequestsNotFound) Error() string {
	return fmt.Sprintf("[DELETE /repos/{owner}/{repo}/pulls/{index}/requested_reviewers][%d] repoDeletePullReviewRequestsNotFound", 404)
}

func (o *RepoDeletePullReviewRequestsNotFound) String() string {
	return fmt.Sprintf("[DELETE /repos/{owner}/{repo}/pulls/{index}/requested_reviewers][%d] repoDeletePullReviewRequestsNotFound", 404)
}

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

	return nil
}

// NewRepoDeletePullReviewRequestsUnprocessableEntity creates a RepoDeletePullReviewRequestsUnprocessableEntity with default headers values
func NewRepoDeletePullReviewRequestsUnprocessableEntity() *RepoDeletePullReviewRequestsUnprocessableEntity {
	return &RepoDeletePullReviewRequestsUnprocessableEntity{}
}

/*
RepoDeletePullReviewRequestsUnprocessableEntity describes a response with status code 422, with default header values.

APIValidationError is error format response related to input validation
*/
type RepoDeletePullReviewRequestsUnprocessableEntity struct {
	Message string
	URL     string
}

// IsSuccess returns true when this repo delete pull review requests unprocessable entity response has a 2xx status code
func (o *RepoDeletePullReviewRequestsUnprocessableEntity) IsSuccess() bool {
	return false
}

// IsRedirect returns true when this repo delete pull review requests unprocessable entity response has a 3xx status code
func (o *RepoDeletePullReviewRequestsUnprocessableEntity) IsRedirect() bool {
	return false
}

// IsClientError returns true when this repo delete pull review requests unprocessable entity response has a 4xx status code
func (o *RepoDeletePullReviewRequestsUnprocessableEntity) IsClientError() bool {
	return true
}

// IsServerError returns true when this repo delete pull review requests unprocessable entity response has a 5xx status code
func (o *RepoDeletePullReviewRequestsUnprocessableEntity) IsServerError() bool {
	return false
}

// IsCode returns true when this repo delete pull review requests unprocessable entity response a status code equal to that given
func (o *RepoDeletePullReviewRequestsUnprocessableEntity) IsCode(code int) bool {
	return code == 422
}

// Code gets the status code for the repo delete pull review requests unprocessable entity response
func (o *RepoDeletePullReviewRequestsUnprocessableEntity) Code() int {
	return 422
}

func (o *RepoDeletePullReviewRequestsUnprocessableEntity) Error() string {
	return fmt.Sprintf("[DELETE /repos/{owner}/{repo}/pulls/{index}/requested_reviewers][%d] repoDeletePullReviewRequestsUnprocessableEntity", 422)
}

func (o *RepoDeletePullReviewRequestsUnprocessableEntity) String() string {
	return fmt.Sprintf("[DELETE /repos/{owner}/{repo}/pulls/{index}/requested_reviewers][%d] repoDeletePullReviewRequestsUnprocessableEntity", 422)
}

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