func (o *ReplaceStickRuleNotFound) SetPayload(payload *models.Error) {
	o.Payload = payload
}
SetPayload sets the payload to the replace stick rule not found response
package stick_rule
import (
	"net/http"
	"github.com/go-openapi/runtime"
	"github.com/haproxytech/client-native/v2/models"
)
const ReplaceStickRuleOKCode int = 200
type ReplaceStickRuleOK struct {
	Payload *models.StickRule `json:"body,omitempty"`
}
func NewReplaceStickRuleOK() *ReplaceStickRuleOK {
	return &ReplaceStickRuleOK{}
}
func (o *ReplaceStickRuleOK) WithPayload(payload *models.StickRule) *ReplaceStickRuleOK {
	o.Payload = payload
	return o
}
func (o *ReplaceStickRuleOK) SetPayload(payload *models.StickRule) {
	o.Payload = payload
}
func (o *ReplaceStickRuleOK) 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 ReplaceStickRuleAcceptedCode int = 202
type ReplaceStickRuleAccepted struct {
	ReloadID string `json:"Reload-ID"`
	Payload *models.StickRule `json:"body,omitempty"`
}
func NewReplaceStickRuleAccepted() *ReplaceStickRuleAccepted {
	return &ReplaceStickRuleAccepted{}
}
func (o *ReplaceStickRuleAccepted) WithReloadID(reloadID string) *ReplaceStickRuleAccepted {
	o.ReloadID = reloadID
	return o
}
func (o *ReplaceStickRuleAccepted) SetReloadID(reloadID string) {
	o.ReloadID = reloadID
}
func (o *ReplaceStickRuleAccepted) WithPayload(payload *models.StickRule) *ReplaceStickRuleAccepted {
	o.Payload = payload
	return o
}
func (o *ReplaceStickRuleAccepted) SetPayload(payload *models.StickRule) {
	o.Payload = payload
}
func (o *ReplaceStickRuleAccepted) 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 ReplaceStickRuleBadRequestCode int = 400
type ReplaceStickRuleBadRequest struct {
	ConfigurationVersion string `json:"Configuration-Version"`
	Payload *models.Error `json:"body,omitempty"`
}
func NewReplaceStickRuleBadRequest() *ReplaceStickRuleBadRequest {
	return &ReplaceStickRuleBadRequest{}
}
func (o *ReplaceStickRuleBadRequest) WithConfigurationVersion(configurationVersion string) *ReplaceStickRuleBadRequest {
	o.ConfigurationVersion = configurationVersion
	return o
}
func (o *ReplaceStickRuleBadRequest) SetConfigurationVersion(configurationVersion string) {
	o.ConfigurationVersion = configurationVersion
}
func (o *ReplaceStickRuleBadRequest) WithPayload(payload *models.Error) *ReplaceStickRuleBadRequest {
	o.Payload = payload
	return o
}
func (o *ReplaceStickRuleBadRequest) SetPayload(payload *models.Error) {
	o.Payload = payload
}
func (o *ReplaceStickRuleBadRequest) 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 ReplaceStickRuleNotFoundCode int = 404
type ReplaceStickRuleNotFound struct {
	ConfigurationVersion string `json:"Configuration-Version"`
	Payload *models.Error `json:"body,omitempty"`
}
func NewReplaceStickRuleNotFound() *ReplaceStickRuleNotFound {
	return &ReplaceStickRuleNotFound{}
}
func (o *ReplaceStickRuleNotFound) WithConfigurationVersion(configurationVersion string) *ReplaceStickRuleNotFound {
	o.ConfigurationVersion = configurationVersion
	return o
}
func (o *ReplaceStickRuleNotFound) SetConfigurationVersion(configurationVersion string) {
	o.ConfigurationVersion = configurationVersion
}
func (o *ReplaceStickRuleNotFound) WithPayload(payload *models.Error) *ReplaceStickRuleNotFound {
	o.Payload = payload
	return o
}