func (o *GetPeerEntriesDefault) SetPayload(payload *models.Error) {
	o.Payload = payload
}
SetPayload sets the payload to the get peer entries default response
package peer_entry
import (
	"net/http"
	"github.com/go-openapi/runtime"
	"github.com/haproxytech/client-native/v2/models"
)
const GetPeerEntriesOKCode int = 200
type GetPeerEntriesOK struct {
	ConfigurationVersion string `json:"Configuration-Version"`
	Payload *GetPeerEntriesOKBody `json:"body,omitempty"`
}
func NewGetPeerEntriesOK() *GetPeerEntriesOK {
	return &GetPeerEntriesOK{}
}
func (o *GetPeerEntriesOK) WithConfigurationVersion(configurationVersion string) *GetPeerEntriesOK {
	o.ConfigurationVersion = configurationVersion
	return o
}
func (o *GetPeerEntriesOK) SetConfigurationVersion(configurationVersion string) {
	o.ConfigurationVersion = configurationVersion
}
func (o *GetPeerEntriesOK) WithPayload(payload *GetPeerEntriesOKBody) *GetPeerEntriesOK {
	o.Payload = payload
	return o
}
func (o *GetPeerEntriesOK) SetPayload(payload *GetPeerEntriesOKBody) {
	o.Payload = payload
}
func (o *GetPeerEntriesOK) 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 GetPeerEntriesDefault struct {
	_statusCode int
	ConfigurationVersion string `json:"Configuration-Version"`
	Payload *models.Error `json:"body,omitempty"`
}
func NewGetPeerEntriesDefault(code int) *GetPeerEntriesDefault {
	if code <= 0 {
		code = 500
	}
	return &GetPeerEntriesDefault{
		_statusCode: code,
	}
}
func (o *GetPeerEntriesDefault) WithStatusCode(code int) *GetPeerEntriesDefault {
	o._statusCode = code
	return o
}
func (o *GetPeerEntriesDefault) SetStatusCode(code int) {
	o._statusCode = code
}
func (o *GetPeerEntriesDefault) WithConfigurationVersion(configurationVersion string) *GetPeerEntriesDefault {
	o.ConfigurationVersion = configurationVersion
	return o
}
func (o *GetPeerEntriesDefault) SetConfigurationVersion(configurationVersion string) {
	o.ConfigurationVersion = configurationVersion
}
func (o *GetPeerEntriesDefault) WithPayload(payload *models.Error) *GetPeerEntriesDefault {
	o.Payload = payload
	return o
}