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

     1  /*
     2   * Npcf_SMPolicyControl
     3   *
     4   * Session Management Policy Control Service
     5   *
     6   * API version: 1.0.1
     7   * Generated by: OpenAPI Generator (https://openapi-generator.tech)
     8   */
     9  
    10  package Npcf_SMPolicyControl
    11  
    12  // APIClient manages communication with the Npcf_SMPolicyControl API v1.0.1
    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  	DefaultApi         *DefaultApiService
    20  	DefaultCallbackApi *DefaultCallbackApi
    21  }
    22  
    23  type service struct {
    24  	client *APIClient
    25  }
    26  
    27  // NewAPIClient creates a new API client. Requires a userAgent string describing your application.
    28  // optionally a custom http.Client to allow for advanced features such as caching.
    29  func NewAPIClient(cfg *Configuration) *APIClient {
    30  	c := &APIClient{}
    31  	c.cfg = cfg
    32  	c.common.client = c
    33  
    34  	// API Services
    35  	c.DefaultApi = (*DefaultApiService)(&c.common)
    36  	c.DefaultCallbackApi = (*DefaultCallbackApi)(&c.common)
    37  
    38  	return c
    39  }