Iot_20180120 TeaDSL SDK.

This commit is contained in:
sdk-team
2023-03-06 11:19:16 +00:00
parent 159a3aa236
commit eb9e915503
14 changed files with 630 additions and 4 deletions

View File

@@ -1 +1 @@
1.36.1485
1.36.1486

View File

@@ -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

View File

@@ -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<Error, Model::GetSceneRuleResult> GetSceneRuleOutcome;
typedef std::future<GetSceneRuleOutcome> GetSceneRuleOutcomeCallable;
typedef std::function<void(const IotClient*, const Model::GetSceneRuleRequest&, const GetSceneRuleOutcome&, const std::shared_ptr<const AsyncCallerContext>&)> GetSceneRuleAsyncHandler;
typedef Outcome<Error, Model::GetShareSpeechModelAudioResult> GetShareSpeechModelAudioOutcome;
typedef std::future<GetShareSpeechModelAudioOutcome> GetShareSpeechModelAudioOutcomeCallable;
typedef std::function<void(const IotClient*, const Model::GetShareSpeechModelAudioRequest&, const GetShareSpeechModelAudioOutcome&, const std::shared_ptr<const AsyncCallerContext>&)> GetShareSpeechModelAudioAsyncHandler;
typedef Outcome<Error, Model::GetShareTaskByDeviceOpenResult> GetShareTaskByDeviceOpenOutcome;
typedef std::future<GetShareTaskByDeviceOpenOutcome> GetShareTaskByDeviceOpenOutcomeCallable;
typedef std::function<void(const IotClient*, const Model::GetShareTaskByDeviceOpenRequest&, const GetShareTaskByDeviceOpenOutcome&, const std::shared_ptr<const AsyncCallerContext>&)> GetShareTaskByDeviceOpenAsyncHandler;
@@ -1740,6 +1747,9 @@ namespace AlibabaCloud
typedef Outcome<Error, Model::QuerySpeechDeviceResult> QuerySpeechDeviceOutcome;
typedef std::future<QuerySpeechDeviceOutcome> QuerySpeechDeviceOutcomeCallable;
typedef std::function<void(const IotClient*, const Model::QuerySpeechDeviceRequest&, const QuerySpeechDeviceOutcome&, const std::shared_ptr<const AsyncCallerContext>&)> QuerySpeechDeviceAsyncHandler;
typedef Outcome<Error, Model::QuerySpeechLicenseAvailableQuotaResult> QuerySpeechLicenseAvailableQuotaOutcome;
typedef std::future<QuerySpeechLicenseAvailableQuotaOutcome> QuerySpeechLicenseAvailableQuotaOutcomeCallable;
typedef std::function<void(const IotClient*, const Model::QuerySpeechLicenseAvailableQuotaRequest&, const QuerySpeechLicenseAvailableQuotaOutcome&, const std::shared_ptr<const AsyncCallerContext>&)> QuerySpeechLicenseAvailableQuotaAsyncHandler;
typedef Outcome<Error, Model::QuerySpeechLicenseDeviceListResult> QuerySpeechLicenseDeviceListOutcome;
typedef std::future<QuerySpeechLicenseDeviceListOutcome> QuerySpeechLicenseDeviceListOutcomeCallable;
typedef std::function<void(const IotClient*, const Model::QuerySpeechLicenseDeviceListRequest&, const QuerySpeechLicenseDeviceListOutcome&, const std::shared_ptr<const AsyncCallerContext>&)> 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<const AsyncCallerContext>& 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<const AsyncCallerContext>& 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<const AsyncCallerContext>& 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<const AsyncCallerContext>& 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<const AsyncCallerContext>& 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<const AsyncCallerContext>& context = nullptr) const;
QuerySpeechLicenseDeviceListOutcomeCallable querySpeechLicenseDeviceListCallable(const Model::QuerySpeechLicenseDeviceListRequest& request) const;

View File

@@ -34,8 +34,11 @@ namespace AlibabaCloud
public:
struct Data
{
std::string failedResultCsvFile;
int progress;
std::string progressId;
int failSum;
int successSum;
};

View File

@@ -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 <string>
#include <vector>
#include <alibabacloud/core/RpcServiceRequest.h>
#include <alibabacloud/iot/IotExport.h>
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<std::string> getSpeechModelCodeList()const;
void setSpeechModelCodeList(const std::vector<std::string>& speechModelCodeList);
private:
std::string iotInstanceId_;
std::string shareTaskId_;
std::string apiProduct_;
std::string apiRevision_;
std::vector<std::string> speechModelCodeList_;
};
}
}
}
#endif // !ALIBABACLOUD_IOT_MODEL_GETSHARESPEECHMODELAUDIOREQUEST_H_

