func (o *ReplaceHTTPRequestRuleDefault) WithStatusCode(code int) *ReplaceHTTPRequestRuleDefault {
	o._statusCode = code
	return o
}
WithStatusCode adds the status to the replace HTTP request rule default 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
}
func (o *ReplaceHTTPRequestRuleBadRequest) WithPayload(payload *models.Error) *ReplaceHTTPRequestRuleBadRequest {
	o.Payload = payload
	return o
}
func (o *ReplaceHTTPRequestRuleBadRequest) SetPayload(payload *models.Error) {
	o.Payload = payload
}
func (o *ReplaceHTTPRequestRuleBadRequest) 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 ReplaceHTTPRequestRuleNotFoundCode int = 404
type ReplaceHTTPRequestRuleNotFound struct {
	ConfigurationVersion string `json:"Configuration-Version"`
	Payload *models.Error `json:"body,omitempty"`
}
func NewReplaceHTTPRequestRuleNotFound() *ReplaceHTTPRequestRuleNotFound {
	return &ReplaceHTTPRequestRuleNotFound{}
}
func (o *ReplaceHTTPRequestRuleNotFound) WithConfigurationVersion(configurationVersion string) *ReplaceHTTPRequestRuleNotFound {
	o.ConfigurationVersion = configurationVersion
	return o
}
func (o *ReplaceHTTPRequestRuleNotFound) SetConfigurationVersion(configurationVersion string) {
	o.ConfigurationVersion = configurationVersion
}
func (o *ReplaceHTTPRequestRuleNotFound) WithPayload(payload *models.Error) *ReplaceHTTPRequestRuleNotFound {
	o.Payload = payload
	return o
}
func (o *ReplaceHTTPRequestRuleNotFound) SetPayload(payload *models.Error) {
	o.Payload = payload
}
func (o *ReplaceHTTPRequestRuleNotFound) 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 ReplaceHTTPRequestRuleDefault struct {
	_statusCode int
	ConfigurationVersion string `json:"Configuration-Version"`
	Payload *models.Error `json:"body,omitempty"`
}
func NewReplaceHTTPRequestRuleDefault(code int) *ReplaceHTTPRequestRuleDefault {
	if code <= 0 {
		code = 500
	}
	return &ReplaceHTTPRequestRuleDefault{
		_statusCode: code,
	}
}