Enhancements of REST-based E2 subscription interface
[ric-plt/xapp-frame.git] / pkg / clientapi / xapp / xapp_client.go
similarity index 66%
rename from pkg/clientapi/query/query_client.go
rename to pkg/clientapi/xapp/xapp_client.go
index a73fd7e..a914611 100644 (file)
@@ -1,6 +1,6 @@
 // Code generated by go-swagger; DO NOT EDIT.
 
-package query
+package xapp
 
 // This file was generated by the swagger tool.
 // Editing this file might prove futile when you re-run the swagger generate command
@@ -11,13 +11,13 @@ import (
        strfmt "github.com/go-openapi/strfmt"
 )
 
-// New creates a new query API client.
+// New creates a new xapp API client.
 func New(transport runtime.ClientTransport, formats strfmt.Registry) *Client {
        return &Client{transport: transport, formats: formats}
 }
 
 /*
-Client for query API
+Client for xapp API
 */
 type Client struct {
        transport runtime.ClientTransport
@@ -25,30 +25,30 @@ type Client struct {
 }
 
 /*
-GetAllSubscriptions returns list of subscriptions
+GetXappConfigList returns the configuration of all xapps
 */
-func (a *Client) GetAllSubscriptions(params *GetAllSubscriptionsParams) (*GetAllSubscriptionsOK, error) {
+func (a *Client) GetXappConfigList(params *GetXappConfigListParams) (*GetXappConfigListOK, error) {
        // TODO: Validate the params before sending
        if params == nil {
-               params = NewGetAllSubscriptionsParams()
+               params = NewGetXappConfigListParams()
        }
 
        result, err := a.transport.Submit(&runtime.ClientOperation{
-               ID:                 "getAllSubscriptions",
+               ID:                 "getXappConfigList",
                Method:             "GET",
-               PathPattern:        "/subscriptions",
-               ProducesMediaTypes: []string{"application/json"},
+               PathPattern:        "/config",
+               ProducesMediaTypes: []string{"application/json", "application/xml"},
                ConsumesMediaTypes: []string{""},
                Schemes:            []string{"http"},
                Params:             params,
-               Reader:             &GetAllSubscriptionsReader{formats: a.formats},
+               Reader:             &GetXappConfigListReader{formats: a.formats},
                Context:            params.Context,
                Client:             params.HTTPClient,
        })
        if err != nil {
                return nil, err
        }
-       return result.(*GetAllSubscriptionsOK), nil
+       return result.(*GetXappConfigListOK), nil
 
 }