func (o *AddPayloadRuntimeMapBadRequest) WithPayload(payload *models.Error) *AddPayloadRuntimeMapBadRequest {
	o.Payload = payload
	return o
}
WithPayload adds the payload to the add payload runtime map bad request 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
}