func (o *CreatePeerBadRequest) SetPayload(payload *models.Error) {
	o.Payload = payload
}
SetPayload sets the payload to the create peer bad request response
package peer
import (
	"net/http"
	"github.com/go-openapi/runtime"
	"github.com/haproxytech/client-native/v2/models"
)
const CreatePeerCreatedCode int = 201
type CreatePeerCreated struct {
	Payload *models.PeerSection `json:"body,omitempty"`
}
func NewCreatePeerCreated() *CreatePeerCreated {
	return &CreatePeerCreated{}
}
func (o *CreatePeerCreated) WithPayload(payload *models.PeerSection) *CreatePeerCreated {
	o.Payload = payload
	return o
}
func (o *CreatePeerCreated) SetPayload(payload *models.PeerSection) {
	o.Payload = payload
}
func (o *CreatePeerCreated) WriteResponse(rw http.ResponseWriter, producer runtime.Producer) {
	rw.WriteHeader(201)
	if o.Payload != nil {
		payload := o.Payload
		if err := producer.Produce(rw, payload); err != nil {
			panic(err)  
		}
	}
}
const CreatePeerAcceptedCode int = 202
type CreatePeerAccepted struct {
	ReloadID string `json:"Reload-ID"`
	Payload *models.PeerSection `json:"body,omitempty"`
}
func NewCreatePeerAccepted() *CreatePeerAccepted {
	return &CreatePeerAccepted{}
}
func (o *CreatePeerAccepted) WithReloadID(reloadID string) *CreatePeerAccepted {
	o.ReloadID = reloadID
	return o
}
func (o *CreatePeerAccepted) SetReloadID(reloadID string) {
	o.ReloadID = reloadID
}
func (o *CreatePeerAccepted) WithPayload(payload *models.PeerSection) *CreatePeerAccepted {
	o.Payload = payload
	return o
}
func (o *CreatePeerAccepted) SetPayload(payload *models.PeerSection) {
	o.Payload = payload
}
func (o *CreatePeerAccepted) 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)  
		}
	}
}
const CreatePeerBadRequestCode int = 400
type CreatePeerBadRequest struct {
	ConfigurationVersion string `json:"Configuration-Version"`
	Payload *models.Error `json:"body,omitempty"`
}
func NewCreatePeerBadRequest() *CreatePeerBadRequest {
	return &CreatePeerBadRequest{}
}
func (o *CreatePeerBadRequest) WithConfigurationVersion(configurationVersion string) *CreatePeerBadRequest {
	o.ConfigurationVersion = configurationVersion
	return o
}
func (o *CreatePeerBadRequest) SetConfigurationVersion(configurationVersion string) {
	o.ConfigurationVersion = configurationVersion
}
func (o *CreatePeerBadRequest) WithPayload(payload *models.Error) *CreatePeerBadRequest {
	o.Payload = payload
	return o
}