diff --git a/CHANGELOG b/CHANGELOG index 29d992fbf..123e26b92 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -1,3 +1,6 @@ +2021-12-16 Version: 1.36.981 +- Update OTA API, including CreateOTADynamicUpgradeJob,CreateOTAStaticUpgradeJob,QueryOTAJob. + 2021-12-14 Version: 1.36.980 - Support query resourceType. diff --git a/VERSION b/VERSION index 9185cdeb7..8dffa21f8 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -1.36.980 \ No newline at end of file +1.36.981 \ No newline at end of file diff --git a/iot/CMakeLists.txt b/iot/CMakeLists.txt index 9a2777c98..448ed0efd 100644 --- a/iot/CMakeLists.txt +++ b/iot/CMakeLists.txt @@ -345,8 +345,6 @@ set(iot_public_header_model include/alibabacloud/iot/model/ListRuleResult.h include/alibabacloud/iot/model/ListRuleActionsRequest.h include/alibabacloud/iot/model/ListRuleActionsResult.h - include/alibabacloud/iot/model/ListSourceReplicaRequest.h - include/alibabacloud/iot/model/ListSourceReplicaResult.h include/alibabacloud/iot/model/ListTaskRequest.h include/alibabacloud/iot/model/ListTaskResult.h include/alibabacloud/iot/model/ListTaskByPageRequest.h @@ -371,8 +369,6 @@ set(iot_public_header_model include/alibabacloud/iot/model/PublishThingModelResult.h include/alibabacloud/iot/model/PushSpeechRequest.h include/alibabacloud/iot/model/PushSpeechResult.h - include/alibabacloud/iot/model/QueryAppDeviceListRequest.h - include/alibabacloud/iot/model/QueryAppDeviceListResult.h include/alibabacloud/iot/model/QueryBatchRegisterDeviceStatusRequest.h include/alibabacloud/iot/model/QueryBatchRegisterDeviceStatusResult.h include/alibabacloud/iot/model/QueryCertUrlByApplyIdRequest.h @@ -581,6 +577,8 @@ set(iot_public_header_model include/alibabacloud/iot/model/SetupStudioAppAuthModeOpenResult.h include/alibabacloud/iot/model/SpeechByCombinationRequest.h include/alibabacloud/iot/model/SpeechByCombinationResult.h + include/alibabacloud/iot/model/SpeechBySynthesisRequest.h + include/alibabacloud/iot/model/SpeechBySynthesisResult.h include/alibabacloud/iot/model/StartRuleRequest.h include/alibabacloud/iot/model/StartRuleResult.h include/alibabacloud/iot/model/StopRuleRequest.h @@ -972,8 +970,6 @@ set(iot_src src/model/ListRuleResult.cc src/model/ListRuleActionsRequest.cc src/model/ListRuleActionsResult.cc - src/model/ListSourceReplicaRequest.cc - src/model/ListSourceReplicaResult.cc src/model/ListTaskRequest.cc src/model/ListTaskResult.cc src/model/ListTaskByPageRequest.cc @@ -998,8 +994,6 @@ set(iot_src src/model/PublishThingModelResult.cc src/model/PushSpeechRequest.cc src/model/PushSpeechResult.cc - src/model/QueryAppDeviceListRequest.cc - src/model/QueryAppDeviceListResult.cc src/model/QueryBatchRegisterDeviceStatusRequest.cc src/model/QueryBatchRegisterDeviceStatusResult.cc src/model/QueryCertUrlByApplyIdRequest.cc @@ -1208,6 +1202,8 @@ set(iot_src src/model/SetupStudioAppAuthModeOpenResult.cc src/model/SpeechByCombinationRequest.cc src/model/SpeechByCombinationResult.cc + src/model/SpeechBySynthesisRequest.cc + src/model/SpeechBySynthesisResult.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 7f1341cb7..0e53d1748 100644 --- a/iot/include/alibabacloud/iot/IotClient.h +++ b/iot/include/alibabacloud/iot/IotClient.h @@ -346,8 +346,6 @@ #include "model/ListRuleResult.h" #include "model/ListRuleActionsRequest.h" #include "model/ListRuleActionsResult.h" -#include "model/ListSourceReplicaRequest.h" -#include "model/ListSourceReplicaResult.h" #include "model/ListTaskRequest.h" #include "model/ListTaskResult.h" #include "model/ListTaskByPageRequest.h" @@ -372,8 +370,6 @@ #include "model/PublishThingModelResult.h" #include "model/PushSpeechRequest.h" #include "model/PushSpeechResult.h" -#include "model/QueryAppDeviceListRequest.h" -#include "model/QueryAppDeviceListResult.h" #include "model/QueryBatchRegisterDeviceStatusRequest.h" #include "model/QueryBatchRegisterDeviceStatusResult.h" #include "model/QueryCertUrlByApplyIdRequest.h" @@ -582,6 +578,8 @@ #include "model/SetupStudioAppAuthModeOpenResult.h" #include "model/SpeechByCombinationRequest.h" #include "model/SpeechByCombinationResult.h" +#include "model/SpeechBySynthesisRequest.h" +#include "model/SpeechBySynthesisResult.h" #include "model/StartRuleRequest.h" #include "model/StartRuleResult.h" #include "model/StopRuleRequest.h" @@ -1141,9 +1139,6 @@ namespace AlibabaCloud typedef Outcome ListRuleActionsOutcome; typedef std::future ListRuleActionsOutcomeCallable; typedef std::function&)> ListRuleActionsAsyncHandler; - typedef Outcome ListSourceReplicaOutcome; - typedef std::future ListSourceReplicaOutcomeCallable; - typedef std::function&)> ListSourceReplicaAsyncHandler; typedef Outcome ListTaskOutcome; typedef std::future ListTaskOutcomeCallable; typedef std::function&)> ListTaskAsyncHandler; @@ -1180,9 +1175,6 @@ namespace AlibabaCloud typedef Outcome PushSpeechOutcome; typedef std::future PushSpeechOutcomeCallable; typedef std::function&)> PushSpeechAsyncHandler; - typedef Outcome QueryAppDeviceListOutcome; - typedef std::future QueryAppDeviceListOutcomeCallable; - typedef std::function&)> QueryAppDeviceListAsyncHandler; typedef Outcome QueryBatchRegisterDeviceStatusOutcome; typedef std::future QueryBatchRegisterDeviceStatusOutcomeCallable; typedef std::function&)> QueryBatchRegisterDeviceStatusAsyncHandler; @@ -1495,6 +1487,9 @@ namespace AlibabaCloud typedef Outcome SpeechByCombinationOutcome; typedef std::future SpeechByCombinationOutcomeCallable; typedef std::function&)> SpeechByCombinationAsyncHandler; + typedef Outcome SpeechBySynthesisOutcome; + typedef std::future SpeechBySynthesisOutcomeCallable; + typedef std::function&)> SpeechBySynthesisAsyncHandler; typedef Outcome StartRuleOutcome; typedef std::future StartRuleOutcomeCallable; typedef std::function&)> StartRuleAsyncHandler; @@ -2082,9 +2077,6 @@ namespace AlibabaCloud ListRuleActionsOutcome listRuleActions(const Model::ListRuleActionsRequest &request)const; void listRuleActionsAsync(const Model::ListRuleActionsRequest& request, const ListRuleActionsAsyncHandler& handler, const std::shared_ptr& context = nullptr) const; ListRuleActionsOutcomeCallable listRuleActionsCallable(const Model::ListRuleActionsRequest& request) const; - ListSourceReplicaOutcome listSourceReplica(const Model::ListSourceReplicaRequest &request)const; - void listSourceReplicaAsync(const Model::ListSourceReplicaRequest& request, const ListSourceReplicaAsyncHandler& handler, const std::shared_ptr& context = nullptr) const; - ListSourceReplicaOutcomeCallable listSourceReplicaCallable(const Model::ListSourceReplicaRequest& request) const; 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; @@ -2121,9 +2113,6 @@ namespace AlibabaCloud PushSpeechOutcome pushSpeech(const Model::PushSpeechRequest &request)const; void pushSpeechAsync(const Model::PushSpeechRequest& request, const PushSpeechAsyncHandler& handler, const std::shared_ptr& context = nullptr) const; PushSpeechOutcomeCallable pushSpeechCallable(const Model::PushSpeechRequest& request) const; - QueryAppDeviceListOutcome queryAppDeviceList(const Model::QueryAppDeviceListRequest &request)const; - void queryAppDeviceListAsync(const Model::QueryAppDeviceListRequest& request, const QueryAppDeviceListAsyncHandler& handler, const std::shared_ptr& context = nullptr) const; - QueryAppDeviceListOutcomeCallable queryAppDeviceListCallable(const Model::QueryAppDeviceListRequest& request) const; QueryBatchRegisterDeviceStatusOutcome queryBatchRegisterDeviceStatus(const Model::QueryBatchRegisterDeviceStatusRequest &request)const; void queryBatchRegisterDeviceStatusAsync(const Model::QueryBatchRegisterDeviceStatusRequest& request, const QueryBatchRegisterDeviceStatusAsyncHandler& handler, const std::shared_ptr& context = nullptr) const; QueryBatchRegisterDeviceStatusOutcomeCallable queryBatchRegisterDeviceStatusCallable(const Model::QueryBatchRegisterDeviceStatusRequest& request) const; @@ -2436,6 +2425,9 @@ namespace AlibabaCloud SpeechByCombinationOutcome speechByCombination(const Model::SpeechByCombinationRequest &request)const; void speechByCombinationAsync(const Model::SpeechByCombinationRequest& request, const SpeechByCombinationAsyncHandler& handler, const std::shared_ptr& context = nullptr) const; SpeechByCombinationOutcomeCallable speechByCombinationCallable(const Model::SpeechByCombinationRequest& request) const; + 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; 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/CreateOTADynamicUpgradeJobRequest.h b/iot/include/alibabacloud/iot/model/CreateOTADynamicUpgradeJobRequest.h index 00d408e3b..b9b1ef20f 100644 --- a/iot/include/alibabacloud/iot/model/CreateOTADynamicUpgradeJobRequest.h +++ b/iot/include/alibabacloud/iot/model/CreateOTADynamicUpgradeJobRequest.h @@ -43,6 +43,8 @@ namespace AlibabaCloud int getDynamicMode()const; void setDynamicMode(int dynamicMode); + bool getMultiModuleMode()const; + void setMultiModuleMode(bool multiModuleMode); int getRetryCount()const; void setRetryCount(int retryCount); int getTimeoutInMinutes()const; @@ -82,6 +84,7 @@ namespace AlibabaCloud private: int dynamicMode_; + bool multiModuleMode_; int retryCount_; int timeoutInMinutes_; bool needConfirm_; diff --git a/iot/include/alibabacloud/iot/model/CreateOTAStaticUpgradeJobRequest.h b/iot/include/alibabacloud/iot/model/CreateOTAStaticUpgradeJobRequest.h index de577c102..59a4043d6 100644 --- a/iot/include/alibabacloud/iot/model/CreateOTAStaticUpgradeJobRequest.h +++ b/iot/include/alibabacloud/iot/model/CreateOTAStaticUpgradeJobRequest.h @@ -41,6 +41,8 @@ namespace AlibabaCloud CreateOTAStaticUpgradeJobRequest(); ~CreateOTAStaticUpgradeJobRequest(); + bool getMultiModuleMode()const; + void setMultiModuleMode(bool multiModuleMode); int getRetryCount()const; void setRetryCount(int retryCount); int getTimeoutInMinutes()const; @@ -91,6 +93,7 @@ namespace AlibabaCloud void setTargetDeviceName(const std::vector& targetDeviceName); private: + bool multiModuleMode_; int retryCount_; int timeoutInMinutes_; bool needConfirm_; diff --git a/iot/include/alibabacloud/iot/model/CreateSpeechRequest.h b/iot/include/alibabacloud/iot/model/CreateSpeechRequest.h index 91dd01f46..2fdc9ca32 100644 --- a/iot/include/alibabacloud/iot/model/CreateSpeechRequest.h +++ b/iot/include/alibabacloud/iot/model/CreateSpeechRequest.h @@ -45,8 +45,12 @@ namespace AlibabaCloud void setIotInstanceId(const std::string& iotInstanceId); std::string getText()const; void setText(const std::string& text); + std::string getSoundCodeConfig()const; + void setSoundCodeConfig(const std::string& soundCodeConfig); std::string getSpeechType()const; void setSpeechType(const std::string& speechType); + bool getEnableSoundCode()const; + void setEnableSoundCode(bool enableSoundCode); int getVolume()const; void setVolume(int volume); std::string getBizCode()const; @@ -64,7 +68,9 @@ namespace AlibabaCloud std::string audioFormat_; std::string iotInstanceId_; std::string text_; + std::string soundCodeConfig_; std::string speechType_; + bool enableSoundCode_; int volume_; std::string bizCode_; std::string apiProduct_; diff --git a/iot/include/alibabacloud/iot/model/ListSourceReplicaRequest.h b/iot/include/alibabacloud/iot/model/ListSourceReplicaRequest.h deleted file mode 100644 index c41e0f8f0..000000000 --- a/iot/include/alibabacloud/iot/model/ListSourceReplicaRequest.h +++ /dev/null @@ -1,69 +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_LISTSOURCEREPLICAREQUEST_H_ -#define ALIBABACLOUD_IOT_MODEL_LISTSOURCEREPLICAREQUEST_H_ - -#include -#include -#include -#include - -namespace AlibabaCloud -{ - namespace Iot - { - namespace Model - { - class ALIBABACLOUD_IOT_EXPORT ListSourceReplicaRequest : public RpcServiceRequest - { - - public: - ListSourceReplicaRequest(); - ~ListSourceReplicaRequest(); - - std::string getIotInstanceId()const; - void setIotInstanceId(const std::string& iotInstanceId); - std::string getContext()const; - void setContext(const std::string& context); - int getPageSize()const; - void setPageSize(int pageSize); - std::string getSourceType()const; - void setSourceType(const std::string& sourceType); - int getPageNo()const; - void setPageNo(int pageNo); - std::string getLpInstanceId()const; - void setLpInstanceId(const std::string& lpInstanceId); - 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::string context_; - int pageSize_; - std::string sourceType_; - int pageNo_; - std::string lpInstanceId_; - std::string apiProduct_; - std::string apiRevision_; - - }; - } - } -} -#endif // !ALIBABACLOUD_IOT_MODEL_LISTSOURCEREPLICAREQUEST_H_ \ No newline at end of file diff --git a/iot/include/alibabacloud/iot/model/ListSourceReplicaResult.h b/iot/include/alibabacloud/iot/model/ListSourceReplicaResult.h deleted file mode 100644 index 49b8ab3ef..000000000 --- a/iot/include/alibabacloud/iot/model/ListSourceReplicaResult.h +++ /dev/null @@ -1,88 +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_LISTSOURCEREPLICARESULT_H_ -#define ALIBABACLOUD_IOT_MODEL_LISTSOURCEREPLICARESULT_H_ - -#include -#include -#include -#include -#include - -namespace AlibabaCloud -{ - namespace Iot - { - namespace Model - { - class ALIBABACLOUD_IOT_EXPORT ListSourceReplicaResult : public ServiceResult - { - public: - struct Data - { - struct DataListItem - { - int timeCycle; - int status; - std::string longJobUid; - std::string sourceUid; - std::string extraProperty; - std::string sourceType; - long storageSize; - long productCreateTime; - std::string code; - long beginLatest; - std::string replicaUid; - std::string name; - std::string desc; - long gmtCreate; - int nodeType; - std::string tableUid; - std::string timeUnit; - int region; - long endLatest; - bool needTips; - }; - std::vector dataList; - long totalPage; - int pageSize; - long total; - int pageNo; - }; - - - ListSourceReplicaResult(); - explicit ListSourceReplicaResult(const std::string &payload); - ~ListSourceReplicaResult(); - 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_LISTSOURCEREPLICARESULT_H_ \ No newline at end of file diff --git a/iot/include/alibabacloud/iot/model/PrintByTemplateRequest.h b/iot/include/alibabacloud/iot/model/PrintByTemplateRequest.h index 32496850b..0f4fb0ba4 100644 --- a/iot/include/alibabacloud/iot/model/PrintByTemplateRequest.h +++ b/iot/include/alibabacloud/iot/model/PrintByTemplateRequest.h @@ -35,14 +35,14 @@ namespace AlibabaCloud PrintByTemplateRequest(); ~PrintByTemplateRequest(); - std::string getProjectCode()const; - void setProjectCode(const std::string& projectCode); std::string getTemplateBizCode()const; void setTemplateBizCode(const std::string& templateBizCode); std::string getIotId()const; void setIotId(const std::string& iotId); std::string getIotInstanceId()const; void setIotInstanceId(const std::string& iotInstanceId); + bool getHistoryPrintTopic()const; + void setHistoryPrintTopic(bool historyPrintTopic); std::string getProductKey()const; void setProductKey(const std::string& productKey); std::string getParamsJsonString()const; @@ -55,10 +55,10 @@ namespace AlibabaCloud void setDeviceName(const std::string& deviceName); private: - std::string projectCode_; std::string templateBizCode_; std::string iotId_; std::string iotInstanceId_; + bool historyPrintTopic_; std::string productKey_; std::string paramsJsonString_; std::string apiProduct_; diff --git a/iot/include/alibabacloud/iot/model/QueryAppDeviceListRequest.h b/iot/include/alibabacloud/iot/model/QueryAppDeviceListRequest.h deleted file mode 100644 index 54626f013..000000000 --- a/iot/include/alibabacloud/iot/model/QueryAppDeviceListRequest.h +++ /dev/null @@ -1,78 +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_QUERYAPPDEVICELISTREQUEST_H_ -#define ALIBABACLOUD_IOT_MODEL_QUERYAPPDEVICELISTREQUEST_H_ - -#include -#include -#include -#include - -namespace AlibabaCloud -{ - namespace Iot - { - namespace Model - { - class ALIBABACLOUD_IOT_EXPORT QueryAppDeviceListRequest : public RpcServiceRequest - { - public: - struct TagList - { - std::string tagName; - std::string tagValue; - }; - - public: - QueryAppDeviceListRequest(); - ~QueryAppDeviceListRequest(); - - std::vector getTagList()const; - void setTagList(const std::vector& tagList); - std::vector getProductKeyList()const; - void setProductKeyList(const std::vector& productKeyList); - std::string getIotInstanceId()const; - void setIotInstanceId(const std::string& iotInstanceId); - int getPageSize()const; - void setPageSize(int pageSize); - int getCurrentPage()const; - void setCurrentPage(int currentPage); - std::vector getCategoryKeyList()const; - void setCategoryKeyList(const std::vector& categoryKeyList); - std::string getApiProduct()const; - void setApiProduct(const std::string& apiProduct); - std::string getApiRevision()const; - void setApiRevision(const std::string& apiRevision); - std::string getAppKey()const; - void setAppKey(const std::string& appKey); - - private: - std::vector tagList_; - std::vector productKeyList_; - std::string iotInstanceId_; - int pageSize_; - int currentPage_; - std::vector categoryKeyList_; - std::string apiProduct_; - std::string apiRevision_; - std::string appKey_; - - }; - } - } -} -#endif // !ALIBABACLOUD_IOT_MODEL_QUERYAPPDEVICELISTREQUEST_H_ \ No newline at end of file diff --git a/iot/include/alibabacloud/iot/model/QueryOTAJobResult.h b/iot/include/alibabacloud/iot/model/QueryOTAJobResult.h index 62bf111e0..46fd7b9ab 100644 --- a/iot/include/alibabacloud/iot/model/QueryOTAJobResult.h +++ b/iot/include/alibabacloud/iot/model/QueryOTAJobResult.h @@ -44,6 +44,7 @@ namespace AlibabaCloud bool needPush; int overwriteMode; std::string firmwareId; + bool multiModuleMode; std::string name; std::string jobStatus; int retryCount; diff --git a/iot/include/alibabacloud/iot/model/QuerySpeechResult.h b/iot/include/alibabacloud/iot/model/QuerySpeechResult.h index 63a29f9c9..dc6d43586 100644 --- a/iot/include/alibabacloud/iot/model/QuerySpeechResult.h +++ b/iot/include/alibabacloud/iot/model/QuerySpeechResult.h @@ -34,8 +34,15 @@ namespace AlibabaCloud public: struct Data { + struct SoundCodeConfig + { + int additionalDuration; + std::string soundCodeContent; + }; + SoundCodeConfig soundCodeConfig; std::string speechType; int volume; + bool enableSoundCode; std::string speechCode; std::string text; std::string audioFormat; diff --git a/iot/include/alibabacloud/iot/model/SpeechBySynthesisRequest.h b/iot/include/alibabacloud/iot/model/SpeechBySynthesisRequest.h new file mode 100644 index 000000000..96f1cb68e --- /dev/null +++ b/iot/include/alibabacloud/iot/model/SpeechBySynthesisRequest.h @@ -0,0 +1,81 @@ +/* + * Copyright 2009-2017 Alibaba Cloud All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#ifndef ALIBABACLOUD_IOT_MODEL_SPEECHBYSYNTHESISREQUEST_H_ +#define ALIBABACLOUD_IOT_MODEL_SPEECHBYSYNTHESISREQUEST_H_ + +#include +#include +#include +#include + +namespace AlibabaCloud +{ + namespace Iot + { + namespace Model + { + class ALIBABACLOUD_IOT_EXPORT SpeechBySynthesisRequest : public RpcServiceRequest + { + + public: + SpeechBySynthesisRequest(); + ~SpeechBySynthesisRequest(); + + std::string getVoice()const; + void setVoice(const std::string& voice); + std::string getSpeechId()const; + void setSpeechId(const std::string& speechId); + std::string getAudioFormat()const; + void setAudioFormat(const std::string& audioFormat); + std::string getIotId()const; + void setIotId(const std::string& iotId); + std::string getIotInstanceId()const; + void setIotInstanceId(const std::string& iotInstanceId); + std::string getText()const; + void setText(const std::string& text); + std::string getProductKey()const; + void setProductKey(const std::string& productKey); + int getVolume()const; + void setVolume(int volume); + 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); + int getSpeechRate()const; + void setSpeechRate(int speechRate); + + private: + std::string voice_; + std::string speechId_; + std::string audioFormat_; + std::string iotId_; + std::string iotInstanceId_; + std::string text_; + std::string productKey_; + int volume_; + std::string apiProduct_; + std::string apiRevision_; + std::string deviceName_; + int speechRate_; + + }; + } + } +} +#endif // !ALIBABACLOUD_IOT_MODEL_SPEECHBYSYNTHESISREQUEST_H_ \ No newline at end of file diff --git a/iot/include/alibabacloud/iot/model/QueryAppDeviceListResult.h b/iot/include/alibabacloud/iot/model/SpeechBySynthesisResult.h similarity index 52% rename from iot/include/alibabacloud/iot/model/QueryAppDeviceListResult.h rename to iot/include/alibabacloud/iot/model/SpeechBySynthesisResult.h index 252647594..abf117f7b 100644 --- a/iot/include/alibabacloud/iot/model/QueryAppDeviceListResult.h +++ b/iot/include/alibabacloud/iot/model/SpeechBySynthesisResult.h @@ -14,8 +14,8 @@ * limitations under the License. */ -#ifndef ALIBABACLOUD_IOT_MODEL_QUERYAPPDEVICELISTRESULT_H_ -#define ALIBABACLOUD_IOT_MODEL_QUERYAPPDEVICELISTRESULT_H_ +#ifndef ALIBABACLOUD_IOT_MODEL_SPEECHBYSYNTHESISRESULT_H_ +#define ALIBABACLOUD_IOT_MODEL_SPEECHBYSYNTHESISRESULT_H_ #include #include @@ -29,34 +29,14 @@ namespace AlibabaCloud { namespace Model { - class ALIBABACLOUD_IOT_EXPORT QueryAppDeviceListResult : public ServiceResult + class ALIBABACLOUD_IOT_EXPORT SpeechBySynthesisResult : public ServiceResult { public: - struct DataItem - { - std::string status; - std::string lastOnlineTime; - std::string utcActiveTime; - std::string utcCreateTime; - std::string productName; - long childDeviceCount; - std::string activeTime; - std::string utcLastOnlineTime; - int nodeType; - std::string createTime; - std::string productKey; - std::string deviceName; - }; - QueryAppDeviceListResult(); - explicit QueryAppDeviceListResult(const std::string &payload); - ~QueryAppDeviceListResult(); - int getPageSize()const; - int getPageCount()const; - int getTotal()const; - std::vector getData()const; - int getPage()const; + SpeechBySynthesisResult(); + explicit SpeechBySynthesisResult(const std::string &payload); + ~SpeechBySynthesisResult(); std::string getErrorMessage()const; std::string getCode()const; bool getSuccess()const; @@ -64,11 +44,6 @@ 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 +52,4 @@ namespace AlibabaCloud } } } -#endif // !ALIBABACLOUD_IOT_MODEL_QUERYAPPDEVICELISTRESULT_H_ \ No newline at end of file +#endif // !ALIBABACLOUD_IOT_MODEL_SPEECHBYSYNTHESISRESULT_H_ \ No newline at end of file diff --git a/iot/include/alibabacloud/iot/model/TestSpeechRequest.h b/iot/include/alibabacloud/iot/model/TestSpeechRequest.h index 78e8a8171..bcbb89af0 100644 --- a/iot/include/alibabacloud/iot/model/TestSpeechRequest.h +++ b/iot/include/alibabacloud/iot/model/TestSpeechRequest.h @@ -45,8 +45,12 @@ namespace AlibabaCloud void setIotInstanceId(const std::string& iotInstanceId); std::string getText()const; void setText(const std::string& text); + std::string getSoundCodeConfig()const; + void setSoundCodeConfig(const std::string& soundCodeConfig); std::string getSpeechType()const; void setSpeechType(const std::string& speechType); + bool getEnableSoundCode()const; + void setEnableSoundCode(bool enableSoundCode); int getVolume()const; void setVolume(int volume); std::string getApiProduct()const; @@ -62,7 +66,9 @@ namespace AlibabaCloud std::string audioFormat_; std::string iotInstanceId_; std::string text_; + std::string soundCodeConfig_; std::string speechType_; + bool enableSoundCode_; int volume_; std::string apiProduct_; std::string apiRevision_; diff --git a/iot/include/alibabacloud/iot/model/UpdateSpeechRequest.h b/iot/include/alibabacloud/iot/model/UpdateSpeechRequest.h index afdf8ea4d..3b57c8854 100644 --- a/iot/include/alibabacloud/iot/model/UpdateSpeechRequest.h +++ b/iot/include/alibabacloud/iot/model/UpdateSpeechRequest.h @@ -41,6 +41,10 @@ namespace AlibabaCloud void setProjectCode(const std::string& projectCode); std::string getIotInstanceId()const; void setIotInstanceId(const std::string& iotInstanceId); + std::string getSoundCodeConfig()const; + void setSoundCodeConfig(const std::string& soundCodeConfig); + bool getEnableSoundCode()const; + void setEnableSoundCode(bool enableSoundCode); int getVolume()const; void setVolume(int volume); std::string getApiProduct()const; @@ -56,6 +60,8 @@ namespace AlibabaCloud std::string voice_; std::string projectCode_; std::string iotInstanceId_; + std::string soundCodeConfig_; + bool enableSoundCode_; int volume_; std::string apiProduct_; std::string apiRevision_; diff --git a/iot/src/IotClient.cc b/iot/src/IotClient.cc index 2a87a3bac..1f677a7c5 100644 --- a/iot/src/IotClient.cc +++ b/iot/src/IotClient.cc @@ -5883,42 +5883,6 @@ IotClient::ListRuleActionsOutcomeCallable IotClient::listRuleActionsCallable(con return task->get_future(); } -IotClient::ListSourceReplicaOutcome IotClient::listSourceReplica(const ListSourceReplicaRequest &request) const -{ - auto endpointOutcome = endpointProvider_->getEndpoint(); - if (!endpointOutcome.isSuccess()) - return ListSourceReplicaOutcome(endpointOutcome.error()); - - auto outcome = makeRequest(endpointOutcome.result(), request); - - if (outcome.isSuccess()) - return ListSourceReplicaOutcome(ListSourceReplicaResult(outcome.result())); - else - return ListSourceReplicaOutcome(outcome.error()); -} - -void IotClient::listSourceReplicaAsync(const ListSourceReplicaRequest& request, const ListSourceReplicaAsyncHandler& handler, const std::shared_ptr& context) const -{ - auto fn = [this, request, handler, context]() - { - handler(this, request, listSourceReplica(request), context); - }; - - asyncExecute(new Runnable(fn)); -} - -IotClient::ListSourceReplicaOutcomeCallable IotClient::listSourceReplicaCallable(const ListSourceReplicaRequest &request) const -{ - auto task = std::make_shared>( - [this, request]() - { - return this->listSourceReplica(request); - }); - - asyncExecute(new Runnable([task]() { (*task)(); })); - return task->get_future(); -} - IotClient::ListTaskOutcome IotClient::listTask(const ListTaskRequest &request) const { auto endpointOutcome = endpointProvider_->getEndpoint(); @@ -6351,42 +6315,6 @@ IotClient::PushSpeechOutcomeCallable IotClient::pushSpeechCallable(const PushSpe return task->get_future(); } -IotClient::QueryAppDeviceListOutcome IotClient::queryAppDeviceList(const QueryAppDeviceListRequest &request) const -{ - auto endpointOutcome = endpointProvider_->getEndpoint(); - if (!endpointOutcome.isSuccess()) - return QueryAppDeviceListOutcome(endpointOutcome.error()); - - auto outcome = makeRequest(endpointOutcome.result(), request); - - if (outcome.isSuccess()) - return QueryAppDeviceListOutcome(QueryAppDeviceListResult(outcome.result())); - else - return QueryAppDeviceListOutcome(outcome.error()); -} - -void IotClient::queryAppDeviceListAsync(const QueryAppDeviceListRequest& request, const QueryAppDeviceListAsyncHandler& handler, const std::shared_ptr& context) const -{ - auto fn = [this, request, handler, context]() - { - handler(this, request, queryAppDeviceList(request), context); - }; - - asyncExecute(new Runnable(fn)); -} - -IotClient::QueryAppDeviceListOutcomeCallable IotClient::queryAppDeviceListCallable(const QueryAppDeviceListRequest &request) const -{ - auto task = std::make_shared>( - [this, request]() - { - return this->queryAppDeviceList(request); - }); - - asyncExecute(new Runnable([task]() { (*task)(); })); - return task->get_future(); -} - IotClient::QueryBatchRegisterDeviceStatusOutcome IotClient::queryBatchRegisterDeviceStatus(const QueryBatchRegisterDeviceStatusRequest &request) const { auto endpointOutcome = endpointProvider_->getEndpoint(); @@ -10131,6 +10059,42 @@ IotClient::SpeechByCombinationOutcomeCallable IotClient::speechByCombinationCall return task->get_future(); } +IotClient::SpeechBySynthesisOutcome IotClient::speechBySynthesis(const SpeechBySynthesisRequest &request) const +{ + auto endpointOutcome = endpointProvider_->getEndpoint(); + if (!endpointOutcome.isSuccess()) + return SpeechBySynthesisOutcome(endpointOutcome.error()); + + auto outcome = makeRequest(endpointOutcome.result(), request); + + if (outcome.isSuccess()) + return SpeechBySynthesisOutcome(SpeechBySynthesisResult(outcome.result())); + else + return SpeechBySynthesisOutcome(outcome.error()); +} + +void IotClient::speechBySynthesisAsync(const SpeechBySynthesisRequest& request, const SpeechBySynthesisAsyncHandler& handler, const std::shared_ptr& context) const +{ + auto fn = [this, request, handler, context]() + { + handler(this, request, speechBySynthesis(request), context); + }; + + asyncExecute(new Runnable(fn)); +} + +IotClient::SpeechBySynthesisOutcomeCallable IotClient::speechBySynthesisCallable(const SpeechBySynthesisRequest &request) const +{ + auto task = std::make_shared>( + [this, request]() + { + return this->speechBySynthesis(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/CreateOTADynamicUpgradeJobRequest.cc b/iot/src/model/CreateOTADynamicUpgradeJobRequest.cc index edb4d22a1..ea103fc19 100644 --- a/iot/src/model/CreateOTADynamicUpgradeJobRequest.cc +++ b/iot/src/model/CreateOTADynamicUpgradeJobRequest.cc @@ -38,6 +38,17 @@ void CreateOTADynamicUpgradeJobRequest::setDynamicMode(int dynamicMode) setParameter("DynamicMode", std::to_string(dynamicMode)); } +bool CreateOTADynamicUpgradeJobRequest::getMultiModuleMode()const +{ + return multiModuleMode_; +} + +void CreateOTADynamicUpgradeJobRequest::setMultiModuleMode(bool multiModuleMode) +{ + multiModuleMode_ = multiModuleMode; + setParameter("MultiModuleMode", multiModuleMode ? "true" : "false"); +} + int CreateOTADynamicUpgradeJobRequest::getRetryCount()const { return retryCount_; diff --git a/iot/src/model/CreateOTAStaticUpgradeJobRequest.cc b/iot/src/model/CreateOTAStaticUpgradeJobRequest.cc index c7f2e5ca8..0af8cecdf 100644 --- a/iot/src/model/CreateOTAStaticUpgradeJobRequest.cc +++ b/iot/src/model/CreateOTAStaticUpgradeJobRequest.cc @@ -27,6 +27,17 @@ CreateOTAStaticUpgradeJobRequest::CreateOTAStaticUpgradeJobRequest() : CreateOTAStaticUpgradeJobRequest::~CreateOTAStaticUpgradeJobRequest() {} +bool CreateOTAStaticUpgradeJobRequest::getMultiModuleMode()const +{ + return multiModuleMode_; +} + +void CreateOTAStaticUpgradeJobRequest::setMultiModuleMode(bool multiModuleMode) +{ + multiModuleMode_ = multiModuleMode; + setParameter("MultiModuleMode", multiModuleMode ? "true" : "false"); +} + int CreateOTAStaticUpgradeJobRequest::getRetryCount()const { return retryCount_; diff --git a/iot/src/model/CreateSpeechRequest.cc b/iot/src/model/CreateSpeechRequest.cc index 237995bd8..50c8ae502 100644 --- a/iot/src/model/CreateSpeechRequest.cc +++ b/iot/src/model/CreateSpeechRequest.cc @@ -82,6 +82,17 @@ void CreateSpeechRequest::setText(const std::string& text) setBodyParameter("Text", text); } +std::string CreateSpeechRequest::getSoundCodeConfig()const +{ + return soundCodeConfig_; +} + +void CreateSpeechRequest::setSoundCodeConfig(const std::string& soundCodeConfig) +{ + soundCodeConfig_ = soundCodeConfig; + setBodyParameter("SoundCodeConfig", soundCodeConfig); +} + std::string CreateSpeechRequest::getSpeechType()const { return speechType_; @@ -93,6 +104,17 @@ void CreateSpeechRequest::setSpeechType(const std::string& speechType) setBodyParameter("SpeechType", speechType); } +bool CreateSpeechRequest::getEnableSoundCode()const +{ + return enableSoundCode_; +} + +void CreateSpeechRequest::setEnableSoundCode(bool enableSoundCode) +{ + enableSoundCode_ = enableSoundCode; + setBodyParameter("EnableSoundCode", enableSoundCode ? "true" : "false"); +} + int CreateSpeechRequest::getVolume()const { return volume_; diff --git a/iot/src/model/ListSourceReplicaRequest.cc b/iot/src/model/ListSourceReplicaRequest.cc deleted file mode 100644 index 841afa406..000000000 --- a/iot/src/model/ListSourceReplicaRequest.cc +++ /dev/null @@ -1,117 +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::ListSourceReplicaRequest; - -ListSourceReplicaRequest::ListSourceReplicaRequest() : - RpcServiceRequest("iot", "2018-01-20", "ListSourceReplica") -{ - setMethod(HttpRequest::Method::Post); -} - -ListSourceReplicaRequest::~ListSourceReplicaRequest() -{} - -std::string ListSourceReplicaRequest::getIotInstanceId()const -{ - return iotInstanceId_; -} - -void ListSourceReplicaRequest::setIotInstanceId(const std::string& iotInstanceId) -{ - iotInstanceId_ = iotInstanceId; - setBodyParameter("IotInstanceId", iotInstanceId); -} - -std::string ListSourceReplicaRequest::getContext()const -{ - return context_; -} - -void ListSourceReplicaRequest::setContext(const std::string& context) -{ - context_ = context; - setBodyParameter("Context", context); -} - -int ListSourceReplicaRequest::getPageSize()const -{ - return pageSize_; -} - -void ListSourceReplicaRequest::setPageSize(int pageSize) -{ - pageSize_ = pageSize; - setParameter("PageSize", std::to_string(pageSize)); -} - -std::string ListSourceReplicaRequest::getSourceType()const -{ - return sourceType_; -} - -void ListSourceReplicaRequest::setSourceType(const std::string& sourceType) -{ - sourceType_ = sourceType; - setParameter("SourceType", sourceType); -} - -int ListSourceReplicaRequest::getPageNo()const -{ - return pageNo_; -} - -void ListSourceReplicaRequest::setPageNo(int pageNo) -{ - pageNo_ = pageNo; - setParameter("PageNo", std::to_string(pageNo)); -} - -std::string ListSourceReplicaRequest::getLpInstanceId()const -{ - return lpInstanceId_; -} - -void ListSourceReplicaRequest::setLpInstanceId(const std::string& lpInstanceId) -{ - lpInstanceId_ = lpInstanceId; - setParameter("LpInstanceId", lpInstanceId); -} - -std::string ListSourceReplicaRequest::getApiProduct()const -{ - return apiProduct_; -} - -void ListSourceReplicaRequest::setApiProduct(const std::string& apiProduct) -{ - apiProduct_ = apiProduct; - setBodyParameter("ApiProduct", apiProduct); -} - -std::string ListSourceReplicaRequest::getApiRevision()const -{ - return apiRevision_; -} - -void ListSourceReplicaRequest::setApiRevision(const std::string& apiRevision) -{ - apiRevision_ = apiRevision; - setBodyParameter("ApiRevision", apiRevision); -} - diff --git a/iot/src/model/ListSourceReplicaResult.cc b/iot/src/model/ListSourceReplicaResult.cc deleted file mode 100644 index 5ea795f4f..000000000 --- a/iot/src/model/ListSourceReplicaResult.cc +++ /dev/null @@ -1,125 +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; - -ListSourceReplicaResult::ListSourceReplicaResult() : - ServiceResult() -{} - -ListSourceReplicaResult::ListSourceReplicaResult(const std::string &payload) : - ServiceResult() -{ - parse(payload); -} - -ListSourceReplicaResult::~ListSourceReplicaResult() -{} - -void ListSourceReplicaResult::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::stol(dataNode["Total"].asString()); - if(!dataNode["TotalPage"].isNull()) - data_.totalPage = std::stol(dataNode["TotalPage"].asString()); - if(!dataNode["PageSize"].isNull()) - data_.pageSize = std::stoi(dataNode["PageSize"].asString()); - if(!dataNode["PageNo"].isNull()) - data_.pageNo = std::stoi(dataNode["PageNo"].asString()); - auto allDataListNode = dataNode["DataList"]["DataListItem"]; - for (auto dataNodeDataListDataListItem : allDataListNode) - { - Data::DataListItem dataListItemObject; - if(!dataNodeDataListDataListItem["ReplicaUid"].isNull()) - dataListItemObject.replicaUid = dataNodeDataListDataListItem["ReplicaUid"].asString(); - if(!dataNodeDataListDataListItem["Name"].isNull()) - dataListItemObject.name = dataNodeDataListDataListItem["Name"].asString(); - if(!dataNodeDataListDataListItem["Code"].isNull()) - dataListItemObject.code = dataNodeDataListDataListItem["Code"].asString(); - if(!dataNodeDataListDataListItem["SourceUid"].isNull()) - dataListItemObject.sourceUid = dataNodeDataListDataListItem["SourceUid"].asString(); - if(!dataNodeDataListDataListItem["TableUid"].isNull()) - dataListItemObject.tableUid = dataNodeDataListDataListItem["TableUid"].asString(); - if(!dataNodeDataListDataListItem["SourceType"].isNull()) - dataListItemObject.sourceType = dataNodeDataListDataListItem["SourceType"].asString(); - if(!dataNodeDataListDataListItem["TimeCycle"].isNull()) - dataListItemObject.timeCycle = std::stoi(dataNodeDataListDataListItem["TimeCycle"].asString()); - if(!dataNodeDataListDataListItem["TimeUnit"].isNull()) - dataListItemObject.timeUnit = dataNodeDataListDataListItem["TimeUnit"].asString(); - if(!dataNodeDataListDataListItem["Region"].isNull()) - dataListItemObject.region = std::stoi(dataNodeDataListDataListItem["Region"].asString()); - if(!dataNodeDataListDataListItem["BeginLatest"].isNull()) - dataListItemObject.beginLatest = std::stol(dataNodeDataListDataListItem["BeginLatest"].asString()); - if(!dataNodeDataListDataListItem["EndLatest"].isNull()) - dataListItemObject.endLatest = std::stol(dataNodeDataListDataListItem["EndLatest"].asString()); - if(!dataNodeDataListDataListItem["ExtraProperty"].isNull()) - dataListItemObject.extraProperty = dataNodeDataListDataListItem["ExtraProperty"].asString(); - if(!dataNodeDataListDataListItem["Status"].isNull()) - dataListItemObject.status = std::stoi(dataNodeDataListDataListItem["Status"].asString()); - if(!dataNodeDataListDataListItem["StorageSize"].isNull()) - dataListItemObject.storageSize = std::stol(dataNodeDataListDataListItem["StorageSize"].asString()); - if(!dataNodeDataListDataListItem["ProductCreateTime"].isNull()) - dataListItemObject.productCreateTime = std::stol(dataNodeDataListDataListItem["ProductCreateTime"].asString()); - if(!dataNodeDataListDataListItem["NodeType"].isNull()) - dataListItemObject.nodeType = std::stoi(dataNodeDataListDataListItem["NodeType"].asString()); - if(!dataNodeDataListDataListItem["NeedTips"].isNull()) - dataListItemObject.needTips = dataNodeDataListDataListItem["NeedTips"].asString() == "true"; - if(!dataNodeDataListDataListItem["LongJobUid"].isNull()) - dataListItemObject.longJobUid = dataNodeDataListDataListItem["LongJobUid"].asString(); - if(!dataNodeDataListDataListItem["Desc"].isNull()) - dataListItemObject.desc = dataNodeDataListDataListItem["Desc"].asString(); - if(!dataNodeDataListDataListItem["GmtCreate"].isNull()) - dataListItemObject.gmtCreate = std::stol(dataNodeDataListDataListItem["GmtCreate"].asString()); - data_.dataList.push_back(dataListItemObject); - } - 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(); - -} - -ListSourceReplicaResult::Data ListSourceReplicaResult::getData()const -{ - return data_; -} - -std::string ListSourceReplicaResult::getErrorMessage()const -{ - return errorMessage_; -} - -std::string ListSourceReplicaResult::getCode()const -{ - return code_; -} - -bool ListSourceReplicaResult::getSuccess()const -{ - return success_; -} - diff --git a/iot/src/model/PrintByTemplateRequest.cc b/iot/src/model/PrintByTemplateRequest.cc index f12115c7c..ac5d300fb 100644 --- a/iot/src/model/PrintByTemplateRequest.cc +++ b/iot/src/model/PrintByTemplateRequest.cc @@ -27,17 +27,6 @@ PrintByTemplateRequest::PrintByTemplateRequest() : PrintByTemplateRequest::~PrintByTemplateRequest() {} -std::string PrintByTemplateRequest::getProjectCode()const -{ - return projectCode_; -} - -void PrintByTemplateRequest::setProjectCode(const std::string& projectCode) -{ - projectCode_ = projectCode; - setBodyParameter("ProjectCode", projectCode); -} - std::string PrintByTemplateRequest::getTemplateBizCode()const { return templateBizCode_; @@ -71,6 +60,17 @@ void PrintByTemplateRequest::setIotInstanceId(const std::string& iotInstanceId) setBodyParameter("IotInstanceId", iotInstanceId); } +bool PrintByTemplateRequest::getHistoryPrintTopic()const +{ + return historyPrintTopic_; +} + +void PrintByTemplateRequest::setHistoryPrintTopic(bool historyPrintTopic) +{ + historyPrintTopic_ = historyPrintTopic; + setBodyParameter("HistoryPrintTopic", historyPrintTopic ? "true" : "false"); +} + std::string PrintByTemplateRequest::getProductKey()const { return productKey_; diff --git a/iot/src/model/QueryAppDeviceListRequest.cc b/iot/src/model/QueryAppDeviceListRequest.cc deleted file mode 100644 index cf4aeb467..000000000 --- a/iot/src/model/QueryAppDeviceListRequest.cc +++ /dev/null @@ -1,137 +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::QueryAppDeviceListRequest; - -QueryAppDeviceListRequest::QueryAppDeviceListRequest() : - RpcServiceRequest("iot", "2018-01-20", "QueryAppDeviceList") -{ - setMethod(HttpRequest::Method::Post); -} - -QueryAppDeviceListRequest::~QueryAppDeviceListRequest() -{} - -std::vector QueryAppDeviceListRequest::getTagList()const -{ - return tagList_; -} - -void QueryAppDeviceListRequest::setTagList(const std::vector& tagList) -{ - tagList_ = tagList; - for(int dep1 = 0; dep1!= tagList.size(); dep1++) { - auto tagListObj = tagList.at(dep1); - std::string tagListObjStr = "TagList." + std::to_string(dep1 + 1); - setParameter(tagListObjStr + ".TagName", tagListObj.tagName); - setParameter(tagListObjStr + ".TagValue", tagListObj.tagValue); - } -} - -std::vector QueryAppDeviceListRequest::getProductKeyList()const -{ - return productKeyList_; -} - -void QueryAppDeviceListRequest::setProductKeyList(const std::vector& productKeyList) -{ - productKeyList_ = productKeyList; - for(int dep1 = 0; dep1!= productKeyList.size(); dep1++) { - setParameter("ProductKeyList."+ std::to_string(dep1), productKeyList.at(dep1)); - } -} - -std::string QueryAppDeviceListRequest::getIotInstanceId()const -{ - return iotInstanceId_; -} - -void QueryAppDeviceListRequest::setIotInstanceId(const std::string& iotInstanceId) -{ - iotInstanceId_ = iotInstanceId; - setParameter("IotInstanceId", iotInstanceId); -} - -int QueryAppDeviceListRequest::getPageSize()const -{ - return pageSize_; -} - -void QueryAppDeviceListRequest::setPageSize(int pageSize) -{ - pageSize_ = pageSize; - setParameter("PageSize", std::to_string(pageSize)); -} - -int QueryAppDeviceListRequest::getCurrentPage()const -{ - return currentPage_; -} - -void QueryAppDeviceListRequest::setCurrentPage(int currentPage) -{ - currentPage_ = currentPage; - setParameter("CurrentPage", std::to_string(currentPage)); -} - -std::vector QueryAppDeviceListRequest::getCategoryKeyList()const -{ - return categoryKeyList_; -} - -void QueryAppDeviceListRequest::setCategoryKeyList(const std::vector& categoryKeyList) -{ - categoryKeyList_ = categoryKeyList; - for(int dep1 = 0; dep1!= categoryKeyList.size(); dep1++) { - setParameter("CategoryKeyList."+ std::to_string(dep1), categoryKeyList.at(dep1)); - } -} - -std::string QueryAppDeviceListRequest::getApiProduct()const -{ - return apiProduct_; -} - -void QueryAppDeviceListRequest::setApiProduct(const std::string& apiProduct) -{ - apiProduct_ = apiProduct; - setBodyParameter("ApiProduct", apiProduct); -} - -std::string QueryAppDeviceListRequest::getApiRevision()const -{ - return apiRevision_; -} - -void QueryAppDeviceListRequest::setApiRevision(const std::string& apiRevision) -{ - apiRevision_ = apiRevision; - setBodyParameter("ApiRevision", apiRevision); -} - -std::string QueryAppDeviceListRequest::getAppKey()const -{ - return appKey_; -} - -void QueryAppDeviceListRequest::setAppKey(const std::string& appKey) -{ - appKey_ = appKey; - setParameter("AppKey", appKey); -} - diff --git a/iot/src/model/QueryAppDeviceListResult.cc b/iot/src/model/QueryAppDeviceListResult.cc deleted file mode 100644 index 57f390e90..000000000 --- a/iot/src/model/QueryAppDeviceListResult.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; - -QueryAppDeviceListResult::QueryAppDeviceListResult() : - ServiceResult() -{} - -QueryAppDeviceListResult::QueryAppDeviceListResult(const std::string &payload) : - ServiceResult() -{ - parse(payload); -} - -QueryAppDeviceListResult::~QueryAppDeviceListResult() -{} - -void QueryAppDeviceListResult::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["ProductName"].isNull()) - dataObject.productName = valueDataDataItem["ProductName"].asString(); - if(!valueDataDataItem["ProductKey"].isNull()) - dataObject.productKey = valueDataDataItem["ProductKey"].asString(); - if(!valueDataDataItem["DeviceName"].isNull()) - dataObject.deviceName = valueDataDataItem["DeviceName"].asString(); - if(!valueDataDataItem["NodeType"].isNull()) - dataObject.nodeType = std::stoi(valueDataDataItem["NodeType"].asString()); - if(!valueDataDataItem["Status"].isNull()) - dataObject.status = valueDataDataItem["Status"].asString(); - if(!valueDataDataItem["ActiveTime"].isNull()) - dataObject.activeTime = valueDataDataItem["ActiveTime"].asString(); - if(!valueDataDataItem["LastOnlineTime"].isNull()) - dataObject.lastOnlineTime = valueDataDataItem["LastOnlineTime"].asString(); - if(!valueDataDataItem["CreateTime"].isNull()) - dataObject.createTime = valueDataDataItem["CreateTime"].asString(); - if(!valueDataDataItem["ChildDeviceCount"].isNull()) - dataObject.childDeviceCount = std::stol(valueDataDataItem["ChildDeviceCount"].asString()); - if(!valueDataDataItem["UtcActiveTime"].isNull()) - dataObject.utcActiveTime = valueDataDataItem["UtcActiveTime"].asString(); - if(!valueDataDataItem["UtcLastOnlineTime"].isNull()) - dataObject.utcLastOnlineTime = valueDataDataItem["UtcLastOnlineTime"].asString(); - if(!valueDataDataItem["UtcCreateTime"].isNull()) - dataObject.utcCreateTime = valueDataDataItem["UtcCreateTime"].asString(); - data_.push_back(dataObject); - } - 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["Page"].isNull()) - page_ = std::stoi(value["Page"].asString()); - if(!value["PageSize"].isNull()) - pageSize_ = std::stoi(value["PageSize"].asString()); - if(!value["PageCount"].isNull()) - pageCount_ = std::stoi(value["PageCount"].asString()); - if(!value["Total"].isNull()) - total_ = std::stoi(value["Total"].asString()); - -} - -int QueryAppDeviceListResult::getPageSize()const -{ - return pageSize_; -} - -int QueryAppDeviceListResult::getPageCount()const -{ - return pageCount_; -} - -int QueryAppDeviceListResult::getTotal()const -{ - return total_; -} - -std::vector QueryAppDeviceListResult::getData()const -{ - return data_; -} - -int QueryAppDeviceListResult::getPage()const -{ - return page_; -} - -std::string QueryAppDeviceListResult::getErrorMessage()const -{ - return errorMessage_; -} - -std::string QueryAppDeviceListResult::getCode()const -{ - return code_; -} - -bool QueryAppDeviceListResult::getSuccess()const -{ - return success_; -} - diff --git a/iot/src/model/QueryOTAJobResult.cc b/iot/src/model/QueryOTAJobResult.cc index b49388c05..3035e4a3b 100644 --- a/iot/src/model/QueryOTAJobResult.cc +++ b/iot/src/model/QueryOTAJobResult.cc @@ -96,6 +96,8 @@ void QueryOTAJobResult::parse(const std::string &payload) data_.groupName = dataNode["GroupName"].asString(); if(!dataNode["DownloadProtocol"].isNull()) data_.downloadProtocol = dataNode["DownloadProtocol"].asString(); + if(!dataNode["MultiModuleMode"].isNull()) + data_.multiModuleMode = dataNode["MultiModuleMode"].asString() == "true"; auto allTagsNode = dataNode["Tags"]["OtaTagDTO"]; for (auto dataNodeTagsOtaTagDTO : allTagsNode) { diff --git a/iot/src/model/QuerySpeechResult.cc b/iot/src/model/QuerySpeechResult.cc index 480f28dcd..ac17c2103 100644 --- a/iot/src/model/QuerySpeechResult.cc +++ b/iot/src/model/QuerySpeechResult.cc @@ -56,6 +56,13 @@ void QuerySpeechResult::parse(const std::string &payload) data_.audioFormat = dataNode["AudioFormat"].asString(); if(!dataNode["SpeechType"].isNull()) data_.speechType = dataNode["SpeechType"].asString(); + if(!dataNode["EnableSoundCode"].isNull()) + data_.enableSoundCode = dataNode["EnableSoundCode"].asString() == "true"; + auto soundCodeConfigNode = dataNode["SoundCodeConfig"]; + if(!soundCodeConfigNode["AdditionalDuration"].isNull()) + data_.soundCodeConfig.additionalDuration = std::stoi(soundCodeConfigNode["AdditionalDuration"].asString()); + if(!soundCodeConfigNode["SoundCodeContent"].isNull()) + data_.soundCodeConfig.soundCodeContent = soundCodeConfigNode["SoundCodeContent"].asString(); if(!value["Success"].isNull()) success_ = value["Success"].asString() == "true"; if(!value["Code"].isNull()) diff --git a/iot/src/model/SpeechBySynthesisRequest.cc b/iot/src/model/SpeechBySynthesisRequest.cc new file mode 100644 index 000000000..9e0f1c71c --- /dev/null +++ b/iot/src/model/SpeechBySynthesisRequest.cc @@ -0,0 +1,161 @@ +/* + * 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::SpeechBySynthesisRequest; + +SpeechBySynthesisRequest::SpeechBySynthesisRequest() : + RpcServiceRequest("iot", "2018-01-20", "SpeechBySynthesis") +{ + setMethod(HttpRequest::Method::Post); +} + +SpeechBySynthesisRequest::~SpeechBySynthesisRequest() +{} + +std::string SpeechBySynthesisRequest::getVoice()const +{ + return voice_; +} + +void SpeechBySynthesisRequest::setVoice(const std::string& voice) +{ + voice_ = voice; + setBodyParameter("Voice", voice); +} + +std::string SpeechBySynthesisRequest::getSpeechId()const +{ + return speechId_; +} + +void SpeechBySynthesisRequest::setSpeechId(const std::string& speechId) +{ + speechId_ = speechId; + setBodyParameter("SpeechId", speechId); +} + +std::string SpeechBySynthesisRequest::getAudioFormat()const +{ + return audioFormat_; +} + +void SpeechBySynthesisRequest::setAudioFormat(const std::string& audioFormat) +{ + audioFormat_ = audioFormat; + setBodyParameter("AudioFormat", audioFormat); +} + +std::string SpeechBySynthesisRequest::getIotId()const +{ + return iotId_; +} + +void SpeechBySynthesisRequest::setIotId(const std::string& iotId) +{ + iotId_ = iotId; + setBodyParameter("IotId", iotId); +} + +std::string SpeechBySynthesisRequest::getIotInstanceId()const +{ + return iotInstanceId_; +} + +void SpeechBySynthesisRequest::setIotInstanceId(const std::string& iotInstanceId) +{ + iotInstanceId_ = iotInstanceId; + setBodyParameter("IotInstanceId", iotInstanceId); +} + +std::string SpeechBySynthesisRequest::getText()const +{ + return text_; +} + +void SpeechBySynthesisRequest::setText(const std::string& text) +{ + text_ = text; + setBodyParameter("Text", text); +} + +std::string SpeechBySynthesisRequest::getProductKey()const +{ + return productKey_; +} + +void SpeechBySynthesisRequest::setProductKey(const std::string& productKey) +{ + productKey_ = productKey; + setBodyParameter("ProductKey", productKey); +} + +int SpeechBySynthesisRequest::getVolume()const +{ + return volume_; +} + +void SpeechBySynthesisRequest::setVolume(int volume) +{ + volume_ = volume; + setBodyParameter("Volume", std::to_string(volume)); +} + +std::string SpeechBySynthesisRequest::getApiProduct()const +{ + return apiProduct_; +} + +void SpeechBySynthesisRequest::setApiProduct(const std::string& apiProduct) +{ + apiProduct_ = apiProduct; + setBodyParameter("ApiProduct", apiProduct); +} + +std::string SpeechBySynthesisRequest::getApiRevision()const +{ + return apiRevision_; +} + +void SpeechBySynthesisRequest::setApiRevision(const std::string& apiRevision) +{ + apiRevision_ = apiRevision; + setBodyParameter("ApiRevision", apiRevision); +} + +std::string SpeechBySynthesisRequest::getDeviceName()const +{ + return deviceName_; +} + +void SpeechBySynthesisRequest::setDeviceName(const std::string& deviceName) +{ + deviceName_ = deviceName; + setBodyParameter("DeviceName", deviceName); +} + +int SpeechBySynthesisRequest::getSpeechRate()const +{ + return speechRate_; +} + +void SpeechBySynthesisRequest::setSpeechRate(int speechRate) +{ + speechRate_ = speechRate; + setBodyParameter("SpeechRate", std::to_string(speechRate)); +} + diff --git a/iot/src/model/SpeechBySynthesisResult.cc b/iot/src/model/SpeechBySynthesisResult.cc new file mode 100644 index 000000000..257e4919d --- /dev/null +++ b/iot/src/model/SpeechBySynthesisResult.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; + +SpeechBySynthesisResult::SpeechBySynthesisResult() : + ServiceResult() +{} + +SpeechBySynthesisResult::SpeechBySynthesisResult(const std::string &payload) : + ServiceResult() +{ + parse(payload); +} + +SpeechBySynthesisResult::~SpeechBySynthesisResult() +{} + +void SpeechBySynthesisResult::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 SpeechBySynthesisResult::getErrorMessage()const +{ + return errorMessage_; +} + +std::string SpeechBySynthesisResult::getCode()const +{ + return code_; +} + +bool SpeechBySynthesisResult::getSuccess()const +{ + return success_; +} + diff --git a/iot/src/model/TestSpeechRequest.cc b/iot/src/model/TestSpeechRequest.cc index d15373eee..e8b46f5a8 100644 --- a/iot/src/model/TestSpeechRequest.cc +++ b/iot/src/model/TestSpeechRequest.cc @@ -82,6 +82,17 @@ void TestSpeechRequest::setText(const std::string& text) setBodyParameter("Text", text); } +std::string TestSpeechRequest::getSoundCodeConfig()const +{ + return soundCodeConfig_; +} + +void TestSpeechRequest::setSoundCodeConfig(const std::string& soundCodeConfig) +{ + soundCodeConfig_ = soundCodeConfig; + setBodyParameter("SoundCodeConfig", soundCodeConfig); +} + std::string TestSpeechRequest::getSpeechType()const { return speechType_; @@ -93,6 +104,17 @@ void TestSpeechRequest::setSpeechType(const std::string& speechType) setBodyParameter("SpeechType", speechType); } +bool TestSpeechRequest::getEnableSoundCode()const +{ + return enableSoundCode_; +} + +void TestSpeechRequest::setEnableSoundCode(bool enableSoundCode) +{ + enableSoundCode_ = enableSoundCode; + setBodyParameter("EnableSoundCode", enableSoundCode ? "true" : "false"); +} + int TestSpeechRequest::getVolume()const { return volume_; diff --git a/iot/src/model/UpdateSpeechRequest.cc b/iot/src/model/UpdateSpeechRequest.cc index 6faeab0b7..681fc9d19 100644 --- a/iot/src/model/UpdateSpeechRequest.cc +++ b/iot/src/model/UpdateSpeechRequest.cc @@ -60,6 +60,28 @@ void UpdateSpeechRequest::setIotInstanceId(const std::string& iotInstanceId) setBodyParameter("IotInstanceId", iotInstanceId); } +std::string UpdateSpeechRequest::getSoundCodeConfig()const +{ + return soundCodeConfig_; +} + +void UpdateSpeechRequest::setSoundCodeConfig(const std::string& soundCodeConfig) +{ + soundCodeConfig_ = soundCodeConfig; + setBodyParameter("SoundCodeConfig", soundCodeConfig); +} + +bool UpdateSpeechRequest::getEnableSoundCode()const +{ + return enableSoundCode_; +} + +void UpdateSpeechRequest::setEnableSoundCode(bool enableSoundCode) +{ + enableSoundCode_ = enableSoundCode; + setBodyParameter("EnableSoundCode", enableSoundCode ? "true" : "false"); +} + int UpdateSpeechRequest::getVolume()const { return volume_;