func (o *CreateAWSRegionDefault) WithPayload(payload *models.Error) *CreateAWSRegionDefault {
	o.Payload = payload
	return o
}
WithPayload adds the payload to the create a w s region default response
package service_discovery
import (
	"net/http"
	"github.com/go-openapi/runtime"
	"github.com/haproxytech/client-native/v2/models"
)
const CreateAWSRegionCreatedCode int = 201
type CreateAWSRegionCreated struct {
	Payload *models.AwsRegion `json:"body,omitempty"`
}
func NewCreateAWSRegionCreated() *CreateAWSRegionCreated {
	return &CreateAWSRegionCreated{}
}
func (o *CreateAWSRegionCreated) WithPayload(payload *models.AwsRegion) *CreateAWSRegionCreated {
	o.Payload = payload
	return o
}
func (o *CreateAWSRegionCreated) SetPayload(payload *models.AwsRegion) {
	o.Payload = payload
}
func (o *CreateAWSRegionCreated) 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 CreateAWSRegionBadRequestCode int = 400
type CreateAWSRegionBadRequest struct {
	ConfigurationVersion string `json:"Configuration-Version"`
	Payload *models.Error `json:"body,omitempty"`
}
func NewCreateAWSRegionBadRequest() *CreateAWSRegionBadRequest {
	return &CreateAWSRegionBadRequest{}
}
func (o *CreateAWSRegionBadRequest) WithConfigurationVersion(configurationVersion string) *CreateAWSRegionBadRequest {
	o.ConfigurationVersion = configurationVersion
	return o
}
func (o *CreateAWSRegionBadRequest) SetConfigurationVersion(configurationVersion string) {
	o.ConfigurationVersion = configurationVersion
}
func (o *CreateAWSRegionBadRequest) WithPayload(payload *models.Error) *CreateAWSRegionBadRequest {
	o.Payload = payload
	return o
}
func (o *CreateAWSRegionBadRequest) SetPayload(payload *models.Error) {
	o.Payload = payload
}
func (o *CreateAWSRegionBadRequest) 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 CreateAWSRegionConflictCode int = 409
type CreateAWSRegionConflict struct {
	ConfigurationVersion string `json:"Configuration-Version"`
	Payload *models.Error `json:"body,omitempty"`
}
func NewCreateAWSRegionConflict() *CreateAWSRegionConflict {
	return &CreateAWSRegionConflict{}
}
func (o *CreateAWSRegionConflict) WithConfigurationVersion(configurationVersion string) *CreateAWSRegionConflict {
	o.ConfigurationVersion = configurationVersion
	return o
}
func (o *CreateAWSRegionConflict) SetConfigurationVersion(configurationVersion string) {
	o.ConfigurationVersion = configurationVersion
}
func (o *CreateAWSRegionConflict) WithPayload(payload *models.Error) *CreateAWSRegionConflict {
	o.Payload = payload
	return o
}
func (o *CreateAWSRegionConflict) SetPayload(payload *models.Error) {
	o.Payload = payload
}
func (o *CreateAWSRegionConflict) 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 CreateAWSRegionDefault struct {
	_statusCode int
	ConfigurationVersion string `json:"Configuration-Version"`
	Payload *models.Error `json:"body,omitempty"`
}
func NewCreateAWSRegionDefault(code int) *CreateAWSRegionDefault {
	if code <= 0 {
		code = 500
	}
	return &CreateAWSRegionDefault{
		_statusCode: code,
	}
}
func (o *CreateAWSRegionDefault) WithStatusCode(code int) *CreateAWSRegionDefault {
	o._statusCode = code
	return o
}
func (o *CreateAWSRegionDefault) SetStatusCode(code int) {
	o._statusCode = code
}
func (o *CreateAWSRegionDefault) WithConfigurationVersion(configurationVersion string) *CreateAWSRegionDefault {
	o.ConfigurationVersion = configurationVersion
	return o
}
func (o *CreateAWSRegionDefault) SetConfigurationVersion(configurationVersion string) {
	o.ConfigurationVersion = configurationVersion
}