func (o *GetNameserverDefault) WithPayload(payload *models.Error) *GetNameserverDefault {
	o.Payload = payload
	return o
}
WithPayload adds the payload to the get nameserver default response
package nameserver
import (
	"net/http"
	"github.com/go-openapi/runtime"
	"github.com/haproxytech/client-native/v2/models"
)
const GetNameserverOKCode int = 200
type GetNameserverOK struct {
	ConfigurationVersion string `json:"Configuration-Version"`
	Payload *GetNameserverOKBody `json:"body,omitempty"`
}
func NewGetNameserverOK() *GetNameserverOK {
	return &GetNameserverOK{}
}
func (o *GetNameserverOK) WithConfigurationVersion(configurationVersion string) *GetNameserverOK {
	o.ConfigurationVersion = configurationVersion
	return o
}
func (o *GetNameserverOK) SetConfigurationVersion(configurationVersion string) {
	o.ConfigurationVersion = configurationVersion
}
func (o *GetNameserverOK) WithPayload(payload *GetNameserverOKBody) *GetNameserverOK {
	o.Payload = payload
	return o
}
func (o *GetNameserverOK) SetPayload(payload *GetNameserverOKBody) {
	o.Payload = payload
}
func (o *GetNameserverOK) 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)  
		}
	}
}
const GetNameserverNotFoundCode int = 404
type GetNameserverNotFound struct {
	ConfigurationVersion string `json:"Configuration-Version"`
	Payload *models.Error `json:"body,omitempty"`
}
func NewGetNameserverNotFound() *GetNameserverNotFound {
	return &GetNameserverNotFound{}
}
func (o *GetNameserverNotFound) WithConfigurationVersion(configurationVersion string) *GetNameserverNotFound {
	o.ConfigurationVersion = configurationVersion
	return o
}
func (o *GetNameserverNotFound) SetConfigurationVersion(configurationVersion string) {
	o.ConfigurationVersion = configurationVersion
}
func (o *GetNameserverNotFound) WithPayload(payload *models.Error) *GetNameserverNotFound {
	o.Payload = payload
	return o
}
func (o *GetNameserverNotFound) SetPayload(payload *models.Error) {
	o.Payload = payload
}
func (o *GetNameserverNotFound) 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 GetNameserverDefault struct {
	_statusCode int
	ConfigurationVersion string `json:"Configuration-Version"`
	Payload *models.Error `json:"body,omitempty"`
}
func NewGetNameserverDefault(code int) *GetNameserverDefault {
	if code <= 0 {
		code = 500
	}
	return &GetNameserverDefault{
		_statusCode: code,
	}
}
func (o *GetNameserverDefault) WithStatusCode(code int) *GetNameserverDefault {
	o._statusCode = code
	return o
}
func (o *GetNameserverDefault) SetStatusCode(code int) {
	o._statusCode = code
}
func (o *GetNameserverDefault) WithConfigurationVersion(configurationVersion string) *GetNameserverDefault {
	o.ConfigurationVersion = configurationVersion
	return o
}
func (o *GetNameserverDefault) SetConfigurationVersion(configurationVersion string) {
	o.ConfigurationVersion = configurationVersion
}