func (o *ReplaceNameserverAccepted) WriteResponse(rw http.ResponseWriter, producer runtime.Producer) {
	reloadID := o.ReloadID
	if reloadID != "" {
		rw.Header().Set("Reload-ID", reloadID)
	}
	rw.WriteHeader(202)
	if o.Payload != nil {
		payload := o.Payload
		if err := producer.Produce(rw, payload); err != nil {
			panic(err)  
		}
	}
}
WriteResponse to the client
package nameserver
import (
	"net/http"
	"github.com/go-openapi/runtime"
	"github.com/haproxytech/client-native/v2/models"
)
const ReplaceNameserverOKCode int = 200
type ReplaceNameserverOK struct {
	Payload *models.Nameserver `json:"body,omitempty"`
}
func NewReplaceNameserverOK() *ReplaceNameserverOK {
	return &ReplaceNameserverOK{}
}
func (o *ReplaceNameserverOK) WithPayload(payload *models.Nameserver) *ReplaceNameserverOK {
	o.Payload = payload
	return o
}
func (o *ReplaceNameserverOK) SetPayload(payload *models.Nameserver) {
	o.Payload = payload
}
func (o *ReplaceNameserverOK) 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 ReplaceNameserverAcceptedCode int = 202
type ReplaceNameserverAccepted struct {
	ReloadID string `json:"Reload-ID"`
	Payload *models.Nameserver `json:"body,omitempty"`
}
func NewReplaceNameserverAccepted() *ReplaceNameserverAccepted {
	return &ReplaceNameserverAccepted{}
}
func (o *ReplaceNameserverAccepted) WithReloadID(reloadID string) *ReplaceNameserverAccepted {
	o.ReloadID = reloadID
	return o
}
func (o *ReplaceNameserverAccepted) SetReloadID(reloadID string) {
	o.ReloadID = reloadID
}
func (o *ReplaceNameserverAccepted) WithPayload(payload *models.Nameserver) *ReplaceNameserverAccepted {
	o.Payload = payload
	return o
}
func (o *ReplaceNameserverAccepted) SetPayload(payload *models.Nameserver) {
	o.Payload = payload
}