Map<String, dynamic> toJson() => { 'ruleChains': ruleChains.map((e) => e.toJson()).toList(), 'metadata': metadata.map((e) => e.toJson()).toList() };