tencentcloud-sdk-python-mqtt 3.0.1333__tar.gz → 3.0.1334__tar.gz
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.
- {tencentcloud-sdk-python-mqtt-3.0.1333 → tencentcloud-sdk-python-mqtt-3.0.1334}/PKG-INFO +1 -1
- {tencentcloud-sdk-python-mqtt-3.0.1333 → tencentcloud-sdk-python-mqtt-3.0.1334}/setup.py +1 -1
- {tencentcloud-sdk-python-mqtt-3.0.1333 → tencentcloud-sdk-python-mqtt-3.0.1334}/tencentcloud/__init__.py +1 -1
- {tencentcloud-sdk-python-mqtt-3.0.1333 → tencentcloud-sdk-python-mqtt-3.0.1334}/tencentcloud/mqtt/v20240516/models.py +154 -0
- {tencentcloud-sdk-python-mqtt-3.0.1333 → tencentcloud-sdk-python-mqtt-3.0.1334}/tencentcloud/mqtt/v20240516/mqtt_client.py +23 -0
- {tencentcloud-sdk-python-mqtt-3.0.1333 → tencentcloud-sdk-python-mqtt-3.0.1334}/tencentcloud_sdk_python_mqtt.egg-info/PKG-INFO +1 -1
- tencentcloud-sdk-python-mqtt-3.0.1334/tencentcloud_sdk_python_mqtt.egg-info/requires.txt +1 -0
- tencentcloud-sdk-python-mqtt-3.0.1333/tencentcloud_sdk_python_mqtt.egg-info/requires.txt +0 -1
- {tencentcloud-sdk-python-mqtt-3.0.1333 → tencentcloud-sdk-python-mqtt-3.0.1334}/README.rst +0 -0
- {tencentcloud-sdk-python-mqtt-3.0.1333 → tencentcloud-sdk-python-mqtt-3.0.1334}/setup.cfg +0 -0
- {tencentcloud-sdk-python-mqtt-3.0.1333 → tencentcloud-sdk-python-mqtt-3.0.1334}/tencentcloud/mqtt/__init__.py +0 -0
- {tencentcloud-sdk-python-mqtt-3.0.1333 → tencentcloud-sdk-python-mqtt-3.0.1334}/tencentcloud/mqtt/v20240516/__init__.py +0 -0
- {tencentcloud-sdk-python-mqtt-3.0.1333 → tencentcloud-sdk-python-mqtt-3.0.1334}/tencentcloud/mqtt/v20240516/errorcodes.py +0 -0
- {tencentcloud-sdk-python-mqtt-3.0.1333 → tencentcloud-sdk-python-mqtt-3.0.1334}/tencentcloud_sdk_python_mqtt.egg-info/SOURCES.txt +0 -0
- {tencentcloud-sdk-python-mqtt-3.0.1333 → tencentcloud-sdk-python-mqtt-3.0.1334}/tencentcloud_sdk_python_mqtt.egg-info/dependency_links.txt +0 -0
- {tencentcloud-sdk-python-mqtt-3.0.1333 → tencentcloud-sdk-python-mqtt-3.0.1334}/tencentcloud_sdk_python_mqtt.egg-info/top_level.txt +0 -0
|
@@ -8,7 +8,7 @@ ROOT = os.path.dirname(__file__)
|
|
|
8
8
|
|
|
9
9
|
setup(
|
|
10
10
|
name='tencentcloud-sdk-python-mqtt',
|
|
11
|
-
install_requires=["tencentcloud-sdk-python-common==3.0.
|
|
11
|
+
install_requires=["tencentcloud-sdk-python-common==3.0.1334"],
|
|
12
12
|
version=tencentcloud.__version__,
|
|
13
13
|
description='Tencent Cloud Mqtt SDK for Python',
|
|
14
14
|
long_description=open('README.rst').read(),
|
|
@@ -7657,6 +7657,160 @@ class PublicAccessRule(AbstractModel):
|
|
|
7657
7657
|
|
|
7658
7658
|
|
|
7659
7659
|
|
|
7660
|
+
class PublishMessageRequest(AbstractModel):
|
|
7661
|
+
"""PublishMessage请求参数结构体
|
|
7662
|
+
|
|
7663
|
+
"""
|
|
7664
|
+
|
|
7665
|
+
def __init__(self):
|
|
7666
|
+
r"""
|
|
7667
|
+
:param _InstanceId: 实例ID
|
|
7668
|
+
:type InstanceId: str
|
|
7669
|
+
:param _Payload: 消息 payload,需要按 encoding 指定的编码方式进行编码
|
|
7670
|
+
:type Payload: str
|
|
7671
|
+
:param _TargetTopic: 消息目的主题,该参数与 TargetClientId 二选一
|
|
7672
|
+
:type TargetTopic: str
|
|
7673
|
+
:param _TargetClientId: 消息目的客户端 ID,该参数与 TargetTopic 二选一
|
|
7674
|
+
:type TargetClientId: str
|
|
7675
|
+
:param _Encoding: 消息 payload 编码,可选 plain 或 base64,默认为 plain(即不编码)
|
|
7676
|
+
:type Encoding: str
|
|
7677
|
+
:param _Qos: 消息的服务质量等级,默认为 1
|
|
7678
|
+
:type Qos: int
|
|
7679
|
+
:param _Retain: 是否为保留消息,默认为 false,且仅支持发布到主题的消息设置为 true
|
|
7680
|
+
:type Retain: bool
|
|
7681
|
+
"""
|
|
7682
|
+
self._InstanceId = None
|
|
7683
|
+
self._Payload = None
|
|
7684
|
+
self._TargetTopic = None
|
|
7685
|
+
self._TargetClientId = None
|
|
7686
|
+
self._Encoding = None
|
|
7687
|
+
self._Qos = None
|
|
7688
|
+
self._Retain = None
|
|
7689
|
+
|
|
7690
|
+
@property
|
|
7691
|
+
def InstanceId(self):
|
|
7692
|
+
"""实例ID
|
|
7693
|
+
:rtype: str
|
|
7694
|
+
"""
|
|
7695
|
+
return self._InstanceId
|
|
7696
|
+
|
|
7697
|
+
@InstanceId.setter
|
|
7698
|
+
def InstanceId(self, InstanceId):
|
|
7699
|
+
self._InstanceId = InstanceId
|
|
7700
|
+
|
|
7701
|
+
@property
|
|
7702
|
+
def Payload(self):
|
|
7703
|
+
"""消息 payload,需要按 encoding 指定的编码方式进行编码
|
|
7704
|
+
:rtype: str
|
|
7705
|
+
"""
|
|
7706
|
+
return self._Payload
|
|
7707
|
+
|
|
7708
|
+
@Payload.setter
|
|
7709
|
+
def Payload(self, Payload):
|
|
7710
|
+
self._Payload = Payload
|
|
7711
|
+
|
|
7712
|
+
@property
|
|
7713
|
+
def TargetTopic(self):
|
|
7714
|
+
"""消息目的主题,该参数与 TargetClientId 二选一
|
|
7715
|
+
:rtype: str
|
|
7716
|
+
"""
|
|
7717
|
+
return self._TargetTopic
|
|
7718
|
+
|
|
7719
|
+
@TargetTopic.setter
|
|
7720
|
+
def TargetTopic(self, TargetTopic):
|
|
7721
|
+
self._TargetTopic = TargetTopic
|
|
7722
|
+
|
|
7723
|
+
@property
|
|
7724
|
+
def TargetClientId(self):
|
|
7725
|
+
"""消息目的客户端 ID,该参数与 TargetTopic 二选一
|
|
7726
|
+
:rtype: str
|
|
7727
|
+
"""
|
|
7728
|
+
return self._TargetClientId
|
|
7729
|
+
|
|
7730
|
+
@TargetClientId.setter
|
|
7731
|
+
def TargetClientId(self, TargetClientId):
|
|
7732
|
+
self._TargetClientId = TargetClientId
|
|
7733
|
+
|
|
7734
|
+
@property
|
|
7735
|
+
def Encoding(self):
|
|
7736
|
+
"""消息 payload 编码,可选 plain 或 base64,默认为 plain(即不编码)
|
|
7737
|
+
:rtype: str
|
|
7738
|
+
"""
|
|
7739
|
+
return self._Encoding
|
|
7740
|
+
|
|
7741
|
+
@Encoding.setter
|
|
7742
|
+
def Encoding(self, Encoding):
|
|
7743
|
+
self._Encoding = Encoding
|
|
7744
|
+
|
|
7745
|
+
@property
|
|
7746
|
+
def Qos(self):
|
|
7747
|
+
"""消息的服务质量等级,默认为 1
|
|
7748
|
+
:rtype: int
|
|
7749
|
+
"""
|
|
7750
|
+
return self._Qos
|
|
7751
|
+
|
|
7752
|
+
@Qos.setter
|
|
7753
|
+
def Qos(self, Qos):
|
|
7754
|
+
self._Qos = Qos
|
|
7755
|
+
|
|
7756
|
+
@property
|
|
7757
|
+
def Retain(self):
|
|
7758
|
+
"""是否为保留消息,默认为 false,且仅支持发布到主题的消息设置为 true
|
|
7759
|
+
:rtype: bool
|
|
7760
|
+
"""
|
|
7761
|
+
return self._Retain
|
|
7762
|
+
|
|
7763
|
+
@Retain.setter
|
|
7764
|
+
def Retain(self, Retain):
|
|
7765
|
+
self._Retain = Retain
|
|
7766
|
+
|
|
7767
|
+
|
|
7768
|
+
def _deserialize(self, params):
|
|
7769
|
+
self._InstanceId = params.get("InstanceId")
|
|
7770
|
+
self._Payload = params.get("Payload")
|
|
7771
|
+
self._TargetTopic = params.get("TargetTopic")
|
|
7772
|
+
self._TargetClientId = params.get("TargetClientId")
|
|
7773
|
+
self._Encoding = params.get("Encoding")
|
|
7774
|
+
self._Qos = params.get("Qos")
|
|
7775
|
+
self._Retain = params.get("Retain")
|
|
7776
|
+
memeber_set = set(params.keys())
|
|
7777
|
+
for name, value in vars(self).items():
|
|
7778
|
+
property_name = name[1:]
|
|
7779
|
+
if property_name in memeber_set:
|
|
7780
|
+
memeber_set.remove(property_name)
|
|
7781
|
+
if len(memeber_set) > 0:
|
|
7782
|
+
warnings.warn("%s fileds are useless." % ",".join(memeber_set))
|
|
7783
|
+
|
|
7784
|
+
|
|
7785
|
+
|
|
7786
|
+
class PublishMessageResponse(AbstractModel):
|
|
7787
|
+
"""PublishMessage返回参数结构体
|
|
7788
|
+
|
|
7789
|
+
"""
|
|
7790
|
+
|
|
7791
|
+
def __init__(self):
|
|
7792
|
+
r"""
|
|
7793
|
+
:param _RequestId: 唯一请求 ID,由服务端生成,每次请求都会返回(若请求因其他原因未能抵达服务端,则该次请求不会获得 RequestId)。定位问题时需要提供该次请求的 RequestId。
|
|
7794
|
+
:type RequestId: str
|
|
7795
|
+
"""
|
|
7796
|
+
self._RequestId = None
|
|
7797
|
+
|
|
7798
|
+
@property
|
|
7799
|
+
def RequestId(self):
|
|
7800
|
+
"""唯一请求 ID,由服务端生成,每次请求都会返回(若请求因其他原因未能抵达服务端,则该次请求不会获得 RequestId)。定位问题时需要提供该次请求的 RequestId。
|
|
7801
|
+
:rtype: str
|
|
7802
|
+
"""
|
|
7803
|
+
return self._RequestId
|
|
7804
|
+
|
|
7805
|
+
@RequestId.setter
|
|
7806
|
+
def RequestId(self, RequestId):
|
|
7807
|
+
self._RequestId = RequestId
|
|
7808
|
+
|
|
7809
|
+
|
|
7810
|
+
def _deserialize(self, params):
|
|
7811
|
+
self._RequestId = params.get("RequestId")
|
|
7812
|
+
|
|
7813
|
+
|
|
7660
7814
|
class RegisterCaCertificateRequest(AbstractModel):
|
|
7661
7815
|
"""RegisterCaCertificate请求参数结构体
|
|
7662
7816
|
|
|
@@ -980,6 +980,29 @@ class MqttClient(AbstractClient):
|
|
|
980
980
|
raise TencentCloudSDKException(type(e).__name__, str(e))
|
|
981
981
|
|
|
982
982
|
|
|
983
|
+
def PublishMessage(self, request):
|
|
984
|
+
"""发布 MQTT 消息到消息主题或客户端
|
|
985
|
+
|
|
986
|
+
:param request: Request instance for PublishMessage.
|
|
987
|
+
:type request: :class:`tencentcloud.mqtt.v20240516.models.PublishMessageRequest`
|
|
988
|
+
:rtype: :class:`tencentcloud.mqtt.v20240516.models.PublishMessageResponse`
|
|
989
|
+
|
|
990
|
+
"""
|
|
991
|
+
try:
|
|
992
|
+
params = request._serialize()
|
|
993
|
+
headers = request.headers
|
|
994
|
+
body = self.call("PublishMessage", params, headers=headers)
|
|
995
|
+
response = json.loads(body)
|
|
996
|
+
model = models.PublishMessageResponse()
|
|
997
|
+
model._deserialize(response["Response"])
|
|
998
|
+
return model
|
|
999
|
+
except Exception as e:
|
|
1000
|
+
if isinstance(e, TencentCloudSDKException):
|
|
1001
|
+
raise
|
|
1002
|
+
else:
|
|
1003
|
+
raise TencentCloudSDKException(type(e).__name__, str(e))
|
|
1004
|
+
|
|
1005
|
+
|
|
983
1006
|
def RegisterCaCertificate(self, request):
|
|
984
1007
|
"""注册ca证书
|
|
985
1008
|
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
tencentcloud-sdk-python-common==3.0.1334
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
tencentcloud-sdk-python-common==3.0.1333
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|