roboto.domain.sessions.record#

Module Contents#

class roboto.domain.sessions.record.SessionFileRecord(/, **data)#

Bases: pydantic.BaseModel

Wire-format row for one file’s contribution to a Session, optionally clipped to a sub-range of the file’s recorded time.

The clipping range is expressed in Unix-epoch nanoseconds, the same coordinate system as the parent Session’s aggregate bounds.

Range contract:

  1. range_min_timestamp_ns and range_max_timestamp_ns are set together or both None; half-open windows are not a supported product concept and are rejected on write.

  2. When both are None, the file contributes its whole recorded time window.

  3. When both are set, range_min_timestamp_ns <= range_max_timestamp_ns, and consumers iterating session data must clamp the file’s data to that [range_min_timestamp_ns, range_max_timestamp_ns] window.

Parameters:

data (Any)

created: datetime.datetime | None = None#

When this file was added to the session.

created_by: str#

User ID or service account that added this file to the session.

fs_node_id: str#

Identifier of the contributing file.

model_config#

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

modified: datetime.datetime | None = None#

When this file’s contribution was last modified.

modified_by: str#

User ID or service account that last modified this file’s contribution.

range_max_timestamp_ns: int | None = None#

Upper bound (inclusive) of the file’s contribution, in Unix-epoch nanoseconds. None means the contribution extends to the end of the file’s recorded time window; paired with range_min_timestamp_ns.

range_min_timestamp_ns: int | None = None#

Lower bound (inclusive) of the file’s contribution, in Unix-epoch nanoseconds. None means the contribution starts at the beginning of the file’s recorded time window; paired with range_max_timestamp_ns.

session_id: str#

Identifier of the session this file contributes to.

class roboto.domain.sessions.record.SessionRecord(/, **data)#

Bases: pydantic.BaseModel

Wire-format row for a session: an operational time window of a Device such as a drone flight, a vehicle drive, or a robot run.

A Session unifies the recordings and auxiliary data produced during its window; it may span many files or cover only a slice of one.

min_timestamp_ns and max_timestamp_ns are service-maintained aggregate bounds over the Session’s contributions, recomputed by the service in the same transaction as any composition write (add/remove files), so the row never disagrees with its contents.

Parameters:

data (Any)

created: datetime.datetime | None = None#

When the session was created.

created_by: str#

User ID or service account that created the session.

custom_fields: dict[str, Any] = None#

Values for the custom fields defined on Sessions in this org.

Every Ready custom field defined for (org_id, Session) 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.

description: str | None = None#

Optional description of the Session.

max_timestamp_ns: int | None = None#

Upper bound of the session’s aggregate timestamps, in Unix-epoch nanoseconds. None until the session has at least one file contribution.

metadata: dict[str, Any] = None#

User-supplied metadata.

Sessions cannot be filtered or sorted by metadata keys; for queryable structured attributes, define a custom field on the Session entity type.

min_timestamp_ns: int | None = None#

Lower bound of the session’s aggregate timestamps, in Unix-epoch nanoseconds. None until the session has at least one file contribution.

model_config#

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

modified: datetime.datetime | None = None#

When the Session was last modified.

modified_by: str#

User ID or service account that last modified the Session.

name: str | None = None#

A short, human-readable name for the Session. If provided, must be 120 characters or less.

org_id: str#

Organization that owns the Session.

session_id: str#

Stable, unique identifier for the Session.

tags: list[str] = None#

User-supplied tags.

Sessions can be filtered by tag membership (e.g., tags CONTAINS '<tag>') but are not sortable by tag.