tencentcloud-sdk-anicloud 3.0.478

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: 951c113e5896f6f30536e4d52ea16fca2dba6e96
4
+ data.tar.gz: e0c90fb9e5aca9d0484c5bc6b6686e72fd8a5ddc
5
+ SHA512:
6
+ metadata.gz: 3a5c24ae78c8332798f0d9cf9df064d0a107a2cc0fac80019e107dfac4e97baf306f27c601c0794cca5eb848850c15d3f47d42d332022eed491490863c9f1ae1
7
+ data.tar.gz: f40500be0cea8c0e363525d09385e0d5274c012ca2be760118ccf3af8cfdffe96a3c12aaf1d1e6909092b6365e944e6cb00c19442b5e4b77072030350bf7f69b
data/lib/VERSION ADDED
@@ -0,0 +1 @@
1
+ 3.0.478
@@ -0,0 +1,11 @@
1
+ # frozen_string_literal: true
2
+
3
+ require 'tencentcloud-sdk-common'
4
+
5
+ require_relative 'v20220923/client'
6
+ require_relative 'v20220923/models'
7
+
8
+ module TencentCloud
9
+ module Anicloud
10
+ end
11
+ end
@@ -0,0 +1,108 @@
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 Anicloud
21
+ module V20220923
22
+ class Client < TencentCloud::Common::AbstractClient
23
+
24
+ def initialize(credential, region, profile = nil)
25
+ api_version = '2022-09-23'
26
+ api_endpoint = 'anicloud.tencentcloudapi.com'
27
+ sdk_version = 'ANICLOUD_' + File.read(File.expand_path('../VERSION', __dir__)).strip
28
+ super(credential, region, api_version, api_endpoint, sdk_version, profile)
29
+ end
30
+
31
+
32
+ # 查看appid是否存在
33
+
34
+ # @param request: Request instance for CheckAppidExist.
35
+ # @type request: :class:`Tencentcloud::anicloud::V20220923::CheckAppidExistRequest`
36
+ # @rtype: :class:`Tencentcloud::anicloud::V20220923::CheckAppidExistResponse`
37
+ def CheckAppidExist(request)
38
+ body = send_request('CheckAppidExist', request.serialize)
39
+ response = JSON.parse(body)
40
+ if response['Response'].key?('Error') == false
41
+ model = CheckAppidExistResponse.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 QueryResource.
59
+ # @type request: :class:`Tencentcloud::anicloud::V20220923::QueryResourceRequest`
60
+ # @rtype: :class:`Tencentcloud::anicloud::V20220923::QueryResourceResponse`
61
+ def QueryResource(request)
62
+ body = send_request('QueryResource', request.serialize)
63
+ response = JSON.parse(body)
64
+ if response['Response'].key?('Error') == false
65
+ model = QueryResourceResponse.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 QueryResourceInfo.
83
+ # @type request: :class:`Tencentcloud::anicloud::V20220923::QueryResourceInfoRequest`
84
+ # @rtype: :class:`Tencentcloud::anicloud::V20220923::QueryResourceInfoResponse`
85
+ def QueryResourceInfo(request)
86
+ body = send_request('QueryResourceInfo', request.serialize)
87
+ response = JSON.parse(body)
88
+ if response['Response'].key?('Error') == false
89
+ model = QueryResourceInfoResponse.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
+ end
106
+ end
107
+ end
108
+ end
@@ -0,0 +1,315 @@
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 Anicloud
19
+ module V20220923
20
+ # CheckAppidExist请求参数结构体
21
+ class CheckAppidExistRequest < TencentCloud::Common::AbstractModel
22
+ # @param SDKAppid: 业务的appid
23
+ # @type SDKAppid: String
24
+ # @param Type: sub product code
25
+ # @type Type: String
26
+
27
+ attr_accessor :SDKAppid, :Type
28
+
29
+ def initialize(sdkappid=nil, type=nil)
30
+ @SDKAppid = sdkappid
31
+ @Type = type
32
+ end
33
+
34
+ def deserialize(params)
35
+ @SDKAppid = params['SDKAppid']
36
+ @Type = params['Type']
37
+ end
38
+ end
39
+
40
+ # CheckAppidExist返回参数结构体
41
+ class CheckAppidExistResponse < TencentCloud::Common::AbstractModel
42
+ # @param Exist: appid是否存在
43
+ # @type Exist: Boolean
44
+ # @param HasError: 请求是否成功
45
+ # @type HasError: Boolean
46
+ # @param Msg: 出错消息
47
+ # @type Msg: String
48
+ # @param RequestId: 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。
49
+ # @type RequestId: String
50
+
51
+ attr_accessor :Exist, :HasError, :Msg, :RequestId
52
+
53
+ def initialize(exist=nil, haserror=nil, msg=nil, requestid=nil)
54
+ @Exist = exist
55
+ @HasError = haserror
56
+ @Msg = msg
57
+ @RequestId = requestid
58
+ end
59
+
60
+ def deserialize(params)
61
+ @Exist = params['Exist']
62
+ @HasError = params['HasError']
63
+ @Msg = params['Msg']
64
+ @RequestId = params['RequestId']
65
+ end
66
+ end
67
+
68
+ # 购买详情
69
+ class GoodsDetail < TencentCloud::Common::AbstractModel
70
+ # @param ProductCode: 按照四层接入的产品需要传入产品标签,例如:p_cvm
71
+ # 注意:此字段可能返回 null,表示取不到有效值。
72
+ # @type ProductCode: String
73
+ # @param SubProductCode: 四层定义的子产品标签,例如:sp_cvm_s1
74
+ # 注意:此字段可能返回 null,表示取不到有效值。
75
+ # @type SubProductCode: String
76
+ # @param Type: 资源类型
77
+ # 注意:此字段可能返回 null,表示取不到有效值。
78
+ # @type Type: Array
79
+ # @param GoodsNum: 资源数量
80
+ # 注意:此字段可能返回 null,表示取不到有效值。
81
+ # @type GoodsNum: Integer
82
+
83
+ attr_accessor :ProductCode, :SubProductCode, :Type, :GoodsNum
84
+
85
+ def initialize(productcode=nil, subproductcode=nil, type=nil, goodsnum=nil)
86
+ @ProductCode = productcode
87
+ @SubProductCode = subproductcode
88
+ @Type = type
89
+ @GoodsNum = goodsnum
90
+ end
91
+
92
+ def deserialize(params)
93
+ @ProductCode = params['ProductCode']
94
+ @SubProductCode = params['SubProductCode']
95
+ @Type = params['Type']
96
+ @GoodsNum = params['GoodsNum']
97
+ end
98
+ end
99
+
100
+ # QueryResourceInfo请求参数结构体
101
+ class QueryResourceInfoRequest < TencentCloud::Common::AbstractModel
102
+ # @param InstanceId: 资源id
103
+ # @type InstanceId: String
104
+
105
+ attr_accessor :InstanceId
106
+
107
+ def initialize(instanceid=nil)
108
+ @InstanceId = instanceid
109
+ end
110
+
111
+ def deserialize(params)
112
+ @InstanceId = params['InstanceId']
113
+ end
114
+ end
115
+
116
+ # QueryResourceInfo返回参数结构体
117
+ class QueryResourceInfoResponse < TencentCloud::Common::AbstractModel
118
+ # @param Resource: 资源信息
119
+ # 注意:此字段可能返回 null,表示取不到有效值。
120
+ # @type Resource: :class:`Tencentcloud::Anicloud.v20220923.models.Resource`
121
+ # @param RequestId: 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。
122
+ # @type RequestId: String
123
+
124
+ attr_accessor :Resource, :RequestId
125
+
126
+ def initialize(resource=nil, requestid=nil)
127
+ @Resource = resource
128
+ @RequestId = requestid
129
+ end
130
+
131
+ def deserialize(params)
132
+ unless params['Resource'].nil?
133
+ @Resource = Resource.new
134
+ @Resource.deserialize(params['Resource'])
135
+ end
136
+ @RequestId = params['RequestId']
137
+ end
138
+ end
139
+
140
+ # QueryResource请求参数结构体
141
+ class QueryResourceRequest < TencentCloud::Common::AbstractModel
142
+ # @param Type: 0: sdk 1:material
143
+ # @type Type: Integer
144
+ # @param PageNumber: 分页起始页
145
+ # @type PageNumber: Integer
146
+ # @param PageSize: 分页大小
147
+ # @type PageSize: Integer
148
+
149
+ attr_accessor :Type, :PageNumber, :PageSize
150
+
151
+ def initialize(type=nil, pagenumber=nil, pagesize=nil)
152
+ @Type = type
153
+ @PageNumber = pagenumber
154
+ @PageSize = pagesize
155
+ end
156
+
157
+ def deserialize(params)
158
+ @Type = params['Type']
159
+ @PageNumber = params['PageNumber']
160
+ @PageSize = params['PageSize']
161
+ end
162
+ end
163
+
164
+ # QueryResource返回参数结构体
165
+ class QueryResourceResponse < TencentCloud::Common::AbstractModel
166
+ # @param Resources: 资源信息列表
167
+ # 注意:此字段可能返回 null,表示取不到有效值。
168
+ # @type Resources: Array
169
+ # @param Total: 总量
170
+ # 注意:此字段可能返回 null,表示取不到有效值。
171
+ # @type Total: Integer
172
+ # @param RequestId: 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。
173
+ # @type RequestId: String
174
+
175
+ attr_accessor :Resources, :Total, :RequestId
176
+
177
+ def initialize(resources=nil, total=nil, requestid=nil)
178
+ @Resources = resources
179
+ @Total = total
180
+ @RequestId = requestid
181
+ end
182
+
183
+ def deserialize(params)
184
+ unless params['Resources'].nil?
185
+ @Resources = []
186
+ params['Resources'].each do |i|
187
+ resource_tmp = Resource.new
188
+ resource_tmp.deserialize(i)
189
+ @Resources << resource_tmp
190
+ end
191
+ end
192
+ @Total = params['Total']
193
+ @RequestId = params['RequestId']
194
+ end
195
+ end
196
+
197
+ # 资源信息
198
+ class Resource < TencentCloud::Common::AbstractModel
199
+ # @param UIN: 资源拥有者
200
+ # 注意:此字段可能返回 null,表示取不到有效值。
201
+ # @type UIN: String
202
+ # @param AppId: 云平台应用ID,一般来说与uin存在一一对应的关系
203
+ # 注意:此字段可能返回 null,表示取不到有效值。
204
+ # @type AppId: Integer
205
+ # @param ResourceId: 资源id,会展示到通知内容
206
+ # 注意:此字段可能返回 null,表示取不到有效值。
207
+ # @type ResourceId: String
208
+ # @param ZoneId: 区域ID
209
+ # 注意:此字段可能返回 null,表示取不到有效值。
210
+ # @type ZoneId: Integer
211
+ # @param Status: 资源状态,1正常,2隔离,3销毁(如果资源已经删除或销毁,不需要返回),4冻结/封禁
212
+ # 注意:此字段可能返回 null,表示取不到有效值。
213
+ # @type Status: Integer
214
+ # @param IsolatedTimestamp: 资源隔离时间,未隔离传"0000-00-00 00:00:00",资源由隔离变回正常传"0000-00-00 00:00:00"
215
+ # 注意:此字段可能返回 null,表示取不到有效值。
216
+ # @type IsolatedTimestamp: String
217
+ # @param CreateTime: 资源创建时间,用于更新新购订单的资源开始时间,按时长退费时的资源结束时间取自订单的资源结束时间,
218
+ # 注意:此字段可能返回 null,表示取不到有效值。
219
+ # @type CreateTime: String
220
+ # @param PayMode: 0后付费 1预付费 2预留实例
221
+ # 注意:此字段可能返回 null,表示取不到有效值。
222
+ # @type PayMode: Integer
223
+ # @param Alias: 资源名称,账单中资源别名,生命周期通知中的资源名称,不返回则通知中展示为空
224
+ # 注意:此字段可能返回 null,表示取不到有效值。
225
+ # @type Alias: String
226
+ # @param GoodsDetail: 购买详情
227
+ # 注意:此字段可能返回 null,表示取不到有效值。
228
+ # @type GoodsDetail: :class:`Tencentcloud::Anicloud.v20220923.models.GoodsDetail`
229
+ # @param RenewFlag: 预付费必填 ,自动续费标记,0表示默认状态(用户未设置,即初始状态即手动续费,用户开通了预付费不停服特权也会进行自动续费), 1表示自动续费,2表示明确不自动续费(用户设置),若业务无续费概念或无需自动续费,需要设置为0
230
+ # 注意:此字段可能返回 null,表示取不到有效值。
231
+ # @type RenewFlag: Integer
232
+ # @param ExpireTime: (仅预付费)资源到期时间,无到期概念传"0000-00-00 00:00:00"
233
+ # 注意:此字段可能返回 null,表示取不到有效值。
234
+ # @type ExpireTime: String
235
+ # @param Region: 地域ID
236
+ # 注意:此字段可能返回 null,表示取不到有效值。
237
+ # @type Region: Integer
238
+ # @param SdkAppId: sdk appid
239
+ # 注意:此字段可能返回 null,表示取不到有效值。
240
+ # @type SdkAppId: String
241
+ # @param AppName: app名称
242
+ # 注意:此字段可能返回 null,表示取不到有效值。
243
+ # @type AppName: String
244
+ # @param PackageName: app的package名称
245
+ # 注意:此字段可能返回 null,表示取不到有效值。
246
+ # @type PackageName: String
247
+ # @param URL: 资源链接
248
+ # 注意:此字段可能返回 null,表示取不到有效值。
249
+ # @type URL: String
250
+ # @param Entry: app的entry
251
+ # 注意:此字段可能返回 null,表示取不到有效值。
252
+ # @type Entry: String
253
+ # @param InstType: 0:sdk 1:素材
254
+ # 注意:此字段可能返回 null,表示取不到有效值。
255
+ # @type InstType: Integer
256
+ # @param Key: license的秘钥
257
+ # 注意:此字段可能返回 null,表示取不到有效值。
258
+ # @type Key: String
259
+
260
+ attr_accessor :UIN, :AppId, :ResourceId, :ZoneId, :Status, :IsolatedTimestamp, :CreateTime, :PayMode, :Alias, :GoodsDetail, :RenewFlag, :ExpireTime, :Region, :SdkAppId, :AppName, :PackageName, :URL, :Entry, :InstType, :Key
261
+
262
+ def initialize(uin=nil, appid=nil, resourceid=nil, zoneid=nil, status=nil, isolatedtimestamp=nil, createtime=nil, paymode=nil, _alias=nil, goodsdetail=nil, renewflag=nil, expiretime=nil, region=nil, sdkappid=nil, appname=nil, packagename=nil, url=nil, entry=nil, insttype=nil, key=nil)
263
+ @UIN = uin
264
+ @AppId = appid
265
+ @ResourceId = resourceid
266
+ @ZoneId = zoneid
267
+ @Status = status
268
+ @IsolatedTimestamp = isolatedtimestamp
269
+ @CreateTime = createtime
270
+ @PayMode = paymode
271
+ @Alias = _alias
272
+ @GoodsDetail = goodsdetail
273
+ @RenewFlag = renewflag
274
+ @ExpireTime = expiretime
275
+ @Region = region
276
+ @SdkAppId = sdkappid
277
+ @AppName = appname
278
+ @PackageName = packagename
279
+ @URL = url
280
+ @Entry = entry
281
+ @InstType = insttype
282
+ @Key = key
283
+ end
284
+
285
+ def deserialize(params)
286
+ @UIN = params['UIN']
287
+ @AppId = params['AppId']
288
+ @ResourceId = params['ResourceId']
289
+ @ZoneId = params['ZoneId']
290
+ @Status = params['Status']
291
+ @IsolatedTimestamp = params['IsolatedTimestamp']
292
+ @CreateTime = params['CreateTime']
293
+ @PayMode = params['PayMode']
294
+ @Alias = params['Alias']
295
+ unless params['GoodsDetail'].nil?
296
+ @GoodsDetail = GoodsDetail.new
297
+ @GoodsDetail.deserialize(params['GoodsDetail'])
298
+ end
299
+ @RenewFlag = params['RenewFlag']
300
+ @ExpireTime = params['ExpireTime']
301
+ @Region = params['Region']
302
+ @SdkAppId = params['SdkAppId']
303
+ @AppName = params['AppName']
304
+ @PackageName = params['PackageName']
305
+ @URL = params['URL']
306
+ @Entry = params['Entry']
307
+ @InstType = params['InstType']
308
+ @Key = params['Key']
309
+ end
310
+ end
311
+
312
+ end
313
+ end
314
+ end
315
+
metadata ADDED
@@ -0,0 +1,66 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: tencentcloud-sdk-anicloud
3
+ version: !ruby/object:Gem::Version
4
+ version: 3.0.478
5
+ platform: ruby
6
+ authors:
7
+ - Tencent Cloud
8
+ autorequire:
9
+ bindir: bin
10
+ cert_chain: []
11
+ date: 2022-12-22 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: '3.0'
20
+ type: :runtime
21
+ prerelease: false
22
+ version_requirements: !ruby/object:Gem::Requirement
23
+ requirements:
24
+ - - ~>
25
+ - !ruby/object:Gem::Version
26
+ version: '3.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
+ ANICLOUD.
30
+ email:
31
+ - tencentcloudapi@tencent.com
32
+ executables: []
33
+ extensions: []
34
+ extra_rdoc_files: []
35
+ files:
36
+ - lib/v20220923/client.rb
37
+ - lib/v20220923/models.rb
38
+ - lib/tencentcloud-sdk-anicloud.rb
39
+ - lib/VERSION
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-anicloud
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.0.14
63
+ signing_key:
64
+ specification_version: 4
65
+ summary: Tencent Cloud SDK for Ruby - ANICLOUD
66
+ test_files: []