# 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
from .article_search_highlights_highlighted_summary_item_item import ArticleSearchHighlightsHighlightedSummaryItemItem
from .article_search_highlights_highlighted_title_item import ArticleSearchHighlightsHighlightedTitleItem


class ArticleSearchHighlights(UncheckedBaseModel):
    """
    The highlighted results of an Article search. In the examples provided my search query is always "my query".
    """

    article_id: typing.Optional[str] = pydantic.Field(default=None)
    """
    The ID of the corresponding article.
    """

    highlighted_title: typing.Optional[typing.List[ArticleSearchHighlightsHighlightedTitleItem]] = pydantic.Field(
        default=None
    )
    """
    An Article title highlighted.
    """

    highlighted_summary: typing.Optional[
        typing.List[typing.List[ArticleSearchHighlightsHighlightedSummaryItemItem]]
    ] = pydantic.Field(default=None)
    """
    An Article description and body text highlighted.
    """

    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
