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

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


class CustomerCustomAttributeFilters(UncheckedBaseModel):
    """
    The custom attribute filters in a set of [customer filters](entity:CustomerFilter) used in a search query. Use this filter
    to search based on [custom attributes](entity:CustomAttribute) that are assigned to customer profiles. For more information, see
    [Search by custom attribute](https://developer.squareup.com/docs/customers-api/use-the-api/search-customers#search-by-custom-attribute).
    """

    filters: typing.Optional[typing.List[CustomerCustomAttributeFilter]] = pydantic.Field(default=None)
    """
    The custom attribute filters. Each filter must specify `key` and include the `filter` field with a type-specific filter,
    the `updated_at` field, or both. The provided keys must be unique within the list of custom attribute filters.
    """

    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
