/
client.go
54 lines (44 loc) · 1.54 KB
/
client.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
/*
* JOSE Protected Message Forwarding API
*
* N32-f Message Forwarding Service. © 2021, 3GPP Organizational Partners (ARIB, ATIS, CCSA, ETSI, TSDSI, TTA, TTC). All rights reserved.
*
* Source file: 3GPP TS 29.573 V16.6.0; 5G System; Public Land Mobile Network (PLMN) Interconnection; Stage 3
* Url: http://www.3gpp.org/ftp/Specs/archive/29_series/29.573/
*
* API version: 1.1.2
* Generated by: OpenAPI Generator (https://openapi-generator.tech)
*/
package JOSEProtectedMessageForwarding
import (
"crypto/tls"
"net/http"
"golang.org/x/net/http2"
)
// APIClient manages communication with the JOSE Protected Message Forwarding API API v1.1.2
// In most cases there should be only one, shared, APIClient.
type APIClient struct {
cfg *Configuration
common service // Reuse a single struct instead of allocating one for each service on the heap.
// API Services
N32FForwardApi *N32FForwardApiService
}
type service struct {
client *APIClient
}
// NewAPIClient creates a new API client. Requires a userAgent string describing your application.
// optionally a custom http.Client to allow for advanced features such as caching.
func NewAPIClient(cfg *Configuration) *APIClient {
if cfg.httpClient == nil {
cfg.httpClient = http.DefaultClient
cfg.httpClient.Transport = &http2.Transport{
TLSClientConfig: &tls.Config{InsecureSkipVerify: true},
}
}
c := &APIClient{}
c.cfg = cfg
c.common.client = c
// API Services
c.N32FForwardApi = (*N32FForwardApiService)(&c.common)
return c
}