The models only expose fields which are documented in the API docs, but users of the library might want to access undocumented fields.
To support this, models should have a source property which stores the JSON data which was used to create them.
This property is nullable because a model is not always built from an API response, for example when updating a resource.
Equality and hash code should not take this property into account, to avoid breaking existing code.
The models only expose fields which are documented in the API docs, but users of the library might want to access undocumented fields.
To support this, models should have a
source
property which stores the JSON data which was used to create them. This property is nullable because a model is not always built from an API response, for example when updating a resource. Equality and hash code should not take this property into account, to avoid breaking existing code.