func (o *GetTCPResponseRuleDefault) WithStatusCode(code int) *GetTCPResponseRuleDefault {
	o._statusCode = code
	return o
}
WithStatusCode adds the status to the get TCP response rule default response
package tcp_response_rule
import (
	"net/http"
	"github.com/go-openapi/runtime"
	"github.com/haproxytech/client-native/v2/models"
)
const GetTCPResponseRuleOKCode int = 200
type GetTCPResponseRuleOK struct {
	ConfigurationVersion string `json:"Configuration-Version"`
	Payload *GetTCPResponseRuleOKBody `json:"body,omitempty"`
}
func NewGetTCPResponseRuleOK() *GetTCPResponseRuleOK {
	return &GetTCPResponseRuleOK{}
}
func (o *GetTCPResponseRuleOK) WithConfigurationVersion(configurationVersion string) *GetTCPResponseRuleOK {
	o.ConfigurationVersion = configurationVersion
	return o
}
func (o *GetTCPResponseRuleOK) SetConfigurationVersion(configurationVersion string) {
	o.ConfigurationVersion = configurationVersion
}
func (o *GetTCPResponseRuleOK) WithPayload(payload *GetTCPResponseRuleOKBody) *GetTCPResponseRuleOK {
	o.Payload = payload
	return o
}
func (o *GetTCPResponseRuleOK) SetPayload(payload *GetTCPResponseRuleOKBody) {
	o.Payload = payload
}
func (o *GetTCPResponseRuleOK) WriteResponse(rw http.ResponseWriter, producer runtime.Producer) {
	configurationVersion := o.ConfigurationVersion
	if configurationVersion != "" {
		rw.Header().Set("Configuration-Version", configurationVersion)
	}
	rw.WriteHeader(200)
	if o.Payload != nil {
		payload := o.Payload
		if err := producer.Produce(rw, payload); err != nil {
			panic(err)  
		}
	}
}
const GetTCPResponseRuleNotFoundCode int = 404
type GetTCPResponseRuleNotFound struct {
	ConfigurationVersion string `json:"Configuration-Version"`
	Payload *models.Error `json:"body,omitempty"`
}
func NewGetTCPResponseRuleNotFound() *GetTCPResponseRuleNotFound {
	return &GetTCPResponseRuleNotFound{}
}
func (o *GetTCPResponseRuleNotFound) WithConfigurationVersion(configurationVersion string) *GetTCPResponseRuleNotFound {
	o.ConfigurationVersion = configurationVersion
	return o
}
func (o *GetTCPResponseRuleNotFound) SetConfigurationVersion(configurationVersion string) {
	o.ConfigurationVersion = configurationVersion
}
func (o *GetTCPResponseRuleNotFound) WithPayload(payload *models.Error) *GetTCPResponseRuleNotFound {
	o.Payload = payload
	return o
}
func (o *GetTCPResponseRuleNotFound) SetPayload(payload *models.Error) {
	o.Payload = payload
}
func (o *GetTCPResponseRuleNotFound) 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 GetTCPResponseRuleDefault struct {
	_statusCode int
	ConfigurationVersion string `json:"Configuration-Version"`
	Payload *models.Error `json:"body,omitempty"`
}
func NewGetTCPResponseRuleDefault(code int) *GetTCPResponseRuleDefault {
	if code <= 0 {
		code = 500
	}
	return &GetTCPResponseRuleDefault{
		_statusCode: code,
	}
}