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

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


class Boxes1520TypedDict(TypedDict):
    box15_employers_state_id_number: NotRequired[str]
    r"""Employer's state ID number"""
    box15_state: NotRequired[str]
    r"""State abbreviation"""
    box16_state_wages_tips: NotRequired[float]
    r"""State wages, tips, etc."""
    box17_state_income_tax: NotRequired[float]
    r"""State income tax"""
    box18_local_wages_tips: NotRequired[float]
    r"""Local wages, tips, etc."""
    box19_local_income_tax: NotRequired[float]
    r"""Local income tax"""
    box20_locality_name: NotRequired[str]
    r"""Locality name"""


class Boxes1520(BaseModel):
    box15_employers_state_id_number: Annotated[
        Optional[str], pydantic.Field(alias="box15EmployersStateIDNumber")
    ] = None
    r"""Employer's state ID number"""

    box15_state: Annotated[Optional[str], pydantic.Field(alias="box15State")] = None
    r"""State abbreviation"""

    box16_state_wages_tips: Annotated[
        Optional[float], pydantic.Field(alias="box16StateWagesTips")
    ] = None
    r"""State wages, tips, etc."""

    box17_state_income_tax: Annotated[
        Optional[float], pydantic.Field(alias="box17StateIncomeTax")
    ] = None
    r"""State income tax"""

    box18_local_wages_tips: Annotated[
        Optional[float], pydantic.Field(alias="box18LocalWagesTips")
    ] = None
    r"""Local wages, tips, etc."""

    box19_local_income_tax: Annotated[
        Optional[float], pydantic.Field(alias="box19LocalIncomeTax")
    ] = None
    r"""Local income tax"""

    box20_locality_name: Annotated[
        Optional[str], pydantic.Field(alias="box20LocalityName")
    ] = None
    r"""Locality name"""


class USFormW2FieldsTypedDict(TypedDict):
    r"""Fields extracted from a US Form W-2"""

    year: NotRequired[str]
    r"""The filing year"""
    box_a_employees_social_security_number: NotRequired[str]
    r"""The employee's social security number"""
    box_b_employer_identification_number_ein: NotRequired[str]
    r"""The employer's identification number"""
    box_c_employers_name: NotRequired[str]
    r"""The employer's name"""
    box_c_employers_address: NotRequired[str]
    r"""The employer's address"""
    box_d_control_number: NotRequired[str]
    r"""The control number"""
    box_e_employees_name: NotRequired[str]
    r"""The employee's first name, initial, and last name"""
    box_f_employees_address: NotRequired[str]
    r"""The employee's address"""
    box1_wages_tips_other_compensation: NotRequired[float]
    r"""Wages, tips, and other compensation"""
    box2_federal_income_tax_withheld: NotRequired[float]
    r"""Federal income tax withheld"""
    box3_social_security_wages: NotRequired[float]
    r"""Social security wages"""
    box4_social_security_tax_withheld: NotRequired[float]
    r"""Social security tax withheld"""
    box5_medicare_wages_and_tips: NotRequired[float]
    r"""Medicare wages and tips"""
    box6_medicare_tax_withheld: NotRequired[float]
    r"""Medicare tax withheld"""
    box7_social_security_tips: NotRequired[float]
    r"""Social security tips"""
    box8_allocated_tips: NotRequired[float]
    r"""Allocated tips"""
    box9_verification_code: NotRequired[str]
    r"""Verification code"""
    box10_dependent_care_benefits: NotRequired[float]
    r"""Dependent care benefits"""
    box11_nonqualified_plans: NotRequired[float]
    r"""Nonqualified plans"""
    box12a_code: NotRequired[str]
    r"""Single or double letter code"""
    box12a_amount: NotRequired[float]
    r"""Dollar amount"""
    box12b_code: NotRequired[str]
    r"""Single or double letter code"""
    box12b_amount: NotRequired[float]
    r"""Dollar amount"""
    box12c_code: NotRequired[str]
    r"""Single or double letter code"""
    box12c_amount: NotRequired[float]
    r"""Dollar amount"""
    box12d_code: NotRequired[str]
    r"""Single or double letter code"""
    box12d_amount: NotRequired[float]
    r"""Dollar amount"""
    box13_statutory_employee: NotRequired[bool]
    r"""Indicates whether the employee works full-time or part-time"""
    box13_retirement_plan: NotRequired[bool]
    r"""Indicates whether the employee participates in a pension or retirement plan"""
    box13_third_party_sick_pay: NotRequired[bool]
    r"""Indicates whether the employer is a third-party sick pay payer"""
    box14_other: NotRequired[str]
    r"""Additional information"""
    boxes1520: NotRequired[List[Boxes1520TypedDict]]


