func (o *CreateStorageMapFileDefault) SetPayload(payload *models.Error) {
	o.Payload = payload
}
SetPayload sets the payload to the create storage map file default response
package storage
import (
	"net/http"
	"github.com/go-openapi/runtime"
	"github.com/haproxytech/client-native/v2/models"
)
const CreateStorageMapFileCreatedCode int = 201
type CreateStorageMapFileCreated struct {
	Payload *models.Map `json:"body,omitempty"`
}
func NewCreateStorageMapFileCreated() *CreateStorageMapFileCreated {
	return &CreateStorageMapFileCreated{}
}
func (o *CreateStorageMapFileCreated) WithPayload(payload *models.Map) *CreateStorageMapFileCreated {
	o.Payload = payload
	return o
}
func (o *CreateStorageMapFileCreated) SetPayload(payload *models.Map) {
	o.Payload = payload
}
func (o *CreateStorageMapFileCreated) WriteResponse(rw http.ResponseWriter, producer runtime.Producer) {
	rw.WriteHeader(201)
	if o.Payload != nil {
		payload := o.Payload
		if err := producer.Produce(rw, payload); err != nil {
			panic(err)  
		}
	}
}
const CreateStorageMapFileBadRequestCode int = 400
type CreateStorageMapFileBadRequest struct {
	ConfigurationVersion string `json:"Configuration-Version"`
	Payload *models.Error `json:"body,omitempty"`
}
func NewCreateStorageMapFileBadRequest() *CreateStorageMapFileBadRequest {
	return &CreateStorageMapFileBadRequest{}
}
func (o *CreateStorageMapFileBadRequest) WithConfigurationVersion(configurationVersion string) *CreateStorageMapFileBadRequest {
	o.ConfigurationVersion = configurationVersion
	return o
}
func (o *CreateStorageMapFileBadRequest) SetConfigurationVersion(configurationVersion string) {
	o.ConfigurationVersion = configurationVersion
}
func (o *CreateStorageMapFileBadRequest) WithPayload(payload *models.Error) *CreateStorageMapFileBadRequest {
	o.Payload = payload
	return o
}
func (o *CreateStorageMapFileBadRequest) SetPayload(payload *models.Error) {
	o.Payload = payload
}
func (o *CreateStorageMapFileBadRequest) WriteResponse(rw http.ResponseWriter, producer runtime.Producer) {
	configurationVersion := o.ConfigurationVersion
	if configurationVersion != "" {
		rw.Header().Set("Configuration-Version", configurationVersion)
	}
	rw.WriteHeader(400)
	if o.Payload != nil {
		payload := o.Payload
		if err := producer.Produce(rw, payload); err != nil {
			panic(err)  
		}
	}
}
const CreateStorageMapFileConflictCode int = 409
type CreateStorageMapFileConflict struct {
	ConfigurationVersion string `json:"Configuration-Version"`
	Payload *models.Error `json:"body,omitempty"`
}
func NewCreateStorageMapFileConflict() *CreateStorageMapFileConflict {
	return &CreateStorageMapFileConflict{}
}
func (o *CreateStorageMapFileConflict) WithConfigurationVersion(configurationVersion string) *CreateStorageMapFileConflict {
	o.ConfigurationVersion = configurationVersion
	return o
}
func (o *CreateStorageMapFileConflict) SetConfigurationVersion(configurationVersion string) {
	o.ConfigurationVersion = configurationVersion
}
func (o *CreateStorageMapFileConflict) WithPayload(payload *models.Error) *CreateStorageMapFileConflict {
	o.Payload = payload
	return o
}
func (o *CreateStorageMapFileConflict) SetPayload(payload *models.Error) {
	o.Payload = payload
}
func (o *CreateStorageMapFileConflict) WriteResponse(rw http.ResponseWriter, producer runtime.Producer) {
	configurationVersion := o.ConfigurationVersion
	if configurationVersion != "" {
		rw.Header().Set("Configuration-Version", configurationVersion)
	}
	rw.WriteHeader(409)
	if o.Payload != nil {
		payload := o.Payload
		if err := producer.Produce(rw, payload); err != nil {
			panic(err)  
		}
	}
}
type CreateStorageMapFileDefault struct {
	_statusCode int
	ConfigurationVersion string `json:"Configuration-Version"`
	Payload *models.Error `json:"body,omitempty"`
}
func NewCreateStorageMapFileDefault(code int) *CreateStorageMapFileDefault {
	if code <= 0 {
		code = 500
	}
	return &CreateStorageMapFileDefault{
		_statusCode: code,
	}
}
func (o *CreateStorageMapFileDefault) WithStatusCode(code int) *CreateStorageMapFileDefault {
	o._statusCode = code
	return o
}
func (o *CreateStorageMapFileDefault) SetStatusCode(code int) {
	o._statusCode = code
}
func (o *CreateStorageMapFileDefault) WithConfigurationVersion(configurationVersion string) *CreateStorageMapFileDefault {
	o.ConfigurationVersion = configurationVersion
	return o
}
func (o *CreateStorageMapFileDefault) SetConfigurationVersion(configurationVersion string) {
	o.ConfigurationVersion = configurationVersion
}
func (o *CreateStorageMapFileDefault) WithPayload(payload *models.Error) *CreateStorageMapFileDefault {
	o.Payload = payload
	return o
}