Source code for lucidlink.filespace_models

"""
LucidLink Python Library - Filespace Type Definitions

Types for filespace identity and configuration.
"""

from dataclasses import dataclass
from enum import Enum
from typing import Optional

# Backwards-compat re-export — DaemonStatus moved to daemon_models.
from .daemon_models import DaemonStatus  # noqa: F401


[docs] @dataclass class CacheConfig: """Initial cache sizes to apply atomically when linking a filespace. Passed to ``Workspace.link_filespace(cache=...)``. Each field is optional and independent; a field left as ``None`` leaves the configured default in place. Sizes are in bytes. """ data_bytes: Optional[int] = None """Initial data cache size in bytes (must be a multiple of 1 MiB). Applied atomically during link; an invalid value rolls the link back and raises. ``None`` keeps the configured default.""" metadata_bytes: Optional[int] = None """Initial metadata cache size in bytes, applied atomically during link. ``None`` keeps the configured default."""
[docs] class SyncMode(Enum): """Controls whether changes are automatically synchronized to LucidLink services on close.""" SYNC_NONE = "none" """Do not sync automatically — caller must call ``sync_all()`` explicitly.""" SYNC_ALL = "all" """(default) Automatically call ``sync_all()`` before unlinking filespaces."""
[docs] @dataclass class FilespaceInfo: """Summary information for a filespace in a workspace listing. Returned by ``Workspace.list_filespaces()``. """ id: str """Unique filespace identifier.""" name: str """Human-readable filespace name.""" created: str """Creation timestamp (ISO 8601)."""