-
Notifications
You must be signed in to change notification settings - Fork 280
/
TrroClient.java
294 lines (266 loc) · 11.3 KB
/
TrroClient.java
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
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
/*
* Copyright (c) 2017-2018 THL A29 Limited, a Tencent company. All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package com.tencentcloudapi.trro.v20220325;
import java.lang.reflect.Type;
import com.google.gson.JsonSyntaxException;
import com.google.gson.reflect.TypeToken;
import com.tencentcloudapi.common.exception.TencentCloudSDKException;
import com.tencentcloudapi.common.AbstractClient;
import com.tencentcloudapi.common.profile.ClientProfile;
import com.tencentcloudapi.common.JsonResponseModel;
import com.tencentcloudapi.common.Credential;
import com.tencentcloudapi.trro.v20220325.models.*;
public class TrroClient extends AbstractClient{
private static String endpoint = "trro.tencentcloudapi.com";
private static String service = "trro";
private static String version = "2022-03-25";
public TrroClient(Credential credential, String region) {
this(credential, region, new ClientProfile());
}
public TrroClient(Credential credential, String region, ClientProfile profile) {
super(TrroClient.endpoint, TrroClient.version, credential, region, profile);
}
/**
*用于批量删除设备
* @param req BatchDeleteDevicesRequest
* @return BatchDeleteDevicesResponse
* @throws TencentCloudSDKException
*/
public BatchDeleteDevicesResponse BatchDeleteDevices(BatchDeleteDevicesRequest req) throws TencentCloudSDKException{
req.setSkipSign(false);
return this.internalRequest(req, "BatchDeleteDevices", BatchDeleteDevicesResponse.class);
}
/**
*用于批量删除修改权限配置
* @param req BatchDeletePolicyRequest
* @return BatchDeletePolicyResponse
* @throws TencentCloudSDKException
*/
public BatchDeletePolicyResponse BatchDeletePolicy(BatchDeletePolicyRequest req) throws TencentCloudSDKException{
req.setSkipSign(false);
return this.internalRequest(req, "BatchDeletePolicy", BatchDeletePolicyResponse.class);
}
/**
*为推流设备绑定license,优先绑定到期时间最近的,到期时间相同优先绑定月包
* @param req BoundLicensesRequest
* @return BoundLicensesResponse
* @throws TencentCloudSDKException
*/
public BoundLicensesResponse BoundLicenses(BoundLicensesRequest req) throws TencentCloudSDKException{
req.setSkipSign(false);
return this.internalRequest(req, "BoundLicenses", BoundLicensesResponse.class);
}
/**
*用于创建设备
* @param req CreateDeviceRequest
* @return CreateDeviceResponse
* @throws TencentCloudSDKException
*/
public CreateDeviceResponse CreateDevice(CreateDeviceRequest req) throws TencentCloudSDKException{
req.setSkipSign(false);
return this.internalRequest(req, "CreateDevice", CreateDeviceResponse.class);
}
/**
*用于创建项目
* @param req CreateProjectRequest
* @return CreateProjectResponse
* @throws TencentCloudSDKException
*/
public CreateProjectResponse CreateProject(CreateProjectRequest req) throws TencentCloudSDKException{
req.setSkipSign(false);
return this.internalRequest(req, "CreateProject", CreateProjectResponse.class);
}
/**
*用于删除项目
* @param req DeleteProjectRequest
* @return DeleteProjectResponse
* @throws TencentCloudSDKException
*/
public DeleteProjectResponse DeleteProject(DeleteProjectRequest req) throws TencentCloudSDKException{
req.setSkipSign(false);
return this.internalRequest(req, "DeleteProject", DeleteProjectResponse.class);
}
/**
*用于获取指定设备信息
* @param req DescribeDeviceInfoRequest
* @return DescribeDeviceInfoResponse
* @throws TencentCloudSDKException
*/
public DescribeDeviceInfoResponse DescribeDeviceInfo(DescribeDeviceInfoRequest req) throws TencentCloudSDKException{
req.setSkipSign(false);
return this.internalRequest(req, "DescribeDeviceInfo", DescribeDeviceInfoResponse.class);
}
/**
*用于获取设备信息列表
* @param req DescribeDeviceListRequest
* @return DescribeDeviceListResponse
* @throws TencentCloudSDKException
*/
public DescribeDeviceListResponse DescribeDeviceList(DescribeDeviceListRequest req) throws TencentCloudSDKException{
req.setSkipSign(false);
return this.internalRequest(req, "DescribeDeviceList", DescribeDeviceListResponse.class);
}
/**
*获取设备会话数据详单
* @param req DescribeDeviceSessionDetailsRequest
* @return DescribeDeviceSessionDetailsResponse
* @throws TencentCloudSDKException
*/
public DescribeDeviceSessionDetailsResponse DescribeDeviceSessionDetails(DescribeDeviceSessionDetailsRequest req) throws TencentCloudSDKException{
req.setSkipSign(false);
return this.internalRequest(req, "DescribeDeviceSessionDetails", DescribeDeviceSessionDetailsResponse.class);
}
/**
*获取设备会话列表
* @param req DescribeDeviceSessionListRequest
* @return DescribeDeviceSessionListResponse
* @throws TencentCloudSDKException
*/
public DescribeDeviceSessionListResponse DescribeDeviceSessionList(DescribeDeviceSessionListRequest req) throws TencentCloudSDKException{
req.setSkipSign(false);
return this.internalRequest(req, "DescribeDeviceSessionList", DescribeDeviceSessionListResponse.class);
}
/**
*用于查看权限配置
* @param req DescribePolicyRequest
* @return DescribePolicyResponse
* @throws TencentCloudSDKException
*/
public DescribePolicyResponse DescribePolicy(DescribePolicyRequest req) throws TencentCloudSDKException{
req.setSkipSign(false);
return this.internalRequest(req, "DescribePolicy", DescribePolicyResponse.class);
}
/**
*用于获取项目信息
* @param req DescribeProjectInfoRequest
* @return DescribeProjectInfoResponse
* @throws TencentCloudSDKException
*/
public DescribeProjectInfoResponse DescribeProjectInfo(DescribeProjectInfoRequest req) throws TencentCloudSDKException{
req.setSkipSign(false);
return this.internalRequest(req, "DescribeProjectInfo", DescribeProjectInfoResponse.class);
}
/**
*用于获取项目列表
* @param req DescribeProjectListRequest
* @return DescribeProjectListResponse
* @throws TencentCloudSDKException
*/
public DescribeProjectListResponse DescribeProjectList(DescribeProjectListRequest req) throws TencentCloudSDKException{
req.setSkipSign(false);
return this.internalRequest(req, "DescribeProjectList", DescribeProjectListResponse.class);
}
/**
*获取最新设备会话列表
* @param req DescribeRecentSessionListRequest
* @return DescribeRecentSessionListResponse
* @throws TencentCloudSDKException
*/
public DescribeRecentSessionListResponse DescribeRecentSessionList(DescribeRecentSessionListRequest req) throws TencentCloudSDKException{
req.setSkipSign(false);
return this.internalRequest(req, "DescribeRecentSessionList", DescribeRecentSessionListResponse.class);
}
/**
*获取会话统计值
* @param req DescribeSessionStatisticsRequest
* @return DescribeSessionStatisticsResponse
* @throws TencentCloudSDKException
*/
public DescribeSessionStatisticsResponse DescribeSessionStatistics(DescribeSessionStatisticsRequest req) throws TencentCloudSDKException{
req.setSkipSign(false);
return this.internalRequest(req, "DescribeSessionStatistics", DescribeSessionStatisticsResponse.class);
}
/**
*获取各时间段的会话统计值
* @param req DescribeSessionStatisticsByIntervalRequest
* @return DescribeSessionStatisticsByIntervalResponse
* @throws TencentCloudSDKException
*/
public DescribeSessionStatisticsByIntervalResponse DescribeSessionStatisticsByInterval(DescribeSessionStatisticsByIntervalRequest req) throws TencentCloudSDKException{
req.setSkipSign(false);
return this.internalRequest(req, "DescribeSessionStatisticsByInterval", DescribeSessionStatisticsByIntervalResponse.class);
}
/**
*获取设备已经绑定的可用授权数量
* @param req GetDeviceLicenseRequest
* @return GetDeviceLicenseResponse
* @throws TencentCloudSDKException
*/
public GetDeviceLicenseResponse GetDeviceLicense(GetDeviceLicenseRequest req) throws TencentCloudSDKException{
req.setSkipSign(false);
return this.internalRequest(req, "GetDeviceLicense", GetDeviceLicenseResponse.class);
}
/**
*查询用户设备的授权绑定情况
* @param req GetDevicesRequest
* @return GetDevicesResponse
* @throws TencentCloudSDKException
*/
public GetDevicesResponse GetDevices(GetDevicesRequest req) throws TencentCloudSDKException{
req.setSkipSign(false);
return this.internalRequest(req, "GetDevices", GetDevicesResponse.class);
}
/**
*统计license类型数量
* @param req GetLicenseStatRequest
* @return GetLicenseStatResponse
* @throws TencentCloudSDKException
*/
public GetLicenseStatResponse GetLicenseStat(GetLicenseStatRequest req) throws TencentCloudSDKException{
req.setSkipSign(false);
return this.internalRequest(req, "GetLicenseStat", GetLicenseStatResponse.class);
}
/**
*按授权查看license列表
* @param req GetLicensesRequest
* @return GetLicensesResponse
* @throws TencentCloudSDKException
*/
public GetLicensesResponse GetLicenses(GetLicensesRequest req) throws TencentCloudSDKException{
req.setSkipSign(false);
return this.internalRequest(req, "GetLicenses", GetLicensesResponse.class);
}
/**
*用于修改设备信息
* @param req ModifyDeviceRequest
* @return ModifyDeviceResponse
* @throws TencentCloudSDKException
*/
public ModifyDeviceResponse ModifyDevice(ModifyDeviceRequest req) throws TencentCloudSDKException{
req.setSkipSign(false);
return this.internalRequest(req, "ModifyDevice", ModifyDeviceResponse.class);
}
/**
*用于修改权限配置
* @param req ModifyPolicyRequest
* @return ModifyPolicyResponse
* @throws TencentCloudSDKException
*/
public ModifyPolicyResponse ModifyPolicy(ModifyPolicyRequest req) throws TencentCloudSDKException{
req.setSkipSign(false);
return this.internalRequest(req, "ModifyPolicy", ModifyPolicyResponse.class);
}
/**
*用于修改项目信息
* @param req ModifyProjectRequest
* @return ModifyProjectResponse
* @throws TencentCloudSDKException
*/
public ModifyProjectResponse ModifyProject(ModifyProjectRequest req) throws TencentCloudSDKException{
req.setSkipSign(false);
return this.internalRequest(req, "ModifyProject", ModifyProjectResponse.class);
}
}