# 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 .templates_create_agents_from_template_response_group_base_template_id import (
    TemplatesCreateAgentsFromTemplateResponseGroupBaseTemplateId,
)
from .templates_create_agents_from_template_response_group_deployment_id import (
    TemplatesCreateAgentsFromTemplateResponseGroupDeploymentId,
)
from .templates_create_agents_from_template_response_group_hidden import (
    TemplatesCreateAgentsFromTemplateResponseGroupHidden,
)
from .templates_create_agents_from_template_response_group_last_processed_message_id import (
    TemplatesCreateAgentsFromTemplateResponseGroupLastProcessedMessageId,
)
from .templates_create_agents_from_template_response_group_manager_agent_id import (
    TemplatesCreateAgentsFromTemplateResponseGroupManagerAgentId,
)
from .templates_create_agents_from_template_response_group_manager_type import (
    TemplatesCreateAgentsFromTemplateResponseGroupManagerType,
)
from .templates_create_agents_from_template_response_group_max_message_buffer_length import (
    TemplatesCreateAgentsFromTemplateResponseGroupMaxMessageBufferLength,
)
from .templates_create_agents_from_template_response_group_max_turns import (
    TemplatesCreateAgentsFromTemplateResponseGroupMaxTurns,
)
from .templates_create_agents_from_template_response_group_min_message_buffer_length import (
    TemplatesCreateAgentsFromTemplateResponseGroupMinMessageBufferLength,
)
from .templates_create_agents_from_template_response_group_project_id import (
    TemplatesCreateAgentsFromTemplateResponseGroupProjectId,
)
from .templates_create_agents_from_template_response_group_shared_block_ids import (
    TemplatesCreateAgentsFromTemplateResponseGroupSharedBlockIds,
)
from .templates_create_agents_from_template_response_group_sleeptime_agent_frequency import (
    TemplatesCreateAgentsFromTemplateResponseGroupSleeptimeAgentFrequency,
)
from .templates_create_agents_from_template_response_group_template_id import (
    TemplatesCreateAgentsFromTemplateResponseGroupTemplateId,
)
from .templates_create_agents_from_template_response_group_termination_token import (
    TemplatesCreateAgentsFromTemplateResponseGroupTerminationToken,
)
from .templates_create_agents_from_template_response_group_turns_counter import (
    TemplatesCreateAgentsFromTemplateResponseGroupTurnsCounter,
)


class TemplatesCreateAgentsFromTemplateResponseGroup(UncheckedBaseModel):
    id: str
    manager_type: TemplatesCreateAgentsFromTemplateResponseGroupManagerType
    agent_ids: typing.List[str]
    description: str
    project_id: typing.Optional[TemplatesCreateAgentsFromTemplateResponseGroupProjectId] = None
    template_id: typing.Optional[TemplatesCreateAgentsFromTemplateResponseGroupTemplateId] = None
    base_template_id: typing.Optional[TemplatesCreateAgentsFromTemplateResponseGroupBaseTemplateId] = None
    deployment_id: typing.Optional[TemplatesCreateAgentsFromTemplateResponseGroupDeploymentId] = None
    shared_block_ids: typing.Optional[TemplatesCreateAgentsFromTemplateResponseGroupSharedBlockIds] = None
    manager_agent_id: typing.Optional[TemplatesCreateAgentsFromTemplateResponseGroupManagerAgentId] = None
    termination_token: typing.Optional[TemplatesCreateAgentsFromTemplateResponseGroupTerminationToken] = None
    max_turns: typing.Optional[TemplatesCreateAgentsFromTemplateResponseGroupMaxTurns] = None
    sleeptime_agent_frequency: typing.Optional[
        TemplatesCreateAgentsFromTemplateResponseGroupSleeptimeAgentFrequency
    ] = None
    turns_counter: typing.Optional[TemplatesCreateAgentsFromTemplateResponseGroupTurnsCounter] = None
    last_processed_message_id: typing.Optional[TemplatesCreateAgentsFromTemplateResponseGroupLastProcessedMessageId] = (
        None
    )
    max_message_buffer_length: typing.Optional[TemplatesCreateAgentsFromTemplateResponseGroupMaxMessageBufferLength] = (
        None
    )
    min_message_buffer_length: typing.Optional[TemplatesCreateAgentsFromTemplateResponseGroupMinMessageBufferLength] = (
        None
    )
    hidden: typing.Optional[TemplatesCreateAgentsFromTemplateResponseGroupHidden] = None

    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
