func (o *ReplaceRuntimeServerURL) 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 server
import (
	"errors"
	"net/url"
	golangswaggerpaths "path"
	"strings"
)
type ReplaceRuntimeServerURL struct {
	Name string
	Backend string
	_basePath string
	_ struct{}
}
func (o *ReplaceRuntimeServerURL) WithBasePath(bp string) *ReplaceRuntimeServerURL {
	o.SetBasePath(bp)
	return o
}
func (o *ReplaceRuntimeServerURL) SetBasePath(bp string) {
	o._basePath = bp
}
func (o *ReplaceRuntimeServerURL) Build() (*url.URL, error) {
	var _result url.URL
	var _path = "/services/haproxy/runtime/servers/{name}"
	name := o.Name
	if name != "" {
		_path = strings.Replace(_path, "{name}", name, -1)
	} else {
		return nil, errors.New("name is required on ReplaceRuntimeServerURL")
	}
	_basePath := o._basePath
	if _basePath == "" {
		_basePath = "/v2"
	}
	_result.Path = golangswaggerpaths.Join(_basePath, _path)
	qs := make(url.Values)
	backendQ := o.Backend
	if backendQ != "" {
		qs.Set("backend", backendQ)
	}
	_result.RawQuery = qs.Encode()
	return &_result, nil
}