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

// CreateRoutingRuleReader is a Reader for the CreateRoutingRule structure.
type CreateRoutingRuleReader struct {
	formats strfmt.Registry
}

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

// NewCreateRoutingRuleNoContent creates a CreateRoutingRuleNoContent with default headers values
func NewCreateRoutingRuleNoContent() *CreateRoutingRuleNoContent {
	return &CreateRoutingRuleNoContent{}
}

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

Routing rule was successfully created
*/
type CreateRoutingRuleNoContent struct {
}

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

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

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

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

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

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

func (o *CreateRoutingRuleNoContent) Error() string {
	return fmt.Sprintf("[POST /v1/routing-rules][%d] createRoutingRuleNoContent ", 204)
}

func (o *CreateRoutingRuleNoContent) String() string {
	return fmt.Sprintf("[POST /v1/routing-rules][%d] createRoutingRuleNoContent ", 204)
}

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

	return nil
}

// NewCreateRoutingRuleBadRequest creates a CreateRoutingRuleBadRequest with default headers values
func NewCreateRoutingRuleBadRequest() *CreateRoutingRuleBadRequest {
	return &CreateRoutingRuleBadRequest{}
}

/*
CreateRoutingRuleBadRequest describes a response with status code 400, with default header values.

A routing rule with the same name already exists or required parameters missing
*/
type CreateRoutingRuleBadRequest struct {
}

// IsSuccess returns true when this create routing rule bad request response has a 2xx status code
func (o *CreateRoutingRuleBadRequest) IsSuccess() bool {
	return false
}

// IsRedirect returns true when this create routing rule bad request response has a 3xx status code
func (o *CreateRoutingRuleBadRequest) IsRedirect() bool {
	return false
}

// IsClientError returns true when this create routing rule bad request response has a 4xx status code
func (o *CreateRoutingRuleBadRequest) IsClientError() bool {
	return true
}

// IsServerError returns true when this create routing rule bad request response has a 5xx status code
func (o *CreateRoutingRuleBadRequest) IsServerError() bool {
	return false
}

// IsCode returns true when this create routing rule bad request response a status code equal to that given
func (o *CreateRoutingRuleBadRequest) IsCode(code int) bool {
	return code == 400
}

// Code gets the status code for the create routing rule bad request response
func (o *CreateRoutingRuleBadRequest) Code() int {
	return 400
}

func (o *CreateRoutingRuleBadRequest) Error() string {
	return fmt.Sprintf("[POST /v1/routing-rules][%d] createRoutingRuleBadRequest ", 400)
}

func (o *CreateRoutingRuleBadRequest) String() string {
	return fmt.Sprintf("[POST /v1/routing-rules][%d] createRoutingRuleBadRequest ", 400)
}

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

	return nil
}

// NewCreateRoutingRuleForbidden creates a CreateRoutingRuleForbidden with default headers values
func NewCreateRoutingRuleForbidden() *CreateRoutingRuleForbidden {
	return &CreateRoutingRuleForbidden{}
}

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

Insufficient permissions to create routing rule
*/
type CreateRoutingRuleForbidden struct {
}

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

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

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

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

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

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

func (o *CreateRoutingRuleForbidden) Error() string {
	return fmt.Sprintf("[POST /v1/routing-rules][%d] createRoutingRuleForbidden ", 403)
}

func (o *CreateRoutingRuleForbidden) String() string {
	return fmt.Sprintf("[POST /v1/routing-rules][%d] createRoutingRuleForbidden ", 403)
}

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

	return nil
}
