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

import typing

import pydantic
from ..core.pydantic_utilities import IS_PYDANTIC_V2
from ..core.unchecked_base_model import UncheckedBaseModel


class DetectedEntity(UncheckedBaseModel):
    text: str = pydantic.Field()
    """
    The text that was identified as an entity.
    """

    entity_type: str = pydantic.Field()
    """
    The type of entity detected (e.g., 'credit_card', 'email_address', 'person_name').
    """

    start_char: int = pydantic.Field()
    """
    Start character position in the transcript text.
    """

    end_char: int = pydantic.Field()
    """
    End character position in the transcript text.
    """

    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
