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

import typing

import pydantic
from ..core.pydantic_utilities import IS_PYDANTIC_V2, UniversalBaseModel
from .get_toll_free_campaign_status_response_updates import GetTollFreeCampaignStatusResponseUpdates


class TollFreeCampaignStatus(UniversalBaseModel):
    """
    Response for get toll-free campaign status.
    """

    error: typing.Optional[str] = pydantic.Field(default=None)
    """
    Summary of errors related to the verification process. <br>
    
    These errors may request additional information or point out erroneous and/or missing fields.
    """

    id: str = pydantic.Field()
    """
    The unique identifier of the toll-free campaign. This identifier is a string that always begins with the prefix `tf_`, for example: `tf_1234567890`.
    """

    updates: GetTollFreeCampaignStatusResponseUpdates = pydantic.Field()
    """
    Status of phone numbers that are being attached to this campaign. <br>
    
    Note that phone numbers can only be attached to `VERIFIED` campaigns via the [attach campaign endpoint](../phone-numbers/attach-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
