func (o *DeleteServerTemplateURL) String() string {
	return o.Must(o.Build()).String()
}
String returns the string representation of the path with query string
package server_template
import (
	"errors"
	"net/url"
	golangswaggerpaths "path"
	"strings"
	"github.com/go-openapi/swag"
)
type DeleteServerTemplateURL struct {
	Prefix string
	Backend       string
	ForceReload   *bool
	TransactionID *string
	Version       *int64
	_basePath string
	_ struct{}
}
func (o *DeleteServerTemplateURL) WithBasePath(bp string) *DeleteServerTemplateURL {
	o.SetBasePath(bp)
	return o
}
func (o *DeleteServerTemplateURL) SetBasePath(bp string) {
	o._basePath = bp
}
func (o *DeleteServerTemplateURL) Build() (*url.URL, error) {
	var _result url.URL
	var _path = "/services/haproxy/configuration/server_templates/{prefix}"
	prefix := o.Prefix
	if prefix != "" {
		_path = strings.Replace(_path, "{prefix}", prefix, -1)
	} else {
		return nil, errors.New("prefix is required on DeleteServerTemplateURL")
	}
	_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)
	}
	var forceReloadQ string
	if o.ForceReload != nil {
		forceReloadQ = swag.FormatBool(*o.ForceReload)
	}
	if forceReloadQ != "" {
		qs.Set("force_reload", forceReloadQ)
	}
	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 *DeleteServerTemplateURL) Must(u *url.URL, err error) *url.URL {
	if err != nil {
		panic(err)
	}
	if u == nil {
		panic("url can't be nil")
	}
	return u
}