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"
14 "github.com/go-openapi/swag"
17 // UnsubscribeURL generates an URL for the unsubscribe operation
18 type UnsubscribeURL struct {
22 // avoid unkeyed usage
26 // WithBasePath sets the base path for this url builder, only required when it's different from the
27 // base path specified in the swagger spec.
28 // When the value of the base path is an empty string
29 func (o *UnsubscribeURL) WithBasePath(bp string) *UnsubscribeURL {
34 // SetBasePath sets the base path for this url builder, only required when it's different from the
35 // base path specified in the swagger spec.
36 // When the value of the base path is an empty string
37 func (o *UnsubscribeURL) SetBasePath(bp string) {
41 // Build a url path and query string
42 func (o *UnsubscribeURL) Build() (*url.URL, error) {
45 var _path = "/subscriptions/{subscriptionId}"
47 subscriptionID := swag.FormatInt64(o.SubscriptionID)
48 if subscriptionID != "" {
49 _path = strings.Replace(_path, "{subscriptionId}", subscriptionID, -1)
51 return nil, errors.New("subscriptionId is required on UnsubscribeURL")
54 _basePath := o._basePath
58 _result.Path = golangswaggerpaths.Join(_basePath, _path)
63 // Must is a helper function to panic when the url builder returns an error
64 func (o *UnsubscribeURL) Must(u *url.URL, err error) *url.URL {
69 panic("url can't be nil")
74 // String returns the string representation of the path with query string
75 func (o *UnsubscribeURL) String() string {
76 return o.Must(o.Build()).String()
79 // BuildFull builds a full url with scheme, host, path and query string
80 func (o *UnsubscribeURL) BuildFull(scheme, host string) (*url.URL, error) {
82 return nil, errors.New("scheme is required for a full url on UnsubscribeURL")
85 return nil, errors.New("host is required for a full url on UnsubscribeURL")
88 base, err := o.Build()
98 // StringFull returns the string representation of a complete url
99 func (o *UnsubscribeURL) StringFull(scheme, host string) string {
100 return o.Must(o.BuildFull(scheme, host)).String()