tencentcloud-sdk-tav 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.
checksums.yaml ADDED
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA1:
3
+ metadata.gz: d294c1ca8f6d385cf6cc794aa4ec973b40dd806d
4
+ data.tar.gz: 963cc7963f61773cf29c15af12e1c07ff976363e
5
+ SHA512:
6
+ metadata.gz: d1bf17b0582ef54a6f72cfab4681ac56df7561bf57f2718c829ad473b3bd68c9fc0cd3b1a2a9b9b0ff63cdf95dfceae994b70ce835564f7369387d02be3fdd88
7
+ data.tar.gz: 8465f992cf01e6db0d3d13faca8c391a79e0e5950b98d325ee8679c1f72a02b2b299f93ecd1b7a47ea9edc5d36692c3f8a9822d240019e900094c9cecbb01eda
data/lib/VERSION ADDED
@@ -0,0 +1 @@
1
+ 1.0.200
@@ -0,0 +1,11 @@
1
+ # frozen_string_literal: true
2
+
3
+ require 'tencentcloud-sdk-common'
4
+
5
+ require_relative 'v20190118/client'
6
+ require_relative 'v20190118/models'
7
+
8
+ module TencentCloud
9
+ module Tav
10
+ end
11
+ end
@@ -0,0 +1,132 @@
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 Tav
21
+ module V20190118
22
+ class Client < TencentCloud::Common::AbstractClient
23
+
24
+ def initialize(credential, region, profile = nil)
25
+ api_version = '2019-01-18'
26
+ api_endpoint = 'tav.tencentcloudapi.com'
27
+ sdk_version = 'TAV_' + File.read(File.expand_path('../VERSION', __dir__)).strip
28
+ super(credential, region, api_version, api_endpoint, sdk_version, profile)
29
+ end
30
+
31
+
32
+ # 获取TAV本地引擎
33
+
34
+ # @param request: Request instance for GetLocalEngine.
35
+ # @type request: :class:`Tencentcloud::tav::V20190118::GetLocalEngineRequest`
36
+ # @rtype: :class:`Tencentcloud::tav::V20190118::GetLocalEngineResponse`
37
+ def GetLocalEngine(request)
38
+ body = send_request('GetLocalEngine', request.serialize)
39
+ response = JSON.parse(body)
40
+ if response['Response'].key?('Error') == false
41
+ model = GetLocalEngineResponse.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
+ # tav文件上传扫描结果查询
57
+
58
+ # @param request: Request instance for GetScanResult.
59
+ # @type request: :class:`Tencentcloud::tav::V20190118::GetScanResultRequest`
60
+ # @rtype: :class:`Tencentcloud::tav::V20190118::GetScanResultResponse`
61
+ def GetScanResult(request)
62
+ body = send_request('GetScanResult', request.serialize)
63
+ response = JSON.parse(body)
64
+ if response['Response'].key?('Error') == false
65
+ model = GetScanResultResponse.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
+ # tav文件上传扫描
81
+
82
+ # @param request: Request instance for ScanFile.
83
+ # @type request: :class:`Tencentcloud::tav::V20190118::ScanFileRequest`
84
+ # @rtype: :class:`Tencentcloud::tav::V20190118::ScanFileResponse`
85
+ def ScanFile(request)
86
+ body = send_request('ScanFile', request.serialize)
87
+ response = JSON.parse(body)
88
+ if response['Response'].key?('Error') == false
89
+ model = ScanFileResponse.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
+ # 通过文件哈希值获取文件黑白属性
105
+
106
+ # @param request: Request instance for ScanFileHash.
107
+ # @type request: :class:`Tencentcloud::tav::V20190118::ScanFileHashRequest`
108
+ # @rtype: :class:`Tencentcloud::tav::V20190118::ScanFileHashResponse`
109
+ def ScanFileHash(request)
110
+ body = send_request('ScanFileHash', request.serialize)
111
+ response = JSON.parse(body)
112
+ if response['Response'].key?('Error') == false
113
+ model = ScanFileHashResponse.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
+
129
+ end
130
+ end
131
+ end
132
+ end
@@ -0,0 +1,226 @@
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 Tav
19
+ module V20190118
20
+ # GetLocalEngine请求参数结构体
21
+ class GetLocalEngineRequest < TencentCloud::Common::AbstractModel
22
+ # @param Key: 购买服务后获得的授权信息,用于保证请求有效性
23
+ # @type Key: String
24
+
25
+ attr_accessor :Key
26
+
27
+ def initialize(key=nil)
28
+ @Key = key
29
+ end
30
+
31
+ def deserialize(params)
32
+ @Key = params['Key']
33
+ end
34
+ end
35
+
36
+ # GetLocalEngine返回参数结构体
37
+ class GetLocalEngineResponse < TencentCloud::Common::AbstractModel
38
+ # @param Status: 接口调用状态,成功返回200,失败返回400
39
+ # @type Status: Integer
40
+ # @param Info: 接口调用描述信息,成功返回"scan success",失败返回"scan error"
41
+ # @type Info: String
42
+ # @param Data: 本地引擎下载地址
43
+ # @type Data: String
44
+ # @param RequestId: 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。
45
+ # @type RequestId: String
46
+
47
+ attr_accessor :Status, :Info, :Data, :RequestId
48
+
49
+ def initialize(status=nil, info=nil, data=nil, requestid=nil)
50
+ @Status = status
51
+ @Info = info
52
+ @Data = data
53
+ @RequestId = requestid
54
+ end
55
+
56
+ def deserialize(params)
57
+ @Status = params['Status']
58
+ @Info = params['Info']
59
+ @Data = params['Data']
60
+ @RequestId = params['RequestId']
61
+ end
62
+ end
63
+
64
+ # GetScanResult请求参数结构体
65
+ class GetScanResultRequest < TencentCloud::Common::AbstractModel
66
+ # @param Key: 购买服务后获得的授权信息,用于保证请求有效性
67
+ # @type Key: String
68
+ # @param Md5: 需要获取扫描接口的md5(只允许单个md5)
69
+ # @type Md5: String
70
+
71
+ attr_accessor :Key, :Md5
72
+
73
+ def initialize(key=nil, md5=nil)
74
+ @Key = key
75
+ @Md5 = md5
76
+ end
77
+
78
+ def deserialize(params)
79
+ @Key = params['Key']
80
+ @Md5 = params['Md5']
81
+ end
82
+ end
83
+
84
+ # GetScanResult返回参数结构体
85
+ class GetScanResultResponse < TencentCloud::Common::AbstractModel
86
+ # @param Status: 接口调用状态,成功返回200,失败返回400
87
+ # @type Status: Integer
88
+ # @param Info: 接口调用描述信息,成功返回"scan success",失败返回"scan error"
89
+ # @type Info: String
90
+ # @param Data: 实际结果信息,包括md5、scan_status、virus_name三个字段;virus_name报毒名:"torjan.**":黑样本的报毒名、".":样本不报毒、"" :样本无检出信息,需上传扫描;
91
+ # scan_status样本状态:-1无检出信息需上传扫描、0样本扫描中、1样本扫描结束且不报毒、2样本扫描结束且报黑、3样本下载失败;
92
+ # @type Data: String
93
+ # @param RequestId: 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。
94
+ # @type RequestId: String
95
+
96
+ attr_accessor :Status, :Info, :Data, :RequestId
97
+
98
+ def initialize(status=nil, info=nil, data=nil, requestid=nil)
99
+ @Status = status
100
+ @Info = info
101
+ @Data = data
102
+ @RequestId = requestid
103
+ end
104
+
105
+ def deserialize(params)
106
+ @Status = params['Status']
107
+ @Info = params['Info']
108
+ @Data = params['Data']
109
+ @RequestId = params['RequestId']
110
+ end
111
+ end
112
+
113
+ # ScanFileHash请求参数结构体
114
+ class ScanFileHashRequest < TencentCloud::Common::AbstractModel
115
+ # @param Key: 购买服务后获得的授权信息,用于保证请求有效性
116
+ # @type Key: String
117
+ # @param Md5s: 需要查询的md5值(支持单个和多个,多个md5间用逗号分格)
118
+ # @type Md5s: String
119
+ # @param WithCategory: 保留字段默认填0
120
+ # @type WithCategory: String
121
+ # @param SensitiveLevel: 松严规则控制字段默认填10(5-松、10-标准、15-严)
122
+ # @type SensitiveLevel: String
123
+
124
+ attr_accessor :Key, :Md5s, :WithCategory, :SensitiveLevel
125
+
126
+ def initialize(key=nil, md5s=nil, withcategory=nil, sensitivelevel=nil)
127
+ @Key = key
128
+ @Md5s = md5s
129
+ @WithCategory = withcategory
130
+ @SensitiveLevel = sensitivelevel
131
+ end
132
+
133
+ def deserialize(params)
134
+ @Key = params['Key']
135
+ @Md5s = params['Md5s']
136
+ @WithCategory = params['WithCategory']
137
+ @SensitiveLevel = params['SensitiveLevel']
138
+ end
139
+ end
140
+
141
+ # ScanFileHash返回参数结构体
142
+ class ScanFileHashResponse < TencentCloud::Common::AbstractModel
143
+ # @param Status: 接口调用状态,成功返回200,失败返回400
144
+ # @type Status: Integer
145
+ # @param Info: 接口调用描述信息,成功返回"scan success",失败返回"scan error"
146
+ # @type Info: String
147
+ # @param Data: 云查实际结果信息,包括md5、return_state、virus_state、virus_name字符逗号间隔;
148
+ # return_state查询状态:-1/0代表失败、1/2代表成功;
149
+ # virus_state文状件态:0文件不存在、1白、2黑、3未知、4感染性、5低可信白;
150
+ # @type Data: String
151
+ # @param RequestId: 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。
152
+ # @type RequestId: String
153
+
154
+ attr_accessor :Status, :Info, :Data, :RequestId
155
+
156
+ def initialize(status=nil, info=nil, data=nil, requestid=nil)
157
+ @Status = status
158
+ @Info = info
159
+ @Data = data
160
+ @RequestId = requestid
161
+ end
162
+
163
+ def deserialize(params)
164
+ @Status = params['Status']
165
+ @Info = params['Info']
166
+ @Data = params['Data']
167
+ @RequestId = params['RequestId']
168
+ end
169
+ end
170
+
171
+ # ScanFile请求参数结构体
172
+ class ScanFileRequest < TencentCloud::Common::AbstractModel
173
+ # @param Key: 购买服务后获得的授权信息,用于保证请求有效性
174
+ # @type Key: String
175
+ # @param Sample: 文件下载url地址
176
+ # @type Sample: String
177
+ # @param Md5: 文件的md5值
178
+ # @type Md5: String
179
+
180
+ attr_accessor :Key, :Sample, :Md5
181
+
182
+ def initialize(key=nil, sample=nil, md5=nil)
183
+ @Key = key
184
+ @Sample = sample
185
+ @Md5 = md5
186
+ end
187
+
188
+ def deserialize(params)
189
+ @Key = params['Key']
190
+ @Sample = params['Sample']
191
+ @Md5 = params['Md5']
192
+ end
193
+ end
194
+
195
+ # ScanFile返回参数结构体
196
+ class ScanFileResponse < TencentCloud::Common::AbstractModel
197
+ # @param Status: 接口调用状态,成功返回200,失败返回400
198
+ # @type Status: Integer
199
+ # @param Info: 接口调用描述信息,成功返回"success",失败返回"invalid request"
200
+ # @type Info: String
201
+ # @param Data: 异步扫描任务提交成功返回success
202
+ # @type Data: String
203
+ # @param RequestId: 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。
204
+ # @type RequestId: String
205
+
206
+ attr_accessor :Status, :Info, :Data, :RequestId
207
+
208
+ def initialize(status=nil, info=nil, data=nil, requestid=nil)
209
+ @Status = status
210
+ @Info = info
211
+ @Data = data
212
+ @RequestId = requestid
213
+ end
214
+
215
+ def deserialize(params)
216
+ @Status = params['Status']
217
+ @Info = params['Info']
218
+ @Data = params['Data']
219
+ @RequestId = params['RequestId']
220
+ end
221
+ end
222
+
223
+ end
224
+ end
225
+ end
226
+
metadata ADDED
@@ -0,0 +1,66 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: tencentcloud-sdk-tav
3
+ version: !ruby/object:Gem::Version
4
+ version: 1.0.200
5
+ platform: ruby
6
+ authors:
7
+ - Tencent Cloud
8
+ autorequire:
9
+ bindir: bin
10
+ cert_chain: []
11
+ date: 2021-11-11 00:00:00.000000000 Z
12
+ dependencies:
13
+ - !ruby/object:Gem::Dependency
14
+ name: tencentcloud-sdk-common
15
+ requirement: !ruby/object:Gem::Requirement
16
+ requirements:
17
+ - - "~>"
18
+ - !ruby/object:Gem::Version
19
+ version: '1.0'
20
+ type: :runtime
21
+ prerelease: false
22
+ version_requirements: !ruby/object:Gem::Requirement
23
+ requirements:
24
+ - - "~>"
25
+ - !ruby/object:Gem::Version
26
+ version: '1.0'
27
+ description: Tencent Cloud Ruby SDK is the official software development kit, which
28
+ allows Ruby developers to write software that makes use of Tencent Cloud service
29
+ TAV.
30
+ email:
31
+ - tencentcloudapi@tencent.com
32
+ executables: []
33
+ extensions: []
34
+ extra_rdoc_files: []
35
+ files:
36
+ - lib/VERSION
37
+ - lib/tencentcloud-sdk-tav.rb
38
+ - lib/v20190118/client.rb
39
+ - lib/v20190118/models.rb
40
+ homepage: https://github.com/TencentCloud/tencentcloud-sdk-ruby
41
+ licenses:
42
+ - Apache-2.0
43
+ metadata:
44
+ source_code_uri: https://github.com/TencentCloud/tencentcloud-sdk-ruby/tencentcloud-sdk-tav
45
+ changelog_uri: https://github.com/TencentCloud/tencentcloud-sdk-ruby/blob/master/CHANGELOG.md
46
+ post_install_message:
47
+ rdoc_options: []
48
+ require_paths:
49
+ - lib
50
+ required_ruby_version: !ruby/object:Gem::Requirement
51
+ requirements:
52
+ - - ">="
53
+ - !ruby/object:Gem::Version
54
+ version: '0'
55
+ required_rubygems_version: !ruby/object:Gem::Requirement
56
+ requirements:
57
+ - - ">="
58
+ - !ruby/object:Gem::Version
59
+ version: '0'
60
+ requirements: []
61
+ rubyforge_project:
62
+ rubygems_version: 2.6.14
63
+ signing_key:
64
+ specification_version: 4
65
+ summary: Tencent Cloud SDK for Ruby - TAV
66
+ test_files: []