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

import typing

import pydantic
import typing_extensions
from ....core.pydantic_utilities import IS_PYDANTIC_V2
from ....core.serialization import FieldMetadata
from ....core.unchecked_base_model import UncheckedBaseModel
from .get_audience_id_members_search_response_data_search_info_search_type import (
    GetAudienceIdMembersSearchResponseDataSearchInfoSearchType,
)


class GetAudienceIdMembersSearchResponseDataSearchInfo(UncheckedBaseModel):
    """
    Information about the search performed
    """

    search_type: typing_extensions.Annotated[
        typing.Optional[GetAudienceIdMembersSearchResponseDataSearchInfoSearchType],
        FieldMetadata(alias="searchType"),
        pydantic.Field(alias="searchType", description="The type of search performed"),
    ] = None
    search_term: typing_extensions.Annotated[
        typing.Optional[str],
        FieldMetadata(alias="searchTerm"),
        pydantic.Field(alias="searchTerm", description="The search term(s) used"),
    ] = None
    search_fields: typing_extensions.Annotated[
        typing.Optional[typing.List[str]],
        FieldMetadata(alias="searchFields"),
        pydantic.Field(alias="searchFields", description="The specific fields searched (for field-specific searches)"),
    ] = None
    total_results: typing_extensions.Annotated[
        typing.Optional[int],
        FieldMetadata(alias="totalResults"),
        pydantic.Field(alias="totalResults", description="The number of results returned"),
    ] = None

    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
