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)  
	}
}
WriteResponse to the client
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
}