func NewCreateScanForbidden() *CreateScanForbidden {
	return &CreateScanForbidden{}
}
NewCreateScanForbidden creates a CreateScanForbidden 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 CreateScanReader struct {
	formats strfmt.Registry
}
func (o *CreateScanReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) {
	switch response.Code() {
	case 201:
		result := NewCreateScanCreated()
		if err := result.readResponse(response, consumer, o.formats); err != nil {
			return nil, err
		}
		return result, nil
	case 400:
		result := NewCreateScanBadRequest()
		if err := result.readResponse(response, consumer, o.formats); err != nil {
			return nil, err
		}
		return nil, result
	case 401:
		result := NewCreateScanUnauthorized()
		if err := result.readResponse(response, consumer, o.formats); err != nil {
			return nil, err
		}
		return nil, result
	case 403:
		result := NewCreateScanForbidden()
		if err := result.readResponse(response, consumer, o.formats); err != nil {
			return nil, err
		}
		return nil, result
	case 500:
		result := NewCreateScanInternalServerError()
		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 NewCreateScanCreated() *CreateScanCreated {
	return &CreateScanCreated{}
}
type CreateScanCreated struct {
	Payload *models.Scan
}
func (o *CreateScanCreated) Error() string {
	return fmt.Sprintf("[POST /scans][%d] createScanCreated  %+v", 201, o.Payload)
}
func (o *CreateScanCreated) GetPayload() *models.Scan {
	return o.Payload
}
func (o *CreateScanCreated) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
	o.Payload = new(models.Scan)
	if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF {
		return err
	}
	return nil
}
func NewCreateScanBadRequest() *CreateScanBadRequest {
	return &CreateScanBadRequest{}
}
type CreateScanBadRequest struct {
	Payload *models.BadRequestError
}
func (o *CreateScanBadRequest) Error() string {
	return fmt.Sprintf("[POST /scans][%d] createScanBadRequest  %+v", 400, o.Payload)
}
func (o *CreateScanBadRequest) GetPayload() *models.BadRequestError {
	return o.Payload
}
func (o *CreateScanBadRequest) 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
}
func NewCreateScanUnauthorized() *CreateScanUnauthorized {
	return &CreateScanUnauthorized{}
}
type CreateScanUnauthorized struct {
	Payload *models.AuthenticationError
}
func (o *CreateScanUnauthorized) Error() string {
	return fmt.Sprintf("[POST /scans][%d] createScanUnauthorized  %+v", 401, o.Payload)
}
func (o *CreateScanUnauthorized) GetPayload() *models.AuthenticationError {
	return o.Payload
}
func (o *CreateScanUnauthorized) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
	o.Payload = new(models.AuthenticationError)
	if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF {
		return err
	}
	return nil
}