# 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 .language_code import LanguageCode
from .outbound_call_config_tools_item import OutboundCallConfigToolsItem


class OutboundCallConfig(UncheckedBaseModel):
    """
    When an `agent` is provided, these `config` options override the agent settings.
    """

    agent: typing.Optional[str] = pydantic.Field(default=None)
    """
    The name of the agent to use for the call.
    """

    project: typing.Optional[str] = pydantic.Field(default=None)
    """
    The name of the project to use for the call.
    """

    welcome_message: typing.Optional[str] = pydantic.Field(default=None)
    """
    Message to play when the conversation starts. Can contain template variables like `{{customer_name}}`.
    """

    system_prompt: typing.Optional[str] = pydantic.Field(default=None)
    """
    Instructions for the conversation. Can contain template variables like `{{subject}}`.
    """

    template_variables: typing.Optional[typing.Dict[str, str]] = pydantic.Field(default=None)
    """
    Variables that can be used in the welcome message and the system prompt.
    """

    voice_id: typing.Optional[str] = pydantic.Field(default=None)
    """
    The voice ID to use for the agent.
    """

    no_input_poke_sec: typing.Optional[int] = pydantic.Field(default=None)
    """
    Number of seconds of silence before sending a poke message. `null` disables the poke message.
    """

    no_input_poke_text: typing.Optional[str] = pydantic.Field(default=None)
    """
    The message to send after the specified silence.
    """

    no_input_end_conversation_sec: typing.Optional[int] = pydantic.Field(default=None)
    """
    Seconds of silence before ending the conversation.
    """

    languages: typing.Optional[typing.List[LanguageCode]] = pydantic.Field(default=None)
    """
    Array of ISO 639-1 language codes that the agent should be able to recognize
    """

    boosted_keywords: typing.Optional[typing.List[str]] = pydantic.Field(default=None)
    """
    These words, or short phrases, will be more accurately recognized by the agent.
    """

    tools: typing.Optional[typing.List[OutboundCallConfigToolsItem]] = pydantic.Field(default=None)
    """
    Array of built-in or custom tool names to use.
    """

    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
