func (o *ReplaceAWSRegionDefault) SetStatusCode(code int) {
	o._statusCode = code
}
SetStatusCode sets the status to the replace 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 ReplaceAWSRegionOKCode int = 200
type ReplaceAWSRegionOK struct {
	Payload *models.AwsRegion `json:"body,omitempty"`
}
func NewReplaceAWSRegionOK() *ReplaceAWSRegionOK {
	return &ReplaceAWSRegionOK{}
}
func (o *ReplaceAWSRegionOK) WithPayload(payload *models.AwsRegion) *ReplaceAWSRegionOK {
	o.Payload = payload
	return o
}
func (o *ReplaceAWSRegionOK) SetPayload(payload *models.AwsRegion) {
	o.Payload = payload
}
func (o *ReplaceAWSRegionOK) WriteResponse(rw http.ResponseWriter, producer runtime.Producer) {
	rw.WriteHeader(200)
	if o.Payload != nil {
		payload := o.Payload
		if err := producer.Produce(rw, payload); err != nil {
			panic(err)  
		}
	}
}
const ReplaceAWSRegionBadRequestCode int = 400
type ReplaceAWSRegionBadRequest struct {
	ConfigurationVersion string `json:"Configuration-Version"`
	Payload *models.Error `json:"body,omitempty"`
}
func NewReplaceAWSRegionBadRequest() *ReplaceAWSRegionBadRequest {
	return &ReplaceAWSRegionBadRequest{}
}
func (o *ReplaceAWSRegionBadRequest) WithConfigurationVersion(configurationVersion string) *ReplaceAWSRegionBadRequest {
	o.ConfigurationVersion = configurationVersion
	return o
}
func (o *ReplaceAWSRegionBadRequest) SetConfigurationVersion(configurationVersion string) {
	o.ConfigurationVersion = configurationVersion
}
func (o *ReplaceAWSRegionBadRequest) WithPayload(payload *models.Error) *ReplaceAWSRegionBadRequest {
	o.Payload = payload
	return o
}
func (o *ReplaceAWSRegionBadRequest) SetPayload(payload *models.Error) {
	o.Payload = payload
}
func (o *ReplaceAWSRegionBadRequest) 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 ReplaceAWSRegionNotFoundCode int = 404
type ReplaceAWSRegionNotFound struct {
	ConfigurationVersion string `json:"Configuration-Version"`
	Payload *models.Error `json:"body,omitempty"`
}
func NewReplaceAWSRegionNotFound() *ReplaceAWSRegionNotFound {
	return &ReplaceAWSRegionNotFound{}
}
func (o *ReplaceAWSRegionNotFound) WithConfigurationVersion(configurationVersion string) *ReplaceAWSRegionNotFound {
	o.ConfigurationVersion = configurationVersion
	return o
}
func (o *ReplaceAWSRegionNotFound) SetConfigurationVersion(configurationVersion string) {
	o.ConfigurationVersion = configurationVersion
}
func (o *ReplaceAWSRegionNotFound) WithPayload(payload *models.Error) *ReplaceAWSRegionNotFound {
	o.Payload = payload
	return o
}
func (o *ReplaceAWSRegionNotFound) SetPayload(payload *models.Error) {
	o.Payload = payload
}
func (o *ReplaceAWSRegionNotFound) WriteResponse(rw http.ResponseWriter, producer runtime.Producer) {
	configurationVersion := o.ConfigurationVersion
	if configurationVersion != "" {
		rw.Header().Set("Configuration-Version", configurationVersion)
	}
	rw.WriteHeader(404)
	if o.Payload != nil {
		payload := o.Payload
		if err := producer.Produce(rw, payload); err != nil {
			panic(err)  
		}
	}
}
type ReplaceAWSRegionDefault struct {
	_statusCode int
	ConfigurationVersion string `json:"Configuration-Version"`
	Payload *models.Error `json:"body,omitempty"`
}
func NewReplaceAWSRegionDefault(code int) *ReplaceAWSRegionDefault {
	if code <= 0 {
		code = 500
	}
	return &ReplaceAWSRegionDefault{
		_statusCode: code,
	}
}
func (o *ReplaceAWSRegionDefault) WithStatusCode(code int) *ReplaceAWSRegionDefault {
	o._statusCode = code
	return o
}