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

package routing_rules

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

// DeleteRoutingRuleReader is a Reader for the DeleteRoutingRule structure.
type DeleteRoutingRuleReader struct {
	formats strfmt.Registry
}

// ReadResponse reads a server response into the received o.
func (o *DeleteRoutingRuleReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) {
	switch response.Code() {
	case 204:
		result := NewDeleteRoutingRuleNoContent()
		if err := result.readResponse(response, consumer, o.formats); err != nil {
			return nil, err
		}
		return result, nil
	case 403:
		result := NewDeleteRoutingRuleForbidden()
		if err := result.readResponse(response, consumer, o.formats); err != nil {
			return nil, err
		}
		return nil, result
	case 404:
		result := NewDeleteRoutingRuleNotFound()
		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())
	}
}

// NewDeleteRoutingRuleNoContent creates a DeleteRoutingRuleNoContent with default headers values
func NewDeleteRoutingRuleNoContent() *DeleteRoutingRuleNoContent {
	return &DeleteRoutingRuleNoContent{}
}

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

Routing rule was successfully deleted
*/
type DeleteRoutingRuleNoContent struct {
}

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

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

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

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

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

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

func (o *DeleteRoutingRuleNoContent) Error() string {
	return fmt.Sprintf("[DELETE /v1/routing-rules/{name}][%d] deleteRoutingRuleNoContent ", 204)
}

func (o *DeleteRoutingRuleNoContent) String() string {
	return fmt.Sprintf("[DELETE /v1/routing-rules/{name}][%d] deleteRoutingRuleNoContent ", 204)
}

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

	return nil
}

// NewDeleteRoutingRuleForbidden creates a DeleteRoutingRuleForbidden with default headers values
func NewDeleteRoutingRuleForbidden() *DeleteRoutingRuleForbidden {
	return &DeleteRoutingRuleForbidden{}
}

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

Insufficient permissions to delete routing rules
*/
type DeleteRoutingRuleForbidden struct {
}

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

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

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

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

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

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

func (o *DeleteRoutingRuleForbidden) Error() string {
	return fmt.Sprintf("[DELETE /v1/routing-rules/{name}][%d] deleteRoutingRuleForbidden ", 403)
}

func (o *DeleteRoutingRuleForbidden) String() string {
	return fmt.Sprintf("[DELETE /v1/routing-rules/{name}][%d] deleteRoutingRuleForbidden ", 403)
}

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

	return nil
}

// NewDeleteRoutingRuleNotFound creates a DeleteRoutingRuleNotFound with default headers values
func NewDeleteRoutingRuleNotFound() *DeleteRoutingRuleNotFound {
	return &DeleteRoutingRuleNotFound{}
}

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

Routing rule not found
*/
type DeleteRoutingRuleNotFound struct {
}

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

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

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

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

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

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

func (o *DeleteRoutingRuleNotFound) Error() string {
	return fmt.Sprintf("[DELETE /v1/routing-rules/{name}][%d] deleteRoutingRuleNotFound ", 404)
}

func (o *DeleteRoutingRuleNotFound) String() string {
	return fmt.Sprintf("[DELETE /v1/routing-rules/{name}][%d] deleteRoutingRuleNotFound ", 404)
}

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

	return nil
}
