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

from __future__ import annotations
from .versionheader import VersionHeader
from gusto_app_integration.types import BaseModel
from gusto_app_integration.utils import (
    FieldMetadata,
    HeaderMetadata,
    PathParamMetadata,
    RequestMetadata,
)
import pydantic
from typing import Optional
from typing_extensions import Annotated, NotRequired, TypedDict


class PostV1PayrollsPayrollIDCalculateAccruingTimeOffHoursRequestBodyTypedDict(
    TypedDict
):
    regular_hours_worked: NotRequired[float]
    r"""regular hours worked in this pay period"""
    overtime_hours_worked: NotRequired[float]
    r"""overtime hours worked in this pay period"""
    double_overtime_hours_worked: NotRequired[float]
    r"""double overtime hours worked in this pay period"""
    pto_hours_used: NotRequired[float]
    r"""paid time off hours used in this pay period"""
    sick_hours_used: NotRequired[float]
    r"""sick hours used in this pay period"""


class PostV1PayrollsPayrollIDCalculateAccruingTimeOffHoursRequestBody(BaseModel):
    regular_hours_worked: Optional[float] = None
    r"""regular hours worked in this pay period"""

    overtime_hours_worked: Optional[float] = None
    r"""overtime hours worked in this pay period"""

    double_overtime_hours_worked: Optional[float] = None
    r"""double overtime hours worked in this pay period"""

    pto_hours_used: Optional[float] = None
    r"""paid time off hours used in this pay period"""

    sick_hours_used: Optional[float] = None
    r"""sick hours used in this pay period"""


class PostV1PayrollsPayrollIDCalculateAccruingTimeOffHoursRequestTypedDict(TypedDict):
    payroll_id: str
    r"""The UUID of the payroll"""
    employee_id: str
    r"""The UUID of the employee"""
    request_body: (
        PostV1PayrollsPayrollIDCalculateAccruingTimeOffHoursRequestBodyTypedDict
    )
    x_gusto_api_version: NotRequired[VersionHeader]
    r"""Determines the date-based API version associated with your API call. If none is provided, your application's [minimum API version](https://docs.gusto.com/embedded-payroll/docs/api-versioning#minimum-api-version) is used."""


class PostV1PayrollsPayrollIDCalculateAccruingTimeOffHoursRequest(BaseModel):
    payroll_id: Annotated[
        str, FieldMetadata(path=PathParamMetadata(style="simple", explode=False))
    ]
    r"""The UUID of the payroll"""

    employee_id: Annotated[
        str, FieldMetadata(path=PathParamMetadata(style="simple", explode=False))
    ]
    r"""The UUID of the employee"""

    request_body: Annotated[
        PostV1PayrollsPayrollIDCalculateAccruingTimeOffHoursRequestBody,
        FieldMetadata(request=RequestMetadata(media_type="application/json")),
    ]

    x_gusto_api_version: Annotated[
        Optional[VersionHeader],
        pydantic.Field(alias="X-Gusto-API-Version"),
        FieldMetadata(header=HeaderMetadata(style="simple", explode=False)),
    ] = VersionHeader.TWO_THOUSAND_AND_TWENTY_FOUR_MINUS_04_MINUS_01
    r"""Determines the date-based API version associated with your API call. If none is provided, your application's [minimum API version](https://docs.gusto.com/embedded-payroll/docs/api-versioning#minimum-api-version) is used."""
