diff --git a/swh/model/model.py b/swh/model/model.py --- a/swh/model/model.py +++ b/swh/model/model.py @@ -1513,3 +1513,28 @@ def _compute_hash_from_attributes(self) -> bytes: return _compute_hash_from_manifest(git_objects.extid_git_object(self)) + + +SWH_MODEL_OBJECT_TYPES = { + cls.object_type: cls # type: ignore + for cls in ( + Person, + Timestamp, + TimestampWithTimezone, + Origin, + OriginVisit, + OriginVisitStatus, + Snapshot, + SnapshotBranch, + Release, + Revision, + Directory, + DirectoryEntry, + Content, + SkippedContent, + MetadataAuthority, + MetadataFetcher, + RawExtrinsicMetadata, + ExtID, + ) +}