func (o *CreateServerSwitchingRuleConflict) WriteResponse(rw http.ResponseWriter, producer runtime.Producer) {
	configurationVersion := o.ConfigurationVersion
	if configurationVersion != "" {
		rw.Header().Set("Configuration-Version", configurationVersion)
	}
	rw.WriteHeader(409)
	if o.Payload != nil {
		payload := o.Payload
		if err := producer.Produce(rw, payload); err != nil {
			panic(err)  
		}
	}
}
WriteResponse to the client
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
}
func (o *CreateServerSwitchingRuleAccepted) SetPayload(payload *models.ServerSwitchingRule) {
	o.Payload = payload
}
func (o *CreateServerSwitchingRuleAccepted) 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 CreateServerSwitchingRuleBadRequestCode int = 400
type CreateServerSwitchingRuleBadRequest struct {
	ConfigurationVersion string `json:"Configuration-Version"`
	Payload *models.Error `json:"body,omitempty"`
}
func NewCreateServerSwitchingRuleBadRequest() *CreateServerSwitchingRuleBadRequest {
	return &CreateServerSwitchingRuleBadRequest{}
}
func (o *CreateServerSwitchingRuleBadRequest) WithConfigurationVersion(configurationVersion string) *CreateServerSwitchingRuleBadRequest {
	o.ConfigurationVersion = configurationVersion
	return o
}
func (o *CreateServerSwitchingRuleBadRequest) SetConfigurationVersion(configurationVersion string) {
	o.ConfigurationVersion = configurationVersion
}
func (o *CreateServerSwitchingRuleBadRequest) WithPayload(payload *models.Error) *CreateServerSwitchingRuleBadRequest {
	o.Payload = payload
	return o
}
func (o *CreateServerSwitchingRuleBadRequest) SetPayload(payload *models.Error) {
	o.Payload = payload
}
func (o *CreateServerSwitchingRuleBadRequest) WriteResponse(rw http.ResponseWriter, producer runtime.Producer) {
	configurationVersion := o.ConfigurationVersion
	if configurationVersion != "" {
		rw.Header().Set("Configuration-Version", configurationVersion)
	}
	rw.WriteHeader(400)
	if o.Payload != nil {
		payload := o.Payload
		if err := producer.Produce(rw, payload); err != nil {
			panic(err)  
		}
	}
}
const CreateServerSwitchingRuleConflictCode int = 409
type CreateServerSwitchingRuleConflict struct {
	ConfigurationVersion string `json:"Configuration-Version"`
	Payload *models.Error `json:"body,omitempty"`
}
func NewCreateServerSwitchingRuleConflict() *CreateServerSwitchingRuleConflict {
	return &CreateServerSwitchingRuleConflict{}
}
func (o *CreateServerSwitchingRuleConflict) WithConfigurationVersion(configurationVersion string) *CreateServerSwitchingRuleConflict {
	o.ConfigurationVersion = configurationVersion
	return o
}
func (o *CreateServerSwitchingRuleConflict) SetConfigurationVersion(configurationVersion string) {
	o.ConfigurationVersion = configurationVersion
}
func (o *CreateServerSwitchingRuleConflict) WithPayload(payload *models.Error) *CreateServerSwitchingRuleConflict {
	o.Payload = payload
	return o
}
func (o *CreateServerSwitchingRuleConflict) SetPayload(payload *models.Error) {
	o.Payload = payload
}