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

from __future__ import annotations

import typing

import pydantic
from ..core.pydantic_utilities import IS_PYDANTIC_V2, update_forward_refs
from ..core.unchecked_base_model import UncheckedBaseModel
from .bucketing_status import BucketingStatus
from .test_run_result_summary import TestRunResultSummary
from .unit_test_run_response_model import UnitTestRunResponseModel


class GetTestSuiteInvocationResponseModel(UncheckedBaseModel):
    id: str
    agent_id: typing.Optional[str] = None
    branch_id: typing.Optional[str] = None
    created_at: typing.Optional[int] = None
    folder_id: typing.Optional[str] = None
    repeat_count: typing.Optional[int] = None
    bucketing_status: typing.Optional[BucketingStatus] = pydantic.Field(default=None)
    """
    None when repeat_count==1 (no bucketing). Otherwise tracks bucketing lifecycle.
    """

    result_groups: typing.Optional[typing.List[TestRunResultSummary]] = None
    test_runs: typing.List[UnitTestRunResponseModel]

    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


update_forward_refs(GetTestSuiteInvocationResponseModel)
