---
sidebar:
  hidden: true
title: roboto.domain.collections.record
---
## Module Contents

### CollectionChangeRecord

```python
class roboto.domain.collections.record.CollectionChangeRecord(/, **data: Any)
```

`from roboto import CollectionChangeRecord`

[Source](https://github.com/roboto-ai/roboto-python-sdk/blob/main/src/roboto/domain/collections/record.py#L89-L97)

Bases: `pydantic.BaseModel`

A wire-transmissible representation of a collection change record

**Parameters**

- **data** (`Any`)

**Attributes**

- **CollectionChangeRecord.applied** (`datetime.datetime`)
- **CollectionChangeRecord.applied_by** (`str`)
- **CollectionChangeRecord.change_set** (`CollectionChangeSet`)
- **CollectionChangeRecord.collection_id** (`str`)
- **CollectionChangeRecord.from_version** (`int`)
- **CollectionChangeRecord.to_version** (`int`)

### CollectionChangeSet

```python
class roboto.domain.collections.record.CollectionChangeSet(/, **data: Any)
```

`from roboto import CollectionChangeSet`

[Source](https://github.com/roboto-ai/roboto-python-sdk/blob/main/src/roboto/domain/collections/record.py#L79-L86)

Bases: `pydantic.BaseModel`

Changeset for updating a collection

**Parameters**

- **data** (`Any`)

**Attributes**

- **CollectionChangeSet.added_resources** (`list[CollectionResourceRef]`) = `None`
- **CollectionChangeSet.added_tags** (`list[str]`) = `None`
- **CollectionChangeSet.field_changes** (`dict[str, Any]`) = `None`
- **CollectionChangeSet.removed_resources** (`list[CollectionResourceRef]`) = `None`
- **CollectionChangeSet.removed_tags** (`list[str]`) = `None`

### CollectionContentMode

```python
class roboto.domain.collections.record.CollectionContentMode
```

`from roboto import CollectionContentMode`

[Source](https://github.com/roboto-ai/roboto-python-sdk/blob/main/src/roboto/domain/collections/record.py#L25-L30)

Bases: `roboto.compat.StrEnum`

Desired content mode for representing a collection

**Attributes**

- **CollectionContentMode.Full** = `'full'`
- **CollectionContentMode.References** = `'references'`
- **CollectionContentMode.SummaryOnly** = `'summary_only'`

### CollectionRecord

```python
class roboto.domain.collections.record.CollectionRecord(/, **data: Any)
```

`from roboto import CollectionRecord`

[Source](https://github.com/roboto-ai/roboto-python-sdk/blob/main/src/roboto/domain/collections/record.py#L41-L76)

Bases: `pydantic.BaseModel`

A wire-transmissible representation of a collection

**Parameters**

- **data** (`Any`)

**Attributes**

- **CollectionRecord.collection_id** (`str`)

- **CollectionRecord.created** (`datetime.datetime`)

- **CollectionRecord.created_by** (`str`)

- **CollectionRecord.custom_fields** (`dict[str, Any]`) = `None`: 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** (`str | None`) = `None`

- **CollectionRecord.missing** (`dict[CollectionResourceType, list[CollectionResourceRef]]`) = `None`

- **CollectionRecord.name** (`str | None`) = `None`

- **CollectionRecord.org_id** (`str`)

- **CollectionRecord.resource_count** (`int`) = `0`: 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** (`CollectionResourceType`)

- **CollectionRecord.resources** (`dict[CollectionResourceType, list[Any]]`) = `None`

- **CollectionRecord.tags** (`list[str]`) = `[]`

- **CollectionRecord.updated** (`datetime.datetime`)

- **CollectionRecord.updated_by** (`str`)

- **CollectionRecord.version** (`int`)

### CollectionResourceRef

```python
class roboto.domain.collections.record.CollectionResourceRef(/, **data: Any)
```

`from roboto import CollectionResourceRef`

[Source](https://github.com/roboto-ai/roboto-python-sdk/blob/main/src/roboto/domain/collections/record.py#L33-L38)

Bases: `pydantic.BaseModel`

Reference to a collection resource

**Parameters**

- **data** (`Any`)

**Attributes**

- **CollectionResourceRef.resource_id** (`str`)
- **CollectionResourceRef.resource_type** (`CollectionResourceType`)
- **CollectionResourceRef.resource_version** (`str | None`) = `None`

### CollectionResourceType

```python
class roboto.domain.collections.record.CollectionResourceType
```

`from roboto import CollectionResourceType`

[Source](https://github.com/roboto-ai/roboto-python-sdk/blob/main/src/roboto/domain/collections/record.py#L16-L22)

Bases: `roboto.compat.StrEnum`

Type of resource added to a collection

**Attributes**

- **CollectionResourceType.Dataset** = `'dataset'`
- **CollectionResourceType.Event** = `'event'`
- **CollectionResourceType.File** = `'file'`
- **CollectionResourceType.Session** = `'session'`
