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

import typing

import pydantic
from ..core.pydantic_utilities import UniversalBaseModel


class RatingMatch(UniversalBaseModel):
    """
    The result's rating is a match for the search query
    """

    color: typing.Optional[str] = pydantic.Field(default=None)
    """
    The color of the rating field
    """

    max_value: typing.Optional[int] = pydantic.Field(default=None)
    """
    The maximum rating of the rating field for the result
    """

    rating: int = pydantic.Field()
    """
    The rating of the result
    """

    style: typing.Optional[str] = pydantic.Field(default=None)
    """
    The style of the rating field
    """

    type: typing.Literal["rating_match"] = "rating_match"

    model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True)
