# This file was auto-generated by Fern from our API Definition.

import typing

import pydantic
import typing_extensions
from ..core.pydantic_utilities import IS_PYDANTIC_V2, UniversalBaseModel
from ..core.serialization import FieldMetadata


class OwnedPhoneNumber(UniversalBaseModel):
    number: str = pydantic.Field()
    """
    Phone number in E.164 format.
    """

    sms: bool = pydantic.Field()
    """
    Whether SMS messaging is enabled.
    """

    mms: bool = pydantic.Field()
    """
    Whether MMS messaging is enabled.
    """

    voice: bool = pydantic.Field()
    """
    Whether voice calling is enabled.
    """

    is_sandbox: typing_extensions.Annotated[bool, FieldMetadata(alias="isSandbox")] = pydantic.Field()
    """
    Whether this is a sandbox phone number.
    """

    created_at: typing_extensions.Annotated[str, FieldMetadata(alias="createdAt")] = pydantic.Field()
    """
    ISO 8601 timestamp of when the phone number was added.
    """

    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
