func (o *GetStatsEndpointsURL) BuildFull(scheme, host string) (*url.URL, error) {
	if scheme == "" {
		return nil, errors.New("scheme is required for a full url on GetStatsEndpointsURL")
	}
	if host == "" {
		return nil, errors.New("host is required for a full url on GetStatsEndpointsURL")
	}
	base, err := o.Build()
	if err != nil {
		return nil, err
	}
	base.Scheme = scheme
	base.Host = host
	return base, nil
}
BuildFull builds a full url with scheme, host, path and query string
package discovery
import (
	"errors"
	"net/url"
	golangswaggerpaths "path"
)
type GetStatsEndpointsURL struct {
	_basePath string
}
func (o *GetStatsEndpointsURL) WithBasePath(bp string) *GetStatsEndpointsURL {
	o.SetBasePath(bp)
	return o
}
func (o *GetStatsEndpointsURL) SetBasePath(bp string) {
	o._basePath = bp
}
func (o *GetStatsEndpointsURL) Build() (*url.URL, error) {
	var _result url.URL
	var _path = "/services/haproxy/stats"
	_basePath := o._basePath
	if _basePath == "" {
		_basePath = "/v2"
	}
	_result.Path = golangswaggerpaths.Join(_basePath, _path)
	return &_result, nil
}
func (o *GetStatsEndpointsURL) Must(u *url.URL, err error) *url.URL {
	if err != nil {
		panic(err)
	}
	if u == nil {
		panic("url can't be nil")
	}
	return u
}
func (o *GetStatsEndpointsURL) String() string {
	return o.Must(o.Build()).String()
}