"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT."""

from __future__ import annotations
from .gethristimeoffbalancespositiveresponse import (
    GetHrisTimeOffBalancesPositiveResponse,
    GetHrisTimeOffBalancesPositiveResponseTypedDict,
)
from datetime import datetime
from kombo.types import BaseModel
from kombo.utils import FieldMetadata, HeaderMetadata, QueryParamMetadata
import pydantic
from typing import Awaitable, Callable, List, Optional, Union
from typing_extensions import Annotated, NotRequired, TypedDict


class GetHrisTimeOffBalancesGlobalsTypedDict(TypedDict):
    integration_id: NotRequired[str]
    r"""ID of the integration you want to interact with."""


class GetHrisTimeOffBalancesGlobals(BaseModel):
    integration_id: Annotated[
        Optional[str],
        pydantic.Field(alias="X-Integration-Id"),
        FieldMetadata(header=HeaderMetadata(style="simple", explode=False)),
    ] = None
    r"""ID of the integration you want to interact with."""


class GetHrisTimeOffBalancesRequestTypedDict(TypedDict):
    cursor: NotRequired[str]
    r"""An optional cursor string used for pagination. This can be retrieved from the `next` property of the previous page response."""
    page_size: NotRequired[int]
    r"""The number of results to return per page. Maximum is 250."""
    updated_after: NotRequired[datetime]
    r"""Filter the entries based on the modification date in format `YYYY-MM-DDTHH:mm:ss.sssZ`. Returns records where either the record itself **OR** its nested data has been updated since this timestamp, even if the record's own `changed_at` field remains unchanged.

    If you want to track entry deletion, also set the `include_deleted=true` query parameter, because otherwise, deleted entries will be hidden.

    For more details, see [Understanding changed_at vs updated_after Behavior](https://docs.kombo.dev/ats/getting-started/fetching-data#understanding-changed_at-vs-updated_after-behavior).
    """
    include_deleted: NotRequired[bool]
    r"""By default, deleted entries are not returned. Use the `include_deleted` query param to include deleted entries too."""
    ids: NotRequired[List[str]]
    r"""Filter by a comma-separated list of IDs such as `222k7eCGyUdgt2JWZDNnkDs3,B5DVmypWENfU6eMe6gYDyJG3`."""
    remote_ids: NotRequired[List[str]]
    r"""Filter by a comma-separated list of remote IDs."""
    employee_id: NotRequired[str]
    r"""Filter by a specific employee using their ID."""


class GetHrisTimeOffBalancesRequest(BaseModel):
    cursor: Annotated[
        Optional[str],
        FieldMetadata(query=QueryParamMetadata(style="form", explode=True)),
    ] = None
    r"""An optional cursor string used for pagination. This can be retrieved from the `next` property of the previous page response."""

    page_size: Annotated[
        Optional[int],
        FieldMetadata(query=QueryParamMetadata(style="form", explode=True)),
    ] = 100
    r"""The number of results to return per page. Maximum is 250."""

    updated_after: Annotated[
        Optional[datetime],
        FieldMetadata(query=QueryParamMetadata(style="form", explode=True)),
    ] = None
    r"""Filter the entries based on the modification date in format `YYYY-MM-DDTHH:mm:ss.sssZ`. Returns records where either the record itself **OR** its nested data has been updated since this timestamp, even if the record's own `changed_at` field remains unchanged.

    If you want to track entry deletion, also set the `include_deleted=true` query parameter, because otherwise, deleted entries will be hidden.

    For more details, see [Understanding changed_at vs updated_after Behavior](https://docs.kombo.dev/ats/getting-started/fetching-data#understanding-changed_at-vs-updated_after-behavior).
    """

    include_deleted: Annotated[
        Optional[bool],
        FieldMetadata(query=QueryParamMetadata(style="form", explode=True)),
    ] = False
    r"""By default, deleted entries are not returned. Use the `include_deleted` query param to include deleted entries too."""

    ids: Annotated[
        Optional[List[str]],
        FieldMetadata(query=QueryParamMetadata(style="form", explode=False)),
    ] = None
    r"""Filter by a comma-separated list of IDs such as `222k7eCGyUdgt2JWZDNnkDs3,B5DVmypWENfU6eMe6gYDyJG3`."""

    remote_ids: Annotated[
        Optional[List[str]],
        FieldMetadata(query=QueryParamMetadata(style="form", explode=False)),
    ] = None
    r"""Filter by a comma-separated list of remote IDs."""

    employee_id: Annotated[
        Optional[str],
        FieldMetadata(query=QueryParamMetadata(style="form", explode=True)),
    ] = None
    r"""Filter by a specific employee using their ID."""


class GetHrisTimeOffBalancesResponseTypedDict(TypedDict):
    result: GetHrisTimeOffBalancesPositiveResponseTypedDict


class GetHrisTimeOffBalancesResponse(BaseModel):
    next: Union[
        Callable[[], Optional[GetHrisTimeOffBalancesResponse]],
        Callable[[], Awaitable[Optional[GetHrisTimeOffBalancesResponse]]],
    ]

    result: GetHrisTimeOffBalancesPositiveResponse
