diff --git a/CHANGELOG b/CHANGELOG index 25bc210b4..219ab87d2 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -1,3 +1,6 @@ +2022-02-18 Version: 1.36.1058 +- Add Gis open service add data api. + 2022-02-17 Version: 1.36.1057 - Adjusted the call frequency limit of some APIs. diff --git a/VERSION b/VERSION index e672a33cf..a16ef3352 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -1.36.1057 \ No newline at end of file +1.36.1058 \ No newline at end of file diff --git a/iot/CMakeLists.txt b/iot/CMakeLists.txt index 70066b243..f56857148 100644 --- a/iot/CMakeLists.txt +++ b/iot/CMakeLists.txt @@ -163,8 +163,6 @@ set(iot_public_header_model include/alibabacloud/iot/model/CreateRuleResult.h include/alibabacloud/iot/model/CreateRuleActionRequest.h include/alibabacloud/iot/model/CreateRuleActionResult.h - include/alibabacloud/iot/model/CreateRulengDistributeJobRequest.h - include/alibabacloud/iot/model/CreateRulengDistributeJobResult.h include/alibabacloud/iot/model/CreateSceneRuleRequest.h include/alibabacloud/iot/model/CreateSceneRuleResult.h include/alibabacloud/iot/model/CreateSoundCodeRequest.h @@ -311,6 +309,10 @@ set(iot_public_header_model include/alibabacloud/iot/model/GetThingTemplateResult.h include/alibabacloud/iot/model/GetThingTopoRequest.h include/alibabacloud/iot/model/GetThingTopoResult.h + include/alibabacloud/iot/model/GisQueryDeviceLocationRequest.h + include/alibabacloud/iot/model/GisQueryDeviceLocationResult.h + include/alibabacloud/iot/model/GisSearchDeviceTraceRequest.h + include/alibabacloud/iot/model/GisSearchDeviceTraceResult.h include/alibabacloud/iot/model/ImportThingModelTslRequest.h include/alibabacloud/iot/model/ImportThingModelTslResult.h include/alibabacloud/iot/model/InvokeDataAPIServiceRequest.h @@ -353,8 +355,6 @@ set(iot_public_header_model include/alibabacloud/iot/model/ListRuleActionsResult.h include/alibabacloud/iot/model/ListTaskRequest.h include/alibabacloud/iot/model/ListTaskResult.h - include/alibabacloud/iot/model/ListTaskByPageRequest.h - include/alibabacloud/iot/model/ListTaskByPageResult.h include/alibabacloud/iot/model/ListThingModelVersionRequest.h include/alibabacloud/iot/model/ListThingModelVersionResult.h include/alibabacloud/iot/model/ListThingTemplatesRequest.h @@ -589,8 +589,6 @@ set(iot_public_header_model include/alibabacloud/iot/model/SpeechByCombinationResult.h include/alibabacloud/iot/model/SpeechBySynthesisRequest.h include/alibabacloud/iot/model/SpeechBySynthesisResult.h - include/alibabacloud/iot/model/StartAIBoxForceSyncRequest.h - include/alibabacloud/iot/model/StartAIBoxForceSyncResult.h include/alibabacloud/iot/model/StartRuleRequest.h include/alibabacloud/iot/model/StartRuleResult.h include/alibabacloud/iot/model/StopRuleRequest.h @@ -800,8 +798,6 @@ set(iot_src src/model/CreateRuleResult.cc src/model/CreateRuleActionRequest.cc src/model/CreateRuleActionResult.cc - src/model/CreateRulengDistributeJobRequest.cc - src/model/CreateRulengDistributeJobResult.cc src/model/CreateSceneRuleRequest.cc src/model/CreateSceneRuleResult.cc src/model/CreateSoundCodeRequest.cc @@ -948,6 +944,10 @@ set(iot_src src/model/GetThingTemplateResult.cc src/model/GetThingTopoRequest.cc src/model/GetThingTopoResult.cc + src/model/GisQueryDeviceLocationRequest.cc + src/model/GisQueryDeviceLocationResult.cc + src/model/GisSearchDeviceTraceRequest.cc + src/model/GisSearchDeviceTraceResult.cc src/model/ImportThingModelTslRequest.cc src/model/ImportThingModelTslResult.cc src/model/InvokeDataAPIServiceRequest.cc @@ -990,8 +990,6 @@ set(iot_src src/model/ListRuleActionsResult.cc src/model/ListTaskRequest.cc src/model/ListTaskResult.cc - src/model/ListTaskByPageRequest.cc - src/model/ListTaskByPageResult.cc src/model/ListThingModelVersionRequest.cc src/model/ListThingModelVersionResult.cc src/model/ListThingTemplatesRequest.cc @@ -1226,8 +1224,6 @@ set(iot_src src/model/SpeechByCombinationResult.cc src/model/SpeechBySynthesisRequest.cc src/model/SpeechBySynthesisResult.cc - src/model/StartAIBoxForceSyncRequest.cc - src/model/StartAIBoxForceSyncResult.cc src/model/StartRuleRequest.cc src/model/StartRuleResult.cc src/model/StopRuleRequest.cc diff --git a/iot/include/alibabacloud/iot/IotClient.h b/iot/include/alibabacloud/iot/IotClient.h index 070af2d54..4964abb75 100644 --- a/iot/include/alibabacloud/iot/IotClient.h +++ b/iot/include/alibabacloud/iot/IotClient.h @@ -164,8 +164,6 @@ #include "model/CreateRuleResult.h" #include "model/CreateRuleActionRequest.h" #include "model/CreateRuleActionResult.h" -#include "model/CreateRulengDistributeJobRequest.h" -#include "model/CreateRulengDistributeJobResult.h" #include "model/CreateSceneRuleRequest.h" #include "model/CreateSceneRuleResult.h" #include "model/CreateSoundCodeRequest.h" @@ -312,6 +310,10 @@ #include "model/GetThingTemplateResult.h" #include "model/GetThingTopoRequest.h" #include "model/GetThingTopoResult.h" +#include "model/GisQueryDeviceLocationRequest.h" +#include "model/GisQueryDeviceLocationResult.h" +#include "model/GisSearchDeviceTraceRequest.h" +#include "model/GisSearchDeviceTraceResult.h" #include "model/ImportThingModelTslRequest.h" #include "model/ImportThingModelTslResult.h" #include "model/InvokeDataAPIServiceRequest.h" @@ -354,8 +356,6 @@ #include "model/ListRuleActionsResult.h" #include "model/ListTaskRequest.h" #include "model/ListTaskResult.h" -#include "model/ListTaskByPageRequest.h" -#include "model/ListTaskByPageResult.h" #include "model/ListThingModelVersionRequest.h" #include "model/ListThingModelVersionResult.h" #include "model/ListThingTemplatesRequest.h" @@ -590,8 +590,6 @@ #include "model/SpeechByCombinationResult.h" #include "model/SpeechBySynthesisRequest.h" #include "model/SpeechBySynthesisResult.h" -#include "model/StartAIBoxForceSyncRequest.h" -#include "model/StartAIBoxForceSyncResult.h" #include "model/StartRuleRequest.h" #include "model/StartRuleResult.h" #include "model/StopRuleRequest.h" @@ -878,9 +876,6 @@ namespace AlibabaCloud typedef Outcome CreateRuleActionOutcome; typedef std::future CreateRuleActionOutcomeCallable; typedef std::function&)> CreateRuleActionAsyncHandler; - typedef Outcome CreateRulengDistributeJobOutcome; - typedef std::future CreateRulengDistributeJobOutcomeCallable; - typedef std::function&)> CreateRulengDistributeJobAsyncHandler; typedef Outcome CreateSceneRuleOutcome; typedef std::future CreateSceneRuleOutcomeCallable; typedef std::function&)> CreateSceneRuleAsyncHandler; @@ -1100,6 +1095,12 @@ namespace AlibabaCloud typedef Outcome GetThingTopoOutcome; typedef std::future GetThingTopoOutcomeCallable; typedef std::function&)> GetThingTopoAsyncHandler; + typedef Outcome GisQueryDeviceLocationOutcome; + typedef std::future GisQueryDeviceLocationOutcomeCallable; + typedef std::function&)> GisQueryDeviceLocationAsyncHandler; + typedef Outcome GisSearchDeviceTraceOutcome; + typedef std::future GisSearchDeviceTraceOutcomeCallable; + typedef std::function&)> GisSearchDeviceTraceAsyncHandler; typedef Outcome ImportThingModelTslOutcome; typedef std::future ImportThingModelTslOutcomeCallable; typedef std::function&)> ImportThingModelTslAsyncHandler; @@ -1163,9 +1164,6 @@ namespace AlibabaCloud typedef Outcome ListTaskOutcome; typedef std::future ListTaskOutcomeCallable; typedef std::function&)> ListTaskAsyncHandler; - typedef Outcome ListTaskByPageOutcome; - typedef std::future ListTaskByPageOutcomeCallable; - typedef std::function&)> ListTaskByPageAsyncHandler; typedef Outcome ListThingModelVersionOutcome; typedef std::future ListThingModelVersionOutcomeCallable; typedef std::function&)> ListThingModelVersionAsyncHandler; @@ -1517,9 +1515,6 @@ namespace AlibabaCloud typedef Outcome SpeechBySynthesisOutcome; typedef std::future SpeechBySynthesisOutcomeCallable; typedef std::function&)> SpeechBySynthesisAsyncHandler; - typedef Outcome StartAIBoxForceSyncOutcome; - typedef std::future StartAIBoxForceSyncOutcomeCallable; - typedef std::function&)> StartAIBoxForceSyncAsyncHandler; typedef Outcome StartRuleOutcome; typedef std::future StartRuleOutcomeCallable; typedef std::function&)> StartRuleAsyncHandler; @@ -1834,9 +1829,6 @@ namespace AlibabaCloud CreateRuleActionOutcome createRuleAction(const Model::CreateRuleActionRequest &request)const; void createRuleActionAsync(const Model::CreateRuleActionRequest& request, const CreateRuleActionAsyncHandler& handler, const std::shared_ptr& context = nullptr) const; CreateRuleActionOutcomeCallable createRuleActionCallable(const Model::CreateRuleActionRequest& request) const; - CreateRulengDistributeJobOutcome createRulengDistributeJob(const Model::CreateRulengDistributeJobRequest &request)const; - void createRulengDistributeJobAsync(const Model::CreateRulengDistributeJobRequest& request, const CreateRulengDistributeJobAsyncHandler& handler, const std::shared_ptr& context = nullptr) const; - CreateRulengDistributeJobOutcomeCallable createRulengDistributeJobCallable(const Model::CreateRulengDistributeJobRequest& request) const; CreateSceneRuleOutcome createSceneRule(const Model::CreateSceneRuleRequest &request)const; void createSceneRuleAsync(const Model::CreateSceneRuleRequest& request, const CreateSceneRuleAsyncHandler& handler, const std::shared_ptr& context = nullptr) const; CreateSceneRuleOutcomeCallable createSceneRuleCallable(const Model::CreateSceneRuleRequest& request) const; @@ -2056,6 +2048,12 @@ namespace AlibabaCloud GetThingTopoOutcome getThingTopo(const Model::GetThingTopoRequest &request)const; void getThingTopoAsync(const Model::GetThingTopoRequest& request, const GetThingTopoAsyncHandler& handler, const std::shared_ptr& context = nullptr) const; GetThingTopoOutcomeCallable getThingTopoCallable(const Model::GetThingTopoRequest& request) const; + GisQueryDeviceLocationOutcome gisQueryDeviceLocation(const Model::GisQueryDeviceLocationRequest &request)const; + void gisQueryDeviceLocationAsync(const Model::GisQueryDeviceLocationRequest& request, const GisQueryDeviceLocationAsyncHandler& handler, const std::shared_ptr& context = nullptr) const; + GisQueryDeviceLocationOutcomeCallable gisQueryDeviceLocationCallable(const Model::GisQueryDeviceLocationRequest& request) const; + GisSearchDeviceTraceOutcome gisSearchDeviceTrace(const Model::GisSearchDeviceTraceRequest &request)const; + void gisSearchDeviceTraceAsync(const Model::GisSearchDeviceTraceRequest& request, const GisSearchDeviceTraceAsyncHandler& handler, const std::shared_ptr& context = nullptr) const; + GisSearchDeviceTraceOutcomeCallable gisSearchDeviceTraceCallable(const Model::GisSearchDeviceTraceRequest& request) const; ImportThingModelTslOutcome importThingModelTsl(const Model::ImportThingModelTslRequest &request)const; void importThingModelTslAsync(const Model::ImportThingModelTslRequest& request, const ImportThingModelTslAsyncHandler& handler, const std::shared_ptr& context = nullptr) const; ImportThingModelTslOutcomeCallable importThingModelTslCallable(const Model::ImportThingModelTslRequest& request) const; @@ -2119,9 +2117,6 @@ namespace AlibabaCloud ListTaskOutcome listTask(const Model::ListTaskRequest &request)const; void listTaskAsync(const Model::ListTaskRequest& request, const ListTaskAsyncHandler& handler, const std::shared_ptr& context = nullptr) const; ListTaskOutcomeCallable listTaskCallable(const Model::ListTaskRequest& request) const; - ListTaskByPageOutcome listTaskByPage(const Model::ListTaskByPageRequest &request)const; - void listTaskByPageAsync(const Model::ListTaskByPageRequest& request, const ListTaskByPageAsyncHandler& handler, const std::shared_ptr& context = nullptr) const; - ListTaskByPageOutcomeCallable listTaskByPageCallable(const Model::ListTaskByPageRequest& request) const; ListThingModelVersionOutcome listThingModelVersion(const Model::ListThingModelVersionRequest &request)const; void listThingModelVersionAsync(const Model::ListThingModelVersionRequest& request, const ListThingModelVersionAsyncHandler& handler, const std::shared_ptr& context = nullptr) const; ListThingModelVersionOutcomeCallable listThingModelVersionCallable(const Model::ListThingModelVersionRequest& request) const; @@ -2473,9 +2468,6 @@ namespace AlibabaCloud SpeechBySynthesisOutcome speechBySynthesis(const Model::SpeechBySynthesisRequest &request)const; void speechBySynthesisAsync(const Model::SpeechBySynthesisRequest& request, const SpeechBySynthesisAsyncHandler& handler, const std::shared_ptr& context = nullptr) const; SpeechBySynthesisOutcomeCallable speechBySynthesisCallable(const Model::SpeechBySynthesisRequest& request) const; - StartAIBoxForceSyncOutcome startAIBoxForceSync(const Model::StartAIBoxForceSyncRequest &request)const; - void startAIBoxForceSyncAsync(const Model::StartAIBoxForceSyncRequest& request, const StartAIBoxForceSyncAsyncHandler& handler, const std::shared_ptr& context = nullptr) const; - StartAIBoxForceSyncOutcomeCallable startAIBoxForceSyncCallable(const Model::StartAIBoxForceSyncRequest& request) const; StartRuleOutcome startRule(const Model::StartRuleRequest &request)const; void startRuleAsync(const Model::StartRuleRequest& request, const StartRuleAsyncHandler& handler, const std::shared_ptr& context = nullptr) const; StartRuleOutcomeCallable startRuleCallable(const Model::StartRuleRequest& request) const; diff --git a/iot/include/alibabacloud/iot/model/CreateRulengDistributeJobResult.h b/iot/include/alibabacloud/iot/model/CreateRulengDistributeJobResult.h deleted file mode 100644 index 038a24b18..000000000 --- a/iot/include/alibabacloud/iot/model/CreateRulengDistributeJobResult.h +++ /dev/null @@ -1,55 +0,0 @@ -/* - * 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_CREATERULENGDISTRIBUTEJOBRESULT_H_ -#define ALIBABACLOUD_IOT_MODEL_CREATERULENGDISTRIBUTEJOBRESULT_H_ - -#include -#include -#include -#include -#include - -namespace AlibabaCloud -{ - namespace Iot - { - namespace Model - { - class ALIBABACLOUD_IOT_EXPORT CreateRulengDistributeJobResult : public ServiceResult - { - public: - - - CreateRulengDistributeJobResult(); - explicit CreateRulengDistributeJobResult(const std::string &payload); - ~CreateRulengDistributeJobResult(); - 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_CREATERULENGDISTRIBUTEJOBRESULT_H_ \ No newline at end of file diff --git a/iot/include/alibabacloud/iot/model/StartAIBoxForceSyncRequest.h b/iot/include/alibabacloud/iot/model/GisQueryDeviceLocationRequest.h similarity index 59% rename from iot/include/alibabacloud/iot/model/StartAIBoxForceSyncRequest.h rename to iot/include/alibabacloud/iot/model/GisQueryDeviceLocationRequest.h index 50adac1c3..3409a8596 100644 --- a/iot/include/alibabacloud/iot/model/StartAIBoxForceSyncRequest.h +++ b/iot/include/alibabacloud/iot/model/GisQueryDeviceLocationRequest.h @@ -14,8 +14,8 @@ * limitations under the License. */ -#ifndef ALIBABACLOUD_IOT_MODEL_STARTAIBOXFORCESYNCREQUEST_H_ -#define ALIBABACLOUD_IOT_MODEL_STARTAIBOXFORCESYNCREQUEST_H_ +#ifndef ALIBABACLOUD_IOT_MODEL_GISQUERYDEVICELOCATIONREQUEST_H_ +#define ALIBABACLOUD_IOT_MODEL_GISQUERYDEVICELOCATIONREQUEST_H_ #include #include @@ -28,22 +28,31 @@ namespace AlibabaCloud { namespace Model { - class ALIBABACLOUD_IOT_EXPORT StartAIBoxForceSyncRequest : public RpcServiceRequest + class ALIBABACLOUD_IOT_EXPORT GisQueryDeviceLocationRequest : public RpcServiceRequest { + public: + struct ThingList + { + std::string productKey; + std::string deviceName; + }; public: - StartAIBoxForceSyncRequest(); - ~StartAIBoxForceSyncRequest(); + GisQueryDeviceLocationRequest(); + ~GisQueryDeviceLocationRequest(); - std::string getIotId()const; - void setIotId(const std::string& iotId); + std::string getIotInstanceId()const; + void setIotInstanceId(const std::string& iotInstanceId); + std::vector getThingList()const; + void setThingList(const std::vector& thingList); std::string getApiProduct()const; void setApiProduct(const std::string& apiProduct); std::string getApiRevision()const; void setApiRevision(const std::string& apiRevision); private: - std::string iotId_; + std::string iotInstanceId_; + std::vector thingList_; std::string apiProduct_; std::string apiRevision_; @@ -51,4 +60,4 @@ namespace AlibabaCloud } } } -#endif // !ALIBABACLOUD_IOT_MODEL_STARTAIBOXFORCESYNCREQUEST_H_ \ No newline at end of file +#endif // !ALIBABACLOUD_IOT_MODEL_GISQUERYDEVICELOCATIONREQUEST_H_ \ No newline at end of file diff --git a/iot/include/alibabacloud/iot/model/ListTaskByPageResult.h b/iot/include/alibabacloud/iot/model/GisQueryDeviceLocationResult.h similarity index 61% rename from iot/include/alibabacloud/iot/model/ListTaskByPageResult.h rename to iot/include/alibabacloud/iot/model/GisQueryDeviceLocationResult.h index a81afc620..1714fd80b 100644 --- a/iot/include/alibabacloud/iot/model/ListTaskByPageResult.h +++ b/iot/include/alibabacloud/iot/model/GisQueryDeviceLocationResult.h @@ -14,8 +14,8 @@ * limitations under the License. */ -#ifndef ALIBABACLOUD_IOT_MODEL_LISTTASKBYPAGERESULT_H_ -#define ALIBABACLOUD_IOT_MODEL_LISTTASKBYPAGERESULT_H_ +#ifndef ALIBABACLOUD_IOT_MODEL_GISQUERYDEVICELOCATIONRESULT_H_ +#define ALIBABACLOUD_IOT_MODEL_GISQUERYDEVICELOCATIONRESULT_H_ #include #include @@ -29,34 +29,28 @@ namespace AlibabaCloud { namespace Model { - class ALIBABACLOUD_IOT_EXPORT ListTaskByPageResult : public ServiceResult + class ALIBABACLOUD_IOT_EXPORT GisQueryDeviceLocationResult : public ServiceResult { public: struct DataItem { - std::string status; - std::string iotId; - int progress; - std::string taskId; - std::string productName; - std::string statusDetail; - std::string jobName; - std::string utcModified; - std::string utcQueueTime; - std::string jobId; + int coordinateSystem; + std::string ip; + std::string country; + float latitude; + long adcode; + std::string city; + float longitude; std::string productKey; + std::string province; std::string deviceName; }; - ListTaskByPageResult(); - explicit ListTaskByPageResult(const std::string &payload); - ~ListTaskByPageResult(); - int getPageSize()const; - int getPageCount()const; - int getTotal()const; + GisQueryDeviceLocationResult(); + explicit GisQueryDeviceLocationResult(const std::string &payload); + ~GisQueryDeviceLocationResult(); std::vector getData()const; - int getPage()const; std::string getErrorMessage()const; std::string getCode()const; bool getSuccess()const; @@ -64,11 +58,7 @@ namespace AlibabaCloud protected: void parse(const std::string &payload); private: - int pageSize_; - int pageCount_; - int total_; std::vector data_; - int page_; std::string errorMessage_; std::string code_; bool success_; @@ -77,4 +67,4 @@ namespace AlibabaCloud } } } -#endif // !ALIBABACLOUD_IOT_MODEL_LISTTASKBYPAGERESULT_H_ \ No newline at end of file +#endif // !ALIBABACLOUD_IOT_MODEL_GISQUERYDEVICELOCATIONRESULT_H_ \ No newline at end of file diff --git a/iot/include/alibabacloud/iot/model/CreateRulengDistributeJobRequest.h b/iot/include/alibabacloud/iot/model/GisSearchDeviceTraceRequest.h similarity index 58% rename from iot/include/alibabacloud/iot/model/CreateRulengDistributeJobRequest.h rename to iot/include/alibabacloud/iot/model/GisSearchDeviceTraceRequest.h index 764baf7dd..a3e6595f7 100644 --- a/iot/include/alibabacloud/iot/model/CreateRulengDistributeJobRequest.h +++ b/iot/include/alibabacloud/iot/model/GisSearchDeviceTraceRequest.h @@ -14,8 +14,8 @@ * limitations under the License. */ -#ifndef ALIBABACLOUD_IOT_MODEL_CREATERULENGDISTRIBUTEJOBREQUEST_H_ -#define ALIBABACLOUD_IOT_MODEL_CREATERULENGDISTRIBUTEJOBREQUEST_H_ +#ifndef ALIBABACLOUD_IOT_MODEL_GISSEARCHDEVICETRACEREQUEST_H_ +#define ALIBABACLOUD_IOT_MODEL_GISSEARCHDEVICETRACEREQUEST_H_ #include #include @@ -28,33 +28,42 @@ namespace AlibabaCloud { namespace Model { - class ALIBABACLOUD_IOT_EXPORT CreateRulengDistributeJobRequest : public RpcServiceRequest + class ALIBABACLOUD_IOT_EXPORT GisSearchDeviceTraceRequest : public RpcServiceRequest { public: - CreateRulengDistributeJobRequest(); - ~CreateRulengDistributeJobRequest(); + GisSearchDeviceTraceRequest(); + ~GisSearchDeviceTraceRequest(); - std::string getSourceInstanceId()const; - void setSourceInstanceId(const std::string& sourceInstanceId); + int getMapMatch()const; + void setMapMatch(int mapMatch); + long getStartTime()const; + void setStartTime(long startTime); + std::string getIotInstanceId()const; + void setIotInstanceId(const std::string& iotInstanceId); + long getEndTime()const; + void setEndTime(long endTime); std::string getProductKey()const; void setProductKey(const std::string& productKey); - std::string getTargetInstanceId()const; - void setTargetInstanceId(const std::string& targetInstanceId); 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 sourceInstanceId_; + int mapMatch_; + long startTime_; + std::string iotInstanceId_; + long endTime_; std::string productKey_; - std::string targetInstanceId_; std::string apiProduct_; std::string apiRevision_; + std::string deviceName_; }; } } } -#endif // !ALIBABACLOUD_IOT_MODEL_CREATERULENGDISTRIBUTEJOBREQUEST_H_ \ No newline at end of file +#endif // !ALIBABACLOUD_IOT_MODEL_GISSEARCHDEVICETRACEREQUEST_H_ \ No newline at end of file diff --git a/iot/include/alibabacloud/iot/model/StartAIBoxForceSyncResult.h b/iot/include/alibabacloud/iot/model/GisSearchDeviceTraceResult.h similarity index 62% rename from iot/include/alibabacloud/iot/model/StartAIBoxForceSyncResult.h rename to iot/include/alibabacloud/iot/model/GisSearchDeviceTraceResult.h index 8d949da70..95eb6f4ee 100644 --- a/iot/include/alibabacloud/iot/model/StartAIBoxForceSyncResult.h +++ b/iot/include/alibabacloud/iot/model/GisSearchDeviceTraceResult.h @@ -14,8 +14,8 @@ * limitations under the License. */ -#ifndef ALIBABACLOUD_IOT_MODEL_STARTAIBOXFORCESYNCRESULT_H_ -#define ALIBABACLOUD_IOT_MODEL_STARTAIBOXFORCESYNCRESULT_H_ +#ifndef ALIBABACLOUD_IOT_MODEL_GISSEARCHDEVICETRACERESULT_H_ +#define ALIBABACLOUD_IOT_MODEL_GISSEARCHDEVICETRACERESULT_H_ #include #include @@ -29,15 +29,26 @@ namespace AlibabaCloud { namespace Model { - class ALIBABACLOUD_IOT_EXPORT StartAIBoxForceSyncResult : public ServiceResult + class ALIBABACLOUD_IOT_EXPORT GisSearchDeviceTraceResult : public ServiceResult { public: + struct Data + { + struct PointsItem + { + long locateTime; + std::string location; + }; + std::vector points; + std::string productKey; + std::string deviceName; + }; - StartAIBoxForceSyncResult(); - explicit StartAIBoxForceSyncResult(const std::string &payload); - ~StartAIBoxForceSyncResult(); - bool getData()const; + GisSearchDeviceTraceResult(); + explicit GisSearchDeviceTraceResult(const std::string &payload); + ~GisSearchDeviceTraceResult(); + Data getData()const; std::string getErrorMessage()const; std::string getCode()const; bool getSuccess()const; @@ -45,7 +56,7 @@ namespace AlibabaCloud protected: void parse(const std::string &payload); private: - bool data_; + Data data_; std::string errorMessage_; std::string code_; bool success_; @@ -54,4 +65,4 @@ namespace AlibabaCloud } } } -#endif // !ALIBABACLOUD_IOT_MODEL_STARTAIBOXFORCESYNCRESULT_H_ \ No newline at end of file +#endif // !ALIBABACLOUD_IOT_MODEL_GISSEARCHDEVICETRACERESULT_H_ \ No newline at end of file diff --git a/iot/include/alibabacloud/iot/model/ListTaskByPageRequest.h b/iot/include/alibabacloud/iot/model/ListTaskByPageRequest.h deleted file mode 100644 index e1c54cee2..000000000 --- a/iot/include/alibabacloud/iot/model/ListTaskByPageRequest.h +++ /dev/null @@ -1,75 +0,0 @@ -/* - * 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_LISTTASKBYPAGEREQUEST_H_ -#define ALIBABACLOUD_IOT_MODEL_LISTTASKBYPAGEREQUEST_H_ - -#include -#include -#include -#include - -namespace AlibabaCloud -{ - namespace Iot - { - namespace Model - { - class ALIBABACLOUD_IOT_EXPORT ListTaskByPageRequest : public RpcServiceRequest - { - - public: - ListTaskByPageRequest(); - ~ListTaskByPageRequest(); - - std::string getJobId()const; - void setJobId(const std::string& jobId); - std::string getIotInstanceId()const; - void setIotInstanceId(const std::string& iotInstanceId); - std::string getPageSize()const; - void setPageSize(const std::string& pageSize); - std::string getJobName()const; - void setJobName(const std::string& jobName); - std::string getPageNo()const; - void setPageNo(const std::string& pageNo); - 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); - std::string getDevice()const; - void setDevice(const std::string& device); - std::string getStatus()const; - void setStatus(const std::string& status); - - private: - std::string jobId_; - std::string iotInstanceId_; - std::string pageSize_; - std::string jobName_; - std::string pageNo_; - std::string apiProduct_; - std::string apiRevision_; - std::string deviceName_; - std::string device_; - std::string status_; - - }; - } - } -} -#endif // !ALIBABACLOUD_IOT_MODEL_LISTTASKBYPAGEREQUEST_H_ \ No newline at end of file diff --git a/iot/src/IotClient.cc b/iot/src/IotClient.cc index 2823c93bd..03fc2f804 100644 --- a/iot/src/IotClient.cc +++ b/iot/src/IotClient.cc @@ -2607,42 +2607,6 @@ IotClient::CreateRuleActionOutcomeCallable IotClient::createRuleActionCallable(c return task->get_future(); } -IotClient::CreateRulengDistributeJobOutcome IotClient::createRulengDistributeJob(const CreateRulengDistributeJobRequest &request) const -{ - auto endpointOutcome = endpointProvider_->getEndpoint(); - if (!endpointOutcome.isSuccess()) - return CreateRulengDistributeJobOutcome(endpointOutcome.error()); - - auto outcome = makeRequest(endpointOutcome.result(), request); - - if (outcome.isSuccess()) - return CreateRulengDistributeJobOutcome(CreateRulengDistributeJobResult(outcome.result())); - else - return CreateRulengDistributeJobOutcome(outcome.error()); -} - -void IotClient::createRulengDistributeJobAsync(const CreateRulengDistributeJobRequest& request, const CreateRulengDistributeJobAsyncHandler& handler, const std::shared_ptr& context) const -{ - auto fn = [this, request, handler, context]() - { - handler(this, request, createRulengDistributeJob(request), context); - }; - - asyncExecute(new Runnable(fn)); -} - -IotClient::CreateRulengDistributeJobOutcomeCallable IotClient::createRulengDistributeJobCallable(const CreateRulengDistributeJobRequest &request) const -{ - auto task = std::make_shared>( - [this, request]() - { - return this->createRulengDistributeJob(request); - }); - - asyncExecute(new Runnable([task]() { (*task)(); })); - return task->get_future(); -} - IotClient::CreateSceneRuleOutcome IotClient::createSceneRule(const CreateSceneRuleRequest &request) const { auto endpointOutcome = endpointProvider_->getEndpoint(); @@ -5271,6 +5235,78 @@ IotClient::GetThingTopoOutcomeCallable IotClient::getThingTopoCallable(const Get return task->get_future(); } +IotClient::GisQueryDeviceLocationOutcome IotClient::gisQueryDeviceLocation(const GisQueryDeviceLocationRequest &request) const +{ + auto endpointOutcome = endpointProvider_->getEndpoint(); + if (!endpointOutcome.isSuccess()) + return GisQueryDeviceLocationOutcome(endpointOutcome.error()); + + auto outcome = makeRequest(endpointOutcome.result(), request); + + if (outcome.isSuccess()) + return GisQueryDeviceLocationOutcome(GisQueryDeviceLocationResult(outcome.result())); + else + return GisQueryDeviceLocationOutcome(outcome.error()); +} + +void IotClient::gisQueryDeviceLocationAsync(const GisQueryDeviceLocationRequest& request, const GisQueryDeviceLocationAsyncHandler& handler, const std::shared_ptr& context) const +{ + auto fn = [this, request, handler, context]() + { + handler(this, request, gisQueryDeviceLocation(request), context); + }; + + asyncExecute(new Runnable(fn)); +} + +IotClient::GisQueryDeviceLocationOutcomeCallable IotClient::gisQueryDeviceLocationCallable(const GisQueryDeviceLocationRequest &request) const +{ + auto task = std::make_shared>( + [this, request]() + { + return this->gisQueryDeviceLocation(request); + }); + + asyncExecute(new Runnable([task]() { (*task)(); })); + return task->get_future(); +} + +IotClient::GisSearchDeviceTraceOutcome IotClient::gisSearchDeviceTrace(const GisSearchDeviceTraceRequest &request) const +{ + auto endpointOutcome = endpointProvider_->getEndpoint(); + if (!endpointOutcome.isSuccess()) + return GisSearchDeviceTraceOutcome(endpointOutcome.error()); + + auto outcome = makeRequest(endpointOutcome.result(), request); + + if (outcome.isSuccess()) + return GisSearchDeviceTraceOutcome(GisSearchDeviceTraceResult(outcome.result())); + else + return GisSearchDeviceTraceOutcome(outcome.error()); +} + +void IotClient::gisSearchDeviceTraceAsync(const GisSearchDeviceTraceRequest& request, const GisSearchDeviceTraceAsyncHandler& handler, const std::shared_ptr& context) const +{ + auto fn = [this, request, handler, context]() + { + handler(this, request, gisSearchDeviceTrace(request), context); + }; + + asyncExecute(new Runnable(fn)); +} + +IotClient::GisSearchDeviceTraceOutcomeCallable IotClient::gisSearchDeviceTraceCallable(const GisSearchDeviceTraceRequest &request) const +{ + auto task = std::make_shared>( + [this, request]() + { + return this->gisSearchDeviceTrace(request); + }); + + asyncExecute(new Runnable([task]() { (*task)(); })); + return task->get_future(); +} + IotClient::ImportThingModelTslOutcome IotClient::importThingModelTsl(const ImportThingModelTslRequest &request) const { auto endpointOutcome = endpointProvider_->getEndpoint(); @@ -6027,42 +6063,6 @@ IotClient::ListTaskOutcomeCallable IotClient::listTaskCallable(const ListTaskReq return task->get_future(); } -IotClient::ListTaskByPageOutcome IotClient::listTaskByPage(const ListTaskByPageRequest &request) const -{ - auto endpointOutcome = endpointProvider_->getEndpoint(); - if (!endpointOutcome.isSuccess()) - return ListTaskByPageOutcome(endpointOutcome.error()); - - auto outcome = makeRequest(endpointOutcome.result(), request); - - if (outcome.isSuccess()) - return ListTaskByPageOutcome(ListTaskByPageResult(outcome.result())); - else - return ListTaskByPageOutcome(outcome.error()); -} - -void IotClient::listTaskByPageAsync(const ListTaskByPageRequest& request, const ListTaskByPageAsyncHandler& handler, const std::shared_ptr& context) const -{ - auto fn = [this, request, handler, context]() - { - handler(this, request, listTaskByPage(request), context); - }; - - asyncExecute(new Runnable(fn)); -} - -IotClient::ListTaskByPageOutcomeCallable IotClient::listTaskByPageCallable(const ListTaskByPageRequest &request) const -{ - auto task = std::make_shared>( - [this, request]() - { - return this->listTaskByPage(request); - }); - - asyncExecute(new Runnable([task]() { (*task)(); })); - return task->get_future(); -} - IotClient::ListThingModelVersionOutcome IotClient::listThingModelVersion(const ListThingModelVersionRequest &request) const { auto endpointOutcome = endpointProvider_->getEndpoint(); @@ -10275,42 +10275,6 @@ IotClient::SpeechBySynthesisOutcomeCallable IotClient::speechBySynthesisCallable return task->get_future(); } -IotClient::StartAIBoxForceSyncOutcome IotClient::startAIBoxForceSync(const StartAIBoxForceSyncRequest &request) const -{ - auto endpointOutcome = endpointProvider_->getEndpoint(); - if (!endpointOutcome.isSuccess()) - return StartAIBoxForceSyncOutcome(endpointOutcome.error()); - - auto outcome = makeRequest(endpointOutcome.result(), request); - - if (outcome.isSuccess()) - return StartAIBoxForceSyncOutcome(StartAIBoxForceSyncResult(outcome.result())); - else - return StartAIBoxForceSyncOutcome(outcome.error()); -} - -void IotClient::startAIBoxForceSyncAsync(const StartAIBoxForceSyncRequest& request, const StartAIBoxForceSyncAsyncHandler& handler, const std::shared_ptr& context) const -{ - auto fn = [this, request, handler, context]() - { - handler(this, request, startAIBoxForceSync(request), context); - }; - - asyncExecute(new Runnable(fn)); -} - -IotClient::StartAIBoxForceSyncOutcomeCallable IotClient::startAIBoxForceSyncCallable(const StartAIBoxForceSyncRequest &request) const -{ - auto task = std::make_shared>( - [this, request]() - { - return this->startAIBoxForceSync(request); - }); - - asyncExecute(new Runnable([task]() { (*task)(); })); - return task->get_future(); -} - IotClient::StartRuleOutcome IotClient::startRule(const StartRuleRequest &request) const { auto endpointOutcome = endpointProvider_->getEndpoint(); diff --git a/iot/src/model/CreateRulengDistributeJobRequest.cc b/iot/src/model/CreateRulengDistributeJobRequest.cc deleted file mode 100644 index 3d6868621..000000000 --- a/iot/src/model/CreateRulengDistributeJobRequest.cc +++ /dev/null @@ -1,84 +0,0 @@ -/* - * 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::CreateRulengDistributeJobRequest; - -CreateRulengDistributeJobRequest::CreateRulengDistributeJobRequest() : - RpcServiceRequest("iot", "2018-01-20", "CreateRulengDistributeJob") -{ - setMethod(HttpRequest::Method::Post); -} - -CreateRulengDistributeJobRequest::~CreateRulengDistributeJobRequest() -{} - -std::string CreateRulengDistributeJobRequest::getSourceInstanceId()const -{ - return sourceInstanceId_; -} - -void CreateRulengDistributeJobRequest::setSourceInstanceId(const std::string& sourceInstanceId) -{ - sourceInstanceId_ = sourceInstanceId; - setParameter("SourceInstanceId", sourceInstanceId); -} - -std::string CreateRulengDistributeJobRequest::getProductKey()const -{ - return productKey_; -} - -void CreateRulengDistributeJobRequest::setProductKey(const std::string& productKey) -{ - productKey_ = productKey; - setParameter("ProductKey", productKey); -} - -std::string CreateRulengDistributeJobRequest::getTargetInstanceId()const -{ - return targetInstanceId_; -} - -void CreateRulengDistributeJobRequest::setTargetInstanceId(const std::string& targetInstanceId) -{ - targetInstanceId_ = targetInstanceId; - setParameter("TargetInstanceId", targetInstanceId); -} - -std::string CreateRulengDistributeJobRequest::getApiProduct()const -{ - return apiProduct_; -} - -void CreateRulengDistributeJobRequest::setApiProduct(const std::string& apiProduct) -{ - apiProduct_ = apiProduct; - setBodyParameter("ApiProduct", apiProduct); -} - -std::string CreateRulengDistributeJobRequest::getApiRevision()const -{ - return apiRevision_; -} - -void CreateRulengDistributeJobRequest::setApiRevision(const std::string& apiRevision) -{ - apiRevision_ = apiRevision; - setBodyParameter("ApiRevision", apiRevision); -} - diff --git a/iot/src/model/CreateRulengDistributeJobResult.cc b/iot/src/model/CreateRulengDistributeJobResult.cc deleted file mode 100644 index 4770e88e3..000000000 --- a/iot/src/model/CreateRulengDistributeJobResult.cc +++ /dev/null @@ -1,65 +0,0 @@ -/* - * 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; - -CreateRulengDistributeJobResult::CreateRulengDistributeJobResult() : - ServiceResult() -{} - -CreateRulengDistributeJobResult::CreateRulengDistributeJobResult(const std::string &payload) : - ServiceResult() -{ - parse(payload); -} - -CreateRulengDistributeJobResult::~CreateRulengDistributeJobResult() -{} - -void CreateRulengDistributeJobResult::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 CreateRulengDistributeJobResult::getErrorMessage()const -{ - return errorMessage_; -} - -std::string CreateRulengDistributeJobResult::getCode()const -{ - return code_; -} - -bool CreateRulengDistributeJobResult::getSuccess()const -{ - return success_; -} - diff --git a/iot/src/model/GisQueryDeviceLocationRequest.cc b/iot/src/model/GisQueryDeviceLocationRequest.cc new file mode 100644 index 000000000..f6dd406bd --- /dev/null +++ b/iot/src/model/GisQueryDeviceLocationRequest.cc @@ -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. + */ + +#include + +using AlibabaCloud::Iot::Model::GisQueryDeviceLocationRequest; + +GisQueryDeviceLocationRequest::GisQueryDeviceLocationRequest() : + RpcServiceRequest("iot", "2018-01-20", "GisQueryDeviceLocation") +{ + setMethod(HttpRequest::Method::Post); +} + +GisQueryDeviceLocationRequest::~GisQueryDeviceLocationRequest() +{} + +std::string GisQueryDeviceLocationRequest::getIotInstanceId()const +{ + return iotInstanceId_; +} + +void GisQueryDeviceLocationRequest::setIotInstanceId(const std::string& iotInstanceId) +{ + iotInstanceId_ = iotInstanceId; + setParameter("IotInstanceId", iotInstanceId); +} + +std::vector GisQueryDeviceLocationRequest::getThingList()const +{ + return thingList_; +} + +void GisQueryDeviceLocationRequest::setThingList(const std::vector& thingList) +{ + thingList_ = thingList; + for(int dep1 = 0; dep1!= thingList.size(); dep1++) { + auto thingListObj = thingList.at(dep1); + std::string thingListObjStr = "ThingList." + std::to_string(dep1 + 1); + setParameter(thingListObjStr + ".ProductKey", thingListObj.productKey); + setParameter(thingListObjStr + ".DeviceName", thingListObj.deviceName); + } +} + +std::string GisQueryDeviceLocationRequest::getApiProduct()const +{ + return apiProduct_; +} + +void GisQueryDeviceLocationRequest::setApiProduct(const std::string& apiProduct) +{ + apiProduct_ = apiProduct; + setBodyParameter("ApiProduct", apiProduct); +} + +std::string GisQueryDeviceLocationRequest::getApiRevision()const +{ + return apiRevision_; +} + +void GisQueryDeviceLocationRequest::setApiRevision(const std::string& apiRevision) +{ + apiRevision_ = apiRevision; + setBodyParameter("ApiRevision", apiRevision); +} + diff --git a/iot/src/model/GisQueryDeviceLocationResult.cc b/iot/src/model/GisQueryDeviceLocationResult.cc new file mode 100644 index 000000000..43d1548dd --- /dev/null +++ b/iot/src/model/GisQueryDeviceLocationResult.cc @@ -0,0 +1,96 @@ +/* + * 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; + +GisQueryDeviceLocationResult::GisQueryDeviceLocationResult() : + ServiceResult() +{} + +GisQueryDeviceLocationResult::GisQueryDeviceLocationResult(const std::string &payload) : + ServiceResult() +{ + parse(payload); +} + +GisQueryDeviceLocationResult::~GisQueryDeviceLocationResult() +{} + +void GisQueryDeviceLocationResult::parse(const std::string &payload) +{ + Json::Reader reader; + Json::Value value; + reader.parse(payload, value); + setRequestId(value["RequestId"].asString()); + auto allDataNode = value["Data"]["dataItem"]; + for (auto valueDatadataItem : allDataNode) + { + DataItem dataObject; + if(!valueDatadataItem["ProductKey"].isNull()) + dataObject.productKey = valueDatadataItem["ProductKey"].asString(); + if(!valueDatadataItem["DeviceName"].isNull()) + dataObject.deviceName = valueDatadataItem["DeviceName"].asString(); + if(!valueDatadataItem["Ip"].isNull()) + dataObject.ip = valueDatadataItem["Ip"].asString(); + if(!valueDatadataItem["Country"].isNull()) + dataObject.country = valueDatadataItem["Country"].asString(); + if(!valueDatadataItem["Province"].isNull()) + dataObject.province = valueDatadataItem["Province"].asString(); + if(!valueDatadataItem["City"].isNull()) + dataObject.city = valueDatadataItem["City"].asString(); + if(!valueDatadataItem["Longitude"].isNull()) + dataObject.longitude = std::stof(valueDatadataItem["Longitude"].asString()); + if(!valueDatadataItem["Latitude"].isNull()) + dataObject.latitude = std::stof(valueDatadataItem["Latitude"].asString()); + if(!valueDatadataItem["CoordinateSystem"].isNull()) + dataObject.coordinateSystem = std::stoi(valueDatadataItem["CoordinateSystem"].asString()); + if(!valueDatadataItem["Adcode"].isNull()) + dataObject.adcode = std::stol(valueDatadataItem["Adcode"].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 GisQueryDeviceLocationResult::getData()const +{ + return data_; +} + +std::string GisQueryDeviceLocationResult::getErrorMessage()const +{ + return errorMessage_; +} + +std::string GisQueryDeviceLocationResult::getCode()const +{ + return code_; +} + +bool GisQueryDeviceLocationResult::getSuccess()const +{ + return success_; +} + diff --git a/iot/src/model/GisSearchDeviceTraceRequest.cc b/iot/src/model/GisSearchDeviceTraceRequest.cc new file mode 100644 index 000000000..7120433f1 --- /dev/null +++ b/iot/src/model/GisSearchDeviceTraceRequest.cc @@ -0,0 +1,117 @@ +/* + * 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::GisSearchDeviceTraceRequest; + +GisSearchDeviceTraceRequest::GisSearchDeviceTraceRequest() : + RpcServiceRequest("iot", "2018-01-20", "GisSearchDeviceTrace") +{ + setMethod(HttpRequest::Method::Post); +} + +GisSearchDeviceTraceRequest::~GisSearchDeviceTraceRequest() +{} + +int GisSearchDeviceTraceRequest::getMapMatch()const +{ + return mapMatch_; +} + +void GisSearchDeviceTraceRequest::setMapMatch(int mapMatch) +{ + mapMatch_ = mapMatch; + setParameter("MapMatch", std::to_string(mapMatch)); +} + +long GisSearchDeviceTraceRequest::getStartTime()const +{ + return startTime_; +} + +void GisSearchDeviceTraceRequest::setStartTime(long startTime) +{ + startTime_ = startTime; + setParameter("StartTime", std::to_string(startTime)); +} + +std::string GisSearchDeviceTraceRequest::getIotInstanceId()const +{ + return iotInstanceId_; +} + +void GisSearchDeviceTraceRequest::setIotInstanceId(const std::string& iotInstanceId) +{ + iotInstanceId_ = iotInstanceId; + setParameter("IotInstanceId", iotInstanceId); +} + +long GisSearchDeviceTraceRequest::getEndTime()const +{ + return endTime_; +} + +void GisSearchDeviceTraceRequest::setEndTime(long endTime) +{ + endTime_ = endTime; + setParameter("EndTime", std::to_string(endTime)); +} + +std::string GisSearchDeviceTraceRequest::getProductKey()const +{ + return productKey_; +} + +void GisSearchDeviceTraceRequest::setProductKey(const std::string& productKey) +{ + productKey_ = productKey; + setParameter("ProductKey", productKey); +} + +std::string GisSearchDeviceTraceRequest::getApiProduct()const +{ + return apiProduct_; +} + +void GisSearchDeviceTraceRequest::setApiProduct(const std::string& apiProduct) +{ + apiProduct_ = apiProduct; + setBodyParameter("ApiProduct", apiProduct); +} + +std::string GisSearchDeviceTraceRequest::getApiRevision()const +{ + return apiRevision_; +} + +void GisSearchDeviceTraceRequest::setApiRevision(const std::string& apiRevision) +{ + apiRevision_ = apiRevision; + setBodyParameter("ApiRevision", apiRevision); +} + +std::string GisSearchDeviceTraceRequest::getDeviceName()const +{ + return deviceName_; +} + +void GisSearchDeviceTraceRequest::setDeviceName(const std::string& deviceName) +{ + deviceName_ = deviceName; + setParameter("DeviceName", deviceName); +} + diff --git a/iot/src/model/GisSearchDeviceTraceResult.cc b/iot/src/model/GisSearchDeviceTraceResult.cc new file mode 100644 index 000000000..0f61a284d --- /dev/null +++ b/iot/src/model/GisSearchDeviceTraceResult.cc @@ -0,0 +1,85 @@ +/* + * 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; + +GisSearchDeviceTraceResult::GisSearchDeviceTraceResult() : + ServiceResult() +{} + +GisSearchDeviceTraceResult::GisSearchDeviceTraceResult(const std::string &payload) : + ServiceResult() +{ + parse(payload); +} + +GisSearchDeviceTraceResult::~GisSearchDeviceTraceResult() +{} + +void GisSearchDeviceTraceResult::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["ProductKey"].isNull()) + data_.productKey = dataNode["ProductKey"].asString(); + if(!dataNode["DeviceName"].isNull()) + data_.deviceName = dataNode["DeviceName"].asString(); + auto allPointsNode = dataNode["Points"]["PointsItem"]; + for (auto dataNodePointsPointsItem : allPointsNode) + { + Data::PointsItem pointsItemObject; + if(!dataNodePointsPointsItem["Location"].isNull()) + pointsItemObject.location = dataNodePointsPointsItem["Location"].asString(); + if(!dataNodePointsPointsItem["LocateTime"].isNull()) + pointsItemObject.locateTime = std::stol(dataNodePointsPointsItem["LocateTime"].asString()); + data_.points.push_back(pointsItemObject); + } + 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(); + +} + +GisSearchDeviceTraceResult::Data GisSearchDeviceTraceResult::getData()const +{ + return data_; +} + +std::string GisSearchDeviceTraceResult::getErrorMessage()const +{ + return errorMessage_; +} + +std::string GisSearchDeviceTraceResult::getCode()const +{ + return code_; +} + +bool GisSearchDeviceTraceResult::getSuccess()const +{ + return success_; +} + diff --git a/iot/src/model/ListTaskByPageRequest.cc b/iot/src/model/ListTaskByPageRequest.cc deleted file mode 100644 index 13555c285..000000000 --- a/iot/src/model/ListTaskByPageRequest.cc +++ /dev/null @@ -1,139 +0,0 @@ -/* - * 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::ListTaskByPageRequest; - -ListTaskByPageRequest::ListTaskByPageRequest() : - RpcServiceRequest("iot", "2018-01-20", "ListTaskByPage") -{ - setMethod(HttpRequest::Method::Post); -} - -ListTaskByPageRequest::~ListTaskByPageRequest() -{} - -std::string ListTaskByPageRequest::getJobId()const -{ - return jobId_; -} - -void ListTaskByPageRequest::setJobId(const std::string& jobId) -{ - jobId_ = jobId; - setParameter("JobId", jobId); -} - -std::string ListTaskByPageRequest::getIotInstanceId()const -{ - return iotInstanceId_; -} - -void ListTaskByPageRequest::setIotInstanceId(const std::string& iotInstanceId) -{ - iotInstanceId_ = iotInstanceId; - setParameter("IotInstanceId", iotInstanceId); -} - -std::string ListTaskByPageRequest::getPageSize()const -{ - return pageSize_; -} - -void ListTaskByPageRequest::setPageSize(const std::string& pageSize) -{ - pageSize_ = pageSize; - setParameter("PageSize", pageSize); -} - -std::string ListTaskByPageRequest::getJobName()const -{ - return jobName_; -} - -void ListTaskByPageRequest::setJobName(const std::string& jobName) -{ - jobName_ = jobName; - setParameter("JobName", jobName); -} - -std::string ListTaskByPageRequest::getPageNo()const -{ - return pageNo_; -} - -void ListTaskByPageRequest::setPageNo(const std::string& pageNo) -{ - pageNo_ = pageNo; - setParameter("PageNo", pageNo); -} - -std::string ListTaskByPageRequest::getApiProduct()const -{ - return apiProduct_; -} - -void ListTaskByPageRequest::setApiProduct(const std::string& apiProduct) -{ - apiProduct_ = apiProduct; - setBodyParameter("ApiProduct", apiProduct); -} - -std::string ListTaskByPageRequest::getApiRevision()const -{ - return apiRevision_; -} - -void ListTaskByPageRequest::setApiRevision(const std::string& apiRevision) -{ - apiRevision_ = apiRevision; - setBodyParameter("ApiRevision", apiRevision); -} - -std::string ListTaskByPageRequest::getDeviceName()const -{ - return deviceName_; -} - -void ListTaskByPageRequest::setDeviceName(const std::string& deviceName) -{ - deviceName_ = deviceName; - setParameter("DeviceName", deviceName); -} - -std::string ListTaskByPageRequest::getDevice()const -{ - return device_; -} - -void ListTaskByPageRequest::setDevice(const std::string& device) -{ - device_ = device; - setParameter("Device", device); -} - -std::string ListTaskByPageRequest::getStatus()const -{ - return status_; -} - -void ListTaskByPageRequest::setStatus(const std::string& status) -{ - status_ = status; - setParameter("Status", status); -} - diff --git a/iot/src/model/ListTaskByPageResult.cc b/iot/src/model/ListTaskByPageResult.cc deleted file mode 100644 index c9555899c..000000000 --- a/iot/src/model/ListTaskByPageResult.cc +++ /dev/null @@ -1,128 +0,0 @@ -/* - * 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; - -ListTaskByPageResult::ListTaskByPageResult() : - ServiceResult() -{} - -ListTaskByPageResult::ListTaskByPageResult(const std::string &payload) : - ServiceResult() -{ - parse(payload); -} - -ListTaskByPageResult::~ListTaskByPageResult() -{} - -void ListTaskByPageResult::parse(const std::string &payload) -{ - Json::Reader reader; - Json::Value value; - reader.parse(payload, value); - setRequestId(value["RequestId"].asString()); - auto allDataNode = value["Data"]["dataItem"]; - for (auto valueDatadataItem : allDataNode) - { - DataItem dataObject; - if(!valueDatadataItem["JobId"].isNull()) - dataObject.jobId = valueDatadataItem["JobId"].asString(); - if(!valueDatadataItem["JobName"].isNull()) - dataObject.jobName = valueDatadataItem["JobName"].asString(); - if(!valueDatadataItem["TaskId"].isNull()) - dataObject.taskId = valueDatadataItem["TaskId"].asString(); - if(!valueDatadataItem["ProductKey"].isNull()) - dataObject.productKey = valueDatadataItem["ProductKey"].asString(); - if(!valueDatadataItem["DeviceName"].isNull()) - dataObject.deviceName = valueDatadataItem["DeviceName"].asString(); - if(!valueDatadataItem["IotId"].isNull()) - dataObject.iotId = valueDatadataItem["IotId"].asString(); - if(!valueDatadataItem["Progress"].isNull()) - dataObject.progress = std::stoi(valueDatadataItem["Progress"].asString()); - if(!valueDatadataItem["UtcQueueTime"].isNull()) - dataObject.utcQueueTime = valueDatadataItem["UtcQueueTime"].asString(); - if(!valueDatadataItem["UtcModified"].isNull()) - dataObject.utcModified = valueDatadataItem["UtcModified"].asString(); - if(!valueDatadataItem["StatusDetail"].isNull()) - dataObject.statusDetail = valueDatadataItem["StatusDetail"].asString(); - if(!valueDatadataItem["Status"].isNull()) - dataObject.status = valueDatadataItem["Status"].asString(); - if(!valueDatadataItem["ProductName"].isNull()) - dataObject.productName = valueDatadataItem["ProductName"].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(); - if(!value["Total"].isNull()) - total_ = std::stoi(value["Total"].asString()); - if(!value["PageSize"].isNull()) - pageSize_ = std::stoi(value["PageSize"].asString()); - if(!value["PageCount"].isNull()) - pageCount_ = std::stoi(value["PageCount"].asString()); - if(!value["Page"].isNull()) - page_ = std::stoi(value["Page"].asString()); - -} - -int ListTaskByPageResult::getPageSize()const -{ - return pageSize_; -} - -int ListTaskByPageResult::getPageCount()const -{ - return pageCount_; -} - -int ListTaskByPageResult::getTotal()const -{ - return total_; -} - -std::vector ListTaskByPageResult::getData()const -{ - return data_; -} - -int ListTaskByPageResult::getPage()const -{ - return page_; -} - -std::string ListTaskByPageResult::getErrorMessage()const -{ - return errorMessage_; -} - -std::string ListTaskByPageResult::getCode()const -{ - return code_; -} - -bool ListTaskByPageResult::getSuccess()const -{ - return success_; -} - diff --git a/iot/src/model/StartAIBoxForceSyncRequest.cc b/iot/src/model/StartAIBoxForceSyncRequest.cc deleted file mode 100644 index 7547e5c0d..000000000 --- a/iot/src/model/StartAIBoxForceSyncRequest.cc +++ /dev/null @@ -1,62 +0,0 @@ -/* - * 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::StartAIBoxForceSyncRequest; - -StartAIBoxForceSyncRequest::StartAIBoxForceSyncRequest() : - RpcServiceRequest("iot", "2018-01-20", "StartAIBoxForceSync") -{ - setMethod(HttpRequest::Method::Post); -} - -StartAIBoxForceSyncRequest::~StartAIBoxForceSyncRequest() -{} - -std::string StartAIBoxForceSyncRequest::getIotId()const -{ - return iotId_; -} - -void StartAIBoxForceSyncRequest::setIotId(const std::string& iotId) -{ - iotId_ = iotId; - setParameter("IotId", iotId); -} - -std::string StartAIBoxForceSyncRequest::getApiProduct()const -{ - return apiProduct_; -} - -void StartAIBoxForceSyncRequest::setApiProduct(const std::string& apiProduct) -{ - apiProduct_ = apiProduct; - setBodyParameter("ApiProduct", apiProduct); -} - -std::string StartAIBoxForceSyncRequest::getApiRevision()const -{ - return apiRevision_; -} - -void StartAIBoxForceSyncRequest::setApiRevision(const std::string& apiRevision) -{ - apiRevision_ = apiRevision; - setBodyParameter("ApiRevision", apiRevision); -} - diff --git a/iot/src/model/StartAIBoxForceSyncResult.cc b/iot/src/model/StartAIBoxForceSyncResult.cc deleted file mode 100644 index 56f865164..000000000 --- a/iot/src/model/StartAIBoxForceSyncResult.cc +++ /dev/null @@ -1,72 +0,0 @@ -/* - * 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; - -StartAIBoxForceSyncResult::StartAIBoxForceSyncResult() : - ServiceResult() -{} - -StartAIBoxForceSyncResult::StartAIBoxForceSyncResult(const std::string &payload) : - ServiceResult() -{ - parse(payload); -} - -StartAIBoxForceSyncResult::~StartAIBoxForceSyncResult() -{} - -void StartAIBoxForceSyncResult::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["ErrorMessage"].isNull()) - errorMessage_ = value["ErrorMessage"].asString(); - if(!value["Code"].isNull()) - code_ = value["Code"].asString(); - if(!value["Data"].isNull()) - data_ = value["Data"].asString() == "true"; - -} - -bool StartAIBoxForceSyncResult::getData()const -{ - return data_; -} - -std::string StartAIBoxForceSyncResult::getErrorMessage()const -{ - return errorMessage_; -} - -std::string StartAIBoxForceSyncResult::getCode()const -{ - return code_; -} - -bool StartAIBoxForceSyncResult::getSuccess()const -{ - return success_; -} -