AssetType#
- class nominal.core.AssetType(rid, name, description, primary_key, properties, created_at, is_archived, icon_name, required_series=None)#
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.Required series are checked when the type is attached. A type with no data requirements ever set has
required_series=None.Reading an unsupported property rule, data requirement, or series type raises
ValueError, including during search, refresh, or update.- properties: Mapping[str, AssetTypeProperty]#
- created_at: IntegralNanosecondsUTC#
- required_series: Mapping[str, SeriesType] | None = None#
- archive()#
Archive this type. Call
refresh()to update the local snapshot.Existing memberships remain; archived types cannot be added to new members.
- delete()#
Permanently delete this type and its incoming and outgoing link definitions.
- Raises:
NominalPermissionDeniedError – If an asset uses the type, including an archived asset.
NominalFailedPreconditionError – If a checklist references the type.
- unarchive()#
Restore this type. Call
refresh()to update the local snapshot.
- update(*, name=None, description=None, primary_key=None, properties=None, icon_name=None, required_series=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 property rules incompatible with existing active members and primary-key renames once the type has memberships.Pass an empty mapping to clear required series. Existing members are not rechecked.
- Raises:
NominalError – If the definition is invalid or the update fails.
ValueError – If a supplied series kind is unsupported, before the request is sent. Also raised if the update succeeded but the SDK could not read the returned definition. This instance retains its previous snapshot.
- Return type: