func (o *ReplaceBackendSwitchingRuleURL) BuildFull(scheme, host string) (*url.URL, error) {
	if scheme == "" {
		return nil, errors.New("scheme is required for a full url on ReplaceBackendSwitchingRuleURL")
	}
	if host == "" {
		return nil, errors.New("host is required for a full url on ReplaceBackendSwitchingRuleURL")
	}
	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 backend_switching_rule
import (
	"errors"
	"net/url"
	golangswaggerpaths "path"
	"strings"
	"github.com/go-openapi/swag"
)
type ReplaceBackendSwitchingRuleURL struct {
	Index int64
	ForceReload   *bool
	Frontend      string
	TransactionID *string
	Version       *int64
	_basePath string
	_ struct{}
}
func (o *ReplaceBackendSwitchingRuleURL) WithBasePath(bp string) *ReplaceBackendSwitchingRuleURL {
	o.SetBasePath(bp)
	return o
}
func (o *ReplaceBackendSwitchingRuleURL) SetBasePath(bp string) {
	o._basePath = bp
}
func (o *ReplaceBackendSwitchingRuleURL) Build() (*url.URL, error) {
	var _result url.URL
	var _path = "/services/haproxy/configuration/backend_switching_rules/{index}"
	index := swag.FormatInt64(o.Index)
	if index != "" {
		_path = strings.Replace(_path, "{index}", index, -1)
	} else {
		return nil, errors.New("index is required on ReplaceBackendSwitchingRuleURL")
	}
	_basePath := o._basePath
	if _basePath == "" {
		_basePath = "/v2"
	}
	_result.Path = golangswaggerpaths.Join(_basePath, _path)
	qs := make(url.Values)
	var forceReloadQ string
	if o.ForceReload != nil {
		forceReloadQ = swag.FormatBool(*o.ForceReload)
	}
	if forceReloadQ != "" {
		qs.Set("force_reload", forceReloadQ)
	}
	frontendQ := o.Frontend
	if frontendQ != "" {
		qs.Set("frontend", frontendQ)
	}
	var transactionIDQ string
	if o.TransactionID != nil {
		transactionIDQ = *o.TransactionID
	}
	if transactionIDQ != "" {
		qs.Set("transaction_id", transactionIDQ)
	}
	var versionQ string
	if o.Version != nil {
		versionQ = swag.FormatInt64(*o.Version)
	}
	if versionQ != "" {
		qs.Set("version", versionQ)
	}
	_result.RawQuery = qs.Encode()
	return &_result, nil
}
func (o *ReplaceBackendSwitchingRuleURL) 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 *ReplaceBackendSwitchingRuleURL) String() string {
	return o.Must(o.Build()).String()
}