# 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
from ....types.message_schedule import MessageSchedule
from .blast_rcs_request_options_standalone_card import BlastRcsRequestOptionsStandaloneCard


class BlastRcsOptions(UniversalBaseModel):
    """
    Configure how your RCS blast is sent and tracked.
    """

    transcode: typing.Optional[bool] = pydantic.Field(default=None)
    """
    Media files and card media will be transcoded to a supported RCS format. This adds a small delay to sending the message. Ignored for rich text messages.
    """

    validate_: typing_extensions.Annotated[typing.Optional[bool], FieldMetadata(alias="validate")] = pydantic.Field(
        default=None
    )
    """
    Validate your message for any unsupported files. <br>
    
    If failed, errors will be thrown and the blast will not be sent.
    """

    standalone_card: typing.Optional[BlastRcsRequestOptionsStandaloneCard] = pydantic.Field(default=None)
    """
    Configure standalone card layout options for enhanced visual presentation.
    
    > **⚠️ Important Restriction**
    >
    > This option is **only valid for single card messages**. Using it with multiple cards will cause the request to fail with a validation error.
    """

    schedule: typing.Optional[MessageSchedule] = None

    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
