Map<String, Object?> toJson() => { if (from != null) 'from': from, if (to != null) 'to': to, if (functionNames != null) 'functionNames': functionNames, };