func (o *CreateServerSwitchingRuleAccepted) SetPayload(payload *models.ServerSwitchingRule) {
	o.Payload = payload
}
SetPayload sets the payload to the create server switching rule accepted response
package server_switching_rule
import (
	"net/http"
	"github.com/go-openapi/runtime"
	"github.com/haproxytech/client-native/v2/models"
)
const CreateServerSwitchingRuleCreatedCode int = 201
type CreateServerSwitchingRuleCreated struct {
	Payload *models.ServerSwitchingRule `json:"body,omitempty"`
}
func NewCreateServerSwitchingRuleCreated() *CreateServerSwitchingRuleCreated {
	return &CreateServerSwitchingRuleCreated{}
}
func (o *CreateServerSwitchingRuleCreated) WithPayload(payload *models.ServerSwitchingRule) *CreateServerSwitchingRuleCreated {
	o.Payload = payload
	return o
}
func (o *CreateServerSwitchingRuleCreated) SetPayload(payload *models.ServerSwitchingRule) {
	o.Payload = payload
}
func (o *CreateServerSwitchingRuleCreated) 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 CreateServerSwitchingRuleAcceptedCode int = 202
type CreateServerSwitchingRuleAccepted struct {
	ReloadID string `json:"Reload-ID"`
	Payload *models.ServerSwitchingRule `json:"body,omitempty"`
}
func NewCreateServerSwitchingRuleAccepted() *CreateServerSwitchingRuleAccepted {
	return &CreateServerSwitchingRuleAccepted{}
}
func (o *CreateServerSwitchingRuleAccepted) WithReloadID(reloadID string) *CreateServerSwitchingRuleAccepted {
	o.ReloadID = reloadID
	return o
}
func (o *CreateServerSwitchingRuleAccepted) SetReloadID(reloadID string) {
	o.ReloadID = reloadID
}
func (o *CreateServerSwitchingRuleAccepted) WithPayload(payload *models.ServerSwitchingRule) *CreateServerSwitchingRuleAccepted {
	o.Payload = payload
	return o
}