# 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 .exotel_api_subdomain import ExotelApiSubdomain


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

    account_sid: str = pydantic.Field()
    """
    Exotel Account SID
    """

    api_key: str = pydantic.Field()
    """
    Exotel API Key
    """

    api_token: str = pydantic.Field()
    """
    Exotel API Token
    """

    api_subdomain: ExotelApiSubdomain = pydantic.Field()
    """
    Exotel region-specific API host
    """

    app_id: str = pydantic.Field()
    """
    Exotel applet identifier used in Calls/connect
    """

    applet_url: typing.Optional[str] = pydantic.Field(default=None)
    """
    Optional full applet URL override. Defaults to Exotel start_voice URL derived from account SID and app ID.
    """

    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
