func NewReplaceTCPResponseRuleDefault(code int) *ReplaceTCPResponseRuleDefault {
	if code <= 0 {
		code = 500
	}
	return &ReplaceTCPResponseRuleDefault{
		_statusCode: code,
	}
}
NewReplaceTCPResponseRuleDefault creates ReplaceTCPResponseRuleDefault with default headers values
package tcp_response_rule
import (
	"net/http"
	"github.com/go-openapi/runtime"
	"github.com/haproxytech/client-native/v2/models"
)
const ReplaceTCPResponseRuleOKCode int = 200
type ReplaceTCPResponseRuleOK struct {
	Payload *models.TCPResponseRule `json:"body,omitempty"`
}
func NewReplaceTCPResponseRuleOK() *ReplaceTCPResponseRuleOK {
	return &ReplaceTCPResponseRuleOK{}
}
func (o *ReplaceTCPResponseRuleOK) WithPayload(payload *models.TCPResponseRule) *ReplaceTCPResponseRuleOK {
	o.Payload = payload
	return o
}
func (o *ReplaceTCPResponseRuleOK) SetPayload(payload *models.TCPResponseRule) {
	o.Payload = payload
}
func (o *ReplaceTCPResponseRuleOK) 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 ReplaceTCPResponseRuleAcceptedCode int = 202
type ReplaceTCPResponseRuleAccepted struct {
	ReloadID string `json:"Reload-ID"`
	Payload *models.TCPResponseRule `json:"body,omitempty"`
}
func NewReplaceTCPResponseRuleAccepted() *ReplaceTCPResponseRuleAccepted {
	return &ReplaceTCPResponseRuleAccepted{}
}
func (o *ReplaceTCPResponseRuleAccepted) WithReloadID(reloadID string) *ReplaceTCPResponseRuleAccepted {
	o.ReloadID = reloadID
	return o
}
func (o *ReplaceTCPResponseRuleAccepted) SetReloadID(reloadID string) {
	o.ReloadID = reloadID
}
func (o *ReplaceTCPResponseRuleAccepted) WithPayload(payload *models.TCPResponseRule) *ReplaceTCPResponseRuleAccepted {
	o.Payload = payload
	return o
}
func (o *ReplaceTCPResponseRuleAccepted) SetPayload(payload *models.TCPResponseRule) {
	o.Payload = payload
}
func (o *ReplaceTCPResponseRuleAccepted) 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 ReplaceTCPResponseRuleBadRequestCode int = 400
type ReplaceTCPResponseRuleBadRequest struct {
	ConfigurationVersion string `json:"Configuration-Version"`
	Payload *models.Error `json:"body,omitempty"`
}
func NewReplaceTCPResponseRuleBadRequest() *ReplaceTCPResponseRuleBadRequest {
	return &ReplaceTCPResponseRuleBadRequest{}
}
func (o *ReplaceTCPResponseRuleBadRequest) WithConfigurationVersion(configurationVersion string) *ReplaceTCPResponseRuleBadRequest {
	o.ConfigurationVersion = configurationVersion
	return o
}
func (o *ReplaceTCPResponseRuleBadRequest) SetConfigurationVersion(configurationVersion string) {
	o.ConfigurationVersion = configurationVersion
}
func (o *ReplaceTCPResponseRuleBadRequest) WithPayload(payload *models.Error) *ReplaceTCPResponseRuleBadRequest {
	o.Payload = payload
	return o
}
func (o *ReplaceTCPResponseRuleBadRequest) SetPayload(payload *models.Error) {
	o.Payload = payload
}
func (o *ReplaceTCPResponseRuleBadRequest) 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 ReplaceTCPResponseRuleNotFoundCode int = 404
type ReplaceTCPResponseRuleNotFound struct {
	ConfigurationVersion string `json:"Configuration-Version"`
	Payload *models.Error `json:"body,omitempty"`
}
func NewReplaceTCPResponseRuleNotFound() *ReplaceTCPResponseRuleNotFound {
	return &ReplaceTCPResponseRuleNotFound{}
}
func (o *ReplaceTCPResponseRuleNotFound) WithConfigurationVersion(configurationVersion string) *ReplaceTCPResponseRuleNotFound {
	o.ConfigurationVersion = configurationVersion
	return o
}
func (o *ReplaceTCPResponseRuleNotFound) SetConfigurationVersion(configurationVersion string) {
	o.ConfigurationVersion = configurationVersion
}
func (o *ReplaceTCPResponseRuleNotFound) WithPayload(payload *models.Error) *ReplaceTCPResponseRuleNotFound {
	o.Payload = payload
	return o
}
func (o *ReplaceTCPResponseRuleNotFound) SetPayload(payload *models.Error) {
	o.Payload = payload
}
func (o *ReplaceTCPResponseRuleNotFound) 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 ReplaceTCPResponseRuleDefault struct {
	_statusCode int
	ConfigurationVersion string `json:"Configuration-Version"`
	Payload *models.Error `json:"body,omitempty"`
}