# 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 .message_volume_enum import MessageVolumeEnum
from .toll_free_campaign_schema_keywords import TollFreeCampaignSchemaKeywords
from .toll_free_campaign_schema_links import TollFreeCampaignSchemaLinks
from .toll_free_campaign_schema_opt_in import TollFreeCampaignSchemaOptIn
from .toll_free_campaign_schema_options import TollFreeCampaignSchemaOptions
from .toll_free_campaign_schema_use_case import TollFreeCampaignSchemaUseCase


class TollFreeCampaign(UniversalBaseModel):
    campaign_id: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="campaignId")] = pydantic.Field(
        default=None
    )
    """
    Unique identifier for the campaign. Must begin with the prefix `tf_`.
    """

    keywords: typing.Optional[TollFreeCampaignSchemaKeywords] = pydantic.Field(default=None)
    """
    Keyword response configuration.
    """

    links: typing.Optional[TollFreeCampaignSchemaLinks] = pydantic.Field(default=None)
    """
    Legal documentation links.
    """

    monthly_volume: typing_extensions.Annotated[
        typing.Optional[MessageVolumeEnum], FieldMetadata(alias="monthlyVolume")
    ] = None
    name: typing.Optional[str] = pydantic.Field(default=None)
    """
    Display name of the campaign. This is not sent to carriers for approval and is only used for your reference on the Pinnacle dashboard.
    """

    opt_in: typing_extensions.Annotated[typing.Optional[TollFreeCampaignSchemaOptIn], FieldMetadata(alias="optIn")] = (
        pydantic.Field(default=None)
    )
    """
    Opt-in method and workflow.
    """

    options: typing.Optional[TollFreeCampaignSchemaOptions] = pydantic.Field(default=None)
    """
    Campaign configuration options.
    """

    production_message_content: typing_extensions.Annotated[
        typing.Optional[str], FieldMetadata(alias="productionMessageContent")
    ] = pydantic.Field(default=None)
    """
    Example message(s) that would be sent in production. Should reflect the actual content users will receive. See the [Production Message Content](/guides/campaigns/opt-in-compliance#production-message-content) section for requirements.
    """

    use_case: typing_extensions.Annotated[
        typing.Optional[TollFreeCampaignSchemaUseCase], FieldMetadata(alias="useCase")
    ] = pydantic.Field(default=None)
    """
    Use case classification for the campaign.
    """

    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
