Mason¶
These dataclasses are used in the SDK to represent API requests and responses for services in the databricks.sdk.service.mason module.
- class databricks.sdk.service.mason.AppendSessionItemsResponse(session_items: List[SessionItem] | None = None)¶
Response containing appended items.
- session_items: List[SessionItem] | None = None¶
Persisted session items with service-assigned fields.
- as_dict() dict¶
Serializes the AppendSessionItemsResponse into a dictionary suitable for use as a JSON request body.
- as_shallow_dict() dict¶
Serializes the AppendSessionItemsResponse into a shallow dictionary of its immediate attributes.
- classmethod from_dict(d: Dict[str, Any]) AppendSessionItemsResponse¶
Deserializes the AppendSessionItemsResponse from a dictionary.
- class databricks.sdk.service.mason.ClearSessionItemsResponse¶
Response from clearing items from a session.
- as_dict() dict¶
Serializes the ClearSessionItemsResponse into a dictionary suitable for use as a JSON request body.
- as_shallow_dict() dict¶
Serializes the ClearSessionItemsResponse into a shallow dictionary of its immediate attributes.
- classmethod from_dict(d: Dict[str, Any]) ClearSessionItemsResponse¶
Deserializes the ClearSessionItemsResponse from a dictionary.
- class databricks.sdk.service.mason.ExtractMemoriesResponse(entries: List[ManagedMemoryEntry] | None = None, name: str | None = None)¶
Result of a single-session memory extraction.
- entries: List[ManagedMemoryEntry] | None = None¶
The memory entries written by this extraction.
- name: str | None = None¶
Correlation identifier for this extraction, for logging and tracing. Not a fetchable resource.
- as_dict() dict¶
Serializes the ExtractMemoriesResponse into a dictionary suitable for use as a JSON request body.
- as_shallow_dict() dict¶
Serializes the ExtractMemoriesResponse into a shallow dictionary of its immediate attributes.
- classmethod from_dict(d: Dict[str, Any]) ExtractMemoriesResponse¶
Deserializes the ExtractMemoriesResponse from a dictionary.
- class databricks.sdk.service.mason.ForkSessionResponse(session: Session | None = None)¶
Response from forking a session.
- as_dict() dict¶
Serializes the ForkSessionResponse into a dictionary suitable for use as a JSON request body.
- as_shallow_dict() dict¶
Serializes the ForkSessionResponse into a shallow dictionary of its immediate attributes.
- classmethod from_dict(d: Dict[str, Any]) ForkSessionResponse¶
Deserializes the ForkSessionResponse from a dictionary.
- class databricks.sdk.service.mason.ListManagedMemoryEntriesResponse(managed_memory_entries: List[ManagedMemoryEntry] | None = None, next_page_token: str | None = None)¶
Response containing managed memory entries.
- managed_memory_entries: List[ManagedMemoryEntry] | None = None¶
Managed memory entries matching the request and its read mask.
- next_page_token: str | None = None¶
Opaque pagination token. This field is omitted when there are no more results.
- as_dict() dict¶
Serializes the ListManagedMemoryEntriesResponse into a dictionary suitable for use as a JSON request body.
- as_shallow_dict() dict¶
Serializes the ListManagedMemoryEntriesResponse into a shallow dictionary of its immediate attributes.
- classmethod from_dict(d: Dict[str, Any]) ListManagedMemoryEntriesResponse¶
Deserializes the ListManagedMemoryEntriesResponse from a dictionary.
- class databricks.sdk.service.mason.ListManagedMemoryStoresResponse(managed_memory_stores: List[ManagedMemoryStore] | None = None, next_page_token: str | None = None)¶
Response containing managed memory stores in the caller’s workspace.
- managed_memory_stores: List[ManagedMemoryStore] | None = None¶
Managed memory stores in the caller’s workspace.
- next_page_token: str | None = None¶
Opaque pagination token. This field is omitted when there are no more results.
- as_dict() dict¶
Serializes the ListManagedMemoryStoresResponse into a dictionary suitable for use as a JSON request body.
- as_shallow_dict() dict¶
Serializes the ListManagedMemoryStoresResponse into a shallow dictionary of its immediate attributes.
- classmethod from_dict(d: Dict[str, Any]) ListManagedMemoryStoresResponse¶
Deserializes the ListManagedMemoryStoresResponse from a dictionary.
- class databricks.sdk.service.mason.ListSessionItemsResponse(next_page_token: str | None = None, session_items: List[SessionItem] | None = None)¶
Response containing a page of session items.
- next_page_token: str | None = None¶
Token to retrieve the next page.
- session_items: List[SessionItem] | None = None¶
Session items in the requested page.
- as_dict() dict¶
Serializes the ListSessionItemsResponse into a dictionary suitable for use as a JSON request body.
- as_shallow_dict() dict¶
Serializes the ListSessionItemsResponse into a shallow dictionary of its immediate attributes.
- classmethod from_dict(d: Dict[str, Any]) ListSessionItemsResponse¶
Deserializes the ListSessionItemsResponse from a dictionary.
- class databricks.sdk.service.mason.ListSessionStoresResponse(next_page_token: str | None = None, session_stores: List[SessionStore] | None = None)¶
Response containing a page of session stores.
- next_page_token: str | None = None¶
Token to retrieve the next page.
- session_stores: List[SessionStore] | None = None¶
Session stores in the requested page.
- as_dict() dict¶
Serializes the ListSessionStoresResponse into a dictionary suitable for use as a JSON request body.
- as_shallow_dict() dict¶
Serializes the ListSessionStoresResponse into a shallow dictionary of its immediate attributes.
- classmethod from_dict(d: Dict[str, Any]) ListSessionStoresResponse¶
Deserializes the ListSessionStoresResponse from a dictionary.
- class databricks.sdk.service.mason.ListSessionsResponse(next_page_token: str | None = None, sessions: List[Session] | None = None)¶
Response containing a page of sessions.
- next_page_token: str | None = None¶
Token to retrieve the next page.
- as_dict() dict¶
Serializes the ListSessionsResponse into a dictionary suitable for use as a JSON request body.
- as_shallow_dict() dict¶
Serializes the ListSessionsResponse into a shallow dictionary of its immediate attributes.
- classmethod from_dict(d: Dict[str, Any]) ListSessionsResponse¶
Deserializes the ListSessionsResponse from a dictionary.
- class databricks.sdk.service.mason.ManagedMemoryEntry(actor_id: str, path: str, content: str | None = None, create_time: Timestamp | None = None, description: str | None = None, name: str | None = None, session_id: str | None = None, source_type: ManagedMemoryEntrySourceType | None = None, update_time: Timestamp | None = None)¶
A workspace-scoped entry in a managed memory store.
- actor_id: str¶
Customer-provided identifier for the actor whose memory this entry represents.
- path: str¶
Absolute, case-sensitive path identifying the entry within its actor and optional session. Paths must begin with
/and must not contain empty,.or..segments.
- content: str | None = None¶
Optional free-form memory content.
- create_time: Timestamp | None = None¶
Time when the entry was created.
- description: str | None = None¶
Human-readable description of the memory entry.
- name: str | None = None¶
Resource name in the form
memory-stores/{managed_memory_store_id}/entries/{managed_memory_entry_id}.
- session_id: str | None = None¶
Optional identifier for the session associated with this memory entry. When omitted, the entry applies across the actor’s sessions.
- source_type: ManagedMemoryEntrySourceType | None = None¶
Which writer created this entry. Caller sets this on Create; immutable after creation.
- update_time: Timestamp | None = None¶
Time when the entry was last updated.
- as_dict() dict¶
Serializes the ManagedMemoryEntry into a dictionary suitable for use as a JSON request body.
- as_shallow_dict() dict¶
Serializes the ManagedMemoryEntry into a shallow dictionary of its immediate attributes.
- classmethod from_dict(d: Dict[str, Any]) ManagedMemoryEntry¶
Deserializes the ManagedMemoryEntry from a dictionary.
- class databricks.sdk.service.mason.ManagedMemoryEntrySearchResult(managed_memory_entry: ManagedMemoryEntry | None = None, score: float | None = None)¶
One relevance-ranked managed memory search result.
- managed_memory_entry: ManagedMemoryEntry | None = None¶
Managed memory entry matching the query.
- score: float | None = None¶
Relevance score for the result. Higher scores are more relevant.
- as_dict() dict¶
Serializes the ManagedMemoryEntrySearchResult into a dictionary suitable for use as a JSON request body.
- as_shallow_dict() dict¶
Serializes the ManagedMemoryEntrySearchResult into a shallow dictionary of its immediate attributes.
- classmethod from_dict(d: Dict[str, Any]) ManagedMemoryEntrySearchResult¶
Deserializes the ManagedMemoryEntrySearchResult from a dictionary.
- class databricks.sdk.service.mason.ManagedMemoryEntrySourceType¶
Identifies the source that created a managed memory entry.
- MANAGED_MEMORY_ENTRY_SOURCE_TYPE_AGENT = "MANAGED_MEMORY_ENTRY_SOURCE_TYPE_AGENT"¶
- MANAGED_MEMORY_ENTRY_SOURCE_TYPE_DREAMER = "MANAGED_MEMORY_ENTRY_SOURCE_TYPE_DREAMER"¶
- class databricks.sdk.service.mason.ManagedMemoryStore(create_time: Timestamp | None = None, creator_user_id: str | None = None, description: str | None = None, display_name: str | None = None, name: str | None = None, owner_user_id: str | None = None, storage_backend: StorageBackend | None = None, update_time: Timestamp | None = None, workspace_id: int | None = None)¶
A workspace-scoped managed memory store backed by service-managed storage.
- create_time: Timestamp | None = None¶
Time when the store was created.
- creator_user_id: str | None = None¶
Workspace-local user ID of the authenticated principal that created the store. This is immutable server-set attribution and does not grant access; authorization is evaluated from the authenticated request context.
- description: str | None = None¶
Human-readable description of the memory store.
- display_name: str | None = None¶
Deprecated compatibility alias for the caller-provided managed memory store ID. Canonical clients provide the ID through
CreateMemoryStoreRequest.managed_memory_store_idand usenameas the resource identifier.
- name: str | None = None¶
Resource name in the form
memory-stores/{managed_memory_store_id}.
- owner_user_id: str | None = None¶
Deprecated alias for
creator_user_id. This identifies the original creator, not a transferable owner. Usecreator_user_idinstead.
- storage_backend: StorageBackend | None = None¶
Service-managed storage backing this memory store.
- update_time: Timestamp | None = None¶
Time when the store was last updated.
- workspace_id: int | None = None¶
Workspace that owns the memory store.
- as_dict() dict¶
Serializes the ManagedMemoryStore into a dictionary suitable for use as a JSON request body.
- as_shallow_dict() dict¶
Serializes the ManagedMemoryStore into a shallow dictionary of its immediate attributes.
- classmethod from_dict(d: Dict[str, Any]) ManagedMemoryStore¶
Deserializes the ManagedMemoryStore from a dictionary.
- class databricks.sdk.service.mason.PopSessionItemResponse(item: SessionItem | None = None)¶
Response containing the popped item.
- item: SessionItem | None = None¶
Removed item, if any.
- as_dict() dict¶
Serializes the PopSessionItemResponse into a dictionary suitable for use as a JSON request body.
- as_shallow_dict() dict¶
Serializes the PopSessionItemResponse into a shallow dictionary of its immediate attributes.
- classmethod from_dict(d: Dict[str, Any]) PopSessionItemResponse¶
Deserializes the PopSessionItemResponse from a dictionary.
- class databricks.sdk.service.mason.SearchManagedMemoryEntriesResponse(managed_memory_entries: List[ManagedMemoryEntry] | None = None, next_page_token: str | None = None, results: List[ManagedMemoryEntrySearchResult] | None = None)¶
Response containing managed memory entries ranked by relevance.
- managed_memory_entries: List[ManagedMemoryEntry] | None = None¶
Deprecated compatibility alias for clients migrating to
results. This contains the same entries in the same order, but omits their relevance scores.
- next_page_token: str | None = None¶
Opaque pagination token. Search currently returns an unpaginated ranked top-N result set, so the server does not populate this field.
- results: List[ManagedMemoryEntrySearchResult] | None = None¶
Canonical matching entries and relevance scores, ordered most relevant first.
- as_dict() dict¶
Serializes the SearchManagedMemoryEntriesResponse into a dictionary suitable for use as a JSON request body.
- as_shallow_dict() dict¶
Serializes the SearchManagedMemoryEntriesResponse into a shallow dictionary of its immediate attributes.
- classmethod from_dict(d: Dict[str, Any]) SearchManagedMemoryEntriesResponse¶
Deserializes the SearchManagedMemoryEntriesResponse from a dictionary.
- class databricks.sdk.service.mason.Session(actor_id: str, create_time: Timestamp | None = None, last_activity_time: Timestamp | None = None, metadata: Dict[str, str] | None = None, name: str | None = None, parent_session_id: str | None = None, root_session_id: str | None = None, session_id: str | None = None, update_time: Timestamp | None = None)¶
A durable logical interaction stored within a Session Store.
- actor_id: str¶
Opaque caller-provided identifier for the application actor associated with the session.
This is application data and has no Databricks authentication or authorization semantics. Use the same value as the Managed Memory Entry
actor_idwhen storing memories associated with this actor. Every session must set it. A child session must use the same value as its parent.
- create_time: Timestamp | None = None¶
Time when the session was created.
- last_activity_time: Timestamp | None = None¶
Time when the session’s item history was last mutated.
- metadata: Dict[str, str] | None = None¶
Mutable caller-defined string labels.
- name: str | None = None¶
Resource name in the form
session-stores/{session_store_id}/sessions/{session_id}.
- parent_session_id: str | None = None¶
Immediate parent session ID. Set only at creation for child sessions, immutable thereafter, and restricted to the same store.
- root_session_id: str | None = None¶
Top-level session ID in the spawn tree. This equals
session_idfor a root or fork and is inherited transitively by child sessions.
- session_id: str | None = None¶
Unique session ID. The service generates a UUID unless the caller supplies
CreateSessionRequest.session_id.
- update_time: Timestamp | None = None¶
Time when session resource fields last changed.
- as_dict() dict¶
Serializes the Session into a dictionary suitable for use as a JSON request body.
- as_shallow_dict() dict¶
Serializes the Session into a shallow dictionary of its immediate attributes.
- class databricks.sdk.service.mason.SessionItem(data: any, create_time: Timestamp | None = None, item_id: str | None = None)¶
A transcript entry in a session’s history.
- data: any¶
Complete SDK-native, JSON-compatible item. The service stores and returns this value without interpreting provider-specific fields such as
type,role, orcontent.
- create_time: Timestamp | None = None¶
Server-assigned time when the append commits. Values are nondecreasing within a session. Item listing orders by this timestamp; equal timestamps are resolved by committed append order.
- item_id: str | None = None¶
Stable service-generated item ID.
- as_dict() dict¶
Serializes the SessionItem into a dictionary suitable for use as a JSON request body.
- as_shallow_dict() dict¶
Serializes the SessionItem into a shallow dictionary of its immediate attributes.
- classmethod from_dict(d: Dict[str, Any]) SessionItem¶
Deserializes the SessionItem from a dictionary.
- class databricks.sdk.service.mason.SessionStore(create_time: Timestamp | None = None, creator_user_id: str | None = None, description: str | None = None, metadata: Dict[str, str] | None = None, name: str | None = None, update_time: Timestamp | None = None)¶
A workspace-scoped session store.
- create_time: Timestamp | None = None¶
Time when the store was created.
- creator_user_id: str | None = None¶
Workspace-local user ID of the authenticated principal that created the store. This is immutable server-set attribution and does not grant access; authorization is evaluated from the authenticated request context.
- description: str | None = None¶
Human-readable description of the session store.
- metadata: Dict[str, str] | None = None¶
Mutable caller-defined string labels.
- name: str | None = None¶
Resource name in the form
session-stores/{session_store_id}.
- update_time: Timestamp | None = None¶
Time when the store was last updated.
- as_dict() dict¶
Serializes the SessionStore into a dictionary suitable for use as a JSON request body.
- as_shallow_dict() dict¶
Serializes the SessionStore into a shallow dictionary of its immediate attributes.
- classmethod from_dict(d: Dict[str, Any]) SessionStore¶
Deserializes the SessionStore from a dictionary.
- class databricks.sdk.service.mason.StorageBackend(backend_id: str | None = None, backend_type: StorageBackendType | None = None)¶
Service-managed storage backing a managed memory store.
- backend_id: str | None = None¶
Backend-specific identifier. For Lakebase, this is the project ID.
- backend_type: StorageBackendType | None = None¶
Type of the storage backend.
- as_dict() dict¶
Serializes the StorageBackend into a dictionary suitable for use as a JSON request body.
- as_shallow_dict() dict¶
Serializes the StorageBackend into a shallow dictionary of its immediate attributes.
- classmethod from_dict(d: Dict[str, Any]) StorageBackend¶
Deserializes the StorageBackend from a dictionary.