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

from __future__ import annotations
from datetime import datetime
from enum import Enum
from gusto_app_integration.types import BaseModel
from typing import Optional
from typing_extensions import NotRequired, TypedDict


class PayrollType(str, Enum):
    r"""Whether it is regular pay period or transition pay period."""

    REGULAR = "regular"
    TRANSITION = "transition"


class PayPeriodPayrollTypedDict(TypedDict):
    r"""Information about the payroll for the pay period."""

    payroll_uuid: NotRequired[str]
    r"""The UUID of the payroll for this pay period."""
    check_date: NotRequired[str]
    r"""The date on which employees will be paid for the payroll if the payroll is submitted on time."""
    processed: NotRequired[bool]
    r"""Whether or not the payroll has been successfully processed. Note that processed payrolls cannot be updated. Additionally, a payroll is not guaranteed to be processed just because the payroll deadline has passed. Late payrolls are not uncommon. Conversely, users may choose to run payroll before the payroll deadline."""
    payroll_deadline: NotRequired[datetime]
    r"""The date by which payroll should be run for employees to be paid on time. Payroll data, such as time and attendance data, should be submitted on or before this date."""
    payroll_type: NotRequired[PayrollType]
    r"""Whether it is regular pay period or transition pay period."""


class PayPeriodPayroll(BaseModel):
    r"""Information about the payroll for the pay period."""

    payroll_uuid: Optional[str] = None
    r"""The UUID of the payroll for this pay period."""

    check_date: Optional[str] = None
    r"""The date on which employees will be paid for the payroll if the payroll is submitted on time."""

    processed: Optional[bool] = None
    r"""Whether or not the payroll has been successfully processed. Note that processed payrolls cannot be updated. Additionally, a payroll is not guaranteed to be processed just because the payroll deadline has passed. Late payrolls are not uncommon. Conversely, users may choose to run payroll before the payroll deadline."""

    payroll_deadline: Optional[datetime] = None
    r"""The date by which payroll should be run for employees to be paid on time. Payroll data, such as time and attendance data, should be submitted on or before this date."""

    payroll_type: Optional[PayrollType] = None
    r"""Whether it is regular pay period or transition pay period."""


class PayPeriodTypedDict(TypedDict):
    r"""The representation of a pay period."""

    start_date: NotRequired[str]
    r"""The start date, inclusive, of the pay period."""
    end_date: NotRequired[str]
    r"""The end date, inclusive, of the pay period."""
    pay_schedule_uuid: NotRequired[str]
    r"""A unique identifier of the pay schedule to which the pay period belongs."""
    payroll: NotRequired[PayPeriodPayrollTypedDict]
    r"""Information about the payroll for the pay period."""


class PayPeriod(BaseModel):
    r"""The representation of a pay period."""

    start_date: Optional[str] = None
    r"""The start date, inclusive, of the pay period."""

    end_date: Optional[str] = None
    r"""The end date, inclusive, of the pay period."""

    pay_schedule_uuid: Optional[str] = None
    r"""A unique identifier of the pay schedule to which the pay period belongs."""

    payroll: Optional[PayPeriodPayroll] = None
    r"""Information about the payroll for the pay period."""
