func (o *AddPayloadRuntimeMapDefault) WithPayload(payload *models.Error) *AddPayloadRuntimeMapDefault {
	o.Payload = payload
	return o
}
WithPayload adds the payload to the add payload runtime map default response
package maps
import (
	"net/http"
	"github.com/go-openapi/runtime"
	"github.com/haproxytech/client-native/v2/models"
)
const AddPayloadRuntimeMapCreatedCode int = 201
type AddPayloadRuntimeMapCreated struct {
	Payload models.MapEntries `json:"body,omitempty"`
}
func NewAddPayloadRuntimeMapCreated() *AddPayloadRuntimeMapCreated {
	return &AddPayloadRuntimeMapCreated{}
}
func (o *AddPayloadRuntimeMapCreated) WithPayload(payload models.MapEntries) *AddPayloadRuntimeMapCreated {
	o.Payload = payload
	return o
}
func (o *AddPayloadRuntimeMapCreated) SetPayload(payload models.MapEntries) {
	o.Payload = payload
}
func (o *AddPayloadRuntimeMapCreated) WriteResponse(rw http.ResponseWriter, producer runtime.Producer) {
	rw.WriteHeader(201)
	payload := o.Payload
	if payload == nil {
		payload = models.MapEntries{}
	}
	if err := producer.Produce(rw, payload); err != nil {
		panic(err)  
	}
}
const AddPayloadRuntimeMapBadRequestCode int = 400
type AddPayloadRuntimeMapBadRequest struct {
	ConfigurationVersion string `json:"Configuration-Version"`
	Payload *models.Error `json:"body,omitempty"`
}
func NewAddPayloadRuntimeMapBadRequest() *AddPayloadRuntimeMapBadRequest {
	return &AddPayloadRuntimeMapBadRequest{}
}
func (o *AddPayloadRuntimeMapBadRequest) WithConfigurationVersion(configurationVersion string) *AddPayloadRuntimeMapBadRequest {
	o.ConfigurationVersion = configurationVersion
	return o
}
func (o *AddPayloadRuntimeMapBadRequest) SetConfigurationVersion(configurationVersion string) {
	o.ConfigurationVersion = configurationVersion
}
func (o *AddPayloadRuntimeMapBadRequest) WithPayload(payload *models.Error) *AddPayloadRuntimeMapBadRequest {
	o.Payload = payload
	return o
}
func (o *AddPayloadRuntimeMapBadRequest) SetPayload(payload *models.Error) {
	o.Payload = payload
}
func (o *AddPayloadRuntimeMapBadRequest) 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)  
		}
	}
}
type AddPayloadRuntimeMapDefault struct {
	_statusCode int
	ConfigurationVersion string `json:"Configuration-Version"`
	Payload *models.Error `json:"body,omitempty"`
}
func NewAddPayloadRuntimeMapDefault(code int) *AddPayloadRuntimeMapDefault {
	if code <= 0 {
		code = 500
	}
	return &AddPayloadRuntimeMapDefault{
		_statusCode: code,
	}
}
func (o *AddPayloadRuntimeMapDefault) WithStatusCode(code int) *AddPayloadRuntimeMapDefault {
	o._statusCode = code
	return o
}
func (o *AddPayloadRuntimeMapDefault) SetStatusCode(code int) {
	o._statusCode = code
}
func (o *AddPayloadRuntimeMapDefault) WithConfigurationVersion(configurationVersion string) *AddPayloadRuntimeMapDefault {
	o.ConfigurationVersion = configurationVersion
	return o
}
func (o *AddPayloadRuntimeMapDefault) SetConfigurationVersion(configurationVersion string) {
	o.ConfigurationVersion = configurationVersion
}