func (o *GetConsulDefault) SetPayload(payload *models.Error) {
	o.Payload = payload
}
SetPayload sets the payload to the get consul default response
package service_discovery
import (
	"net/http"
	"github.com/go-openapi/runtime"
	"github.com/haproxytech/client-native/v2/models"
)
const GetConsulOKCode int = 200
type GetConsulOK struct {
	Payload *GetConsulOKBody `json:"body,omitempty"`
}
func NewGetConsulOK() *GetConsulOK {
	return &GetConsulOK{}
}
func (o *GetConsulOK) WithPayload(payload *GetConsulOKBody) *GetConsulOK {
	o.Payload = payload
	return o
}
func (o *GetConsulOK) SetPayload(payload *GetConsulOKBody) {
	o.Payload = payload
}
func (o *GetConsulOK) 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 GetConsulNotFoundCode int = 404
type GetConsulNotFound struct {
	ConfigurationVersion string `json:"Configuration-Version"`
	Payload *models.Error `json:"body,omitempty"`
}
func NewGetConsulNotFound() *GetConsulNotFound {
	return &GetConsulNotFound{}
}
func (o *GetConsulNotFound) WithConfigurationVersion(configurationVersion string) *GetConsulNotFound {
	o.ConfigurationVersion = configurationVersion
	return o
}
func (o *GetConsulNotFound) SetConfigurationVersion(configurationVersion string) {
	o.ConfigurationVersion = configurationVersion
}
func (o *GetConsulNotFound) WithPayload(payload *models.Error) *GetConsulNotFound {
	o.Payload = payload
	return o
}
func (o *GetConsulNotFound) SetPayload(payload *models.Error) {
	o.Payload = payload
}
func (o *GetConsulNotFound) 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 GetConsulDefault struct {
	_statusCode int
	ConfigurationVersion string `json:"Configuration-Version"`
	Payload *models.Error `json:"body,omitempty"`
}
func NewGetConsulDefault(code int) *GetConsulDefault {
	if code <= 0 {
		code = 500
	}
	return &GetConsulDefault{
		_statusCode: code,
	}
}
func (o *GetConsulDefault) WithStatusCode(code int) *GetConsulDefault {
	o._statusCode = code
	return o
}
func (o *GetConsulDefault) SetStatusCode(code int) {
	o._statusCode = code
}
func (o *GetConsulDefault) WithConfigurationVersion(configurationVersion string) *GetConsulDefault {
	o.ConfigurationVersion = configurationVersion
	return o
}
func (o *GetConsulDefault) SetConfigurationVersion(configurationVersion string) {
	o.ConfigurationVersion = configurationVersion
}
func (o *GetConsulDefault) WithPayload(payload *models.Error) *GetConsulDefault {
	o.Payload = payload
	return o
}