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

Signed-off-by: yixiong.jxy <yixiong.jxy@alibaba-inc.com>
This commit is contained in:
yixiong.jxy
2018-09-06 01:09:55 +08:00
parent e96ffc6afe
commit ee5b4ca599
69 changed files with 285 additions and 1222 deletions

View File

@@ -1,61 +0,0 @@
/*
* 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

@@ -1,73 +0,0 @@
/*
* 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

@@ -19,7 +19,7 @@
using AlibabaCloud::Iot::Model::BatchGetDeviceStateRequest;
BatchGetDeviceStateRequest::BatchGetDeviceStateRequest() :
RpcServiceRequest("iot", "2017-04-20", "BatchGetDeviceState")
RpcServiceRequest("iot", "2018-01-20", "BatchGetDeviceState")
{}
BatchGetDeviceStateRequest::~BatchGetDeviceStateRequest()

View File

@@ -19,21 +19,21 @@
using AlibabaCloud::Iot::Model::CreateProductRequest;
CreateProductRequest::CreateProductRequest() :
RpcServiceRequest("iot", "2017-04-20", "CreateProduct")
RpcServiceRequest("iot", "2018-01-20", "CreateProduct")
{}
CreateProductRequest::~CreateProductRequest()
{}
long CreateProductRequest::getCatId()const
int CreateProductRequest::getDataFormat()const
{
return catId_;
return dataFormat_;
}
void CreateProductRequest::setCatId(long catId)
void CreateProductRequest::setDataFormat(int dataFormat)
{
catId_ = catId;
setParameter("CatId", std::to_string(catId));
dataFormat_ = dataFormat;
setParameter("DataFormat", std::to_string(dataFormat));
}
int CreateProductRequest::getNodeType()const
@@ -47,17 +47,6 @@ void CreateProductRequest::setNodeType(int 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_;
@@ -69,48 +58,59 @@ void CreateProductRequest::setId2(bool id2)
setParameter("Id2", std::to_string(id2));
}
std::string CreateProductRequest::getName()const
std::string CreateProductRequest::getProductName()const
{
return name_;
return productName_;
}
void CreateProductRequest::setName(const std::string& name)
void CreateProductRequest::setProductName(const std::string& productName)
{
name_ = name;
setParameter("Name", name);
productName_ = productName;
setParameter("ProductName", productName);
}
std::string CreateProductRequest::getExtProps()const
std::string CreateProductRequest::getDescription()const
{
return extProps_;
return description_;
}
void CreateProductRequest::setExtProps(const std::string& extProps)
void CreateProductRequest::setDescription(const std::string& description)
{
extProps_ = extProps;
setParameter("ExtProps", extProps);
description_ = description;
setParameter("Description", description);
}
std::string CreateProductRequest::getSecurityPolicy()const
std::string CreateProductRequest::getProtocolType()const
{
return securityPolicy_;
return protocolType_;
}
void CreateProductRequest::setSecurityPolicy(const std::string& securityPolicy)
void CreateProductRequest::setProtocolType(const std::string& protocolType)
{
securityPolicy_ = securityPolicy;
setParameter("SecurityPolicy", securityPolicy);
protocolType_ = protocolType;
setParameter("ProtocolType", protocolType);
}
int CreateProductRequest::getPayType()const
std::string CreateProductRequest::getAliyunCommodityCode()const
{
return payType_;
return aliyunCommodityCode_;
}
void CreateProductRequest::setPayType(int payType)
void CreateProductRequest::setAliyunCommodityCode(const std::string& aliyunCommodityCode)
{
payType_ = payType;
setParameter("PayType", std::to_string(payType));
aliyunCommodityCode_ = aliyunCommodityCode;
setParameter("AliyunCommodityCode", aliyunCommodityCode);
}
long CreateProductRequest::getCategoryId()const
{
return categoryId_;
}
void CreateProductRequest::setCategoryId(long categoryId)
{
categoryId_ = categoryId;
setParameter("CategoryId", std::to_string(categoryId));
}
std::string CreateProductRequest::getAccessKeyId()const
@@ -124,14 +124,3 @@ void CreateProductRequest::setAccessKeyId(const std::string& 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

@@ -40,43 +40,37 @@ void CreateProductResult::parse(const std::string &payload)
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";
auto dataNode = value["Data"];
if(!dataNode["DataFormat"].isNull())
data_.dataFormat = std::stoi(dataNode["DataFormat"].asString());
if(!dataNode["Description"].isNull())
data_.description = dataNode["Description"].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["AliyunCommodityCode"].isNull())
data_.aliyunCommodityCode = dataNode["AliyunCommodityCode"].asString();
if(!dataNode["Id2"].isNull())
data_.id2 = dataNode["Id2"].asString() == "true";
if(!dataNode["ProtocolType"].isNull())
data_.protocolType = dataNode["ProtocolType"].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["ProductKey"].isNull())
productKey_ = value["ProductKey"].asString();
}
CreateProductResult::ProductInfo CreateProductResult::getProductInfo()const
CreateProductResult::Data CreateProductResult::getData()const
{
return productInfo_;
return data_;
}
std::string CreateProductResult::getErrorMessage()const
@@ -94,3 +88,8 @@ bool CreateProductResult::getSuccess()const
return success_;
}
std::string CreateProductResult::getProductKey()const
{
return productKey_;
}

View File

@@ -19,7 +19,7 @@
using AlibabaCloud::Iot::Model::CreateProductTopicRequest;
CreateProductTopicRequest::CreateProductTopicRequest() :
RpcServiceRequest("iot", "2017-04-20", "CreateProductTopic")
RpcServiceRequest("iot", "2018-01-20", "CreateProductTopic")
{}
CreateProductTopicRequest::~CreateProductTopicRequest()

View File

@@ -19,7 +19,7 @@
using AlibabaCloud::Iot::Model::CreateRuleActionRequest;
CreateRuleActionRequest::CreateRuleActionRequest() :
RpcServiceRequest("iot", "2017-04-20", "CreateRuleAction")
RpcServiceRequest("iot", "2018-01-20", "CreateRuleAction")
{}
CreateRuleActionRequest::~CreateRuleActionRequest()

View File

@@ -40,10 +40,10 @@ void CreateRuleActionResult::parse(const std::string &payload)
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["Success"].isNull())
success_ = value["Success"].asString() == "true";
if(!value["ErrorMessage"].isNull())
errorMessage_ = value["ErrorMessage"].asString();
if(!value["ActionId"].isNull())

View File

@@ -19,7 +19,7 @@
using AlibabaCloud::Iot::Model::CreateRuleRequest;
CreateRuleRequest::CreateRuleRequest() :
RpcServiceRequest("iot", "2017-04-20", "CreateRule")
RpcServiceRequest("iot", "2018-01-20", "CreateRule")
{}
CreateRuleRequest::~CreateRuleRequest()
@@ -91,6 +91,17 @@ void CreateRuleRequest::setProductKey(const std::string& productKey)
setParameter("ProductKey", productKey);
}
int CreateRuleRequest::getTopicType()const
{
return topicType_;
}
void CreateRuleRequest::setTopicType(int topicType)
{
topicType_ = topicType;
setParameter("TopicType", std::to_string(topicType));
}
std::string CreateRuleRequest::getAccessKeyId()const
{
return accessKeyId_;

View File

@@ -19,7 +19,7 @@
using AlibabaCloud::Iot::Model::CreateTopicRouteTableRequest;
CreateTopicRouteTableRequest::CreateTopicRouteTableRequest() :
RpcServiceRequest("iot", "2017-04-20", "CreateTopicRouteTable")
RpcServiceRequest("iot", "2018-01-20", "CreateTopicRouteTable")
{}
CreateTopicRouteTableRequest::~CreateTopicRouteTableRequest()

View File

@@ -19,7 +19,7 @@
using AlibabaCloud::Iot::Model::DeleteDevicePropRequest;
DeleteDevicePropRequest::DeleteDevicePropRequest() :
RpcServiceRequest("iot", "2017-04-20", "DeleteDeviceProp")
RpcServiceRequest("iot", "2018-01-20", "DeleteDeviceProp")
{}
DeleteDevicePropRequest::~DeleteDevicePropRequest()

View File

@@ -14,34 +14,34 @@
* limitations under the License.
*/
#include <alibabacloud/iot/model/QueryApplyStatusRequest.h>
#include <alibabacloud/iot/model/DeleteProductRequest.h>
using AlibabaCloud::Iot::Model::QueryApplyStatusRequest;
using AlibabaCloud::Iot::Model::DeleteProductRequest;
QueryApplyStatusRequest::QueryApplyStatusRequest() :
RpcServiceRequest("iot", "2017-04-20", "QueryApplyStatus")
DeleteProductRequest::DeleteProductRequest() :
RpcServiceRequest("iot", "2018-01-20", "DeleteProduct")
{}
QueryApplyStatusRequest::~QueryApplyStatusRequest()
DeleteProductRequest::~DeleteProductRequest()
{}
long QueryApplyStatusRequest::getApplyId()const
std::string DeleteProductRequest::getProductKey()const
{
return applyId_;
return productKey_;
}
void QueryApplyStatusRequest::setApplyId(long applyId)
void DeleteProductRequest::setProductKey(const std::string& productKey)
{
applyId_ = applyId;
setParameter("ApplyId", std::to_string(applyId));
productKey_ = productKey;
setParameter("ProductKey", productKey);
}
std::string QueryApplyStatusRequest::getAccessKeyId()const
std::string DeleteProductRequest::getAccessKeyId()const
{
return accessKeyId_;
}
void QueryApplyStatusRequest::setAccessKeyId(const std::string& accessKeyId)
void DeleteProductRequest::setAccessKeyId(const std::string& accessKeyId)
{
accessKeyId_ = accessKeyId;
setParameter("AccessKeyId", accessKeyId);

View File

@@ -14,26 +14,26 @@
* limitations under the License.
*/
#include <alibabacloud/iot/model/QueryApplyStatusResult.h>
#include <alibabacloud/iot/model/DeleteProductResult.h>
#include <json/json.h>
using namespace AlibabaCloud::Iot;
using namespace AlibabaCloud::Iot::Model;
QueryApplyStatusResult::QueryApplyStatusResult() :
DeleteProductResult::DeleteProductResult() :
ServiceResult()
{}
QueryApplyStatusResult::QueryApplyStatusResult(const std::string &payload) :
DeleteProductResult::DeleteProductResult(const std::string &payload) :
ServiceResult()
{
parse(payload);
}
QueryApplyStatusResult::~QueryApplyStatusResult()
DeleteProductResult::~DeleteProductResult()
{}
void QueryApplyStatusResult::parse(const std::string &payload)
void DeleteProductResult::parse(const std::string &payload)
{
Json::Reader reader;
Json::Value value;
@@ -46,27 +46,20 @@ void QueryApplyStatusResult::parse(const std::string &payload)
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
std::string DeleteProductResult::getErrorMessage()const
{
return errorMessage_;
}
std::string QueryApplyStatusResult::getCode()const
std::string DeleteProductResult::getCode()const
{
return code_;
}
bool QueryApplyStatusResult::getFinish()const
{
return finish_;
}
bool QueryApplyStatusResult::getSuccess()const
bool DeleteProductResult::getSuccess()const
{
return success_;
}

View File

@@ -19,7 +19,7 @@
using AlibabaCloud::Iot::Model::DeleteProductTopicRequest;
DeleteProductTopicRequest::DeleteProductTopicRequest() :
RpcServiceRequest("iot", "2017-04-20", "DeleteProductTopic")
RpcServiceRequest("iot", "2018-01-20", "DeleteProductTopic")
{}
DeleteProductTopicRequest::~DeleteProductTopicRequest()

View File

@@ -19,7 +19,7 @@
using AlibabaCloud::Iot::Model::DeleteRuleActionRequest;
DeleteRuleActionRequest::DeleteRuleActionRequest() :
RpcServiceRequest("iot", "2017-04-20", "DeleteRuleAction")
RpcServiceRequest("iot", "2018-01-20", "DeleteRuleAction")
{}
DeleteRuleActionRequest::~DeleteRuleActionRequest()

View File

@@ -19,7 +19,7 @@
using AlibabaCloud::Iot::Model::DeleteRuleRequest;
DeleteRuleRequest::DeleteRuleRequest() :
RpcServiceRequest("iot", "2017-04-20", "DeleteRule")
RpcServiceRequest("iot", "2018-01-20", "DeleteRule")
{}
DeleteRuleRequest::~DeleteRuleRequest()

View File

@@ -19,7 +19,7 @@
using AlibabaCloud::Iot::Model::DeleteTopicRouteTableRequest;
DeleteTopicRouteTableRequest::DeleteTopicRouteTableRequest() :
RpcServiceRequest("iot", "2017-04-20", "DeleteTopicRouteTable")
RpcServiceRequest("iot", "2018-01-20", "DeleteTopicRouteTable")
{}
DeleteTopicRouteTableRequest::~DeleteTopicRouteTableRequest()

View File

@@ -19,7 +19,7 @@
using AlibabaCloud::Iot::Model::GetDeviceShadowRequest;
GetDeviceShadowRequest::GetDeviceShadowRequest() :
RpcServiceRequest("iot", "2017-04-20", "GetDeviceShadow")
RpcServiceRequest("iot", "2018-01-20", "GetDeviceShadow")
{}
GetDeviceShadowRequest::~GetDeviceShadowRequest()

View File

@@ -19,7 +19,7 @@
using AlibabaCloud::Iot::Model::GetRuleActionRequest;
GetRuleActionRequest::GetRuleActionRequest() :
RpcServiceRequest("iot", "2017-04-20", "GetRuleAction")
RpcServiceRequest("iot", "2018-01-20", "GetRuleAction")
{}
GetRuleActionRequest::~GetRuleActionRequest()

View File

@@ -19,7 +19,7 @@
using AlibabaCloud::Iot::Model::GetRuleRequest;
GetRuleRequest::GetRuleRequest() :
RpcServiceRequest("iot", "2017-04-20", "GetRule")
RpcServiceRequest("iot", "2018-01-20", "GetRule")
{}
GetRuleRequest::~GetRuleRequest()

View File

@@ -61,12 +61,18 @@ void GetRuleResult::parse(const std::string &payload)
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["Created"].isNull())
ruleInfo_.created = ruleInfoNode["Created"].asString();
if(!ruleInfoNode["UtcCreated"].isNull())
ruleInfo_.utcCreated = ruleInfoNode["UtcCreated"].asString();
if(!ruleInfoNode["Modified"].isNull())
ruleInfo_.modified = ruleInfoNode["Modified"].asString();
if(!ruleInfoNode["UtcModified"].isNull())
ruleInfo_.utcModified = ruleInfoNode["UtcModified"].asString();
if(!ruleInfoNode["TopicType"].isNull())
ruleInfo_.topicType = std::stoi(ruleInfoNode["TopicType"].asString());
if(!value["Success"].isNull())
success_ = value["Success"].asString() == "true";
if(!value["Code"].isNull())

View File

@@ -19,7 +19,7 @@
using AlibabaCloud::Iot::Model::ListRuleActionsRequest;
ListRuleActionsRequest::ListRuleActionsRequest() :
RpcServiceRequest("iot", "2017-04-20", "ListRuleActions")
RpcServiceRequest("iot", "2018-01-20", "ListRuleActions")
{}
ListRuleActionsRequest::~ListRuleActionsRequest()

View File

@@ -19,7 +19,7 @@
using AlibabaCloud::Iot::Model::ListRuleRequest;
ListRuleRequest::ListRuleRequest() :
RpcServiceRequest("iot", "2017-04-20", "ListRule")
RpcServiceRequest("iot", "2018-01-20", "ListRule")
{}
ListRuleRequest::~ListRuleRequest()

View File

@@ -68,8 +68,12 @@ void ListRuleResult::parse(const std::string &payload)
dataObject.ruleDesc = value["RuleDesc"].asString();
if(!value["Created"].isNull())
dataObject.created = value["Created"].asString();
if(!value["UtcCreated"].isNull())
dataObject.utcCreated = value["UtcCreated"].asString();
if(!value["Modified"].isNull())
dataObject.modified = value["Modified"].asString();
if(!value["UtcModified"].isNull())
dataObject.utcModified = value["UtcModified"].asString();
data_.push_back(dataObject);
}
if(!value["Success"].isNull())

