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

import typing

import pydantic
from ..core.pydantic_utilities import IS_PYDANTIC_V2
from ..core.unchecked_base_model import UncheckedBaseModel
from .agent_test_entity_type import AgentTestEntityType
from .agent_test_folder_path_segment_response_model import AgentTestFolderPathSegmentResponseModel
from .conversation_initiation_source import ConversationInitiationSource
from .resource_access_info import ResourceAccessInfo
from .test_type import TestType


class UnitTestSummaryResponseModel(UncheckedBaseModel):
    id: str = pydantic.Field()
    """
    The ID of the test
    """

    name: str = pydantic.Field()
    """
    Name of the test
    """

    access_info: typing.Optional[ResourceAccessInfo] = pydantic.Field(default=None)
    """
    The access information of the test
    """

    created_at_unix_secs: int = pydantic.Field()
    """
    Creation time of the test in unix seconds
    """

    last_updated_at_unix_secs: int = pydantic.Field()
    """
    Last update time of the test in unix seconds
    """

    type: TestType = pydantic.Field()
    """
    Type of the test or entity
    """

    entity_type: typing.Optional[AgentTestEntityType] = pydantic.Field(default=None)
    """
    The type of entity (test or folder)
    """

    folder_parent_id: typing.Optional[str] = pydantic.Field(default=None)
    """
    The ID of the parent folder
    """

    folder_path: typing.Optional[typing.List[AgentTestFolderPathSegmentResponseModel]] = pydantic.Field(default=None)
    """
    The folder path segments from root to this entity
    """

    children_count: typing.Optional[int] = pydantic.Field(default=None)
    """
    Number of direct children (tests and subfolders) for folders only
    """

    conversation_initiation_source: typing.Optional[ConversationInitiationSource] = pydantic.Field(default=None)
    """
    Channel the test simulates the conversation as. Null for folders or default behavior.
    """

    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
