ActivatedRule.fromJson constructor
ActivatedRule.fromJson(
- Map<String, dynamic> json
)
Implementation
factory ActivatedRule.fromJson(Map<String, dynamic> json) {
return ActivatedRule(
priority: json['Priority'] as int,
ruleId: json['RuleId'] as String,
action: json['Action'] != null
? WafAction.fromJson(json['Action'] as Map<String, dynamic>)
: null,
excludedRules: (json['ExcludedRules'] as List?)
?.whereNotNull()
.map((e) => ExcludedRule.fromJson(e as Map<String, dynamic>))
.toList(),
overrideAction: json['OverrideAction'] != null
? WafOverrideAction.fromJson(
json['OverrideAction'] as Map<String, dynamic>)
: null,
type: (json['Type'] as String?)?.toWafRuleType(),
);
}