Storage open Api.
This commit is contained in:
@@ -9483,6 +9483,78 @@ IotClient::QueryDeviceTunnelOutcomeCallable IotClient::queryDeviceTunnelCallable
|
||||
return task->get_future();
|
||||
}
|
||||
|
||||
IotClient::QueryDevicesHotStorageDataOutcome IotClient::queryDevicesHotStorageData(const QueryDevicesHotStorageDataRequest &request) const
|
||||
{
|
||||
auto endpointOutcome = endpointProvider_->getEndpoint();
|
||||
if (!endpointOutcome.isSuccess())
|
||||
return QueryDevicesHotStorageDataOutcome(endpointOutcome.error());
|
||||
|
||||
auto outcome = makeRequest(endpointOutcome.result(), request);
|
||||
|
||||
if (outcome.isSuccess())
|
||||
return QueryDevicesHotStorageDataOutcome(QueryDevicesHotStorageDataResult(outcome.result()));
|
||||
else
|
||||
return QueryDevicesHotStorageDataOutcome(outcome.error());
|
||||
}
|
||||
|
||||
void IotClient::queryDevicesHotStorageDataAsync(const QueryDevicesHotStorageDataRequest& request, const QueryDevicesHotStorageDataAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context) const
|
||||
{
|
||||
auto fn = [this, request, handler, context]()
|
||||
{
|
||||
handler(this, request, queryDevicesHotStorageData(request), context);
|
||||
};
|
||||
|
||||
asyncExecute(new Runnable(fn));
|
||||
}
|
||||
|
||||
IotClient::QueryDevicesHotStorageDataOutcomeCallable IotClient::queryDevicesHotStorageDataCallable(const QueryDevicesHotStorageDataRequest &request) const
|
||||
{
|
||||
auto task = std::make_shared<std::packaged_task<QueryDevicesHotStorageDataOutcome()>>(
|
||||
[this, request]()
|
||||
{
|
||||
return this->queryDevicesHotStorageData(request);
|
||||
});
|
||||
|
||||
asyncExecute(new Runnable([task]() { (*task)(); }));
|
||||
return task->get_future();
|
||||
}
|
||||
|
||||
IotClient::QueryDevicesHotStorageDataStatusOutcome IotClient::queryDevicesHotStorageDataStatus(const QueryDevicesHotStorageDataStatusRequest &request) const
|
||||
{
|
||||
auto endpointOutcome = endpointProvider_->getEndpoint();
|
||||
if (!endpointOutcome.isSuccess())
|
||||
return QueryDevicesHotStorageDataStatusOutcome(endpointOutcome.error());
|
||||
|
||||
auto outcome = makeRequest(endpointOutcome.result(), request);
|
||||
|
||||
if (outcome.isSuccess())
|
||||
return QueryDevicesHotStorageDataStatusOutcome(QueryDevicesHotStorageDataStatusResult(outcome.result()));
|
||||
else
|
||||
return QueryDevicesHotStorageDataStatusOutcome(outcome.error());
|
||||
}
|
||||
|
||||
void IotClient::queryDevicesHotStorageDataStatusAsync(const QueryDevicesHotStorageDataStatusRequest& request, const QueryDevicesHotStorageDataStatusAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context) const
|
||||
{
|
||||
auto fn = [this, request, handler, context]()
|
||||
{
|
||||
handler(this, request, queryDevicesHotStorageDataStatus(request), context);
|
||||
};
|
||||
|
||||
asyncExecute(new Runnable(fn));
|
||||
}
|
||||
|
||||
IotClient::QueryDevicesHotStorageDataStatusOutcomeCallable IotClient::queryDevicesHotStorageDataStatusCallable(const QueryDevicesHotStorageDataStatusRequest &request) const
|
||||
{
|
||||
auto task = std::make_shared<std::packaged_task<QueryDevicesHotStorageDataStatusOutcome()>>(
|
||||
[this, request]()
|
||||
{
|
||||
return this->queryDevicesHotStorageDataStatus(request);
|
||||
});
|
||||
|
||||
asyncExecute(new Runnable([task]() { (*task)(); }));
|
||||
return task->get_future();
|
||||
}
|
||||
|
||||
IotClient::QueryDynamicGroupDevicesOutcome IotClient::queryDynamicGroupDevices(const QueryDynamicGroupDevicesRequest &request) const
|
||||
{
|
||||
auto endpointOutcome = endpointProvider_->getEndpoint();
|
||||
@@ -14019,3 +14091,39 @@ IotClient::UpdateThingScriptOutcomeCallable IotClient::updateThingScriptCallable
|
||||
return task->get_future();
|
||||
}
|
||||
|
||||
IotClient::WriteDevicesHotStorageDataOutcome IotClient::writeDevicesHotStorageData(const WriteDevicesHotStorageDataRequest &request) const
|
||||
{
|
||||
auto endpointOutcome = endpointProvider_->getEndpoint();
|
||||
if (!endpointOutcome.isSuccess())
|
||||
return WriteDevicesHotStorageDataOutcome(endpointOutcome.error());
|
||||
|
||||
auto outcome = makeRequest(endpointOutcome.result(), request);
|
||||
|
||||
if (outcome.isSuccess())
|
||||
return WriteDevicesHotStorageDataOutcome(WriteDevicesHotStorageDataResult(outcome.result()));
|
||||
else
|
||||
return WriteDevicesHotStorageDataOutcome(outcome.error());
|
||||
}
|
||||
|
||||
void IotClient::writeDevicesHotStorageDataAsync(const WriteDevicesHotStorageDataRequest& request, const WriteDevicesHotStorageDataAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context) const
|
||||
{
|
||||
auto fn = [this, request, handler, context]()
|
||||
{
|
||||
handler(this, request, writeDevicesHotStorageData(request), context);
|
||||
};
|
||||
|
||||
asyncExecute(new Runnable(fn));
|
||||
}
|
||||
|
||||
IotClient::WriteDevicesHotStorageDataOutcomeCallable IotClient::writeDevicesHotStorageDataCallable(const WriteDevicesHotStorageDataRequest &request) const
|
||||
{
|
||||
auto task = std::make_shared<std::packaged_task<WriteDevicesHotStorageDataOutcome()>>(
|
||||
[this, request]()
|
||||
{
|
||||
return this->writeDevicesHotStorageData(request);
|
||||
});
|
||||
|
||||
asyncExecute(new Runnable([task]() { (*task)(); }));
|
||||
return task->get_future();
|
||||
}
|
||||
|
||||
|
||||
@@ -47,6 +47,8 @@ void BatchGetDeviceBindStatusResult::parse(const std::string &payload)
|
||||
dataObject.iotId = valueDataDeviceStatus["IotId"].asString();
|
||||
if(!valueDataDeviceStatus["BindStatus"].isNull())
|
||||
dataObject.bindStatus = std::stoi(valueDataDeviceStatus["BindStatus"].asString());
|
||||
if(!valueDataDeviceStatus["InstanceId"].isNull())
|
||||
dataObject.instanceId = valueDataDeviceStatus["InstanceId"].asString();
|
||||
data_.push_back(dataObject);
|
||||
}
|
||||
if(!value["Success"].isNull())
|
||||
|
||||
194
iot/src/model/QueryDevicesHotStorageDataRequest.cc
Normal file
194
iot/src/model/QueryDevicesHotStorageDataRequest.cc
Normal file
@@ -0,0 +1,194 @@
|
||||
/*
|
||||
* 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/QueryDevicesHotStorageDataRequest.h>
|
||||
|
||||
using AlibabaCloud::Iot::Model::QueryDevicesHotStorageDataRequest;
|
||||
|
||||
QueryDevicesHotStorageDataRequest::QueryDevicesHotStorageDataRequest() :
|
||||
RpcServiceRequest("iot", "2018-01-20", "QueryDevicesHotStorageData")
|
||||
{
|
||||
setMethod(HttpRequest::Method::Post);
|
||||
}
|
||||
|
||||
QueryDevicesHotStorageDataRequest::~QueryDevicesHotStorageDataRequest()
|
||||
{}
|
||||
|
||||
std::string QueryDevicesHotStorageDataRequest::getNextPageToken()const
|
||||
{
|
||||
return nextPageToken_;
|
||||
}
|
||||
|
||||
void QueryDevicesHotStorageDataRequest::setNextPageToken(const std::string& nextPageToken)
|
||||
{
|
||||
nextPageToken_ = nextPageToken;
|
||||
setParameter("NextPageToken", nextPageToken);
|
||||
}
|
||||
|
||||
std::string QueryDevicesHotStorageDataRequest::getRealTenantId()const
|
||||
{
|
||||
return realTenantId_;
|
||||
}
|
||||
|
||||
void QueryDevicesHotStorageDataRequest::setRealTenantId(const std::string& realTenantId)
|
||||
{
|
||||
realTenantId_ = realTenantId;
|
||||
setParameter("RealTenantId", realTenantId);
|
||||
}
|
||||
|
||||
long QueryDevicesHotStorageDataRequest::getStartTime()const
|
||||
{
|
||||
return startTime_;
|
||||
}
|
||||
|
||||
void QueryDevicesHotStorageDataRequest::setStartTime(long startTime)
|
||||
{
|
||||
startTime_ = startTime;
|
||||
setParameter("StartTime", std::to_string(startTime));
|
||||
}
|
||||
|
||||
std::string QueryDevicesHotStorageDataRequest::getRealTripartiteKey()const
|
||||
{
|
||||
return realTripartiteKey_;
|
||||
}
|
||||
|
||||
void QueryDevicesHotStorageDataRequest::setRealTripartiteKey(const std::string& realTripartiteKey)
|
||||
{
|
||||
realTripartiteKey_ = realTripartiteKey;
|
||||
setParameter("RealTripartiteKey", realTripartiteKey);
|
||||
}
|
||||
|
||||
std::string QueryDevicesHotStorageDataRequest::getIotId()const
|
||||
{
|
||||
return iotId_;
|
||||
}
|
||||
|
||||
void QueryDevicesHotStorageDataRequest::setIotId(const std::string& iotId)
|
||||
{
|
||||
iotId_ = iotId;
|
||||
setParameter("IotId", iotId);
|
||||
}
|
||||
|
||||
std::string QueryDevicesHotStorageDataRequest::getIotInstanceId()const
|
||||
{
|
||||
return iotInstanceId_;
|
||||
}
|
||||
|
||||
void QueryDevicesHotStorageDataRequest::setIotInstanceId(const std::string& iotInstanceId)
|
||||
{
|
||||
iotInstanceId_ = iotInstanceId;
|
||||
setParameter("IotInstanceId", iotInstanceId);
|
||||
}
|
||||
|
||||
int QueryDevicesHotStorageDataRequest::getPageSize()const
|
||||
{
|
||||
return pageSize_;
|
||||
}
|
||||
|
||||
void QueryDevicesHotStorageDataRequest::setPageSize(int pageSize)
|
||||
{
|
||||
pageSize_ = pageSize;
|
||||
setParameter("PageSize", std::to_string(pageSize));
|
||||
}
|
||||
|
||||
std::string QueryDevicesHotStorageDataRequest::getIdentifier()const
|
||||
{
|
||||
return identifier_;
|
||||
}
|
||||
|
||||
void QueryDevicesHotStorageDataRequest::setIdentifier(const std::string& identifier)
|
||||
{
|
||||
identifier_ = identifier;
|
||||
setParameter("Identifier", identifier);
|
||||
}
|
||||
|
||||
std::string QueryDevicesHotStorageDataRequest::getUserTopic()const
|
||||
{
|
||||
return userTopic_;
|
||||
}
|
||||
|
||||
void QueryDevicesHotStorageDataRequest::setUserTopic(const std::string& userTopic)
|
||||
{
|
||||
userTopic_ = userTopic;
|
||||
setParameter("UserTopic", userTopic);
|
||||
}
|
||||
|
||||
long QueryDevicesHotStorageDataRequest::getEndTime()const
|
||||
{
|
||||
return endTime_;
|
||||
}
|
||||
|
||||
void QueryDevicesHotStorageDataRequest::setEndTime(long endTime)
|
||||
{
|
||||
endTime_ = endTime;
|
||||
setParameter("EndTime", std::to_string(endTime));
|
||||
}
|
||||
|
||||
std::string QueryDevicesHotStorageDataRequest::getProductKey()const
|
||||
{
|
||||
return productKey_;
|
||||
}
|
||||
|
||||
void QueryDevicesHotStorageDataRequest::setProductKey(const std::string& productKey)
|
||||
{
|
||||
productKey_ = productKey;
|
||||
setParameter("ProductKey", productKey);
|
||||
}
|
||||
|
||||
int QueryDevicesHotStorageDataRequest::getAsc()const
|
||||
{
|
||||
return asc_;
|
||||
}
|
||||
|
||||
void QueryDevicesHotStorageDataRequest::setAsc(int asc)
|
||||
{
|
||||
asc_ = asc;
|
||||
setParameter("Asc", std::to_string(asc));
|
||||
}
|
||||
|
||||
std::string QueryDevicesHotStorageDataRequest::getApiProduct()const
|
||||
{
|
||||
return apiProduct_;
|
||||
}
|
||||
|
||||
void QueryDevicesHotStorageDataRequest::setApiProduct(const std::string& apiProduct)
|
||||
{
|
||||
apiProduct_ = apiProduct;
|
||||
setBodyParameter("ApiProduct", apiProduct);
|
||||
}
|
||||
|
||||
std::string QueryDevicesHotStorageDataRequest::getApiRevision()const
|
||||
{
|
||||
return apiRevision_;
|
||||
}
|
||||
|
||||
void QueryDevicesHotStorageDataRequest::setApiRevision(const std::string& apiRevision)
|
||||
{
|
||||
apiRevision_ = apiRevision;
|
||||
setBodyParameter("ApiRevision", apiRevision);
|
||||
}
|
||||
|
||||
std::string QueryDevicesHotStorageDataRequest::getDeviceName()const
|
||||
{
|
||||
return deviceName_;
|
||||
}
|
||||
|
||||
void QueryDevicesHotStorageDataRequest::setDeviceName(const std::string& deviceName)
|
||||
{
|
||||
deviceName_ = deviceName;
|
||||
setParameter("DeviceName", deviceName);
|
||||
}
|
||||
|
||||
85
iot/src/model/QueryDevicesHotStorageDataResult.cc
Normal file
85
iot/src/model/QueryDevicesHotStorageDataResult.cc
Normal file
@@ -0,0 +1,85 @@
|
||||
/*
|
||||
* 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/QueryDevicesHotStorageDataResult.h>
|
||||
#include <json/json.h>
|
||||
|
||||
using namespace AlibabaCloud::Iot;
|
||||
using namespace AlibabaCloud::Iot::Model;
|
||||
|
||||
QueryDevicesHotStorageDataResult::QueryDevicesHotStorageDataResult() :
|
||||
ServiceResult()
|
||||
{}
|
||||
|
||||
QueryDevicesHotStorageDataResult::QueryDevicesHotStorageDataResult(const std::string &payload) :
|
||||
ServiceResult()
|
||||
{
|
||||
parse(payload);
|
||||
}
|
||||
|
||||
QueryDevicesHotStorageDataResult::~QueryDevicesHotStorageDataResult()
|
||||
{}
|
||||
|
||||
void QueryDevicesHotStorageDataResult::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["NextValid"].isNull())
|
||||
data_.nextValid = dataNode["NextValid"].asString() == "true";
|
||||
if(!dataNode["nextPageToken"].isNull())
|
||||
data_.nextPageToken = dataNode["nextPageToken"].asString();
|
||||
auto allListNode = dataNode["List"]["PropertyInfo"];
|
||||
for (auto dataNodeListPropertyInfo : allListNode)
|
||||
{
|
||||
Data::PropertyInfo propertyInfoObject;
|
||||
if(!dataNodeListPropertyInfo["Time"].isNull())
|
||||
propertyInfoObject.time = dataNodeListPropertyInfo["Time"].asString();
|
||||
if(!dataNodeListPropertyInfo["Value"].isNull())
|
||||
propertyInfoObject.value = dataNodeListPropertyInfo["Value"].asString();
|
||||
data_.list.push_back(propertyInfoObject);
|
||||
}
|
||||
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();
|
||||
|
||||
}
|
||||
|
||||
QueryDevicesHotStorageDataResult::Data QueryDevicesHotStorageDataResult::getData()const
|
||||
{
|
||||
return data_;
|
||||
}
|
||||
|
||||
std::string QueryDevicesHotStorageDataResult::getErrorMessage()const
|
||||
{
|
||||
return errorMessage_;
|
||||
}
|
||||
|
||||
std::string QueryDevicesHotStorageDataResult::getCode()const
|
||||
{
|
||||
return code_;
|
||||
}
|
||||
|
||||
bool QueryDevicesHotStorageDataResult::getSuccess()const
|
||||
{
|
||||
return success_;
|
||||
}
|
||||
|
||||
161
iot/src/model/QueryDevicesHotStorageDataStatusRequest.cc
Normal file
161
iot/src/model/QueryDevicesHotStorageDataStatusRequest.cc
Normal file
@@ -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 <alibabacloud/iot/model/QueryDevicesHotStorageDataStatusRequest.h>
|
||||
|
||||
using AlibabaCloud::Iot::Model::QueryDevicesHotStorageDataStatusRequest;
|
||||
|
||||
QueryDevicesHotStorageDataStatusRequest::QueryDevicesHotStorageDataStatusRequest() :
|
||||
RpcServiceRequest("iot", "2018-01-20", "QueryDevicesHotStorageDataStatus")
|
||||
{
|
||||
setMethod(HttpRequest::Method::Post);
|
||||
}
|
||||
|
||||
QueryDevicesHotStorageDataStatusRequest::~QueryDevicesHotStorageDataStatusRequest()
|
||||
{}
|
||||
|
||||
std::string QueryDevicesHotStorageDataStatusRequest::getNextPageToken()const
|
||||
{
|
||||
return nextPageToken_;
|
||||
}
|
||||
|
||||
void QueryDevicesHotStorageDataStatusRequest::setNextPageToken(const std::string& nextPageToken)
|
||||
{
|
||||
nextPageToken_ = nextPageToken;
|
||||
setParameter("NextPageToken", nextPageToken);
|
||||
}
|
||||
|
||||
std::string QueryDevicesHotStorageDataStatusRequest::getRealTenantId()const
|
||||
{
|
||||
return realTenantId_;
|
||||
}
|
||||
|
||||
void QueryDevicesHotStorageDataStatusRequest::setRealTenantId(const std::string& realTenantId)
|
||||
{
|
||||
realTenantId_ = realTenantId;
|
||||
setParameter("RealTenantId", realTenantId);
|
||||
}
|
||||
|
||||
std::string QueryDevicesHotStorageDataStatusRequest::getRealTripartiteKey()const
|
||||
{
|
||||
return realTripartiteKey_;
|
||||
}
|
||||
|
||||
void QueryDevicesHotStorageDataStatusRequest::setRealTripartiteKey(const std::string& realTripartiteKey)
|
||||
{
|
||||
realTripartiteKey_ = realTripartiteKey;
|
||||
setParameter("RealTripartiteKey", realTripartiteKey);
|
||||
}
|
||||
|
||||
std::string QueryDevicesHotStorageDataStatusRequest::getIotId()const
|
||||
{
|
||||
return iotId_;
|
||||
}
|
||||
|
||||
void QueryDevicesHotStorageDataStatusRequest::setIotId(const std::string& iotId)
|
||||
{
|
||||
iotId_ = iotId;
|
||||
setParameter("IotId", iotId);
|
||||
}
|
||||
|
||||
std::string QueryDevicesHotStorageDataStatusRequest::getIotInstanceId()const
|
||||
{
|
||||
return iotInstanceId_;
|
||||
}
|
||||
|
||||
void QueryDevicesHotStorageDataStatusRequest::setIotInstanceId(const std::string& iotInstanceId)
|
||||
{
|
||||
iotInstanceId_ = iotInstanceId;
|
||||
setParameter("IotInstanceId", iotInstanceId);
|
||||
}
|
||||
|
||||
int QueryDevicesHotStorageDataStatusRequest::getPageSize()const
|
||||
{
|
||||
return pageSize_;
|
||||
}
|
||||
|
||||
void QueryDevicesHotStorageDataStatusRequest::setPageSize(int pageSize)
|
||||
{
|
||||
pageSize_ = pageSize;
|
||||
setParameter("PageSize", std::to_string(pageSize));
|
||||
}
|
||||
|
||||
std::string QueryDevicesHotStorageDataStatusRequest::getUserTopic()const
|
||||
{
|
||||
return userTopic_;
|
||||
}
|
||||
|
||||
void QueryDevicesHotStorageDataStatusRequest::setUserTopic(const std::string& userTopic)
|
||||
{
|
||||
userTopic_ = userTopic;
|
||||
setParameter("UserTopic", userTopic);
|
||||
}
|
||||
|
||||
std::string QueryDevicesHotStorageDataStatusRequest::getProductKey()const
|
||||
{
|
||||
return productKey_;
|
||||
}
|
||||
|
||||
void QueryDevicesHotStorageDataStatusRequest::setProductKey(const std::string& productKey)
|
||||
{
|
||||
productKey_ = productKey;
|
||||
setParameter("ProductKey", productKey);
|
||||
}
|
||||
|
||||
int QueryDevicesHotStorageDataStatusRequest::getAsc()const
|
||||
{
|
||||
return asc_;
|
||||
}
|
||||
|
||||
void QueryDevicesHotStorageDataStatusRequest::setAsc(int asc)
|
||||
{
|
||||
asc_ = asc;
|
||||
setParameter("Asc", std::to_string(asc));
|
||||
}
|
||||
|
||||
std::string QueryDevicesHotStorageDataStatusRequest::getApiProduct()const
|
||||
{
|
||||
return apiProduct_;
|
||||
}
|
||||
|
||||
void QueryDevicesHotStorageDataStatusRequest::setApiProduct(const std::string& apiProduct)
|
||||
{
|
||||
apiProduct_ = apiProduct;
|
||||
setBodyParameter("ApiProduct", apiProduct);
|
||||
}
|
||||
|
||||
std::string QueryDevicesHotStorageDataStatusRequest::getApiRevision()const
|
||||
{
|
||||
return apiRevision_;
|
||||
}
|
||||
|
||||
void QueryDevicesHotStorageDataStatusRequest::setApiRevision(const std::string& apiRevision)
|
||||
{
|
||||
apiRevision_ = apiRevision;
|
||||
setBodyParameter("ApiRevision", apiRevision);
|
||||
}
|
||||
|
||||
std::string QueryDevicesHotStorageDataStatusRequest::getDeviceName()const
|
||||
{
|
||||
return deviceName_;
|
||||
}
|
||||
|
||||
void QueryDevicesHotStorageDataStatusRequest::setDeviceName(const std::string& deviceName)
|
||||
{
|
||||
deviceName_ = deviceName;
|
||||
setParameter("DeviceName", deviceName);
|
||||
}
|
||||
|
||||
87
iot/src/model/QueryDevicesHotStorageDataStatusResult.cc
Normal file
87
iot/src/model/QueryDevicesHotStorageDataStatusResult.cc
Normal file
@@ -0,0 +1,87 @@
|
||||
/*
|
||||
* 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/QueryDevicesHotStorageDataStatusResult.h>
|
||||
#include <json/json.h>
|
||||
|
||||
using namespace AlibabaCloud::Iot;
|
||||
using namespace AlibabaCloud::Iot::Model;
|
||||
|
||||
QueryDevicesHotStorageDataStatusResult::QueryDevicesHotStorageDataStatusResult() :
|
||||
ServiceResult()
|
||||
{}
|
||||
|
||||
QueryDevicesHotStorageDataStatusResult::QueryDevicesHotStorageDataStatusResult(const std::string &payload) :
|
||||
ServiceResult()
|
||||
{
|
||||
parse(payload);
|
||||
}
|
||||
|
||||
QueryDevicesHotStorageDataStatusResult::~QueryDevicesHotStorageDataStatusResult()
|
||||
{}
|
||||
|
||||
void QueryDevicesHotStorageDataStatusResult::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["NextValid"].isNull())
|
||||
data_.nextValid = dataNode["NextValid"].asString() == "true";
|
||||
if(!dataNode["NextPageToken"].isNull())
|
||||
data_.nextPageToken = dataNode["NextPageToken"].asString();
|
||||
auto allListNode = dataNode["List"]["PropertyStatusDataInfo"];
|
||||
for (auto dataNodeListPropertyStatusDataInfo : allListNode)
|
||||
{
|
||||
Data::PropertyStatusDataInfo propertyStatusDataInfoObject;
|
||||
if(!dataNodeListPropertyStatusDataInfo["Identifier"].isNull())
|
||||
propertyStatusDataInfoObject.identifier = dataNodeListPropertyStatusDataInfo["Identifier"].asString();
|
||||
if(!dataNodeListPropertyStatusDataInfo["Value"].isNull())
|
||||
propertyStatusDataInfoObject.value = dataNodeListPropertyStatusDataInfo["Value"].asString();
|
||||
if(!dataNodeListPropertyStatusDataInfo["Time"].isNull())
|
||||
propertyStatusDataInfoObject.time = std::stol(dataNodeListPropertyStatusDataInfo["Time"].asString());
|
||||
data_.list.push_back(propertyStatusDataInfoObject);
|
||||
}
|
||||
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();
|
||||
|
||||
}
|
||||
|
||||
QueryDevicesHotStorageDataStatusResult::Data QueryDevicesHotStorageDataStatusResult::getData()const
|
||||
{
|
||||
return data_;
|
||||
}
|
||||
|
||||
std::string QueryDevicesHotStorageDataStatusResult::getErrorMessage()const
|
||||
{
|
||||
return errorMessage_;
|
||||
}
|
||||
|
||||
std::string QueryDevicesHotStorageDataStatusResult::getCode()const
|
||||
{
|
||||
return code_;
|
||||
}
|
||||
|
||||
bool QueryDevicesHotStorageDataStatusResult::getSuccess()const
|
||||
{
|
||||
return success_;
|
||||
}
|
||||
|
||||
150
iot/src/model/WriteDevicesHotStorageDataRequest.cc
Normal file
150
iot/src/model/WriteDevicesHotStorageDataRequest.cc
Normal file
@@ -0,0 +1,150 @@
|
||||
/*
|
||||
* 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/WriteDevicesHotStorageDataRequest.h>
|
||||
|
||||
using AlibabaCloud::Iot::Model::WriteDevicesHotStorageDataRequest;
|
||||
|
||||
WriteDevicesHotStorageDataRequest::WriteDevicesHotStorageDataRequest() :
|
||||
RpcServiceRequest("iot", "2018-01-20", "WriteDevicesHotStorageData")
|
||||
{
|
||||
setMethod(HttpRequest::Method::Post);
|
||||
}
|
||||
|
||||
WriteDevicesHotStorageDataRequest::~WriteDevicesHotStorageDataRequest()
|
||||
{}
|
||||
|
||||
std::string WriteDevicesHotStorageDataRequest::getRealTenantId()const
|
||||
{
|
||||
return realTenantId_;
|
||||
}
|
||||
|
||||
void WriteDevicesHotStorageDataRequest::setRealTenantId(const std::string& realTenantId)
|
||||
{
|
||||
realTenantId_ = realTenantId;
|
||||
setParameter("RealTenantId", realTenantId);
|
||||
}
|
||||
|
||||
std::string WriteDevicesHotStorageDataRequest::getAccessKeyId()const
|
||||
{
|
||||
return accessKeyId_;
|
||||
}
|
||||
|
||||
void WriteDevicesHotStorageDataRequest::setAccessKeyId(const std::string& accessKeyId)
|
||||
{
|
||||
accessKeyId_ = accessKeyId;
|
||||
setParameter("AccessKeyId", accessKeyId);
|
||||
}
|
||||
|
||||
std::string WriteDevicesHotStorageDataRequest::getRealTripartiteKey()const
|
||||
{
|
||||
return realTripartiteKey_;
|
||||
}
|
||||
|
||||
void WriteDevicesHotStorageDataRequest::setRealTripartiteKey(const std::string& realTripartiteKey)
|
||||
{
|
||||
realTripartiteKey_ = realTripartiteKey;
|
||||
setParameter("RealTripartiteKey", realTripartiteKey);
|
||||
}
|
||||
|
||||
std::string WriteDevicesHotStorageDataRequest::getIotId()const
|
||||
{
|
||||
return iotId_;
|
||||
}
|
||||
|
||||
void WriteDevicesHotStorageDataRequest::setIotId(const std::string& iotId)
|
||||
{
|
||||
iotId_ = iotId;
|
||||
setParameter("IotId", iotId);
|
||||
}
|
||||
|
||||
std::string WriteDevicesHotStorageDataRequest::getIotInstanceId()const
|
||||
{
|
||||
return iotInstanceId_;
|
||||
}
|
||||
|
||||
void WriteDevicesHotStorageDataRequest::setIotInstanceId(const std::string& iotInstanceId)
|
||||
{
|
||||
iotInstanceId_ = iotInstanceId;
|
||||
setParameter("IotInstanceId", iotInstanceId);
|
||||
}
|
||||
|
||||
std::string WriteDevicesHotStorageDataRequest::getUserTopic()const
|
||||
{
|
||||
return userTopic_;
|
||||
}
|
||||
|
||||
void WriteDevicesHotStorageDataRequest::setUserTopic(const std::string& userTopic)
|
||||
{
|
||||
userTopic_ = userTopic;
|
||||
setParameter("UserTopic", userTopic);
|
||||
}
|
||||
|
||||
std::string WriteDevicesHotStorageDataRequest::getProductKey()const
|
||||
{
|
||||
return productKey_;
|
||||
}
|
||||
|
||||
void WriteDevicesHotStorageDataRequest::setProductKey(const std::string& productKey)
|
||||
{
|
||||
productKey_ = productKey;
|
||||
setParameter("ProductKey", productKey);
|
||||
}
|
||||
|
||||
std::string WriteDevicesHotStorageDataRequest::getApiProduct()const
|
||||
{
|
||||
return apiProduct_;
|
||||
}
|
||||
|
||||
void WriteDevicesHotStorageDataRequest::setApiProduct(const std::string& apiProduct)
|
||||
{
|
||||
apiProduct_ = apiProduct;
|
||||
setBodyParameter("ApiProduct", apiProduct);
|
||||
}
|
||||
|
||||
std::string WriteDevicesHotStorageDataRequest::getApiRevision()const
|
||||
{
|
||||
return apiRevision_;
|
||||
}
|
||||
|
||||
void WriteDevicesHotStorageDataRequest::setApiRevision(const std::string& apiRevision)
|
||||
{
|
||||
apiRevision_ = apiRevision;
|
||||
setBodyParameter("ApiRevision", apiRevision);
|
||||
}
|
||||
|
||||
std::string WriteDevicesHotStorageDataRequest::getDeviceName()const
|
||||
{
|
||||
return deviceName_;
|
||||
}
|
||||
|
||||
void WriteDevicesHotStorageDataRequest::setDeviceName(const std::string& deviceName)
|
||||
{
|
||||
deviceName_ = deviceName;
|
||||
setParameter("DeviceName", deviceName);
|
||||
}
|
||||
|
||||
std::string WriteDevicesHotStorageDataRequest::getItems()const
|
||||
{
|
||||
return items_;
|
||||
}
|
||||
|
||||
void WriteDevicesHotStorageDataRequest::setItems(const std::string& items)
|
||||
{
|
||||
items_ = items;
|
||||
setParameter("Items", items);
|
||||
}
|
||||
|
||||
65
iot/src/model/WriteDevicesHotStorageDataResult.cc
Normal file
65
iot/src/model/WriteDevicesHotStorageDataResult.cc
Normal file
@@ -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 <alibabacloud/iot/model/WriteDevicesHotStorageDataResult.h>
|
||||
#include <json/json.h>
|
||||
|
||||
using namespace AlibabaCloud::Iot;
|
||||
using namespace AlibabaCloud::Iot::Model;
|
||||
|
||||
WriteDevicesHotStorageDataResult::WriteDevicesHotStorageDataResult() :
|
||||
ServiceResult()
|
||||
{}
|
||||
|
||||
WriteDevicesHotStorageDataResult::WriteDevicesHotStorageDataResult(const std::string &payload) :
|
||||
ServiceResult()
|
||||
{
|
||||
parse(payload);
|
||||
}
|
||||
|
||||
WriteDevicesHotStorageDataResult::~WriteDevicesHotStorageDataResult()
|
||||
{}
|
||||
|
||||
void WriteDevicesHotStorageDataResult::parse(const std::string &payload)
|
||||
{
|
||||
Json::Reader reader;
|
||||
Json::Value value;
|
||||
reader.parse(payload, value);
|
||||
setRequestId(value["RequestId"].asString());
|
||||
if(!value["Success"].isNull())
|
||||
success_ = value["Success"].asString() == "true";
|
||||
if(!value["ErrorMessage"].isNull())
|
||||
errorMessage_ = value["ErrorMessage"].asString();
|
||||
if(!value["Code"].isNull())
|
||||
code_ = value["Code"].asString();
|
||||
|
||||
}
|
||||
|
||||
std::string WriteDevicesHotStorageDataResult::getErrorMessage()const
|
||||
{
|
||||
return errorMessage_;
|
||||
}
|
||||
|
||||
std::string WriteDevicesHotStorageDataResult::getCode()const
|
||||
{
|
||||
return code_;
|
||||
}
|
||||
|
||||
bool WriteDevicesHotStorageDataResult::getSuccess()const
|
||||
{
|
||||
return success_;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user