# 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 .entity_type import EntityType


class AttachmentCreateInline(UniversalBaseModel):
    """
    Inline attachment configuration for rule creation.
    """

    entity_type: EntityType = pydantic.Field()
    """
    Type of entity to attach
    """

    entity_id: str = pydantic.Field()
    """
    ID of entity to attach
    """

    priority: typing.Optional[int] = pydantic.Field(default=None)
    """
    Priority (1-100, default 50)
    """

    character_limit: typing.Optional[int] = pydantic.Field(default=None)
    """
    Character limit for rule content (100-50000)
    """

    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
