Edit ListRetcodeApps.

This commit is contained in:
sdk-team
2021-06-28 12:08:51 +00:00
parent ec69dc6bc1
commit f3e060235c
10 changed files with 23 additions and 1 deletions

View File

@@ -46,6 +46,10 @@ void DescribeDispatchRuleResult::parse(const std::string &payload)
dispatchRule_.name = dispatchRuleNode["Name"].asString();
if(!dispatchRuleNode["State"].isNull())
dispatchRule_.state = dispatchRuleNode["State"].asString();
if(!dispatchRuleNode["DispatchType"].isNull())
dispatchRule_.dispatchType = dispatchRuleNode["DispatchType"].asString();
if(!dispatchRuleNode["IsRecover"].isNull())
dispatchRule_.isRecover = dispatchRuleNode["IsRecover"].asString() == "true";
auto allGroupRulesNode = dispatchRuleNode["GroupRules"]["GroupRule"];
for (auto dispatchRuleNodeGroupRulesGroupRule : allGroupRulesNode)
{
@@ -56,6 +60,8 @@ void DescribeDispatchRuleResult::parse(const std::string &payload)
groupRuleObject.groupWaitTime = std::stol(dispatchRuleNodeGroupRulesGroupRule["GroupWaitTime"].asString());
if(!dispatchRuleNodeGroupRulesGroupRule["GroupInterval"].isNull())
groupRuleObject.groupInterval = std::stol(dispatchRuleNodeGroupRulesGroupRule["GroupInterval"].asString());
if(!dispatchRuleNodeGroupRulesGroupRule["RepeatInterval"].isNull())
groupRuleObject.repeatInterval = std::stol(dispatchRuleNodeGroupRulesGroupRule["RepeatInterval"].asString());
auto allGroupingFields = value["GroupingFields"]["GroupingField"];
for (auto value : allGroupingFields)
groupRuleObject.groupingFields.push_back(value.asString());

View File

@@ -49,6 +49,8 @@ void ListRetcodeAppsResult::parse(const std::string &payload)
retcodeAppsObject.pid = valueRetcodeAppsRetcodeApp["Pid"].asString();
if(!valueRetcodeAppsRetcodeApp["AppName"].isNull())
retcodeAppsObject.appName = valueRetcodeAppsRetcodeApp["AppName"].asString();
if(!valueRetcodeAppsRetcodeApp["RetcodeAppType"].isNull())
retcodeAppsObject.retcodeAppType = valueRetcodeAppsRetcodeApp["RetcodeAppType"].asString();
retcodeApps_.push_back(retcodeAppsObject);
}

View File

@@ -82,6 +82,8 @@ void SearchAlertRulesResult::parse(const std::string &payload)
alertRuleEntityObject.title = pageBeanNodeAlertRulesAlertRuleEntity["Title"].asString();
if(!pageBeanNodeAlertRulesAlertRuleEntity["ContactGroupIds"].isNull())
alertRuleEntityObject.contactGroupIds = pageBeanNodeAlertRulesAlertRuleEntity["ContactGroupIds"].asString();
if(!pageBeanNodeAlertRulesAlertRuleEntity["HostByAlertManager"].isNull())
alertRuleEntityObject.hostByAlertManager = pageBeanNodeAlertRulesAlertRuleEntity["HostByAlertManager"].asString() == "true";
auto alarmContextNode = value["AlarmContext"];
if(!alarmContextNode["AlarmContentTemplate"].isNull())
alertRuleEntityObject.alarmContext.alarmContentTemplate = alarmContextNode["AlarmContentTemplate"].asString();

View File

@@ -66,6 +66,8 @@ void SearchRetcodeAppByPageResult::parse(const std::string &payload)
retcodeAppObject.createTime = std::stol(pageBeanNodeRetcodeAppsRetcodeApp["CreateTime"].asString());
if(!pageBeanNodeRetcodeAppsRetcodeApp["UpdateTime"].isNull())
retcodeAppObject.updateTime = std::stol(pageBeanNodeRetcodeAppsRetcodeApp["UpdateTime"].asString());
if(!pageBeanNodeRetcodeAppsRetcodeApp["RetcodeAppType"].isNull())
retcodeAppObject.retcodeAppType = pageBeanNodeRetcodeAppsRetcodeApp["RetcodeAppType"].asString();
pageBean_.retcodeApps.push_back(retcodeAppObject);
}