View File

@@ -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 <string>
#include <vector>
#include <utility>
#include <alibabacloud/core/ServiceResult.h>
#include <alibabacloud/iot/IotExport.h>
namespace AlibabaCloud
{
namespace Iot
{
namespace Model
{
class ALIBABACLOUD_IOT_EXPORT GetShareSpeechModelAudioResult : public ServiceResult
{
public:
GetShareSpeechModelAudioResult();
explicit GetShareSpeechModelAudioResult(const std::string &payload);
~GetShareSpeechModelAudioResult();
std::vector<std::string> getData()const;
std::string getErrorMessage()const;
std::string getCode()const;
bool getSuccess()const;
protected:
void parse(const std::string &payload);
private:
std::vector<std::string> data_;
std::string errorMessage_;
std::string code_;
bool success_;
};
}
}
}
#endif // !ALIBABACLOUD_IOT_MODEL_GETSHARESPEECHMODELAUDIORESULT_H_

View File

@@ -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 <string>
#include <vector>
#include <alibabacloud/core/RpcServiceRequest.h>
#include <alibabacloud/iot/IotExport.h>
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_

View File

@@ -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 <string>
#include <vector>
#include <utility>
#include <alibabacloud/core/ServiceResult.h>
#include <alibabacloud/iot/IotExport.h>
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_

View File

@@ -31,21 +31,21 @@ IotClient::IotClient(const Credentials &credentials, const ClientConfiguration &
RpcServiceClient(SERVICE_NAME, std::make_shared<SimpleCredentialsProvider>(credentials), configuration)
{
auto locationClient = std::make_shared<LocationClient>(credentials, configuration);
endpointProvider_ = std::make_shared<EndpointProvider>(locationClient, configuration.regionId(), SERVICE_NAME, "iot");
endpointProvider_ = std::make_shared<EndpointProvider>(locationClient, configuration.regionId(), SERVICE_NAME, "");
}
IotClient::IotClient(const std::shared_ptr<CredentialsProvider>& credentialsProvider, const ClientConfiguration & configuration) :
RpcServiceClient(SERVICE_NAME, credentialsProvider, configuration)
{
auto locationClient = std::make_shared<LocationClient>(credentialsProvider, configuration);
endpointProvider_ = std::make_shared<EndpointProvider>(locationClient, configuration.regionId(), SERVICE_NAME, "iot");
endpointProvider_ = std::make_shared<EndpointProvider>(locationClient, configuration.regionId(), SERVICE_NAME, "");
}
IotClient::IotClient(const std::string & accessKeyId, const std::string & accessKeySecret, const ClientConfiguration & configuration) :
RpcServiceClient(SERVICE_NAME, std::make_shared<SimpleCredentialsProvider>(accessKeyId, accessKeySecret), configuration)
{
auto locationClient = std::make_shared<LocationClient>(accessKeyId, accessKeySecret, configuration);
endpointProvider_ = std::make_shared<EndpointProvider>(locationClient, configuration.regionId(), SERVICE_NAME, "iot");
endpointProvider_ = std::make_shared<EndpointProvider>(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<const AsyncCallerContext>& 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<std::packaged_task<GetShareSpeechModelAudioOutcome()>>(
[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<const AsyncCallerContext>& 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<std::packaged_task<QuerySpeechLicenseAvailableQuotaOutcome()>>(
[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();

View File

@@ -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())

View File

@@ -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 <alibabacloud/iot/model/GetShareSpeechModelAudioRequest.h>
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<std::string> GetShareSpeechModelAudioRequest::getSpeechModelCodeList()const
{
return speechModelCodeList_;
}
void GetShareSpeechModelAudioRequest::setSpeechModelCodeList(const std::vector<std::string>& speechModelCodeList)
{
speechModelCodeList_ = speechModelCodeList;
for(int dep1 = 0; dep1!= speechModelCodeList.size(); dep1++) {
setBodyParameter("SpeechModelCodeList."+ std::to_string(dep1), speechModelCodeList.at(dep1));
}
}

View File

@@ -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 <alibabacloud/iot/model/GetShareSpeechModelAudioResult.h>
#include <json/json.h>
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<std::string> 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_;
}

View File

@@ -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 <alibabacloud/iot/model/QuerySpeechLicenseAvailableQuotaRequest.h>
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);
}

View File

@@ -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 <alibabacloud/iot/model/QuerySpeechLicenseAvailableQuotaResult.h>
#include <json/json.h>
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_;
}