func (o *ReplaceBackendNotFound) SetPayload(payload *models.Error) {
	o.Payload = payload
}
SetPayload sets the payload to the replace backend not found response
package backend
import (
	"net/http"
	"github.com/go-openapi/runtime"
	"github.com/haproxytech/client-native/v2/models"
)
const ReplaceBackendOKCode int = 200
type ReplaceBackendOK struct {
	Payload *models.Backend `json:"body,omitempty"`
}
func NewReplaceBackendOK() *ReplaceBackendOK {
	return &ReplaceBackendOK{}
}
func (o *ReplaceBackendOK) WithPayload(payload *models.Backend) *ReplaceBackendOK {
	o.Payload = payload
	return o
}
func (o *ReplaceBackendOK) SetPayload(payload *models.Backend) {
	o.Payload = payload
}
func (o *ReplaceBackendOK) 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 ReplaceBackendAcceptedCode int = 202
type ReplaceBackendAccepted struct {
	ReloadID string `json:"Reload-ID"`
	Payload *models.Backend `json:"body,omitempty"`
}
func NewReplaceBackendAccepted() *ReplaceBackendAccepted {
	return &ReplaceBackendAccepted{}
}
func (o *ReplaceBackendAccepted) WithReloadID(reloadID string) *ReplaceBackendAccepted {
	o.ReloadID = reloadID
	return o
}
func (o *ReplaceBackendAccepted) SetReloadID(reloadID string) {
	o.ReloadID = reloadID
}
func (o *ReplaceBackendAccepted) WithPayload(payload *models.Backend) *ReplaceBackendAccepted {
	o.Payload = payload
	return o
}
func (o *ReplaceBackendAccepted) SetPayload(payload *models.Backend) {
	o.Payload = payload
}
func (o *ReplaceBackendAccepted) WriteResponse(rw http.ResponseWriter, producer runtime.Producer) {
	reloadID := o.ReloadID
	if reloadID != "" {
		rw.Header().Set("Reload-ID", reloadID)
	}
	rw.WriteHeader(202)
	if o.Payload != nil {
		payload := o.Payload
		if err := producer.Produce(rw, payload); err != nil {
			panic(err)  
		}
	}
}
const ReplaceBackendBadRequestCode int = 400
type ReplaceBackendBadRequest struct {
	ConfigurationVersion string `json:"Configuration-Version"`
	Payload *models.Error `json:"body,omitempty"`
}
func NewReplaceBackendBadRequest() *ReplaceBackendBadRequest {
	return &ReplaceBackendBadRequest{}
}
func (o *ReplaceBackendBadRequest) WithConfigurationVersion(configurationVersion string) *ReplaceBackendBadRequest {
	o.ConfigurationVersion = configurationVersion
	return o
}
func (o *ReplaceBackendBadRequest) SetConfigurationVersion(configurationVersion string) {
	o.ConfigurationVersion = configurationVersion
}
func (o *ReplaceBackendBadRequest) WithPayload(payload *models.Error) *ReplaceBackendBadRequest {
	o.Payload = payload
	return o
}
func (o *ReplaceBackendBadRequest) SetPayload(payload *models.Error) {
	o.Payload = payload
}
func (o *ReplaceBackendBadRequest) 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 ReplaceBackendNotFoundCode int = 404
type ReplaceBackendNotFound struct {
	ConfigurationVersion string `json:"Configuration-Version"`
	Payload *models.Error `json:"body,omitempty"`
}
func NewReplaceBackendNotFound() *ReplaceBackendNotFound {
	return &ReplaceBackendNotFound{}
}
func (o *ReplaceBackendNotFound) WithConfigurationVersion(configurationVersion string) *ReplaceBackendNotFound {
	o.ConfigurationVersion = configurationVersion
	return o
}
func (o *ReplaceBackendNotFound) SetConfigurationVersion(configurationVersion string) {
	o.ConfigurationVersion = configurationVersion
}
func (o *ReplaceBackendNotFound) WithPayload(payload *models.Error) *ReplaceBackendNotFound {
	o.Payload = payload
	return o
}