tencentcloud-sdk-mps 1.0.200

Sign up to get free protection for your applications and to get access to all the features.
@@ -0,0 +1,1633 @@
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 Mps
21
+ module V20190612
22
+ class Client < TencentCloud::Common::AbstractClient
23
+
24
+ def initialize(credential, region, profile = nil)
25
+ api_version = '2019-06-12'
26
+ api_endpoint = 'mps.tencentcloudapi.com'
27
+ sdk_version = 'MPS_' + File.read(File.expand_path('../VERSION', __dir__)).strip
28
+ super(credential, region, api_version, api_endpoint, sdk_version, profile)
29
+ end
30
+
31
+
32
+ # 创建用户自定义内容分析模板,数量上限:50。
33
+
34
+ # @param request: Request instance for CreateAIAnalysisTemplate.
35
+ # @type request: :class:`Tencentcloud::mps::V20190612::CreateAIAnalysisTemplateRequest`
36
+ # @rtype: :class:`Tencentcloud::mps::V20190612::CreateAIAnalysisTemplateResponse`
37
+ def CreateAIAnalysisTemplate(request)
38
+ body = send_request('CreateAIAnalysisTemplate', request.serialize)
39
+ response = JSON.parse(body)
40
+ if response['Response'].key?('Error') == false
41
+ model = CreateAIAnalysisTemplateResponse.new
42
+ model.deserialize(response['Response'])
43
+ model
44
+ else
45
+ code = response['Response']['Error']['Code']
46
+ message = response['Response']['Error']['Message']
47
+ reqid = response['Response']['RequestId']
48
+ raise TencentCloud::Common::TencentCloudSDKException.new(code, message, reqid)
49
+ end
50
+ rescue TencentCloud::Common::TencentCloudSDKException => e
51
+ raise e
52
+ rescue StandardError => e
53
+ raise TencentCloud::Common::TencentCloudSDKException.new(nil, e.inspect)
54
+ end
55
+
56
+ # 创建用户自定义内容识别模板,数量上限:50。
57
+
58
+ # @param request: Request instance for CreateAIRecognitionTemplate.
59
+ # @type request: :class:`Tencentcloud::mps::V20190612::CreateAIRecognitionTemplateRequest`
60
+ # @rtype: :class:`Tencentcloud::mps::V20190612::CreateAIRecognitionTemplateResponse`
61
+ def CreateAIRecognitionTemplate(request)
62
+ body = send_request('CreateAIRecognitionTemplate', request.serialize)
63
+ response = JSON.parse(body)
64
+ if response['Response'].key?('Error') == false
65
+ model = CreateAIRecognitionTemplateResponse.new
66
+ model.deserialize(response['Response'])
67
+ model
68
+ else
69
+ code = response['Response']['Error']['Code']
70
+ message = response['Response']['Error']['Message']
71
+ reqid = response['Response']['RequestId']
72
+ raise TencentCloud::Common::TencentCloudSDKException.new(code, message, reqid)
73
+ end
74
+ rescue TencentCloud::Common::TencentCloudSDKException => e
75
+ raise e
76
+ rescue StandardError => e
77
+ raise TencentCloud::Common::TencentCloudSDKException.new(nil, e.inspect)
78
+ end
79
+
80
+ # 创建转自适应码流模板,数量上限:100。
81
+
82
+ # @param request: Request instance for CreateAdaptiveDynamicStreamingTemplate.
83
+ # @type request: :class:`Tencentcloud::mps::V20190612::CreateAdaptiveDynamicStreamingTemplateRequest`
84
+ # @rtype: :class:`Tencentcloud::mps::V20190612::CreateAdaptiveDynamicStreamingTemplateResponse`
85
+ def CreateAdaptiveDynamicStreamingTemplate(request)
86
+ body = send_request('CreateAdaptiveDynamicStreamingTemplate', request.serialize)
87
+ response = JSON.parse(body)
88
+ if response['Response'].key?('Error') == false
89
+ model = CreateAdaptiveDynamicStreamingTemplateResponse.new
90
+ model.deserialize(response['Response'])
91
+ model
92
+ else
93
+ code = response['Response']['Error']['Code']
94
+ message = response['Response']['Error']['Message']
95
+ reqid = response['Response']['RequestId']
96
+ raise TencentCloud::Common::TencentCloudSDKException.new(code, message, reqid)
97
+ end
98
+ rescue TencentCloud::Common::TencentCloudSDKException => e
99
+ raise e
100
+ rescue StandardError => e
101
+ raise TencentCloud::Common::TencentCloudSDKException.new(nil, e.inspect)
102
+ end
103
+
104
+ # 创建用户自定义转动图模板,数量上限:16。
105
+
106
+ # @param request: Request instance for CreateAnimatedGraphicsTemplate.
107
+ # @type request: :class:`Tencentcloud::mps::V20190612::CreateAnimatedGraphicsTemplateRequest`
108
+ # @rtype: :class:`Tencentcloud::mps::V20190612::CreateAnimatedGraphicsTemplateResponse`
109
+ def CreateAnimatedGraphicsTemplate(request)
110
+ body = send_request('CreateAnimatedGraphicsTemplate', request.serialize)
111
+ response = JSON.parse(body)
112
+ if response['Response'].key?('Error') == false
113
+ model = CreateAnimatedGraphicsTemplateResponse.new
114
+ model.deserialize(response['Response'])
115
+ model
116
+ else
117
+ code = response['Response']['Error']['Code']
118
+ message = response['Response']['Error']['Message']
119
+ reqid = response['Response']['RequestId']
120
+ raise TencentCloud::Common::TencentCloudSDKException.new(code, message, reqid)
121
+ end
122
+ rescue TencentCloud::Common::TencentCloudSDKException => e
123
+ raise e
124
+ rescue StandardError => e
125
+ raise TencentCloud::Common::TencentCloudSDKException.new(nil, e.inspect)
126
+ end
127
+
128
+ # 创建用户自定义内容智能识别模板,数量上限:50。
129
+
130
+ # @param request: Request instance for CreateContentReviewTemplate.
131
+ # @type request: :class:`Tencentcloud::mps::V20190612::CreateContentReviewTemplateRequest`
132
+ # @rtype: :class:`Tencentcloud::mps::V20190612::CreateContentReviewTemplateResponse`
133
+ def CreateContentReviewTemplate(request)
134
+ body = send_request('CreateContentReviewTemplate', request.serialize)
135
+ response = JSON.parse(body)
136
+ if response['Response'].key?('Error') == false
137
+ model = CreateContentReviewTemplateResponse.new
138
+ model.deserialize(response['Response'])
139
+ model
140
+ else
141
+ code = response['Response']['Error']['Code']
142
+ message = response['Response']['Error']['Message']
143
+ reqid = response['Response']['RequestId']
144
+ raise TencentCloud::Common::TencentCloudSDKException.new(code, message, reqid)
145
+ end
146
+ rescue TencentCloud::Common::TencentCloudSDKException => e
147
+ raise e
148
+ rescue StandardError => e
149
+ raise TencentCloud::Common::TencentCloudSDKException.new(nil, e.inspect)
150
+ end
151
+
152
+ # 创建用户自定义雪碧图模板,数量上限:16。
153
+
154
+ # @param request: Request instance for CreateImageSpriteTemplate.
155
+ # @type request: :class:`Tencentcloud::mps::V20190612::CreateImageSpriteTemplateRequest`
156
+ # @rtype: :class:`Tencentcloud::mps::V20190612::CreateImageSpriteTemplateResponse`
157
+ def CreateImageSpriteTemplate(request)
158
+ body = send_request('CreateImageSpriteTemplate', request.serialize)
159
+ response = JSON.parse(body)
160
+ if response['Response'].key?('Error') == false
161
+ model = CreateImageSpriteTemplateResponse.new
162
+ model.deserialize(response['Response'])
163
+ model
164
+ else
165
+ code = response['Response']['Error']['Code']
166
+ message = response['Response']['Error']['Message']
167
+ reqid = response['Response']['RequestId']
168
+ raise TencentCloud::Common::TencentCloudSDKException.new(code, message, reqid)
169
+ end
170
+ rescue TencentCloud::Common::TencentCloudSDKException => e
171
+ raise e
172
+ rescue StandardError => e
173
+ raise TencentCloud::Common::TencentCloudSDKException.new(nil, e.inspect)
174
+ end
175
+
176
+ # 该接口用于创建素材样本,用于通过五官定位等技术,进行内容识别、内容不适宜等视频处理。
177
+
178
+ # @param request: Request instance for CreatePersonSample.
179
+ # @type request: :class:`Tencentcloud::mps::V20190612::CreatePersonSampleRequest`
180
+ # @rtype: :class:`Tencentcloud::mps::V20190612::CreatePersonSampleResponse`
181
+ def CreatePersonSample(request)
182
+ body = send_request('CreatePersonSample', request.serialize)
183
+ response = JSON.parse(body)
184
+ if response['Response'].key?('Error') == false
185
+ model = CreatePersonSampleResponse.new
186
+ model.deserialize(response['Response'])
187
+ model
188
+ else
189
+ code = response['Response']['Error']['Code']
190
+ message = response['Response']['Error']['Message']
191
+ reqid = response['Response']['RequestId']
192
+ raise TencentCloud::Common::TencentCloudSDKException.new(code, message, reqid)
193
+ end
194
+ rescue TencentCloud::Common::TencentCloudSDKException => e
195
+ raise e
196
+ rescue StandardError => e
197
+ raise TencentCloud::Common::TencentCloudSDKException.new(nil, e.inspect)
198
+ end
199
+
200
+ # 创建用户自定义采样截图模板,数量上限:16。
201
+
202
+ # @param request: Request instance for CreateSampleSnapshotTemplate.
203
+ # @type request: :class:`Tencentcloud::mps::V20190612::CreateSampleSnapshotTemplateRequest`
204
+ # @rtype: :class:`Tencentcloud::mps::V20190612::CreateSampleSnapshotTemplateResponse`
205
+ def CreateSampleSnapshotTemplate(request)
206
+ body = send_request('CreateSampleSnapshotTemplate', request.serialize)
207
+ response = JSON.parse(body)
208
+ if response['Response'].key?('Error') == false
209
+ model = CreateSampleSnapshotTemplateResponse.new
210
+ model.deserialize(response['Response'])
211
+ model
212
+ else
213
+ code = response['Response']['Error']['Code']
214
+ message = response['Response']['Error']['Message']
215
+ reqid = response['Response']['RequestId']
216
+ raise TencentCloud::Common::TencentCloudSDKException.new(code, message, reqid)
217
+ end
218
+ rescue TencentCloud::Common::TencentCloudSDKException => e
219
+ raise e
220
+ rescue StandardError => e
221
+ raise TencentCloud::Common::TencentCloudSDKException.new(nil, e.inspect)
222
+ end
223
+
224
+ # 创建用户自定义指定时间点截图模板,数量上限:16。
225
+
226
+ # @param request: Request instance for CreateSnapshotByTimeOffsetTemplate.
227
+ # @type request: :class:`Tencentcloud::mps::V20190612::CreateSnapshotByTimeOffsetTemplateRequest`
228
+ # @rtype: :class:`Tencentcloud::mps::V20190612::CreateSnapshotByTimeOffsetTemplateResponse`
229
+ def CreateSnapshotByTimeOffsetTemplate(request)
230
+ body = send_request('CreateSnapshotByTimeOffsetTemplate', request.serialize)
231
+ response = JSON.parse(body)
232
+ if response['Response'].key?('Error') == false
233
+ model = CreateSnapshotByTimeOffsetTemplateResponse.new
234
+ model.deserialize(response['Response'])
235
+ model
236
+ else
237
+ code = response['Response']['Error']['Code']
238
+ message = response['Response']['Error']['Message']
239
+ reqid = response['Response']['RequestId']
240
+ raise TencentCloud::Common::TencentCloudSDKException.new(code, message, reqid)
241
+ end
242
+ rescue TencentCloud::Common::TencentCloudSDKException => e
243
+ raise e
244
+ rescue StandardError => e
245
+ raise TencentCloud::Common::TencentCloudSDKException.new(nil, e.inspect)
246
+ end
247
+
248
+ # 创建用户自定义转码模板,数量上限:1000。
249
+
250
+ # @param request: Request instance for CreateTranscodeTemplate.
251
+ # @type request: :class:`Tencentcloud::mps::V20190612::CreateTranscodeTemplateRequest`
252
+ # @rtype: :class:`Tencentcloud::mps::V20190612::CreateTranscodeTemplateResponse`
253
+ def CreateTranscodeTemplate(request)
254
+ body = send_request('CreateTranscodeTemplate', request.serialize)
255
+ response = JSON.parse(body)
256
+ if response['Response'].key?('Error') == false
257
+ model = CreateTranscodeTemplateResponse.new
258
+ model.deserialize(response['Response'])
259
+ model
260
+ else
261
+ code = response['Response']['Error']['Code']
262
+ message = response['Response']['Error']['Message']
263
+ reqid = response['Response']['RequestId']
264
+ raise TencentCloud::Common::TencentCloudSDKException.new(code, message, reqid)
265
+ end
266
+ rescue TencentCloud::Common::TencentCloudSDKException => e
267
+ raise e
268
+ rescue StandardError => e
269
+ raise TencentCloud::Common::TencentCloudSDKException.new(nil, e.inspect)
270
+ end
271
+
272
+ # 创建用户自定义水印模板,数量上限:1000。
273
+
274
+ # @param request: Request instance for CreateWatermarkTemplate.
275
+ # @type request: :class:`Tencentcloud::mps::V20190612::CreateWatermarkTemplateRequest`
276
+ # @rtype: :class:`Tencentcloud::mps::V20190612::CreateWatermarkTemplateResponse`
277
+ def CreateWatermarkTemplate(request)
278
+ body = send_request('CreateWatermarkTemplate', request.serialize)
279
+ response = JSON.parse(body)
280
+ if response['Response'].key?('Error') == false
281
+ model = CreateWatermarkTemplateResponse.new
282
+ model.deserialize(response['Response'])
283
+ model
284
+ else
285
+ code = response['Response']['Error']['Code']
286
+ message = response['Response']['Error']['Message']
287
+ reqid = response['Response']['RequestId']
288
+ raise TencentCloud::Common::TencentCloudSDKException.new(code, message, reqid)
289
+ end
290
+ rescue TencentCloud::Common::TencentCloudSDKException => e
291
+ raise e
292
+ rescue StandardError => e
293
+ raise TencentCloud::Common::TencentCloudSDKException.new(nil, e.inspect)
294
+ end
295
+
296
+ # 该接口用于批量创建关键词样本,样本用于通过OCR、ASR技术,进行不适宜内容识别、内容识别等视频处理。
297
+
298
+ # @param request: Request instance for CreateWordSamples.
299
+ # @type request: :class:`Tencentcloud::mps::V20190612::CreateWordSamplesRequest`
300
+ # @rtype: :class:`Tencentcloud::mps::V20190612::CreateWordSamplesResponse`
301
+ def CreateWordSamples(request)
302
+ body = send_request('CreateWordSamples', request.serialize)
303
+ response = JSON.parse(body)
304
+ if response['Response'].key?('Error') == false
305
+ model = CreateWordSamplesResponse.new
306
+ model.deserialize(response['Response'])
307
+ model
308
+ else
309
+ code = response['Response']['Error']['Code']
310
+ message = response['Response']['Error']['Message']
311
+ reqid = response['Response']['RequestId']
312
+ raise TencentCloud::Common::TencentCloudSDKException.new(code, message, reqid)
313
+ end
314
+ rescue TencentCloud::Common::TencentCloudSDKException => e
315
+ raise e
316
+ rescue StandardError => e
317
+ raise TencentCloud::Common::TencentCloudSDKException.new(nil, e.inspect)
318
+ end
319
+
320
+ # 对 COS 中指定 Bucket 的目录下上传的媒体文件,设置处理规则,包括:
321
+ # 1. 视频转码(带水印);
322
+ # 2. 视频转动图;
323
+ # 3. 对视频按指定时间点截图;
324
+ # 4. 对视频采样截图;
325
+ # 5. 对视频截图雪碧图;
326
+ # 6. 对视频转自适应码流;
327
+ # 7. 智能内容审核(鉴黄、鉴恐、鉴政);
328
+ # 8. 智能内容分析(标签、分类、封面、按帧标签);
329
+ # 9. 智能内容识别(人脸、文本全文、文本关键词、语音全文、语音关键词)。
330
+
331
+ # 注意:创建工作流成功后是禁用状态,需要手动启用。
332
+
333
+ # @param request: Request instance for CreateWorkflow.
334
+ # @type request: :class:`Tencentcloud::mps::V20190612::CreateWorkflowRequest`
335
+ # @rtype: :class:`Tencentcloud::mps::V20190612::CreateWorkflowResponse`
336
+ def CreateWorkflow(request)
337
+ body = send_request('CreateWorkflow', request.serialize)
338
+ response = JSON.parse(body)
339
+ if response['Response'].key?('Error') == false
340
+ model = CreateWorkflowResponse.new
341
+ model.deserialize(response['Response'])
342
+ model
343
+ else
344
+ code = response['Response']['Error']['Code']
345
+ message = response['Response']['Error']['Message']
346
+ reqid = response['Response']['RequestId']
347
+ raise TencentCloud::Common::TencentCloudSDKException.new(code, message, reqid)
348
+ end
349
+ rescue TencentCloud::Common::TencentCloudSDKException => e
350
+ raise e
351
+ rescue StandardError => e
352
+ raise TencentCloud::Common::TencentCloudSDKException.new(nil, e.inspect)
353
+ end
354
+
355
+ # 删除用户自定义内容分析模板。
356
+
357
+ # 注意:模板 ID 为 10000 以下的为系统预置模板,不允许删除。
358
+
359
+ # @param request: Request instance for DeleteAIAnalysisTemplate.
360
+ # @type request: :class:`Tencentcloud::mps::V20190612::DeleteAIAnalysisTemplateRequest`
361
+ # @rtype: :class:`Tencentcloud::mps::V20190612::DeleteAIAnalysisTemplateResponse`
362
+ def DeleteAIAnalysisTemplate(request)
363
+ body = send_request('DeleteAIAnalysisTemplate', request.serialize)
364
+ response = JSON.parse(body)
365
+ if response['Response'].key?('Error') == false
366
+ model = DeleteAIAnalysisTemplateResponse.new
367
+ model.deserialize(response['Response'])
368
+ model
369
+ else
370
+ code = response['Response']['Error']['Code']
371
+ message = response['Response']['Error']['Message']
372
+ reqid = response['Response']['RequestId']
373
+ raise TencentCloud::Common::TencentCloudSDKException.new(code, message, reqid)
374
+ end
375
+ rescue TencentCloud::Common::TencentCloudSDKException => e
376
+ raise e
377
+ rescue StandardError => e
378
+ raise TencentCloud::Common::TencentCloudSDKException.new(nil, e.inspect)
379
+ end
380
+
381
+ # 删除用户自定义内容识别模板。
382
+
383
+ # @param request: Request instance for DeleteAIRecognitionTemplate.
384
+ # @type request: :class:`Tencentcloud::mps::V20190612::DeleteAIRecognitionTemplateRequest`
385
+ # @rtype: :class:`Tencentcloud::mps::V20190612::DeleteAIRecognitionTemplateResponse`
386
+ def DeleteAIRecognitionTemplate(request)
387
+ body = send_request('DeleteAIRecognitionTemplate', request.serialize)
388
+ response = JSON.parse(body)
389
+ if response['Response'].key?('Error') == false
390
+ model = DeleteAIRecognitionTemplateResponse.new
391
+ model.deserialize(response['Response'])
392
+ model
393
+ else
394
+ code = response['Response']['Error']['Code']
395
+ message = response['Response']['Error']['Message']
396
+ reqid = response['Response']['RequestId']
397
+ raise TencentCloud::Common::TencentCloudSDKException.new(code, message, reqid)
398
+ end
399
+ rescue TencentCloud::Common::TencentCloudSDKException => e
400
+ raise e
401
+ rescue StandardError => e
402
+ raise TencentCloud::Common::TencentCloudSDKException.new(nil, e.inspect)
403
+ end
404
+
405
+ # 删除转自适应码流模板
406
+
407
+ # @param request: Request instance for DeleteAdaptiveDynamicStreamingTemplate.
408
+ # @type request: :class:`Tencentcloud::mps::V20190612::DeleteAdaptiveDynamicStreamingTemplateRequest`
409
+ # @rtype: :class:`Tencentcloud::mps::V20190612::DeleteAdaptiveDynamicStreamingTemplateResponse`
410
+ def DeleteAdaptiveDynamicStreamingTemplate(request)
411
+ body = send_request('DeleteAdaptiveDynamicStreamingTemplate', request.serialize)
412
+ response = JSON.parse(body)
413
+ if response['Response'].key?('Error') == false
414
+ model = DeleteAdaptiveDynamicStreamingTemplateResponse.new
415
+ model.deserialize(response['Response'])
416
+ model
417
+ else
418
+ code = response['Response']['Error']['Code']
419
+ message = response['Response']['Error']['Message']
420
+ reqid = response['Response']['RequestId']
421
+ raise TencentCloud::Common::TencentCloudSDKException.new(code, message, reqid)
422
+ end
423
+ rescue TencentCloud::Common::TencentCloudSDKException => e
424
+ raise e
425
+ rescue StandardError => e
426
+ raise TencentCloud::Common::TencentCloudSDKException.new(nil, e.inspect)
427
+ end
428
+
429
+ # 删除用户自定义转动图模板。
430
+
431
+ # @param request: Request instance for DeleteAnimatedGraphicsTemplate.
432
+ # @type request: :class:`Tencentcloud::mps::V20190612::DeleteAnimatedGraphicsTemplateRequest`
433
+ # @rtype: :class:`Tencentcloud::mps::V20190612::DeleteAnimatedGraphicsTemplateResponse`
434
+ def DeleteAnimatedGraphicsTemplate(request)
435
+ body = send_request('DeleteAnimatedGraphicsTemplate', request.serialize)
436
+ response = JSON.parse(body)
437
+ if response['Response'].key?('Error') == false
438
+ model = DeleteAnimatedGraphicsTemplateResponse.new
439
+ model.deserialize(response['Response'])
440
+ model
441
+ else
442
+ code = response['Response']['Error']['Code']
443
+ message = response['Response']['Error']['Message']
444
+ reqid = response['Response']['RequestId']
445
+ raise TencentCloud::Common::TencentCloudSDKException.new(code, message, reqid)
446
+ end
447
+ rescue TencentCloud::Common::TencentCloudSDKException => e
448
+ raise e
449
+ rescue StandardError => e
450
+ raise TencentCloud::Common::TencentCloudSDKException.new(nil, e.inspect)
451
+ end
452
+
453
+ # 删除用户自定义内容智能识别模板。
454
+
455
+ # @param request: Request instance for DeleteContentReviewTemplate.
456
+ # @type request: :class:`Tencentcloud::mps::V20190612::DeleteContentReviewTemplateRequest`
457
+ # @rtype: :class:`Tencentcloud::mps::V20190612::DeleteContentReviewTemplateResponse`
458
+ def DeleteContentReviewTemplate(request)
459
+ body = send_request('DeleteContentReviewTemplate', request.serialize)
460
+ response = JSON.parse(body)
461
+ if response['Response'].key?('Error') == false
462
+ model = DeleteContentReviewTemplateResponse.new
463
+ model.deserialize(response['Response'])
464
+ model
465
+ else
466
+ code = response['Response']['Error']['Code']
467
+ message = response['Response']['Error']['Message']
468
+ reqid = response['Response']['RequestId']
469
+ raise TencentCloud::Common::TencentCloudSDKException.new(code, message, reqid)
470
+ end
471
+ rescue TencentCloud::Common::TencentCloudSDKException => e
472
+ raise e
473
+ rescue StandardError => e
474
+ raise TencentCloud::Common::TencentCloudSDKException.new(nil, e.inspect)
475
+ end
476
+
477
+ # 删除雪碧图模板。
478
+
479
+ # @param request: Request instance for DeleteImageSpriteTemplate.
480
+ # @type request: :class:`Tencentcloud::mps::V20190612::DeleteImageSpriteTemplateRequest`
481
+ # @rtype: :class:`Tencentcloud::mps::V20190612::DeleteImageSpriteTemplateResponse`
482
+ def DeleteImageSpriteTemplate(request)
483
+ body = send_request('DeleteImageSpriteTemplate', request.serialize)
484
+ response = JSON.parse(body)
485
+ if response['Response'].key?('Error') == false
486
+ model = DeleteImageSpriteTemplateResponse.new
487
+ model.deserialize(response['Response'])
488
+ model
489
+ else
490
+ code = response['Response']['Error']['Code']
491
+ message = response['Response']['Error']['Message']
492
+ reqid = response['Response']['RequestId']
493
+ raise TencentCloud::Common::TencentCloudSDKException.new(code, message, reqid)
494
+ end
495
+ rescue TencentCloud::Common::TencentCloudSDKException => e
496
+ raise e
497
+ rescue StandardError => e
498
+ raise TencentCloud::Common::TencentCloudSDKException.new(nil, e.inspect)
499
+ end
500
+
501
+ # 该接口用于根据素材 ID,删除素材样本。
502
+
503
+ # @param request: Request instance for DeletePersonSample.
504
+ # @type request: :class:`Tencentcloud::mps::V20190612::DeletePersonSampleRequest`
505
+ # @rtype: :class:`Tencentcloud::mps::V20190612::DeletePersonSampleResponse`
506
+ def DeletePersonSample(request)
507
+ body = send_request('DeletePersonSample', request.serialize)
508
+ response = JSON.parse(body)
509
+ if response['Response'].key?('Error') == false
510
+ model = DeletePersonSampleResponse.new
511
+ model.deserialize(response['Response'])
512
+ model
513
+ else
514
+ code = response['Response']['Error']['Code']
515
+ message = response['Response']['Error']['Message']
516
+ reqid = response['Response']['RequestId']
517
+ raise TencentCloud::Common::TencentCloudSDKException.new(code, message, reqid)
518
+ end
519
+ rescue TencentCloud::Common::TencentCloudSDKException => e
520
+ raise e
521
+ rescue StandardError => e
522
+ raise TencentCloud::Common::TencentCloudSDKException.new(nil, e.inspect)
523
+ end
524
+
525
+ # 删除用户自定义采样截图模板。
526
+
527
+ # @param request: Request instance for DeleteSampleSnapshotTemplate.
528
+ # @type request: :class:`Tencentcloud::mps::V20190612::DeleteSampleSnapshotTemplateRequest`
529
+ # @rtype: :class:`Tencentcloud::mps::V20190612::DeleteSampleSnapshotTemplateResponse`
530
+ def DeleteSampleSnapshotTemplate(request)
531
+ body = send_request('DeleteSampleSnapshotTemplate', request.serialize)
532
+ response = JSON.parse(body)
533
+ if response['Response'].key?('Error') == false
534
+ model = DeleteSampleSnapshotTemplateResponse.new
535
+ model.deserialize(response['Response'])
536
+ model
537
+ else
538
+ code = response['Response']['Error']['Code']
539
+ message = response['Response']['Error']['Message']
540
+ reqid = response['Response']['RequestId']
541
+ raise TencentCloud::Common::TencentCloudSDKException.new(code, message, reqid)
542
+ end
543
+ rescue TencentCloud::Common::TencentCloudSDKException => e
544
+ raise e
545
+ rescue StandardError => e
546
+ raise TencentCloud::Common::TencentCloudSDKException.new(nil, e.inspect)
547
+ end
548
+
549
+ # 删除用户自定义指定时间点截图模板。
550
+
551
+ # @param request: Request instance for DeleteSnapshotByTimeOffsetTemplate.
552
+ # @type request: :class:`Tencentcloud::mps::V20190612::DeleteSnapshotByTimeOffsetTemplateRequest`
553
+ # @rtype: :class:`Tencentcloud::mps::V20190612::DeleteSnapshotByTimeOffsetTemplateResponse`
554
+ def DeleteSnapshotByTimeOffsetTemplate(request)
555
+ body = send_request('DeleteSnapshotByTimeOffsetTemplate', request.serialize)
556
+ response = JSON.parse(body)
557
+ if response['Response'].key?('Error') == false
558
+ model = DeleteSnapshotByTimeOffsetTemplateResponse.new
559
+ model.deserialize(response['Response'])
560
+ model
561
+ else
562
+ code = response['Response']['Error']['Code']
563
+ message = response['Response']['Error']['Message']
564
+ reqid = response['Response']['RequestId']
565
+ raise TencentCloud::Common::TencentCloudSDKException.new(code, message, reqid)
566
+ end
567
+ rescue TencentCloud::Common::TencentCloudSDKException => e
568
+ raise e
569
+ rescue StandardError => e
570
+ raise TencentCloud::Common::TencentCloudSDKException.new(nil, e.inspect)
571
+ end
572
+
573
+ # 删除用户自定义转码模板。
574
+
575
+ # @param request: Request instance for DeleteTranscodeTemplate.
576
+ # @type request: :class:`Tencentcloud::mps::V20190612::DeleteTranscodeTemplateRequest`
577
+ # @rtype: :class:`Tencentcloud::mps::V20190612::DeleteTranscodeTemplateResponse`
578
+ def DeleteTranscodeTemplate(request)
579
+ body = send_request('DeleteTranscodeTemplate', request.serialize)
580
+ response = JSON.parse(body)
581
+ if response['Response'].key?('Error') == false
582
+ model = DeleteTranscodeTemplateResponse.new
583
+ model.deserialize(response['Response'])
584
+ model
585
+ else
586
+ code = response['Response']['Error']['Code']
587
+ message = response['Response']['Error']['Message']
588
+ reqid = response['Response']['RequestId']
589
+ raise TencentCloud::Common::TencentCloudSDKException.new(code, message, reqid)
590
+ end
591
+ rescue TencentCloud::Common::TencentCloudSDKException => e
592
+ raise e
593
+ rescue StandardError => e
594
+ raise TencentCloud::Common::TencentCloudSDKException.new(nil, e.inspect)
595
+ end
596
+
597
+ # 删除用户自定义水印模板。
598
+
599
+ # @param request: Request instance for DeleteWatermarkTemplate.
600
+ # @type request: :class:`Tencentcloud::mps::V20190612::DeleteWatermarkTemplateRequest`
601
+ # @rtype: :class:`Tencentcloud::mps::V20190612::DeleteWatermarkTemplateResponse`
602
+ def DeleteWatermarkTemplate(request)
603
+ body = send_request('DeleteWatermarkTemplate', request.serialize)
604
+ response = JSON.parse(body)
605
+ if response['Response'].key?('Error') == false
606
+ model = DeleteWatermarkTemplateResponse.new
607
+ model.deserialize(response['Response'])
608
+ model
609
+ else
610
+ code = response['Response']['Error']['Code']
611
+ message = response['Response']['Error']['Message']
612
+ reqid = response['Response']['RequestId']
613
+ raise TencentCloud::Common::TencentCloudSDKException.new(code, message, reqid)
614
+ end
615
+ rescue TencentCloud::Common::TencentCloudSDKException => e
616
+ raise e
617
+ rescue StandardError => e
618
+ raise TencentCloud::Common::TencentCloudSDKException.new(nil, e.inspect)
619
+ end
620
+
621
+ # 该接口用于批量删除关键词样本。
622
+
623
+ # @param request: Request instance for DeleteWordSamples.
624
+ # @type request: :class:`Tencentcloud::mps::V20190612::DeleteWordSamplesRequest`
625
+ # @rtype: :class:`Tencentcloud::mps::V20190612::DeleteWordSamplesResponse`
626
+ def DeleteWordSamples(request)
627
+ body = send_request('DeleteWordSamples', request.serialize)
628
+ response = JSON.parse(body)
629
+ if response['Response'].key?('Error') == false
630
+ model = DeleteWordSamplesResponse.new
631
+ model.deserialize(response['Response'])
632
+ model
633
+ else
634
+ code = response['Response']['Error']['Code']
635
+ message = response['Response']['Error']['Message']
636
+ reqid = response['Response']['RequestId']
637
+ raise TencentCloud::Common::TencentCloudSDKException.new(code, message, reqid)
638
+ end
639
+ rescue TencentCloud::Common::TencentCloudSDKException => e
640
+ raise e
641
+ rescue StandardError => e
642
+ raise TencentCloud::Common::TencentCloudSDKException.new(nil, e.inspect)
643
+ end
644
+
645
+ # 删除工作流。对于已启用的工作流,需要禁用后才能删除。
646
+
647
+ # @param request: Request instance for DeleteWorkflow.
648
+ # @type request: :class:`Tencentcloud::mps::V20190612::DeleteWorkflowRequest`
649
+ # @rtype: :class:`Tencentcloud::mps::V20190612::DeleteWorkflowResponse`
650
+ def DeleteWorkflow(request)
651
+ body = send_request('DeleteWorkflow', request.serialize)
652
+ response = JSON.parse(body)
653
+ if response['Response'].key?('Error') == false
654
+ model = DeleteWorkflowResponse.new
655
+ model.deserialize(response['Response'])
656
+ model
657
+ else
658
+ code = response['Response']['Error']['Code']
659
+ message = response['Response']['Error']['Message']
660
+ reqid = response['Response']['RequestId']
661
+ raise TencentCloud::Common::TencentCloudSDKException.new(code, message, reqid)
662
+ end
663
+ rescue TencentCloud::Common::TencentCloudSDKException => e
664
+ raise e
665
+ rescue StandardError => e
666
+ raise TencentCloud::Common::TencentCloudSDKException.new(nil, e.inspect)
667
+ end
668
+
669
+ # 根据内容分析模板唯一标识,获取内容分析模板详情列表。返回结果包含符合条件的所有用户自定义内容分析模板及系统预置视频内容分析模板
670
+
671
+ # @param request: Request instance for DescribeAIAnalysisTemplates.
672
+ # @type request: :class:`Tencentcloud::mps::V20190612::DescribeAIAnalysisTemplatesRequest`
673
+ # @rtype: :class:`Tencentcloud::mps::V20190612::DescribeAIAnalysisTemplatesResponse`
674
+ def DescribeAIAnalysisTemplates(request)
675
+ body = send_request('DescribeAIAnalysisTemplates', request.serialize)
676
+ response = JSON.parse(body)
677
+ if response['Response'].key?('Error') == false
678
+ model = DescribeAIAnalysisTemplatesResponse.new
679
+ model.deserialize(response['Response'])
680
+ model
681
+ else
682
+ code = response['Response']['Error']['Code']
683
+ message = response['Response']['Error']['Message']
684
+ reqid = response['Response']['RequestId']
685
+ raise TencentCloud::Common::TencentCloudSDKException.new(code, message, reqid)
686
+ end
687
+ rescue TencentCloud::Common::TencentCloudSDKException => e
688
+ raise e
689
+ rescue StandardError => e
690
+ raise TencentCloud::Common::TencentCloudSDKException.new(nil, e.inspect)
691
+ end
692
+
693
+ # 根据内容识别模板唯一标识,获取内容识别模板详情列表。返回结果包含符合条件的所有用户自定义内容识别模板及系统预置视频内容识别模板
694
+
695
+ # @param request: Request instance for DescribeAIRecognitionTemplates.
696
+ # @type request: :class:`Tencentcloud::mps::V20190612::DescribeAIRecognitionTemplatesRequest`
697
+ # @rtype: :class:`Tencentcloud::mps::V20190612::DescribeAIRecognitionTemplatesResponse`
698
+ def DescribeAIRecognitionTemplates(request)
699
+ body = send_request('DescribeAIRecognitionTemplates', request.serialize)
700
+ response = JSON.parse(body)
701
+ if response['Response'].key?('Error') == false
702
+ model = DescribeAIRecognitionTemplatesResponse.new
703
+ model.deserialize(response['Response'])
704
+ model
705
+ else
706
+ code = response['Response']['Error']['Code']
707
+ message = response['Response']['Error']['Message']
708
+ reqid = response['Response']['RequestId']
709
+ raise TencentCloud::Common::TencentCloudSDKException.new(code, message, reqid)
710
+ end
711
+ rescue TencentCloud::Common::TencentCloudSDKException => e
712
+ raise e
713
+ rescue StandardError => e
714
+ raise TencentCloud::Common::TencentCloudSDKException.new(nil, e.inspect)
715
+ end
716
+
717
+ # 查询转自适应码流模板,支持根据条件,分页查询。
718
+
719
+ # @param request: Request instance for DescribeAdaptiveDynamicStreamingTemplates.
720
+ # @type request: :class:`Tencentcloud::mps::V20190612::DescribeAdaptiveDynamicStreamingTemplatesRequest`
721
+ # @rtype: :class:`Tencentcloud::mps::V20190612::DescribeAdaptiveDynamicStreamingTemplatesResponse`
722
+ def DescribeAdaptiveDynamicStreamingTemplates(request)
723
+ body = send_request('DescribeAdaptiveDynamicStreamingTemplates', request.serialize)
724
+ response = JSON.parse(body)
725
+ if response['Response'].key?('Error') == false
726
+ model = DescribeAdaptiveDynamicStreamingTemplatesResponse.new
727
+ model.deserialize(response['Response'])
728
+ model
729
+ else
730
+ code = response['Response']['Error']['Code']
731
+ message = response['Response']['Error']['Message']
732
+ reqid = response['Response']['RequestId']
733
+ raise TencentCloud::Common::TencentCloudSDKException.new(code, message, reqid)
734
+ end
735
+ rescue TencentCloud::Common::TencentCloudSDKException => e
736
+ raise e
737
+ rescue StandardError => e
738
+ raise TencentCloud::Common::TencentCloudSDKException.new(nil, e.inspect)
739
+ end
740
+
741
+ # 查询转动图模板列表,支持根据条件,分页查询。
742
+
743
+ # @param request: Request instance for DescribeAnimatedGraphicsTemplates.
744
+ # @type request: :class:`Tencentcloud::mps::V20190612::DescribeAnimatedGraphicsTemplatesRequest`
745
+ # @rtype: :class:`Tencentcloud::mps::V20190612::DescribeAnimatedGraphicsTemplatesResponse`
746
+ def DescribeAnimatedGraphicsTemplates(request)
747
+ body = send_request('DescribeAnimatedGraphicsTemplates', request.serialize)
748
+ response = JSON.parse(body)
749
+ if response['Response'].key?('Error') == false
750
+ model = DescribeAnimatedGraphicsTemplatesResponse.new
751
+ model.deserialize(response['Response'])
752
+ model
753
+ else
754
+ code = response['Response']['Error']['Code']
755
+ message = response['Response']['Error']['Message']
756
+ reqid = response['Response']['RequestId']
757
+ raise TencentCloud::Common::TencentCloudSDKException.new(code, message, reqid)
758
+ end
759
+ rescue TencentCloud::Common::TencentCloudSDKException => e
760
+ raise e
761
+ rescue StandardError => e
762
+ raise TencentCloud::Common::TencentCloudSDKException.new(nil, e.inspect)
763
+ end
764
+
765
+ # 根据内容智能识别模板唯一标识,获取内容智能识别模板详情列表。返回结果包含符合条件的所有用户自定义模板及系统预置内容智能识别模板。
766
+
767
+ # @param request: Request instance for DescribeContentReviewTemplates.
768
+ # @type request: :class:`Tencentcloud::mps::V20190612::DescribeContentReviewTemplatesRequest`
769
+ # @rtype: :class:`Tencentcloud::mps::V20190612::DescribeContentReviewTemplatesResponse`
770
+ def DescribeContentReviewTemplates(request)
771
+ body = send_request('DescribeContentReviewTemplates', request.serialize)
772
+ response = JSON.parse(body)
773
+ if response['Response'].key?('Error') == false
774
+ model = DescribeContentReviewTemplatesResponse.new
775
+ model.deserialize(response['Response'])
776
+ model
777
+ else
778
+ code = response['Response']['Error']['Code']
779
+ message = response['Response']['Error']['Message']
780
+ reqid = response['Response']['RequestId']
781
+ raise TencentCloud::Common::TencentCloudSDKException.new(code, message, reqid)
782
+ end
783
+ rescue TencentCloud::Common::TencentCloudSDKException => e
784
+ raise e
785
+ rescue StandardError => e
786
+ raise TencentCloud::Common::TencentCloudSDKException.new(nil, e.inspect)
787
+ end
788
+
789
+ # 查询雪碧图模板,支持根据条件,分页查询。
790
+
791
+ # @param request: Request instance for DescribeImageSpriteTemplates.
792
+ # @type request: :class:`Tencentcloud::mps::V20190612::DescribeImageSpriteTemplatesRequest`
793
+ # @rtype: :class:`Tencentcloud::mps::V20190612::DescribeImageSpriteTemplatesResponse`
794
+ def DescribeImageSpriteTemplates(request)
795
+ body = send_request('DescribeImageSpriteTemplates', request.serialize)
796
+ response = JSON.parse(body)
797
+ if response['Response'].key?('Error') == false
798
+ model = DescribeImageSpriteTemplatesResponse.new
799
+ model.deserialize(response['Response'])
800
+ model
801
+ else
802
+ code = response['Response']['Error']['Code']
803
+ message = response['Response']['Error']['Message']
804
+ reqid = response['Response']['RequestId']
805
+ raise TencentCloud::Common::TencentCloudSDKException.new(code, message, reqid)
806
+ end
807
+ rescue TencentCloud::Common::TencentCloudSDKException => e
808
+ raise e
809
+ rescue StandardError => e
810
+ raise TencentCloud::Common::TencentCloudSDKException.new(nil, e.inspect)
811
+ end
812
+
813
+ # 获取媒体的元信息,包括视频画面宽、高、编码格式、时长、帧率等。
814
+
815
+ # @param request: Request instance for DescribeMediaMetaData.
816
+ # @type request: :class:`Tencentcloud::mps::V20190612::DescribeMediaMetaDataRequest`
817
+ # @rtype: :class:`Tencentcloud::mps::V20190612::DescribeMediaMetaDataResponse`
818
+ def DescribeMediaMetaData(request)
819
+ body = send_request('DescribeMediaMetaData', request.serialize)
820
+ response = JSON.parse(body)
821
+ if response['Response'].key?('Error') == false
822
+ model = DescribeMediaMetaDataResponse.new
823
+ model.deserialize(response['Response'])
824
+ model
825
+ else
826
+ code = response['Response']['Error']['Code']
827
+ message = response['Response']['Error']['Message']
828
+ reqid = response['Response']['RequestId']
829
+ raise TencentCloud::Common::TencentCloudSDKException.new(code, message, reqid)
830
+ end
831
+ rescue TencentCloud::Common::TencentCloudSDKException => e
832
+ raise e
833
+ rescue StandardError => e
834
+ raise TencentCloud::Common::TencentCloudSDKException.new(nil, e.inspect)
835
+ end
836
+
837
+ # 该接口用于查询素材样本信息,支持根据素材 ID、名称、标签,分页查询。
838
+
839
+ # @param request: Request instance for DescribePersonSamples.
840
+ # @type request: :class:`Tencentcloud::mps::V20190612::DescribePersonSamplesRequest`
841
+ # @rtype: :class:`Tencentcloud::mps::V20190612::DescribePersonSamplesResponse`
842
+ def DescribePersonSamples(request)
843
+ body = send_request('DescribePersonSamples', request.serialize)
844
+ response = JSON.parse(body)
845
+ if response['Response'].key?('Error') == false
846
+ model = DescribePersonSamplesResponse.new
847
+ model.deserialize(response['Response'])
848
+ model
849
+ else
850
+ code = response['Response']['Error']['Code']
851
+ message = response['Response']['Error']['Message']
852
+ reqid = response['Response']['RequestId']
853
+ raise TencentCloud::Common::TencentCloudSDKException.new(code, message, reqid)
854
+ end
855
+ rescue TencentCloud::Common::TencentCloudSDKException => e
856
+ raise e
857
+ rescue StandardError => e
858
+ raise TencentCloud::Common::TencentCloudSDKException.new(nil, e.inspect)
859
+ end
860
+
861
+ # 查询采样截图模板,支持根据条件,分页查询。
862
+
863
+ # @param request: Request instance for DescribeSampleSnapshotTemplates.
864
+ # @type request: :class:`Tencentcloud::mps::V20190612::DescribeSampleSnapshotTemplatesRequest`
865
+ # @rtype: :class:`Tencentcloud::mps::V20190612::DescribeSampleSnapshotTemplatesResponse`
866
+ def DescribeSampleSnapshotTemplates(request)
867
+ body = send_request('DescribeSampleSnapshotTemplates', request.serialize)
868
+ response = JSON.parse(body)
869
+ if response['Response'].key?('Error') == false
870
+ model = DescribeSampleSnapshotTemplatesResponse.new
871
+ model.deserialize(response['Response'])
872
+ model
873
+ else
874
+ code = response['Response']['Error']['Code']
875
+ message = response['Response']['Error']['Message']
876
+ reqid = response['Response']['RequestId']
877
+ raise TencentCloud::Common::TencentCloudSDKException.new(code, message, reqid)
878
+ end
879
+ rescue TencentCloud::Common::TencentCloudSDKException => e
880
+ raise e
881
+ rescue StandardError => e
882
+ raise TencentCloud::Common::TencentCloudSDKException.new(nil, e.inspect)
883
+ end
884
+
885
+ # 查询指定时间点截图模板,支持根据条件,分页查询。
886
+
887
+ # @param request: Request instance for DescribeSnapshotByTimeOffsetTemplates.
888
+ # @type request: :class:`Tencentcloud::mps::V20190612::DescribeSnapshotByTimeOffsetTemplatesRequest`
889
+ # @rtype: :class:`Tencentcloud::mps::V20190612::DescribeSnapshotByTimeOffsetTemplatesResponse`
890
+ def DescribeSnapshotByTimeOffsetTemplates(request)
891
+ body = send_request('DescribeSnapshotByTimeOffsetTemplates', request.serialize)
892
+ response = JSON.parse(body)
893
+ if response['Response'].key?('Error') == false
894
+ model = DescribeSnapshotByTimeOffsetTemplatesResponse.new
895
+ model.deserialize(response['Response'])
896
+ model
897
+ else
898
+ code = response['Response']['Error']['Code']
899
+ message = response['Response']['Error']['Message']
900
+ reqid = response['Response']['RequestId']
901
+ raise TencentCloud::Common::TencentCloudSDKException.new(code, message, reqid)
902
+ end
903
+ rescue TencentCloud::Common::TencentCloudSDKException => e
904
+ raise e
905
+ rescue StandardError => e
906
+ raise TencentCloud::Common::TencentCloudSDKException.new(nil, e.inspect)
907
+ end
908
+
909
+ # 通过任务 ID 查询任务的执行状态和结果的详细信息(最多可以查询3天之内提交的任务)。
910
+
911
+ # @param request: Request instance for DescribeTaskDetail.
912
+ # @type request: :class:`Tencentcloud::mps::V20190612::DescribeTaskDetailRequest`
913
+ # @rtype: :class:`Tencentcloud::mps::V20190612::DescribeTaskDetailResponse`
914
+ def DescribeTaskDetail(request)
915
+ body = send_request('DescribeTaskDetail', request.serialize)
916
+ response = JSON.parse(body)
917
+ if response['Response'].key?('Error') == false
918
+ model = DescribeTaskDetailResponse.new
919
+ model.deserialize(response['Response'])
920
+ model
921
+ else
922
+ code = response['Response']['Error']['Code']
923
+ message = response['Response']['Error']['Message']
924
+ reqid = response['Response']['RequestId']
925
+ raise TencentCloud::Common::TencentCloudSDKException.new(code, message, reqid)
926
+ end
927
+ rescue TencentCloud::Common::TencentCloudSDKException => e
928
+ raise e
929
+ rescue StandardError => e
930
+ raise TencentCloud::Common::TencentCloudSDKException.new(nil, e.inspect)
931
+ end
932
+
933
+ # * 该接口用于查询任务列表;
934
+ # * 当列表数据比较多时,单次接口调用无法拉取整个列表,可通过 ScrollToken 参数,分批拉取;
935
+ # * 只能查询到最近三天(72 小时)内的任务。
936
+
937
+ # @param request: Request instance for DescribeTasks.
938
+ # @type request: :class:`Tencentcloud::mps::V20190612::DescribeTasksRequest`
939
+ # @rtype: :class:`Tencentcloud::mps::V20190612::DescribeTasksResponse`
940
+ def DescribeTasks(request)
941
+ body = send_request('DescribeTasks', request.serialize)
942
+ response = JSON.parse(body)
943
+ if response['Response'].key?('Error') == false
944
+ model = DescribeTasksResponse.new
945
+ model.deserialize(response['Response'])
946
+ model
947
+ else
948
+ code = response['Response']['Error']['Code']
949
+ message = response['Response']['Error']['Message']
950
+ reqid = response['Response']['RequestId']
951
+ raise TencentCloud::Common::TencentCloudSDKException.new(code, message, reqid)
952
+ end
953
+ rescue TencentCloud::Common::TencentCloudSDKException => e
954
+ raise e
955
+ rescue StandardError => e
956
+ raise TencentCloud::Common::TencentCloudSDKException.new(nil, e.inspect)
957
+ end
958
+
959
+ # 根据转码模板唯一标识,获取转码模板详情列表。返回结果包含符合条件的所有用户自定义模板及[系统预置转码模板](https://cloud.tencent.com/document/product/266/33476#.E9.A2.84.E7.BD.AE.E8.BD.AC.E7.A0.81.E6.A8.A1.E6.9D.BF)。
960
+
961
+ # @param request: Request instance for DescribeTranscodeTemplates.
962
+ # @type request: :class:`Tencentcloud::mps::V20190612::DescribeTranscodeTemplatesRequest`
963
+ # @rtype: :class:`Tencentcloud::mps::V20190612::DescribeTranscodeTemplatesResponse`
964
+ def DescribeTranscodeTemplates(request)
965
+ body = send_request('DescribeTranscodeTemplates', request.serialize)
966
+ response = JSON.parse(body)
967
+ if response['Response'].key?('Error') == false
968
+ model = DescribeTranscodeTemplatesResponse.new
969
+ model.deserialize(response['Response'])
970
+ model
971
+ else
972
+ code = response['Response']['Error']['Code']
973
+ message = response['Response']['Error']['Message']
974
+ reqid = response['Response']['RequestId']
975
+ raise TencentCloud::Common::TencentCloudSDKException.new(code, message, reqid)
976
+ end
977
+ rescue TencentCloud::Common::TencentCloudSDKException => e
978
+ raise e
979
+ rescue StandardError => e
980
+ raise TencentCloud::Common::TencentCloudSDKException.new(nil, e.inspect)
981
+ end
982
+
983
+ # 查询用户自定义水印模板,支持根据条件,分页查询。
984
+
985
+ # @param request: Request instance for DescribeWatermarkTemplates.
986
+ # @type request: :class:`Tencentcloud::mps::V20190612::DescribeWatermarkTemplatesRequest`
987
+ # @rtype: :class:`Tencentcloud::mps::V20190612::DescribeWatermarkTemplatesResponse`
988
+ def DescribeWatermarkTemplates(request)
989
+ body = send_request('DescribeWatermarkTemplates', request.serialize)
990
+ response = JSON.parse(body)
991
+ if response['Response'].key?('Error') == false
992
+ model = DescribeWatermarkTemplatesResponse.new
993
+ model.deserialize(response['Response'])
994
+ model
995
+ else
996
+ code = response['Response']['Error']['Code']
997
+ message = response['Response']['Error']['Message']
998
+ reqid = response['Response']['RequestId']
999
+ raise TencentCloud::Common::TencentCloudSDKException.new(code, message, reqid)
1000
+ end
1001
+ rescue TencentCloud::Common::TencentCloudSDKException => e
1002
+ raise e
1003
+ rescue StandardError => e
1004
+ raise TencentCloud::Common::TencentCloudSDKException.new(nil, e.inspect)
1005
+ end
1006
+
1007
+ # 该接口用于根据应用场景、关键词、标签,分页查询关键词样本信息。
1008
+
1009
+ # @param request: Request instance for DescribeWordSamples.
1010
+ # @type request: :class:`Tencentcloud::mps::V20190612::DescribeWordSamplesRequest`
1011
+ # @rtype: :class:`Tencentcloud::mps::V20190612::DescribeWordSamplesResponse`
1012
+ def DescribeWordSamples(request)
1013
+ body = send_request('DescribeWordSamples', request.serialize)
1014
+ response = JSON.parse(body)
1015
+ if response['Response'].key?('Error') == false
1016
+ model = DescribeWordSamplesResponse.new
1017
+ model.deserialize(response['Response'])
1018
+ model
1019
+ else
1020
+ code = response['Response']['Error']['Code']
1021
+ message = response['Response']['Error']['Message']
1022
+ reqid = response['Response']['RequestId']
1023
+ raise TencentCloud::Common::TencentCloudSDKException.new(code, message, reqid)
1024
+ end
1025
+ rescue TencentCloud::Common::TencentCloudSDKException => e
1026
+ raise e
1027
+ rescue StandardError => e
1028
+ raise TencentCloud::Common::TencentCloudSDKException.new(nil, e.inspect)
1029
+ end
1030
+
1031
+ # 根据工作流 ID,获取工作流详情列表。
1032
+
1033
+ # @param request: Request instance for DescribeWorkflows.
1034
+ # @type request: :class:`Tencentcloud::mps::V20190612::DescribeWorkflowsRequest`
1035
+ # @rtype: :class:`Tencentcloud::mps::V20190612::DescribeWorkflowsResponse`
1036
+ def DescribeWorkflows(request)
1037
+ body = send_request('DescribeWorkflows', request.serialize)
1038
+ response = JSON.parse(body)
1039
+ if response['Response'].key?('Error') == false
1040
+ model = DescribeWorkflowsResponse.new
1041
+ model.deserialize(response['Response'])
1042
+ model
1043
+ else
1044
+ code = response['Response']['Error']['Code']
1045
+ message = response['Response']['Error']['Message']
1046
+ reqid = response['Response']['RequestId']
1047
+ raise TencentCloud::Common::TencentCloudSDKException.new(code, message, reqid)
1048
+ end
1049
+ rescue TencentCloud::Common::TencentCloudSDKException => e
1050
+ raise e
1051
+ rescue StandardError => e
1052
+ raise TencentCloud::Common::TencentCloudSDKException.new(nil, e.inspect)
1053
+ end
1054
+
1055
+ # 禁用工作流。
1056
+
1057
+ # @param request: Request instance for DisableWorkflow.
1058
+ # @type request: :class:`Tencentcloud::mps::V20190612::DisableWorkflowRequest`
1059
+ # @rtype: :class:`Tencentcloud::mps::V20190612::DisableWorkflowResponse`
1060
+ def DisableWorkflow(request)
1061
+ body = send_request('DisableWorkflow', request.serialize)
1062
+ response = JSON.parse(body)
1063
+ if response['Response'].key?('Error') == false
1064
+ model = DisableWorkflowResponse.new
1065
+ model.deserialize(response['Response'])
1066
+ model
1067
+ else
1068
+ code = response['Response']['Error']['Code']
1069
+ message = response['Response']['Error']['Message']
1070
+ reqid = response['Response']['RequestId']
1071
+ raise TencentCloud::Common::TencentCloudSDKException.new(code, message, reqid)
1072
+ end
1073
+ rescue TencentCloud::Common::TencentCloudSDKException => e
1074
+ raise e
1075
+ rescue StandardError => e
1076
+ raise TencentCloud::Common::TencentCloudSDKException.new(nil, e.inspect)
1077
+ end
1078
+
1079
+ # 对视频进行编辑(剪辑、拼接等),生成一个新的点播视频。编辑的功能包括:
1080
+
1081
+ # 1. 对一个文件进行剪辑,生成一个新的视频;
1082
+ # 2. 对多个文件进行拼接,生成一个新的视频;
1083
+ # 3. 对多个文件进行剪辑,然后再拼接,生成一个新的视频。
1084
+
1085
+ # @param request: Request instance for EditMedia.
1086
+ # @type request: :class:`Tencentcloud::mps::V20190612::EditMediaRequest`
1087
+ # @rtype: :class:`Tencentcloud::mps::V20190612::EditMediaResponse`
1088
+ def EditMedia(request)
1089
+ body = send_request('EditMedia', request.serialize)
1090
+ response = JSON.parse(body)
1091
+ if response['Response'].key?('Error') == false
1092
+ model = EditMediaResponse.new
1093
+ model.deserialize(response['Response'])
1094
+ model
1095
+ else
1096
+ code = response['Response']['Error']['Code']
1097
+ message = response['Response']['Error']['Message']
1098
+ reqid = response['Response']['RequestId']
1099
+ raise TencentCloud::Common::TencentCloudSDKException.new(code, message, reqid)
1100
+ end
1101
+ rescue TencentCloud::Common::TencentCloudSDKException => e
1102
+ raise e
1103
+ rescue StandardError => e
1104
+ raise TencentCloud::Common::TencentCloudSDKException.new(nil, e.inspect)
1105
+ end
1106
+
1107
+ # 启用工作流。
1108
+
1109
+ # @param request: Request instance for EnableWorkflow.
1110
+ # @type request: :class:`Tencentcloud::mps::V20190612::EnableWorkflowRequest`
1111
+ # @rtype: :class:`Tencentcloud::mps::V20190612::EnableWorkflowResponse`
1112
+ def EnableWorkflow(request)
1113
+ body = send_request('EnableWorkflow', request.serialize)
1114
+ response = JSON.parse(body)
1115
+ if response['Response'].key?('Error') == false
1116
+ model = EnableWorkflowResponse.new
1117
+ model.deserialize(response['Response'])
1118
+ model
1119
+ else
1120
+ code = response['Response']['Error']['Code']
1121
+ message = response['Response']['Error']['Message']
1122
+ reqid = response['Response']['RequestId']
1123
+ raise TencentCloud::Common::TencentCloudSDKException.new(code, message, reqid)
1124
+ end
1125
+ rescue TencentCloud::Common::TencentCloudSDKException => e
1126
+ raise e
1127
+ rescue StandardError => e
1128
+ raise TencentCloud::Common::TencentCloudSDKException.new(nil, e.inspect)
1129
+ end
1130
+
1131
+ # 本接口仅用于定制开发的特殊场景,除非云视频处理客服人员主动告知您需要使用本接口,其它情况请勿调用。
1132
+
1133
+ # @param request: Request instance for ExecuteFunction.
1134
+ # @type request: :class:`Tencentcloud::mps::V20190612::ExecuteFunctionRequest`
1135
+ # @rtype: :class:`Tencentcloud::mps::V20190612::ExecuteFunctionResponse`
1136
+ def ExecuteFunction(request)
1137
+ body = send_request('ExecuteFunction', request.serialize)
1138
+ response = JSON.parse(body)
1139
+ if response['Response'].key?('Error') == false
1140
+ model = ExecuteFunctionResponse.new
1141
+ model.deserialize(response['Response'])
1142
+ model
1143
+ else
1144
+ code = response['Response']['Error']['Code']
1145
+ message = response['Response']['Error']['Message']
1146
+ reqid = response['Response']['RequestId']
1147
+ raise TencentCloud::Common::TencentCloudSDKException.new(code, message, reqid)
1148
+ end
1149
+ rescue TencentCloud::Common::TencentCloudSDKException => e
1150
+ raise e
1151
+ rescue StandardError => e
1152
+ raise TencentCloud::Common::TencentCloudSDKException.new(nil, e.inspect)
1153
+ end
1154
+
1155
+ # 对已发起的任务进行管理。
1156
+
1157
+ # @param request: Request instance for ManageTask.
1158
+ # @type request: :class:`Tencentcloud::mps::V20190612::ManageTaskRequest`
1159
+ # @rtype: :class:`Tencentcloud::mps::V20190612::ManageTaskResponse`
1160
+ def ManageTask(request)
1161
+ body = send_request('ManageTask', request.serialize)
1162
+ response = JSON.parse(body)
1163
+ if response['Response'].key?('Error') == false
1164
+ model = ManageTaskResponse.new
1165
+ model.deserialize(response['Response'])
1166
+ model
1167
+ else
1168
+ code = response['Response']['Error']['Code']
1169
+ message = response['Response']['Error']['Message']
1170
+ reqid = response['Response']['RequestId']
1171
+ raise TencentCloud::Common::TencentCloudSDKException.new(code, message, reqid)
1172
+ end
1173
+ rescue TencentCloud::Common::TencentCloudSDKException => e
1174
+ raise e
1175
+ rescue StandardError => e
1176
+ raise TencentCloud::Common::TencentCloudSDKException.new(nil, e.inspect)
1177
+ end
1178
+
1179
+ # 修改用户自定义内容分析模板。
1180
+
1181
+ # 注意:模板 ID 10000 以下的为系统预置模板,不允许修改。
1182
+
1183
+ # @param request: Request instance for ModifyAIAnalysisTemplate.
1184
+ # @type request: :class:`Tencentcloud::mps::V20190612::ModifyAIAnalysisTemplateRequest`
1185
+ # @rtype: :class:`Tencentcloud::mps::V20190612::ModifyAIAnalysisTemplateResponse`
1186
+ def ModifyAIAnalysisTemplate(request)
1187
+ body = send_request('ModifyAIAnalysisTemplate', request.serialize)
1188
+ response = JSON.parse(body)
1189
+ if response['Response'].key?('Error') == false
1190
+ model = ModifyAIAnalysisTemplateResponse.new
1191
+ model.deserialize(response['Response'])
1192
+ model
1193
+ else
1194
+ code = response['Response']['Error']['Code']
1195
+ message = response['Response']['Error']['Message']
1196
+ reqid = response['Response']['RequestId']
1197
+ raise TencentCloud::Common::TencentCloudSDKException.new(code, message, reqid)
1198
+ end
1199
+ rescue TencentCloud::Common::TencentCloudSDKException => e
1200
+ raise e
1201
+ rescue StandardError => e
1202
+ raise TencentCloud::Common::TencentCloudSDKException.new(nil, e.inspect)
1203
+ end
1204
+
1205
+ # 修改用户自定义内容识别模板。
1206
+
1207
+ # @param request: Request instance for ModifyAIRecognitionTemplate.
1208
+ # @type request: :class:`Tencentcloud::mps::V20190612::ModifyAIRecognitionTemplateRequest`
1209
+ # @rtype: :class:`Tencentcloud::mps::V20190612::ModifyAIRecognitionTemplateResponse`
1210
+ def ModifyAIRecognitionTemplate(request)
1211
+ body = send_request('ModifyAIRecognitionTemplate', request.serialize)
1212
+ response = JSON.parse(body)
1213
+ if response['Response'].key?('Error') == false
1214
+ model = ModifyAIRecognitionTemplateResponse.new
1215
+ model.deserialize(response['Response'])
1216
+ model
1217
+ else
1218
+ code = response['Response']['Error']['Code']
1219
+ message = response['Response']['Error']['Message']
1220
+ reqid = response['Response']['RequestId']
1221
+ raise TencentCloud::Common::TencentCloudSDKException.new(code, message, reqid)
1222
+ end
1223
+ rescue TencentCloud::Common::TencentCloudSDKException => e
1224
+ raise e
1225
+ rescue StandardError => e
1226
+ raise TencentCloud::Common::TencentCloudSDKException.new(nil, e.inspect)
1227
+ end
1228
+
1229
+ # 修改转自适应码流模板
1230
+
1231
+ # @param request: Request instance for ModifyAdaptiveDynamicStreamingTemplate.
1232
+ # @type request: :class:`Tencentcloud::mps::V20190612::ModifyAdaptiveDynamicStreamingTemplateRequest`
1233
+ # @rtype: :class:`Tencentcloud::mps::V20190612::ModifyAdaptiveDynamicStreamingTemplateResponse`
1234
+ def ModifyAdaptiveDynamicStreamingTemplate(request)
1235
+ body = send_request('ModifyAdaptiveDynamicStreamingTemplate', request.serialize)
1236
+ response = JSON.parse(body)
1237
+ if response['Response'].key?('Error') == false
1238
+ model = ModifyAdaptiveDynamicStreamingTemplateResponse.new
1239
+ model.deserialize(response['Response'])
1240
+ model
1241
+ else
1242
+ code = response['Response']['Error']['Code']
1243
+ message = response['Response']['Error']['Message']
1244
+ reqid = response['Response']['RequestId']
1245
+ raise TencentCloud::Common::TencentCloudSDKException.new(code, message, reqid)
1246
+ end
1247
+ rescue TencentCloud::Common::TencentCloudSDKException => e
1248
+ raise e
1249
+ rescue StandardError => e
1250
+ raise TencentCloud::Common::TencentCloudSDKException.new(nil, e.inspect)
1251
+ end
1252
+
1253
+ # 修改用户自定义转动图模板。
1254
+
1255
+ # @param request: Request instance for ModifyAnimatedGraphicsTemplate.
1256
+ # @type request: :class:`Tencentcloud::mps::V20190612::ModifyAnimatedGraphicsTemplateRequest`
1257
+ # @rtype: :class:`Tencentcloud::mps::V20190612::ModifyAnimatedGraphicsTemplateResponse`
1258
+ def ModifyAnimatedGraphicsTemplate(request)
1259
+ body = send_request('ModifyAnimatedGraphicsTemplate', request.serialize)
1260
+ response = JSON.parse(body)
1261
+ if response['Response'].key?('Error') == false
1262
+ model = ModifyAnimatedGraphicsTemplateResponse.new
1263
+ model.deserialize(response['Response'])
1264
+ model
1265
+ else
1266
+ code = response['Response']['Error']['Code']
1267
+ message = response['Response']['Error']['Message']
1268
+ reqid = response['Response']['RequestId']
1269
+ raise TencentCloud::Common::TencentCloudSDKException.new(code, message, reqid)
1270
+ end
1271
+ rescue TencentCloud::Common::TencentCloudSDKException => e
1272
+ raise e
1273
+ rescue StandardError => e
1274
+ raise TencentCloud::Common::TencentCloudSDKException.new(nil, e.inspect)
1275
+ end
1276
+
1277
+ # 修改用户自定义内容智能识别模板。
1278
+
1279
+ # @param request: Request instance for ModifyContentReviewTemplate.
1280
+ # @type request: :class:`Tencentcloud::mps::V20190612::ModifyContentReviewTemplateRequest`
1281
+ # @rtype: :class:`Tencentcloud::mps::V20190612::ModifyContentReviewTemplateResponse`
1282
+ def ModifyContentReviewTemplate(request)
1283
+ body = send_request('ModifyContentReviewTemplate', request.serialize)
1284
+ response = JSON.parse(body)
1285
+ if response['Response'].key?('Error') == false
1286
+ model = ModifyContentReviewTemplateResponse.new
1287
+ model.deserialize(response['Response'])
1288
+ model
1289
+ else
1290
+ code = response['Response']['Error']['Code']
1291
+ message = response['Response']['Error']['Message']
1292
+ reqid = response['Response']['RequestId']
1293
+ raise TencentCloud::Common::TencentCloudSDKException.new(code, message, reqid)
1294
+ end
1295
+ rescue TencentCloud::Common::TencentCloudSDKException => e
1296
+ raise e
1297
+ rescue StandardError => e
1298
+ raise TencentCloud::Common::TencentCloudSDKException.new(nil, e.inspect)
1299
+ end
1300
+
1301
+ # 修改用户自定义雪碧图模板。
1302
+
1303
+ # @param request: Request instance for ModifyImageSpriteTemplate.
1304
+ # @type request: :class:`Tencentcloud::mps::V20190612::ModifyImageSpriteTemplateRequest`
1305
+ # @rtype: :class:`Tencentcloud::mps::V20190612::ModifyImageSpriteTemplateResponse`
1306
+ def ModifyImageSpriteTemplate(request)
1307
+ body = send_request('ModifyImageSpriteTemplate', request.serialize)
1308
+ response = JSON.parse(body)
1309
+ if response['Response'].key?('Error') == false
1310
+ model = ModifyImageSpriteTemplateResponse.new
1311
+ model.deserialize(response['Response'])
1312
+ model
1313
+ else
1314
+ code = response['Response']['Error']['Code']
1315
+ message = response['Response']['Error']['Message']
1316
+ reqid = response['Response']['RequestId']
1317
+ raise TencentCloud::Common::TencentCloudSDKException.new(code, message, reqid)
1318
+ end
1319
+ rescue TencentCloud::Common::TencentCloudSDKException => e
1320
+ raise e
1321
+ rescue StandardError => e
1322
+ raise TencentCloud::Common::TencentCloudSDKException.new(nil, e.inspect)
1323
+ end
1324
+
1325
+ # 该接口用于根据素材 ID,修改素材样本信息,包括名称、描述的修改,以及五官、标签的添加、删除、重置操作。五官删除操作需保证至少剩余 1 张图片,否则,请使用重置操作。
1326
+
1327
+ # @param request: Request instance for ModifyPersonSample.
1328
+ # @type request: :class:`Tencentcloud::mps::V20190612::ModifyPersonSampleRequest`
1329
+ # @rtype: :class:`Tencentcloud::mps::V20190612::ModifyPersonSampleResponse`
1330
+ def ModifyPersonSample(request)
1331
+ body = send_request('ModifyPersonSample', request.serialize)
1332
+ response = JSON.parse(body)
1333
+ if response['Response'].key?('Error') == false
1334
+ model = ModifyPersonSampleResponse.new
1335
+ model.deserialize(response['Response'])
1336
+ model
1337
+ else
1338
+ code = response['Response']['Error']['Code']
1339
+ message = response['Response']['Error']['Message']
1340
+ reqid = response['Response']['RequestId']
1341
+ raise TencentCloud::Common::TencentCloudSDKException.new(code, message, reqid)
1342
+ end
1343
+ rescue TencentCloud::Common::TencentCloudSDKException => e
1344
+ raise e
1345
+ rescue StandardError => e
1346
+ raise TencentCloud::Common::TencentCloudSDKException.new(nil, e.inspect)
1347
+ end
1348
+
1349
+ # 修改用户自定义采样截图模板。
1350
+
1351
+ # @param request: Request instance for ModifySampleSnapshotTemplate.
1352
+ # @type request: :class:`Tencentcloud::mps::V20190612::ModifySampleSnapshotTemplateRequest`
1353
+ # @rtype: :class:`Tencentcloud::mps::V20190612::ModifySampleSnapshotTemplateResponse`
1354
+ def ModifySampleSnapshotTemplate(request)
1355
+ body = send_request('ModifySampleSnapshotTemplate', request.serialize)
1356
+ response = JSON.parse(body)
1357
+ if response['Response'].key?('Error') == false
1358
+ model = ModifySampleSnapshotTemplateResponse.new
1359
+ model.deserialize(response['Response'])
1360
+ model
1361
+ else
1362
+ code = response['Response']['Error']['Code']
1363
+ message = response['Response']['Error']['Message']
1364
+ reqid = response['Response']['RequestId']
1365
+ raise TencentCloud::Common::TencentCloudSDKException.new(code, message, reqid)
1366
+ end
1367
+ rescue TencentCloud::Common::TencentCloudSDKException => e
1368
+ raise e
1369
+ rescue StandardError => e
1370
+ raise TencentCloud::Common::TencentCloudSDKException.new(nil, e.inspect)
1371
+ end
1372
+
1373
+ # 修改用户自定义指定时间点截图模板。
1374
+
1375
+ # @param request: Request instance for ModifySnapshotByTimeOffsetTemplate.
1376
+ # @type request: :class:`Tencentcloud::mps::V20190612::ModifySnapshotByTimeOffsetTemplateRequest`
1377
+ # @rtype: :class:`Tencentcloud::mps::V20190612::ModifySnapshotByTimeOffsetTemplateResponse`
1378
+ def ModifySnapshotByTimeOffsetTemplate(request)
1379
+ body = send_request('ModifySnapshotByTimeOffsetTemplate', request.serialize)
1380
+ response = JSON.parse(body)
1381
+ if response['Response'].key?('Error') == false
1382
+ model = ModifySnapshotByTimeOffsetTemplateResponse.new
1383
+ model.deserialize(response['Response'])
1384
+ model
1385
+ else
1386
+ code = response['Response']['Error']['Code']
1387
+ message = response['Response']['Error']['Message']
1388
+ reqid = response['Response']['RequestId']
1389
+ raise TencentCloud::Common::TencentCloudSDKException.new(code, message, reqid)
1390
+ end
1391
+ rescue TencentCloud::Common::TencentCloudSDKException => e
1392
+ raise e
1393
+ rescue StandardError => e
1394
+ raise TencentCloud::Common::TencentCloudSDKException.new(nil, e.inspect)
1395
+ end
1396
+
1397
+ # 修改用户自定义转码模板信息。
1398
+
1399
+ # @param request: Request instance for ModifyTranscodeTemplate.
1400
+ # @type request: :class:`Tencentcloud::mps::V20190612::ModifyTranscodeTemplateRequest`
1401
+ # @rtype: :class:`Tencentcloud::mps::V20190612::ModifyTranscodeTemplateResponse`
1402
+ def ModifyTranscodeTemplate(request)
1403
+ body = send_request('ModifyTranscodeTemplate', request.serialize)
1404
+ response = JSON.parse(body)
1405
+ if response['Response'].key?('Error') == false
1406
+ model = ModifyTranscodeTemplateResponse.new
1407
+ model.deserialize(response['Response'])
1408
+ model
1409
+ else
1410
+ code = response['Response']['Error']['Code']
1411
+ message = response['Response']['Error']['Message']
1412
+ reqid = response['Response']['RequestId']
1413
+ raise TencentCloud::Common::TencentCloudSDKException.new(code, message, reqid)
1414
+ end
1415
+ rescue TencentCloud::Common::TencentCloudSDKException => e
1416
+ raise e
1417
+ rescue StandardError => e
1418
+ raise TencentCloud::Common::TencentCloudSDKException.new(nil, e.inspect)
1419
+ end
1420
+
1421
+ # 修改用户自定义水印模板,水印类型不允许修改。
1422
+
1423
+ # @param request: Request instance for ModifyWatermarkTemplate.
1424
+ # @type request: :class:`Tencentcloud::mps::V20190612::ModifyWatermarkTemplateRequest`
1425
+ # @rtype: :class:`Tencentcloud::mps::V20190612::ModifyWatermarkTemplateResponse`
1426
+ def ModifyWatermarkTemplate(request)
1427
+ body = send_request('ModifyWatermarkTemplate', request.serialize)
1428
+ response = JSON.parse(body)
1429
+ if response['Response'].key?('Error') == false
1430
+ model = ModifyWatermarkTemplateResponse.new
1431
+ model.deserialize(response['Response'])
1432
+ model
1433
+ else
1434
+ code = response['Response']['Error']['Code']
1435
+ message = response['Response']['Error']['Message']
1436
+ reqid = response['Response']['RequestId']
1437
+ raise TencentCloud::Common::TencentCloudSDKException.new(code, message, reqid)
1438
+ end
1439
+ rescue TencentCloud::Common::TencentCloudSDKException => e
1440
+ raise e
1441
+ rescue StandardError => e
1442
+ raise TencentCloud::Common::TencentCloudSDKException.new(nil, e.inspect)
1443
+ end
1444
+
1445
+ # 该接口用于修改关键词的应用场景、标签,关键词本身不可修改,如需修改,可删除重建。
1446
+
1447
+ # @param request: Request instance for ModifyWordSample.
1448
+ # @type request: :class:`Tencentcloud::mps::V20190612::ModifyWordSampleRequest`
1449
+ # @rtype: :class:`Tencentcloud::mps::V20190612::ModifyWordSampleResponse`
1450
+ def ModifyWordSample(request)
1451
+ body = send_request('ModifyWordSample', request.serialize)
1452
+ response = JSON.parse(body)
1453
+ if response['Response'].key?('Error') == false
1454
+ model = ModifyWordSampleResponse.new
1455
+ model.deserialize(response['Response'])
1456
+ model
1457
+ else
1458
+ code = response['Response']['Error']['Code']
1459
+ message = response['Response']['Error']['Message']
1460
+ reqid = response['Response']['RequestId']
1461
+ raise TencentCloud::Common::TencentCloudSDKException.new(code, message, reqid)
1462
+ end
1463
+ rescue TencentCloud::Common::TencentCloudSDKException => e
1464
+ raise e
1465
+ rescue StandardError => e
1466
+ raise TencentCloud::Common::TencentCloudSDKException.new(nil, e.inspect)
1467
+ end
1468
+
1469
+ # 从 CMQ 获取到消息后,从消息的 msgBody 字段中解析出 MPS 直播流处理事件通知的内容。
1470
+ # 该接口不用于发起网络调用,而是用来帮助生成各个语言平台的 SDK,您可以参考 SDK 的中解析函数的实现事件通知的解析。
1471
+
1472
+ # @param request: Request instance for ParseLiveStreamProcessNotification.
1473
+ # @type request: :class:`Tencentcloud::mps::V20190612::ParseLiveStreamProcessNotificationRequest`
1474
+ # @rtype: :class:`Tencentcloud::mps::V20190612::ParseLiveStreamProcessNotificationResponse`
1475
+ def ParseLiveStreamProcessNotification(request)
1476
+ body = send_request('ParseLiveStreamProcessNotification', request.serialize)
1477
+ response = JSON.parse(body)
1478
+ if response['Response'].key?('Error') == false
1479
+ model = ParseLiveStreamProcessNotificationResponse.new
1480
+ model.deserialize(response['Response'])
1481
+ model
1482
+ else
1483
+ code = response['Response']['Error']['Code']
1484
+ message = response['Response']['Error']['Message']
1485
+ reqid = response['Response']['RequestId']
1486
+ raise TencentCloud::Common::TencentCloudSDKException.new(code, message, reqid)
1487
+ end
1488
+ rescue TencentCloud::Common::TencentCloudSDKException => e
1489
+ raise e
1490
+ rescue StandardError => e
1491
+ raise TencentCloud::Common::TencentCloudSDKException.new(nil, e.inspect)
1492
+ end
1493
+
1494
+ # 从 CMQ 获取到消息后,从消息的 msgBody 字段中解析出 MPS 事件通知的内容。
1495
+ # 该接口不用于发起网络调用,而是用来帮助生成各个语言平台的 SDK,您可以参考 SDK 的中解析函数的实现事件通知的解析。
1496
+
1497
+ # @param request: Request instance for ParseNotification.
1498
+ # @type request: :class:`Tencentcloud::mps::V20190612::ParseNotificationRequest`
1499
+ # @rtype: :class:`Tencentcloud::mps::V20190612::ParseNotificationResponse`
1500
+ def ParseNotification(request)
1501
+ body = send_request('ParseNotification', request.serialize)
1502
+ response = JSON.parse(body)
1503
+ if response['Response'].key?('Error') == false
1504
+ model = ParseNotificationResponse.new
1505
+ model.deserialize(response['Response'])
1506
+ model
1507
+ else
1508
+ code = response['Response']['Error']['Code']
1509
+ message = response['Response']['Error']['Message']
1510
+ reqid = response['Response']['RequestId']
1511
+ raise TencentCloud::Common::TencentCloudSDKException.new(code, message, reqid)
1512
+ end
1513
+ rescue TencentCloud::Common::TencentCloudSDKException => e
1514
+ raise e
1515
+ rescue StandardError => e
1516
+ raise TencentCloud::Common::TencentCloudSDKException.new(nil, e.inspect)
1517
+ end
1518
+
1519
+ # 对直播流媒体发起处理任务,功能包括:
1520
+
1521
+ # * 智能内容审核(画面鉴黄、鉴政、鉴暴、声音鉴黄);
1522
+ # * 智能内容识别(人脸、文本全文、文本关键词、语音全文、语音关键词)。
1523
+
1524
+ # 直播流处理事件通知实时写入用户指定的消息队列 CMQ 中,用户需要从消息队列 CMQ 中获取事件通知结果,同时处理过程中存在输出文件的,会写入用户指定的输出文件的目标存储中。
1525
+
1526
+ # @param request: Request instance for ProcessLiveStream.
1527
+ # @type request: :class:`Tencentcloud::mps::V20190612::ProcessLiveStreamRequest`
1528
+ # @rtype: :class:`Tencentcloud::mps::V20190612::ProcessLiveStreamResponse`
1529
+ def ProcessLiveStream(request)
1530
+ body = send_request('ProcessLiveStream', request.serialize)
1531
+ response = JSON.parse(body)
1532
+ if response['Response'].key?('Error') == false
1533
+ model = ProcessLiveStreamResponse.new
1534
+ model.deserialize(response['Response'])
1535
+ model
1536
+ else
1537
+ code = response['Response']['Error']['Code']
1538
+ message = response['Response']['Error']['Message']
1539
+ reqid = response['Response']['RequestId']
1540
+ raise TencentCloud::Common::TencentCloudSDKException.new(code, message, reqid)
1541
+ end
1542
+ rescue TencentCloud::Common::TencentCloudSDKException => e
1543
+ raise e
1544
+ rescue StandardError => e
1545
+ raise TencentCloud::Common::TencentCloudSDKException.new(nil, e.inspect)
1546
+ end
1547
+
1548
+ # 对 COS 中的媒体文件发起处理任务,功能包括:
1549
+ # 1. 视频转码(带水印);
1550
+ # 2. 视频转动图;
1551
+ # 3. 对视频按指定时间点截图;
1552
+ # 4. 对视频采样截图;
1553
+ # 5. 对视频截图雪碧图;
1554
+ # 6. 对视频转自适应码流;
1555
+ # 7. 智能内容审核(鉴黄、鉴恐、鉴政);
1556
+ # 8. 智能内容分析(标签、分类、封面、按帧标签);
1557
+ # 9. 智能内容识别(人脸、文本全文、文本关键词、语音全文、语音关键词)。
1558
+
1559
+ # @param request: Request instance for ProcessMedia.
1560
+ # @type request: :class:`Tencentcloud::mps::V20190612::ProcessMediaRequest`
1561
+ # @rtype: :class:`Tencentcloud::mps::V20190612::ProcessMediaResponse`
1562
+ def ProcessMedia(request)
1563
+ body = send_request('ProcessMedia', request.serialize)
1564
+ response = JSON.parse(body)
1565
+ if response['Response'].key?('Error') == false
1566
+ model = ProcessMediaResponse.new
1567
+ model.deserialize(response['Response'])
1568
+ model
1569
+ else
1570
+ code = response['Response']['Error']['Code']
1571
+ message = response['Response']['Error']['Message']
1572
+ reqid = response['Response']['RequestId']
1573
+ raise TencentCloud::Common::TencentCloudSDKException.new(code, message, reqid)
1574
+ end
1575
+ rescue TencentCloud::Common::TencentCloudSDKException => e
1576
+ raise e
1577
+ rescue StandardError => e
1578
+ raise TencentCloud::Common::TencentCloudSDKException.new(nil, e.inspect)
1579
+ end
1580
+
1581
+ # 智能媒体识别,包含表情和动作识别。仅用于智学,其他调用无效。
1582
+
1583
+ # @param request: Request instance for RecognizeMediaForZhiXue.
1584
+ # @type request: :class:`Tencentcloud::mps::V20190612::RecognizeMediaForZhiXueRequest`
1585
+ # @rtype: :class:`Tencentcloud::mps::V20190612::RecognizeMediaForZhiXueResponse`
1586
+ def RecognizeMediaForZhiXue(request)
1587
+ body = send_request('RecognizeMediaForZhiXue', request.serialize)
1588
+ response = JSON.parse(body)
1589
+ if response['Response'].key?('Error') == false
1590
+ model = RecognizeMediaForZhiXueResponse.new
1591
+ model.deserialize(response['Response'])
1592
+ model
1593
+ else
1594
+ code = response['Response']['Error']['Code']
1595
+ message = response['Response']['Error']['Message']
1596
+ reqid = response['Response']['RequestId']
1597
+ raise TencentCloud::Common::TencentCloudSDKException.new(code, message, reqid)
1598
+ end
1599
+ rescue TencentCloud::Common::TencentCloudSDKException => e
1600
+ raise e
1601
+ rescue StandardError => e
1602
+ raise TencentCloud::Common::TencentCloudSDKException.new(nil, e.inspect)
1603
+ end
1604
+
1605
+ # 重新设置一个已经存在且处于禁用状态的工作流。
1606
+
1607
+ # @param request: Request instance for ResetWorkflow.
1608
+ # @type request: :class:`Tencentcloud::mps::V20190612::ResetWorkflowRequest`
1609
+ # @rtype: :class:`Tencentcloud::mps::V20190612::ResetWorkflowResponse`
1610
+ def ResetWorkflow(request)
1611
+ body = send_request('ResetWorkflow', request.serialize)
1612
+ response = JSON.parse(body)
1613
+ if response['Response'].key?('Error') == false
1614
+ model = ResetWorkflowResponse.new
1615
+ model.deserialize(response['Response'])
1616
+ model
1617
+ else
1618
+ code = response['Response']['Error']['Code']
1619
+ message = response['Response']['Error']['Message']
1620
+ reqid = response['Response']['RequestId']
1621
+ raise TencentCloud::Common::TencentCloudSDKException.new(code, message, reqid)
1622
+ end
1623
+ rescue TencentCloud::Common::TencentCloudSDKException => e
1624
+ raise e
1625
+ rescue StandardError => e
1626
+ raise TencentCloud::Common::TencentCloudSDKException.new(nil, e.inspect)
1627
+ end
1628
+
1629
+
1630
+ end
1631
+ end
1632
+ end
1633
+ end