# 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 .get_phone_number_inbound_sip_trunk_config_response_model import GetPhoneNumberInboundSipTrunkConfigResponseModel
from .get_phone_number_outbound_sip_trunk_config_response_model import GetPhoneNumberOutboundSipTrunkConfigResponseModel
from .livekit_stack_type import LivekitStackType
from .phone_number_agent_info import PhoneNumberAgentInfo


class GetPhoneNumberSipTrunkResponseModel(UncheckedBaseModel):
    phone_number: str = pydantic.Field()
    """
    Phone number
    """

    label: str = pydantic.Field()
    """
    Label for the phone number
    """

    supports_inbound: typing.Optional[bool] = pydantic.Field(default=None)
    """
    This field is deprecated and will be removed in the future. Whether this phone number supports inbound calls
    """

    supports_outbound: typing.Optional[bool] = pydantic.Field(default=None)
    """
    This field is deprecated and will be removed in the future. Whether this phone number supports outbound calls
    """

    phone_number_id: str = pydantic.Field()
    """
    The ID of the phone number
    """

    assigned_agent: typing.Optional[PhoneNumberAgentInfo] = pydantic.Field(default=None)
    """
    The agent that is assigned to the phone number
    """

    provider_config: typing.Optional[GetPhoneNumberOutboundSipTrunkConfigResponseModel] = None
    outbound_trunk: typing.Optional[GetPhoneNumberOutboundSipTrunkConfigResponseModel] = pydantic.Field(default=None)
    """
    Configuration of the Outbound SIP trunk - if configured.
    """

    inbound_trunk: typing.Optional[GetPhoneNumberInboundSipTrunkConfigResponseModel] = pydantic.Field(default=None)
    """
    Configuration of the Inbound SIP trunk - if configured.
    """

    livekit_stack: LivekitStackType = pydantic.Field()
    """
    Type of Livekit stack used for this number.
    """

    store_sip_messages: typing.Optional[bool] = pydantic.Field(default=None)
    """
    Whether to store SIP messages for this phone number.
    """

    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
