This repository has been archived by the owner on Apr 11, 2020. It is now read-only.
/
api_event_amf_subscription_info_document.go
96 lines (78 loc) · 2.86 KB
/
api_event_amf_subscription_info_document.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
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
/*
* Nudr_DataRepository API OpenAPI file
*
* Unified Data Repository Service
*
* API version: 1.0.0
* Generated by: OpenAPI Generator (https://openapi-generator.tech)
*/
package Nudr_DataRepository
import (
"free5gc/lib/openapi/common"
"context"
"fmt"
"io/ioutil"
"net/http"
"net/url"
"strings"
)
// Linger please
var (
_ context.Context
)
type EventAMFSubscriptionInfoDocumentApiService service
/*
EventAMFSubscriptionInfoDocumentApiService Deletes AMF Subscription Info for an eeSubscription
* @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
* @param ueId
* @param subsId
*/
func (a *EventAMFSubscriptionInfoDocumentApiService) RemoveAmfSubscriptionsInfo(ctx context.Context, ueId string, subsId string) (*http.Response, error) {
var (
localVarHTTPMethod = strings.ToUpper("Delete")
localVarPostBody interface{}
localVarFormFileName string
localVarFileName string
localVarFileBytes []byte
)
// create path and map variables
localVarPath := a.client.cfg.BasePath() + "/subscription-data/{ueId}/context-data/ee-subscriptions/{subsId}/amf-subscriptions"
localVarPath = strings.Replace(localVarPath, "{"+"ueId"+"}", fmt.Sprintf("%v", ueId), -1)
localVarPath = strings.Replace(localVarPath, "{"+"subsId"+"}", fmt.Sprintf("%v", subsId), -1)
localVarHeaderParams := make(map[string]string)
localVarQueryParams := url.Values{}
localVarFormParams := url.Values{}
localVarHTTPContentTypes := []string{"application/json"}
localVarHeaderParams["Content-Type"] = localVarHTTPContentTypes[0] // use the first content type specified in 'consumes'
// to determine the Accept header
localVarHTTPHeaderAccepts := []string{}
// set Accept header
localVarHTTPHeaderAccept := common.SelectHeaderAccept(localVarHTTPHeaderAccepts)
if localVarHTTPHeaderAccept != "" {
localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept
}
r, err := common.PrepareRequest(ctx, a.client.cfg, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFormFileName, localVarFileName, localVarFileBytes)
if err != nil {
return nil, err
}
localVarHTTPResponse, err := common.CallAPI(a.client.cfg, r)
if err != nil || localVarHTTPResponse == nil {
return localVarHTTPResponse, err
}
localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body)
localVarHTTPResponse.Body.Close()
if err != nil {
return localVarHTTPResponse, err
}
apiError := common.GenericOpenAPIError{
RawBody: localVarBody,
ErrorStatus: localVarHTTPResponse.Status,
}
_ = apiError
switch localVarHTTPResponse.StatusCode {
case 204:
return localVarHTTPResponse, nil
default:
return localVarHTTPResponse, common.ReportError("%d is not a valid status code in RemoveAmfSubscriptionsInfo", localVarHTTPResponse.StatusCode)
}
}