From 08cc0d55f3fc30f59434f7c7aaf7cc871e5f2c3e Mon Sep 17 00:00:00 2001 From: sdk-team Date: Wed, 9 Jun 2021 06:54:22 +0000 Subject: [PATCH] Update TMP API, including QueryDevice, CreateThingModel, UpdateThingModel, ImportThingModelTsl, BatchPickThingModel, ListDeviceDistributeJob. --- CHANGELOG | 6 + VERSION | 2 +- iot/CMakeLists.txt | 12 ++ iot/include/alibabacloud/iot/IotClient.h | 24 ++++ .../iot/model/CancelOTATaskByJobRequest.h | 3 + .../iot/model/ConfirmOTATaskRequest.h | 60 ++++++++ .../iot/model/ConfirmOTATaskResult.h | 55 ++++++++ .../model/CreateOTADynamicUpgradeJobRequest.h | 6 + .../model/CreateOTAStaticUpgradeJobRequest.h | 6 + .../iot/model/CreateOTAVerifyJobRequest.h | 6 + .../model/ListDeviceDistributeJobRequest.h | 3 + .../iot/model/ListDeviceDistributeJobResult.h | 1 + .../ListOTAUnfinishedTaskByDeviceRequest.h | 72 ++++++++++ .../ListOTAUnfinishedTaskByDeviceResult.h | 73 ++++++++++ .../iot/model/QueryDeviceInfoRequest.h | 72 ++++++++++ .../iot/model/QueryDeviceInfoResult.h | 65 +++++++++ .../iot/model/QueryDeviceRequest.h | 3 + .../iot/model/QueryDeviceResult.h | 2 + .../iot/model/QueryOTAJobResult.h | 2 + iot/src/IotClient.cc | 108 +++++++++++++++ iot/src/model/CancelOTATaskByJobRequest.cc | 11 ++ iot/src/model/ConfirmOTATaskRequest.cc | 86 ++++++++++++ iot/src/model/ConfirmOTATaskResult.cc | 65 +++++++++ .../CreateOTADynamicUpgradeJobRequest.cc | 22 +++ .../model/CreateOTAStaticUpgradeJobRequest.cc | 22 +++ iot/src/model/CreateOTAVerifyJobRequest.cc | 22 +++ .../model/ListDeviceDistributeJobRequest.cc | 11 ++ .../model/ListDeviceDistributeJobResult.cc | 2 + .../ListOTAUnfinishedTaskByDeviceRequest.cc | 128 ++++++++++++++++++ .../ListOTAUnfinishedTaskByDeviceResult.cc | 102 ++++++++++++++ iot/src/model/QueryDeviceInfoRequest.cc | 128 ++++++++++++++++++ iot/src/model/QueryDeviceInfoResult.cc | 81 +++++++++++ iot/src/model/QueryDeviceRequest.cc | 11 ++ iot/src/model/QueryDeviceResult.cc | 7 + iot/src/model/QueryOTAJobResult.cc | 4 + 35 files changed, 1282 insertions(+), 1 deletion(-) create mode 100644 iot/include/alibabacloud/iot/model/ConfirmOTATaskRequest.h create mode 100644 iot/include/alibabacloud/iot/model/ConfirmOTATaskResult.h create mode 100644 iot/include/alibabacloud/iot/model/ListOTAUnfinishedTaskByDeviceRequest.h create mode 100644 iot/include/alibabacloud/iot/model/ListOTAUnfinishedTaskByDeviceResult.h create mode 100644 iot/include/alibabacloud/iot/model/QueryDeviceInfoRequest.h create mode 100644 iot/include/alibabacloud/iot/model/QueryDeviceInfoResult.h create mode 100644 iot/src/model/ConfirmOTATaskRequest.cc create mode 100644 iot/src/model/ConfirmOTATaskResult.cc create mode 100644 iot/src/model/ListOTAUnfinishedTaskByDeviceRequest.cc create mode 100644 iot/src/model/ListOTAUnfinishedTaskByDeviceResult.cc create mode 100644 iot/src/model/QueryDeviceInfoRequest.cc create mode 100644 iot/src/model/QueryDeviceInfoResult.cc diff --git a/CHANGELOG b/CHANGELOG index ab6989d70..068c2ca98 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -1,3 +1,9 @@ +2021-06-09 Version: 1.36.778 +- Update TMP API, including QueryDevice, CreateThingModel, UpdateThingModel, ImportThingModelTsl, BatchPickThingModel, ListDeviceDistributeJob. +- Add TMP API, including QueryDeviceInfo. +- Update OTA API, including CreateOTAVerifyJob, CreateOTAStaticUpgradeJob, CreateOTADynamicUpgradeJob, CancelOTATaskByJob, QueryOTAJob. +- Add OTA API, including ListOTAUnfinishedTaskByDevice,ConfirmOTATask. + 2021-06-09 Version: 1.36.777 - Public beta version. - Add Api Overseas. diff --git a/VERSION b/VERSION index ed2c02d2e..a82329b3d 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -1.36.777 \ No newline at end of file +1.36.778 \ No newline at end of file diff --git a/iot/CMakeLists.txt b/iot/CMakeLists.txt index d6fd7d16c..565e0fcfb 100644 --- a/iot/CMakeLists.txt +++ b/iot/CMakeLists.txt @@ -99,6 +99,8 @@ set(iot_public_header_model include/alibabacloud/iot/model/ClearEdgeInstanceDriverConfigsResult.h include/alibabacloud/iot/model/CloseEdgeInstanceDeploymentRequest.h include/alibabacloud/iot/model/CloseEdgeInstanceDeploymentResult.h + include/alibabacloud/iot/model/ConfirmOTATaskRequest.h + include/alibabacloud/iot/model/ConfirmOTATaskResult.h include/alibabacloud/iot/model/CopyThingModelRequest.h include/alibabacloud/iot/model/CopyThingModelResult.h include/alibabacloud/iot/model/CreateConsumerGroupRequest.h @@ -313,6 +315,8 @@ set(iot_public_header_model include/alibabacloud/iot/model/ListOTAModuleVersionsByDeviceResult.h include/alibabacloud/iot/model/ListOTATaskByJobRequest.h include/alibabacloud/iot/model/ListOTATaskByJobResult.h + include/alibabacloud/iot/model/ListOTAUnfinishedTaskByDeviceRequest.h + include/alibabacloud/iot/model/ListOTAUnfinishedTaskByDeviceResult.h include/alibabacloud/iot/model/ListProductByTagsRequest.h include/alibabacloud/iot/model/ListProductByTagsResult.h include/alibabacloud/iot/model/ListProductTagsRequest.h @@ -393,6 +397,8 @@ set(iot_public_header_model include/alibabacloud/iot/model/QueryDeviceGroupListResult.h include/alibabacloud/iot/model/QueryDeviceGroupTagListRequest.h include/alibabacloud/iot/model/QueryDeviceGroupTagListResult.h + include/alibabacloud/iot/model/QueryDeviceInfoRequest.h + include/alibabacloud/iot/model/QueryDeviceInfoResult.h include/alibabacloud/iot/model/QueryDeviceListByDeviceGroupRequest.h include/alibabacloud/iot/model/QueryDeviceListByDeviceGroupResult.h include/alibabacloud/iot/model/QueryDeviceOriginalEventDataRequest.h @@ -680,6 +686,8 @@ set(iot_src src/model/ClearEdgeInstanceDriverConfigsResult.cc src/model/CloseEdgeInstanceDeploymentRequest.cc src/model/CloseEdgeInstanceDeploymentResult.cc + src/model/ConfirmOTATaskRequest.cc + src/model/ConfirmOTATaskResult.cc src/model/CopyThingModelRequest.cc src/model/CopyThingModelResult.cc src/model/CreateConsumerGroupRequest.cc @@ -894,6 +902,8 @@ set(iot_src src/model/ListOTAModuleVersionsByDeviceResult.cc src/model/ListOTATaskByJobRequest.cc src/model/ListOTATaskByJobResult.cc + src/model/ListOTAUnfinishedTaskByDeviceRequest.cc + src/model/ListOTAUnfinishedTaskByDeviceResult.cc src/model/ListProductByTagsRequest.cc src/model/ListProductByTagsResult.cc src/model/ListProductTagsRequest.cc @@ -974,6 +984,8 @@ set(iot_src src/model/QueryDeviceGroupListResult.cc src/model/QueryDeviceGroupTagListRequest.cc src/model/QueryDeviceGroupTagListResult.cc + src/model/QueryDeviceInfoRequest.cc + src/model/QueryDeviceInfoResult.cc src/model/QueryDeviceListByDeviceGroupRequest.cc src/model/QueryDeviceListByDeviceGroupResult.cc src/model/QueryDeviceOriginalEventDataRequest.cc diff --git a/iot/include/alibabacloud/iot/IotClient.h b/iot/include/alibabacloud/iot/IotClient.h index ec156cfd0..57b4659d9 100644 --- a/iot/include/alibabacloud/iot/IotClient.h +++ b/iot/include/alibabacloud/iot/IotClient.h @@ -100,6 +100,8 @@ #include "model/ClearEdgeInstanceDriverConfigsResult.h" #include "model/CloseEdgeInstanceDeploymentRequest.h" #include "model/CloseEdgeInstanceDeploymentResult.h" +#include "model/ConfirmOTATaskRequest.h" +#include "model/ConfirmOTATaskResult.h" #include "model/CopyThingModelRequest.h" #include "model/CopyThingModelResult.h" #include "model/CreateConsumerGroupRequest.h" @@ -314,6 +316,8 @@ #include "model/ListOTAModuleVersionsByDeviceResult.h" #include "model/ListOTATaskByJobRequest.h" #include "model/ListOTATaskByJobResult.h" +#include "model/ListOTAUnfinishedTaskByDeviceRequest.h" +#include "model/ListOTAUnfinishedTaskByDeviceResult.h" #include "model/ListProductByTagsRequest.h" #include "model/ListProductByTagsResult.h" #include "model/ListProductTagsRequest.h" @@ -394,6 +398,8 @@ #include "model/QueryDeviceGroupListResult.h" #include "model/QueryDeviceGroupTagListRequest.h" #include "model/QueryDeviceGroupTagListResult.h" +#include "model/QueryDeviceInfoRequest.h" +#include "model/QueryDeviceInfoResult.h" #include "model/QueryDeviceListByDeviceGroupRequest.h" #include "model/QueryDeviceListByDeviceGroupResult.h" #include "model/QueryDeviceOriginalEventDataRequest.h" @@ -726,6 +732,9 @@ namespace AlibabaCloud typedef Outcome CloseEdgeInstanceDeploymentOutcome; typedef std::future CloseEdgeInstanceDeploymentOutcomeCallable; typedef std::function&)> CloseEdgeInstanceDeploymentAsyncHandler; + typedef Outcome ConfirmOTATaskOutcome; + typedef std::future ConfirmOTATaskOutcomeCallable; + typedef std::function&)> ConfirmOTATaskAsyncHandler; typedef Outcome CopyThingModelOutcome; typedef std::future CopyThingModelOutcomeCallable; typedef std::function&)> CopyThingModelAsyncHandler; @@ -1047,6 +1056,9 @@ namespace AlibabaCloud typedef Outcome ListOTATaskByJobOutcome; typedef std::future ListOTATaskByJobOutcomeCallable; typedef std::function&)> ListOTATaskByJobAsyncHandler; + typedef Outcome ListOTAUnfinishedTaskByDeviceOutcome; + typedef std::future ListOTAUnfinishedTaskByDeviceOutcomeCallable; + typedef std::function&)> ListOTAUnfinishedTaskByDeviceAsyncHandler; typedef Outcome ListProductByTagsOutcome; typedef std::future ListProductByTagsOutcomeCallable; typedef std::function&)> ListProductByTagsAsyncHandler; @@ -1167,6 +1179,9 @@ namespace AlibabaCloud typedef Outcome QueryDeviceGroupTagListOutcome; typedef std::future QueryDeviceGroupTagListOutcomeCallable; typedef std::function&)> QueryDeviceGroupTagListAsyncHandler; + typedef Outcome QueryDeviceInfoOutcome; + typedef std::future QueryDeviceInfoOutcomeCallable; + typedef std::function&)> QueryDeviceInfoAsyncHandler; typedef Outcome QueryDeviceListByDeviceGroupOutcome; typedef std::future QueryDeviceListByDeviceGroupOutcomeCallable; typedef std::function&)> QueryDeviceListByDeviceGroupAsyncHandler; @@ -1598,6 +1613,9 @@ namespace AlibabaCloud CloseEdgeInstanceDeploymentOutcome closeEdgeInstanceDeployment(const Model::CloseEdgeInstanceDeploymentRequest &request)const; void closeEdgeInstanceDeploymentAsync(const Model::CloseEdgeInstanceDeploymentRequest& request, const CloseEdgeInstanceDeploymentAsyncHandler& handler, const std::shared_ptr& context = nullptr) const; CloseEdgeInstanceDeploymentOutcomeCallable closeEdgeInstanceDeploymentCallable(const Model::CloseEdgeInstanceDeploymentRequest& request) const; + ConfirmOTATaskOutcome confirmOTATask(const Model::ConfirmOTATaskRequest &request)const; + void confirmOTATaskAsync(const Model::ConfirmOTATaskRequest& request, const ConfirmOTATaskAsyncHandler& handler, const std::shared_ptr& context = nullptr) const; + ConfirmOTATaskOutcomeCallable confirmOTATaskCallable(const Model::ConfirmOTATaskRequest& request) const; CopyThingModelOutcome copyThingModel(const Model::CopyThingModelRequest &request)const; void copyThingModelAsync(const Model::CopyThingModelRequest& request, const CopyThingModelAsyncHandler& handler, const std::shared_ptr& context = nullptr) const; CopyThingModelOutcomeCallable copyThingModelCallable(const Model::CopyThingModelRequest& request) const; @@ -1919,6 +1937,9 @@ namespace AlibabaCloud ListOTATaskByJobOutcome listOTATaskByJob(const Model::ListOTATaskByJobRequest &request)const; void listOTATaskByJobAsync(const Model::ListOTATaskByJobRequest& request, const ListOTATaskByJobAsyncHandler& handler, const std::shared_ptr& context = nullptr) const; ListOTATaskByJobOutcomeCallable listOTATaskByJobCallable(const Model::ListOTATaskByJobRequest& request) const; + ListOTAUnfinishedTaskByDeviceOutcome listOTAUnfinishedTaskByDevice(const Model::ListOTAUnfinishedTaskByDeviceRequest &request)const; + void listOTAUnfinishedTaskByDeviceAsync(const Model::ListOTAUnfinishedTaskByDeviceRequest& request, const ListOTAUnfinishedTaskByDeviceAsyncHandler& handler, const std::shared_ptr& context = nullptr) const; + ListOTAUnfinishedTaskByDeviceOutcomeCallable listOTAUnfinishedTaskByDeviceCallable(const Model::ListOTAUnfinishedTaskByDeviceRequest& request) const; ListProductByTagsOutcome listProductByTags(const Model::ListProductByTagsRequest &request)const; void listProductByTagsAsync(const Model::ListProductByTagsRequest& request, const ListProductByTagsAsyncHandler& handler, const std::shared_ptr& context = nullptr) const; ListProductByTagsOutcomeCallable listProductByTagsCallable(const Model::ListProductByTagsRequest& request) const; @@ -2039,6 +2060,9 @@ namespace AlibabaCloud QueryDeviceGroupTagListOutcome queryDeviceGroupTagList(const Model::QueryDeviceGroupTagListRequest &request)const; void queryDeviceGroupTagListAsync(const Model::QueryDeviceGroupTagListRequest& request, const QueryDeviceGroupTagListAsyncHandler& handler, const std::shared_ptr& context = nullptr) const; QueryDeviceGroupTagListOutcomeCallable queryDeviceGroupTagListCallable(const Model::QueryDeviceGroupTagListRequest& request) const; + QueryDeviceInfoOutcome queryDeviceInfo(const Model::QueryDeviceInfoRequest &request)const; + void queryDeviceInfoAsync(const Model::QueryDeviceInfoRequest& request, const QueryDeviceInfoAsyncHandler& handler, const std::shared_ptr& context = nullptr) const; + QueryDeviceInfoOutcomeCallable queryDeviceInfoCallable(const Model::QueryDeviceInfoRequest& request) const; QueryDeviceListByDeviceGroupOutcome queryDeviceListByDeviceGroup(const Model::QueryDeviceListByDeviceGroupRequest &request)const; void queryDeviceListByDeviceGroupAsync(const Model::QueryDeviceListByDeviceGroupRequest& request, const QueryDeviceListByDeviceGroupAsyncHandler& handler, const std::shared_ptr& context = nullptr) const; QueryDeviceListByDeviceGroupOutcomeCallable queryDeviceListByDeviceGroupCallable(const Model::QueryDeviceListByDeviceGroupRequest& request) const; diff --git a/iot/include/alibabacloud/iot/model/CancelOTATaskByJobRequest.h b/iot/include/alibabacloud/iot/model/CancelOTATaskByJobRequest.h index 31d706512..7df01f294 100644 --- a/iot/include/alibabacloud/iot/model/CancelOTATaskByJobRequest.h +++ b/iot/include/alibabacloud/iot/model/CancelOTATaskByJobRequest.h @@ -41,6 +41,8 @@ namespace AlibabaCloud void setAccessKeyId(const std::string& accessKeyId); std::string getJobId()const; void setJobId(const std::string& jobId); + bool getCancelUnconfirmedTask()const; + void setCancelUnconfirmedTask(bool cancelUnconfirmedTask); std::string getIotInstanceId()const; void setIotInstanceId(const std::string& iotInstanceId); bool getCancelQueuedTask()const; @@ -58,6 +60,7 @@ namespace AlibabaCloud bool cancelScheduledTask_; std::string accessKeyId_; std::string jobId_; + bool cancelUnconfirmedTask_; std::string iotInstanceId_; bool cancelQueuedTask_; bool cancelInProgressTask_; diff --git a/iot/include/alibabacloud/iot/model/ConfirmOTATaskRequest.h b/iot/include/alibabacloud/iot/model/ConfirmOTATaskRequest.h new file mode 100644 index 000000000..bf539ff79 --- /dev/null +++ b/iot/include/alibabacloud/iot/model/ConfirmOTATaskRequest.h @@ -0,0 +1,60 @@ +/* + * 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_CONFIRMOTATASKREQUEST_H_ +#define ALIBABACLOUD_IOT_MODEL_CONFIRMOTATASKREQUEST_H_ + +#include +#include +#include +#include + +namespace AlibabaCloud +{ + namespace Iot + { + namespace Model + { + class ALIBABACLOUD_IOT_EXPORT ConfirmOTATaskRequest : public RpcServiceRequest + { + + public: + ConfirmOTATaskRequest(); + ~ConfirmOTATaskRequest(); + + std::string getAccessKeyId()const; + void setAccessKeyId(const std::string& accessKeyId); + std::string getIotInstanceId()const; + void setIotInstanceId(const std::string& iotInstanceId); + std::vector getTaskId()const; + void setTaskId(const std::vector& taskId); + std::string getApiProduct()const; + void setApiProduct(const std::string& apiProduct); + std::string getApiRevision()const; + void setApiRevision(const std::string& apiRevision); + + private: + std::string accessKeyId_; + std::string iotInstanceId_; + std::vector taskId_; + std::string apiProduct_; + std::string apiRevision_; + + }; + } + } +} +#endif // !ALIBABACLOUD_IOT_MODEL_CONFIRMOTATASKREQUEST_H_ \ No newline at end of file diff --git a/iot/include/alibabacloud/iot/model/ConfirmOTATaskResult.h b/iot/include/alibabacloud/iot/model/ConfirmOTATaskResult.h new file mode 100644 index 000000000..6ade2af28 --- /dev/null +++ b/iot/include/alibabacloud/iot/model/ConfirmOTATaskResult.h @@ -0,0 +1,55 @@ +/* + * 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_CONFIRMOTATASKRESULT_H_ +#define ALIBABACLOUD_IOT_MODEL_CONFIRMOTATASKRESULT_H_ + +#include +#include +#include +#include +#include + +namespace AlibabaCloud +{ + namespace Iot + { + namespace Model + { + class ALIBABACLOUD_IOT_EXPORT ConfirmOTATaskResult : public ServiceResult + { + public: + + + ConfirmOTATaskResult(); + explicit ConfirmOTATaskResult(const std::string &payload); + ~ConfirmOTATaskResult(); + std::string getErrorMessage()const; + std::string getCode()const; + bool getSuccess()const; + + protected: + void parse(const std::string &payload); + private: + std::string errorMessage_; + std::string code_; + bool success_; + + }; + } + } +} +#endif // !ALIBABACLOUD_IOT_MODEL_CONFIRMOTATASKRESULT_H_ \ No newline at end of file diff --git a/iot/include/alibabacloud/iot/model/CreateOTADynamicUpgradeJobRequest.h b/iot/include/alibabacloud/iot/model/CreateOTADynamicUpgradeJobRequest.h index 1482eda5a..cd9267558 100644 --- a/iot/include/alibabacloud/iot/model/CreateOTADynamicUpgradeJobRequest.h +++ b/iot/include/alibabacloud/iot/model/CreateOTADynamicUpgradeJobRequest.h @@ -47,8 +47,12 @@ namespace AlibabaCloud void setRetryCount(int retryCount); int getTimeoutInMinutes()const; void setTimeoutInMinutes(int timeoutInMinutes); + bool getNeedConfirm()const; + void setNeedConfirm(bool needConfirm); std::string getAccessKeyId()const; void setAccessKeyId(const std::string& accessKeyId); + bool getNeedPush()const; + void setNeedPush(bool needPush); std::string getIotInstanceId()const; void setIotInstanceId(const std::string& iotInstanceId); std::vector getTag()const; @@ -74,7 +78,9 @@ namespace AlibabaCloud int dynamicMode_; int retryCount_; int timeoutInMinutes_; + bool needConfirm_; std::string accessKeyId_; + bool needPush_; std::string iotInstanceId_; std::vector tag_; std::string firmwareId_; diff --git a/iot/include/alibabacloud/iot/model/CreateOTAStaticUpgradeJobRequest.h b/iot/include/alibabacloud/iot/model/CreateOTAStaticUpgradeJobRequest.h index a399ddb70..2937aaabc 100644 --- a/iot/include/alibabacloud/iot/model/CreateOTAStaticUpgradeJobRequest.h +++ b/iot/include/alibabacloud/iot/model/CreateOTAStaticUpgradeJobRequest.h @@ -45,8 +45,12 @@ namespace AlibabaCloud void setRetryCount(int retryCount); int getTimeoutInMinutes()const; void setTimeoutInMinutes(int timeoutInMinutes); + bool getNeedConfirm()const; + void setNeedConfirm(bool needConfirm); std::string getAccessKeyId()const; void setAccessKeyId(const std::string& accessKeyId); + bool getNeedPush()const; + void setNeedPush(bool needPush); std::string getIotInstanceId()const; void setIotInstanceId(const std::string& iotInstanceId); std::string getTargetSelection()const; @@ -83,7 +87,9 @@ namespace AlibabaCloud private: int retryCount_; int timeoutInMinutes_; + bool needConfirm_; std::string accessKeyId_; + bool needPush_; std::string iotInstanceId_; std::string targetSelection_; long scheduleFinishTime_; diff --git a/iot/include/alibabacloud/iot/model/CreateOTAVerifyJobRequest.h b/iot/include/alibabacloud/iot/model/CreateOTAVerifyJobRequest.h index e8859ead3..c16c04153 100644 --- a/iot/include/alibabacloud/iot/model/CreateOTAVerifyJobRequest.h +++ b/iot/include/alibabacloud/iot/model/CreateOTAVerifyJobRequest.h @@ -37,8 +37,12 @@ namespace AlibabaCloud int getTimeoutInMinutes()const; void setTimeoutInMinutes(int timeoutInMinutes); + bool getNeedConfirm()const; + void setNeedConfirm(bool needConfirm); std::string getAccessKeyId()const; void setAccessKeyId(const std::string& accessKeyId); + bool getNeedPush()const; + void setNeedPush(bool needPush); std::string getIotInstanceId()const; void setIotInstanceId(const std::string& iotInstanceId); std::string getFirmwareId()const; @@ -54,7 +58,9 @@ namespace AlibabaCloud private: int timeoutInMinutes_; + bool needConfirm_; std::string accessKeyId_; + bool needPush_; std::string iotInstanceId_; std::string firmwareId_; std::string productKey_; diff --git a/iot/include/alibabacloud/iot/model/ListDeviceDistributeJobRequest.h b/iot/include/alibabacloud/iot/model/ListDeviceDistributeJobRequest.h index 2e60a8991..dbcb562a3 100644 --- a/iot/include/alibabacloud/iot/model/ListDeviceDistributeJobRequest.h +++ b/iot/include/alibabacloud/iot/model/ListDeviceDistributeJobRequest.h @@ -37,6 +37,8 @@ namespace AlibabaCloud std::string getJobId()const; void setJobId(const std::string& jobId); + std::string getNextToken()const; + void setNextToken(const std::string& nextToken); int getPageSize()const; void setPageSize(int pageSize); int getCurrentPage()const; @@ -52,6 +54,7 @@ namespace AlibabaCloud private: std::string jobId_; + std::string nextToken_; int pageSize_; int currentPage_; std::string apiProduct_; diff --git a/iot/include/alibabacloud/iot/model/ListDeviceDistributeJobResult.h b/iot/include/alibabacloud/iot/model/ListDeviceDistributeJobResult.h index 3611405db..1a2542044 100644 --- a/iot/include/alibabacloud/iot/model/ListDeviceDistributeJobResult.h +++ b/iot/include/alibabacloud/iot/model/ListDeviceDistributeJobResult.h @@ -55,6 +55,7 @@ namespace AlibabaCloud std::string jobId; std::string productKey; }; + std::string nextToken; std::vector jobInfo; int total; }; diff --git a/iot/include/alibabacloud/iot/model/ListOTAUnfinishedTaskByDeviceRequest.h b/iot/include/alibabacloud/iot/model/ListOTAUnfinishedTaskByDeviceRequest.h new file mode 100644 index 000000000..35dddab37 --- /dev/null +++ b/iot/include/alibabacloud/iot/model/ListOTAUnfinishedTaskByDeviceRequest.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_LISTOTAUNFINISHEDTASKBYDEVICEREQUEST_H_ +#define ALIBABACLOUD_IOT_MODEL_LISTOTAUNFINISHEDTASKBYDEVICEREQUEST_H_ + +#include +#include +#include +#include + +namespace AlibabaCloud +{ + namespace Iot + { + namespace Model + { + class ALIBABACLOUD_IOT_EXPORT ListOTAUnfinishedTaskByDeviceRequest : public RpcServiceRequest + { + + public: + ListOTAUnfinishedTaskByDeviceRequest(); + ~ListOTAUnfinishedTaskByDeviceRequest(); + + std::string getAccessKeyId()const; + void setAccessKeyId(const std::string& accessKeyId); + std::string getTaskStatus()const; + void setTaskStatus(const std::string& taskStatus); + std::string getIotId()const; + void setIotId(const std::string& iotId); + std::string getIotInstanceId()const; + void setIotInstanceId(const std::string& iotInstanceId); + std::string getModuleName()const; + void setModuleName(const std::string& moduleName); + std::string getProductKey()const; + void setProductKey(const std::string& productKey); + 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 accessKeyId_; + std::string taskStatus_; + std::string iotId_; + std::string iotInstanceId_; + std::string moduleName_; + std::string productKey_; + std::string apiProduct_; + std::string apiRevision_; + std::string deviceName_; + + }; + } + } +} +#endif // !ALIBABACLOUD_IOT_MODEL_LISTOTAUNFINISHEDTASKBYDEVICEREQUEST_H_ \ No newline at end of file diff --git a/iot/include/alibabacloud/iot/model/ListOTAUnfinishedTaskByDeviceResult.h b/iot/include/alibabacloud/iot/model/ListOTAUnfinishedTaskByDeviceResult.h new file mode 100644 index 000000000..2597f7f88 --- /dev/null +++ b/iot/include/alibabacloud/iot/model/ListOTAUnfinishedTaskByDeviceResult.h @@ -0,0 +1,73 @@ +/* + * 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_LISTOTAUNFINISHEDTASKBYDEVICERESULT_H_ +#define ALIBABACLOUD_IOT_MODEL_LISTOTAUNFINISHEDTASKBYDEVICERESULT_H_ + +#include +#include +#include +#include +#include + +namespace AlibabaCloud +{ + namespace Iot + { + namespace Model + { + class ALIBABACLOUD_IOT_EXPORT ListOTAUnfinishedTaskByDeviceResult : public ServiceResult + { + public: + struct SimpleOTATaskInfo + { + std::string taskId; + std::string productName; + std::string moduleName; + std::string firmwareId; + std::string taskStatus; + std::string iotId; + std::string utcCreate; + std::string utcModified; + std::string destVersion; + std::string productKey; + std::string jobId; + std::string deviceName; + std::string srcVersion; + }; + + + ListOTAUnfinishedTaskByDeviceResult(); + explicit ListOTAUnfinishedTaskByDeviceResult(const std::string &payload); + ~ListOTAUnfinishedTaskByDeviceResult(); + std::vector getData()const; + std::string getErrorMessage()const; + std::string getCode()const; + bool getSuccess()const; + + protected: + void parse(const std::string &payload); + private: + std::vector data_; + std::string errorMessage_; + std::string code_; + bool success_; + + }; + } + } +} +#endif // !ALIBABACLOUD_IOT_MODEL_LISTOTAUNFINISHEDTASKBYDEVICERESULT_H_ \ No newline at end of file diff --git a/iot/include/alibabacloud/iot/model/QueryDeviceInfoRequest.h b/iot/include/alibabacloud/iot/model/QueryDeviceInfoRequest.h new file mode 100644 index 000000000..46850fd12 --- /dev/null +++ b/iot/include/alibabacloud/iot/model/QueryDeviceInfoRequest.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_QUERYDEVICEINFOREQUEST_H_ +#define ALIBABACLOUD_IOT_MODEL_QUERYDEVICEINFOREQUEST_H_ + +#include +#include +#include +#include + +namespace AlibabaCloud +{ + namespace Iot + { + namespace Model + { + class ALIBABACLOUD_IOT_EXPORT QueryDeviceInfoRequest : public RpcServiceRequest + { + + public: + QueryDeviceInfoRequest(); + ~QueryDeviceInfoRequest(); + + 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 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 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 realTenantId_; + std::string accessKeyId_; + std::string realTripartiteKey_; + std::string iotId_; + std::string iotInstanceId_; + std::string productKey_; + std::string apiProduct_; + std::string apiRevision_; + std::string deviceName_; + + }; + } + } +} +#endif // !ALIBABACLOUD_IOT_MODEL_QUERYDEVICEINFOREQUEST_H_ \ No newline at end of file diff --git a/iot/include/alibabacloud/iot/model/QueryDeviceInfoResult.h b/iot/include/alibabacloud/iot/model/QueryDeviceInfoResult.h new file mode 100644 index 000000000..637485693 --- /dev/null +++ b/iot/include/alibabacloud/iot/model/QueryDeviceInfoResult.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_QUERYDEVICEINFORESULT_H_ +#define ALIBABACLOUD_IOT_MODEL_QUERYDEVICEINFORESULT_H_ + +#include +#include +#include +#include +#include + +namespace AlibabaCloud +{ + namespace Iot + { + namespace Model + { + class ALIBABACLOUD_IOT_EXPORT QueryDeviceInfoResult : public ServiceResult + { + public: + struct Data + { + std::string iotId; + std::string deviceSecret; + std::string productKey; + std::string deviceName; + std::string nickname; + }; + + + QueryDeviceInfoResult(); + explicit QueryDeviceInfoResult(const std::string &payload); + ~QueryDeviceInfoResult(); + 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_QUERYDEVICEINFORESULT_H_ \ No newline at end of file diff --git a/iot/include/alibabacloud/iot/model/QueryDeviceRequest.h b/iot/include/alibabacloud/iot/model/QueryDeviceRequest.h index f092c19cd..8e2752aee 100644 --- a/iot/include/alibabacloud/iot/model/QueryDeviceRequest.h +++ b/iot/include/alibabacloud/iot/model/QueryDeviceRequest.h @@ -41,6 +41,8 @@ namespace AlibabaCloud void setAccessKeyId(const std::string& accessKeyId); std::string getRealTripartiteKey()const; void setRealTripartiteKey(const std::string& realTripartiteKey); + std::string getNextToken()const; + void setNextToken(const std::string& nextToken); std::string getIotInstanceId()const; void setIotInstanceId(const std::string& iotInstanceId); int getPageSize()const; @@ -58,6 +60,7 @@ namespace AlibabaCloud std::string realTenantId_; std::string accessKeyId_; std::string realTripartiteKey_; + std::string nextToken_; std::string iotInstanceId_; int pageSize_; int currentPage_; diff --git a/iot/include/alibabacloud/iot/model/QueryDeviceResult.h b/iot/include/alibabacloud/iot/model/QueryDeviceResult.h index dff0b0064..8561a78e9 100644 --- a/iot/include/alibabacloud/iot/model/QueryDeviceResult.h +++ b/iot/include/alibabacloud/iot/model/QueryDeviceResult.h @@ -54,6 +54,7 @@ namespace AlibabaCloud ~QueryDeviceResult(); int getPageSize()const; int getPageCount()const; + std::string getNextToken()const; int getTotal()const; std::vector getData()const; int getPage()const; @@ -66,6 +67,7 @@ namespace AlibabaCloud private: int pageSize_; int pageCount_; + std::string nextToken_; int total_; std::vector data_; int page_; diff --git a/iot/include/alibabacloud/iot/model/QueryOTAJobResult.h b/iot/include/alibabacloud/iot/model/QueryOTAJobResult.h index 8908ed0bc..f0a0e0265 100644 --- a/iot/include/alibabacloud/iot/model/QueryOTAJobResult.h +++ b/iot/include/alibabacloud/iot/model/QueryOTAJobResult.h @@ -40,6 +40,7 @@ namespace AlibabaCloud std::string key; }; std::string utcEndTime; + bool needPush; int overwriteMode; std::string firmwareId; std::string name; @@ -55,6 +56,7 @@ namespace AlibabaCloud std::string utcStartTime; std::string utcScheduleFinishTime; std::vector srcVersions; + bool needConfirm; std::string jobDesc; std::string jobType; std::string utcCreate; diff --git a/iot/src/IotClient.cc b/iot/src/IotClient.cc index 083d08cab..bd99f93c4 100644 --- a/iot/src/IotClient.cc +++ b/iot/src/IotClient.cc @@ -1455,6 +1455,42 @@ IotClient::CloseEdgeInstanceDeploymentOutcomeCallable IotClient::closeEdgeInstan return task->get_future(); } +IotClient::ConfirmOTATaskOutcome IotClient::confirmOTATask(const ConfirmOTATaskRequest &request) const +{ + auto endpointOutcome = endpointProvider_->getEndpoint(); + if (!endpointOutcome.isSuccess()) + return ConfirmOTATaskOutcome(endpointOutcome.error()); + + auto outcome = makeRequest(endpointOutcome.result(), request); + + if (outcome.isSuccess()) + return ConfirmOTATaskOutcome(ConfirmOTATaskResult(outcome.result())); + else + return ConfirmOTATaskOutcome(outcome.error()); +} + +void IotClient::confirmOTATaskAsync(const ConfirmOTATaskRequest& request, const ConfirmOTATaskAsyncHandler& handler, const std::shared_ptr& context) const +{ + auto fn = [this, request, handler, context]() + { + handler(this, request, confirmOTATask(request), context); + }; + + asyncExecute(new Runnable(fn)); +} + +IotClient::ConfirmOTATaskOutcomeCallable IotClient::confirmOTATaskCallable(const ConfirmOTATaskRequest &request) const +{ + auto task = std::make_shared>( + [this, request]() + { + return this->confirmOTATask(request); + }); + + asyncExecute(new Runnable([task]() { (*task)(); })); + return task->get_future(); +} + IotClient::CopyThingModelOutcome IotClient::copyThingModel(const CopyThingModelRequest &request) const { auto endpointOutcome = endpointProvider_->getEndpoint(); @@ -5307,6 +5343,42 @@ IotClient::ListOTATaskByJobOutcomeCallable IotClient::listOTATaskByJobCallable(c return task->get_future(); } +IotClient::ListOTAUnfinishedTaskByDeviceOutcome IotClient::listOTAUnfinishedTaskByDevice(const ListOTAUnfinishedTaskByDeviceRequest &request) const +{ + auto endpointOutcome = endpointProvider_->getEndpoint(); + if (!endpointOutcome.isSuccess()) + return ListOTAUnfinishedTaskByDeviceOutcome(endpointOutcome.error()); + + auto outcome = makeRequest(endpointOutcome.result(), request); + + if (outcome.isSuccess()) + return ListOTAUnfinishedTaskByDeviceOutcome(ListOTAUnfinishedTaskByDeviceResult(outcome.result())); + else + return ListOTAUnfinishedTaskByDeviceOutcome(outcome.error()); +} + +void IotClient::listOTAUnfinishedTaskByDeviceAsync(const ListOTAUnfinishedTaskByDeviceRequest& request, const ListOTAUnfinishedTaskByDeviceAsyncHandler& handler, const std::shared_ptr& context) const +{ + auto fn = [this, request, handler, context]() + { + handler(this, request, listOTAUnfinishedTaskByDevice(request), context); + }; + + asyncExecute(new Runnable(fn)); +} + +IotClient::ListOTAUnfinishedTaskByDeviceOutcomeCallable IotClient::listOTAUnfinishedTaskByDeviceCallable(const ListOTAUnfinishedTaskByDeviceRequest &request) const +{ + auto task = std::make_shared>( + [this, request]() + { + return this->listOTAUnfinishedTaskByDevice(request); + }); + + asyncExecute(new Runnable([task]() { (*task)(); })); + return task->get_future(); +} + IotClient::ListProductByTagsOutcome IotClient::listProductByTags(const ListProductByTagsRequest &request) const { auto endpointOutcome = endpointProvider_->getEndpoint(); @@ -6747,6 +6819,42 @@ IotClient::QueryDeviceGroupTagListOutcomeCallable IotClient::queryDeviceGroupTag return task->get_future(); } +IotClient::QueryDeviceInfoOutcome IotClient::queryDeviceInfo(const QueryDeviceInfoRequest &request) const +{ + auto endpointOutcome = endpointProvider_->getEndpoint(); + if (!endpointOutcome.isSuccess()) + return QueryDeviceInfoOutcome(endpointOutcome.error()); + + auto outcome = makeRequest(endpointOutcome.result(), request); + + if (outcome.isSuccess()) + return QueryDeviceInfoOutcome(QueryDeviceInfoResult(outcome.result())); + else + return QueryDeviceInfoOutcome(outcome.error()); +} + +void IotClient::queryDeviceInfoAsync(const QueryDeviceInfoRequest& request, const QueryDeviceInfoAsyncHandler& handler, const std::shared_ptr& context) const +{ + auto fn = [this, request, handler, context]() + { + handler(this, request, queryDeviceInfo(request), context); + }; + + asyncExecute(new Runnable(fn)); +} + +IotClient::QueryDeviceInfoOutcomeCallable IotClient::queryDeviceInfoCallable(const QueryDeviceInfoRequest &request) const +{ + auto task = std::make_shared>( + [this, request]() + { + return this->queryDeviceInfo(request); + }); + + asyncExecute(new Runnable([task]() { (*task)(); })); + return task->get_future(); +} + IotClient::QueryDeviceListByDeviceGroupOutcome IotClient::queryDeviceListByDeviceGroup(const QueryDeviceListByDeviceGroupRequest &request) const { auto endpointOutcome = endpointProvider_->getEndpoint(); diff --git a/iot/src/model/CancelOTATaskByJobRequest.cc b/iot/src/model/CancelOTATaskByJobRequest.cc index 2e7241f88..f0e8afc16 100644 --- a/iot/src/model/CancelOTATaskByJobRequest.cc +++ b/iot/src/model/CancelOTATaskByJobRequest.cc @@ -60,6 +60,17 @@ void CancelOTATaskByJobRequest::setJobId(const std::string& jobId) setParameter("JobId", jobId); } +bool CancelOTATaskByJobRequest::getCancelUnconfirmedTask()const +{ + return cancelUnconfirmedTask_; +} + +void CancelOTATaskByJobRequest::setCancelUnconfirmedTask(bool cancelUnconfirmedTask) +{ + cancelUnconfirmedTask_ = cancelUnconfirmedTask; + setParameter("CancelUnconfirmedTask", cancelUnconfirmedTask ? "true" : "false"); +} + std::string CancelOTATaskByJobRequest::getIotInstanceId()const { return iotInstanceId_; diff --git a/iot/src/model/ConfirmOTATaskRequest.cc b/iot/src/model/ConfirmOTATaskRequest.cc new file mode 100644 index 000000000..1132c71f0 --- /dev/null +++ b/iot/src/model/ConfirmOTATaskRequest.cc @@ -0,0 +1,86 @@ +/* + * 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::ConfirmOTATaskRequest; + +ConfirmOTATaskRequest::ConfirmOTATaskRequest() : + RpcServiceRequest("iot", "2018-01-20", "ConfirmOTATask") +{ + setMethod(HttpRequest::Method::Post); +} + +ConfirmOTATaskRequest::~ConfirmOTATaskRequest() +{} + +std::string ConfirmOTATaskRequest::getAccessKeyId()const +{ + return accessKeyId_; +} + +void ConfirmOTATaskRequest::setAccessKeyId(const std::string& accessKeyId) +{ + accessKeyId_ = accessKeyId; + setParameter("AccessKeyId", accessKeyId); +} + +std::string ConfirmOTATaskRequest::getIotInstanceId()const +{ + return iotInstanceId_; +} + +void ConfirmOTATaskRequest::setIotInstanceId(const std::string& iotInstanceId) +{ + iotInstanceId_ = iotInstanceId; + setParameter("IotInstanceId", iotInstanceId); +} + +std::vector ConfirmOTATaskRequest::getTaskId()const +{ + return taskId_; +} + +void ConfirmOTATaskRequest::setTaskId(const std::vector& taskId) +{ + taskId_ = taskId; + for(int dep1 = 0; dep1!= taskId.size(); dep1++) { + setParameter("TaskId."+ std::to_string(dep1), taskId.at(dep1)); + } +} + +std::string ConfirmOTATaskRequest::getApiProduct()const +{ + return apiProduct_; +} + +void ConfirmOTATaskRequest::setApiProduct(const std::string& apiProduct) +{ + apiProduct_ = apiProduct; + setBodyParameter("ApiProduct", apiProduct); +} + +std::string ConfirmOTATaskRequest::getApiRevision()const +{ + return apiRevision_; +} + +void ConfirmOTATaskRequest::setApiRevision(const std::string& apiRevision) +{ + apiRevision_ = apiRevision; + setBodyParameter("ApiRevision", apiRevision); +} + diff --git a/iot/src/model/ConfirmOTATaskResult.cc b/iot/src/model/ConfirmOTATaskResult.cc new file mode 100644 index 000000000..2ef8f897e --- /dev/null +++ b/iot/src/model/ConfirmOTATaskResult.cc @@ -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. + */ + +#include +#include + +using namespace AlibabaCloud::Iot; +using namespace AlibabaCloud::Iot::Model; + +ConfirmOTATaskResult::ConfirmOTATaskResult() : + ServiceResult() +{} + +ConfirmOTATaskResult::ConfirmOTATaskResult(const std::string &payload) : + ServiceResult() +{ + parse(payload); +} + +ConfirmOTATaskResult::~ConfirmOTATaskResult() +{} + +void ConfirmOTATaskResult::parse(const std::string &payload) +{ + Json::Reader reader; + Json::Value value; + reader.parse(payload, value); + setRequestId(value["RequestId"].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(); + +} + +std::string ConfirmOTATaskResult::getErrorMessage()const +{ + return errorMessage_; +} + +std::string ConfirmOTATaskResult::getCode()const +{ + return code_; +} + +bool ConfirmOTATaskResult::getSuccess()const +{ + return success_; +} + diff --git a/iot/src/model/CreateOTADynamicUpgradeJobRequest.cc b/iot/src/model/CreateOTADynamicUpgradeJobRequest.cc index 7c0d81c51..22a70ea99 100644 --- a/iot/src/model/CreateOTADynamicUpgradeJobRequest.cc +++ b/iot/src/model/CreateOTADynamicUpgradeJobRequest.cc @@ -60,6 +60,17 @@ void CreateOTADynamicUpgradeJobRequest::setTimeoutInMinutes(int timeoutInMinutes setParameter("TimeoutInMinutes", std::to_string(timeoutInMinutes)); } +bool CreateOTADynamicUpgradeJobRequest::getNeedConfirm()const +{ + return needConfirm_; +} + +void CreateOTADynamicUpgradeJobRequest::setNeedConfirm(bool needConfirm) +{ + needConfirm_ = needConfirm; + setParameter("NeedConfirm", needConfirm ? "true" : "false"); +} + std::string CreateOTADynamicUpgradeJobRequest::getAccessKeyId()const { return accessKeyId_; @@ -71,6 +82,17 @@ void CreateOTADynamicUpgradeJobRequest::setAccessKeyId(const std::string& access setParameter("AccessKeyId", accessKeyId); } +bool CreateOTADynamicUpgradeJobRequest::getNeedPush()const +{ + return needPush_; +} + +void CreateOTADynamicUpgradeJobRequest::setNeedPush(bool needPush) +{ + needPush_ = needPush; + setParameter("NeedPush", needPush ? "true" : "false"); +} + std::string CreateOTADynamicUpgradeJobRequest::getIotInstanceId()const { return iotInstanceId_; diff --git a/iot/src/model/CreateOTAStaticUpgradeJobRequest.cc b/iot/src/model/CreateOTAStaticUpgradeJobRequest.cc index 193458482..7681a4a7d 100644 --- a/iot/src/model/CreateOTAStaticUpgradeJobRequest.cc +++ b/iot/src/model/CreateOTAStaticUpgradeJobRequest.cc @@ -49,6 +49,17 @@ void CreateOTAStaticUpgradeJobRequest::setTimeoutInMinutes(int timeoutInMinutes) setParameter("TimeoutInMinutes", std::to_string(timeoutInMinutes)); } +bool CreateOTAStaticUpgradeJobRequest::getNeedConfirm()const +{ + return needConfirm_; +} + +void CreateOTAStaticUpgradeJobRequest::setNeedConfirm(bool needConfirm) +{ + needConfirm_ = needConfirm; + setParameter("NeedConfirm", needConfirm ? "true" : "false"); +} + std::string CreateOTAStaticUpgradeJobRequest::getAccessKeyId()const { return accessKeyId_; @@ -60,6 +71,17 @@ void CreateOTAStaticUpgradeJobRequest::setAccessKeyId(const std::string& accessK setParameter("AccessKeyId", accessKeyId); } +bool CreateOTAStaticUpgradeJobRequest::getNeedPush()const +{ + return needPush_; +} + +void CreateOTAStaticUpgradeJobRequest::setNeedPush(bool needPush) +{ + needPush_ = needPush; + setParameter("NeedPush", needPush ? "true" : "false"); +} + std::string CreateOTAStaticUpgradeJobRequest::getIotInstanceId()const { return iotInstanceId_; diff --git a/iot/src/model/CreateOTAVerifyJobRequest.cc b/iot/src/model/CreateOTAVerifyJobRequest.cc index 5acf169b0..aa17d13af 100644 --- a/iot/src/model/CreateOTAVerifyJobRequest.cc +++ b/iot/src/model/CreateOTAVerifyJobRequest.cc @@ -38,6 +38,17 @@ void CreateOTAVerifyJobRequest::setTimeoutInMinutes(int timeoutInMinutes) setParameter("TimeoutInMinutes", std::to_string(timeoutInMinutes)); } +bool CreateOTAVerifyJobRequest::getNeedConfirm()const +{ + return needConfirm_; +} + +void CreateOTAVerifyJobRequest::setNeedConfirm(bool needConfirm) +{ + needConfirm_ = needConfirm; + setParameter("NeedConfirm", needConfirm ? "true" : "false"); +} + std::string CreateOTAVerifyJobRequest::getAccessKeyId()const { return accessKeyId_; @@ -49,6 +60,17 @@ void CreateOTAVerifyJobRequest::setAccessKeyId(const std::string& accessKeyId) setParameter("AccessKeyId", accessKeyId); } +bool CreateOTAVerifyJobRequest::getNeedPush()const +{ + return needPush_; +} + +void CreateOTAVerifyJobRequest::setNeedPush(bool needPush) +{ + needPush_ = needPush; + setParameter("NeedPush", needPush ? "true" : "false"); +} + std::string CreateOTAVerifyJobRequest::getIotInstanceId()const { return iotInstanceId_; diff --git a/iot/src/model/ListDeviceDistributeJobRequest.cc b/iot/src/model/ListDeviceDistributeJobRequest.cc index af54a6934..fcd197ddf 100644 --- a/iot/src/model/ListDeviceDistributeJobRequest.cc +++ b/iot/src/model/ListDeviceDistributeJobRequest.cc @@ -38,6 +38,17 @@ void ListDeviceDistributeJobRequest::setJobId(const std::string& jobId) setBodyParameter("JobId", jobId); } +std::string ListDeviceDistributeJobRequest::getNextToken()const +{ + return nextToken_; +} + +void ListDeviceDistributeJobRequest::setNextToken(const std::string& nextToken) +{ + nextToken_ = nextToken; + setParameter("NextToken", nextToken); +} + int ListDeviceDistributeJobRequest::getPageSize()const { return pageSize_; diff --git a/iot/src/model/ListDeviceDistributeJobResult.cc b/iot/src/model/ListDeviceDistributeJobResult.cc index 5408b0b3f..7e1c16822 100644 --- a/iot/src/model/ListDeviceDistributeJobResult.cc +++ b/iot/src/model/ListDeviceDistributeJobResult.cc @@ -42,6 +42,8 @@ void ListDeviceDistributeJobResult::parse(const std::string &payload) auto dataNode = value["Data"]; if(!dataNode["Total"].isNull()) data_.total = std::stoi(dataNode["Total"].asString()); + if(!dataNode["NextToken"].isNull()) + data_.nextToken = dataNode["NextToken"].asString(); auto allJobInfoNode = dataNode["JobInfo"]["items"]; for (auto dataNodeJobInfoitems : allJobInfoNode) { diff --git a/iot/src/model/ListOTAUnfinishedTaskByDeviceRequest.cc b/iot/src/model/ListOTAUnfinishedTaskByDeviceRequest.cc new file mode 100644 index 000000000..4b4153476 --- /dev/null +++ b/iot/src/model/ListOTAUnfinishedTaskByDeviceRequest.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::ListOTAUnfinishedTaskByDeviceRequest; + +ListOTAUnfinishedTaskByDeviceRequest::ListOTAUnfinishedTaskByDeviceRequest() : + RpcServiceRequest("iot", "2018-01-20", "ListOTAUnfinishedTaskByDevice") +{ + setMethod(HttpRequest::Method::Post); +} + +ListOTAUnfinishedTaskByDeviceRequest::~ListOTAUnfinishedTaskByDeviceRequest() +{} + +std::string ListOTAUnfinishedTaskByDeviceRequest::getAccessKeyId()const +{ + return accessKeyId_; +} + +void ListOTAUnfinishedTaskByDeviceRequest::setAccessKeyId(const std::string& accessKeyId) +{ + accessKeyId_ = accessKeyId; + setParameter("AccessKeyId", accessKeyId); +} + +std::string ListOTAUnfinishedTaskByDeviceRequest::getTaskStatus()const +{ + return taskStatus_; +} + +void ListOTAUnfinishedTaskByDeviceRequest::setTaskStatus(const std::string& taskStatus) +{ + taskStatus_ = taskStatus; + setParameter("TaskStatus", taskStatus); +} + +std::string ListOTAUnfinishedTaskByDeviceRequest::getIotId()const +{ + return iotId_; +} + +void ListOTAUnfinishedTaskByDeviceRequest::setIotId(const std::string& iotId) +{ + iotId_ = iotId; + setParameter("IotId", iotId); +} + +std::string ListOTAUnfinishedTaskByDeviceRequest::getIotInstanceId()const +{ + return iotInstanceId_; +} + +void ListOTAUnfinishedTaskByDeviceRequest::setIotInstanceId(const std::string& iotInstanceId) +{ + iotInstanceId_ = iotInstanceId; + setParameter("IotInstanceId", iotInstanceId); +} + +std::string ListOTAUnfinishedTaskByDeviceRequest::getModuleName()const +{ + return moduleName_; +} + +void ListOTAUnfinishedTaskByDeviceRequest::setModuleName(const std::string& moduleName) +{ + moduleName_ = moduleName; + setParameter("ModuleName", moduleName); +} + +std::string ListOTAUnfinishedTaskByDeviceRequest::getProductKey()const +{ + return productKey_; +} + +void ListOTAUnfinishedTaskByDeviceRequest::setProductKey(const std::string& productKey) +{ + productKey_ = productKey; + setParameter("ProductKey", productKey); +} + +std::string ListOTAUnfinishedTaskByDeviceRequest::getApiProduct()const +{ + return apiProduct_; +} + +void ListOTAUnfinishedTaskByDeviceRequest::setApiProduct(const std::string& apiProduct) +{ + apiProduct_ = apiProduct; + setBodyParameter("ApiProduct", apiProduct); +} + +std::string ListOTAUnfinishedTaskByDeviceRequest::getApiRevision()const +{ + return apiRevision_; +} + +void ListOTAUnfinishedTaskByDeviceRequest::setApiRevision(const std::string& apiRevision) +{ + apiRevision_ = apiRevision; + setBodyParameter("ApiRevision", apiRevision); +} + +std::string ListOTAUnfinishedTaskByDeviceRequest::getDeviceName()const +{ + return deviceName_; +} + +void ListOTAUnfinishedTaskByDeviceRequest::setDeviceName(const std::string& deviceName) +{ + deviceName_ = deviceName; + setParameter("DeviceName", deviceName); +} + diff --git a/iot/src/model/ListOTAUnfinishedTaskByDeviceResult.cc b/iot/src/model/ListOTAUnfinishedTaskByDeviceResult.cc new file mode 100644 index 000000000..6cab0781b --- /dev/null +++ b/iot/src/model/ListOTAUnfinishedTaskByDeviceResult.cc @@ -0,0 +1,102 @@ +/* + * 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; + +ListOTAUnfinishedTaskByDeviceResult::ListOTAUnfinishedTaskByDeviceResult() : + ServiceResult() +{} + +ListOTAUnfinishedTaskByDeviceResult::ListOTAUnfinishedTaskByDeviceResult(const std::string &payload) : + ServiceResult() +{ + parse(payload); +} + +ListOTAUnfinishedTaskByDeviceResult::~ListOTAUnfinishedTaskByDeviceResult() +{} + +void ListOTAUnfinishedTaskByDeviceResult::parse(const std::string &payload) +{ + Json::Reader reader; + Json::Value value; + reader.parse(payload, value); + setRequestId(value["RequestId"].asString()); + auto allDataNode = value["Data"]["SimpleOTATaskInfo"]; + for (auto valueDataSimpleOTATaskInfo : allDataNode) + { + SimpleOTATaskInfo dataObject; + if(!valueDataSimpleOTATaskInfo["TaskId"].isNull()) + dataObject.taskId = valueDataSimpleOTATaskInfo["TaskId"].asString(); + if(!valueDataSimpleOTATaskInfo["UtcModified"].isNull()) + dataObject.utcModified = valueDataSimpleOTATaskInfo["UtcModified"].asString(); + if(!valueDataSimpleOTATaskInfo["ProductKey"].isNull()) + dataObject.productKey = valueDataSimpleOTATaskInfo["ProductKey"].asString(); + if(!valueDataSimpleOTATaskInfo["TaskStatus"].isNull()) + dataObject.taskStatus = valueDataSimpleOTATaskInfo["TaskStatus"].asString(); + if(!valueDataSimpleOTATaskInfo["JobId"].isNull()) + dataObject.jobId = valueDataSimpleOTATaskInfo["JobId"].asString(); + if(!valueDataSimpleOTATaskInfo["ProductName"].isNull()) + dataObject.productName = valueDataSimpleOTATaskInfo["ProductName"].asString(); + if(!valueDataSimpleOTATaskInfo["DeviceName"].isNull()) + dataObject.deviceName = valueDataSimpleOTATaskInfo["DeviceName"].asString(); + if(!valueDataSimpleOTATaskInfo["SrcVersion"].isNull()) + dataObject.srcVersion = valueDataSimpleOTATaskInfo["SrcVersion"].asString(); + if(!valueDataSimpleOTATaskInfo["DestVersion"].isNull()) + dataObject.destVersion = valueDataSimpleOTATaskInfo["DestVersion"].asString(); + if(!valueDataSimpleOTATaskInfo["IotId"].isNull()) + dataObject.iotId = valueDataSimpleOTATaskInfo["IotId"].asString(); + if(!valueDataSimpleOTATaskInfo["UtcCreate"].isNull()) + dataObject.utcCreate = valueDataSimpleOTATaskInfo["UtcCreate"].asString(); + if(!valueDataSimpleOTATaskInfo["ModuleName"].isNull()) + dataObject.moduleName = valueDataSimpleOTATaskInfo["ModuleName"].asString(); + if(!valueDataSimpleOTATaskInfo["FirmwareId"].isNull()) + dataObject.firmwareId = valueDataSimpleOTATaskInfo["FirmwareId"].asString(); + data_.push_back(dataObject); + } + 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(); + +} + +std::vector ListOTAUnfinishedTaskByDeviceResult::getData()const +{ + return data_; +} + +std::string ListOTAUnfinishedTaskByDeviceResult::getErrorMessage()const +{ + return errorMessage_; +} + +std::string ListOTAUnfinishedTaskByDeviceResult::getCode()const +{ + return code_; +} + +bool ListOTAUnfinishedTaskByDeviceResult::getSuccess()const +{ + return success_; +} + diff --git a/iot/src/model/QueryDeviceInfoRequest.cc b/iot/src/model/QueryDeviceInfoRequest.cc new file mode 100644 index 000000000..ef303f1b9 --- /dev/null +++ b/iot/src/model/QueryDeviceInfoRequest.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::QueryDeviceInfoRequest; + +QueryDeviceInfoRequest::QueryDeviceInfoRequest() : + RpcServiceRequest("iot", "2018-01-20", "QueryDeviceInfo") +{ + setMethod(HttpRequest::Method::Post); +} + +QueryDeviceInfoRequest::~QueryDeviceInfoRequest() +{} + +std::string QueryDeviceInfoRequest::getRealTenantId()const +{ + return realTenantId_; +} + +void QueryDeviceInfoRequest::setRealTenantId(const std::string& realTenantId) +{ + realTenantId_ = realTenantId; + setParameter("RealTenantId", realTenantId); +} + +std::string QueryDeviceInfoRequest::getAccessKeyId()const +{ + return accessKeyId_; +} + +void QueryDeviceInfoRequest::setAccessKeyId(const std::string& accessKeyId) +{ + accessKeyId_ = accessKeyId; + setParameter("AccessKeyId", accessKeyId); +} + +std::string QueryDeviceInfoRequest::getRealTripartiteKey()const +{ + return realTripartiteKey_; +} + +void QueryDeviceInfoRequest::setRealTripartiteKey(const std::string& realTripartiteKey) +{ + realTripartiteKey_ = realTripartiteKey; + setParameter("RealTripartiteKey", realTripartiteKey); +} + +std::string QueryDeviceInfoRequest::getIotId()const +{ + return iotId_; +} + +void QueryDeviceInfoRequest::setIotId(const std::string& iotId) +{ + iotId_ = iotId; + setParameter("IotId", iotId); +} + +std::string QueryDeviceInfoRequest::getIotInstanceId()const +{ + return iotInstanceId_; +} + +void QueryDeviceInfoRequest::setIotInstanceId(const std::string& iotInstanceId) +{ + iotInstanceId_ = iotInstanceId; + setParameter("IotInstanceId", iotInstanceId); +} + +std::string QueryDeviceInfoRequest::getProductKey()const +{ + return productKey_; +} + +void QueryDeviceInfoRequest::setProductKey(const std::string& productKey) +{ + productKey_ = productKey; + setParameter("ProductKey", productKey); +} + +std::string QueryDeviceInfoRequest::getApiProduct()const +{ + return apiProduct_; +} + +void QueryDeviceInfoRequest::setApiProduct(const std::string& apiProduct) +{ + apiProduct_ = apiProduct; + setBodyParameter("ApiProduct", apiProduct); +} + +std::string QueryDeviceInfoRequest::getApiRevision()const +{ + return apiRevision_; +} + +void QueryDeviceInfoRequest::setApiRevision(const std::string& apiRevision) +{ + apiRevision_ = apiRevision; + setBodyParameter("ApiRevision", apiRevision); +} + +std::string QueryDeviceInfoRequest::getDeviceName()const +{ + return deviceName_; +} + +void QueryDeviceInfoRequest::setDeviceName(const std::string& deviceName) +{ + deviceName_ = deviceName; + setParameter("DeviceName", deviceName); +} + diff --git a/iot/src/model/QueryDeviceInfoResult.cc b/iot/src/model/QueryDeviceInfoResult.cc new file mode 100644 index 000000000..9e46e87fb --- /dev/null +++ b/iot/src/model/QueryDeviceInfoResult.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; + +QueryDeviceInfoResult::QueryDeviceInfoResult() : + ServiceResult() +{} + +QueryDeviceInfoResult::QueryDeviceInfoResult(const std::string &payload) : + ServiceResult() +{ + parse(payload); +} + +QueryDeviceInfoResult::~QueryDeviceInfoResult() +{} + +void QueryDeviceInfoResult::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["IotId"].isNull()) + data_.iotId = dataNode["IotId"].asString(); + if(!dataNode["ProductKey"].isNull()) + data_.productKey = dataNode["ProductKey"].asString(); + if(!dataNode["DeviceName"].isNull()) + data_.deviceName = dataNode["DeviceName"].asString(); + if(!dataNode["DeviceSecret"].isNull()) + data_.deviceSecret = dataNode["DeviceSecret"].asString(); + if(!dataNode["Nickname"].isNull()) + data_.nickname = dataNode["Nickname"].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(); + +} + +QueryDeviceInfoResult::Data QueryDeviceInfoResult::getData()const +{ + return data_; +} + +std::string QueryDeviceInfoResult::getErrorMessage()const +{ + return errorMessage_; +} + +std::string QueryDeviceInfoResult::getCode()const +{ + return code_; +} + +bool QueryDeviceInfoResult::getSuccess()const +{ + return success_; +} + diff --git a/iot/src/model/QueryDeviceRequest.cc b/iot/src/model/QueryDeviceRequest.cc index 4738b9fdd..85e01c162 100644 --- a/iot/src/model/QueryDeviceRequest.cc +++ b/iot/src/model/QueryDeviceRequest.cc @@ -60,6 +60,17 @@ void QueryDeviceRequest::setRealTripartiteKey(const std::string& realTripartiteK setParameter("RealTripartiteKey", realTripartiteKey); } +std::string QueryDeviceRequest::getNextToken()const +{ + return nextToken_; +} + +void QueryDeviceRequest::setNextToken(const std::string& nextToken) +{ + nextToken_ = nextToken; + setParameter("NextToken", nextToken); +} + std::string QueryDeviceRequest::getIotInstanceId()const { return iotInstanceId_; diff --git a/iot/src/model/QueryDeviceResult.cc b/iot/src/model/QueryDeviceResult.cc index 5d05d71dc..19d627d1c 100644 --- a/iot/src/model/QueryDeviceResult.cc +++ b/iot/src/model/QueryDeviceResult.cc @@ -83,6 +83,8 @@ void QueryDeviceResult::parse(const std::string &payload) pageCount_ = std::stoi(value["PageCount"].asString()); if(!value["Page"].isNull()) page_ = std::stoi(value["Page"].asString()); + if(!value["NextToken"].isNull()) + nextToken_ = value["NextToken"].asString(); } @@ -96,6 +98,11 @@ int QueryDeviceResult::getPageCount()const return pageCount_; } +std::string QueryDeviceResult::getNextToken()const +{ + return nextToken_; +} + int QueryDeviceResult::getTotal()const { return total_; diff --git a/iot/src/model/QueryOTAJobResult.cc b/iot/src/model/QueryOTAJobResult.cc index a8d9ae9e8..9f9bd8702 100644 --- a/iot/src/model/QueryOTAJobResult.cc +++ b/iot/src/model/QueryOTAJobResult.cc @@ -86,6 +86,10 @@ void QueryOTAJobResult::parse(const std::string &payload) data_.overwriteMode = std::stoi(dataNode["OverwriteMode"].asString()); if(!dataNode["DynamicMode"].isNull()) data_.dynamicMode = std::stoi(dataNode["DynamicMode"].asString()); + if(!dataNode["NeedPush"].isNull()) + data_.needPush = dataNode["NeedPush"].asString() == "true"; + if(!dataNode["NeedConfirm"].isNull()) + data_.needConfirm = dataNode["NeedConfirm"].asString() == "true"; auto allTagsNode = dataNode["Tags"]["OtaTagDTO"]; for (auto dataNodeTagsOtaTagDTO : allTagsNode) {