func (o *GetAPIEndpointsDefault) WithStatusCode(code int) *GetAPIEndpointsDefault {
	o._statusCode = code
	return o
}
WithStatusCode adds the status to the get API endpoints default response
package discovery
import (
	"net/http"
	"github.com/go-openapi/runtime"
	"github.com/haproxytech/client-native/v2/models"
)
const GetAPIEndpointsOKCode int = 200
type GetAPIEndpointsOK struct {
	Payload models.Endpoints `json:"body,omitempty"`
}
func NewGetAPIEndpointsOK() *GetAPIEndpointsOK {
	return &GetAPIEndpointsOK{}
}
func (o *GetAPIEndpointsOK) WithPayload(payload models.Endpoints) *GetAPIEndpointsOK {
	o.Payload = payload
	return o
}
func (o *GetAPIEndpointsOK) SetPayload(payload models.Endpoints) {
	o.Payload = payload
}
func (o *GetAPIEndpointsOK) 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 GetAPIEndpointsDefault struct {
	_statusCode int
	ConfigurationVersion string `json:"Configuration-Version"`
	Payload *models.Error `json:"body,omitempty"`
}
func NewGetAPIEndpointsDefault(code int) *GetAPIEndpointsDefault {
	if code <= 0 {
		code = 500
	}
	return &GetAPIEndpointsDefault{
		_statusCode: code,
	}
}