# 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 .start_agents_request_properties_parameters_data_channel import StartAgentsRequestPropertiesParametersDataChannel
from .start_agents_request_properties_parameters_farewell_config import (
    StartAgentsRequestPropertiesParametersFarewellConfig,
)
from .start_agents_request_properties_parameters_silence_config import (
    StartAgentsRequestPropertiesParametersSilenceConfig,
)


class StartAgentsRequestPropertiesParameters(UncheckedBaseModel):
    """
    Agent configuration parameters.
    """

    silence_config: typing.Optional[StartAgentsRequestPropertiesParametersSilenceConfig] = pydantic.Field(default=None)
    """
    Settings related to agent silence behavior. Does not apply when you integrate a `mllm`.
    """

    farewell_config: typing.Optional[StartAgentsRequestPropertiesParametersFarewellConfig] = pydantic.Field(
        default=None
    )
    """
    Graceful hang-up settings for the agent.
    """

    data_channel: typing.Optional[StartAgentsRequestPropertiesParametersDataChannel] = pydantic.Field(default=None)
    """
    Agent data transmission channel:
    - `rtm`: Use RTM transmission. This configuration takes effect only when `advanced_features.enable_rtm` is `true`.
    - `datastream`: Use RTC data stream transport.
    """

    enable_metrics: typing.Optional[bool] = pydantic.Field(default=None)
    """
    Whether to receive agent performance data. This setting only takes effect when `advanced_features.enable_rtm` is `true`.
    """

    enable_error_message: typing.Optional[bool] = pydantic.Field(default=None)
    """
    Whether to receive agent error events. This setting only takes effect when `advanced_features.enable_rtm` is `true`.
    """

    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
