tencentcloud-sdk-mqtt 3.0.1012 → 3.0.1013
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 +4 -4
- data/lib/VERSION +1 -1
- data/lib/v20240516/client.rb +24 -0
- data/lib/v20240516/models.rb +56 -0
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 1993b168dd61441459b259367af6595fced25793
|
4
|
+
data.tar.gz: b9294249558d42caf01a91b57e4d7224fb2ac016
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: a674f37c87c2bf6a750ad7108026e1b9fa72700ede46cbebe1b2eb3fa2dca89c41baa0e53c4c52cc7fd954c5403a2d9e36c15d17d4cb70cb5e16683305fd204b
|
7
|
+
data.tar.gz: 6ec6b77afcc21adef3aa344f4bb706d400eded7d847146156a7c4987ecf875c91be3c2799f5787e7f6a3811e1867a2c6c42e8dadd25467904c3296e4ad1a06bd
|
data/lib/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
3.0.
|
1
|
+
3.0.1013
|
data/lib/v20240516/client.rb
CHANGED
@@ -1024,6 +1024,30 @@ module TencentCloud
|
|
1024
1024
|
raise TencentCloud::Common::TencentCloudSDKException.new(nil, e.inspect)
|
1025
1025
|
end
|
1026
1026
|
|
1027
|
+
# 发布 MQTT 消息到消息主题或客户端
|
1028
|
+
|
1029
|
+
# @param request: Request instance for PublishMessage.
|
1030
|
+
# @type request: :class:`Tencentcloud::mqtt::V20240516::PublishMessageRequest`
|
1031
|
+
# @rtype: :class:`Tencentcloud::mqtt::V20240516::PublishMessageResponse`
|
1032
|
+
def PublishMessage(request)
|
1033
|
+
body = send_request('PublishMessage', request.serialize)
|
1034
|
+
response = JSON.parse(body)
|
1035
|
+
if response['Response'].key?('Error') == false
|
1036
|
+
model = PublishMessageResponse.new
|
1037
|
+
model.deserialize(response['Response'])
|
1038
|
+
model
|
1039
|
+
else
|
1040
|
+
code = response['Response']['Error']['Code']
|
1041
|
+
message = response['Response']['Error']['Message']
|
1042
|
+
reqid = response['Response']['RequestId']
|
1043
|
+
raise TencentCloud::Common::TencentCloudSDKException.new(code, message, reqid)
|
1044
|
+
end
|
1045
|
+
rescue TencentCloud::Common::TencentCloudSDKException => e
|
1046
|
+
raise e
|
1047
|
+
rescue StandardError => e
|
1048
|
+
raise TencentCloud::Common::TencentCloudSDKException.new(nil, e.inspect)
|
1049
|
+
end
|
1050
|
+
|
1027
1051
|
# 注册ca证书
|
1028
1052
|
|
1029
1053
|
# @param request: Request instance for RegisterCaCertificate.
|
data/lib/v20240516/models.rb
CHANGED
@@ -2940,6 +2940,62 @@ module TencentCloud
|
|
2940
2940
|
end
|
2941
2941
|
end
|
2942
2942
|
|
2943
|
+
# PublishMessage请求参数结构体
|
2944
|
+
class PublishMessageRequest < TencentCloud::Common::AbstractModel
|
2945
|
+
# @param InstanceId: 实例ID
|
2946
|
+
# @type InstanceId: String
|
2947
|
+
# @param Payload: 消息 payload,需要按 encoding 指定的编码方式进行编码
|
2948
|
+
# @type Payload: String
|
2949
|
+
# @param TargetTopic: 消息目的主题,该参数与 TargetClientId 二选一
|
2950
|
+
# @type TargetTopic: String
|
2951
|
+
# @param TargetClientId: 消息目的客户端 ID,该参数与 TargetTopic 二选一
|
2952
|
+
# @type TargetClientId: String
|
2953
|
+
# @param Encoding: 消息 payload 编码,可选 plain 或 base64,默认为 plain(即不编码)
|
2954
|
+
# @type Encoding: String
|
2955
|
+
# @param Qos: 消息的服务质量等级,默认为 1
|
2956
|
+
# @type Qos: Integer
|
2957
|
+
# @param Retain: 是否为保留消息,默认为 false,且仅支持发布到主题的消息设置为 true
|
2958
|
+
# @type Retain: Boolean
|
2959
|
+
|
2960
|
+
attr_accessor :InstanceId, :Payload, :TargetTopic, :TargetClientId, :Encoding, :Qos, :Retain
|
2961
|
+
|
2962
|
+
def initialize(instanceid=nil, payload=nil, targettopic=nil, targetclientid=nil, encoding=nil, qos=nil, retain=nil)
|
2963
|
+
@InstanceId = instanceid
|
2964
|
+
@Payload = payload
|
2965
|
+
@TargetTopic = targettopic
|
2966
|
+
@TargetClientId = targetclientid
|
2967
|
+
@Encoding = encoding
|
2968
|
+
@Qos = qos
|
2969
|
+
@Retain = retain
|
2970
|
+
end
|
2971
|
+
|
2972
|
+
def deserialize(params)
|
2973
|
+
@InstanceId = params['InstanceId']
|
2974
|
+
@Payload = params['Payload']
|
2975
|
+
@TargetTopic = params['TargetTopic']
|
2976
|
+
@TargetClientId = params['TargetClientId']
|
2977
|
+
@Encoding = params['Encoding']
|
2978
|
+
@Qos = params['Qos']
|
2979
|
+
@Retain = params['Retain']
|
2980
|
+
end
|
2981
|
+
end
|
2982
|
+
|
2983
|
+
# PublishMessage返回参数结构体
|
2984
|
+
class PublishMessageResponse < TencentCloud::Common::AbstractModel
|
2985
|
+
# @param RequestId: 唯一请求 ID,由服务端生成,每次请求都会返回(若请求因其他原因未能抵达服务端,则该次请求不会获得 RequestId)。定位问题时需要提供该次请求的 RequestId。
|
2986
|
+
# @type RequestId: String
|
2987
|
+
|
2988
|
+
attr_accessor :RequestId
|
2989
|
+
|
2990
|
+
def initialize(requestid=nil)
|
2991
|
+
@RequestId = requestid
|
2992
|
+
end
|
2993
|
+
|
2994
|
+
def deserialize(params)
|
2995
|
+
@RequestId = params['RequestId']
|
2996
|
+
end
|
2997
|
+
end
|
2998
|
+
|
2943
2999
|
# RegisterCaCertificate请求参数结构体
|
2944
3000
|
class RegisterCaCertificateRequest < TencentCloud::Common::AbstractModel
|
2945
3001
|
# @param InstanceId: 集群id
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: tencentcloud-sdk-mqtt
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 3.0.
|
4
|
+
version: 3.0.1013
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Tencent Cloud
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2025-03-
|
11
|
+
date: 2025-03-07 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: tencentcloud-sdk-common
|