roboto.domain.collections
Submodules
Package Contents
Collection
A higher-level container for grouping datasets together. Collections can also be used to group files from several distinct datasets together.
Parameters
roboto_client Optional[roboto.Collection.add_dataset()
Parameters
dataset_id strReturn type
Collection.add_event()
Parameters
event_id strReturn type
Collection.add_file()
Parameters
file_id strReturn type
Collection.add_session()
Parameters
session_id strReturn type
Collection.changes()
Yield this collection’s revision history, oldest change first.
Version 0 is a real collection version, so 0 is a bound like any other: from_version=0 starts at the beginning, and to_version=0 selects the empty range. Omit a bound to leave that end open.
Parameters
from_version Optional[int]to_version Optional[int]Return type
Collection.clear_custom_field()
Clear a single custom-field value on this collection to None.
Parameters
name strReturn type
Collection.clear_custom_fields()
Clear multiple custom-field values on this collection to None.
Parameters
names collections.Return type
Properties
Collection.create()
Parameters
description Optional[str]name Optional[str]resource_type roboto.resources Optional[list[roboto.dataset_ids Optional[collections.event_ids Optional[collections.file_ids Optional[collections.session_ids Optional[collections.tags Optional[list[str]]custom_fields Optional[dict[str, Any]]roboto_client Optional[roboto.caller_org_id Optional[str]Return type
Properties
Collection.custom_fields
Custom-field values defined on Collections in this org.
Every Ready CustomField defined for (org_id, Collection) appears as a key. Values that have not been set on this collection surface as None rather than being absent. Empty when no custom fields are defined for the org.
A Timestamp value is returned as an ISO 8601 string.
Collection.delete()
Properties
Collection.edit_access()
Parameters
Return type
Collection.from_id()
Parameters
Return type
Collection.get_access()
Return type
Collection.list_all()
Parameters
roboto_client Optional[roboto.owner_org_id Optional[str]sort_by Optional[str]sort_direction Optional[roboto.Return type
Properties
Collection.record
Collection.remove_dataset()
Parameters
dataset_id strReturn type
Collection.remove_event()
Parameters
event_id strReturn type
Collection.remove_file()
Parameters
file_id strReturn type
Collection.remove_session()
Parameters
session_id strReturn type
Properties
Collection.resource_count
Number of resources this collection holds.
Read from the collection record rather than from resources, so it is available in every content mode, including summary-only loads where the member list is empty. Counts every membership reference, including references to resources that have since been deleted.
Collection.set_custom_field()
Set a single custom-field value on this collection.
name must be the name of a Ready custom field for this collection’s org and the Collection entity type; value must satisfy the field’s declared type.
Parameters
name strvalue AnyReturn type
Collection.set_custom_fields()
Set or overwrite multiple custom-field values on this collection.
Each key must name a Ready custom field for this collection’s org and the Collection entity type; each value must satisfy the field’s declared type.
Parameters
fields dict[str, Any]Return type
Collection.update()
Parameters
add_resources Union[list[roboto.add_tags Union[list[str], roboto.description Optional[Union[roboto.name Optional[Union[roboto.remove_resources Union[list[roboto.remove_tags Union[list[str], roboto.custom_fields_changeset Optional[roboto.Return type
CollectionChangeRecord
Bases: pydantic.BaseModel
A wire-transmissible representation of a collection change record
Parameters
data AnyAttributes
CollectionChangeRecord.applied
CollectionChangeRecord.applied_by
CollectionChangeRecord.change_set
CollectionChangeRecord.collection_id
CollectionChangeRecord.from_version
CollectionChangeRecord.to_version
CollectionChangeSet
Bases: pydantic.BaseModel
Changeset for updating a collection
Parameters
data AnyAttributes
CollectionChangeSet.added_resources
CollectionChangeSet.added_tags
CollectionChangeSet.field_changes
CollectionChangeSet.removed_resources
CollectionChangeSet.removed_tags
CollectionContentMode
CollectionRecord
Bases: pydantic.BaseModel
A wire-transmissible representation of a collection
Parameters
data AnyAttributes
CollectionRecord.collection_id
CollectionRecord.created
CollectionRecord.created_by
CollectionRecord.custom_fields
Values for the custom fields defined on Collections in this org.
Every Ready custom field defined for (org_id, Collection) appears as a key; values that have not been set surface as None rather than being absent. Empty when no custom fields are defined for the org.
CollectionRecord.description
CollectionRecord.missing
CollectionRecord.name
CollectionRecord.org_id
CollectionRecord.resource_count
Number of resources the collection holds.
Maintained by the service as members are added and removed, so it is present in every content mode, including summary_only where resources is empty. Counts every membership reference, including references to resources that have since been deleted; hydrating the collection (content_mode=full) sorts those into missing, so the hydrated resources map can hold fewer entries than this count.
CollectionRecord.resource_type
CollectionRecord.resources
CollectionRecord.tags
CollectionRecord.updated
CollectionRecord.updated_by
CollectionRecord.version
CollectionResourceRef
Bases: pydantic.BaseModel
Reference to a collection resource
Parameters
data AnyAttributes
CollectionResourceRef.resource_id
CollectionResourceRef.resource_type
CollectionResourceRef.resource_version
CollectionResourceType
CreateCollectionRequest
Bases: pydantic.BaseModel
Request payload to create a collection
Parameters
data AnyAttributes
CreateCollectionRequest.custom_fields
Initial values for Ready custom fields on this collection.
Each key must be the name of a CustomField that is Ready for the caller’s org and the Collection entity type; each value must satisfy the field’s declared type. Names that are undefined or not Ready, and values that don’t match the field’s type, are rejected with a structured error.
CreateCollectionRequest.description
CreateCollectionRequest.name
CreateCollectionRequest.resource_type
CreateCollectionRequest.resources
CreateCollectionRequest.tags
UpdateCollectionRequest
Bases: pydantic.BaseModel
Request payload to update a collection
Parameters
data AnyAttributes
UpdateCollectionRequest.add_resources
add_resources list[roboto.UpdateCollectionRequest.add_tags
UpdateCollectionRequest.custom_fields_changeset
Changes to apply to Ready custom-field values on this collection.
Each referenced field name must be a Ready custom field for this collection’s org and the Collection entity type; each set_fields value must satisfy the field’s declared type. Names that are undefined or not Ready are rejected with a structured error. Field names not mentioned by the changeset are left unchanged.
UpdateCollectionRequest.description
UpdateCollectionRequest.model_config
model_config #Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
UpdateCollectionRequest.name
UpdateCollectionRequest.remove_resources
remove_resources list[roboto.