Produces a Map that can be serialized to JSON.
Map<String, dynamic> toJson() { return <String, dynamic>{ if (name != null) 'name': name, if (version != null) 'version': version, }; }