View File

@@ -19,7 +19,7 @@
using AlibabaCloud::Iot::Model::PubBroadcastRequest;
PubBroadcastRequest::PubBroadcastRequest() :
RpcServiceRequest("iot", "2017-04-20", "PubBroadcast")
RpcServiceRequest("iot", "2018-01-20", "PubBroadcast")
{}
PubBroadcastRequest::~PubBroadcastRequest()

View File

@@ -19,7 +19,7 @@
using AlibabaCloud::Iot::Model::PubRequest;
PubRequest::PubRequest() :
RpcServiceRequest("iot", "2017-04-20", "Pub")
RpcServiceRequest("iot", "2018-01-20", "Pub")
{}
PubRequest::~PubRequest()

View File

@@ -1,60 +0,0 @@
/*
* 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

@@ -1,90 +0,0 @@
/*
* 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

@@ -19,7 +19,7 @@
using AlibabaCloud::Iot::Model::QueryDevicePropRequest;
QueryDevicePropRequest::QueryDevicePropRequest() :
RpcServiceRequest("iot", "2017-04-20", "QueryDeviceProp")
RpcServiceRequest("iot", "2018-01-20", "QueryDeviceProp")
{}
QueryDevicePropRequest::~QueryDevicePropRequest()

View File

@@ -19,7 +19,7 @@
using AlibabaCloud::Iot::Model::QueryDeviceRequest;
QueryDeviceRequest::QueryDeviceRequest() :
RpcServiceRequest("iot", "2017-04-20", "QueryDevice")
RpcServiceRequest("iot", "2018-01-20", "QueryDevice")
{}
QueryDeviceRequest::~QueryDeviceRequest()

View File

@@ -19,7 +19,7 @@
using AlibabaCloud::Iot::Model::QueryPageByApplyIdRequest;
QueryPageByApplyIdRequest::QueryPageByApplyIdRequest() :
RpcServiceRequest("iot", "2017-04-20", "QueryPageByApplyId")
RpcServiceRequest("iot", "2018-01-20", "QueryPageByApplyId")
{}
QueryPageByApplyIdRequest::~QueryPageByApplyIdRequest()

View File

@@ -65,6 +65,8 @@ void QueryProductResult::parse(const std::string &payload)
data_.aliyunCommodityCode = dataNode["AliyunCommodityCode"].asString();
if(!dataNode["Id2"].isNull())
data_.id2 = dataNode["Id2"].asString() == "true";
if(!dataNode["ProtocolType"].isNull())
data_.protocolType = dataNode["ProtocolType"].asString();
if(!value["Success"].isNull())
success_ = value["Success"].asString() == "true";
if(!value["Code"].isNull())

View File

@@ -19,7 +19,7 @@
using AlibabaCloud::Iot::Model::QueryProductTopicRequest;
QueryProductTopicRequest::QueryProductTopicRequest() :
RpcServiceRequest("iot", "2017-04-20", "QueryProductTopic")
RpcServiceRequest("iot", "2018-01-20", "QueryProductTopic")
{}
QueryProductTopicRequest::~QueryProductTopicRequest()

View File

@@ -19,7 +19,7 @@
using AlibabaCloud::Iot::Model::QueryTopicReverseRouteTableRequest;
QueryTopicReverseRouteTableRequest::QueryTopicReverseRouteTableRequest() :
RpcServiceRequest("iot", "2017-04-20", "QueryTopicReverseRouteTable")
RpcServiceRequest("iot", "2018-01-20", "QueryTopicReverseRouteTable")
{}
QueryTopicReverseRouteTableRequest::~QueryTopicReverseRouteTableRequest()

View File

@@ -19,7 +19,7 @@
using AlibabaCloud::Iot::Model::QueryTopicRouteTableRequest;
QueryTopicRouteTableRequest::QueryTopicRouteTableRequest() :
RpcServiceRequest("iot", "2017-04-20", "QueryTopicRouteTable")
RpcServiceRequest("iot", "2018-01-20", "QueryTopicRouteTable")
{}
QueryTopicRouteTableRequest::~QueryTopicRouteTableRequest()

View File

@@ -19,7 +19,7 @@
using AlibabaCloud::Iot::Model::RRpcRequest;
RRpcRequest::RRpcRequest() :
RpcServiceRequest("iot", "2017-04-20", "RRpc")
RpcServiceRequest("iot", "2018-01-20", "RRpc")
{}
RRpcRequest::~RRpcRequest()
@@ -36,6 +36,17 @@ void RRpcRequest::setRequestBase64Byte(const std::string& requestBase64Byte)
setParameter("RequestBase64Byte", requestBase64Byte);
}
std::string RRpcRequest::getTopic()const
{
return topic_;
}
void RRpcRequest::setTopic(const std::string& topic)
{
topic_ = topic;
setParameter("Topic", topic);
}
std::string RRpcRequest::getDeviceName()const
{
return deviceName_;

View File

@@ -1,60 +0,0 @@
/*
* 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

@@ -1,94 +0,0 @@
/*
* 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

@@ -19,7 +19,7 @@
using AlibabaCloud::Iot::Model::SaveDevicePropRequest;
SaveDevicePropRequest::SaveDevicePropRequest() :
RpcServiceRequest("iot", "2017-04-20", "SaveDeviceProp")
RpcServiceRequest("iot", "2018-01-20", "SaveDeviceProp")
{}
SaveDevicePropRequest::~SaveDevicePropRequest()

View File

@@ -19,7 +19,7 @@
using AlibabaCloud::Iot::Model::StartRuleRequest;
StartRuleRequest::StartRuleRequest() :
RpcServiceRequest("iot", "2017-04-20", "StartRule")
RpcServiceRequest("iot", "2018-01-20", "StartRule")
{}
StartRuleRequest::~StartRuleRequest()

View File

@@ -19,7 +19,7 @@
using AlibabaCloud::Iot::Model::StopRuleRequest;
StopRuleRequest::StopRuleRequest() :
RpcServiceRequest("iot", "2017-04-20", "StopRule")
RpcServiceRequest("iot", "2018-01-20", "StopRule")
{}
StopRuleRequest::~StopRuleRequest()

View File

@@ -19,7 +19,7 @@
using AlibabaCloud::Iot::Model::UpdateDeviceShadowRequest;
UpdateDeviceShadowRequest::UpdateDeviceShadowRequest() :
RpcServiceRequest("iot", "2017-04-20", "UpdateDeviceShadow")
RpcServiceRequest("iot", "2018-01-20", "UpdateDeviceShadow")
{}
UpdateDeviceShadowRequest::~UpdateDeviceShadowRequest()

View File

@@ -19,34 +19,12 @@
using AlibabaCloud::Iot::Model::UpdateProductRequest;
UpdateProductRequest::UpdateProductRequest() :
RpcServiceRequest("iot", "2017-04-20", "UpdateProduct")
RpcServiceRequest("iot", "2018-01-20", "UpdateProduct")
{}
UpdateProductRequest::~UpdateProductRequest()
{}
long UpdateProductRequest::getCatId()const
{
return catId_;
}
void UpdateProductRequest::setCatId(long catId)
{
catId_ = catId;
setParameter("CatId", std::to_string(catId));
}
int UpdateProductRequest::getNodeType()const
{
return nodeType_;
}
void UpdateProductRequest::setNodeType(int nodeType)
{
nodeType_ = nodeType;
setParameter("NodeType", std::to_string(nodeType));
}
std::string UpdateProductRequest::getProductName()const
{
return productName_;
@@ -58,15 +36,15 @@ void UpdateProductRequest::setProductName(const std::string& productName)
setParameter("ProductName", productName);
}
std::string UpdateProductRequest::getExtProps()const
std::string UpdateProductRequest::getDescription()const
{
return extProps_;
return description_;
}
void UpdateProductRequest::setExtProps(const std::string& extProps)
void UpdateProductRequest::setDescription(const std::string& description)
{
extProps_ = extProps;
setParameter("ExtProps", extProps);
description_ = description;
setParameter("Description", description);
}
std::string UpdateProductRequest::getProductKey()const
@@ -80,17 +58,6 @@ void UpdateProductRequest::setProductKey(const std::string& productKey)
setParameter("ProductKey", productKey);
}
std::string UpdateProductRequest::getProductDesc()const
{
return productDesc_;
}
void UpdateProductRequest::setProductDesc(const std::string& productDesc)
{
productDesc_ = productDesc;
setParameter("ProductDesc", productDesc);
}
std::string UpdateProductRequest::getAccessKeyId()const
{
return accessKeyId_;

View File

@@ -19,7 +19,7 @@
using AlibabaCloud::Iot::Model::UpdateProductTopicRequest;
UpdateProductTopicRequest::UpdateProductTopicRequest() :
RpcServiceRequest("iot", "2017-04-20", "UpdateProductTopic")
RpcServiceRequest("iot", "2018-01-20", "UpdateProductTopic")
{}
UpdateProductTopicRequest::~UpdateProductTopicRequest()

View File

@@ -19,7 +19,7 @@
using AlibabaCloud::Iot::Model::UpdateRuleActionRequest;
UpdateRuleActionRequest::UpdateRuleActionRequest() :
RpcServiceRequest("iot", "2017-04-20", "UpdateRuleAction")
RpcServiceRequest("iot", "2018-01-20", "UpdateRuleAction")
{}
UpdateRuleActionRequest::~UpdateRuleActionRequest()

View File

@@ -40,10 +40,10 @@ void UpdateRuleActionResult::parse(const std::string &payload)
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["Success"].isNull())
success_ = value["Success"].asString() == "true";
if(!value["ErrorMessage"].isNull())
errorMessage_ = value["ErrorMessage"].asString();

View File

@@ -19,7 +19,7 @@
using AlibabaCloud::Iot::Model::UpdateRuleRequest;
UpdateRuleRequest::UpdateRuleRequest() :
RpcServiceRequest("iot", "2017-04-20", "UpdateRule")
RpcServiceRequest("iot", "2018-01-20", "UpdateRule")
{}
UpdateRuleRequest::~UpdateRuleRequest()
@@ -91,6 +91,17 @@ void UpdateRuleRequest::setProductKey(const std::string& productKey)
setParameter("ProductKey", productKey);
}
int UpdateRuleRequest::getTopicType()const
{
return topicType_;
}
void UpdateRuleRequest::setTopicType(int topicType)
{
topicType_ = topicType;
setParameter("TopicType", std::to_string(topicType));
}
std::string UpdateRuleRequest::getAccessKeyId()const
{
return accessKeyId_;