tencentcloud-sdk-dtf 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: 0ba461114f296b97f5216d945f4749d5c796ae08
4
+ data.tar.gz: cdce6e06ec9ac08f3e45d07dafc38c362b0d9dbf
5
+ SHA512:
6
+ metadata.gz: 5aabf77a8d3b2c4c1789d7a76487e591f4521c2b16772cb86b77848ed7f42f21b5656e0c9659c863ef25898ad324491876b9f489cea9ac6d02abe3b2077eb066
7
+ data.tar.gz: 3368da3115293f70c70039fe2cdb7253a163a8aa3ea9ba3e91a21bf01f88e06ae055700098ba44452de837fece91d27a535e55443721fc0390255e4e48990c21
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 'v20200506/client'
6
+ require_relative 'v20200506/models'
7
+
8
+ module TencentCloud
9
+ module Dtf
10
+ end
11
+ end
@@ -0,0 +1,60 @@
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 Dtf
21
+ module V20200506
22
+ class Client < TencentCloud::Common::AbstractClient
23
+
24
+ def initialize(credential, region, profile = nil)
25
+ api_version = '2020-05-06'
26
+ api_endpoint = 'dtf.tencentcloudapi.com'
27
+ sdk_version = 'DTF_' + 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 DescribeTransactions.
35
+ # @type request: :class:`Tencentcloud::dtf::V20200506::DescribeTransactionsRequest`
36
+ # @rtype: :class:`Tencentcloud::dtf::V20200506::DescribeTransactionsResponse`
37
+ def DescribeTransactions(request)
38
+ body = send_request('DescribeTransactions', request.serialize)
39
+ response = JSON.parse(body)
40
+ if response['Response'].key?('Error') == false
41
+ model = DescribeTransactionsResponse.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
+ end
58
+ end
59
+ end
60
+ end
@@ -0,0 +1,205 @@
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 Dtf
19
+ module V20200506
20
+ # DescribeTransactions请求参数结构体
21
+ class DescribeTransactionsRequest < TencentCloud::Common::AbstractModel
22
+ # @param GroupId: 事务分组ID
23
+ # @type GroupId: String
24
+ # @param TransactionBeginFrom: 事务开始时间查询起始时间戳,UTC,精确到毫秒
25
+ # @type TransactionBeginFrom: Integer
26
+ # @param TransactionBeginTo: 事务开始时间查询截止时间戳,UTC,精确到毫秒
27
+ # @type TransactionBeginTo: Integer
28
+ # @param SearchError: 仅查询异常状态的事务,true:仅查询异常,false或不传入:查询所有
29
+ # @type SearchError: Boolean
30
+ # @param TransactionId: 主事务ID,不传入时查询全量,高优先级
31
+ # @type TransactionId: Integer
32
+ # @param TransactionIdList: 主事务ID列表,不传入时查询全量,低优先级
33
+ # @type TransactionIdList: Array
34
+ # @param Limit: 每页数量
35
+ # @type Limit: Integer
36
+ # @param Offset: 起始偏移量
37
+ # @type Offset: Integer
38
+
39
+ attr_accessor :GroupId, :TransactionBeginFrom, :TransactionBeginTo, :SearchError, :TransactionId, :TransactionIdList, :Limit, :Offset
40
+
41
+ def initialize(groupid=nil, transactionbeginfrom=nil, transactionbeginto=nil, searcherror=nil, transactionid=nil, transactionidlist=nil, limit=nil, offset=nil)
42
+ @GroupId = groupid
43
+ @TransactionBeginFrom = transactionbeginfrom
44
+ @TransactionBeginTo = transactionbeginto
45
+ @SearchError = searcherror
46
+ @TransactionId = transactionid
47
+ @TransactionIdList = transactionidlist
48
+ @Limit = limit
49
+ @Offset = offset
50
+ end
51
+
52
+ def deserialize(params)
53
+ @GroupId = params['GroupId']
54
+ @TransactionBeginFrom = params['TransactionBeginFrom']
55
+ @TransactionBeginTo = params['TransactionBeginTo']
56
+ @SearchError = params['SearchError']
57
+ @TransactionId = params['TransactionId']
58
+ @TransactionIdList = params['TransactionIdList']
59
+ @Limit = params['Limit']
60
+ @Offset = params['Offset']
61
+ end
62
+ end
63
+
64
+ # DescribeTransactions返回参数结构体
65
+ class DescribeTransactionsResponse < TencentCloud::Common::AbstractModel
66
+ # @param Result: 主事务分页列表
67
+ # @type Result: :class:`Tencentcloud::Dtf.v20200506.models.PagedTransaction`
68
+ # @param RequestId: 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。
69
+ # @type RequestId: String
70
+
71
+ attr_accessor :Result, :RequestId
72
+
73
+ def initialize(result=nil, requestid=nil)
74
+ @Result = result
75
+ @RequestId = requestid
76
+ end
77
+
78
+ def deserialize(params)
79
+ unless params['Result'].nil?
80
+ @Result = PagedTransaction.new
81
+ @Result.deserialize(params['Result'])
82
+ end
83
+ @RequestId = params['RequestId']
84
+ end
85
+ end
86
+
87
+ # 分页主事务
88
+ class PagedTransaction < TencentCloud::Common::AbstractModel
89
+ # @param TotalCount: 总条数,特定在该接口中总是会返回null
90
+ # 注意:此字段可能返回 null,表示取不到有效值。
91
+ # @type TotalCount: Integer
92
+ # @param Content: 主事务分组列表
93
+ # @type Content: Array
94
+
95
+ attr_accessor :TotalCount, :Content
96
+
97
+ def initialize(totalcount=nil, content=nil)
98
+ @TotalCount = totalcount
99
+ @Content = content
100
+ end
101
+
102
+ def deserialize(params)
103
+ @TotalCount = params['TotalCount']
104
+ unless params['Content'].nil?
105
+ @Content = []
106
+ params['Content'].each do |i|
107
+ transaction_tmp = Transaction.new
108
+ transaction_tmp.deserialize(i)
109
+ @Content << transaction_tmp
110
+ end
111
+ end
112
+ end
113
+ end
114
+
115
+ # 主事务
116
+ class Transaction < TencentCloud::Common::AbstractModel
117
+ # @param TransactionId: 主事务ID
118
+ # 注意:此字段可能返回 null,表示取不到有效值。
119
+ # @type TransactionId: Integer
120
+ # @param TransactionBegin: 主事务开始时间戳,UTC,精确到毫秒
121
+ # 注意:此字段可能返回 null,表示取不到有效值。
122
+ # @type TransactionBegin: Integer
123
+ # @param TransactionEnd: 主事务结束时间戳,UTC,精确到毫秒
124
+ # 注意:此字段可能返回 null,表示取不到有效值。
125
+ # @type TransactionEnd: Integer
126
+ # @param TransactionCommit: 主事务提交时间戳,UTC,精确到毫秒
127
+ # 注意:此字段可能返回 null,表示取不到有效值。
128
+ # @type TransactionCommit: Integer
129
+ # @param TransactionRollback: 主事务回滚时间戳,UTC,精确到毫秒
130
+ # 注意:此字段可能返回 null,表示取不到有效值。
131
+ # @type TransactionRollback: Integer
132
+ # @param TransactionError: 主事务异常停止时间戳,UTC,精确到毫秒
133
+ # 注意:此字段可能返回 null,表示取不到有效值。
134
+ # @type TransactionError: Integer
135
+ # @param Timeout: 主事务超时时长,单位毫秒
136
+ # 注意:此字段可能返回 null,表示取不到有效值。
137
+ # @type Timeout: Integer
138
+ # @param Status: 主事务状态:0:Trying, 1:Confirming, 2: Confirmed, 3:Canceling, 4: Canceled
139
+ # 注意:此字段可能返回 null,表示取不到有效值。
140
+ # @type Status: Integer
141
+ # @param EndFlag: 主事务结束标识:0:运行中, 1: 已结束
142
+ # 注意:此字段可能返回 null,表示取不到有效值。
143
+ # @type EndFlag: Integer
144
+ # @param TimeoutFlag: 主事务超时标识:0:运行中, 1: 已超时
145
+ # 注意:此字段可能返回 null,表示取不到有效值。
146
+ # @type TimeoutFlag: Integer
147
+ # @param Comment: 异常信息
148
+ # 注意:此字段可能返回 null,表示取不到有效值。
149
+ # @type Comment: String
150
+ # @param GroupId: 事务分组ID
151
+ # 注意:此字段可能返回 null,表示取不到有效值。
152
+ # @type GroupId: String
153
+ # @param Server: 主事务来源服务标识
154
+ # 注意:此字段可能返回 null,表示取不到有效值。
155
+ # @type Server: String
156
+ # @param BranchQuantity: 分支事务数量
157
+ # 注意:此字段可能返回 null,表示取不到有效值。
158
+ # @type BranchQuantity: Integer
159
+ # @param RetryFlag: 重试标识:true:可以重试;false:不可重试
160
+ # 注意:此字段可能返回 null,表示取不到有效值。
161
+ # @type RetryFlag: Boolean
162
+
163
+ attr_accessor :TransactionId, :TransactionBegin, :TransactionEnd, :TransactionCommit, :TransactionRollback, :TransactionError, :Timeout, :Status, :EndFlag, :TimeoutFlag, :Comment, :GroupId, :Server, :BranchQuantity, :RetryFlag
164
+
165
+ def initialize(transactionid=nil, transactionbegin=nil, transactionend=nil, transactioncommit=nil, transactionrollback=nil, transactionerror=nil, timeout=nil, status=nil, endflag=nil, timeoutflag=nil, comment=nil, groupid=nil, server=nil, branchquantity=nil, retryflag=nil)
166
+ @TransactionId = transactionid
167
+ @TransactionBegin = transactionbegin
168
+ @TransactionEnd = transactionend
169
+ @TransactionCommit = transactioncommit
170
+ @TransactionRollback = transactionrollback
171
+ @TransactionError = transactionerror
172
+ @Timeout = timeout
173
+ @Status = status
174
+ @EndFlag = endflag
175
+ @TimeoutFlag = timeoutflag
176
+ @Comment = comment
177
+ @GroupId = groupid
178
+ @Server = server
179
+ @BranchQuantity = branchquantity
180
+ @RetryFlag = retryflag
181
+ end
182
+
183
+ def deserialize(params)
184
+ @TransactionId = params['TransactionId']
185
+ @TransactionBegin = params['TransactionBegin']
186
+ @TransactionEnd = params['TransactionEnd']
187
+ @TransactionCommit = params['TransactionCommit']
188
+ @TransactionRollback = params['TransactionRollback']
189
+ @TransactionError = params['TransactionError']
190
+ @Timeout = params['Timeout']
191
+ @Status = params['Status']
192
+ @EndFlag = params['EndFlag']
193
+ @TimeoutFlag = params['TimeoutFlag']
194
+ @Comment = params['Comment']
195
+ @GroupId = params['GroupId']
196
+ @Server = params['Server']
197
+ @BranchQuantity = params['BranchQuantity']
198
+ @RetryFlag = params['RetryFlag']
199
+ end
200
+ end
201
+
202
+ end
203
+ end
204
+ end
205
+
metadata ADDED
@@ -0,0 +1,66 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: tencentcloud-sdk-dtf
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
+ DTF.
30
+ email:
31
+ - tencentcloudapi@tencent.com
32
+ executables: []
33
+ extensions: []
34
+ extra_rdoc_files: []
35
+ files:
36
+ - lib/VERSION
37
+ - lib/tencentcloud-sdk-dtf.rb
38
+ - lib/v20200506/client.rb
39
+ - lib/v20200506/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-dtf
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 - DTF
66
+ test_files: []