---
sidebar:
  hidden: true
title: roboto.domain.topics.operations
---
## Module Contents

### AddMessagePathRepresentationRequest

```python
class roboto.domain.topics.operations.AddMessagePathRepresentationRequest(
    /,
    **data: Any,
)
```

`from roboto import AddMessagePathRepresentationRequest`

[Source](https://github.com/roboto-ai/roboto-python-sdk/blob/main/src/roboto/domain/topics/operations.py#L60-L71)

Bases: [`BaseAddRepresentationRequest`](/reference/python-sdk/roboto/domain/topics/operations#roboto.domain.topics.operations.BaseAddRepresentationRequest)

Request to associate a message path with a representation.

Creates a link between a specific message path and a data representation, enabling efficient access to individual fields within topic data.

**Parameters**

- **data** (`Any`)

**Attributes**

- **AddMessagePathRepresentationRequest.message_path_id** (`str`)
- **AddMessagePathRepresentationRequest.model_config**: Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

### AddMessagePathRequest

```python
class roboto.domain.topics.operations.AddMessagePathRequest(/, **data: Any)
```

`from roboto import AddMessagePathRequest`

[Source](https://github.com/roboto-ai/roboto-python-sdk/blob/main/src/roboto/domain/topics/operations.py#L74-L107)

Bases: `pydantic.BaseModel`

Request to add a new message path to a topic.

Defines a new message path within a topic's schema, specifying its data type, canonical type, and initial metadata. Used during topic creation or when extending an existing topic's schema.

**Parameters**

- **data** (`Any`)

**Attributes**

- **AddMessagePathRequest.canonical_data_type** (`roboto.domain.topics.record.CanonicalDataType`): Normalized Roboto data type that enables specialized platform features for maps, images, timestamps, and other data.
- **AddMessagePathRequest.data_type** (`str`): Native data type as it appears in the original data source (e.g., "float32", "geometry_msgs/Pose"). Used for display purposes.
- **AddMessagePathRequest.message_path** (`str`): Dot-delimited path to the attribute (e.g., "pose.position.x").
- **AddMessagePathRequest.metadata** (`dict[str, Any]`) = `None`: Initial key-value pairs to associate with the message path.
- **AddMessagePathRequest.model_config**: Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- **AddMessagePathRequest.path_in_schema** (`list[str]`) = `None`: List of path components representing the field's location in the original data schema. Unlike message_path, which assumes dots separate path parts implying nested data, this preserves the exact path from the source data for accurate attribute access.

### BaseAddRepresentationRequest

```python
class roboto.domain.topics.operations.BaseAddRepresentationRequest(/, **data: Any)
```

`from roboto.domain.topics.operations import BaseAddRepresentationRequest`

[Source](https://github.com/roboto-ai/roboto-python-sdk/blob/main/src/roboto/domain/topics/operations.py#L33-L44)

Bases: `pydantic.BaseModel`

Base request for adding a representation to a topic.

Defines the common fields required when creating any type of representation for topic data, including the storage location, format, and version information.

**Parameters**

- **data** (`Any`)

**Attributes**

- **BaseAddRepresentationRequest.association** (`roboto.association.Association`)
- **BaseAddRepresentationRequest.format** (`str | None`) = `None`
- **BaseAddRepresentationRequest.storage_format** (`roboto.domain.topics.record.RepresentationStorageFormat`)
- **BaseAddRepresentationRequest.transformations** (`list[str] | None`) = `None`
- **BaseAddRepresentationRequest.version** (`int`)

### CreateTopicRequest

```python
class roboto.domain.topics.operations.CreateTopicRequest(/, **data: Any)
```

`from roboto import CreateTopicRequest`

[Source](https://github.com/roboto-ai/roboto-python-sdk/blob/main/src/roboto/domain/topics/operations.py#L245-L267)

Bases: `pydantic.BaseModel`

Request to create a new topic in the Roboto platform.

Contains all the information needed to register a topic found within a source recording file, including its schema, temporal boundaries, and initial message paths.

**Parameters**

- **data** (`Any`)

**Attributes**

- **CreateTopicRequest.association** (`roboto.association.Association`)
- **CreateTopicRequest.end_time** (`int | None`) = `None`
- **CreateTopicRequest.message_count** (`int | None`) = `None`
- **CreateTopicRequest.message_paths** (`collections.abc.Sequence[AddMessagePathRequest] | None`) = `None`
- **CreateTopicRequest.metadata** (`collections.abc.Mapping[str, Any] | None`) = `None`
- **CreateTopicRequest.model_config**: Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- **CreateTopicRequest.schema_checksum** (`str | None`) = `None`
- **CreateTopicRequest.schema_name** (`str | None`) = `None`
- **CreateTopicRequest.start_time** (`int | None`) = `None`
- **CreateTopicRequest.topic_name** (`str`)

### DeleteMessagePathRequest

```python
class roboto.domain.topics.operations.DeleteMessagePathRequest(/, **data: Any)
```

`from roboto import DeleteMessagePathRequest`

[Source](https://github.com/roboto-ai/roboto-python-sdk/blob/main/src/roboto/domain/topics/operations.py#L157-L167)

Bases: `pydantic.BaseModel`

Request to delete a message path from a topic.

Removes a message path from a topic's schema. This operation cannot be undone and will remove all associated data and metadata for the specified path.

**Parameters**

- **data** (`Any`)

**Attributes**

- **DeleteMessagePathRequest.message_path** (`str`): Message path name.
- **DeleteMessagePathRequest.model_config**: Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

### MessagePathChangeset

```python
class roboto.domain.topics.operations.MessagePathChangeset(/, **data: Any)
```

`from roboto import MessagePathChangeset`

[Source](https://github.com/roboto-ai/roboto-python-sdk/blob/main/src/roboto/domain/topics/operations.py#L170-L242)

Bases: `pydantic.BaseModel`

Changeset for batch operations on topic message paths.

Defines a collection of add, delete, and update operations to be applied to a topic's message paths in a single atomic operation. Useful for making multiple schema changes efficiently.

**Parameters**

- **data** (`Any`)

**Attributes**

- **MessagePathChangeset.message_paths_to_add** (`collections.abc.Sequence[AddMessagePathRequest] | None`) = `None`: Message paths to add to a topic.

- **MessagePathChangeset.message_paths_to_delete** (`collections.abc.Sequence[DeleteMessagePathRequest] | None`) = `None`: Message paths to delete from a topic.

- **MessagePathChangeset.message_paths_to_update** (`collections.abc.Sequence[UpdateMessagePathRequest] | None`) = `None`: Message paths to update on a topic.

- **MessagePathChangeset.replace_all** (`bool`) = `False`: Flag indicating whether this changeset should replace all message paths on a topic.

  It assumes that the replacement message paths will be provided via `message_paths_to_add`. Rather than setting this flag directly, use appropriate class methods such as `from_replacement_message_paths`.

#### MessagePathChangeset.check_replace_all_correctness()

```python
def check_replace_all_correctness() -> MessagePathChangeset
```

[Source](https://github.com/roboto-ai/roboto-python-sdk/blob/main/src/roboto/domain/topics/operations.py#L195-L202)

**Returns**

- `MessagePathChangeset`

#### MessagePathChangeset.from_replacement_message_paths()

```python
@classmethod
def from_replacement_message_paths(
    message_paths: collections.abc.Sequence[AddMessagePathRequest],
) -> MessagePathChangeset
```

[Source](https://github.com/roboto-ai/roboto-python-sdk/blob/main/src/roboto/domain/topics/operations.py#L205-L229)

Create a changeset that replaces all existing message paths.

Creates a changeset that will replace all existing message paths on a topic with the provided set of message paths. This is useful for completely redefining a topic's schema.

**Parameters**

- **message_paths** (`collections.abc.Sequence[AddMessagePathRequest]`): Sequence of message path requests to replace existing paths.

**Returns**

- `MessagePathChangeset`: MessagePathChangeset configured to replace all existing message paths.

**Usage**

```python
from roboto.domain.topics import AddMessagePathRequest, CanonicalDataType
new_paths = [
    AddMessagePathRequest(
        message_path="velocity.x", data_type="float32", canonical_data_type=CanonicalDataType.Number
    )
]
changeset = MessagePathChangeset.from_replacement_message_paths(new_paths)
```

#### MessagePathChangeset.has_changes()

```python
def has_changes() -> bool
```

[Source](https://github.com/roboto-ai/roboto-python-sdk/blob/main/src/roboto/domain/topics/operations.py#L231-L242)

Check whether the changeset contains any actual changes.

**Returns**

- `bool`: True if the changeset contains operations that would modify the topic's message paths.

### SetDefaultRepresentationRequest

```python
class roboto.domain.topics.operations.SetDefaultRepresentationRequest(/, **data: Any)
```

`from roboto import SetDefaultRepresentationRequest`

[Source](https://github.com/roboto-ai/roboto-python-sdk/blob/main/src/roboto/domain/topics/operations.py#L47-L57)

Bases: [`BaseAddRepresentationRequest`](/reference/python-sdk/roboto/domain/topics/operations#roboto.domain.topics.operations.BaseAddRepresentationRequest)

Request to set the default representation for a topic.

Designates a specific representation as the default for accessing topic data. The default representation is used when no specific representation is requested for data access operations.

**Parameters**

- **data** (`Any`)

**Attributes**

- **SetDefaultRepresentationRequest.model_config**: Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

### SetTimelineOffsetsRequest

```python
class roboto.domain.topics.operations.SetTimelineOffsetsRequest(/, **data: Any)
```

`from roboto.domain.topics import SetTimelineOffsetsRequest`

[Source](https://github.com/roboto-ai/roboto-python-sdk/blob/main/src/roboto/domain/topics/operations.py#L326-L337)

Bases: `pydantic.BaseModel`

Request body for `POST /v1/files/id/<id>/timeline-offsets`.

Atomic request: the server applies all entries together or fails.

**Parameters**

- **data** (`Any`)

**Attributes**

- **SetTimelineOffsetsRequest.model_config**: Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- **SetTimelineOffsetsRequest.offsets** (`list[TimelineOffsetEntry]`) = `None`: Offsets to apply, at least one. An entry whose selectors reach no extent on this file is skipped as long as another entry reaches one; a request whose entries together reach none is refused. When two entries reach the same extent, the later entry's offset applies.

### TimelineOffsetEntry

```python
class roboto.domain.topics.operations.TimelineOffsetEntry(/, **data: Any)
```

`from roboto.domain.topics import TimelineOffsetEntry`

[Source](https://github.com/roboto-ai/roboto-python-sdk/blob/main/src/roboto/domain/topics/operations.py#L288-L323)

Bases: `pydantic.BaseModel`

One offset for [`set_timeline_offsets()`](/reference/python-sdk/roboto/domain/files/file#roboto.domain.files.file.File.set_timeline_offsets).

Optional selectors narrow which of the file's timelines the offset applies to.

**Topic selector:**

- `topic_name`: the topic's name (e.g. `"/imu/raw"`); topic names are unique within a single file. Scopes the offset to a single topic on the file.

**Timeline-source selector (give at most one):**

- `timeline_source_name`: the source's name (e.g. `"header.stamp"`). Source names are not unique, so the offset applies to every source with that name within the topic selector's scope.
- `timeline_source_id`: explicit id, for callers holding a [`TimelineSourceRecord`](/reference/python-sdk/roboto/domain/topics/record#roboto.domain.topics.record.TimelineSourceRecord).

Omitting every selector applies the offset to every timeline on the file.

**Parameters**

- **data** (`Any`)

**Attributes**

- **TimelineOffsetEntry.model_config**: Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- **TimelineOffsetEntry.timeline_source_id** (`str | None`) = `None`
- **TimelineOffsetEntry.timeline_source_name** (`str | None`) = `None`
- **TimelineOffsetEntry.topic_name** (`str | None`) = `None`
- **TimelineOffsetEntry.unix_epoch_offset_ns** (`roboto.time._EpochNanosecondsFromTime`) = `None`: Nanoseconds added to the file's stored timestamps so they read as Unix-epoch time (`session_time_ns = stored_time_ns + unix_epoch_offset_ns`). Must not be negative, and must fit in the signed 64-bit integer the platform stores it in. Also accepts any [`roboto.time.Time`](/reference/python-sdk/roboto/time#roboto.time.Time) at runtime, read as [`roboto.time.to_epoch_nanoseconds()`](/reference/python-sdk/roboto/time#roboto.time.to_epoch_nanoseconds) reads it, so an instant such as a `datetime` becomes the nanoseconds since the Unix epoch at which stored time 0 occurred; convert with that function first to satisfy a type checker.

### TimelineSourceUpdate

```python
class roboto.domain.topics.operations.TimelineSourceUpdate(/, **data: Any)
```

`from roboto.domain.topics import TimelineSourceUpdate`

[Source](https://github.com/roboto-ai/roboto-python-sdk/blob/main/src/roboto/domain/topics/operations.py#L340-L352)

Bases: `pydantic.BaseModel`

Partial update for a timeline source.

Fields left at `NotSet` are not modified.

**Parameters**

- **data** (`Any`)

**Attributes**

- **TimelineSourceUpdate.is_default** (`bool | roboto.sentinels.NotSetType`)
- **TimelineSourceUpdate.model_config**: Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- **TimelineSourceUpdate.name** (`str | roboto.sentinels.NotSetType`)

### UpdateMessagePathRequest

```python
class roboto.domain.topics.operations.UpdateMessagePathRequest(/, **data: Any)
```

`from roboto import UpdateMessagePathRequest`

[Source](https://github.com/roboto-ai/roboto-python-sdk/blob/main/src/roboto/domain/topics/operations.py#L110-L154)

Bases: `pydantic.BaseModel`

Request to update an existing message path within a topic.

Allows modification of message path attributes including metadata, data type, and canonical data type. Used to correct or enhance message path definitions after initial creation.

**Parameters**

- **data** (`Any`)

**Attributes**

- **UpdateMessagePathRequest.canonical_data_type** (`roboto.domain.topics.record.CanonicalDataType | roboto.sentinels.NotSetType`): Canonical Roboto data type for the data under this message path (optional).

  Note: updating this attribute should be done with care, as it affects Roboto's ability to interpret and visualize the data.

- **UpdateMessagePathRequest.data_type** (`str | roboto.sentinels.NotSetType`): Native data type for the data under this message path (optional).

- **UpdateMessagePathRequest.message_path** (`str`): Message path name (required).

- **UpdateMessagePathRequest.metadata_changeset** (`roboto.updates.TaglessMetadataChangeset | roboto.sentinels.NotSetType`): A set of changes to the message path's metadata (optional).

- **UpdateMessagePathRequest.model_config**: Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

- **UpdateMessagePathRequest.path_in_schema** (`list[str] | roboto.sentinels.NotSetType`): List of path components representing the field's location in the source data schema (optional).

  For nested fields like 'position.x', this would be ['position', 'x'].

#### UpdateMessagePathRequest.has_updates()

```python
def has_updates() -> bool
```

[Source](https://github.com/roboto-ai/roboto-python-sdk/blob/main/src/roboto/domain/topics/operations.py#L142-L154)

Check whether this request would result in any message path modifications.

**Returns**

- `bool`: True if the request contains changes that would modify the message path.

### UpdateTopicRequest

```python
class roboto.domain.topics.operations.UpdateTopicRequest(/, **data: Any)
```

`from roboto import UpdateTopicRequest`

[Source](https://github.com/roboto-ai/roboto-python-sdk/blob/main/src/roboto/domain/topics/operations.py#L270-L285)

Bases: `pydantic.BaseModel`

Request to update an existing topic's properties.

Allows modification of topic attributes including temporal boundaries, message count, schema information, metadata, and message paths.

**Parameters**

- **data** (`Any`)

**Attributes**

- **UpdateTopicRequest.end_time** (`int | None | roboto.sentinels.NotSetType`)
- **UpdateTopicRequest.message_count** (`int | roboto.sentinels.NotSetType`)
- **UpdateTopicRequest.message_path_changeset** (`MessagePathChangeset | roboto.sentinels.NotSetType`)
- **UpdateTopicRequest.metadata_changeset** (`roboto.updates.MetadataChangeset | roboto.sentinels.NotSetType`)
- **UpdateTopicRequest.model_config**: Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- **UpdateTopicRequest.schema_checksum** (`str | None | roboto.sentinels.NotSetType`)
- **UpdateTopicRequest.schema_name** (`str | None | roboto.sentinels.NotSetType`)
- **UpdateTopicRequest.start_time** (`int | None | roboto.sentinels.NotSetType`)
