X-Git-Url: https://gerrit.o-ran-sc.org/r/gitweb?a=blobdiff_plain;ds=sidebyside;f=pkg%2Frestapi%2Foperations%2Fcommon%2Fsubscribe_urlbuilder.go;fp=pkg%2Frestapi%2Foperations%2Fpolicy%2Fsubscribe_policy_urlbuilder.go;h=b3b97e31294300fa51599eccfd85e609e621feca;hb=3602bf801fef17e317cb35a4c710118ec80908b9;hp=2274f404c7a883594071b3feadbe77b6aa6d7032;hpb=060448c051013852d463bc13bfc5f0aa3696ac9c;p=ric-plt%2Fxapp-frame.git diff --git a/pkg/restapi/operations/policy/subscribe_policy_urlbuilder.go b/pkg/restapi/operations/common/subscribe_urlbuilder.go similarity index 72% rename from pkg/restapi/operations/policy/subscribe_policy_urlbuilder.go rename to pkg/restapi/operations/common/subscribe_urlbuilder.go index 2274f40..b3b97e3 100644 --- a/pkg/restapi/operations/policy/subscribe_policy_urlbuilder.go +++ b/pkg/restapi/operations/common/subscribe_urlbuilder.go @@ -1,6 +1,6 @@ // Code generated by go-swagger; DO NOT EDIT. -package policy +package common // This file was generated by the swagger tool. // Editing this file might prove futile when you re-run the generate command @@ -11,15 +11,15 @@ import ( golangswaggerpaths "path" ) -// SubscribePolicyURL generates an URL for the subscribe policy operation -type SubscribePolicyURL struct { +// SubscribeURL generates an URL for the subscribe operation +type SubscribeURL struct { _basePath string } // WithBasePath sets the base path for this url builder, only required when it's different from the // base path specified in the swagger spec. // When the value of the base path is an empty string -func (o *SubscribePolicyURL) WithBasePath(bp string) *SubscribePolicyURL { +func (o *SubscribeURL) WithBasePath(bp string) *SubscribeURL { o.SetBasePath(bp) return o } @@ -27,15 +27,15 @@ func (o *SubscribePolicyURL) WithBasePath(bp string) *SubscribePolicyURL { // SetBasePath sets the base path for this url builder, only required when it's different from the // base path specified in the swagger spec. // When the value of the base path is an empty string -func (o *SubscribePolicyURL) SetBasePath(bp string) { +func (o *SubscribeURL) SetBasePath(bp string) { o._basePath = bp } // Build a url path and query string -func (o *SubscribePolicyURL) Build() (*url.URL, error) { +func (o *SubscribeURL) Build() (*url.URL, error) { var _result url.URL - var _path = "/subscriptions/policy" + var _path = "/subscriptions" _basePath := o._basePath if _basePath == "" { @@ -47,7 +47,7 @@ func (o *SubscribePolicyURL) Build() (*url.URL, error) { } // Must is a helper function to panic when the url builder returns an error -func (o *SubscribePolicyURL) Must(u *url.URL, err error) *url.URL { +func (o *SubscribeURL) Must(u *url.URL, err error) *url.URL { if err != nil { panic(err) } @@ -58,17 +58,17 @@ func (o *SubscribePolicyURL) Must(u *url.URL, err error) *url.URL { } // String returns the string representation of the path with query string -func (o *SubscribePolicyURL) String() string { +func (o *SubscribeURL) String() string { return o.Must(o.Build()).String() } // BuildFull builds a full url with scheme, host, path and query string -func (o *SubscribePolicyURL) BuildFull(scheme, host string) (*url.URL, error) { +func (o *SubscribeURL) BuildFull(scheme, host string) (*url.URL, error) { if scheme == "" { - return nil, errors.New("scheme is required for a full url on SubscribePolicyURL") + return nil, errors.New("scheme is required for a full url on SubscribeURL") } if host == "" { - return nil, errors.New("host is required for a full url on SubscribePolicyURL") + return nil, errors.New("host is required for a full url on SubscribeURL") } base, err := o.Build() @@ -82,6 +82,6 @@ func (o *SubscribePolicyURL) BuildFull(scheme, host string) (*url.URL, error) { } // StringFull returns the string representation of a complete url -func (o *SubscribePolicyURL) StringFull(scheme, host string) string { +func (o *SubscribeURL) StringFull(scheme, host string) string { return o.Must(o.BuildFull(scheme, host)).String() }