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

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


class RcsFallback(UniversalBaseModel):
    from_: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="from")] = pydantic.Field(default=None)
    """
    The sender's phone number in E.164 format. Must be owned by the user.
    """

    text: typing.Optional[str] = pydantic.Field(default=None)
    """
    The fallback message content (max 1600 characters). One of 'text' or 'mediaUrls' must be provided.
    """

    media_urls: typing_extensions.Annotated[typing.Optional[typing.List[str]], FieldMetadata(alias="mediaUrls")] = (
        pydantic.Field(default=None)
    )
    """
    The URLs of media to include. One of 'text' or 'mediaUrls' must be provided. `jpeg`, `jpg`, `gif`, and `png` file types are fully supported and have a size limit of 5 MB. 500 KB limit for other types. Up to 10 media URLs can be included.
    """

    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
