toJson method

Map<String, Object?> toJson()

Implementation

Map<String, Object?> toJson() {
  final conditions = this.conditions;
  final pattern = this.pattern;
  return {
    'actions': actions.map((v) => v).toList(),
    if (conditions != null)
      'conditions': conditions.map((v) => v.toJson()).toList(),
    'default': default$,
    'enabled': enabled,
    if (pattern != null) 'pattern': pattern,
    'rule_id': ruleId,
  };
}