Map<String, dynamic> toJson() { final expression = this.expression; final type = this.type; return { if (expression != null) 'expression': expression, if (type != null) 'type': type.toValue(), }; }