RateBasedRule.fromJson constructor
RateBasedRule.fromJson(
- Map<String, dynamic> json
)
Implementation
factory RateBasedRule.fromJson(Map<String, dynamic> json) {
return RateBasedRule(
matchPredicates: (json['MatchPredicates'] as List)
.whereNotNull()
.map((e) => Predicate.fromJson(e as Map<String, dynamic>))
.toList(),
rateKey: (json['RateKey'] as String).toRateKey(),
rateLimit: json['RateLimit'] as int,
ruleId: json['RuleId'] as String,
metricName: json['MetricName'] as String?,
name: json['Name'] as String?,
);
}