func (o *GetHTTPResponseRuleURL) String() string {
	return o.Must(o.Build()).String()
}
String returns the string representation of the path with query string
package http_response_rule
import (
	"errors"
	"net/url"
	golangswaggerpaths "path"
	"strings"
	"github.com/go-openapi/swag"
)
type GetHTTPResponseRuleURL struct {
	Index int64
	ParentName    string
	ParentType    string
	TransactionID *string
	_basePath string
	_ struct{}
}
func (o *GetHTTPResponseRuleURL) WithBasePath(bp string) *GetHTTPResponseRuleURL {
	o.SetBasePath(bp)
	return o
}
func (o *GetHTTPResponseRuleURL) SetBasePath(bp string) {
	o._basePath = bp
}
func (o *GetHTTPResponseRuleURL) Build() (*url.URL, error) {
	var _result url.URL
	var _path = "/services/haproxy/configuration/http_response_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 GetHTTPResponseRuleURL")
	}
	_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 *GetHTTPResponseRuleURL) Must(u *url.URL, err error) *url.URL {
	if err != nil {
		panic(err)
	}
	if u == nil {
		panic("url can't be nil")
	}
	return u
}