func (o *GetTCPResponseRulesDefault) WriteResponse(rw http.ResponseWriter, producer runtime.Producer) {
	configurationVersion := o.ConfigurationVersion
	if configurationVersion != "" {
		rw.Header().Set("Configuration-Version", configurationVersion)
	}
	rw.WriteHeader(o._statusCode)
	if o.Payload != nil {
		payload := o.Payload
		if err := producer.Produce(rw, payload); err != nil {
			panic(err)  
		}
	}
}
WriteResponse to the client
package tcp_response_rule
import (
	"net/http"
	"github.com/go-openapi/runtime"
	"github.com/haproxytech/client-native/v2/models"
)
const GetTCPResponseRulesOKCode int = 200
type GetTCPResponseRulesOK struct {
	ConfigurationVersion string `json:"Configuration-Version"`
	Payload *GetTCPResponseRulesOKBody `json:"body,omitempty"`
}
func NewGetTCPResponseRulesOK() *GetTCPResponseRulesOK {
	return &GetTCPResponseRulesOK{}
}
func (o *GetTCPResponseRulesOK) WithConfigurationVersion(configurationVersion string) *GetTCPResponseRulesOK {
	o.ConfigurationVersion = configurationVersion
	return o
}
func (o *GetTCPResponseRulesOK) SetConfigurationVersion(configurationVersion string) {
	o.ConfigurationVersion = configurationVersion
}
func (o *GetTCPResponseRulesOK) WithPayload(payload *GetTCPResponseRulesOKBody) *GetTCPResponseRulesOK {
	o.Payload = payload
	return o
}
func (o *GetTCPResponseRulesOK) SetPayload(payload *GetTCPResponseRulesOKBody) {
	o.Payload = payload
}
func (o *GetTCPResponseRulesOK) 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)  
		}
	}
}
type GetTCPResponseRulesDefault struct {
	_statusCode int
	ConfigurationVersion string `json:"Configuration-Version"`
	Payload *models.Error `json:"body,omitempty"`
}
func NewGetTCPResponseRulesDefault(code int) *GetTCPResponseRulesDefault {
	if code <= 0 {
		code = 500
	}
	return &GetTCPResponseRulesDefault{
		_statusCode: code,
	}
}
func (o *GetTCPResponseRulesDefault) WithStatusCode(code int) *GetTCPResponseRulesDefault {
	o._statusCode = code
	return o
}
func (o *GetTCPResponseRulesDefault) SetStatusCode(code int) {
	o._statusCode = code
}
func (o *GetTCPResponseRulesDefault) WithConfigurationVersion(configurationVersion string) *GetTCPResponseRulesDefault {
	o.ConfigurationVersion = configurationVersion
	return o
}
func (o *GetTCPResponseRulesDefault) SetConfigurationVersion(configurationVersion string) {
	o.ConfigurationVersion = configurationVersion
}
func (o *GetTCPResponseRulesDefault) WithPayload(payload *models.Error) *GetTCPResponseRulesDefault {
	o.Payload = payload
	return o
}
func (o *GetTCPResponseRulesDefault) SetPayload(payload *models.Error) {
	o.Payload = payload
}