@override Map<String, Object?> toJson() => { 'type': type, if (id != null) 'id': id, if (version != null) 'version': version, };