func (o *ReplaceSpoeAgentDefault) WithConfigurationVersion(configurationVersion string) *ReplaceSpoeAgentDefault {
	o.ConfigurationVersion = configurationVersion
	return o
}
WithConfigurationVersion adds the configurationVersion to the replace spoe agent default response
package spoe
import (
	"net/http"
	"github.com/go-openapi/runtime"
	"github.com/haproxytech/client-native/v2/models"
)
const ReplaceSpoeAgentOKCode int = 200
type ReplaceSpoeAgentOK struct {
	Payload *models.SpoeAgent `json:"body,omitempty"`
}
func NewReplaceSpoeAgentOK() *ReplaceSpoeAgentOK {
	return &ReplaceSpoeAgentOK{}
}
func (o *ReplaceSpoeAgentOK) WithPayload(payload *models.SpoeAgent) *ReplaceSpoeAgentOK {
	o.Payload = payload
	return o
}
func (o *ReplaceSpoeAgentOK) SetPayload(payload *models.SpoeAgent) {
	o.Payload = payload
}
func (o *ReplaceSpoeAgentOK) WriteResponse(rw http.ResponseWriter, producer runtime.Producer) {
	rw.WriteHeader(200)
	if o.Payload != nil {
		payload := o.Payload
		if err := producer.Produce(rw, payload); err != nil {
			panic(err)  
		}
	}
}
const ReplaceSpoeAgentBadRequestCode int = 400
type ReplaceSpoeAgentBadRequest struct {
	ConfigurationVersion string `json:"Configuration-Version"`
	Payload *models.Error `json:"body,omitempty"`
}
func NewReplaceSpoeAgentBadRequest() *ReplaceSpoeAgentBadRequest {
	return &ReplaceSpoeAgentBadRequest{}
}
func (o *ReplaceSpoeAgentBadRequest) WithConfigurationVersion(configurationVersion string) *ReplaceSpoeAgentBadRequest {
	o.ConfigurationVersion = configurationVersion
	return o
}
func (o *ReplaceSpoeAgentBadRequest) SetConfigurationVersion(configurationVersion string) {
	o.ConfigurationVersion = configurationVersion
}
func (o *ReplaceSpoeAgentBadRequest) WithPayload(payload *models.Error) *ReplaceSpoeAgentBadRequest {
	o.Payload = payload
	return o
}
func (o *ReplaceSpoeAgentBadRequest) SetPayload(payload *models.Error) {
	o.Payload = payload
}
func (o *ReplaceSpoeAgentBadRequest) 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 ReplaceSpoeAgentNotFoundCode int = 404
type ReplaceSpoeAgentNotFound struct {
	ConfigurationVersion string `json:"Configuration-Version"`
	Payload *models.Error `json:"body,omitempty"`
}
func NewReplaceSpoeAgentNotFound() *ReplaceSpoeAgentNotFound {
	return &ReplaceSpoeAgentNotFound{}
}
func (o *ReplaceSpoeAgentNotFound) WithConfigurationVersion(configurationVersion string) *ReplaceSpoeAgentNotFound {
	o.ConfigurationVersion = configurationVersion
	return o
}
func (o *ReplaceSpoeAgentNotFound) SetConfigurationVersion(configurationVersion string) {
	o.ConfigurationVersion = configurationVersion
}
func (o *ReplaceSpoeAgentNotFound) WithPayload(payload *models.Error) *ReplaceSpoeAgentNotFound {
	o.Payload = payload
	return o
}
func (o *ReplaceSpoeAgentNotFound) SetPayload(payload *models.Error) {
	o.Payload = payload
}
func (o *ReplaceSpoeAgentNotFound) WriteResponse(rw http.ResponseWriter, producer runtime.Producer) {
	configurationVersion := o.ConfigurationVersion
	if configurationVersion != "" {
		rw.Header().Set("Configuration-Version", configurationVersion)
	}
	rw.WriteHeader(404)
	if o.Payload != nil {
		payload := o.Payload
		if err := producer.Produce(rw, payload); err != nil {
			panic(err)  
		}
	}
}
type ReplaceSpoeAgentDefault struct {
	_statusCode int
	ConfigurationVersion string `json:"Configuration-Version"`
	Payload *models.Error `json:"body,omitempty"`
}
func NewReplaceSpoeAgentDefault(code int) *ReplaceSpoeAgentDefault {
	if code <= 0 {
		code = 500
	}
	return &ReplaceSpoeAgentDefault{
		_statusCode: code,
	}
}
func (o *ReplaceSpoeAgentDefault) WithStatusCode(code int) *ReplaceSpoeAgentDefault {
	o._statusCode = code
	return o
}
func (o *ReplaceSpoeAgentDefault) SetStatusCode(code int) {
	o._statusCode = code
}