func (o *GetBackendSwitchingRuleNotFound) WithPayload(payload *models.Error) *GetBackendSwitchingRuleNotFound {
	o.Payload = payload
	return o
}
WithPayload adds the payload to the get backend switching rule not found response
package backend_switching_rule
import (
	"net/http"
	"github.com/go-openapi/runtime"
	"github.com/haproxytech/client-native/v2/models"
)
const GetBackendSwitchingRuleOKCode int = 200
type GetBackendSwitchingRuleOK struct {
	ConfigurationVersion string `json:"Configuration-Version"`
	Payload *GetBackendSwitchingRuleOKBody `json:"body,omitempty"`
}
func NewGetBackendSwitchingRuleOK() *GetBackendSwitchingRuleOK {
	return &GetBackendSwitchingRuleOK{}
}
func (o *GetBackendSwitchingRuleOK) WithConfigurationVersion(configurationVersion string) *GetBackendSwitchingRuleOK {
	o.ConfigurationVersion = configurationVersion
	return o
}
func (o *GetBackendSwitchingRuleOK) SetConfigurationVersion(configurationVersion string) {
	o.ConfigurationVersion = configurationVersion
}
func (o *GetBackendSwitchingRuleOK) WithPayload(payload *GetBackendSwitchingRuleOKBody) *GetBackendSwitchingRuleOK {
	o.Payload = payload
	return o
}
func (o *GetBackendSwitchingRuleOK) SetPayload(payload *GetBackendSwitchingRuleOKBody) {
	o.Payload = payload
}
func (o *GetBackendSwitchingRuleOK) WriteResponse(rw http.ResponseWriter, producer runtime.Producer) {
	configurationVersion := o.ConfigurationVersion
	if configurationVersion != "" {
		rw.Header().Set("Configuration-Version", configurationVersion)
	}
	rw.WriteHeader(200)
	if o.Payload != nil {
		payload := o.Payload
		if err := producer.Produce(rw, payload); err != nil {
			panic(err)  
		}
	}
}
const GetBackendSwitchingRuleNotFoundCode int = 404
type GetBackendSwitchingRuleNotFound struct {
	ConfigurationVersion string `json:"Configuration-Version"`
	Payload *models.Error `json:"body,omitempty"`
}
func NewGetBackendSwitchingRuleNotFound() *GetBackendSwitchingRuleNotFound {
	return &GetBackendSwitchingRuleNotFound{}
}
func (o *GetBackendSwitchingRuleNotFound) WithConfigurationVersion(configurationVersion string) *GetBackendSwitchingRuleNotFound {
	o.ConfigurationVersion = configurationVersion
	return o
}
func (o *GetBackendSwitchingRuleNotFound) SetConfigurationVersion(configurationVersion string) {
	o.ConfigurationVersion = configurationVersion
}