# 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 .extended_brand import ExtendedBrand
from .rcs_campaign_schema_extra_agent import RcsCampaignSchemaExtraAgent
from .rcs_campaign_schema_extra_links import RcsCampaignSchemaExtraLinks
from .rcs_campaign_schema_extra_opt_in import RcsCampaignSchemaExtraOptIn
from .rcs_campaign_schema_extra_opt_out import RcsCampaignSchemaExtraOptOut
from .rcs_campaign_schema_extra_use_case import RcsCampaignSchemaExtraUseCase


class ExtendedRcsCampaign(UniversalBaseModel):
    agent: RcsCampaignSchemaExtraAgent = pydantic.Field()
    """
    Agent configured to the campaign.
    """

    agent_id: typing_extensions.Annotated[str, FieldMetadata(alias="agentId")] = pydantic.Field()
    """
    Agent's unique identifier.
    """

    brand: ExtendedBrand = pydantic.Field()
    """
    Brand associated with this campaign.
    """

    brand_attestation: typing_extensions.Annotated[bool, FieldMetadata(alias="brandAttestation")] = pydantic.Field()
    """
    Indicates whether the brand has provided an attestation.
    """

    campaign_id: typing_extensions.Annotated[int, FieldMetadata(alias="campaignId")] = pydantic.Field()
    """
    Unique identifier for the campaign.
    """

    expected_agent_responses: typing_extensions.Annotated[
        typing.Optional[typing.List[str]], FieldMetadata(alias="expectedAgentResponses")
    ] = pydantic.Field(default=None)
    """
    List of what the agent might say to users.
    """

    links: RcsCampaignSchemaExtraLinks = pydantic.Field()
    """
    Legal documentation links.
    """

    opt_in: typing_extensions.Annotated[RcsCampaignSchemaExtraOptIn, FieldMetadata(alias="optIn")] = pydantic.Field()
    """
    Opt-in configuration.
    """

    opt_out: typing_extensions.Annotated[RcsCampaignSchemaExtraOptOut, FieldMetadata(alias="optOut")] = pydantic.Field()
    """
    Opt-out configuration.
    """

    use_case: typing_extensions.Annotated[RcsCampaignSchemaExtraUseCase, FieldMetadata(alias="useCase")] = (
        pydantic.Field()
    )
    """
    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
