func NewListCustomRulesUnauthorized() *ListCustomRulesUnauthorized {
	return &ListCustomRulesUnauthorized{}
}
NewListCustomRulesUnauthorized creates a ListCustomRulesUnauthorized with default headers values
package custom_rules
import (
	"fmt"
	"io"
	"github.com/go-openapi/runtime"
	"github.com/go-openapi/strfmt"
	"github.com/fugue/fugue-client/models"
)
type ListCustomRulesReader struct {
	formats strfmt.Registry
}
func (o *ListCustomRulesReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) {
	switch response.Code() {
	case 200:
		result := NewListCustomRulesOK()
		if err := result.readResponse(response, consumer, o.formats); err != nil {
			return nil, err
		}
		return result, nil
	case 400:
		result := NewListCustomRulesBadRequest()
		if err := result.readResponse(response, consumer, o.formats); err != nil {
			return nil, err
		}
		return nil, result
	case 401:
		result := NewListCustomRulesUnauthorized()
		if err := result.readResponse(response, consumer, o.formats); err != nil {
			return nil, err
		}
		return nil, result
	case 403:
		result := NewListCustomRulesForbidden()
		if err := result.readResponse(response, consumer, o.formats); err != nil {
			return nil, err
		}
		return nil, result
	case 500:
		result := NewListCustomRulesInternalServerError()
		if err := result.readResponse(response, consumer, o.formats); err != nil {
			return nil, err
		}
		return nil, result
	default:
		return nil, runtime.NewAPIError("unknown error", response, response.Code())
	}
}
func NewListCustomRulesOK() *ListCustomRulesOK {
	return &ListCustomRulesOK{}
}
type ListCustomRulesOK struct {
	Payload *models.CustomRules
}
func (o *ListCustomRulesOK) Error() string {
	return fmt.Sprintf("[GET /rules][%d] listCustomRulesOK  %+v", 200, o.Payload)
}
func (o *ListCustomRulesOK) GetPayload() *models.CustomRules {
	return o.Payload
}
func (o *ListCustomRulesOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
	o.Payload = new(models.CustomRules)
	if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF {
		return err
	}
	return nil
}
func NewListCustomRulesBadRequest() *ListCustomRulesBadRequest {
	return &ListCustomRulesBadRequest{}
}
type ListCustomRulesBadRequest struct {
	Payload *models.BadRequestError
}
func (o *ListCustomRulesBadRequest) Error() string {
	return fmt.Sprintf("[GET /rules][%d] listCustomRulesBadRequest  %+v", 400, o.Payload)
}
func (o *ListCustomRulesBadRequest) GetPayload() *models.BadRequestError {
	return o.Payload
}
func (o *ListCustomRulesBadRequest) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
	o.Payload = new(models.BadRequestError)
	if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF {
		return err
	}
	return nil
}