# 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 .single_filter_search_request_operator import SingleFilterSearchRequestOperator
from .single_filter_search_request_value import SingleFilterSearchRequestValue


class SingleFilterSearchRequest(UncheckedBaseModel):
    """
    Search using Intercoms Search APIs with a single filter.
    """

    field: typing.Optional[str] = pydantic.Field(default=None)
    """
    The accepted field that you want to search on.
    """

    operator: typing.Optional[SingleFilterSearchRequestOperator] = pydantic.Field(default=None)
    """
    The accepted operators you can use to define how you want to search for the value.
    """

    value: typing.Optional[SingleFilterSearchRequestValue] = pydantic.Field(default=None)
    """
    The value that you want to search on.
    """

    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
