func (o *CreateSpoeMessageDefault) WriteResponse(rw http.ResponseWriter, producer runtime.Producer) {
	configurationVersion := o.ConfigurationVersion
	if configurationVersion != "" {
		rw.Header().Set("Configuration-Version", configurationVersion)
	}
	rw.WriteHeader(o._statusCode)
	if o.Payload != nil {
		payload := o.Payload
		if err := producer.Produce(rw, payload); err != nil {
			panic(err)  
		}
	}
}
WriteResponse to the client
package spoe
import (
	"net/http"
	"github.com/go-openapi/runtime"
	"github.com/haproxytech/client-native/v2/models"
)
const CreateSpoeMessageCreatedCode int = 201
type CreateSpoeMessageCreated struct {
	Payload *models.SpoeMessage `json:"body,omitempty"`
}
func NewCreateSpoeMessageCreated() *CreateSpoeMessageCreated {
	return &CreateSpoeMessageCreated{}
}
func (o *CreateSpoeMessageCreated) WithPayload(payload *models.SpoeMessage) *CreateSpoeMessageCreated {
	o.Payload = payload
	return o
}
func (o *CreateSpoeMessageCreated) SetPayload(payload *models.SpoeMessage) {
	o.Payload = payload
}
func (o *CreateSpoeMessageCreated) 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 CreateSpoeMessageBadRequestCode int = 400
type CreateSpoeMessageBadRequest struct {
	ConfigurationVersion string `json:"Configuration-Version"`
	Payload *models.Error `json:"body,omitempty"`
}
func NewCreateSpoeMessageBadRequest() *CreateSpoeMessageBadRequest {
	return &CreateSpoeMessageBadRequest{}
}
func (o *CreateSpoeMessageBadRequest) WithConfigurationVersion(configurationVersion string) *CreateSpoeMessageBadRequest {
	o.ConfigurationVersion = configurationVersion
	return o
}
func (o *CreateSpoeMessageBadRequest) SetConfigurationVersion(configurationVersion string) {
	o.ConfigurationVersion = configurationVersion
}
func (o *CreateSpoeMessageBadRequest) WithPayload(payload *models.Error) *CreateSpoeMessageBadRequest {
	o.Payload = payload
	return o
}
func (o *CreateSpoeMessageBadRequest) SetPayload(payload *models.Error) {
	o.Payload = payload
}
func (o *CreateSpoeMessageBadRequest) 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 CreateSpoeMessageConflictCode int = 409
type CreateSpoeMessageConflict struct {
	ConfigurationVersion string `json:"Configuration-Version"`
	Payload *models.Error `json:"body,omitempty"`
}
func NewCreateSpoeMessageConflict() *CreateSpoeMessageConflict {
	return &CreateSpoeMessageConflict{}
}
func (o *CreateSpoeMessageConflict) WithConfigurationVersion(configurationVersion string) *CreateSpoeMessageConflict {
	o.ConfigurationVersion = configurationVersion
	return o
}
func (o *CreateSpoeMessageConflict) SetConfigurationVersion(configurationVersion string) {
	o.ConfigurationVersion = configurationVersion
}
func (o *CreateSpoeMessageConflict) WithPayload(payload *models.Error) *CreateSpoeMessageConflict {
	o.Payload = payload
	return o
}
func (o *CreateSpoeMessageConflict) SetPayload(payload *models.Error) {
	o.Payload = payload
}
func (o *CreateSpoeMessageConflict) 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 CreateSpoeMessageDefault struct {
	_statusCode int
	ConfigurationVersion string `json:"Configuration-Version"`
	Payload *models.Error `json:"body,omitempty"`
}
func NewCreateSpoeMessageDefault(code int) *CreateSpoeMessageDefault {
	if code <= 0 {
		code = 500
	}
	return &CreateSpoeMessageDefault{
		_statusCode: code,
	}
}
func (o *CreateSpoeMessageDefault) WithStatusCode(code int) *CreateSpoeMessageDefault {
	o._statusCode = code
	return o
}
func (o *CreateSpoeMessageDefault) SetStatusCode(code int) {
	o._statusCode = code
}
func (o *CreateSpoeMessageDefault) WithConfigurationVersion(configurationVersion string) *CreateSpoeMessageDefault {
	o.ConfigurationVersion = configurationVersion
	return o
}
func (o *CreateSpoeMessageDefault) SetConfigurationVersion(configurationVersion string) {
	o.ConfigurationVersion = configurationVersion
}
func (o *CreateSpoeMessageDefault) WithPayload(payload *models.Error) *CreateSpoeMessageDefault {
	o.Payload = payload
	return o
}
func (o *CreateSpoeMessageDefault) SetPayload(payload *models.Error) {
	o.Payload = payload
}