tencentcloud-sdk-mna 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: 48764aae1329920cfaa9e37c257bd815ecbc957a
4
+ data.tar.gz: c7da98e7499602376853fbf8f54dedbfa4e7b47b
5
+ SHA512:
6
+ metadata.gz: 6768bcc892b02b863de460f32a575f9fc910d7b376c9f3877cdbc8c659dc4bf1eab92344ef1324fd2db989c378f4a87180210fc81688d7c00f26083bf1ab5c80
7
+ data.tar.gz: 393ead950f59152471668c32afac573324fd473aa4cfc3fd856390248f26d70c8f8cd08ecbced04c7366ca44e89ce3594a3ae80fde32a26e2f4d9d5f0dc0cc19
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 'v20210119/client'
6
+ require_relative 'v20210119/models'
7
+
8
+ module TencentCloud
9
+ module Mna
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 Mna
21
+ module V20210119
22
+ class Client < TencentCloud::Common::AbstractClient
23
+
24
+ def initialize(credential, region, profile = nil)
25
+ api_version = '2021-01-19'
26
+ api_endpoint = 'mna.tencentcloudapi.com'
27
+ sdk_version = 'MNA_' + File.read(File.expand_path('../VERSION', __dir__)).strip
28
+ super(credential, region, api_version, api_endpoint, sdk_version, profile)
29
+ end
30
+
31
+
32
+ # 移动网络发起Qos加速过程
33
+
34
+ # @param request: Request instance for CreateQos.
35
+ # @type request: :class:`Tencentcloud::mna::V20210119::CreateQosRequest`
36
+ # @rtype: :class:`Tencentcloud::mna::V20210119::CreateQosResponse`
37
+ def CreateQos(request)
38
+ body = send_request('CreateQos', request.serialize)
39
+ response = JSON.parse(body)
40
+ if response['Response'].key?('Error') == false
41
+ model = CreateQosResponse.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
+ # 移动网络停止Qos加速过程
57
+
58
+ # @param request: Request instance for DeleteQos.
59
+ # @type request: :class:`Tencentcloud::mna::V20210119::DeleteQosRequest`
60
+ # @rtype: :class:`Tencentcloud::mna::V20210119::DeleteQosResponse`
61
+ def DeleteQos(request)
62
+ body = send_request('DeleteQos', request.serialize)
63
+ response = JSON.parse(body)
64
+ if response['Response'].key?('Error') == false
65
+ model = DeleteQosResponse.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
+ # 获取Qos加速状态
81
+
82
+ # @param request: Request instance for DescribeQos.
83
+ # @type request: :class:`Tencentcloud::mna::V20210119::DescribeQosRequest`
84
+ # @rtype: :class:`Tencentcloud::mna::V20210119::DescribeQosResponse`
85
+ def DescribeQos(request)
86
+ body = send_request('DescribeQos', request.serialize)
87
+ response = JSON.parse(body)
88
+ if response['Response'].key?('Error') == false
89
+ model = DescribeQosResponse.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,318 @@
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 Mna
19
+ module V20210119
20
+ # 接口能力扩展,用于填充电信的加速Token,并为未来参数提供兼容空间
21
+ class Capacity < TencentCloud::Common::AbstractModel
22
+ # @param CTCCToken: 电信鉴权的Token。要加速的电信手机终端访问 http://qos.189.cn/qos-api/getToken?appid=TencentCloud 页面,获取返回结果中result的值
23
+ # @type CTCCToken: String
24
+ # @param Province: 终端所处在的省份,建议不填写由服务端自动获取,若需填写请填写带有省、市、自治区、特别行政区等后缀的省份中文全称
25
+ # @type Province: String
26
+
27
+ attr_accessor :CTCCToken, :Province
28
+
29
+ def initialize(ctcctoken=nil, province=nil)
30
+ @CTCCToken = ctcctoken
31
+ @Province = province
32
+ end
33
+
34
+ def deserialize(params)
35
+ @CTCCToken = params['CTCCToken']
36
+ @Province = params['Province']
37
+ end
38
+ end
39
+
40
+ # CreateQos请求参数结构体
41
+ class CreateQosRequest < TencentCloud::Common::AbstractModel
42
+ # @param SrcAddressInfo: 加速业务源地址信息,SrcIpv6和(SrcIpv4+SrcPublicIpv4)二选一,目前Ipv6不可用,全部填写以Ipv4参数为准。
43
+ # @type SrcAddressInfo: :class:`Tencentcloud::Mna.v20210119.models.SrcAddressInfo`
44
+ # @param DestAddressInfo: 加速业务目标地址信息
45
+ # @type DestAddressInfo: :class:`Tencentcloud::Mna.v20210119.models.DestAddressInfo`
46
+ # @param QosMenu: 加速套餐
47
+ # T100K:时延性保障 + 带宽保障上下行保障 100kbps
48
+ # T200K:时延性保障 + 带宽保障上下行保障 200kbps
49
+ # T400K:时延性保障 + 带宽保障上下行保障 400kbps
50
+ # BD1M:带宽型保障 + 下行带宽保障1Mbps
51
+ # BD2M:带宽型保障 + 下行带宽保障2Mbps
52
+ # BD4M:带宽型保障 + 下行带宽保障4Mbps
53
+ # BU1M:带宽型保障 + 上行带宽保障1Mbps
54
+ # BU2M:带宽型保障 + 上行带宽保障2Mbps
55
+ # BU4M:带宽型保障 + 上行带宽保障4Mbps
56
+ # @type QosMenu: String
57
+ # @param DeviceInfo: 申请加速的设备信息,包括运营商,操作系统,设备唯一标识等。
58
+ # @type DeviceInfo: :class:`Tencentcloud::Mna.v20210119.models.DeviceInfo`
59
+ # @param Duration: 期望加速时长(单位分钟),默认值30分钟
60
+ # @type Duration: Integer
61
+ # @param Capacity: 接口能力扩展,如果是电信用户,必须填充CTCC Token字段
62
+ # @type Capacity: :class:`Tencentcloud::Mna.v20210119.models.Capacity`
63
+ # @param TemplateId: 应用模板ID
64
+ # @type TemplateId: String
65
+ # @param Protocol: 针对特殊协议进行加速
66
+ # 1. IP (默认值)
67
+ # 2. UDP
68
+ # 3. TCP
69
+ # @type Protocol: Integer
70
+
71
+ attr_accessor :SrcAddressInfo, :DestAddressInfo, :QosMenu, :DeviceInfo, :Duration, :Capacity, :TemplateId, :Protocol
72
+
73
+ def initialize(srcaddressinfo=nil, destaddressinfo=nil, qosmenu=nil, deviceinfo=nil, duration=nil, capacity=nil, templateid=nil, protocol=nil)
74
+ @SrcAddressInfo = srcaddressinfo
75
+ @DestAddressInfo = destaddressinfo
76
+ @QosMenu = qosmenu
77
+ @DeviceInfo = deviceinfo
78
+ @Duration = duration
79
+ @Capacity = capacity
80
+ @TemplateId = templateid
81
+ @Protocol = protocol
82
+ end
83
+
84
+ def deserialize(params)
85
+ unless params['SrcAddressInfo'].nil?
86
+ @SrcAddressInfo = SrcAddressInfo.new
87
+ @SrcAddressInfo.deserialize(params['SrcAddressInfo'])
88
+ end
89
+ unless params['DestAddressInfo'].nil?
90
+ @DestAddressInfo = DestAddressInfo.new
91
+ @DestAddressInfo.deserialize(params['DestAddressInfo'])
92
+ end
93
+ @QosMenu = params['QosMenu']
94
+ unless params['DeviceInfo'].nil?
95
+ @DeviceInfo = DeviceInfo.new
96
+ @DeviceInfo.deserialize(params['DeviceInfo'])
97
+ end
98
+ @Duration = params['Duration']
99
+ unless params['Capacity'].nil?
100
+ @Capacity = Capacity.new
101
+ @Capacity.deserialize(params['Capacity'])
102
+ end
103
+ @TemplateId = params['TemplateId']
104
+ @Protocol = params['Protocol']
105
+ end
106
+ end
107
+
108
+ # CreateQos返回参数结构体
109
+ class CreateQosResponse < TencentCloud::Common::AbstractModel
110
+ # @param SessionId: 单次加速唯一 Id
111
+ # @type SessionId: String
112
+ # @param Duration: 当前加速剩余时长(单位秒)
113
+ # @type Duration: Integer
114
+ # @param RequestId: 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。
115
+ # @type RequestId: String
116
+
117
+ attr_accessor :SessionId, :Duration, :RequestId
118
+
119
+ def initialize(sessionid=nil, duration=nil, requestid=nil)
120
+ @SessionId = sessionid
121
+ @Duration = duration
122
+ @RequestId = requestid
123
+ end
124
+
125
+ def deserialize(params)
126
+ @SessionId = params['SessionId']
127
+ @Duration = params['Duration']
128
+ @RequestId = params['RequestId']
129
+ end
130
+ end
131
+
132
+ # DeleteQos请求参数结构体
133
+ class DeleteQosRequest < TencentCloud::Common::AbstractModel
134
+ # @param SessionId: 单次加速唯一 Id
135
+ # @type SessionId: String
136
+
137
+ attr_accessor :SessionId
138
+
139
+ def initialize(sessionid=nil)
140
+ @SessionId = sessionid
141
+ end
142
+
143
+ def deserialize(params)
144
+ @SessionId = params['SessionId']
145
+ end
146
+ end
147
+
148
+ # DeleteQos返回参数结构体
149
+ class DeleteQosResponse < TencentCloud::Common::AbstractModel
150
+ # @param SessionId: 单次加速唯一 Id
151
+ # @type SessionId: String
152
+ # @param Duration: 本次加速会话持续时间(单位秒)
153
+ # @type Duration: Integer
154
+ # @param RequestId: 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。
155
+ # @type RequestId: String
156
+
157
+ attr_accessor :SessionId, :Duration, :RequestId
158
+
159
+ def initialize(sessionid=nil, duration=nil, requestid=nil)
160
+ @SessionId = sessionid
161
+ @Duration = duration
162
+ @RequestId = requestid
163
+ end
164
+
165
+ def deserialize(params)
166
+ @SessionId = params['SessionId']
167
+ @Duration = params['Duration']
168
+ @RequestId = params['RequestId']
169
+ end
170
+ end
171
+
172
+ # DescribeQos请求参数结构体
173
+ class DescribeQosRequest < TencentCloud::Common::AbstractModel
174
+ # @param SessionId: 单次加速唯一 Id
175
+ # @type SessionId: String
176
+
177
+ attr_accessor :SessionId
178
+
179
+ def initialize(sessionid=nil)
180
+ @SessionId = sessionid
181
+ end
182
+
183
+ def deserialize(params)
184
+ @SessionId = params['SessionId']
185
+ end
186
+ end
187
+
188
+ # DescribeQos返回参数结构体
189
+ class DescribeQosResponse < TencentCloud::Common::AbstractModel
190
+ # @param Status: 0:无匹配的加速中会话
191
+ # 1:存在匹配的加速中会话
192
+ # @type Status: Integer
193
+ # @param SrcPublicIpv4: 手机公网出口IP,仅匹配时返回
194
+ # 注意:此字段可能返回 null,表示取不到有效值。
195
+ # @type SrcPublicIpv4: String
196
+ # @param DestIpv4: 业务访问目的IP,仅匹配时返回
197
+ # 注意:此字段可能返回 null,表示取不到有效值。
198
+ # @type DestIpv4: Array
199
+ # @param Duration: 当前加速剩余时长(单位秒)有,仅匹配时返回
200
+ # 注意:此字段可能返回 null,表示取不到有效值。
201
+ # @type Duration: Integer
202
+ # @param QosMenu: 加速套餐类型,仅匹配时返回
203
+ # 注意:此字段可能返回 null,表示取不到有效值。
204
+ # @type QosMenu: String
205
+ # @param RequestId: 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。
206
+ # @type RequestId: String
207
+
208
+ attr_accessor :Status, :SrcPublicIpv4, :DestIpv4, :Duration, :QosMenu, :RequestId
209
+
210
+ def initialize(status=nil, srcpublicipv4=nil, destipv4=nil, duration=nil, qosmenu=nil, requestid=nil)
211
+ @Status = status
212
+ @SrcPublicIpv4 = srcpublicipv4
213
+ @DestIpv4 = destipv4
214
+ @Duration = duration
215
+ @QosMenu = qosmenu
216
+ @RequestId = requestid
217
+ end
218
+
219
+ def deserialize(params)
220
+ @Status = params['Status']
221
+ @SrcPublicIpv4 = params['SrcPublicIpv4']
222
+ @DestIpv4 = params['DestIpv4']
223
+ @Duration = params['Duration']
224
+ @QosMenu = params['QosMenu']
225
+ @RequestId = params['RequestId']
226
+ end
227
+ end
228
+
229
+ # 移动网络加速目标地址结构体
230
+ class DestAddressInfo < TencentCloud::Common::AbstractModel
231
+ # @param DestIp: 加速业务目标 ip 地址数组
232
+ # @type DestIp: Array
233
+
234
+ attr_accessor :DestIp
235
+
236
+ def initialize(destip=nil)
237
+ @DestIp = destip
238
+ end
239
+
240
+ def deserialize(params)
241
+ @DestIp = params['DestIp']
242
+ end
243
+ end
244
+
245
+ # 设备信息结构体
246
+ class DeviceInfo < TencentCloud::Common::AbstractModel
247
+ # @param Vendor: 运营商
248
+ # 1:移动
249
+ # 2:电信
250
+ # 3:联通
251
+ # 4:广电
252
+ # 99:其他
253
+ # @type Vendor: Integer
254
+ # @param OS: 设备操作系统:
255
+ # 1:Android
256
+ # 2: IOS
257
+ # 99:其他
258
+ # @type OS: Integer
259
+ # @param DeviceId: 设备唯一标识
260
+ # IOS 填写 IDFV
261
+ # Android 填写 IMEI
262
+ # @type DeviceId: String
263
+ # @param PhoneNum: 用户手机号码
264
+ # @type PhoneNum: String
265
+ # @param Wireless: 无线信息
266
+ # 1:4G
267
+ # 2:5G
268
+ # 3:WIFI
269
+ # 99:其他
270
+ # @type Wireless: Integer
271
+
272
+ attr_accessor :Vendor, :OS, :DeviceId, :PhoneNum, :Wireless
273
+
274
+ def initialize(vendor=nil, os=nil, deviceid=nil, phonenum=nil, wireless=nil)
275
+ @Vendor = vendor
276
+ @OS = os
277
+ @DeviceId = deviceid
278
+ @PhoneNum = phonenum
279
+ @Wireless = wireless
280
+ end
281
+
282
+ def deserialize(params)
283
+ @Vendor = params['Vendor']
284
+ @OS = params['OS']
285
+ @DeviceId = params['DeviceId']
286
+ @PhoneNum = params['PhoneNum']
287
+ @Wireless = params['Wireless']
288
+ end
289
+ end
290
+
291
+ # 移动网络加速源地址结构体
292
+ class SrcAddressInfo < TencentCloud::Common::AbstractModel
293
+ # @param SrcIpv4: 用户私网 ipv4 地址
294
+ # @type SrcIpv4: String
295
+ # @param SrcPublicIpv4: 用户公网 ipv4 地址
296
+ # @type SrcPublicIpv4: String
297
+ # @param SrcIpv6: 用户 ipv6 地址
298
+ # @type SrcIpv6: String
299
+
300
+ attr_accessor :SrcIpv4, :SrcPublicIpv4, :SrcIpv6
301
+
302
+ def initialize(srcipv4=nil, srcpublicipv4=nil, srcipv6=nil)
303
+ @SrcIpv4 = srcipv4
304
+ @SrcPublicIpv4 = srcpublicipv4
305
+ @SrcIpv6 = srcipv6
306
+ end
307
+
308
+ def deserialize(params)
309
+ @SrcIpv4 = params['SrcIpv4']
310
+ @SrcPublicIpv4 = params['SrcPublicIpv4']
311
+ @SrcIpv6 = params['SrcIpv6']
312
+ end
313
+ end
314
+
315
+ end
316
+ end
317
+ end
318
+
metadata ADDED
@@ -0,0 +1,66 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: tencentcloud-sdk-mna
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
+ MNA.
30
+ email:
31
+ - tencentcloudapi@tencent.com
32
+ executables: []
33
+ extensions: []
34
+ extra_rdoc_files: []
35
+ files:
36
+ - lib/VERSION
37
+ - lib/tencentcloud-sdk-mna.rb
38
+ - lib/v20210119/client.rb
39
+ - lib/v20210119/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-mna
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 - MNA
66
+ test_files: []