github.com/free5gc/openapi@v1.0.8/Nnssf_NSSelection/client.go (about)

     1  /*
     2   * NSSF NS Selection
     3   *
     4   * NSSF Network Slice Selection Service
     5   *
     6   * API version: 1.0.0
     7   * Generated by: OpenAPI Generator (https://openapi-generator.tech)
     8   */
     9  
    10  package Nnssf_NSSelection
    11  
    12  // APIClient manages communication with the NSSF NS Selection API v1.0.0
    13  // In most cases there should be only one, shared, APIClient.
    14  type APIClient struct {
    15  	cfg    *Configuration
    16  	common service // Reuse a single struct instead of allocating one for each service on the heap.
    17  
    18  	// API Services
    19  	NetworkSliceInformationDocumentApi *NetworkSliceInformationDocumentApiService
    20  }
    21  
    22  type service struct {
    23  	client *APIClient
    24  }
    25  
    26  // NewAPIClient creates a new API client. Requires a userAgent string describing your application.
    27  // optionally a custom http.Client to allow for advanced features such as caching.
    28  func NewAPIClient(cfg *Configuration) *APIClient {
    29  	c := &APIClient{}
    30  	c.cfg = cfg
    31  	c.common.client = c
    32  
    33  	// API Services
    34  	c.NetworkSliceInformationDocumentApi = (*NetworkSliceInformationDocumentApiService)(&c.common)
    35  
    36  	return c
    37  }