func (o *GetAWSRegionsOKBody) MarshalBinary() ([]byte, error) {
	if o == nil {
		return nil, nil
	}
	return swag.WriteJSON(o)
}
MarshalBinary interface implementation
package service_discovery
import (
	"net/http"
	"github.com/go-openapi/errors"
	"github.com/go-openapi/runtime/middleware"
	"github.com/go-openapi/strfmt"
	"github.com/go-openapi/swag"
	"github.com/go-openapi/validate"
	"github.com/haproxytech/client-native/v2/models"
)
type GetAWSRegionsHandlerFunc func(GetAWSRegionsParams, interface{}) middleware.Responder
func (fn GetAWSRegionsHandlerFunc) Handle(params GetAWSRegionsParams, principal interface{}) middleware.Responder {
	return fn(params, principal)
}
type GetAWSRegionsHandler interface {
	Handle(GetAWSRegionsParams, interface{}) middleware.Responder
}
func NewGetAWSRegions(ctx *middleware.Context, handler GetAWSRegionsHandler) *GetAWSRegions {
	return &GetAWSRegions{Context: ctx, Handler: handler}
}
type GetAWSRegions struct {
	Context *middleware.Context
	Handler GetAWSRegionsHandler
}
func (o *GetAWSRegions) ServeHTTP(rw http.ResponseWriter, r *http.Request) {
	route, rCtx, _ := o.Context.RouteInfo(r)
	if rCtx != nil {
		r = rCtx
	}
	var Params = NewGetAWSRegionsParams()
	uprinc, aCtx, err := o.Context.Authorize(r, route)
	if err != nil {
		o.Context.Respond(rw, r, route.Produces, route, err)
		return
	}
	if aCtx != nil {
		r = aCtx
	}
	var principal interface{}
	if uprinc != nil {
		principal = uprinc
	}
	if err := o.Context.BindValidRequest(r, route, &Params); err != nil {  
		o.Context.Respond(rw, r, route.Produces, route, err)
		return
	}
	res := o.Handler.Handle(Params, principal)  
	o.Context.Respond(rw, r, route.Produces, route, res)
}
type GetAWSRegionsOKBody struct {
	Data models.AwsRegions `json:"data"`
}
func (o *GetAWSRegionsOKBody) Validate(formats strfmt.Registry) error {
	var res []error
	if err := o.validateData(formats); err != nil {
		res = append(res, err)
	}
	if len(res) > 0 {
		return errors.CompositeValidationError(res...)
	}
	return nil
}
func (o *GetAWSRegionsOKBody) validateData(formats strfmt.Registry) error {
	if err := validate.Required("getAWSRegionsOK"+"."+"data", "body", o.Data); err != nil {
		return err
	}
	if err := o.Data.Validate(formats); err != nil {
		if ve, ok := err.(*errors.Validation); ok {
			return ve.ValidateName("getAWSRegionsOK" + "." + "data")
		}
		return err
	}
	return nil
}