Pub Support PayloadFormatIndicator and ContentType.

This commit is contained in:
sdk-team
2022-12-02 06:32:12 +00:00
parent e4d3a2d47e
commit 3a13a540f4
3 changed files with 29 additions and 1 deletions

View File

@@ -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_;

View File

@@ -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_;