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

from .article_entity import ArticleEntity
import typing
from .similar_document import SimilarDocument
import pydantic
from ..core.pydantic_utilities import IS_PYDANTIC_V2


class SimilarArticleEntity(ArticleEntity):
    """
    The data model for an article result in the `Search similar` articles request. Response field behavior:
    - Required fields are guaranteed to be present and non-null.
    - Optional fields may be `null`/`undefined` if the data couldn't be extracted
    during processing.
    """

    similar_documents: typing.Optional[typing.List[SimilarDocument]] = pydantic.Field(default=None)
    """
    A list of documents similar to the article.
    """

    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
