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

from __future__ import annotations
from abbyy_document_ai.types import BaseModel
from datetime import date
import pydantic
from typing import Optional
from typing_extensions import Annotated, NotRequired, TypedDict


class PersonalEarningsStatementFieldsTypedDict(TypedDict):
    r"""Fields extracted from a personal earnings statement"""

    employee_name: NotRequired[str]
    r"""The employee's name"""
    employee_address: NotRequired[str]
    r"""The employee's address"""
    employer_identification_number: NotRequired[str]
    r"""The employer's identification number"""
    ssn: NotRequired[str]
    r"""The employee's Social Security Number"""
    employer_name: NotRequired[str]
    r"""The name of the employing organization"""
    employer_address: NotRequired[str]
    r"""The address of the employing organization"""
    reporting_period_start_date: NotRequired[date]
    r"""The start date of the reporting period"""
    reporting_period_end_date: NotRequired[date]
    r"""The end date of the reporting period"""
    pay_date: NotRequired[date]
    r"""The date of payment"""
    pay_rate: NotRequired[float]
    r"""The amount of salary paid for a unit of working time or for volume of work"""
    current_period_gross_pay: NotRequired[float]
    r"""The employee's total gross pay for the reporting period"""
    year_to_date_gross_pay: NotRequired[float]
    r"""The employee's total year-to-date gross pay"""
    current_period_total_deductions: NotRequired[float]
    r"""The total amount deducted from the salary (excluding taxes) for the reporting period"""
    current_period_total_taxes: NotRequired[float]
    r"""The total amount of tax withheld from the salary for the reporting period"""
    current_period_net_pay: NotRequired[float]
    r"""The employee's total net pay for the reporting period"""
    year_to_date_total_deductions: NotRequired[float]
    r"""The total amount deducted from the salary (excluding taxes) year-to-date"""
    year_to_date_total_taxes: NotRequired[float]
    r"""The total amount of tax withheld from the salary year-to-date"""
    year_to_date_net_pay: NotRequired[float]
    r"""The employee's total year-to-date net pay"""


class PersonalEarningsStatementFields(BaseModel):
    r"""Fields extracted from a personal earnings statement"""

    employee_name: Annotated[Optional[str], pydantic.Field(alias="employeeName")] = None
    r"""The employee's name"""

    employee_address: Annotated[
        Optional[str], pydantic.Field(alias="employeeAddress")
    ] = None
    r"""The employee's address"""

    employer_identification_number: Annotated[
        Optional[str], pydantic.Field(alias="employerIdentificationNumber")
    ] = None
    r"""The employer's identification number"""

    ssn: Optional[str] = None
    r"""The employee's Social Security Number"""

    employer_name: Annotated[Optional[str], pydantic.Field(alias="employerName")] = None
    r"""The name of the employing organization"""

    employer_address: Annotated[
        Optional[str], pydantic.Field(alias="employerAddress")
    ] = None
    r"""The address of the employing organization"""

    reporting_period_start_date: Annotated[
        Optional[date], pydantic.Field(alias="reportingPeriodStartDate")
    ] = None
    r"""The start date of the reporting period"""

    reporting_period_end_date: Annotated[
        Optional[date], pydantic.Field(alias="reportingPeriodEndDate")
    ] = None
    r"""The end date of the reporting period"""

    pay_date: Annotated[Optional[date], pydantic.Field(alias="payDate")] = None
    r"""The date of payment"""

    pay_rate: Annotated[Optional[float], pydantic.Field(alias="payRate")] = None
    r"""The amount of salary paid for a unit of working time or for volume of work"""

    current_period_gross_pay: Annotated[
        Optional[float], pydantic.Field(alias="currentPeriodGrossPay")
    ] = None
    r"""The employee's total gross pay for the reporting period"""

    year_to_date_gross_pay: Annotated[
        Optional[float], pydantic.Field(alias="yearToDateGrossPay")
    ] = None
    r"""The employee's total year-to-date gross pay"""

    current_period_total_deductions: Annotated[
        Optional[float], pydantic.Field(alias="currentPeriodTotalDeductions")
    ] = None
    r"""The total amount deducted from the salary (excluding taxes) for the reporting period"""

    current_period_total_taxes: Annotated[
        Optional[float], pydantic.Field(alias="currentPeriodTotalTaxes")
    ] = None
    r"""The total amount of tax withheld from the salary for the reporting period"""

    current_period_net_pay: Annotated[
        Optional[float], pydantic.Field(alias="currentPeriodNetPay")
    ] = None
    r"""The employee's total net pay for the reporting period"""

    year_to_date_total_deductions: Annotated[
        Optional[float], pydantic.Field(alias="yearToDateTotalDeductions")
    ] = None
    r"""The total amount deducted from the salary (excluding taxes) year-to-date"""

    year_to_date_total_taxes: Annotated[
        Optional[float], pydantic.Field(alias="yearToDateTotalTaxes")
    ] = None
    r"""The total amount of tax withheld from the salary year-to-date"""

    year_to_date_net_pay: Annotated[
        Optional[float], pydantic.Field(alias="yearToDateNetPay")
    ] = None
    r"""The employee's total year-to-date net pay"""
