1 // Code generated by go-swagger; DO NOT EDIT.
5 // This file was generated by the swagger tool.
6 // Editing this file might prove futile when you re-run the generate command
11 golangswaggerpaths "path"
15 // UnsubscribeURL generates an URL for the unsubscribe operation
16 type UnsubscribeURL struct {
20 // avoid unkeyed usage
24 // WithBasePath sets the base path for this url builder, only required when it's different from the
25 // base path specified in the swagger spec.
26 // When the value of the base path is an empty string
27 func (o *UnsubscribeURL) WithBasePath(bp string) *UnsubscribeURL {
32 // SetBasePath sets the base path for this url builder, only required when it's different from the
33 // base path specified in the swagger spec.
34 // When the value of the base path is an empty string
35 func (o *UnsubscribeURL) SetBasePath(bp string) {
39 // Build a url path and query string
40 func (o *UnsubscribeURL) Build() (*url.URL, error) {
43 var _path = "/subscriptions/{subscriptionId}"
45 subscriptionID := o.SubscriptionID
46 if subscriptionID != "" {
47 _path = strings.Replace(_path, "{subscriptionId}", subscriptionID, -1)
49 return nil, errors.New("subscriptionId is required on UnsubscribeURL")
52 _basePath := o._basePath
56 _result.Path = golangswaggerpaths.Join(_basePath, _path)
61 // Must is a helper function to panic when the url builder returns an error
62 func (o *UnsubscribeURL) Must(u *url.URL, err error) *url.URL {
67 panic("url can't be nil")
72 // String returns the string representation of the path with query string
73 func (o *UnsubscribeURL) String() string {
74 return o.Must(o.Build()).String()
77 // BuildFull builds a full url with scheme, host, path and query string
78 func (o *UnsubscribeURL) BuildFull(scheme, host string) (*url.URL, error) {
80 return nil, errors.New("scheme is required for a full url on UnsubscribeURL")
83 return nil, errors.New("host is required for a full url on UnsubscribeURL")
86 base, err := o.Build()
96 // StringFull returns the string representation of a complete url
97 func (o *UnsubscribeURL) StringFull(scheme, host string) string {
98 return o.Must(o.BuildFull(scheme, host)).String()