-
Notifications
You must be signed in to change notification settings - Fork 0
/
sci_zdxml.go
80 lines (71 loc) · 2.25 KB
/
sci_zdxml.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
package bigdog
// API Version: 1.0.0
import (
"context"
"net/http"
"time"
)
type SCIZoneDirectorXMLService struct {
apiClient *SCIClient
}
func NewSCIZoneDirectorXMLService(c *SCIClient) *SCIZoneDirectorXMLService {
s := new(SCIZoneDirectorXMLService)
s.apiClient = c
return s
}
func (ss *SCIService) SCIZoneDirectorXMLService() *SCIZoneDirectorXMLService {
return NewSCIZoneDirectorXMLService(ss.apiClient)
}
// ZdXmlGetAjaxRequest
//
// Operation ID: zdXml_getAjaxRequest
// Operation path: /zdXmls/getAjaxRequest
// Success code: 200 (OK)
//
// Required parameters:
// - systemid string
// - required
func (s *SCIZoneDirectorXMLService) ZdXmlGetAjaxRequest(ctx context.Context, systemid string, mutators ...RequestMutator) (*RawAPIResponse, error) {
var (
req *APIRequest
httpResp *http.Response
execDur time.Duration
resp APIResponse
err error
respFn = newRawAPIResponse
)
req = apiRequestFromPool(APISourceSCI, http.MethodGet, RouteSCIZdXmlGetAjaxRequest, true)
defer recycleAPIRequest(req)
req.Header.Set(headerKeyAccept, "*/*")
req.QueryParams.Set("system_id", systemid)
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
}
// ZdXmlUpload
//
// Operation ID: zdXml_upload
// Operation path: /zdXmls/{container}/upload
// Success code: 200 (OK)
//
// Required parameters:
// - container string
// - required
func (s *SCIZoneDirectorXMLService) ZdXmlUpload(ctx context.Context, container string, mutators ...RequestMutator) (*RawAPIResponse, error) {
var (
req *APIRequest
httpResp *http.Response
execDur time.Duration
resp APIResponse
err error
respFn = newRawAPIResponse
)
req = apiRequestFromPool(APISourceSCI, http.MethodPost, RouteSCIZdXmlUpload, true)
defer recycleAPIRequest(req)
req.Header.Set(headerKeyContentType, "*/*")
req.Header.Set(headerKeyAccept, "*/*")
req.PathParams.Set("container", container)
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
}