AssetType#
- class nominal.core.AssetType(rid, name, description, primary_key, properties, created_at, is_archived, icon_name)#
Bases:
HasRid,RefreshableGrpcMixin[Type]An asset identity definition and the property rules its members must satisfy.
The primary key names a required nonempty string property, unique among active assets of this type. Other property definitions are stored in
properties.Reading a definition with an unknown property value type or requirement raises
ValueError, including during search, refresh, or update. Unsupported rules are never interpreted as weaker constraints.- properties: Mapping[str, AssetTypeProperty]#
- created_at: IntegralNanosecondsUTC#
- archive()#
Archive this type. Call
refresh()to update the local snapshot.Existing memberships remain; archived types cannot be added to new members.
- unarchive()#
Restore this type. Call
refresh()to update the local snapshot.
- update(*, name=None, description=None, primary_key=None, properties=None, icon_name=None)#
Replace supplied definition fields and refresh this instance in place.
Noneleaves a field unchanged; an empty properties mapping removes all additional property rules. The primary key is separate from those rules. The server rejects definitions incompatible with existing active members, and primary-key renames once the type has memberships.- Raises:
NominalError – If the definition is invalid or the update fails.
- Return type: