func (o *ReplaceHTTPRequestRuleBadRequest) WithPayload(payload *models.Error) *ReplaceHTTPRequestRuleBadRequest {
	o.Payload = payload
	return o
}
WithPayload adds the payload to the replace Http request rule bad request response
package http_request_rule
import (
	"net/http"
	"github.com/go-openapi/runtime"
	"github.com/haproxytech/client-native/v2/models"
)
const ReplaceHTTPRequestRuleOKCode int = 200
type ReplaceHTTPRequestRuleOK struct {
	Payload *models.HTTPRequestRule `json:"body,omitempty"`
}
func NewReplaceHTTPRequestRuleOK() *ReplaceHTTPRequestRuleOK {
	return &ReplaceHTTPRequestRuleOK{}
}
func (o *ReplaceHTTPRequestRuleOK) WithPayload(payload *models.HTTPRequestRule) *ReplaceHTTPRequestRuleOK {
	o.Payload = payload
	return o
}
func (o *ReplaceHTTPRequestRuleOK) SetPayload(payload *models.HTTPRequestRule) {
	o.Payload = payload
}
func (o *ReplaceHTTPRequestRuleOK) 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 ReplaceHTTPRequestRuleAcceptedCode int = 202
type ReplaceHTTPRequestRuleAccepted struct {
	ReloadID string `json:"Reload-ID"`
	Payload *models.HTTPRequestRule `json:"body,omitempty"`
}
func NewReplaceHTTPRequestRuleAccepted() *ReplaceHTTPRequestRuleAccepted {
	return &ReplaceHTTPRequestRuleAccepted{}
}
func (o *ReplaceHTTPRequestRuleAccepted) WithReloadID(reloadID string) *ReplaceHTTPRequestRuleAccepted {
	o.ReloadID = reloadID
	return o
}
func (o *ReplaceHTTPRequestRuleAccepted) SetReloadID(reloadID string) {
	o.ReloadID = reloadID
}
func (o *ReplaceHTTPRequestRuleAccepted) WithPayload(payload *models.HTTPRequestRule) *ReplaceHTTPRequestRuleAccepted {
	o.Payload = payload
	return o
}
func (o *ReplaceHTTPRequestRuleAccepted) SetPayload(payload *models.HTTPRequestRule) {
	o.Payload = payload
}
func (o *ReplaceHTTPRequestRuleAccepted) 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 ReplaceHTTPRequestRuleBadRequestCode int = 400
type ReplaceHTTPRequestRuleBadRequest struct {
	ConfigurationVersion string `json:"Configuration-Version"`
	Payload *models.Error `json:"body,omitempty"`
}
func NewReplaceHTTPRequestRuleBadRequest() *ReplaceHTTPRequestRuleBadRequest {
	return &ReplaceHTTPRequestRuleBadRequest{}
}
func (o *ReplaceHTTPRequestRuleBadRequest) WithConfigurationVersion(configurationVersion string) *ReplaceHTTPRequestRuleBadRequest {
	o.ConfigurationVersion = configurationVersion
	return o
}
func (o *ReplaceHTTPRequestRuleBadRequest) SetConfigurationVersion(configurationVersion string) {
	o.ConfigurationVersion = configurationVersion
}