func (o *GetTransactionDefault) 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 transactions
import (
	"net/http"
	"github.com/go-openapi/runtime"
	"github.com/haproxytech/client-native/v2/models"
)
const GetTransactionOKCode int = 200
type GetTransactionOK struct {
	Payload *models.Transaction `json:"body,omitempty"`
}
func NewGetTransactionOK() *GetTransactionOK {
	return &GetTransactionOK{}
}
func (o *GetTransactionOK) WithPayload(payload *models.Transaction) *GetTransactionOK {
	o.Payload = payload
	return o
}
func (o *GetTransactionOK) SetPayload(payload *models.Transaction) {
	o.Payload = payload
}
func (o *GetTransactionOK) 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 GetTransactionNotFoundCode int = 404
type GetTransactionNotFound struct {
	ConfigurationVersion string `json:"Configuration-Version"`
	Payload *models.Error `json:"body,omitempty"`
}
func NewGetTransactionNotFound() *GetTransactionNotFound {
	return &GetTransactionNotFound{}
}
func (o *GetTransactionNotFound) WithConfigurationVersion(configurationVersion string) *GetTransactionNotFound {
	o.ConfigurationVersion = configurationVersion
	return o
}
func (o *GetTransactionNotFound) SetConfigurationVersion(configurationVersion string) {
	o.ConfigurationVersion = configurationVersion
}
func (o *GetTransactionNotFound) WithPayload(payload *models.Error) *GetTransactionNotFound {
	o.Payload = payload
	return o
}
func (o *GetTransactionNotFound) SetPayload(payload *models.Error) {
	o.Payload = payload
}
func (o *GetTransactionNotFound) 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 GetTransactionDefault struct {
	_statusCode int
	ConfigurationVersion string `json:"Configuration-Version"`
	Payload *models.Error `json:"body,omitempty"`
}
func NewGetTransactionDefault(code int) *GetTransactionDefault {
	if code <= 0 {
		code = 500
	}
	return &GetTransactionDefault{
		_statusCode: code,
	}
}
func (o *GetTransactionDefault) WithStatusCode(code int) *GetTransactionDefault {
	o._statusCode = code
	return o
}
func (o *GetTransactionDefault) SetStatusCode(code int) {
	o._statusCode = code
}
func (o *GetTransactionDefault) WithConfigurationVersion(configurationVersion string) *GetTransactionDefault {
	o.ConfigurationVersion = configurationVersion
	return o
}
func (o *GetTransactionDefault) SetConfigurationVersion(configurationVersion string) {
	o.ConfigurationVersion = configurationVersion
}
func (o *GetTransactionDefault) WithPayload(payload *models.Error) *GetTransactionDefault {
	o.Payload = payload
	return o
}
func (o *GetTransactionDefault) SetPayload(payload *models.Error) {
	o.Payload = payload
}