func NewGetComplianceByRulesUnauthorized() *GetComplianceByRulesUnauthorized {
	return &GetComplianceByRulesUnauthorized{}
}
NewGetComplianceByRulesUnauthorized creates a GetComplianceByRulesUnauthorized with default headers values
package scans
import (
	"fmt"
	"io"
	"github.com/go-openapi/runtime"
	"github.com/go-openapi/strfmt"
	"github.com/fugue/fugue-client/models"
)
type GetComplianceByRulesReader struct {
	formats strfmt.Registry
}
func (o *GetComplianceByRulesReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) {
	switch response.Code() {
	case 200:
		result := NewGetComplianceByRulesOK()
		if err := result.readResponse(response, consumer, o.formats); err != nil {
			return nil, err
		}
		return result, nil
	case 400:
		result := NewGetComplianceByRulesBadRequest()
		if err := result.readResponse(response, consumer, o.formats); err != nil {
			return nil, err
		}
		return nil, result
	case 401:
		result := NewGetComplianceByRulesUnauthorized()
		if err := result.readResponse(response, consumer, o.formats); err != nil {
			return nil, err
		}
		return nil, result
	case 403:
		result := NewGetComplianceByRulesForbidden()
		if err := result.readResponse(response, consumer, o.formats); err != nil {
			return nil, err
		}
		return nil, result
	case 404:
		result := NewGetComplianceByRulesNotFound()
		if err := result.readResponse(response, consumer, o.formats); err != nil {
			return nil, err
		}
		return nil, result
	case 500:
		result := NewGetComplianceByRulesInternalServerError()
		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 NewGetComplianceByRulesOK() *GetComplianceByRulesOK {
	return &GetComplianceByRulesOK{}
}
type GetComplianceByRulesOK struct {
	Payload *models.ComplianceByRules
}
func (o *GetComplianceByRulesOK) Error() string {
	return fmt.Sprintf("[GET /scans/{scan_id}/compliance_by_rules][%d] getComplianceByRulesOK  %+v", 200, o.Payload)
}
func (o *GetComplianceByRulesOK) GetPayload() *models.ComplianceByRules {
	return o.Payload
}
func (o *GetComplianceByRulesOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
	o.Payload = new(models.ComplianceByRules)
	if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF {
		return err
	}
	return nil
}
func NewGetComplianceByRulesBadRequest() *GetComplianceByRulesBadRequest {
	return &GetComplianceByRulesBadRequest{}
}
type GetComplianceByRulesBadRequest struct {
	Payload *models.BadRequestError
}
func (o *GetComplianceByRulesBadRequest) Error() string {
	return fmt.Sprintf("[GET /scans/{scan_id}/compliance_by_rules][%d] getComplianceByRulesBadRequest  %+v", 400, o.Payload)
}
func (o *GetComplianceByRulesBadRequest) GetPayload() *models.BadRequestError {
	return o.Payload
}
func (o *GetComplianceByRulesBadRequest) 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
}