From eb9e91550306c7bd99eeaeb6023763edd5aa6366 Mon Sep 17 00:00:00 2001 From: sdk-team Date: Mon, 6 Mar 2023 11:19:16 +0000 Subject: [PATCH] Iot_20180120 TeaDSL SDK. --- VERSION | 2 +- iot/CMakeLists.txt | 8 ++ iot/include/alibabacloud/iot/IotClient.h | 16 ++++ .../iot/model/AddShareTaskDeviceResult.h | 3 + .../model/GetShareSpeechModelAudioRequest.h | 60 +++++++++++++ .../model/GetShareSpeechModelAudioResult.h | 57 ++++++++++++ .../QuerySpeechLicenseAvailableQuotaRequest.h | 54 ++++++++++++ .../QuerySpeechLicenseAvailableQuotaResult.h | 57 ++++++++++++ iot/src/IotClient.cc | 78 ++++++++++++++++- iot/src/model/AddShareTaskDeviceResult.cc | 6 ++ .../model/GetShareSpeechModelAudioRequest.cc | 86 +++++++++++++++++++ .../model/GetShareSpeechModelAudioResult.cc | 73 ++++++++++++++++ ...QuerySpeechLicenseAvailableQuotaRequest.cc | 62 +++++++++++++ .../QuerySpeechLicenseAvailableQuotaResult.cc | 72 ++++++++++++++++ 14 files changed, 630 insertions(+), 4 deletions(-) create mode 100644 iot/include/alibabacloud/iot/model/GetShareSpeechModelAudioRequest.h create mode 100644 iot/include/alibabacloud/iot/model/GetShareSpeechModelAudioResult.h create mode 100644 iot/include/alibabacloud/iot/model/QuerySpeechLicenseAvailableQuotaRequest.h create mode 100644 iot/include/alibabacloud/iot/model/QuerySpeechLicenseAvailableQuotaResult.h create mode 100644 iot/src/model/GetShareSpeechModelAudioRequest.cc create mode 100644 iot/src/model/GetShareSpeechModelAudioResult.cc create mode 100644 iot/src/model/QuerySpeechLicenseAvailableQuotaRequest.cc create mode 100644 iot/src/model/QuerySpeechLicenseAvailableQuotaResult.cc diff --git a/VERSION b/VERSION index 405d4e697..0d22805f0 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -1.36.1485 \ No newline at end of file +1.36.1486 \ No newline at end of file diff --git a/iot/CMakeLists.txt b/iot/CMakeLists.txt index 83afb3d08..b092fb1bc 100644 --- a/iot/CMakeLists.txt +++ b/iot/CMakeLists.txt @@ -361,6 +361,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/GetShareSpeechModelAudioRequest.h + include/alibabacloud/iot/model/GetShareSpeechModelAudioResult.h include/alibabacloud/iot/model/GetShareTaskByDeviceOpenRequest.h include/alibabacloud/iot/model/GetShareTaskByDeviceOpenResult.h include/alibabacloud/iot/model/GetSoundCodeAudioRequest.h @@ -631,6 +633,8 @@ set(iot_public_header_model include/alibabacloud/iot/model/QuerySpeechResult.h include/alibabacloud/iot/model/QuerySpeechDeviceRequest.h include/alibabacloud/iot/model/QuerySpeechDeviceResult.h + include/alibabacloud/iot/model/QuerySpeechLicenseAvailableQuotaRequest.h + include/alibabacloud/iot/model/QuerySpeechLicenseAvailableQuotaResult.h include/alibabacloud/iot/model/QuerySpeechLicenseDeviceListRequest.h include/alibabacloud/iot/model/QuerySpeechLicenseDeviceListResult.h include/alibabacloud/iot/model/QuerySpeechListRequest.h @@ -1158,6 +1162,8 @@ set(iot_src src/model/GetRuleActionResult.cc src/model/GetSceneRuleRequest.cc src/model/GetSceneRuleResult.cc + src/model/GetShareSpeechModelAudioRequest.cc + src/model/GetShareSpeechModelAudioResult.cc src/model/GetShareTaskByDeviceOpenRequest.cc src/model/GetShareTaskByDeviceOpenResult.cc src/model/GetSoundCodeAudioRequest.cc @@ -1428,6 +1434,8 @@ set(iot_src src/model/QuerySpeechResult.cc src/model/QuerySpeechDeviceRequest.cc src/model/QuerySpeechDeviceResult.cc + src/model/QuerySpeechLicenseAvailableQuotaRequest.cc + src/model/QuerySpeechLicenseAvailableQuotaResult.cc src/model/QuerySpeechLicenseDeviceListRequest.cc src/model/QuerySpeechLicenseDeviceListResult.cc src/model/QuerySpeechListRequest.cc diff --git a/iot/include/alibabacloud/iot/IotClient.h b/iot/include/alibabacloud/iot/IotClient.h index 0beafcd6f..8ba69b953 100644 --- a/iot/include/alibabacloud/iot/IotClient.h +++ b/iot/include/alibabacloud/iot/IotClient.h @@ -362,6 +362,8 @@ #include "model/GetRuleActionResult.h" #include "model/GetSceneRuleRequest.h" #include "model/GetSceneRuleResult.h" +#include "model/GetShareSpeechModelAudioRequest.h" +#include "model/GetShareSpeechModelAudioResult.h" #include "model/GetShareTaskByDeviceOpenRequest.h" #include "model/GetShareTaskByDeviceOpenResult.h" #include "model/GetSoundCodeAudioRequest.h" @@ -632,6 +634,8 @@ #include "model/QuerySpeechResult.h" #include "model/QuerySpeechDeviceRequest.h" #include "model/QuerySpeechDeviceResult.h" +#include "model/QuerySpeechLicenseAvailableQuotaRequest.h" +#include "model/QuerySpeechLicenseAvailableQuotaResult.h" #include "model/QuerySpeechLicenseDeviceListRequest.h" #include "model/QuerySpeechLicenseDeviceListResult.h" #include "model/QuerySpeechListRequest.h" @@ -1335,6 +1339,9 @@ namespace AlibabaCloud typedef Outcome GetSceneRuleOutcome; typedef std::future GetSceneRuleOutcomeCallable; typedef std::function&)> GetSceneRuleAsyncHandler; + typedef Outcome GetShareSpeechModelAudioOutcome; + typedef std::future GetShareSpeechModelAudioOutcomeCallable; + typedef std::function&)> GetShareSpeechModelAudioAsyncHandler; typedef Outcome GetShareTaskByDeviceOpenOutcome; typedef std::future GetShareTaskByDeviceOpenOutcomeCallable; typedef std::function&)> GetShareTaskByDeviceOpenAsyncHandler; @@ -1740,6 +1747,9 @@ namespace AlibabaCloud typedef Outcome QuerySpeechDeviceOutcome; typedef std::future QuerySpeechDeviceOutcomeCallable; typedef std::function&)> QuerySpeechDeviceAsyncHandler; + typedef Outcome QuerySpeechLicenseAvailableQuotaOutcome; + typedef std::future QuerySpeechLicenseAvailableQuotaOutcomeCallable; + typedef std::function&)> QuerySpeechLicenseAvailableQuotaAsyncHandler; typedef Outcome QuerySpeechLicenseDeviceListOutcome; typedef std::future QuerySpeechLicenseDeviceListOutcomeCallable; typedef std::function&)> QuerySpeechLicenseDeviceListAsyncHandler; @@ -2531,6 +2541,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; + GetShareSpeechModelAudioOutcome getShareSpeechModelAudio(const Model::GetShareSpeechModelAudioRequest &request)const; + void getShareSpeechModelAudioAsync(const Model::GetShareSpeechModelAudioRequest& request, const GetShareSpeechModelAudioAsyncHandler& handler, const std::shared_ptr& context = nullptr) const; + GetShareSpeechModelAudioOutcomeCallable getShareSpeechModelAudioCallable(const Model::GetShareSpeechModelAudioRequest& request) const; GetShareTaskByDeviceOpenOutcome getShareTaskByDeviceOpen(const Model::GetShareTaskByDeviceOpenRequest &request)const; void getShareTaskByDeviceOpenAsync(const Model::GetShareTaskByDeviceOpenRequest& request, const GetShareTaskByDeviceOpenAsyncHandler& handler, const std::shared_ptr& context = nullptr) const; GetShareTaskByDeviceOpenOutcomeCallable getShareTaskByDeviceOpenCallable(const Model::GetShareTaskByDeviceOpenRequest& request) const; @@ -2936,6 +2949,9 @@ namespace AlibabaCloud QuerySpeechDeviceOutcome querySpeechDevice(const Model::QuerySpeechDeviceRequest &request)const; void querySpeechDeviceAsync(const Model::QuerySpeechDeviceRequest& request, const QuerySpeechDeviceAsyncHandler& handler, const std::shared_ptr& context = nullptr) const; QuerySpeechDeviceOutcomeCallable querySpeechDeviceCallable(const Model::QuerySpeechDeviceRequest& request) const; + QuerySpeechLicenseAvailableQuotaOutcome querySpeechLicenseAvailableQuota(const Model::QuerySpeechLicenseAvailableQuotaRequest &request)const; + void querySpeechLicenseAvailableQuotaAsync(const Model::QuerySpeechLicenseAvailableQuotaRequest& request, const QuerySpeechLicenseAvailableQuotaAsyncHandler& handler, const std::shared_ptr& context = nullptr) const; + QuerySpeechLicenseAvailableQuotaOutcomeCallable querySpeechLicenseAvailableQuotaCallable(const Model::QuerySpeechLicenseAvailableQuotaRequest& request) const; QuerySpeechLicenseDeviceListOutcome querySpeechLicenseDeviceList(const Model::QuerySpeechLicenseDeviceListRequest &request)const; void querySpeechLicenseDeviceListAsync(const Model::QuerySpeechLicenseDeviceListRequest& request, const QuerySpeechLicenseDeviceListAsyncHandler& handler, const std::shared_ptr& context = nullptr) const; QuerySpeechLicenseDeviceListOutcomeCallable querySpeechLicenseDeviceListCallable(const Model::QuerySpeechLicenseDeviceListRequest& request) const; diff --git a/iot/include/alibabacloud/iot/model/AddShareTaskDeviceResult.h b/iot/include/alibabacloud/iot/model/AddShareTaskDeviceResult.h index 3e6219475..ba9f4e9c1 100644 --- a/iot/include/alibabacloud/iot/model/AddShareTaskDeviceResult.h +++ b/iot/include/alibabacloud/iot/model/AddShareTaskDeviceResult.h @@ -34,8 +34,11 @@ namespace AlibabaCloud public: struct Data { + std::string failedResultCsvFile; int progress; std::string progressId; + int failSum; + int successSum; }; diff --git a/iot/include/alibabacloud/iot/model/GetShareSpeechModelAudioRequest.h b/iot/include/alibabacloud/iot/model/GetShareSpeechModelAudioRequest.h new file mode 100644 index 000000000..9e06844c5 --- /dev/null +++ b/iot/include/alibabacloud/iot/model/GetShareSpeechModelAudioRequest.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_GETSHARESPEECHMODELAUDIOREQUEST_H_ +#define ALIBABACLOUD_IOT_MODEL_GETSHARESPEECHMODELAUDIOREQUEST_H_ + +#include +#include +#include +#include + +namespace AlibabaCloud +{ + namespace Iot + { + namespace Model + { + class ALIBABACLOUD_IOT_EXPORT GetShareSpeechModelAudioRequest : public RpcServiceRequest + { + + public: + GetShareSpeechModelAudioRequest(); + ~GetShareSpeechModelAudioRequest(); + + std::string getIotInstanceId()const; + void setIotInstanceId(const std::string& iotInstanceId); + std::string getShareTaskId()const; + void setShareTaskId(const std::string& shareTaskId); + std::string getApiProduct()const; + void setApiProduct(const std::string& apiProduct); + std::string getApiRevision()const; + void setApiRevision(const std::string& apiRevision); + std::vector getSpeechModelCodeList()const; + void setSpeechModelCodeList(const std::vector& speechModelCodeList); + + private: + std::string iotInstanceId_; + std::string shareTaskId_; + std::string apiProduct_; + std::string apiRevision_; + std::vector speechModelCodeList_; + + }; + } + } +} +#endif // !ALIBABACLOUD_IOT_MODEL_GETSHARESPEECHMODELAUDIOREQUEST_H_ \ No newline at end of file diff --git a/iot/include/alibabacloud/iot/model/GetShareSpeechModelAudioResult.h b/iot/include/alibabacloud/iot/model/GetShareSpeechModelAudioResult.h new file mode 100644 index 000000000..4115b021e --- /dev/null +++ b/iot/include/alibabacloud/iot/model/GetShareSpeechModelAudioResult.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_GETSHARESPEECHMODELAUDIORESULT_H_ +#define ALIBABACLOUD_IOT_MODEL_GETSHARESPEECHMODELAUDIORESULT_H_ + +#include +#include +#include +#include +#include + +namespace AlibabaCloud +{ + namespace Iot + { + namespace Model + { + class ALIBABACLOUD_IOT_EXPORT GetShareSpeechModelAudioResult : public ServiceResult + { + public: + + + GetShareSpeechModelAudioResult(); + explicit GetShareSpeechModelAudioResult(const std::string &payload); + ~GetShareSpeechModelAudioResult(); + 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_GETSHARESPEECHMODELAUDIORESULT_H_ \ No newline at end of file diff --git a/iot/include/alibabacloud/iot/model/QuerySpeechLicenseAvailableQuotaRequest.h b/iot/include/alibabacloud/iot/model/QuerySpeechLicenseAvailableQuotaRequest.h new file mode 100644 index 000000000..43f20b9c8 --- /dev/null +++ b/iot/include/alibabacloud/iot/model/QuerySpeechLicenseAvailableQuotaRequest.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_QUERYSPEECHLICENSEAVAILABLEQUOTAREQUEST_H_ +#define ALIBABACLOUD_IOT_MODEL_QUERYSPEECHLICENSEAVAILABLEQUOTAREQUEST_H_ + +#include +#include +#include +#include + +namespace AlibabaCloud +{ + namespace Iot + { + namespace Model + { + class ALIBABACLOUD_IOT_EXPORT QuerySpeechLicenseAvailableQuotaRequest : public RpcServiceRequest + { + + public: + QuerySpeechLicenseAvailableQuotaRequest(); + ~QuerySpeechLicenseAvailableQuotaRequest(); + + 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 iotInstanceId_; + std::string apiProduct_; + std::string apiRevision_; + + }; + } + } +} +#endif // !ALIBABACLOUD_IOT_MODEL_QUERYSPEECHLICENSEAVAILABLEQUOTAREQUEST_H_ \ No newline at end of file diff --git a/iot/include/alibabacloud/iot/model/QuerySpeechLicenseAvailableQuotaResult.h b/iot/include/alibabacloud/iot/model/QuerySpeechLicenseAvailableQuotaResult.h new file mode 100644 index 000000000..4c782c60b --- /dev/null +++ b/iot/include/alibabacloud/iot/model/QuerySpeechLicenseAvailableQuotaResult.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_QUERYSPEECHLICENSEAVAILABLEQUOTARESULT_H_ +#define ALIBABACLOUD_IOT_MODEL_QUERYSPEECHLICENSEAVAILABLEQUOTARESULT_H_ + +#include +#include +#include +#include +#include + +namespace AlibabaCloud +{ + namespace Iot + { + namespace Model + { + class ALIBABACLOUD_IOT_EXPORT QuerySpeechLicenseAvailableQuotaResult : public ServiceResult + { + public: + + + QuerySpeechLicenseAvailableQuotaResult(); + explicit QuerySpeechLicenseAvailableQuotaResult(const std::string &payload); + ~QuerySpeechLicenseAvailableQuotaResult(); + long getData()const; + std::string getErrorMessage()const; + std::string getCode()const; + bool getSuccess()const; + + protected: + void parse(const std::string &payload); + private: + long data_; + std::string errorMessage_; + std::string code_; + bool success_; + + }; + } + } +} +#endif // !ALIBABACLOUD_IOT_MODEL_QUERYSPEECHLICENSEAVAILABLEQUOTARESULT_H_ \ No newline at end of file diff --git a/iot/src/IotClient.cc b/iot/src/IotClient.cc index b5c4a5cd8..7f6831ec5 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() @@ -6171,6 +6171,42 @@ IotClient::GetSceneRuleOutcomeCallable IotClient::getSceneRuleCallable(const Get return task->get_future(); } +IotClient::GetShareSpeechModelAudioOutcome IotClient::getShareSpeechModelAudio(const GetShareSpeechModelAudioRequest &request) const +{ + auto endpointOutcome = endpointProvider_->getEndpoint(); + if (!endpointOutcome.isSuccess()) + return GetShareSpeechModelAudioOutcome(endpointOutcome.error()); + + auto outcome = makeRequest(endpointOutcome.result(), request); + + if (outcome.isSuccess()) + return GetShareSpeechModelAudioOutcome(GetShareSpeechModelAudioResult(outcome.result())); + else + return GetShareSpeechModelAudioOutcome(outcome.error()); +} + +void IotClient::getShareSpeechModelAudioAsync(const GetShareSpeechModelAudioRequest& request, const GetShareSpeechModelAudioAsyncHandler& handler, const std::shared_ptr& context) const +{ + auto fn = [this, request, handler, context]() + { + handler(this, request, getShareSpeechModelAudio(request), context); + }; + + asyncExecute(new Runnable(fn)); +} + +IotClient::GetShareSpeechModelAudioOutcomeCallable IotClient::getShareSpeechModelAudioCallable(const GetShareSpeechModelAudioRequest &request) const +{ + auto task = std::make_shared>( + [this, request]() + { + return this->getShareSpeechModelAudio(request); + }); + + asyncExecute(new Runnable([task]() { (*task)(); })); + return task->get_future(); +} + IotClient::GetShareTaskByDeviceOpenOutcome IotClient::getShareTaskByDeviceOpen(const GetShareTaskByDeviceOpenRequest &request) const { auto endpointOutcome = endpointProvider_->getEndpoint(); @@ -11031,6 +11067,42 @@ IotClient::QuerySpeechDeviceOutcomeCallable IotClient::querySpeechDeviceCallable return task->get_future(); } +IotClient::QuerySpeechLicenseAvailableQuotaOutcome IotClient::querySpeechLicenseAvailableQuota(const QuerySpeechLicenseAvailableQuotaRequest &request) const +{ + auto endpointOutcome = endpointProvider_->getEndpoint(); + if (!endpointOutcome.isSuccess()) + return QuerySpeechLicenseAvailableQuotaOutcome(endpointOutcome.error()); + + auto outcome = makeRequest(endpointOutcome.result(), request); + + if (outcome.isSuccess()) + return QuerySpeechLicenseAvailableQuotaOutcome(QuerySpeechLicenseAvailableQuotaResult(outcome.result())); + else + return QuerySpeechLicenseAvailableQuotaOutcome(outcome.error()); +} + +void IotClient::querySpeechLicenseAvailableQuotaAsync(const QuerySpeechLicenseAvailableQuotaRequest& request, const QuerySpeechLicenseAvailableQuotaAsyncHandler& handler, const std::shared_ptr& context) const +{ + auto fn = [this, request, handler, context]() + { + handler(this, request, querySpeechLicenseAvailableQuota(request), context); + }; + + asyncExecute(new Runnable(fn)); +} + +IotClient::QuerySpeechLicenseAvailableQuotaOutcomeCallable IotClient::querySpeechLicenseAvailableQuotaCallable(const QuerySpeechLicenseAvailableQuotaRequest &request) const +{ + auto task = std::make_shared>( + [this, request]() + { + return this->querySpeechLicenseAvailableQuota(request); + }); + + asyncExecute(new Runnable([task]() { (*task)(); })); + return task->get_future(); +} + IotClient::QuerySpeechLicenseDeviceListOutcome IotClient::querySpeechLicenseDeviceList(const QuerySpeechLicenseDeviceListRequest &request) const { auto endpointOutcome = endpointProvider_->getEndpoint(); diff --git a/iot/src/model/AddShareTaskDeviceResult.cc b/iot/src/model/AddShareTaskDeviceResult.cc index e60a40417..7afef5c1a 100644 --- a/iot/src/model/AddShareTaskDeviceResult.cc +++ b/iot/src/model/AddShareTaskDeviceResult.cc @@ -44,6 +44,12 @@ void AddShareTaskDeviceResult::parse(const std::string &payload) data_.progress = std::stoi(dataNode["Progress"].asString()); if(!dataNode["ProgressId"].isNull()) data_.progressId = dataNode["ProgressId"].asString(); + if(!dataNode["SuccessSum"].isNull()) + data_.successSum = std::stoi(dataNode["SuccessSum"].asString()); + if(!dataNode["FailSum"].isNull()) + data_.failSum = std::stoi(dataNode["FailSum"].asString()); + if(!dataNode["FailedResultCsvFile"].isNull()) + data_.failedResultCsvFile = dataNode["FailedResultCsvFile"].asString(); if(!value["Success"].isNull()) success_ = value["Success"].asString() == "true"; if(!value["Code"].isNull()) diff --git a/iot/src/model/GetShareSpeechModelAudioRequest.cc b/iot/src/model/GetShareSpeechModelAudioRequest.cc new file mode 100644 index 000000000..b792c7cec --- /dev/null +++ b/iot/src/model/GetShareSpeechModelAudioRequest.cc @@ -0,0 +1,86 @@ +/* + * Copyright 2009-2017 Alibaba Cloud All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#include + +using AlibabaCloud::Iot::Model::GetShareSpeechModelAudioRequest; + +GetShareSpeechModelAudioRequest::GetShareSpeechModelAudioRequest() : + RpcServiceRequest("iot", "2018-01-20", "GetShareSpeechModelAudio") +{ + setMethod(HttpRequest::Method::Post); +} + +GetShareSpeechModelAudioRequest::~GetShareSpeechModelAudioRequest() +{} + +std::string GetShareSpeechModelAudioRequest::getIotInstanceId()const +{ + return iotInstanceId_; +} + +void GetShareSpeechModelAudioRequest::setIotInstanceId(const std::string& iotInstanceId) +{ + iotInstanceId_ = iotInstanceId; + setBodyParameter("IotInstanceId", iotInstanceId); +} + +std::string GetShareSpeechModelAudioRequest::getShareTaskId()const +{ + return shareTaskId_; +} + +void GetShareSpeechModelAudioRequest::setShareTaskId(const std::string& shareTaskId) +{ + shareTaskId_ = shareTaskId; + setBodyParameter("ShareTaskId", shareTaskId); +} + +std::string GetShareSpeechModelAudioRequest::getApiProduct()const +{ + return apiProduct_; +} + +void GetShareSpeechModelAudioRequest::setApiProduct(const std::string& apiProduct) +{ + apiProduct_ = apiProduct; + setBodyParameter("ApiProduct", apiProduct); +} + +std::string GetShareSpeechModelAudioRequest::getApiRevision()const +{ + return apiRevision_; +} + +void GetShareSpeechModelAudioRequest::setApiRevision(const std::string& apiRevision) +{ + apiRevision_ = apiRevision; + setBodyParameter("ApiRevision", apiRevision); +} + +std::vector GetShareSpeechModelAudioRequest::getSpeechModelCodeList()const +{ + return speechModelCodeList_; +} + +void GetShareSpeechModelAudioRequest::setSpeechModelCodeList(const std::vector& speechModelCodeList) +{ + speechModelCodeList_ = speechModelCodeList; + for(int dep1 = 0; dep1!= speechModelCodeList.size(); dep1++) { + setBodyParameter("SpeechModelCodeList."+ std::to_string(dep1), speechModelCodeList.at(dep1)); + } +} + diff --git a/iot/src/model/GetShareSpeechModelAudioResult.cc b/iot/src/model/GetShareSpeechModelAudioResult.cc new file mode 100644 index 000000000..84b665b8c --- /dev/null +++ b/iot/src/model/GetShareSpeechModelAudioResult.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; + +GetShareSpeechModelAudioResult::GetShareSpeechModelAudioResult() : + ServiceResult() +{} + +GetShareSpeechModelAudioResult::GetShareSpeechModelAudioResult(const std::string &payload) : + ServiceResult() +{ + parse(payload); +} + +GetShareSpeechModelAudioResult::~GetShareSpeechModelAudioResult() +{} + +void GetShareSpeechModelAudioResult::parse(const std::string &payload) +{ + Json::Reader reader; + Json::Value value; + reader.parse(payload, value); + setRequestId(value["RequestId"].asString()); + auto allData = value["Data"]["data"]; + 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 GetShareSpeechModelAudioResult::getData()const +{ + return data_; +} + +std::string GetShareSpeechModelAudioResult::getErrorMessage()const +{ + return errorMessage_; +} + +std::string GetShareSpeechModelAudioResult::getCode()const +{ + return code_; +} + +bool GetShareSpeechModelAudioResult::getSuccess()const +{ + return success_; +} + diff --git a/iot/src/model/QuerySpeechLicenseAvailableQuotaRequest.cc b/iot/src/model/QuerySpeechLicenseAvailableQuotaRequest.cc new file mode 100644 index 000000000..d222f932a --- /dev/null +++ b/iot/src/model/QuerySpeechLicenseAvailableQuotaRequest.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::QuerySpeechLicenseAvailableQuotaRequest; + +QuerySpeechLicenseAvailableQuotaRequest::QuerySpeechLicenseAvailableQuotaRequest() : + RpcServiceRequest("iot", "2018-01-20", "QuerySpeechLicenseAvailableQuota") +{ + setMethod(HttpRequest::Method::Post); +} + +QuerySpeechLicenseAvailableQuotaRequest::~QuerySpeechLicenseAvailableQuotaRequest() +{} + +std::string QuerySpeechLicenseAvailableQuotaRequest::getIotInstanceId()const +{ + return iotInstanceId_; +} + +void QuerySpeechLicenseAvailableQuotaRequest::setIotInstanceId(const std::string& iotInstanceId) +{ + iotInstanceId_ = iotInstanceId; + setBodyParameter("IotInstanceId", iotInstanceId); +} + +std::string QuerySpeechLicenseAvailableQuotaRequest::getApiProduct()const +{ + return apiProduct_; +} + +void QuerySpeechLicenseAvailableQuotaRequest::setApiProduct(const std::string& apiProduct) +{ + apiProduct_ = apiProduct; + setBodyParameter("ApiProduct", apiProduct); +} + +std::string QuerySpeechLicenseAvailableQuotaRequest::getApiRevision()const +{ + return apiRevision_; +} + +void QuerySpeechLicenseAvailableQuotaRequest::setApiRevision(const std::string& apiRevision) +{ + apiRevision_ = apiRevision; + setBodyParameter("ApiRevision", apiRevision); +} + diff --git a/iot/src/model/QuerySpeechLicenseAvailableQuotaResult.cc b/iot/src/model/QuerySpeechLicenseAvailableQuotaResult.cc new file mode 100644 index 000000000..87112d48e --- /dev/null +++ b/iot/src/model/QuerySpeechLicenseAvailableQuotaResult.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; + +QuerySpeechLicenseAvailableQuotaResult::QuerySpeechLicenseAvailableQuotaResult() : + ServiceResult() +{} + +QuerySpeechLicenseAvailableQuotaResult::QuerySpeechLicenseAvailableQuotaResult(const std::string &payload) : + ServiceResult() +{ + parse(payload); +} + +QuerySpeechLicenseAvailableQuotaResult::~QuerySpeechLicenseAvailableQuotaResult() +{} + +void QuerySpeechLicenseAvailableQuotaResult::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_ = std::stol(value["Data"].asString()); + +} + +long QuerySpeechLicenseAvailableQuotaResult::getData()const +{ + return data_; +} + +std::string QuerySpeechLicenseAvailableQuotaResult::getErrorMessage()const +{ + return errorMessage_; +} + +std::string QuerySpeechLicenseAvailableQuotaResult::getCode()const +{ + return code_; +} + +bool QuerySpeechLicenseAvailableQuotaResult::getSuccess()const +{ + return success_; +} +