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

from ..core.unchecked_base_model import UncheckedBaseModel
import typing
from .shift_filter import ShiftFilter
import pydantic
from .shift_sort import ShiftSort
from ..core.pydantic_utilities import IS_PYDANTIC_V2


class ShiftQuery(UncheckedBaseModel):
    """
    The parameters of a `Shift` search query, which includes filter and sort options.

    Deprecated at Square API version 2025-05-21. See the [migration notes](https://developer.squareup.com/docs/labor-api/what-it-does#migration-notes).
    """

    filter: typing.Optional[ShiftFilter] = pydantic.Field(default=None)
    """
    Query filter options.
    """

    sort: typing.Optional[ShiftSort] = pydantic.Field(default=None)
    """
    Sort order details.
    """

    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
