Map<String, dynamic> toMap() { return { 'condition': condition?.toMap(), 'mappings': mappings.map((m) => m.toMap()).toList(), }; }