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

Signed-off-by: yixiong.jxy <yixiong.jxy@alibaba-inc.com>
This commit is contained in:
yixiong.jxy
2018-08-07 15:41:10 +08:00
parent 13ea4f0698
commit 0ca5beb247
247 changed files with 19382 additions and 2 deletions

View File

@@ -0,0 +1,61 @@
/*
* 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/ApplyDeviceWithNamesRequest.h>
using AlibabaCloud::Iot::Model::ApplyDeviceWithNamesRequest;
ApplyDeviceWithNamesRequest::ApplyDeviceWithNamesRequest() :
RpcServiceRequest("iot", "2017-04-20", "ApplyDeviceWithNames")
{}
ApplyDeviceWithNamesRequest::~ApplyDeviceWithNamesRequest()
{}
std::vector<std::string> ApplyDeviceWithNamesRequest::getDeviceName()const
{
return deviceName_;
}
void ApplyDeviceWithNamesRequest::setDeviceName(const std::vector<std::string>& deviceName)
{
deviceName_ = deviceName;
for(int i = 0; i!= deviceName.size(); i++)
setParameter("DeviceName."+ std::to_string(i), deviceName.at(i));
}
std::string ApplyDeviceWithNamesRequest::getProductKey()const
{
return productKey_;
}
void ApplyDeviceWithNamesRequest::setProductKey(const std::string& productKey)
{
productKey_ = productKey;
setParameter("ProductKey", productKey);
}
std::string ApplyDeviceWithNamesRequest::getAccessKeyId()const
{
return accessKeyId_;
}
void ApplyDeviceWithNamesRequest::setAccessKeyId(const std::string& accessKeyId)
{
accessKeyId_ = accessKeyId;
setParameter("AccessKeyId", accessKeyId);
}

View File

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

View File

@@ -0,0 +1,61 @@
/*
* 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/BatchCheckDeviceNamesRequest.h>
using AlibabaCloud::Iot::Model::BatchCheckDeviceNamesRequest;
BatchCheckDeviceNamesRequest::BatchCheckDeviceNamesRequest() :
RpcServiceRequest("iot", "2018-01-20", "BatchCheckDeviceNames")
{}
BatchCheckDeviceNamesRequest::~BatchCheckDeviceNamesRequest()
{}
std::vector<std::string> BatchCheckDeviceNamesRequest::getDeviceName()const
{
return deviceName_;
}
void BatchCheckDeviceNamesRequest::setDeviceName(const std::vector<std::string>& deviceName)
{
deviceName_ = deviceName;
for(int i = 0; i!= deviceName.size(); i++)
setParameter("DeviceName."+ std::to_string(i), deviceName.at(i));
}
std::string BatchCheckDeviceNamesRequest::getProductKey()const
{
return productKey_;
}
void BatchCheckDeviceNamesRequest::setProductKey(const std::string& productKey)
{
productKey_ = productKey;
setParameter("ProductKey", productKey);
}
std::string BatchCheckDeviceNamesRequest::getAccessKeyId()const
{
return accessKeyId_;
}
void BatchCheckDeviceNamesRequest::setAccessKeyId(const std::string& accessKeyId)
{
accessKeyId_ = accessKeyId;
setParameter("AccessKeyId", accessKeyId);
}

View File

@@ -0,0 +1,74 @@
/*
* 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/BatchCheckDeviceNamesResult.h>
#include <json/json.h>
using namespace AlibabaCloud::Iot;
using namespace AlibabaCloud::Iot::Model;
BatchCheckDeviceNamesResult::BatchCheckDeviceNamesResult() :
ServiceResult()
{}
BatchCheckDeviceNamesResult::BatchCheckDeviceNamesResult(const std::string &payload) :
ServiceResult()
{
parse(payload);
}
BatchCheckDeviceNamesResult::~BatchCheckDeviceNamesResult()
{}
void BatchCheckDeviceNamesResult::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["ApplyId"].isNull())
data_.applyId = std::stol(dataNode["ApplyId"].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();
}
BatchCheckDeviceNamesResult::Data BatchCheckDeviceNamesResult::getData()const
{
return data_;
}
std::string BatchCheckDeviceNamesResult::getErrorMessage()const
{
return errorMessage_;
}
std::string BatchCheckDeviceNamesResult::getCode()const
{
return code_;
}
bool BatchCheckDeviceNamesResult::getSuccess()const
{
return success_;
}

View File

@@ -0,0 +1,61 @@
/*
* 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/BatchGetDeviceStateRequest.h>
using AlibabaCloud::Iot::Model::BatchGetDeviceStateRequest;
BatchGetDeviceStateRequest::BatchGetDeviceStateRequest() :
RpcServiceRequest("iot", "2017-04-20", "BatchGetDeviceState")
{}
BatchGetDeviceStateRequest::~BatchGetDeviceStateRequest()
{}
std::vector<std::string> BatchGetDeviceStateRequest::getDeviceName()const
{
return deviceName_;
}
void BatchGetDeviceStateRequest::setDeviceName(const std::vector<std::string>& deviceName)
{
deviceName_ = deviceName;
for(int i = 0; i!= deviceName.size(); i++)
setParameter("DeviceName."+ std::to_string(i), deviceName.at(i));
}
std::string BatchGetDeviceStateRequest::getProductKey()const
{
return productKey_;
}
void BatchGetDeviceStateRequest::setProductKey(const std::string& productKey)
{
productKey_ = productKey;
setParameter("ProductKey", productKey);
}
std::string BatchGetDeviceStateRequest::getAccessKeyId()const
{
return accessKeyId_;
}
void BatchGetDeviceStateRequest::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/BatchGetDeviceStateResult.h>
#include <json/json.h>
using namespace AlibabaCloud::Iot;
using namespace AlibabaCloud::Iot::Model;
BatchGetDeviceStateResult::BatchGetDeviceStateResult() :
ServiceResult()
{}
BatchGetDeviceStateResult::BatchGetDeviceStateResult(const std::string &payload) :
ServiceResult()
{
parse(payload);
}
BatchGetDeviceStateResult::~BatchGetDeviceStateResult()
{}
void BatchGetDeviceStateResult::parse(const std::string &payload)
{
Json::Reader reader;
Json::Value value;
reader.parse(payload, value);
setRequestId(value["RequestId"].asString());
auto allDeviceStatusList = value["DeviceStatusList"]["DeviceStatus"];
for (auto value : allDeviceStatusList)
{
DeviceStatus deviceStatusListObject;
if(!value["DeviceId"].isNull())
deviceStatusListObject.deviceId = value["DeviceId"].asString();
if(!value["DeviceName"].isNull())
deviceStatusListObject.deviceName = value["DeviceName"].asString();
if(!value["Status"].isNull())
deviceStatusListObject.status = value["Status"].asString();
if(!value["AsAddress"].isNull())
deviceStatusListObject.asAddress = value["AsAddress"].asString();
if(!value["LastOnlineTime"].isNull())
deviceStatusListObject.lastOnlineTime = value["LastOnlineTime"].asString();
deviceStatusList_.push_back(deviceStatusListObject);
}
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<BatchGetDeviceStateResult::DeviceStatus> BatchGetDeviceStateResult::getDeviceStatusList()const
{
return deviceStatusList_;
}
std::string BatchGetDeviceStateResult::getErrorMessage()const
{
return errorMessage_;
}
std::string BatchGetDeviceStateResult::getCode()const
{
return code_;
}
bool BatchGetDeviceStateResult::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/BatchRegisterDeviceRequest.h>
using AlibabaCloud::Iot::Model::BatchRegisterDeviceRequest;
BatchRegisterDeviceRequest::BatchRegisterDeviceRequest() :
RpcServiceRequest("iot", "2018-01-20", "BatchRegisterDevice")
{}
BatchRegisterDeviceRequest::~BatchRegisterDeviceRequest()
{}
int BatchRegisterDeviceRequest::getCount()const
{
return count_;
}
void BatchRegisterDeviceRequest::setCount(int count)
{
count_ = count;
setParameter("Count", std::to_string(count));
}
std::string BatchRegisterDeviceRequest::getProductKey()const
{
return productKey_;
}
void BatchRegisterDeviceRequest::setProductKey(const std::string& productKey)
{
productKey_ = productKey;
setParameter("ProductKey", productKey);
}
std::string BatchRegisterDeviceRequest::getAccessKeyId()const
{
return accessKeyId_;
}
void BatchRegisterDeviceRequest::setAccessKeyId(const std::string& accessKeyId)
{
accessKeyId_ = accessKeyId;
setParameter("AccessKeyId", accessKeyId);
}

View File

@@ -0,0 +1,74 @@
/*
* 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/BatchRegisterDeviceResult.h>
#include <json/json.h>
using namespace AlibabaCloud::Iot;
using namespace AlibabaCloud::Iot::Model;
BatchRegisterDeviceResult::BatchRegisterDeviceResult() :
ServiceResult()
{}
BatchRegisterDeviceResult::BatchRegisterDeviceResult(const std::string &payload) :
ServiceResult()
{
parse(payload);
}
BatchRegisterDeviceResult::~BatchRegisterDeviceResult()
{}
void BatchRegisterDeviceResult::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["ApplyId"].isNull())
data_.applyId = std::stol(dataNode["ApplyId"].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();
}
BatchRegisterDeviceResult::Data BatchRegisterDeviceResult::getData()const
{
return data_;
}
std::string BatchRegisterDeviceResult::getErrorMessage()const
{
return errorMessage_;
}
std::string BatchRegisterDeviceResult::getCode()const
{
return code_;
}
bool BatchRegisterDeviceResult::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/BatchRegisterDeviceWithApplyIdRequest.h>
using AlibabaCloud::Iot::Model::BatchRegisterDeviceWithApplyIdRequest;
BatchRegisterDeviceWithApplyIdRequest::BatchRegisterDeviceWithApplyIdRequest() :
RpcServiceRequest("iot", "2018-01-20", "BatchRegisterDeviceWithApplyId")
{}
BatchRegisterDeviceWithApplyIdRequest::~BatchRegisterDeviceWithApplyIdRequest()
{}
long BatchRegisterDeviceWithApplyIdRequest::getApplyId()const
{
return applyId_;
}
void BatchRegisterDeviceWithApplyIdRequest::setApplyId(long applyId)
{
applyId_ = applyId;
setParameter("ApplyId", std::to_string(applyId));
}
std::string BatchRegisterDeviceWithApplyIdRequest::getProductKey()const
{
return productKey_;
}
void BatchRegisterDeviceWithApplyIdRequest::setProductKey(const std::string& productKey)
{
productKey_ = productKey;
setParameter("ProductKey", productKey);
}
std::string BatchRegisterDeviceWithApplyIdRequest::getAccessKeyId()const
{
return accessKeyId_;
}
void BatchRegisterDeviceWithApplyIdRequest::setAccessKeyId(const std::string& accessKeyId)
{
accessKeyId_ = accessKeyId;
setParameter("AccessKeyId", accessKeyId);
}

View File

@@ -0,0 +1,74 @@
/*
* 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/BatchRegisterDeviceWithApplyIdResult.h>
#include <json/json.h>
using namespace AlibabaCloud::Iot;
using namespace AlibabaCloud::Iot::Model;
BatchRegisterDeviceWithApplyIdResult::BatchRegisterDeviceWithApplyIdResult() :
ServiceResult()
{}
BatchRegisterDeviceWithApplyIdResult::BatchRegisterDeviceWithApplyIdResult(const std::string &payload) :
ServiceResult()
{
parse(payload);
}
BatchRegisterDeviceWithApplyIdResult::~BatchRegisterDeviceWithApplyIdResult()
{}
void BatchRegisterDeviceWithApplyIdResult::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["ApplyId"].isNull())
data_.applyId = std::stol(dataNode["ApplyId"].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();
}
BatchRegisterDeviceWithApplyIdResult::Data BatchRegisterDeviceWithApplyIdResult::getData()const
{
return data_;
}
std::string BatchRegisterDeviceWithApplyIdResult::getErrorMessage()const
{
return errorMessage_;
}
std::string BatchRegisterDeviceWithApplyIdResult::getCode()const
{
return code_;
}
bool BatchRegisterDeviceWithApplyIdResult::getSuccess()const
{
return success_;
}

View File

@@ -0,0 +1,137 @@
/*
* 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/CreateProductRequest.h>
using AlibabaCloud::Iot::Model::CreateProductRequest;
CreateProductRequest::CreateProductRequest() :
RpcServiceRequest("iot", "2017-04-20", "CreateProduct")
{}
CreateProductRequest::~CreateProductRequest()
{}
long CreateProductRequest::getCatId()const
{
return catId_;
}
void CreateProductRequest::setCatId(long catId)
{
catId_ = catId;
setParameter("CatId", std::to_string(catId));
}
int CreateProductRequest::getNodeType()const
{
return nodeType_;
}
void CreateProductRequest::setNodeType(int nodeType)
{
nodeType_ = nodeType;
setParameter("NodeType", std::to_string(nodeType));
}
std::string CreateProductRequest::getRegionId()const
{
return regionId_;
}
void CreateProductRequest::setRegionId(const std::string& regionId)
{
regionId_ = regionId;
setParameter("RegionId", regionId);
}
bool CreateProductRequest::getId2()const
{
return id2_;
}
void CreateProductRequest::setId2(bool id2)
{
id2_ = id2;
setParameter("Id2", std::to_string(id2));
}
std::string CreateProductRequest::getName()const
{
return name_;
}
void CreateProductRequest::setName(const std::string& name)
{
name_ = name;
setParameter("Name", name);
}
std::string CreateProductRequest::getExtProps()const
{
return extProps_;
}
void CreateProductRequest::setExtProps(const std::string& extProps)
{
extProps_ = extProps;
setParameter("ExtProps", extProps);
}
std::string CreateProductRequest::getSecurityPolicy()const
{
return securityPolicy_;
}
void CreateProductRequest::setSecurityPolicy(const std::string& securityPolicy)
{
securityPolicy_ = securityPolicy;
setParameter("SecurityPolicy", securityPolicy);
}
int CreateProductRequest::getPayType()const
{
return payType_;
}
void CreateProductRequest::setPayType(int payType)
{
payType_ = payType;
setParameter("PayType", std::to_string(payType));
}
std::string CreateProductRequest::getAccessKeyId()const
{
return accessKeyId_;
}
void CreateProductRequest::setAccessKeyId(const std::string& accessKeyId)
{
accessKeyId_ = accessKeyId;
setParameter("AccessKeyId", accessKeyId);
}
std::string CreateProductRequest::getDesc()const
{
return desc_;
}
void CreateProductRequest::setDesc(const std::string& desc)
{
desc_ = desc;
setParameter("Desc", desc);
}

View File

@@ -0,0 +1,96 @@
/*
* 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/CreateProductResult.h>
#include <json/json.h>
using namespace AlibabaCloud::Iot;
using namespace AlibabaCloud::Iot::Model;
CreateProductResult::CreateProductResult() :
ServiceResult()
{}
CreateProductResult::CreateProductResult(const std::string &payload) :
ServiceResult()
{
parse(payload);
}
CreateProductResult::~CreateProductResult()
{}
void CreateProductResult::parse(const std::string &payload)
{
Json::Reader reader;
Json::Value value;
reader.parse(payload, value);
setRequestId(value["RequestId"].asString());
auto productInfoNode = value["ProductInfo"];
if(!productInfoNode["ProductKey"].isNull())
productInfo_.productKey = productInfoNode["ProductKey"].asString();
if(!productInfoNode["ProductName"].isNull())
productInfo_.productName = productInfoNode["ProductName"].asString();
if(!productInfoNode["NodeType"].isNull())
productInfo_.nodeType = std::stoi(productInfoNode["NodeType"].asString());
if(!productInfoNode["CatId"].isNull())
productInfo_.catId = std::stol(productInfoNode["CatId"].asString());
if(!productInfoNode["CreateUserId"].isNull())
productInfo_.createUserId = std::stol(productInfoNode["CreateUserId"].asString());
if(!productInfoNode["ProductDesc"].isNull())
productInfo_.productDesc = productInfoNode["ProductDesc"].asString();
if(!productInfoNode["FromSource"].isNull())
productInfo_.fromSource = productInfoNode["FromSource"].asString();
if(!productInfoNode["ExtProps"].isNull())
productInfo_.extProps = productInfoNode["ExtProps"].asString();
if(!productInfoNode["GmtCreate"].isNull())
productInfo_.gmtCreate = productInfoNode["GmtCreate"].asString();
if(!productInfoNode["GmtModified"].isNull())
productInfo_.gmtModified = productInfoNode["GmtModified"].asString();
if(!productInfoNode["ProductSecret"].isNull())
productInfo_.productSecret = productInfoNode["ProductSecret"].asString();
if(!productInfoNode["Id2"].isNull())
productInfo_.id2 = productInfoNode["Id2"].asString() == "true";
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();
}
CreateProductResult::ProductInfo CreateProductResult::getProductInfo()const
{
return productInfo_;
}
std::string CreateProductResult::getErrorMessage()const
{
return errorMessage_;
}
std::string CreateProductResult::getCode()const
{
return code_;
}
bool CreateProductResult::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/CreateProductTopicRequest.h>
using AlibabaCloud::Iot::Model::CreateProductTopicRequest;
CreateProductTopicRequest::CreateProductTopicRequest() :
RpcServiceRequest("iot", "2017-04-20", "CreateProductTopic")
{}
CreateProductTopicRequest::~CreateProductTopicRequest()
{}
std::string CreateProductTopicRequest::getProductKey()const
{
return productKey_;
}
void CreateProductTopicRequest::setProductKey(const std::string& productKey)
{
productKey_ = productKey;
setParameter("ProductKey", productKey);
}
std::string CreateProductTopicRequest::getTopicShortName()const
{
return topicShortName_;
}
void CreateProductTopicRequest::setTopicShortName(const std::string& topicShortName)
{
topicShortName_ = topicShortName;
setParameter("TopicShortName", topicShortName);
}
std::string CreateProductTopicRequest::getOperation()const
{
return operation_;
}
void CreateProductTopicRequest::setOperation(const std::string& operation)
{
operation_ = operation;
setParameter("Operation", operation);
}
std::string CreateProductTopicRequest::getAccessKeyId()const
{
return accessKeyId_;
}
void CreateProductTopicRequest::setAccessKeyId(const std::string& accessKeyId)
{
accessKeyId_ = accessKeyId;
setParameter("AccessKeyId", accessKeyId);
}
std::string CreateProductTopicRequest::getDesc()const
{
return desc_;
}
void CreateProductTopicRequest::setDesc(const std::string& desc)
{
desc_ = desc;
setParameter("Desc", desc);
}

View File

@@ -0,0 +1,73 @@
/*
* Copyright 2009-2017 Alibaba Cloud All rights reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#include <alibabacloud/iot/model/CreateProductTopicResult.h>
#include <json/json.h>
using namespace AlibabaCloud::Iot;
using namespace AlibabaCloud::Iot::Model;
CreateProductTopicResult::CreateProductTopicResult() :
ServiceResult()
{}
CreateProductTopicResult::CreateProductTopicResult(const std::string &payload) :
ServiceResult()
{
parse(payload);
}
CreateProductTopicResult::~CreateProductTopicResult()
{}
void CreateProductTopicResult::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["TopicId"].isNull())
topicId_ = std::stol(value["TopicId"].asString());
}
long CreateProductTopicResult::getTopicId()const
{
return topicId_;
}
std::string CreateProductTopicResult::getErrorMessage()const
{
return errorMessage_;
}
std::string CreateProductTopicResult::getCode()const
{
return code_;
}
bool CreateProductTopicResult::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/CreateRuleActionRequest.h>
using AlibabaCloud::Iot::Model::CreateRuleActionRequest;
CreateRuleActionRequest::CreateRuleActionRequest() :
RpcServiceRequest("iot", "2017-04-20", "CreateRuleAction")
{}
CreateRuleActionRequest::~CreateRuleActionRequest()
{}
std::string CreateRuleActionRequest::getConfiguration()const
{
return configuration_;
}
void CreateRuleActionRequest::setConfiguration(const std::string& configuration)
{
configuration_ = configuration;
setParameter("Configuration", configuration);
}
long CreateRuleActionRequest::getRuleId()const
{
return ruleId_;
}
void CreateRuleActionRequest::setRuleId(long ruleId)
{
ruleId_ = ruleId;
setParameter("RuleId", std::to_string(ruleId));
}
std::string CreateRuleActionRequest::getType()const
{
return type_;
}
void CreateRuleActionRequest::setType(const std::string& type)
{
type_ = type;
setParameter("Type", type);
}
std::string CreateRuleActionRequest::getAccessKeyId()const
{
return accessKeyId_;
}
void CreateRuleActionRequest::setAccessKeyId(const std::string& accessKeyId)
{
accessKeyId_ = accessKeyId;
setParameter("AccessKeyId", accessKeyId);
}

View File

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

View File

@@ -0,0 +1,115 @@
/*
* 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/CreateRuleRequest.h>
using AlibabaCloud::Iot::Model::CreateRuleRequest;
CreateRuleRequest::CreateRuleRequest() :
RpcServiceRequest("iot", "2017-04-20", "CreateRule")
{}
CreateRuleRequest::~CreateRuleRequest()
{}
std::string CreateRuleRequest::getSelect()const
{
return select_;
}
void CreateRuleRequest::setSelect(const std::string& select)
{
select_ = select;
setParameter("Select", select);
}
std::string CreateRuleRequest::getRuleDesc()const
{
return ruleDesc_;
}
void CreateRuleRequest::setRuleDesc(const std::string& ruleDesc)
{
ruleDesc_ = ruleDesc;
setParameter("RuleDesc", ruleDesc);
}
std::string CreateRuleRequest::getDataType()const
{
return dataType_;
}
void CreateRuleRequest::setDataType(const std::string& dataType)
{
dataType_ = dataType;
setParameter("DataType", dataType);
}
std::string CreateRuleRequest::getName()const
{
return name_;
}
void CreateRuleRequest::setName(const std::string& name)
{
name_ = name;
setParameter("Name", name);
}
std::string CreateRuleRequest::getWhere()const
{
return where_;
}
void CreateRuleRequest::setWhere(const std::string& where)
{
where_ = where;
setParameter("Where", where);
}
std::string CreateRuleRequest::getProductKey()const
{
return productKey_;
}
void CreateRuleRequest::setProductKey(const std::string& productKey)
{
productKey_ = productKey;
setParameter("ProductKey", productKey);
}
std::string CreateRuleRequest::getAccessKeyId()const
{
return accessKeyId_;
}
void CreateRuleRequest::setAccessKeyId(const std::string& accessKeyId)
{
accessKeyId_ = accessKeyId;
setParameter("AccessKeyId", accessKeyId);
}
std::string CreateRuleRequest::getShortTopic()const
{
return shortTopic_;
}
void CreateRuleRequest::setShortTopic(const std::string& shortTopic)
{
shortTopic_ = shortTopic;
setParameter("ShortTopic", shortTopic);
}

View File

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

View File

@@ -0,0 +1,72 @@
/*
* Copyright 2009-2017 Alibaba Cloud All rights reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#include <alibabacloud/iot/model/CreateTopicRouteTableRequest.h>
using AlibabaCloud::Iot::Model::CreateTopicRouteTableRequest;
CreateTopicRouteTableRequest::CreateTopicRouteTableRequest() :
RpcServiceRequest("iot", "2017-04-20", "CreateTopicRouteTable")
{}
CreateTopicRouteTableRequest::~CreateTopicRouteTableRequest()
{}
std::vector<std::string> CreateTopicRouteTableRequest::getDstTopic()const
{
return dstTopic_;
}
void CreateTopicRouteTableRequest::setDstTopic(const std::vector<std::string>& dstTopic)
{
dstTopic_ = dstTopic;
for(int i = 0; i!= dstTopic.size(); i++)
setParameter("DstTopic."+ std::to_string(i), dstTopic.at(i));
}
std::string CreateTopicRouteTableRequest::getRegionId()const
{
return regionId_;
}
void CreateTopicRouteTableRequest::setRegionId(const std::string& regionId)
{
regionId_ = regionId;
setParameter("RegionId", regionId);
}
std::string CreateTopicRouteTableRequest::getAccessKeyId()const
{
return accessKeyId_;
}
void CreateTopicRouteTableRequest::setAccessKeyId(const std::string& accessKeyId)
{
accessKeyId_ = accessKeyId;
setParameter("AccessKeyId", accessKeyId);
}
std::string CreateTopicRouteTableRequest::getSrcTopic()const
{
return srcTopic_;
}
void CreateTopicRouteTableRequest::setSrcTopic(const std::string& srcTopic)
{
srcTopic_ = srcTopic;
setParameter("SrcTopic", srcTopic);
}

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/CreateTopicRouteTableResult.h>
#include <json/json.h>
using namespace AlibabaCloud::Iot;
using namespace AlibabaCloud::Iot::Model;
CreateTopicRouteTableResult::CreateTopicRouteTableResult() :
ServiceResult()
{}
CreateTopicRouteTableResult::CreateTopicRouteTableResult(const std::string &payload) :
ServiceResult()
{
parse(payload);
}
CreateTopicRouteTableResult::~CreateTopicRouteTableResult()
{}
void CreateTopicRouteTableResult::parse(const std::string &payload)
{
Json::Reader reader;
Json::Value value;
reader.parse(payload, value);
setRequestId(value["RequestId"].asString());
auto allFailureTopics = value["FailureTopics"]["Topic"];
for (const auto &item : allFailureTopics)
failureTopics_.push_back(item.asString());
if(!value["Success"].isNull())
success_ = value["Success"].asString() == "true";
if(!value["Code"].isNull())
code_ = value["Code"].asString();
if(!value["IsAllSucceed"].isNull())
isAllSucceed_ = value["IsAllSucceed"].asString() == "true";
if(!value["ErrorMessage"].isNull())
errorMessage_ = value["ErrorMessage"].asString();
}
std::vector<std::string> CreateTopicRouteTableResult::getFailureTopics()const
{
return failureTopics_;
}
std::string CreateTopicRouteTableResult::getErrorMessage()const
{
return errorMessage_;
}
std::string CreateTopicRouteTableResult::getCode()const
{
return code_;
}
bool CreateTopicRouteTableResult::getSuccess()const
{
return success_;
}
bool CreateTopicRouteTableResult::getIsAllSucceed()const
{
return isAllSucceed_;
}

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/DeleteDevicePropRequest.h>
using AlibabaCloud::Iot::Model::DeleteDevicePropRequest;
DeleteDevicePropRequest::DeleteDevicePropRequest() :
RpcServiceRequest("iot", "2017-04-20", "DeleteDeviceProp")
{}
DeleteDevicePropRequest::~DeleteDevicePropRequest()
{}
std::string DeleteDevicePropRequest::getDeviceName()const
{
return deviceName_;
}
void DeleteDevicePropRequest::setDeviceName(const std::string& deviceName)
{
deviceName_ = deviceName;
setParameter("DeviceName", deviceName);
}
std::string DeleteDevicePropRequest::getProductKey()const
{
return productKey_;
}
void DeleteDevicePropRequest::setProductKey(const std::string& productKey)
{
productKey_ = productKey;
setParameter("ProductKey", productKey);
}
std::string DeleteDevicePropRequest::getAccessKeyId()const
{
return accessKeyId_;
}
void DeleteDevicePropRequest::setAccessKeyId(const std::string& accessKeyId)
{
accessKeyId_ = accessKeyId;
setParameter("AccessKeyId", accessKeyId);
}
std::string DeleteDevicePropRequest::getPropKey()const
{
return propKey_;
}
void DeleteDevicePropRequest::setPropKey(const std::string& propKey)
{
propKey_ = propKey;
setParameter("PropKey", propKey);
}

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/DeleteDevicePropResult.h>
#include <json/json.h>
using namespace AlibabaCloud::Iot;
using namespace AlibabaCloud::Iot::Model;
DeleteDevicePropResult::DeleteDevicePropResult() :
ServiceResult()
{}
DeleteDevicePropResult::DeleteDevicePropResult(const std::string &payload) :
ServiceResult()
{
parse(payload);
}
DeleteDevicePropResult::~DeleteDevicePropResult()
{}
void DeleteDevicePropResult::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 DeleteDevicePropResult::getErrorMessage()const
{
return errorMessage_;
}
std::string DeleteDevicePropResult::getCode()const
{
return code_;
}
bool DeleteDevicePropResult::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/DeleteDeviceRequest.h>
using AlibabaCloud::Iot::Model::DeleteDeviceRequest;
DeleteDeviceRequest::DeleteDeviceRequest() :
RpcServiceRequest("iot", "2018-01-20", "DeleteDevice")
{}
DeleteDeviceRequest::~DeleteDeviceRequest()
{}
std::string DeleteDeviceRequest::getIotId()const
{
return iotId_;
}
void DeleteDeviceRequest::setIotId(const std::string& iotId)
{
iotId_ = iotId;
setParameter("IotId", iotId);
}
std::string DeleteDeviceRequest::getDeviceName()const
{
return deviceName_;
}
void DeleteDeviceRequest::setDeviceName(const std::string& deviceName)
{
deviceName_ = deviceName;
setParameter("DeviceName", deviceName);
}
std::string DeleteDeviceRequest::getProductKey()const
{
return productKey_;
}
void DeleteDeviceRequest::setProductKey(const std::string& productKey)
{
productKey_ = productKey;
setParameter("ProductKey", productKey);
}
std::string DeleteDeviceRequest::getAccessKeyId()const
{
return accessKeyId_;
}
void DeleteDeviceRequest::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/DeleteDeviceResult.h>
#include <json/json.h>
using namespace AlibabaCloud::Iot;
using namespace AlibabaCloud::Iot::Model;
DeleteDeviceResult::DeleteDeviceResult() :
ServiceResult()
{}
DeleteDeviceResult::DeleteDeviceResult(const std::string &payload) :
ServiceResult()
{
parse(payload);
}
DeleteDeviceResult::~DeleteDeviceResult()
{}
void DeleteDeviceResult::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 DeleteDeviceResult::getErrorMessage()const
{
return errorMessage_;
}
std::string DeleteDeviceResult::getCode()const
{
return code_;
}
bool DeleteDeviceResult::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/DeleteProductTopicRequest.h>
using AlibabaCloud::Iot::Model::DeleteProductTopicRequest;
DeleteProductTopicRequest::DeleteProductTopicRequest() :
RpcServiceRequest("iot", "2017-04-20", "DeleteProductTopic")
{}
DeleteProductTopicRequest::~DeleteProductTopicRequest()
{}
std::string DeleteProductTopicRequest::getTopicId()const
{
return topicId_;
}
void DeleteProductTopicRequest::setTopicId(const std::string& topicId)
{
topicId_ = topicId;
setParameter("TopicId", topicId);
}
std::string DeleteProductTopicRequest::getAccessKeyId()const
{
return accessKeyId_;
}
void DeleteProductTopicRequest::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/DeleteProductTopicResult.h>
#include <json/json.h>
using namespace AlibabaCloud::Iot;
using namespace AlibabaCloud::Iot::Model;
DeleteProductTopicResult::DeleteProductTopicResult() :
ServiceResult()
{}
DeleteProductTopicResult::DeleteProductTopicResult(const std::string &payload) :
ServiceResult()
{
parse(payload);
}
DeleteProductTopicResult::~DeleteProductTopicResult()
{}
void DeleteProductTopicResult::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 DeleteProductTopicResult::getErrorMessage()const
{
return errorMessage_;
}
std::string DeleteProductTopicResult::getCode()const
{
return code_;
}
bool DeleteProductTopicResult::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/DeleteRuleActionRequest.h>
using AlibabaCloud::Iot::Model::DeleteRuleActionRequest;
DeleteRuleActionRequest::DeleteRuleActionRequest() :
RpcServiceRequest("iot", "2017-04-20", "DeleteRuleAction")
{}
DeleteRuleActionRequest::~DeleteRuleActionRequest()
{}
long DeleteRuleActionRequest::getActionId()const
{
return actionId_;
}
void DeleteRuleActionRequest::setActionId(long actionId)
{
actionId_ = actionId;
setParameter("ActionId", std::to_string(actionId));
}
std::string DeleteRuleActionRequest::getAccessKeyId()const
{
return accessKeyId_;
}
void DeleteRuleActionRequest::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/DeleteRuleActionResult.h>
#include <json/json.h>
using namespace AlibabaCloud::Iot;
using namespace AlibabaCloud::Iot::Model;
DeleteRuleActionResult::DeleteRuleActionResult() :
ServiceResult()
{}
DeleteRuleActionResult::DeleteRuleActionResult(const std::string &payload) :
ServiceResult()
{
parse(payload);
}
DeleteRuleActionResult::~DeleteRuleActionResult()
{}
void DeleteRuleActionResult::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 DeleteRuleActionResult::getErrorMessage()const
{
return errorMessage_;
}
std::string DeleteRuleActionResult::getCode()const
{
return code_;
}
bool DeleteRuleActionResult::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/DeleteRuleRequest.h>
using AlibabaCloud::Iot::Model::DeleteRuleRequest;
DeleteRuleRequest::DeleteRuleRequest() :
RpcServiceRequest("iot", "2017-04-20", "DeleteRule")
{}
DeleteRuleRequest::~DeleteRuleRequest()
{}
long DeleteRuleRequest::getRuleId()const
{
return ruleId_;
}
void DeleteRuleRequest::setRuleId(long ruleId)
{
ruleId_ = ruleId;
setParameter("RuleId", std::to_string(ruleId));
}
std::string DeleteRuleRequest::getAccessKeyId()const
{
return accessKeyId_;
}
void DeleteRuleRequest::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/DeleteRuleResult.h>
#include <json/json.h>
using namespace AlibabaCloud::Iot;
using namespace AlibabaCloud::Iot::Model;
DeleteRuleResult::DeleteRuleResult() :
ServiceResult()
{}
DeleteRuleResult::DeleteRuleResult(const std::string &payload) :
ServiceResult()
{
parse(payload);
}
DeleteRuleResult::~DeleteRuleResult()
{}
void DeleteRuleResult::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 DeleteRuleResult::getErrorMessage()const
{
return errorMessage_;
}
std::string DeleteRuleResult::getCode()const
{
return code_;
}
bool DeleteRuleResult::getSuccess()const
{
return success_;
}

View File

@@ -0,0 +1,72 @@
/*
* Copyright 2009-2017 Alibaba Cloud All rights reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#include <alibabacloud/iot/model/DeleteTopicRouteTableRequest.h>
using AlibabaCloud::Iot::Model::DeleteTopicRouteTableRequest;
DeleteTopicRouteTableRequest::DeleteTopicRouteTableRequest() :
RpcServiceRequest("iot", "2017-04-20", "DeleteTopicRouteTable")
{}
DeleteTopicRouteTableRequest::~DeleteTopicRouteTableRequest()
{}
std::vector<std::string> DeleteTopicRouteTableRequest::getDstTopic()const
{
return dstTopic_;
}
void DeleteTopicRouteTableRequest::setDstTopic(const std::vector<std::string>& dstTopic)
{
dstTopic_ = dstTopic;
for(int i = 0; i!= dstTopic.size(); i++)
setParameter("DstTopic."+ std::to_string(i), dstTopic.at(i));
}
std::string DeleteTopicRouteTableRequest::getRegionId()const
{
return regionId_;
}
void DeleteTopicRouteTableRequest::setRegionId(const std::string& regionId)
{
regionId_ = regionId;
setParameter("RegionId", regionId);
}
std::string DeleteTopicRouteTableRequest::getAccessKeyId()const
{
return accessKeyId_;
}
void DeleteTopicRouteTableRequest::setAccessKeyId(const std::string& accessKeyId)
{
accessKeyId_ = accessKeyId;
setParameter("AccessKeyId", accessKeyId);
}
std::string DeleteTopicRouteTableRequest::getSrcTopic()const
{
return srcTopic_;
}
void DeleteTopicRouteTableRequest::setSrcTopic(const std::string& srcTopic)
{
srcTopic_ = srcTopic;
setParameter("SrcTopic", srcTopic);
}

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/DeleteTopicRouteTableResult.h>
#include <json/json.h>
using namespace AlibabaCloud::Iot;
using namespace AlibabaCloud::Iot::Model;
DeleteTopicRouteTableResult::DeleteTopicRouteTableResult() :
ServiceResult()
{}
DeleteTopicRouteTableResult::DeleteTopicRouteTableResult(const std::string &payload) :
ServiceResult()
{
parse(payload);
}
DeleteTopicRouteTableResult::~DeleteTopicRouteTableResult()
{}
void DeleteTopicRouteTableResult::parse(const std::string &payload)
{
Json::Reader reader;
Json::Value value;
reader.parse(payload, value);
setRequestId(value["RequestId"].asString());
auto allFailureTopics = value["FailureTopics"]["Topic"];
for (const auto &item : allFailureTopics)
failureTopics_.push_back(item.asString());
if(!value["Success"].isNull())
success_ = value["Success"].asString() == "true";
if(!value["Code"].isNull())
code_ = value["Code"].asString();
if(!value["IsAllSucceed"].isNull())
isAllSucceed_ = value["IsAllSucceed"].asString() == "true";
if(!value["ErrorMessage"].isNull())
errorMessage_ = value["ErrorMessage"].asString();
}
std::vector<std::string> DeleteTopicRouteTableResult::getFailureTopics()const
{
return failureTopics_;
}
std::string DeleteTopicRouteTableResult::getErrorMessage()const
{
return errorMessage_;
}
std::string DeleteTopicRouteTableResult::getCode()const
{
return code_;
}
bool DeleteTopicRouteTableResult::getSuccess()const
{
return success_;
}
bool DeleteTopicRouteTableResult::getIsAllSucceed()const
{
return isAllSucceed_;
}

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/DisableThingRequest.h>
using AlibabaCloud::Iot::Model::DisableThingRequest;
DisableThingRequest::DisableThingRequest() :
RpcServiceRequest("iot", "2018-01-20", "DisableThing")
{}
DisableThingRequest::~DisableThingRequest()
{}
std::string DisableThingRequest::getIotId()const
{
return iotId_;
}
void DisableThingRequest::setIotId(const std::string& iotId)
{
iotId_ = iotId;
setParameter("IotId", iotId);
}
std::string DisableThingRequest::getDeviceName()const
{
return deviceName_;
}
void DisableThingRequest::setDeviceName(const std::string& deviceName)
{
deviceName_ = deviceName;
setParameter("DeviceName", deviceName);
}
std::string DisableThingRequest::getProductKey()const
{
return productKey_;
}
void DisableThingRequest::setProductKey(const std::string& productKey)
{
productKey_ = productKey;
setParameter("ProductKey", productKey);
}
std::string DisableThingRequest::getAccessKeyId()const
{
return accessKeyId_;
}
void DisableThingRequest::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/DisableThingResult.h>
#include <json/json.h>
using namespace AlibabaCloud::Iot;
using namespace AlibabaCloud::Iot::Model;
DisableThingResult::DisableThingResult() :
ServiceResult()
{}
DisableThingResult::DisableThingResult(const std::string &payload) :
ServiceResult()
{
parse(payload);
}
DisableThingResult::~DisableThingResult()
{}
void DisableThingResult::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 DisableThingResult::getErrorMessage()const
{
return errorMessage_;
}
std::string DisableThingResult::getCode()const
{
return code_;
}
bool DisableThingResult::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/EnableThingRequest.h>
using AlibabaCloud::Iot::Model::EnableThingRequest;
EnableThingRequest::EnableThingRequest() :
RpcServiceRequest("iot", "2018-01-20", "EnableThing")
{}
EnableThingRequest::~EnableThingRequest()
{}
std::string EnableThingRequest::getIotId()const
{
return iotId_;
}
void EnableThingRequest::setIotId(const std::string& iotId)
{
iotId_ = iotId;
setParameter("IotId", iotId);
}
std::string EnableThingRequest::getDeviceName()const
{
return deviceName_;
}
void EnableThingRequest::setDeviceName(const std::string& deviceName)
{
deviceName_ = deviceName;
setParameter("DeviceName", deviceName);
}
std::string EnableThingRequest::getProductKey()const
{
return productKey_;
}
void EnableThingRequest::setProductKey(const std::string& productKey)
{
productKey_ = productKey;
setParameter("ProductKey", productKey);
}
std::string EnableThingRequest::getAccessKeyId()const
{
return accessKeyId_;
}
void EnableThingRequest::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/EnableThingResult.h>
#include <json/json.h>
using namespace AlibabaCloud::Iot;
using namespace AlibabaCloud::Iot::Model;
EnableThingResult::EnableThingResult() :
ServiceResult()
{}
EnableThingResult::EnableThingResult(const std::string &payload) :
ServiceResult()
{
parse(payload);
}
EnableThingResult::~EnableThingResult()
{}
void EnableThingResult::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 EnableThingResult::getErrorMessage()const
{
return errorMessage_;
}
std::string EnableThingResult::getCode()const
{
return code_;
}
bool EnableThingResult::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/GetDeviceShadowRequest.h>
using AlibabaCloud::Iot::Model::GetDeviceShadowRequest;
GetDeviceShadowRequest::GetDeviceShadowRequest() :
RpcServiceRequest("iot", "2017-04-20", "GetDeviceShadow")
{}
GetDeviceShadowRequest::~GetDeviceShadowRequest()
{}
std::string GetDeviceShadowRequest::getShadowMessage()const
{
return shadowMessage_;
}
void GetDeviceShadowRequest::setShadowMessage(const std::string& shadowMessage)
{
shadowMessage_ = shadowMessage;
setParameter("ShadowMessage", shadowMessage);
}
std::string GetDeviceShadowRequest::getDeviceName()const
{
return deviceName_;
}
void GetDeviceShadowRequest::setDeviceName(const std::string& deviceName)
{
deviceName_ = deviceName;
setParameter("DeviceName", deviceName);
}
std::string GetDeviceShadowRequest::getProductKey()const
{
return productKey_;
}
void GetDeviceShadowRequest::setProductKey(const std::string& productKey)
{
productKey_ = productKey;
setParameter("ProductKey", productKey);
}
std::string GetDeviceShadowRequest::getAccessKeyId()const
{
return accessKeyId_;
}
void GetDeviceShadowRequest::setAccessKeyId(const std::string& accessKeyId)
{
accessKeyId_ = accessKeyId;
setParameter("AccessKeyId", accessKeyId);
}

View File

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

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/GetDeviceStatusRequest.h>
using AlibabaCloud::Iot::Model::GetDeviceStatusRequest;
GetDeviceStatusRequest::GetDeviceStatusRequest() :
RpcServiceRequest("iot", "2018-01-20", "GetDeviceStatus")
{}
GetDeviceStatusRequest::~GetDeviceStatusRequest()
{}
std::string GetDeviceStatusRequest::getIotId()const
{
return iotId_;
}
void GetDeviceStatusRequest::setIotId(const std::string& iotId)
{
iotId_ = iotId;
setParameter("IotId", iotId);
}
std::string GetDeviceStatusRequest::getDeviceName()const
{
return deviceName_;
}
void GetDeviceStatusRequest::setDeviceName(const std::string& deviceName)
{
deviceName_ = deviceName;
setParameter("DeviceName", deviceName);
}
std::string GetDeviceStatusRequest::getProductKey()const
{
return productKey_;
}
void GetDeviceStatusRequest::setProductKey(const std::string& productKey)
{
productKey_ = productKey;
setParameter("ProductKey", productKey);
}
std::string GetDeviceStatusRequest::getAccessKeyId()const
{
return accessKeyId_;
}
void GetDeviceStatusRequest::setAccessKeyId(const std::string& accessKeyId)
{
accessKeyId_ = accessKeyId;
setParameter("AccessKeyId", accessKeyId);
}

View File

@@ -0,0 +1,74 @@
/*
* 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/GetDeviceStatusResult.h>
#include <json/json.h>
using namespace AlibabaCloud::Iot;
using namespace AlibabaCloud::Iot::Model;
GetDeviceStatusResult::GetDeviceStatusResult() :
ServiceResult()
{}
GetDeviceStatusResult::GetDeviceStatusResult(const std::string &payload) :
ServiceResult()
{
parse(payload);
}
GetDeviceStatusResult::~GetDeviceStatusResult()
{}
void GetDeviceStatusResult::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["Status"].isNull())
data_.status = dataNode["Status"].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();
}
GetDeviceStatusResult::Data GetDeviceStatusResult::getData()const
{
return data_;
}
std::string GetDeviceStatusResult::getErrorMessage()const
{
return errorMessage_;
}
std::string GetDeviceStatusResult::getCode()const
{
return code_;
}
bool GetDeviceStatusResult::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/GetGatewayBySubDeviceRequest.h>
using AlibabaCloud::Iot::Model::GetGatewayBySubDeviceRequest;
GetGatewayBySubDeviceRequest::GetGatewayBySubDeviceRequest() :
RpcServiceRequest("iot", "2018-01-20", "GetGatewayBySubDevice")
{}
GetGatewayBySubDeviceRequest::~GetGatewayBySubDeviceRequest()
{}
std::string GetGatewayBySubDeviceRequest::getIotId()const
{
return iotId_;
}
void GetGatewayBySubDeviceRequest::setIotId(const std::string& iotId)
{
iotId_ = iotId;
setParameter("IotId", iotId);
}
std::string GetGatewayBySubDeviceRequest::getDeviceName()const
{
return deviceName_;
}
void GetGatewayBySubDeviceRequest::setDeviceName(const std::string& deviceName)
{
deviceName_ = deviceName;
setParameter("DeviceName", deviceName);
}
std::string GetGatewayBySubDeviceRequest::getProductKey()const
{
return productKey_;
}
void GetGatewayBySubDeviceRequest::setProductKey(const std::string& productKey)
{
productKey_ = productKey;
setParameter("ProductKey", productKey);
}
std::string GetGatewayBySubDeviceRequest::getAccessKeyId()const
{
return accessKeyId_;
}
void GetGatewayBySubDeviceRequest::setAccessKeyId(const std::string& accessKeyId)
{
accessKeyId_ = accessKeyId;
setParameter("AccessKeyId", accessKeyId);
}

View File

@@ -0,0 +1,104 @@
/*
* 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/GetGatewayBySubDeviceResult.h>
#include <json/json.h>
using namespace AlibabaCloud::Iot;
using namespace AlibabaCloud::Iot::Model;
GetGatewayBySubDeviceResult::GetGatewayBySubDeviceResult() :
ServiceResult()
{}
GetGatewayBySubDeviceResult::GetGatewayBySubDeviceResult(const std::string &payload) :
ServiceResult()
{
parse(payload);
}
GetGatewayBySubDeviceResult::~GetGatewayBySubDeviceResult()
{}
void GetGatewayBySubDeviceResult::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["ProductKey"].isNull())
data_.productKey = dataNode["ProductKey"].asString();
if(!dataNode["ProductName"].isNull())
data_.productName = dataNode["ProductName"].asString();
if(!dataNode["DeviceSecret"].isNull())
data_.deviceSecret = dataNode["DeviceSecret"].asString();
if(!dataNode["DeviceName"].isNull())
data_.deviceName = dataNode["DeviceName"].asString();
if(!dataNode["FirmwareVersion"].isNull())
data_.firmwareVersion = dataNode["FirmwareVersion"].asString();
if(!dataNode["GmtCreate"].isNull())
data_.gmtCreate = dataNode["GmtCreate"].asString();
if(!dataNode["UtcCreate"].isNull())
data_.utcCreate = dataNode["UtcCreate"].asString();
if(!dataNode["GmtActive"].isNull())
data_.gmtActive = dataNode["GmtActive"].asString();
if(!dataNode["UtcActive"].isNull())
data_.utcActive = dataNode["UtcActive"].asString();
if(!dataNode["GmtOnline"].isNull())
data_.gmtOnline = dataNode["GmtOnline"].asString();
if(!dataNode["UtcOnline"].isNull())
data_.utcOnline = dataNode["UtcOnline"].asString();
if(!dataNode["Status"].isNull())
data_.status = dataNode["Status"].asString();
if(!dataNode["IpAddress"].isNull())
data_.ipAddress = dataNode["IpAddress"].asString();
if(!dataNode["NodeType"].isNull())
data_.nodeType = dataNode["NodeType"].asString();
if(!dataNode["region"].isNull())
data_.region = dataNode["region"].asString();
if(!dataNode["iotId"].isNull())
data_.iotId = dataNode["iotId"].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();
}
GetGatewayBySubDeviceResult::Data GetGatewayBySubDeviceResult::getData()const
{
return data_;
}
std::string GetGatewayBySubDeviceResult::getErrorMessage()const
{
return errorMessage_;
}
std::string GetGatewayBySubDeviceResult::getCode()const
{
return code_;
}
bool GetGatewayBySubDeviceResult::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/GetRuleActionRequest.h>
using AlibabaCloud::Iot::Model::GetRuleActionRequest;
GetRuleActionRequest::GetRuleActionRequest() :
RpcServiceRequest("iot", "2017-04-20", "GetRuleAction")
{}
GetRuleActionRequest::~GetRuleActionRequest()
{}
long GetRuleActionRequest::getActionId()const
{
return actionId_;
}
void GetRuleActionRequest::setActionId(long actionId)
{
actionId_ = actionId;
setParameter("ActionId", std::to_string(actionId));
}
std::string GetRuleActionRequest::getAccessKeyId()const
{
return accessKeyId_;
}
void GetRuleActionRequest::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/GetRuleActionResult.h>
#include <json/json.h>
using namespace AlibabaCloud::Iot;
using namespace AlibabaCloud::Iot::Model;
GetRuleActionResult::GetRuleActionResult() :
ServiceResult()
{}
GetRuleActionResult::GetRuleActionResult(const std::string &payload) :
ServiceResult()
{
parse(payload);
}
GetRuleActionResult::~GetRuleActionResult()
{}
void GetRuleActionResult::parse(const std::string &payload)
{
Json::Reader reader;
Json::Value value;
reader.parse(payload, value);
setRequestId(value["RequestId"].asString());
auto ruleActionInfoNode = value["RuleActionInfo"];
if(!ruleActionInfoNode["Id"].isNull())
ruleActionInfo_.id = std::stol(ruleActionInfoNode["Id"].asString());
if(!ruleActionInfoNode["RuleId"].isNull())
ruleActionInfo_.ruleId = std::stol(ruleActionInfoNode["RuleId"].asString());
if(!ruleActionInfoNode["Type"].isNull())
ruleActionInfo_.type = ruleActionInfoNode["Type"].asString();
if(!ruleActionInfoNode["Configuration"].isNull())
ruleActionInfo_.configuration = ruleActionInfoNode["Configuration"].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();
}
GetRuleActionResult::RuleActionInfo GetRuleActionResult::getRuleActionInfo()const
{
return ruleActionInfo_;
}
std::string GetRuleActionResult::getErrorMessage()const
{
return errorMessage_;
}
std::string GetRuleActionResult::getCode()const
{
return code_;
}
bool GetRuleActionResult::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/GetRuleRequest.h>
using AlibabaCloud::Iot::Model::GetRuleRequest;
GetRuleRequest::GetRuleRequest() :
RpcServiceRequest("iot", "2017-04-20", "GetRule")
{}
GetRuleRequest::~GetRuleRequest()
{}
long GetRuleRequest::getRuleId()const
{
return ruleId_;
}
void GetRuleRequest::setRuleId(long ruleId)
{
ruleId_ = ruleId;
setParameter("RuleId", std::to_string(ruleId));
}
std::string GetRuleRequest::getAccessKeyId()const
{
return accessKeyId_;
}
void GetRuleRequest::setAccessKeyId(const std::string& accessKeyId)
{
accessKeyId_ = accessKeyId;
setParameter("AccessKeyId", accessKeyId);
}

View File

@@ -0,0 +1,98 @@
/*
* 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/GetRuleResult.h>
#include <json/json.h>
using namespace AlibabaCloud::Iot;
using namespace AlibabaCloud::Iot::Model;
GetRuleResult::GetRuleResult() :
ServiceResult()
{}
GetRuleResult::GetRuleResult(const std::string &payload) :
ServiceResult()
{
parse(payload);
}
GetRuleResult::~GetRuleResult()
{}
void GetRuleResult::parse(const std::string &payload)
{
Json::Reader reader;
Json::Value value;
reader.parse(payload, value);
setRequestId(value["RequestId"].asString());
auto ruleInfoNode = value["RuleInfo"];
if(!ruleInfoNode["Id"].isNull())
ruleInfo_.id = std::stol(ruleInfoNode["Id"].asString());
if(!ruleInfoNode["Select"].isNull())
ruleInfo_.select = ruleInfoNode["Select"].asString();
if(!ruleInfoNode["Topic"].isNull())
ruleInfo_.topic = ruleInfoNode["Topic"].asString();
if(!ruleInfoNode["ShortTopic"].isNull())
ruleInfo_.shortTopic = ruleInfoNode["ShortTopic"].asString();
if(!ruleInfoNode["Where"].isNull())
ruleInfo_.where = ruleInfoNode["Where"].asString();
if(!ruleInfoNode["Status"].isNull())
ruleInfo_.status = ruleInfoNode["Status"].asString();
if(!ruleInfoNode["CreateUserId"].isNull())
ruleInfo_.createUserId = std::stol(ruleInfoNode["CreateUserId"].asString());
if(!ruleInfoNode["ProductKey"].isNull())
ruleInfo_.productKey = ruleInfoNode["ProductKey"].asString();
if(!ruleInfoNode["Name"].isNull())
ruleInfo_.name = ruleInfoNode["Name"].asString();
if(!ruleInfoNode["RuleDesc"].isNull())
ruleInfo_.ruleDesc = ruleInfoNode["RuleDesc"].asString();
if(!ruleInfoNode["Created"].isNull())
ruleInfo_.created = ruleInfoNode["Created"].asString();
if(!ruleInfoNode["DataType"].isNull())
ruleInfo_.dataType = ruleInfoNode["DataType"].asString();
if(!ruleInfoNode["Modified"].isNull())
ruleInfo_.modified = ruleInfoNode["Modified"].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();
}
GetRuleResult::RuleInfo GetRuleResult::getRuleInfo()const
{
return ruleInfo_;
}
std::string GetRuleResult::getErrorMessage()const
{
return errorMessage_;
}
std::string GetRuleResult::getCode()const
{
return code_;
}
bool GetRuleResult::getSuccess()const
{
return success_;
}

View File

@@ -0,0 +1,93 @@
/*
* 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/GetThingTopoRequest.h>
using AlibabaCloud::Iot::Model::GetThingTopoRequest;
GetThingTopoRequest::GetThingTopoRequest() :
RpcServiceRequest("iot", "2018-01-20", "GetThingTopo")
{}
GetThingTopoRequest::~GetThingTopoRequest()
{}
std::string GetThingTopoRequest::getIotId()const
{
return iotId_;
}
void GetThingTopoRequest::setIotId(const std::string& iotId)
{
iotId_ = iotId;
setParameter("IotId", iotId);
}
int GetThingTopoRequest::getPageNo()const
{
return pageNo_;
}
void GetThingTopoRequest::setPageNo(int pageNo)
{
pageNo_ = pageNo;
setParameter("PageNo", std::to_string(pageNo));
}
int GetThingTopoRequest::getPageSize()const
{
return pageSize_;
}
void GetThingTopoRequest::setPageSize(int pageSize)
{
pageSize_ = pageSize;
setParameter("PageSize", std::to_string(pageSize));
}
std::string GetThingTopoRequest::getDeviceName()const
{
return deviceName_;
}
void GetThingTopoRequest::setDeviceName(const std::string& deviceName)
{
deviceName_ = deviceName;
setParameter("DeviceName", deviceName);
}
std::string GetThingTopoRequest::getProductKey()const
{
return productKey_;
}
void GetThingTopoRequest::setProductKey(const std::string& productKey)
{
productKey_ = productKey;
setParameter("ProductKey", productKey);
}
std::string GetThingTopoRequest::getAccessKeyId()const
{
return accessKeyId_;
}
void GetThingTopoRequest::setAccessKeyId(const std::string& accessKeyId)
{
accessKeyId_ = accessKeyId;
setParameter("AccessKeyId", accessKeyId);
}

View File

@@ -0,0 +1,92 @@
/*
* 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/GetThingTopoResult.h>
#include <json/json.h>
using namespace AlibabaCloud::Iot;
using namespace AlibabaCloud::Iot::Model;
GetThingTopoResult::GetThingTopoResult() :
ServiceResult()
{}
GetThingTopoResult::GetThingTopoResult(const std::string &payload) :
ServiceResult()
{
parse(payload);
}
GetThingTopoResult::~GetThingTopoResult()
{}
void GetThingTopoResult::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["Total"].isNull())
data_.total = std::stol(dataNode["Total"].asString());
if(!dataNode["CurrentPage"].isNull())
data_.currentPage = std::stoi(dataNode["CurrentPage"].asString());
if(!dataNode["PageSize"].isNull())
data_.pageSize = std::stoi(dataNode["PageSize"].asString());
if(!dataNode["PageCount"].isNull())
data_.pageCount = std::stol(dataNode["PageCount"].asString());
auto allList = value["List"]["deviceInfo"];
for (auto value : allList)
{
Data::DeviceInfo deviceInfoObject;
if(!value["IotId"].isNull())
deviceInfoObject.iotId = value["IotId"].asString();
if(!value["ProductKey"].isNull())
deviceInfoObject.productKey = value["ProductKey"].asString();
if(!value["DeviceName"].isNull())
deviceInfoObject.deviceName = value["DeviceName"].asString();
data_.list.push_back(deviceInfoObject);
}
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();
}
GetThingTopoResult::Data GetThingTopoResult::getData()const
{
return data_;
}
std::string GetThingTopoResult::getErrorMessage()const
{
return errorMessage_;
}
std::string GetThingTopoResult::getCode()const
{
return code_;
}
bool GetThingTopoResult::getSuccess()const
{
return success_;
}

View File

@@ -0,0 +1,93 @@
/*
* 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/InvokeThingServiceRequest.h>
using AlibabaCloud::Iot::Model::InvokeThingServiceRequest;
InvokeThingServiceRequest::InvokeThingServiceRequest() :
RpcServiceRequest("iot", "2018-01-20", "InvokeThingService")
{}
InvokeThingServiceRequest::~InvokeThingServiceRequest()
{}
std::string InvokeThingServiceRequest::getArgs()const
{
return args_;
}
void InvokeThingServiceRequest::setArgs(const std::string& args)
{
args_ = args;
setParameter("Args", args);
}
std::string InvokeThingServiceRequest::getIdentifier()const
{
return identifier_;
}
void InvokeThingServiceRequest::setIdentifier(const std::string& identifier)
{
identifier_ = identifier;
setParameter("Identifier", identifier);
}
std::string InvokeThingServiceRequest::getIotId()const
{
return iotId_;
}
void InvokeThingServiceRequest::setIotId(const std::string& iotId)
{
iotId_ = iotId;
setParameter("IotId", iotId);
}
std::string InvokeThingServiceRequest::getDeviceName()const
{
return deviceName_;
}
void InvokeThingServiceRequest::setDeviceName(const std::string& deviceName)
{
deviceName_ = deviceName;
setParameter("DeviceName", deviceName);
}
std::string InvokeThingServiceRequest::getProductKey()const
{
return productKey_;
}
void InvokeThingServiceRequest::setProductKey(const std::string& productKey)
{
productKey_ = productKey;
setParameter("ProductKey", productKey);
}
std::string InvokeThingServiceRequest::getAccessKeyId()const
{
return accessKeyId_;
}
void InvokeThingServiceRequest::setAccessKeyId(const std::string& accessKeyId)
{
accessKeyId_ = accessKeyId;
setParameter("AccessKeyId", accessKeyId);
}

View File

@@ -0,0 +1,76 @@
/*
* 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/InvokeThingServiceResult.h>
#include <json/json.h>
using namespace AlibabaCloud::Iot;
using namespace AlibabaCloud::Iot::Model;
InvokeThingServiceResult::InvokeThingServiceResult() :
ServiceResult()
{}
InvokeThingServiceResult::InvokeThingServiceResult(const std::string &payload) :
ServiceResult()
{
parse(payload);
}
InvokeThingServiceResult::~InvokeThingServiceResult()
{}
void InvokeThingServiceResult::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["Result"].isNull())
data_.result = dataNode["Result"].asString();
if(!dataNode["MessageId"].isNull())
data_.messageId = dataNode["MessageId"].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();
}
InvokeThingServiceResult::Data InvokeThingServiceResult::getData()const
{
return data_;
}
std::string InvokeThingServiceResult::getErrorMessage()const
{
return errorMessage_;
}
std::string InvokeThingServiceResult::getCode()const
{
return code_;
}
bool InvokeThingServiceResult::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/ListRuleActionsRequest.h>
using AlibabaCloud::Iot::Model::ListRuleActionsRequest;
ListRuleActionsRequest::ListRuleActionsRequest() :
RpcServiceRequest("iot", "2017-04-20", "ListRuleActions")
{}
ListRuleActionsRequest::~ListRuleActionsRequest()
{}
long ListRuleActionsRequest::getRuleId()const
{
return ruleId_;
}
void ListRuleActionsRequest::setRuleId(long ruleId)
{
ruleId_ = ruleId;
setParameter("RuleId", std::to_string(ruleId));
}
std::string ListRuleActionsRequest::getAccessKeyId()const
{
return accessKeyId_;
}
void ListRuleActionsRequest::setAccessKeyId(const std::string& accessKeyId)
{
accessKeyId_ = accessKeyId;
setParameter("AccessKeyId", accessKeyId);
}

View 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/ListRuleActionsResult.h>
#include <json/json.h>
using namespace AlibabaCloud::Iot;
using namespace AlibabaCloud::Iot::Model;
ListRuleActionsResult::ListRuleActionsResult() :
ServiceResult()
{}
ListRuleActionsResult::ListRuleActionsResult(const std::string &payload) :
ServiceResult()
{
parse(payload);
}
ListRuleActionsResult::~ListRuleActionsResult()
{}
void ListRuleActionsResult::parse(const std::string &payload)
{
Json::Reader reader;
Json::Value value;
reader.parse(payload, value);
setRequestId(value["RequestId"].asString());
auto allRuleActionList = value["RuleActionList"]["RuleActionInfo"];
for (auto value : allRuleActionList)
{
RuleActionInfo ruleActionListObject;
if(!value["Id"].isNull())
ruleActionListObject.id = std::stol(value["Id"].asString());
if(!value["RuleId"].isNull())
ruleActionListObject.ruleId = std::stol(value["RuleId"].asString());
if(!value["Type"].isNull())
ruleActionListObject.type = value["Type"].asString();
if(!value["Configuration"].isNull())
ruleActionListObject.configuration = value["Configuration"].asString();
ruleActionList_.push_back(ruleActionListObject);
}
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<ListRuleActionsResult::RuleActionInfo> ListRuleActionsResult::getRuleActionList()const
{
return ruleActionList_;
}
std::string ListRuleActionsResult::getErrorMessage()const
{
return errorMessage_;
}
std::string ListRuleActionsResult::getCode()const
{
return code_;
}
bool ListRuleActionsResult::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/ListRuleRequest.h>
using AlibabaCloud::Iot::Model::ListRuleRequest;
ListRuleRequest::ListRuleRequest() :
RpcServiceRequest("iot", "2017-04-20", "ListRule")
{}
ListRuleRequest::~ListRuleRequest()
{}
int ListRuleRequest::getPageSize()const
{
return pageSize_;
}
void ListRuleRequest::setPageSize(int pageSize)
{
pageSize_ = pageSize;
setParameter("PageSize", std::to_string(pageSize));
}
int ListRuleRequest::getCurrentPage()const
{
return currentPage_;
}
void ListRuleRequest::setCurrentPage(int currentPage)
{
currentPage_ = currentPage;
setParameter("CurrentPage", std::to_string(currentPage));
}
std::string ListRuleRequest::getAccessKeyId()const
{
return accessKeyId_;
}
void ListRuleRequest::setAccessKeyId(const std::string& accessKeyId)
{
accessKeyId_ = accessKeyId;
setParameter("AccessKeyId", accessKeyId);
}

View File

@@ -0,0 +1,124 @@
/*
* 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/ListRuleResult.h>
#include <json/json.h>
using namespace AlibabaCloud::Iot;
using namespace AlibabaCloud::Iot::Model;
ListRuleResult::ListRuleResult() :
ServiceResult()
{}
ListRuleResult::ListRuleResult(const std::string &payload) :
ServiceResult()
{
parse(payload);
}
ListRuleResult::~ListRuleResult()
{}
void ListRuleResult::parse(const std::string &payload)
{
Json::Reader reader;
Json::Value value;
reader.parse(payload, value);
setRequestId(value["RequestId"].asString());
auto allData = value["Data"]["RuleInfo"];
for (auto value : allData)
{
RuleInfo dataObject;
if(!value["Id"].isNull())
dataObject.id = std::stol(value["Id"].asString());
if(!value["Select"].isNull())
dataObject.select = value["Select"].asString();
if(!value["Topic"].isNull())
dataObject.topic = value["Topic"].asString();
if(!value["ShortTopic"].isNull())
dataObject.shortTopic = value["ShortTopic"].asString();
if(!value["Where"].isNull())
dataObject.where = value["Where"].asString();
if(!value["Status"].isNull())
dataObject.status = value["Status"].asString();
if(!value["CreateUserId"].isNull())
dataObject.createUserId = std::stol(value["CreateUserId"].asString());
if(!value["ProductKey"].isNull())
dataObject.productKey = value["ProductKey"].asString();
if(!value["Name"].isNull())
dataObject.name = value["Name"].asString();
if(!value["DataType"].isNull())
dataObject.dataType = value["DataType"].asString();
if(!value["RuleDesc"].isNull())
dataObject.ruleDesc = value["RuleDesc"].asString();
if(!value["Created"].isNull())
dataObject.created = value["Created"].asString();
if(!value["Modified"].isNull())
dataObject.modified = value["Modified"].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["PageSize"].isNull())
pageSize_ = std::stoi(value["PageSize"].asString());
if(!value["Page"].isNull())
page_ = std::stoi(value["Page"].asString());
if(!value["Total"].isNull())
total_ = std::stoi(value["Total"].asString());
}
int ListRuleResult::getPageSize()const
{
return pageSize_;
}
int ListRuleResult::getTotal()const
{
return total_;
}
std::vector<ListRuleResult::RuleInfo> ListRuleResult::getData()const
{
return data_;
}
int ListRuleResult::getPage()const
{
return page_;
}
std::string ListRuleResult::getErrorMessage()const
{
return errorMessage_;
}
std::string ListRuleResult::getCode()const
{
return code_;
}
bool ListRuleResult::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/NotifyAddThingTopoRequest.h>
using AlibabaCloud::Iot::Model::NotifyAddThingTopoRequest;
NotifyAddThingTopoRequest::NotifyAddThingTopoRequest() :
RpcServiceRequest("iot", "2018-01-20", "NotifyAddThingTopo")
{}
NotifyAddThingTopoRequest::~NotifyAddThingTopoRequest()
{}
std::string NotifyAddThingTopoRequest::getGwProductKey()const
{
return gwProductKey_;
}
void NotifyAddThingTopoRequest::setGwProductKey(const std::string& gwProductKey)
{
gwProductKey_ = gwProductKey;
setParameter("GwProductKey", gwProductKey);
}
std::string NotifyAddThingTopoRequest::getGwDeviceName()const
{
return gwDeviceName_;
}
void NotifyAddThingTopoRequest::setGwDeviceName(const std::string& gwDeviceName)
{
gwDeviceName_ = gwDeviceName;
setParameter("GwDeviceName", gwDeviceName);
}
std::string NotifyAddThingTopoRequest::getGwIotId()const
{
return gwIotId_;
}
void NotifyAddThingTopoRequest::setGwIotId(const std::string& gwIotId)
{
gwIotId_ = gwIotId;
setParameter("GwIotId", gwIotId);
}
std::string NotifyAddThingTopoRequest::getDeviceListStr()const
{
return deviceListStr_;
}
void NotifyAddThingTopoRequest::setDeviceListStr(const std::string& deviceListStr)
{
deviceListStr_ = deviceListStr;
setParameter("DeviceListStr", deviceListStr);
}
std::string NotifyAddThingTopoRequest::getAccessKeyId()const
{
return accessKeyId_;
}
void NotifyAddThingTopoRequest::setAccessKeyId(const std::string& accessKeyId)
{
accessKeyId_ = accessKeyId;
setParameter("AccessKeyId", accessKeyId);
}

View File

@@ -0,0 +1,74 @@
/*
* 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/NotifyAddThingTopoResult.h>
#include <json/json.h>
using namespace AlibabaCloud::Iot;
using namespace AlibabaCloud::Iot::Model;
NotifyAddThingTopoResult::NotifyAddThingTopoResult() :
ServiceResult()
{}
NotifyAddThingTopoResult::NotifyAddThingTopoResult(const std::string &payload) :
ServiceResult()
{
parse(payload);
}
NotifyAddThingTopoResult::~NotifyAddThingTopoResult()
{}
void NotifyAddThingTopoResult::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["MessageId"].isNull())
data_.messageId = dataNode["MessageId"].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();
}
NotifyAddThingTopoResult::Data NotifyAddThingTopoResult::getData()const
{
return data_;
}
std::string NotifyAddThingTopoResult::getErrorMessage()const
{
return errorMessage_;
}
std::string NotifyAddThingTopoResult::getCode()const
{
return code_;
}
bool NotifyAddThingTopoResult::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/PubBroadcastRequest.h>
using AlibabaCloud::Iot::Model::PubBroadcastRequest;
PubBroadcastRequest::PubBroadcastRequest() :
RpcServiceRequest("iot", "2017-04-20", "PubBroadcast")
{}
PubBroadcastRequest::~PubBroadcastRequest()
{}
std::string PubBroadcastRequest::getTopicFullName()const
{
return topicFullName_;
}
void PubBroadcastRequest::setTopicFullName(const std::string& topicFullName)
{
topicFullName_ = topicFullName;
setParameter("TopicFullName", topicFullName);
}
std::string PubBroadcastRequest::getMessageContent()const
{
return messageContent_;
}
void PubBroadcastRequest::setMessageContent(const std::string& messageContent)
{
messageContent_ = messageContent;
setParameter("MessageContent", messageContent);
}
std::string PubBroadcastRequest::getProductKey()const
{
return productKey_;
}
void PubBroadcastRequest::setProductKey(const std::string& productKey)
{
productKey_ = productKey;
setParameter("ProductKey", productKey);
}
std::string PubBroadcastRequest::getAccessKeyId()const
{
return accessKeyId_;
}
void PubBroadcastRequest::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/PubBroadcastResult.h>
#include <json/json.h>
using namespace AlibabaCloud::Iot;
using namespace AlibabaCloud::Iot::Model;
PubBroadcastResult::PubBroadcastResult() :
ServiceResult()
{}
PubBroadcastResult::PubBroadcastResult(const std::string &payload) :
ServiceResult()
{
parse(payload);
}
PubBroadcastResult::~PubBroadcastResult()
{}
void PubBroadcastResult::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 PubBroadcastResult::getErrorMessage()const
{
return errorMessage_;
}
std::string PubBroadcastResult::getCode()const
{
return code_;
}
bool PubBroadcastResult::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/PubRequest.h>
using AlibabaCloud::Iot::Model::PubRequest;
PubRequest::PubRequest() :
RpcServiceRequest("iot", "2017-04-20", "Pub")
{}
PubRequest::~PubRequest()
{}
std::string PubRequest::getTopicFullName()const
{
return topicFullName_;
}
void PubRequest::setTopicFullName(const std::string& topicFullName)
{
topicFullName_ = topicFullName;
setParameter("TopicFullName", topicFullName);
}
int PubRequest::getQos()const
{
return qos_;
}
void PubRequest::setQos(int qos)
{
qos_ = qos;
setParameter("Qos", std::to_string(qos));
}
std::string PubRequest::getMessageContent()const
{
return messageContent_;
}
void PubRequest::setMessageContent(const std::string& messageContent)
{
messageContent_ = messageContent;
setParameter("MessageContent", messageContent);
}
std::string PubRequest::getProductKey()const
{
return productKey_;
}
void PubRequest::setProductKey(const std::string& productKey)
{
productKey_ = productKey;
setParameter("ProductKey", productKey);
}
std::string PubRequest::getAccessKeyId()const
{
return accessKeyId_;
}
void PubRequest::setAccessKeyId(const std::string& accessKeyId)
{
accessKeyId_ = accessKeyId;
setParameter("AccessKeyId", accessKeyId);
}

View File

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

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/QueryApplyStatusRequest.h>
using AlibabaCloud::Iot::Model::QueryApplyStatusRequest;
QueryApplyStatusRequest::QueryApplyStatusRequest() :
RpcServiceRequest("iot", "2017-04-20", "QueryApplyStatus")
{}
QueryApplyStatusRequest::~QueryApplyStatusRequest()
{}
long QueryApplyStatusRequest::getApplyId()const
{
return applyId_;
}
void QueryApplyStatusRequest::setApplyId(long applyId)
{
applyId_ = applyId;
setParameter("ApplyId", std::to_string(applyId));
}
std::string QueryApplyStatusRequest::getAccessKeyId()const
{
return accessKeyId_;
}
void QueryApplyStatusRequest::setAccessKeyId(const std::string& accessKeyId)
{
accessKeyId_ = accessKeyId;
setParameter("AccessKeyId", accessKeyId);
}

View File

@@ -0,0 +1,73 @@
/*
* Copyright 2009-2017 Alibaba Cloud All rights reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#include <alibabacloud/iot/model/QueryApplyStatusResult.h>
#include <json/json.h>
using namespace AlibabaCloud::Iot;
using namespace AlibabaCloud::Iot::Model;
QueryApplyStatusResult::QueryApplyStatusResult() :
ServiceResult()
{}
QueryApplyStatusResult::QueryApplyStatusResult(const std::string &payload) :
ServiceResult()
{
parse(payload);
}
QueryApplyStatusResult::~QueryApplyStatusResult()
{}
void QueryApplyStatusResult::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["Finish"].isNull())
finish_ = value["Finish"].asString() == "true";
}
std::string QueryApplyStatusResult::getErrorMessage()const
{
return errorMessage_;
}
std::string QueryApplyStatusResult::getCode()const
{
return code_;
}
bool QueryApplyStatusResult::getFinish()const
{
return finish_;
}
bool QueryApplyStatusResult::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/QueryBatchRegisterDeviceStatusRequest.h>
using AlibabaCloud::Iot::Model::QueryBatchRegisterDeviceStatusRequest;
QueryBatchRegisterDeviceStatusRequest::QueryBatchRegisterDeviceStatusRequest() :
RpcServiceRequest("iot", "2018-01-20", "QueryBatchRegisterDeviceStatus")
{}
QueryBatchRegisterDeviceStatusRequest::~QueryBatchRegisterDeviceStatusRequest()
{}
long QueryBatchRegisterDeviceStatusRequest::getApplyId()const
{
return applyId_;
}
void QueryBatchRegisterDeviceStatusRequest::setApplyId(long applyId)
{
applyId_ = applyId;
setParameter("ApplyId", std::to_string(applyId));
}
std::string QueryBatchRegisterDeviceStatusRequest::getProductKey()const
{
return productKey_;
}
void QueryBatchRegisterDeviceStatusRequest::setProductKey(const std::string& productKey)
{
productKey_ = productKey;
setParameter("ProductKey", productKey);
}
std::string QueryBatchRegisterDeviceStatusRequest::getAccessKeyId()const
{
return accessKeyId_;
}
void QueryBatchRegisterDeviceStatusRequest::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/QueryBatchRegisterDeviceStatusResult.h>
#include <json/json.h>
using namespace AlibabaCloud::Iot;
using namespace AlibabaCloud::Iot::Model;
QueryBatchRegisterDeviceStatusResult::QueryBatchRegisterDeviceStatusResult() :
ServiceResult()
{}
QueryBatchRegisterDeviceStatusResult::QueryBatchRegisterDeviceStatusResult(const std::string &payload) :
ServiceResult()
{
parse(payload);
}
QueryBatchRegisterDeviceStatusResult::~QueryBatchRegisterDeviceStatusResult()
{}
void QueryBatchRegisterDeviceStatusResult::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["Status"].isNull())
data_.status = dataNode["Status"].asString();
auto allValidList = dataNode["ValidList"]["Name"];
for (auto value : allValidList)
data_.validList.push_back(value.asString());
auto allInvalidList = dataNode["InvalidList"]["Name"];
for (auto value : allInvalidList)
data_.invalidList.push_back(value.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();
}
QueryBatchRegisterDeviceStatusResult::Data QueryBatchRegisterDeviceStatusResult::getData()const
{
return data_;
}
std::string QueryBatchRegisterDeviceStatusResult::getErrorMessage()const
{
return errorMessage_;
}
std::string QueryBatchRegisterDeviceStatusResult::getCode()const
{
return code_;
}
bool QueryBatchRegisterDeviceStatusResult::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/QueryDeviceByNameRequest.h>
using AlibabaCloud::Iot::Model::QueryDeviceByNameRequest;
QueryDeviceByNameRequest::QueryDeviceByNameRequest() :
RpcServiceRequest("iot", "2017-04-20", "QueryDeviceByName")
{}
QueryDeviceByNameRequest::~QueryDeviceByNameRequest()
{}
std::string QueryDeviceByNameRequest::getDeviceName()const
{
return deviceName_;
}
void QueryDeviceByNameRequest::setDeviceName(const std::string& deviceName)
{
deviceName_ = deviceName;
setParameter("DeviceName", deviceName);
}
std::string QueryDeviceByNameRequest::getProductKey()const
{
return productKey_;
}
void QueryDeviceByNameRequest::setProductKey(const std::string& productKey)
{
productKey_ = productKey;
setParameter("ProductKey", productKey);
}
std::string QueryDeviceByNameRequest::getAccessKeyId()const
{
return accessKeyId_;
}
void QueryDeviceByNameRequest::setAccessKeyId(const std::string& accessKeyId)
{
accessKeyId_ = accessKeyId;
setParameter("AccessKeyId", accessKeyId);
}

View File

@@ -0,0 +1,90 @@
/*
* 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/QueryDeviceByNameResult.h>
#include <json/json.h>
using namespace AlibabaCloud::Iot;
using namespace AlibabaCloud::Iot::Model;
QueryDeviceByNameResult::QueryDeviceByNameResult() :
ServiceResult()
{}
QueryDeviceByNameResult::QueryDeviceByNameResult(const std::string &payload) :
ServiceResult()
{
parse(payload);
}
QueryDeviceByNameResult::~QueryDeviceByNameResult()
{}
void QueryDeviceByNameResult::parse(const std::string &payload)
{
Json::Reader reader;
Json::Value value;
reader.parse(payload, value);
setRequestId(value["RequestId"].asString());
auto deviceInfoNode = value["DeviceInfo"];
if(!deviceInfoNode["DeviceId"].isNull())
deviceInfo_.deviceId = deviceInfoNode["DeviceId"].asString();
if(!deviceInfoNode["DeviceSecret"].isNull())
deviceInfo_.deviceSecret = deviceInfoNode["DeviceSecret"].asString();
if(!deviceInfoNode["ProductKey"].isNull())
deviceInfo_.productKey = deviceInfoNode["ProductKey"].asString();
if(!deviceInfoNode["DeviceStatus"].isNull())
deviceInfo_.deviceStatus = deviceInfoNode["DeviceStatus"].asString();
if(!deviceInfoNode["DeviceName"].isNull())
deviceInfo_.deviceName = deviceInfoNode["DeviceName"].asString();
if(!deviceInfoNode["DeviceType"].isNull())
deviceInfo_.deviceType = deviceInfoNode["DeviceType"].asString();
if(!deviceInfoNode["ClientIp"].isNull())
deviceInfo_.clientIp = deviceInfoNode["ClientIp"].asString();
if(!deviceInfoNode["GmtCreate"].isNull())
deviceInfo_.gmtCreate = deviceInfoNode["GmtCreate"].asString();
if(!deviceInfoNode["GmtModified"].isNull())
deviceInfo_.gmtModified = deviceInfoNode["GmtModified"].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();
}
QueryDeviceByNameResult::DeviceInfo QueryDeviceByNameResult::getDeviceInfo()const
{
return deviceInfo_;
}
std::string QueryDeviceByNameResult::getErrorMessage()const
{
return errorMessage_;
}
std::string QueryDeviceByNameResult::getCode()const
{
return code_;
}
bool QueryDeviceByNameResult::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/QueryDeviceDetailRequest.h>
using AlibabaCloud::Iot::Model::QueryDeviceDetailRequest;
QueryDeviceDetailRequest::QueryDeviceDetailRequest() :
RpcServiceRequest("iot", "2018-01-20", "QueryDeviceDetail")
{}
QueryDeviceDetailRequest::~QueryDeviceDetailRequest()
{}
std::string QueryDeviceDetailRequest::getIotId()const
{
return iotId_;
}
void QueryDeviceDetailRequest::setIotId(const std::string& iotId)
{
iotId_ = iotId;
setParameter("IotId", iotId);
}
std::string QueryDeviceDetailRequest::getDeviceName()const
{
return deviceName_;
}
void QueryDeviceDetailRequest::setDeviceName(const std::string& deviceName)
{
deviceName_ = deviceName;
setParameter("DeviceName", deviceName);
}
std::string QueryDeviceDetailRequest::getProductKey()const
{
return productKey_;
}
void QueryDeviceDetailRequest::setProductKey(const std::string& productKey)
{
productKey_ = productKey;
setParameter("ProductKey", productKey);
}
std::string QueryDeviceDetailRequest::getAccessKeyId()const
{
return accessKeyId_;
}
void QueryDeviceDetailRequest::setAccessKeyId(const std::string& accessKeyId)
{
accessKeyId_ = accessKeyId;
setParameter("AccessKeyId", accessKeyId);
}

View File

@@ -0,0 +1,104 @@
/*
* 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/QueryDeviceDetailResult.h>
#include <json/json.h>
using namespace AlibabaCloud::Iot;
using namespace AlibabaCloud::Iot::Model;
QueryDeviceDetailResult::QueryDeviceDetailResult() :
ServiceResult()
{}
QueryDeviceDetailResult::QueryDeviceDetailResult(const std::string &payload) :
ServiceResult()
{
parse(payload);
}
QueryDeviceDetailResult::~QueryDeviceDetailResult()
{}
void QueryDeviceDetailResult::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["IotId"].isNull())
data_.iotId = dataNode["IotId"].asString();
if(!dataNode["ProductKey"].isNull())
data_.productKey = dataNode["ProductKey"].asString();
if(!dataNode["ProductName"].isNull())
data_.productName = dataNode["ProductName"].asString();
if(!dataNode["DeviceName"].isNull())
data_.deviceName = dataNode["DeviceName"].asString();
if(!dataNode["DeviceSecret"].isNull())
data_.deviceSecret = dataNode["DeviceSecret"].asString();
if(!dataNode["FirmwareVersion"].isNull())
data_.firmwareVersion = dataNode["FirmwareVersion"].asString();
if(!dataNode["GmtCreate"].isNull())
data_.gmtCreate = dataNode["GmtCreate"].asString();
if(!dataNode["UtcCreate"].isNull())
data_.utcCreate = dataNode["UtcCreate"].asString();
if(!dataNode["GmtActive"].isNull())
data_.gmtActive = dataNode["GmtActive"].asString();
if(!dataNode["UtcActive"].isNull())
data_.utcActive = dataNode["UtcActive"].asString();
if(!dataNode["GmtOnline"].isNull())
data_.gmtOnline = dataNode["GmtOnline"].asString();
if(!dataNode["UtcOnline"].isNull())
data_.utcOnline = dataNode["UtcOnline"].asString();
if(!dataNode["Status"].isNull())
data_.status = dataNode["Status"].asString();
if(!dataNode["IpAddress"].isNull())
data_.ipAddress = dataNode["IpAddress"].asString();
if(!dataNode["NodeType"].isNull())
data_.nodeType = std::stoi(dataNode["NodeType"].asString());
if(!dataNode["Region"].isNull())
data_.region = dataNode["Region"].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();
}
QueryDeviceDetailResult::Data QueryDeviceDetailResult::getData()const
{
return data_;
}
std::string QueryDeviceDetailResult::getErrorMessage()const
{
return errorMessage_;
}
std::string QueryDeviceDetailResult::getCode()const
{
return code_;
}
bool QueryDeviceDetailResult::getSuccess()const
{
return success_;
}

View File

@@ -0,0 +1,137 @@
/*
* 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/QueryDeviceEventDataRequest.h>
using AlibabaCloud::Iot::Model::QueryDeviceEventDataRequest;
QueryDeviceEventDataRequest::QueryDeviceEventDataRequest() :
RpcServiceRequest("iot", "2018-01-20", "QueryDeviceEventData")
{}
QueryDeviceEventDataRequest::~QueryDeviceEventDataRequest()
{}
int QueryDeviceEventDataRequest::getAsc()const
{
return asc_;
}
void QueryDeviceEventDataRequest::setAsc(int asc)
{
asc_ = asc;
setParameter("Asc", std::to_string(asc));
}
std::string QueryDeviceEventDataRequest::getIdentifier()const
{
return identifier_;
}
void QueryDeviceEventDataRequest::setIdentifier(const std::string& identifier)
{
identifier_ = identifier;
setParameter("Identifier", identifier);
}
std::string QueryDeviceEventDataRequest::getIotId()const
{
return iotId_;
}
void QueryDeviceEventDataRequest::setIotId(const std::string& iotId)
{
iotId_ = iotId;
setParameter("IotId", iotId);
}
int QueryDeviceEventDataRequest::getPageSize()const
{
return pageSize_;
}
void QueryDeviceEventDataRequest::setPageSize(int pageSize)
{
pageSize_ = pageSize;
setParameter("PageSize", std::to_string(pageSize));
}
long QueryDeviceEventDataRequest::getEndTime()const
{
return endTime_;
}
void QueryDeviceEventDataRequest::setEndTime(long endTime)
{
endTime_ = endTime;
setParameter("EndTime", std::to_string(endTime));
}
std::string QueryDeviceEventDataRequest::getEventType()const
{
return eventType_;
}
void QueryDeviceEventDataRequest::setEventType(const std::string& eventType)
{
eventType_ = eventType;
setParameter("EventType", eventType);
}
std::string QueryDeviceEventDataRequest::getDeviceName()const
{
return deviceName_;
}
void QueryDeviceEventDataRequest::setDeviceName(const std::string& deviceName)
{
deviceName_ = deviceName;
setParameter("DeviceName", deviceName);
}
long QueryDeviceEventDataRequest::getStartTime()const
{
return startTime_;
}
void QueryDeviceEventDataRequest::setStartTime(long startTime)
{
startTime_ = startTime;
setParameter("StartTime", std::to_string(startTime));
}
std::string QueryDeviceEventDataRequest::getProductKey()const
{
return productKey_;
}
void QueryDeviceEventDataRequest::setProductKey(const std::string& productKey)
{
productKey_ = productKey;
setParameter("ProductKey", productKey);
}
std::string QueryDeviceEventDataRequest::getAccessKeyId()const
{
return accessKeyId_;
}
void QueryDeviceEventDataRequest::setAccessKeyId(const std::string& accessKeyId)
{
accessKeyId_ = accessKeyId;
setParameter("AccessKeyId", accessKeyId);
}

View File

@@ -0,0 +1,92 @@
/*
* 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/QueryDeviceEventDataResult.h>
#include <json/json.h>
using namespace AlibabaCloud::Iot;
using namespace AlibabaCloud::Iot::Model;
QueryDeviceEventDataResult::QueryDeviceEventDataResult() :
ServiceResult()
{}
QueryDeviceEventDataResult::QueryDeviceEventDataResult(const std::string &payload) :
ServiceResult()
{
parse(payload);
}
QueryDeviceEventDataResult::~QueryDeviceEventDataResult()
{}
void QueryDeviceEventDataResult::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["NextTime"].isNull())
data_.nextTime = std::stol(dataNode["NextTime"].asString());
if(!dataNode["NextValid"].isNull())
data_.nextValid = dataNode["NextValid"].asString() == "true";
auto allList = value["List"]["EventInfo"];
for (auto value : allList)
{
Data::EventInfo eventInfoObject;
if(!value["Time"].isNull())
eventInfoObject.time = value["Time"].asString();
if(!value["Identifier"].isNull())
eventInfoObject.identifier = value["Identifier"].asString();
if(!value["Name"].isNull())
eventInfoObject.name = value["Name"].asString();
if(!value["EventType"].isNull())
eventInfoObject.eventType = value["EventType"].asString();
if(!value["OutputData"].isNull())
eventInfoObject.outputData = value["OutputData"].asString();
data_.list.push_back(eventInfoObject);
}
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();
}
QueryDeviceEventDataResult::Data QueryDeviceEventDataResult::getData()const
{
return data_;
}
std::string QueryDeviceEventDataResult::getErrorMessage()const
{
return errorMessage_;
}
std::string QueryDeviceEventDataResult::getCode()const
{
return code_;
}
bool QueryDeviceEventDataResult::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/QueryDevicePropRequest.h>
using AlibabaCloud::Iot::Model::QueryDevicePropRequest;
QueryDevicePropRequest::QueryDevicePropRequest() :
RpcServiceRequest("iot", "2017-04-20", "QueryDeviceProp")
{}
QueryDevicePropRequest::~QueryDevicePropRequest()
{}
std::string QueryDevicePropRequest::getDeviceName()const
{
return deviceName_;
}
void QueryDevicePropRequest::setDeviceName(const std::string& deviceName)
{
deviceName_ = deviceName;
setParameter("DeviceName", deviceName);
}
std::string QueryDevicePropRequest::getProductKey()const
{
return productKey_;
}
void QueryDevicePropRequest::setProductKey(const std::string& productKey)
{
productKey_ = productKey;
setParameter("ProductKey", productKey);
}
std::string QueryDevicePropRequest::getAccessKeyId()const
{
return accessKeyId_;
}
void QueryDevicePropRequest::setAccessKeyId(const std::string& accessKeyId)
{
accessKeyId_ = accessKeyId;
setParameter("AccessKeyId", accessKeyId);
}

View File

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

View File

@@ -0,0 +1,126 @@
/*
* 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/QueryDevicePropertyDataRequest.h>
using AlibabaCloud::Iot::Model::QueryDevicePropertyDataRequest;
QueryDevicePropertyDataRequest::QueryDevicePropertyDataRequest() :
RpcServiceRequest("iot", "2018-01-20", "QueryDevicePropertyData")
{}
QueryDevicePropertyDataRequest::~QueryDevicePropertyDataRequest()
{}
int QueryDevicePropertyDataRequest::getAsc()const
{
return asc_;
}
void QueryDevicePropertyDataRequest::setAsc(int asc)
{
asc_ = asc;
setParameter("Asc", std::to_string(asc));
}
std::string QueryDevicePropertyDataRequest::getIdentifier()const
{
return identifier_;
}
void QueryDevicePropertyDataRequest::setIdentifier(const std::string& identifier)
{
identifier_ = identifier;
setParameter("Identifier", identifier);
}
std::string QueryDevicePropertyDataRequest::getIotId()const
{
return iotId_;
}
void QueryDevicePropertyDataRequest::setIotId(const std::string& iotId)
{
iotId_ = iotId;
setParameter("IotId", iotId);
}
int QueryDevicePropertyDataRequest::getPageSize()const
{
return pageSize_;
}
void QueryDevicePropertyDataRequest::setPageSize(int pageSize)
{
pageSize_ = pageSize;
setParameter("PageSize", std::to_string(pageSize));
}
long QueryDevicePropertyDataRequest::getEndTime()const
{
return endTime_;
}
void QueryDevicePropertyDataRequest::setEndTime(long endTime)
{
endTime_ = endTime;
setParameter("EndTime", std::to_string(endTime));
}
std::string QueryDevicePropertyDataRequest::getDeviceName()const
{
return deviceName_;
}
void QueryDevicePropertyDataRequest::setDeviceName(const std::string& deviceName)
{
deviceName_ = deviceName;
setParameter("DeviceName", deviceName);
}
long QueryDevicePropertyDataRequest::getStartTime()const
{
return startTime_;
}
void QueryDevicePropertyDataRequest::setStartTime(long startTime)
{
startTime_ = startTime;
setParameter("StartTime", std::to_string(startTime));
}
std::string QueryDevicePropertyDataRequest::getProductKey()const
{
return productKey_;
}
void QueryDevicePropertyDataRequest::setProductKey(const std::string& productKey)
{
productKey_ = productKey;
setParameter("ProductKey", productKey);
}
std::string QueryDevicePropertyDataRequest::getAccessKeyId()const
{
return accessKeyId_;
}
void QueryDevicePropertyDataRequest::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/QueryDevicePropertyDataResult.h>
#include <json/json.h>
using namespace AlibabaCloud::Iot;
using namespace AlibabaCloud::Iot::Model;
QueryDevicePropertyDataResult::QueryDevicePropertyDataResult() :
ServiceResult()
{}
QueryDevicePropertyDataResult::QueryDevicePropertyDataResult(const std::string &payload) :
ServiceResult()
{
parse(payload);
}
QueryDevicePropertyDataResult::~QueryDevicePropertyDataResult()
{}
void QueryDevicePropertyDataResult::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["NextTime"].isNull())
data_.nextTime = std::stol(dataNode["NextTime"].asString());
auto allList = value["List"]["PropertyInfo"];
for (auto value : allList)
{
Data::PropertyInfo propertyInfoObject;
if(!value["Time"].isNull())
propertyInfoObject.time = value["Time"].asString();
if(!value["Value"].isNull())
propertyInfoObject.value = value["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();
}
QueryDevicePropertyDataResult::Data QueryDevicePropertyDataResult::getData()const
{
return data_;
}
std::string QueryDevicePropertyDataResult::getErrorMessage()const
{
return errorMessage_;
}
std::string QueryDevicePropertyDataResult::getCode()const
{
return code_;
}
bool QueryDevicePropertyDataResult::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/QueryDevicePropertyStatusRequest.h>
using AlibabaCloud::Iot::Model::QueryDevicePropertyStatusRequest;
QueryDevicePropertyStatusRequest::QueryDevicePropertyStatusRequest() :
RpcServiceRequest("iot", "2018-01-20", "QueryDevicePropertyStatus")
{}
QueryDevicePropertyStatusRequest::~QueryDevicePropertyStatusRequest()
{}
std::string QueryDevicePropertyStatusRequest::getIotId()const
{
return iotId_;
}
void QueryDevicePropertyStatusRequest::setIotId(const std::string& iotId)
{
iotId_ = iotId;
setParameter("IotId", iotId);
}
std::string QueryDevicePropertyStatusRequest::getDeviceName()const
{
return deviceName_;
}
void QueryDevicePropertyStatusRequest::setDeviceName(const std::string& deviceName)
{
deviceName_ = deviceName;
setParameter("DeviceName", deviceName);
}
std::string QueryDevicePropertyStatusRequest::getProductKey()const
{
return productKey_;
}
void QueryDevicePropertyStatusRequest::setProductKey(const std::string& productKey)
{
productKey_ = productKey;
setParameter("ProductKey", productKey);
}
std::string QueryDevicePropertyStatusRequest::getAccessKeyId()const
{
return accessKeyId_;
}
void QueryDevicePropertyStatusRequest::setAccessKeyId(const std::string& accessKeyId)
{
accessKeyId_ = accessKeyId;
setParameter("AccessKeyId", accessKeyId);
}

View File

@@ -0,0 +1,90 @@
/*
* 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/QueryDevicePropertyStatusResult.h>
#include <json/json.h>
using namespace AlibabaCloud::Iot;
using namespace AlibabaCloud::Iot::Model;
QueryDevicePropertyStatusResult::QueryDevicePropertyStatusResult() :
ServiceResult()
{}
QueryDevicePropertyStatusResult::QueryDevicePropertyStatusResult(const std::string &payload) :
ServiceResult()
{
parse(payload);
}
QueryDevicePropertyStatusResult::~QueryDevicePropertyStatusResult()
{}
void QueryDevicePropertyStatusResult::parse(const std::string &payload)
{
Json::Reader reader;
Json::Value value;
reader.parse(payload, value);
setRequestId(value["RequestId"].asString());
auto dataNode = value["Data"];
auto allList = value["List"]["PropertyStatusInfo"];
for (auto value : allList)
{
Data::PropertyStatusInfo propertyStatusInfoObject;
if(!value["Unit"].isNull())
propertyStatusInfoObject.unit = value["Unit"].asString();
if(!value["Identifier"].isNull())
propertyStatusInfoObject.identifier = value["Identifier"].asString();
if(!value["DataType"].isNull())
propertyStatusInfoObject.dataType = value["DataType"].asString();
if(!value["Time"].isNull())
propertyStatusInfoObject.time = value["Time"].asString();
if(!value["Value"].isNull())
propertyStatusInfoObject.value = value["Value"].asString();
if(!value["Name"].isNull())
propertyStatusInfoObject.name = value["Name"].asString();
data_.list.push_back(propertyStatusInfoObject);
}
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();
}
QueryDevicePropertyStatusResult::Data QueryDevicePropertyStatusResult::getData()const
{
return data_;
}
std::string QueryDevicePropertyStatusResult::getErrorMessage()const
{
return errorMessage_;
}
std::string QueryDevicePropertyStatusResult::getCode()const
{
return code_;
}
bool QueryDevicePropertyStatusResult::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/QueryDeviceRequest.h>
using AlibabaCloud::Iot::Model::QueryDeviceRequest;
QueryDeviceRequest::QueryDeviceRequest() :
RpcServiceRequest("iot", "2017-04-20", "QueryDevice")
{}
QueryDeviceRequest::~QueryDeviceRequest()
{}
int QueryDeviceRequest::getPageSize()const
{
return pageSize_;
}
void QueryDeviceRequest::setPageSize(int pageSize)
{
pageSize_ = pageSize;
setParameter("PageSize", std::to_string(pageSize));
}
int QueryDeviceRequest::getCurrentPage()const
{
return currentPage_;
}
void QueryDeviceRequest::setCurrentPage(int currentPage)
{
currentPage_ = currentPage;
setParameter("CurrentPage", std::to_string(currentPage));
}
std::string QueryDeviceRequest::getProductKey()const
{
return productKey_;
}
void QueryDeviceRequest::setProductKey(const std::string& productKey)
{
productKey_ = productKey;
setParameter("ProductKey", productKey);
}
std::string QueryDeviceRequest::getAccessKeyId()const
{
return accessKeyId_;
}
void QueryDeviceRequest::setAccessKeyId(const std::string& accessKeyId)
{
accessKeyId_ = accessKeyId;
setParameter("AccessKeyId", accessKeyId);
}

View File

@@ -0,0 +1,121 @@
/*
* 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/QueryDeviceResult.h>
#include <json/json.h>
using namespace AlibabaCloud::Iot;
using namespace AlibabaCloud::Iot::Model;
QueryDeviceResult::QueryDeviceResult() :
ServiceResult()
{}
QueryDeviceResult::QueryDeviceResult(const std::string &payload) :
ServiceResult()
{
parse(payload);
}
QueryDeviceResult::~QueryDeviceResult()
{}
void QueryDeviceResult::parse(const std::string &payload)
{
Json::Reader reader;
Json::Value value;
reader.parse(payload, value);
setRequestId(value["RequestId"].asString());
auto allData = value["Data"]["DeviceInfo"];
for (auto value : allData)
{
DeviceInfo dataObject;
if(!value["DeviceId"].isNull())
dataObject.deviceId = value["DeviceId"].asString();
if(!value["DeviceSecret"].isNull())
dataObject.deviceSecret = value["DeviceSecret"].asString();
if(!value["ProductKey"].isNull())
dataObject.productKey = value["ProductKey"].asString();
if(!value["DeviceStatus"].isNull())
dataObject.deviceStatus = value["DeviceStatus"].asString();
if(!value["DeviceName"].isNull())
dataObject.deviceName = value["DeviceName"].asString();
if(!value["DeviceType"].isNull())
dataObject.deviceType = value["DeviceType"].asString();
if(!value["GmtCreate"].isNull())
dataObject.gmtCreate = value["GmtCreate"].asString();
if(!value["GmtModified"].isNull())
dataObject.gmtModified = value["GmtModified"].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["Total"].isNull())
total_ = std::stoi(value["Total"].asString());
if(!value["PageSize"].isNull())
pageSize_ = std::stoi(value["PageSize"].asString());
if(!value["PageCount"].isNull())
pageCount_ = std::stoi(value["PageCount"].asString());
if(!value["Page"].isNull())
page_ = std::stoi(value["Page"].asString());
}
int QueryDeviceResult::getPageSize()const
{
return pageSize_;
}
int QueryDeviceResult::getPageCount()const
{
return pageCount_;
}
int QueryDeviceResult::getTotal()const
{
return total_;
}
std::vector<QueryDeviceResult::DeviceInfo> QueryDeviceResult::getData()const
{
return data_;
}
int QueryDeviceResult::getPage()const
{
return page_;
}
std::string QueryDeviceResult::getErrorMessage()const
{
return errorMessage_;
}
std::string QueryDeviceResult::getCode()const
{
return code_;
}
bool QueryDeviceResult::getSuccess()const
{
return success_;
}

View File

@@ -0,0 +1,126 @@
/*
* 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/QueryDeviceServiceDataRequest.h>
using AlibabaCloud::Iot::Model::QueryDeviceServiceDataRequest;
QueryDeviceServiceDataRequest::QueryDeviceServiceDataRequest() :
RpcServiceRequest("iot", "2018-01-20", "QueryDeviceServiceData")
{}
QueryDeviceServiceDataRequest::~QueryDeviceServiceDataRequest()
{}
int QueryDeviceServiceDataRequest::getAsc()const
{
return asc_;
}
void QueryDeviceServiceDataRequest::setAsc(int asc)
{
asc_ = asc;
setParameter("Asc", std::to_string(asc));
}
std::string QueryDeviceServiceDataRequest::getIdentifier()const
{
return identifier_;
}
void QueryDeviceServiceDataRequest::setIdentifier(const std::string& identifier)
{
identifier_ = identifier;
setParameter("Identifier", identifier);
}
std::string QueryDeviceServiceDataRequest::getIotId()const
{
return iotId_;
}
void QueryDeviceServiceDataRequest::setIotId(const std::string& iotId)
{
iotId_ = iotId;
setParameter("IotId", iotId);
}
int QueryDeviceServiceDataRequest::getPageSize()const
{
return pageSize_;
}
void QueryDeviceServiceDataRequest::setPageSize(int pageSize)
{
pageSize_ = pageSize;
setParameter("PageSize", std::to_string(pageSize));
}
long QueryDeviceServiceDataRequest::getEndTime()const
{
return endTime_;
}
void QueryDeviceServiceDataRequest::setEndTime(long endTime)
{
endTime_ = endTime;
setParameter("EndTime", std::to_string(endTime));
}
std::string QueryDeviceServiceDataRequest::getDeviceName()const
{
return deviceName_;
}
void QueryDeviceServiceDataRequest::setDeviceName(const std::string& deviceName)
{
deviceName_ = deviceName;
setParameter("DeviceName", deviceName);
}
long QueryDeviceServiceDataRequest::getStartTime()const
{
return startTime_;
}
void QueryDeviceServiceDataRequest::setStartTime(long startTime)
{
startTime_ = startTime;
setParameter("StartTime", std::to_string(startTime));
}
std::string QueryDeviceServiceDataRequest::getProductKey()const
{
return productKey_;
}
void QueryDeviceServiceDataRequest::setProductKey(const std::string& productKey)
{
productKey_ = productKey;
setParameter("ProductKey", productKey);
}
std::string QueryDeviceServiceDataRequest::getAccessKeyId()const
{
return accessKeyId_;
}
void QueryDeviceServiceDataRequest::setAccessKeyId(const std::string& accessKeyId)
{
accessKeyId_ = accessKeyId;
setParameter("AccessKeyId", accessKeyId);
}

View File

@@ -0,0 +1,92 @@
/*
* 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/QueryDeviceServiceDataResult.h>
#include <json/json.h>
using namespace AlibabaCloud::Iot;
using namespace AlibabaCloud::Iot::Model;
QueryDeviceServiceDataResult::QueryDeviceServiceDataResult() :
ServiceResult()
{}
QueryDeviceServiceDataResult::QueryDeviceServiceDataResult(const std::string &payload) :
ServiceResult()
{
parse(payload);
}
QueryDeviceServiceDataResult::~QueryDeviceServiceDataResult()
{}
void QueryDeviceServiceDataResult::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["NextTime"].isNull())
data_.nextTime = std::stol(dataNode["NextTime"].asString());
if(!dataNode["NextValid"].isNull())
data_.nextValid = dataNode["NextValid"].asString() == "true";
auto allList = value["List"]["ServiceInfo"];
for (auto value : allList)
{
Data::ServiceInfo serviceInfoObject;
if(!value["Time"].isNull())
serviceInfoObject.time = value["Time"].asString();
if(!value["Identifier"].isNull())
serviceInfoObject.identifier = value["Identifier"].asString();
if(!value["Name"].isNull())
serviceInfoObject.name = value["Name"].asString();
if(!value["InputData"].isNull())
serviceInfoObject.inputData = value["InputData"].asString();
if(!value["OutputData"].isNull())
serviceInfoObject.outputData = value["OutputData"].asString();
data_.list.push_back(serviceInfoObject);
}
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();
}
QueryDeviceServiceDataResult::Data QueryDeviceServiceDataResult::getData()const
{
return data_;
}
std::string QueryDeviceServiceDataResult::getErrorMessage()const
{
return errorMessage_;
}
std::string QueryDeviceServiceDataResult::getCode()const
{
return code_;
}
bool QueryDeviceServiceDataResult::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/QueryDeviceStatisticsRequest.h>
using AlibabaCloud::Iot::Model::QueryDeviceStatisticsRequest;
QueryDeviceStatisticsRequest::QueryDeviceStatisticsRequest() :
RpcServiceRequest("iot", "2018-01-20", "QueryDeviceStatistics")
{}
QueryDeviceStatisticsRequest::~QueryDeviceStatisticsRequest()
{}
std::string QueryDeviceStatisticsRequest::getProductKey()const
{
return productKey_;
}
void QueryDeviceStatisticsRequest::setProductKey(const std::string& productKey)
{
productKey_ = productKey;
setParameter("ProductKey", productKey);
}
std::string QueryDeviceStatisticsRequest::getAccessKeyId()const
{
return accessKeyId_;
}
void QueryDeviceStatisticsRequest::setAccessKeyId(const std::string& accessKeyId)
{
accessKeyId_ = accessKeyId;
setParameter("AccessKeyId", accessKeyId);
}

View File

@@ -0,0 +1,78 @@
/*
* 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/QueryDeviceStatisticsResult.h>
#include <json/json.h>
using namespace AlibabaCloud::Iot;
using namespace AlibabaCloud::Iot::Model;
QueryDeviceStatisticsResult::QueryDeviceStatisticsResult() :
ServiceResult()
{}
QueryDeviceStatisticsResult::QueryDeviceStatisticsResult(const std::string &payload) :
ServiceResult()
{
parse(payload);
}
QueryDeviceStatisticsResult::~QueryDeviceStatisticsResult()
{}
void QueryDeviceStatisticsResult::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["deviceCount"].isNull())
data_.deviceCount = std::stol(dataNode["deviceCount"].asString());
if(!dataNode["onlineCount"].isNull())
data_.onlineCount = std::stol(dataNode["onlineCount"].asString());
if(!dataNode["activeCount"].isNull())
data_.activeCount = std::stol(dataNode["activeCount"].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();
}
QueryDeviceStatisticsResult::Data QueryDeviceStatisticsResult::getData()const
{
return data_;
}
std::string QueryDeviceStatisticsResult::getErrorMessage()const
{
return errorMessage_;
}
std::string QueryDeviceStatisticsResult::getCode()const
{
return code_;
}
bool QueryDeviceStatisticsResult::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/QueryPageByApplyIdRequest.h>
using AlibabaCloud::Iot::Model::QueryPageByApplyIdRequest;
QueryPageByApplyIdRequest::QueryPageByApplyIdRequest() :
RpcServiceRequest("iot", "2017-04-20", "QueryPageByApplyId")
{}
QueryPageByApplyIdRequest::~QueryPageByApplyIdRequest()
{}
long QueryPageByApplyIdRequest::getApplyId()const
{
return applyId_;
}
void QueryPageByApplyIdRequest::setApplyId(long applyId)
{
applyId_ = applyId;
setParameter("ApplyId", std::to_string(applyId));
}
int QueryPageByApplyIdRequest::getPageSize()const
{
return pageSize_;
}
void QueryPageByApplyIdRequest::setPageSize(int pageSize)
{
pageSize_ = pageSize;
setParameter("PageSize", std::to_string(pageSize));
}
int QueryPageByApplyIdRequest::getCurrentPage()const
{
return currentPage_;
}
void QueryPageByApplyIdRequest::setCurrentPage(int currentPage)
{
currentPage_ = currentPage;
setParameter("CurrentPage", std::to_string(currentPage));
}
std::string QueryPageByApplyIdRequest::getAccessKeyId()const
{
return accessKeyId_;
}
void QueryPageByApplyIdRequest::setAccessKeyId(const std::string& accessKeyId)
{
accessKeyId_ = accessKeyId;
setParameter("AccessKeyId", accessKeyId);
}

View File

@@ -0,0 +1,111 @@
/*
* 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/QueryPageByApplyIdResult.h>
#include <json/json.h>
using namespace AlibabaCloud::Iot;
using namespace AlibabaCloud::Iot::Model;
QueryPageByApplyIdResult::QueryPageByApplyIdResult() :
ServiceResult()
{}
QueryPageByApplyIdResult::QueryPageByApplyIdResult(const std::string &payload) :
ServiceResult()
{
parse(payload);
}
QueryPageByApplyIdResult::~QueryPageByApplyIdResult()
{}
void QueryPageByApplyIdResult::parse(const std::string &payload)
{
Json::Reader reader;
Json::Value value;
reader.parse(payload, value);
setRequestId(value["RequestId"].asString());
auto allApplyDeviceList = value["ApplyDeviceList"]["ApplyDeviceInfo"];
for (auto value : allApplyDeviceList)
{
ApplyDeviceInfo applyDeviceListObject;
if(!value["DeviceId"].isNull())
applyDeviceListObject.deviceId = value["DeviceId"].asString();
if(!value["DeviceName"].isNull())
applyDeviceListObject.deviceName = value["DeviceName"].asString();
if(!value["DeviceSecret"].isNull())
applyDeviceListObject.deviceSecret = value["DeviceSecret"].asString();
applyDeviceList_.push_back(applyDeviceListObject);
}
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["PageSize"].isNull())
pageSize_ = std::stoi(value["PageSize"].asString());
if(!value["Page"].isNull())
page_ = std::stoi(value["Page"].asString());
if(!value["PageCount"].isNull())
pageCount_ = std::stoi(value["PageCount"].asString());
if(!value["Total"].isNull())
total_ = std::stoi(value["Total"].asString());
}
int QueryPageByApplyIdResult::getPageSize()const
{
return pageSize_;
}
int QueryPageByApplyIdResult::getPageCount()const
{
return pageCount_;
}
int QueryPageByApplyIdResult::getTotal()const
{
return total_;
}
int QueryPageByApplyIdResult::getPage()const
{
return page_;
}
std::vector<QueryPageByApplyIdResult::ApplyDeviceInfo> QueryPageByApplyIdResult::getApplyDeviceList()const
{
return applyDeviceList_;
}
std::string QueryPageByApplyIdResult::getErrorMessage()const
{
return errorMessage_;
}
std::string QueryPageByApplyIdResult::getCode()const
{
return code_;
}
bool QueryPageByApplyIdResult::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/QueryProductListRequest.h>
using AlibabaCloud::Iot::Model::QueryProductListRequest;
QueryProductListRequest::QueryProductListRequest() :
RpcServiceRequest("iot", "2018-01-20", "QueryProductList")
{}
QueryProductListRequest::~QueryProductListRequest()
{}
int QueryProductListRequest::getPageSize()const
{
return pageSize_;
}
void QueryProductListRequest::setPageSize(int pageSize)
{
pageSize_ = pageSize;
setParameter("PageSize", std::to_string(pageSize));
}
int QueryProductListRequest::getCurrentPage()const
{
return currentPage_;
}
void QueryProductListRequest::setCurrentPage(int currentPage)
{
currentPage_ = currentPage;
setParameter("CurrentPage", std::to_string(currentPage));
}
std::string QueryProductListRequest::getAliyunCommodityCode()const
{
return aliyunCommodityCode_;
}
void QueryProductListRequest::setAliyunCommodityCode(const std::string& aliyunCommodityCode)
{
aliyunCommodityCode_ = aliyunCommodityCode;
setParameter("AliyunCommodityCode", aliyunCommodityCode);
}
std::string QueryProductListRequest::getAccessKeyId()const
{
return accessKeyId_;
}
void QueryProductListRequest::setAccessKeyId(const std::string& accessKeyId)
{
accessKeyId_ = accessKeyId;
setParameter("AccessKeyId", accessKeyId);
}

View File

@@ -0,0 +1,100 @@
/*
* 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/QueryProductListResult.h>
#include <json/json.h>
using namespace AlibabaCloud::Iot;
using namespace AlibabaCloud::Iot::Model;
QueryProductListResult::QueryProductListResult() :
ServiceResult()
{}
QueryProductListResult::QueryProductListResult(const std::string &payload) :
ServiceResult()
{
parse(payload);
}
QueryProductListResult::~QueryProductListResult()
{}
void QueryProductListResult::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["CurrentPage"].isNull())
data_.currentPage = std::stoi(dataNode["CurrentPage"].asString());
if(!dataNode["PageCount"].isNull())
data_.pageCount = std::stoi(dataNode["PageCount"].asString());
if(!dataNode["PageSize"].isNull())
data_.pageSize = std::stoi(dataNode["PageSize"].asString());
if(!dataNode["Total"].isNull())
data_.total = std::stoi(dataNode["Total"].asString());
auto allList = value["List"]["ProductInfo"];
for (auto value : allList)
{
Data::ProductInfo productInfoObject;
if(!value["GmtCreate"].isNull())
productInfoObject.gmtCreate = std::stol(value["GmtCreate"].asString());
if(!value["DataFormat"].isNull())
productInfoObject.dataFormat = std::stoi(value["DataFormat"].asString());
if(!value["Description"].isNull())
productInfoObject.description = value["Description"].asString();
if(!value["DeviceCount"].isNull())
productInfoObject.deviceCount = std::stoi(value["DeviceCount"].asString());
if(!value["NodeType"].isNull())
productInfoObject.nodeType = std::stoi(value["NodeType"].asString());
if(!value["ProductKey"].isNull())
productInfoObject.productKey = value["ProductKey"].asString();
if(!value["ProductName"].isNull())
productInfoObject.productName = value["ProductName"].asString();
data_.list.push_back(productInfoObject);
}
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();
}
QueryProductListResult::Data QueryProductListResult::getData()const
{
return data_;
}
std::string QueryProductListResult::getErrorMessage()const
{
return errorMessage_;
}
std::string QueryProductListResult::getCode()const
{
return code_;
}
bool QueryProductListResult::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/QueryProductRequest.h>
using AlibabaCloud::Iot::Model::QueryProductRequest;
QueryProductRequest::QueryProductRequest() :
RpcServiceRequest("iot", "2018-01-20", "QueryProduct")
{}
QueryProductRequest::~QueryProductRequest()
{}
std::string QueryProductRequest::getProductKey()const
{
return productKey_;
}
void QueryProductRequest::setProductKey(const std::string& productKey)
{
productKey_ = productKey;
setParameter("ProductKey", productKey);
}
std::string QueryProductRequest::getAccessKeyId()const
{
return accessKeyId_;
}
void QueryProductRequest::setAccessKeyId(const std::string& accessKeyId)
{
accessKeyId_ = accessKeyId;
setParameter("AccessKeyId", accessKeyId);
}

View File

@@ -0,0 +1,96 @@
/*
* 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/QueryProductResult.h>
#include <json/json.h>
using namespace AlibabaCloud::Iot;
using namespace AlibabaCloud::Iot::Model;
QueryProductResult::QueryProductResult() :
ServiceResult()
{}
QueryProductResult::QueryProductResult(const std::string &payload) :
ServiceResult()
{
parse(payload);
}
QueryProductResult::~QueryProductResult()
{}
void QueryProductResult::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["GmtCreate"].isNull())
data_.gmtCreate = std::stol(dataNode["GmtCreate"].asString());
if(!dataNode["DataFormat"].isNull())
data_.dataFormat = std::stoi(dataNode["DataFormat"].asString());
if(!dataNode["Description"].isNull())
data_.description = dataNode["Description"].asString();
if(!dataNode["DeviceCount"].isNull())
data_.deviceCount = std::stoi(dataNode["DeviceCount"].asString());
if(!dataNode["NodeType"].isNull())
data_.nodeType = std::stoi(dataNode["NodeType"].asString());
if(!dataNode["ProductKey"].isNull())
data_.productKey = dataNode["ProductKey"].asString();
if(!dataNode["ProductName"].isNull())
data_.productName = dataNode["ProductName"].asString();
if(!dataNode["ProductSecret"].isNull())
data_.productSecret = dataNode["ProductSecret"].asString();
if(!dataNode["CategoryName"].isNull())
data_.categoryName = dataNode["CategoryName"].asString();
if(!dataNode["CategoryKey"].isNull())
data_.categoryKey = dataNode["CategoryKey"].asString();
if(!dataNode["AliyunCommodityCode"].isNull())
data_.aliyunCommodityCode = dataNode["AliyunCommodityCode"].asString();
if(!dataNode["Id2"].isNull())
data_.id2 = dataNode["Id2"].asString() == "true";
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();
}
QueryProductResult::Data QueryProductResult::getData()const
{
return data_;
}
std::string QueryProductResult::getErrorMessage()const
{
return errorMessage_;
}
std::string QueryProductResult::getCode()const
{
return code_;
}
bool QueryProductResult::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/QueryProductTopicRequest.h>
using AlibabaCloud::Iot::Model::QueryProductTopicRequest;
QueryProductTopicRequest::QueryProductTopicRequest() :
RpcServiceRequest("iot", "2017-04-20", "QueryProductTopic")
{}
QueryProductTopicRequest::~QueryProductTopicRequest()
{}
std::string QueryProductTopicRequest::getProductKey()const
{
return productKey_;
}
void QueryProductTopicRequest::setProductKey(const std::string& productKey)
{
productKey_ = productKey;
setParameter("ProductKey", productKey);
}
std::string QueryProductTopicRequest::getAccessKeyId()const
{
return accessKeyId_;
}
void QueryProductTopicRequest::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/QueryProductTopicResult.h>
#include <json/json.h>
using namespace AlibabaCloud::Iot;
using namespace AlibabaCloud::Iot::Model;
QueryProductTopicResult::QueryProductTopicResult() :
ServiceResult()
{}
QueryProductTopicResult::QueryProductTopicResult(const std::string &payload) :
ServiceResult()
{
parse(payload);
}
QueryProductTopicResult::~QueryProductTopicResult()
{}
void QueryProductTopicResult::parse(const std::string &payload)
{
Json::Reader reader;
Json::Value value;
reader.parse(payload, value);
setRequestId(value["RequestId"].asString());
auto allData = value["Data"]["ProductTopicInfo"];
for (auto value : allData)
{
ProductTopicInfo dataObject;
if(!value["ProductKey"].isNull())
dataObject.productKey = value["ProductKey"].asString();
if(!value["TopicShortName"].isNull())
dataObject.topicShortName = value["TopicShortName"].asString();
if(!value["Operation"].isNull())
dataObject.operation = value["Operation"].asString();
if(!value["Desc"].isNull())
dataObject.desc = value["Desc"].asString();
if(!value["Id"].isNull())
dataObject.id = value["Id"].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<QueryProductTopicResult::ProductTopicInfo> QueryProductTopicResult::getData()const
{
return data_;
}
std::string QueryProductTopicResult::getErrorMessage()const
{
return errorMessage_;
}
std::string QueryProductTopicResult::getCode()const
{
return code_;
}
bool QueryProductTopicResult::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/QueryTopicReverseRouteTableRequest.h>
using AlibabaCloud::Iot::Model::QueryTopicReverseRouteTableRequest;
QueryTopicReverseRouteTableRequest::QueryTopicReverseRouteTableRequest() :
RpcServiceRequest("iot", "2017-04-20", "QueryTopicReverseRouteTable")
{}
QueryTopicReverseRouteTableRequest::~QueryTopicReverseRouteTableRequest()
{}
std::string QueryTopicReverseRouteTableRequest::getRegionId()const
{
return regionId_;
}
void QueryTopicReverseRouteTableRequest::setRegionId(const std::string& regionId)
{
regionId_ = regionId;
setParameter("RegionId", regionId);
}
std::string QueryTopicReverseRouteTableRequest::getTopic()const
{
return topic_;
}
void QueryTopicReverseRouteTableRequest::setTopic(const std::string& topic)
{
topic_ = topic;
setParameter("Topic", topic);
}
std::string QueryTopicReverseRouteTableRequest::getAccessKeyId()const
{
return accessKeyId_;
}
void QueryTopicReverseRouteTableRequest::setAccessKeyId(const std::string& accessKeyId)
{
accessKeyId_ = accessKeyId;
setParameter("AccessKeyId", accessKeyId);
}

View File

@@ -0,0 +1,74 @@
/*
* 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/QueryTopicReverseRouteTableResult.h>
#include <json/json.h>
using namespace AlibabaCloud::Iot;
using namespace AlibabaCloud::Iot::Model;
QueryTopicReverseRouteTableResult::QueryTopicReverseRouteTableResult() :
ServiceResult()
{}
QueryTopicReverseRouteTableResult::QueryTopicReverseRouteTableResult(const std::string &payload) :
ServiceResult()
{
parse(payload);
}
QueryTopicReverseRouteTableResult::~QueryTopicReverseRouteTableResult()
{}
void QueryTopicReverseRouteTableResult::parse(const std::string &payload)
{
Json::Reader reader;
Json::Value value;
reader.parse(payload, value);
setRequestId(value["RequestId"].asString());
auto allSrcTopics = value["SrcTopics"]["Topic"];
for (const auto &item : allSrcTopics)
srcTopics_.push_back(item.asString());
if(!value["Success"].isNull())
success_ = value["Success"].asString() == "true";
if(!value["Code"].isNull())
code_ = value["Code"].asString();
if(!value["ErrorMessage"].isNull())
errorMessage_ = value["ErrorMessage"].asString();
}
std::string QueryTopicReverseRouteTableResult::getErrorMessage()const
{
return errorMessage_;
}
std::string QueryTopicReverseRouteTableResult::getCode()const
{
return code_;
}
std::vector<std::string> QueryTopicReverseRouteTableResult::getSrcTopics()const
{
return srcTopics_;
}
bool QueryTopicReverseRouteTableResult::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/QueryTopicRouteTableRequest.h>
using AlibabaCloud::Iot::Model::QueryTopicRouteTableRequest;
QueryTopicRouteTableRequest::QueryTopicRouteTableRequest() :
RpcServiceRequest("iot", "2017-04-20", "QueryTopicRouteTable")
{}
QueryTopicRouteTableRequest::~QueryTopicRouteTableRequest()
{}
std::string QueryTopicRouteTableRequest::getRegionId()const
{
return regionId_;
}
void QueryTopicRouteTableRequest::setRegionId(const std::string& regionId)
{
regionId_ = regionId;
setParameter("RegionId", regionId);
}
std::string QueryTopicRouteTableRequest::getTopic()const
{
return topic_;
}
void QueryTopicRouteTableRequest::setTopic(const std::string& topic)
{
topic_ = topic;
setParameter("Topic", topic);
}
std::string QueryTopicRouteTableRequest::getAccessKeyId()const
{
return accessKeyId_;
}
void QueryTopicRouteTableRequest::setAccessKeyId(const std::string& accessKeyId)
{
accessKeyId_ = accessKeyId;
setParameter("AccessKeyId", accessKeyId);
}

View File

@@ -0,0 +1,74 @@
/*
* 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/QueryTopicRouteTableResult.h>
#include <json/json.h>
using namespace AlibabaCloud::Iot;
using namespace AlibabaCloud::Iot::Model;
QueryTopicRouteTableResult::QueryTopicRouteTableResult() :
ServiceResult()
{}
QueryTopicRouteTableResult::QueryTopicRouteTableResult(const std::string &payload) :
ServiceResult()
{
parse(payload);
}
QueryTopicRouteTableResult::~QueryTopicRouteTableResult()
{}
void QueryTopicRouteTableResult::parse(const std::string &payload)
{
Json::Reader reader;
Json::Value value;
reader.parse(payload, value);
setRequestId(value["RequestId"].asString());
auto allDstTopics = value["DstTopics"]["Topic"];
for (const auto &item : allDstTopics)
dstTopics_.push_back(item.asString());
if(!value["Success"].isNull())
success_ = value["Success"].asString() == "true";
if(!value["Code"].isNull())
code_ = value["Code"].asString();
if(!value["ErrorMessage"].isNull())
errorMessage_ = value["ErrorMessage"].asString();
}
std::vector<std::string> QueryTopicRouteTableResult::getDstTopics()const
{
return dstTopics_;
}
std::string QueryTopicRouteTableResult::getErrorMessage()const
{
return errorMessage_;
}
std::string QueryTopicRouteTableResult::getCode()const
{
return code_;
}
bool QueryTopicRouteTableResult::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/RRpcRequest.h>
using AlibabaCloud::Iot::Model::RRpcRequest;
RRpcRequest::RRpcRequest() :
RpcServiceRequest("iot", "2017-04-20", "RRpc")
{}
RRpcRequest::~RRpcRequest()
{}
std::string RRpcRequest::getRequestBase64Byte()const
{
return requestBase64Byte_;
}
void RRpcRequest::setRequestBase64Byte(const std::string& requestBase64Byte)
{
requestBase64Byte_ = requestBase64Byte;
setParameter("RequestBase64Byte", requestBase64Byte);
}
std::string RRpcRequest::getDeviceName()const
{
return deviceName_;
}
void RRpcRequest::setDeviceName(const std::string& deviceName)
{
deviceName_ = deviceName;
setParameter("DeviceName", deviceName);
}
std::string RRpcRequest::getProductKey()const
{
return productKey_;
}
void RRpcRequest::setProductKey(const std::string& productKey)
{
productKey_ = productKey;
setParameter("ProductKey", productKey);
}
int RRpcRequest::getTimeout()const
{
return timeout_;
}
void RRpcRequest::setTimeout(int timeout)
{
timeout_ = timeout;
setParameter("Timeout", std::to_string(timeout));
}
std::string RRpcRequest::getAccessKeyId()const
{
return accessKeyId_;
}
void RRpcRequest::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/RRpcResult.h>
#include <json/json.h>
using namespace AlibabaCloud::Iot;
using namespace AlibabaCloud::Iot::Model;
RRpcResult::RRpcResult() :
ServiceResult()
{}
RRpcResult::RRpcResult(const std::string &payload) :
ServiceResult()
{
parse(payload);
}
RRpcResult::~RRpcResult()
{}
void RRpcResult::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["RrpcCode"].isNull())
rrpcCode_ = value["RrpcCode"].asString();
if(!value["PayloadBase64Byte"].isNull())
payloadBase64Byte_ = value["PayloadBase64Byte"].asString();
if(!value["MessageId"].isNull())
messageId_ = std::stol(value["MessageId"].asString());
}
std::string RRpcResult::getPayloadBase64Byte()const
{
return payloadBase64Byte_;
}
std::string RRpcResult::getRrpcCode()const
{
return rrpcCode_;
}
std::string RRpcResult::getErrorMessage()const
{
return errorMessage_;
}
std::string RRpcResult::getCode()const
{
return code_;
}
bool RRpcResult::getSuccess()const
{
return success_;
}
long RRpcResult::getMessageId()const
{
return messageId_;
}

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/RegistDeviceRequest.h>
using AlibabaCloud::Iot::Model::RegistDeviceRequest;
RegistDeviceRequest::RegistDeviceRequest() :
RpcServiceRequest("iot", "2017-04-20", "RegistDevice")
{}
RegistDeviceRequest::~RegistDeviceRequest()
{}
std::string RegistDeviceRequest::getDeviceName()const
{
return deviceName_;
}
void RegistDeviceRequest::setDeviceName(const std::string& deviceName)
{
deviceName_ = deviceName;
setParameter("DeviceName", deviceName);
}
std::string RegistDeviceRequest::getProductKey()const
{
return productKey_;
}
void RegistDeviceRequest::setProductKey(const std::string& productKey)
{
productKey_ = productKey;
setParameter("ProductKey", productKey);
}
std::string RegistDeviceRequest::getAccessKeyId()const
{
return accessKeyId_;
}
void RegistDeviceRequest::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/RegistDeviceResult.h>
#include <json/json.h>
using namespace AlibabaCloud::Iot;
using namespace AlibabaCloud::Iot::Model;
RegistDeviceResult::RegistDeviceResult() :
ServiceResult()
{}
RegistDeviceResult::RegistDeviceResult(const std::string &payload) :
ServiceResult()
{
parse(payload);
}
RegistDeviceResult::~RegistDeviceResult()
{}
void RegistDeviceResult::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["DeviceId"].isNull())
deviceId_ = value["DeviceId"].asString();
if(!value["DeviceSecret"].isNull())
deviceSecret_ = value["DeviceSecret"].asString();
if(!value["DeviceStatus"].isNull())
deviceStatus_ = value["DeviceStatus"].asString();
if(!value["DeviceName"].isNull())
deviceName_ = value["DeviceName"].asString();
}
std::string RegistDeviceResult::getDeviceId()const
{
return deviceId_;
}
std::string RegistDeviceResult::getDeviceSecret()const
{
return deviceSecret_;
}
std::string RegistDeviceResult::getDeviceStatus()const
{
return deviceStatus_;
}
std::string RegistDeviceResult::getErrorMessage()const
{
return errorMessage_;
}
std::string RegistDeviceResult::getCode()const
{
return code_;
}
bool RegistDeviceResult::getSuccess()const
{
return success_;
}
std::string RegistDeviceResult::getDeviceName()const
{
return deviceName_;
}

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/RegisterDeviceRequest.h>
using AlibabaCloud::Iot::Model::RegisterDeviceRequest;
RegisterDeviceRequest::RegisterDeviceRequest() :
RpcServiceRequest("iot", "2018-01-20", "RegisterDevice")
{}
RegisterDeviceRequest::~RegisterDeviceRequest()
{}
std::string RegisterDeviceRequest::getDeviceName()const
{
return deviceName_;
}
void RegisterDeviceRequest::setDeviceName(const std::string& deviceName)
{
deviceName_ = deviceName;
setParameter("DeviceName", deviceName);
}
std::string RegisterDeviceRequest::getProductKey()const
{
return productKey_;
}
void RegisterDeviceRequest::setProductKey(const std::string& productKey)
{
productKey_ = productKey;
setParameter("ProductKey", productKey);
}
std::string RegisterDeviceRequest::getAccessKeyId()const
{
return accessKeyId_;
}
void RegisterDeviceRequest::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/RegisterDeviceResult.h>
#include <json/json.h>
using namespace AlibabaCloud::Iot;
using namespace AlibabaCloud::Iot::Model;
RegisterDeviceResult::RegisterDeviceResult() :
ServiceResult()
{}
RegisterDeviceResult::RegisterDeviceResult(const std::string &payload) :
ServiceResult()
{
parse(payload);
}
RegisterDeviceResult::~RegisterDeviceResult()
{}
void RegisterDeviceResult::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["IotId"].isNull())
data_.iotId = dataNode["IotId"].asString();
if(!dataNode["ProductKey"].isNull())
data_.productKey = dataNode["ProductKey"].asString();
if(!dataNode["DeviceName"].isNull())
data_.deviceName = dataNode["DeviceName"].asString();
if(!dataNode["DeviceSecret"].isNull())
data_.deviceSecret = dataNode["DeviceSecret"].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();
}
RegisterDeviceResult::Data RegisterDeviceResult::getData()const
{
return data_;
}
std::string RegisterDeviceResult::getErrorMessage()const
{
return errorMessage_;
}
std::string RegisterDeviceResult::getCode()const
{
return code_;
}
bool RegisterDeviceResult::getSuccess()const
{
return success_;
}

Some files were not shown because too many files have changed in this diff Show More