RIC:1060: Change in PTL
[ric-plt/xapp-frame.git] / pkg / clientapi / r_i_c_subscription_client.go
index 2acd8c0..47b7c1c 100644 (file)
@@ -8,13 +8,10 @@ package clientapi
 import (
        "github.com/go-openapi/runtime"
        httptransport "github.com/go-openapi/runtime/client"
-
-       strfmt "github.com/go-openapi/strfmt"
+       "github.com/go-openapi/strfmt"
 
        "gerrit.o-ran-sc.org/r/ric-plt/xapp-frame/pkg/clientapi/common"
-       "gerrit.o-ran-sc.org/r/ric-plt/xapp-frame/pkg/clientapi/policy"
-       "gerrit.o-ran-sc.org/r/ric-plt/xapp-frame/pkg/clientapi/query"
-       "gerrit.o-ran-sc.org/r/ric-plt/xapp-frame/pkg/clientapi/report"
+       "gerrit.o-ran-sc.org/r/ric-plt/xapp-frame/pkg/clientapi/xapp"
 )
 
 // Default r i c subscription HTTP client.
@@ -59,15 +56,8 @@ func New(transport runtime.ClientTransport, formats strfmt.Registry) *RICSubscri
 
        cli := new(RICSubscription)
        cli.Transport = transport
-
        cli.Common = common.New(transport, formats)
-
-       cli.Policy = policy.New(transport, formats)
-
-       cli.Query = query.New(transport, formats)
-
-       cli.Report = report.New(transport, formats)
-
+       cli.Xapp = xapp.New(transport, formats)
        return cli
 }
 
@@ -112,13 +102,9 @@ func (cfg *TransportConfig) WithSchemes(schemes []string) *TransportConfig {
 
 // RICSubscription is a client for r i c subscription
 type RICSubscription struct {
-       Common *common.Client
-
-       Policy *policy.Client
+       Common common.ClientService
 
-       Query *query.Client
-
-       Report *report.Client
+       Xapp xapp.ClientService
 
        Transport runtime.ClientTransport
 }
@@ -126,13 +112,6 @@ type RICSubscription struct {
 // SetTransport changes the transport on the client and all its subresources
 func (c *RICSubscription) SetTransport(transport runtime.ClientTransport) {
        c.Transport = transport
-
        c.Common.SetTransport(transport)
-
-       c.Policy.SetTransport(transport)
-
-       c.Query.SetTransport(transport)
-
-       c.Report.SetTransport(transport)
-
+       c.Xapp.SetTransport(transport)
 }