func (o *CreateSpoeScopeDefault) SetPayload(payload *models.Error) {
	o.Payload = payload
}
SetPayload sets the payload to the create spoe scope default response
package spoe
import (
	"net/http"
	"github.com/go-openapi/runtime"
	"github.com/haproxytech/client-native/v2/models"
)
const CreateSpoeScopeCreatedCode int = 201
type CreateSpoeScopeCreated struct {
	Payload models.SpoeScope `json:"body,omitempty"`
}
func NewCreateSpoeScopeCreated() *CreateSpoeScopeCreated {
	return &CreateSpoeScopeCreated{}
}
func (o *CreateSpoeScopeCreated) WithPayload(payload models.SpoeScope) *CreateSpoeScopeCreated {
	o.Payload = payload
	return o
}
func (o *CreateSpoeScopeCreated) SetPayload(payload models.SpoeScope) {
	o.Payload = payload
}
func (o *CreateSpoeScopeCreated) WriteResponse(rw http.ResponseWriter, producer runtime.Producer) {
	rw.WriteHeader(201)
	payload := o.Payload
	if err := producer.Produce(rw, payload); err != nil {
		panic(err)  
	}
}
const CreateSpoeScopeBadRequestCode int = 400
type CreateSpoeScopeBadRequest struct {
	ConfigurationVersion string `json:"Configuration-Version"`
	Payload *models.Error `json:"body,omitempty"`
}
func NewCreateSpoeScopeBadRequest() *CreateSpoeScopeBadRequest {
	return &CreateSpoeScopeBadRequest{}
}
func (o *CreateSpoeScopeBadRequest) WithConfigurationVersion(configurationVersion string) *CreateSpoeScopeBadRequest {
	o.ConfigurationVersion = configurationVersion
	return o
}
func (o *CreateSpoeScopeBadRequest) SetConfigurationVersion(configurationVersion string) {
	o.ConfigurationVersion = configurationVersion
}
func (o *CreateSpoeScopeBadRequest) WithPayload(payload *models.Error) *CreateSpoeScopeBadRequest {
	o.Payload = payload
	return o
}
func (o *CreateSpoeScopeBadRequest) SetPayload(payload *models.Error) {
	o.Payload = payload
}
func (o *CreateSpoeScopeBadRequest) 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 CreateSpoeScopeConflictCode int = 409
type CreateSpoeScopeConflict struct {
	ConfigurationVersion string `json:"Configuration-Version"`
	Payload *models.Error `json:"body,omitempty"`
}
func NewCreateSpoeScopeConflict() *CreateSpoeScopeConflict {
	return &CreateSpoeScopeConflict{}
}
func (o *CreateSpoeScopeConflict) WithConfigurationVersion(configurationVersion string) *CreateSpoeScopeConflict {
	o.ConfigurationVersion = configurationVersion
	return o
}
func (o *CreateSpoeScopeConflict) SetConfigurationVersion(configurationVersion string) {
	o.ConfigurationVersion = configurationVersion
}
func (o *CreateSpoeScopeConflict) WithPayload(payload *models.Error) *CreateSpoeScopeConflict {
	o.Payload = payload
	return o
}
func (o *CreateSpoeScopeConflict) SetPayload(payload *models.Error) {
	o.Payload = payload
}
func (o *CreateSpoeScopeConflict) 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)  
		}
	}
}
type CreateSpoeScopeDefault struct {
	_statusCode int
	ConfigurationVersion string `json:"Configuration-Version"`
	Payload *models.Error `json:"body,omitempty"`
}
func NewCreateSpoeScopeDefault(code int) *CreateSpoeScopeDefault {
	if code <= 0 {
		code = 500
	}
	return &CreateSpoeScopeDefault{
		_statusCode: code,
	}
}
func (o *CreateSpoeScopeDefault) WithStatusCode(code int) *CreateSpoeScopeDefault {
	o._statusCode = code
	return o
}
func (o *CreateSpoeScopeDefault) SetStatusCode(code int) {
	o._statusCode = code
}
func (o *CreateSpoeScopeDefault) WithConfigurationVersion(configurationVersion string) *CreateSpoeScopeDefault {
	o.ConfigurationVersion = configurationVersion
	return o
}
func (o *CreateSpoeScopeDefault) SetConfigurationVersion(configurationVersion string) {
	o.ConfigurationVersion = configurationVersion
}
func (o *CreateSpoeScopeDefault) WithPayload(payload *models.Error) *CreateSpoeScopeDefault {
	o.Payload = payload
	return o
}