func (o *GetSpoeMessageURL) String() string {
	return o.Must(o.Build()).String()
}
String returns the string representation of the path with query string
package spoe
import (
	"errors"
	"net/url"
	golangswaggerpaths "path"
	"strings"
)
type GetSpoeMessageURL struct {
	Name string
	Scope         string
	Spoe          string
	TransactionID *string
	_basePath string
	_ struct{}
}
func (o *GetSpoeMessageURL) WithBasePath(bp string) *GetSpoeMessageURL {
	o.SetBasePath(bp)
	return o
}
func (o *GetSpoeMessageURL) SetBasePath(bp string) {
	o._basePath = bp
}
func (o *GetSpoeMessageURL) Build() (*url.URL, error) {
	var _result url.URL
	var _path = "/services/haproxy/spoe/spoe_messages/{name}"
	name := o.Name
	if name != "" {
		_path = strings.Replace(_path, "{name}", name, -1)
	} else {
		return nil, errors.New("name is required on GetSpoeMessageURL")
	}
	_basePath := o._basePath
	if _basePath == "" {
		_basePath = "/v2"
	}
	_result.Path = golangswaggerpaths.Join(_basePath, _path)
	qs := make(url.Values)
	scopeQ := o.Scope
	if scopeQ != "" {
		qs.Set("scope", scopeQ)
	}
	spoeQ := o.Spoe
	if spoeQ != "" {
		qs.Set("spoe", spoeQ)
	}
	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 *GetSpoeMessageURL) Must(u *url.URL, err error) *url.URL {
	if err != nil {
		panic(err)
	}
	if u == nil {
		panic("url can't be nil")
	}
	return u
}