# This file was auto-generated by Fern from our API Definition.

import typing

import pydantic
from ..core.pydantic_utilities import IS_PYDANTIC_V2, UniversalBaseModel
from .motion_workspace import MotionWorkspace


class MotionDataInput(UniversalBaseModel):
    """
    Complete Motion sandbox data structure.

    Hierarchical structure for initialization:
    - Workspaces contain Projects
    - Projects contain Tasks
    - Tasks contain Comments

    Delete operation support:
    - Tasks: YES
    - Comments: YES
    - Projects: YES
    - Workspaces: NO (organization level, typically not deleted)
    """

    workspaces: typing.Optional[typing.List[MotionWorkspace]] = pydantic.Field(default=None)
    """
    List of workspaces with their projects and tasks
    """

    if IS_PYDANTIC_V2:
        model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True)  # type: ignore # Pydantic v2
    else:

        class Config:
            frozen = True
            smart_union = True
            extra = pydantic.Extra.allow
