From 731984c18de77c6dfa457307ddd8340392e22e27 Mon Sep 17 00:00:00 2001 From: sdk-team Date: Thu, 1 Apr 2021 06:55:44 +0000 Subject: [PATCH] Add data service api, including ListAnalyticsData. --- CHANGELOG | 4 + VERSION | 2 +- iot/CMakeLists.txt | 8 ++ iot/include/alibabacloud/iot/IotClient.h | 16 +++ .../iot/model/CreateProductTopicRequest.h | 6 + .../model/CreateSubscribeRelationRequest.h | 6 + .../iot/model/CreateTopicRouteTableRequest.h | 6 + .../model/GenerateDeviceNameListURLRequest.h | 3 + .../iot/model/GenerateFileUploadURLRequest.h | 3 + .../iot/model/ListAnalyticsDataRequest.h | 78 +++++++++++ .../iot/model/ListAnalyticsDataResult.h | 65 +++++++++ .../iot/model/PrintByTemplateRequest.h | 72 ++++++++++ .../iot/model/PrintByTemplateResult.h | 65 +++++++++ .../model/QueryConsumerGroupStatusResult.h | 6 + iot/src/IotClient.cc | 72 ++++++++++ iot/src/model/CreateProductTopicRequest.cc | 22 +++ .../model/CreateSubscribeRelationRequest.cc | 22 +++ iot/src/model/CreateTopicRouteTableRequest.cc | 22 +++ .../model/GenerateDeviceNameListURLRequest.cc | 11 ++ iot/src/model/GenerateFileUploadURLRequest.cc | 11 ++ iot/src/model/ListAnalyticsDataRequest.cc | 125 +++++++++++++++++ iot/src/model/ListAnalyticsDataResult.cc | 81 +++++++++++ iot/src/model/PrintByTemplateRequest.cc | 128 ++++++++++++++++++ iot/src/model/PrintByTemplateResult.cc | 81 +++++++++++ .../model/QueryConsumerGroupStatusResult.cc | 18 +++ 25 files changed, 932 insertions(+), 1 deletion(-) create mode 100644 iot/include/alibabacloud/iot/model/ListAnalyticsDataRequest.h create mode 100644 iot/include/alibabacloud/iot/model/ListAnalyticsDataResult.h create mode 100644 iot/include/alibabacloud/iot/model/PrintByTemplateRequest.h create mode 100644 iot/include/alibabacloud/iot/model/PrintByTemplateResult.h create mode 100644 iot/src/model/ListAnalyticsDataRequest.cc create mode 100644 iot/src/model/ListAnalyticsDataResult.cc create mode 100644 iot/src/model/PrintByTemplateRequest.cc create mode 100644 iot/src/model/PrintByTemplateResult.cc diff --git a/CHANGELOG b/CHANGELOG index 0b0081d50..ed53d9cc3 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -1,3 +1,7 @@ +2021-04-01 Version: 1.36.667 +- Add data service api, including ListAnalyticsData. +- Update file uploading api, including GenerateFileUploadURL. + 2021-03-31 Version: 1.36.666 - Ecs support hibernation. - DescribeSnapshotGroups add ProgressStatus. diff --git a/VERSION b/VERSION index 4f751c6af..c4e370796 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -1.36.666 \ No newline at end of file +1.36.667 \ No newline at end of file diff --git a/iot/CMakeLists.txt b/iot/CMakeLists.txt index 5284e350c..4be002ed3 100644 --- a/iot/CMakeLists.txt +++ b/iot/CMakeLists.txt @@ -259,6 +259,8 @@ set(iot_public_header_model include/alibabacloud/iot/model/InvokeThingServiceResult.h include/alibabacloud/iot/model/InvokeThingsServiceRequest.h include/alibabacloud/iot/model/InvokeThingsServiceResult.h + include/alibabacloud/iot/model/ListAnalyticsDataRequest.h + include/alibabacloud/iot/model/ListAnalyticsDataResult.h include/alibabacloud/iot/model/ListDeviceDistributeJobRequest.h include/alibabacloud/iot/model/ListDeviceDistributeJobResult.h include/alibabacloud/iot/model/ListDistributedDeviceRequest.h @@ -299,6 +301,8 @@ set(iot_public_header_model include/alibabacloud/iot/model/NotifyAddThingTopoResult.h include/alibabacloud/iot/model/OpenIotServiceRequest.h include/alibabacloud/iot/model/OpenIotServiceResult.h + include/alibabacloud/iot/model/PrintByTemplateRequest.h + include/alibabacloud/iot/model/PrintByTemplateResult.h include/alibabacloud/iot/model/PubRequest.h include/alibabacloud/iot/model/PubResult.h include/alibabacloud/iot/model/PubBroadcastRequest.h @@ -762,6 +766,8 @@ set(iot_src src/model/InvokeThingServiceResult.cc src/model/InvokeThingsServiceRequest.cc src/model/InvokeThingsServiceResult.cc + src/model/ListAnalyticsDataRequest.cc + src/model/ListAnalyticsDataResult.cc src/model/ListDeviceDistributeJobRequest.cc src/model/ListDeviceDistributeJobResult.cc src/model/ListDistributedDeviceRequest.cc @@ -802,6 +808,8 @@ set(iot_src src/model/NotifyAddThingTopoResult.cc src/model/OpenIotServiceRequest.cc src/model/OpenIotServiceResult.cc + src/model/PrintByTemplateRequest.cc + src/model/PrintByTemplateResult.cc src/model/PubRequest.cc src/model/PubResult.cc src/model/PubBroadcastRequest.cc diff --git a/iot/include/alibabacloud/iot/IotClient.h b/iot/include/alibabacloud/iot/IotClient.h index 10cb2c403..7dfb3caf4 100644 --- a/iot/include/alibabacloud/iot/IotClient.h +++ b/iot/include/alibabacloud/iot/IotClient.h @@ -260,6 +260,8 @@ #include "model/InvokeThingServiceResult.h" #include "model/InvokeThingsServiceRequest.h" #include "model/InvokeThingsServiceResult.h" +#include "model/ListAnalyticsDataRequest.h" +#include "model/ListAnalyticsDataResult.h" #include "model/ListDeviceDistributeJobRequest.h" #include "model/ListDeviceDistributeJobResult.h" #include "model/ListDistributedDeviceRequest.h" @@ -300,6 +302,8 @@ #include "model/NotifyAddThingTopoResult.h" #include "model/OpenIotServiceRequest.h" #include "model/OpenIotServiceResult.h" +#include "model/PrintByTemplateRequest.h" +#include "model/PrintByTemplateResult.h" #include "model/PubRequest.h" #include "model/PubResult.h" #include "model/PubBroadcastRequest.h" @@ -888,6 +892,9 @@ namespace AlibabaCloud typedef Outcome InvokeThingsServiceOutcome; typedef std::future InvokeThingsServiceOutcomeCallable; typedef std::function&)> InvokeThingsServiceAsyncHandler; + typedef Outcome ListAnalyticsDataOutcome; + typedef std::future ListAnalyticsDataOutcomeCallable; + typedef std::function&)> ListAnalyticsDataAsyncHandler; typedef Outcome ListDeviceDistributeJobOutcome; typedef std::future ListDeviceDistributeJobOutcomeCallable; typedef std::function&)> ListDeviceDistributeJobAsyncHandler; @@ -948,6 +955,9 @@ namespace AlibabaCloud typedef Outcome OpenIotServiceOutcome; typedef std::future OpenIotServiceOutcomeCallable; typedef std::function&)> OpenIotServiceAsyncHandler; + typedef Outcome PrintByTemplateOutcome; + typedef std::future PrintByTemplateOutcomeCallable; + typedef std::function&)> PrintByTemplateAsyncHandler; typedef Outcome PubOutcome; typedef std::future PubOutcomeCallable; typedef std::function&)> PubAsyncHandler; @@ -1643,6 +1653,9 @@ namespace AlibabaCloud InvokeThingsServiceOutcome invokeThingsService(const Model::InvokeThingsServiceRequest &request)const; void invokeThingsServiceAsync(const Model::InvokeThingsServiceRequest& request, const InvokeThingsServiceAsyncHandler& handler, const std::shared_ptr& context = nullptr) const; InvokeThingsServiceOutcomeCallable invokeThingsServiceCallable(const Model::InvokeThingsServiceRequest& request) const; + ListAnalyticsDataOutcome listAnalyticsData(const Model::ListAnalyticsDataRequest &request)const; + void listAnalyticsDataAsync(const Model::ListAnalyticsDataRequest& request, const ListAnalyticsDataAsyncHandler& handler, const std::shared_ptr& context = nullptr) const; + ListAnalyticsDataOutcomeCallable listAnalyticsDataCallable(const Model::ListAnalyticsDataRequest& request) const; ListDeviceDistributeJobOutcome listDeviceDistributeJob(const Model::ListDeviceDistributeJobRequest &request)const; void listDeviceDistributeJobAsync(const Model::ListDeviceDistributeJobRequest& request, const ListDeviceDistributeJobAsyncHandler& handler, const std::shared_ptr& context = nullptr) const; ListDeviceDistributeJobOutcomeCallable listDeviceDistributeJobCallable(const Model::ListDeviceDistributeJobRequest& request) const; @@ -1703,6 +1716,9 @@ namespace AlibabaCloud OpenIotServiceOutcome openIotService(const Model::OpenIotServiceRequest &request)const; void openIotServiceAsync(const Model::OpenIotServiceRequest& request, const OpenIotServiceAsyncHandler& handler, const std::shared_ptr& context = nullptr) const; OpenIotServiceOutcomeCallable openIotServiceCallable(const Model::OpenIotServiceRequest& request) const; + PrintByTemplateOutcome printByTemplate(const Model::PrintByTemplateRequest &request)const; + void printByTemplateAsync(const Model::PrintByTemplateRequest& request, const PrintByTemplateAsyncHandler& handler, const std::shared_ptr& context = nullptr) const; + PrintByTemplateOutcomeCallable printByTemplateCallable(const Model::PrintByTemplateRequest& request) const; PubOutcome pub(const Model::PubRequest &request)const; void pubAsync(const Model::PubRequest& request, const PubAsyncHandler& handler, const std::shared_ptr& context = nullptr) const; PubOutcomeCallable pubCallable(const Model::PubRequest& request) const; diff --git a/iot/include/alibabacloud/iot/model/CreateProductTopicRequest.h b/iot/include/alibabacloud/iot/model/CreateProductTopicRequest.h index 7495002fa..9e98f8d7b 100644 --- a/iot/include/alibabacloud/iot/model/CreateProductTopicRequest.h +++ b/iot/include/alibabacloud/iot/model/CreateProductTopicRequest.h @@ -35,8 +35,12 @@ namespace AlibabaCloud CreateProductTopicRequest(); ~CreateProductTopicRequest(); + std::string getRealTenantId()const; + void setRealTenantId(const std::string& realTenantId); std::string getAccessKeyId()const; void setAccessKeyId(const std::string& accessKeyId); + std::string getRealTripartiteKey()const; + void setRealTripartiteKey(const std::string& realTripartiteKey); std::string getIotInstanceId()const; void setIotInstanceId(const std::string& iotInstanceId); std::string getTopicShortName()const; @@ -53,7 +57,9 @@ namespace AlibabaCloud void setDesc(const std::string& desc); private: + std::string realTenantId_; std::string accessKeyId_; + std::string realTripartiteKey_; std::string iotInstanceId_; std::string topicShortName_; std::string productKey_; diff --git a/iot/include/alibabacloud/iot/model/CreateSubscribeRelationRequest.h b/iot/include/alibabacloud/iot/model/CreateSubscribeRelationRequest.h index b6232a0cc..1c19f173b 100644 --- a/iot/include/alibabacloud/iot/model/CreateSubscribeRelationRequest.h +++ b/iot/include/alibabacloud/iot/model/CreateSubscribeRelationRequest.h @@ -35,6 +35,8 @@ namespace AlibabaCloud CreateSubscribeRelationRequest(); ~CreateSubscribeRelationRequest(); + std::string getRealTenantId()const; + void setRealTenantId(const std::string& realTenantId); bool getOtaEventFlag()const; void setOtaEventFlag(bool otaEventFlag); bool getDeviceTopoLifeCycleFlag()const; @@ -43,6 +45,8 @@ namespace AlibabaCloud void setDeviceLifeCycleFlag(bool deviceLifeCycleFlag); std::string getType()const; void setType(const std::string& type); + std::string getRealTripartiteKey()const; + void setRealTripartiteKey(const std::string& realTripartiteKey); std::string getIotInstanceId()const; void setIotInstanceId(const std::string& iotInstanceId); bool getDeviceStatusChangeFlag()const; @@ -71,10 +75,12 @@ namespace AlibabaCloud void setMnsConfiguration(const std::string& mnsConfiguration); private: + std::string realTenantId_; bool otaEventFlag_; bool deviceTopoLifeCycleFlag_; bool deviceLifeCycleFlag_; std::string type_; + std::string realTripartiteKey_; std::string iotInstanceId_; bool deviceStatusChangeFlag_; bool otaVersionFlag_; diff --git a/iot/include/alibabacloud/iot/model/CreateTopicRouteTableRequest.h b/iot/include/alibabacloud/iot/model/CreateTopicRouteTableRequest.h index a9b317a75..408a6b51f 100644 --- a/iot/include/alibabacloud/iot/model/CreateTopicRouteTableRequest.h +++ b/iot/include/alibabacloud/iot/model/CreateTopicRouteTableRequest.h @@ -35,8 +35,12 @@ namespace AlibabaCloud CreateTopicRouteTableRequest(); ~CreateTopicRouteTableRequest(); + std::string getRealTenantId()const; + void setRealTenantId(const std::string& realTenantId); std::string getAccessKeyId()const; void setAccessKeyId(const std::string& accessKeyId); + std::string getRealTripartiteKey()const; + void setRealTripartiteKey(const std::string& realTripartiteKey); std::string getIotInstanceId()const; void setIotInstanceId(const std::string& iotInstanceId); std::vector getDstTopic()const; @@ -49,7 +53,9 @@ namespace AlibabaCloud void setSrcTopic(const std::string& srcTopic); private: + std::string realTenantId_; std::string accessKeyId_; + std::string realTripartiteKey_; std::string iotInstanceId_; std::vector dstTopic_; std::string apiProduct_; diff --git a/iot/include/alibabacloud/iot/model/GenerateDeviceNameListURLRequest.h b/iot/include/alibabacloud/iot/model/GenerateDeviceNameListURLRequest.h index f3ea37a13..b27d26027 100644 --- a/iot/include/alibabacloud/iot/model/GenerateDeviceNameListURLRequest.h +++ b/iot/include/alibabacloud/iot/model/GenerateDeviceNameListURLRequest.h @@ -35,6 +35,8 @@ namespace AlibabaCloud GenerateDeviceNameListURLRequest(); ~GenerateDeviceNameListURLRequest(); + std::string getAccessKeyId()const; + void setAccessKeyId(const std::string& accessKeyId); std::string getIotInstanceId()const; void setIotInstanceId(const std::string& iotInstanceId); std::string getApiProduct()const; @@ -43,6 +45,7 @@ namespace AlibabaCloud void setApiRevision(const std::string& apiRevision); private: + std::string accessKeyId_; std::string iotInstanceId_; std::string apiProduct_; std::string apiRevision_; diff --git a/iot/include/alibabacloud/iot/model/GenerateFileUploadURLRequest.h b/iot/include/alibabacloud/iot/model/GenerateFileUploadURLRequest.h index 2958c3fc9..1be85acbe 100644 --- a/iot/include/alibabacloud/iot/model/GenerateFileUploadURLRequest.h +++ b/iot/include/alibabacloud/iot/model/GenerateFileUploadURLRequest.h @@ -39,6 +39,8 @@ namespace AlibabaCloud void setFileSuffix(const std::string& fileSuffix); std::string getIotInstanceId()const; void setIotInstanceId(const std::string& iotInstanceId); + std::string getFileName()const; + void setFileName(const std::string& fileName); std::string getBizCode()const; void setBizCode(const std::string& bizCode); std::string getApiProduct()const; @@ -49,6 +51,7 @@ namespace AlibabaCloud private: std::string fileSuffix_; std::string iotInstanceId_; + std::string fileName_; std::string bizCode_; std::string apiProduct_; std::string apiRevision_; diff --git a/iot/include/alibabacloud/iot/model/ListAnalyticsDataRequest.h b/iot/include/alibabacloud/iot/model/ListAnalyticsDataRequest.h new file mode 100644 index 000000000..0f5b51319 --- /dev/null +++ b/iot/include/alibabacloud/iot/model/ListAnalyticsDataRequest.h @@ -0,0 +1,78 @@ +/* + * Copyright 2009-2017 Alibaba Cloud All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#ifndef ALIBABACLOUD_IOT_MODEL_LISTANALYTICSDATAREQUEST_H_ +#define ALIBABACLOUD_IOT_MODEL_LISTANALYTICSDATAREQUEST_H_ + +#include +#include +#include +#include + +namespace AlibabaCloud +{ + namespace Iot + { + namespace Model + { + class ALIBABACLOUD_IOT_EXPORT ListAnalyticsDataRequest : public RpcServiceRequest + { + public: + struct Condition + { + std::string fieldName; + std::string operate; + std::string betweenStart; + std::string betweenEnd; + std::string value; + }; + + public: + ListAnalyticsDataRequest(); + ~ListAnalyticsDataRequest(); + + int getPageNum()const; + void setPageNum(int pageNum); + std::string getIotInstanceId()const; + void setIotInstanceId(const std::string& iotInstanceId); + int getPageSize()const; + void setPageSize(int pageSize); + std::string getIsoId()const; + void setIsoId(const std::string& isoId); + std::string getApiPath()const; + void setApiPath(const std::string& apiPath); + std::vector getCondition()const; + void setCondition(const std::vector& condition); + std::string getApiProduct()const; + void setApiProduct(const std::string& apiProduct); + std::string getApiRevision()const; + void setApiRevision(const std::string& apiRevision); + + private: + int pageNum_; + std::string iotInstanceId_; + int pageSize_; + std::string isoId_; + std::string apiPath_; + std::vector condition_; + std::string apiProduct_; + std::string apiRevision_; + + }; + } + } +} +#endif // !ALIBABACLOUD_IOT_MODEL_LISTANALYTICSDATAREQUEST_H_ \ No newline at end of file diff --git a/iot/include/alibabacloud/iot/model/ListAnalyticsDataResult.h b/iot/include/alibabacloud/iot/model/ListAnalyticsDataResult.h new file mode 100644 index 000000000..e96a8bec3 --- /dev/null +++ b/iot/include/alibabacloud/iot/model/ListAnalyticsDataResult.h @@ -0,0 +1,65 @@ +/* + * Copyright 2009-2017 Alibaba Cloud All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#ifndef ALIBABACLOUD_IOT_MODEL_LISTANALYTICSDATARESULT_H_ +#define ALIBABACLOUD_IOT_MODEL_LISTANALYTICSDATARESULT_H_ + +#include +#include +#include +#include +#include + +namespace AlibabaCloud +{ + namespace Iot + { + namespace Model + { + class ALIBABACLOUD_IOT_EXPORT ListAnalyticsDataResult : public ServiceResult + { + public: + struct Data + { + std::string resultJson; + int pageNum; + int pageSize; + long count; + bool hasNext; + }; + + + ListAnalyticsDataResult(); + explicit ListAnalyticsDataResult(const std::string &payload); + ~ListAnalyticsDataResult(); + Data getData()const; + std::string getErrorMessage()const; + std::string getCode()const; + bool getSuccess()const; + + protected: + void parse(const std::string &payload); + private: + Data data_; + std::string errorMessage_; + std::string code_; + bool success_; + + }; + } + } +} +#endif // !ALIBABACLOUD_IOT_MODEL_LISTANALYTICSDATARESULT_H_ \ No newline at end of file diff --git a/iot/include/alibabacloud/iot/model/PrintByTemplateRequest.h b/iot/include/alibabacloud/iot/model/PrintByTemplateRequest.h new file mode 100644 index 000000000..32496850b --- /dev/null +++ b/iot/include/alibabacloud/iot/model/PrintByTemplateRequest.h @@ -0,0 +1,72 @@ +/* + * Copyright 2009-2017 Alibaba Cloud All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#ifndef ALIBABACLOUD_IOT_MODEL_PRINTBYTEMPLATEREQUEST_H_ +#define ALIBABACLOUD_IOT_MODEL_PRINTBYTEMPLATEREQUEST_H_ + +#include +#include +#include +#include + +namespace AlibabaCloud +{ + namespace Iot + { + namespace Model + { + class ALIBABACLOUD_IOT_EXPORT PrintByTemplateRequest : public RpcServiceRequest + { + + public: + PrintByTemplateRequest(); + ~PrintByTemplateRequest(); + + std::string getProjectCode()const; + void setProjectCode(const std::string& projectCode); + std::string getTemplateBizCode()const; + void setTemplateBizCode(const std::string& templateBizCode); + std::string getIotId()const; + void setIotId(const std::string& iotId); + std::string getIotInstanceId()const; + void setIotInstanceId(const std::string& iotInstanceId); + std::string getProductKey()const; + void setProductKey(const std::string& productKey); + std::string getParamsJsonString()const; + void setParamsJsonString(const std::string& paramsJsonString); + std::string getApiProduct()const; + void setApiProduct(const std::string& apiProduct); + std::string getApiRevision()const; + void setApiRevision(const std::string& apiRevision); + std::string getDeviceName()const; + void setDeviceName(const std::string& deviceName); + + private: + std::string projectCode_; + std::string templateBizCode_; + std::string iotId_; + std::string iotInstanceId_; + std::string productKey_; + std::string paramsJsonString_; + std::string apiProduct_; + std::string apiRevision_; + std::string deviceName_; + + }; + } + } +} +#endif // !ALIBABACLOUD_IOT_MODEL_PRINTBYTEMPLATEREQUEST_H_ \ No newline at end of file diff --git a/iot/include/alibabacloud/iot/model/PrintByTemplateResult.h b/iot/include/alibabacloud/iot/model/PrintByTemplateResult.h new file mode 100644 index 000000000..169c4b4f3 --- /dev/null +++ b/iot/include/alibabacloud/iot/model/PrintByTemplateResult.h @@ -0,0 +1,65 @@ +/* + * Copyright 2009-2017 Alibaba Cloud All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#ifndef ALIBABACLOUD_IOT_MODEL_PRINTBYTEMPLATERESULT_H_ +#define ALIBABACLOUD_IOT_MODEL_PRINTBYTEMPLATERESULT_H_ + +#include +#include +#include +#include +#include + +namespace AlibabaCloud +{ + namespace Iot + { + namespace Model + { + class ALIBABACLOUD_IOT_EXPORT PrintByTemplateResult : public ServiceResult + { + public: + struct Data + { + int retryCount; + std::string deviceErrorCode; + std::string id; + std::string deviceErrorMessage; + bool success; + }; + + + PrintByTemplateResult(); + explicit PrintByTemplateResult(const std::string &payload); + ~PrintByTemplateResult(); + Data getData()const; + std::string getErrorMessage()const; + std::string getCode()const; + bool getSuccess()const; + + protected: + void parse(const std::string &payload); + private: + Data data_; + std::string errorMessage_; + std::string code_; + bool success_; + + }; + } + } +} +#endif // !ALIBABACLOUD_IOT_MODEL_PRINTBYTEMPLATERESULT_H_ \ No newline at end of file diff --git a/iot/include/alibabacloud/iot/model/QueryConsumerGroupStatusResult.h b/iot/include/alibabacloud/iot/model/QueryConsumerGroupStatusResult.h index 59d3de4d6..b90d3dd79 100644 --- a/iot/include/alibabacloud/iot/model/QueryConsumerGroupStatusResult.h +++ b/iot/include/alibabacloud/iot/model/QueryConsumerGroupStatusResult.h @@ -35,8 +35,10 @@ namespace AlibabaCloud struct ConsumerGroupClientConnectionInfo { std::string clientId; + int accumulatedConsumeCountPerMinute; long onlineTime; std::string clientIpPort; + int realTimeConsumeCountPerMinute; }; @@ -45,9 +47,11 @@ namespace AlibabaCloud ~QueryConsumerGroupStatusResult(); std::vector getClientConnectionStatusList()const; std::string getLastConsumerTime()const; + int getAccumulatedConsumeCountPerMinute()const; std::string getErrorMessage()const; std::string getCode()const; bool getSuccess()const; + int getRealTimeConsumeCountPerMinute()const; int getAccumulationCount()const; int getConsumerSpeed()const; @@ -56,9 +60,11 @@ namespace AlibabaCloud private: std::vector clientConnectionStatusList_; std::string lastConsumerTime_; + int accumulatedConsumeCountPerMinute_; std::string errorMessage_; std::string code_; bool success_; + int realTimeConsumeCountPerMinute_; int accumulationCount_; int consumerSpeed_; diff --git a/iot/src/IotClient.cc b/iot/src/IotClient.cc index 3e21c24a9..78f323cab 100644 --- a/iot/src/IotClient.cc +++ b/iot/src/IotClient.cc @@ -4335,6 +4335,42 @@ IotClient::InvokeThingsServiceOutcomeCallable IotClient::invokeThingsServiceCall return task->get_future(); } +IotClient::ListAnalyticsDataOutcome IotClient::listAnalyticsData(const ListAnalyticsDataRequest &request) const +{ + auto endpointOutcome = endpointProvider_->getEndpoint(); + if (!endpointOutcome.isSuccess()) + return ListAnalyticsDataOutcome(endpointOutcome.error()); + + auto outcome = makeRequest(endpointOutcome.result(), request); + + if (outcome.isSuccess()) + return ListAnalyticsDataOutcome(ListAnalyticsDataResult(outcome.result())); + else + return ListAnalyticsDataOutcome(outcome.error()); +} + +void IotClient::listAnalyticsDataAsync(const ListAnalyticsDataRequest& request, const ListAnalyticsDataAsyncHandler& handler, const std::shared_ptr& context) const +{ + auto fn = [this, request, handler, context]() + { + handler(this, request, listAnalyticsData(request), context); + }; + + asyncExecute(new Runnable(fn)); +} + +IotClient::ListAnalyticsDataOutcomeCallable IotClient::listAnalyticsDataCallable(const ListAnalyticsDataRequest &request) const +{ + auto task = std::make_shared>( + [this, request]() + { + return this->listAnalyticsData(request); + }); + + asyncExecute(new Runnable([task]() { (*task)(); })); + return task->get_future(); +} + IotClient::ListDeviceDistributeJobOutcome IotClient::listDeviceDistributeJob(const ListDeviceDistributeJobRequest &request) const { auto endpointOutcome = endpointProvider_->getEndpoint(); @@ -5055,6 +5091,42 @@ IotClient::OpenIotServiceOutcomeCallable IotClient::openIotServiceCallable(const return task->get_future(); } +IotClient::PrintByTemplateOutcome IotClient::printByTemplate(const PrintByTemplateRequest &request) const +{ + auto endpointOutcome = endpointProvider_->getEndpoint(); + if (!endpointOutcome.isSuccess()) + return PrintByTemplateOutcome(endpointOutcome.error()); + + auto outcome = makeRequest(endpointOutcome.result(), request); + + if (outcome.isSuccess()) + return PrintByTemplateOutcome(PrintByTemplateResult(outcome.result())); + else + return PrintByTemplateOutcome(outcome.error()); +} + +void IotClient::printByTemplateAsync(const PrintByTemplateRequest& request, const PrintByTemplateAsyncHandler& handler, const std::shared_ptr& context) const +{ + auto fn = [this, request, handler, context]() + { + handler(this, request, printByTemplate(request), context); + }; + + asyncExecute(new Runnable(fn)); +} + +IotClient::PrintByTemplateOutcomeCallable IotClient::printByTemplateCallable(const PrintByTemplateRequest &request) const +{ + auto task = std::make_shared>( + [this, request]() + { + return this->printByTemplate(request); + }); + + asyncExecute(new Runnable([task]() { (*task)(); })); + return task->get_future(); +} + IotClient::PubOutcome IotClient::pub(const PubRequest &request) const { auto endpointOutcome = endpointProvider_->getEndpoint(); diff --git a/iot/src/model/CreateProductTopicRequest.cc b/iot/src/model/CreateProductTopicRequest.cc index 1549188f4..79fea7de5 100644 --- a/iot/src/model/CreateProductTopicRequest.cc +++ b/iot/src/model/CreateProductTopicRequest.cc @@ -27,6 +27,17 @@ CreateProductTopicRequest::CreateProductTopicRequest() : CreateProductTopicRequest::~CreateProductTopicRequest() {} +std::string CreateProductTopicRequest::getRealTenantId()const +{ + return realTenantId_; +} + +void CreateProductTopicRequest::setRealTenantId(const std::string& realTenantId) +{ + realTenantId_ = realTenantId; + setParameter("RealTenantId", realTenantId); +} + std::string CreateProductTopicRequest::getAccessKeyId()const { return accessKeyId_; @@ -38,6 +49,17 @@ void CreateProductTopicRequest::setAccessKeyId(const std::string& accessKeyId) setParameter("AccessKeyId", accessKeyId); } +std::string CreateProductTopicRequest::getRealTripartiteKey()const +{ + return realTripartiteKey_; +} + +void CreateProductTopicRequest::setRealTripartiteKey(const std::string& realTripartiteKey) +{ + realTripartiteKey_ = realTripartiteKey; + setParameter("RealTripartiteKey", realTripartiteKey); +} + std::string CreateProductTopicRequest::getIotInstanceId()const { return iotInstanceId_; diff --git a/iot/src/model/CreateSubscribeRelationRequest.cc b/iot/src/model/CreateSubscribeRelationRequest.cc index 65d8b3840..3daff9553 100644 --- a/iot/src/model/CreateSubscribeRelationRequest.cc +++ b/iot/src/model/CreateSubscribeRelationRequest.cc @@ -27,6 +27,17 @@ CreateSubscribeRelationRequest::CreateSubscribeRelationRequest() : CreateSubscribeRelationRequest::~CreateSubscribeRelationRequest() {} +std::string CreateSubscribeRelationRequest::getRealTenantId()const +{ + return realTenantId_; +} + +void CreateSubscribeRelationRequest::setRealTenantId(const std::string& realTenantId) +{ + realTenantId_ = realTenantId; + setParameter("RealTenantId", realTenantId); +} + bool CreateSubscribeRelationRequest::getOtaEventFlag()const { return otaEventFlag_; @@ -71,6 +82,17 @@ void CreateSubscribeRelationRequest::setType(const std::string& type) setParameter("Type", type); } +std::string CreateSubscribeRelationRequest::getRealTripartiteKey()const +{ + return realTripartiteKey_; +} + +void CreateSubscribeRelationRequest::setRealTripartiteKey(const std::string& realTripartiteKey) +{ + realTripartiteKey_ = realTripartiteKey; + setParameter("RealTripartiteKey", realTripartiteKey); +} + std::string CreateSubscribeRelationRequest::getIotInstanceId()const { return iotInstanceId_; diff --git a/iot/src/model/CreateTopicRouteTableRequest.cc b/iot/src/model/CreateTopicRouteTableRequest.cc index af0dd27f4..715896f7f 100644 --- a/iot/src/model/CreateTopicRouteTableRequest.cc +++ b/iot/src/model/CreateTopicRouteTableRequest.cc @@ -27,6 +27,17 @@ CreateTopicRouteTableRequest::CreateTopicRouteTableRequest() : CreateTopicRouteTableRequest::~CreateTopicRouteTableRequest() {} +std::string CreateTopicRouteTableRequest::getRealTenantId()const +{ + return realTenantId_; +} + +void CreateTopicRouteTableRequest::setRealTenantId(const std::string& realTenantId) +{ + realTenantId_ = realTenantId; + setParameter("RealTenantId", realTenantId); +} + std::string CreateTopicRouteTableRequest::getAccessKeyId()const { return accessKeyId_; @@ -38,6 +49,17 @@ void CreateTopicRouteTableRequest::setAccessKeyId(const std::string& accessKeyId setParameter("AccessKeyId", accessKeyId); } +std::string CreateTopicRouteTableRequest::getRealTripartiteKey()const +{ + return realTripartiteKey_; +} + +void CreateTopicRouteTableRequest::setRealTripartiteKey(const std::string& realTripartiteKey) +{ + realTripartiteKey_ = realTripartiteKey; + setParameter("RealTripartiteKey", realTripartiteKey); +} + std::string CreateTopicRouteTableRequest::getIotInstanceId()const { return iotInstanceId_; diff --git a/iot/src/model/GenerateDeviceNameListURLRequest.cc b/iot/src/model/GenerateDeviceNameListURLRequest.cc index 4cc41cc11..cc2fd398d 100644 --- a/iot/src/model/GenerateDeviceNameListURLRequest.cc +++ b/iot/src/model/GenerateDeviceNameListURLRequest.cc @@ -27,6 +27,17 @@ GenerateDeviceNameListURLRequest::GenerateDeviceNameListURLRequest() : GenerateDeviceNameListURLRequest::~GenerateDeviceNameListURLRequest() {} +std::string GenerateDeviceNameListURLRequest::getAccessKeyId()const +{ + return accessKeyId_; +} + +void GenerateDeviceNameListURLRequest::setAccessKeyId(const std::string& accessKeyId) +{ + accessKeyId_ = accessKeyId; + setParameter("AccessKeyId", accessKeyId); +} + std::string GenerateDeviceNameListURLRequest::getIotInstanceId()const { return iotInstanceId_; diff --git a/iot/src/model/GenerateFileUploadURLRequest.cc b/iot/src/model/GenerateFileUploadURLRequest.cc index fc35ebc8c..53252bb2a 100644 --- a/iot/src/model/GenerateFileUploadURLRequest.cc +++ b/iot/src/model/GenerateFileUploadURLRequest.cc @@ -49,6 +49,17 @@ void GenerateFileUploadURLRequest::setIotInstanceId(const std::string& iotInstan setParameter("IotInstanceId", iotInstanceId); } +std::string GenerateFileUploadURLRequest::getFileName()const +{ + return fileName_; +} + +void GenerateFileUploadURLRequest::setFileName(const std::string& fileName) +{ + fileName_ = fileName; + setParameter("FileName", fileName); +} + std::string GenerateFileUploadURLRequest::getBizCode()const { return bizCode_; diff --git a/iot/src/model/ListAnalyticsDataRequest.cc b/iot/src/model/ListAnalyticsDataRequest.cc new file mode 100644 index 000000000..edada79c7 --- /dev/null +++ b/iot/src/model/ListAnalyticsDataRequest.cc @@ -0,0 +1,125 @@ +/* + * Copyright 2009-2017 Alibaba Cloud All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#include + +using AlibabaCloud::Iot::Model::ListAnalyticsDataRequest; + +ListAnalyticsDataRequest::ListAnalyticsDataRequest() : + RpcServiceRequest("iot", "2018-01-20", "ListAnalyticsData") +{ + setMethod(HttpRequest::Method::Post); +} + +ListAnalyticsDataRequest::~ListAnalyticsDataRequest() +{} + +int ListAnalyticsDataRequest::getPageNum()const +{ + return pageNum_; +} + +void ListAnalyticsDataRequest::setPageNum(int pageNum) +{ + pageNum_ = pageNum; + setParameter("PageNum", std::to_string(pageNum)); +} + +std::string ListAnalyticsDataRequest::getIotInstanceId()const +{ + return iotInstanceId_; +} + +void ListAnalyticsDataRequest::setIotInstanceId(const std::string& iotInstanceId) +{ + iotInstanceId_ = iotInstanceId; + setParameter("IotInstanceId", iotInstanceId); +} + +int ListAnalyticsDataRequest::getPageSize()const +{ + return pageSize_; +} + +void ListAnalyticsDataRequest::setPageSize(int pageSize) +{ + pageSize_ = pageSize; + setParameter("PageSize", std::to_string(pageSize)); +} + +std::string ListAnalyticsDataRequest::getIsoId()const +{ + return isoId_; +} + +void ListAnalyticsDataRequest::setIsoId(const std::string& isoId) +{ + isoId_ = isoId; + setParameter("IsoId", isoId); +} + +std::string ListAnalyticsDataRequest::getApiPath()const +{ + return apiPath_; +} + +void ListAnalyticsDataRequest::setApiPath(const std::string& apiPath) +{ + apiPath_ = apiPath; + setParameter("ApiPath", apiPath); +} + +std::vector ListAnalyticsDataRequest::getCondition()const +{ + return condition_; +} + +void ListAnalyticsDataRequest::setCondition(const std::vector& condition) +{ + condition_ = condition; + for(int dep1 = 0; dep1!= condition.size(); dep1++) { + auto conditionObj = condition.at(dep1); + std::string conditionObjStr = "Condition." + std::to_string(dep1 + 1); + setParameter(conditionObjStr + ".FieldName", conditionObj.fieldName); + setParameter(conditionObjStr + ".Operate", conditionObj.operate); + setParameter(conditionObjStr + ".BetweenStart", conditionObj.betweenStart); + setParameter(conditionObjStr + ".BetweenEnd", conditionObj.betweenEnd); + setParameter(conditionObjStr + ".Value", conditionObj.value); + } +} + +std::string ListAnalyticsDataRequest::getApiProduct()const +{ + return apiProduct_; +} + +void ListAnalyticsDataRequest::setApiProduct(const std::string& apiProduct) +{ + apiProduct_ = apiProduct; + setBodyParameter("ApiProduct", apiProduct); +} + +std::string ListAnalyticsDataRequest::getApiRevision()const +{ + return apiRevision_; +} + +void ListAnalyticsDataRequest::setApiRevision(const std::string& apiRevision) +{ + apiRevision_ = apiRevision; + setBodyParameter("ApiRevision", apiRevision); +} + diff --git a/iot/src/model/ListAnalyticsDataResult.cc b/iot/src/model/ListAnalyticsDataResult.cc new file mode 100644 index 000000000..7c95193eb --- /dev/null +++ b/iot/src/model/ListAnalyticsDataResult.cc @@ -0,0 +1,81 @@ +/* + * Copyright 2009-2017 Alibaba Cloud All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#include +#include + +using namespace AlibabaCloud::Iot; +using namespace AlibabaCloud::Iot::Model; + +ListAnalyticsDataResult::ListAnalyticsDataResult() : + ServiceResult() +{} + +ListAnalyticsDataResult::ListAnalyticsDataResult(const std::string &payload) : + ServiceResult() +{ + parse(payload); +} + +ListAnalyticsDataResult::~ListAnalyticsDataResult() +{} + +void ListAnalyticsDataResult::parse(const std::string &payload) +{ + Json::Reader reader; + Json::Value value; + reader.parse(payload, value); + setRequestId(value["RequestId"].asString()); + auto dataNode = value["Data"]; + if(!dataNode["HasNext"].isNull()) + data_.hasNext = dataNode["HasNext"].asString() == "true"; + if(!dataNode["ResultJson"].isNull()) + data_.resultJson = dataNode["ResultJson"].asString(); + if(!dataNode["Count"].isNull()) + data_.count = std::stol(dataNode["Count"].asString()); + if(!dataNode["PageNum"].isNull()) + data_.pageNum = std::stoi(dataNode["PageNum"].asString()); + if(!dataNode["PageSize"].isNull()) + data_.pageSize = std::stoi(dataNode["PageSize"].asString()); + if(!value["Success"].isNull()) + success_ = value["Success"].asString() == "true"; + if(!value["Code"].isNull()) + code_ = value["Code"].asString(); + if(!value["ErrorMessage"].isNull()) + errorMessage_ = value["ErrorMessage"].asString(); + +} + +ListAnalyticsDataResult::Data ListAnalyticsDataResult::getData()const +{ + return data_; +} + +std::string ListAnalyticsDataResult::getErrorMessage()const +{ + return errorMessage_; +} + +std::string ListAnalyticsDataResult::getCode()const +{ + return code_; +} + +bool ListAnalyticsDataResult::getSuccess()const +{ + return success_; +} + diff --git a/iot/src/model/PrintByTemplateRequest.cc b/iot/src/model/PrintByTemplateRequest.cc new file mode 100644 index 000000000..f12115c7c --- /dev/null +++ b/iot/src/model/PrintByTemplateRequest.cc @@ -0,0 +1,128 @@ +/* + * Copyright 2009-2017 Alibaba Cloud All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#include + +using AlibabaCloud::Iot::Model::PrintByTemplateRequest; + +PrintByTemplateRequest::PrintByTemplateRequest() : + RpcServiceRequest("iot", "2018-01-20", "PrintByTemplate") +{ + setMethod(HttpRequest::Method::Post); +} + +PrintByTemplateRequest::~PrintByTemplateRequest() +{} + +std::string PrintByTemplateRequest::getProjectCode()const +{ + return projectCode_; +} + +void PrintByTemplateRequest::setProjectCode(const std::string& projectCode) +{ + projectCode_ = projectCode; + setBodyParameter("ProjectCode", projectCode); +} + +std::string PrintByTemplateRequest::getTemplateBizCode()const +{ + return templateBizCode_; +} + +void PrintByTemplateRequest::setTemplateBizCode(const std::string& templateBizCode) +{ + templateBizCode_ = templateBizCode; + setBodyParameter("TemplateBizCode", templateBizCode); +} + +std::string PrintByTemplateRequest::getIotId()const +{ + return iotId_; +} + +void PrintByTemplateRequest::setIotId(const std::string& iotId) +{ + iotId_ = iotId; + setBodyParameter("IotId", iotId); +} + +std::string PrintByTemplateRequest::getIotInstanceId()const +{ + return iotInstanceId_; +} + +void PrintByTemplateRequest::setIotInstanceId(const std::string& iotInstanceId) +{ + iotInstanceId_ = iotInstanceId; + setBodyParameter("IotInstanceId", iotInstanceId); +} + +std::string PrintByTemplateRequest::getProductKey()const +{ + return productKey_; +} + +void PrintByTemplateRequest::setProductKey(const std::string& productKey) +{ + productKey_ = productKey; + setBodyParameter("ProductKey", productKey); +} + +std::string PrintByTemplateRequest::getParamsJsonString()const +{ + return paramsJsonString_; +} + +void PrintByTemplateRequest::setParamsJsonString(const std::string& paramsJsonString) +{ + paramsJsonString_ = paramsJsonString; + setBodyParameter("ParamsJsonString", paramsJsonString); +} + +std::string PrintByTemplateRequest::getApiProduct()const +{ + return apiProduct_; +} + +void PrintByTemplateRequest::setApiProduct(const std::string& apiProduct) +{ + apiProduct_ = apiProduct; + setBodyParameter("ApiProduct", apiProduct); +} + +std::string PrintByTemplateRequest::getApiRevision()const +{ + return apiRevision_; +} + +void PrintByTemplateRequest::setApiRevision(const std::string& apiRevision) +{ + apiRevision_ = apiRevision; + setBodyParameter("ApiRevision", apiRevision); +} + +std::string PrintByTemplateRequest::getDeviceName()const +{ + return deviceName_; +} + +void PrintByTemplateRequest::setDeviceName(const std::string& deviceName) +{ + deviceName_ = deviceName; + setBodyParameter("DeviceName", deviceName); +} + diff --git a/iot/src/model/PrintByTemplateResult.cc b/iot/src/model/PrintByTemplateResult.cc new file mode 100644 index 000000000..1a6631e9c --- /dev/null +++ b/iot/src/model/PrintByTemplateResult.cc @@ -0,0 +1,81 @@ +/* + * Copyright 2009-2017 Alibaba Cloud All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#include +#include + +using namespace AlibabaCloud::Iot; +using namespace AlibabaCloud::Iot::Model; + +PrintByTemplateResult::PrintByTemplateResult() : + ServiceResult() +{} + +PrintByTemplateResult::PrintByTemplateResult(const std::string &payload) : + ServiceResult() +{ + parse(payload); +} + +PrintByTemplateResult::~PrintByTemplateResult() +{} + +void PrintByTemplateResult::parse(const std::string &payload) +{ + Json::Reader reader; + Json::Value value; + reader.parse(payload, value); + setRequestId(value["RequestId"].asString()); + auto dataNode = value["Data"]; + if(!dataNode["Success"].isNull()) + data_.success = dataNode["Success"].asString() == "true"; + if(!dataNode["DeviceErrorCode"].isNull()) + data_.deviceErrorCode = dataNode["DeviceErrorCode"].asString(); + if(!dataNode["DeviceErrorMessage"].isNull()) + data_.deviceErrorMessage = dataNode["DeviceErrorMessage"].asString(); + if(!dataNode["Id"].isNull()) + data_.id = dataNode["Id"].asString(); + if(!dataNode["RetryCount"].isNull()) + data_.retryCount = std::stoi(dataNode["RetryCount"].asString()); + if(!value["Success"].isNull()) + success_ = value["Success"].asString() == "true"; + if(!value["Code"].isNull()) + code_ = value["Code"].asString(); + if(!value["ErrorMessage"].isNull()) + errorMessage_ = value["ErrorMessage"].asString(); + +} + +PrintByTemplateResult::Data PrintByTemplateResult::getData()const +{ + return data_; +} + +std::string PrintByTemplateResult::getErrorMessage()const +{ + return errorMessage_; +} + +std::string PrintByTemplateResult::getCode()const +{ + return code_; +} + +bool PrintByTemplateResult::getSuccess()const +{ + return success_; +} + diff --git a/iot/src/model/QueryConsumerGroupStatusResult.cc b/iot/src/model/QueryConsumerGroupStatusResult.cc index dbc14cd23..1f645491a 100644 --- a/iot/src/model/QueryConsumerGroupStatusResult.cc +++ b/iot/src/model/QueryConsumerGroupStatusResult.cc @@ -49,6 +49,10 @@ void QueryConsumerGroupStatusResult::parse(const std::string &payload) clientConnectionStatusListObject.clientIpPort = valueClientConnectionStatusListConsumerGroupClientConnectionInfo["ClientIpPort"].asString(); if(!valueClientConnectionStatusListConsumerGroupClientConnectionInfo["OnlineTime"].isNull()) clientConnectionStatusListObject.onlineTime = std::stol(valueClientConnectionStatusListConsumerGroupClientConnectionInfo["OnlineTime"].asString()); + if(!valueClientConnectionStatusListConsumerGroupClientConnectionInfo["RealTimeConsumeCountPerMinute"].isNull()) + clientConnectionStatusListObject.realTimeConsumeCountPerMinute = std::stoi(valueClientConnectionStatusListConsumerGroupClientConnectionInfo["RealTimeConsumeCountPerMinute"].asString()); + if(!valueClientConnectionStatusListConsumerGroupClientConnectionInfo["AccumulatedConsumeCountPerMinute"].isNull()) + clientConnectionStatusListObject.accumulatedConsumeCountPerMinute = std::stoi(valueClientConnectionStatusListConsumerGroupClientConnectionInfo["AccumulatedConsumeCountPerMinute"].asString()); clientConnectionStatusList_.push_back(clientConnectionStatusListObject); } if(!value["Success"].isNull()) @@ -63,6 +67,10 @@ void QueryConsumerGroupStatusResult::parse(const std::string &payload) lastConsumerTime_ = value["LastConsumerTime"].asString(); if(!value["Code"].isNull()) code_ = value["Code"].asString(); + if(!value["AccumulatedConsumeCountPerMinute"].isNull()) + accumulatedConsumeCountPerMinute_ = std::stoi(value["AccumulatedConsumeCountPerMinute"].asString()); + if(!value["RealTimeConsumeCountPerMinute"].isNull()) + realTimeConsumeCountPerMinute_ = std::stoi(value["RealTimeConsumeCountPerMinute"].asString()); } @@ -76,6 +84,11 @@ std::string QueryConsumerGroupStatusResult::getLastConsumerTime()const return lastConsumerTime_; } +int QueryConsumerGroupStatusResult::getAccumulatedConsumeCountPerMinute()const +{ + return accumulatedConsumeCountPerMinute_; +} + std::string QueryConsumerGroupStatusResult::getErrorMessage()const { return errorMessage_; @@ -91,6 +104,11 @@ bool QueryConsumerGroupStatusResult::getSuccess()const return success_; } +int QueryConsumerGroupStatusResult::getRealTimeConsumeCountPerMinute()const +{ + return realTimeConsumeCountPerMinute_; +} + int QueryConsumerGroupStatusResult::getAccumulationCount()const { return accumulationCount_;