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

package organization

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

// OrgRemoveTeamRepositoryReader is a Reader for the OrgRemoveTeamRepository structure.
type OrgRemoveTeamRepositoryReader struct {
	formats strfmt.Registry
}

// ReadResponse reads a server response into the received o.
func (o *OrgRemoveTeamRepositoryReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) {
	switch response.Code() {
	case 204:
		result := NewOrgRemoveTeamRepositoryNoContent()
		if err := result.readResponse(response, consumer, o.formats); err != nil {
			return nil, err
		}
		return result, nil
	case 403:
		result := NewOrgRemoveTeamRepositoryForbidden()
		if err := result.readResponse(response, consumer, o.formats); err != nil {
			return nil, err
		}
		return nil, result
	case 404:
		result := NewOrgRemoveTeamRepositoryNotFound()
		if err := result.readResponse(response, consumer, o.formats); err != nil {
			return nil, err
		}
		return nil, result
	default:
		return nil, runtime.NewAPIError("[DELETE /teams/{id}/repos/{org}/{repo}] orgRemoveTeamRepository", response, response.Code())
	}
}

// NewOrgRemoveTeamRepositoryNoContent creates a OrgRemoveTeamRepositoryNoContent with default headers values
func NewOrgRemoveTeamRepositoryNoContent() *OrgRemoveTeamRepositoryNoContent {
	return &OrgRemoveTeamRepositoryNoContent{}
}

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

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

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

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

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

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

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

// Code gets the status code for the org remove team repository no content response
func (o *OrgRemoveTeamRepositoryNoContent) Code() int {
	return 204
}

func (o *OrgRemoveTeamRepositoryNoContent) Error() string {
	return fmt.Sprintf("[DELETE /teams/{id}/repos/{org}/{repo}][%d] orgRemoveTeamRepositoryNoContent", 204)
}

func (o *OrgRemoveTeamRepositoryNoContent) String() string {
	return fmt.Sprintf("[DELETE /teams/{id}/repos/{org}/{repo}][%d] orgRemoveTeamRepositoryNoContent", 204)
}

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

	return nil
}

// NewOrgRemoveTeamRepositoryForbidden creates a OrgRemoveTeamRepositoryForbidden with default headers values
func NewOrgRemoveTeamRepositoryForbidden() *OrgRemoveTeamRepositoryForbidden {
	return &OrgRemoveTeamRepositoryForbidden{}
}

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

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

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

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

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

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

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

// Code gets the status code for the org remove team repository forbidden response
func (o *OrgRemoveTeamRepositoryForbidden) Code() int {
	return 403
}

func (o *OrgRemoveTeamRepositoryForbidden) Error() string {
	return fmt.Sprintf("[DELETE /teams/{id}/repos/{org}/{repo}][%d] orgRemoveTeamRepositoryForbidden", 403)
}

func (o *OrgRemoveTeamRepositoryForbidden) String() string {
	return fmt.Sprintf("[DELETE /teams/{id}/repos/{org}/{repo}][%d] orgRemoveTeamRepositoryForbidden", 403)
}

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

// NewOrgRemoveTeamRepositoryNotFound creates a OrgRemoveTeamRepositoryNotFound with default headers values
func NewOrgRemoveTeamRepositoryNotFound() *OrgRemoveTeamRepositoryNotFound {
	return &OrgRemoveTeamRepositoryNotFound{}
}

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

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

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

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

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

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

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

// Code gets the status code for the org remove team repository not found response
func (o *OrgRemoveTeamRepositoryNotFound) Code() int {
	return 404
}

func (o *OrgRemoveTeamRepositoryNotFound) Error() string {
	return fmt.Sprintf("[DELETE /teams/{id}/repos/{org}/{repo}][%d] orgRemoveTeamRepositoryNotFound", 404)
}

func (o *OrgRemoveTeamRepositoryNotFound) String() string {
	return fmt.Sprintf("[DELETE /teams/{id}/repos/{org}/{repo}][%d] orgRemoveTeamRepositoryNotFound", 404)
}

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

	return nil
}
