func (o *CreateAWSRegionURL) Must(u *url.URL, err error) *url.URL {
	if err != nil {
		panic(err)
	}
	if u == nil {
		panic("url can't be nil")
	}
	return u
}
Must is a helper function to panic when the url builder returns an error
package service_discovery
import (
	"errors"
	"net/url"
	golangswaggerpaths "path"
)
type CreateAWSRegionURL struct {
	_basePath string
}
func (o *CreateAWSRegionURL) WithBasePath(bp string) *CreateAWSRegionURL {
	o.SetBasePath(bp)
	return o
}
func (o *CreateAWSRegionURL) SetBasePath(bp string) {
	o._basePath = bp
}
func (o *CreateAWSRegionURL) Build() (*url.URL, error) {
	var _result url.URL
	var _path = "/service_discovery/aws"
	_basePath := o._basePath
	if _basePath == "" {
		_basePath = "/v2"
	}
	_result.Path = golangswaggerpaths.Join(_basePath, _path)
	return &_result, nil
}