class USFormW2Fields(BaseModel):
    r"""Fields extracted from a US Form W-2"""

    year: Optional[str] = None
    r"""The filing year"""

    box_a_employees_social_security_number: Annotated[
        Optional[str], pydantic.Field(alias="boxAEmployeesSocialSecurityNumber")
    ] = None
    r"""The employee's social security number"""

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

    box_c_employers_name: Annotated[
        Optional[str], pydantic.Field(alias="boxCEmployersName")
    ] = None
    r"""The employer's name"""

    box_c_employers_address: Annotated[
        Optional[str], pydantic.Field(alias="boxCEmployersAddress")
    ] = None
    r"""The employer's address"""

    box_d_control_number: Annotated[
        Optional[str], pydantic.Field(alias="boxDControlNumber")
    ] = None
    r"""The control number"""

    box_e_employees_name: Annotated[
        Optional[str], pydantic.Field(alias="boxEEmployeesName")
    ] = None
    r"""The employee's first name, initial, and last name"""

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

    box1_wages_tips_other_compensation: Annotated[
        Optional[float], pydantic.Field(alias="box1WagesTipsOtherCompensation")
    ] = None
    r"""Wages, tips, and other compensation"""

    box2_federal_income_tax_withheld: Annotated[
        Optional[float], pydantic.Field(alias="box2FederalIncomeTaxWithheld")
    ] = None
    r"""Federal income tax withheld"""

    box3_social_security_wages: Annotated[
        Optional[float], pydantic.Field(alias="box3SocialSecurityWages")
    ] = None
    r"""Social security wages"""

    box4_social_security_tax_withheld: Annotated[
        Optional[float], pydantic.Field(alias="box4SocialSecurityTaxWithheld")
    ] = None
    r"""Social security tax withheld"""

    box5_medicare_wages_and_tips: Annotated[
        Optional[float], pydantic.Field(alias="box5MedicareWagesAndTips")
    ] = None
    r"""Medicare wages and tips"""

    box6_medicare_tax_withheld: Annotated[
        Optional[float], pydantic.Field(alias="box6MedicareTaxWithheld")
    ] = None
    r"""Medicare tax withheld"""

    box7_social_security_tips: Annotated[
        Optional[float], pydantic.Field(alias="box7SocialSecurityTips")
    ] = None
    r"""Social security tips"""

    box8_allocated_tips: Annotated[
        Optional[float], pydantic.Field(alias="box8AllocatedTips")
    ] = None
    r"""Allocated tips"""

    box9_verification_code: Annotated[
        Optional[str], pydantic.Field(alias="box9VerificationCode")
    ] = None
    r"""Verification code"""

    box10_dependent_care_benefits: Annotated[
        Optional[float], pydantic.Field(alias="box10DependentCareBenefits")
    ] = None
    r"""Dependent care benefits"""

    box11_nonqualified_plans: Annotated[
        Optional[float], pydantic.Field(alias="box11NonqualifiedPlans")
    ] = None
    r"""Nonqualified plans"""

    box12a_code: Annotated[Optional[str], pydantic.Field(alias="box12aCode")] = None
    r"""Single or double letter code"""

    box12a_amount: Annotated[Optional[float], pydantic.Field(alias="box12aAmount")] = (
        None
    )
    r"""Dollar amount"""

    box12b_code: Annotated[Optional[str], pydantic.Field(alias="box12bCode")] = None
    r"""Single or double letter code"""

    box12b_amount: Annotated[Optional[float], pydantic.Field(alias="box12bAmount")] = (
        None
    )
    r"""Dollar amount"""

    box12c_code: Annotated[Optional[str], pydantic.Field(alias="box12cCode")] = None
    r"""Single or double letter code"""

    box12c_amount: Annotated[Optional[float], pydantic.Field(alias="box12cAmount")] = (
        None
    )
    r"""Dollar amount"""

    box12d_code: Annotated[Optional[str], pydantic.Field(alias="box12dCode")] = None
    r"""Single or double letter code"""

    box12d_amount: Annotated[Optional[float], pydantic.Field(alias="box12dAmount")] = (
        None
    )
    r"""Dollar amount"""

    box13_statutory_employee: Annotated[
        Optional[bool], pydantic.Field(alias="box13StatutoryEmployee")
    ] = None
    r"""Indicates whether the employee works full-time or part-time"""

    box13_retirement_plan: Annotated[
        Optional[bool], pydantic.Field(alias="box13RetirementPlan")
    ] = None
    r"""Indicates whether the employee participates in a pension or retirement plan"""

    box13_third_party_sick_pay: Annotated[
        Optional[bool], pydantic.Field(alias="box13ThirdPartySickPay")
    ] = None
    r"""Indicates whether the employer is a third-party sick pay payer"""

    box14_other: Annotated[Optional[str], pydantic.Field(alias="box14Other")] = None
    r"""Additional information"""

    boxes1520: Optional[List[Boxes1520]] = None
