From 3a13a540f4d2a9ab0a1fa9a881281783f50220e2 Mon Sep 17 00:00:00 2001 From: sdk-team Date: Fri, 2 Dec 2022 06:32:12 +0000 Subject: [PATCH] Pub Support PayloadFormatIndicator and ContentType. --- VERSION | 2 +- .../alibabacloud/iot/model/PubRequest.h | 6 +++++ iot/src/model/PubRequest.cc | 22 +++++++++++++++++++ 3 files changed, 29 insertions(+), 1 deletion(-) diff --git a/VERSION b/VERSION index 3eaf84719..315534d9c 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -1.36.1364 \ No newline at end of file +1.36.1365 \ No newline at end of file diff --git a/iot/include/alibabacloud/iot/model/PubRequest.h b/iot/include/alibabacloud/iot/model/PubRequest.h index ba7d06813..c54b99028 100644 --- a/iot/include/alibabacloud/iot/model/PubRequest.h +++ b/iot/include/alibabacloud/iot/model/PubRequest.h @@ -57,8 +57,12 @@ namespace AlibabaCloud void setResponseTopic(const std::string& responseTopic); std::string getTopicFullName()const; void setTopicFullName(const std::string& topicFullName); + int getPayloadFormatIndicator()const; + void setPayloadFormatIndicator(int payloadFormatIndicator); std::string getProductKey()const; void setProductKey(const std::string& productKey); + std::string getContentType()const; + void setContentType(const std::string& contentType); std::string getApiProduct()const; void setApiProduct(const std::string& apiProduct); std::string getApiRevision()const; @@ -75,7 +79,9 @@ namespace AlibabaCloud std::string iotInstanceId_; std::string responseTopic_; std::string topicFullName_; + int payloadFormatIndicator_; std::string productKey_; + std::string contentType_; std::string apiProduct_; std::string apiRevision_; std::string deviceName_; diff --git a/iot/src/model/PubRequest.cc b/iot/src/model/PubRequest.cc index 7277ab1c3..0dac6c43e 100644 --- a/iot/src/model/PubRequest.cc +++ b/iot/src/model/PubRequest.cc @@ -120,6 +120,17 @@ void PubRequest::setTopicFullName(const std::string& topicFullName) setParameter("TopicFullName", topicFullName); } +int PubRequest::getPayloadFormatIndicator()const +{ + return payloadFormatIndicator_; +} + +void PubRequest::setPayloadFormatIndicator(int payloadFormatIndicator) +{ + payloadFormatIndicator_ = payloadFormatIndicator; + setParameter("PayloadFormatIndicator", std::to_string(payloadFormatIndicator)); +} + std::string PubRequest::getProductKey()const { return productKey_; @@ -131,6 +142,17 @@ void PubRequest::setProductKey(const std::string& productKey) setParameter("ProductKey", productKey); } +std::string PubRequest::getContentType()const +{ + return contentType_; +} + +void PubRequest::setContentType(const std::string& contentType) +{ + contentType_ = contentType; + setParameter("ContentType", contentType); +} + std::string PubRequest::getApiProduct()const { return apiProduct_;