# 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 .region_config_request import RegionConfigRequest


class CreateTwilioPhoneNumberRequest(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
    """

    agent_id: typing.Optional[str] = pydantic.Field(default=None)
    """
    Agent ID to assign the phone number to
    """

    sid: str = pydantic.Field()
    """
    Twilio Account SID
    """

    token: str = pydantic.Field()
    """
    Twilio Auth Token
    """

    region_config: typing.Optional[RegionConfigRequest] = pydantic.Field(default=None)
    """
    Twilio Additional Region Configuration
    """

    enable_sms: typing.Optional[bool] = pydantic.Field(default=None)
    """
    Route inbound SMS to ElevenLabs. On by default; set to false to skip SMS configuration for numbers that don't support it.
    """

    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
