func (o *CreateBackendSwitchingRuleURL) Build() (*url.URL, error) {
	var _result url.URL
	var _path = "/services/haproxy/configuration/backend_switching_rules"
	_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
}
Build a url path and query string
package backend_switching_rule
import (
	"errors"
	"net/url"
	golangswaggerpaths "path"
	"github.com/go-openapi/swag"
)
type CreateBackendSwitchingRuleURL struct {
	ForceReload   *bool
	Frontend      string
	TransactionID *string
	Version       *int64
	_basePath string
	_ struct{}
}
func (o *CreateBackendSwitchingRuleURL) WithBasePath(bp string) *CreateBackendSwitchingRuleURL {
	o.SetBasePath(bp)
	return o
}
func (o *CreateBackendSwitchingRuleURL) SetBasePath(bp string) {
	o._basePath = bp
}