diff --git a/CHANGELOG b/CHANGELOG index 25990c943..0588c54b4 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -1,3 +1,6 @@ +2022-02-08 Version: 1.36.1049 +- Iot_20180120 oldversion sdk. + 2022-01-28 Version: 1.36.1048 - Support cloud disk. diff --git a/VERSION b/VERSION index beafc6355..41bb5824f 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -1.36.1048 \ No newline at end of file +1.36.1049 \ No newline at end of file diff --git a/iot/CMakeLists.txt b/iot/CMakeLists.txt index 448ed0efd..0fcfc5b48 100644 --- a/iot/CMakeLists.txt +++ b/iot/CMakeLists.txt @@ -167,6 +167,8 @@ set(iot_public_header_model include/alibabacloud/iot/model/CreateRulengDistributeJobResult.h include/alibabacloud/iot/model/CreateSceneRuleRequest.h include/alibabacloud/iot/model/CreateSceneRuleResult.h + include/alibabacloud/iot/model/CreateSoundCodeRequest.h + include/alibabacloud/iot/model/CreateSoundCodeResult.h include/alibabacloud/iot/model/CreateSpeechRequest.h include/alibabacloud/iot/model/CreateSpeechResult.h include/alibabacloud/iot/model/CreateStudioAppDomainOpenRequest.h @@ -227,6 +229,8 @@ set(iot_public_header_model include/alibabacloud/iot/model/DeleteRuleActionResult.h include/alibabacloud/iot/model/DeleteSceneRuleRequest.h include/alibabacloud/iot/model/DeleteSceneRuleResult.h + include/alibabacloud/iot/model/DeleteSoundCodeRequest.h + include/alibabacloud/iot/model/DeleteSoundCodeResult.h include/alibabacloud/iot/model/DeleteSpeechRequest.h include/alibabacloud/iot/model/DeleteSpeechResult.h include/alibabacloud/iot/model/DeleteStudioAppDomainOpenRequest.h @@ -289,6 +293,8 @@ set(iot_public_header_model include/alibabacloud/iot/model/GetRuleActionResult.h include/alibabacloud/iot/model/GetSceneRuleRequest.h include/alibabacloud/iot/model/GetSceneRuleResult.h + include/alibabacloud/iot/model/GetSoundCodeAudioRequest.h + include/alibabacloud/iot/model/GetSoundCodeAudioResult.h include/alibabacloud/iot/model/GetSpeechDeviceDetailRequest.h include/alibabacloud/iot/model/GetSpeechDeviceDetailResult.h include/alibabacloud/iot/model/GetSpeechVoiceRequest.h @@ -495,6 +501,8 @@ set(iot_public_header_model include/alibabacloud/iot/model/QuerySceneRuleResult.h include/alibabacloud/iot/model/QuerySolutionDeviceGroupPageRequest.h include/alibabacloud/iot/model/QuerySolutionDeviceGroupPageResult.h + include/alibabacloud/iot/model/QuerySoundCodeListRequest.h + include/alibabacloud/iot/model/QuerySoundCodeListResult.h include/alibabacloud/iot/model/QuerySpeechRequest.h include/alibabacloud/iot/model/QuerySpeechResult.h include/alibabacloud/iot/model/QuerySpeechDeviceRequest.h @@ -579,6 +587,8 @@ 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 @@ -792,6 +802,8 @@ set(iot_src src/model/CreateRulengDistributeJobResult.cc src/model/CreateSceneRuleRequest.cc src/model/CreateSceneRuleResult.cc + src/model/CreateSoundCodeRequest.cc + src/model/CreateSoundCodeResult.cc src/model/CreateSpeechRequest.cc src/model/CreateSpeechResult.cc src/model/CreateStudioAppDomainOpenRequest.cc @@ -852,6 +864,8 @@ set(iot_src src/model/DeleteRuleActionResult.cc src/model/DeleteSceneRuleRequest.cc src/model/DeleteSceneRuleResult.cc + src/model/DeleteSoundCodeRequest.cc + src/model/DeleteSoundCodeResult.cc src/model/DeleteSpeechRequest.cc src/model/DeleteSpeechResult.cc src/model/DeleteStudioAppDomainOpenRequest.cc @@ -914,6 +928,8 @@ set(iot_src src/model/GetRuleActionResult.cc src/model/GetSceneRuleRequest.cc src/model/GetSceneRuleResult.cc + src/model/GetSoundCodeAudioRequest.cc + src/model/GetSoundCodeAudioResult.cc src/model/GetSpeechDeviceDetailRequest.cc src/model/GetSpeechDeviceDetailResult.cc src/model/GetSpeechVoiceRequest.cc @@ -1120,6 +1136,8 @@ set(iot_src src/model/QuerySceneRuleResult.cc src/model/QuerySolutionDeviceGroupPageRequest.cc src/model/QuerySolutionDeviceGroupPageResult.cc + src/model/QuerySoundCodeListRequest.cc + src/model/QuerySoundCodeListResult.cc src/model/QuerySpeechRequest.cc src/model/QuerySpeechResult.cc src/model/QuerySpeechDeviceRequest.cc @@ -1204,6 +1222,8 @@ 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 0e53d1748..fba6467d0 100644 --- a/iot/include/alibabacloud/iot/IotClient.h +++ b/iot/include/alibabacloud/iot/IotClient.h @@ -168,6 +168,8 @@ #include "model/CreateRulengDistributeJobResult.h" #include "model/CreateSceneRuleRequest.h" #include "model/CreateSceneRuleResult.h" +#include "model/CreateSoundCodeRequest.h" +#include "model/CreateSoundCodeResult.h" #include "model/CreateSpeechRequest.h" #include "model/CreateSpeechResult.h" #include "model/CreateStudioAppDomainOpenRequest.h" @@ -228,6 +230,8 @@ #include "model/DeleteRuleActionResult.h" #include "model/DeleteSceneRuleRequest.h" #include "model/DeleteSceneRuleResult.h" +#include "model/DeleteSoundCodeRequest.h" +#include "model/DeleteSoundCodeResult.h" #include "model/DeleteSpeechRequest.h" #include "model/DeleteSpeechResult.h" #include "model/DeleteStudioAppDomainOpenRequest.h" @@ -290,6 +294,8 @@ #include "model/GetRuleActionResult.h" #include "model/GetSceneRuleRequest.h" #include "model/GetSceneRuleResult.h" +#include "model/GetSoundCodeAudioRequest.h" +#include "model/GetSoundCodeAudioResult.h" #include "model/GetSpeechDeviceDetailRequest.h" #include "model/GetSpeechDeviceDetailResult.h" #include "model/GetSpeechVoiceRequest.h" @@ -496,6 +502,8 @@ #include "model/QuerySceneRuleResult.h" #include "model/QuerySolutionDeviceGroupPageRequest.h" #include "model/QuerySolutionDeviceGroupPageResult.h" +#include "model/QuerySoundCodeListRequest.h" +#include "model/QuerySoundCodeListResult.h" #include "model/QuerySpeechRequest.h" #include "model/QuerySpeechResult.h" #include "model/QuerySpeechDeviceRequest.h" @@ -580,6 +588,8 @@ #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" @@ -872,6 +882,9 @@ namespace AlibabaCloud typedef Outcome CreateSceneRuleOutcome; typedef std::future CreateSceneRuleOutcomeCallable; typedef std::function&)> CreateSceneRuleAsyncHandler; + typedef Outcome CreateSoundCodeOutcome; + typedef std::future CreateSoundCodeOutcomeCallable; + typedef std::function&)> CreateSoundCodeAsyncHandler; typedef Outcome CreateSpeechOutcome; typedef std::future CreateSpeechOutcomeCallable; typedef std::function&)> CreateSpeechAsyncHandler; @@ -962,6 +975,9 @@ namespace AlibabaCloud typedef Outcome DeleteSceneRuleOutcome; typedef std::future DeleteSceneRuleOutcomeCallable; typedef std::function&)> DeleteSceneRuleAsyncHandler; + typedef Outcome DeleteSoundCodeOutcome; + typedef std::future DeleteSoundCodeOutcomeCallable; + typedef std::function&)> DeleteSoundCodeAsyncHandler; typedef Outcome DeleteSpeechOutcome; typedef std::future DeleteSpeechOutcomeCallable; typedef std::function&)> DeleteSpeechAsyncHandler; @@ -1055,6 +1071,9 @@ namespace AlibabaCloud typedef Outcome GetSceneRuleOutcome; typedef std::future GetSceneRuleOutcomeCallable; typedef std::function&)> GetSceneRuleAsyncHandler; + typedef Outcome GetSoundCodeAudioOutcome; + typedef std::future GetSoundCodeAudioOutcomeCallable; + typedef std::function&)> GetSoundCodeAudioAsyncHandler; typedef Outcome GetSpeechDeviceDetailOutcome; typedef std::future GetSpeechDeviceDetailOutcomeCallable; typedef std::function&)> GetSpeechDeviceDetailAsyncHandler; @@ -1364,6 +1383,9 @@ namespace AlibabaCloud typedef Outcome QuerySolutionDeviceGroupPageOutcome; typedef std::future QuerySolutionDeviceGroupPageOutcomeCallable; typedef std::function&)> QuerySolutionDeviceGroupPageAsyncHandler; + typedef Outcome QuerySoundCodeListOutcome; + typedef std::future QuerySoundCodeListOutcomeCallable; + typedef std::function&)> QuerySoundCodeListAsyncHandler; typedef Outcome QuerySpeechOutcome; typedef std::future QuerySpeechOutcomeCallable; typedef std::function&)> QuerySpeechAsyncHandler; @@ -1490,6 +1512,9 @@ 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; @@ -1810,6 +1835,9 @@ namespace AlibabaCloud 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; + CreateSoundCodeOutcome createSoundCode(const Model::CreateSoundCodeRequest &request)const; + void createSoundCodeAsync(const Model::CreateSoundCodeRequest& request, const CreateSoundCodeAsyncHandler& handler, const std::shared_ptr& context = nullptr) const; + CreateSoundCodeOutcomeCallable createSoundCodeCallable(const Model::CreateSoundCodeRequest& request) const; CreateSpeechOutcome createSpeech(const Model::CreateSpeechRequest &request)const; void createSpeechAsync(const Model::CreateSpeechRequest& request, const CreateSpeechAsyncHandler& handler, const std::shared_ptr& context = nullptr) const; CreateSpeechOutcomeCallable createSpeechCallable(const Model::CreateSpeechRequest& request) const; @@ -1900,6 +1928,9 @@ namespace AlibabaCloud DeleteSceneRuleOutcome deleteSceneRule(const Model::DeleteSceneRuleRequest &request)const; void deleteSceneRuleAsync(const Model::DeleteSceneRuleRequest& request, const DeleteSceneRuleAsyncHandler& handler, const std::shared_ptr& context = nullptr) const; DeleteSceneRuleOutcomeCallable deleteSceneRuleCallable(const Model::DeleteSceneRuleRequest& request) const; + DeleteSoundCodeOutcome deleteSoundCode(const Model::DeleteSoundCodeRequest &request)const; + void deleteSoundCodeAsync(const Model::DeleteSoundCodeRequest& request, const DeleteSoundCodeAsyncHandler& handler, const std::shared_ptr& context = nullptr) const; + DeleteSoundCodeOutcomeCallable deleteSoundCodeCallable(const Model::DeleteSoundCodeRequest& request) const; DeleteSpeechOutcome deleteSpeech(const Model::DeleteSpeechRequest &request)const; void deleteSpeechAsync(const Model::DeleteSpeechRequest& request, const DeleteSpeechAsyncHandler& handler, const std::shared_ptr& context = nullptr) const; DeleteSpeechOutcomeCallable deleteSpeechCallable(const Model::DeleteSpeechRequest& request) const; @@ -1993,6 +2024,9 @@ namespace AlibabaCloud GetSceneRuleOutcome getSceneRule(const Model::GetSceneRuleRequest &request)const; void getSceneRuleAsync(const Model::GetSceneRuleRequest& request, const GetSceneRuleAsyncHandler& handler, const std::shared_ptr& context = nullptr) const; GetSceneRuleOutcomeCallable getSceneRuleCallable(const Model::GetSceneRuleRequest& request) const; + GetSoundCodeAudioOutcome getSoundCodeAudio(const Model::GetSoundCodeAudioRequest &request)const; + void getSoundCodeAudioAsync(const Model::GetSoundCodeAudioRequest& request, const GetSoundCodeAudioAsyncHandler& handler, const std::shared_ptr& context = nullptr) const; + GetSoundCodeAudioOutcomeCallable getSoundCodeAudioCallable(const Model::GetSoundCodeAudioRequest& request) const; GetSpeechDeviceDetailOutcome getSpeechDeviceDetail(const Model::GetSpeechDeviceDetailRequest &request)const; void getSpeechDeviceDetailAsync(const Model::GetSpeechDeviceDetailRequest& request, const GetSpeechDeviceDetailAsyncHandler& handler, const std::shared_ptr& context = nullptr) const; GetSpeechDeviceDetailOutcomeCallable getSpeechDeviceDetailCallable(const Model::GetSpeechDeviceDetailRequest& request) const; @@ -2302,6 +2336,9 @@ namespace AlibabaCloud QuerySolutionDeviceGroupPageOutcome querySolutionDeviceGroupPage(const Model::QuerySolutionDeviceGroupPageRequest &request)const; void querySolutionDeviceGroupPageAsync(const Model::QuerySolutionDeviceGroupPageRequest& request, const QuerySolutionDeviceGroupPageAsyncHandler& handler, const std::shared_ptr& context = nullptr) const; QuerySolutionDeviceGroupPageOutcomeCallable querySolutionDeviceGroupPageCallable(const Model::QuerySolutionDeviceGroupPageRequest& request) const; + QuerySoundCodeListOutcome querySoundCodeList(const Model::QuerySoundCodeListRequest &request)const; + void querySoundCodeListAsync(const Model::QuerySoundCodeListRequest& request, const QuerySoundCodeListAsyncHandler& handler, const std::shared_ptr& context = nullptr) const; + QuerySoundCodeListOutcomeCallable querySoundCodeListCallable(const Model::QuerySoundCodeListRequest& request) const; QuerySpeechOutcome querySpeech(const Model::QuerySpeechRequest &request)const; void querySpeechAsync(const Model::QuerySpeechRequest& request, const QuerySpeechAsyncHandler& handler, const std::shared_ptr& context = nullptr) const; QuerySpeechOutcomeCallable querySpeechCallable(const Model::QuerySpeechRequest& request) const; @@ -2428,6 +2465,9 @@ 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/CreateSoundCodeRequest.h b/iot/include/alibabacloud/iot/model/CreateSoundCodeRequest.h new file mode 100644 index 000000000..3a0d0254e --- /dev/null +++ b/iot/include/alibabacloud/iot/model/CreateSoundCodeRequest.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_CREATESOUNDCODEREQUEST_H_ +#define ALIBABACLOUD_IOT_MODEL_CREATESOUNDCODEREQUEST_H_ + +#include +#include +#include +#include + +namespace AlibabaCloud +{ + namespace Iot + { + namespace Model + { + class ALIBABACLOUD_IOT_EXPORT CreateSoundCodeRequest : public RpcServiceRequest + { + + public: + CreateSoundCodeRequest(); + ~CreateSoundCodeRequest(); + + int getDuration()const; + void setDuration(int duration); + std::string getIotInstanceId()const; + void setIotInstanceId(const std::string& iotInstanceId); + std::string getSoundCodeContent()const; + void setSoundCodeContent(const std::string& soundCodeContent); + std::string getApiProduct()const; + void setApiProduct(const std::string& apiProduct); + std::string getApiRevision()const; + void setApiRevision(const std::string& apiRevision); + + private: + int duration_; + std::string iotInstanceId_; + std::string soundCodeContent_; + std::string apiProduct_; + std::string apiRevision_; + + }; + } + } +} +#endif // !ALIBABACLOUD_IOT_MODEL_CREATESOUNDCODEREQUEST_H_ \ No newline at end of file diff --git a/iot/include/alibabacloud/iot/model/CreateSoundCodeResult.h b/iot/include/alibabacloud/iot/model/CreateSoundCodeResult.h new file mode 100644 index 000000000..5ce751ab2 --- /dev/null +++ b/iot/include/alibabacloud/iot/model/CreateSoundCodeResult.h @@ -0,0 +1,57 @@ +/* + * 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_CREATESOUNDCODERESULT_H_ +#define ALIBABACLOUD_IOT_MODEL_CREATESOUNDCODERESULT_H_ + +#include +#include +#include +#include +#include + +namespace AlibabaCloud +{ + namespace Iot + { + namespace Model + { + class ALIBABACLOUD_IOT_EXPORT CreateSoundCodeResult : public ServiceResult + { + public: + + + CreateSoundCodeResult(); + explicit CreateSoundCodeResult(const std::string &payload); + ~CreateSoundCodeResult(); + std::string getData()const; + std::string getErrorMessage()const; + std::string getCode()const; + bool getSuccess()const; + + protected: + void parse(const std::string &payload); + private: + std::string data_; + std::string errorMessage_; + std::string code_; + bool success_; + + }; + } + } +} +#endif // !ALIBABACLOUD_IOT_MODEL_CREATESOUNDCODERESULT_H_ \ No newline at end of file diff --git a/iot/include/alibabacloud/iot/model/DeleteSoundCodeRequest.h b/iot/include/alibabacloud/iot/model/DeleteSoundCodeRequest.h new file mode 100644 index 000000000..80432a76e --- /dev/null +++ b/iot/include/alibabacloud/iot/model/DeleteSoundCodeRequest.h @@ -0,0 +1,57 @@ +/* + * 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_DELETESOUNDCODEREQUEST_H_ +#define ALIBABACLOUD_IOT_MODEL_DELETESOUNDCODEREQUEST_H_ + +#include +#include +#include +#include + +namespace AlibabaCloud +{ + namespace Iot + { + namespace Model + { + class ALIBABACLOUD_IOT_EXPORT DeleteSoundCodeRequest : public RpcServiceRequest + { + + public: + DeleteSoundCodeRequest(); + ~DeleteSoundCodeRequest(); + + std::string getSoundCode()const; + void setSoundCode(const std::string& soundCode); + std::string getIotInstanceId()const; + void setIotInstanceId(const std::string& iotInstanceId); + std::string getApiProduct()const; + void setApiProduct(const std::string& apiProduct); + std::string getApiRevision()const; + void setApiRevision(const std::string& apiRevision); + + private: + std::string soundCode_; + std::string iotInstanceId_; + std::string apiProduct_; + std::string apiRevision_; + + }; + } + } +} +#endif // !ALIBABACLOUD_IOT_MODEL_DELETESOUNDCODEREQUEST_H_ \ No newline at end of file diff --git a/iot/include/alibabacloud/iot/model/DeleteSoundCodeResult.h b/iot/include/alibabacloud/iot/model/DeleteSoundCodeResult.h new file mode 100644 index 000000000..511ccf2e8 --- /dev/null +++ b/iot/include/alibabacloud/iot/model/DeleteSoundCodeResult.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_DELETESOUNDCODERESULT_H_ +#define ALIBABACLOUD_IOT_MODEL_DELETESOUNDCODERESULT_H_ + +#include +#include +#include +#include +#include + +namespace AlibabaCloud +{ + namespace Iot + { + namespace Model + { + class ALIBABACLOUD_IOT_EXPORT DeleteSoundCodeResult : public ServiceResult + { + public: + + + DeleteSoundCodeResult(); + explicit DeleteSoundCodeResult(const std::string &payload); + ~DeleteSoundCodeResult(); + 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_DELETESOUNDCODERESULT_H_ \ No newline at end of file diff --git a/iot/include/alibabacloud/iot/model/GetSoundCodeAudioRequest.h b/iot/include/alibabacloud/iot/model/GetSoundCodeAudioRequest.h new file mode 100644 index 000000000..aada8dc4d --- /dev/null +++ b/iot/include/alibabacloud/iot/model/GetSoundCodeAudioRequest.h @@ -0,0 +1,57 @@ +/* + * 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_GETSOUNDCODEAUDIOREQUEST_H_ +#define ALIBABACLOUD_IOT_MODEL_GETSOUNDCODEAUDIOREQUEST_H_ + +#include +#include +#include +#include + +namespace AlibabaCloud +{ + namespace Iot + { + namespace Model + { + class ALIBABACLOUD_IOT_EXPORT GetSoundCodeAudioRequest : public RpcServiceRequest + { + + public: + GetSoundCodeAudioRequest(); + ~GetSoundCodeAudioRequest(); + + std::string getIotInstanceId()const; + void setIotInstanceId(const std::string& iotInstanceId); + std::vector getSoundCodeList()const; + void setSoundCodeList(const std::vector& soundCodeList); + std::string getApiProduct()const; + void setApiProduct(const std::string& apiProduct); + std::string getApiRevision()const; + void setApiRevision(const std::string& apiRevision); + + private: + std::string iotInstanceId_; + std::vector soundCodeList_; + std::string apiProduct_; + std::string apiRevision_; + + }; + } + } +} +#endif // !ALIBABACLOUD_IOT_MODEL_GETSOUNDCODEAUDIOREQUEST_H_ \ No newline at end of file diff --git a/iot/include/alibabacloud/iot/model/GetSoundCodeAudioResult.h b/iot/include/alibabacloud/iot/model/GetSoundCodeAudioResult.h new file mode 100644 index 000000000..93423d26b --- /dev/null +++ b/iot/include/alibabacloud/iot/model/GetSoundCodeAudioResult.h @@ -0,0 +1,57 @@ +/* + * 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_GETSOUNDCODEAUDIORESULT_H_ +#define ALIBABACLOUD_IOT_MODEL_GETSOUNDCODEAUDIORESULT_H_ + +#include +#include +#include +#include +#include + +namespace AlibabaCloud +{ + namespace Iot + { + namespace Model + { + class ALIBABACLOUD_IOT_EXPORT GetSoundCodeAudioResult : public ServiceResult + { + public: + + + GetSoundCodeAudioResult(); + explicit GetSoundCodeAudioResult(const std::string &payload); + ~GetSoundCodeAudioResult(); + 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_GETSOUNDCODEAUDIORESULT_H_ \ No newline at end of file diff --git a/iot/include/alibabacloud/iot/model/InvokeDataAPIServiceResult.h b/iot/include/alibabacloud/iot/model/InvokeDataAPIServiceResult.h index 049963a0c..708528a6c 100644 --- a/iot/include/alibabacloud/iot/model/InvokeDataAPIServiceResult.h +++ b/iot/include/alibabacloud/iot/model/InvokeDataAPIServiceResult.h @@ -38,6 +38,7 @@ namespace AlibabaCloud std::vector resultList; int pageSize; int pageNo; + int totalSize; std::vector fieldNameList; }; diff --git a/iot/include/alibabacloud/iot/model/ListDeviceDistributeJobRequest.h b/iot/include/alibabacloud/iot/model/ListDeviceDistributeJobRequest.h index dbcb562a3..16d4ec49f 100644 --- a/iot/include/alibabacloud/iot/model/ListDeviceDistributeJobRequest.h +++ b/iot/include/alibabacloud/iot/model/ListDeviceDistributeJobRequest.h @@ -43,6 +43,10 @@ namespace AlibabaCloud void setPageSize(int pageSize); int getCurrentPage()const; void setCurrentPage(int currentPage); + std::string getProductKey()const; + void setProductKey(const std::string& productKey); + std::string getJobType()const; + void setJobType(const std::string& jobType); std::string getApiProduct()const; void setApiProduct(const std::string& apiProduct); std::string getApiRevision()const; @@ -57,6 +61,8 @@ namespace AlibabaCloud std::string nextToken_; int pageSize_; int currentPage_; + std::string productKey_; + std::string jobType_; std::string apiProduct_; std::string apiRevision_; std::string targetUid_; diff --git a/iot/include/alibabacloud/iot/model/QuerySoundCodeListRequest.h b/iot/include/alibabacloud/iot/model/QuerySoundCodeListRequest.h new file mode 100644 index 000000000..641bb3034 --- /dev/null +++ b/iot/include/alibabacloud/iot/model/QuerySoundCodeListRequest.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_QUERYSOUNDCODELISTREQUEST_H_ +#define ALIBABACLOUD_IOT_MODEL_QUERYSOUNDCODELISTREQUEST_H_ + +#include +#include +#include +#include + +namespace AlibabaCloud +{ + namespace Iot + { + namespace Model + { + class ALIBABACLOUD_IOT_EXPORT QuerySoundCodeListRequest : public RpcServiceRequest + { + + public: + QuerySoundCodeListRequest(); + ~QuerySoundCodeListRequest(); + + int getPageId()const; + void setPageId(int pageId); + std::string getIotInstanceId()const; + void setIotInstanceId(const std::string& iotInstanceId); + int getPageSize()const; + void setPageSize(int pageSize); + std::string getApiProduct()const; + void setApiProduct(const std::string& apiProduct); + std::string getApiRevision()const; + void setApiRevision(const std::string& apiRevision); + + private: + int pageId_; + std::string iotInstanceId_; + int pageSize_; + std::string apiProduct_; + std::string apiRevision_; + + }; + } + } +} +#endif // !ALIBABACLOUD_IOT_MODEL_QUERYSOUNDCODELISTREQUEST_H_ \ No newline at end of file diff --git a/iot/include/alibabacloud/iot/model/QuerySoundCodeListResult.h b/iot/include/alibabacloud/iot/model/QuerySoundCodeListResult.h new file mode 100644 index 000000000..05e50014f --- /dev/null +++ b/iot/include/alibabacloud/iot/model/QuerySoundCodeListResult.h @@ -0,0 +1,71 @@ +/* + * 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_QUERYSOUNDCODELISTRESULT_H_ +#define ALIBABACLOUD_IOT_MODEL_QUERYSOUNDCODELISTRESULT_H_ + +#include +#include +#include +#include +#include + +namespace AlibabaCloud +{ + namespace Iot + { + namespace Model + { + class ALIBABACLOUD_IOT_EXPORT QuerySoundCodeListResult : public ServiceResult + { + public: + struct Data + { + struct Items + { + long gmtCreate; + int duration; + std::string soundCodeContent; + std::string soundCode; + }; + int pageId; + int pageSize; + int total; + std::vector list; + }; + + + QuerySoundCodeListResult(); + explicit QuerySoundCodeListResult(const std::string &payload); + ~QuerySoundCodeListResult(); + 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_QUERYSOUNDCODELISTRESULT_H_ \ No newline at end of file diff --git a/iot/include/alibabacloud/iot/model/StartAIBoxForceSyncRequest.h b/iot/include/alibabacloud/iot/model/StartAIBoxForceSyncRequest.h new file mode 100644 index 000000000..50adac1c3 --- /dev/null +++ b/iot/include/alibabacloud/iot/model/StartAIBoxForceSyncRequest.h @@ -0,0 +1,54 @@ +/* + * 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_STARTAIBOXFORCESYNCREQUEST_H_ +#define ALIBABACLOUD_IOT_MODEL_STARTAIBOXFORCESYNCREQUEST_H_ + +#include +#include +#include +#include + +namespace AlibabaCloud +{ + namespace Iot + { + namespace Model + { + class ALIBABACLOUD_IOT_EXPORT StartAIBoxForceSyncRequest : public RpcServiceRequest + { + + public: + StartAIBoxForceSyncRequest(); + ~StartAIBoxForceSyncRequest(); + + std::string getIotId()const; + void setIotId(const std::string& iotId); + 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 apiProduct_; + std::string apiRevision_; + + }; + } + } +} +#endif // !ALIBABACLOUD_IOT_MODEL_STARTAIBOXFORCESYNCREQUEST_H_ \ No newline at end of file diff --git a/iot/include/alibabacloud/iot/model/StartAIBoxForceSyncResult.h b/iot/include/alibabacloud/iot/model/StartAIBoxForceSyncResult.h new file mode 100644 index 000000000..8d949da70 --- /dev/null +++ b/iot/include/alibabacloud/iot/model/StartAIBoxForceSyncResult.h @@ -0,0 +1,57 @@ +/* + * 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_STARTAIBOXFORCESYNCRESULT_H_ +#define ALIBABACLOUD_IOT_MODEL_STARTAIBOXFORCESYNCRESULT_H_ + +#include +#include +#include +#include +#include + +namespace AlibabaCloud +{ + namespace Iot + { + namespace Model + { + class ALIBABACLOUD_IOT_EXPORT StartAIBoxForceSyncResult : public ServiceResult + { + public: + + + StartAIBoxForceSyncResult(); + explicit StartAIBoxForceSyncResult(const std::string &payload); + ~StartAIBoxForceSyncResult(); + bool getData()const; + std::string getErrorMessage()const; + std::string getCode()const; + bool getSuccess()const; + + protected: + void parse(const std::string &payload); + private: + bool data_; + std::string errorMessage_; + std::string code_; + bool success_; + + }; + } + } +} +#endif // !ALIBABACLOUD_IOT_MODEL_STARTAIBOXFORCESYNCRESULT_H_ \ No newline at end of file diff --git a/iot/include/alibabacloud/iot/model/SubscribeTopicResult.h b/iot/include/alibabacloud/iot/model/SubscribeTopicResult.h index 36cb0653b..1bf3106f1 100644 --- a/iot/include/alibabacloud/iot/model/SubscribeTopicResult.h +++ b/iot/include/alibabacloud/iot/model/SubscribeTopicResult.h @@ -37,7 +37,6 @@ namespace AlibabaCloud SubscribeTopicResult(); explicit SubscribeTopicResult(const std::string &payload); ~SubscribeTopicResult(); - std::vector getFailureTopics()const; std::string getErrorMessage()const; std::string getCode()const; bool getSuccess()const; @@ -45,7 +44,6 @@ namespace AlibabaCloud protected: void parse(const std::string &payload); private: - std::vector failureTopics_; std::string errorMessage_; std::string code_; bool success_; diff --git a/iot/src/IotClient.cc b/iot/src/IotClient.cc index 1f677a7c5..6d85d4d0f 100644 --- a/iot/src/IotClient.cc +++ b/iot/src/IotClient.cc @@ -31,21 +31,21 @@ IotClient::IotClient(const Credentials &credentials, const ClientConfiguration & RpcServiceClient(SERVICE_NAME, std::make_shared(credentials), configuration) { auto locationClient = std::make_shared(credentials, configuration); - endpointProvider_ = std::make_shared(locationClient, configuration.regionId(), SERVICE_NAME, "iot"); + endpointProvider_ = std::make_shared(locationClient, configuration.regionId(), SERVICE_NAME, ""); } IotClient::IotClient(const std::shared_ptr& credentialsProvider, const ClientConfiguration & configuration) : RpcServiceClient(SERVICE_NAME, credentialsProvider, configuration) { auto locationClient = std::make_shared(credentialsProvider, configuration); - endpointProvider_ = std::make_shared(locationClient, configuration.regionId(), SERVICE_NAME, "iot"); + endpointProvider_ = std::make_shared(locationClient, configuration.regionId(), SERVICE_NAME, ""); } IotClient::IotClient(const std::string & accessKeyId, const std::string & accessKeySecret, const ClientConfiguration & configuration) : RpcServiceClient(SERVICE_NAME, std::make_shared(accessKeyId, accessKeySecret), configuration) { auto locationClient = std::make_shared(accessKeyId, accessKeySecret, configuration); - endpointProvider_ = std::make_shared(locationClient, configuration.regionId(), SERVICE_NAME, "iot"); + endpointProvider_ = std::make_shared(locationClient, configuration.regionId(), SERVICE_NAME, ""); } IotClient::~IotClient() @@ -2679,6 +2679,42 @@ IotClient::CreateSceneRuleOutcomeCallable IotClient::createSceneRuleCallable(con return task->get_future(); } +IotClient::CreateSoundCodeOutcome IotClient::createSoundCode(const CreateSoundCodeRequest &request) const +{ + auto endpointOutcome = endpointProvider_->getEndpoint(); + if (!endpointOutcome.isSuccess()) + return CreateSoundCodeOutcome(endpointOutcome.error()); + + auto outcome = makeRequest(endpointOutcome.result(), request); + + if (outcome.isSuccess()) + return CreateSoundCodeOutcome(CreateSoundCodeResult(outcome.result())); + else + return CreateSoundCodeOutcome(outcome.error()); +} + +void IotClient::createSoundCodeAsync(const CreateSoundCodeRequest& request, const CreateSoundCodeAsyncHandler& handler, const std::shared_ptr& context) const +{ + auto fn = [this, request, handler, context]() + { + handler(this, request, createSoundCode(request), context); + }; + + asyncExecute(new Runnable(fn)); +} + +IotClient::CreateSoundCodeOutcomeCallable IotClient::createSoundCodeCallable(const CreateSoundCodeRequest &request) const +{ + auto task = std::make_shared>( + [this, request]() + { + return this->createSoundCode(request); + }); + + asyncExecute(new Runnable([task]() { (*task)(); })); + return task->get_future(); +} + IotClient::CreateSpeechOutcome IotClient::createSpeech(const CreateSpeechRequest &request) const { auto endpointOutcome = endpointProvider_->getEndpoint(); @@ -3759,6 +3795,42 @@ IotClient::DeleteSceneRuleOutcomeCallable IotClient::deleteSceneRuleCallable(con return task->get_future(); } +IotClient::DeleteSoundCodeOutcome IotClient::deleteSoundCode(const DeleteSoundCodeRequest &request) const +{ + auto endpointOutcome = endpointProvider_->getEndpoint(); + if (!endpointOutcome.isSuccess()) + return DeleteSoundCodeOutcome(endpointOutcome.error()); + + auto outcome = makeRequest(endpointOutcome.result(), request); + + if (outcome.isSuccess()) + return DeleteSoundCodeOutcome(DeleteSoundCodeResult(outcome.result())); + else + return DeleteSoundCodeOutcome(outcome.error()); +} + +void IotClient::deleteSoundCodeAsync(const DeleteSoundCodeRequest& request, const DeleteSoundCodeAsyncHandler& handler, const std::shared_ptr& context) const +{ + auto fn = [this, request, handler, context]() + { + handler(this, request, deleteSoundCode(request), context); + }; + + asyncExecute(new Runnable(fn)); +} + +IotClient::DeleteSoundCodeOutcomeCallable IotClient::deleteSoundCodeCallable(const DeleteSoundCodeRequest &request) const +{ + auto task = std::make_shared>( + [this, request]() + { + return this->deleteSoundCode(request); + }); + + asyncExecute(new Runnable([task]() { (*task)(); })); + return task->get_future(); +} + IotClient::DeleteSpeechOutcome IotClient::deleteSpeech(const DeleteSpeechRequest &request) const { auto endpointOutcome = endpointProvider_->getEndpoint(); @@ -4875,6 +4947,42 @@ IotClient::GetSceneRuleOutcomeCallable IotClient::getSceneRuleCallable(const Get return task->get_future(); } +IotClient::GetSoundCodeAudioOutcome IotClient::getSoundCodeAudio(const GetSoundCodeAudioRequest &request) const +{ + auto endpointOutcome = endpointProvider_->getEndpoint(); + if (!endpointOutcome.isSuccess()) + return GetSoundCodeAudioOutcome(endpointOutcome.error()); + + auto outcome = makeRequest(endpointOutcome.result(), request); + + if (outcome.isSuccess()) + return GetSoundCodeAudioOutcome(GetSoundCodeAudioResult(outcome.result())); + else + return GetSoundCodeAudioOutcome(outcome.error()); +} + +void IotClient::getSoundCodeAudioAsync(const GetSoundCodeAudioRequest& request, const GetSoundCodeAudioAsyncHandler& handler, const std::shared_ptr& context) const +{ + auto fn = [this, request, handler, context]() + { + handler(this, request, getSoundCodeAudio(request), context); + }; + + asyncExecute(new Runnable(fn)); +} + +IotClient::GetSoundCodeAudioOutcomeCallable IotClient::getSoundCodeAudioCallable(const GetSoundCodeAudioRequest &request) const +{ + auto task = std::make_shared>( + [this, request]() + { + return this->getSoundCodeAudio(request); + }); + + asyncExecute(new Runnable([task]() { (*task)(); })); + return task->get_future(); +} + IotClient::GetSpeechDeviceDetailOutcome IotClient::getSpeechDeviceDetail(const GetSpeechDeviceDetailRequest &request) const { auto endpointOutcome = endpointProvider_->getEndpoint(); @@ -8583,6 +8691,42 @@ IotClient::QuerySolutionDeviceGroupPageOutcomeCallable IotClient::querySolutionD return task->get_future(); } +IotClient::QuerySoundCodeListOutcome IotClient::querySoundCodeList(const QuerySoundCodeListRequest &request) const +{ + auto endpointOutcome = endpointProvider_->getEndpoint(); + if (!endpointOutcome.isSuccess()) + return QuerySoundCodeListOutcome(endpointOutcome.error()); + + auto outcome = makeRequest(endpointOutcome.result(), request); + + if (outcome.isSuccess()) + return QuerySoundCodeListOutcome(QuerySoundCodeListResult(outcome.result())); + else + return QuerySoundCodeListOutcome(outcome.error()); +} + +void IotClient::querySoundCodeListAsync(const QuerySoundCodeListRequest& request, const QuerySoundCodeListAsyncHandler& handler, const std::shared_ptr& context) const +{ + auto fn = [this, request, handler, context]() + { + handler(this, request, querySoundCodeList(request), context); + }; + + asyncExecute(new Runnable(fn)); +} + +IotClient::QuerySoundCodeListOutcomeCallable IotClient::querySoundCodeListCallable(const QuerySoundCodeListRequest &request) const +{ + auto task = std::make_shared>( + [this, request]() + { + return this->querySoundCodeList(request); + }); + + asyncExecute(new Runnable([task]() { (*task)(); })); + return task->get_future(); +} + IotClient::QuerySpeechOutcome IotClient::querySpeech(const QuerySpeechRequest &request) const { auto endpointOutcome = endpointProvider_->getEndpoint(); @@ -10095,6 +10239,42 @@ 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/CreateSoundCodeRequest.cc b/iot/src/model/CreateSoundCodeRequest.cc new file mode 100644 index 000000000..42792bcdf --- /dev/null +++ b/iot/src/model/CreateSoundCodeRequest.cc @@ -0,0 +1,84 @@ +/* + * 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::CreateSoundCodeRequest; + +CreateSoundCodeRequest::CreateSoundCodeRequest() : + RpcServiceRequest("iot", "2018-01-20", "CreateSoundCode") +{ + setMethod(HttpRequest::Method::Post); +} + +CreateSoundCodeRequest::~CreateSoundCodeRequest() +{} + +int CreateSoundCodeRequest::getDuration()const +{ + return duration_; +} + +void CreateSoundCodeRequest::setDuration(int duration) +{ + duration_ = duration; + setBodyParameter("Duration", std::to_string(duration)); +} + +std::string CreateSoundCodeRequest::getIotInstanceId()const +{ + return iotInstanceId_; +} + +void CreateSoundCodeRequest::setIotInstanceId(const std::string& iotInstanceId) +{ + iotInstanceId_ = iotInstanceId; + setBodyParameter("IotInstanceId", iotInstanceId); +} + +std::string CreateSoundCodeRequest::getSoundCodeContent()const +{ + return soundCodeContent_; +} + +void CreateSoundCodeRequest::setSoundCodeContent(const std::string& soundCodeContent) +{ + soundCodeContent_ = soundCodeContent; + setBodyParameter("SoundCodeContent", soundCodeContent); +} + +std::string CreateSoundCodeRequest::getApiProduct()const +{ + return apiProduct_; +} + +void CreateSoundCodeRequest::setApiProduct(const std::string& apiProduct) +{ + apiProduct_ = apiProduct; + setBodyParameter("ApiProduct", apiProduct); +} + +std::string CreateSoundCodeRequest::getApiRevision()const +{ + return apiRevision_; +} + +void CreateSoundCodeRequest::setApiRevision(const std::string& apiRevision) +{ + apiRevision_ = apiRevision; + setBodyParameter("ApiRevision", apiRevision); +} + diff --git a/iot/src/model/CreateSoundCodeResult.cc b/iot/src/model/CreateSoundCodeResult.cc new file mode 100644 index 000000000..c9ad8bf01 --- /dev/null +++ b/iot/src/model/CreateSoundCodeResult.cc @@ -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. + */ + +#include +#include + +using namespace AlibabaCloud::Iot; +using namespace AlibabaCloud::Iot::Model; + +CreateSoundCodeResult::CreateSoundCodeResult() : + ServiceResult() +{} + +CreateSoundCodeResult::CreateSoundCodeResult(const std::string &payload) : + ServiceResult() +{ + parse(payload); +} + +CreateSoundCodeResult::~CreateSoundCodeResult() +{} + +void CreateSoundCodeResult::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(); + if(!value["Data"].isNull()) + data_ = value["Data"].asString(); + +} + +std::string CreateSoundCodeResult::getData()const +{ + return data_; +} + +std::string CreateSoundCodeResult::getErrorMessage()const +{ + return errorMessage_; +} + +std::string CreateSoundCodeResult::getCode()const +{ + return code_; +} + +bool CreateSoundCodeResult::getSuccess()const +{ + return success_; +} + diff --git a/iot/src/model/DeleteSoundCodeRequest.cc b/iot/src/model/DeleteSoundCodeRequest.cc new file mode 100644 index 000000000..f5e38816b --- /dev/null +++ b/iot/src/model/DeleteSoundCodeRequest.cc @@ -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. + */ + +#include + +using AlibabaCloud::Iot::Model::DeleteSoundCodeRequest; + +DeleteSoundCodeRequest::DeleteSoundCodeRequest() : + RpcServiceRequest("iot", "2018-01-20", "DeleteSoundCode") +{ + setMethod(HttpRequest::Method::Post); +} + +DeleteSoundCodeRequest::~DeleteSoundCodeRequest() +{} + +std::string DeleteSoundCodeRequest::getSoundCode()const +{ + return soundCode_; +} + +void DeleteSoundCodeRequest::setSoundCode(const std::string& soundCode) +{ + soundCode_ = soundCode; + setBodyParameter("SoundCode", soundCode); +} + +std::string DeleteSoundCodeRequest::getIotInstanceId()const +{ + return iotInstanceId_; +} + +void DeleteSoundCodeRequest::setIotInstanceId(const std::string& iotInstanceId) +{ + iotInstanceId_ = iotInstanceId; + setBodyParameter("IotInstanceId", iotInstanceId); +} + +std::string DeleteSoundCodeRequest::getApiProduct()const +{ + return apiProduct_; +} + +void DeleteSoundCodeRequest::setApiProduct(const std::string& apiProduct) +{ + apiProduct_ = apiProduct; + setBodyParameter("ApiProduct", apiProduct); +} + +std::string DeleteSoundCodeRequest::getApiRevision()const +{ + return apiRevision_; +} + +void DeleteSoundCodeRequest::setApiRevision(const std::string& apiRevision) +{ + apiRevision_ = apiRevision; + setBodyParameter("ApiRevision", apiRevision); +} + diff --git a/iot/src/model/DeleteSoundCodeResult.cc b/iot/src/model/DeleteSoundCodeResult.cc new file mode 100644 index 000000000..27d98451d --- /dev/null +++ b/iot/src/model/DeleteSoundCodeResult.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; + +DeleteSoundCodeResult::DeleteSoundCodeResult() : + ServiceResult() +{} + +DeleteSoundCodeResult::DeleteSoundCodeResult(const std::string &payload) : + ServiceResult() +{ + parse(payload); +} + +DeleteSoundCodeResult::~DeleteSoundCodeResult() +{} + +void DeleteSoundCodeResult::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 DeleteSoundCodeResult::getErrorMessage()const +{ + return errorMessage_; +} + +std::string DeleteSoundCodeResult::getCode()const +{ + return code_; +} + +bool DeleteSoundCodeResult::getSuccess()const +{ + return success_; +} + diff --git a/iot/src/model/GetSoundCodeAudioRequest.cc b/iot/src/model/GetSoundCodeAudioRequest.cc new file mode 100644 index 000000000..47bcbb035 --- /dev/null +++ b/iot/src/model/GetSoundCodeAudioRequest.cc @@ -0,0 +1,75 @@ +/* + * 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::GetSoundCodeAudioRequest; + +GetSoundCodeAudioRequest::GetSoundCodeAudioRequest() : + RpcServiceRequest("iot", "2018-01-20", "GetSoundCodeAudio") +{ + setMethod(HttpRequest::Method::Post); +} + +GetSoundCodeAudioRequest::~GetSoundCodeAudioRequest() +{} + +std::string GetSoundCodeAudioRequest::getIotInstanceId()const +{ + return iotInstanceId_; +} + +void GetSoundCodeAudioRequest::setIotInstanceId(const std::string& iotInstanceId) +{ + iotInstanceId_ = iotInstanceId; + setBodyParameter("IotInstanceId", iotInstanceId); +} + +std::vector GetSoundCodeAudioRequest::getSoundCodeList()const +{ + return soundCodeList_; +} + +void GetSoundCodeAudioRequest::setSoundCodeList(const std::vector& soundCodeList) +{ + soundCodeList_ = soundCodeList; + for(int dep1 = 0; dep1!= soundCodeList.size(); dep1++) { + setBodyParameter("SoundCodeList."+ std::to_string(dep1), soundCodeList.at(dep1)); + } +} + +std::string GetSoundCodeAudioRequest::getApiProduct()const +{ + return apiProduct_; +} + +void GetSoundCodeAudioRequest::setApiProduct(const std::string& apiProduct) +{ + apiProduct_ = apiProduct; + setBodyParameter("ApiProduct", apiProduct); +} + +std::string GetSoundCodeAudioRequest::getApiRevision()const +{ + return apiRevision_; +} + +void GetSoundCodeAudioRequest::setApiRevision(const std::string& apiRevision) +{ + apiRevision_ = apiRevision; + setBodyParameter("ApiRevision", apiRevision); +} + diff --git a/iot/src/model/GetSoundCodeAudioResult.cc b/iot/src/model/GetSoundCodeAudioResult.cc new file mode 100644 index 000000000..b9cc27d72 --- /dev/null +++ b/iot/src/model/GetSoundCodeAudioResult.cc @@ -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. + */ + +#include +#include + +using namespace AlibabaCloud::Iot; +using namespace AlibabaCloud::Iot::Model; + +GetSoundCodeAudioResult::GetSoundCodeAudioResult() : + ServiceResult() +{} + +GetSoundCodeAudioResult::GetSoundCodeAudioResult(const std::string &payload) : + ServiceResult() +{ + parse(payload); +} + +GetSoundCodeAudioResult::~GetSoundCodeAudioResult() +{} + +void GetSoundCodeAudioResult::parse(const std::string &payload) +{ + Json::Reader reader; + Json::Value value; + reader.parse(payload, value); + setRequestId(value["RequestId"].asString()); + auto allData = value["Data"]["Items"]; + for (const auto &item : allData) + data_.push_back(item.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::vector GetSoundCodeAudioResult::getData()const +{ + return data_; +} + +std::string GetSoundCodeAudioResult::getErrorMessage()const +{ + return errorMessage_; +} + +std::string GetSoundCodeAudioResult::getCode()const +{ + return code_; +} + +bool GetSoundCodeAudioResult::getSuccess()const +{ + return success_; +} + diff --git a/iot/src/model/InvokeDataAPIServiceResult.cc b/iot/src/model/InvokeDataAPIServiceResult.cc index aea2c26b6..139ddb802 100644 --- a/iot/src/model/InvokeDataAPIServiceResult.cc +++ b/iot/src/model/InvokeDataAPIServiceResult.cc @@ -46,6 +46,8 @@ void InvokeDataAPIServiceResult::parse(const std::string &payload) data_.pageSize = std::stoi(dataNode["PageSize"].asString()); if(!dataNode["ApiSrn"].isNull()) data_.apiSrn = dataNode["ApiSrn"].asString(); + if(!dataNode["TotalSize"].isNull()) + data_.totalSize = std::stoi(dataNode["TotalSize"].asString()); auto allFieldNameList = dataNode["FieldNameList"]["FieldNameList"]; for (auto value : allFieldNameList) data_.fieldNameList.push_back(value.asString()); diff --git a/iot/src/model/ListDeviceDistributeJobRequest.cc b/iot/src/model/ListDeviceDistributeJobRequest.cc index fcd197ddf..251e7be81 100644 --- a/iot/src/model/ListDeviceDistributeJobRequest.cc +++ b/iot/src/model/ListDeviceDistributeJobRequest.cc @@ -71,6 +71,28 @@ void ListDeviceDistributeJobRequest::setCurrentPage(int currentPage) setParameter("CurrentPage", std::to_string(currentPage)); } +std::string ListDeviceDistributeJobRequest::getProductKey()const +{ + return productKey_; +} + +void ListDeviceDistributeJobRequest::setProductKey(const std::string& productKey) +{ + productKey_ = productKey; + setParameter("ProductKey", productKey); +} + +std::string ListDeviceDistributeJobRequest::getJobType()const +{ + return jobType_; +} + +void ListDeviceDistributeJobRequest::setJobType(const std::string& jobType) +{ + jobType_ = jobType; + setParameter("JobType", jobType); +} + std::string ListDeviceDistributeJobRequest::getApiProduct()const { return apiProduct_; diff --git a/iot/src/model/QuerySoundCodeListRequest.cc b/iot/src/model/QuerySoundCodeListRequest.cc new file mode 100644 index 000000000..1f894f8d3 --- /dev/null +++ b/iot/src/model/QuerySoundCodeListRequest.cc @@ -0,0 +1,84 @@ +/* + * 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::QuerySoundCodeListRequest; + +QuerySoundCodeListRequest::QuerySoundCodeListRequest() : + RpcServiceRequest("iot", "2018-01-20", "QuerySoundCodeList") +{ + setMethod(HttpRequest::Method::Post); +} + +QuerySoundCodeListRequest::~QuerySoundCodeListRequest() +{} + +int QuerySoundCodeListRequest::getPageId()const +{ + return pageId_; +} + +void QuerySoundCodeListRequest::setPageId(int pageId) +{ + pageId_ = pageId; + setBodyParameter("PageId", std::to_string(pageId)); +} + +std::string QuerySoundCodeListRequest::getIotInstanceId()const +{ + return iotInstanceId_; +} + +void QuerySoundCodeListRequest::setIotInstanceId(const std::string& iotInstanceId) +{ + iotInstanceId_ = iotInstanceId; + setBodyParameter("IotInstanceId", iotInstanceId); +} + +int QuerySoundCodeListRequest::getPageSize()const +{ + return pageSize_; +} + +void QuerySoundCodeListRequest::setPageSize(int pageSize) +{ + pageSize_ = pageSize; + setBodyParameter("PageSize", std::to_string(pageSize)); +} + +std::string QuerySoundCodeListRequest::getApiProduct()const +{ + return apiProduct_; +} + +void QuerySoundCodeListRequest::setApiProduct(const std::string& apiProduct) +{ + apiProduct_ = apiProduct; + setBodyParameter("ApiProduct", apiProduct); +} + +std::string QuerySoundCodeListRequest::getApiRevision()const +{ + return apiRevision_; +} + +void QuerySoundCodeListRequest::setApiRevision(const std::string& apiRevision) +{ + apiRevision_ = apiRevision; + setBodyParameter("ApiRevision", apiRevision); +} + diff --git a/iot/src/model/QuerySoundCodeListResult.cc b/iot/src/model/QuerySoundCodeListResult.cc new file mode 100644 index 000000000..ed0bc5417 --- /dev/null +++ b/iot/src/model/QuerySoundCodeListResult.cc @@ -0,0 +1,91 @@ +/* + * 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; + +QuerySoundCodeListResult::QuerySoundCodeListResult() : + ServiceResult() +{} + +QuerySoundCodeListResult::QuerySoundCodeListResult(const std::string &payload) : + ServiceResult() +{ + parse(payload); +} + +QuerySoundCodeListResult::~QuerySoundCodeListResult() +{} + +void QuerySoundCodeListResult::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["Total"].isNull()) + data_.total = std::stoi(dataNode["Total"].asString()); + if(!dataNode["PageId"].isNull()) + data_.pageId = std::stoi(dataNode["PageId"].asString()); + if(!dataNode["PageSize"].isNull()) + data_.pageSize = std::stoi(dataNode["PageSize"].asString()); + auto allListNode = dataNode["List"]["Items"]; + for (auto dataNodeListItems : allListNode) + { + Data::Items itemsObject; + if(!dataNodeListItems["SoundCode"].isNull()) + itemsObject.soundCode = dataNodeListItems["SoundCode"].asString(); + if(!dataNodeListItems["SoundCodeContent"].isNull()) + itemsObject.soundCodeContent = dataNodeListItems["SoundCodeContent"].asString(); + if(!dataNodeListItems["Duration"].isNull()) + itemsObject.duration = std::stoi(dataNodeListItems["Duration"].asString()); + if(!dataNodeListItems["GmtCreate"].isNull()) + itemsObject.gmtCreate = std::stol(dataNodeListItems["GmtCreate"].asString()); + data_.list.push_back(itemsObject); + } + 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(); + +} + +QuerySoundCodeListResult::Data QuerySoundCodeListResult::getData()const +{ + return data_; +} + +std::string QuerySoundCodeListResult::getErrorMessage()const +{ + return errorMessage_; +} + +std::string QuerySoundCodeListResult::getCode()const +{ + return code_; +} + +bool QuerySoundCodeListResult::getSuccess()const +{ + return success_; +} + diff --git a/iot/src/model/StartAIBoxForceSyncRequest.cc b/iot/src/model/StartAIBoxForceSyncRequest.cc new file mode 100644 index 000000000..7547e5c0d --- /dev/null +++ b/iot/src/model/StartAIBoxForceSyncRequest.cc @@ -0,0 +1,62 @@ +/* + * 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 new file mode 100644 index 000000000..56f865164 --- /dev/null +++ b/iot/src/model/StartAIBoxForceSyncResult.cc @@ -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. + */ + +#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_; +} + diff --git a/iot/src/model/SubscribeTopicResult.cc b/iot/src/model/SubscribeTopicResult.cc index 63dda26ce..37e7c5bc6 100644 --- a/iot/src/model/SubscribeTopicResult.cc +++ b/iot/src/model/SubscribeTopicResult.cc @@ -39,9 +39,6 @@ void SubscribeTopicResult::parse(const std::string &payload) Json::Value value; reader.parse(payload, value); setRequestId(value["RequestId"].asString()); - auto allFailureTopics = value["FailureTopics"]["topic"]; - for (const auto &item : allFailureTopics) - failureTopics_.push_back(item.asString()); if(!value["Success"].isNull()) success_ = value["Success"].asString() == "true"; if(!value["Code"].isNull()) @@ -51,11 +48,6 @@ void SubscribeTopicResult::parse(const std::string &payload) } -std::vector SubscribeTopicResult::getFailureTopics()const -{ - return failureTopics_; -} - std::string SubscribeTopicResult::getErrorMessage()const { return errorMessage_;