tencentcloud-sdk-vm 1.0.200

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,1109 @@
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
+ module TencentCloud
18
+ module Vm
19
+ module V20201229
20
+ # 音频审核输出参数
21
+ class AudioResult < TencentCloud::Common::AbstractModel
22
+ # @param HitFlag: 该字段用于返回审核内容是否命中审核模型;取值:0(**未命中**)、1(**命中**)。
23
+ # 注意:此字段可能返回 null,表示取不到有效值。
24
+ # @type HitFlag: Integer
25
+ # @param Label: 该字段用于返回检测结果所对应的恶意标签。<br>返回值:**Normal**:正常,**Porn**:色情,**Abuse**:谩骂,**Ad**:广告,**Custom**:自定义违规;以及其他令人反感、不安全或不适宜的内容类型。
26
+ # 注意:此字段可能返回 null,表示取不到有效值。
27
+ # @type Label: String
28
+ # @param Suggestion: 该字段用于返回后续操作建议。当您获取到判定结果后,返回值表示具体的后续建议操作。<br>
29
+ # 返回值:**Block**:建议屏蔽,**Review** :建议人工复审,**Pass**:建议通过
30
+ # 注意:此字段可能返回 null,表示取不到有效值。
31
+ # @type Suggestion: String
32
+ # @param Score: 该字段用于返回当前标签下的置信度,取值范围:0(**置信度最低**)-100(**置信度最高** ),越高代表文本越有可能属于当前返回的标签;如:*色情 99*,则表明该文本非常有可能属于色情内容。
33
+ # 注意:此字段可能返回 null,表示取不到有效值。
34
+ # @type Score: Integer
35
+ # @param Text: 该字段用于返回音频文件经ASR识别后的文本信息。最长可识别**5小时**的音频文件,若超出时长限制,接口将会报错。
36
+ # 注意:此字段可能返回 null,表示取不到有效值。
37
+ # @type Text: String
38
+ # @param Url: 该字段用于返回音频片段存储的链接地址,该地址有效期为1天。
39
+ # 注意:此字段可能返回 null,表示取不到有效值。
40
+ # @type Url: String
41
+ # @param Duration: 该字段用于返回音频文件的时长,单位为秒。
42
+ # 注意:此字段可能返回 null,表示取不到有效值。
43
+ # @type Duration: String
44
+ # @param Extra: 该字段用于返回输入参数中的额外附加信息(Extra),如未配置则默认返回值为空。<br>备注:不同客户或Biztype下返回信息不同,如需配置该字段请提交工单咨询或联系售后专员处理。
45
+ # 注意:此字段可能返回 null,表示取不到有效值。
46
+ # @type Extra: String
47
+ # @param TextResults: 该字段用于返回音频文件经ASR识别后产生的文本的详细审核结果。具体结果内容请参见AudioResultDetailLanguageResult数据结构的细节描述。
48
+ # 注意:此字段可能返回 null,表示取不到有效值。
49
+ # @type TextResults: Array
50
+ # @param MoanResults: 该字段用于返回音频文件呻吟检测的详细审核结果。具体结果内容请参见AudioResultDetailMoanResult数据结构的细节描述。
51
+ # 注意:此字段可能返回 null,表示取不到有效值。
52
+ # @type MoanResults: Array
53
+ # @param LanguageResults: 该字段用于返回音频小语种检测的详细审核结果。具体结果内容请参见AudioResultDetailLanguageResult数据结构的细节描述。
54
+ # 注意:此字段可能返回 null,表示取不到有效值。
55
+ # @type LanguageResults: Array
56
+
57
+ attr_accessor :HitFlag, :Label, :Suggestion, :Score, :Text, :Url, :Duration, :Extra, :TextResults, :MoanResults, :LanguageResults
58
+
59
+ def initialize(hitflag=nil, label=nil, suggestion=nil, score=nil, text=nil, url=nil, duration=nil, extra=nil, textresults=nil, moanresults=nil, languageresults=nil)
60
+ @HitFlag = hitflag
61
+ @Label = label
62
+ @Suggestion = suggestion
63
+ @Score = score
64
+ @Text = text
65
+ @Url = url
66
+ @Duration = duration
67
+ @Extra = extra
68
+ @TextResults = textresults
69
+ @MoanResults = moanresults
70
+ @LanguageResults = languageresults
71
+ end
72
+
73
+ def deserialize(params)
74
+ @HitFlag = params['HitFlag']
75
+ @Label = params['Label']
76
+ @Suggestion = params['Suggestion']
77
+ @Score = params['Score']
78
+ @Text = params['Text']
79
+ @Url = params['Url']
80
+ @Duration = params['Duration']
81
+ @Extra = params['Extra']
82
+ unless params['TextResults'].nil?
83
+ @TextResults = []
84
+ params['TextResults'].each do |i|
85
+ audioresultdetailtextresult_tmp = AudioResultDetailTextResult.new
86
+ audioresultdetailtextresult_tmp.deserialize(i)
87
+ @TextResults << audioresultdetailtextresult_tmp
88
+ end
89
+ end
90
+ unless params['MoanResults'].nil?
91
+ @MoanResults = []
92
+ params['MoanResults'].each do |i|
93
+ audioresultdetailmoanresult_tmp = AudioResultDetailMoanResult.new
94
+ audioresultdetailmoanresult_tmp.deserialize(i)
95
+ @MoanResults << audioresultdetailmoanresult_tmp
96
+ end
97
+ end
98
+ unless params['LanguageResults'].nil?
99
+ @LanguageResults = []
100
+ params['LanguageResults'].each do |i|
101
+ audioresultdetaillanguageresult_tmp = AudioResultDetailLanguageResult.new
102
+ audioresultdetaillanguageresult_tmp.deserialize(i)
103
+ @LanguageResults << audioresultdetaillanguageresult_tmp
104
+ end
105
+ end
106
+ end
107
+ end
108
+
109
+ # 音频语言种类检测结果
110
+ class AudioResultDetailLanguageResult < TencentCloud::Common::AbstractModel
111
+ # @param Label: 该字段用于返回对应的语言种类信息。
112
+ # 注意:此字段可能返回 null,表示取不到有效值。
113
+ # @type Label: String
114
+ # @param Score: 该参数用于返回当前标签下的置信度,取值范围:0(**置信度最低**)-100(**置信度最高**),越高代表音频越有可能属于当前返回的语种标签;
115
+ # 注意:此字段可能返回 null,表示取不到有效值。
116
+ # @type Score: Integer
117
+ # @param StartTime: 该参数用于返回对应语种标签的片段在音频文件内的开始时间,单位为毫秒。
118
+ # 注意:此字段可能返回 null,表示取不到有效值。
119
+ # @type StartTime: Float
120
+ # @param EndTime: 该参数用于返回对应语种标签的片段在音频文件内的结束时间,单位为毫秒。
121
+ # 注意:此字段可能返回 null,表示取不到有效值。
122
+ # @type EndTime: Float
123
+ # @param SubLabelCode: *内测中,敬请期待*
124
+ # 注意:此字段可能返回 null,表示取不到有效值。
125
+ # @type SubLabelCode: String
126
+
127
+ attr_accessor :Label, :Score, :StartTime, :EndTime, :SubLabelCode
128
+
129
+ def initialize(label=nil, score=nil, starttime=nil, endtime=nil, sublabelcode=nil)
130
+ @Label = label
131
+ @Score = score
132
+ @StartTime = starttime
133
+ @EndTime = endtime
134
+ @SubLabelCode = sublabelcode
135
+ end
136
+
137
+ def deserialize(params)
138
+ @Label = params['Label']
139
+ @Score = params['Score']
140
+ @StartTime = params['StartTime']
141
+ @EndTime = params['EndTime']
142
+ @SubLabelCode = params['SubLabelCode']
143
+ end
144
+ end
145
+
146
+ # 音频呻吟审核结果
147
+ class AudioResultDetailMoanResult < TencentCloud::Common::AbstractModel
148
+ # @param Label: 该字段用于返回检测结果需要检测的内容类型,此处固定为**Moan**(呻吟)以调用呻吟检测功能。
149
+ # 注意:此字段可能返回 null,表示取不到有效值。
150
+ # @type Label: String
151
+ # @param Score: 该字段用于返回呻吟检测的置信度,取值范围:0(**置信度最低**)-100(**置信度最高**),越高代表音频越有可能属于呻吟内容。
152
+ # @type Score: Integer
153
+ # @param StartTime: 该字段用于返回对应呻吟标签的片段在音频文件内的开始时间,单位为毫秒。
154
+ # @type StartTime: Float
155
+ # @param EndTime: 该字段用于返回对应呻吟标签的片段在音频文件内的结束时间,单位为毫秒。
156
+ # @type EndTime: Float
157
+ # @param SubLabelCode: *内测中,敬请期待*
158
+ # @type SubLabelCode: String
159
+
160
+ attr_accessor :Label, :Score, :StartTime, :EndTime, :SubLabelCode
161
+
162
+ def initialize(label=nil, score=nil, starttime=nil, endtime=nil, sublabelcode=nil)
163
+ @Label = label
164
+ @Score = score
165
+ @StartTime = starttime
166
+ @EndTime = endtime
167
+ @SubLabelCode = sublabelcode
168
+ end
169
+
170
+ def deserialize(params)
171
+ @Label = params['Label']
172
+ @Score = params['Score']
173
+ @StartTime = params['StartTime']
174
+ @EndTime = params['EndTime']
175
+ @SubLabelCode = params['SubLabelCode']
176
+ end
177
+ end
178
+
179
+ # 音频ASR文本审核结果
180
+ class AudioResultDetailTextResult < TencentCloud::Common::AbstractModel
181
+ # @param Label: 该字段用于返回检测结果所对应的恶意标签。<br>返回值:**Normal**:正常,**Porn**:色情,**Abuse**:谩骂,**Ad**:广告,**Custom**:自定义违规;以及其他令人反感、不安全或不适宜的内容类型。
182
+ # 注意:此字段可能返回 null,表示取不到有效值。
183
+ # @type Label: String
184
+ # @param Keywords: 该字段用于返回ASR识别出的文本内容命中的关键词信息,用于标注内容违规的具体原因(如:加我微信)。该参数可能会有多个返回值,代表命中的多个关键词;若返回值为空,Score不为空,则代表识别结果所对应的恶意标签(Label)来自于语义模型判断的返回值。
185
+ # 注意:此字段可能返回 null,表示取不到有效值。
186
+ # @type Keywords: Array
187
+ # @param LibId: 该字段**仅当Label为Custom:自定义关键词时该参数有效**,用于返回自定义库的ID,以方便自定义库管理和配置。
188
+ # 注意:此字段可能返回 null,表示取不到有效值。
189
+ # @type LibId: String
190
+ # @param LibName: 该字段**仅当Label为Custom:自定义关键词时该参数有效**,用于返回自定义库的名称,以方便自定义库管理和配置。
191
+ # 注意:此字段可能返回 null,表示取不到有效值。
192
+ # @type LibName: String
193
+ # @param Score: 该字段用于返回当前标签下的置信度,取值范围:0(**置信度最低**)-100(**置信度最高**),越高代表文本越有可能属于当前返回的标签;如:*色情 99*,则表明该文本非常有可能属于色情内容。
194
+ # 注意:此字段可能返回 null,表示取不到有效值。
195
+ # @type Score: Integer
196
+ # @param Suggestion: 该字段用于返回后续操作建议。当您获取到判定结果后,返回值表示具体的后续建议操作。<br>
197
+ # 返回值:**Block**:建议屏蔽,**Review** :建议人工复审,**Pass**:建议通过
198
+ # 注意:此字段可能返回 null,表示取不到有效值。
199
+ # @type Suggestion: String
200
+ # @param LibType: 该字段用于返回自定义关键词对应的词库类型,取值为**1**(黑白库)和**2**(自定义关键词库),若未配置自定义关键词库,则默认值为1(黑白库匹配)。
201
+ # 注意:此字段可能返回 null,表示取不到有效值。
202
+ # @type LibType: Integer
203
+
204
+ attr_accessor :Label, :Keywords, :LibId, :LibName, :Score, :Suggestion, :LibType
205
+
206
+ def initialize(label=nil, keywords=nil, libid=nil, libname=nil, score=nil, suggestion=nil, libtype=nil)
207
+ @Label = label
208
+ @Keywords = keywords
209
+ @LibId = libid
210
+ @LibName = libname
211
+ @Score = score
212
+ @Suggestion = suggestion
213
+ @LibType = libtype
214
+ end
215
+
216
+ def deserialize(params)
217
+ @Label = params['Label']
218
+ @Keywords = params['Keywords']
219
+ @LibId = params['LibId']
220
+ @LibName = params['LibName']
221
+ @Score = params['Score']
222
+ @Suggestion = params['Suggestion']
223
+ @LibType = params['LibType']
224
+ end
225
+ end
226
+
227
+ # 用于返回音频片段的审核结果
228
+ class AudioSegments < TencentCloud::Common::AbstractModel
229
+ # @param OffsetTime: 该字段用于返回音频片段的开始时间,单位为秒。对于点播文件,该参数代表对应音频相对于完整音轨的偏移时间,如0(代表不偏移),5(音轨开始后5秒),10(音轨开始后10秒);对于直播文件,该参数则返回对应音频片段开始时的Unix时间戳,如:1594650717。
230
+ # 注意:此字段可能返回 null,表示取不到有效值。
231
+ # @type OffsetTime: String
232
+ # @param Result: 该字段用于返回音频片段的具体审核结果,详细内容敬请参考AudioResult数据结构的描述。
233
+ # 注意:此字段可能返回 null,表示取不到有效值。
234
+ # @type Result: :class:`Tencentcloud::Vm.v20201229.models.AudioResult`
235
+
236
+ attr_accessor :OffsetTime, :Result
237
+
238
+ def initialize(offsettime=nil, result=nil)
239
+ @OffsetTime = offsettime
240
+ @Result = result
241
+ end
242
+
243
+ def deserialize(params)
244
+ @OffsetTime = params['OffsetTime']
245
+ unless params['Result'].nil?
246
+ @Result = AudioResult.new
247
+ @Result.deserialize(params['Result'])
248
+ end
249
+ end
250
+ end
251
+
252
+ # 文件桶信息
253
+ # 参考腾讯云存储相关说明 https://cloud.tencent.com/document/product/436/44352
254
+ class BucketInfo < TencentCloud::Common::AbstractModel
255
+ # @param Bucket: 该字段用于标识腾讯云对象存储的存储桶名称,关于文件桶的详细信息敬请参考 [腾讯云存储相关说明](https://cloud.tencent.com/document/product/436/44352)。
256
+ # @type Bucket: String
257
+ # @param Region: 该字段用于标识腾讯云对象存储的托管机房的分布地区,对象存储 COS 的数据存放在这些地域的存储桶中。
258
+ # @type Region: String
259
+ # @param Object: 该字段用于标识腾讯云对象存储的对象Key,对象z作为基本单元被存放在存储桶中;用户可以通过腾讯云控制台、API、SDK 等多种方式管理对象。有关对象的详细描述敬请参阅相应 [产品文档](https://cloud.tencent.com/document/product/436/13324)。
260
+ # @type Object: String
261
+
262
+ attr_accessor :Bucket, :Region, :Object
263
+
264
+ def initialize(bucket=nil, region=nil, object=nil)
265
+ @Bucket = bucket
266
+ @Region = region
267
+ @Object = object
268
+ end
269
+
270
+ def deserialize(params)
271
+ @Bucket = params['Bucket']
272
+ @Region = params['Region']
273
+ @Object = params['Object']
274
+ end
275
+ end
276
+
277
+ # CancelTask请求参数结构体
278
+ class CancelTaskRequest < TencentCloud::Common::AbstractModel
279
+ # @param TaskId: 该字段表示创建视频审核任务后返回的任务ID(在Results参数中),用于标识需要取消的审核任务。
280
+ # @type TaskId: String
281
+
282
+ attr_accessor :TaskId
283
+
284
+ def initialize(taskid=nil)
285
+ @TaskId = taskid
286
+ end
287
+
288
+ def deserialize(params)
289
+ @TaskId = params['TaskId']
290
+ end
291
+ end
292
+
293
+ # CancelTask返回参数结构体
294
+ class CancelTaskResponse < TencentCloud::Common::AbstractModel
295
+ # @param RequestId: 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。
296
+ # @type RequestId: String
297
+
298
+ attr_accessor :RequestId
299
+
300
+ def initialize(requestid=nil)
301
+ @RequestId = requestid
302
+ end
303
+
304
+ def deserialize(params)
305
+ @RequestId = params['RequestId']
306
+ end
307
+ end
308
+
309
+ # CreateVideoModerationTask请求参数结构体
310
+ class CreateVideoModerationTaskRequest < TencentCloud::Common::AbstractModel
311
+ # @param Type: 该参数用于传入审核任务的任务类型,取值:**VIDEO**(点播视频),**LIVE_VIDEO**(直播视频)。
312
+ # @type Type: String
313
+ # @param Tasks: 该字段表示输入的视频审核任务信息,具体输入内容请参见TaskInput数据结构的详细描述。<br> 备注:最多同时可创建**10个任务**。
314
+ # @type Tasks: Array
315
+ # @param BizType: 该字段表示策略的具体编号,用于接口调度,在内容安全控制台中可配置。若不传入Biztype参数(留空),则代表采用默认的识别策略;传入则会在审核时根据业务场景采取不同的审核策略。<br>备注:Biztype仅为数字、字母与下划线的组合,长度为3-32个字符;不同Biztype关联不同的业务场景与识别能力策略,调用前请确认正确的Biztype。
316
+ # @type BizType: String
317
+ # @param Seed: 可选参数,该字段表示回调签名的key信息,用于保证数据的安全性。 签名方法为在返回的HTTP头部添加 X-Signature 的字段,值为: seed + body 的 SHA256 编码和Hex字符串,在收到回调数据后,可以根据返回的body,用 **sha256(seed + body)**, 计算出 `X-Signature` 进行验证。<br>具体使用实例可参考 [回调签名示例](https://cloud.tencent.com/document/product/1265/51885)。
318
+ # @type Seed: String
319
+ # @param CallbackUrl: 可选参数,该字段表示接受审核信息回调的地址,格式为URL链接默认格式。配置成功后,审核过程中产生的违规音视频片段将通过此接口发送。回调返回内容格式请参考 [回调签名示例](https://cloud.tencent.com/document/product/1265/51879#.E7.A4.BA.E4.BE.8B2-.E5.9B.9E.E8.B0.83.E7.AD.BE.E5.90.8D.E7.A4.BA.E4.BE.8B) <br>备注:音频默认截取时长为**15秒**,视频截帧默认为**5秒**截取一张图片;若用户自行配置截取间隔,则按照用户配置返回相应片段。
320
+ # @type CallbackUrl: String
321
+ # @param Priority: 可选参数,该参数用于传入审核任务的优先级。当您有多个视频审核任务排队时,可以根据这个参数控制排队优先级,用于处理插队等逻辑;该参数**默认值为0**。
322
+ # @type Priority: Integer
323
+
324
+ attr_accessor :Type, :Tasks, :BizType, :Seed, :CallbackUrl, :Priority
325
+
326
+ def initialize(type=nil, tasks=nil, biztype=nil, seed=nil, callbackurl=nil, priority=nil)
327
+ @Type = type
328
+ @Tasks = tasks
329
+ @BizType = biztype
330
+ @Seed = seed
331
+ @CallbackUrl = callbackurl
332
+ @Priority = priority
333
+ end
334
+
335
+ def deserialize(params)
336
+ @Type = params['Type']
337
+ unless params['Tasks'].nil?
338
+ @Tasks = []
339
+ params['Tasks'].each do |i|
340
+ taskinput_tmp = TaskInput.new
341
+ taskinput_tmp.deserialize(i)
342
+ @Tasks << taskinput_tmp
343
+ end
344
+ end
345
+ @BizType = params['BizType']
346
+ @Seed = params['Seed']
347
+ @CallbackUrl = params['CallbackUrl']
348
+ @Priority = params['Priority']
349
+ end
350
+ end
351
+
352
+ # CreateVideoModerationTask返回参数结构体
353
+ class CreateVideoModerationTaskResponse < TencentCloud::Common::AbstractModel
354
+ # @param Results: 该字段用于返回任务创建的结果,具体输出内容请参见TaskResult数据结构的详细描述。
355
+ # 注意:此字段可能返回 null,表示取不到有效值。
356
+ # @type Results: Array
357
+ # @param RequestId: 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。
358
+ # @type RequestId: String
359
+
360
+ attr_accessor :Results, :RequestId
361
+
362
+ def initialize(results=nil, requestid=nil)
363
+ @Results = results
364
+ @RequestId = requestid
365
+ end
366
+
367
+ def deserialize(params)
368
+ unless params['Results'].nil?
369
+ @Results = []
370
+ params['Results'].each do |i|
371
+ taskresult_tmp = TaskResult.new
372
+ taskresult_tmp.deserialize(i)
373
+ @Results << taskresult_tmp
374
+ end
375
+ end
376
+ @RequestId = params['RequestId']
377
+ end
378
+ end
379
+
380
+ # DescribeTaskDetail请求参数结构体
381
+ class DescribeTaskDetailRequest < TencentCloud::Common::AbstractModel
382
+ # @param TaskId: 该字段表示创建视频审核任务后返回的任务ID(在Results参数中),用于标识需要查询任务详情的审核任务。
383
+ # <br>备注:查询接口单次最大查询量为**20条每次**。
384
+ # @type TaskId: String
385
+ # @param ShowAllSegments: 该布尔字段表示是否展示全部的视频片段,取值:True(展示全部的视频分片)、False(只展示命中审核规则的视频分片);默认值为False。
386
+ # @type ShowAllSegments: Boolean
387
+
388
+ attr_accessor :TaskId, :ShowAllSegments
389
+
390
+ def initialize(taskid=nil, showallsegments=nil)
391
+ @TaskId = taskid
392
+ @ShowAllSegments = showallsegments
393
+ end
394
+
395
+ def deserialize(params)
396
+ @TaskId = params['TaskId']
397
+ @ShowAllSegments = params['ShowAllSegments']
398
+ end
399
+ end
400
+
401
+ # DescribeTaskDetail返回参数结构体
402
+ class DescribeTaskDetailResponse < TencentCloud::Common::AbstractModel
403
+ # @param TaskId: 该字段用于返回创建视频审核任务后返回的任务ID(在Results参数中),用于标识需要查询任务详情的审核任务。
404
+ # 注意:此字段可能返回 null,表示取不到有效值。
405
+ # @type TaskId: String
406
+ # @param DataId: 该字段用于返回调用视频审核接口时传入的数据ID参数,方便数据的辨别和管理。
407
+ # 注意:此字段可能返回 null,表示取不到有效值。
408
+ # @type DataId: String
409
+ # @param BizType: 该字段用于返回调用视频审核接口时传入的BizType参数,方便数据的辨别和管理。
410
+ # 注意:此字段可能返回 null,表示取不到有效值。
411
+ # @type BizType: String
412
+ # @param Name: 该字段用于返回调用视频审核接口时传入的TaskInput参数中的任务名称,方便任务的识别与管理。
413
+ # 注意:此字段可能返回 null,表示取不到有效值。
414
+ # @type Name: String
415
+ # @param Status: 该字段用于返回所查询内容的任务状态。
416
+ # <br>取值:**FINISH**(任务已完成)、**PENDING** (任务等待中)、**RUNNING** (任务进行中)、**ERROR** (任务出错)、**CANCELLED** (任务已取消)。
417
+ # 注意:此字段可能返回 null,表示取不到有效值。
418
+ # @type Status: String
419
+ # @param Type: 该字段用于返回调用视频审核接口时输入的视频审核类型,取值为:**VIDEO**(点播音频)和**LIVE_VIDEO**(直播音频),默认值为VIDEO。
420
+ # 注意:此字段可能返回 null,表示取不到有效值。
421
+ # @type Type: String
422
+ # @param Suggestion: 该字段用于返回基于恶意标签的后续操作建议。当您获取到判定结果后,返回值表示系统推荐的后续操作;建议您按照业务所需,对不同违规类型与建议值进行处理。<br>返回值:**Block**:建议屏蔽,**Review** :建议人工复审,**Pass**:建议通过
423
+ # 注意:此字段可能返回 null,表示取不到有效值。
424
+ # @type Suggestion: String
425
+ # @param Labels: 该字段用于返回检测结果所对应的恶意标签。<br>返回值:**Normal**:正常,**Porn**:色情,**Abuse**:谩骂,**Ad**:广告,**Custom**:自定义违规;以及其他令人反感、不安全或不适宜的内容类型。
426
+ # 注意:此字段可能返回 null,表示取不到有效值。
427
+ # @type Labels: Array
428
+ # @param MediaInfo: 该字段用于返回输入媒体文件的详细信息,包括编解码格式、分片时长等信息。详细内容敬请参考MediaInfo数据结构的描述。
429
+ # 注意:此字段可能返回 null,表示取不到有效值。
430
+ # @type MediaInfo: :class:`Tencentcloud::Vm.v20201229.models.MediaInfo`
431
+ # @param InputInfo: 该字段用于返回审核服务的媒体内容信息,主要包括传入文件类型和访问地址。
432
+ # 注意:此字段可能返回 null,表示取不到有效值。
433
+ # @type InputInfo: :class:`Tencentcloud::Vm.v20201229.models.InputInfo`
434
+ # @param CreatedAt: 该字段用于返回被查询任务创建的时间,格式采用 ISO 8601标准。
435
+ # 注意:此字段可能返回 null,表示取不到有效值。
436
+ # @type CreatedAt: String
437
+ # @param UpdatedAt: 该字段用于返回被查询任务最后更新时间,格式采用 ISO 8601标准。
438
+ # 注意:此字段可能返回 null,表示取不到有效值。
439
+ # @type UpdatedAt: String
440
+ # @param ImageSegments: 该字段用于返回视频中截帧审核的结果,详细返回内容敬请参考ImageSegments数据结构的描述。<br>备注:数据有效期为24小时,如需要延长存储时间,请在已配置的COS储存桶中设置。
441
+ # 注意:此字段可能返回 null,表示取不到有效值。
442
+ # @type ImageSegments: Array
443
+ # @param AudioSegments: 该字段用于返回视频中音频审核的结果,详细返回内容敬请参考AudioSegments数据结构的描述。<br>备注:数据有效期为24小时,如需要延长存储时间,请在已配置的COS储存桶中设置。
444
+ # 注意:此字段可能返回 null,表示取不到有效值。
445
+ # @type AudioSegments: Array
446
+ # @param ErrorType: 当任务状态为Error时,返回对应错误的类型,取值:**DECODE_ERROR**: 解码失败。(输入资源中可能包含无法解码的视频)
447
+ # **URL_ERROR**:下载地址验证失败。
448
+ # **TIMEOUT_ERROR**:处理超时。任务状态非Error时默认返回为空。
449
+ # 注意:此字段可能返回 null,表示取不到有效值。
450
+ # @type ErrorType: String
451
+ # @param ErrorDescription: 当任务状态为Error时,该字段用于返回对应错误的详细描述,任务状态非Error时默认返回为空。
452
+ # 注意:此字段可能返回 null,表示取不到有效值。
453
+ # @type ErrorDescription: String
454
+ # @param RequestId: 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。
455
+ # @type RequestId: String
456
+
457
+ attr_accessor :TaskId, :DataId, :BizType, :Name, :Status, :Type, :Suggestion, :Labels, :MediaInfo, :InputInfo, :CreatedAt, :UpdatedAt, :ImageSegments, :AudioSegments, :ErrorType, :ErrorDescription, :RequestId
458
+
459
+ def initialize(taskid=nil, dataid=nil, biztype=nil, name=nil, status=nil, type=nil, suggestion=nil, labels=nil, mediainfo=nil, inputinfo=nil, createdat=nil, updatedat=nil, imagesegments=nil, audiosegments=nil, errortype=nil, errordescription=nil, requestid=nil)
460
+ @TaskId = taskid
461
+ @DataId = dataid
462
+ @BizType = biztype
463
+ @Name = name
464
+ @Status = status
465
+ @Type = type
466
+ @Suggestion = suggestion
467
+ @Labels = labels
468
+ @MediaInfo = mediainfo
469
+ @InputInfo = inputinfo
470
+ @CreatedAt = createdat
471
+ @UpdatedAt = updatedat
472
+ @ImageSegments = imagesegments
473
+ @AudioSegments = audiosegments
474
+ @ErrorType = errortype
475
+ @ErrorDescription = errordescription
476
+ @RequestId = requestid
477
+ end
478
+
479
+ def deserialize(params)
480
+ @TaskId = params['TaskId']
481
+ @DataId = params['DataId']
482
+ @BizType = params['BizType']
483
+ @Name = params['Name']
484
+ @Status = params['Status']
485
+ @Type = params['Type']
486
+ @Suggestion = params['Suggestion']
487
+ unless params['Labels'].nil?
488
+ @Labels = []
489
+ params['Labels'].each do |i|
490
+ tasklabel_tmp = TaskLabel.new
491
+ tasklabel_tmp.deserialize(i)
492
+ @Labels << tasklabel_tmp
493
+ end
494
+ end
495
+ unless params['MediaInfo'].nil?
496
+ @MediaInfo = MediaInfo.new
497
+ @MediaInfo.deserialize(params['MediaInfo'])
498
+ end
499
+ unless params['InputInfo'].nil?
500
+ @InputInfo = InputInfo.new
501
+ @InputInfo.deserialize(params['InputInfo'])
502
+ end
503
+ @CreatedAt = params['CreatedAt']
504
+ @UpdatedAt = params['UpdatedAt']
505
+ unless params['ImageSegments'].nil?
506
+ @ImageSegments = []
507
+ params['ImageSegments'].each do |i|
508
+ imagesegments_tmp = ImageSegments.new
509
+ imagesegments_tmp.deserialize(i)
510
+ @ImageSegments << imagesegments_tmp
511
+ end
512
+ end
513
+ unless params['AudioSegments'].nil?
514
+ @AudioSegments = []
515
+ params['AudioSegments'].each do |i|
516
+ audiosegments_tmp = AudioSegments.new
517
+ audiosegments_tmp.deserialize(i)
518
+ @AudioSegments << audiosegments_tmp
519
+ end
520
+ end
521
+ @ErrorType = params['ErrorType']
522
+ @ErrorDescription = params['ErrorDescription']
523
+ @RequestId = params['RequestId']
524
+ end
525
+ end
526
+
527
+ # DescribeTasks请求参数结构体
528
+ class DescribeTasksRequest < TencentCloud::Common::AbstractModel
529
+ # @param Limit: 该参数表示任务列表每页展示的任务条数,**默认值为10**(每页展示10条任务)。
530
+ # @type Limit: Integer
531
+ # @param Filter: 该参数表示任务筛选器的输入参数,可根据业务类型、审核文件类型、处理建议及任务状态筛选想要查看的审核任务,具体参数内容请参见TaskFilter数据结构的详细描述。
532
+ # @type Filter: :class:`Tencentcloud::Vm.v20201229.models.TaskFilter`
533
+ # @param PageToken: 该参数表示翻页时使用的Token信息,由系统自动生成,并在翻页时向下一个生成的页面传递此参数,以方便快速翻页功能的实现。当到最后一页时,该字段为空。
534
+ # @type PageToken: String
535
+ # @param StartTime: 该参数表示任务列表的开始时间,格式为ISO8601标准的时间戳。**默认值为最近3天**,若传入该参数,则在这一时间到EndTime之间的任务将会被筛选出来。<br>备注:该参数与Filter共同起到任务筛选作用,二者作用无先后顺序。
536
+ # @type StartTime: String
537
+ # @param EndTime: 该参数表示任务列表的结束时间,格式为ISO8601标准的时间戳。**默认值为空**,若传入该参数,则在这StartTime到这一时间之间的任务将会被筛选出来。<br>备注:该参数与Filter共同起到任务筛选作用,二者作用无先后顺序。
538
+ # @type EndTime: String
539
+
540
+ attr_accessor :Limit, :Filter, :PageToken, :StartTime, :EndTime
541
+
542
+ def initialize(limit=nil, filter=nil, pagetoken=nil, starttime=nil, endtime=nil)
543
+ @Limit = limit
544
+ @Filter = filter
545
+ @PageToken = pagetoken
546
+ @StartTime = starttime
547
+ @EndTime = endtime
548
+ end
549
+
550
+ def deserialize(params)
551
+ @Limit = params['Limit']
552
+ unless params['Filter'].nil?
553
+ @Filter = TaskFilter.new
554
+ @Filter.deserialize(params['Filter'])
555
+ end
556
+ @PageToken = params['PageToken']
557
+ @StartTime = params['StartTime']
558
+ @EndTime = params['EndTime']
559
+ end
560
+ end
561
+
562
+ # DescribeTasks返回参数结构体
563
+ class DescribeTasksResponse < TencentCloud::Common::AbstractModel
564
+ # @param Total: 该字段用于返回当前查询的任务总量,格式为int字符串。
565
+ # 注意:此字段可能返回 null,表示取不到有效值。
566
+ # @type Total: String
567
+ # @param Data: 该字段用于返回当前页的任务详细数据,具体输出内容请参见TaskData数据结构的详细描述。
568
+ # 注意:此字段可能返回 null,表示取不到有效值。
569
+ # @type Data: Array
570
+ # @param PageToken: 该字段用于返回翻页时使用的Token信息,由系统自动生成,并在翻页时向下一个生成的页面传递此参数,以方便快速翻页功能的实现。当到最后一页时,该字段为空。
571
+ # 注意:此字段可能返回 null,表示取不到有效值。
572
+ # @type PageToken: String
573
+ # @param RequestId: 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。
574
+ # @type RequestId: String
575
+
576
+ attr_accessor :Total, :Data, :PageToken, :RequestId
577
+
578
+ def initialize(total=nil, data=nil, pagetoken=nil, requestid=nil)
579
+ @Total = total
580
+ @Data = data
581
+ @PageToken = pagetoken
582
+ @RequestId = requestid
583
+ end
584
+
585
+ def deserialize(params)
586
+ @Total = params['Total']
587
+ unless params['Data'].nil?
588
+ @Data = []
589
+ params['Data'].each do |i|
590
+ taskdata_tmp = TaskData.new
591
+ taskdata_tmp.deserialize(i)
592
+ @Data << taskdata_tmp
593
+ end
594
+ end
595
+ @PageToken = params['PageToken']
596
+ @RequestId = params['RequestId']
597
+ end
598
+ end
599
+
600
+ # Result结果详情
601
+ class ImageResult < TencentCloud::Common::AbstractModel
602
+ # @param HitFlag: 该参数用于标识审核内容是否命中恶意标签,取值:0(**未命中**)和1(**命中**)。
603
+ # 注意:此字段可能返回 null,表示取不到有效值。
604
+ # @type HitFlag: Integer
605
+ # @param Label: 该字段用于返回检测结果所对应的恶意标签。<br>返回值:**Normal**:正常,**Porn**:色情,**Abuse**:谩骂,**Ad**:广告,**Custom**:自定义违规;以及其他令人反感、不安全或不适宜的内容类型。
606
+ # 注意:此字段可能返回 null,表示取不到有效值。
607
+ # @type Label: String
608
+ # @param Suggestion: 该字段用于返回后续操作建议。当您获取到判定结果后,返回值表示具体的后续建议操作。<br>
609
+ # 返回值:**Block**:建议屏蔽,**Review** :建议人工复审,**Pass**:建议通过
610
+ # 注意:此字段可能返回 null,表示取不到有效值。
611
+ # @type Suggestion: String
612
+ # @param Score: 该字段用于返回当前标签下的置信度,取值范围:0(**置信度最低**)-100(**置信度最高** ),越高代表文本越有可能属于当前返回的标签;如:*色情 -性行为 99*,则表明该文本非常有可能属于色情性行为内容。
613
+ # 注意:此字段可能返回 null,表示取不到有效值。
614
+ # @type Score: Integer
615
+ # @param Results: 该字段用于返回图像审核结果的子结果,详细内容敬请参考ImageResultResult数据结构的描述。
616
+ # 注意:此字段可能返回 null,表示取不到有效值。
617
+ # @type Results: Array
618
+ # @param Url: 该字段用于返回审核结果的访问链接(URL),图片支持PNG、JPG、JPEG、BMP、GIF、WEBP格式。<br>备注:数据**默认有效期为12小时**。如您需要更长时间的保存,请在数据储存的COS桶中配置对应的储存时长。
619
+ # 注意:此字段可能返回 null,表示取不到有效值。
620
+ # @type Url: String
621
+ # @param Extra: 该字段用于返回输入参数中的额外附加信息(Extra),如未配置则默认返回值为空。<br>备注:不同客户或Biztype下返回信息不同,如需配置该字段请提交工单咨询或联系售后专员处理。
622
+ # 注意:此字段可能返回 null,表示取不到有效值。
623
+ # @type Extra: String
624
+
625
+ attr_accessor :HitFlag, :Label, :Suggestion, :Score, :Results, :Url, :Extra
626
+
627
+ def initialize(hitflag=nil, label=nil, suggestion=nil, score=nil, results=nil, url=nil, extra=nil)
628
+ @HitFlag = hitflag
629
+ @Label = label
630
+ @Suggestion = suggestion
631
+ @Score = score
632
+ @Results = results
633
+ @Url = url
634
+ @Extra = extra
635
+ end
636
+
637
+ def deserialize(params)
638
+ @HitFlag = params['HitFlag']
639
+ @Label = params['Label']
640
+ @Suggestion = params['Suggestion']
641
+ @Score = params['Score']
642
+ unless params['Results'].nil?
643
+ @Results = []
644
+ params['Results'].each do |i|
645
+ imageresultresult_tmp = ImageResultResult.new
646
+ imageresultresult_tmp.deserialize(i)
647
+ @Results << imageresultresult_tmp
648
+ end
649
+ end
650
+ @Url = params['Url']
651
+ @Extra = params['Extra']
652
+ end
653
+ end
654
+
655
+ # 图片输出结果的子结果
656
+ class ImageResultResult < TencentCloud::Common::AbstractModel
657
+ # @param Scene: 该字段用于返回检测结果所对应的恶意场景。返回值:**Normal**:正常,**Porn**:色情,**Abuse**:谩骂,**AppLogo**:广告台标,**Custom**:自定义违规,以及其他令人反感、不安全或不适宜的内容类型。
658
+ # 注意:此字段可能返回 null,表示取不到有效值。
659
+ # @type Scene: String
660
+ # @param HitFlag: 该参数用于标识审核内容是否命中恶意标签,取值:0(**未命中**)和1(**命中**)。
661
+ # 注意:此字段可能返回 null,表示取不到有效值。
662
+ # @type HitFlag: Integer
663
+ # @param Suggestion: 该字段用于返回后续操作建议。当您获取到判定结果后,返回值表示具体的后续建议操作。<br>
664
+ # 返回值:**Block**:建议屏蔽,**Review** :建议人工复审,**Pass**:建议通过
665
+ # 注意:此字段可能返回 null,表示取不到有效值。
666
+ # @type Suggestion: String
667
+ # @param Label: 该字段用于返回检测结果所对应的恶意标签。<br>返回值:**Normal**:正常,**Porn**:色情,**Abuse**:谩骂,**Ad**:广告,**Custom**:自定义违规;以及其他令人反感、不安全或不适宜的内容类型。
668
+ # 注意:此字段可能返回 null,表示取不到有效值。
669
+ # @type Label: String
670
+ # @param SubLabel: 该字段用于返回恶意标签下对应的子标签的检测结果,如:*Porn-SexBehavior*等子标签。
671
+ # 注意:此字段可能返回 null,表示取不到有效值。
672
+ # @type SubLabel: String
673
+ # @param Score: 该字段用于返回当前标签下的置信度,取值范围:0(**置信度最低**)-100(**置信度最高** ),越高代表文本越有可能属于当前返回的标签;如:*色情 -性行为 99*,则表明该文本非常有可能属于色情性行为内容。
674
+ # 注意:此字段可能返回 null,表示取不到有效值。
675
+ # @type Score: Integer
676
+ # @param Names: 该字段用于返回审核图片在敏感场景下命中的特定对象名称列表。
677
+ # 注意:此字段可能返回 null,表示取不到有效值。
678
+ # @type Names: Array
679
+ # @param Text: 该字段用于返回图片OCR文本识别的检测结果,识别**上限在5000字节内**。
680
+ # 注意:此字段可能返回 null,表示取不到有效值。
681
+ # @type Text: String
682
+ # @param Details: 该字段用于返回图像审核子结果的其他详细信息,如文本位置、自定义库等。详细返回内容敬请参考ImageResultsResultDetail数据结构的描述。
683
+ # 注意:此字段可能返回 null,表示取不到有效值。
684
+ # @type Details: Array
685
+
686
+ attr_accessor :Scene, :HitFlag, :Suggestion, :Label, :SubLabel, :Score, :Names, :Text, :Details
687
+
688
+ def initialize(scene=nil, hitflag=nil, suggestion=nil, label=nil, sublabel=nil, score=nil, names=nil, text=nil, details=nil)
689
+ @Scene = scene
690
+ @HitFlag = hitflag
691
+ @Suggestion = suggestion
692
+ @Label = label
693
+ @SubLabel = sublabel
694
+ @Score = score
695
+ @Names = names
696
+ @Text = text
697
+ @Details = details
698
+ end
699
+
700
+ def deserialize(params)
701
+ @Scene = params['Scene']
702
+ @HitFlag = params['HitFlag']
703
+ @Suggestion = params['Suggestion']
704
+ @Label = params['Label']
705
+ @SubLabel = params['SubLabel']
706
+ @Score = params['Score']
707
+ @Names = params['Names']
708
+ @Text = params['Text']
709
+ unless params['Details'].nil?
710
+ @Details = []
711
+ params['Details'].each do |i|
712
+ imageresultsresultdetail_tmp = ImageResultsResultDetail.new
713
+ imageresultsresultdetail_tmp.deserialize(i)
714
+ @Details << imageresultsresultdetail_tmp
715
+ end
716
+ end
717
+ end
718
+ end
719
+
720
+ # 具体场景下的图片识别结果
721
+ class ImageResultsResultDetail < TencentCloud::Common::AbstractModel
722
+ # @param Name: 该字段用于返回调用视频审核接口时传入的TaskInput参数中的任务名称,方便任务的识别与管理。
723
+ # 注意:此字段可能返回 null,表示取不到有效值。
724
+ # @type Name: String
725
+ # @param Text: 该字段用于返回图片OCR文本识别的检测结果,识别**上限在5000字节内**。
726
+ # 注意:此字段可能返回 null,表示取不到有效值。
727
+ # @type Text: String
728
+ # @param Location: 该字段用于返回图像审核子结果的详细位置信息,如坐标、大小、旋转角度等。详细返回内容敬请参考ImageResultsResultDetailLocation数据结构的描述。
729
+ # 注意:此字段可能返回 null,表示取不到有效值。
730
+ # @type Location: :class:`Tencentcloud::Vm.v20201229.models.ImageResultsResultDetailLocation`
731
+ # @param Label: 该字段用于返回检测结果所对应的恶意标签。<br>返回值:**Normal**:正常,**Porn**:色情,**Abuse**:谩骂,**Ad**:广告,**Custom**:自定义违规;以及其他令人反感、不安全或不适宜的内容类型。
732
+ # 注意:此字段可能返回 null,表示取不到有效值。
733
+ # @type Label: String
734
+ # @param LibId: 该字段**仅当Label为Custom:自定义关键词时该参数有效**,用于返回自定义库的ID,以方便自定义库管理和配置。
735
+ # 注意:此字段可能返回 null,表示取不到有效值。
736
+ # @type LibId: String
737
+ # @param LibName: 该字段**仅当Label为Custom:自定义关键词时该参数有效**,用于返回自定义库的名称,以方便自定义库管理和配置。
738
+ # 注意:此字段可能返回 null,表示取不到有效值。
739
+ # @type LibName: String
740
+ # @param Keywords: 该字段用于返回检测文本命中的关键词信息,用于标注文本违规的具体原因(如:*加我微信*)。该参数可能会有多个返回值,代表命中的多个关键词;如返回值为空且Score不为空,则代表识别结果所对应的恶意标签(Label)是来自于语义模型判断的返回值。
741
+ # 注意:此字段可能返回 null,表示取不到有效值。
742
+ # @type Keywords: Array
743
+ # @param Suggestion: 该字段用于返回后续操作建议。当您获取到判定结果后,返回值表示具体的后续建议操作。<br>
744
+ # 返回值:**Block**:建议屏蔽,**Review** :建议人工复审,**Pass**:建议通过
745
+ # 注意:此字段可能返回 null,表示取不到有效值。
746
+ # @type Suggestion: String
747
+ # @param Score: 该字段用于返回当前标签下的置信度,取值范围:0(**置信度最低**)-100(**置信度最高** ),越高代表文本越有可能属于当前返回的标签;如:*色情 99*,则表明该文本非常有可能属于色情内容。
748
+ # 注意:此字段可能返回 null,表示取不到有效值。
749
+ # @type Score: Integer
750
+ # @param SubLabelCode: 该字段用于返回恶意标签下对应的子标签的检测结果,如:*Porn-SexBehavior*等子标签。
751
+ # 注意:此字段可能返回 null,表示取不到有效值。
752
+ # @type SubLabelCode: String
753
+
754
+ attr_accessor :Name, :Text, :Location, :Label, :LibId, :LibName, :Keywords, :Suggestion, :Score, :SubLabelCode
755
+
756
+ def initialize(name=nil, text=nil, location=nil, label=nil, libid=nil, libname=nil, keywords=nil, suggestion=nil, score=nil, sublabelcode=nil)
757
+ @Name = name
758
+ @Text = text
759
+ @Location = location
760
+ @Label = label
761
+ @LibId = libid
762
+ @LibName = libname
763
+ @Keywords = keywords
764
+ @Suggestion = suggestion
765
+ @Score = score
766
+ @SubLabelCode = sublabelcode
767
+ end
768
+
769
+ def deserialize(params)
770
+ @Name = params['Name']
771
+ @Text = params['Text']
772
+ unless params['Location'].nil?
773
+ @Location = ImageResultsResultDetailLocation.new
774
+ @Location.deserialize(params['Location'])
775
+ end
776
+ @Label = params['Label']
777
+ @LibId = params['LibId']
778
+ @LibName = params['LibName']
779
+ @Keywords = params['Keywords']
780
+ @Suggestion = params['Suggestion']
781
+ @Score = params['Score']
782
+ @SubLabelCode = params['SubLabelCode']
783
+ end
784
+ end
785
+
786
+ # 图片详情位置信息
787
+ class ImageResultsResultDetailLocation < TencentCloud::Common::AbstractModel
788
+ # @param X: 该参数用于标识OCR检测框左上角位置的**横坐标**(x)所在的像素位置,结合剩余参数可唯一确定检测框的大小和位置。
789
+ # 注意:此字段可能返回 null,表示取不到有效值。
790
+ # @type X: Float
791
+ # @param Y: 该参数用于标识OCR检测框左上角位置的**纵坐标**(y)所在的像素位置,结合剩余参数可唯一确定检测框的大小和位置。
792
+ # 注意:此字段可能返回 null,表示取不到有效值。
793
+ # @type Y: Float
794
+ # @param Width: 该参数用于标识OCR检测框的宽度(**由左上角出发在x轴向右延伸的长度**)。结合剩余参数可唯一确定检测框的大小和位置。
795
+ # 注意:此字段可能返回 null,表示取不到有效值。
796
+ # @type Width: Integer
797
+ # @param Height: 该参数用于标识OCR检测框的高度(**由左上角出发在y轴向下延伸的长度**)。结合剩余参数可唯一确定检测框的大小和位置。
798
+ # 注意:此字段可能返回 null,表示取不到有效值。
799
+ # @type Height: Integer
800
+ # @param Rotate: 该参数用于标识OCR检测框的旋转角度,该参数结合X和Y两个坐标参数可唯一确定检测框的具体位置;取值:0-360(**角度制**),方向为**逆时针旋**转。
801
+ # 注意:此字段可能返回 null,表示取不到有效值。
802
+ # @type Rotate: Float
803
+
804
+ attr_accessor :X, :Y, :Width, :Height, :Rotate
805
+
806
+ def initialize(x=nil, y=nil, width=nil, height=nil, rotate=nil)
807
+ @X = x
808
+ @Y = y
809
+ @Width = width
810
+ @Height = height
811
+ @Rotate = rotate
812
+ end
813
+
814
+ def deserialize(params)
815
+ @X = params['X']
816
+ @Y = params['Y']
817
+ @Width = params['Width']
818
+ @Height = params['Height']
819
+ @Rotate = params['Rotate']
820
+ end
821
+ end
822
+
823
+ # 图片段信息
824
+ class ImageSegments < TencentCloud::Common::AbstractModel
825
+ # @param OffsetTime: 该字段用于返回视频片段的截帧时间,单位为秒。对于点播文件,该参数代表对应截取图片相对于视频的偏移时间,如0(代表不偏移),5(视频开始后5秒),10(视频开始后10秒);对于直播文件,该参数则返回对应图片的Unix时间戳,如:1594650717。
826
+ # @type OffsetTime: String
827
+ # @param Result: 该字段用于返回视频片段的具体截帧审核结果,详细内容敬请参考ImageResult数据结构的描述。
828
+ # @type Result: :class:`Tencentcloud::Vm.v20201229.models.ImageResult`
829
+
830
+ attr_accessor :OffsetTime, :Result
831
+
832
+ def initialize(offsettime=nil, result=nil)
833
+ @OffsetTime = offsettime
834
+ @Result = result
835
+ end
836
+
837
+ def deserialize(params)
838
+ @OffsetTime = params['OffsetTime']
839
+ unless params['Result'].nil?
840
+ @Result = ImageResult.new
841
+ @Result.deserialize(params['Result'])
842
+ end
843
+ end
844
+ end
845
+
846
+ # 输入信息详情
847
+ class InputInfo < TencentCloud::Common::AbstractModel
848
+ # @param Type: 该字段表示文件访问类型,取值为**URL**(资源链接)和**COS** (腾讯云对象存储)。
849
+ # 注意:此字段可能返回 null,表示取不到有效值。
850
+ # @type Type: String
851
+ # @param Url: 该字段表示文件访问的链接地址,格式为标准URL格式。<br> 备注:当Type为URL时此字段不为空。
852
+ # 注意:此字段可能返回 null,表示取不到有效值。
853
+ # @type Url: String
854
+ # @param BucketInfo: 该字段表示文件访问的腾讯云存储桶信息。<br> 备注:当Type为COS时此字段不为空。
855
+ # 注意:此字段可能返回 null,表示取不到有效值。
856
+ # @type BucketInfo: String
857
+
858
+ attr_accessor :Type, :Url, :BucketInfo
859
+
860
+ def initialize(type=nil, url=nil, bucketinfo=nil)
861
+ @Type = type
862
+ @Url = url
863
+ @BucketInfo = bucketinfo
864
+ end
865
+
866
+ def deserialize(params)
867
+ @Type = params['Type']
868
+ @Url = params['Url']
869
+ @BucketInfo = params['BucketInfo']
870
+ end
871
+ end
872
+
873
+ # 媒体类型
874
+ class MediaInfo < TencentCloud::Common::AbstractModel
875
+ # @param Duration: 该字段用于返回对传入的视频流进行分片的片段时长,单位为秒。**默认值为5秒**,支持用户自定义配置。<br>备注:仅在审核文件为流媒体时生效;此字段返回0则代表未取到有效值。
876
+ # @type Duration: Integer
877
+
878
+ attr_accessor :Duration
879
+
880
+ def initialize(duration=nil)
881
+ @Duration = duration
882
+ end
883
+
884
+ def deserialize(params)
885
+ @Duration = params['Duration']
886
+ end
887
+ end
888
+
889
+ # 数据存储信息
890
+ class StorageInfo < TencentCloud::Common::AbstractModel
891
+ # @param Type: 该字段表示文件访问类型,取值为**URL**(资源链接)和**COS** (腾讯云对象存储);该字段应当与传入的访问类型相对应,可用于强校验并方便系统快速识别访问地址;若不传入此参数,则默认值为URL,此时系统将自动判定访问地址类型。
892
+ # @type Type: String
893
+ # @param Url: 该字段表示文件访问的链接地址,格式为标准URL格式。<br> 备注:当Type为URL时此字段不为空,该参数与BucketInfo参数须传入其中之一
894
+ # @type Url: String
895
+ # @param BucketInfo: 该字段表示文件访问的腾讯云存储桶信息。<br> 备注:当Type为COS时此字段不为空,该参数与Url参数须传入其中之一。
896
+ # @type BucketInfo: :class:`Tencentcloud::Vm.v20201229.models.BucketInfo`
897
+
898
+ attr_accessor :Type, :Url, :BucketInfo
899
+
900
+ def initialize(type=nil, url=nil, bucketinfo=nil)
901
+ @Type = type
902
+ @Url = url
903
+ @BucketInfo = bucketinfo
904
+ end
905
+
906
+ def deserialize(params)
907
+ @Type = params['Type']
908
+ @Url = params['Url']
909
+ unless params['BucketInfo'].nil?
910
+ @BucketInfo = BucketInfo.new
911
+ @BucketInfo.deserialize(params['BucketInfo'])
912
+ end
913
+ end
914
+ end
915
+
916
+ # 任务数据
917
+ class TaskData < TencentCloud::Common::AbstractModel
918
+ # @param DataId: 该字段用于返回视频审核任务数据所对应的数据ID,方便后续查询和管理审核任务。
919
+ # 注意:此字段可能返回 null,表示取不到有效值。
920
+ # @type DataId: String
921
+ # @param TaskId: 该字段用于返回视频审核任务所生成的任务ID,用于标识具体审核任务,方便后续查询和管理。
922
+ # @type TaskId: String
923
+ # @param Status: 该字段用于返回所查询内容的任务状态。
924
+ # <br>取值:**FINISH**(任务已完成)、**PENDING** (任务等待中)、**RUNNING** (任务进行中)、**ERROR** (任务出错)、**CANCELLED** (任务已取消)。
925
+ # @type Status: String
926
+ # @param Name: 该字段用于返回视频审核任务所对应的任务名称,方便后续查询和管理审核任务。
927
+ # 注意:此字段可能返回 null,表示取不到有效值。
928
+ # @type Name: String
929
+ # @param BizType: 该字段用于返回调用视频审核接口时传入的BizType参数,方便数据的辨别和管理。
930
+ # 注意:此字段可能返回 null,表示取不到有效值。
931
+ # @type BizType: String
932
+ # @param Type: 该字段用于返回调用音频审核接口时输入的音频审核类型,取值为:**VIDEO**(点播视频)和**LIVE_VIDEO**(直播视频),默认值为VIDEO。
933
+ # 注意:此字段可能返回 null,表示取不到有效值。
934
+ # @type Type: String
935
+ # @param Suggestion: 该字段用于返回基于恶意标签的后续操作建议。当您获取到判定结果后,返回值表示具体的后续建议操作。<br>
936
+ # 返回值:**Block**:建议屏蔽,**Review** :建议人工复审,**Pass**:建议通过
937
+ # 注意:此字段可能返回 null,表示取不到有效值。
938
+ # @type Suggestion: String
939
+ # @param Labels: 该字段用于返回检测结果所对应的恶意标签。<br>返回值:**Normal**:正常,**Porn**:色情,**Abuse**:谩骂,**Ad**:广告,**Custom**:自定义违规;以及其他令人反感、不安全或不适宜的内容类型。
940
+ # @type Labels: Array
941
+ # @param MediaInfo: 该字段用于返回输入媒体文件的详细信息,包括编码格式、分片时长等信息。详细内容敬请参考MediaInfo数据结构的描述。
942
+ # 注意:此字段可能返回 null,表示取不到有效值。
943
+ # @type MediaInfo: :class:`Tencentcloud::Vm.v20201229.models.MediaInfo`
944
+ # @param CreatedAt: 该字段用于返回被查询任务创建的时间,格式采用 ISO 8601标准。
945
+ # @type CreatedAt: String
946
+ # @param UpdatedAt: 该字段用于返回被查询任务最后更新时间,格式采用 ISO 8601标准。
947
+ # 注意:此字段可能返回 null,表示取不到有效值。
948
+ # @type UpdatedAt: String
949
+
950
+ attr_accessor :DataId, :TaskId, :Status, :Name, :BizType, :Type, :Suggestion, :Labels, :MediaInfo, :CreatedAt, :UpdatedAt
951
+
952
+ def initialize(dataid=nil, taskid=nil, status=nil, name=nil, biztype=nil, type=nil, suggestion=nil, labels=nil, mediainfo=nil, createdat=nil, updatedat=nil)
953
+ @DataId = dataid
954
+ @TaskId = taskid
955
+ @Status = status
956
+ @Name = name
957
+ @BizType = biztype
958
+ @Type = type
959
+ @Suggestion = suggestion
960
+ @Labels = labels
961
+ @MediaInfo = mediainfo
962
+ @CreatedAt = createdat
963
+ @UpdatedAt = updatedat
964
+ end
965
+
966
+ def deserialize(params)
967
+ @DataId = params['DataId']
968
+ @TaskId = params['TaskId']
969
+ @Status = params['Status']
970
+ @Name = params['Name']
971
+ @BizType = params['BizType']
972
+ @Type = params['Type']
973
+ @Suggestion = params['Suggestion']
974
+ unless params['Labels'].nil?
975
+ @Labels = []
976
+ params['Labels'].each do |i|
977
+ tasklabel_tmp = TaskLabel.new
978
+ tasklabel_tmp.deserialize(i)
979
+ @Labels << tasklabel_tmp
980
+ end
981
+ end
982
+ unless params['MediaInfo'].nil?
983
+ @MediaInfo = MediaInfo.new
984
+ @MediaInfo.deserialize(params['MediaInfo'])
985
+ end
986
+ @CreatedAt = params['CreatedAt']
987
+ @UpdatedAt = params['UpdatedAt']
988
+ end
989
+ end
990
+
991
+ # 任务筛选器
992
+ class TaskFilter < TencentCloud::Common::AbstractModel
993
+ # @param BizType: 该字段用于传入任务对应的业务类型供筛选器进行筛选。Biztype为策略的具体的编号,用于接口调度,在内容安全控制台中可配置。不同Biztype关联不同的业务场景与审核策略,调用前请确认正确的Biztype。Biztype仅为**数字、字母与下划线的组合**,长度为3-32个字符。<br>备注:在不传入该参数时筛选器默认不筛选业务类型。
994
+ # 注意:此字段可能返回 null,表示取不到有效值。
995
+ # @type BizType: Array
996
+ # @param Type: 该字段用于传入视频审核对应的任务类型供筛选器进行筛选,取值为:**VIDEO**(点播视频审核),**AUDIO**(点播音频审核), **LIVE_VIDEO**(直播视频审核), **LIVE_AUDIO**(直播音频审核)。<br>备注:在不传入该参数时筛选器默认不筛选任务类型。
997
+ # @type Type: String
998
+ # @param Suggestion: 该字段用于传入视频审核对应的建议操作供筛选器进行筛选,取值为:**Block**:建议屏蔽,**Review**:建议人工复审,**Pass**:建议通过。<br>备注:在不传入该参数时筛选器默认不筛选建议操作。
999
+ # @type Suggestion: String
1000
+ # @param TaskStatus: 该字段用于传入审核任务的任务状态供筛选器进行筛选,取值为:**FINISH**(任务已完成)、**PENDING** (任务等待中)、**RUNNING** (任务进行中)、**ERROR** (任务出错)、**CANCELLED** (任务已取消)。<br>备注:在不传入该参数时筛选器默认不筛选任务状态。
1001
+ # @type TaskStatus: String
1002
+
1003
+ attr_accessor :BizType, :Type, :Suggestion, :TaskStatus
1004
+
1005
+ def initialize(biztype=nil, type=nil, suggestion=nil, taskstatus=nil)
1006
+ @BizType = biztype
1007
+ @Type = type
1008
+ @Suggestion = suggestion
1009
+ @TaskStatus = taskstatus
1010
+ end
1011
+
1012
+ def deserialize(params)
1013
+ @BizType = params['BizType']
1014
+ @Type = params['Type']
1015
+ @Suggestion = params['Suggestion']
1016
+ @TaskStatus = params['TaskStatus']
1017
+ end
1018
+ end
1019
+
1020
+ # 音视频任务结构
1021
+ class TaskInput < TencentCloud::Common::AbstractModel
1022
+ # @param DataId: 选填参数,该字段表示您为待检测对象分配的数据ID,传入后可方便您对文件进行标识和管理。<br>取值:由英文字母(大小写均可)、数字及四个特殊符号(_,-,@,#)组成,**长度不超过64个字符**。
1023
+ # @type DataId: String
1024
+ # @param Name: 选填参数,该字段表示审核任务所对应的任务名称,方便后续查询和管理审核任务。
1025
+ # @type Name: String
1026
+ # @param Input: 必填参数,该字段表示审核文件的访问参数,用于获取审核媒体文件,该参数内包括访问类型和访问地址。
1027
+ # @type Input: :class:`Tencentcloud::Vm.v20201229.models.StorageInfo`
1028
+
1029
+ attr_accessor :DataId, :Name, :Input
1030
+
1031
+ def initialize(dataid=nil, name=nil, input=nil)
1032
+ @DataId = dataid
1033
+ @Name = name
1034
+ @Input = input
1035
+ end
1036
+
1037
+ def deserialize(params)
1038
+ @DataId = params['DataId']
1039
+ @Name = params['Name']
1040
+ unless params['Input'].nil?
1041
+ @Input = StorageInfo.new
1042
+ @Input.deserialize(params['Input'])
1043
+ end
1044
+ end
1045
+ end
1046
+
1047
+ # 任务输出标签
1048
+ class TaskLabel < TencentCloud::Common::AbstractModel
1049
+ # @param Label: 该字段用于返回检测结果所对应的恶意标签。<br>返回值:**Normal**:正常,**Porn**:色情,**Abuse**:谩骂,**Ad**:广告,**Custom**:自定义违规;以及其他令人反感、不安全或不适宜的内容类型。
1050
+ # 注意:此字段可能返回 null,表示取不到有效值。
1051
+ # @type Label: String
1052
+ # @param Suggestion: 该字段用于返回当前标签(Label)下的后续操作建议。当您获取到判定结果后,返回值表示系统推荐的后续操作;建议您按照业务所需,对不同违规类型与建议值进行处理。<br>返回值:**Block**:建议屏蔽,**Review** :建议人工复审,**Pass**:建议通过
1053
+ # 注意:此字段可能返回 null,表示取不到有效值。
1054
+ # @type Suggestion: String
1055
+ # @param Score: 该字段用于返回当前标签(Label)下的置信度,取值范围:0(**置信度最低**)-100(**置信度最高** ),越高代表文本越有可能属于当前返回的标签;如:*色情 99*,则表明该文本非常有可能属于色情内容;*色情 0*,则表明该文本不属于色情内容。
1056
+ # 注意:此字段可能返回 null,表示取不到有效值。
1057
+ # @type Score: Integer
1058
+
1059
+ attr_accessor :Label, :Suggestion, :Score
1060
+
1061
+ def initialize(label=nil, suggestion=nil, score=nil)
1062
+ @Label = label
1063
+ @Suggestion = suggestion
1064
+ @Score = score
1065
+ end
1066
+
1067
+ def deserialize(params)
1068
+ @Label = params['Label']
1069
+ @Suggestion = params['Suggestion']
1070
+ @Score = params['Score']
1071
+ end
1072
+ end
1073
+
1074
+ # 创建任务时的返回结果
1075
+ class TaskResult < TencentCloud::Common::AbstractModel
1076
+ # @param DataId: 该字段用于返回创建视频审核任务时在TaskInput结构内传入的DataId,用于标识具体审核任务。
1077
+ # 注意:此字段可能返回 null,表示取不到有效值。
1078
+ # @type DataId: String
1079
+ # @param TaskId: 该字段用于返回视频审核任务所生成的任务ID,用于标识具体审核任务,方便后续查询和管理。
1080
+ # 注意:此字段可能返回 null,表示取不到有效值。
1081
+ # @type TaskId: String
1082
+ # @param Code: 该字段用于返回任务创建的状态,如返回OK则代表任务创建成功,其他返回值可参考公共错误码。
1083
+ # 注意:此字段可能返回 null,表示取不到有效值。
1084
+ # @type Code: String
1085
+ # @param Message: **仅在Code的返回值为错误码时生效**,用于返回错误的详情内容。
1086
+ # 注意:此字段可能返回 null,表示取不到有效值。
1087
+ # @type Message: String
1088
+
1089
+ attr_accessor :DataId, :TaskId, :Code, :Message
1090
+
1091
+ def initialize(dataid=nil, taskid=nil, code=nil, message=nil)
1092
+ @DataId = dataid
1093
+ @TaskId = taskid
1094
+ @Code = code
1095
+ @Message = message
1096
+ end
1097
+
1098
+ def deserialize(params)
1099
+ @DataId = params['DataId']
1100
+ @TaskId = params['TaskId']
1101
+ @Code = params['Code']
1102
+ @Message = params['Message']
1103
+ end
1104
+ end
1105
+
1106
+ end
1107
+ end
1108
+ end
1109
+