Add describe devices to return device status.

This commit is contained in:
sdk-team
2020-09-20 12:12:16 +00:00
parent d69766bdfd
commit c12d0267d7
20 changed files with 623 additions and 70 deletions

View File

@@ -1,3 +1,6 @@
2020-09-20 Version: patch
- Add describe devices to return device status.
2020-09-19 Version: patch
- Support query user tenant list and current active tenant.
- Support query table meta information via table GUID.

View File

@@ -113,6 +113,8 @@ set(vcs_public_header_model
include/alibabacloud/vcs/model/ListCorpMetricsResult.h
include/alibabacloud/vcs/model/ListCorpsRequest.h
include/alibabacloud/vcs/model/ListCorpsResult.h
include/alibabacloud/vcs/model/ListDeviceGroupsRequest.h
include/alibabacloud/vcs/model/ListDeviceGroupsResult.h
include/alibabacloud/vcs/model/ListDevicesRequest.h
include/alibabacloud/vcs/model/ListDevicesResult.h
include/alibabacloud/vcs/model/ListEventAlgorithmDetailsRequest.h
@@ -274,6 +276,8 @@ set(vcs_src
src/model/ListCorpMetricsResult.cc
src/model/ListCorpsRequest.cc
src/model/ListCorpsResult.cc
src/model/ListDeviceGroupsRequest.cc
src/model/ListDeviceGroupsResult.cc
src/model/ListDevicesRequest.cc
src/model/ListDevicesResult.cc
src/model/ListEventAlgorithmDetailsRequest.cc

View File

@@ -114,6 +114,8 @@
#include "model/ListCorpMetricsResult.h"
#include "model/ListCorpsRequest.h"
#include "model/ListCorpsResult.h"
#include "model/ListDeviceGroupsRequest.h"
#include "model/ListDeviceGroupsResult.h"
#include "model/ListDevicesRequest.h"
#include "model/ListDevicesResult.h"
#include "model/ListEventAlgorithmDetailsRequest.h"
@@ -327,6 +329,9 @@ namespace AlibabaCloud
typedef Outcome<Error, Model::ListCorpsResult> ListCorpsOutcome;
typedef std::future<ListCorpsOutcome> ListCorpsOutcomeCallable;
typedef std::function<void(const VcsClient*, const Model::ListCorpsRequest&, const ListCorpsOutcome&, const std::shared_ptr<const AsyncCallerContext>&)> ListCorpsAsyncHandler;
typedef Outcome<Error, Model::ListDeviceGroupsResult> ListDeviceGroupsOutcome;
typedef std::future<ListDeviceGroupsOutcome> ListDeviceGroupsOutcomeCallable;
typedef std::function<void(const VcsClient*, const Model::ListDeviceGroupsRequest&, const ListDeviceGroupsOutcome&, const std::shared_ptr<const AsyncCallerContext>&)> ListDeviceGroupsAsyncHandler;
typedef Outcome<Error, Model::ListDevicesResult> ListDevicesOutcome;
typedef std::future<ListDevicesOutcome> ListDevicesOutcomeCallable;
typedef std::function<void(const VcsClient*, const Model::ListDevicesRequest&, const ListDevicesOutcome&, const std::shared_ptr<const AsyncCallerContext>&)> ListDevicesAsyncHandler;
@@ -569,6 +574,9 @@ namespace AlibabaCloud
ListCorpsOutcome listCorps(const Model::ListCorpsRequest &request)const;
void listCorpsAsync(const Model::ListCorpsRequest& request, const ListCorpsAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context = nullptr) const;
ListCorpsOutcomeCallable listCorpsCallable(const Model::ListCorpsRequest& request) const;
ListDeviceGroupsOutcome listDeviceGroups(const Model::ListDeviceGroupsRequest &request)const;
void listDeviceGroupsAsync(const Model::ListDeviceGroupsRequest& request, const ListDeviceGroupsAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context = nullptr) const;
ListDeviceGroupsOutcomeCallable listDeviceGroupsCallable(const Model::ListDeviceGroupsRequest& request) const;
ListDevicesOutcome listDevices(const Model::ListDevicesRequest &request)const;
void listDevicesAsync(const Model::ListDevicesRequest& request, const ListDevicesAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context = nullptr) const;
ListDevicesOutcomeCallable listDevicesCallable(const Model::ListDevicesRequest& request) const;

View File

@@ -41,8 +41,18 @@ namespace AlibabaCloud
void setCorpId(const std::string& corpId);
std::string getDescription()const;
void setDescription(const std::string& description);
std::string getNotifierAppSecret()const;
void setNotifierAppSecret(const std::string& notifierAppSecret);
std::string getNotifierExtendValues()const;
void setNotifierExtendValues(const std::string& notifierExtendValues);
std::string getNotifierUrl()const;
void setNotifierUrl(const std::string& notifierUrl);
std::string getNotifierType()const;
void setNotifierType(const std::string& notifierType);
int getBatchIndicator()const;
void setBatchIndicator(int batchIndicator);
int getNotifierTimeOut()const;
void setNotifierTimeOut(int notifierTimeOut);
std::string getAlgorithmVendor()const;
void setAlgorithmVendor(const std::string& algorithmVendor);
@@ -50,7 +60,12 @@ namespace AlibabaCloud
std::string monitorType_;
std::string corpId_;
std::string description_;
std::string notifierAppSecret_;
std::string notifierExtendValues_;
std::string notifierUrl_;
std::string notifierType_;
int batchIndicator_;
int notifierTimeOut_;
std::string algorithmVendor_;
};

View File

@@ -43,6 +43,8 @@ namespace AlibabaCloud
void setParentCorpId(const std::string& parentCorpId);
std::string getDescription()const;
void setDescription(const std::string& description);
std::string getIconPath()const;
void setIconPath(const std::string& iconPath);
std::string getAppName()const;
void setAppName(const std::string& appName);
std::string getCorpName()const;
@@ -53,6 +55,7 @@ namespace AlibabaCloud
std::string isvSubId_;
std::string parentCorpId_;
std::string description_;
std::string iconPath_;
std::string appName_;
std::string corpName_;

View File

@@ -36,11 +36,13 @@ namespace AlibabaCloud
{
struct Record
{
std::string iconPath;
std::string corpId;
std::string description;
std::string parentCorpId;
std::string isvSubId;
std::string createDate;
int acuUsed;
std::string corpName;
std::string appName;
int deviceCount;

View File

@@ -0,0 +1,66 @@
/*
* Copyright 2009-2017 Alibaba Cloud All rights reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#ifndef ALIBABACLOUD_VCS_MODEL_LISTDEVICEGROUPSREQUEST_H_
#define ALIBABACLOUD_VCS_MODEL_LISTDEVICEGROUPSREQUEST_H_
#include <string>
#include <vector>
#include <alibabacloud/core/RpcServiceRequest.h>
#include <alibabacloud/vcs/VcsExport.h>
namespace AlibabaCloud
{
namespace Vcs
{
namespace Model
{
class ALIBABACLOUD_VCS_EXPORT ListDeviceGroupsRequest : public RpcServiceRequest
{
public:
ListDeviceGroupsRequest();
~ListDeviceGroupsRequest();
int getIsPage()const;
void setIsPage(int isPage);
int getPageNum()const;
void setPageNum(int pageNum);
std::string getCorpIdList()const;
void setCorpIdList(const std::string& corpIdList);
std::string getDeviceCodeList()const;
void setDeviceCodeList(const std::string& deviceCodeList);
std::string getName()const;
void setName(const std::string& name);
int getPageSize()const;
void setPageSize(int pageSize);
std::string getGroup()const;
void setGroup(const std::string& group);
private:
int isPage_;
int pageNum_;
std::string corpIdList_;
std::string deviceCodeList_;
std::string name_;
int pageSize_;
std::string group_;
};
}
}
}
#endif // !ALIBABACLOUD_VCS_MODEL_LISTDEVICEGROUPSREQUEST_H_

View File

@@ -0,0 +1,73 @@
/*
* Copyright 2009-2017 Alibaba Cloud All rights reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#ifndef ALIBABACLOUD_VCS_MODEL_LISTDEVICEGROUPSRESULT_H_
#define ALIBABACLOUD_VCS_MODEL_LISTDEVICEGROUPSRESULT_H_
#include <string>
#include <vector>
#include <utility>
#include <alibabacloud/core/ServiceResult.h>
#include <alibabacloud/vcs/VcsExport.h>
namespace AlibabaCloud
{
namespace Vcs
{
namespace Model
{
class ALIBABACLOUD_VCS_EXPORT ListDeviceGroupsResult : public ServiceResult
{
public:
struct DataItem
{
struct ListItem
{
std::string codingFormat;
std::string installAddress;
std::string regionName;
std::string dataSourceType;
std::string deviceGroup;
std::string deviceCode;
std::string regionId;
std::string bitRate;
std::string resolvingPower;
std::string deviceName;
};
std::string totalCount;
std::vector<DataItem::ListItem> list;
};
ListDeviceGroupsResult();
explicit ListDeviceGroupsResult(const std::string &payload);
~ListDeviceGroupsResult();
std::string getMessage()const;
std::vector<DataItem> getData()const;
std::string getCode()const;
protected:
void parse(const std::string &payload);
private:
std::string message_;
std::vector<DataItem> data_;
std::string code_;
};
}
}
}
#endif // !ALIBABACLOUD_VCS_MODEL_LISTDEVICEGROUPSRESULT_H_

View File

@@ -35,43 +35,40 @@ namespace AlibabaCloud
SearchObjectRequest();
~SearchObjectRequest();
std::string getAlgorithmType()const;
void setAlgorithmType(const std::string& algorithmType);
std::string getCorpId()const;
void setCorpId(const std::string& corpId);
long getEndTime()const;
void setEndTime(long endTime);
long getStartTime()const;
void setStartTime(long startTime);
int getPageNumber()const;
void setPageNumber(int pageNumber);
std::string getPicContent()const;
void setPicContent(const std::string& picContent);
int getPageSize()const;
void setPageSize(int pageSize);
std::string getObjectType()const;
void setObjectType(const std::string& objectType);
std::string getAlgorithmType()const;
void setAlgorithmType(const std::string& algorithmType);
long getEndTime()const;
void setEndTime(long endTime);
std::map<std::string, std::string> getDeviceList()const;
void setDeviceList(const std::map<std::string, std::string>& deviceList);
std::string getPicUrl()const;
void setPicUrl(const std::string& picUrl);
std::string getImagePath()const;
void setImagePath(const std::string& imagePath);
int getPageSize()const;
void setPageSize(int pageSize);
std::string getObjectType()const;
void setObjectType(const std::string& objectType);
std::string getConditions()const;
void setConditions(const std::string& conditions);
private:
std::string algorithmType_;
std::string corpId_;
long endTime_;
long startTime_;
int pageNumber_;
std::string picContent_;
int pageSize_;
std::string objectType_;
std::string algorithmType_;
long endTime_;
std::map<std::string, std::string> deviceList_;
std::string picUrl_;
std::string imagePath_;
int pageSize_;
std::string objectType_;
std::string conditions_;
};

View File

@@ -43,6 +43,8 @@ namespace AlibabaCloud
void setParentCorpId(const std::string& parentCorpId);
std::string getDescription()const;
void setDescription(const std::string& description);
std::string getIconPath()const;
void setIconPath(const std::string& iconPath);
std::string getAppName()const;
void setAppName(const std::string& appName);
std::string getCorpName()const;
@@ -53,6 +55,7 @@ namespace AlibabaCloud
std::string corpId_;
std::string parentCorpId_;
std::string description_;
std::string iconPath_;
std::string appName_;
std::string corpName_;

View File

@@ -49,6 +49,8 @@ namespace AlibabaCloud
void setAttributeOperateType(const std::string& attributeOperateType);
std::string getRuleExpression()const;
void setRuleExpression(const std::string& ruleExpression);
int getNotifierTimeOut()const;
void setNotifierTimeOut(int notifierTimeOut);
std::string getTaskId()const;
void setTaskId(const std::string& taskId);
std::string getDeviceOperateType()const;
@@ -57,8 +59,16 @@ namespace AlibabaCloud
void setPicList(const std::string& picList);
std::string getAttributeValueList()const;
void setAttributeValueList(const std::string& attributeValueList);
std::string getNotifierAppSecret()const;
void setNotifierAppSecret(const std::string& notifierAppSecret);
std::string getNotifierExtendValues()const;
void setNotifierExtendValues(const std::string& notifierExtendValues);
std::string getDeviceList()const;
void setDeviceList(const std::string& deviceList);
std::string getNotifierUrl()const;
void setNotifierUrl(const std::string& notifierUrl);
std::string getNotifierType()const;
void setNotifierType(const std::string& notifierType);
std::string getAlgorithmVendor()const;
void setAlgorithmVendor(const std::string& algorithmVendor);
@@ -70,11 +80,16 @@ namespace AlibabaCloud
std::string attributeName_;
std::string attributeOperateType_;
std::string ruleExpression_;
int notifierTimeOut_;
std::string taskId_;
std::string deviceOperateType_;
std::string picList_;
std::string attributeValueList_;
std::string notifierAppSecret_;
std::string notifierExtendValues_;
std::string deviceList_;
std::string notifierUrl_;
std::string notifierType_;
std::string algorithmVendor_;
};

View File

@@ -1707,6 +1707,42 @@ VcsClient::ListCorpsOutcomeCallable VcsClient::listCorpsCallable(const ListCorps
return task->get_future();
}
VcsClient::ListDeviceGroupsOutcome VcsClient::listDeviceGroups(const ListDeviceGroupsRequest &request) const
{
auto endpointOutcome = endpointProvider_->getEndpoint();
if (!endpointOutcome.isSuccess())
return ListDeviceGroupsOutcome(endpointOutcome.error());
auto outcome = makeRequest(endpointOutcome.result(), request);
if (outcome.isSuccess())
return ListDeviceGroupsOutcome(ListDeviceGroupsResult(outcome.result()));
else
return ListDeviceGroupsOutcome(outcome.error());
}
void VcsClient::listDeviceGroupsAsync(const ListDeviceGroupsRequest& request, const ListDeviceGroupsAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context) const
{
auto fn = [this, request, handler, context]()
{
handler(this, request, listDeviceGroups(request), context);
};
asyncExecute(new Runnable(fn));
}
VcsClient::ListDeviceGroupsOutcomeCallable VcsClient::listDeviceGroupsCallable(const ListDeviceGroupsRequest &request) const
{
auto task = std::make_shared<std::packaged_task<ListDeviceGroupsOutcome()>>(
[this, request]()
{
return this->listDeviceGroups(request);
});
asyncExecute(new Runnable([task]() { (*task)(); }));
return task->get_future();
}
VcsClient::ListDevicesOutcome VcsClient::listDevices(const ListDevicesRequest &request) const
{
auto endpointOutcome = endpointProvider_->getEndpoint();

View File

@@ -60,6 +60,50 @@ void AddMonitorRequest::setDescription(const std::string& description)
setBodyParameter("Description", description);
}
std::string AddMonitorRequest::getNotifierAppSecret()const
{
return notifierAppSecret_;
}
void AddMonitorRequest::setNotifierAppSecret(const std::string& notifierAppSecret)
{
notifierAppSecret_ = notifierAppSecret;
setBodyParameter("NotifierAppSecret", notifierAppSecret);
}
std::string AddMonitorRequest::getNotifierExtendValues()const
{
return notifierExtendValues_;
}
void AddMonitorRequest::setNotifierExtendValues(const std::string& notifierExtendValues)
{
notifierExtendValues_ = notifierExtendValues;
setBodyParameter("NotifierExtendValues", notifierExtendValues);
}
std::string AddMonitorRequest::getNotifierUrl()const
{
return notifierUrl_;
}
void AddMonitorRequest::setNotifierUrl(const std::string& notifierUrl)
{
notifierUrl_ = notifierUrl;
setBodyParameter("NotifierUrl", notifierUrl);
}
std::string AddMonitorRequest::getNotifierType()const
{
return notifierType_;
}
void AddMonitorRequest::setNotifierType(const std::string& notifierType)
{
notifierType_ = notifierType;
setBodyParameter("NotifierType", notifierType);
}
int AddMonitorRequest::getBatchIndicator()const
{
return batchIndicator_;
@@ -71,6 +115,17 @@ void AddMonitorRequest::setBatchIndicator(int batchIndicator)
setBodyParameter("BatchIndicator", std::to_string(batchIndicator));
}
int AddMonitorRequest::getNotifierTimeOut()const
{
return notifierTimeOut_;
}
void AddMonitorRequest::setNotifierTimeOut(int notifierTimeOut)
{
notifierTimeOut_ = notifierTimeOut;
setBodyParameter("NotifierTimeOut", std::to_string(notifierTimeOut));
}
std::string AddMonitorRequest::getAlgorithmVendor()const
{
return algorithmVendor_;

View File

@@ -71,6 +71,17 @@ void CreateCorpRequest::setDescription(const std::string& description)
setBodyParameter("Description", description);
}
std::string CreateCorpRequest::getIconPath()const
{
return iconPath_;
}
void CreateCorpRequest::setIconPath(const std::string& iconPath)
{
iconPath_ = iconPath;
setBodyParameter("IconPath", iconPath);
}
std::string CreateCorpRequest::getAppName()const
{
return appName_;

View File

@@ -68,6 +68,10 @@ void ListCorpsResult::parse(const std::string &payload)
recordObject.deviceCount = std::stoi(dataNodeRecordsRecord["DeviceCount"].asString());
if(!dataNodeRecordsRecord["IsvSubId"].isNull())
recordObject.isvSubId = dataNodeRecordsRecord["IsvSubId"].asString();
if(!dataNodeRecordsRecord["AcuUsed"].isNull())
recordObject.acuUsed = std::stoi(dataNodeRecordsRecord["AcuUsed"].asString());
if(!dataNodeRecordsRecord["IconPath"].isNull())
recordObject.iconPath = dataNodeRecordsRecord["IconPath"].asString();
data_.records.push_back(recordObject);
}
if(!value["Code"].isNull())

View File

@@ -0,0 +1,106 @@
/*
* 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/vcs/model/ListDeviceGroupsRequest.h>
using AlibabaCloud::Vcs::Model::ListDeviceGroupsRequest;
ListDeviceGroupsRequest::ListDeviceGroupsRequest() :
RpcServiceRequest("vcs", "2020-05-15", "ListDeviceGroups")
{
setMethod(HttpRequest::Method::Post);
}
ListDeviceGroupsRequest::~ListDeviceGroupsRequest()
{}
int ListDeviceGroupsRequest::getIsPage()const
{
return isPage_;
}
void ListDeviceGroupsRequest::setIsPage(int isPage)
{
isPage_ = isPage;
setBodyParameter("IsPage", std::to_string(isPage));
}
int ListDeviceGroupsRequest::getPageNum()const
{
return pageNum_;
}
void ListDeviceGroupsRequest::setPageNum(int pageNum)
{
pageNum_ = pageNum;
setBodyParameter("PageNum", std::to_string(pageNum));
}
std::string ListDeviceGroupsRequest::getCorpIdList()const
{
return corpIdList_;
}
void ListDeviceGroupsRequest::setCorpIdList(const std::string& corpIdList)
{
corpIdList_ = corpIdList;
setBodyParameter("CorpIdList", corpIdList);
}
std::string ListDeviceGroupsRequest::getDeviceCodeList()const
{
return deviceCodeList_;
}
void ListDeviceGroupsRequest::setDeviceCodeList(const std::string& deviceCodeList)
{
deviceCodeList_ = deviceCodeList;
setBodyParameter("DeviceCodeList", deviceCodeList);
}
std::string ListDeviceGroupsRequest::getName()const
{
return name_;
}
void ListDeviceGroupsRequest::setName(const std::string& name)
{
name_ = name;
setBodyParameter("Name", name);
}
int ListDeviceGroupsRequest::getPageSize()const
{
return pageSize_;
}
void ListDeviceGroupsRequest::setPageSize(int pageSize)
{
pageSize_ = pageSize;
setBodyParameter("PageSize", std::to_string(pageSize));
}
std::string ListDeviceGroupsRequest::getGroup()const
{
return group_;
}
void ListDeviceGroupsRequest::setGroup(const std::string& group)
{
group_ = group;
setBodyParameter("Group", group);
}

View File

@@ -0,0 +1,97 @@
/*
* 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/vcs/model/ListDeviceGroupsResult.h>
#include <json/json.h>
using namespace AlibabaCloud::Vcs;
using namespace AlibabaCloud::Vcs::Model;
ListDeviceGroupsResult::ListDeviceGroupsResult() :
ServiceResult()
{}
ListDeviceGroupsResult::ListDeviceGroupsResult(const std::string &payload) :
ServiceResult()
{
parse(payload);
}
ListDeviceGroupsResult::~ListDeviceGroupsResult()
{}
void ListDeviceGroupsResult::parse(const std::string &payload)
{
Json::Reader reader;
Json::Value value;
reader.parse(payload, value);
setRequestId(value["RequestId"].asString());
auto allDataNode = value["Data"]["DataItem"];
for (auto valueDataDataItem : allDataNode)
{
DataItem dataObject;
if(!valueDataDataItem["TotalCount"].isNull())
dataObject.totalCount = valueDataDataItem["TotalCount"].asString();
auto allListNode = allDataNode["List"]["ListItem"];
for (auto allDataNodeListListItem : allListNode)
{
DataItem::ListItem listObject;
if(!allDataNodeListListItem["DeviceGroup"].isNull())
listObject.deviceGroup = allDataNodeListListItem["DeviceGroup"].asString();
if(!allDataNodeListListItem["DeviceName"].isNull())
listObject.deviceName = allDataNodeListListItem["DeviceName"].asString();
if(!allDataNodeListListItem["DeviceCode"].isNull())
listObject.deviceCode = allDataNodeListListItem["DeviceCode"].asString();
if(!allDataNodeListListItem["BitRate"].isNull())
listObject.bitRate = allDataNodeListListItem["BitRate"].asString();
if(!allDataNodeListListItem["CodingFormat"].isNull())
listObject.codingFormat = allDataNodeListListItem["CodingFormat"].asString();
if(!allDataNodeListListItem["ResolvingPower"].isNull())
listObject.resolvingPower = allDataNodeListListItem["ResolvingPower"].asString();
if(!allDataNodeListListItem["DataSourceType"].isNull())
listObject.dataSourceType = allDataNodeListListItem["DataSourceType"].asString();
if(!allDataNodeListListItem["RegionName"].isNull())
listObject.regionName = allDataNodeListListItem["RegionName"].asString();
if(!allDataNodeListListItem["RegionId"].isNull())
listObject.regionId = allDataNodeListListItem["RegionId"].asString();
if(!allDataNodeListListItem["InstallAddress"].isNull())
listObject.installAddress = allDataNodeListListItem["InstallAddress"].asString();
dataObject.list.push_back(listObject);
}
data_.push_back(dataObject);
}
if(!value["Code"].isNull())
code_ = value["Code"].asString();
if(!value["Message"].isNull())
message_ = value["Message"].asString();
}
std::string ListDeviceGroupsResult::getMessage()const
{
return message_;
}
std::vector<ListDeviceGroupsResult::DataItem> ListDeviceGroupsResult::getData()const
{
return data_;
}
std::string ListDeviceGroupsResult::getCode()const
{
return code_;
}

View File

@@ -27,6 +27,17 @@ SearchObjectRequest::SearchObjectRequest() :
SearchObjectRequest::~SearchObjectRequest()
{}
std::string SearchObjectRequest::getAlgorithmType()const
{
return algorithmType_;
}
void SearchObjectRequest::setAlgorithmType(const std::string& algorithmType)
{
algorithmType_ = algorithmType;
setBodyParameter("AlgorithmType", algorithmType);
}
std::string SearchObjectRequest::getCorpId()const
{
return corpId_;
@@ -38,6 +49,17 @@ void SearchObjectRequest::setCorpId(const std::string& corpId)
setBodyParameter("CorpId", corpId);
}
long SearchObjectRequest::getEndTime()const
{
return endTime_;
}
void SearchObjectRequest::setEndTime(long endTime)
{
endTime_ = endTime;
setBodyParameter("EndTime", std::to_string(endTime));
}
long SearchObjectRequest::getStartTime()const
{
return startTime_;
@@ -60,61 +82,6 @@ void SearchObjectRequest::setPageNumber(int pageNumber)
setBodyParameter("PageNumber", std::to_string(pageNumber));
}
std::string SearchObjectRequest::getPicContent()const
{
return picContent_;
}
void SearchObjectRequest::setPicContent(const std::string& picContent)
{
picContent_ = picContent;
setBodyParameter("PicContent", picContent);
}
int SearchObjectRequest::getPageSize()const
{
return pageSize_;
}
void SearchObjectRequest::setPageSize(int pageSize)
{
pageSize_ = pageSize;
setBodyParameter("PageSize", std::to_string(pageSize));
}
std::string SearchObjectRequest::getObjectType()const
{
return objectType_;
}
void SearchObjectRequest::setObjectType(const std::string& objectType)
{
objectType_ = objectType;
setBodyParameter("ObjectType", objectType);
}
std::string SearchObjectRequest::getAlgorithmType()const
{
return algorithmType_;
}
void SearchObjectRequest::setAlgorithmType(const std::string& algorithmType)
{
algorithmType_ = algorithmType;
setBodyParameter("AlgorithmType", algorithmType);
}
long SearchObjectRequest::getEndTime()const
{
return endTime_;
}
void SearchObjectRequest::setEndTime(long endTime)
{
endTime_ = endTime;
setBodyParameter("EndTime", std::to_string(endTime));
}
std::map<std::string, std::string> SearchObjectRequest::getDeviceList()const
{
return deviceList_;
@@ -148,6 +115,28 @@ void SearchObjectRequest::setImagePath(const std::string& imagePath)
setBodyParameter("ImagePath", imagePath);
}
int SearchObjectRequest::getPageSize()const
{
return pageSize_;
}
void SearchObjectRequest::setPageSize(int pageSize)
{
pageSize_ = pageSize;
setBodyParameter("PageSize", std::to_string(pageSize));
}
std::string SearchObjectRequest::getObjectType()const
{
return objectType_;
}
void SearchObjectRequest::setObjectType(const std::string& objectType)
{
objectType_ = objectType;
setBodyParameter("ObjectType", objectType);
}
std::string SearchObjectRequest::getConditions()const
{
return conditions_;

View File

@@ -71,6 +71,17 @@ void UpdateCorpRequest::setDescription(const std::string& description)
setBodyParameter("Description", description);
}
std::string UpdateCorpRequest::getIconPath()const
{
return iconPath_;
}
void UpdateCorpRequest::setIconPath(const std::string& iconPath)
{
iconPath_ = iconPath;
setBodyParameter("IconPath", iconPath);
}
std::string UpdateCorpRequest::getAppName()const
{
return appName_;

View File

@@ -104,6 +104,17 @@ void UpdateMonitorRequest::setRuleExpression(const std::string& ruleExpression)
setBodyParameter("RuleExpression", ruleExpression);
}
int UpdateMonitorRequest::getNotifierTimeOut()const
{
return notifierTimeOut_;
}
void UpdateMonitorRequest::setNotifierTimeOut(int notifierTimeOut)
{
notifierTimeOut_ = notifierTimeOut;
setBodyParameter("NotifierTimeOut", std::to_string(notifierTimeOut));
}
std::string UpdateMonitorRequest::getTaskId()const
{
return taskId_;
@@ -148,6 +159,28 @@ void UpdateMonitorRequest::setAttributeValueList(const std::string& attributeVal
setBodyParameter("AttributeValueList", attributeValueList);
}
std::string UpdateMonitorRequest::getNotifierAppSecret()const
{
return notifierAppSecret_;
}
void UpdateMonitorRequest::setNotifierAppSecret(const std::string& notifierAppSecret)
{
notifierAppSecret_ = notifierAppSecret;
setBodyParameter("NotifierAppSecret", notifierAppSecret);
}
std::string UpdateMonitorRequest::getNotifierExtendValues()const
{
return notifierExtendValues_;
}
void UpdateMonitorRequest::setNotifierExtendValues(const std::string& notifierExtendValues)
{
notifierExtendValues_ = notifierExtendValues;
setBodyParameter("NotifierExtendValues", notifierExtendValues);
}
std::string UpdateMonitorRequest::getDeviceList()const
{
return deviceList_;
@@ -159,6 +192,28 @@ void UpdateMonitorRequest::setDeviceList(const std::string& deviceList)
setBodyParameter("DeviceList", deviceList);
}
std::string UpdateMonitorRequest::getNotifierUrl()const
{
return notifierUrl_;
}
void UpdateMonitorRequest::setNotifierUrl(const std::string& notifierUrl)
{
notifierUrl_ = notifierUrl;
setBodyParameter("NotifierUrl", notifierUrl);
}
std::string UpdateMonitorRequest::getNotifierType()const
{
return notifierType_;
}
void UpdateMonitorRequest::setNotifierType(const std::string& notifierType)
{
notifierType_ = notifierType;
setBodyParameter("NotifierType", notifierType);
}
std::string UpdateMonitorRequest::getAlgorithmVendor()const
{
return algorithmVendor_;