func (o *AddMapEntryConflict) SetPayload(payload *models.Error) {
	o.Payload = payload
}
SetPayload sets the payload to the add map entry conflict response
package maps
import (
	"net/http"
	"github.com/go-openapi/runtime"
	"github.com/haproxytech/client-native/v2/models"
)
const AddMapEntryCreatedCode int = 201
type AddMapEntryCreated struct {
	Payload *models.MapEntry `json:"body,omitempty"`
}
func NewAddMapEntryCreated() *AddMapEntryCreated {
	return &AddMapEntryCreated{}
}
func (o *AddMapEntryCreated) WithPayload(payload *models.MapEntry) *AddMapEntryCreated {
	o.Payload = payload
	return o
}
func (o *AddMapEntryCreated) SetPayload(payload *models.MapEntry) {
	o.Payload = payload
}
func (o *AddMapEntryCreated) 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 AddMapEntryBadRequestCode int = 400
type AddMapEntryBadRequest struct {
	ConfigurationVersion string `json:"Configuration-Version"`
	Payload *models.Error `json:"body,omitempty"`
}
func NewAddMapEntryBadRequest() *AddMapEntryBadRequest {
	return &AddMapEntryBadRequest{}
}
func (o *AddMapEntryBadRequest) WithConfigurationVersion(configurationVersion string) *AddMapEntryBadRequest {
	o.ConfigurationVersion = configurationVersion
	return o
}
func (o *AddMapEntryBadRequest) SetConfigurationVersion(configurationVersion string) {
	o.ConfigurationVersion = configurationVersion
}
func (o *AddMapEntryBadRequest) WithPayload(payload *models.Error) *AddMapEntryBadRequest {
	o.Payload = payload
	return o
}
func (o *AddMapEntryBadRequest) SetPayload(payload *models.Error) {
	o.Payload = payload
}
func (o *AddMapEntryBadRequest) 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 AddMapEntryConflictCode int = 409
type AddMapEntryConflict struct {
	ConfigurationVersion string `json:"Configuration-Version"`
	Payload *models.Error `json:"body,omitempty"`
}
func NewAddMapEntryConflict() *AddMapEntryConflict {
	return &AddMapEntryConflict{}
}
func (o *AddMapEntryConflict) WithConfigurationVersion(configurationVersion string) *AddMapEntryConflict {
	o.ConfigurationVersion = configurationVersion
	return o
}
func (o *AddMapEntryConflict) SetConfigurationVersion(configurationVersion string) {
	o.ConfigurationVersion = configurationVersion
}
func (o *AddMapEntryConflict) WithPayload(payload *models.Error) *AddMapEntryConflict {
	o.Payload = payload
	return o
}