IOT SDK Auto Released By cheyun.lxf,Version:1.27.8

Signed-off-by: yixiong.jxy <yixiong.jxy@alibaba-inc.com>
This commit is contained in:
yixiong.jxy
2018-10-13 08:17:43 +08:00
parent ccec5843c8
commit 1a86503742
45 changed files with 2786 additions and 1 deletions

View File

@@ -123,6 +123,42 @@ IotClient::DeleteTopicRouteTableOutcomeCallable IotClient::deleteTopicRouteTable
return task->get_future();
}
IotClient::QueryDeviceGroupListOutcome IotClient::queryDeviceGroupList(const QueryDeviceGroupListRequest &request) const
{
auto endpointOutcome = endpointProvider_->getEndpoint();
if (!endpointOutcome.isSuccess())
return QueryDeviceGroupListOutcome(endpointOutcome.error());
auto outcome = makeRequest(endpointOutcome.result(), request);
if (outcome.isSuccess())
return QueryDeviceGroupListOutcome(QueryDeviceGroupListResult(outcome.result()));
else
return QueryDeviceGroupListOutcome(outcome.error());
}
void IotClient::queryDeviceGroupListAsync(const QueryDeviceGroupListRequest& request, const QueryDeviceGroupListAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context) const
{
auto fn = [this, request, handler, context]()
{
handler(this, request, queryDeviceGroupList(request), context);
};
asyncExecute(new Runnable(fn));
}
IotClient::QueryDeviceGroupListOutcomeCallable IotClient::queryDeviceGroupListCallable(const QueryDeviceGroupListRequest &request) const
{
auto task = std::make_shared<std::packaged_task<QueryDeviceGroupListOutcome()>>(
[this, request]()
{
return this->queryDeviceGroupList(request);
});
asyncExecute(new Runnable([task]() { (*task)(); }));
return task->get_future();
}
IotClient::QueryDeviceEventDataOutcome IotClient::queryDeviceEventData(const QueryDeviceEventDataRequest &request) const
{
auto endpointOutcome = endpointProvider_->getEndpoint();
@@ -231,6 +267,42 @@ IotClient::DeleteDeviceOutcomeCallable IotClient::deleteDeviceCallable(const Del
return task->get_future();
}
IotClient::CreateDeviceGroupOutcome IotClient::createDeviceGroup(const CreateDeviceGroupRequest &request) const
{
auto endpointOutcome = endpointProvider_->getEndpoint();
if (!endpointOutcome.isSuccess())
return CreateDeviceGroupOutcome(endpointOutcome.error());
auto outcome = makeRequest(endpointOutcome.result(), request);
if (outcome.isSuccess())
return CreateDeviceGroupOutcome(CreateDeviceGroupResult(outcome.result()));
else
return CreateDeviceGroupOutcome(outcome.error());
}
void IotClient::createDeviceGroupAsync(const CreateDeviceGroupRequest& request, const CreateDeviceGroupAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context) const
{
auto fn = [this, request, handler, context]()
{
handler(this, request, createDeviceGroup(request), context);
};
asyncExecute(new Runnable(fn));
}
IotClient::CreateDeviceGroupOutcomeCallable IotClient::createDeviceGroupCallable(const CreateDeviceGroupRequest &request) const
{
auto task = std::make_shared<std::packaged_task<CreateDeviceGroupOutcome()>>(
[this, request]()
{
return this->createDeviceGroup(request);
});
asyncExecute(new Runnable([task]() { (*task)(); }));
return task->get_future();
}
IotClient::EnableThingOutcome IotClient::enableThing(const EnableThingRequest &request) const
{
auto endpointOutcome = endpointProvider_->getEndpoint();
@@ -447,6 +519,42 @@ IotClient::QueryPageByApplyIdOutcomeCallable IotClient::queryPageByApplyIdCallab
return task->get_future();
}
IotClient::ForceSetDeviceGroupTagOutcome IotClient::forceSetDeviceGroupTag(const ForceSetDeviceGroupTagRequest &request) const
{
auto endpointOutcome = endpointProvider_->getEndpoint();
if (!endpointOutcome.isSuccess())
return ForceSetDeviceGroupTagOutcome(endpointOutcome.error());
auto outcome = makeRequest(endpointOutcome.result(), request);
if (outcome.isSuccess())
return ForceSetDeviceGroupTagOutcome(ForceSetDeviceGroupTagResult(outcome.result()));
else
return ForceSetDeviceGroupTagOutcome(outcome.error());
}
void IotClient::forceSetDeviceGroupTagAsync(const ForceSetDeviceGroupTagRequest& request, const ForceSetDeviceGroupTagAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context) const
{
auto fn = [this, request, handler, context]()
{
handler(this, request, forceSetDeviceGroupTag(request), context);
};
asyncExecute(new Runnable(fn));
}
IotClient::ForceSetDeviceGroupTagOutcomeCallable IotClient::forceSetDeviceGroupTagCallable(const ForceSetDeviceGroupTagRequest &request) const
{
auto task = std::make_shared<std::packaged_task<ForceSetDeviceGroupTagOutcome()>>(
[this, request]()
{
return this->forceSetDeviceGroupTag(request);
});
asyncExecute(new Runnable([task]() { (*task)(); }));
return task->get_future();
}
IotClient::CreateTopicRouteTableOutcome IotClient::createTopicRouteTable(const CreateTopicRouteTableRequest &request) const
{
auto endpointOutcome = endpointProvider_->getEndpoint();
@@ -591,6 +699,78 @@ IotClient::QueryDevicePropertyDataOutcomeCallable IotClient::queryDeviceProperty
return task->get_future();
}
IotClient::UpdateDeviceGroupOutcome IotClient::updateDeviceGroup(const UpdateDeviceGroupRequest &request) const
{
auto endpointOutcome = endpointProvider_->getEndpoint();
if (!endpointOutcome.isSuccess())
return UpdateDeviceGroupOutcome(endpointOutcome.error());
auto outcome = makeRequest(endpointOutcome.result(), request);
if (outcome.isSuccess())
return UpdateDeviceGroupOutcome(UpdateDeviceGroupResult(outcome.result()));
else
return UpdateDeviceGroupOutcome(outcome.error());
}
void IotClient::updateDeviceGroupAsync(const UpdateDeviceGroupRequest& request, const UpdateDeviceGroupAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context) const
{
auto fn = [this, request, handler, context]()
{
handler(this, request, updateDeviceGroup(request), context);
};
asyncExecute(new Runnable(fn));
}
IotClient::UpdateDeviceGroupOutcomeCallable IotClient::updateDeviceGroupCallable(const UpdateDeviceGroupRequest &request) const
{
auto task = std::make_shared<std::packaged_task<UpdateDeviceGroupOutcome()>>(
[this, request]()
{
return this->updateDeviceGroup(request);
});
asyncExecute(new Runnable([task]() { (*task)(); }));
return task->get_future();
}
IotClient::DeleteDeviceGroupOutcome IotClient::deleteDeviceGroup(const DeleteDeviceGroupRequest &request) const
{
auto endpointOutcome = endpointProvider_->getEndpoint();
if (!endpointOutcome.isSuccess())
return DeleteDeviceGroupOutcome(endpointOutcome.error());
auto outcome = makeRequest(endpointOutcome.result(), request);
if (outcome.isSuccess())
return DeleteDeviceGroupOutcome(DeleteDeviceGroupResult(outcome.result()));
else
return DeleteDeviceGroupOutcome(outcome.error());
}
void IotClient::deleteDeviceGroupAsync(const DeleteDeviceGroupRequest& request, const DeleteDeviceGroupAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context) const
{
auto fn = [this, request, handler, context]()
{
handler(this, request, deleteDeviceGroup(request), context);
};
asyncExecute(new Runnable(fn));
}
IotClient::DeleteDeviceGroupOutcomeCallable IotClient::deleteDeviceGroupCallable(const DeleteDeviceGroupRequest &request) const
{
auto task = std::make_shared<std::packaged_task<DeleteDeviceGroupOutcome()>>(
[this, request]()
{
return this->deleteDeviceGroup(request);
});
asyncExecute(new Runnable([task]() { (*task)(); }));
return task->get_future();
}
IotClient::QueryDevicePropOutcome IotClient::queryDeviceProp(const QueryDevicePropRequest &request) const
{
auto endpointOutcome = endpointProvider_->getEndpoint();
@@ -1239,6 +1419,78 @@ IotClient::QueryDeviceOutcomeCallable IotClient::queryDeviceCallable(const Query
return task->get_future();
}
IotClient::BatchDeleteDeviceGroupRelationsOutcome IotClient::batchDeleteDeviceGroupRelations(const BatchDeleteDeviceGroupRelationsRequest &request) const
{
auto endpointOutcome = endpointProvider_->getEndpoint();
if (!endpointOutcome.isSuccess())
return BatchDeleteDeviceGroupRelationsOutcome(endpointOutcome.error());
auto outcome = makeRequest(endpointOutcome.result(), request);
if (outcome.isSuccess())
return BatchDeleteDeviceGroupRelationsOutcome(BatchDeleteDeviceGroupRelationsResult(outcome.result()));
else
return BatchDeleteDeviceGroupRelationsOutcome(outcome.error());
}
void IotClient::batchDeleteDeviceGroupRelationsAsync(const BatchDeleteDeviceGroupRelationsRequest& request, const BatchDeleteDeviceGroupRelationsAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context) const
{
auto fn = [this, request, handler, context]()
{
handler(this, request, batchDeleteDeviceGroupRelations(request), context);
};
asyncExecute(new Runnable(fn));
}
IotClient::BatchDeleteDeviceGroupRelationsOutcomeCallable IotClient::batchDeleteDeviceGroupRelationsCallable(const BatchDeleteDeviceGroupRelationsRequest &request) const
{
auto task = std::make_shared<std::packaged_task<BatchDeleteDeviceGroupRelationsOutcome()>>(
[this, request]()
{
return this->batchDeleteDeviceGroupRelations(request);
});
asyncExecute(new Runnable([task]() { (*task)(); }));
return task->get_future();
}
IotClient::QueryDeviceGroupTagListOutcome IotClient::queryDeviceGroupTagList(const QueryDeviceGroupTagListRequest &request) const
{
auto endpointOutcome = endpointProvider_->getEndpoint();
if (!endpointOutcome.isSuccess())
return QueryDeviceGroupTagListOutcome(endpointOutcome.error());
auto outcome = makeRequest(endpointOutcome.result(), request);
if (outcome.isSuccess())
return QueryDeviceGroupTagListOutcome(QueryDeviceGroupTagListResult(outcome.result()));
else
return QueryDeviceGroupTagListOutcome(outcome.error());
}
void IotClient::queryDeviceGroupTagListAsync(const QueryDeviceGroupTagListRequest& request, const QueryDeviceGroupTagListAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context) const
{
auto fn = [this, request, handler, context]()
{
handler(this, request, queryDeviceGroupTagList(request), context);
};
asyncExecute(new Runnable(fn));
}
IotClient::QueryDeviceGroupTagListOutcomeCallable IotClient::queryDeviceGroupTagListCallable(const QueryDeviceGroupTagListRequest &request) const
{
auto task = std::make_shared<std::packaged_task<QueryDeviceGroupTagListOutcome()>>(
[this, request]()
{
return this->queryDeviceGroupTagList(request);
});
asyncExecute(new Runnable([task]() { (*task)(); }));
return task->get_future();
}
IotClient::ListRuleOutcome IotClient::listRule(const ListRuleRequest &request) const
{
auto endpointOutcome = endpointProvider_->getEndpoint();
@@ -1923,6 +2175,42 @@ IotClient::GetRuleActionOutcomeCallable IotClient::getRuleActionCallable(const G
return task->get_future();
}
IotClient::BatchAddDeviceGroupRelationsOutcome IotClient::batchAddDeviceGroupRelations(const BatchAddDeviceGroupRelationsRequest &request) const
{
auto endpointOutcome = endpointProvider_->getEndpoint();
if (!endpointOutcome.isSuccess())
return BatchAddDeviceGroupRelationsOutcome(endpointOutcome.error());
auto outcome = makeRequest(endpointOutcome.result(), request);
if (outcome.isSuccess())
return BatchAddDeviceGroupRelationsOutcome(BatchAddDeviceGroupRelationsResult(outcome.result()));
else
return BatchAddDeviceGroupRelationsOutcome(outcome.error());
}
void IotClient::batchAddDeviceGroupRelationsAsync(const BatchAddDeviceGroupRelationsRequest& request, const BatchAddDeviceGroupRelationsAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context) const
{
auto fn = [this, request, handler, context]()
{
handler(this, request, batchAddDeviceGroupRelations(request), context);
};
asyncExecute(new Runnable(fn));
}
IotClient::BatchAddDeviceGroupRelationsOutcomeCallable IotClient::batchAddDeviceGroupRelationsCallable(const BatchAddDeviceGroupRelationsRequest &request) const
{
auto task = std::make_shared<std::packaged_task<BatchAddDeviceGroupRelationsOutcome()>>(
[this, request]()
{
return this->batchAddDeviceGroupRelations(request);
});
asyncExecute(new Runnable([task]() { (*task)(); }));
return task->get_future();
}
IotClient::GetRuleOutcome IotClient::getRule(const GetRuleRequest &request) const
{
auto endpointOutcome = endpointProvider_->getEndpoint();
@@ -2067,6 +2355,42 @@ IotClient::CreateRuleActionOutcomeCallable IotClient::createRuleActionCallable(c
return task->get_future();
}
IotClient::QueryDeviceGroupInfoOutcome IotClient::queryDeviceGroupInfo(const QueryDeviceGroupInfoRequest &request) const
{
auto endpointOutcome = endpointProvider_->getEndpoint();
if (!endpointOutcome.isSuccess())
return QueryDeviceGroupInfoOutcome(endpointOutcome.error());
auto outcome = makeRequest(endpointOutcome.result(), request);
if (outcome.isSuccess())
return QueryDeviceGroupInfoOutcome(QueryDeviceGroupInfoResult(outcome.result()));
else
return QueryDeviceGroupInfoOutcome(outcome.error());
}
void IotClient::queryDeviceGroupInfoAsync(const QueryDeviceGroupInfoRequest& request, const QueryDeviceGroupInfoAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context) const
{
auto fn = [this, request, handler, context]()
{
handler(this, request, queryDeviceGroupInfo(request), context);
};
asyncExecute(new Runnable(fn));
}
IotClient::QueryDeviceGroupInfoOutcomeCallable IotClient::queryDeviceGroupInfoCallable(const QueryDeviceGroupInfoRequest &request) const
{
auto task = std::make_shared<std::packaged_task<QueryDeviceGroupInfoOutcome()>>(
[this, request]()
{
return this->queryDeviceGroupInfo(request);
});
asyncExecute(new Runnable([task]() { (*task)(); }));
return task->get_future();
}
IotClient::BatchRegisterDeviceOutcome IotClient::batchRegisterDevice(const BatchRegisterDeviceRequest &request) const
{
auto endpointOutcome = endpointProvider_->getEndpoint();

View File

@@ -0,0 +1,66 @@
/*
* 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/BatchAddDeviceGroupRelationsRequest.h>
using AlibabaCloud::Iot::Model::BatchAddDeviceGroupRelationsRequest;
BatchAddDeviceGroupRelationsRequest::BatchAddDeviceGroupRelationsRequest() :
RpcServiceRequest("iot", "2018-01-20", "BatchAddDeviceGroupRelations")
{}
BatchAddDeviceGroupRelationsRequest::~BatchAddDeviceGroupRelationsRequest()
{}
std::string BatchAddDeviceGroupRelationsRequest::getGroupId()const
{
return groupId_;
}
void BatchAddDeviceGroupRelationsRequest::setGroupId(const std::string& groupId)
{
groupId_ = groupId;
setParameter("GroupId", groupId);
}
std::vector<BatchAddDeviceGroupRelationsRequest::Device> BatchAddDeviceGroupRelationsRequest::getDevice()const
{
return device_;
}
void BatchAddDeviceGroupRelationsRequest::setDevice(const std::vector<Device>& device)
{
device_ = device;
int i = 0;
for(int i = 0; i!= device.size(); i++) {
auto obj = device.at(i);
std::string str ="Device."+ std::to_string(i);
setParameter(str + ".DeviceName", obj.deviceName);
setParameter(str + ".ProductKey", obj.productKey);
}
}
std::string BatchAddDeviceGroupRelationsRequest::getAccessKeyId()const
{
return accessKeyId_;
}
void BatchAddDeviceGroupRelationsRequest::setAccessKeyId(const std::string& accessKeyId)
{
accessKeyId_ = accessKeyId;
setParameter("AccessKeyId", accessKeyId);
}

View File

@@ -0,0 +1,94 @@
/*
* 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/BatchAddDeviceGroupRelationsResult.h>
#include <json/json.h>
using namespace AlibabaCloud::Iot;
using namespace AlibabaCloud::Iot::Model;
BatchAddDeviceGroupRelationsResult::BatchAddDeviceGroupRelationsResult() :
ServiceResult()
{}
BatchAddDeviceGroupRelationsResult::BatchAddDeviceGroupRelationsResult(const std::string &payload) :
ServiceResult()
{
parse(payload);
}
BatchAddDeviceGroupRelationsResult::~BatchAddDeviceGroupRelationsResult()
{}
void BatchAddDeviceGroupRelationsResult::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["ValidDeviceCount"].isNull())
validDeviceCount_ = std::stoi(value["ValidDeviceCount"].asString());
if(!value["ExceedTenGroupDeviceCount"].isNull())
exceedTenGroupDeviceCount_ = std::stoi(value["ExceedTenGroupDeviceCount"].asString());
if(!value["AlreadyRelatedGroupDeviceCount"].isNull())
alreadyRelatedGroupDeviceCount_ = std::stoi(value["AlreadyRelatedGroupDeviceCount"].asString());
if(!value["SuccessAddedDeviceCount"].isNull())
successAddedDeviceCount_ = std::stoi(value["SuccessAddedDeviceCount"].asString());
if(!value["ErrorMessage"].isNull())
errorMessage_ = value["ErrorMessage"].asString();
}
int BatchAddDeviceGroupRelationsResult::getValidDeviceCount()const
{
return validDeviceCount_;
}
int BatchAddDeviceGroupRelationsResult::getSuccessAddedDeviceCount()const
{
return successAddedDeviceCount_;
}
int BatchAddDeviceGroupRelationsResult::getExceedTenGroupDeviceCount()const
{
return exceedTenGroupDeviceCount_;
}
int BatchAddDeviceGroupRelationsResult::getAlreadyRelatedGroupDeviceCount()const
{
return alreadyRelatedGroupDeviceCount_;
}
std::string BatchAddDeviceGroupRelationsResult::getErrorMessage()const
{
return errorMessage_;
}
std::string BatchAddDeviceGroupRelationsResult::getCode()const
{
return code_;
}
bool BatchAddDeviceGroupRelationsResult::getSuccess()const
{
return success_;
}

View File

@@ -0,0 +1,66 @@
/*
* 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/BatchDeleteDeviceGroupRelationsRequest.h>
using AlibabaCloud::Iot::Model::BatchDeleteDeviceGroupRelationsRequest;
BatchDeleteDeviceGroupRelationsRequest::BatchDeleteDeviceGroupRelationsRequest() :
RpcServiceRequest("iot", "2018-01-20", "BatchDeleteDeviceGroupRelations")
{}
BatchDeleteDeviceGroupRelationsRequest::~BatchDeleteDeviceGroupRelationsRequest()
{}
std::string BatchDeleteDeviceGroupRelationsRequest::getGroupId()const
{
return groupId_;
}
void BatchDeleteDeviceGroupRelationsRequest::setGroupId(const std::string& groupId)
{
groupId_ = groupId;
setParameter("GroupId", groupId);
}
std::vector<BatchDeleteDeviceGroupRelationsRequest::Device> BatchDeleteDeviceGroupRelationsRequest::getDevice()const
{
return device_;
}
void BatchDeleteDeviceGroupRelationsRequest::setDevice(const std::vector<Device>& device)
{
device_ = device;
int i = 0;
for(int i = 0; i!= device.size(); i++) {
auto obj = device.at(i);
std::string str ="Device."+ std::to_string(i);
setParameter(str + ".DeviceName", obj.deviceName);
setParameter(str + ".ProductKey", obj.productKey);
}
}
std::string BatchDeleteDeviceGroupRelationsRequest::getAccessKeyId()const
{
return accessKeyId_;
}
void BatchDeleteDeviceGroupRelationsRequest::setAccessKeyId(const std::string& accessKeyId)
{
accessKeyId_ = accessKeyId;
setParameter("AccessKeyId", accessKeyId);
}

View 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/BatchDeleteDeviceGroupRelationsResult.h>
#include <json/json.h>
using namespace AlibabaCloud::Iot;
using namespace AlibabaCloud::Iot::Model;
BatchDeleteDeviceGroupRelationsResult::BatchDeleteDeviceGroupRelationsResult() :
ServiceResult()
{}
BatchDeleteDeviceGroupRelationsResult::BatchDeleteDeviceGroupRelationsResult(const std::string &payload) :
ServiceResult()
{
parse(payload);
}
BatchDeleteDeviceGroupRelationsResult::~BatchDeleteDeviceGroupRelationsResult()
{}
void BatchDeleteDeviceGroupRelationsResult::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["ValidDeviceCount"].isNull())
validDeviceCount_ = std::stoi(value["ValidDeviceCount"].asString());
if(!value["AlreadyRelatedGroupDeviceCount"].isNull())
alreadyRelatedGroupDeviceCount_ = std::stoi(value["AlreadyRelatedGroupDeviceCount"].asString());
if(!value["SuccessDeviceCount"].isNull())
successDeviceCount_ = std::stoi(value["SuccessDeviceCount"].asString());
}
int BatchDeleteDeviceGroupRelationsResult::getValidDeviceCount()const
{
return validDeviceCount_;
}
int BatchDeleteDeviceGroupRelationsResult::getSuccessDeviceCount()const
{
return successDeviceCount_;
}
std::string BatchDeleteDeviceGroupRelationsResult::getErrorMessage()const
{
return errorMessage_;
}
int BatchDeleteDeviceGroupRelationsResult::getAlreadyRelatedGroupDeviceCount()const
{
return alreadyRelatedGroupDeviceCount_;
}
std::string BatchDeleteDeviceGroupRelationsResult::getCode()const
{
return code_;
}
bool BatchDeleteDeviceGroupRelationsResult::getSuccess()const
{
return success_;
}

View File

@@ -0,0 +1,71 @@
/*
* 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/CreateDeviceGroupRequest.h>
using AlibabaCloud::Iot::Model::CreateDeviceGroupRequest;
CreateDeviceGroupRequest::CreateDeviceGroupRequest() :
RpcServiceRequest("iot", "2018-01-20", "CreateDeviceGroup")
{}
CreateDeviceGroupRequest::~CreateDeviceGroupRequest()
{}
std::string CreateDeviceGroupRequest::getGroupDesc()const
{
return groupDesc_;
}
void CreateDeviceGroupRequest::setGroupDesc(const std::string& groupDesc)
{
groupDesc_ = groupDesc;
setParameter("GroupDesc", groupDesc);
}
std::string CreateDeviceGroupRequest::getSuperGroupId()const
{
return superGroupId_;
}
void CreateDeviceGroupRequest::setSuperGroupId(const std::string& superGroupId)
{
superGroupId_ = superGroupId;
setParameter("SuperGroupId", superGroupId);
}
std::string CreateDeviceGroupRequest::getGroupName()const
{
return groupName_;
}
void CreateDeviceGroupRequest::setGroupName(const std::string& groupName)
{
groupName_ = groupName;
setParameter("GroupName", groupName);
}
std::string CreateDeviceGroupRequest::getAccessKeyId()const
{
return accessKeyId_;
}
void CreateDeviceGroupRequest::setAccessKeyId(const std::string& accessKeyId)
{
accessKeyId_ = accessKeyId;
setParameter("AccessKeyId", accessKeyId);
}

View File

@@ -0,0 +1,80 @@
/*
* 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/CreateDeviceGroupResult.h>
#include <json/json.h>
using namespace AlibabaCloud::Iot;
using namespace AlibabaCloud::Iot::Model;
CreateDeviceGroupResult::CreateDeviceGroupResult() :
ServiceResult()
{}
CreateDeviceGroupResult::CreateDeviceGroupResult(const std::string &payload) :
ServiceResult()
{
parse(payload);
}
CreateDeviceGroupResult::~CreateDeviceGroupResult()
{}
void CreateDeviceGroupResult::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["GroupId"].isNull())
data_.groupId = dataNode["GroupId"].asString();
if(!dataNode["UtcCreate"].isNull())
data_.utcCreate = dataNode["UtcCreate"].asString();
if(!dataNode["GroupName"].isNull())
data_.groupName = dataNode["GroupName"].asString();
if(!dataNode["GroupDesc"].isNull())
data_.groupDesc = dataNode["GroupDesc"].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();
}
CreateDeviceGroupResult::Data CreateDeviceGroupResult::getData()const
{
return data_;
}
std::string CreateDeviceGroupResult::getErrorMessage()const
{
return errorMessage_;
}
std::string CreateDeviceGroupResult::getCode()const
{
return code_;
}
bool CreateDeviceGroupResult::getSuccess()const
{
return success_;
}

View File

@@ -0,0 +1,49 @@
/*
* 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/DeleteDeviceGroupRequest.h>
using AlibabaCloud::Iot::Model::DeleteDeviceGroupRequest;
DeleteDeviceGroupRequest::DeleteDeviceGroupRequest() :
RpcServiceRequest("iot", "2018-01-20", "DeleteDeviceGroup")
{}
DeleteDeviceGroupRequest::~DeleteDeviceGroupRequest()
{}
std::string DeleteDeviceGroupRequest::getGroupId()const
{
return groupId_;
}
void DeleteDeviceGroupRequest::setGroupId(const std::string& groupId)
{
groupId_ = groupId;
setParameter("GroupId", groupId);
}
std::string DeleteDeviceGroupRequest::getAccessKeyId()const
{
return accessKeyId_;
}
void DeleteDeviceGroupRequest::setAccessKeyId(const std::string& accessKeyId)
{
accessKeyId_ = accessKeyId;
setParameter("AccessKeyId", accessKeyId);
}

View File

@@ -0,0 +1,66 @@
/*
* 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/DeleteDeviceGroupResult.h>
#include <json/json.h>
using namespace AlibabaCloud::Iot;
using namespace AlibabaCloud::Iot::Model;
DeleteDeviceGroupResult::DeleteDeviceGroupResult() :
ServiceResult()
{}
DeleteDeviceGroupResult::DeleteDeviceGroupResult(const std::string &payload) :
ServiceResult()
{
parse(payload);
}
DeleteDeviceGroupResult::~DeleteDeviceGroupResult()
{}
void DeleteDeviceGroupResult::parse(const std::string &payload)
{
Json::Reader reader;
Json::Value value;
reader.parse(payload, value);
setRequestId(value["RequestId"].asString());
if(!value["Success"].isNull())
success_ = value["Success"].asString() == "true";
if(!value["Code"].isNull())
code_ = value["Code"].asString();
if(!value["ErrorMessage"].isNull())
errorMessage_ = value["ErrorMessage"].asString();
}
std::string DeleteDeviceGroupResult::getErrorMessage()const
{
return errorMessage_;
}
std::string DeleteDeviceGroupResult::getCode()const
{
return code_;
}
bool DeleteDeviceGroupResult::getSuccess()const
{
return success_;
}

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.
*/
#include <alibabacloud/iot/model/ForceSetDeviceGroupTagRequest.h>
using AlibabaCloud::Iot::Model::ForceSetDeviceGroupTagRequest;
ForceSetDeviceGroupTagRequest::ForceSetDeviceGroupTagRequest() :
RpcServiceRequest("iot", "2018-01-20", "ForceSetDeviceGroupTag")
{}
ForceSetDeviceGroupTagRequest::~ForceSetDeviceGroupTagRequest()
{}
std::string ForceSetDeviceGroupTagRequest::getTagString()const
{
return tagString_;
}
void ForceSetDeviceGroupTagRequest::setTagString(const std::string& tagString)
{
tagString_ = tagString;
setParameter("TagString", tagString);
}
std::string ForceSetDeviceGroupTagRequest::getGroupId()const
{
return groupId_;
}
void ForceSetDeviceGroupTagRequest::setGroupId(const std::string& groupId)
{
groupId_ = groupId;
setParameter("GroupId", groupId);
}
std::string ForceSetDeviceGroupTagRequest::getAccessKeyId()const
{
return accessKeyId_;
}
void ForceSetDeviceGroupTagRequest::setAccessKeyId(const std::string& accessKeyId)
{
accessKeyId_ = accessKeyId;
setParameter("AccessKeyId", accessKeyId);
}

View File

@@ -0,0 +1,66 @@
/*
* 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/ForceSetDeviceGroupTagResult.h>
#include <json/json.h>
using namespace AlibabaCloud::Iot;
using namespace AlibabaCloud::Iot::Model;
ForceSetDeviceGroupTagResult::ForceSetDeviceGroupTagResult() :
ServiceResult()
{}
ForceSetDeviceGroupTagResult::ForceSetDeviceGroupTagResult(const std::string &payload) :
ServiceResult()
{
parse(payload);
}
ForceSetDeviceGroupTagResult::~ForceSetDeviceGroupTagResult()
{}
void ForceSetDeviceGroupTagResult::parse(const std::string &payload)
{
Json::Reader reader;
Json::Value value;
reader.parse(payload, value);
setRequestId(value["RequestId"].asString());
if(!value["Success"].isNull())
success_ = value["Success"].asString() == "true";
if(!value["Code"].isNull())
code_ = value["Code"].asString();
if(!value["ErrorMessage"].isNull())
errorMessage_ = value["ErrorMessage"].asString();
}
std::string ForceSetDeviceGroupTagResult::getErrorMessage()const
{
return errorMessage_;
}
std::string ForceSetDeviceGroupTagResult::getCode()const
{
return code_;
}
bool ForceSetDeviceGroupTagResult::getSuccess()const
{
return success_;
}

View File

@@ -73,6 +73,8 @@ void QueryDeviceDetailResult::parse(const std::string &payload)
data_.nodeType = std::stoi(dataNode["NodeType"].asString());
if(!dataNode["Region"].isNull())
data_.region = dataNode["Region"].asString();
if(!dataNode["Owner"].isNull())
data_.owner = dataNode["Owner"].asString() == "true";
if(!value["Success"].isNull())
success_ = value["Success"].asString() == "true";
if(!value["Code"].isNull())

View File

@@ -0,0 +1,49 @@
/*
* 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/QueryDeviceGroupInfoRequest.h>
using AlibabaCloud::Iot::Model::QueryDeviceGroupInfoRequest;
QueryDeviceGroupInfoRequest::QueryDeviceGroupInfoRequest() :
RpcServiceRequest("iot", "2018-01-20", "QueryDeviceGroupInfo")
{}
QueryDeviceGroupInfoRequest::~QueryDeviceGroupInfoRequest()
{}
std::string QueryDeviceGroupInfoRequest::getGroupId()const
{
return groupId_;
}
void QueryDeviceGroupInfoRequest::setGroupId(const std::string& groupId)
{
groupId_ = groupId;
setParameter("GroupId", groupId);
}
std::string QueryDeviceGroupInfoRequest::getAccessKeyId()const
{
return accessKeyId_;
}
void QueryDeviceGroupInfoRequest::setAccessKeyId(const std::string& accessKeyId)
{
accessKeyId_ = accessKeyId;
setParameter("AccessKeyId", accessKeyId);
}

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/QueryDeviceGroupInfoResult.h>
#include <json/json.h>
using namespace AlibabaCloud::Iot;
using namespace AlibabaCloud::Iot::Model;
QueryDeviceGroupInfoResult::QueryDeviceGroupInfoResult() :
ServiceResult()
{}
QueryDeviceGroupInfoResult::QueryDeviceGroupInfoResult(const std::string &payload) :
ServiceResult()
{
parse(payload);
}
QueryDeviceGroupInfoResult::~QueryDeviceGroupInfoResult()
{}
void QueryDeviceGroupInfoResult::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["GroupId"].isNull())
data_.groupId = dataNode["GroupId"].asString();
if(!dataNode["UtcCreate"].isNull())
data_.utcCreate = dataNode["UtcCreate"].asString();
if(!dataNode["GroupName"].isNull())
data_.groupName = dataNode["GroupName"].asString();
if(!dataNode["GroupDesc"].isNull())
data_.groupDesc = dataNode["GroupDesc"].asString();
if(!dataNode["DeviceCount"].isNull())
data_.deviceCount = std::stoi(dataNode["DeviceCount"].asString());
if(!dataNode["DeviceActive"].isNull())
data_.deviceActive = std::stoi(dataNode["DeviceActive"].asString());
if(!dataNode["DeviceOnline"].isNull())
data_.deviceOnline = std::stoi(dataNode["DeviceOnline"].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();
}
QueryDeviceGroupInfoResult::Data QueryDeviceGroupInfoResult::getData()const
{
return data_;
}
std::string QueryDeviceGroupInfoResult::getErrorMessage()const
{
return errorMessage_;
}
std::string QueryDeviceGroupInfoResult::getCode()const
{
return code_;
}
bool QueryDeviceGroupInfoResult::getSuccess()const
{
return success_;
}

View File

@@ -0,0 +1,82 @@
/*
* 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/QueryDeviceGroupListRequest.h>
using AlibabaCloud::Iot::Model::QueryDeviceGroupListRequest;
QueryDeviceGroupListRequest::QueryDeviceGroupListRequest() :
RpcServiceRequest("iot", "2018-01-20", "QueryDeviceGroupList")
{}
QueryDeviceGroupListRequest::~QueryDeviceGroupListRequest()
{}
std::string QueryDeviceGroupListRequest::getSuperGroupId()const
{
return superGroupId_;
}
void QueryDeviceGroupListRequest::setSuperGroupId(const std::string& superGroupId)
{
superGroupId_ = superGroupId;
setParameter("SuperGroupId", superGroupId);
}
int QueryDeviceGroupListRequest::getPageSize()const
{
return pageSize_;
}
void QueryDeviceGroupListRequest::setPageSize(int pageSize)
{
pageSize_ = pageSize;
setParameter("PageSize", std::to_string(pageSize));
}
int QueryDeviceGroupListRequest::getCurrentPage()const
{
return currentPage_;
}
void QueryDeviceGroupListRequest::setCurrentPage(int currentPage)
{
currentPage_ = currentPage;
setParameter("CurrentPage", std::to_string(currentPage));
}
std::string QueryDeviceGroupListRequest::getGroupName()const
{
return groupName_;
}
void QueryDeviceGroupListRequest::setGroupName(const std::string& groupName)
{
groupName_ = groupName;
setParameter("GroupName", groupName);
}
std::string QueryDeviceGroupListRequest::getAccessKeyId()const
{
return accessKeyId_;
}
void QueryDeviceGroupListRequest::setAccessKeyId(const std::string& accessKeyId)
{
accessKeyId_ = accessKeyId;
setParameter("AccessKeyId", accessKeyId);
}

View File

@@ -0,0 +1,113 @@
/*
* 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/QueryDeviceGroupListResult.h>
#include <json/json.h>
using namespace AlibabaCloud::Iot;
using namespace AlibabaCloud::Iot::Model;
QueryDeviceGroupListResult::QueryDeviceGroupListResult() :
ServiceResult()
{}
QueryDeviceGroupListResult::QueryDeviceGroupListResult(const std::string &payload) :
ServiceResult()
{
parse(payload);
}
QueryDeviceGroupListResult::~QueryDeviceGroupListResult()
{}
void QueryDeviceGroupListResult::parse(const std::string &payload)
{
Json::Reader reader;
Json::Value value;
reader.parse(payload, value);
setRequestId(value["RequestId"].asString());
auto allData = value["Data"]["GroupInfo"];
for (auto value : allData)
{
GroupInfo dataObject;
if(!value["GroupId"].isNull())
dataObject.groupId = value["GroupId"].asString();
if(!value["UtcCreate"].isNull())
dataObject.utcCreate = value["UtcCreate"].asString();
if(!value["GroupName"].isNull())
dataObject.groupName = value["GroupName"].asString();
if(!value["GroupDesc"].isNull())
dataObject.groupDesc = value["GroupDesc"].asString();
data_.push_back(dataObject);
}
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["CurrentPage"].isNull())
currentPage_ = std::stoi(value["CurrentPage"].asString());
if(!value["PageCount"].isNull())
pageCount_ = std::stoi(value["PageCount"].asString());
if(!value["PageSize"].isNull())
pageSize_ = std::stoi(value["PageSize"].asString());
if(!value["Total"].isNull())
total_ = std::stoi(value["Total"].asString());
}
int QueryDeviceGroupListResult::getPageCount()const
{
return pageCount_;
}
int QueryDeviceGroupListResult::getPageSize()const
{
return pageSize_;
}
int QueryDeviceGroupListResult::getCurrentPage()const
{
return currentPage_;
}
int QueryDeviceGroupListResult::getTotal()const
{
return total_;
}
std::vector<QueryDeviceGroupListResult::GroupInfo> QueryDeviceGroupListResult::getData()const
{
return data_;
}
std::string QueryDeviceGroupListResult::getErrorMessage()const
{
return errorMessage_;
}
std::string QueryDeviceGroupListResult::getCode()const
{
return code_;
}
bool QueryDeviceGroupListResult::getSuccess()const
{
return success_;
}

View File

@@ -0,0 +1,49 @@
/*
* 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/QueryDeviceGroupTagListRequest.h>
using AlibabaCloud::Iot::Model::QueryDeviceGroupTagListRequest;
QueryDeviceGroupTagListRequest::QueryDeviceGroupTagListRequest() :
RpcServiceRequest("iot", "2018-01-20", "QueryDeviceGroupTagList")
{}
QueryDeviceGroupTagListRequest::~QueryDeviceGroupTagListRequest()
{}
std::string QueryDeviceGroupTagListRequest::getGroupId()const
{
return groupId_;
}
void QueryDeviceGroupTagListRequest::setGroupId(const std::string& groupId)
{
groupId_ = groupId;
setParameter("GroupId", groupId);
}
std::string QueryDeviceGroupTagListRequest::getAccessKeyId()const
{
return accessKeyId_;
}
void QueryDeviceGroupTagListRequest::setAccessKeyId(const std::string& accessKeyId)
{
accessKeyId_ = accessKeyId;
setParameter("AccessKeyId", accessKeyId);
}

View File

@@ -0,0 +1,81 @@
/*
* Copyright 2009-2017 Alibaba Cloud All rights reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#include <alibabacloud/iot/model/QueryDeviceGroupTagListResult.h>
#include <json/json.h>
using namespace AlibabaCloud::Iot;
using namespace AlibabaCloud::Iot::Model;
QueryDeviceGroupTagListResult::QueryDeviceGroupTagListResult() :
ServiceResult()
{}
QueryDeviceGroupTagListResult::QueryDeviceGroupTagListResult(const std::string &payload) :
ServiceResult()
{
parse(payload);
}
QueryDeviceGroupTagListResult::~QueryDeviceGroupTagListResult()
{}
void QueryDeviceGroupTagListResult::parse(const std::string &payload)
{
Json::Reader reader;
Json::Value value;
reader.parse(payload, value);
setRequestId(value["RequestId"].asString());
auto allData = value["Data"]["GroupTagInfo"];
for (auto value : allData)
{
GroupTagInfo dataObject;
if(!value["TagKey"].isNull())
dataObject.tagKey = value["TagKey"].asString();
if(!value["TagValue"].isNull())
dataObject.tagValue = value["TagValue"].asString();
data_.push_back(dataObject);
}
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<QueryDeviceGroupTagListResult::GroupTagInfo> QueryDeviceGroupTagListResult::getData()const
{
return data_;
}
std::string QueryDeviceGroupTagListResult::getErrorMessage()const
{
return errorMessage_;
}
std::string QueryDeviceGroupTagListResult::getCode()const
{
return code_;
}
bool QueryDeviceGroupTagListResult::getSuccess()const
{
return success_;
}

View File

@@ -67,6 +67,10 @@ void QueryProductResult::parse(const std::string &payload)
data_.id2 = dataNode["Id2"].asString() == "true";
if(!dataNode["ProtocolType"].isNull())
data_.protocolType = dataNode["ProtocolType"].asString();
if(!dataNode["ProductStatus"].isNull())
data_.productStatus = dataNode["ProductStatus"].asString();
if(!dataNode["Owner"].isNull())
data_.owner = dataNode["Owner"].asString() == "true";
if(!value["Success"].isNull())
success_ = value["Success"].asString() == "true";
if(!value["Code"].isNull())

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.
*/
#include <alibabacloud/iot/model/UpdateDeviceGroupRequest.h>
using AlibabaCloud::Iot::Model::UpdateDeviceGroupRequest;
UpdateDeviceGroupRequest::UpdateDeviceGroupRequest() :
RpcServiceRequest("iot", "2018-01-20", "UpdateDeviceGroup")
{}
UpdateDeviceGroupRequest::~UpdateDeviceGroupRequest()
{}
std::string UpdateDeviceGroupRequest::getGroupDesc()const
{
return groupDesc_;
}
void UpdateDeviceGroupRequest::setGroupDesc(const std::string& groupDesc)
{
groupDesc_ = groupDesc;
setParameter("GroupDesc", groupDesc);
}
std::string UpdateDeviceGroupRequest::getGroupId()const
{
return groupId_;
}
void UpdateDeviceGroupRequest::setGroupId(const std::string& groupId)
{
groupId_ = groupId;
setParameter("GroupId", groupId);
}
std::string UpdateDeviceGroupRequest::getAccessKeyId()const
{
return accessKeyId_;
}
void UpdateDeviceGroupRequest::setAccessKeyId(const std::string& accessKeyId)
{
accessKeyId_ = accessKeyId;
setParameter("AccessKeyId", accessKeyId);
}

View File

@@ -0,0 +1,66 @@
/*
* 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/UpdateDeviceGroupResult.h>
#include <json/json.h>
using namespace AlibabaCloud::Iot;
using namespace AlibabaCloud::Iot::Model;
UpdateDeviceGroupResult::UpdateDeviceGroupResult() :
ServiceResult()
{}
UpdateDeviceGroupResult::UpdateDeviceGroupResult(const std::string &payload) :
ServiceResult()
{
parse(payload);
}
UpdateDeviceGroupResult::~UpdateDeviceGroupResult()
{}
void UpdateDeviceGroupResult::parse(const std::string &payload)
{
Json::Reader reader;
Json::Value value;
reader.parse(payload, value);
setRequestId(value["RequestId"].asString());
if(!value["Success"].isNull())
success_ = value["Success"].asString() == "true";
if(!value["Code"].isNull())
code_ = value["Code"].asString();
if(!value["ErrorMessage"].isNull())
errorMessage_ = value["ErrorMessage"].asString();
}
std::string UpdateDeviceGroupResult::getErrorMessage()const
{
return errorMessage_;
}
std::string UpdateDeviceGroupResult::getCode()const
{
return code_;
}
bool UpdateDeviceGroupResult::getSuccess()const
{
return success_;
}