in src/Cms/V20190101/CmsApiResolver.php [4872:4995]
public function withRules(array $rules)
{
$this->data['Rules'] = $rules;
foreach ($rules as $depth1 => $depth1Value) {
if(isset($depth1Value['Webhook'])){
$this->options['query']['Rules.' . ($depth1 + 1) . '.Webhook'] = $depth1Value['Webhook'];
}
if(isset($depth1Value['EscalationsWarnComparisonOperator'])){
$this->options['query']['Rules.' . ($depth1 + 1) . '.Escalations.Warn.ComparisonOperator'] = $depth1Value['EscalationsWarnComparisonOperator'];
}
if(isset($depth1Value['DynamicAlertSensitivity'])){
$this->options['query']['Rules.' . ($depth1 + 1) . '.DynamicAlertSensitivity'] = $depth1Value['DynamicAlertSensitivity'];
}
if(isset($depth1Value['RuleName'])){
$this->options['query']['Rules.' . ($depth1 + 1) . '.RuleName'] = $depth1Value['RuleName'];
}
if(isset($depth1Value['EscalationsInfoStatistics'])){
$this->options['query']['Rules.' . ($depth1 + 1) . '.Escalations.Info.Statistics'] = $depth1Value['EscalationsInfoStatistics'];
}
if(isset($depth1Value['EffectiveInterval'])){
$this->options['query']['Rules.' . ($depth1 + 1) . '.EffectiveInterval'] = $depth1Value['EffectiveInterval'];
}
if(isset($depth1Value['DynamicAlertHistoryDataRange'])){
$this->options['query']['Rules.' . ($depth1 + 1) . '.DynamicAlertHistoryDataRange'] = $depth1Value['DynamicAlertHistoryDataRange'];
}
if(isset($depth1Value['EscalationsWarnPreCondition'])){
$this->options['query']['Rules.' . ($depth1 + 1) . '.Escalations.Warn.PreCondition'] = $depth1Value['EscalationsWarnPreCondition'];
}
if(isset($depth1Value['EscalationsInfoComparisonOperator'])){
$this->options['query']['Rules.' . ($depth1 + 1) . '.Escalations.Info.ComparisonOperator'] = $depth1Value['EscalationsInfoComparisonOperator'];
}
if(isset($depth1Value['NoDataPolicy'])){
$this->options['query']['Rules.' . ($depth1 + 1) . '.NoDataPolicy'] = $depth1Value['NoDataPolicy'];
}
if(isset($depth1Value['NoEffectiveInterval'])){
$this->options['query']['Rules.' . ($depth1 + 1) . '.NoEffectiveInterval'] = $depth1Value['NoEffectiveInterval'];
}
if(isset($depth1Value['EmailSubject'])){
$this->options['query']['Rules.' . ($depth1 + 1) . '.EmailSubject'] = $depth1Value['EmailSubject'];
}
if(isset($depth1Value['Options'])){
$this->options['query']['Rules.' . ($depth1 + 1) . '.Options'] = $depth1Value['Options'];
}
if(isset($depth1Value['SilenceTime'])){
$this->options['query']['Rules.' . ($depth1 + 1) . '.SilenceTime'] = $depth1Value['SilenceTime'];
}
if(isset($depth1Value['Prometheus'])){
$this->options['query']['Rules.' . ($depth1 + 1) . '.Prometheus'] = $depth1Value['Prometheus'];
}
if(isset($depth1Value['EscalationsInfoPreCondition'])){
$this->options['query']['Rules.' . ($depth1 + 1) . '.Escalations.Info.PreCondition'] = $depth1Value['EscalationsInfoPreCondition'];
}
if(isset($depth1Value['MetricName'])){
$this->options['query']['Rules.' . ($depth1 + 1) . '.MetricName'] = $depth1Value['MetricName'];
}
if(isset($depth1Value['EscalationsWarnTimes'])){
$this->options['query']['Rules.' . ($depth1 + 1) . '.Escalations.Warn.Times'] = $depth1Value['EscalationsWarnTimes'];
}
if(isset($depth1Value['CompositeExpression'])){
$this->options['query']['Rules.' . ($depth1 + 1) . '.CompositeExpression'] = $depth1Value['CompositeExpression'];
}
if(isset($depth1Value['EscalationsWarnThreshold'])){
$this->options['query']['Rules.' . ($depth1 + 1) . '.Escalations.Warn.Threshold'] = $depth1Value['EscalationsWarnThreshold'];
}
if(isset($depth1Value['Period'])){
$this->options['query']['Rules.' . ($depth1 + 1) . '.Period'] = $depth1Value['Period'];
}
if(isset($depth1Value['ContactGroups'])){
$this->options['query']['Rules.' . ($depth1 + 1) . '.ContactGroups'] = $depth1Value['ContactGroups'];
}
if(isset($depth1Value['EscalationsCriticalStatistics'])){
$this->options['query']['Rules.' . ($depth1 + 1) . '.Escalations.Critical.Statistics'] = $depth1Value['EscalationsCriticalStatistics'];
}
if(isset($depth1Value['RuleType'])){
$this->options['query']['Rules.' . ($depth1 + 1) . '.RuleType'] = $depth1Value['RuleType'];
}
if(isset($depth1Value['GroupId'])){
$this->options['query']['Rules.' . ($depth1 + 1) . '.GroupId'] = $depth1Value['GroupId'];
}
if(isset($depth1Value['EscalationsInfoTimes'])){
$this->options['query']['Rules.' . ($depth1 + 1) . '.Escalations.Info.Times'] = $depth1Value['EscalationsInfoTimes'];
}
if(isset($depth1Value['Resources'])){
$this->options['query']['Rules.' . ($depth1 + 1) . '.Resources'] = $depth1Value['Resources'];
}
foreach ($depth1Value['Labels'] as $depth2 => $depth2Value) {
if(isset($depth2Value['Value'])){
$this->options['query']['Rules.' . ($depth1 + 1) . '.Labels.' . ($depth2 + 1) . '.Value'] = $depth2Value['Value'];
}
if(isset($depth2Value['Key'])){
$this->options['query']['Rules.' . ($depth1 + 1) . '.Labels.' . ($depth2 + 1) . '.Key'] = $depth2Value['Key'];
}
}
if(isset($depth1Value['EscalationsCriticalTimes'])){
$this->options['query']['Rules.' . ($depth1 + 1) . '.Escalations.Critical.Times'] = $depth1Value['EscalationsCriticalTimes'];
}
if(isset($depth1Value['EscalationsInfoThreshold'])){
$this->options['query']['Rules.' . ($depth1 + 1) . '.Escalations.Info.Threshold'] = $depth1Value['EscalationsInfoThreshold'];
}
if(isset($depth1Value['EscalationsWarnStatistics'])){
$this->options['query']['Rules.' . ($depth1 + 1) . '.Escalations.Warn.Statistics'] = $depth1Value['EscalationsWarnStatistics'];
}
if(isset($depth1Value['Namespace'])){
$this->options['query']['Rules.' . ($depth1 + 1) . '.Namespace'] = $depth1Value['Namespace'];
}
if(isset($depth1Value['Interval'])){
$this->options['query']['Rules.' . ($depth1 + 1) . '.Interval'] = $depth1Value['Interval'];
}
if(isset($depth1Value['RuleId'])){
$this->options['query']['Rules.' . ($depth1 + 1) . '.RuleId'] = $depth1Value['RuleId'];
}
if(isset($depth1Value['EscalationsCriticalComparisonOperator'])){
$this->options['query']['Rules.' . ($depth1 + 1) . '.Escalations.Critical.ComparisonOperator'] = $depth1Value['EscalationsCriticalComparisonOperator'];
}
if(isset($depth1Value['EscalationsCriticalPreCondition'])){
$this->options['query']['Rules.' . ($depth1 + 1) . '.Escalations.Critical.PreCondition'] = $depth1Value['EscalationsCriticalPreCondition'];
}
if(isset($depth1Value['EscalationsCriticalThreshold'])){
$this->options['query']['Rules.' . ($depth1 + 1) . '.Escalations.Critical.Threshold'] = $depth1Value['EscalationsCriticalThreshold'];
}
}
return $this;
}