tencentcloud-sdk-ump 1.0.200
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/lib/VERSION +1 -0
- data/lib/tencentcloud-sdk-ump.rb +11 -0
- data/lib/v20200918/client.rb +447 -0
- data/lib/v20200918/models.rb +1675 -0
- metadata +66 -0
checksums.yaml
ADDED
@@ -0,0 +1,7 @@
|
|
1
|
+
---
|
2
|
+
SHA1:
|
3
|
+
metadata.gz: d3a01d5760f7b43990637fe8aeeff639d1ae927d
|
4
|
+
data.tar.gz: 841f1e5933b3296ec973ae727ef072b7fa677cd4
|
5
|
+
SHA512:
|
6
|
+
metadata.gz: 36c47d3d98ab7e6f1edd275bc15863f0b35f4ed396b2cd64a7aa26046aeb80151372eddc96e48fbebb5939722da6a0d989bfdb66b4dc98a51063156cd09d7bbf
|
7
|
+
data.tar.gz: 9531265605705362e7b17578d982f4ade32e820b6316e1545ec70afbee7d7b41cfe8a338275db65d632e1cfdc3c348d47eddda9ed003da793952ce8b21ac6740
|
data/lib/VERSION
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
1.0.200
|
@@ -0,0 +1,447 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
# Copyright (c) 2017-2018 THL A29 Limited, a Tencent company. All Rights Reserved.
|
4
|
+
#
|
5
|
+
# Licensed under the Apache License, Version 2.0 (the "License");
|
6
|
+
# you may not use this file except in compliance with the License.
|
7
|
+
# You may obtain a copy of the License at
|
8
|
+
#
|
9
|
+
# http://www.apache.org/licenses/LICENSE-2.0
|
10
|
+
#
|
11
|
+
# Unless required by applicable law or agreed to in writing, software
|
12
|
+
# distributed under the License is distributed on an "AS IS" BASIS,
|
13
|
+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
14
|
+
# See the License for the specific language governing permissions and
|
15
|
+
# limitations under the License.
|
16
|
+
|
17
|
+
require 'json'
|
18
|
+
|
19
|
+
module TencentCloud
|
20
|
+
module Ump
|
21
|
+
module V20200918
|
22
|
+
class Client < TencentCloud::Common::AbstractClient
|
23
|
+
|
24
|
+
def initialize(credential, region, profile = nil)
|
25
|
+
api_version = '2020-09-18'
|
26
|
+
api_endpoint = 'ump.tencentcloudapi.com'
|
27
|
+
sdk_version = 'UMP_' + File.read(File.expand_path('../VERSION', __dir__)).strip
|
28
|
+
super(credential, region, api_version, api_endpoint, sdk_version, profile)
|
29
|
+
end
|
30
|
+
|
31
|
+
|
32
|
+
# 上报相机移动、遮挡等告警信息
|
33
|
+
|
34
|
+
|
35
|
+
# @param request: Request instance for CreateCameraAlerts.
|
36
|
+
# @type request: :class:`Tencentcloud::ump::V20200918::CreateCameraAlertsRequest`
|
37
|
+
# @rtype: :class:`Tencentcloud::ump::V20200918::CreateCameraAlertsResponse`
|
38
|
+
def CreateCameraAlerts(request)
|
39
|
+
body = send_request('CreateCameraAlerts', request.serialize)
|
40
|
+
response = JSON.parse(body)
|
41
|
+
if response['Response'].key?('Error') == false
|
42
|
+
model = CreateCameraAlertsResponse.new
|
43
|
+
model.deserialize(response['Response'])
|
44
|
+
model
|
45
|
+
else
|
46
|
+
code = response['Response']['Error']['Code']
|
47
|
+
message = response['Response']['Error']['Message']
|
48
|
+
reqid = response['Response']['RequestId']
|
49
|
+
raise TencentCloud::Common::TencentCloudSDKException.new(code, message, reqid)
|
50
|
+
end
|
51
|
+
rescue TencentCloud::Common::TencentCloudSDKException => e
|
52
|
+
raise e
|
53
|
+
rescue StandardError => e
|
54
|
+
raise TencentCloud::Common::TencentCloudSDKException.new(nil, e.inspect)
|
55
|
+
end
|
56
|
+
|
57
|
+
# 上报当前场内所有相机的当前状态
|
58
|
+
|
59
|
+
# @param request: Request instance for CreateCameraState.
|
60
|
+
# @type request: :class:`Tencentcloud::ump::V20200918::CreateCameraStateRequest`
|
61
|
+
# @rtype: :class:`Tencentcloud::ump::V20200918::CreateCameraStateResponse`
|
62
|
+
def CreateCameraState(request)
|
63
|
+
body = send_request('CreateCameraState', request.serialize)
|
64
|
+
response = JSON.parse(body)
|
65
|
+
if response['Response'].key?('Error') == false
|
66
|
+
model = CreateCameraStateResponse.new
|
67
|
+
model.deserialize(response['Response'])
|
68
|
+
model
|
69
|
+
else
|
70
|
+
code = response['Response']['Error']['Code']
|
71
|
+
message = response['Response']['Error']['Message']
|
72
|
+
reqid = response['Response']['RequestId']
|
73
|
+
raise TencentCloud::Common::TencentCloudSDKException.new(code, message, reqid)
|
74
|
+
end
|
75
|
+
rescue TencentCloud::Common::TencentCloudSDKException => e
|
76
|
+
raise e
|
77
|
+
rescue StandardError => e
|
78
|
+
raise TencentCloud::Common::TencentCloudSDKException.new(nil, e.inspect)
|
79
|
+
end
|
80
|
+
|
81
|
+
# 场内抓拍上报接口
|
82
|
+
|
83
|
+
# @param request: Request instance for CreateCapture.
|
84
|
+
# @type request: :class:`Tencentcloud::ump::V20200918::CreateCaptureRequest`
|
85
|
+
# @rtype: :class:`Tencentcloud::ump::V20200918::CreateCaptureResponse`
|
86
|
+
def CreateCapture(request)
|
87
|
+
body = send_request('CreateCapture', request.serialize)
|
88
|
+
response = JSON.parse(body)
|
89
|
+
if response['Response'].key?('Error') == false
|
90
|
+
model = CreateCaptureResponse.new
|
91
|
+
model.deserialize(response['Response'])
|
92
|
+
model
|
93
|
+
else
|
94
|
+
code = response['Response']['Error']['Code']
|
95
|
+
message = response['Response']['Error']['Message']
|
96
|
+
reqid = response['Response']['RequestId']
|
97
|
+
raise TencentCloud::Common::TencentCloudSDKException.new(code, message, reqid)
|
98
|
+
end
|
99
|
+
rescue TencentCloud::Common::TencentCloudSDKException => e
|
100
|
+
raise e
|
101
|
+
rescue StandardError => e
|
102
|
+
raise TencentCloud::Common::TencentCloudSDKException.new(nil, e.inspect)
|
103
|
+
end
|
104
|
+
|
105
|
+
# 集团广场的多经点位告警
|
106
|
+
|
107
|
+
# @param request: Request instance for CreateMultiBizAlert.
|
108
|
+
# @type request: :class:`Tencentcloud::ump::V20200918::CreateMultiBizAlertRequest`
|
109
|
+
# @rtype: :class:`Tencentcloud::ump::V20200918::CreateMultiBizAlertResponse`
|
110
|
+
def CreateMultiBizAlert(request)
|
111
|
+
body = send_request('CreateMultiBizAlert', request.serialize)
|
112
|
+
response = JSON.parse(body)
|
113
|
+
if response['Response'].key?('Error') == false
|
114
|
+
model = CreateMultiBizAlertResponse.new
|
115
|
+
model.deserialize(response['Response'])
|
116
|
+
model
|
117
|
+
else
|
118
|
+
code = response['Response']['Error']['Code']
|
119
|
+
message = response['Response']['Error']['Message']
|
120
|
+
reqid = response['Response']['RequestId']
|
121
|
+
raise TencentCloud::Common::TencentCloudSDKException.new(code, message, reqid)
|
122
|
+
end
|
123
|
+
rescue TencentCloud::Common::TencentCloudSDKException => e
|
124
|
+
raise e
|
125
|
+
rescue StandardError => e
|
126
|
+
raise TencentCloud::Common::TencentCloudSDKException.new(nil, e.inspect)
|
127
|
+
end
|
128
|
+
|
129
|
+
# 上报所有进程监控信息
|
130
|
+
|
131
|
+
# @param request: Request instance for CreateProgramState.
|
132
|
+
# @type request: :class:`Tencentcloud::ump::V20200918::CreateProgramStateRequest`
|
133
|
+
# @rtype: :class:`Tencentcloud::ump::V20200918::CreateProgramStateResponse`
|
134
|
+
def CreateProgramState(request)
|
135
|
+
body = send_request('CreateProgramState', request.serialize)
|
136
|
+
response = JSON.parse(body)
|
137
|
+
if response['Response'].key?('Error') == false
|
138
|
+
model = CreateProgramStateResponse.new
|
139
|
+
model.deserialize(response['Response'])
|
140
|
+
model
|
141
|
+
else
|
142
|
+
code = response['Response']['Error']['Code']
|
143
|
+
message = response['Response']['Error']['Message']
|
144
|
+
reqid = response['Response']['RequestId']
|
145
|
+
raise TencentCloud::Common::TencentCloudSDKException.new(code, message, reqid)
|
146
|
+
end
|
147
|
+
rescue TencentCloud::Common::TencentCloudSDKException => e
|
148
|
+
raise e
|
149
|
+
rescue StandardError => e
|
150
|
+
raise TencentCloud::Common::TencentCloudSDKException.new(nil, e.inspect)
|
151
|
+
end
|
152
|
+
|
153
|
+
# 上报所有服务器硬件监控信息
|
154
|
+
|
155
|
+
# @param request: Request instance for CreateServerState.
|
156
|
+
# @type request: :class:`Tencentcloud::ump::V20200918::CreateServerStateRequest`
|
157
|
+
# @rtype: :class:`Tencentcloud::ump::V20200918::CreateServerStateResponse`
|
158
|
+
def CreateServerState(request)
|
159
|
+
body = send_request('CreateServerState', request.serialize)
|
160
|
+
response = JSON.parse(body)
|
161
|
+
if response['Response'].key?('Error') == false
|
162
|
+
model = CreateServerStateResponse.new
|
163
|
+
model.deserialize(response['Response'])
|
164
|
+
model
|
165
|
+
else
|
166
|
+
code = response['Response']['Error']['Code']
|
167
|
+
message = response['Response']['Error']['Message']
|
168
|
+
reqid = response['Response']['RequestId']
|
169
|
+
raise TencentCloud::Common::TencentCloudSDKException.new(code, message, reqid)
|
170
|
+
end
|
171
|
+
rescue TencentCloud::Common::TencentCloudSDKException => e
|
172
|
+
raise e
|
173
|
+
rescue StandardError => e
|
174
|
+
raise TencentCloud::Common::TencentCloudSDKException.new(nil, e.inspect)
|
175
|
+
end
|
176
|
+
|
177
|
+
# 集团广场的多经点位消警
|
178
|
+
|
179
|
+
# @param request: Request instance for DeleteMultiBizAlert.
|
180
|
+
# @type request: :class:`Tencentcloud::ump::V20200918::DeleteMultiBizAlertRequest`
|
181
|
+
# @rtype: :class:`Tencentcloud::ump::V20200918::DeleteMultiBizAlertResponse`
|
182
|
+
def DeleteMultiBizAlert(request)
|
183
|
+
body = send_request('DeleteMultiBizAlert', request.serialize)
|
184
|
+
response = JSON.parse(body)
|
185
|
+
if response['Response'].key?('Error') == false
|
186
|
+
model = DeleteMultiBizAlertResponse.new
|
187
|
+
model.deserialize(response['Response'])
|
188
|
+
model
|
189
|
+
else
|
190
|
+
code = response['Response']['Error']['Code']
|
191
|
+
message = response['Response']['Error']['Message']
|
192
|
+
reqid = response['Response']['RequestId']
|
193
|
+
raise TencentCloud::Common::TencentCloudSDKException.new(code, message, reqid)
|
194
|
+
end
|
195
|
+
rescue TencentCloud::Common::TencentCloudSDKException => e
|
196
|
+
raise e
|
197
|
+
rescue StandardError => e
|
198
|
+
raise TencentCloud::Common::TencentCloudSDKException.new(nil, e.inspect)
|
199
|
+
end
|
200
|
+
|
201
|
+
# 删除集团广场对应的任务
|
202
|
+
|
203
|
+
# @param request: Request instance for DeleteTask.
|
204
|
+
# @type request: :class:`Tencentcloud::ump::V20200918::DeleteTaskRequest`
|
205
|
+
# @rtype: :class:`Tencentcloud::ump::V20200918::DeleteTaskResponse`
|
206
|
+
def DeleteTask(request)
|
207
|
+
body = send_request('DeleteTask', request.serialize)
|
208
|
+
response = JSON.parse(body)
|
209
|
+
if response['Response'].key?('Error') == false
|
210
|
+
model = DeleteTaskResponse.new
|
211
|
+
model.deserialize(response['Response'])
|
212
|
+
model
|
213
|
+
else
|
214
|
+
code = response['Response']['Error']['Code']
|
215
|
+
message = response['Response']['Error']['Message']
|
216
|
+
reqid = response['Response']['RequestId']
|
217
|
+
raise TencentCloud::Common::TencentCloudSDKException.new(code, message, reqid)
|
218
|
+
end
|
219
|
+
rescue TencentCloud::Common::TencentCloudSDKException => e
|
220
|
+
raise e
|
221
|
+
rescue StandardError => e
|
222
|
+
raise TencentCloud::Common::TencentCloudSDKException.new(nil, e.inspect)
|
223
|
+
end
|
224
|
+
|
225
|
+
# 获取集团广场对应的摄像头列表
|
226
|
+
|
227
|
+
# @param request: Request instance for DescribeCameras.
|
228
|
+
# @type request: :class:`Tencentcloud::ump::V20200918::DescribeCamerasRequest`
|
229
|
+
# @rtype: :class:`Tencentcloud::ump::V20200918::DescribeCamerasResponse`
|
230
|
+
def DescribeCameras(request)
|
231
|
+
body = send_request('DescribeCameras', request.serialize)
|
232
|
+
response = JSON.parse(body)
|
233
|
+
if response['Response'].key?('Error') == false
|
234
|
+
model = DescribeCamerasResponse.new
|
235
|
+
model.deserialize(response['Response'])
|
236
|
+
model
|
237
|
+
else
|
238
|
+
code = response['Response']['Error']['Code']
|
239
|
+
message = response['Response']['Error']['Message']
|
240
|
+
reqid = response['Response']['RequestId']
|
241
|
+
raise TencentCloud::Common::TencentCloudSDKException.new(code, message, reqid)
|
242
|
+
end
|
243
|
+
rescue TencentCloud::Common::TencentCloudSDKException => e
|
244
|
+
raise e
|
245
|
+
rescue StandardError => e
|
246
|
+
raise TencentCloud::Common::TencentCloudSDKException.new(nil, e.inspect)
|
247
|
+
end
|
248
|
+
|
249
|
+
# 获取摄像头配置信息
|
250
|
+
# mac不为空返回指定相机配置
|
251
|
+
# mac为空返回对应GroupCode和MallId全量配置
|
252
|
+
|
253
|
+
# @param request: Request instance for DescribeConfig.
|
254
|
+
# @type request: :class:`Tencentcloud::ump::V20200918::DescribeConfigRequest`
|
255
|
+
# @rtype: :class:`Tencentcloud::ump::V20200918::DescribeConfigResponse`
|
256
|
+
def DescribeConfig(request)
|
257
|
+
body = send_request('DescribeConfig', request.serialize)
|
258
|
+
response = JSON.parse(body)
|
259
|
+
if response['Response'].key?('Error') == false
|
260
|
+
model = DescribeConfigResponse.new
|
261
|
+
model.deserialize(response['Response'])
|
262
|
+
model
|
263
|
+
else
|
264
|
+
code = response['Response']['Error']['Code']
|
265
|
+
message = response['Response']['Error']['Message']
|
266
|
+
reqid = response['Response']['RequestId']
|
267
|
+
raise TencentCloud::Common::TencentCloudSDKException.new(code, message, reqid)
|
268
|
+
end
|
269
|
+
rescue TencentCloud::Common::TencentCloudSDKException => e
|
270
|
+
raise e
|
271
|
+
rescue StandardError => e
|
272
|
+
raise TencentCloud::Common::TencentCloudSDKException.new(nil, e.inspect)
|
273
|
+
end
|
274
|
+
|
275
|
+
# 实时获取底图接口
|
276
|
+
|
277
|
+
# @param request: Request instance for DescribeImage.
|
278
|
+
# @type request: :class:`Tencentcloud::ump::V20200918::DescribeImageRequest`
|
279
|
+
# @rtype: :class:`Tencentcloud::ump::V20200918::DescribeImageResponse`
|
280
|
+
def DescribeImage(request)
|
281
|
+
body = send_request('DescribeImage', request.serialize)
|
282
|
+
response = JSON.parse(body)
|
283
|
+
if response['Response'].key?('Error') == false
|
284
|
+
model = DescribeImageResponse.new
|
285
|
+
model.deserialize(response['Response'])
|
286
|
+
model
|
287
|
+
else
|
288
|
+
code = response['Response']['Error']['Code']
|
289
|
+
message = response['Response']['Error']['Message']
|
290
|
+
reqid = response['Response']['RequestId']
|
291
|
+
raise TencentCloud::Common::TencentCloudSDKException.new(code, message, reqid)
|
292
|
+
end
|
293
|
+
rescue TencentCloud::Common::TencentCloudSDKException => e
|
294
|
+
raise e
|
295
|
+
rescue StandardError => e
|
296
|
+
raise TencentCloud::Common::TencentCloudSDKException.new(nil, e.inspect)
|
297
|
+
end
|
298
|
+
|
299
|
+
# 获取多经点位底图
|
300
|
+
|
301
|
+
# @param request: Request instance for DescribeMultiBizBaseImage.
|
302
|
+
# @type request: :class:`Tencentcloud::ump::V20200918::DescribeMultiBizBaseImageRequest`
|
303
|
+
# @rtype: :class:`Tencentcloud::ump::V20200918::DescribeMultiBizBaseImageResponse`
|
304
|
+
def DescribeMultiBizBaseImage(request)
|
305
|
+
body = send_request('DescribeMultiBizBaseImage', request.serialize)
|
306
|
+
response = JSON.parse(body)
|
307
|
+
if response['Response'].key?('Error') == false
|
308
|
+
model = DescribeMultiBizBaseImageResponse.new
|
309
|
+
model.deserialize(response['Response'])
|
310
|
+
model
|
311
|
+
else
|
312
|
+
code = response['Response']['Error']['Code']
|
313
|
+
message = response['Response']['Error']['Message']
|
314
|
+
reqid = response['Response']['RequestId']
|
315
|
+
raise TencentCloud::Common::TencentCloudSDKException.new(code, message, reqid)
|
316
|
+
end
|
317
|
+
rescue TencentCloud::Common::TencentCloudSDKException => e
|
318
|
+
raise e
|
319
|
+
rescue StandardError => e
|
320
|
+
raise TencentCloud::Common::TencentCloudSDKException.new(nil, e.inspect)
|
321
|
+
end
|
322
|
+
|
323
|
+
# 查询集团广场对应的任务列表
|
324
|
+
|
325
|
+
# @param request: Request instance for DescribeTasks.
|
326
|
+
# @type request: :class:`Tencentcloud::ump::V20200918::DescribeTasksRequest`
|
327
|
+
# @rtype: :class:`Tencentcloud::ump::V20200918::DescribeTasksResponse`
|
328
|
+
def DescribeTasks(request)
|
329
|
+
body = send_request('DescribeTasks', request.serialize)
|
330
|
+
response = JSON.parse(body)
|
331
|
+
if response['Response'].key?('Error') == false
|
332
|
+
model = DescribeTasksResponse.new
|
333
|
+
model.deserialize(response['Response'])
|
334
|
+
model
|
335
|
+
else
|
336
|
+
code = response['Response']['Error']['Code']
|
337
|
+
message = response['Response']['Error']['Message']
|
338
|
+
reqid = response['Response']['RequestId']
|
339
|
+
raise TencentCloud::Common::TencentCloudSDKException.new(code, message, reqid)
|
340
|
+
end
|
341
|
+
rescue TencentCloud::Common::TencentCloudSDKException => e
|
342
|
+
raise e
|
343
|
+
rescue StandardError => e
|
344
|
+
raise TencentCloud::Common::TencentCloudSDKException.new(nil, e.inspect)
|
345
|
+
end
|
346
|
+
|
347
|
+
# 获取集团广场的点位列表
|
348
|
+
|
349
|
+
# @param request: Request instance for DescribeZones.
|
350
|
+
# @type request: :class:`Tencentcloud::ump::V20200918::DescribeZonesRequest`
|
351
|
+
# @rtype: :class:`Tencentcloud::ump::V20200918::DescribeZonesResponse`
|
352
|
+
def DescribeZones(request)
|
353
|
+
body = send_request('DescribeZones', request.serialize)
|
354
|
+
response = JSON.parse(body)
|
355
|
+
if response['Response'].key?('Error') == false
|
356
|
+
model = DescribeZonesResponse.new
|
357
|
+
model.deserialize(response['Response'])
|
358
|
+
model
|
359
|
+
else
|
360
|
+
code = response['Response']['Error']['Code']
|
361
|
+
message = response['Response']['Error']['Message']
|
362
|
+
reqid = response['Response']['RequestId']
|
363
|
+
raise TencentCloud::Common::TencentCloudSDKException.new(code, message, reqid)
|
364
|
+
end
|
365
|
+
rescue TencentCloud::Common::TencentCloudSDKException => e
|
366
|
+
raise e
|
367
|
+
rescue StandardError => e
|
368
|
+
raise TencentCloud::Common::TencentCloudSDKException.new(nil, e.inspect)
|
369
|
+
end
|
370
|
+
|
371
|
+
# 集团广场的多经点位配置更新
|
372
|
+
|
373
|
+
# @param request: Request instance for ModifyMultiBizConfig.
|
374
|
+
# @type request: :class:`Tencentcloud::ump::V20200918::ModifyMultiBizConfigRequest`
|
375
|
+
# @rtype: :class:`Tencentcloud::ump::V20200918::ModifyMultiBizConfigResponse`
|
376
|
+
def ModifyMultiBizConfig(request)
|
377
|
+
body = send_request('ModifyMultiBizConfig', request.serialize)
|
378
|
+
response = JSON.parse(body)
|
379
|
+
if response['Response'].key?('Error') == false
|
380
|
+
model = ModifyMultiBizConfigResponse.new
|
381
|
+
model.deserialize(response['Response'])
|
382
|
+
model
|
383
|
+
else
|
384
|
+
code = response['Response']['Error']['Code']
|
385
|
+
message = response['Response']['Error']['Message']
|
386
|
+
reqid = response['Response']['RequestId']
|
387
|
+
raise TencentCloud::Common::TencentCloudSDKException.new(code, message, reqid)
|
388
|
+
end
|
389
|
+
rescue TencentCloud::Common::TencentCloudSDKException => e
|
390
|
+
raise e
|
391
|
+
rescue StandardError => e
|
392
|
+
raise TencentCloud::Common::TencentCloudSDKException.new(nil, e.inspect)
|
393
|
+
end
|
394
|
+
|
395
|
+
# 上报服务注册自身的服务地址作为回调地址, 用于信息回传。
|
396
|
+
|
397
|
+
# @param request: Request instance for ReportServiceRegister.
|
398
|
+
# @type request: :class:`Tencentcloud::ump::V20200918::ReportServiceRegisterRequest`
|
399
|
+
# @rtype: :class:`Tencentcloud::ump::V20200918::ReportServiceRegisterResponse`
|
400
|
+
def ReportServiceRegister(request)
|
401
|
+
body = send_request('ReportServiceRegister', request.serialize)
|
402
|
+
response = JSON.parse(body)
|
403
|
+
if response['Response'].key?('Error') == false
|
404
|
+
model = ReportServiceRegisterResponse.new
|
405
|
+
model.deserialize(response['Response'])
|
406
|
+
model
|
407
|
+
else
|
408
|
+
code = response['Response']['Error']['Code']
|
409
|
+
message = response['Response']['Error']['Message']
|
410
|
+
reqid = response['Response']['RequestId']
|
411
|
+
raise TencentCloud::Common::TencentCloudSDKException.new(code, message, reqid)
|
412
|
+
end
|
413
|
+
rescue TencentCloud::Common::TencentCloudSDKException => e
|
414
|
+
raise e
|
415
|
+
rescue StandardError => e
|
416
|
+
raise TencentCloud::Common::TencentCloudSDKException.new(nil, e.inspect)
|
417
|
+
end
|
418
|
+
|
419
|
+
# 以图搜图
|
420
|
+
|
421
|
+
# @param request: Request instance for SearchImage.
|
422
|
+
# @type request: :class:`Tencentcloud::ump::V20200918::SearchImageRequest`
|
423
|
+
# @rtype: :class:`Tencentcloud::ump::V20200918::SearchImageResponse`
|
424
|
+
def SearchImage(request)
|
425
|
+
body = send_request('SearchImage', request.serialize)
|
426
|
+
response = JSON.parse(body)
|
427
|
+
if response['Response'].key?('Error') == false
|
428
|
+
model = SearchImageResponse.new
|
429
|
+
model.deserialize(response['Response'])
|
430
|
+
model
|
431
|
+
else
|
432
|
+
code = response['Response']['Error']['Code']
|
433
|
+
message = response['Response']['Error']['Message']
|
434
|
+
reqid = response['Response']['RequestId']
|
435
|
+
raise TencentCloud::Common::TencentCloudSDKException.new(code, message, reqid)
|
436
|
+
end
|
437
|
+
rescue TencentCloud::Common::TencentCloudSDKException => e
|
438
|
+
raise e
|
439
|
+
rescue StandardError => e
|
440
|
+
raise TencentCloud::Common::TencentCloudSDKException.new(nil, e.inspect)
|
441
|
+
end
|
442
|
+
|
443
|
+
|
444
|
+
end
|
445
|
+
end
|
446
|
+
end
|
447
|
+
end
|