-
Notifications
You must be signed in to change notification settings - Fork 38
/
apis.go
148 lines (110 loc) · 3.74 KB
/
apis.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
// Code is generated by ucloud-model, DO NOT EDIT IT.
package ubox
import (
"github.com/ucloud/ucloud-sdk-go/ucloud/request"
"github.com/ucloud/ucloud-sdk-go/ucloud/response"
)
// UBox API Schema
// GetSdnboxCameraListRequest is request schema for GetSdnboxCameraList action
type GetSdnboxCameraListRequest struct {
request.CommonBase
}
// GetSdnboxCameraListResponse is response schema for GetSdnboxCameraList action
type GetSdnboxCameraListResponse struct {
response.CommonBase
// 摄像头推流列表
SdnboxCamera []SdnboxCamera
}
// NewGetSdnboxCameraListRequest will create request of GetSdnboxCameraList action.
func (c *UBoxClient) NewGetSdnboxCameraListRequest() *GetSdnboxCameraListRequest {
req := &GetSdnboxCameraListRequest{}
// setup request with client config
c.Client.SetupRequest(req)
// setup retryable with default retry policy (retry for non-create action and common error)
req.SetRetryable(true)
return req
}
/*
API: GetSdnboxCameraList
获取盒子摄像头推流列表
*/
func (c *UBoxClient) GetSdnboxCameraList(req *GetSdnboxCameraListRequest) (*GetSdnboxCameraListResponse, error) {
var err error
var res GetSdnboxCameraListResponse
reqCopier := *req
err = c.Client.InvokeAction("GetSdnboxCameraList", &reqCopier, &res)
if err != nil {
return &res, err
}
return &res, nil
}
// StartSdnboxCameraPushingRequest is request schema for StartSdnboxCameraPushing action
type StartSdnboxCameraPushingRequest struct {
request.CommonBase
// 摄像头ID
CameraId *string `required:"true"`
// 盒子ID
SdnboxId *string `required:"true"`
}
// StartSdnboxCameraPushingResponse is response schema for StartSdnboxCameraPushing action
type StartSdnboxCameraPushingResponse struct {
response.CommonBase
}
// NewStartSdnboxCameraPushingRequest will create request of StartSdnboxCameraPushing action.
func (c *UBoxClient) NewStartSdnboxCameraPushingRequest() *StartSdnboxCameraPushingRequest {
req := &StartSdnboxCameraPushingRequest{}
// setup request with client config
c.Client.SetupRequest(req)
// setup retryable with default retry policy (retry for non-create action and common error)
req.SetRetryable(true)
return req
}
/*
API: StartSdnboxCameraPushing
摄像头推流开启
*/
func (c *UBoxClient) StartSdnboxCameraPushing(req *StartSdnboxCameraPushingRequest) (*StartSdnboxCameraPushingResponse, error) {
var err error
var res StartSdnboxCameraPushingResponse
reqCopier := *req
err = c.Client.InvokeAction("StartSdnboxCameraPushing", &reqCopier, &res)
if err != nil {
return &res, err
}
return &res, nil
}
// StopSdnboxCameraPushingRequest is request schema for StopSdnboxCameraPushing action
type StopSdnboxCameraPushingRequest struct {
request.CommonBase
// 摄像头ID
CameraId *string `required:"true"`
// 盒子ID
SdnboxId *string `required:"true"`
}
// StopSdnboxCameraPushingResponse is response schema for StopSdnboxCameraPushing action
type StopSdnboxCameraPushingResponse struct {
response.CommonBase
}
// NewStopSdnboxCameraPushingRequest will create request of StopSdnboxCameraPushing action.
func (c *UBoxClient) NewStopSdnboxCameraPushingRequest() *StopSdnboxCameraPushingRequest {
req := &StopSdnboxCameraPushingRequest{}
// setup request with client config
c.Client.SetupRequest(req)
// setup retryable with default retry policy (retry for non-create action and common error)
req.SetRetryable(true)
return req
}
/*
API: StopSdnboxCameraPushing
摄像头推流关闭
*/
func (c *UBoxClient) StopSdnboxCameraPushing(req *StopSdnboxCameraPushingRequest) (*StopSdnboxCameraPushingResponse, error) {
var err error
var res StopSdnboxCameraPushingResponse
reqCopier := *req
err = c.Client.InvokeAction("StopSdnboxCameraPushing", &reqCopier, &res)
if err != nil {
return &res, err
}
return &res, nil
}