func (o *GetServicesEndpointsDefault) WithPayload(payload *models.Error) *GetServicesEndpointsDefault {
	o.Payload = payload
	return o
}
WithPayload adds the payload to the get services endpoints default response
package discovery
import (
	"net/http"
	"github.com/go-openapi/runtime"
	"github.com/haproxytech/client-native/v2/models"
)
const GetServicesEndpointsOKCode int = 200
type GetServicesEndpointsOK struct {
	Payload models.Endpoints `json:"body,omitempty"`
}
func NewGetServicesEndpointsOK() *GetServicesEndpointsOK {
	return &GetServicesEndpointsOK{}
}
func (o *GetServicesEndpointsOK) WithPayload(payload models.Endpoints) *GetServicesEndpointsOK {
	o.Payload = payload
	return o
}
func (o *GetServicesEndpointsOK) SetPayload(payload models.Endpoints) {
	o.Payload = payload
}
func (o *GetServicesEndpointsOK) WriteResponse(rw http.ResponseWriter, producer runtime.Producer) {
	rw.WriteHeader(200)
	payload := o.Payload
	if payload == nil {
		payload = models.Endpoints{}
	}
	if err := producer.Produce(rw, payload); err != nil {
		panic(err)  
	}
}
type GetServicesEndpointsDefault struct {
	_statusCode int
	ConfigurationVersion string `json:"Configuration-Version"`
	Payload *models.Error `json:"body,omitempty"`
}
func NewGetServicesEndpointsDefault(code int) *GetServicesEndpointsDefault {
	if code <= 0 {
		code = 500
	}
	return &GetServicesEndpointsDefault{
		_statusCode: code,
	}
}
func (o *GetServicesEndpointsDefault) WithStatusCode(code int) *GetServicesEndpointsDefault {
	o._statusCode = code
	return o
}
func (o *GetServicesEndpointsDefault) SetStatusCode(code int) {
	o._statusCode = code
}
func (o *GetServicesEndpointsDefault) WithConfigurationVersion(configurationVersion string) *GetServicesEndpointsDefault {
	o.ConfigurationVersion = configurationVersion
	return o
}
func (o *GetServicesEndpointsDefault) SetConfigurationVersion(configurationVersion string) {
	o.ConfigurationVersion = configurationVersion
}