tencentcloud-sdk-ft 1.0.200

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml ADDED
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA1:
3
+ metadata.gz: ea646d87e0ebbbbff7b6a217def5b47559be2a31
4
+ data.tar.gz: 435b9d04f80a6a5df716a652d37debde4fda659e
5
+ SHA512:
6
+ metadata.gz: bced26d776ec97f20d20b779f8e9503257974de7ae8dbc0a0d997091abbc9095ab353b26140d1a0c5e75e7a6c1f045a78843a35088a0ab1ad9dad187feb7817a
7
+ data.tar.gz: 90b3058d3b21cd3e091ef090feee8ecf0f3462087ba63417f59c403a980b82218d07e80c702587259ae9048be0f1c0738f9a2bc279716eb5bcb5a574de60a27e
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 'v20200304/client'
6
+ require_relative 'v20200304/models'
7
+
8
+ module TencentCloud
9
+ module Ft
10
+ end
11
+ end
@@ -0,0 +1,180 @@
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 Ft
21
+ module V20200304
22
+ class Client < TencentCloud::Common::AbstractClient
23
+
24
+ def initialize(credential, region, profile = nil)
25
+ api_version = '2020-03-04'
26
+ api_endpoint = 'ft.tencentcloudapi.com'
27
+ sdk_version = 'FT_' + File.read(File.expand_path('../VERSION', __dir__)).strip
28
+ super(credential, region, api_version, api_endpoint, sdk_version, profile)
29
+ end
30
+
31
+
32
+ # 撤销人像渐变任务请求
33
+
34
+ # @param request: Request instance for CancelFaceMorphJob.
35
+ # @type request: :class:`Tencentcloud::ft::V20200304::CancelFaceMorphJobRequest`
36
+ # @rtype: :class:`Tencentcloud::ft::V20200304::CancelFaceMorphJobResponse`
37
+ def CancelFaceMorphJob(request)
38
+ body = send_request('CancelFaceMorphJob', request.serialize)
39
+ response = JSON.parse(body)
40
+ if response['Response'].key?('Error') == false
41
+ model = CancelFaceMorphJobResponse.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
+ # 用户上传一张人脸图片,基于人脸编辑与生成算法,输出一张人脸变老或变年轻的图片,支持实现人脸不同年龄的变化。
57
+
58
+ # @param request: Request instance for ChangeAgePic.
59
+ # @type request: :class:`Tencentcloud::ft::V20200304::ChangeAgePicRequest`
60
+ # @rtype: :class:`Tencentcloud::ft::V20200304::ChangeAgePicResponse`
61
+ def ChangeAgePic(request)
62
+ body = send_request('ChangeAgePic', request.serialize)
63
+ response = JSON.parse(body)
64
+ if response['Response'].key?('Error') == false
65
+ model = ChangeAgePicResponse.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
+ # 输入一张人脸照片,生成个性化的二次元动漫形象,可用于打造个性头像、趣味活动、特效类应用等场景,提升社交娱乐的体验。
81
+
82
+ # @param request: Request instance for FaceCartoonPic.
83
+ # @type request: :class:`Tencentcloud::ft::V20200304::FaceCartoonPicRequest`
84
+ # @rtype: :class:`Tencentcloud::ft::V20200304::FaceCartoonPicResponse`
85
+ def FaceCartoonPic(request)
86
+ body = send_request('FaceCartoonPic', request.serialize)
87
+ response = JSON.parse(body)
88
+ if response['Response'].key?('Error') == false
89
+ model = FaceCartoonPicResponse.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
+ # 输入2-5张人脸照片,生成一段以人脸为焦点的渐变视频或GIF图,支持自定义图片播放速度、视频每秒传输帧数,可用于短视频、表情包、创意H5等应用场景,丰富静态图片的玩法。
105
+
106
+ # @param request: Request instance for MorphFace.
107
+ # @type request: :class:`Tencentcloud::ft::V20200304::MorphFaceRequest`
108
+ # @rtype: :class:`Tencentcloud::ft::V20200304::MorphFaceResponse`
109
+ def MorphFace(request)
110
+ body = send_request('MorphFace', request.serialize)
111
+ response = JSON.parse(body)
112
+ if response['Response'].key?('Error') == false
113
+ model = MorphFaceResponse.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
+
130
+ # @param request: Request instance for QueryFaceMorphJob.
131
+ # @type request: :class:`Tencentcloud::ft::V20200304::QueryFaceMorphJobRequest`
132
+ # @rtype: :class:`Tencentcloud::ft::V20200304::QueryFaceMorphJobResponse`
133
+ def QueryFaceMorphJob(request)
134
+ body = send_request('QueryFaceMorphJob', request.serialize)
135
+ response = JSON.parse(body)
136
+ if response['Response'].key?('Error') == false
137
+ model = QueryFaceMorphJobResponse.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
+ # 用户上传一张人脸图片,基于人脸编辑与生成算法,输出一张人脸性别转换的图片。男变女可实现美颜、淡妆、加刘海和长发的效果;女变男可实现加胡须、变短发的效果。
153
+
154
+ # @param request: Request instance for SwapGenderPic.
155
+ # @type request: :class:`Tencentcloud::ft::V20200304::SwapGenderPicRequest`
156
+ # @rtype: :class:`Tencentcloud::ft::V20200304::SwapGenderPicResponse`
157
+ def SwapGenderPic(request)
158
+ body = send_request('SwapGenderPic', request.serialize)
159
+ response = JSON.parse(body)
160
+ if response['Response'].key?('Error') == false
161
+ model = SwapGenderPicResponse.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
+ end
178
+ end
179
+ end
180
+ end
@@ -0,0 +1,489 @@
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 Ft
19
+ module V20200304
20
+ # 人脸变年龄信息
21
+ class AgeInfo < TencentCloud::Common::AbstractModel
22
+ # @param Age: 变化到的人脸年龄 [10,80]。
23
+ # @type Age: Integer
24
+ # @param FaceRect: 人脸框位置。若不输入则选择 Image 或 Url 中面积最大的人脸。
25
+ # 您可以通过 [人脸检测与分析](https://cloud.tencent.com/document/api/867/32800) 接口获取人脸框位置信息。
26
+ # @type FaceRect: :class:`Tencentcloud::Ft.v20200304.models.FaceRect`
27
+
28
+ attr_accessor :Age, :FaceRect
29
+
30
+ def initialize(age=nil, facerect=nil)
31
+ @Age = age
32
+ @FaceRect = facerect
33
+ end
34
+
35
+ def deserialize(params)
36
+ @Age = params['Age']
37
+ unless params['FaceRect'].nil?
38
+ @FaceRect = FaceRect.new
39
+ @FaceRect.deserialize(params['FaceRect'])
40
+ end
41
+ end
42
+ end
43
+
44
+ # CancelFaceMorphJob请求参数结构体
45
+ class CancelFaceMorphJobRequest < TencentCloud::Common::AbstractModel
46
+ # @param JobId: 人像渐变任务Job id
47
+ # @type JobId: String
48
+
49
+ attr_accessor :JobId
50
+
51
+ def initialize(jobid=nil)
52
+ @JobId = jobid
53
+ end
54
+
55
+ def deserialize(params)
56
+ @JobId = params['JobId']
57
+ end
58
+ end
59
+
60
+ # CancelFaceMorphJob返回参数结构体
61
+ class CancelFaceMorphJobResponse < TencentCloud::Common::AbstractModel
62
+ # @param RequestId: 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。
63
+ # @type RequestId: String
64
+
65
+ attr_accessor :RequestId
66
+
67
+ def initialize(requestid=nil)
68
+ @RequestId = requestid
69
+ end
70
+
71
+ def deserialize(params)
72
+ @RequestId = params['RequestId']
73
+ end
74
+ end
75
+
76
+ # ChangeAgePic请求参数结构体
77
+ class ChangeAgePicRequest < TencentCloud::Common::AbstractModel
78
+ # @param AgeInfos: 人脸变老变年轻信息。
79
+ # 您可以输入最多3个 AgeInfo 来实现给一张图中的最多3张人脸变老变年轻。
80
+ # @type AgeInfos: Array
81
+ # @param Image: 图片 base64 数据,base64 编码后大小不可超过5M。
82
+ # 支持PNG、JPG、JPEG、BMP,不支持 GIF 图片。
83
+ # @type Image: String
84
+ # @param Url: 图片的 Url ,对应图片 base64 编码后大小不可超过5M。
85
+ # 图片的 Url、Image必须提供一个,如果都提供,只使用 Url。
86
+ # 图片存储于腾讯云的 Url 可保障更高下载速度和稳定性,建议图片存储于腾讯云。
87
+ # 非腾讯云存储的Url速度和稳定性可能受一定影响。
88
+ # 支持PNG、JPG、JPEG、BMP,不支持 GIF 图片。
89
+ # @type Url: String
90
+ # @param RspImgType: 返回图像方式(base64 或 url ) ,二选一。url有效期为1天。
91
+ # @type RspImgType: String
92
+
93
+ attr_accessor :AgeInfos, :Image, :Url, :RspImgType
94
+
95
+ def initialize(ageinfos=nil, image=nil, url=nil, rspimgtype=nil)
96
+ @AgeInfos = ageinfos
97
+ @Image = image
98
+ @Url = url
99
+ @RspImgType = rspimgtype
100
+ end
101
+
102
+ def deserialize(params)
103
+ unless params['AgeInfos'].nil?
104
+ @AgeInfos = []
105
+ params['AgeInfos'].each do |i|
106
+ ageinfo_tmp = AgeInfo.new
107
+ ageinfo_tmp.deserialize(i)
108
+ @AgeInfos << ageinfo_tmp
109
+ end
110
+ end
111
+ @Image = params['Image']
112
+ @Url = params['Url']
113
+ @RspImgType = params['RspImgType']
114
+ end
115
+ end
116
+
117
+ # ChangeAgePic返回参数结构体
118
+ class ChangeAgePicResponse < TencentCloud::Common::AbstractModel
119
+ # @param ResultImage: RspImgType 为 base64 时,返回处理后的图片 base64 数据。默认返回base64
120
+ # @type ResultImage: String
121
+ # @param ResultUrl: RspImgType 为 url 时,返回处理后的图片 url 数据。
122
+ # @type ResultUrl: String
123
+ # @param RequestId: 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。
124
+ # @type RequestId: String
125
+
126
+ attr_accessor :ResultImage, :ResultUrl, :RequestId
127
+
128
+ def initialize(resultimage=nil, resulturl=nil, requestid=nil)
129
+ @ResultImage = resultimage
130
+ @ResultUrl = resulturl
131
+ @RequestId = requestid
132
+ end
133
+
134
+ def deserialize(params)
135
+ @ResultImage = params['ResultImage']
136
+ @ResultUrl = params['ResultUrl']
137
+ @RequestId = params['RequestId']
138
+ end
139
+ end
140
+
141
+ # FaceCartoonPic请求参数结构体
142
+ class FaceCartoonPicRequest < TencentCloud::Common::AbstractModel
143
+ # @param Image: 图片 base64 数据,base64 编码后大小不可超过5M。
144
+ # 支持PNG、JPG、JPEG、BMP,不支持 GIF 图片。
145
+ # @type Image: String
146
+ # @param Url: 图片的 Url ,对应图片 base64 编码后大小不可超过5M。
147
+ # 图片的 Url、Image必须提供一个,如果都提供,只使用 Url。
148
+ # 图片存储于腾讯云的 Url 可保障更高下载速度和稳定性,建议图片存储于腾讯云。
149
+ # 非腾讯云存储的Url速度和稳定性可能受一定影响。
150
+ # 支持PNG、JPG、JPEG、BMP,不支持 GIF 图片。
151
+ # @type Url: String
152
+ # @param RspImgType: 返回图像方式(base64 或 url ) ,二选一。url有效期为1天。
153
+ # @type RspImgType: String
154
+ # @param DisableGlobalEffect: 关闭全图动漫化,传入true(不分大小写)即关闭全图动漫化。
155
+ # @type DisableGlobalEffect: String
156
+
157
+ attr_accessor :Image, :Url, :RspImgType, :DisableGlobalEffect
158
+
159
+ def initialize(image=nil, url=nil, rspimgtype=nil, disableglobaleffect=nil)
160
+ @Image = image
161
+ @Url = url
162
+ @RspImgType = rspimgtype
163
+ @DisableGlobalEffect = disableglobaleffect
164
+ end
165
+
166
+ def deserialize(params)
167
+ @Image = params['Image']
168
+ @Url = params['Url']
169
+ @RspImgType = params['RspImgType']
170
+ @DisableGlobalEffect = params['DisableGlobalEffect']
171
+ end
172
+ end
173
+
174
+ # FaceCartoonPic返回参数结构体
175
+ class FaceCartoonPicResponse < TencentCloud::Common::AbstractModel
176
+ # @param ResultImage: 结果图片Base64信息。
177
+ # @type ResultImage: String
178
+ # @param ResultUrl: RspImgType 为 url 时,返回处理后的图片 url 数据。(默认为base64)
179
+ # @type ResultUrl: String
180
+ # @param RequestId: 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。
181
+ # @type RequestId: String
182
+
183
+ attr_accessor :ResultImage, :ResultUrl, :RequestId
184
+
185
+ def initialize(resultimage=nil, resulturl=nil, requestid=nil)
186
+ @ResultImage = resultimage
187
+ @ResultUrl = resulturl
188
+ @RequestId = requestid
189
+ end
190
+
191
+ def deserialize(params)
192
+ @ResultImage = params['ResultImage']
193
+ @ResultUrl = params['ResultUrl']
194
+ @RequestId = params['RequestId']
195
+ end
196
+ end
197
+
198
+ # 人像渐变返回结果
199
+ class FaceMorphOutput < TencentCloud::Common::AbstractModel
200
+ # @param MorphUrl: 人像渐变输出的url
201
+ # 注意:此字段可能返回 null,表示取不到有效值。
202
+ # @type MorphUrl: String
203
+ # @param MorphMd5: 人像渐变输出的结果MD5,用于校验
204
+ # 注意:此字段可能返回 null,表示取不到有效值。
205
+ # @type MorphMd5: String
206
+ # @param CoverImage: 人像渐变输出的结果封面图base64字符串
207
+ # 注意:此字段可能返回 null,表示取不到有效值。
208
+ # @type CoverImage: String
209
+
210
+ attr_accessor :MorphUrl, :MorphMd5, :CoverImage
211
+
212
+ def initialize(morphurl=nil, morphmd5=nil, coverimage=nil)
213
+ @MorphUrl = morphurl
214
+ @MorphMd5 = morphmd5
215
+ @CoverImage = coverimage
216
+ end
217
+
218
+ def deserialize(params)
219
+ @MorphUrl = params['MorphUrl']
220
+ @MorphMd5 = params['MorphMd5']
221
+ @CoverImage = params['CoverImage']
222
+ end
223
+ end
224
+
225
+ # 人脸框信息
226
+ class FaceRect < TencentCloud::Common::AbstractModel
227
+ # @param Y: 人脸框左上角纵坐标。
228
+ # @type Y: Integer
229
+ # @param X: 人脸框左上角横坐标。
230
+ # @type X: Integer
231
+ # @param Width: 人脸框宽度。
232
+ # @type Width: Integer
233
+ # @param Height: 人脸框高度。
234
+ # @type Height: Integer
235
+
236
+ attr_accessor :Y, :X, :Width, :Height
237
+
238
+ def initialize(y=nil, x=nil, width=nil, height=nil)
239
+ @Y = y
240
+ @X = x
241
+ @Width = width
242
+ @Height = height
243
+ end
244
+
245
+ def deserialize(params)
246
+ @Y = params['Y']
247
+ @X = params['X']
248
+ @Width = params['Width']
249
+ @Height = params['Height']
250
+ end
251
+ end
252
+
253
+ # 人脸转换性别信息
254
+ class GenderInfo < TencentCloud::Common::AbstractModel
255
+ # @param Gender: 选择转换方向,0:男变女,1:女变男。
256
+ # @type Gender: Integer
257
+ # @param FaceRect: 人脸框位置。若不输入则选择 Image 或 Url 中面积最大的人脸。
258
+ # 您可以通过 [人脸检测与分析](https://cloud.tencent.com/document/api/867/32800) 接口获取人脸框位置信息。
259
+ # @type FaceRect: :class:`Tencentcloud::Ft.v20200304.models.FaceRect`
260
+
261
+ attr_accessor :Gender, :FaceRect
262
+
263
+ def initialize(gender=nil, facerect=nil)
264
+ @Gender = gender
265
+ @FaceRect = facerect
266
+ end
267
+
268
+ def deserialize(params)
269
+ @Gender = params['Gender']
270
+ unless params['FaceRect'].nil?
271
+ @FaceRect = FaceRect.new
272
+ @FaceRect.deserialize(params['FaceRect'])
273
+ end
274
+ end
275
+ end
276
+
277
+ # 渐变参数
278
+ class GradientInfo < TencentCloud::Common::AbstractModel
279
+ # @param Tempo: 图片的展示时长,即单张图片静止不变的时间。GIF默认每张图片0.7s,视频默认每张图片0.5s。最大取值1s。
280
+ # @type Tempo: Float
281
+ # @param MorphTime: 人像渐变的最长时间,即单张图片使用渐变特效的时间。 GIF默认值为0.5s,视频默值认为1s。最大取值1s。
282
+ # @type MorphTime: Float
283
+
284
+ attr_accessor :Tempo, :MorphTime
285
+
286
+ def initialize(tempo=nil, morphtime=nil)
287
+ @Tempo = tempo
288
+ @MorphTime = morphtime
289
+ end
290
+
291
+ def deserialize(params)
292
+ @Tempo = params['Tempo']
293
+ @MorphTime = params['MorphTime']
294
+ end
295
+ end
296
+
297
+ # MorphFace请求参数结构体
298
+ class MorphFaceRequest < TencentCloud::Common::AbstractModel
299
+ # @param Images: 图片 base64 数据,base64 编码后大小不可超过5M。
300
+ # jpg格式长边像素不可超过4000,其他格式图片长边像素不可超2000。
301
+ # 人员人脸总数量至少2张,不可超过5张。
302
+ # 若图片中包含多张人脸,只选取其中人脸面积最大的人脸。
303
+ # 支持PNG、JPG、JPEG、BMP,不支持 GIF 图片。
304
+ # @type Images: Array
305
+ # @param Urls: 图片的 Url 。对应图片 base64 编码后大小不可超过5M。jpg格式长边像素不可超过4000,其他格式图片长边像素不可超2000。
306
+ # Url、Image必须提供一个,如果都提供,只使用 Url。图片存储于腾讯云的Url可保障更高下载速度和稳定性,建议图片存储于腾讯云。
307
+ # 非腾讯云存储的Url速度和稳定性可能受一定影响。
308
+ # 支持PNG、JPG、JPEG、BMP,不支持 GIF 图片。
309
+ # 人员人脸总数量不可超过5张。
310
+ # 若图片中包含多张人脸,只选取其中人脸面积最大的人脸。
311
+ # @type Urls: Array
312
+ # @param GradientInfos: 人脸渐变参数。可调整每张图片的展示时长、人像渐变的最长时间
313
+ # @type GradientInfos: Array
314
+ # @param Fps: 视频帧率,取值[1,25]。默认10
315
+ # @type Fps: Integer
316
+ # @param OutputType: 视频类型,取值0。目前仅支持MP4格式,默认为MP4格式
317
+ # @type OutputType: Integer
318
+ # @param OutputWidth: 视频宽度,取值[128,1280]。默认值720
319
+ # @type OutputWidth: Integer
320
+ # @param OutputHeight: 视频高度,取值[128,1280]。默认值1280
321
+ # @type OutputHeight: Integer
322
+
323
+ attr_accessor :Images, :Urls, :GradientInfos, :Fps, :OutputType, :OutputWidth, :OutputHeight
324
+
325
+ def initialize(images=nil, urls=nil, gradientinfos=nil, fps=nil, outputtype=nil, outputwidth=nil, outputheight=nil)
326
+ @Images = images
327
+ @Urls = urls
328
+ @GradientInfos = gradientinfos
329
+ @Fps = fps
330
+ @OutputType = outputtype
331
+ @OutputWidth = outputwidth
332
+ @OutputHeight = outputheight
333
+ end
334
+
335
+ def deserialize(params)
336
+ @Images = params['Images']
337
+ @Urls = params['Urls']
338
+ unless params['GradientInfos'].nil?
339
+ @GradientInfos = []
340
+ params['GradientInfos'].each do |i|
341
+ gradientinfo_tmp = GradientInfo.new
342
+ gradientinfo_tmp.deserialize(i)
343
+ @GradientInfos << gradientinfo_tmp
344
+ end
345
+ end
346
+ @Fps = params['Fps']
347
+ @OutputType = params['OutputType']
348
+ @OutputWidth = params['OutputWidth']
349
+ @OutputHeight = params['OutputHeight']
350
+ end
351
+ end
352
+
353
+ # MorphFace返回参数结构体
354
+ class MorphFaceResponse < TencentCloud::Common::AbstractModel
355
+ # @param JobId: 人像渐变任务的Job id
356
+ # @type JobId: String
357
+ # @param EstimatedProcessTime: 预估处理时间,粒度为秒
358
+ # @type EstimatedProcessTime: Integer
359
+ # @param RequestId: 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。
360
+ # @type RequestId: String
361
+
362
+ attr_accessor :JobId, :EstimatedProcessTime, :RequestId
363
+
364
+ def initialize(jobid=nil, estimatedprocesstime=nil, requestid=nil)
365
+ @JobId = jobid
366
+ @EstimatedProcessTime = estimatedprocesstime
367
+ @RequestId = requestid
368
+ end
369
+
370
+ def deserialize(params)
371
+ @JobId = params['JobId']
372
+ @EstimatedProcessTime = params['EstimatedProcessTime']
373
+ @RequestId = params['RequestId']
374
+ end
375
+ end
376
+
377
+ # QueryFaceMorphJob请求参数结构体
378
+ class QueryFaceMorphJobRequest < TencentCloud::Common::AbstractModel
379
+ # @param JobId: 人像渐变任务Job id
380
+ # @type JobId: String
381
+
382
+ attr_accessor :JobId
383
+
384
+ def initialize(jobid=nil)
385
+ @JobId = jobid
386
+ end
387
+
388
+ def deserialize(params)
389
+ @JobId = params['JobId']
390
+ end
391
+ end
392
+
393
+ # QueryFaceMorphJob返回参数结构体
394
+ class QueryFaceMorphJobResponse < TencentCloud::Common::AbstractModel
395
+ # @param JobStatus: 当前任务状态:排队中、处理中、处理失败或者处理完成
396
+ # @type JobStatus: String
397
+ # @param FaceMorphOutput: 人像渐变输出的结果信息
398
+ # 注意:此字段可能返回 null,表示取不到有效值。
399
+ # @type FaceMorphOutput: :class:`Tencentcloud::Ft.v20200304.models.FaceMorphOutput`
400
+ # @param RequestId: 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。
401
+ # @type RequestId: String
402
+
403
+ attr_accessor :JobStatus, :FaceMorphOutput, :RequestId
404
+
405
+ def initialize(jobstatus=nil, facemorphoutput=nil, requestid=nil)
406
+ @JobStatus = jobstatus
407
+ @FaceMorphOutput = facemorphoutput
408
+ @RequestId = requestid
409
+ end
410
+
411
+ def deserialize(params)
412
+ @JobStatus = params['JobStatus']
413
+ unless params['FaceMorphOutput'].nil?
414
+ @FaceMorphOutput = FaceMorphOutput.new
415
+ @FaceMorphOutput.deserialize(params['FaceMorphOutput'])
416
+ end
417
+ @RequestId = params['RequestId']
418
+ end
419
+ end
420
+
421
+ # SwapGenderPic请求参数结构体
422
+ class SwapGenderPicRequest < TencentCloud::Common::AbstractModel
423
+ # @param GenderInfos: 人脸转化性别信息。
424
+ # 您可以输入最多3个 GenderInfo 来实现给一张图中的最多3张人脸转换性别。
425
+ # @type GenderInfos: Array
426
+ # @param Image: 图片 base64 数据,base64 编码后大小不可超过5M。
427
+ # 支持PNG、JPG、JPEG、BMP,不支持 GIF 图片。
428
+ # @type Image: String
429
+ # @param Url: 图片的 Url ,对应图片 base64 编码后大小不可超过5M。
430
+ # 图片的 Url、Image必须提供一个,如果都提供,只使用 Url。
431
+ # 图片存储于腾讯云的 Url 可保障更高下载速度和稳定性,建议图片存储于腾讯云。
432
+ # 非腾讯云存储的Url速度和稳定性可能受一定影响。
433
+ # 支持PNG、JPG、JPEG、BMP,不支持 GIF 图片。
434
+ # @type Url: String
435
+ # @param RspImgType: 返回图像方式(base64 或 url ) ,二选一。url有效期为1天。
436
+ # @type RspImgType: String
437
+
438
+ attr_accessor :GenderInfos, :Image, :Url, :RspImgType
439
+
440
+ def initialize(genderinfos=nil, image=nil, url=nil, rspimgtype=nil)
441
+ @GenderInfos = genderinfos
442
+ @Image = image
443
+ @Url = url
444
+ @RspImgType = rspimgtype
445
+ end
446
+
447
+ def deserialize(params)
448
+ unless params['GenderInfos'].nil?
449
+ @GenderInfos = []
450
+ params['GenderInfos'].each do |i|
451
+ genderinfo_tmp = GenderInfo.new
452
+ genderinfo_tmp.deserialize(i)
453
+ @GenderInfos << genderinfo_tmp
454
+ end
455
+ end
456
+ @Image = params['Image']
457
+ @Url = params['Url']
458
+ @RspImgType = params['RspImgType']
459
+ end
460
+ end
461
+
462
+ # SwapGenderPic返回参数结构体
463
+ class SwapGenderPicResponse < TencentCloud::Common::AbstractModel
464
+ # @param ResultImage: RspImgType 为 base64 时,返回处理后的图片 base64 数据。默认返回base64
465
+ # @type ResultImage: String
466
+ # @param ResultUrl: RspImgType 为 url 时,返回处理后的图片 url 数据。
467
+ # @type ResultUrl: String
468
+ # @param RequestId: 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。
469
+ # @type RequestId: String
470
+
471
+ attr_accessor :ResultImage, :ResultUrl, :RequestId
472
+
473
+ def initialize(resultimage=nil, resulturl=nil, requestid=nil)
474
+ @ResultImage = resultimage
475
+ @ResultUrl = resulturl
476
+ @RequestId = requestid
477
+ end
478
+
479
+ def deserialize(params)
480
+ @ResultImage = params['ResultImage']
481
+ @ResultUrl = params['ResultUrl']
482
+ @RequestId = params['RequestId']
483
+ end
484
+ end
485
+
486
+ end
487
+ end
488
+ end
489
+
metadata ADDED
@@ -0,0 +1,66 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: tencentcloud-sdk-ft
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
+ FT.
30
+ email:
31
+ - tencentcloudapi@tencent.com
32
+ executables: []
33
+ extensions: []
34
+ extra_rdoc_files: []
35
+ files:
36
+ - lib/VERSION
37
+ - lib/tencentcloud-sdk-ft.rb
38
+ - lib/v20200304/client.rb
39
+ - lib/v20200304/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-ft
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 - FT
66
+ test_files: []