func (o *GetFilterURL) String() string {
	return o.Must(o.Build()).String()
}
String returns the string representation of the path with query string
package filter
import (
	"errors"
	"net/url"
	golangswaggerpaths "path"
	"strings"
	"github.com/go-openapi/swag"
)
type GetFilterURL struct {
	Index int64
	ParentName    string
	ParentType    string
	TransactionID *string
	_basePath string
	_ struct{}
}
func (o *GetFilterURL) WithBasePath(bp string) *GetFilterURL {
	o.SetBasePath(bp)
	return o
}
func (o *GetFilterURL) SetBasePath(bp string) {
	o._basePath = bp
}
func (o *GetFilterURL) Build() (*url.URL, error) {
	var _result url.URL
	var _path = "/services/haproxy/configuration/filters/{index}"
	index := swag.FormatInt64(o.Index)
	if index != "" {
		_path = strings.Replace(_path, "{index}", index, -1)
	} else {
		return nil, errors.New("index is required on GetFilterURL")
	}
	_basePath := o._basePath
	if _basePath == "" {
		_basePath = "/v2"
	}
	_result.Path = golangswaggerpaths.Join(_basePath, _path)
	qs := make(url.Values)
	parentNameQ := o.ParentName
	if parentNameQ != "" {
		qs.Set("parent_name", parentNameQ)
	}
	parentTypeQ := o.ParentType
	if parentTypeQ != "" {
		qs.Set("parent_type", parentTypeQ)
	}
	var transactionIDQ string
	if o.TransactionID != nil {
		transactionIDQ = *o.TransactionID
	}
	if transactionIDQ != "" {
		qs.Set("transaction_id", transactionIDQ)
	}
	_result.RawQuery = qs.Encode()
	return &_result, nil
}
func (o *GetFilterURL) Must(u *url.URL, err error) *url.URL {
	if err != nil {
		panic(err)
	}
	if u == nil {
		panic("url can't be nil")
	}
	return u
}