Edit ListRetcodeApps.
This commit is contained in:
@@ -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());
|
||||
|
||||
@@ -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);
|
||||
}
|
||||
|
||||
|
||||
@@ -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();
|
||||
|
||||
@@ -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);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user