# 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 .task_response import TaskResponse
from .version_response import VersionResponse


class MigrateTasksResponse(UniversalBaseModel):
    """
    Response model for task migration operation.
    """

    branch_id: str = pydantic.Field()
    """
    Branch both versions belong to
    """

    from_version_id: typing.Optional[str] = pydantic.Field(default=None)
    """
    Source version (if bulk mode)
    """

    tasks: typing.List[TaskResponse] = pydantic.Field()
    """
    Migrated tasks
    """

    to_version: VersionResponse = pydantic.Field()
    """
    Target version details
    """

    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
