@override Object toJson() { return { if (endpoint.isNotDefault) 'endpoint': endpoint, if (version.isNotDefault) 'version': version, }; }