-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathwsg_accesspointapp.go
172 lines (159 loc) · 5.37 KB
/
wsg_accesspointapp.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
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
package bigdog
// API Version: v9_1
import (
"context"
"io"
"net/http"
"time"
)
type WSGAccessPointAppService struct {
apiClient *VSZClient
}
func NewWSGAccessPointAppService(c *VSZClient) *WSGAccessPointAppService {
s := new(WSGAccessPointAppService)
s.apiClient = c
return s
}
func (ss *WSGService) WSGAccessPointAppService() *WSGAccessPointAppService {
return NewWSGAccessPointAppService(ss.apiClient)
}
// FindApsLineman
//
// Use this API command to retrieve the summary information of an AP. This is used by the Ruckus Wireless AP mobile app.
//
// Operation ID: findApsLineman
// Operation path: /aps/lineman
// Success code: 200 (OK)
//
// Optional parameters:
// - domainId string
// - nullable
// - index string
// - nullable
// - listSize string
// - nullable
// - showAlarm string
// - nullable
// - zoneId string
// - nullable
func (s *WSGAccessPointAppService) FindApsLineman(ctx context.Context, optionalParams map[string][]string, mutators ...RequestMutator) (*WSGAPLinemanSummaryAPIResponse, error) {
var (
req *APIRequest
httpResp *http.Response
execDur time.Duration
resp APIResponse
err error
respFn = newWSGAPLinemanSummaryAPIResponse
)
req = apiRequestFromPool(APISourceVSZ, http.MethodGet, RouteWSGFindApsLineman, true)
defer recycleAPIRequest(req)
req.Header.Set(headerKeyAccept, "*/*")
if v, ok := optionalParams["domainId"]; ok && len(v) > 0 {
req.QueryParams.SetStrings("domainId", v)
}
if v, ok := optionalParams["index"]; ok && len(v) > 0 {
req.QueryParams.SetStrings("index", v)
}
if v, ok := optionalParams["listSize"]; ok && len(v) > 0 {
req.QueryParams.SetStrings("listSize", v)
}
if v, ok := optionalParams["showAlarm"]; ok && len(v) > 0 {
req.QueryParams.SetStrings("showAlarm", v)
}
if v, ok := optionalParams["zoneId"]; ok && len(v) > 0 {
req.QueryParams.SetStrings("zoneId", v)
}
httpResp, execDur, err = s.apiClient.Do(ctx, req, mutators...)
resp, err = handleAPIResponse(req, http.StatusOK, httpResp, execDur, respFn, s.apiClient.autoHydrate, s.apiClient.ev, err)
return resp.(*WSGAPLinemanSummaryAPIResponse), err
}
// FindApsTotalCount
//
// Use this API command to retrieve the total AP count within a zone or a domain.
//
// Operation ID: findApsTotalCount
// Operation path: /aps/totalCount
// Success code: 200 (OK)
//
// Optional parameters:
// - domainId string
// - nullable
// - zoneId string
// - nullable
func (s *WSGAccessPointAppService) FindApsTotalCount(ctx context.Context, optionalParams map[string][]string, mutators ...RequestMutator) (*RawAPIResponse, error) {
var (
req *APIRequest
httpResp *http.Response
execDur time.Duration
resp APIResponse
err error
respFn = newRawAPIResponse
)
req = apiRequestFromPool(APISourceVSZ, http.MethodGet, RouteWSGFindApsTotalCount, true)
defer recycleAPIRequest(req)
req.Header.Set(headerKeyAccept, "*/*")
if v, ok := optionalParams["domainId"]; ok && len(v) > 0 {
req.QueryParams.SetStrings("domainId", v)
}
if v, ok := optionalParams["zoneId"]; ok && len(v) > 0 {
req.QueryParams.SetStrings("zoneId", v)
}
httpResp, execDur, err = s.apiClient.Do(ctx, req, mutators...)
resp, err = handleAPIResponse(req, http.StatusOK, httpResp, execDur, respFn, s.apiClient.autoHydrate, s.apiClient.ev, err)
return resp.(*RawAPIResponse), err
}
// FindLinemanWorkflow
//
// Use this API command to download the workflow file used by the Ruckus Wireless AP mobile app.
//
// Operation ID: findLinemanWorkflow
// Operation path: /lineman/workflow
// Success code: 200 (OK)
func (s *WSGAccessPointAppService) FindLinemanWorkflow(ctx context.Context, mutators ...RequestMutator) (*FileAPIResponse, error) {
var (
req *APIRequest
httpResp *http.Response
execDur time.Duration
resp APIResponse
err error
respFn = newFileAPIResponse
)
req = apiRequestFromPool(APISourceVSZ, http.MethodGet, RouteWSGFindLinemanWorkflow, true)
defer recycleAPIRequest(req)
req.Header.Set(headerKeyAccept, "*/*")
httpResp, execDur, err = s.apiClient.Do(ctx, req, mutators...)
resp, err = handleAPIResponse(req, http.StatusOK, httpResp, execDur, respFn, s.apiClient.autoHydrate, s.apiClient.ev, err)
return resp.(*FileAPIResponse), err
}
// UpdateLinemanWorkflow
//
// Use this API command to upload a workflow file used by the Ruckus Wireless AP mobile app.
//
// Operation ID: updateLinemanWorkflow
// Operation path: /lineman/workflow
// Success code: 204 (No Content)
//
// Form data parameters:
// - uploadFile io.Reader
// - required
func (s *WSGAccessPointAppService) UpdateLinemanWorkflow(ctx context.Context, filename string, uploadFile io.Reader, mutators ...RequestMutator) (*EmptyAPIResponse, error) {
var (
req *APIRequest
httpResp *http.Response
execDur time.Duration
resp APIResponse
err error
respFn = newEmptyAPIResponse
)
req = apiRequestFromPool(APISourceVSZ, http.MethodPut, RouteWSGUpdateLinemanWorkflow, true)
defer recycleAPIRequest(req)
req.Header.Set(headerKeyContentType, headerValueMultipartFormData)
req.Header.Set(headerKeyAccept, "*/*")
req.MultipartForm()
if err = req.AddMultipartFile("uploadFile", filename, uploadFile); err != nil {
return resp.(*EmptyAPIResponse), err
}
httpResp, execDur, err = s.apiClient.Do(ctx, req, mutators...)
resp, err = handleAPIResponse(req, http.StatusNoContent, httpResp, execDur, respFn, s.apiClient.autoHydrate, s.apiClient.ev, err)
return resp.(*EmptyAPIResponse), err
}