Iot_20180120 old version sdk.
This commit is contained in:
@@ -1995,6 +1995,42 @@ IotClient::CopyThingModelOutcomeCallable IotClient::copyThingModelCallable(const
|
||||
return task->get_future();
|
||||
}
|
||||
|
||||
IotClient::CountSpeechBroadcastHourOutcome IotClient::countSpeechBroadcastHour(const CountSpeechBroadcastHourRequest &request) const
|
||||
{
|
||||
auto endpointOutcome = endpointProvider_->getEndpoint();
|
||||
if (!endpointOutcome.isSuccess())
|
||||
return CountSpeechBroadcastHourOutcome(endpointOutcome.error());
|
||||
|
||||
auto outcome = makeRequest(endpointOutcome.result(), request);
|
||||
|
||||
if (outcome.isSuccess())
|
||||
return CountSpeechBroadcastHourOutcome(CountSpeechBroadcastHourResult(outcome.result()));
|
||||
else
|
||||
return CountSpeechBroadcastHourOutcome(outcome.error());
|
||||
}
|
||||
|
||||
void IotClient::countSpeechBroadcastHourAsync(const CountSpeechBroadcastHourRequest& request, const CountSpeechBroadcastHourAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context) const
|
||||
{
|
||||
auto fn = [this, request, handler, context]()
|
||||
{
|
||||
handler(this, request, countSpeechBroadcastHour(request), context);
|
||||
};
|
||||
|
||||
asyncExecute(new Runnable(fn));
|
||||
}
|
||||
|
||||
IotClient::CountSpeechBroadcastHourOutcomeCallable IotClient::countSpeechBroadcastHourCallable(const CountSpeechBroadcastHourRequest &request) const
|
||||
{
|
||||
auto task = std::make_shared<std::packaged_task<CountSpeechBroadcastHourOutcome()>>(
|
||||
[this, request]()
|
||||
{
|
||||
return this->countSpeechBroadcastHour(request);
|
||||
});
|
||||
|
||||
asyncExecute(new Runnable([task]() { (*task)(); }));
|
||||
return task->get_future();
|
||||
}
|
||||
|
||||
IotClient::CreateConsumerGroupOutcome IotClient::createConsumerGroup(const CreateConsumerGroupRequest &request) const
|
||||
{
|
||||
auto endpointOutcome = endpointProvider_->getEndpoint();
|
||||
@@ -7719,6 +7755,42 @@ IotClient::PageQuerySharedSpeechOpenOutcomeCallable IotClient::pageQuerySharedSp
|
||||
return task->get_future();
|
||||
}
|
||||
|
||||
IotClient::PageQuerySpeechBroadcastHourOutcome IotClient::pageQuerySpeechBroadcastHour(const PageQuerySpeechBroadcastHourRequest &request) const
|
||||
{
|
||||
auto endpointOutcome = endpointProvider_->getEndpoint();
|
||||
if (!endpointOutcome.isSuccess())
|
||||
return PageQuerySpeechBroadcastHourOutcome(endpointOutcome.error());
|
||||
|
||||
auto outcome = makeRequest(endpointOutcome.result(), request);
|
||||
|
||||
if (outcome.isSuccess())
|
||||
return PageQuerySpeechBroadcastHourOutcome(PageQuerySpeechBroadcastHourResult(outcome.result()));
|
||||
else
|
||||
return PageQuerySpeechBroadcastHourOutcome(outcome.error());
|
||||
}
|
||||
|
||||
void IotClient::pageQuerySpeechBroadcastHourAsync(const PageQuerySpeechBroadcastHourRequest& request, const PageQuerySpeechBroadcastHourAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context) const
|
||||
{
|
||||
auto fn = [this, request, handler, context]()
|
||||
{
|
||||
handler(this, request, pageQuerySpeechBroadcastHour(request), context);
|
||||
};
|
||||
|
||||
asyncExecute(new Runnable(fn));
|
||||
}
|
||||
|
||||
IotClient::PageQuerySpeechBroadcastHourOutcomeCallable IotClient::pageQuerySpeechBroadcastHourCallable(const PageQuerySpeechBroadcastHourRequest &request) const
|
||||
{
|
||||
auto task = std::make_shared<std::packaged_task<PageQuerySpeechBroadcastHourOutcome()>>(
|
||||
[this, request]()
|
||||
{
|
||||
return this->pageQuerySpeechBroadcastHour(request);
|
||||
});
|
||||
|
||||
asyncExecute(new Runnable([task]() { (*task)(); }));
|
||||
return task->get_future();
|
||||
}
|
||||
|
||||
IotClient::PrintByTemplateOutcome IotClient::printByTemplate(const PrintByTemplateRequest &request) const
|
||||
{
|
||||
auto endpointOutcome = endpointProvider_->getEndpoint();
|
||||
|
||||
84
iot/src/model/CountSpeechBroadcastHourRequest.cc
Normal file
84
iot/src/model/CountSpeechBroadcastHourRequest.cc
Normal file
@@ -0,0 +1,84 @@
|
||||
/*
|
||||
* Copyright 2009-2017 Alibaba Cloud All rights reserved.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
#include <alibabacloud/iot/model/CountSpeechBroadcastHourRequest.h>
|
||||
|
||||
using AlibabaCloud::Iot::Model::CountSpeechBroadcastHourRequest;
|
||||
|
||||
CountSpeechBroadcastHourRequest::CountSpeechBroadcastHourRequest() :
|
||||
RpcServiceRequest("iot", "2018-01-20", "CountSpeechBroadcastHour")
|
||||
{
|
||||
setMethod(HttpRequest::Method::Post);
|
||||
}
|
||||
|
||||
CountSpeechBroadcastHourRequest::~CountSpeechBroadcastHourRequest()
|
||||
{}
|
||||
|
||||
std::string CountSpeechBroadcastHourRequest::getQueryDateTimeHour()const
|
||||
{
|
||||
return queryDateTimeHour_;
|
||||
}
|
||||
|
||||
void CountSpeechBroadcastHourRequest::setQueryDateTimeHour(const std::string& queryDateTimeHour)
|
||||
{
|
||||
queryDateTimeHour_ = queryDateTimeHour;
|
||||
setParameter("QueryDateTimeHour", queryDateTimeHour);
|
||||
}
|
||||
|
||||
std::string CountSpeechBroadcastHourRequest::getIotInstanceId()const
|
||||
{
|
||||
return iotInstanceId_;
|
||||
}
|
||||
|
||||
void CountSpeechBroadcastHourRequest::setIotInstanceId(const std::string& iotInstanceId)
|
||||
{
|
||||
iotInstanceId_ = iotInstanceId;
|
||||
setBodyParameter("IotInstanceId", iotInstanceId);
|
||||
}
|
||||
|
||||
std::string CountSpeechBroadcastHourRequest::getShareTaskCode()const
|
||||
{
|
||||
return shareTaskCode_;
|
||||
}
|
||||
|
||||
void CountSpeechBroadcastHourRequest::setShareTaskCode(const std::string& shareTaskCode)
|
||||
{
|
||||
shareTaskCode_ = shareTaskCode;
|
||||
setBodyParameter("ShareTaskCode", shareTaskCode);
|
||||
}
|
||||
|
||||
std::string CountSpeechBroadcastHourRequest::getApiProduct()const
|
||||
{
|
||||
return apiProduct_;
|
||||
}
|
||||
|
||||
void CountSpeechBroadcastHourRequest::setApiProduct(const std::string& apiProduct)
|
||||
{
|
||||
apiProduct_ = apiProduct;
|
||||
setBodyParameter("ApiProduct", apiProduct);
|
||||
}
|
||||
|
||||
std::string CountSpeechBroadcastHourRequest::getApiRevision()const
|
||||
{
|
||||
return apiRevision_;
|
||||
}
|
||||
|
||||
void CountSpeechBroadcastHourRequest::setApiRevision(const std::string& apiRevision)
|
||||
{
|
||||
apiRevision_ = apiRevision;
|
||||
setBodyParameter("ApiRevision", apiRevision);
|
||||
}
|
||||
|
||||
72
iot/src/model/CountSpeechBroadcastHourResult.cc
Normal file
72
iot/src/model/CountSpeechBroadcastHourResult.cc
Normal 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/CountSpeechBroadcastHourResult.h>
|
||||
#include <json/json.h>
|
||||
|
||||
using namespace AlibabaCloud::Iot;
|
||||
using namespace AlibabaCloud::Iot::Model;
|
||||
|
||||
CountSpeechBroadcastHourResult::CountSpeechBroadcastHourResult() :
|
||||
ServiceResult()
|
||||
{}
|
||||
|
||||
CountSpeechBroadcastHourResult::CountSpeechBroadcastHourResult(const std::string &payload) :
|
||||
ServiceResult()
|
||||
{
|
||||
parse(payload);
|
||||
}
|
||||
|
||||
CountSpeechBroadcastHourResult::~CountSpeechBroadcastHourResult()
|
||||
{}
|
||||
|
||||
void CountSpeechBroadcastHourResult::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::stoi(value["Data"].asString());
|
||||
|
||||
}
|
||||
|
||||
int CountSpeechBroadcastHourResult::getData()const
|
||||
{
|
||||
return data_;
|
||||
}
|
||||
|
||||
std::string CountSpeechBroadcastHourResult::getErrorMessage()const
|
||||
{
|
||||
return errorMessage_;
|
||||
}
|
||||
|
||||
std::string CountSpeechBroadcastHourResult::getCode()const
|
||||
{
|
||||
return code_;
|
||||
}
|
||||
|
||||
bool CountSpeechBroadcastHourResult::getSuccess()const
|
||||
{
|
||||
return success_;
|
||||
}
|
||||
|
||||
@@ -52,6 +52,8 @@ void GetDestinationResult::parse(const std::string &payload)
|
||||
destination_.isFailover = destinationNode["IsFailover"].asString() == "true";
|
||||
if(!destinationNode["UtcCreated"].isNull())
|
||||
destination_.utcCreated = destinationNode["UtcCreated"].asString();
|
||||
if(!destinationNode["Status"].isNull())
|
||||
destination_.status = destinationNode["Status"].asString();
|
||||
if(!value["Success"].isNull())
|
||||
success_ = value["Success"].asString() == "true";
|
||||
if(!value["Code"].isNull())
|
||||
|
||||
@@ -57,6 +57,8 @@ void ListDestinationResult::parse(const std::string &payload)
|
||||
destinationsObject.utcCreated = valueDestinationsdestinationsItem["UtcCreated"].asString();
|
||||
if(!valueDestinationsdestinationsItem["Description"].isNull())
|
||||
destinationsObject.description = valueDestinationsdestinationsItem["Description"].asString();
|
||||
if(!valueDestinationsdestinationsItem["Status"].isNull())
|
||||
destinationsObject.status = valueDestinationsdestinationsItem["Status"].asString();
|
||||
destinations_.push_back(destinationsObject);
|
||||
}
|
||||
if(!value["Success"].isNull())
|
||||
|
||||
@@ -53,6 +53,8 @@ void ListRuleActionsResult::parse(const std::string &payload)
|
||||
ruleActionListObject.configuration = valueRuleActionListRuleActionInfo["Configuration"].asString();
|
||||
if(!valueRuleActionListRuleActionInfo["ErrorActionFlag"].isNull())
|
||||
ruleActionListObject.errorActionFlag = valueRuleActionListRuleActionInfo["ErrorActionFlag"].asString() == "true";
|
||||
if(!valueRuleActionListRuleActionInfo["Status"].isNull())
|
||||
ruleActionListObject.status = valueRuleActionListRuleActionInfo["Status"].asString();
|
||||
ruleActionList_.push_back(ruleActionListObject);
|
||||
}
|
||||
if(!value["Success"].isNull())
|
||||
|
||||
106
iot/src/model/PageQuerySpeechBroadcastHourRequest.cc
Normal file
106
iot/src/model/PageQuerySpeechBroadcastHourRequest.cc
Normal file
@@ -0,0 +1,106 @@
|
||||
/*
|
||||
* 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/PageQuerySpeechBroadcastHourRequest.h>
|
||||
|
||||
using AlibabaCloud::Iot::Model::PageQuerySpeechBroadcastHourRequest;
|
||||
|
||||
PageQuerySpeechBroadcastHourRequest::PageQuerySpeechBroadcastHourRequest() :
|
||||
RpcServiceRequest("iot", "2018-01-20", "PageQuerySpeechBroadcastHour")
|
||||
{
|
||||
setMethod(HttpRequest::Method::Post);
|
||||
}
|
||||
|
||||
PageQuerySpeechBroadcastHourRequest::~PageQuerySpeechBroadcastHourRequest()
|
||||
{}
|
||||
|
||||
std::string PageQuerySpeechBroadcastHourRequest::getQueryDateTimeHour()const
|
||||
{
|
||||
return queryDateTimeHour_;
|
||||
}
|
||||
|
||||
void PageQuerySpeechBroadcastHourRequest::setQueryDateTimeHour(const std::string& queryDateTimeHour)
|
||||
{
|
||||
queryDateTimeHour_ = queryDateTimeHour;
|
||||
setParameter("QueryDateTimeHour", queryDateTimeHour);
|
||||
}
|
||||
|
||||
std::string PageQuerySpeechBroadcastHourRequest::getIotInstanceId()const
|
||||
{
|
||||
return iotInstanceId_;
|
||||
}
|
||||
|
||||
void PageQuerySpeechBroadcastHourRequest::setIotInstanceId(const std::string& iotInstanceId)
|
||||
{
|
||||
iotInstanceId_ = iotInstanceId;
|
||||
setBodyParameter("IotInstanceId", iotInstanceId);
|
||||
}
|
||||
|
||||
int PageQuerySpeechBroadcastHourRequest::getPageSize()const
|
||||
{
|
||||
return pageSize_;
|
||||
}
|
||||
|
||||
void PageQuerySpeechBroadcastHourRequest::setPageSize(int pageSize)
|
||||
{
|
||||
pageSize_ = pageSize;
|
||||
setBodyParameter("PageSize", std::to_string(pageSize));
|
||||
}
|
||||
|
||||
std::string PageQuerySpeechBroadcastHourRequest::getPageToken()const
|
||||
{
|
||||
return pageToken_;
|
||||
}
|
||||
|
||||
void PageQuerySpeechBroadcastHourRequest::setPageToken(const std::string& pageToken)
|
||||
{
|
||||
pageToken_ = pageToken;
|
||||
setBodyParameter("PageToken", pageToken);
|
||||
}
|
||||
|
||||
std::string PageQuerySpeechBroadcastHourRequest::getShareTaskCode()const
|
||||
{
|
||||
return shareTaskCode_;
|
||||
}
|
||||
|
||||
void PageQuerySpeechBroadcastHourRequest::setShareTaskCode(const std::string& shareTaskCode)
|
||||
{
|
||||
shareTaskCode_ = shareTaskCode;
|
||||
setBodyParameter("ShareTaskCode", shareTaskCode);
|
||||
}
|
||||
|
||||
std::string PageQuerySpeechBroadcastHourRequest::getApiProduct()const
|
||||
{
|
||||
return apiProduct_;
|
||||
}
|
||||
|
||||
void PageQuerySpeechBroadcastHourRequest::setApiProduct(const std::string& apiProduct)
|
||||
{
|
||||
apiProduct_ = apiProduct;
|
||||
setBodyParameter("ApiProduct", apiProduct);
|
||||
}
|
||||
|
||||
std::string PageQuerySpeechBroadcastHourRequest::getApiRevision()const
|
||||
{
|
||||
return apiRevision_;
|
||||
}
|
||||
|
||||
void PageQuerySpeechBroadcastHourRequest::setApiRevision(const std::string& apiRevision)
|
||||
{
|
||||
apiRevision_ = apiRevision;
|
||||
setBodyParameter("ApiRevision", apiRevision);
|
||||
}
|
||||
|
||||
101
iot/src/model/PageQuerySpeechBroadcastHourResult.cc
Normal file
101
iot/src/model/PageQuerySpeechBroadcastHourResult.cc
Normal file
@@ -0,0 +1,101 @@
|
||||
/*
|
||||
* 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/PageQuerySpeechBroadcastHourResult.h>
|
||||
#include <json/json.h>
|
||||
|
||||
using namespace AlibabaCloud::Iot;
|
||||
using namespace AlibabaCloud::Iot::Model;
|
||||
|
||||
PageQuerySpeechBroadcastHourResult::PageQuerySpeechBroadcastHourResult() :
|
||||
ServiceResult()
|
||||
{}
|
||||
|
||||
PageQuerySpeechBroadcastHourResult::PageQuerySpeechBroadcastHourResult(const std::string &payload) :
|
||||
ServiceResult()
|
||||
{
|
||||
parse(payload);
|
||||
}
|
||||
|
||||
PageQuerySpeechBroadcastHourResult::~PageQuerySpeechBroadcastHourResult()
|
||||
{}
|
||||
|
||||
void PageQuerySpeechBroadcastHourResult::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["PageId"].isNull())
|
||||
data_.pageId = std::stoi(dataNode["PageId"].asString());
|
||||
if(!dataNode["PageSize"].isNull())
|
||||
data_.pageSize = std::stoi(dataNode["PageSize"].asString());
|
||||
if(!dataNode["Total"].isNull())
|
||||
data_.total = std::stoi(dataNode["Total"].asString());
|
||||
if(!dataNode["PageToken"].isNull())
|
||||
data_.pageToken = dataNode["PageToken"].asString();
|
||||
auto allResultDataNode = dataNode["ResultData"]["Data"];
|
||||
for (auto dataNodeResultDataData : allResultDataNode)
|
||||
{
|
||||
Data::Data1 data1Object;
|
||||
if(!dataNodeResultDataData["ProductKey"].isNull())
|
||||
data1Object.productKey = dataNodeResultDataData["ProductKey"].asString();
|
||||
if(!dataNodeResultDataData["DeviceName"].isNull())
|
||||
data1Object.deviceName = dataNodeResultDataData["DeviceName"].asString();
|
||||
if(!dataNodeResultDataData["ShareTaskCode"].isNull())
|
||||
data1Object.shareTaskCode = dataNodeResultDataData["ShareTaskCode"].asString();
|
||||
if(!dataNodeResultDataData["Speechs"].isNull())
|
||||
data1Object.speechs = dataNodeResultDataData["Speechs"].asString();
|
||||
if(!dataNodeResultDataData["Code"].isNull())
|
||||
data1Object.code = std::stoi(dataNodeResultDataData["Code"].asString());
|
||||
if(!dataNodeResultDataData["Msg"].isNull())
|
||||
data1Object.msg = dataNodeResultDataData["Msg"].asString();
|
||||
if(!dataNodeResultDataData["SpeechId"].isNull())
|
||||
data1Object.speechId = dataNodeResultDataData["SpeechId"].asString();
|
||||
if(!dataNodeResultDataData["StartTime"].isNull())
|
||||
data1Object.startTime = std::stol(dataNodeResultDataData["StartTime"].asString());
|
||||
data_.resultData.push_back(data1Object);
|
||||
}
|
||||
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();
|
||||
|
||||
}
|
||||
|
||||
PageQuerySpeechBroadcastHourResult::Data PageQuerySpeechBroadcastHourResult::getData()const
|
||||
{
|
||||
return data_;
|
||||
}
|
||||
|
||||
std::string PageQuerySpeechBroadcastHourResult::getErrorMessage()const
|
||||
{
|
||||
return errorMessage_;
|
||||
}
|
||||
|
||||
std::string PageQuerySpeechBroadcastHourResult::getCode()const
|
||||
{
|
||||
return code_;
|
||||
}
|
||||
|
||||
bool PageQuerySpeechBroadcastHourResult::getSuccess()const
|
||||
{
|
||||
return success_;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user