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

from ..core.unchecked_base_model import UncheckedBaseModel
import typing
import pydantic
from ..core.pydantic_utilities import IS_PYDANTIC_V2


class CustomerTextFilter(UncheckedBaseModel):
    """
    A filter to select customers based on exact or fuzzy matching of
    customer attributes against a specified query. Depending on the customer attributes,
    the filter can be case-sensitive. This filter can be exact or fuzzy, but it cannot be both.
    """

    exact: typing.Optional[str] = pydantic.Field(default=None)
    """
    Use the exact filter to select customers whose attributes match exactly the specified query.
    """

    fuzzy: typing.Optional[str] = pydantic.Field(default=None)
    """
    Use the fuzzy filter to select customers whose attributes match the specified query 
    in a fuzzy manner. When the fuzzy option is used, search queries are tokenized, and then 
    each query token must be matched somewhere in the searched attribute. For single token queries, 
    this is effectively the same behavior as a partial match operation.
    """

    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
