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

     1  /*
     2   * Npcf_BDTPolicyControl Service API
     3   *
     4   * The Npcf_BDTPolicyControl Service is used by an NF service consumer to retrieve background data transfer policies from the PCF and to update the PCF with the background data transfer policy selected by the NF service consumer.
     5   *
     6   * API version: 1.0.0
     7   * Generated by: OpenAPI Generator (https://openapi-generator.tech)
     8   */
     9  
    10  package Npcf_BDTPolicyControl
    11  
    12  // APIClient manages communication with the Npcf_BDTPolicyControl Service API 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  	BDTPoliciesCollectionApi       *BDTPoliciesCollectionApiService
    20  	IndividualBDTPolicyDocumentApi *IndividualBDTPolicyDocumentApiService
    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.BDTPoliciesCollectionApi = (*BDTPoliciesCollectionApiService)(&c.common)
    36  	c.IndividualBDTPolicyDocumentApi = (*IndividualBDTPolicyDocumentApiService)(&c.common)
    37  
    38  	return c
    39  }