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

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


class SegmentFilter(UncheckedBaseModel):
    """
    A query filter to search for buyer-accessible appointment segments by.
    """

    service_variation_id: str = pydantic.Field()
    """
    The ID of the [CatalogItemVariation](entity:CatalogItemVariation) object representing the service booked in this segment.
    """

    team_member_id_filter: typing.Optional[FilterValue] = pydantic.Field(default=None)
    """
    A query filter to search for buyer-accessible appointment segments with service-providing team members matching the specified list of team member IDs.  Supported query expressions are
    - `ANY`: return the appointment segments with team members whose IDs match any member in this list.
    - `NONE`: return the appointment segments with team members whose IDs are not in this list.
    - `ALL`: not supported.
    
    When no expression is specified, any service-providing team member is eligible to fulfill the Booking.
    """

    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
