func (o *ReplaceResolverAccepted) WithPayload(payload *models.Resolver) *ReplaceResolverAccepted {
	o.Payload = payload
	return o
}
WithPayload adds the payload to the replace resolver accepted response
package resolver
import (
	"net/http"
	"github.com/go-openapi/runtime"
	"github.com/haproxytech/client-native/v2/models"
)
const ReplaceResolverOKCode int = 200
type ReplaceResolverOK struct {
	Payload *models.Resolver `json:"body,omitempty"`
}
func NewReplaceResolverOK() *ReplaceResolverOK {
	return &ReplaceResolverOK{}
}
func (o *ReplaceResolverOK) WithPayload(payload *models.Resolver) *ReplaceResolverOK {
	o.Payload = payload
	return o
}
func (o *ReplaceResolverOK) SetPayload(payload *models.Resolver) {
	o.Payload = payload
}
func (o *ReplaceResolverOK) 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 ReplaceResolverAcceptedCode int = 202
type ReplaceResolverAccepted struct {
	ReloadID string `json:"Reload-ID"`
	Payload *models.Resolver `json:"body,omitempty"`
}
func NewReplaceResolverAccepted() *ReplaceResolverAccepted {
	return &ReplaceResolverAccepted{}
}
func (o *ReplaceResolverAccepted) WithReloadID(reloadID string) *ReplaceResolverAccepted {
	o.ReloadID = reloadID
	return o
}
func (o *ReplaceResolverAccepted) SetReloadID(reloadID string) {
	o.ReloadID = reloadID
}