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.

rid: str#
name: str#
description: str | None#
primary_key: str#
properties: Mapping[str, AssetTypeProperty]#
created_at: IntegralNanosecondsUTC#
is_archived: bool#
icon_name: str | None#
property nominal_url: str#

Link to this asset type in the Nominal app.

archive()#

Archive this type. Call refresh() to update the local snapshot.

Existing memberships remain; archived types cannot be added to new members.

refresh()#
Return type:

Self

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.

None leaves 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:

Self