Generated 2018-01-20 for Iot.
This commit is contained in:
@@ -25,6 +25,17 @@ BatchAddDeviceGroupRelationsRequest::BatchAddDeviceGroupRelationsRequest() :
|
||||
BatchAddDeviceGroupRelationsRequest::~BatchAddDeviceGroupRelationsRequest()
|
||||
{}
|
||||
|
||||
std::string BatchAddDeviceGroupRelationsRequest::getIotInstanceId()const
|
||||
{
|
||||
return iotInstanceId_;
|
||||
}
|
||||
|
||||
void BatchAddDeviceGroupRelationsRequest::setIotInstanceId(const std::string& iotInstanceId)
|
||||
{
|
||||
iotInstanceId_ = iotInstanceId;
|
||||
setCoreParameter("IotInstanceId", iotInstanceId);
|
||||
}
|
||||
|
||||
std::string BatchAddDeviceGroupRelationsRequest::getGroupId()const
|
||||
{
|
||||
return groupId_;
|
||||
@@ -33,7 +44,7 @@ std::string BatchAddDeviceGroupRelationsRequest::getGroupId()const
|
||||
void BatchAddDeviceGroupRelationsRequest::setGroupId(const std::string& groupId)
|
||||
{
|
||||
groupId_ = groupId;
|
||||
setParameter("GroupId", groupId);
|
||||
setCoreParameter("GroupId", groupId);
|
||||
}
|
||||
|
||||
std::vector<BatchAddDeviceGroupRelationsRequest::Device> BatchAddDeviceGroupRelationsRequest::getDevice()const
|
||||
@@ -48,8 +59,8 @@ void BatchAddDeviceGroupRelationsRequest::setDevice(const std::vector<Device>& d
|
||||
for(int i = 0; i!= device.size(); i++) {
|
||||
auto obj = device.at(i);
|
||||
std::string str ="Device."+ std::to_string(i);
|
||||
setParameter(str + ".DeviceName", obj.deviceName);
|
||||
setParameter(str + ".ProductKey", obj.productKey);
|
||||
setCoreParameter(str + ".DeviceName", obj.deviceName);
|
||||
setCoreParameter(str + ".ProductKey", obj.productKey);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -61,6 +72,6 @@ std::string BatchAddDeviceGroupRelationsRequest::getAccessKeyId()const
|
||||
void BatchAddDeviceGroupRelationsRequest::setAccessKeyId(const std::string& accessKeyId)
|
||||
{
|
||||
accessKeyId_ = accessKeyId;
|
||||
setParameter("AccessKeyId", accessKeyId);
|
||||
setCoreParameter("AccessKeyId", accessKeyId);
|
||||
}
|
||||
|
||||
|
||||
@@ -35,10 +35,13 @@ BatchAddDeviceGroupRelationsResult::~BatchAddDeviceGroupRelationsResult()
|
||||
|
||||
void BatchAddDeviceGroupRelationsResult::parse(const std::string &payload)
|
||||
{
|
||||
Json::Reader reader;
|
||||
Json::CharReaderBuilder builder;
|
||||
Json::CharReader *reader = builder.newCharReader();
|
||||
Json::Value *val;
|
||||
Json::Value value;
|
||||
reader.parse(payload, value);
|
||||
|
||||
JSONCPP_STRING *errs;
|
||||
reader->parse(payload.data(), payload.data() + payload.size(), val, errs);
|
||||
value = *val;
|
||||
setRequestId(value["RequestId"].asString());
|
||||
if(!value["Success"].isNull())
|
||||
success_ = value["Success"].asString() == "true";
|
||||
|
||||
@@ -25,6 +25,17 @@ BatchCheckDeviceNamesRequest::BatchCheckDeviceNamesRequest() :
|
||||
BatchCheckDeviceNamesRequest::~BatchCheckDeviceNamesRequest()
|
||||
{}
|
||||
|
||||
std::string BatchCheckDeviceNamesRequest::getIotInstanceId()const
|
||||
{
|
||||
return iotInstanceId_;
|
||||
}
|
||||
|
||||
void BatchCheckDeviceNamesRequest::setIotInstanceId(const std::string& iotInstanceId)
|
||||
{
|
||||
iotInstanceId_ = iotInstanceId;
|
||||
setCoreParameter("IotInstanceId", iotInstanceId);
|
||||
}
|
||||
|
||||
std::vector<std::string> BatchCheckDeviceNamesRequest::getDeviceName()const
|
||||
{
|
||||
return deviceName_;
|
||||
@@ -34,7 +45,7 @@ void BatchCheckDeviceNamesRequest::setDeviceName(const std::vector<std::string>&
|
||||
{
|
||||
deviceName_ = deviceName;
|
||||
for(int i = 0; i!= deviceName.size(); i++)
|
||||
setParameter("DeviceName."+ std::to_string(i), deviceName.at(i));
|
||||
setCoreParameter("DeviceName."+ std::to_string(i), deviceName.at(i));
|
||||
}
|
||||
|
||||
std::string BatchCheckDeviceNamesRequest::getProductKey()const
|
||||
@@ -45,7 +56,7 @@ std::string BatchCheckDeviceNamesRequest::getProductKey()const
|
||||
void BatchCheckDeviceNamesRequest::setProductKey(const std::string& productKey)
|
||||
{
|
||||
productKey_ = productKey;
|
||||
setParameter("ProductKey", productKey);
|
||||
setCoreParameter("ProductKey", productKey);
|
||||
}
|
||||
|
||||
std::string BatchCheckDeviceNamesRequest::getAccessKeyId()const
|
||||
@@ -56,6 +67,6 @@ std::string BatchCheckDeviceNamesRequest::getAccessKeyId()const
|
||||
void BatchCheckDeviceNamesRequest::setAccessKeyId(const std::string& accessKeyId)
|
||||
{
|
||||
accessKeyId_ = accessKeyId;
|
||||
setParameter("AccessKeyId", accessKeyId);
|
||||
setCoreParameter("AccessKeyId", accessKeyId);
|
||||
}
|
||||
|
||||
|
||||
@@ -35,14 +35,20 @@ BatchCheckDeviceNamesResult::~BatchCheckDeviceNamesResult()
|
||||
|
||||
void BatchCheckDeviceNamesResult::parse(const std::string &payload)
|
||||
{
|
||||
Json::Reader reader;
|
||||
Json::CharReaderBuilder builder;
|
||||
Json::CharReader *reader = builder.newCharReader();
|
||||
Json::Value *val;
|
||||
Json::Value value;
|
||||
reader.parse(payload, value);
|
||||
|
||||
JSONCPP_STRING *errs;
|
||||
reader->parse(payload.data(), payload.data() + payload.size(), val, errs);
|
||||
value = *val;
|
||||
setRequestId(value["RequestId"].asString());
|
||||
auto dataNode = value["Data"];
|
||||
if(!dataNode["ApplyId"].isNull())
|
||||
data_.applyId = std::stol(dataNode["ApplyId"].asString());
|
||||
auto allInvalidDeviceNameList = dataNode["InvalidDeviceNameList"]["InvalidDeviceName"];
|
||||
for (auto value : allInvalidDeviceNameList)
|
||||
data_.invalidDeviceNameList.push_back(value.asString());
|
||||
if(!value["Success"].isNull())
|
||||
success_ = value["Success"].asString() == "true";
|
||||
if(!value["Code"].isNull())
|
||||
|
||||
@@ -25,6 +25,17 @@ BatchDeleteDeviceGroupRelationsRequest::BatchDeleteDeviceGroupRelationsRequest()
|
||||
BatchDeleteDeviceGroupRelationsRequest::~BatchDeleteDeviceGroupRelationsRequest()
|
||||
{}
|
||||
|
||||
std::string BatchDeleteDeviceGroupRelationsRequest::getIotInstanceId()const
|
||||
{
|
||||
return iotInstanceId_;
|
||||
}
|
||||
|
||||
void BatchDeleteDeviceGroupRelationsRequest::setIotInstanceId(const std::string& iotInstanceId)
|
||||
{
|
||||
iotInstanceId_ = iotInstanceId;
|
||||
setCoreParameter("IotInstanceId", iotInstanceId);
|
||||
}
|
||||
|
||||
std::string BatchDeleteDeviceGroupRelationsRequest::getGroupId()const
|
||||
{
|
||||
return groupId_;
|
||||
@@ -33,7 +44,7 @@ std::string BatchDeleteDeviceGroupRelationsRequest::getGroupId()const
|
||||
void BatchDeleteDeviceGroupRelationsRequest::setGroupId(const std::string& groupId)
|
||||
{
|
||||
groupId_ = groupId;
|
||||
setParameter("GroupId", groupId);
|
||||
setCoreParameter("GroupId", groupId);
|
||||
}
|
||||
|
||||
std::vector<BatchDeleteDeviceGroupRelationsRequest::Device> BatchDeleteDeviceGroupRelationsRequest::getDevice()const
|
||||
@@ -48,8 +59,8 @@ void BatchDeleteDeviceGroupRelationsRequest::setDevice(const std::vector<Device>
|
||||
for(int i = 0; i!= device.size(); i++) {
|
||||
auto obj = device.at(i);
|
||||
std::string str ="Device."+ std::to_string(i);
|
||||
setParameter(str + ".DeviceName", obj.deviceName);
|
||||
setParameter(str + ".ProductKey", obj.productKey);
|
||||
setCoreParameter(str + ".DeviceName", obj.deviceName);
|
||||
setCoreParameter(str + ".ProductKey", obj.productKey);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -61,6 +72,6 @@ std::string BatchDeleteDeviceGroupRelationsRequest::getAccessKeyId()const
|
||||
void BatchDeleteDeviceGroupRelationsRequest::setAccessKeyId(const std::string& accessKeyId)
|
||||
{
|
||||
accessKeyId_ = accessKeyId;
|
||||
setParameter("AccessKeyId", accessKeyId);
|
||||
setCoreParameter("AccessKeyId", accessKeyId);
|
||||
}
|
||||
|
||||
|
||||
@@ -35,10 +35,13 @@ BatchDeleteDeviceGroupRelationsResult::~BatchDeleteDeviceGroupRelationsResult()
|
||||
|
||||
void BatchDeleteDeviceGroupRelationsResult::parse(const std::string &payload)
|
||||
{
|
||||
Json::Reader reader;
|
||||
Json::CharReaderBuilder builder;
|
||||
Json::CharReader *reader = builder.newCharReader();
|
||||
Json::Value *val;
|
||||
Json::Value value;
|
||||
reader.parse(payload, value);
|
||||
|
||||
JSONCPP_STRING *errs;
|
||||
reader->parse(payload.data(), payload.data() + payload.size(), val, errs);
|
||||
value = *val;
|
||||
setRequestId(value["RequestId"].asString());
|
||||
if(!value["Success"].isNull())
|
||||
success_ = value["Success"].asString() == "true";
|
||||
|
||||
@@ -25,6 +25,29 @@ BatchGetDeviceStateRequest::BatchGetDeviceStateRequest() :
|
||||
BatchGetDeviceStateRequest::~BatchGetDeviceStateRequest()
|
||||
{}
|
||||
|
||||
std::vector<std::string> BatchGetDeviceStateRequest::getIotId()const
|
||||
{
|
||||
return iotId_;
|
||||
}
|
||||
|
||||
void BatchGetDeviceStateRequest::setIotId(const std::vector<std::string>& iotId)
|
||||
{
|
||||
iotId_ = iotId;
|
||||
for(int i = 0; i!= iotId.size(); i++)
|
||||
setCoreParameter("IotId."+ std::to_string(i), iotId.at(i));
|
||||
}
|
||||
|
||||
std::string BatchGetDeviceStateRequest::getIotInstanceId()const
|
||||
{
|
||||
return iotInstanceId_;
|
||||
}
|
||||
|
||||
void BatchGetDeviceStateRequest::setIotInstanceId(const std::string& iotInstanceId)
|
||||
{
|
||||
iotInstanceId_ = iotInstanceId;
|
||||
setCoreParameter("IotInstanceId", iotInstanceId);
|
||||
}
|
||||
|
||||
std::vector<std::string> BatchGetDeviceStateRequest::getDeviceName()const
|
||||
{
|
||||
return deviceName_;
|
||||
@@ -34,7 +57,7 @@ void BatchGetDeviceStateRequest::setDeviceName(const std::vector<std::string>& d
|
||||
{
|
||||
deviceName_ = deviceName;
|
||||
for(int i = 0; i!= deviceName.size(); i++)
|
||||
setParameter("DeviceName."+ std::to_string(i), deviceName.at(i));
|
||||
setCoreParameter("DeviceName."+ std::to_string(i), deviceName.at(i));
|
||||
}
|
||||
|
||||
std::string BatchGetDeviceStateRequest::getProductKey()const
|
||||
@@ -45,7 +68,7 @@ std::string BatchGetDeviceStateRequest::getProductKey()const
|
||||
void BatchGetDeviceStateRequest::setProductKey(const std::string& productKey)
|
||||
{
|
||||
productKey_ = productKey;
|
||||
setParameter("ProductKey", productKey);
|
||||
setCoreParameter("ProductKey", productKey);
|
||||
}
|
||||
|
||||
std::string BatchGetDeviceStateRequest::getAccessKeyId()const
|
||||
@@ -56,6 +79,6 @@ std::string BatchGetDeviceStateRequest::getAccessKeyId()const
|
||||
void BatchGetDeviceStateRequest::setAccessKeyId(const std::string& accessKeyId)
|
||||
{
|
||||
accessKeyId_ = accessKeyId;
|
||||
setParameter("AccessKeyId", accessKeyId);
|
||||
setCoreParameter("AccessKeyId", accessKeyId);
|
||||
}
|
||||
|
||||
|
||||
@@ -35,10 +35,13 @@ BatchGetDeviceStateResult::~BatchGetDeviceStateResult()
|
||||
|
||||
void BatchGetDeviceStateResult::parse(const std::string &payload)
|
||||
{
|
||||
Json::Reader reader;
|
||||
Json::CharReaderBuilder builder;
|
||||
Json::CharReader *reader = builder.newCharReader();
|
||||
Json::Value *val;
|
||||
Json::Value value;
|
||||
reader.parse(payload, value);
|
||||
|
||||
JSONCPP_STRING *errs;
|
||||
reader->parse(payload.data(), payload.data() + payload.size(), val, errs);
|
||||
value = *val;
|
||||
setRequestId(value["RequestId"].asString());
|
||||
auto allDeviceStatusList = value["DeviceStatusList"]["DeviceStatus"];
|
||||
for (auto value : allDeviceStatusList)
|
||||
@@ -54,6 +57,8 @@ void BatchGetDeviceStateResult::parse(const std::string &payload)
|
||||
deviceStatusListObject.asAddress = value["AsAddress"].asString();
|
||||
if(!value["LastOnlineTime"].isNull())
|
||||
deviceStatusListObject.lastOnlineTime = value["LastOnlineTime"].asString();
|
||||
if(!value["IotId"].isNull())
|
||||
deviceStatusListObject.iotId = value["IotId"].asString();
|
||||
deviceStatusList_.push_back(deviceStatusListObject);
|
||||
}
|
||||
if(!value["Success"].isNull())
|
||||
|
||||
61
iot/src/model/BatchQueryDeviceDetailRequest.cc
Normal file
61
iot/src/model/BatchQueryDeviceDetailRequest.cc
Normal 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/BatchQueryDeviceDetailRequest.h>
|
||||
|
||||
using AlibabaCloud::Iot::Model::BatchQueryDeviceDetailRequest;
|
||||
|
||||
BatchQueryDeviceDetailRequest::BatchQueryDeviceDetailRequest() :
|
||||
RpcServiceRequest("iot", "2018-01-20", "BatchQueryDeviceDetail")
|
||||
{}
|
||||
|
||||
BatchQueryDeviceDetailRequest::~BatchQueryDeviceDetailRequest()
|
||||
{}
|
||||
|
||||
std::string BatchQueryDeviceDetailRequest::getIotInstanceId()const
|
||||
{
|
||||
return iotInstanceId_;
|
||||
}
|
||||
|
||||
void BatchQueryDeviceDetailRequest::setIotInstanceId(const std::string& iotInstanceId)
|
||||
{
|
||||
iotInstanceId_ = iotInstanceId;
|
||||
setCoreParameter("IotInstanceId", iotInstanceId);
|
||||
}
|
||||
|
||||
std::vector<std::string> BatchQueryDeviceDetailRequest::getDeviceName()const
|
||||
{
|
||||
return deviceName_;
|
||||
}
|
||||
|
||||
void BatchQueryDeviceDetailRequest::setDeviceName(const std::vector<std::string>& deviceName)
|
||||
{
|
||||
deviceName_ = deviceName;
|
||||
for(int i = 0; i!= deviceName.size(); i++)
|
||||
setCoreParameter("DeviceName."+ std::to_string(i), deviceName.at(i));
|
||||
}
|
||||
|
||||
std::string BatchQueryDeviceDetailRequest::getProductKey()const
|
||||
{
|
||||
return productKey_;
|
||||
}
|
||||
|
||||
void BatchQueryDeviceDetailRequest::setProductKey(const std::string& productKey)
|
||||
{
|
||||
productKey_ = productKey;
|
||||
setCoreParameter("ProductKey", productKey);
|
||||
}
|
||||
|
||||
108
iot/src/model/BatchQueryDeviceDetailResult.cc
Normal file
108
iot/src/model/BatchQueryDeviceDetailResult.cc
Normal file
@@ -0,0 +1,108 @@
|
||||
/*
|
||||
* 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/BatchQueryDeviceDetailResult.h>
|
||||
#include <json/json.h>
|
||||
|
||||
using namespace AlibabaCloud::Iot;
|
||||
using namespace AlibabaCloud::Iot::Model;
|
||||
|
||||
BatchQueryDeviceDetailResult::BatchQueryDeviceDetailResult() :
|
||||
ServiceResult()
|
||||
{}
|
||||
|
||||
BatchQueryDeviceDetailResult::BatchQueryDeviceDetailResult(const std::string &payload) :
|
||||
ServiceResult()
|
||||
{
|
||||
parse(payload);
|
||||
}
|
||||
|
||||
BatchQueryDeviceDetailResult::~BatchQueryDeviceDetailResult()
|
||||
{}
|
||||
|
||||
void BatchQueryDeviceDetailResult::parse(const std::string &payload)
|
||||
{
|
||||
Json::CharReaderBuilder builder;
|
||||
Json::CharReader *reader = builder.newCharReader();
|
||||
Json::Value *val;
|
||||
Json::Value value;
|
||||
JSONCPP_STRING *errs;
|
||||
reader->parse(payload.data(), payload.data() + payload.size(), val, errs);
|
||||
value = *val;
|
||||
setRequestId(value["RequestId"].asString());
|
||||
auto allData = value["Data"]["DataItem"];
|
||||
for (auto value : allData)
|
||||
{
|
||||
DataItem dataObject;
|
||||
if(!value["ProductKey"].isNull())
|
||||
dataObject.productKey = value["ProductKey"].asString();
|
||||
if(!value["ProductName"].isNull())
|
||||
dataObject.productName = value["ProductName"].asString();
|
||||
if(!value["DeviceName"].isNull())
|
||||
dataObject.deviceName = value["DeviceName"].asString();
|
||||
if(!value["Nickname"].isNull())
|
||||
dataObject.nickname = value["Nickname"].asString();
|
||||
if(!value["DeviceSecret"].isNull())
|
||||
dataObject.deviceSecret = value["DeviceSecret"].asString();
|
||||
if(!value["IotId"].isNull())
|
||||
dataObject.iotId = value["IotId"].asString();
|
||||
if(!value["UtcCreate"].isNull())
|
||||
dataObject.utcCreate = value["UtcCreate"].asString();
|
||||
if(!value["GmtCreate"].isNull())
|
||||
dataObject.gmtCreate = value["GmtCreate"].asString();
|
||||
if(!value["UtcActive"].isNull())
|
||||
dataObject.utcActive = value["UtcActive"].asString();
|
||||
if(!value["GmtActive"].isNull())
|
||||
dataObject.gmtActive = value["GmtActive"].asString();
|
||||
if(!value["Status"].isNull())
|
||||
dataObject.status = value["Status"].asString();
|
||||
if(!value["FirmwareVersion"].isNull())
|
||||
dataObject.firmwareVersion = value["FirmwareVersion"].asString();
|
||||
if(!value["NodeType"].isNull())
|
||||
dataObject.nodeType = std::stoi(value["NodeType"].asString());
|
||||
if(!value["Region"].isNull())
|
||||
dataObject.region = value["Region"].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<BatchQueryDeviceDetailResult::DataItem> BatchQueryDeviceDetailResult::getData()const
|
||||
{
|
||||
return data_;
|
||||
}
|
||||
|
||||
std::string BatchQueryDeviceDetailResult::getErrorMessage()const
|
||||
{
|
||||
return errorMessage_;
|
||||
}
|
||||
|
||||
std::string BatchQueryDeviceDetailResult::getCode()const
|
||||
{
|
||||
return code_;
|
||||
}
|
||||
|
||||
bool BatchQueryDeviceDetailResult::getSuccess()const
|
||||
{
|
||||
return success_;
|
||||
}
|
||||
|
||||
@@ -25,6 +25,17 @@ BatchRegisterDeviceRequest::BatchRegisterDeviceRequest() :
|
||||
BatchRegisterDeviceRequest::~BatchRegisterDeviceRequest()
|
||||
{}
|
||||
|
||||
std::string BatchRegisterDeviceRequest::getIotInstanceId()const
|
||||
{
|
||||
return iotInstanceId_;
|
||||
}
|
||||
|
||||
void BatchRegisterDeviceRequest::setIotInstanceId(const std::string& iotInstanceId)
|
||||
{
|
||||
iotInstanceId_ = iotInstanceId;
|
||||
setCoreParameter("IotInstanceId", iotInstanceId);
|
||||
}
|
||||
|
||||
int BatchRegisterDeviceRequest::getCount()const
|
||||
{
|
||||
return count_;
|
||||
@@ -33,7 +44,7 @@ int BatchRegisterDeviceRequest::getCount()const
|
||||
void BatchRegisterDeviceRequest::setCount(int count)
|
||||
{
|
||||
count_ = count;
|
||||
setParameter("Count", std::to_string(count));
|
||||
setCoreParameter("Count", std::to_string(count));
|
||||
}
|
||||
|
||||
std::string BatchRegisterDeviceRequest::getProductKey()const
|
||||
@@ -44,7 +55,7 @@ std::string BatchRegisterDeviceRequest::getProductKey()const
|
||||
void BatchRegisterDeviceRequest::setProductKey(const std::string& productKey)
|
||||
{
|
||||
productKey_ = productKey;
|
||||
setParameter("ProductKey", productKey);
|
||||
setCoreParameter("ProductKey", productKey);
|
||||
}
|
||||
|
||||
std::string BatchRegisterDeviceRequest::getAccessKeyId()const
|
||||
@@ -55,6 +66,6 @@ std::string BatchRegisterDeviceRequest::getAccessKeyId()const
|
||||
void BatchRegisterDeviceRequest::setAccessKeyId(const std::string& accessKeyId)
|
||||
{
|
||||
accessKeyId_ = accessKeyId;
|
||||
setParameter("AccessKeyId", accessKeyId);
|
||||
setCoreParameter("AccessKeyId", accessKeyId);
|
||||
}
|
||||
|
||||
|
||||
@@ -35,10 +35,13 @@ BatchRegisterDeviceResult::~BatchRegisterDeviceResult()
|
||||
|
||||
void BatchRegisterDeviceResult::parse(const std::string &payload)
|
||||
{
|
||||
Json::Reader reader;
|
||||
Json::CharReaderBuilder builder;
|
||||
Json::CharReader *reader = builder.newCharReader();
|
||||
Json::Value *val;
|
||||
Json::Value value;
|
||||
reader.parse(payload, value);
|
||||
|
||||
JSONCPP_STRING *errs;
|
||||
reader->parse(payload.data(), payload.data() + payload.size(), val, errs);
|
||||
value = *val;
|
||||
setRequestId(value["RequestId"].asString());
|
||||
auto dataNode = value["Data"];
|
||||
if(!dataNode["ApplyId"].isNull())
|
||||
|
||||
@@ -33,7 +33,18 @@ long BatchRegisterDeviceWithApplyIdRequest::getApplyId()const
|
||||
void BatchRegisterDeviceWithApplyIdRequest::setApplyId(long applyId)
|
||||
{
|
||||
applyId_ = applyId;
|
||||
setParameter("ApplyId", std::to_string(applyId));
|
||||
setCoreParameter("ApplyId", std::to_string(applyId));
|
||||
}
|
||||
|
||||
std::string BatchRegisterDeviceWithApplyIdRequest::getIotInstanceId()const
|
||||
{
|
||||
return iotInstanceId_;
|
||||
}
|
||||
|
||||
void BatchRegisterDeviceWithApplyIdRequest::setIotInstanceId(const std::string& iotInstanceId)
|
||||
{
|
||||
iotInstanceId_ = iotInstanceId;
|
||||
setCoreParameter("IotInstanceId", iotInstanceId);
|
||||
}
|
||||
|
||||
std::string BatchRegisterDeviceWithApplyIdRequest::getProductKey()const
|
||||
@@ -44,7 +55,7 @@ std::string BatchRegisterDeviceWithApplyIdRequest::getProductKey()const
|
||||
void BatchRegisterDeviceWithApplyIdRequest::setProductKey(const std::string& productKey)
|
||||
{
|
||||
productKey_ = productKey;
|
||||
setParameter("ProductKey", productKey);
|
||||
setCoreParameter("ProductKey", productKey);
|
||||
}
|
||||
|
||||
std::string BatchRegisterDeviceWithApplyIdRequest::getAccessKeyId()const
|
||||
@@ -55,6 +66,6 @@ std::string BatchRegisterDeviceWithApplyIdRequest::getAccessKeyId()const
|
||||
void BatchRegisterDeviceWithApplyIdRequest::setAccessKeyId(const std::string& accessKeyId)
|
||||
{
|
||||
accessKeyId_ = accessKeyId;
|
||||
setParameter("AccessKeyId", accessKeyId);
|
||||
setCoreParameter("AccessKeyId", accessKeyId);
|
||||
}
|
||||
|
||||
|
||||
@@ -35,10 +35,13 @@ BatchRegisterDeviceWithApplyIdResult::~BatchRegisterDeviceWithApplyIdResult()
|
||||
|
||||
void BatchRegisterDeviceWithApplyIdResult::parse(const std::string &payload)
|
||||
{
|
||||
Json::Reader reader;
|
||||
Json::CharReaderBuilder builder;
|
||||
Json::CharReader *reader = builder.newCharReader();
|
||||
Json::Value *val;
|
||||
Json::Value value;
|
||||
reader.parse(payload, value);
|
||||
|
||||
JSONCPP_STRING *errs;
|
||||
reader->parse(payload.data(), payload.data() + payload.size(), val, errs);
|
||||
value = *val;
|
||||
setRequestId(value["RequestId"].asString());
|
||||
auto dataNode = value["Data"];
|
||||
if(!dataNode["ApplyId"].isNull())
|
||||
|
||||
68
iot/src/model/BatchUpdateDeviceNicknameRequest.cc
Normal file
68
iot/src/model/BatchUpdateDeviceNicknameRequest.cc
Normal file
@@ -0,0 +1,68 @@
|
||||
/*
|
||||
* 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/BatchUpdateDeviceNicknameRequest.h>
|
||||
|
||||
using AlibabaCloud::Iot::Model::BatchUpdateDeviceNicknameRequest;
|
||||
|
||||
BatchUpdateDeviceNicknameRequest::BatchUpdateDeviceNicknameRequest() :
|
||||
RpcServiceRequest("iot", "2018-01-20", "BatchUpdateDeviceNickname")
|
||||
{}
|
||||
|
||||
BatchUpdateDeviceNicknameRequest::~BatchUpdateDeviceNicknameRequest()
|
||||
{}
|
||||
|
||||
std::vector<BatchUpdateDeviceNicknameRequest::DeviceNicknameInfo> BatchUpdateDeviceNicknameRequest::getDeviceNicknameInfo()const
|
||||
{
|
||||
return deviceNicknameInfo_;
|
||||
}
|
||||
|
||||
void BatchUpdateDeviceNicknameRequest::setDeviceNicknameInfo(const std::vector<DeviceNicknameInfo>& deviceNicknameInfo)
|
||||
{
|
||||
deviceNicknameInfo_ = deviceNicknameInfo;
|
||||
int i = 0;
|
||||
for(int i = 0; i!= deviceNicknameInfo.size(); i++) {
|
||||
auto obj = deviceNicknameInfo.at(i);
|
||||
std::string str ="DeviceNicknameInfo."+ std::to_string(i);
|
||||
setCoreParameter(str + ".IotId", obj.iotId);
|
||||
setCoreParameter(str + ".Nickname", obj.nickname);
|
||||
setCoreParameter(str + ".DeviceName", obj.deviceName);
|
||||
setCoreParameter(str + ".ProductKey", obj.productKey);
|
||||
}
|
||||
}
|
||||
|
||||
std::string BatchUpdateDeviceNicknameRequest::getIotInstanceId()const
|
||||
{
|
||||
return iotInstanceId_;
|
||||
}
|
||||
|
||||
void BatchUpdateDeviceNicknameRequest::setIotInstanceId(const std::string& iotInstanceId)
|
||||
{
|
||||
iotInstanceId_ = iotInstanceId;
|
||||
setCoreParameter("IotInstanceId", iotInstanceId);
|
||||
}
|
||||
|
||||
std::string BatchUpdateDeviceNicknameRequest::getAccessKeyId()const
|
||||
{
|
||||
return accessKeyId_;
|
||||
}
|
||||
|
||||
void BatchUpdateDeviceNicknameRequest::setAccessKeyId(const std::string& accessKeyId)
|
||||
{
|
||||
accessKeyId_ = accessKeyId;
|
||||
setCoreParameter("AccessKeyId", accessKeyId);
|
||||
}
|
||||
|
||||
69
iot/src/model/BatchUpdateDeviceNicknameResult.cc
Normal file
69
iot/src/model/BatchUpdateDeviceNicknameResult.cc
Normal file
@@ -0,0 +1,69 @@
|
||||
/*
|
||||
* 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/BatchUpdateDeviceNicknameResult.h>
|
||||
#include <json/json.h>
|
||||
|
||||
using namespace AlibabaCloud::Iot;
|
||||
using namespace AlibabaCloud::Iot::Model;
|
||||
|
||||
BatchUpdateDeviceNicknameResult::BatchUpdateDeviceNicknameResult() :
|
||||
ServiceResult()
|
||||
{}
|
||||
|
||||
BatchUpdateDeviceNicknameResult::BatchUpdateDeviceNicknameResult(const std::string &payload) :
|
||||
ServiceResult()
|
||||
{
|
||||
parse(payload);
|
||||
}
|
||||
|
||||
BatchUpdateDeviceNicknameResult::~BatchUpdateDeviceNicknameResult()
|
||||
{}
|
||||
|
||||
void BatchUpdateDeviceNicknameResult::parse(const std::string &payload)
|
||||
{
|
||||
Json::CharReaderBuilder builder;
|
||||
Json::CharReader *reader = builder.newCharReader();
|
||||
Json::Value *val;
|
||||
Json::Value value;
|
||||
JSONCPP_STRING *errs;
|
||||
reader->parse(payload.data(), payload.data() + payload.size(), val, errs);
|
||||
value = *val;
|
||||
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 BatchUpdateDeviceNicknameResult::getErrorMessage()const
|
||||
{
|
||||
return errorMessage_;
|
||||
}
|
||||
|
||||
std::string BatchUpdateDeviceNicknameResult::getCode()const
|
||||
{
|
||||
return code_;
|
||||
}
|
||||
|
||||
bool BatchUpdateDeviceNicknameResult::getSuccess()const
|
||||
{
|
||||
return success_;
|
||||
}
|
||||
|
||||
144
iot/src/model/CreateDataAPIServiceRequest.cc
Normal file
144
iot/src/model/CreateDataAPIServiceRequest.cc
Normal file
@@ -0,0 +1,144 @@
|
||||
/*
|
||||
* 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/CreateDataAPIServiceRequest.h>
|
||||
|
||||
using AlibabaCloud::Iot::Model::CreateDataAPIServiceRequest;
|
||||
|
||||
CreateDataAPIServiceRequest::CreateDataAPIServiceRequest() :
|
||||
RpcServiceRequest("iot", "2018-01-20", "CreateDataAPIService")
|
||||
{}
|
||||
|
||||
CreateDataAPIServiceRequest::~CreateDataAPIServiceRequest()
|
||||
{}
|
||||
|
||||
std::vector<CreateDataAPIServiceRequest::ResponseParam> CreateDataAPIServiceRequest::getResponseParam()const
|
||||
{
|
||||
return responseParam_;
|
||||
}
|
||||
|
||||
void CreateDataAPIServiceRequest::setResponseParam(const std::vector<ResponseParam>& responseParam)
|
||||
{
|
||||
responseParam_ = responseParam;
|
||||
int i = 0;
|
||||
for(int i = 0; i!= responseParam.size(); i++) {
|
||||
auto obj = responseParam.at(i);
|
||||
std::string str ="ResponseParam."+ std::to_string(i);
|
||||
setCoreParameter(str + ".Name", obj.name);
|
||||
setCoreParameter(str + ".Type", obj.type);
|
||||
setCoreParameter(str + ".Required", obj.required ? "true" : "false");
|
||||
setCoreParameter(str + ".Desc", obj.desc);
|
||||
setCoreParameter(str + ".Example", obj.example);
|
||||
}
|
||||
}
|
||||
|
||||
std::string CreateDataAPIServiceRequest::getOriginSql()const
|
||||
{
|
||||
return originSql_;
|
||||
}
|
||||
|
||||
void CreateDataAPIServiceRequest::setOriginSql(const std::string& originSql)
|
||||
{
|
||||
originSql_ = originSql;
|
||||
setCoreParameter("OriginSql", originSql);
|
||||
}
|
||||
|
||||
std::string CreateDataAPIServiceRequest::getDisplayName()const
|
||||
{
|
||||
return displayName_;
|
||||
}
|
||||
|
||||
void CreateDataAPIServiceRequest::setDisplayName(const std::string& displayName)
|
||||
{
|
||||
displayName_ = displayName;
|
||||
setCoreParameter("DisplayName", displayName);
|
||||
}
|
||||
|
||||
std::string CreateDataAPIServiceRequest::getApiPath()const
|
||||
{
|
||||
return apiPath_;
|
||||
}
|
||||
|
||||
void CreateDataAPIServiceRequest::setApiPath(const std::string& apiPath)
|
||||
{
|
||||
apiPath_ = apiPath;
|
||||
setCoreParameter("ApiPath", apiPath);
|
||||
}
|
||||
|
||||
std::vector<CreateDataAPIServiceRequest::RequestParam> CreateDataAPIServiceRequest::getRequestParam()const
|
||||
{
|
||||
return requestParam_;
|
||||
}
|
||||
|
||||
void CreateDataAPIServiceRequest::setRequestParam(const std::vector<RequestParam>& requestParam)
|
||||
{
|
||||
requestParam_ = requestParam;
|
||||
int i = 0;
|
||||
for(int i = 0; i!= requestParam.size(); i++) {
|
||||
auto obj = requestParam.at(i);
|
||||
std::string str ="RequestParam."+ std::to_string(i);
|
||||
setCoreParameter(str + ".Name", obj.name);
|
||||
setCoreParameter(str + ".Type", obj.type);
|
||||
setCoreParameter(str + ".Required", obj.required ? "true" : "false");
|
||||
setCoreParameter(str + ".Desc", obj.desc);
|
||||
setCoreParameter(str + ".Example", obj.example);
|
||||
}
|
||||
}
|
||||
|
||||
std::string CreateDataAPIServiceRequest::getFolderId()const
|
||||
{
|
||||
return folderId_;
|
||||
}
|
||||
|
||||
void CreateDataAPIServiceRequest::setFolderId(const std::string& folderId)
|
||||
{
|
||||
folderId_ = folderId;
|
||||
setCoreParameter("FolderId", folderId);
|
||||
}
|
||||
|
||||
std::string CreateDataAPIServiceRequest::getTemplateSql()const
|
||||
{
|
||||
return templateSql_;
|
||||
}
|
||||
|
||||
void CreateDataAPIServiceRequest::setTemplateSql(const std::string& templateSql)
|
||||
{
|
||||
templateSql_ = templateSql;
|
||||
setCoreParameter("TemplateSql", templateSql);
|
||||
}
|
||||
|
||||
std::string CreateDataAPIServiceRequest::getAccessKeyId()const
|
||||
{
|
||||
return accessKeyId_;
|
||||
}
|
||||
|
||||
void CreateDataAPIServiceRequest::setAccessKeyId(const std::string& accessKeyId)
|
||||
{
|
||||
accessKeyId_ = accessKeyId;
|
||||
setCoreParameter("AccessKeyId", accessKeyId);
|
||||
}
|
||||
|
||||
std::string CreateDataAPIServiceRequest::getDesc()const
|
||||
{
|
||||
return desc_;
|
||||
}
|
||||
|
||||
void CreateDataAPIServiceRequest::setDesc(const std::string& desc)
|
||||
{
|
||||
desc_ = desc;
|
||||
setCoreParameter("Desc", desc);
|
||||
}
|
||||
|
||||
81
iot/src/model/CreateDataAPIServiceResult.cc
Normal file
81
iot/src/model/CreateDataAPIServiceResult.cc
Normal 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/CreateDataAPIServiceResult.h>
|
||||
#include <json/json.h>
|
||||
|
||||
using namespace AlibabaCloud::Iot;
|
||||
using namespace AlibabaCloud::Iot::Model;
|
||||
|
||||
CreateDataAPIServiceResult::CreateDataAPIServiceResult() :
|
||||
ServiceResult()
|
||||
{}
|
||||
|
||||
CreateDataAPIServiceResult::CreateDataAPIServiceResult(const std::string &payload) :
|
||||
ServiceResult()
|
||||
{
|
||||
parse(payload);
|
||||
}
|
||||
|
||||
CreateDataAPIServiceResult::~CreateDataAPIServiceResult()
|
||||
{}
|
||||
|
||||
void CreateDataAPIServiceResult::parse(const std::string &payload)
|
||||
{
|
||||
Json::CharReaderBuilder builder;
|
||||
Json::CharReader *reader = builder.newCharReader();
|
||||
Json::Value *val;
|
||||
Json::Value value;
|
||||
JSONCPP_STRING *errs;
|
||||
reader->parse(payload.data(), payload.data() + payload.size(), val, errs);
|
||||
value = *val;
|
||||
setRequestId(value["RequestId"].asString());
|
||||
auto dataNode = value["Data"];
|
||||
if(!dataNode["ApiSrn"].isNull())
|
||||
data_.apiSrn = dataNode["ApiSrn"].asString();
|
||||
if(!dataNode["CreateTime"].isNull())
|
||||
data_.createTime = std::stol(dataNode["CreateTime"].asString());
|
||||
if(!dataNode["LastUpdateTime"].isNull())
|
||||
data_.lastUpdateTime = std::stol(dataNode["LastUpdateTime"].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();
|
||||
|
||||
}
|
||||
|
||||
CreateDataAPIServiceResult::Data CreateDataAPIServiceResult::getData()const
|
||||
{
|
||||
return data_;
|
||||
}
|
||||
|
||||
std::string CreateDataAPIServiceResult::getErrorMessage()const
|
||||
{
|
||||
return errorMessage_;
|
||||
}
|
||||
|
||||
std::string CreateDataAPIServiceResult::getCode()const
|
||||
{
|
||||
return code_;
|
||||
}
|
||||
|
||||
bool CreateDataAPIServiceResult::getSuccess()const
|
||||
{
|
||||
return success_;
|
||||
}
|
||||
|
||||
@@ -33,7 +33,18 @@ std::string CreateDeviceGroupRequest::getGroupDesc()const
|
||||
void CreateDeviceGroupRequest::setGroupDesc(const std::string& groupDesc)
|
||||
{
|
||||
groupDesc_ = groupDesc;
|
||||
setParameter("GroupDesc", groupDesc);
|
||||
setCoreParameter("GroupDesc", groupDesc);
|
||||
}
|
||||
|
||||
std::string CreateDeviceGroupRequest::getIotInstanceId()const
|
||||
{
|
||||
return iotInstanceId_;
|
||||
}
|
||||
|
||||
void CreateDeviceGroupRequest::setIotInstanceId(const std::string& iotInstanceId)
|
||||
{
|
||||
iotInstanceId_ = iotInstanceId;
|
||||
setCoreParameter("IotInstanceId", iotInstanceId);
|
||||
}
|
||||
|
||||
std::string CreateDeviceGroupRequest::getSuperGroupId()const
|
||||
@@ -44,7 +55,7 @@ std::string CreateDeviceGroupRequest::getSuperGroupId()const
|
||||
void CreateDeviceGroupRequest::setSuperGroupId(const std::string& superGroupId)
|
||||
{
|
||||
superGroupId_ = superGroupId;
|
||||
setParameter("SuperGroupId", superGroupId);
|
||||
setCoreParameter("SuperGroupId", superGroupId);
|
||||
}
|
||||
|
||||
std::string CreateDeviceGroupRequest::getGroupName()const
|
||||
@@ -55,7 +66,7 @@ std::string CreateDeviceGroupRequest::getGroupName()const
|
||||
void CreateDeviceGroupRequest::setGroupName(const std::string& groupName)
|
||||
{
|
||||
groupName_ = groupName;
|
||||
setParameter("GroupName", groupName);
|
||||
setCoreParameter("GroupName", groupName);
|
||||
}
|
||||
|
||||
std::string CreateDeviceGroupRequest::getAccessKeyId()const
|
||||
@@ -66,6 +77,6 @@ std::string CreateDeviceGroupRequest::getAccessKeyId()const
|
||||
void CreateDeviceGroupRequest::setAccessKeyId(const std::string& accessKeyId)
|
||||
{
|
||||
accessKeyId_ = accessKeyId;
|
||||
setParameter("AccessKeyId", accessKeyId);
|
||||
setCoreParameter("AccessKeyId", accessKeyId);
|
||||
}
|
||||
|
||||
|
||||
@@ -35,10 +35,13 @@ CreateDeviceGroupResult::~CreateDeviceGroupResult()
|
||||
|
||||
void CreateDeviceGroupResult::parse(const std::string &payload)
|
||||
{
|
||||
Json::Reader reader;
|
||||
Json::CharReaderBuilder builder;
|
||||
Json::CharReader *reader = builder.newCharReader();
|
||||
Json::Value *val;
|
||||
Json::Value value;
|
||||
reader.parse(payload, value);
|
||||
|
||||
JSONCPP_STRING *errs;
|
||||
reader->parse(payload.data(), payload.data() + payload.size(), val, errs);
|
||||
value = *val;
|
||||
setRequestId(value["RequestId"].asString());
|
||||
auto dataNode = value["Data"];
|
||||
if(!dataNode["GroupId"].isNull())
|
||||
|
||||
77
iot/src/model/CreateLoRaNodesTaskRequest.cc
Normal file
77
iot/src/model/CreateLoRaNodesTaskRequest.cc
Normal file
@@ -0,0 +1,77 @@
|
||||
/*
|
||||
* 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/CreateLoRaNodesTaskRequest.h>
|
||||
|
||||
using AlibabaCloud::Iot::Model::CreateLoRaNodesTaskRequest;
|
||||
|
||||
CreateLoRaNodesTaskRequest::CreateLoRaNodesTaskRequest() :
|
||||
RpcServiceRequest("iot", "2018-01-20", "CreateLoRaNodesTask")
|
||||
{}
|
||||
|
||||
CreateLoRaNodesTaskRequest::~CreateLoRaNodesTaskRequest()
|
||||
{}
|
||||
|
||||
std::string CreateLoRaNodesTaskRequest::getIotInstanceId()const
|
||||
{
|
||||
return iotInstanceId_;
|
||||
}
|
||||
|
||||
void CreateLoRaNodesTaskRequest::setIotInstanceId(const std::string& iotInstanceId)
|
||||
{
|
||||
iotInstanceId_ = iotInstanceId;
|
||||
setCoreParameter("IotInstanceId", iotInstanceId);
|
||||
}
|
||||
|
||||
std::string CreateLoRaNodesTaskRequest::getProductKey()const
|
||||
{
|
||||
return productKey_;
|
||||
}
|
||||
|
||||
void CreateLoRaNodesTaskRequest::setProductKey(const std::string& productKey)
|
||||
{
|
||||
productKey_ = productKey;
|
||||
setCoreParameter("ProductKey", productKey);
|
||||
}
|
||||
|
||||
std::vector<CreateLoRaNodesTaskRequest::DeviceInfo> CreateLoRaNodesTaskRequest::getDeviceInfo()const
|
||||
{
|
||||
return deviceInfo_;
|
||||
}
|
||||
|
||||
void CreateLoRaNodesTaskRequest::setDeviceInfo(const std::vector<DeviceInfo>& deviceInfo)
|
||||
{
|
||||
deviceInfo_ = deviceInfo;
|
||||
int i = 0;
|
||||
for(int i = 0; i!= deviceInfo.size(); i++) {
|
||||
auto obj = deviceInfo.at(i);
|
||||
std::string str ="DeviceInfo."+ std::to_string(i);
|
||||
setCoreParameter(str + ".PinCode", obj.pinCode);
|
||||
setCoreParameter(str + ".DevEui", obj.devEui);
|
||||
}
|
||||
}
|
||||
|
||||
std::string CreateLoRaNodesTaskRequest::getAccessKeyId()const
|
||||
{
|
||||
return accessKeyId_;
|
||||
}
|
||||
|
||||
void CreateLoRaNodesTaskRequest::setAccessKeyId(const std::string& accessKeyId)
|
||||
{
|
||||
accessKeyId_ = accessKeyId;
|
||||
setCoreParameter("AccessKeyId", accessKeyId);
|
||||
}
|
||||
|
||||
76
iot/src/model/CreateLoRaNodesTaskResult.cc
Normal file
76
iot/src/model/CreateLoRaNodesTaskResult.cc
Normal 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/CreateLoRaNodesTaskResult.h>
|
||||
#include <json/json.h>
|
||||
|
||||
using namespace AlibabaCloud::Iot;
|
||||
using namespace AlibabaCloud::Iot::Model;
|
||||
|
||||
CreateLoRaNodesTaskResult::CreateLoRaNodesTaskResult() :
|
||||
ServiceResult()
|
||||
{}
|
||||
|
||||
CreateLoRaNodesTaskResult::CreateLoRaNodesTaskResult(const std::string &payload) :
|
||||
ServiceResult()
|
||||
{
|
||||
parse(payload);
|
||||
}
|
||||
|
||||
CreateLoRaNodesTaskResult::~CreateLoRaNodesTaskResult()
|
||||
{}
|
||||
|
||||
void CreateLoRaNodesTaskResult::parse(const std::string &payload)
|
||||
{
|
||||
Json::CharReaderBuilder builder;
|
||||
Json::CharReader *reader = builder.newCharReader();
|
||||
Json::Value *val;
|
||||
Json::Value value;
|
||||
JSONCPP_STRING *errs;
|
||||
reader->parse(payload.data(), payload.data() + payload.size(), val, errs);
|
||||
value = *val;
|
||||
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["TaskId"].isNull())
|
||||
taskId_ = value["TaskId"].asString();
|
||||
|
||||
}
|
||||
|
||||
std::string CreateLoRaNodesTaskResult::getTaskId()const
|
||||
{
|
||||
return taskId_;
|
||||
}
|
||||
|
||||
std::string CreateLoRaNodesTaskResult::getErrorMessage()const
|
||||
{
|
||||
return errorMessage_;
|
||||
}
|
||||
|
||||
std::string CreateLoRaNodesTaskResult::getCode()const
|
||||
{
|
||||
return code_;
|
||||
}
|
||||
|
||||
bool CreateLoRaNodesTaskResult::getSuccess()const
|
||||
{
|
||||
return success_;
|
||||
}
|
||||
|
||||
@@ -33,7 +33,7 @@ int CreateProductRequest::getDataFormat()const
|
||||
void CreateProductRequest::setDataFormat(int dataFormat)
|
||||
{
|
||||
dataFormat_ = dataFormat;
|
||||
setParameter("DataFormat", std::to_string(dataFormat));
|
||||
setCoreParameter("DataFormat", std::to_string(dataFormat));
|
||||
}
|
||||
|
||||
int CreateProductRequest::getNodeType()const
|
||||
@@ -44,7 +44,7 @@ int CreateProductRequest::getNodeType()const
|
||||
void CreateProductRequest::setNodeType(int nodeType)
|
||||
{
|
||||
nodeType_ = nodeType;
|
||||
setParameter("NodeType", std::to_string(nodeType));
|
||||
setCoreParameter("NodeType", std::to_string(nodeType));
|
||||
}
|
||||
|
||||
bool CreateProductRequest::getId2()const
|
||||
@@ -55,7 +55,18 @@ bool CreateProductRequest::getId2()const
|
||||
void CreateProductRequest::setId2(bool id2)
|
||||
{
|
||||
id2_ = id2;
|
||||
setParameter("Id2", std::to_string(id2));
|
||||
setCoreParameter("Id2", id2 ? "true" : "false");
|
||||
}
|
||||
|
||||
std::string CreateProductRequest::getIotInstanceId()const
|
||||
{
|
||||
return iotInstanceId_;
|
||||
}
|
||||
|
||||
void CreateProductRequest::setIotInstanceId(const std::string& iotInstanceId)
|
||||
{
|
||||
iotInstanceId_ = iotInstanceId;
|
||||
setCoreParameter("IotInstanceId", iotInstanceId);
|
||||
}
|
||||
|
||||
std::string CreateProductRequest::getNetType()const
|
||||
@@ -66,7 +77,7 @@ std::string CreateProductRequest::getNetType()const
|
||||
void CreateProductRequest::setNetType(const std::string& netType)
|
||||
{
|
||||
netType_ = netType;
|
||||
setParameter("NetType", netType);
|
||||
setCoreParameter("NetType", netType);
|
||||
}
|
||||
|
||||
std::string CreateProductRequest::getProductName()const
|
||||
@@ -77,7 +88,7 @@ std::string CreateProductRequest::getProductName()const
|
||||
void CreateProductRequest::setProductName(const std::string& productName)
|
||||
{
|
||||
productName_ = productName;
|
||||
setParameter("ProductName", productName);
|
||||
setCoreParameter("ProductName", productName);
|
||||
}
|
||||
|
||||
std::string CreateProductRequest::getDescription()const
|
||||
@@ -88,7 +99,7 @@ std::string CreateProductRequest::getDescription()const
|
||||
void CreateProductRequest::setDescription(const std::string& description)
|
||||
{
|
||||
description_ = description;
|
||||
setParameter("Description", description);
|
||||
setCoreParameter("Description", description);
|
||||
}
|
||||
|
||||
std::string CreateProductRequest::getProtocolType()const
|
||||
@@ -99,7 +110,7 @@ std::string CreateProductRequest::getProtocolType()const
|
||||
void CreateProductRequest::setProtocolType(const std::string& protocolType)
|
||||
{
|
||||
protocolType_ = protocolType;
|
||||
setParameter("ProtocolType", protocolType);
|
||||
setCoreParameter("ProtocolType", protocolType);
|
||||
}
|
||||
|
||||
std::string CreateProductRequest::getAliyunCommodityCode()const
|
||||
@@ -110,7 +121,18 @@ std::string CreateProductRequest::getAliyunCommodityCode()const
|
||||
void CreateProductRequest::setAliyunCommodityCode(const std::string& aliyunCommodityCode)
|
||||
{
|
||||
aliyunCommodityCode_ = aliyunCommodityCode;
|
||||
setParameter("AliyunCommodityCode", aliyunCommodityCode);
|
||||
setCoreParameter("AliyunCommodityCode", aliyunCommodityCode);
|
||||
}
|
||||
|
||||
std::string CreateProductRequest::getJoinPermissionId()const
|
||||
{
|
||||
return joinPermissionId_;
|
||||
}
|
||||
|
||||
void CreateProductRequest::setJoinPermissionId(const std::string& joinPermissionId)
|
||||
{
|
||||
joinPermissionId_ = joinPermissionId;
|
||||
setCoreParameter("JoinPermissionId", joinPermissionId);
|
||||
}
|
||||
|
||||
long CreateProductRequest::getCategoryId()const
|
||||
@@ -121,7 +143,7 @@ long CreateProductRequest::getCategoryId()const
|
||||
void CreateProductRequest::setCategoryId(long categoryId)
|
||||
{
|
||||
categoryId_ = categoryId;
|
||||
setParameter("CategoryId", std::to_string(categoryId));
|
||||
setCoreParameter("CategoryId", std::to_string(categoryId));
|
||||
}
|
||||
|
||||
std::string CreateProductRequest::getAccessKeyId()const
|
||||
@@ -132,6 +154,6 @@ std::string CreateProductRequest::getAccessKeyId()const
|
||||
void CreateProductRequest::setAccessKeyId(const std::string& accessKeyId)
|
||||
{
|
||||
accessKeyId_ = accessKeyId;
|
||||
setParameter("AccessKeyId", accessKeyId);
|
||||
setCoreParameter("AccessKeyId", accessKeyId);
|
||||
}
|
||||
|
||||
|
||||
@@ -35,10 +35,13 @@ CreateProductResult::~CreateProductResult()
|
||||
|
||||
void CreateProductResult::parse(const std::string &payload)
|
||||
{
|
||||
Json::Reader reader;
|
||||
Json::CharReaderBuilder builder;
|
||||
Json::CharReader *reader = builder.newCharReader();
|
||||
Json::Value *val;
|
||||
Json::Value value;
|
||||
reader.parse(payload, value);
|
||||
|
||||
JSONCPP_STRING *errs;
|
||||
reader->parse(payload.data(), payload.data() + payload.size(), val, errs);
|
||||
value = *val;
|
||||
setRequestId(value["RequestId"].asString());
|
||||
auto dataNode = value["Data"];
|
||||
if(!dataNode["DataFormat"].isNull())
|
||||
|
||||
77
iot/src/model/CreateProductTagsRequest.cc
Normal file
77
iot/src/model/CreateProductTagsRequest.cc
Normal file
@@ -0,0 +1,77 @@
|
||||
/*
|
||||
* 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/CreateProductTagsRequest.h>
|
||||
|
||||
using AlibabaCloud::Iot::Model::CreateProductTagsRequest;
|
||||
|
||||
CreateProductTagsRequest::CreateProductTagsRequest() :
|
||||
RpcServiceRequest("iot", "2018-01-20", "CreateProductTags")
|
||||
{}
|
||||
|
||||
CreateProductTagsRequest::~CreateProductTagsRequest()
|
||||
{}
|
||||
|
||||
std::vector<CreateProductTagsRequest::ProductTag> CreateProductTagsRequest::getProductTag()const
|
||||
{
|
||||
return productTag_;
|
||||
}
|
||||
|
||||
void CreateProductTagsRequest::setProductTag(const std::vector<ProductTag>& productTag)
|
||||
{
|
||||
productTag_ = productTag;
|
||||
int i = 0;
|
||||
for(int i = 0; i!= productTag.size(); i++) {
|
||||
auto obj = productTag.at(i);
|
||||
std::string str ="ProductTag."+ std::to_string(i);
|
||||
setCoreParameter(str + ".TagValue", obj.tagValue);
|
||||
setCoreParameter(str + ".TagKey", obj.tagKey);
|
||||
}
|
||||
}
|
||||
|
||||
std::string CreateProductTagsRequest::getIotInstanceId()const
|
||||
{
|
||||
return iotInstanceId_;
|
||||
}
|
||||
|
||||
void CreateProductTagsRequest::setIotInstanceId(const std::string& iotInstanceId)
|
||||
{
|
||||
iotInstanceId_ = iotInstanceId;
|
||||
setCoreParameter("IotInstanceId", iotInstanceId);
|
||||
}
|
||||
|
||||
std::string CreateProductTagsRequest::getProductKey()const
|
||||
{
|
||||
return productKey_;
|
||||
}
|
||||
|
||||
void CreateProductTagsRequest::setProductKey(const std::string& productKey)
|
||||
{
|
||||
productKey_ = productKey;
|
||||
setCoreParameter("ProductKey", productKey);
|
||||
}
|
||||
|
||||
std::string CreateProductTagsRequest::getAccessKeyId()const
|
||||
{
|
||||
return accessKeyId_;
|
||||
}
|
||||
|
||||
void CreateProductTagsRequest::setAccessKeyId(const std::string& accessKeyId)
|
||||
{
|
||||
accessKeyId_ = accessKeyId;
|
||||
setCoreParameter("AccessKeyId", accessKeyId);
|
||||
}
|
||||
|
||||
84
iot/src/model/CreateProductTagsResult.cc
Normal file
84
iot/src/model/CreateProductTagsResult.cc
Normal file
@@ -0,0 +1,84 @@
|
||||
/*
|
||||
* Copyright 2009-2017 Alibaba Cloud All rights reserved.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
#include <alibabacloud/iot/model/CreateProductTagsResult.h>
|
||||
#include <json/json.h>
|
||||
|
||||
using namespace AlibabaCloud::Iot;
|
||||
using namespace AlibabaCloud::Iot::Model;
|
||||
|
||||
CreateProductTagsResult::CreateProductTagsResult() :
|
||||
ServiceResult()
|
||||
{}
|
||||
|
||||
CreateProductTagsResult::CreateProductTagsResult(const std::string &payload) :
|
||||
ServiceResult()
|
||||
{
|
||||
parse(payload);
|
||||
}
|
||||
|
||||
CreateProductTagsResult::~CreateProductTagsResult()
|
||||
{}
|
||||
|
||||
void CreateProductTagsResult::parse(const std::string &payload)
|
||||
{
|
||||
Json::CharReaderBuilder builder;
|
||||
Json::CharReader *reader = builder.newCharReader();
|
||||
Json::Value *val;
|
||||
Json::Value value;
|
||||
JSONCPP_STRING *errs;
|
||||
reader->parse(payload.data(), payload.data() + payload.size(), val, errs);
|
||||
value = *val;
|
||||
setRequestId(value["RequestId"].asString());
|
||||
auto allInvalidProductTags = value["InvalidProductTags"]["ProductTag"];
|
||||
for (auto value : allInvalidProductTags)
|
||||
{
|
||||
ProductTag invalidProductTagsObject;
|
||||
if(!value["TagKey"].isNull())
|
||||
invalidProductTagsObject.tagKey = value["TagKey"].asString();
|
||||
if(!value["TagValue"].isNull())
|
||||
invalidProductTagsObject.tagValue = value["TagValue"].asString();
|
||||
invalidProductTags_.push_back(invalidProductTagsObject);
|
||||
}
|
||||
if(!value["Success"].isNull())
|
||||
success_ = value["Success"].asString() == "true";
|
||||
if(!value["ErrorMessage"].isNull())
|
||||
errorMessage_ = value["ErrorMessage"].asString();
|
||||
if(!value["Code"].isNull())
|
||||
code_ = value["Code"].asString();
|
||||
|
||||
}
|
||||
|
||||
std::vector<CreateProductTagsResult::ProductTag> CreateProductTagsResult::getInvalidProductTags()const
|
||||
{
|
||||
return invalidProductTags_;
|
||||
}
|
||||
|
||||
std::string CreateProductTagsResult::getErrorMessage()const
|
||||
{
|
||||
return errorMessage_;
|
||||
}
|
||||
|
||||
std::string CreateProductTagsResult::getCode()const
|
||||
{
|
||||
return code_;
|
||||
}
|
||||
|
||||
bool CreateProductTagsResult::getSuccess()const
|
||||
{
|
||||
return success_;
|
||||
}
|
||||
|
||||
@@ -25,6 +25,17 @@ CreateProductTopicRequest::CreateProductTopicRequest() :
|
||||
CreateProductTopicRequest::~CreateProductTopicRequest()
|
||||
{}
|
||||
|
||||
std::string CreateProductTopicRequest::getIotInstanceId()const
|
||||
{
|
||||
return iotInstanceId_;
|
||||
}
|
||||
|
||||
void CreateProductTopicRequest::setIotInstanceId(const std::string& iotInstanceId)
|
||||
{
|
||||
iotInstanceId_ = iotInstanceId;
|
||||
setCoreParameter("IotInstanceId", iotInstanceId);
|
||||
}
|
||||
|
||||
std::string CreateProductTopicRequest::getProductKey()const
|
||||
{
|
||||
return productKey_;
|
||||
@@ -33,7 +44,7 @@ std::string CreateProductTopicRequest::getProductKey()const
|
||||
void CreateProductTopicRequest::setProductKey(const std::string& productKey)
|
||||
{
|
||||
productKey_ = productKey;
|
||||
setParameter("ProductKey", productKey);
|
||||
setCoreParameter("ProductKey", productKey);
|
||||
}
|
||||
|
||||
std::string CreateProductTopicRequest::getTopicShortName()const
|
||||
@@ -44,7 +55,7 @@ std::string CreateProductTopicRequest::getTopicShortName()const
|
||||
void CreateProductTopicRequest::setTopicShortName(const std::string& topicShortName)
|
||||
{
|
||||
topicShortName_ = topicShortName;
|
||||
setParameter("TopicShortName", topicShortName);
|
||||
setCoreParameter("TopicShortName", topicShortName);
|
||||
}
|
||||
|
||||
std::string CreateProductTopicRequest::getOperation()const
|
||||
@@ -55,7 +66,7 @@ std::string CreateProductTopicRequest::getOperation()const
|
||||
void CreateProductTopicRequest::setOperation(const std::string& operation)
|
||||
{
|
||||
operation_ = operation;
|
||||
setParameter("Operation", operation);
|
||||
setCoreParameter("Operation", operation);
|
||||
}
|
||||
|
||||
std::string CreateProductTopicRequest::getAccessKeyId()const
|
||||
@@ -66,7 +77,7 @@ std::string CreateProductTopicRequest::getAccessKeyId()const
|
||||
void CreateProductTopicRequest::setAccessKeyId(const std::string& accessKeyId)
|
||||
{
|
||||
accessKeyId_ = accessKeyId;
|
||||
setParameter("AccessKeyId", accessKeyId);
|
||||
setCoreParameter("AccessKeyId", accessKeyId);
|
||||
}
|
||||
|
||||
std::string CreateProductTopicRequest::getDesc()const
|
||||
@@ -77,6 +88,6 @@ std::string CreateProductTopicRequest::getDesc()const
|
||||
void CreateProductTopicRequest::setDesc(const std::string& desc)
|
||||
{
|
||||
desc_ = desc;
|
||||
setParameter("Desc", desc);
|
||||
setCoreParameter("Desc", desc);
|
||||
}
|
||||
|
||||
|
||||
@@ -35,10 +35,13 @@ CreateProductTopicResult::~CreateProductTopicResult()
|
||||
|
||||
void CreateProductTopicResult::parse(const std::string &payload)
|
||||
{
|
||||
Json::Reader reader;
|
||||
Json::CharReaderBuilder builder;
|
||||
Json::CharReader *reader = builder.newCharReader();
|
||||
Json::Value *val;
|
||||
Json::Value value;
|
||||
reader.parse(payload, value);
|
||||
|
||||
JSONCPP_STRING *errs;
|
||||
reader->parse(payload.data(), payload.data() + payload.size(), val, errs);
|
||||
value = *val;
|
||||
setRequestId(value["RequestId"].asString());
|
||||
if(!value["Success"].isNull())
|
||||
success_ = value["Success"].asString() == "true";
|
||||
|
||||
@@ -33,7 +33,18 @@ std::string CreateRuleActionRequest::getConfiguration()const
|
||||
void CreateRuleActionRequest::setConfiguration(const std::string& configuration)
|
||||
{
|
||||
configuration_ = configuration;
|
||||
setParameter("Configuration", configuration);
|
||||
setCoreParameter("Configuration", configuration);
|
||||
}
|
||||
|
||||
std::string CreateRuleActionRequest::getIotInstanceId()const
|
||||
{
|
||||
return iotInstanceId_;
|
||||
}
|
||||
|
||||
void CreateRuleActionRequest::setIotInstanceId(const std::string& iotInstanceId)
|
||||
{
|
||||
iotInstanceId_ = iotInstanceId;
|
||||
setCoreParameter("IotInstanceId", iotInstanceId);
|
||||
}
|
||||
|
||||
long CreateRuleActionRequest::getRuleId()const
|
||||
@@ -44,7 +55,7 @@ long CreateRuleActionRequest::getRuleId()const
|
||||
void CreateRuleActionRequest::setRuleId(long ruleId)
|
||||
{
|
||||
ruleId_ = ruleId;
|
||||
setParameter("RuleId", std::to_string(ruleId));
|
||||
setCoreParameter("RuleId", std::to_string(ruleId));
|
||||
}
|
||||
|
||||
std::string CreateRuleActionRequest::getType()const
|
||||
@@ -55,7 +66,7 @@ std::string CreateRuleActionRequest::getType()const
|
||||
void CreateRuleActionRequest::setType(const std::string& type)
|
||||
{
|
||||
type_ = type;
|
||||
setParameter("Type", type);
|
||||
setCoreParameter("Type", type);
|
||||
}
|
||||
|
||||
std::string CreateRuleActionRequest::getAccessKeyId()const
|
||||
@@ -66,7 +77,7 @@ std::string CreateRuleActionRequest::getAccessKeyId()const
|
||||
void CreateRuleActionRequest::setAccessKeyId(const std::string& accessKeyId)
|
||||
{
|
||||
accessKeyId_ = accessKeyId;
|
||||
setParameter("AccessKeyId", accessKeyId);
|
||||
setCoreParameter("AccessKeyId", accessKeyId);
|
||||
}
|
||||
|
||||
bool CreateRuleActionRequest::getErrorActionFlag()const
|
||||
@@ -77,6 +88,6 @@ bool CreateRuleActionRequest::getErrorActionFlag()const
|
||||
void CreateRuleActionRequest::setErrorActionFlag(bool errorActionFlag)
|
||||
{
|
||||
errorActionFlag_ = errorActionFlag;
|
||||
setParameter("ErrorActionFlag", std::to_string(errorActionFlag));
|
||||
setCoreParameter("ErrorActionFlag", errorActionFlag ? "true" : "false");
|
||||
}
|
||||
|
||||
|
||||
@@ -35,10 +35,13 @@ CreateRuleActionResult::~CreateRuleActionResult()
|
||||
|
||||
void CreateRuleActionResult::parse(const std::string &payload)
|
||||
{
|
||||
Json::Reader reader;
|
||||
Json::CharReaderBuilder builder;
|
||||
Json::CharReader *reader = builder.newCharReader();
|
||||
Json::Value *val;
|
||||
Json::Value value;
|
||||
reader.parse(payload, value);
|
||||
|
||||
JSONCPP_STRING *errs;
|
||||
reader->parse(payload.data(), payload.data() + payload.size(), val, errs);
|
||||
value = *val;
|
||||
setRequestId(value["RequestId"].asString());
|
||||
if(!value["Code"].isNull())
|
||||
code_ = value["Code"].asString();
|
||||
|
||||
@@ -33,7 +33,7 @@ std::string CreateRuleRequest::getSelect()const
|
||||
void CreateRuleRequest::setSelect(const std::string& select)
|
||||
{
|
||||
select_ = select;
|
||||
setParameter("Select", select);
|
||||
setCoreParameter("Select", select);
|
||||
}
|
||||
|
||||
std::string CreateRuleRequest::getRuleDesc()const
|
||||
@@ -44,7 +44,7 @@ std::string CreateRuleRequest::getRuleDesc()const
|
||||
void CreateRuleRequest::setRuleDesc(const std::string& ruleDesc)
|
||||
{
|
||||
ruleDesc_ = ruleDesc;
|
||||
setParameter("RuleDesc", ruleDesc);
|
||||
setCoreParameter("RuleDesc", ruleDesc);
|
||||
}
|
||||
|
||||
std::string CreateRuleRequest::getDataType()const
|
||||
@@ -55,7 +55,18 @@ std::string CreateRuleRequest::getDataType()const
|
||||
void CreateRuleRequest::setDataType(const std::string& dataType)
|
||||
{
|
||||
dataType_ = dataType;
|
||||
setParameter("DataType", dataType);
|
||||
setCoreParameter("DataType", dataType);
|
||||
}
|
||||
|
||||
std::string CreateRuleRequest::getIotInstanceId()const
|
||||
{
|
||||
return iotInstanceId_;
|
||||
}
|
||||
|
||||
void CreateRuleRequest::setIotInstanceId(const std::string& iotInstanceId)
|
||||
{
|
||||
iotInstanceId_ = iotInstanceId;
|
||||
setCoreParameter("IotInstanceId", iotInstanceId);
|
||||
}
|
||||
|
||||
std::string CreateRuleRequest::getName()const
|
||||
@@ -66,7 +77,7 @@ std::string CreateRuleRequest::getName()const
|
||||
void CreateRuleRequest::setName(const std::string& name)
|
||||
{
|
||||
name_ = name;
|
||||
setParameter("Name", name);
|
||||
setCoreParameter("Name", name);
|
||||
}
|
||||
|
||||
std::string CreateRuleRequest::getWhere()const
|
||||
@@ -77,7 +88,7 @@ std::string CreateRuleRequest::getWhere()const
|
||||
void CreateRuleRequest::setWhere(const std::string& where)
|
||||
{
|
||||
where_ = where;
|
||||
setParameter("Where", where);
|
||||
setCoreParameter("Where", where);
|
||||
}
|
||||
|
||||
std::string CreateRuleRequest::getProductKey()const
|
||||
@@ -88,7 +99,7 @@ std::string CreateRuleRequest::getProductKey()const
|
||||
void CreateRuleRequest::setProductKey(const std::string& productKey)
|
||||
{
|
||||
productKey_ = productKey;
|
||||
setParameter("ProductKey", productKey);
|
||||
setCoreParameter("ProductKey", productKey);
|
||||
}
|
||||
|
||||
int CreateRuleRequest::getTopicType()const
|
||||
@@ -99,7 +110,7 @@ int CreateRuleRequest::getTopicType()const
|
||||
void CreateRuleRequest::setTopicType(int topicType)
|
||||
{
|
||||
topicType_ = topicType;
|
||||
setParameter("TopicType", std::to_string(topicType));
|
||||
setCoreParameter("TopicType", std::to_string(topicType));
|
||||
}
|
||||
|
||||
std::string CreateRuleRequest::getAccessKeyId()const
|
||||
@@ -110,7 +121,7 @@ std::string CreateRuleRequest::getAccessKeyId()const
|
||||
void CreateRuleRequest::setAccessKeyId(const std::string& accessKeyId)
|
||||
{
|
||||
accessKeyId_ = accessKeyId;
|
||||
setParameter("AccessKeyId", accessKeyId);
|
||||
setCoreParameter("AccessKeyId", accessKeyId);
|
||||
}
|
||||
|
||||
std::string CreateRuleRequest::getShortTopic()const
|
||||
@@ -121,6 +132,6 @@ std::string CreateRuleRequest::getShortTopic()const
|
||||
void CreateRuleRequest::setShortTopic(const std::string& shortTopic)
|
||||
{
|
||||
shortTopic_ = shortTopic;
|
||||
setParameter("ShortTopic", shortTopic);
|
||||
setCoreParameter("ShortTopic", shortTopic);
|
||||
}
|
||||
|
||||
|
||||
@@ -35,10 +35,13 @@ CreateRuleResult::~CreateRuleResult()
|
||||
|
||||
void CreateRuleResult::parse(const std::string &payload)
|
||||
{
|
||||
Json::Reader reader;
|
||||
Json::CharReaderBuilder builder;
|
||||
Json::CharReader *reader = builder.newCharReader();
|
||||
Json::Value *val;
|
||||
Json::Value value;
|
||||
reader.parse(payload, value);
|
||||
|
||||
JSONCPP_STRING *errs;
|
||||
reader->parse(payload.data(), payload.data() + payload.size(), val, errs);
|
||||
value = *val;
|
||||
setRequestId(value["RequestId"].asString());
|
||||
if(!value["Success"].isNull())
|
||||
success_ = value["Success"].asString() == "true";
|
||||
|
||||
@@ -34,7 +34,7 @@ void CreateTopicRouteTableRequest::setDstTopic(const std::vector<std::string>& d
|
||||
{
|
||||
dstTopic_ = dstTopic;
|
||||
for(int i = 0; i!= dstTopic.size(); i++)
|
||||
setParameter("DstTopic."+ std::to_string(i), dstTopic.at(i));
|
||||
setCoreParameter("DstTopic."+ std::to_string(i), dstTopic.at(i));
|
||||
}
|
||||
|
||||
std::string CreateTopicRouteTableRequest::getRegionId()const
|
||||
@@ -45,7 +45,18 @@ std::string CreateTopicRouteTableRequest::getRegionId()const
|
||||
void CreateTopicRouteTableRequest::setRegionId(const std::string& regionId)
|
||||
{
|
||||
regionId_ = regionId;
|
||||
setParameter("RegionId", regionId);
|
||||
setCoreParameter("RegionId", regionId);
|
||||
}
|
||||
|
||||
std::string CreateTopicRouteTableRequest::getIotInstanceId()const
|
||||
{
|
||||
return iotInstanceId_;
|
||||
}
|
||||
|
||||
void CreateTopicRouteTableRequest::setIotInstanceId(const std::string& iotInstanceId)
|
||||
{
|
||||
iotInstanceId_ = iotInstanceId;
|
||||
setCoreParameter("IotInstanceId", iotInstanceId);
|
||||
}
|
||||
|
||||
std::string CreateTopicRouteTableRequest::getAccessKeyId()const
|
||||
@@ -56,7 +67,7 @@ std::string CreateTopicRouteTableRequest::getAccessKeyId()const
|
||||
void CreateTopicRouteTableRequest::setAccessKeyId(const std::string& accessKeyId)
|
||||
{
|
||||
accessKeyId_ = accessKeyId;
|
||||
setParameter("AccessKeyId", accessKeyId);
|
||||
setCoreParameter("AccessKeyId", accessKeyId);
|
||||
}
|
||||
|
||||
std::string CreateTopicRouteTableRequest::getSrcTopic()const
|
||||
@@ -67,6 +78,6 @@ std::string CreateTopicRouteTableRequest::getSrcTopic()const
|
||||
void CreateTopicRouteTableRequest::setSrcTopic(const std::string& srcTopic)
|
||||
{
|
||||
srcTopic_ = srcTopic;
|
||||
setParameter("SrcTopic", srcTopic);
|
||||
setCoreParameter("SrcTopic", srcTopic);
|
||||
}
|
||||
|
||||
|
||||
@@ -35,10 +35,13 @@ CreateTopicRouteTableResult::~CreateTopicRouteTableResult()
|
||||
|
||||
void CreateTopicRouteTableResult::parse(const std::string &payload)
|
||||
{
|
||||
Json::Reader reader;
|
||||
Json::CharReaderBuilder builder;
|
||||
Json::CharReader *reader = builder.newCharReader();
|
||||
Json::Value *val;
|
||||
Json::Value value;
|
||||
reader.parse(payload, value);
|
||||
|
||||
JSONCPP_STRING *errs;
|
||||
reader->parse(payload.data(), payload.data() + payload.size(), val, errs);
|
||||
value = *val;
|
||||
setRequestId(value["RequestId"].asString());
|
||||
auto allFailureTopics = value["FailureTopics"]["Topic"];
|
||||
for (const auto &item : allFailureTopics)
|
||||
|
||||
93
iot/src/model/DeleteDeviceFileRequest.cc
Normal file
93
iot/src/model/DeleteDeviceFileRequest.cc
Normal 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/DeleteDeviceFileRequest.h>
|
||||
|
||||
using AlibabaCloud::Iot::Model::DeleteDeviceFileRequest;
|
||||
|
||||
DeleteDeviceFileRequest::DeleteDeviceFileRequest() :
|
||||
RpcServiceRequest("iot", "2018-01-20", "DeleteDeviceFile")
|
||||
{}
|
||||
|
||||
DeleteDeviceFileRequest::~DeleteDeviceFileRequest()
|
||||
{}
|
||||
|
||||
std::string DeleteDeviceFileRequest::getIotId()const
|
||||
{
|
||||
return iotId_;
|
||||
}
|
||||
|
||||
void DeleteDeviceFileRequest::setIotId(const std::string& iotId)
|
||||
{
|
||||
iotId_ = iotId;
|
||||
setCoreParameter("IotId", iotId);
|
||||
}
|
||||
|
||||
std::string DeleteDeviceFileRequest::getIotInstanceId()const
|
||||
{
|
||||
return iotInstanceId_;
|
||||
}
|
||||
|
||||
void DeleteDeviceFileRequest::setIotInstanceId(const std::string& iotInstanceId)
|
||||
{
|
||||
iotInstanceId_ = iotInstanceId;
|
||||
setCoreParameter("IotInstanceId", iotInstanceId);
|
||||
}
|
||||
|
||||
std::string DeleteDeviceFileRequest::getDeviceName()const
|
||||
{
|
||||
return deviceName_;
|
||||
}
|
||||
|
||||
void DeleteDeviceFileRequest::setDeviceName(const std::string& deviceName)
|
||||
{
|
||||
deviceName_ = deviceName;
|
||||
setCoreParameter("DeviceName", deviceName);
|
||||
}
|
||||
|
||||
std::string DeleteDeviceFileRequest::getProductKey()const
|
||||
{
|
||||
return productKey_;
|
||||
}
|
||||
|
||||
void DeleteDeviceFileRequest::setProductKey(const std::string& productKey)
|
||||
{
|
||||
productKey_ = productKey;
|
||||
setCoreParameter("ProductKey", productKey);
|
||||
}
|
||||
|
||||
std::string DeleteDeviceFileRequest::getAccessKeyId()const
|
||||
{
|
||||
return accessKeyId_;
|
||||
}
|
||||
|
||||
void DeleteDeviceFileRequest::setAccessKeyId(const std::string& accessKeyId)
|
||||
{
|
||||
accessKeyId_ = accessKeyId;
|
||||
setCoreParameter("AccessKeyId", accessKeyId);
|
||||
}
|
||||
|
||||
std::string DeleteDeviceFileRequest::getFileId()const
|
||||
{
|
||||
return fileId_;
|
||||
}
|
||||
|
||||
void DeleteDeviceFileRequest::setFileId(const std::string& fileId)
|
||||
{
|
||||
fileId_ = fileId;
|
||||
setCoreParameter("FileId", fileId);
|
||||
}
|
||||
|
||||
69
iot/src/model/DeleteDeviceFileResult.cc
Normal file
69
iot/src/model/DeleteDeviceFileResult.cc
Normal file
@@ -0,0 +1,69 @@
|
||||
/*
|
||||
* 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/DeleteDeviceFileResult.h>
|
||||
#include <json/json.h>
|
||||
|
||||
using namespace AlibabaCloud::Iot;
|
||||
using namespace AlibabaCloud::Iot::Model;
|
||||
|
||||
DeleteDeviceFileResult::DeleteDeviceFileResult() :
|
||||
ServiceResult()
|
||||
{}
|
||||
|
||||
DeleteDeviceFileResult::DeleteDeviceFileResult(const std::string &payload) :
|
||||
ServiceResult()
|
||||
{
|
||||
parse(payload);
|
||||
}
|
||||
|
||||
DeleteDeviceFileResult::~DeleteDeviceFileResult()
|
||||
{}
|
||||
|
||||
void DeleteDeviceFileResult::parse(const std::string &payload)
|
||||
{
|
||||
Json::CharReaderBuilder builder;
|
||||
Json::CharReader *reader = builder.newCharReader();
|
||||
Json::Value *val;
|
||||
Json::Value value;
|
||||
JSONCPP_STRING *errs;
|
||||
reader->parse(payload.data(), payload.data() + payload.size(), val, errs);
|
||||
value = *val;
|
||||
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 DeleteDeviceFileResult::getErrorMessage()const
|
||||
{
|
||||
return errorMessage_;
|
||||
}
|
||||
|
||||
std::string DeleteDeviceFileResult::getCode()const
|
||||
{
|
||||
return code_;
|
||||
}
|
||||
|
||||
bool DeleteDeviceFileResult::getSuccess()const
|
||||
{
|
||||
return success_;
|
||||
}
|
||||
|
||||
@@ -25,6 +25,17 @@ DeleteDeviceGroupRequest::DeleteDeviceGroupRequest() :
|
||||
DeleteDeviceGroupRequest::~DeleteDeviceGroupRequest()
|
||||
{}
|
||||
|
||||
std::string DeleteDeviceGroupRequest::getIotInstanceId()const
|
||||
{
|
||||
return iotInstanceId_;
|
||||
}
|
||||
|
||||
void DeleteDeviceGroupRequest::setIotInstanceId(const std::string& iotInstanceId)
|
||||
{
|
||||
iotInstanceId_ = iotInstanceId;
|
||||
setCoreParameter("IotInstanceId", iotInstanceId);
|
||||
}
|
||||
|
||||
std::string DeleteDeviceGroupRequest::getGroupId()const
|
||||
{
|
||||
return groupId_;
|
||||
@@ -33,7 +44,7 @@ std::string DeleteDeviceGroupRequest::getGroupId()const
|
||||
void DeleteDeviceGroupRequest::setGroupId(const std::string& groupId)
|
||||
{
|
||||
groupId_ = groupId;
|
||||
setParameter("GroupId", groupId);
|
||||
setCoreParameter("GroupId", groupId);
|
||||
}
|
||||
|
||||
std::string DeleteDeviceGroupRequest::getAccessKeyId()const
|
||||
@@ -44,6 +55,6 @@ std::string DeleteDeviceGroupRequest::getAccessKeyId()const
|
||||
void DeleteDeviceGroupRequest::setAccessKeyId(const std::string& accessKeyId)
|
||||
{
|
||||
accessKeyId_ = accessKeyId;
|
||||
setParameter("AccessKeyId", accessKeyId);
|
||||
setCoreParameter("AccessKeyId", accessKeyId);
|
||||
}
|
||||
|
||||
|
||||
@@ -35,10 +35,13 @@ DeleteDeviceGroupResult::~DeleteDeviceGroupResult()
|
||||
|
||||
void DeleteDeviceGroupResult::parse(const std::string &payload)
|
||||
{
|
||||
Json::Reader reader;
|
||||
Json::CharReaderBuilder builder;
|
||||
Json::CharReader *reader = builder.newCharReader();
|
||||
Json::Value *val;
|
||||
Json::Value value;
|
||||
reader.parse(payload, value);
|
||||
|
||||
JSONCPP_STRING *errs;
|
||||
reader->parse(payload.data(), payload.data() + payload.size(), val, errs);
|
||||
value = *val;
|
||||
setRequestId(value["RequestId"].asString());
|
||||
if(!value["Success"].isNull())
|
||||
success_ = value["Success"].asString() == "true";
|
||||
|
||||
@@ -25,6 +25,28 @@ DeleteDevicePropRequest::DeleteDevicePropRequest() :
|
||||
DeleteDevicePropRequest::~DeleteDevicePropRequest()
|
||||
{}
|
||||
|
||||
std::string DeleteDevicePropRequest::getIotId()const
|
||||
{
|
||||
return iotId_;
|
||||
}
|
||||
|
||||
void DeleteDevicePropRequest::setIotId(const std::string& iotId)
|
||||
{
|
||||
iotId_ = iotId;
|
||||
setCoreParameter("IotId", iotId);
|
||||
}
|
||||
|
||||
std::string DeleteDevicePropRequest::getIotInstanceId()const
|
||||
{
|
||||
return iotInstanceId_;
|
||||
}
|
||||
|
||||
void DeleteDevicePropRequest::setIotInstanceId(const std::string& iotInstanceId)
|
||||
{
|
||||
iotInstanceId_ = iotInstanceId;
|
||||
setCoreParameter("IotInstanceId", iotInstanceId);
|
||||
}
|
||||
|
||||
std::string DeleteDevicePropRequest::getDeviceName()const
|
||||
{
|
||||
return deviceName_;
|
||||
@@ -33,7 +55,7 @@ std::string DeleteDevicePropRequest::getDeviceName()const
|
||||
void DeleteDevicePropRequest::setDeviceName(const std::string& deviceName)
|
||||
{
|
||||
deviceName_ = deviceName;
|
||||
setParameter("DeviceName", deviceName);
|
||||
setCoreParameter("DeviceName", deviceName);
|
||||
}
|
||||
|
||||
std::string DeleteDevicePropRequest::getProductKey()const
|
||||
@@ -44,7 +66,7 @@ std::string DeleteDevicePropRequest::getProductKey()const
|
||||
void DeleteDevicePropRequest::setProductKey(const std::string& productKey)
|
||||
{
|
||||
productKey_ = productKey;
|
||||
setParameter("ProductKey", productKey);
|
||||
setCoreParameter("ProductKey", productKey);
|
||||
}
|
||||
|
||||
std::string DeleteDevicePropRequest::getAccessKeyId()const
|
||||
@@ -55,7 +77,7 @@ std::string DeleteDevicePropRequest::getAccessKeyId()const
|
||||
void DeleteDevicePropRequest::setAccessKeyId(const std::string& accessKeyId)
|
||||
{
|
||||
accessKeyId_ = accessKeyId;
|
||||
setParameter("AccessKeyId", accessKeyId);
|
||||
setCoreParameter("AccessKeyId", accessKeyId);
|
||||
}
|
||||
|
||||
std::string DeleteDevicePropRequest::getPropKey()const
|
||||
@@ -66,6 +88,6 @@ std::string DeleteDevicePropRequest::getPropKey()const
|
||||
void DeleteDevicePropRequest::setPropKey(const std::string& propKey)
|
||||
{
|
||||
propKey_ = propKey;
|
||||
setParameter("PropKey", propKey);
|
||||
setCoreParameter("PropKey", propKey);
|
||||
}
|
||||
|
||||
|
||||
@@ -35,10 +35,13 @@ DeleteDevicePropResult::~DeleteDevicePropResult()
|
||||
|
||||
void DeleteDevicePropResult::parse(const std::string &payload)
|
||||
{
|
||||
Json::Reader reader;
|
||||
Json::CharReaderBuilder builder;
|
||||
Json::CharReader *reader = builder.newCharReader();
|
||||
Json::Value *val;
|
||||
Json::Value value;
|
||||
reader.parse(payload, value);
|
||||
|
||||
JSONCPP_STRING *errs;
|
||||
reader->parse(payload.data(), payload.data() + payload.size(), val, errs);
|
||||
value = *val;
|
||||
setRequestId(value["RequestId"].asString());
|
||||
if(!value["Success"].isNull())
|
||||
success_ = value["Success"].asString() == "true";
|
||||
|
||||
@@ -33,7 +33,18 @@ std::string DeleteDeviceRequest::getIotId()const
|
||||
void DeleteDeviceRequest::setIotId(const std::string& iotId)
|
||||
{
|
||||
iotId_ = iotId;
|
||||
setParameter("IotId", iotId);
|
||||
setCoreParameter("IotId", iotId);
|
||||
}
|
||||
|
||||
std::string DeleteDeviceRequest::getIotInstanceId()const
|
||||
{
|
||||
return iotInstanceId_;
|
||||
}
|
||||
|
||||
void DeleteDeviceRequest::setIotInstanceId(const std::string& iotInstanceId)
|
||||
{
|
||||
iotInstanceId_ = iotInstanceId;
|
||||
setCoreParameter("IotInstanceId", iotInstanceId);
|
||||
}
|
||||
|
||||
std::string DeleteDeviceRequest::getDeviceName()const
|
||||
@@ -44,7 +55,7 @@ std::string DeleteDeviceRequest::getDeviceName()const
|
||||
void DeleteDeviceRequest::setDeviceName(const std::string& deviceName)
|
||||
{
|
||||
deviceName_ = deviceName;
|
||||
setParameter("DeviceName", deviceName);
|
||||
setCoreParameter("DeviceName", deviceName);
|
||||
}
|
||||
|
||||
std::string DeleteDeviceRequest::getProductKey()const
|
||||
@@ -55,7 +66,7 @@ std::string DeleteDeviceRequest::getProductKey()const
|
||||
void DeleteDeviceRequest::setProductKey(const std::string& productKey)
|
||||
{
|
||||
productKey_ = productKey;
|
||||
setParameter("ProductKey", productKey);
|
||||
setCoreParameter("ProductKey", productKey);
|
||||
}
|
||||
|
||||
std::string DeleteDeviceRequest::getAccessKeyId()const
|
||||
@@ -66,6 +77,6 @@ std::string DeleteDeviceRequest::getAccessKeyId()const
|
||||
void DeleteDeviceRequest::setAccessKeyId(const std::string& accessKeyId)
|
||||
{
|
||||
accessKeyId_ = accessKeyId;
|
||||
setParameter("AccessKeyId", accessKeyId);
|
||||
setCoreParameter("AccessKeyId", accessKeyId);
|
||||
}
|
||||
|
||||
|
||||
@@ -35,10 +35,13 @@ DeleteDeviceResult::~DeleteDeviceResult()
|
||||
|
||||
void DeleteDeviceResult::parse(const std::string &payload)
|
||||
{
|
||||
Json::Reader reader;
|
||||
Json::CharReaderBuilder builder;
|
||||
Json::CharReader *reader = builder.newCharReader();
|
||||
Json::Value *val;
|
||||
Json::Value value;
|
||||
reader.parse(payload, value);
|
||||
|
||||
JSONCPP_STRING *errs;
|
||||
reader->parse(payload.data(), payload.data() + payload.size(), val, errs);
|
||||
value = *val;
|
||||
setRequestId(value["RequestId"].asString());
|
||||
if(!value["Success"].isNull())
|
||||
success_ = value["Success"].asString() == "true";
|
||||
|
||||
@@ -25,6 +25,17 @@ DeleteProductRequest::DeleteProductRequest() :
|
||||
DeleteProductRequest::~DeleteProductRequest()
|
||||
{}
|
||||
|
||||
std::string DeleteProductRequest::getIotInstanceId()const
|
||||
{
|
||||
return iotInstanceId_;
|
||||
}
|
||||
|
||||
void DeleteProductRequest::setIotInstanceId(const std::string& iotInstanceId)
|
||||
{
|
||||
iotInstanceId_ = iotInstanceId;
|
||||
setCoreParameter("IotInstanceId", iotInstanceId);
|
||||
}
|
||||
|
||||
std::string DeleteProductRequest::getProductKey()const
|
||||
{
|
||||
return productKey_;
|
||||
@@ -33,7 +44,7 @@ std::string DeleteProductRequest::getProductKey()const
|
||||
void DeleteProductRequest::setProductKey(const std::string& productKey)
|
||||
{
|
||||
productKey_ = productKey;
|
||||
setParameter("ProductKey", productKey);
|
||||
setCoreParameter("ProductKey", productKey);
|
||||
}
|
||||
|
||||
std::string DeleteProductRequest::getAccessKeyId()const
|
||||
@@ -44,6 +55,6 @@ std::string DeleteProductRequest::getAccessKeyId()const
|
||||
void DeleteProductRequest::setAccessKeyId(const std::string& accessKeyId)
|
||||
{
|
||||
accessKeyId_ = accessKeyId;
|
||||
setParameter("AccessKeyId", accessKeyId);
|
||||
setCoreParameter("AccessKeyId", accessKeyId);
|
||||
}
|
||||
|
||||
|
||||
@@ -35,10 +35,13 @@ DeleteProductResult::~DeleteProductResult()
|
||||
|
||||
void DeleteProductResult::parse(const std::string &payload)
|
||||
{
|
||||
Json::Reader reader;
|
||||
Json::CharReaderBuilder builder;
|
||||
Json::CharReader *reader = builder.newCharReader();
|
||||
Json::Value *val;
|
||||
Json::Value value;
|
||||
reader.parse(payload, value);
|
||||
|
||||
JSONCPP_STRING *errs;
|
||||
reader->parse(payload.data(), payload.data() + payload.size(), val, errs);
|
||||
value = *val;
|
||||
setRequestId(value["RequestId"].asString());
|
||||
if(!value["Success"].isNull())
|
||||
success_ = value["Success"].asString() == "true";
|
||||
|
||||
72
iot/src/model/DeleteProductTagsRequest.cc
Normal file
72
iot/src/model/DeleteProductTagsRequest.cc
Normal file
@@ -0,0 +1,72 @@
|
||||
/*
|
||||
* Copyright 2009-2017 Alibaba Cloud All rights reserved.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
#include <alibabacloud/iot/model/DeleteProductTagsRequest.h>
|
||||
|
||||
using AlibabaCloud::Iot::Model::DeleteProductTagsRequest;
|
||||
|
||||
DeleteProductTagsRequest::DeleteProductTagsRequest() :
|
||||
RpcServiceRequest("iot", "2018-01-20", "DeleteProductTags")
|
||||
{}
|
||||
|
||||
DeleteProductTagsRequest::~DeleteProductTagsRequest()
|
||||
{}
|
||||
|
||||
std::string DeleteProductTagsRequest::getIotInstanceId()const
|
||||
{
|
||||
return iotInstanceId_;
|
||||
}
|
||||
|
||||
void DeleteProductTagsRequest::setIotInstanceId(const std::string& iotInstanceId)
|
||||
{
|
||||
iotInstanceId_ = iotInstanceId;
|
||||
setCoreParameter("IotInstanceId", iotInstanceId);
|
||||
}
|
||||
|
||||
std::vector<std::string> DeleteProductTagsRequest::getProductTagKey()const
|
||||
{
|
||||
return productTagKey_;
|
||||
}
|
||||
|
||||
void DeleteProductTagsRequest::setProductTagKey(const std::vector<std::string>& productTagKey)
|
||||
{
|
||||
productTagKey_ = productTagKey;
|
||||
for(int i = 0; i!= productTagKey.size(); i++)
|
||||
setCoreParameter("ProductTagKey."+ std::to_string(i), productTagKey.at(i));
|
||||
}
|
||||
|
||||
std::string DeleteProductTagsRequest::getProductKey()const
|
||||
{
|
||||
return productKey_;
|
||||
}
|
||||
|
||||
void DeleteProductTagsRequest::setProductKey(const std::string& productKey)
|
||||
{
|
||||
productKey_ = productKey;
|
||||
setCoreParameter("ProductKey", productKey);
|
||||
}
|
||||
|
||||
std::string DeleteProductTagsRequest::getAccessKeyId()const
|
||||
{
|
||||
return accessKeyId_;
|
||||
}
|
||||
|
||||
void DeleteProductTagsRequest::setAccessKeyId(const std::string& accessKeyId)
|
||||
{
|
||||
accessKeyId_ = accessKeyId;
|
||||
setCoreParameter("AccessKeyId", accessKeyId);
|
||||
}
|
||||
|
||||
69
iot/src/model/DeleteProductTagsResult.cc
Normal file
69
iot/src/model/DeleteProductTagsResult.cc
Normal file
@@ -0,0 +1,69 @@
|
||||
/*
|
||||
* 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/DeleteProductTagsResult.h>
|
||||
#include <json/json.h>
|
||||
|
||||
using namespace AlibabaCloud::Iot;
|
||||
using namespace AlibabaCloud::Iot::Model;
|
||||
|
||||
DeleteProductTagsResult::DeleteProductTagsResult() :
|
||||
ServiceResult()
|
||||
{}
|
||||
|
||||
DeleteProductTagsResult::DeleteProductTagsResult(const std::string &payload) :
|
||||
ServiceResult()
|
||||
{
|
||||
parse(payload);
|
||||
}
|
||||
|
||||
DeleteProductTagsResult::~DeleteProductTagsResult()
|
||||
{}
|
||||
|
||||
void DeleteProductTagsResult::parse(const std::string &payload)
|
||||
{
|
||||
Json::CharReaderBuilder builder;
|
||||
Json::CharReader *reader = builder.newCharReader();
|
||||
Json::Value *val;
|
||||
Json::Value value;
|
||||
JSONCPP_STRING *errs;
|
||||
reader->parse(payload.data(), payload.data() + payload.size(), val, errs);
|
||||
value = *val;
|
||||
setRequestId(value["RequestId"].asString());
|
||||
if(!value["Success"].isNull())
|
||||
success_ = value["Success"].asString() == "true";
|
||||
if(!value["ErrorMessage"].isNull())
|
||||
errorMessage_ = value["ErrorMessage"].asString();
|
||||
if(!value["Code"].isNull())
|
||||
code_ = value["Code"].asString();
|
||||
|
||||
}
|
||||
|
||||
std::string DeleteProductTagsResult::getErrorMessage()const
|
||||
{
|
||||
return errorMessage_;
|
||||
}
|
||||
|
||||
std::string DeleteProductTagsResult::getCode()const
|
||||
{
|
||||
return code_;
|
||||
}
|
||||
|
||||
bool DeleteProductTagsResult::getSuccess()const
|
||||
{
|
||||
return success_;
|
||||
}
|
||||
|
||||
@@ -33,7 +33,18 @@ std::string DeleteProductTopicRequest::getTopicId()const
|
||||
void DeleteProductTopicRequest::setTopicId(const std::string& topicId)
|
||||
{
|
||||
topicId_ = topicId;
|
||||
setParameter("TopicId", topicId);
|
||||
setCoreParameter("TopicId", topicId);
|
||||
}
|
||||
|
||||
std::string DeleteProductTopicRequest::getIotInstanceId()const
|
||||
{
|
||||
return iotInstanceId_;
|
||||
}
|
||||
|
||||
void DeleteProductTopicRequest::setIotInstanceId(const std::string& iotInstanceId)
|
||||
{
|
||||
iotInstanceId_ = iotInstanceId;
|
||||
setCoreParameter("IotInstanceId", iotInstanceId);
|
||||
}
|
||||
|
||||
std::string DeleteProductTopicRequest::getAccessKeyId()const
|
||||
@@ -44,6 +55,6 @@ std::string DeleteProductTopicRequest::getAccessKeyId()const
|
||||
void DeleteProductTopicRequest::setAccessKeyId(const std::string& accessKeyId)
|
||||
{
|
||||
accessKeyId_ = accessKeyId;
|
||||
setParameter("AccessKeyId", accessKeyId);
|
||||
setCoreParameter("AccessKeyId", accessKeyId);
|
||||
}
|
||||
|
||||
|
||||
@@ -35,10 +35,13 @@ DeleteProductTopicResult::~DeleteProductTopicResult()
|
||||
|
||||
void DeleteProductTopicResult::parse(const std::string &payload)
|
||||
{
|
||||
Json::Reader reader;
|
||||
Json::CharReaderBuilder builder;
|
||||
Json::CharReader *reader = builder.newCharReader();
|
||||
Json::Value *val;
|
||||
Json::Value value;
|
||||
reader.parse(payload, value);
|
||||
|
||||
JSONCPP_STRING *errs;
|
||||
reader->parse(payload.data(), payload.data() + payload.size(), val, errs);
|
||||
value = *val;
|
||||
setRequestId(value["RequestId"].asString());
|
||||
if(!value["Success"].isNull())
|
||||
success_ = value["Success"].asString() == "true";
|
||||
|
||||
@@ -25,6 +25,17 @@ DeleteRuleActionRequest::DeleteRuleActionRequest() :
|
||||
DeleteRuleActionRequest::~DeleteRuleActionRequest()
|
||||
{}
|
||||
|
||||
std::string DeleteRuleActionRequest::getIotInstanceId()const
|
||||
{
|
||||
return iotInstanceId_;
|
||||
}
|
||||
|
||||
void DeleteRuleActionRequest::setIotInstanceId(const std::string& iotInstanceId)
|
||||
{
|
||||
iotInstanceId_ = iotInstanceId;
|
||||
setCoreParameter("IotInstanceId", iotInstanceId);
|
||||
}
|
||||
|
||||
long DeleteRuleActionRequest::getActionId()const
|
||||
{
|
||||
return actionId_;
|
||||
@@ -33,7 +44,7 @@ long DeleteRuleActionRequest::getActionId()const
|
||||
void DeleteRuleActionRequest::setActionId(long actionId)
|
||||
{
|
||||
actionId_ = actionId;
|
||||
setParameter("ActionId", std::to_string(actionId));
|
||||
setCoreParameter("ActionId", std::to_string(actionId));
|
||||
}
|
||||
|
||||
std::string DeleteRuleActionRequest::getAccessKeyId()const
|
||||
@@ -44,6 +55,6 @@ std::string DeleteRuleActionRequest::getAccessKeyId()const
|
||||
void DeleteRuleActionRequest::setAccessKeyId(const std::string& accessKeyId)
|
||||
{
|
||||
accessKeyId_ = accessKeyId;
|
||||
setParameter("AccessKeyId", accessKeyId);
|
||||
setCoreParameter("AccessKeyId", accessKeyId);
|
||||
}
|
||||
|
||||
|
||||
@@ -35,10 +35,13 @@ DeleteRuleActionResult::~DeleteRuleActionResult()
|
||||
|
||||
void DeleteRuleActionResult::parse(const std::string &payload)
|
||||
{
|
||||
Json::Reader reader;
|
||||
Json::CharReaderBuilder builder;
|
||||
Json::CharReader *reader = builder.newCharReader();
|
||||
Json::Value *val;
|
||||
Json::Value value;
|
||||
reader.parse(payload, value);
|
||||
|
||||
JSONCPP_STRING *errs;
|
||||
reader->parse(payload.data(), payload.data() + payload.size(), val, errs);
|
||||
value = *val;
|
||||
setRequestId(value["RequestId"].asString());
|
||||
if(!value["Success"].isNull())
|
||||
success_ = value["Success"].asString() == "true";
|
||||
|
||||
@@ -25,6 +25,17 @@ DeleteRuleRequest::DeleteRuleRequest() :
|
||||
DeleteRuleRequest::~DeleteRuleRequest()
|
||||
{}
|
||||
|
||||
std::string DeleteRuleRequest::getIotInstanceId()const
|
||||
{
|
||||
return iotInstanceId_;
|
||||
}
|
||||
|
||||
void DeleteRuleRequest::setIotInstanceId(const std::string& iotInstanceId)
|
||||
{
|
||||
iotInstanceId_ = iotInstanceId;
|
||||
setCoreParameter("IotInstanceId", iotInstanceId);
|
||||
}
|
||||
|
||||
long DeleteRuleRequest::getRuleId()const
|
||||
{
|
||||
return ruleId_;
|
||||
@@ -33,7 +44,7 @@ long DeleteRuleRequest::getRuleId()const
|
||||
void DeleteRuleRequest::setRuleId(long ruleId)
|
||||
{
|
||||
ruleId_ = ruleId;
|
||||
setParameter("RuleId", std::to_string(ruleId));
|
||||
setCoreParameter("RuleId", std::to_string(ruleId));
|
||||
}
|
||||
|
||||
std::string DeleteRuleRequest::getAccessKeyId()const
|
||||
@@ -44,6 +55,6 @@ std::string DeleteRuleRequest::getAccessKeyId()const
|
||||
void DeleteRuleRequest::setAccessKeyId(const std::string& accessKeyId)
|
||||
{
|
||||
accessKeyId_ = accessKeyId;
|
||||
setParameter("AccessKeyId", accessKeyId);
|
||||
setCoreParameter("AccessKeyId", accessKeyId);
|
||||
}
|
||||
|
||||
|
||||
@@ -35,10 +35,13 @@ DeleteRuleResult::~DeleteRuleResult()
|
||||
|
||||
void DeleteRuleResult::parse(const std::string &payload)
|
||||
{
|
||||
Json::Reader reader;
|
||||
Json::CharReaderBuilder builder;
|
||||
Json::CharReader *reader = builder.newCharReader();
|
||||
Json::Value *val;
|
||||
Json::Value value;
|
||||
reader.parse(payload, value);
|
||||
|
||||
JSONCPP_STRING *errs;
|
||||
reader->parse(payload.data(), payload.data() + payload.size(), val, errs);
|
||||
value = *val;
|
||||
setRequestId(value["RequestId"].asString());
|
||||
if(!value["Success"].isNull())
|
||||
success_ = value["Success"].asString() == "true";
|
||||
|
||||
@@ -34,7 +34,7 @@ void DeleteTopicRouteTableRequest::setDstTopic(const std::vector<std::string>& d
|
||||
{
|
||||
dstTopic_ = dstTopic;
|
||||
for(int i = 0; i!= dstTopic.size(); i++)
|
||||
setParameter("DstTopic."+ std::to_string(i), dstTopic.at(i));
|
||||
setCoreParameter("DstTopic."+ std::to_string(i), dstTopic.at(i));
|
||||
}
|
||||
|
||||
std::string DeleteTopicRouteTableRequest::getRegionId()const
|
||||
@@ -45,7 +45,18 @@ std::string DeleteTopicRouteTableRequest::getRegionId()const
|
||||
void DeleteTopicRouteTableRequest::setRegionId(const std::string& regionId)
|
||||
{
|
||||
regionId_ = regionId;
|
||||
setParameter("RegionId", regionId);
|
||||
setCoreParameter("RegionId", regionId);
|
||||
}
|
||||
|
||||
std::string DeleteTopicRouteTableRequest::getIotInstanceId()const
|
||||
{
|
||||
return iotInstanceId_;
|
||||
}
|
||||
|
||||
void DeleteTopicRouteTableRequest::setIotInstanceId(const std::string& iotInstanceId)
|
||||
{
|
||||
iotInstanceId_ = iotInstanceId;
|
||||
setCoreParameter("IotInstanceId", iotInstanceId);
|
||||
}
|
||||
|
||||
std::string DeleteTopicRouteTableRequest::getAccessKeyId()const
|
||||
@@ -56,7 +67,7 @@ std::string DeleteTopicRouteTableRequest::getAccessKeyId()const
|
||||
void DeleteTopicRouteTableRequest::setAccessKeyId(const std::string& accessKeyId)
|
||||
{
|
||||
accessKeyId_ = accessKeyId;
|
||||
setParameter("AccessKeyId", accessKeyId);
|
||||
setCoreParameter("AccessKeyId", accessKeyId);
|
||||
}
|
||||
|
||||
std::string DeleteTopicRouteTableRequest::getSrcTopic()const
|
||||
@@ -67,6 +78,6 @@ std::string DeleteTopicRouteTableRequest::getSrcTopic()const
|
||||
void DeleteTopicRouteTableRequest::setSrcTopic(const std::string& srcTopic)
|
||||
{
|
||||
srcTopic_ = srcTopic;
|
||||
setParameter("SrcTopic", srcTopic);
|
||||
setCoreParameter("SrcTopic", srcTopic);
|
||||
}
|
||||
|
||||
|
||||
@@ -35,10 +35,13 @@ DeleteTopicRouteTableResult::~DeleteTopicRouteTableResult()
|
||||
|
||||
void DeleteTopicRouteTableResult::parse(const std::string &payload)
|
||||
{
|
||||
Json::Reader reader;
|
||||
Json::CharReaderBuilder builder;
|
||||
Json::CharReader *reader = builder.newCharReader();
|
||||
Json::Value *val;
|
||||
Json::Value value;
|
||||
reader.parse(payload, value);
|
||||
|
||||
JSONCPP_STRING *errs;
|
||||
reader->parse(payload.data(), payload.data() + payload.size(), val, errs);
|
||||
value = *val;
|
||||
setRequestId(value["RequestId"].asString());
|
||||
auto allFailureTopics = value["FailureTopics"]["Topic"];
|
||||
for (const auto &item : allFailureTopics)
|
||||
|
||||
@@ -33,7 +33,18 @@ std::string DisableThingRequest::getIotId()const
|
||||
void DisableThingRequest::setIotId(const std::string& iotId)
|
||||
{
|
||||
iotId_ = iotId;
|
||||
setParameter("IotId", iotId);
|
||||
setCoreParameter("IotId", iotId);
|
||||
}
|
||||
|
||||
std::string DisableThingRequest::getIotInstanceId()const
|
||||
{
|
||||
return iotInstanceId_;
|
||||
}
|
||||
|
||||
void DisableThingRequest::setIotInstanceId(const std::string& iotInstanceId)
|
||||
{
|
||||
iotInstanceId_ = iotInstanceId;
|
||||
setCoreParameter("IotInstanceId", iotInstanceId);
|
||||
}
|
||||
|
||||
std::string DisableThingRequest::getDeviceName()const
|
||||
@@ -44,7 +55,7 @@ std::string DisableThingRequest::getDeviceName()const
|
||||
void DisableThingRequest::setDeviceName(const std::string& deviceName)
|
||||
{
|
||||
deviceName_ = deviceName;
|
||||
setParameter("DeviceName", deviceName);
|
||||
setCoreParameter("DeviceName", deviceName);
|
||||
}
|
||||
|
||||
std::string DisableThingRequest::getProductKey()const
|
||||
@@ -55,7 +66,7 @@ std::string DisableThingRequest::getProductKey()const
|
||||
void DisableThingRequest::setProductKey(const std::string& productKey)
|
||||
{
|
||||
productKey_ = productKey;
|
||||
setParameter("ProductKey", productKey);
|
||||
setCoreParameter("ProductKey", productKey);
|
||||
}
|
||||
|
||||
std::string DisableThingRequest::getAccessKeyId()const
|
||||
@@ -66,6 +77,6 @@ std::string DisableThingRequest::getAccessKeyId()const
|
||||
void DisableThingRequest::setAccessKeyId(const std::string& accessKeyId)
|
||||
{
|
||||
accessKeyId_ = accessKeyId;
|
||||
setParameter("AccessKeyId", accessKeyId);
|
||||
setCoreParameter("AccessKeyId", accessKeyId);
|
||||
}
|
||||
|
||||
|
||||
@@ -35,10 +35,13 @@ DisableThingResult::~DisableThingResult()
|
||||
|
||||
void DisableThingResult::parse(const std::string &payload)
|
||||
{
|
||||
Json::Reader reader;
|
||||
Json::CharReaderBuilder builder;
|
||||
Json::CharReader *reader = builder.newCharReader();
|
||||
Json::Value *val;
|
||||
Json::Value value;
|
||||
reader.parse(payload, value);
|
||||
|
||||
JSONCPP_STRING *errs;
|
||||
reader->parse(payload.data(), payload.data() + payload.size(), val, errs);
|
||||
value = *val;
|
||||
setRequestId(value["RequestId"].asString());
|
||||
if(!value["Success"].isNull())
|
||||
success_ = value["Success"].asString() == "true";
|
||||
|
||||
@@ -33,7 +33,18 @@ std::string EnableThingRequest::getIotId()const
|
||||
void EnableThingRequest::setIotId(const std::string& iotId)
|
||||
{
|
||||
iotId_ = iotId;
|
||||
setParameter("IotId", iotId);
|
||||
setCoreParameter("IotId", iotId);
|
||||
}
|
||||
|
||||
std::string EnableThingRequest::getIotInstanceId()const
|
||||
{
|
||||
return iotInstanceId_;
|
||||
}
|
||||
|
||||
void EnableThingRequest::setIotInstanceId(const std::string& iotInstanceId)
|
||||
{
|
||||
iotInstanceId_ = iotInstanceId;
|
||||
setCoreParameter("IotInstanceId", iotInstanceId);
|
||||
}
|
||||
|
||||
std::string EnableThingRequest::getDeviceName()const
|
||||
@@ -44,7 +55,7 @@ std::string EnableThingRequest::getDeviceName()const
|
||||
void EnableThingRequest::setDeviceName(const std::string& deviceName)
|
||||
{
|
||||
deviceName_ = deviceName;
|
||||
setParameter("DeviceName", deviceName);
|
||||
setCoreParameter("DeviceName", deviceName);
|
||||
}
|
||||
|
||||
std::string EnableThingRequest::getProductKey()const
|
||||
@@ -55,7 +66,7 @@ std::string EnableThingRequest::getProductKey()const
|
||||
void EnableThingRequest::setProductKey(const std::string& productKey)
|
||||
{
|
||||
productKey_ = productKey;
|
||||
setParameter("ProductKey", productKey);
|
||||
setCoreParameter("ProductKey", productKey);
|
||||
}
|
||||
|
||||
std::string EnableThingRequest::getAccessKeyId()const
|
||||
@@ -66,6 +77,6 @@ std::string EnableThingRequest::getAccessKeyId()const
|
||||
void EnableThingRequest::setAccessKeyId(const std::string& accessKeyId)
|
||||
{
|
||||
accessKeyId_ = accessKeyId;
|
||||
setParameter("AccessKeyId", accessKeyId);
|
||||
setCoreParameter("AccessKeyId", accessKeyId);
|
||||
}
|
||||
|
||||
|
||||
@@ -35,10 +35,13 @@ EnableThingResult::~EnableThingResult()
|
||||
|
||||
void EnableThingResult::parse(const std::string &payload)
|
||||
{
|
||||
Json::Reader reader;
|
||||
Json::CharReaderBuilder builder;
|
||||
Json::CharReader *reader = builder.newCharReader();
|
||||
Json::Value *val;
|
||||
Json::Value value;
|
||||
reader.parse(payload, value);
|
||||
|
||||
JSONCPP_STRING *errs;
|
||||
reader->parse(payload.data(), payload.data() + payload.size(), val, errs);
|
||||
value = *val;
|
||||
setRequestId(value["RequestId"].asString());
|
||||
if(!value["Success"].isNull())
|
||||
success_ = value["Success"].asString() == "true";
|
||||
|
||||
49
iot/src/model/GetDataAPIServiceDetailRequest.cc
Normal file
49
iot/src/model/GetDataAPIServiceDetailRequest.cc
Normal 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/GetDataAPIServiceDetailRequest.h>
|
||||
|
||||
using AlibabaCloud::Iot::Model::GetDataAPIServiceDetailRequest;
|
||||
|
||||
GetDataAPIServiceDetailRequest::GetDataAPIServiceDetailRequest() :
|
||||
RpcServiceRequest("iot", "2018-01-20", "GetDataAPIServiceDetail")
|
||||
{}
|
||||
|
||||
GetDataAPIServiceDetailRequest::~GetDataAPIServiceDetailRequest()
|
||||
{}
|
||||
|
||||
std::string GetDataAPIServiceDetailRequest::getApiSrn()const
|
||||
{
|
||||
return apiSrn_;
|
||||
}
|
||||
|
||||
void GetDataAPIServiceDetailRequest::setApiSrn(const std::string& apiSrn)
|
||||
{
|
||||
apiSrn_ = apiSrn;
|
||||
setCoreParameter("ApiSrn", apiSrn);
|
||||
}
|
||||
|
||||
std::string GetDataAPIServiceDetailRequest::getAccessKeyId()const
|
||||
{
|
||||
return accessKeyId_;
|
||||
}
|
||||
|
||||
void GetDataAPIServiceDetailRequest::setAccessKeyId(const std::string& accessKeyId)
|
||||
{
|
||||
accessKeyId_ = accessKeyId;
|
||||
setCoreParameter("AccessKeyId", accessKeyId);
|
||||
}
|
||||
|
||||
132
iot/src/model/GetDataAPIServiceDetailResult.cc
Normal file
132
iot/src/model/GetDataAPIServiceDetailResult.cc
Normal file
@@ -0,0 +1,132 @@
|
||||
/*
|
||||
* 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/GetDataAPIServiceDetailResult.h>
|
||||
#include <json/json.h>
|
||||
|
||||
using namespace AlibabaCloud::Iot;
|
||||
using namespace AlibabaCloud::Iot::Model;
|
||||
|
||||
GetDataAPIServiceDetailResult::GetDataAPIServiceDetailResult() :
|
||||
ServiceResult()
|
||||
{}
|
||||
|
||||
GetDataAPIServiceDetailResult::GetDataAPIServiceDetailResult(const std::string &payload) :
|
||||
ServiceResult()
|
||||
{
|
||||
parse(payload);
|
||||
}
|
||||
|
||||
GetDataAPIServiceDetailResult::~GetDataAPIServiceDetailResult()
|
||||
{}
|
||||
|
||||
void GetDataAPIServiceDetailResult::parse(const std::string &payload)
|
||||
{
|
||||
Json::CharReaderBuilder builder;
|
||||
Json::CharReader *reader = builder.newCharReader();
|
||||
Json::Value *val;
|
||||
Json::Value value;
|
||||
JSONCPP_STRING *errs;
|
||||
reader->parse(payload.data(), payload.data() + payload.size(), val, errs);
|
||||
value = *val;
|
||||
setRequestId(value["RequestId"].asString());
|
||||
auto dataNode = value["Data"];
|
||||
if(!dataNode["ApiSrn"].isNull())
|
||||
data_.apiSrn = dataNode["ApiSrn"].asString();
|
||||
if(!dataNode["Status"].isNull())
|
||||
data_.status = std::stoi(dataNode["Status"].asString());
|
||||
if(!dataNode["DisplayName"].isNull())
|
||||
data_.displayName = dataNode["DisplayName"].asString();
|
||||
if(!dataNode["ApiPath"].isNull())
|
||||
data_.apiPath = dataNode["ApiPath"].asString();
|
||||
if(!dataNode["CreateTime"].isNull())
|
||||
data_.createTime = std::stol(dataNode["CreateTime"].asString());
|
||||
if(!dataNode["LastUpdateTime"].isNull())
|
||||
data_.lastUpdateTime = std::stol(dataNode["LastUpdateTime"].asString());
|
||||
if(!dataNode["DateFormat"].isNull())
|
||||
data_.dateFormat = dataNode["DateFormat"].asString();
|
||||
if(!dataNode["RequestMethod"].isNull())
|
||||
data_.requestMethod = dataNode["RequestMethod"].asString();
|
||||
if(!dataNode["RequestProtocol"].isNull())
|
||||
data_.requestProtocol = dataNode["RequestProtocol"].asString();
|
||||
if(!dataNode["Description"].isNull())
|
||||
data_.description = dataNode["Description"].asString();
|
||||
auto sqlTemplateDTONode = dataNode["SqlTemplateDTO"];
|
||||
if(!sqlTemplateDTONode["OriginSql"].isNull())
|
||||
data_.sqlTemplateDTO.originSql = sqlTemplateDTONode["OriginSql"].asString();
|
||||
if(!sqlTemplateDTONode["TemplateSql"].isNull())
|
||||
data_.sqlTemplateDTO.templateSql = sqlTemplateDTONode["TemplateSql"].asString();
|
||||
auto allRequestParams = value["RequestParams"]["RequestParamsItem"];
|
||||
for (auto value : allRequestParams)
|
||||
{
|
||||
Data::SqlTemplateDTO::RequestParamsItem requestParamsItemObject;
|
||||
if(!value["Name"].isNull())
|
||||
requestParamsItemObject.name = value["Name"].asString();
|
||||
if(!value["Type"].isNull())
|
||||
requestParamsItemObject.type = value["Type"].asString();
|
||||
if(!value["Desc"].isNull())
|
||||
requestParamsItemObject.desc = value["Desc"].asString();
|
||||
if(!value["Example"].isNull())
|
||||
requestParamsItemObject.example = value["Example"].asString();
|
||||
if(!value["Required"].isNull())
|
||||
requestParamsItemObject.required = value["Required"].asString() == "true";
|
||||
data_.sqlTemplateDTO.requestParams.push_back(requestParamsItemObject);
|
||||
}
|
||||
auto allResponseParams = value["ResponseParams"]["ResponseParamsItem"];
|
||||
for (auto value : allResponseParams)
|
||||
{
|
||||
Data::SqlTemplateDTO::ResponseParamsItem responseParamsItemObject;
|
||||
if(!value["Name"].isNull())
|
||||
responseParamsItemObject.name = value["Name"].asString();
|
||||
if(!value["Type"].isNull())
|
||||
responseParamsItemObject.type = value["Type"].asString();
|
||||
if(!value["Desc"].isNull())
|
||||
responseParamsItemObject.desc = value["Desc"].asString();
|
||||
if(!value["Example"].isNull())
|
||||
responseParamsItemObject.example = value["Example"].asString();
|
||||
if(!value["Required"].isNull())
|
||||
responseParamsItemObject.required = value["Required"].asString() == "true";
|
||||
data_.sqlTemplateDTO.responseParams.push_back(responseParamsItemObject);
|
||||
}
|
||||
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();
|
||||
|
||||
}
|
||||
|
||||
GetDataAPIServiceDetailResult::Data GetDataAPIServiceDetailResult::getData()const
|
||||
{
|
||||
return data_;
|
||||
}
|
||||
|
||||
std::string GetDataAPIServiceDetailResult::getErrorMessage()const
|
||||
{
|
||||
return errorMessage_;
|
||||
}
|
||||
|
||||
std::string GetDataAPIServiceDetailResult::getCode()const
|
||||
{
|
||||
return code_;
|
||||
}
|
||||
|
||||
bool GetDataAPIServiceDetailResult::getSuccess()const
|
||||
{
|
||||
return success_;
|
||||
}
|
||||
|
||||
@@ -33,7 +33,18 @@ std::string GetDeviceShadowRequest::getShadowMessage()const
|
||||
void GetDeviceShadowRequest::setShadowMessage(const std::string& shadowMessage)
|
||||
{
|
||||
shadowMessage_ = shadowMessage;
|
||||
setParameter("ShadowMessage", shadowMessage);
|
||||
setCoreParameter("ShadowMessage", shadowMessage);
|
||||
}
|
||||
|
||||
std::string GetDeviceShadowRequest::getIotInstanceId()const
|
||||
{
|
||||
return iotInstanceId_;
|
||||
}
|
||||
|
||||
void GetDeviceShadowRequest::setIotInstanceId(const std::string& iotInstanceId)
|
||||
{
|
||||
iotInstanceId_ = iotInstanceId;
|
||||
setCoreParameter("IotInstanceId", iotInstanceId);
|
||||
}
|
||||
|
||||
std::string GetDeviceShadowRequest::getDeviceName()const
|
||||
@@ -44,7 +55,7 @@ std::string GetDeviceShadowRequest::getDeviceName()const
|
||||
void GetDeviceShadowRequest::setDeviceName(const std::string& deviceName)
|
||||
{
|
||||
deviceName_ = deviceName;
|
||||
setParameter("DeviceName", deviceName);
|
||||
setCoreParameter("DeviceName", deviceName);
|
||||
}
|
||||
|
||||
std::string GetDeviceShadowRequest::getProductKey()const
|
||||
@@ -55,7 +66,7 @@ std::string GetDeviceShadowRequest::getProductKey()const
|
||||
void GetDeviceShadowRequest::setProductKey(const std::string& productKey)
|
||||
{
|
||||
productKey_ = productKey;
|
||||
setParameter("ProductKey", productKey);
|
||||
setCoreParameter("ProductKey", productKey);
|
||||
}
|
||||
|
||||
std::string GetDeviceShadowRequest::getAccessKeyId()const
|
||||
@@ -66,6 +77,6 @@ std::string GetDeviceShadowRequest::getAccessKeyId()const
|
||||
void GetDeviceShadowRequest::setAccessKeyId(const std::string& accessKeyId)
|
||||
{
|
||||
accessKeyId_ = accessKeyId;
|
||||
setParameter("AccessKeyId", accessKeyId);
|
||||
setCoreParameter("AccessKeyId", accessKeyId);
|
||||
}
|
||||
|
||||
|
||||
@@ -35,10 +35,13 @@ GetDeviceShadowResult::~GetDeviceShadowResult()
|
||||
|
||||
void GetDeviceShadowResult::parse(const std::string &payload)
|
||||
{
|
||||
Json::Reader reader;
|
||||
Json::CharReaderBuilder builder;
|
||||
Json::CharReader *reader = builder.newCharReader();
|
||||
Json::Value *val;
|
||||
Json::Value value;
|
||||
reader.parse(payload, value);
|
||||
|
||||
JSONCPP_STRING *errs;
|
||||
reader->parse(payload.data(), payload.data() + payload.size(), val, errs);
|
||||
value = *val;
|
||||
setRequestId(value["RequestId"].asString());
|
||||
if(!value["Success"].isNull())
|
||||
success_ = value["Success"].asString() == "true";
|
||||
|
||||
@@ -33,7 +33,18 @@ std::string GetDeviceStatusRequest::getIotId()const
|
||||
void GetDeviceStatusRequest::setIotId(const std::string& iotId)
|
||||
{
|
||||
iotId_ = iotId;
|
||||
setParameter("IotId", iotId);
|
||||
setCoreParameter("IotId", iotId);
|
||||
}
|
||||
|
||||
std::string GetDeviceStatusRequest::getIotInstanceId()const
|
||||
{
|
||||
return iotInstanceId_;
|
||||
}
|
||||
|
||||
void GetDeviceStatusRequest::setIotInstanceId(const std::string& iotInstanceId)
|
||||
{
|
||||
iotInstanceId_ = iotInstanceId;
|
||||
setCoreParameter("IotInstanceId", iotInstanceId);
|
||||
}
|
||||
|
||||
std::string GetDeviceStatusRequest::getDeviceName()const
|
||||
@@ -44,7 +55,7 @@ std::string GetDeviceStatusRequest::getDeviceName()const
|
||||
void GetDeviceStatusRequest::setDeviceName(const std::string& deviceName)
|
||||
{
|
||||
deviceName_ = deviceName;
|
||||
setParameter("DeviceName", deviceName);
|
||||
setCoreParameter("DeviceName", deviceName);
|
||||
}
|
||||
|
||||
std::string GetDeviceStatusRequest::getProductKey()const
|
||||
@@ -55,7 +66,7 @@ std::string GetDeviceStatusRequest::getProductKey()const
|
||||
void GetDeviceStatusRequest::setProductKey(const std::string& productKey)
|
||||
{
|
||||
productKey_ = productKey;
|
||||
setParameter("ProductKey", productKey);
|
||||
setCoreParameter("ProductKey", productKey);
|
||||
}
|
||||
|
||||
std::string GetDeviceStatusRequest::getAccessKeyId()const
|
||||
@@ -66,6 +77,6 @@ std::string GetDeviceStatusRequest::getAccessKeyId()const
|
||||
void GetDeviceStatusRequest::setAccessKeyId(const std::string& accessKeyId)
|
||||
{
|
||||
accessKeyId_ = accessKeyId;
|
||||
setParameter("AccessKeyId", accessKeyId);
|
||||
setCoreParameter("AccessKeyId", accessKeyId);
|
||||
}
|
||||
|
||||
|
||||
@@ -35,10 +35,13 @@ GetDeviceStatusResult::~GetDeviceStatusResult()
|
||||
|
||||
void GetDeviceStatusResult::parse(const std::string &payload)
|
||||
{
|
||||
Json::Reader reader;
|
||||
Json::CharReaderBuilder builder;
|
||||
Json::CharReader *reader = builder.newCharReader();
|
||||
Json::Value *val;
|
||||
Json::Value value;
|
||||
reader.parse(payload, value);
|
||||
|
||||
JSONCPP_STRING *errs;
|
||||
reader->parse(payload.data(), payload.data() + payload.size(), val, errs);
|
||||
value = *val;
|
||||
setRequestId(value["RequestId"].asString());
|
||||
auto dataNode = value["Data"];
|
||||
if(!dataNode["Status"].isNull())
|
||||
|
||||
@@ -33,7 +33,18 @@ std::string GetGatewayBySubDeviceRequest::getIotId()const
|
||||
void GetGatewayBySubDeviceRequest::setIotId(const std::string& iotId)
|
||||
{
|
||||
iotId_ = iotId;
|
||||
setParameter("IotId", iotId);
|
||||
setCoreParameter("IotId", iotId);
|
||||
}
|
||||
|
||||
std::string GetGatewayBySubDeviceRequest::getIotInstanceId()const
|
||||
{
|
||||
return iotInstanceId_;
|
||||
}
|
||||
|
||||
void GetGatewayBySubDeviceRequest::setIotInstanceId(const std::string& iotInstanceId)
|
||||
{
|
||||
iotInstanceId_ = iotInstanceId;
|
||||
setCoreParameter("IotInstanceId", iotInstanceId);
|
||||
}
|
||||
|
||||
std::string GetGatewayBySubDeviceRequest::getDeviceName()const
|
||||
@@ -44,7 +55,7 @@ std::string GetGatewayBySubDeviceRequest::getDeviceName()const
|
||||
void GetGatewayBySubDeviceRequest::setDeviceName(const std::string& deviceName)
|
||||
{
|
||||
deviceName_ = deviceName;
|
||||
setParameter("DeviceName", deviceName);
|
||||
setCoreParameter("DeviceName", deviceName);
|
||||
}
|
||||
|
||||
std::string GetGatewayBySubDeviceRequest::getProductKey()const
|
||||
@@ -55,7 +66,7 @@ std::string GetGatewayBySubDeviceRequest::getProductKey()const
|
||||
void GetGatewayBySubDeviceRequest::setProductKey(const std::string& productKey)
|
||||
{
|
||||
productKey_ = productKey;
|
||||
setParameter("ProductKey", productKey);
|
||||
setCoreParameter("ProductKey", productKey);
|
||||
}
|
||||
|
||||
std::string GetGatewayBySubDeviceRequest::getAccessKeyId()const
|
||||
@@ -66,6 +77,6 @@ std::string GetGatewayBySubDeviceRequest::getAccessKeyId()const
|
||||
void GetGatewayBySubDeviceRequest::setAccessKeyId(const std::string& accessKeyId)
|
||||
{
|
||||
accessKeyId_ = accessKeyId;
|
||||
setParameter("AccessKeyId", accessKeyId);
|
||||
setCoreParameter("AccessKeyId", accessKeyId);
|
||||
}
|
||||
|
||||
|
||||
@@ -35,10 +35,13 @@ GetGatewayBySubDeviceResult::~GetGatewayBySubDeviceResult()
|
||||
|
||||
void GetGatewayBySubDeviceResult::parse(const std::string &payload)
|
||||
{
|
||||
Json::Reader reader;
|
||||
Json::CharReaderBuilder builder;
|
||||
Json::CharReader *reader = builder.newCharReader();
|
||||
Json::Value *val;
|
||||
Json::Value value;
|
||||
reader.parse(payload, value);
|
||||
|
||||
JSONCPP_STRING *errs;
|
||||
reader->parse(payload.data(), payload.data() + payload.size(), val, errs);
|
||||
value = *val;
|
||||
setRequestId(value["RequestId"].asString());
|
||||
auto dataNode = value["Data"];
|
||||
if(!dataNode["ProductKey"].isNull())
|
||||
|
||||
60
iot/src/model/GetLoraNodesTaskRequest.cc
Normal file
60
iot/src/model/GetLoraNodesTaskRequest.cc
Normal 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/GetLoraNodesTaskRequest.h>
|
||||
|
||||
using AlibabaCloud::Iot::Model::GetLoraNodesTaskRequest;
|
||||
|
||||
GetLoraNodesTaskRequest::GetLoraNodesTaskRequest() :
|
||||
RpcServiceRequest("iot", "2018-01-20", "GetLoraNodesTask")
|
||||
{}
|
||||
|
||||
GetLoraNodesTaskRequest::~GetLoraNodesTaskRequest()
|
||||
{}
|
||||
|
||||
std::string GetLoraNodesTaskRequest::getIotInstanceId()const
|
||||
{
|
||||
return iotInstanceId_;
|
||||
}
|
||||
|
||||
void GetLoraNodesTaskRequest::setIotInstanceId(const std::string& iotInstanceId)
|
||||
{
|
||||
iotInstanceId_ = iotInstanceId;
|
||||
setCoreParameter("IotInstanceId", iotInstanceId);
|
||||
}
|
||||
|
||||
std::string GetLoraNodesTaskRequest::getTaskId()const
|
||||
{
|
||||
return taskId_;
|
||||
}
|
||||
|
||||
void GetLoraNodesTaskRequest::setTaskId(const std::string& taskId)
|
||||
{
|
||||
taskId_ = taskId;
|
||||
setCoreParameter("TaskId", taskId);
|
||||
}
|
||||
|
||||
std::string GetLoraNodesTaskRequest::getAccessKeyId()const
|
||||
{
|
||||
return accessKeyId_;
|
||||
}
|
||||
|
||||
void GetLoraNodesTaskRequest::setAccessKeyId(const std::string& accessKeyId)
|
||||
{
|
||||
accessKeyId_ = accessKeyId;
|
||||
setCoreParameter("AccessKeyId", accessKeyId);
|
||||
}
|
||||
|
||||
105
iot/src/model/GetLoraNodesTaskResult.cc
Normal file
105
iot/src/model/GetLoraNodesTaskResult.cc
Normal file
@@ -0,0 +1,105 @@
|
||||
/*
|
||||
* 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/GetLoraNodesTaskResult.h>
|
||||
#include <json/json.h>
|
||||
|
||||
using namespace AlibabaCloud::Iot;
|
||||
using namespace AlibabaCloud::Iot::Model;
|
||||
|
||||
GetLoraNodesTaskResult::GetLoraNodesTaskResult() :
|
||||
ServiceResult()
|
||||
{}
|
||||
|
||||
GetLoraNodesTaskResult::GetLoraNodesTaskResult(const std::string &payload) :
|
||||
ServiceResult()
|
||||
{
|
||||
parse(payload);
|
||||
}
|
||||
|
||||
GetLoraNodesTaskResult::~GetLoraNodesTaskResult()
|
||||
{}
|
||||
|
||||
void GetLoraNodesTaskResult::parse(const std::string &payload)
|
||||
{
|
||||
Json::CharReaderBuilder builder;
|
||||
Json::CharReader *reader = builder.newCharReader();
|
||||
Json::Value *val;
|
||||
Json::Value value;
|
||||
JSONCPP_STRING *errs;
|
||||
reader->parse(payload.data(), payload.data() + payload.size(), val, errs);
|
||||
value = *val;
|
||||
setRequestId(value["RequestId"].asString());
|
||||
auto allSuccessDevEuis = value["SuccessDevEuis"]["SuccessDevEui"];
|
||||
for (const auto &item : allSuccessDevEuis)
|
||||
successDevEuis_.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();
|
||||
if(!value["TaskId"].isNull())
|
||||
taskId_ = value["TaskId"].asString();
|
||||
if(!value["TaskState"].isNull())
|
||||
taskState_ = value["TaskState"].asString();
|
||||
if(!value["TotalCount"].isNull())
|
||||
totalCount_ = std::stol(value["TotalCount"].asString());
|
||||
if(!value["SuccessCount"].isNull())
|
||||
successCount_ = std::stol(value["SuccessCount"].asString());
|
||||
|
||||
}
|
||||
|
||||
std::vector<std::string> GetLoraNodesTaskResult::getSuccessDevEuis()const
|
||||
{
|
||||
return successDevEuis_;
|
||||
}
|
||||
|
||||
long GetLoraNodesTaskResult::getTotalCount()const
|
||||
{
|
||||
return totalCount_;
|
||||
}
|
||||
|
||||
std::string GetLoraNodesTaskResult::getTaskId()const
|
||||
{
|
||||
return taskId_;
|
||||
}
|
||||
|
||||
std::string GetLoraNodesTaskResult::getErrorMessage()const
|
||||
{
|
||||
return errorMessage_;
|
||||
}
|
||||
|
||||
long GetLoraNodesTaskResult::getSuccessCount()const
|
||||
{
|
||||
return successCount_;
|
||||
}
|
||||
|
||||
std::string GetLoraNodesTaskResult::getCode()const
|
||||
{
|
||||
return code_;
|
||||
}
|
||||
|
||||
std::string GetLoraNodesTaskResult::getTaskState()const
|
||||
{
|
||||
return taskState_;
|
||||
}
|
||||
|
||||
bool GetLoraNodesTaskResult::getSuccess()const
|
||||
{
|
||||
return success_;
|
||||
}
|
||||
|
||||
60
iot/src/model/GetNodesAddingTaskRequest.cc
Normal file
60
iot/src/model/GetNodesAddingTaskRequest.cc
Normal 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/GetNodesAddingTaskRequest.h>
|
||||
|
||||
using AlibabaCloud::Iot::Model::GetNodesAddingTaskRequest;
|
||||
|
||||
GetNodesAddingTaskRequest::GetNodesAddingTaskRequest() :
|
||||
RpcServiceRequest("iot", "2018-01-20", "GetNodesAddingTask")
|
||||
{}
|
||||
|
||||
GetNodesAddingTaskRequest::~GetNodesAddingTaskRequest()
|
||||
{}
|
||||
|
||||
std::string GetNodesAddingTaskRequest::getIotInstanceId()const
|
||||
{
|
||||
return iotInstanceId_;
|
||||
}
|
||||
|
||||
void GetNodesAddingTaskRequest::setIotInstanceId(const std::string& iotInstanceId)
|
||||
{
|
||||
iotInstanceId_ = iotInstanceId;
|
||||
setCoreParameter("IotInstanceId", iotInstanceId);
|
||||
}
|
||||
|
||||
std::string GetNodesAddingTaskRequest::getTaskId()const
|
||||
{
|
||||
return taskId_;
|
||||
}
|
||||
|
||||
void GetNodesAddingTaskRequest::setTaskId(const std::string& taskId)
|
||||
{
|
||||
taskId_ = taskId;
|
||||
setCoreParameter("TaskId", taskId);
|
||||
}
|
||||
|
||||
std::string GetNodesAddingTaskRequest::getAccessKeyId()const
|
||||
{
|
||||
return accessKeyId_;
|
||||
}
|
||||
|
||||
void GetNodesAddingTaskRequest::setAccessKeyId(const std::string& accessKeyId)
|
||||
{
|
||||
accessKeyId_ = accessKeyId;
|
||||
setCoreParameter("AccessKeyId", accessKeyId);
|
||||
}
|
||||
|
||||
105
iot/src/model/GetNodesAddingTaskResult.cc
Normal file
105
iot/src/model/GetNodesAddingTaskResult.cc
Normal file
@@ -0,0 +1,105 @@
|
||||
/*
|
||||
* 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/GetNodesAddingTaskResult.h>
|
||||
#include <json/json.h>
|
||||
|
||||
using namespace AlibabaCloud::Iot;
|
||||
using namespace AlibabaCloud::Iot::Model;
|
||||
|
||||
GetNodesAddingTaskResult::GetNodesAddingTaskResult() :
|
||||
ServiceResult()
|
||||
{}
|
||||
|
||||
GetNodesAddingTaskResult::GetNodesAddingTaskResult(const std::string &payload) :
|
||||
ServiceResult()
|
||||
{
|
||||
parse(payload);
|
||||
}
|
||||
|
||||
GetNodesAddingTaskResult::~GetNodesAddingTaskResult()
|
||||
{}
|
||||
|
||||
void GetNodesAddingTaskResult::parse(const std::string &payload)
|
||||
{
|
||||
Json::CharReaderBuilder builder;
|
||||
Json::CharReader *reader = builder.newCharReader();
|
||||
Json::Value *val;
|
||||
Json::Value value;
|
||||
JSONCPP_STRING *errs;
|
||||
reader->parse(payload.data(), payload.data() + payload.size(), val, errs);
|
||||
value = *val;
|
||||
setRequestId(value["RequestId"].asString());
|
||||
auto allSuccessDevEuis = value["SuccessDevEuis"]["SuccessDevEui"];
|
||||
for (const auto &item : allSuccessDevEuis)
|
||||
successDevEuis_.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();
|
||||
if(!value["TaskId"].isNull())
|
||||
taskId_ = value["TaskId"].asString();
|
||||
if(!value["TaskState"].isNull())
|
||||
taskState_ = value["TaskState"].asString();
|
||||
if(!value["TotalCount"].isNull())
|
||||
totalCount_ = std::stol(value["TotalCount"].asString());
|
||||
if(!value["SuccessCount"].isNull())
|
||||
successCount_ = std::stol(value["SuccessCount"].asString());
|
||||
|
||||
}
|
||||
|
||||
std::vector<std::string> GetNodesAddingTaskResult::getSuccessDevEuis()const
|
||||
{
|
||||
return successDevEuis_;
|
||||
}
|
||||
|
||||
long GetNodesAddingTaskResult::getTotalCount()const
|
||||
{
|
||||
return totalCount_;
|
||||
}
|
||||
|
||||
std::string GetNodesAddingTaskResult::getTaskId()const
|
||||
{
|
||||
return taskId_;
|
||||
}
|
||||
|
||||
std::string GetNodesAddingTaskResult::getErrorMessage()const
|
||||
{
|
||||
return errorMessage_;
|
||||
}
|
||||
|
||||
long GetNodesAddingTaskResult::getSuccessCount()const
|
||||
{
|
||||
return successCount_;
|
||||
}
|
||||
|
||||
std::string GetNodesAddingTaskResult::getCode()const
|
||||
{
|
||||
return code_;
|
||||
}
|
||||
|
||||
std::string GetNodesAddingTaskResult::getTaskState()const
|
||||
{
|
||||
return taskState_;
|
||||
}
|
||||
|
||||
bool GetNodesAddingTaskResult::getSuccess()const
|
||||
{
|
||||
return success_;
|
||||
}
|
||||
|
||||
@@ -25,6 +25,17 @@ GetRuleActionRequest::GetRuleActionRequest() :
|
||||
GetRuleActionRequest::~GetRuleActionRequest()
|
||||
{}
|
||||
|
||||
std::string GetRuleActionRequest::getIotInstanceId()const
|
||||
{
|
||||
return iotInstanceId_;
|
||||
}
|
||||
|
||||
void GetRuleActionRequest::setIotInstanceId(const std::string& iotInstanceId)
|
||||
{
|
||||
iotInstanceId_ = iotInstanceId;
|
||||
setCoreParameter("IotInstanceId", iotInstanceId);
|
||||
}
|
||||
|
||||
long GetRuleActionRequest::getActionId()const
|
||||
{
|
||||
return actionId_;
|
||||
@@ -33,7 +44,7 @@ long GetRuleActionRequest::getActionId()const
|
||||
void GetRuleActionRequest::setActionId(long actionId)
|
||||
{
|
||||
actionId_ = actionId;
|
||||
setParameter("ActionId", std::to_string(actionId));
|
||||
setCoreParameter("ActionId", std::to_string(actionId));
|
||||
}
|
||||
|
||||
std::string GetRuleActionRequest::getAccessKeyId()const
|
||||
@@ -44,6 +55,6 @@ std::string GetRuleActionRequest::getAccessKeyId()const
|
||||
void GetRuleActionRequest::setAccessKeyId(const std::string& accessKeyId)
|
||||
{
|
||||
accessKeyId_ = accessKeyId;
|
||||
setParameter("AccessKeyId", accessKeyId);
|
||||
setCoreParameter("AccessKeyId", accessKeyId);
|
||||
}
|
||||
|
||||
|
||||
@@ -35,10 +35,13 @@ GetRuleActionResult::~GetRuleActionResult()
|
||||
|
||||
void GetRuleActionResult::parse(const std::string &payload)
|
||||
{
|
||||
Json::Reader reader;
|
||||
Json::CharReaderBuilder builder;
|
||||
Json::CharReader *reader = builder.newCharReader();
|
||||
Json::Value *val;
|
||||
Json::Value value;
|
||||
reader.parse(payload, value);
|
||||
|
||||
JSONCPP_STRING *errs;
|
||||
reader->parse(payload.data(), payload.data() + payload.size(), val, errs);
|
||||
value = *val;
|
||||
setRequestId(value["RequestId"].asString());
|
||||
auto ruleActionInfoNode = value["RuleActionInfo"];
|
||||
if(!ruleActionInfoNode["Id"].isNull())
|
||||
|
||||
@@ -25,6 +25,17 @@ GetRuleRequest::GetRuleRequest() :
|
||||
GetRuleRequest::~GetRuleRequest()
|
||||
{}
|
||||
|
||||
std::string GetRuleRequest::getIotInstanceId()const
|
||||
{
|
||||
return iotInstanceId_;
|
||||
}
|
||||
|
||||
void GetRuleRequest::setIotInstanceId(const std::string& iotInstanceId)
|
||||
{
|
||||
iotInstanceId_ = iotInstanceId;
|
||||
setCoreParameter("IotInstanceId", iotInstanceId);
|
||||
}
|
||||
|
||||
long GetRuleRequest::getRuleId()const
|
||||
{
|
||||
return ruleId_;
|
||||
@@ -33,7 +44,7 @@ long GetRuleRequest::getRuleId()const
|
||||
void GetRuleRequest::setRuleId(long ruleId)
|
||||
{
|
||||
ruleId_ = ruleId;
|
||||
setParameter("RuleId", std::to_string(ruleId));
|
||||
setCoreParameter("RuleId", std::to_string(ruleId));
|
||||
}
|
||||
|
||||
std::string GetRuleRequest::getAccessKeyId()const
|
||||
@@ -44,6 +55,6 @@ std::string GetRuleRequest::getAccessKeyId()const
|
||||
void GetRuleRequest::setAccessKeyId(const std::string& accessKeyId)
|
||||
{
|
||||
accessKeyId_ = accessKeyId;
|
||||
setParameter("AccessKeyId", accessKeyId);
|
||||
setCoreParameter("AccessKeyId", accessKeyId);
|
||||
}
|
||||
|
||||
|
||||
@@ -35,10 +35,13 @@ GetRuleResult::~GetRuleResult()
|
||||
|
||||
void GetRuleResult::parse(const std::string &payload)
|
||||
{
|
||||
Json::Reader reader;
|
||||
Json::CharReaderBuilder builder;
|
||||
Json::CharReader *reader = builder.newCharReader();
|
||||
Json::Value *val;
|
||||
Json::Value value;
|
||||
reader.parse(payload, value);
|
||||
|
||||
JSONCPP_STRING *errs;
|
||||
reader->parse(payload.data(), payload.data() + payload.size(), val, errs);
|
||||
value = *val;
|
||||
setRequestId(value["RequestId"].asString());
|
||||
auto ruleInfoNode = value["RuleInfo"];
|
||||
if(!ruleInfoNode["Id"].isNull())
|
||||
|
||||
@@ -33,7 +33,7 @@ std::string GetThingTopoRequest::getIotId()const
|
||||
void GetThingTopoRequest::setIotId(const std::string& iotId)
|
||||
{
|
||||
iotId_ = iotId;
|
||||
setParameter("IotId", iotId);
|
||||
setCoreParameter("IotId", iotId);
|
||||
}
|
||||
|
||||
int GetThingTopoRequest::getPageNo()const
|
||||
@@ -44,7 +44,18 @@ int GetThingTopoRequest::getPageNo()const
|
||||
void GetThingTopoRequest::setPageNo(int pageNo)
|
||||
{
|
||||
pageNo_ = pageNo;
|
||||
setParameter("PageNo", std::to_string(pageNo));
|
||||
setCoreParameter("PageNo", std::to_string(pageNo));
|
||||
}
|
||||
|
||||
std::string GetThingTopoRequest::getIotInstanceId()const
|
||||
{
|
||||
return iotInstanceId_;
|
||||
}
|
||||
|
||||
void GetThingTopoRequest::setIotInstanceId(const std::string& iotInstanceId)
|
||||
{
|
||||
iotInstanceId_ = iotInstanceId;
|
||||
setCoreParameter("IotInstanceId", iotInstanceId);
|
||||
}
|
||||
|
||||
int GetThingTopoRequest::getPageSize()const
|
||||
@@ -55,7 +66,7 @@ int GetThingTopoRequest::getPageSize()const
|
||||
void GetThingTopoRequest::setPageSize(int pageSize)
|
||||
{
|
||||
pageSize_ = pageSize;
|
||||
setParameter("PageSize", std::to_string(pageSize));
|
||||
setCoreParameter("PageSize", std::to_string(pageSize));
|
||||
}
|
||||
|
||||
std::string GetThingTopoRequest::getDeviceName()const
|
||||
@@ -66,7 +77,7 @@ std::string GetThingTopoRequest::getDeviceName()const
|
||||
void GetThingTopoRequest::setDeviceName(const std::string& deviceName)
|
||||
{
|
||||
deviceName_ = deviceName;
|
||||
setParameter("DeviceName", deviceName);
|
||||
setCoreParameter("DeviceName", deviceName);
|
||||
}
|
||||
|
||||
std::string GetThingTopoRequest::getProductKey()const
|
||||
@@ -77,7 +88,7 @@ std::string GetThingTopoRequest::getProductKey()const
|
||||
void GetThingTopoRequest::setProductKey(const std::string& productKey)
|
||||
{
|
||||
productKey_ = productKey;
|
||||
setParameter("ProductKey", productKey);
|
||||
setCoreParameter("ProductKey", productKey);
|
||||
}
|
||||
|
||||
std::string GetThingTopoRequest::getAccessKeyId()const
|
||||
@@ -88,6 +99,6 @@ std::string GetThingTopoRequest::getAccessKeyId()const
|
||||
void GetThingTopoRequest::setAccessKeyId(const std::string& accessKeyId)
|
||||
{
|
||||
accessKeyId_ = accessKeyId;
|
||||
setParameter("AccessKeyId", accessKeyId);
|
||||
setCoreParameter("AccessKeyId", accessKeyId);
|
||||
}
|
||||
|
||||
|
||||
@@ -35,10 +35,13 @@ GetThingTopoResult::~GetThingTopoResult()
|
||||
|
||||
void GetThingTopoResult::parse(const std::string &payload)
|
||||
{
|
||||
Json::Reader reader;
|
||||
Json::CharReaderBuilder builder;
|
||||
Json::CharReader *reader = builder.newCharReader();
|
||||
Json::Value *val;
|
||||
Json::Value value;
|
||||
reader.parse(payload, value);
|
||||
|
||||
JSONCPP_STRING *errs;
|
||||
reader->parse(payload.data(), payload.data() + payload.size(), val, errs);
|
||||
value = *val;
|
||||
setRequestId(value["RequestId"].asString());
|
||||
auto dataNode = value["Data"];
|
||||
if(!dataNode["Total"].isNull())
|
||||
|
||||
68
iot/src/model/InvokeDataAPIServiceRequest.cc
Normal file
68
iot/src/model/InvokeDataAPIServiceRequest.cc
Normal file
@@ -0,0 +1,68 @@
|
||||
/*
|
||||
* 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/InvokeDataAPIServiceRequest.h>
|
||||
|
||||
using AlibabaCloud::Iot::Model::InvokeDataAPIServiceRequest;
|
||||
|
||||
InvokeDataAPIServiceRequest::InvokeDataAPIServiceRequest() :
|
||||
RpcServiceRequest("iot", "2018-01-20", "InvokeDataAPIService")
|
||||
{}
|
||||
|
||||
InvokeDataAPIServiceRequest::~InvokeDataAPIServiceRequest()
|
||||
{}
|
||||
|
||||
std::string InvokeDataAPIServiceRequest::getApiSrn()const
|
||||
{
|
||||
return apiSrn_;
|
||||
}
|
||||
|
||||
void InvokeDataAPIServiceRequest::setApiSrn(const std::string& apiSrn)
|
||||
{
|
||||
apiSrn_ = apiSrn;
|
||||
setCoreParameter("ApiSrn", apiSrn);
|
||||
}
|
||||
|
||||
std::vector<InvokeDataAPIServiceRequest::Param> InvokeDataAPIServiceRequest::getParam()const
|
||||
{
|
||||
return param_;
|
||||
}
|
||||
|
||||
void InvokeDataAPIServiceRequest::setParam(const std::vector<Param>& param)
|
||||
{
|
||||
param_ = param;
|
||||
int i = 0;
|
||||
for(int i = 0; i!= param.size(); i++) {
|
||||
auto obj = param.at(i);
|
||||
std::string str ="Param."+ std::to_string(i);
|
||||
setCoreParameter(str + ".ListParamType", obj.listParamType);
|
||||
for(int i = 0; i!= obj.listParamValue.size(); i++)
|
||||
setCoreParameter(str + ".ListParamValue."+ std::to_string(i), obj.listParamValue.at(i));
|
||||
setCoreParameter(str + ".ParamValue", obj.paramValue);
|
||||
setCoreParameter(str + ".ParamName", obj.paramName);
|
||||
}
|
||||
}
|
||||
|
||||
std::string InvokeDataAPIServiceRequest::getAccessKeyId()const
|
||||
{
|
||||
return accessKeyId_;
|
||||
}
|
||||
|
||||
void InvokeDataAPIServiceRequest::setAccessKeyId(const std::string& accessKeyId)
|
||||
{
|
||||
accessKeyId_ = accessKeyId;
|
||||
setCoreParameter("AccessKeyId", accessKeyId);
|
||||
}
|
||||
87
iot/src/model/InvokeDataAPIServiceResult.cc
Normal file
87
iot/src/model/InvokeDataAPIServiceResult.cc
Normal file
@@ -0,0 +1,87 @@
|
||||
/*
|
||||
* Copyright 2009-2017 Alibaba Cloud All rights reserved.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
#include <alibabacloud/iot/model/InvokeDataAPIServiceResult.h>
|
||||
#include <json/json.h>
|
||||
|
||||
using namespace AlibabaCloud::Iot;
|
||||
using namespace AlibabaCloud::Iot::Model;
|
||||
|
||||
InvokeDataAPIServiceResult::InvokeDataAPIServiceResult() :
|
||||
ServiceResult()
|
||||
{}
|
||||
|
||||
InvokeDataAPIServiceResult::InvokeDataAPIServiceResult(const std::string &payload) :
|
||||
ServiceResult()
|
||||
{
|
||||
parse(payload);
|
||||
}
|
||||
|
||||
InvokeDataAPIServiceResult::~InvokeDataAPIServiceResult()
|
||||
{}
|
||||
|
||||
void InvokeDataAPIServiceResult::parse(const std::string &payload)
|
||||
{
|
||||
Json::CharReaderBuilder builder;
|
||||
Json::CharReader *reader = builder.newCharReader();
|
||||
Json::Value *val;
|
||||
Json::Value value;
|
||||
JSONCPP_STRING *errs;
|
||||
reader->parse(payload.data(), payload.data() + payload.size(), val, errs);
|
||||
value = *val;
|
||||
setRequestId(value["RequestId"].asString());
|
||||
auto dataNode = value["Data"];
|
||||
if(!dataNode["PageNo"].isNull())
|
||||
data_.pageNo = std::stoi(dataNode["PageNo"].asString());
|
||||
if(!dataNode["PageSize"].isNull())
|
||||
data_.pageSize = std::stoi(dataNode["PageSize"].asString());
|
||||
if(!dataNode["ApiSrn"].isNull())
|
||||
data_.apiSrn = dataNode["ApiSrn"].asString();
|
||||
auto allFieldNameList = dataNode["FieldNameList"]["FieldNameList"];
|
||||
for (auto value : allFieldNameList)
|
||||
data_.fieldNameList.push_back(value.asString());
|
||||
auto allResultList = dataNode["ResultList"]["ResultList"];
|
||||
for (auto value : allResultList)
|
||||
data_.resultList.push_back(value.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();
|
||||
|
||||
}
|
||||
|
||||
InvokeDataAPIServiceResult::Data InvokeDataAPIServiceResult::getData()const
|
||||
{
|
||||
return data_;
|
||||
}
|
||||
|
||||
std::string InvokeDataAPIServiceResult::getErrorMessage()const
|
||||
{
|
||||
return errorMessage_;
|
||||
}
|
||||
|
||||
std::string InvokeDataAPIServiceResult::getCode()const
|
||||
{
|
||||
return code_;
|
||||
}
|
||||
|
||||
bool InvokeDataAPIServiceResult::getSuccess()const
|
||||
{
|
||||
return success_;
|
||||
}
|
||||
|
||||
@@ -33,7 +33,7 @@ std::string InvokeThingServiceRequest::getArgs()const
|
||||
void InvokeThingServiceRequest::setArgs(const std::string& args)
|
||||
{
|
||||
args_ = args;
|
||||
setParameter("Args", args);
|
||||
setCoreParameter("Args", args);
|
||||
}
|
||||
|
||||
std::string InvokeThingServiceRequest::getIdentifier()const
|
||||
@@ -44,7 +44,7 @@ std::string InvokeThingServiceRequest::getIdentifier()const
|
||||
void InvokeThingServiceRequest::setIdentifier(const std::string& identifier)
|
||||
{
|
||||
identifier_ = identifier;
|
||||
setParameter("Identifier", identifier);
|
||||
setCoreParameter("Identifier", identifier);
|
||||
}
|
||||
|
||||
std::string InvokeThingServiceRequest::getIotId()const
|
||||
@@ -55,7 +55,18 @@ std::string InvokeThingServiceRequest::getIotId()const
|
||||
void InvokeThingServiceRequest::setIotId(const std::string& iotId)
|
||||
{
|
||||
iotId_ = iotId;
|
||||
setParameter("IotId", iotId);
|
||||
setCoreParameter("IotId", iotId);
|
||||
}
|
||||
|
||||
std::string InvokeThingServiceRequest::getIotInstanceId()const
|
||||
{
|
||||
return iotInstanceId_;
|
||||
}
|
||||
|
||||
void InvokeThingServiceRequest::setIotInstanceId(const std::string& iotInstanceId)
|
||||
{
|
||||
iotInstanceId_ = iotInstanceId;
|
||||
setCoreParameter("IotInstanceId", iotInstanceId);
|
||||
}
|
||||
|
||||
std::string InvokeThingServiceRequest::getDeviceName()const
|
||||
@@ -66,7 +77,7 @@ std::string InvokeThingServiceRequest::getDeviceName()const
|
||||
void InvokeThingServiceRequest::setDeviceName(const std::string& deviceName)
|
||||
{
|
||||
deviceName_ = deviceName;
|
||||
setParameter("DeviceName", deviceName);
|
||||
setCoreParameter("DeviceName", deviceName);
|
||||
}
|
||||
|
||||
std::string InvokeThingServiceRequest::getProductKey()const
|
||||
@@ -77,7 +88,7 @@ std::string InvokeThingServiceRequest::getProductKey()const
|
||||
void InvokeThingServiceRequest::setProductKey(const std::string& productKey)
|
||||
{
|
||||
productKey_ = productKey;
|
||||
setParameter("ProductKey", productKey);
|
||||
setCoreParameter("ProductKey", productKey);
|
||||
}
|
||||
|
||||
std::string InvokeThingServiceRequest::getAccessKeyId()const
|
||||
@@ -88,6 +99,6 @@ std::string InvokeThingServiceRequest::getAccessKeyId()const
|
||||
void InvokeThingServiceRequest::setAccessKeyId(const std::string& accessKeyId)
|
||||
{
|
||||
accessKeyId_ = accessKeyId;
|
||||
setParameter("AccessKeyId", accessKeyId);
|
||||
setCoreParameter("AccessKeyId", accessKeyId);
|
||||
}
|
||||
|
||||
|
||||
@@ -35,10 +35,13 @@ InvokeThingServiceResult::~InvokeThingServiceResult()
|
||||
|
||||
void InvokeThingServiceResult::parse(const std::string &payload)
|
||||
{
|
||||
Json::Reader reader;
|
||||
Json::CharReaderBuilder builder;
|
||||
Json::CharReader *reader = builder.newCharReader();
|
||||
Json::Value *val;
|
||||
Json::Value value;
|
||||
reader.parse(payload, value);
|
||||
|
||||
JSONCPP_STRING *errs;
|
||||
reader->parse(payload.data(), payload.data() + payload.size(), val, errs);
|
||||
value = *val;
|
||||
setRequestId(value["RequestId"].asString());
|
||||
auto dataNode = value["Data"];
|
||||
if(!dataNode["Result"].isNull())
|
||||
|
||||
@@ -33,7 +33,7 @@ std::string InvokeThingsServiceRequest::getArgs()const
|
||||
void InvokeThingsServiceRequest::setArgs(const std::string& args)
|
||||
{
|
||||
args_ = args;
|
||||
setParameter("Args", args);
|
||||
setCoreParameter("Args", args);
|
||||
}
|
||||
|
||||
std::string InvokeThingsServiceRequest::getIdentifier()const
|
||||
@@ -44,7 +44,18 @@ std::string InvokeThingsServiceRequest::getIdentifier()const
|
||||
void InvokeThingsServiceRequest::setIdentifier(const std::string& identifier)
|
||||
{
|
||||
identifier_ = identifier;
|
||||
setParameter("Identifier", identifier);
|
||||
setCoreParameter("Identifier", identifier);
|
||||
}
|
||||
|
||||
std::string InvokeThingsServiceRequest::getIotInstanceId()const
|
||||
{
|
||||
return iotInstanceId_;
|
||||
}
|
||||
|
||||
void InvokeThingsServiceRequest::setIotInstanceId(const std::string& iotInstanceId)
|
||||
{
|
||||
iotInstanceId_ = iotInstanceId;
|
||||
setCoreParameter("IotInstanceId", iotInstanceId);
|
||||
}
|
||||
|
||||
std::vector<std::string> InvokeThingsServiceRequest::getDeviceName()const
|
||||
@@ -56,7 +67,7 @@ void InvokeThingsServiceRequest::setDeviceName(const std::vector<std::string>& d
|
||||
{
|
||||
deviceName_ = deviceName;
|
||||
for(int i = 0; i!= deviceName.size(); i++)
|
||||
setParameter("DeviceName."+ std::to_string(i), deviceName.at(i));
|
||||
setCoreParameter("DeviceName."+ std::to_string(i), deviceName.at(i));
|
||||
}
|
||||
|
||||
std::string InvokeThingsServiceRequest::getProductKey()const
|
||||
@@ -67,7 +78,7 @@ std::string InvokeThingsServiceRequest::getProductKey()const
|
||||
void InvokeThingsServiceRequest::setProductKey(const std::string& productKey)
|
||||
{
|
||||
productKey_ = productKey;
|
||||
setParameter("ProductKey", productKey);
|
||||
setCoreParameter("ProductKey", productKey);
|
||||
}
|
||||
|
||||
std::string InvokeThingsServiceRequest::getAccessKeyId()const
|
||||
@@ -78,6 +89,6 @@ std::string InvokeThingsServiceRequest::getAccessKeyId()const
|
||||
void InvokeThingsServiceRequest::setAccessKeyId(const std::string& accessKeyId)
|
||||
{
|
||||
accessKeyId_ = accessKeyId;
|
||||
setParameter("AccessKeyId", accessKeyId);
|
||||
setCoreParameter("AccessKeyId", accessKeyId);
|
||||
}
|
||||
|
||||
|
||||
@@ -35,10 +35,13 @@ InvokeThingsServiceResult::~InvokeThingsServiceResult()
|
||||
|
||||
void InvokeThingsServiceResult::parse(const std::string &payload)
|
||||
{
|
||||
Json::Reader reader;
|
||||
Json::CharReaderBuilder builder;
|
||||
Json::CharReader *reader = builder.newCharReader();
|
||||
Json::Value *val;
|
||||
Json::Value value;
|
||||
reader.parse(payload, value);
|
||||
|
||||
JSONCPP_STRING *errs;
|
||||
reader->parse(payload.data(), payload.data() + payload.size(), val, errs);
|
||||
value = *val;
|
||||
setRequestId(value["RequestId"].asString());
|
||||
if(!value["Success"].isNull())
|
||||
success_ = value["Success"].asString() == "true";
|
||||
|
||||
88
iot/src/model/ListProductByTagsRequest.cc
Normal file
88
iot/src/model/ListProductByTagsRequest.cc
Normal file
@@ -0,0 +1,88 @@
|
||||
/*
|
||||
* 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/ListProductByTagsRequest.h>
|
||||
|
||||
using AlibabaCloud::Iot::Model::ListProductByTagsRequest;
|
||||
|
||||
ListProductByTagsRequest::ListProductByTagsRequest() :
|
||||
RpcServiceRequest("iot", "2018-01-20", "ListProductByTags")
|
||||
{}
|
||||
|
||||
ListProductByTagsRequest::~ListProductByTagsRequest()
|
||||
{}
|
||||
|
||||
std::vector<ListProductByTagsRequest::ProductTag> ListProductByTagsRequest::getProductTag()const
|
||||
{
|
||||
return productTag_;
|
||||
}
|
||||
|
||||
void ListProductByTagsRequest::setProductTag(const std::vector<ProductTag>& productTag)
|
||||
{
|
||||
productTag_ = productTag;
|
||||
int i = 0;
|
||||
for(int i = 0; i!= productTag.size(); i++) {
|
||||
auto obj = productTag.at(i);
|
||||
std::string str ="ProductTag."+ std::to_string(i);
|
||||
setCoreParameter(str + ".TagValue", obj.tagValue);
|
||||
setCoreParameter(str + ".TagKey", obj.tagKey);
|
||||
}
|
||||
}
|
||||
|
||||
std::string ListProductByTagsRequest::getIotInstanceId()const
|
||||
{
|
||||
return iotInstanceId_;
|
||||
}
|
||||
|
||||
void ListProductByTagsRequest::setIotInstanceId(const std::string& iotInstanceId)
|
||||
{
|
||||
iotInstanceId_ = iotInstanceId;
|
||||
setCoreParameter("IotInstanceId", iotInstanceId);
|
||||
}
|
||||
|
||||
int ListProductByTagsRequest::getPageSize()const
|
||||
{
|
||||
return pageSize_;
|
||||
}
|
||||
|
||||
void ListProductByTagsRequest::setPageSize(int pageSize)
|
||||
{
|
||||
pageSize_ = pageSize;
|
||||
setCoreParameter("PageSize", std::to_string(pageSize));
|
||||
}
|
||||
|
||||
int ListProductByTagsRequest::getCurrentPage()const
|
||||
{
|
||||
return currentPage_;
|
||||
}
|
||||
|
||||
void ListProductByTagsRequest::setCurrentPage(int currentPage)
|
||||
{
|
||||
currentPage_ = currentPage;
|
||||
setCoreParameter("CurrentPage", std::to_string(currentPage));
|
||||
}
|
||||
|
||||
std::string ListProductByTagsRequest::getAccessKeyId()const
|
||||
{
|
||||
return accessKeyId_;
|
||||
}
|
||||
|
||||
void ListProductByTagsRequest::setAccessKeyId(const std::string& accessKeyId)
|
||||
{
|
||||
accessKeyId_ = accessKeyId;
|
||||
setCoreParameter("AccessKeyId", accessKeyId);
|
||||
}
|
||||
|
||||
90
iot/src/model/ListProductByTagsResult.cc
Normal file
90
iot/src/model/ListProductByTagsResult.cc
Normal 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/ListProductByTagsResult.h>
|
||||
#include <json/json.h>
|
||||
|
||||
using namespace AlibabaCloud::Iot;
|
||||
using namespace AlibabaCloud::Iot::Model;
|
||||
|
||||
ListProductByTagsResult::ListProductByTagsResult() :
|
||||
ServiceResult()
|
||||
{}
|
||||
|
||||
ListProductByTagsResult::ListProductByTagsResult(const std::string &payload) :
|
||||
ServiceResult()
|
||||
{
|
||||
parse(payload);
|
||||
}
|
||||
|
||||
ListProductByTagsResult::~ListProductByTagsResult()
|
||||
{}
|
||||
|
||||
void ListProductByTagsResult::parse(const std::string &payload)
|
||||
{
|
||||
Json::CharReaderBuilder builder;
|
||||
Json::CharReader *reader = builder.newCharReader();
|
||||
Json::Value *val;
|
||||
Json::Value value;
|
||||
JSONCPP_STRING *errs;
|
||||
reader->parse(payload.data(), payload.data() + payload.size(), val, errs);
|
||||
value = *val;
|
||||
setRequestId(value["RequestId"].asString());
|
||||
auto allProductInfos = value["ProductInfos"]["ProductInfo"];
|
||||
for (auto value : allProductInfos)
|
||||
{
|
||||
ProductInfo productInfosObject;
|
||||
if(!value["ProductName"].isNull())
|
||||
productInfosObject.productName = value["ProductName"].asString();
|
||||
if(!value["ProductKey"].isNull())
|
||||
productInfosObject.productKey = value["ProductKey"].asString();
|
||||
if(!value["CreateTime"].isNull())
|
||||
productInfosObject.createTime = std::stol(value["CreateTime"].asString());
|
||||
if(!value["Description"].isNull())
|
||||
productInfosObject.description = value["Description"].asString();
|
||||
if(!value["NodeType"].isNull())
|
||||
productInfosObject.nodeType = std::stoi(value["NodeType"].asString());
|
||||
productInfos_.push_back(productInfosObject);
|
||||
}
|
||||
if(!value["Success"].isNull())
|
||||
success_ = value["Success"].asString() == "true";
|
||||
if(!value["ErrorMessage"].isNull())
|
||||
errorMessage_ = value["ErrorMessage"].asString();
|
||||
if(!value["Code"].isNull())
|
||||
code_ = value["Code"].asString();
|
||||
|
||||
}
|
||||
|
||||
std::string ListProductByTagsResult::getErrorMessage()const
|
||||
{
|
||||
return errorMessage_;
|
||||
}
|
||||
|
||||
std::vector<ListProductByTagsResult::ProductInfo> ListProductByTagsResult::getProductInfos()const
|
||||
{
|
||||
return productInfos_;
|
||||
}
|
||||
|
||||
std::string ListProductByTagsResult::getCode()const
|
||||
{
|
||||
return code_;
|
||||
}
|
||||
|
||||
bool ListProductByTagsResult::getSuccess()const
|
||||
{
|
||||
return success_;
|
||||
}
|
||||
|
||||
60
iot/src/model/ListProductTagsRequest.cc
Normal file
60
iot/src/model/ListProductTagsRequest.cc
Normal 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/ListProductTagsRequest.h>
|
||||
|
||||
using AlibabaCloud::Iot::Model::ListProductTagsRequest;
|
||||
|
||||
ListProductTagsRequest::ListProductTagsRequest() :
|
||||
RpcServiceRequest("iot", "2018-01-20", "ListProductTags")
|
||||
{}
|
||||
|
||||
ListProductTagsRequest::~ListProductTagsRequest()
|
||||
{}
|
||||
|
||||
std::string ListProductTagsRequest::getIotInstanceId()const
|
||||
{
|
||||
return iotInstanceId_;
|
||||
}
|
||||
|
||||
void ListProductTagsRequest::setIotInstanceId(const std::string& iotInstanceId)
|
||||
{
|
||||
iotInstanceId_ = iotInstanceId;
|
||||
setCoreParameter("IotInstanceId", iotInstanceId);
|
||||
}
|
||||
|
||||
std::string ListProductTagsRequest::getProductKey()const
|
||||
{
|
||||
return productKey_;
|
||||
}
|
||||
|
||||
void ListProductTagsRequest::setProductKey(const std::string& productKey)
|
||||
{
|
||||
productKey_ = productKey;
|
||||
setCoreParameter("ProductKey", productKey);
|
||||
}
|
||||
|
||||
std::string ListProductTagsRequest::getAccessKeyId()const
|
||||
{
|
||||
return accessKeyId_;
|
||||
}
|
||||
|
||||
void ListProductTagsRequest::setAccessKeyId(const std::string& accessKeyId)
|
||||
{
|
||||
accessKeyId_ = accessKeyId;
|
||||
setCoreParameter("AccessKeyId", accessKeyId);
|
||||
}
|
||||
|
||||
84
iot/src/model/ListProductTagsResult.cc
Normal file
84
iot/src/model/ListProductTagsResult.cc
Normal file
@@ -0,0 +1,84 @@
|
||||
/*
|
||||
* Copyright 2009-2017 Alibaba Cloud All rights reserved.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
#include <alibabacloud/iot/model/ListProductTagsResult.h>
|
||||
#include <json/json.h>
|
||||
|
||||
using namespace AlibabaCloud::Iot;
|
||||
using namespace AlibabaCloud::Iot::Model;
|
||||
|
||||
ListProductTagsResult::ListProductTagsResult() :
|
||||
ServiceResult()
|
||||
{}
|
||||
|
||||
ListProductTagsResult::ListProductTagsResult(const std::string &payload) :
|
||||
ServiceResult()
|
||||
{
|
||||
parse(payload);
|
||||
}
|
||||
|
||||
ListProductTagsResult::~ListProductTagsResult()
|
||||
{}
|
||||
|
||||
void ListProductTagsResult::parse(const std::string &payload)
|
||||
{
|
||||
Json::CharReaderBuilder builder;
|
||||
Json::CharReader *reader = builder.newCharReader();
|
||||
Json::Value *val;
|
||||
Json::Value value;
|
||||
JSONCPP_STRING *errs;
|
||||
reader->parse(payload.data(), payload.data() + payload.size(), val, errs);
|
||||
value = *val;
|
||||
setRequestId(value["RequestId"].asString());
|
||||
auto allData = value["Data"]["ProductTag"];
|
||||
for (auto value : allData)
|
||||
{
|
||||
ProductTag dataObject;
|
||||
if(!value["TagKey"].isNull())
|
||||
dataObject.tagKey = value["TagKey"].asString();
|
||||
if(!value["TagValue"].isNull())
|
||||
dataObject.tagValue = value["TagValue"].asString();
|
||||
data_.push_back(dataObject);
|
||||
}
|
||||
if(!value["Success"].isNull())
|
||||
success_ = value["Success"].asString() == "true";
|
||||
if(!value["ErrorMessage"].isNull())
|
||||
errorMessage_ = value["ErrorMessage"].asString();
|
||||
if(!value["Code"].isNull())
|
||||
code_ = value["Code"].asString();
|
||||
|
||||
}
|
||||
|
||||
std::vector<ListProductTagsResult::ProductTag> ListProductTagsResult::getData()const
|
||||
{
|
||||
return data_;
|
||||
}
|
||||
|
||||
std::string ListProductTagsResult::getErrorMessage()const
|
||||
{
|
||||
return errorMessage_;
|
||||
}
|
||||
|
||||
std::string ListProductTagsResult::getCode()const
|
||||
{
|
||||
return code_;
|
||||
}
|
||||
|
||||
bool ListProductTagsResult::getSuccess()const
|
||||
{
|
||||
return success_;
|
||||
}
|
||||
|
||||
@@ -25,6 +25,17 @@ ListRuleActionsRequest::ListRuleActionsRequest() :
|
||||
ListRuleActionsRequest::~ListRuleActionsRequest()
|
||||
{}
|
||||
|
||||
std::string ListRuleActionsRequest::getIotInstanceId()const
|
||||
{
|
||||
return iotInstanceId_;
|
||||
}
|
||||
|
||||
void ListRuleActionsRequest::setIotInstanceId(const std::string& iotInstanceId)
|
||||
{
|
||||
iotInstanceId_ = iotInstanceId;
|
||||
setCoreParameter("IotInstanceId", iotInstanceId);
|
||||
}
|
||||
|
||||
long ListRuleActionsRequest::getRuleId()const
|
||||
{
|
||||
return ruleId_;
|
||||
@@ -33,7 +44,7 @@ long ListRuleActionsRequest::getRuleId()const
|
||||
void ListRuleActionsRequest::setRuleId(long ruleId)
|
||||
{
|
||||
ruleId_ = ruleId;
|
||||
setParameter("RuleId", std::to_string(ruleId));
|
||||
setCoreParameter("RuleId", std::to_string(ruleId));
|
||||
}
|
||||
|
||||
std::string ListRuleActionsRequest::getAccessKeyId()const
|
||||
@@ -44,6 +55,6 @@ std::string ListRuleActionsRequest::getAccessKeyId()const
|
||||
void ListRuleActionsRequest::setAccessKeyId(const std::string& accessKeyId)
|
||||
{
|
||||
accessKeyId_ = accessKeyId;
|
||||
setParameter("AccessKeyId", accessKeyId);
|
||||
setCoreParameter("AccessKeyId", accessKeyId);
|
||||
}
|
||||
|
||||
|
||||
@@ -35,10 +35,13 @@ ListRuleActionsResult::~ListRuleActionsResult()
|
||||
|
||||
void ListRuleActionsResult::parse(const std::string &payload)
|
||||
{
|
||||
Json::Reader reader;
|
||||
Json::CharReaderBuilder builder;
|
||||
Json::CharReader *reader = builder.newCharReader();
|
||||
Json::Value *val;
|
||||
Json::Value value;
|
||||
reader.parse(payload, value);
|
||||
|
||||
JSONCPP_STRING *errs;
|
||||
reader->parse(payload.data(), payload.data() + payload.size(), val, errs);
|
||||
value = *val;
|
||||
setRequestId(value["RequestId"].asString());
|
||||
auto allRuleActionList = value["RuleActionList"]["RuleActionInfo"];
|
||||
for (auto value : allRuleActionList)
|
||||
|
||||
@@ -25,6 +25,28 @@ ListRuleRequest::ListRuleRequest() :
|
||||
ListRuleRequest::~ListRuleRequest()
|
||||
{}
|
||||
|
||||
std::string ListRuleRequest::getSearchName()const
|
||||
{
|
||||
return searchName_;
|
||||
}
|
||||
|
||||
void ListRuleRequest::setSearchName(const std::string& searchName)
|
||||
{
|
||||
searchName_ = searchName;
|
||||
setCoreParameter("SearchName", searchName);
|
||||
}
|
||||
|
||||
std::string ListRuleRequest::getIotInstanceId()const
|
||||
{
|
||||
return iotInstanceId_;
|
||||
}
|
||||
|
||||
void ListRuleRequest::setIotInstanceId(const std::string& iotInstanceId)
|
||||
{
|
||||
iotInstanceId_ = iotInstanceId;
|
||||
setCoreParameter("IotInstanceId", iotInstanceId);
|
||||
}
|
||||
|
||||
int ListRuleRequest::getPageSize()const
|
||||
{
|
||||
return pageSize_;
|
||||
@@ -33,7 +55,7 @@ int ListRuleRequest::getPageSize()const
|
||||
void ListRuleRequest::setPageSize(int pageSize)
|
||||
{
|
||||
pageSize_ = pageSize;
|
||||
setParameter("PageSize", std::to_string(pageSize));
|
||||
setCoreParameter("PageSize", std::to_string(pageSize));
|
||||
}
|
||||
|
||||
int ListRuleRequest::getCurrentPage()const
|
||||
@@ -44,7 +66,7 @@ int ListRuleRequest::getCurrentPage()const
|
||||
void ListRuleRequest::setCurrentPage(int currentPage)
|
||||
{
|
||||
currentPage_ = currentPage;
|
||||
setParameter("CurrentPage", std::to_string(currentPage));
|
||||
setCoreParameter("CurrentPage", std::to_string(currentPage));
|
||||
}
|
||||
|
||||
std::string ListRuleRequest::getAccessKeyId()const
|
||||
@@ -55,6 +77,6 @@ std::string ListRuleRequest::getAccessKeyId()const
|
||||
void ListRuleRequest::setAccessKeyId(const std::string& accessKeyId)
|
||||
{
|
||||
accessKeyId_ = accessKeyId;
|
||||
setParameter("AccessKeyId", accessKeyId);
|
||||
setCoreParameter("AccessKeyId", accessKeyId);
|
||||
}
|
||||
|
||||
|
||||
@@ -35,10 +35,13 @@ ListRuleResult::~ListRuleResult()
|
||||
|
||||
void ListRuleResult::parse(const std::string &payload)
|
||||
{
|
||||
Json::Reader reader;
|
||||
Json::CharReaderBuilder builder;
|
||||
Json::CharReader *reader = builder.newCharReader();
|
||||
Json::Value *val;
|
||||
Json::Value value;
|
||||
reader.parse(payload, value);
|
||||
|
||||
JSONCPP_STRING *errs;
|
||||
reader->parse(payload.data(), payload.data() + payload.size(), val, errs);
|
||||
value = *val;
|
||||
setRequestId(value["RequestId"].asString());
|
||||
auto allData = value["Data"]["RuleInfo"];
|
||||
for (auto value : allData)
|
||||
|
||||
@@ -33,7 +33,7 @@ std::string NotifyAddThingTopoRequest::getGwProductKey()const
|
||||
void NotifyAddThingTopoRequest::setGwProductKey(const std::string& gwProductKey)
|
||||
{
|
||||
gwProductKey_ = gwProductKey;
|
||||
setParameter("GwProductKey", gwProductKey);
|
||||
setCoreParameter("GwProductKey", gwProductKey);
|
||||
}
|
||||
|
||||
std::string NotifyAddThingTopoRequest::getGwDeviceName()const
|
||||
@@ -44,7 +44,18 @@ std::string NotifyAddThingTopoRequest::getGwDeviceName()const
|
||||
void NotifyAddThingTopoRequest::setGwDeviceName(const std::string& gwDeviceName)
|
||||
{
|
||||
gwDeviceName_ = gwDeviceName;
|
||||
setParameter("GwDeviceName", gwDeviceName);
|
||||
setCoreParameter("GwDeviceName", gwDeviceName);
|
||||
}
|
||||
|
||||
std::string NotifyAddThingTopoRequest::getIotInstanceId()const
|
||||
{
|
||||
return iotInstanceId_;
|
||||
}
|
||||
|
||||
void NotifyAddThingTopoRequest::setIotInstanceId(const std::string& iotInstanceId)
|
||||
{
|
||||
iotInstanceId_ = iotInstanceId;
|
||||
setCoreParameter("IotInstanceId", iotInstanceId);
|
||||
}
|
||||
|
||||
std::string NotifyAddThingTopoRequest::getGwIotId()const
|
||||
@@ -55,7 +66,7 @@ std::string NotifyAddThingTopoRequest::getGwIotId()const
|
||||
void NotifyAddThingTopoRequest::setGwIotId(const std::string& gwIotId)
|
||||
{
|
||||
gwIotId_ = gwIotId;
|
||||
setParameter("GwIotId", gwIotId);
|
||||
setCoreParameter("GwIotId", gwIotId);
|
||||
}
|
||||
|
||||
std::string NotifyAddThingTopoRequest::getDeviceListStr()const
|
||||
@@ -66,7 +77,7 @@ std::string NotifyAddThingTopoRequest::getDeviceListStr()const
|
||||
void NotifyAddThingTopoRequest::setDeviceListStr(const std::string& deviceListStr)
|
||||
{
|
||||
deviceListStr_ = deviceListStr;
|
||||
setParameter("DeviceListStr", deviceListStr);
|
||||
setCoreParameter("DeviceListStr", deviceListStr);
|
||||
}
|
||||
|
||||
std::string NotifyAddThingTopoRequest::getAccessKeyId()const
|
||||
@@ -77,6 +88,6 @@ std::string NotifyAddThingTopoRequest::getAccessKeyId()const
|
||||
void NotifyAddThingTopoRequest::setAccessKeyId(const std::string& accessKeyId)
|
||||
{
|
||||
accessKeyId_ = accessKeyId;
|
||||
setParameter("AccessKeyId", accessKeyId);
|
||||
setCoreParameter("AccessKeyId", accessKeyId);
|
||||
}
|
||||
|
||||
|
||||
@@ -35,10 +35,13 @@ NotifyAddThingTopoResult::~NotifyAddThingTopoResult()
|
||||
|
||||
void NotifyAddThingTopoResult::parse(const std::string &payload)
|
||||
{
|
||||
Json::Reader reader;
|
||||
Json::CharReaderBuilder builder;
|
||||
Json::CharReader *reader = builder.newCharReader();
|
||||
Json::Value *val;
|
||||
Json::Value value;
|
||||
reader.parse(payload, value);
|
||||
|
||||
JSONCPP_STRING *errs;
|
||||
reader->parse(payload.data(), payload.data() + payload.size(), val, errs);
|
||||
value = *val;
|
||||
setRequestId(value["RequestId"].asString());
|
||||
auto dataNode = value["Data"];
|
||||
if(!dataNode["MessageId"].isNull())
|
||||
|
||||
@@ -33,7 +33,7 @@ std::string PubBroadcastRequest::getTopicFullName()const
|
||||
void PubBroadcastRequest::setTopicFullName(const std::string& topicFullName)
|
||||
{
|
||||
topicFullName_ = topicFullName;
|
||||
setParameter("TopicFullName", topicFullName);
|
||||
setCoreParameter("TopicFullName", topicFullName);
|
||||
}
|
||||
|
||||
std::string PubBroadcastRequest::getMessageContent()const
|
||||
@@ -44,7 +44,18 @@ std::string PubBroadcastRequest::getMessageContent()const
|
||||
void PubBroadcastRequest::setMessageContent(const std::string& messageContent)
|
||||
{
|
||||
messageContent_ = messageContent;
|
||||
setParameter("MessageContent", messageContent);
|
||||
setCoreParameter("MessageContent", messageContent);
|
||||
}
|
||||
|
||||
std::string PubBroadcastRequest::getIotInstanceId()const
|
||||
{
|
||||
return iotInstanceId_;
|
||||
}
|
||||
|
||||
void PubBroadcastRequest::setIotInstanceId(const std::string& iotInstanceId)
|
||||
{
|
||||
iotInstanceId_ = iotInstanceId;
|
||||
setCoreParameter("IotInstanceId", iotInstanceId);
|
||||
}
|
||||
|
||||
std::string PubBroadcastRequest::getProductKey()const
|
||||
@@ -55,7 +66,7 @@ std::string PubBroadcastRequest::getProductKey()const
|
||||
void PubBroadcastRequest::setProductKey(const std::string& productKey)
|
||||
{
|
||||
productKey_ = productKey;
|
||||
setParameter("ProductKey", productKey);
|
||||
setCoreParameter("ProductKey", productKey);
|
||||
}
|
||||
|
||||
std::string PubBroadcastRequest::getAccessKeyId()const
|
||||
@@ -66,6 +77,6 @@ std::string PubBroadcastRequest::getAccessKeyId()const
|
||||
void PubBroadcastRequest::setAccessKeyId(const std::string& accessKeyId)
|
||||
{
|
||||
accessKeyId_ = accessKeyId;
|
||||
setParameter("AccessKeyId", accessKeyId);
|
||||
setCoreParameter("AccessKeyId", accessKeyId);
|
||||
}
|
||||
|
||||
|
||||
@@ -35,10 +35,13 @@ PubBroadcastResult::~PubBroadcastResult()
|
||||
|
||||
void PubBroadcastResult::parse(const std::string &payload)
|
||||
{
|
||||
Json::Reader reader;
|
||||
Json::CharReaderBuilder builder;
|
||||
Json::CharReader *reader = builder.newCharReader();
|
||||
Json::Value *val;
|
||||
Json::Value value;
|
||||
reader.parse(payload, value);
|
||||
|
||||
JSONCPP_STRING *errs;
|
||||
reader->parse(payload.data(), payload.data() + payload.size(), val, errs);
|
||||
value = *val;
|
||||
setRequestId(value["RequestId"].asString());
|
||||
if(!value["Success"].isNull())
|
||||
success_ = value["Success"].asString() == "true";
|
||||
|
||||
@@ -33,7 +33,7 @@ std::string PubRequest::getTopicFullName()const
|
||||
void PubRequest::setTopicFullName(const std::string& topicFullName)
|
||||
{
|
||||
topicFullName_ = topicFullName;
|
||||
setParameter("TopicFullName", topicFullName);
|
||||
setCoreParameter("TopicFullName", topicFullName);
|
||||
}
|
||||
|
||||
int PubRequest::getQos()const
|
||||
@@ -44,7 +44,7 @@ int PubRequest::getQos()const
|
||||
void PubRequest::setQos(int qos)
|
||||
{
|
||||
qos_ = qos;
|
||||
setParameter("Qos", std::to_string(qos));
|
||||
setCoreParameter("Qos", std::to_string(qos));
|
||||
}
|
||||
|
||||
std::string PubRequest::getMessageContent()const
|
||||
@@ -55,7 +55,18 @@ std::string PubRequest::getMessageContent()const
|
||||
void PubRequest::setMessageContent(const std::string& messageContent)
|
||||
{
|
||||
messageContent_ = messageContent;
|
||||
setParameter("MessageContent", messageContent);
|
||||
setCoreParameter("MessageContent", messageContent);
|
||||
}
|
||||
|
||||
std::string PubRequest::getIotInstanceId()const
|
||||
{
|
||||
return iotInstanceId_;
|
||||
}
|
||||
|
||||
void PubRequest::setIotInstanceId(const std::string& iotInstanceId)
|
||||
{
|
||||
iotInstanceId_ = iotInstanceId;
|
||||
setCoreParameter("IotInstanceId", iotInstanceId);
|
||||
}
|
||||
|
||||
std::string PubRequest::getProductKey()const
|
||||
@@ -66,7 +77,7 @@ std::string PubRequest::getProductKey()const
|
||||
void PubRequest::setProductKey(const std::string& productKey)
|
||||
{
|
||||
productKey_ = productKey;
|
||||
setParameter("ProductKey", productKey);
|
||||
setCoreParameter("ProductKey", productKey);
|
||||
}
|
||||
|
||||
std::string PubRequest::getAccessKeyId()const
|
||||
@@ -77,6 +88,6 @@ std::string PubRequest::getAccessKeyId()const
|
||||
void PubRequest::setAccessKeyId(const std::string& accessKeyId)
|
||||
{
|
||||
accessKeyId_ = accessKeyId;
|
||||
setParameter("AccessKeyId", accessKeyId);
|
||||
setCoreParameter("AccessKeyId", accessKeyId);
|
||||
}
|
||||
|
||||
|
||||
@@ -35,10 +35,13 @@ PubResult::~PubResult()
|
||||
|
||||
void PubResult::parse(const std::string &payload)
|
||||
{
|
||||
Json::Reader reader;
|
||||
Json::CharReaderBuilder builder;
|
||||
Json::CharReader *reader = builder.newCharReader();
|
||||
Json::Value *val;
|
||||
Json::Value value;
|
||||
reader.parse(payload, value);
|
||||
|
||||
JSONCPP_STRING *errs;
|
||||
reader->parse(payload.data(), payload.data() + payload.size(), val, errs);
|
||||
value = *val;
|
||||
setRequestId(value["RequestId"].asString());
|
||||
if(!value["Success"].isNull())
|
||||
success_ = value["Success"].asString() == "true";
|
||||
|
||||
@@ -34,7 +34,7 @@ void QueryAppDeviceListRequest::setProductKeyList(const std::vector<std::string>
|
||||
{
|
||||
productKeyList_ = productKeyList;
|
||||
for(int i = 0; i!= productKeyList.size(); i++)
|
||||
setParameter("ProductKeyList."+ std::to_string(i), productKeyList.at(i));
|
||||
setCoreParameter("ProductKeyList."+ std::to_string(i), productKeyList.at(i));
|
||||
}
|
||||
|
||||
std::vector<std::string> QueryAppDeviceListRequest::getCategoryKeyList()const
|
||||
@@ -46,7 +46,18 @@ void QueryAppDeviceListRequest::setCategoryKeyList(const std::vector<std::string
|
||||
{
|
||||
categoryKeyList_ = categoryKeyList;
|
||||
for(int i = 0; i!= categoryKeyList.size(); i++)
|
||||
setParameter("CategoryKeyList."+ std::to_string(i), categoryKeyList.at(i));
|
||||
setCoreParameter("CategoryKeyList."+ std::to_string(i), categoryKeyList.at(i));
|
||||
}
|
||||
|
||||
std::string QueryAppDeviceListRequest::getIotInstanceId()const
|
||||
{
|
||||
return iotInstanceId_;
|
||||
}
|
||||
|
||||
void QueryAppDeviceListRequest::setIotInstanceId(const std::string& iotInstanceId)
|
||||
{
|
||||
iotInstanceId_ = iotInstanceId;
|
||||
setCoreParameter("IotInstanceId", iotInstanceId);
|
||||
}
|
||||
|
||||
int QueryAppDeviceListRequest::getPageSize()const
|
||||
@@ -57,7 +68,7 @@ int QueryAppDeviceListRequest::getPageSize()const
|
||||
void QueryAppDeviceListRequest::setPageSize(int pageSize)
|
||||
{
|
||||
pageSize_ = pageSize;
|
||||
setParameter("PageSize", std::to_string(pageSize));
|
||||
setCoreParameter("PageSize", std::to_string(pageSize));
|
||||
}
|
||||
|
||||
int QueryAppDeviceListRequest::getCurrentPage()const
|
||||
@@ -68,7 +79,7 @@ int QueryAppDeviceListRequest::getCurrentPage()const
|
||||
void QueryAppDeviceListRequest::setCurrentPage(int currentPage)
|
||||
{
|
||||
currentPage_ = currentPage;
|
||||
setParameter("CurrentPage", std::to_string(currentPage));
|
||||
setCoreParameter("CurrentPage", std::to_string(currentPage));
|
||||
}
|
||||
|
||||
std::string QueryAppDeviceListRequest::getAppKey()const
|
||||
@@ -79,7 +90,7 @@ std::string QueryAppDeviceListRequest::getAppKey()const
|
||||
void QueryAppDeviceListRequest::setAppKey(const std::string& appKey)
|
||||
{
|
||||
appKey_ = appKey;
|
||||
setParameter("AppKey", appKey);
|
||||
setCoreParameter("AppKey", appKey);
|
||||
}
|
||||
|
||||
std::vector<QueryAppDeviceListRequest::TagList> QueryAppDeviceListRequest::getTagList()const
|
||||
@@ -94,8 +105,8 @@ void QueryAppDeviceListRequest::setTagList(const std::vector<TagList>& tagList)
|
||||
for(int i = 0; i!= tagList.size(); i++) {
|
||||
auto obj = tagList.at(i);
|
||||
std::string str ="TagList."+ std::to_string(i);
|
||||
setParameter(str + ".TagName", obj.tagName);
|
||||
setParameter(str + ".TagValue", obj.tagValue);
|
||||
setCoreParameter(str + ".TagName", obj.tagName);
|
||||
setCoreParameter(str + ".TagValue", obj.tagValue);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -35,10 +35,13 @@ QueryAppDeviceListResult::~QueryAppDeviceListResult()
|
||||
|
||||
void QueryAppDeviceListResult::parse(const std::string &payload)
|
||||
{
|
||||
Json::Reader reader;
|
||||
Json::CharReaderBuilder builder;
|
||||
Json::CharReader *reader = builder.newCharReader();
|
||||
Json::Value *val;
|
||||
Json::Value value;
|
||||
reader.parse(payload, value);
|
||||
|
||||
JSONCPP_STRING *errs;
|
||||
reader->parse(payload.data(), payload.data() + payload.size(), val, errs);
|
||||
value = *val;
|
||||
setRequestId(value["RequestId"].asString());
|
||||
auto allData = value["Data"]["DataItem"];
|
||||
for (auto value : allData)
|
||||
|
||||
@@ -33,7 +33,18 @@ long QueryBatchRegisterDeviceStatusRequest::getApplyId()const
|
||||
void QueryBatchRegisterDeviceStatusRequest::setApplyId(long applyId)
|
||||
{
|
||||
applyId_ = applyId;
|
||||
setParameter("ApplyId", std::to_string(applyId));
|
||||
setCoreParameter("ApplyId", std::to_string(applyId));
|
||||
}
|
||||
|
||||
std::string QueryBatchRegisterDeviceStatusRequest::getIotInstanceId()const
|
||||
{
|
||||
return iotInstanceId_;
|
||||
}
|
||||
|
||||
void QueryBatchRegisterDeviceStatusRequest::setIotInstanceId(const std::string& iotInstanceId)
|
||||
{
|
||||
iotInstanceId_ = iotInstanceId;
|
||||
setCoreParameter("IotInstanceId", iotInstanceId);
|
||||
}
|
||||
|
||||
std::string QueryBatchRegisterDeviceStatusRequest::getProductKey()const
|
||||
@@ -44,7 +55,7 @@ std::string QueryBatchRegisterDeviceStatusRequest::getProductKey()const
|
||||
void QueryBatchRegisterDeviceStatusRequest::setProductKey(const std::string& productKey)
|
||||
{
|
||||
productKey_ = productKey;
|
||||
setParameter("ProductKey", productKey);
|
||||
setCoreParameter("ProductKey", productKey);
|
||||
}
|
||||
|
||||
std::string QueryBatchRegisterDeviceStatusRequest::getAccessKeyId()const
|
||||
@@ -55,6 +66,6 @@ std::string QueryBatchRegisterDeviceStatusRequest::getAccessKeyId()const
|
||||
void QueryBatchRegisterDeviceStatusRequest::setAccessKeyId(const std::string& accessKeyId)
|
||||
{
|
||||
accessKeyId_ = accessKeyId;
|
||||
setParameter("AccessKeyId", accessKeyId);
|
||||
setCoreParameter("AccessKeyId", accessKeyId);
|
||||
}
|
||||
|
||||
|
||||
@@ -35,10 +35,13 @@ QueryBatchRegisterDeviceStatusResult::~QueryBatchRegisterDeviceStatusResult()
|
||||
|
||||
void QueryBatchRegisterDeviceStatusResult::parse(const std::string &payload)
|
||||
{
|
||||
Json::Reader reader;
|
||||
Json::CharReaderBuilder builder;
|
||||
Json::CharReader *reader = builder.newCharReader();
|
||||
Json::Value *val;
|
||||
Json::Value value;
|
||||
reader.parse(payload, value);
|
||||
|
||||
JSONCPP_STRING *errs;
|
||||
reader->parse(payload.data(), payload.data() + payload.size(), val, errs);
|
||||
value = *val;
|
||||
setRequestId(value["RequestId"].asString());
|
||||
auto dataNode = value["Data"];
|
||||
if(!dataNode["Status"].isNull())
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user