func (o *CreateServerTemplateDefault) SetPayload(payload *models.Error) {
	o.Payload = payload
}
SetPayload sets the payload to the create server template default response
package server_template
import (
	"net/http"
	"github.com/go-openapi/runtime"
	"github.com/haproxytech/client-native/v2/models"
)
const CreateServerTemplateCreatedCode int = 201
type CreateServerTemplateCreated struct {
	Payload *models.ServerTemplate `json:"body,omitempty"`
}
func NewCreateServerTemplateCreated() *CreateServerTemplateCreated {
	return &CreateServerTemplateCreated{}
}
func (o *CreateServerTemplateCreated) WithPayload(payload *models.ServerTemplate) *CreateServerTemplateCreated {
	o.Payload = payload
	return o
}
func (o *CreateServerTemplateCreated) SetPayload(payload *models.ServerTemplate) {
	o.Payload = payload
}
func (o *CreateServerTemplateCreated) 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 CreateServerTemplateAcceptedCode int = 202
type CreateServerTemplateAccepted struct {
	ReloadID string `json:"Reload-ID"`
	Payload *models.ServerTemplate `json:"body,omitempty"`
}
func NewCreateServerTemplateAccepted() *CreateServerTemplateAccepted {
	return &CreateServerTemplateAccepted{}
}
func (o *CreateServerTemplateAccepted) WithReloadID(reloadID string) *CreateServerTemplateAccepted {
	o.ReloadID = reloadID
	return o
}
func (o *CreateServerTemplateAccepted) SetReloadID(reloadID string) {
	o.ReloadID = reloadID
}
func (o *CreateServerTemplateAccepted) WithPayload(payload *models.ServerTemplate) *CreateServerTemplateAccepted {
	o.Payload = payload
	return o
}
func (o *CreateServerTemplateAccepted) SetPayload(payload *models.ServerTemplate) {
	o.Payload = payload
}
func (o *CreateServerTemplateAccepted) 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 CreateServerTemplateBadRequestCode int = 400
type CreateServerTemplateBadRequest struct {
	ConfigurationVersion string `json:"Configuration-Version"`
	Payload *models.Error `json:"body,omitempty"`
}
func NewCreateServerTemplateBadRequest() *CreateServerTemplateBadRequest {
	return &CreateServerTemplateBadRequest{}
}
func (o *CreateServerTemplateBadRequest) WithConfigurationVersion(configurationVersion string) *CreateServerTemplateBadRequest {
	o.ConfigurationVersion = configurationVersion
	return o
}
func (o *CreateServerTemplateBadRequest) SetConfigurationVersion(configurationVersion string) {
	o.ConfigurationVersion = configurationVersion
}
func (o *CreateServerTemplateBadRequest) WithPayload(payload *models.Error) *CreateServerTemplateBadRequest {
	o.Payload = payload
	return o
}
func (o *CreateServerTemplateBadRequest) SetPayload(payload *models.Error) {
	o.Payload = payload
}
func (o *CreateServerTemplateBadRequest) 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 CreateServerTemplateConflictCode int = 409
type CreateServerTemplateConflict struct {
	ConfigurationVersion string `json:"Configuration-Version"`
	Payload *models.Error `json:"body,omitempty"`
}
func NewCreateServerTemplateConflict() *CreateServerTemplateConflict {
	return &CreateServerTemplateConflict{}
}
func (o *CreateServerTemplateConflict) WithConfigurationVersion(configurationVersion string) *CreateServerTemplateConflict {
	o.ConfigurationVersion = configurationVersion
	return o
}
func (o *CreateServerTemplateConflict) SetConfigurationVersion(configurationVersion string) {
	o.ConfigurationVersion = configurationVersion
}
func (o *CreateServerTemplateConflict) WithPayload(payload *models.Error) *CreateServerTemplateConflict {
	o.Payload = payload
	return o
}
func (o *CreateServerTemplateConflict) SetPayload(payload *models.Error) {
	o.Payload = payload
}
func (o *CreateServerTemplateConflict) 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 CreateServerTemplateDefault struct {
	_statusCode int
	ConfigurationVersion string `json:"Configuration-Version"`
	Payload *models.Error `json:"body,omitempty"`
}
func NewCreateServerTemplateDefault(code int) *CreateServerTemplateDefault {
	if code <= 0 {
		code = 500
	}
	return &CreateServerTemplateDefault{
		_statusCode: code,
	}
}
func (o *CreateServerTemplateDefault) WithStatusCode(code int) *CreateServerTemplateDefault {
	o._statusCode = code
	return o
}
func (o *CreateServerTemplateDefault) SetStatusCode(code int) {
	o._statusCode = code
}
func (o *CreateServerTemplateDefault) WithConfigurationVersion(configurationVersion string) *CreateServerTemplateDefault {
	o.ConfigurationVersion = configurationVersion
	return o
}
func (o *CreateServerTemplateDefault) SetConfigurationVersion(configurationVersion string) {
	o.ConfigurationVersion = configurationVersion
}
func (o *CreateServerTemplateDefault) WithPayload(payload *models.Error) *CreateServerTemplateDefault {
	o.Payload = payload
	return o
}