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

// RepoDeleteBranchProtectionReader is a Reader for the RepoDeleteBranchProtection structure.
type RepoDeleteBranchProtectionReader struct {
	formats strfmt.Registry
}

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

// NewRepoDeleteBranchProtectionNoContent creates a RepoDeleteBranchProtectionNoContent with default headers values
func NewRepoDeleteBranchProtectionNoContent() *RepoDeleteBranchProtectionNoContent {
	return &RepoDeleteBranchProtectionNoContent{}
}

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

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

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

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

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

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

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

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

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

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

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

	return nil
}

// NewRepoDeleteBranchProtectionNotFound creates a RepoDeleteBranchProtectionNotFound with default headers values
func NewRepoDeleteBranchProtectionNotFound() *RepoDeleteBranchProtectionNotFound {
	return &RepoDeleteBranchProtectionNotFound{}
}

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

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

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

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

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

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

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

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

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

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

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

	return nil
}
