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

import typing

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


class EmailActionSuggestion(UniversalBaseModel):
    """
    A single suggested action for an email.
    """

    id: str = pydantic.Field()
    """
    URL-slug identifier for the action
    """

    type: str = pydantic.Field()
    """
    Action type: reply, reply_all, forward, ignore, spam
    """

    label: str = pydantic.Field()
    """
    Short contextual label
    """

    description: str = pydantic.Field()
    """
    One-sentence description of the action
    """

    draft_instruction: typing.Optional[str] = pydantic.Field(default=None)
    """
    Instruction for AI draft generator
    """

    suggested_to: typing.Optional[typing.List[str]] = pydantic.Field(default=None)
    """
    Suggested recipients (for forward actions)
    """

    order: int = pydantic.Field()
    """
    Rank order (1 = top recommendation)
    """

    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
