func (o *CreateStickRuleBadRequest) SetPayload(payload *models.Error) {
	o.Payload = payload
}
SetPayload sets the payload to the create stick rule bad request response
package stick_rule
import (
	"net/http"
	"github.com/go-openapi/runtime"
	"github.com/haproxytech/client-native/v2/models"
)
const CreateStickRuleCreatedCode int = 201
type CreateStickRuleCreated struct {
	Payload *models.StickRule `json:"body,omitempty"`
}
func NewCreateStickRuleCreated() *CreateStickRuleCreated {
	return &CreateStickRuleCreated{}
}
func (o *CreateStickRuleCreated) WithPayload(payload *models.StickRule) *CreateStickRuleCreated {
	o.Payload = payload
	return o
}
func (o *CreateStickRuleCreated) SetPayload(payload *models.StickRule) {
	o.Payload = payload
}
func (o *CreateStickRuleCreated) 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 CreateStickRuleAcceptedCode int = 202
type CreateStickRuleAccepted struct {
	ReloadID string `json:"Reload-ID"`
	Payload *models.StickRule `json:"body,omitempty"`
}
func NewCreateStickRuleAccepted() *CreateStickRuleAccepted {
	return &CreateStickRuleAccepted{}
}
func (o *CreateStickRuleAccepted) WithReloadID(reloadID string) *CreateStickRuleAccepted {
	o.ReloadID = reloadID
	return o
}
func (o *CreateStickRuleAccepted) SetReloadID(reloadID string) {
	o.ReloadID = reloadID
}
func (o *CreateStickRuleAccepted) WithPayload(payload *models.StickRule) *CreateStickRuleAccepted {
	o.Payload = payload
	return o
}
func (o *CreateStickRuleAccepted) SetPayload(payload *models.StickRule) {
	o.Payload = payload
}
func (o *CreateStickRuleAccepted) 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 CreateStickRuleBadRequestCode int = 400
type CreateStickRuleBadRequest struct {
	ConfigurationVersion string `json:"Configuration-Version"`
	Payload *models.Error `json:"body,omitempty"`
}
func NewCreateStickRuleBadRequest() *CreateStickRuleBadRequest {
	return &CreateStickRuleBadRequest{}
}
func (o *CreateStickRuleBadRequest) WithConfigurationVersion(configurationVersion string) *CreateStickRuleBadRequest {
	o.ConfigurationVersion = configurationVersion
	return o
}
func (o *CreateStickRuleBadRequest) SetConfigurationVersion(configurationVersion string) {
	o.ConfigurationVersion = configurationVersion
}
func (o *CreateStickRuleBadRequest) WithPayload(payload *models.Error) *CreateStickRuleBadRequest {
	o.Payload = payload
	return o
}