"""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 List, Optional, Union
from typing_extensions import Annotated, NotRequired, TypeAliasType, TypedDict


class USForm1040FieldsFormTypedDict(TypedDict):
    r"""Specifies whether the form is 1040 or 1040-SR"""

    one_thousand_and_forty: NotRequired[bool]
    one_thousand_and_forty_sr: NotRequired[bool]


class USForm1040FieldsForm(BaseModel):
    r"""Specifies whether the form is 1040 or 1040-SR"""

    one_thousand_and_forty: Annotated[Optional[bool], pydantic.Field(alias="1040")] = (
        None
    )

    one_thousand_and_forty_sr: Annotated[
        Optional[bool], pydantic.Field(alias="1040Sr")
    ] = None


class USForm1040FieldsFilingStatusTypedDict(TypedDict):
    r"""The taxpayer's filing status"""

    head_of_household: NotRequired[bool]
    married_filing_jointly: NotRequired[bool]
    married_filing_separately: NotRequired[bool]
    qualifying_surviving_spouse: NotRequired[bool]
    single: NotRequired[bool]


class USForm1040FieldsFilingStatus(BaseModel):
    r"""The taxpayer's filing status"""

    head_of_household: Annotated[
        Optional[bool], pydantic.Field(alias="headOfHousehold")
    ] = None

    married_filing_jointly: Annotated[
        Optional[bool], pydantic.Field(alias="marriedFilingJointly")
    ] = None

    married_filing_separately: Annotated[
        Optional[bool], pydantic.Field(alias="marriedFilingSeparately")
    ] = None

    qualifying_surviving_spouse: Annotated[
        Optional[bool], pydantic.Field(alias="qualifyingSurvivingSpouse")
    ] = None

    single: Optional[bool] = None


class USForm1040FieldsSpouseTypedDict(TypedDict):
    r"""The name and social security number of the taxpayer's spouse (if filing jointly)"""

    spouses_first_name: NotRequired[str]
    r"""Spouse's first name"""
    spouses_last_name: NotRequired[str]
    r"""Spouse's last name"""
    spouses_ssn: NotRequired[str]
    r"""Spouse's SSN"""


class USForm1040FieldsSpouse(BaseModel):
    r"""The name and social security number of the taxpayer's spouse (if filing jointly)"""

    spouses_first_name: Annotated[
        Optional[str], pydantic.Field(alias="spousesFirstName")
    ] = None
    r"""Spouse's first name"""

    spouses_last_name: Annotated[
        Optional[str], pydantic.Field(alias="spousesLastName")
    ] = None
    r"""Spouse's last name"""

    spouses_ssn: Annotated[Optional[str], pydantic.Field(alias="spousesSsn")] = None
    r"""Spouse's SSN"""


class USForm1040FieldsAddressTypedDict(TypedDict):
    r"""The taxpayer's address"""

    home_address: NotRequired[str]
    r"""Home address"""
    apartment_number: NotRequired[str]
    r"""Apartment number"""
    city_town_or_post_office: NotRequired[str]
    r"""City, town or post office"""
    state: NotRequired[str]
    r"""State"""
    zip_code: NotRequired[str]
    r"""ZIP code"""
    foreign_country_name: NotRequired[str]
    r"""Foreign country name"""
    foreign_province_or_state_or_country: NotRequired[str]
    r"""Foreign province or state or country"""
    foreign_postal_code: NotRequired[str]
    r"""Foreign postal code"""


class USForm1040FieldsAddress(BaseModel):
    r"""The taxpayer's address"""

    home_address: Annotated[Optional[str], pydantic.Field(alias="homeAddress")] = None
    r"""Home address"""

    apartment_number: Annotated[
        Optional[str], pydantic.Field(alias="apartmentNumber")
    ] = None
    r"""Apartment number"""

    city_town_or_post_office: Annotated[
        Optional[str], pydantic.Field(alias="cityTownOrPostOffice")
    ] = None
    r"""City, town or post office"""

    state: Optional[str] = None
    r"""State"""

    zip_code: Annotated[Optional[str], pydantic.Field(alias="zipCode")] = None
    r"""ZIP code"""

    foreign_country_name: Annotated[
        Optional[str], pydantic.Field(alias="foreignCountryName")
    ] = None
    r"""Foreign country name"""

    foreign_province_or_state_or_country: Annotated[
        Optional[str], pydantic.Field(alias="foreignProvinceOrStateOrCountry")
    ] = None
    r"""Foreign province or state or country"""

    foreign_postal_code: Annotated[
        Optional[str], pydantic.Field(alias="foreignPostalCode")
    ] = None
    r"""Foreign postal code"""


class USForm1040FieldsPresidentialElectionCampaignTypedDict(TypedDict):
    r"""Indicates whether payments have been made to a Presidential election camping fund by the taxpayer or his/her spouse (if filing jointly)"""

    you: NotRequired[bool]
    r"""Indicates whether payments have been made to a Presidential election camping fund by the taxpayer"""
    spouse: NotRequired[bool]
    r"""Indicates whether payments have been made to a Presidential election camping fund by the spouse"""


class USForm1040FieldsPresidentialElectionCampaign(BaseModel):
    r"""Indicates whether payments have been made to a Presidential election camping fund by the taxpayer or his/her spouse (if filing jointly)"""

    you: Optional[bool] = None
    r"""Indicates whether payments have been made to a Presidential election camping fund by the taxpayer"""

    spouse: Optional[bool] = None
    r"""Indicates whether payments have been made to a Presidential election camping fund by the spouse"""


class DigitalAssetsTypedDict(TypedDict):
    r"""Indicates whether there was any income related to virtual currencies for the reporting period"""

    yes: bool
    no: bool


class DigitalAssets(BaseModel):
    r"""Indicates whether there was any income related to virtual currencies for the reporting period"""

    yes: bool

    no: bool


class USForm1040FieldsSomeoneCanClaimTypedDict(TypedDict):
    r"""Indicates whether the taxpayer and/or their spouse can be claimed as dependents"""

    you_as_a_dependent: NotRequired[bool]
    r"""Indicates whether the taxpayer can be claimed as a dependent"""
    your_spouse_as_a_dependent: NotRequired[bool]
    r"""Indicates whether the spouse can be claimed as a dependent"""


class USForm1040FieldsSomeoneCanClaim(BaseModel):
    r"""Indicates whether the taxpayer and/or their spouse can be claimed as dependents"""

    you_as_a_dependent: Annotated[
        Optional[bool], pydantic.Field(alias="youAsADependent")
    ] = None
    r"""Indicates whether the taxpayer can be claimed as a dependent"""

    your_spouse_as_a_dependent: Annotated[
        Optional[bool], pydantic.Field(alias="yourSpouseAsADependent")
    ] = None
    r"""Indicates whether the spouse can be claimed as a dependent"""


class USForm1040FieldsYouTypedDict(TypedDict):
    r"""Indicates whether the taxpayer was born before January 2, 1958, and whether he/she is blind"""

    born_before_january21958: NotRequired[bool]
    r"""Indicates whether the taxpayer was born before January 2, 1958"""
    blind: NotRequired[bool]
    r"""Indicates whether the taxpayer is blind"""


class USForm1040FieldsYou(BaseModel):
    r"""Indicates whether the taxpayer was born before January 2, 1958, and whether he/she is blind"""

    born_before_january21958: Annotated[
        Optional[bool], pydantic.Field(alias="bornBeforeJanuary21958")
    ] = None
    r"""Indicates whether the taxpayer was born before January 2, 1958"""

    blind: Optional[bool] = None
    r"""Indicates whether the taxpayer is blind"""


class USForm1040Fields2SpouseTypedDict(TypedDict):
    r"""Indicates whether the spouse was born before January 2, 1958, and whether he/she is blind"""

    born_before_january21958: NotRequired[bool]
    r"""Indicates whether the spouse was born before January 2, 1958"""
    blind: NotRequired[bool]
    r"""Indicates whether the spouse is blind"""


class USForm1040Fields2Spouse(BaseModel):
    r"""Indicates whether the spouse was born before January 2, 1958, and whether he/she is blind"""

    born_before_january21958: Annotated[
        Optional[bool], pydantic.Field(alias="bornBeforeJanuary21958")
    ] = None
    r"""Indicates whether the spouse was born before January 2, 1958"""

    blind: Optional[bool] = None
    r"""Indicates whether the spouse is blind"""


class USForm1040FieldsAgeOrBlindnessTypedDict(TypedDict):
    r"""Indicates whether the taxpayer or his/her spouse (if filing jointly) was born before January 2, 1958, and whether he/she is blind"""

    you: NotRequired[USForm1040FieldsYouTypedDict]
    r"""Indicates whether the taxpayer was born before January 2, 1958, and whether he/she is blind"""
    spouse: NotRequired[USForm1040Fields2SpouseTypedDict]
    r"""Indicates whether the spouse was born before January 2, 1958, and whether he/she is blind"""


class USForm1040FieldsAgeOrBlindness(BaseModel):
    r"""Indicates whether the taxpayer or his/her spouse (if filing jointly) was born before January 2, 1958, and whether he/she is blind"""

    you: Optional[USForm1040FieldsYou] = None
    r"""Indicates whether the taxpayer was born before January 2, 1958, and whether he/she is blind"""

    spouse: Optional[USForm1040Fields2Spouse] = None
    r"""Indicates whether the spouse was born before January 2, 1958, and whether he/she is blind"""


class USForm1040FieldsStandardDeductionTypedDict(TypedDict):
    r"""Standard deduction information"""

    someone_can_claim: NotRequired[USForm1040FieldsSomeoneCanClaimTypedDict]
    r"""Indicates whether the taxpayer and/or their spouse can be claimed as dependents"""
    separate_return_or_dual_status_alien: NotRequired[bool]
    r"""Indicates whether the taxpayer is filing for separate returns and whether the taxpayer is a dual-status alien"""
    age_or_blindness: NotRequired[USForm1040FieldsAgeOrBlindnessTypedDict]
    r"""Indicates whether the taxpayer or his/her spouse (if filing jointly) was born before January 2, 1958, and whether he/she is blind"""
    more_than_four_dependents: NotRequired[bool]
    r"""Indicated whether the taxpayer has more than four dependents"""


class USForm1040FieldsStandardDeduction(BaseModel):
    r"""Standard deduction information"""

    someone_can_claim: Annotated[
        Optional[USForm1040FieldsSomeoneCanClaim],
        pydantic.Field(alias="someoneCanClaim"),
    ] = None
    r"""Indicates whether the taxpayer and/or their spouse can be claimed as dependents"""

    separate_return_or_dual_status_alien: Annotated[
        Optional[bool], pydantic.Field(alias="separateReturnOrDualStatusAlien")
    ] = None
    r"""Indicates whether the taxpayer is filing for separate returns and whether the taxpayer is a dual-status alien"""

    age_or_blindness: Annotated[
        Optional[USForm1040FieldsAgeOrBlindness], pydantic.Field(alias="ageOrBlindness")
    ] = None
    r"""Indicates whether the taxpayer or his/her spouse (if filing jointly) was born before January 2, 1958, and whether he/she is blind"""

    more_than_four_dependents: Annotated[
        Optional[bool], pydantic.Field(alias="moreThanFourDependents")
    ] = None
    r"""Indicated whether the taxpayer has more than four dependents"""


class USForm1040FieldsDependentsTypedDict(TypedDict):
    r"""Information about the dependents"""

    full_name: NotRequired[str]
    r"""Dependent's full name"""
    ssn: NotRequired[str]
    r"""Dependent's SSN"""
    relationship: NotRequired[str]
    r"""Relationship to taxpayer"""
    child_tax_credit: NotRequired[bool]
    r"""Child tax credit eligibility"""
    credit_for_other_dependents: NotRequired[bool]
    r"""Credit for other dependents eligibility"""


class USForm1040FieldsDependents(BaseModel):
    r"""Information about the dependents"""

    full_name: Annotated[Optional[str], pydantic.Field(alias="fullName")] = None
    r"""Dependent's full name"""

    ssn: Optional[str] = None
    r"""Dependent's SSN"""

    relationship: Optional[str] = None
    r"""Relationship to taxpayer"""

    child_tax_credit: Annotated[
        Optional[bool], pydantic.Field(alias="childTaxCredit")
    ] = None
    r"""Child tax credit eligibility"""

    credit_for_other_dependents: Annotated[
        Optional[bool], pydantic.Field(alias="creditForOtherDependents")
    ] = None
    r"""Credit for other dependents eligibility"""


class Box1GroupTypedDict(TypedDict):
    r"""Box 1 group information"""

    box1a_total_amount_from_form_w2_box1: NotRequired[float]
    r"""Total amount from Form W-2 Box 1"""
    box1b_household_employee_wages: NotRequired[float]
    r"""Household employee wages"""
    box1c_tip_income: NotRequired[float]
    r"""Tip income"""
    box1d_medicaid_waiver_payments: NotRequired[float]
    r"""Medicaid waiver payments"""
    box1e_taxable_dependent_care_benefits_from_form2441: NotRequired[float]
    r"""Taxable dependent care benefits from Form 2441"""
    box1f_employer_provided_adoption_benefits_from_form8839: NotRequired[float]
    r"""Employer-provided adoption benefits from Form 8839"""
    box1g_wages_from_form8919: NotRequired[float]
    r"""Wages from Form 8919"""
    box1h_other_earned_income: NotRequired[float]
    r"""Other earned income"""
    box1i_nontaxable_combat_pay_election: NotRequired[float]
    r"""Nontaxable combat pay election"""
    box1z_group_total: NotRequired[float]
    r"""Group total"""


class Box1Group(BaseModel):
    r"""Box 1 group information"""

    box1a_total_amount_from_form_w2_box1: Annotated[
        Optional[float], pydantic.Field(alias="box1aTotalAmountFromFormW2Box1")
    ] = None
    r"""Total amount from Form W-2 Box 1"""

    box1b_household_employee_wages: Annotated[
        Optional[float], pydantic.Field(alias="box1bHouseholdEmployeeWages")
    ] = None
    r"""Household employee wages"""

    box1c_tip_income: Annotated[
        Optional[float], pydantic.Field(alias="box1cTipIncome")
    ] = None
    r"""Tip income"""

    box1d_medicaid_waiver_payments: Annotated[
        Optional[float], pydantic.Field(alias="box1dMedicaidWaiverPayments")
    ] = None
    r"""Medicaid waiver payments"""

    box1e_taxable_dependent_care_benefits_from_form2441: Annotated[
        Optional[float],
        pydantic.Field(alias="box1eTaxableDependentCareBenefitsFromForm2441"),
    ] = None
    r"""Taxable dependent care benefits from Form 2441"""

    box1f_employer_provided_adoption_benefits_from_form8839: Annotated[
        Optional[float],
        pydantic.Field(alias="box1fEmployerProvidedAdoptionBenefitsFromForm8839"),
    ] = None
    r"""Employer-provided adoption benefits from Form 8839"""

    box1g_wages_from_form8919: Annotated[
        Optional[float], pydantic.Field(alias="box1gWagesFromForm8919")
    ] = None
    r"""Wages from Form 8919"""

    box1h_other_earned_income: Annotated[
        Optional[float], pydantic.Field(alias="box1hOtherEarnedIncome")
    ] = None
    r"""Other earned income"""

    box1i_nontaxable_combat_pay_election: Annotated[
        Optional[float], pydantic.Field(alias="box1iNontaxableCombatPayElection")
    ] = None
    r"""Nontaxable combat pay election"""

    box1z_group_total: Annotated[
        Optional[float], pydantic.Field(alias="box1zGroupTotal")
    ] = None
    r"""Group total"""


class Box2GroupTypedDict(TypedDict):
    r"""Box 2 group information"""

    box2a_tax_exempt_interest: NotRequired[float]
    r"""Tax-exempt interest"""
    box2b_taxable_interest: NotRequired[float]
    r"""Taxable interest"""


class Box2Group(BaseModel):
    r"""Box 2 group information"""

    box2a_tax_exempt_interest: Annotated[
        Optional[float], pydantic.Field(alias="box2aTaxExemptInterest")
    ] = None
    r"""Tax-exempt interest"""

    box2b_taxable_interest: Annotated[
        Optional[float], pydantic.Field(alias="box2bTaxableInterest")
    ] = None
    r"""Taxable interest"""


class Box3GroupTypedDict(TypedDict):
    r"""Box 3 group information"""

    box3a_qualified_dividends: NotRequired[float]
    r"""Qualified dividends"""
    box3b_ordinary_dividends: NotRequired[float]
    r"""Ordinary dividends"""


class Box3Group(BaseModel):
    r"""Box 3 group information"""

    box3a_qualified_dividends: Annotated[
        Optional[float], pydantic.Field(alias="box3aQualifiedDividends")
    ] = None
    r"""Qualified dividends"""

    box3b_ordinary_dividends: Annotated[
        Optional[float], pydantic.Field(alias="box3bOrdinaryDividends")
    ] = None
    r"""Ordinary dividends"""


class Box4GroupTypedDict(TypedDict):
    r"""Box 4 group information"""

    box4a_ira_distributions: NotRequired[float]
    r"""IRA distributions"""
    box4b_taxable_amount: NotRequired[float]
    r"""Taxable amount"""


class Box4Group(BaseModel):
    r"""Box 4 group information"""

    box4a_ira_distributions: Annotated[
        Optional[float], pydantic.Field(alias="box4aIraDistributions")
    ] = None
    r"""IRA distributions"""

    box4b_taxable_amount: Annotated[
        Optional[float], pydantic.Field(alias="box4bTaxableAmount")
    ] = None
    r"""Taxable amount"""


class Box5GroupTypedDict(TypedDict):
    r"""Box 5 group information"""

    box5a_pensions_and_annuities: NotRequired[float]
    r"""Pensions and annuities"""
    box5b_taxable_amount: NotRequired[float]
    r"""Taxable amount"""


class Box5Group(BaseModel):
    r"""Box 5 group information"""

    box5a_pensions_and_annuities: Annotated[
        Optional[float], pydantic.Field(alias="box5aPensionsAndAnnuities")
    ] = None
    r"""Pensions and annuities"""

    box5b_taxable_amount: Annotated[
        Optional[float], pydantic.Field(alias="box5bTaxableAmount")
    ] = None
    r"""Taxable amount"""


class Box6GroupTypedDict(TypedDict):
    r"""Box 6 group information"""

    box6a_social_security_benefits: NotRequired[float]
    r"""Social Security benefits"""
    box6b_taxable_amount: NotRequired[float]
    r"""Taxable amount"""
    box6c_use_the_lump_sum_election_method: NotRequired[bool]
    r"""Use the lump-sum election method"""


class Box6Group(BaseModel):
    r"""Box 6 group information"""

    box6a_social_security_benefits: Annotated[
        Optional[float], pydantic.Field(alias="box6aSocialSecurityBenefits")
    ] = None
    r"""Social Security benefits"""

    box6b_taxable_amount: Annotated[
        Optional[float], pydantic.Field(alias="box6bTaxableAmount")
    ] = None
    r"""Taxable amount"""

    box6c_use_the_lump_sum_election_method: Annotated[
        Optional[bool], pydantic.Field(alias="box6cUseTheLumpSumElectionMethod")
    ] = None
    r"""Use the lump-sum election method"""


class Box7GroupTypedDict(TypedDict):
    r"""Box 7 group information"""

    schedule_d_not_required: NotRequired[bool]
    r"""Schedule D not required"""
    box7_capital_gain_or_loss: NotRequired[float]
    r"""Capital gain or loss"""


class Box7Group(BaseModel):
    r"""Box 7 group information"""

    schedule_d_not_required: Annotated[
        Optional[bool], pydantic.Field(alias="scheduleDNotRequired")
    ] = None
    r"""Schedule D not required"""

    box7_capital_gain_or_loss: Annotated[
        Optional[float], pydantic.Field(alias="box7CapitalGainOrLoss")
    ] = None
    r"""Capital gain or loss"""


class Box16GroupTypedDict(TypedDict):
    r"""Box 16 group information"""

    one_form8814: NotRequired[bool]
    r"""Form 8814 amount"""
    two_form4972: NotRequired[bool]
    r"""Form 4972 amount"""
    three_other_form: NotRequired[bool]
    r"""Other form amount"""
    other_form_name: NotRequired[str]
    r"""Other form name"""
    box16_tax: NotRequired[float]
    r"""Tax amount"""


class Box16Group(BaseModel):
    r"""Box 16 group information"""

    one_form8814: Annotated[Optional[bool], pydantic.Field(alias="1Form8814")] = None
    r"""Form 8814 amount"""

    two_form4972: Annotated[Optional[bool], pydantic.Field(alias="2Form4972")] = None
    r"""Form 4972 amount"""

    three_other_form: Annotated[Optional[bool], pydantic.Field(alias="3OtherForm")] = (
        None
    )
    r"""Other form amount"""

    other_form_name: Annotated[Optional[str], pydantic.Field(alias="otherFormName")] = (
        None
    )
    r"""Other form name"""

    box16_tax: Annotated[Optional[float], pydantic.Field(alias="box16Tax")] = None
    r"""Tax amount"""


class Box25GroupFederalIncomeTaxTypedDict(TypedDict):
    r"""Box 25 group information"""

    box25a_form_w2: NotRequired[float]
    r"""Form W-2 amount"""
    box25b_form1099: NotRequired[float]
    r"""Form 1099 amount"""
    box25c_other_forms: NotRequired[float]
    r"""Other forms amount"""
    box25d_group_total: NotRequired[float]
    r"""Group total"""


class Box25GroupFederalIncomeTax(BaseModel):
    r"""Box 25 group information"""

    box25a_form_w2: Annotated[Optional[float], pydantic.Field(alias="box25aFormW2")] = (
        None
    )
    r"""Form W-2 amount"""

    box25b_form1099: Annotated[
        Optional[float], pydantic.Field(alias="box25bForm1099")
    ] = None
    r"""Form 1099 amount"""

    box25c_other_forms: Annotated[
        Optional[float], pydantic.Field(alias="box25cOtherForms")
    ] = None
    r"""Other forms amount"""

    box25d_group_total: Annotated[
        Optional[float], pydantic.Field(alias="box25dGroupTotal")
    ] = None
    r"""Group total"""


class Box35cTypeTypedDict(TypedDict):
    r"""Account type"""

    checking: bool
    saving: bool


class Box35cType(BaseModel):
    r"""Account type"""

    checking: bool

    saving: bool


class Box35GroupTypedDict(TypedDict):
    r"""Box 35 group information"""

    box35a_form8888_attached: NotRequired[bool]
    r"""Form 8888 attached"""
    box35a_refundable_amount: NotRequired[float]
    r"""Refundable amount"""
    box35b_routing_number: NotRequired[str]
    r"""Routing number"""
    box35c_type: NotRequired[Box35cTypeTypedDict]
    r"""Account type"""
    box35d_account_number: NotRequired[str]
    r"""Account number"""


class Box35Group(BaseModel):
    r"""Box 35 group information"""

    box35a_form8888_attached: Annotated[
        Optional[bool], pydantic.Field(alias="box35aForm8888Attached")
    ] = None
    r"""Form 8888 attached"""

    box35a_refundable_amount: Annotated[
        Optional[float], pydantic.Field(alias="box35aRefundableAmount")
    ] = None
    r"""Refundable amount"""

    box35b_routing_number: Annotated[
        Optional[str], pydantic.Field(alias="box35bRoutingNumber")
    ] = None
    r"""Routing number"""

    box35c_type: Annotated[Optional[Box35cType], pydantic.Field(alias="box35cType")] = (
        None
    )
    r"""Account type"""

    box35d_account_number: Annotated[
        Optional[str], pydantic.Field(alias="box35dAccountNumber")
    ] = None
    r"""Account number"""


class USForm1040FieldsAnotherPersonCanDiscussWithIrsTypedDict(TypedDict):
    r"""Another person can discuss with IRS"""

    no: bool
    yes: bool


class USForm1040FieldsAnotherPersonCanDiscussWithIrs(BaseModel):
    r"""Another person can discuss with IRS"""

    no: bool

    yes: bool


class USForm1040FieldsThirdPartyDesigneeTypedDict(TypedDict):
    r"""The contact information of the taxpayer's representative that is authorized to discuss the taxpayer's return with the IRS"""

    another_person_can_discuss_with_irs: NotRequired[
        USForm1040FieldsAnotherPersonCanDiscussWithIrsTypedDict
    ]
    r"""Another person can discuss with IRS"""
    designees_name: NotRequired[str]
    r"""Designee's name"""
    phone_number: NotRequired[str]
    r"""Phone number"""
    pin: NotRequired[str]
    r"""PIN"""


class USForm1040FieldsThirdPartyDesignee(BaseModel):
    r"""The contact information of the taxpayer's representative that is authorized to discuss the taxpayer's return with the IRS"""

    another_person_can_discuss_with_irs: Annotated[
        Optional[USForm1040FieldsAnotherPersonCanDiscussWithIrs],
        pydantic.Field(alias="anotherPersonCanDiscussWithIrs"),
    ] = None
    r"""Another person can discuss with IRS"""

    designees_name: Annotated[Optional[str], pydantic.Field(alias="designeesName")] = (
        None
    )
    r"""Designee's name"""

    phone_number: Annotated[Optional[str], pydantic.Field(alias="phoneNumber")] = None
    r"""Phone number"""

    pin: Optional[str] = None
    r"""PIN"""


class USForm1040FieldsSignatureTypedDict(TypedDict):
    r"""The taxpayer's signature"""

    date_: NotRequired[date]
    r"""Date"""
    occupation: NotRequired[str]
    r"""Occupation"""
    identity_protection_pin: NotRequired[str]
    r"""Identity protection PIN"""


class USForm1040FieldsSignature(BaseModel):
    r"""The taxpayer's signature"""

    date_: Annotated[Optional[date], pydantic.Field(alias="date")] = None
    r"""Date"""

    occupation: Optional[str] = None
    r"""Occupation"""

    identity_protection_pin: Annotated[
        Optional[str], pydantic.Field(alias="identityProtectionPin")
    ] = None
    r"""Identity protection PIN"""


class USForm1040FieldsSpousesSignatureTypedDict(TypedDict):
    r"""The spouse's signature (if filing jointly)"""

    date_: NotRequired[date]
    r"""Date"""
    occupation: NotRequired[str]
    r"""Occupation"""
    identity_protection_pin: NotRequired[str]
    r"""Identity protection PIN"""
    phone_number: NotRequired[str]
    r"""Phone number"""
    email_address: NotRequired[str]
    r"""Email address"""


class USForm1040FieldsSpousesSignature(BaseModel):
    r"""The spouse's signature (if filing jointly)"""

    date_: Annotated[Optional[date], pydantic.Field(alias="date")] = None
    r"""Date"""

    occupation: Optional[str] = None
    r"""Occupation"""

    identity_protection_pin: Annotated[
        Optional[str], pydantic.Field(alias="identityProtectionPin")
    ] = None
    r"""Identity protection PIN"""

    phone_number: Annotated[Optional[str], pydantic.Field(alias="phoneNumber")] = None
    r"""Phone number"""

    email_address: Annotated[Optional[str], pydantic.Field(alias="emailAddress")] = None
    r"""Email address"""


class USForm1040FieldsPreparerTypedDict(TypedDict):
    r"""Details of the preparer of the tax return (if the return is completed and filed by a paid preparer)"""

    preparers_name: NotRequired[str]
    r"""Preparer's name"""
    date_: NotRequired[date]
    r"""Date"""
    ptin: NotRequired[str]
    r"""PTIN"""
    firms_name: NotRequired[str]
    r"""Firm's name"""
    firms_address: NotRequired[str]
    r"""Firm's address"""
    phone_number: NotRequired[str]
    r"""Phone number"""
    firms_ein: NotRequired[str]
    r"""Firm's EIN"""
    self_employed: NotRequired[bool]
    r"""Self-employed"""


class USForm1040FieldsPreparer(BaseModel):
    r"""Details of the preparer of the tax return (if the return is completed and filed by a paid preparer)"""

    preparers_name: Annotated[Optional[str], pydantic.Field(alias="preparersName")] = (
        None
    )
    r"""Preparer's name"""

    date_: Annotated[Optional[date], pydantic.Field(alias="date")] = None
    r"""Date"""

    ptin: Optional[str] = None
    r"""PTIN"""

    firms_name: Annotated[Optional[str], pydantic.Field(alias="firmsName")] = None
    r"""Firm's name"""

    firms_address: Annotated[Optional[str], pydantic.Field(alias="firmsAddress")] = None
    r"""Firm's address"""

    phone_number: Annotated[Optional[str], pydantic.Field(alias="phoneNumber")] = None
    r"""Phone number"""

    firms_ein: Annotated[Optional[str], pydantic.Field(alias="firmsEin")] = None
    r"""Firm's EIN"""

    self_employed: Annotated[Optional[bool], pydantic.Field(alias="selfEmployed")] = (
        None
    )
    r"""Self-employed"""


class USForm10402022TypedDict(TypedDict):
    r"""A US Form 1040 for 2022"""

    form: NotRequired[USForm1040FieldsFormTypedDict]
    r"""Specifies whether the form is 1040 or 1040-SR"""
    year: NotRequired[str]
    r"""Indicates the year of the form"""
    filing_status: NotRequired[USForm1040FieldsFilingStatusTypedDict]
    r"""The taxpayer's filing status"""
    name_of_mfs_spouse_or_hoh_or_qw_child: NotRequired[str]
    r"""The name of the taxpayer's spouse or child"""
    first_name: NotRequired[str]
    r"""The taxpayer's first name"""
    last_name: NotRequired[str]
    r"""The taxpayer's last name"""
    ssn: NotRequired[str]
    r"""The taxpayer's social security number"""
    spouse: NotRequired[USForm1040FieldsSpouseTypedDict]
    r"""The name and social security number of the taxpayer's spouse (if filing jointly)"""
    address: NotRequired[USForm1040FieldsAddressTypedDict]
    r"""The taxpayer's address"""
    presidential_election_campaign: NotRequired[
        USForm1040FieldsPresidentialElectionCampaignTypedDict
    ]
    r"""Indicates whether payments have been made to a Presidential election camping fund by the taxpayer or his/her spouse (if filing jointly)"""
    digital_assets: NotRequired[DigitalAssetsTypedDict]
    r"""Indicates whether there was any income related to virtual currencies for the reporting period"""
    standard_deduction: NotRequired[USForm1040FieldsStandardDeductionTypedDict]
    r"""Standard deduction information"""
    dependents: NotRequired[List[USForm1040FieldsDependentsTypedDict]]
    box1_group: NotRequired[Box1GroupTypedDict]
    r"""Box 1 group information"""
    box2_group: NotRequired[Box2GroupTypedDict]
    r"""Box 2 group information"""
    box3_group: NotRequired[Box3GroupTypedDict]
    r"""Box 3 group information"""
    box4_group: NotRequired[Box4GroupTypedDict]
    r"""Box 4 group information"""
    box5_group: NotRequired[Box5GroupTypedDict]
    r"""Box 5 group information"""
    box6_group: NotRequired[Box6GroupTypedDict]
    r"""Box 6 group information"""
    box7_group: NotRequired[Box7GroupTypedDict]
    r"""Box 7 group information"""
    box8_other_income_from_schedule1: NotRequired[float]
    r"""Other income from Schedule 1"""
    box9_total_income: NotRequired[float]
    r"""Total income"""
    box10_adjustments_to_income_from_schedule1: NotRequired[float]
    r"""Adjustments to income from Schedule 1"""
    box11_adjusted_gross_income: NotRequired[float]
    r"""Adjusted gross income"""
    box12_standard_deduction_or_itemized_deductions: NotRequired[float]
    r"""Standard deduction or itemized deductions"""
    box13_qualified_business_income_deduction: NotRequired[float]
    r"""Qualified business income deduction"""
    box14_total_of_boxes12_and13: NotRequired[float]
    r"""Total of boxes 12 and 13"""
    box15_taxable_income: NotRequired[float]
    r"""Taxable income"""
    box16_group: NotRequired[Box16GroupTypedDict]
    r"""Box 16 group information"""
    box17_amount_from_schedule2: NotRequired[float]
    r"""Amount from Schedule 2"""
    box18_total_of_boxes16_and17: NotRequired[float]
    r"""Total of boxes 16 and 17"""
    box19_child_tax_credit: NotRequired[float]
    r"""Child tax credit"""
    box20_amount_from_schedule3: NotRequired[float]
    r"""Amount from Schedule 3"""
    box21_total_of_boxes19_and20: NotRequired[float]
    r"""Total of boxes 19 and 20"""
    box22_tax_minus_child_tax_credit: NotRequired[float]
    r"""Tax minus child tax credit"""
    box23_other_taxes_including_self_employment_tax: NotRequired[float]
    r"""Other taxes including self-employment tax"""
    box24_total_tax: NotRequired[float]
    r"""Total tax"""
    box25_group_federal_income_tax: NotRequired[Box25GroupFederalIncomeTaxTypedDict]
    r"""Box 25 group information"""
    box262022_estimated_tax_payments_and_amount_applied_from2021_return: NotRequired[
        float
    ]
    r"""2022 estimated tax payments and amount applied from 2021 return"""
    box27_earned_income_credit: NotRequired[float]
    r"""Earned income credit"""
    box28_additional_child_tax_credit_from_schedule8812: NotRequired[float]
    r"""Additional child tax credit from Schedule 8812"""
    box29_american_opportunity_credit_from_form8863: NotRequired[float]
    r"""American opportunity credit from Form 8863"""
    box31_amount_from_schedule3: NotRequired[float]
    r"""Amount from Schedule 3"""
    box32_total_other_payments_and_refundable_credits: NotRequired[float]
    r"""Total other payments and refundable credits"""
    box33_total_payments: NotRequired[float]
    r"""Total payments"""
    box34_overpaid_amount: NotRequired[float]
    r"""Overpaid amount"""
    box35_group: NotRequired[Box35GroupTypedDict]
    r"""Box 35 group information"""
    box36_overpaid_amount_to_be_applied_to2023_estimated_tax: NotRequired[float]
    r"""Overpaid amount to be applied to 2023 estimated tax"""
    box37_owed_amount: NotRequired[float]
    r"""Owed amount"""
    box38_estimated_tax_penalty: NotRequired[float]
    r"""Estimated tax penalty"""
    third_party_designee: NotRequired[USForm1040FieldsThirdPartyDesigneeTypedDict]
    r"""The contact information of the taxpayer's representative that is authorized to discuss the taxpayer's return with the IRS"""
    signature: NotRequired[USForm1040FieldsSignatureTypedDict]
    r"""The taxpayer's signature"""
    spouses_signature: NotRequired[USForm1040FieldsSpousesSignatureTypedDict]
    r"""The spouse's signature (if filing jointly)"""
    preparer: NotRequired[USForm1040FieldsPreparerTypedDict]
    r"""Details of the preparer of the tax return (if the return is completed and filed by a paid preparer)"""


class USForm10402022(BaseModel):
    r"""A US Form 1040 for 2022"""

    form: Optional[USForm1040FieldsForm] = None
    r"""Specifies whether the form is 1040 or 1040-SR"""

    year: Optional[str] = None
    r"""Indicates the year of the form"""

    filing_status: Annotated[
        Optional[USForm1040FieldsFilingStatus], pydantic.Field(alias="filingStatus")
    ] = None
    r"""The taxpayer's filing status"""

    name_of_mfs_spouse_or_hoh_or_qw_child: Annotated[
        Optional[str], pydantic.Field(alias="nameOfMfsSpouseOrHohOrQwChild")
    ] = None
    r"""The name of the taxpayer's spouse or child"""

    first_name: Annotated[Optional[str], pydantic.Field(alias="firstName")] = None
    r"""The taxpayer's first name"""

    last_name: Annotated[Optional[str], pydantic.Field(alias="lastName")] = None
    r"""The taxpayer's last name"""

    ssn: Optional[str] = None
    r"""The taxpayer's social security number"""

    spouse: Optional[USForm1040FieldsSpouse] = None
    r"""The name and social security number of the taxpayer's spouse (if filing jointly)"""

    address: Optional[USForm1040FieldsAddress] = None
    r"""The taxpayer's address"""

    presidential_election_campaign: Annotated[
        Optional[USForm1040FieldsPresidentialElectionCampaign],
        pydantic.Field(alias="presidentialElectionCampaign"),
    ] = None
    r"""Indicates whether payments have been made to a Presidential election camping fund by the taxpayer or his/her spouse (if filing jointly)"""

    digital_assets: Annotated[
        Optional[DigitalAssets], pydantic.Field(alias="digitalAssets")
    ] = None
    r"""Indicates whether there was any income related to virtual currencies for the reporting period"""

    standard_deduction: Annotated[
        Optional[USForm1040FieldsStandardDeduction],
        pydantic.Field(alias="standardDeduction"),
    ] = None
    r"""Standard deduction information"""

    dependents: Optional[List[USForm1040FieldsDependents]] = None

    box1_group: Annotated[Optional[Box1Group], pydantic.Field(alias="box1Group")] = None
    r"""Box 1 group information"""

    box2_group: Annotated[Optional[Box2Group], pydantic.Field(alias="box2Group")] = None
    r"""Box 2 group information"""

    box3_group: Annotated[Optional[Box3Group], pydantic.Field(alias="box3Group")] = None
    r"""Box 3 group information"""

    box4_group: Annotated[Optional[Box4Group], pydantic.Field(alias="box4Group")] = None
    r"""Box 4 group information"""

    box5_group: Annotated[Optional[Box5Group], pydantic.Field(alias="box5Group")] = None
    r"""Box 5 group information"""

    box6_group: Annotated[Optional[Box6Group], pydantic.Field(alias="box6Group")] = None
    r"""Box 6 group information"""

    box7_group: Annotated[Optional[Box7Group], pydantic.Field(alias="box7Group")] = None
    r"""Box 7 group information"""

    box8_other_income_from_schedule1: Annotated[
        Optional[float], pydantic.Field(alias="box8OtherIncomeFromSchedule1")
    ] = None
    r"""Other income from Schedule 1"""

    box9_total_income: Annotated[
        Optional[float], pydantic.Field(alias="box9TotalIncome")
    ] = None
    r"""Total income"""

    box10_adjustments_to_income_from_schedule1: Annotated[
        Optional[float], pydantic.Field(alias="box10AdjustmentsToIncomeFromSchedule1")
    ] = None
    r"""Adjustments to income from Schedule 1"""

    box11_adjusted_gross_income: Annotated[
        Optional[float], pydantic.Field(alias="box11AdjustedGrossIncome")
    ] = None
    r"""Adjusted gross income"""

    box12_standard_deduction_or_itemized_deductions: Annotated[
        Optional[float],
        pydantic.Field(alias="box12StandardDeductionOrItemizedDeductions"),
    ] = None
    r"""Standard deduction or itemized deductions"""

    box13_qualified_business_income_deduction: Annotated[
        Optional[float], pydantic.Field(alias="box13QualifiedBusinessIncomeDeduction")
    ] = None
    r"""Qualified business income deduction"""

    box14_total_of_boxes12_and13: Annotated[
        Optional[float], pydantic.Field(alias="box14TotalOfBoxes12And13")
    ] = None
    r"""Total of boxes 12 and 13"""

    box15_taxable_income: Annotated[
        Optional[float], pydantic.Field(alias="box15TaxableIncome")
    ] = None
    r"""Taxable income"""

    box16_group: Annotated[Optional[Box16Group], pydantic.Field(alias="box16Group")] = (
        None
    )
    r"""Box 16 group information"""

    box17_amount_from_schedule2: Annotated[
        Optional[float], pydantic.Field(alias="box17AmountFromSchedule2")
    ] = None
    r"""Amount from Schedule 2"""

    box18_total_of_boxes16_and17: Annotated[
        Optional[float], pydantic.Field(alias="box18TotalOfBoxes16And17")
    ] = None
    r"""Total of boxes 16 and 17"""

    box19_child_tax_credit: Annotated[
        Optional[float], pydantic.Field(alias="box19ChildTaxCredit")
    ] = None
    r"""Child tax credit"""

    box20_amount_from_schedule3: Annotated[
        Optional[float], pydantic.Field(alias="box20AmountFromSchedule3")
    ] = None
    r"""Amount from Schedule 3"""

    box21_total_of_boxes19_and20: Annotated[
        Optional[float], pydantic.Field(alias="box21TotalOfBoxes19And20")
    ] = None
    r"""Total of boxes 19 and 20"""

    box22_tax_minus_child_tax_credit: Annotated[
        Optional[float], pydantic.Field(alias="box22TaxMinusChildTaxCredit")
    ] = None
    r"""Tax minus child tax credit"""

    box23_other_taxes_including_self_employment_tax: Annotated[
        Optional[float],
        pydantic.Field(alias="box23OtherTaxesIncludingSelfEmploymentTax"),
    ] = None
    r"""Other taxes including self-employment tax"""

    box24_total_tax: Annotated[
        Optional[float], pydantic.Field(alias="box24TotalTax")
    ] = None
    r"""Total tax"""

    box25_group_federal_income_tax: Annotated[
        Optional[Box25GroupFederalIncomeTax],
        pydantic.Field(alias="box25GroupFederalIncomeTax"),
    ] = None
    r"""Box 25 group information"""

    box262022_estimated_tax_payments_and_amount_applied_from2021_return: Annotated[
        Optional[float],
        pydantic.Field(
            alias="box262022EstimatedTaxPaymentsAndAmountAppliedFrom2021Return"
        ),
    ] = None
    r"""2022 estimated tax payments and amount applied from 2021 return"""

    box27_earned_income_credit: Annotated[
        Optional[float], pydantic.Field(alias="box27EarnedIncomeCredit")
    ] = None
    r"""Earned income credit"""

    box28_additional_child_tax_credit_from_schedule8812: Annotated[
        Optional[float],
        pydantic.Field(alias="box28AdditionalChildTaxCreditFromSchedule8812"),
    ] = None
    r"""Additional child tax credit from Schedule 8812"""

    box29_american_opportunity_credit_from_form8863: Annotated[
        Optional[float],
        pydantic.Field(alias="box29AmericanOpportunityCreditFromForm8863"),
    ] = None
    r"""American opportunity credit from Form 8863"""

    box31_amount_from_schedule3: Annotated[
        Optional[float], pydantic.Field(alias="box31AmountFromSchedule3")
    ] = None
    r"""Amount from Schedule 3"""

    box32_total_other_payments_and_refundable_credits: Annotated[
        Optional[float],
        pydantic.Field(alias="box32TotalOtherPaymentsAndRefundableCredits"),
    ] = None
    r"""Total other payments and refundable credits"""

    box33_total_payments: Annotated[
        Optional[float], pydantic.Field(alias="box33TotalPayments")
    ] = None
    r"""Total payments"""

    box34_overpaid_amount: Annotated[
        Optional[float], pydantic.Field(alias="box34OverpaidAmount")
    ] = None
    r"""Overpaid amount"""

    box35_group: Annotated[Optional[Box35Group], pydantic.Field(alias="box35Group")] = (
        None
    )
    r"""Box 35 group information"""

    box36_overpaid_amount_to_be_applied_to2023_estimated_tax: Annotated[
        Optional[float],
        pydantic.Field(alias="box36OverpaidAmountToBeAppliedTo2023EstimatedTax"),
    ] = None
    r"""Overpaid amount to be applied to 2023 estimated tax"""

    box37_owed_amount: Annotated[
        Optional[float], pydantic.Field(alias="box37OwedAmount")
    ] = None
    r"""Owed amount"""

    box38_estimated_tax_penalty: Annotated[
        Optional[float], pydantic.Field(alias="box38EstimatedTaxPenalty")
    ] = None
    r"""Estimated tax penalty"""

    third_party_designee: Annotated[
        Optional[USForm1040FieldsThirdPartyDesignee],
        pydantic.Field(alias="thirdPartyDesignee"),
    ] = None
    r"""The contact information of the taxpayer's representative that is authorized to discuss the taxpayer's return with the IRS"""

    signature: Optional[USForm1040FieldsSignature] = None
    r"""The taxpayer's signature"""

    spouses_signature: Annotated[
        Optional[USForm1040FieldsSpousesSignature],
        pydantic.Field(alias="spousesSignature"),
    ] = None
    r"""The spouse's signature (if filing jointly)"""

    preparer: Optional[USForm1040FieldsPreparer] = None
    r"""Details of the preparer of the tax return (if the return is completed and filed by a paid preparer)"""


class FormTypedDict(TypedDict):
    r"""Specifies whether the form is 1040 or 1040-SR"""

    one_thousand_and_forty: NotRequired[bool]
    one_thousand_and_forty_sr: NotRequired[bool]


class Form(BaseModel):
    r"""Specifies whether the form is 1040 or 1040-SR"""

    one_thousand_and_forty: Annotated[Optional[bool], pydantic.Field(alias="1040")] = (
        None
    )

    one_thousand_and_forty_sr: Annotated[
        Optional[bool], pydantic.Field(alias="1040Sr")
    ] = None


class FilingStatusTypedDict(TypedDict):
    r"""The taxpayer's filing status"""

    head: NotRequired[bool]
    joint: NotRequired[bool]
    separately: NotRequired[bool]
    single: NotRequired[bool]
    widow: NotRequired[bool]


class FilingStatus(BaseModel):
    r"""The taxpayer's filing status"""

    head: Optional[bool] = None

    joint: Optional[bool] = None

    separately: Optional[bool] = None

    single: Optional[bool] = None

    widow: Optional[bool] = None


class SpouseTypedDict(TypedDict):
    spouses_first_name: NotRequired[str]
    r"""Spouse's first name"""
    spouses_last_name: NotRequired[str]
    r"""Spouse's last name"""
    spouses_ssn: NotRequired[str]
    r"""Spouse's social security number"""


class Spouse(BaseModel):
    spouses_first_name: Annotated[
        Optional[str], pydantic.Field(alias="spousesFirstName")
    ] = None
    r"""Spouse's first name"""

    spouses_last_name: Annotated[
        Optional[str], pydantic.Field(alias="spousesLastName")
    ] = None
    r"""Spouse's last name"""

    spouses_ssn: Annotated[Optional[str], pydantic.Field(alias="spousesSsn")] = None
    r"""Spouse's social security number"""


class AddressTypedDict(TypedDict):
    home_address: NotRequired[str]
    r"""Home address"""
    apartment_number: NotRequired[str]
    r"""Apartment number"""
    city_town_or_post_office: NotRequired[str]
    r"""City, town or post office"""
    city_town_or_post_office_state_and_zip_code_outdated: NotRequired[str]
    r"""City, town or post office state and zip code (outdated)"""
    state: NotRequired[str]
    r"""State"""
    zip_code: NotRequired[str]
    r"""ZIP code"""
    foreign_country_name: NotRequired[str]
    r"""Foreign country name"""
    foreign_province_or_state_or_country: NotRequired[str]
    r"""Foreign province or state or country"""
    foreign_postal_code: NotRequired[str]
    r"""Foreign postal code"""


class Address(BaseModel):
    home_address: Annotated[Optional[str], pydantic.Field(alias="homeAddress")] = None
    r"""Home address"""

    apartment_number: Annotated[
        Optional[str], pydantic.Field(alias="apartmentNumber")
    ] = None
    r"""Apartment number"""

    city_town_or_post_office: Annotated[
        Optional[str], pydantic.Field(alias="cityTownOrPostOffice")
    ] = None
    r"""City, town or post office"""

    city_town_or_post_office_state_and_zip_code_outdated: Annotated[
        Optional[str],
        pydantic.Field(alias="cityTownOrPostOfficeStateAndZipCodeOutdated"),
    ] = None
    r"""City, town or post office state and zip code (outdated)"""

    state: Optional[str] = None
    r"""State"""

    zip_code: Annotated[Optional[str], pydantic.Field(alias="zipCode")] = None
    r"""ZIP code"""

    foreign_country_name: Annotated[
        Optional[str], pydantic.Field(alias="foreignCountryName")
    ] = None
    r"""Foreign country name"""

    foreign_province_or_state_or_country: Annotated[
        Optional[str], pydantic.Field(alias="foreignProvinceOrStateOrCountry")
    ] = None
    r"""Foreign province or state or country"""

    foreign_postal_code: Annotated[
        Optional[str], pydantic.Field(alias="foreignPostalCode")
    ] = None
    r"""Foreign postal code"""


class PresidentialElectionCampaignTypedDict(TypedDict):
    you: NotRequired[bool]
    r"""Indicates whether payments have been made by the taxpayer"""
    spouse: NotRequired[bool]
    r"""Indicates whether payments have been made by the spouse"""


class PresidentialElectionCampaign(BaseModel):
    you: Optional[bool] = None
    r"""Indicates whether payments have been made by the taxpayer"""

    spouse: Optional[bool] = None
    r"""Indicates whether payments have been made by the spouse"""


class FinancialInterestInVirtualCurrencyDuringThisYearTypedDict(TypedDict):
    r"""Indicates whether there was any income related to virtual currencies"""

    yes: bool
    no: bool


class FinancialInterestInVirtualCurrencyDuringThisYear(BaseModel):
    r"""Indicates whether there was any income related to virtual currencies"""

    yes: bool

    no: bool


class SomeoneCanClaimTypedDict(TypedDict):
    you_as_a_dependent: NotRequired[bool]
    r"""Indicates whether the taxpayer can be claimed as a dependent"""
    your_spouse_as_a_dependent: NotRequired[bool]
    r"""Indicates whether the spouse can be claimed as a dependent"""


class SomeoneCanClaim(BaseModel):
    you_as_a_dependent: Annotated[
        Optional[bool], pydantic.Field(alias="youAsADependent")
    ] = None
    r"""Indicates whether the taxpayer can be claimed as a dependent"""

    your_spouse_as_a_dependent: Annotated[
        Optional[bool], pydantic.Field(alias="yourSpouseAsADependent")
    ] = None
    r"""Indicates whether the spouse can be claimed as a dependent"""


class YouTypedDict(TypedDict):
    born_before_january21957: NotRequired[bool]
    born_before_january21956_outdated: NotRequired[bool]
    born_before_january21955_outdated: NotRequired[bool]
    born_before_january21954_outdated: NotRequired[bool]
    blind: NotRequired[bool]


class You(BaseModel):
    born_before_january21957: Annotated[
        Optional[bool], pydantic.Field(alias="bornBeforeJanuary21957")
    ] = None

    born_before_january21956_outdated: Annotated[
        Optional[bool], pydantic.Field(alias="bornBeforeJanuary21956Outdated")
    ] = None

    born_before_january21955_outdated: Annotated[
        Optional[bool], pydantic.Field(alias="bornBeforeJanuary21955Outdated")
    ] = None

    born_before_january21954_outdated: Annotated[
        Optional[bool], pydantic.Field(alias="bornBeforeJanuary21954Outdated")
    ] = None

    blind: Optional[bool] = None


class USForm1040Fields1SpouseTypedDict(TypedDict):
    born_before_january21957: NotRequired[bool]
    born_before_january21956_outdated: NotRequired[bool]
    born_before_january21955_outdated: NotRequired[bool]
    born_before_january21954_outdated: NotRequired[bool]
    blind: NotRequired[bool]


class USForm1040Fields1Spouse(BaseModel):
    born_before_january21957: Annotated[
        Optional[bool], pydantic.Field(alias="bornBeforeJanuary21957")
    ] = None

    born_before_january21956_outdated: Annotated[
        Optional[bool], pydantic.Field(alias="bornBeforeJanuary21956Outdated")
    ] = None

    born_before_january21955_outdated: Annotated[
        Optional[bool], pydantic.Field(alias="bornBeforeJanuary21955Outdated")
    ] = None

    born_before_january21954_outdated: Annotated[
        Optional[bool], pydantic.Field(alias="bornBeforeJanuary21954Outdated")
    ] = None

    blind: Optional[bool] = None


class AgeOrBlindnessTypedDict(TypedDict):
    you: NotRequired[YouTypedDict]
    spouse: NotRequired[USForm1040Fields1SpouseTypedDict]


class AgeOrBlindness(BaseModel):
    you: Optional[You] = None

    spouse: Optional[USForm1040Fields1Spouse] = None


class StandardDeductionTypedDict(TypedDict):
    someone_can_claim: NotRequired[SomeoneCanClaimTypedDict]
    separate_return_or_dual_status_alien: NotRequired[bool]
    r"""Indicates whether filing separate returns or is a dual-status alien"""
    age_or_blindness: NotRequired[AgeOrBlindnessTypedDict]


class StandardDeduction(BaseModel):
    someone_can_claim: Annotated[
        Optional[SomeoneCanClaim], pydantic.Field(alias="someoneCanClaim")
    ] = None

    separate_return_or_dual_status_alien: Annotated[
        Optional[bool], pydantic.Field(alias="separateReturnOrDualStatusAlien")
    ] = None
    r"""Indicates whether filing separate returns or is a dual-status alien"""

    age_or_blindness: Annotated[
        Optional[AgeOrBlindness], pydantic.Field(alias="ageOrBlindness")
    ] = None


class DependentsTypedDict(TypedDict):
    full_name: NotRequired[str]
    r"""Dependent's full name"""
    ssn: NotRequired[str]
    r"""Dependent's social security number"""
    relationship: NotRequired[str]
    r"""Relationship to taxpayer"""
    child_tax_credit: NotRequired[bool]
    r"""Whether child tax credit applies"""
    credit_for_other_dependents: NotRequired[bool]
    r"""Whether credit for other dependents applies"""


class Dependents(BaseModel):
    full_name: Annotated[Optional[str], pydantic.Field(alias="fullName")] = None
    r"""Dependent's full name"""

    ssn: Optional[str] = None
    r"""Dependent's social security number"""

    relationship: Optional[str] = None
    r"""Relationship to taxpayer"""

    child_tax_credit: Annotated[
        Optional[bool], pydantic.Field(alias="childTaxCredit")
    ] = None
    r"""Whether child tax credit applies"""

    credit_for_other_dependents: Annotated[
        Optional[bool], pydantic.Field(alias="creditForOtherDependents")
    ] = None
    r"""Whether credit for other dependents applies"""


class TaxExemptInterestGroupTypedDict(TypedDict):
    tax_exempt_interest: NotRequired[float]
    r"""Tax-exempt interest"""
    taxable_interest: NotRequired[float]
    r"""Taxable interest"""


class TaxExemptInterestGroup(BaseModel):
    tax_exempt_interest: Annotated[
        Optional[float], pydantic.Field(alias="taxExemptInterest")
    ] = None
    r"""Tax-exempt interest"""

    taxable_interest: Annotated[
        Optional[float], pydantic.Field(alias="taxableInterest")
    ] = None
    r"""Taxable interest"""


class DividendsGroupTypedDict(TypedDict):
    qualified_dividends: NotRequired[float]
    r"""Qualified dividends"""
    ordinary_dividends: NotRequired[float]
    r"""Ordinary dividends"""


class DividendsGroup(BaseModel):
    qualified_dividends: Annotated[
        Optional[float], pydantic.Field(alias="qualifiedDividends")
    ] = None
    r"""Qualified dividends"""

    ordinary_dividends: Annotated[
        Optional[float], pydantic.Field(alias="ordinaryDividends")
    ] = None
    r"""Ordinary dividends"""


class IrasPensionsAndAnnuitiesGroupOutdatedTypedDict(TypedDict):
    iras_pensions_and_annuities_outdated: NotRequired[float]
    r"""IRAs, pensions and annuities (outdated)"""
    taxable_amount_outdated: NotRequired[float]
    r"""Taxable amount"""


class IrasPensionsAndAnnuitiesGroupOutdated(BaseModel):
    iras_pensions_and_annuities_outdated: Annotated[
        Optional[float], pydantic.Field(alias="irasPensionsAndAnnuitiesOutdated")
    ] = None
    r"""IRAs, pensions and annuities (outdated)"""

    taxable_amount_outdated: Annotated[
        Optional[float], pydantic.Field(alias="taxableAmountOutdated")
    ] = None
    r"""Taxable amount"""


class IraDistributionsGroupTypedDict(TypedDict):
    ira_distributions: NotRequired[float]
    r"""IRA distributions"""
    taxable_amount: NotRequired[float]
    r"""Taxable amount"""


class IraDistributionsGroup(BaseModel):
    ira_distributions: Annotated[
        Optional[float], pydantic.Field(alias="iraDistributions")
    ] = None
    r"""IRA distributions"""

    taxable_amount: Annotated[
        Optional[float], pydantic.Field(alias="taxableAmount")
    ] = None
    r"""Taxable amount"""


class PensionsAndAnnuitiesGroupTypedDict(TypedDict):
    pensions_and_annuities: NotRequired[float]
    r"""Pensions and annuities"""
    taxable_amount: NotRequired[float]
    r"""Taxable amount"""


class PensionsAndAnnuitiesGroup(BaseModel):
    pensions_and_annuities: Annotated[
        Optional[float], pydantic.Field(alias="pensionsAndAnnuities")
    ] = None
    r"""Pensions and annuities"""

    taxable_amount: Annotated[
        Optional[float], pydantic.Field(alias="taxableAmount")
    ] = None
    r"""Taxable amount"""


class SocialSecurityBenefitsGroupTypedDict(TypedDict):
    social_security_benefits: NotRequired[float]
    r"""Social security benefits"""
    taxable_amount: NotRequired[float]
    r"""Taxable amount"""


class SocialSecurityBenefitsGroup(BaseModel):
    social_security_benefits: Annotated[
        Optional[float], pydantic.Field(alias="socialSecurityBenefits")
    ] = None
    r"""Social security benefits"""

    taxable_amount: Annotated[
        Optional[float], pydantic.Field(alias="taxableAmount")
    ] = None
    r"""Taxable amount"""


class CapitalGainOrLossGroupTypedDict(TypedDict):
    capital_gain_or_loss: NotRequired[float]
    r"""Capital gain or loss"""
    schedule_d_not_required: NotRequired[bool]
    r"""Whether Schedule D is not required"""


class CapitalGainOrLossGroup(BaseModel):
    capital_gain_or_loss: Annotated[
        Optional[float], pydantic.Field(alias="capitalGainOrLoss")
    ] = None
    r"""Capital gain or loss"""

    schedule_d_not_required: Annotated[
        Optional[bool], pydantic.Field(alias="scheduleDNotRequired")
    ] = None
    r"""Whether Schedule D is not required"""


class AdjustmentsToIncomeGroupTypedDict(TypedDict):
    from_schedule1: NotRequired[float]
    r"""From Schedule 1"""
    charitable_contributions: NotRequired[float]
    r"""Charitable contributions"""
    total_adjustments_to_income: NotRequired[float]
    r"""Total adjustments to income"""


class AdjustmentsToIncomeGroup(BaseModel):
    from_schedule1: Annotated[
        Optional[float], pydantic.Field(alias="fromSchedule1")
    ] = None
    r"""From Schedule 1"""

    charitable_contributions: Annotated[
        Optional[float], pydantic.Field(alias="charitableContributions")
    ] = None
    r"""Charitable contributions"""

    total_adjustments_to_income: Annotated[
        Optional[float], pydantic.Field(alias="totalAdjustmentsToIncome")
    ] = None
    r"""Total adjustments to income"""


class TaxableIncomeGroupTypedDict(TypedDict):
    standard_deduction_or_itemized_deductions: NotRequired[float]
    r"""Standard deduction or itemized deductions"""
    charitable_contributions: NotRequired[float]
    r"""Charitable contributions"""
    partial_sum: NotRequired[float]
    r"""Partial sum"""
    qualified_business_income_deduction: NotRequired[float]
    r"""Qualified business income deduction"""
    total_deduction: NotRequired[float]
    r"""Total deduction"""
    taxable_income: NotRequired[float]
    r"""Taxable income"""


class TaxableIncomeGroup(BaseModel):
    standard_deduction_or_itemized_deductions: Annotated[
        Optional[float], pydantic.Field(alias="standardDeductionOrItemizedDeductions")
    ] = None
    r"""Standard deduction or itemized deductions"""

    charitable_contributions: Annotated[
        Optional[float], pydantic.Field(alias="charitableContributions")
    ] = None
    r"""Charitable contributions"""

    partial_sum: Annotated[Optional[float], pydantic.Field(alias="partialSum")] = None
    r"""Partial sum"""

    qualified_business_income_deduction: Annotated[
        Optional[float], pydantic.Field(alias="qualifiedBusinessIncomeDeduction")
    ] = None
    r"""Qualified business income deduction"""

    total_deduction: Annotated[
        Optional[float], pydantic.Field(alias="totalDeduction")
    ] = None
    r"""Total deduction"""

    taxable_income: Annotated[
        Optional[float], pydantic.Field(alias="taxableIncome")
    ] = None
    r"""Taxable income"""


class TaxGroupTypedDict(TypedDict):
    tax: NotRequired[float]
    r"""Tax"""
    form8814: NotRequired[bool]
    r"""Form 8814"""
    form4972: NotRequired[bool]
    r"""Form 4972"""
    other_form: NotRequired[bool]
    r"""Other form"""
    other_form_name: NotRequired[str]
    r"""Other form name"""
    amount_from_schedule2_check_outdated: NotRequired[bool]
    r"""Amount from Schedule 2 check (outdated)"""
    amount_from_schedule2: NotRequired[float]
    r"""Amount from Schedule 2"""
    group_total: NotRequired[float]
    r"""Group total"""


class TaxGroup(BaseModel):
    tax: Optional[float] = None
    r"""Tax"""

    form8814: Optional[bool] = None
    r"""Form 8814"""

    form4972: Optional[bool] = None
    r"""Form 4972"""

    other_form: Annotated[Optional[bool], pydantic.Field(alias="otherForm")] = None
    r"""Other form"""

    other_form_name: Annotated[Optional[str], pydantic.Field(alias="otherFormName")] = (
        None
    )
    r"""Other form name"""

    amount_from_schedule2_check_outdated: Annotated[
        Optional[bool], pydantic.Field(alias="amountFromSchedule2CheckOutdated")
    ] = None
    r"""Amount from Schedule 2 check (outdated)"""

    amount_from_schedule2: Annotated[
        Optional[float], pydantic.Field(alias="amountFromSchedule2")
    ] = None
    r"""Amount from Schedule 2"""

    group_total: Annotated[Optional[float], pydantic.Field(alias="groupTotal")] = None
    r"""Group total"""


class ChildTaxCreditGroupTypedDict(TypedDict):
    child_tax_credit: NotRequired[float]
    r"""Child tax credit"""
    amount_from_schedule3_check_outdated: NotRequired[bool]
    r"""Amount from Schedule 3 check (outdated)"""
    amount_from_schedule3: NotRequired[float]
    r"""Amount from Schedule 3"""
    group_total: NotRequired[float]
    r"""Group total"""


class ChildTaxCreditGroup(BaseModel):
    child_tax_credit: Annotated[
        Optional[float], pydantic.Field(alias="childTaxCredit")
    ] = None
    r"""Child tax credit"""

    amount_from_schedule3_check_outdated: Annotated[
        Optional[bool], pydantic.Field(alias="amountFromSchedule3CheckOutdated")
    ] = None
    r"""Amount from Schedule 3 check (outdated)"""

    amount_from_schedule3: Annotated[
        Optional[float], pydantic.Field(alias="amountFromSchedule3")
    ] = None
    r"""Amount from Schedule 3"""

    group_total: Annotated[Optional[float], pydantic.Field(alias="groupTotal")] = None
    r"""Group total"""


class FederalIncomeTaxGroupTypedDict(TypedDict):
    form_w2: NotRequired[float]
    r"""Form W-2"""
    form1099: NotRequired[float]
    r"""Form 1099"""
    other_forms: NotRequired[float]
    r"""Other forms"""
    group_total: NotRequired[float]
    r"""Group total"""


class FederalIncomeTaxGroup(BaseModel):
    form_w2: Annotated[Optional[float], pydantic.Field(alias="formW2")] = None
    r"""Form W-2"""

    form1099: Optional[float] = None
    r"""Form 1099"""

    other_forms: Annotated[Optional[float], pydantic.Field(alias="otherForms")] = None
    r"""Other forms"""

    group_total: Annotated[Optional[float], pydantic.Field(alias="groupTotal")] = None
    r"""Group total"""


class EarnedIncomeCreditGroupTypedDict(TypedDict):
    earned_income_credit: NotRequired[float]
    r"""Earned income credit"""
    qualified_to_claim_the_eic: NotRequired[bool]
    r"""Qualified to claim the EIC"""
    combat_pay_election: NotRequired[bool]
    r"""Combat pay election"""
    prior_year_earned_income: NotRequired[float]
    r"""Prior year earned income"""


class EarnedIncomeCreditGroup(BaseModel):
    earned_income_credit: Annotated[
        Optional[float], pydantic.Field(alias="earnedIncomeCredit")
    ] = None
    r"""Earned income credit"""

    qualified_to_claim_the_eic: Annotated[
        Optional[bool], pydantic.Field(alias="qualifiedToClaimTheEic")
    ] = None
    r"""Qualified to claim the EIC"""

    combat_pay_election: Annotated[
        Optional[bool], pydantic.Field(alias="combatPayElection")
    ] = None
    r"""Combat pay election"""

    prior_year_earned_income: Annotated[
        Optional[float], pydantic.Field(alias="priorYearEarnedIncome")
    ] = None
    r"""Prior year earned income"""


class TypeTypedDict(TypedDict):
    r"""Account type"""

    checking: bool
    saving: bool


class Type(BaseModel):
    r"""Account type"""

    checking: bool

    saving: bool


class RefundGroupTypedDict(TypedDict):
    form8888_attached: NotRequired[bool]
    r"""Form 8888 attached"""
    refundable_amount: NotRequired[float]
    r"""Refundable amount/refunded"""
    routing_number: NotRequired[str]
    r"""Routing number"""
    type: NotRequired[TypeTypedDict]
    r"""Account type"""
    account_number: NotRequired[str]
    r"""Account number"""


class RefundGroup(BaseModel):
    form8888_attached: Annotated[
        Optional[bool], pydantic.Field(alias="form8888Attached")
    ] = None
    r"""Form 8888 attached"""

    refundable_amount: Annotated[
        Optional[float], pydantic.Field(alias="refundableAmount")
    ] = None
    r"""Refundable amount/refunded"""

    routing_number: Annotated[Optional[str], pydantic.Field(alias="routingNumber")] = (
        None
    )
    r"""Routing number"""

    type: Optional[Type] = None
    r"""Account type"""

    account_number: Annotated[Optional[str], pydantic.Field(alias="accountNumber")] = (
        None
    )
    r"""Account number"""


class AnotherPersonCanDiscussWithIrsTypedDict(TypedDict):
    r"""Another person can discuss with IRS"""

    no: bool
    yes: bool


class AnotherPersonCanDiscussWithIrs(BaseModel):
    r"""Another person can discuss with IRS"""

    no: bool

    yes: bool


class ThirdPartyDesigneeTypedDict(TypedDict):
    another_person_can_discuss_with_irs: NotRequired[
        AnotherPersonCanDiscussWithIrsTypedDict
    ]
    r"""Another person can discuss with IRS"""
    designees_name: NotRequired[str]
    r"""Designee's name"""
    phone_number: NotRequired[str]
    r"""Phone number"""
    pin: NotRequired[str]
    r"""PIN"""


class ThirdPartyDesignee(BaseModel):
    another_person_can_discuss_with_irs: Annotated[
        Optional[AnotherPersonCanDiscussWithIrs],
        pydantic.Field(alias="anotherPersonCanDiscussWithIrs"),
    ] = None
    r"""Another person can discuss with IRS"""

    designees_name: Annotated[Optional[str], pydantic.Field(alias="designeesName")] = (
        None
    )
    r"""Designee's name"""

    phone_number: Annotated[Optional[str], pydantic.Field(alias="phoneNumber")] = None
    r"""Phone number"""

    pin: Optional[str] = None
    r"""PIN"""


class SignatureTypedDict(TypedDict):
    date_: NotRequired[date]
    r"""Date"""
    occupation: NotRequired[str]
    r"""Occupation"""
    identity_protection_pin: NotRequired[str]
    r"""Identity protection PIN"""


class Signature(BaseModel):
    date_: Annotated[Optional[date], pydantic.Field(alias="date")] = None
    r"""Date"""

    occupation: Optional[str] = None
    r"""Occupation"""

    identity_protection_pin: Annotated[
        Optional[str], pydantic.Field(alias="identityProtectionPin")
    ] = None
    r"""Identity protection PIN"""


class SpousesSignatureTypedDict(TypedDict):
    date_: NotRequired[date]
    r"""Date"""
    occupation: NotRequired[str]
    r"""Occupation"""
    identity_protection_pin: NotRequired[str]
    r"""Identity protection PIN"""
    phone_number: NotRequired[str]
    r"""Phone number"""
    email_address: NotRequired[str]
    r"""Email address"""


class SpousesSignature(BaseModel):
    date_: Annotated[Optional[date], pydantic.Field(alias="date")] = None
    r"""Date"""

    occupation: Optional[str] = None
    r"""Occupation"""

    identity_protection_pin: Annotated[
        Optional[str], pydantic.Field(alias="identityProtectionPin")
    ] = None
    r"""Identity protection PIN"""

    phone_number: Annotated[Optional[str], pydantic.Field(alias="phoneNumber")] = None
    r"""Phone number"""

    email_address: Annotated[Optional[str], pydantic.Field(alias="emailAddress")] = None
    r"""Email address"""


class PreparerTypedDict(TypedDict):
    preparers_name: NotRequired[str]
    r"""Preparer's name"""
    date_: NotRequired[date]
    r"""Date"""
    ptin: NotRequired[str]
    r"""PTIN"""
    firms_name: NotRequired[str]
    r"""Firm's name"""
    firms_address: NotRequired[str]
    r"""Firm's address"""
    phone_number: NotRequired[str]
    r"""Phone number"""
    firms_ein: NotRequired[str]
    r"""Firm's EIN"""
    third_party_designee_outdated: NotRequired[bool]
    r"""Third party designee (outdated)"""
    self_employed: NotRequired[bool]
    r"""Self-employed"""


class Preparer(BaseModel):
    preparers_name: Annotated[Optional[str], pydantic.Field(alias="preparersName")] = (
        None
    )
    r"""Preparer's name"""

    date_: Annotated[Optional[date], pydantic.Field(alias="date")] = None
    r"""Date"""

    ptin: Optional[str] = None
    r"""PTIN"""

    firms_name: Annotated[Optional[str], pydantic.Field(alias="firmsName")] = None
    r"""Firm's name"""

    firms_address: Annotated[Optional[str], pydantic.Field(alias="firmsAddress")] = None
    r"""Firm's address"""

    phone_number: Annotated[Optional[str], pydantic.Field(alias="phoneNumber")] = None
    r"""Phone number"""

    firms_ein: Annotated[Optional[str], pydantic.Field(alias="firmsEin")] = None
    r"""Firm's EIN"""

    third_party_designee_outdated: Annotated[
        Optional[bool], pydantic.Field(alias="thirdPartyDesigneeOutdated")
    ] = None
    r"""Third party designee (outdated)"""

    self_employed: Annotated[Optional[bool], pydantic.Field(alias="selfEmployed")] = (
        None
    )
    r"""Self-employed"""


class USForm10402018to2022TypedDict(TypedDict):
    r"""A US Form 1040 for 2018 to 2022"""

    form: NotRequired[FormTypedDict]
    r"""Specifies whether the form is 1040 or 1040-SR"""
    year: NotRequired[str]
    r"""Indicates the year of the form"""
    filing_status: NotRequired[FilingStatusTypedDict]
    r"""The taxpayer's filing status"""
    mfs_spouse_or_hoh_or_qw_child_name: NotRequired[str]
    r"""The name of the taxpayer's spouse or child"""
    first_name: NotRequired[str]
    r"""The taxpayer's first name"""
    last_name: NotRequired[str]
    r"""The taxpayer's last name"""
    ssn: NotRequired[str]
    r"""The taxpayer's social security number"""
    spouse: NotRequired[SpouseTypedDict]
    address: NotRequired[AddressTypedDict]
    full_year_health_care_coverage_outdated: NotRequired[bool]
    r"""Indicates whether the taxpayer has health insurance coverage (outdated)"""
    presidential_election_campaign: NotRequired[PresidentialElectionCampaignTypedDict]
    financial_interest_in_virtual_currency_during_this_year: NotRequired[
        FinancialInterestInVirtualCurrencyDuringThisYearTypedDict
    ]
    r"""Indicates whether there was any income related to virtual currencies"""
    standard_deduction: NotRequired[StandardDeductionTypedDict]
    more_than_four_dependents: NotRequired[bool]
    r"""Indicated whether the taxpayer has more than four dependents"""
    dependents: NotRequired[List[DependentsTypedDict]]
    wages_salaries_tips: NotRequired[float]
    r"""Wages, salaries, tips"""
    tax_exempt_interest_group: NotRequired[TaxExemptInterestGroupTypedDict]
    dividends_group: NotRequired[DividendsGroupTypedDict]
    iras_pensions_and_annuities_group_outdated: NotRequired[
        IrasPensionsAndAnnuitiesGroupOutdatedTypedDict
    ]
    ira_distributions_group: NotRequired[IraDistributionsGroupTypedDict]
    pensions_and_annuities_group: NotRequired[PensionsAndAnnuitiesGroupTypedDict]
    social_security_benefits_group: NotRequired[SocialSecurityBenefitsGroupTypedDict]
    capital_gain_or_loss_group: NotRequired[CapitalGainOrLossGroupTypedDict]
    amount_from_schedule1_line22_outdated: NotRequired[float]
    r"""Amount from Schedule 1 line 22 (outdated)"""
    other_income_from_schedule1: NotRequired[float]
    r"""Other income from Schedule 1"""
    total_income: NotRequired[float]
    r"""Total income"""
    adjustments_to_income_group: NotRequired[AdjustmentsToIncomeGroupTypedDict]
    adjusted_gross_income: NotRequired[float]
    r"""Adjusted gross income"""
    taxable_income_group: NotRequired[TaxableIncomeGroupTypedDict]
    tax_group: NotRequired[TaxGroupTypedDict]
    child_tax_credit_group: NotRequired[ChildTaxCreditGroupTypedDict]
    tax_minus_child_tax_credit: NotRequired[float]
    r"""Tax minus child tax credit"""
    other_taxes_including_self_employment_tax: NotRequired[float]
    r"""Other taxes including self-employment tax"""
    total_tax: NotRequired[float]
    r"""Total tax"""
    federal_income_tax_withheld_from_forms_w2_and1099_outdated: NotRequired[float]
    r"""Federal income tax withheld from Forms W-2 and 1099 (outdated)"""
    federal_income_tax_group: NotRequired[FederalIncomeTaxGroupTypedDict]
    this_year_estimated_tax_payments_and_amount_applied_from_last_year_return: (
        NotRequired[float]
    )
    r"""This year estimated tax payments and amount applied from last year return"""
    earned_income_credit_group: NotRequired[EarnedIncomeCreditGroupTypedDict]
    additional_child_tax_credit_schedule8812: NotRequired[float]
    r"""Additional child tax credit"""
    american_opportunity_credit_from_form8863: NotRequired[float]
    r"""American opportunity credit from Form 8863"""
    recovery_rebate_credit: NotRequired[float]
    r"""Recovery rebate credit"""
    amount_from_schedule5: NotRequired[float]
    r"""Amount from Schedule 5"""
    amount_from_schedule3: NotRequired[float]
    r"""Amount from Schedule 3"""
    total_other_payments_and_refundable_credits: NotRequired[float]
    r"""Total other payments and refundable credits"""
    total_payments: NotRequired[float]
    r"""Total payments"""
    overpaid_amount: NotRequired[float]
    r"""Overpaid amount"""
    refund_group: NotRequired[RefundGroupTypedDict]
    overpaid_amount_to_be_applied_to_next_year_estimated_tax: NotRequired[float]
    r"""Overpaid amount to be applied to next year estimated tax"""
    owed_amount: NotRequired[float]
    r"""Owed amount"""
    estimated_tax_penalty: NotRequired[float]
    r"""Estimated tax penalty"""
    third_party_designee: NotRequired[ThirdPartyDesigneeTypedDict]
    signature: NotRequired[SignatureTypedDict]
    spouses_signature: NotRequired[SpousesSignatureTypedDict]
    preparer: NotRequired[PreparerTypedDict]


class USForm10402018to2022(BaseModel):
    r"""A US Form 1040 for 2018 to 2022"""

    form: Optional[Form] = None
    r"""Specifies whether the form is 1040 or 1040-SR"""

    year: Optional[str] = None
    r"""Indicates the year of the form"""

    filing_status: Annotated[
        Optional[FilingStatus], pydantic.Field(alias="filingStatus")
    ] = None
    r"""The taxpayer's filing status"""

    mfs_spouse_or_hoh_or_qw_child_name: Annotated[
        Optional[str], pydantic.Field(alias="mfsSpouseOrHohOrQwChildName")
    ] = None
    r"""The name of the taxpayer's spouse or child"""

    first_name: Annotated[Optional[str], pydantic.Field(alias="firstName")] = None
    r"""The taxpayer's first name"""

    last_name: Annotated[Optional[str], pydantic.Field(alias="lastName")] = None
    r"""The taxpayer's last name"""

    ssn: Optional[str] = None
    r"""The taxpayer's social security number"""

    spouse: Optional[Spouse] = None

    address: Optional[Address] = None

    full_year_health_care_coverage_outdated: Annotated[
        Optional[bool], pydantic.Field(alias="fullYearHealthCareCoverageOutdated")
    ] = None
    r"""Indicates whether the taxpayer has health insurance coverage (outdated)"""

    presidential_election_campaign: Annotated[
        Optional[PresidentialElectionCampaign],
        pydantic.Field(alias="presidentialElectionCampaign"),
    ] = None

    financial_interest_in_virtual_currency_during_this_year: Annotated[
        Optional[FinancialInterestInVirtualCurrencyDuringThisYear],
        pydantic.Field(alias="financialInterestInVirtualCurrencyDuringThisYear"),
    ] = None
    r"""Indicates whether there was any income related to virtual currencies"""

    standard_deduction: Annotated[
        Optional[StandardDeduction], pydantic.Field(alias="standardDeduction")
    ] = None

    more_than_four_dependents: Annotated[
        Optional[bool], pydantic.Field(alias="moreThanFourDependents")
    ] = None
    r"""Indicated whether the taxpayer has more than four dependents"""

    dependents: Optional[List[Dependents]] = None

    wages_salaries_tips: Annotated[
        Optional[float], pydantic.Field(alias="wagesSalariesTips")
    ] = None
    r"""Wages, salaries, tips"""

    tax_exempt_interest_group: Annotated[
        Optional[TaxExemptInterestGroup], pydantic.Field(alias="taxExemptInterestGroup")
    ] = None

    dividends_group: Annotated[
        Optional[DividendsGroup], pydantic.Field(alias="dividendsGroup")
    ] = None

    iras_pensions_and_annuities_group_outdated: Annotated[
        Optional[IrasPensionsAndAnnuitiesGroupOutdated],
        pydantic.Field(alias="irasPensionsAndAnnuitiesGroupOutdated"),
    ] = None

    ira_distributions_group: Annotated[
        Optional[IraDistributionsGroup], pydantic.Field(alias="iraDistributionsGroup")
    ] = None

    pensions_and_annuities_group: Annotated[
        Optional[PensionsAndAnnuitiesGroup],
        pydantic.Field(alias="pensionsAndAnnuitiesGroup"),
    ] = None

    social_security_benefits_group: Annotated[
        Optional[SocialSecurityBenefitsGroup],
        pydantic.Field(alias="socialSecurityBenefitsGroup"),
    ] = None

    capital_gain_or_loss_group: Annotated[
        Optional[CapitalGainOrLossGroup], pydantic.Field(alias="capitalGainOrLossGroup")
    ] = None

    amount_from_schedule1_line22_outdated: Annotated[
        Optional[float], pydantic.Field(alias="amountFromSchedule1Line22Outdated")
    ] = None
    r"""Amount from Schedule 1 line 22 (outdated)"""

    other_income_from_schedule1: Annotated[
        Optional[float], pydantic.Field(alias="otherIncomeFromSchedule1")
    ] = None
    r"""Other income from Schedule 1"""

    total_income: Annotated[Optional[float], pydantic.Field(alias="totalIncome")] = None
    r"""Total income"""

    adjustments_to_income_group: Annotated[
        Optional[AdjustmentsToIncomeGroup],
        pydantic.Field(alias="adjustmentsToIncomeGroup"),
    ] = None

    adjusted_gross_income: Annotated[
        Optional[float], pydantic.Field(alias="adjustedGrossIncome")
    ] = None
    r"""Adjusted gross income"""

    taxable_income_group: Annotated[
        Optional[TaxableIncomeGroup], pydantic.Field(alias="taxableIncomeGroup")
    ] = None

    tax_group: Annotated[Optional[TaxGroup], pydantic.Field(alias="taxGroup")] = None

    child_tax_credit_group: Annotated[
        Optional[ChildTaxCreditGroup], pydantic.Field(alias="childTaxCreditGroup")
    ] = None

    tax_minus_child_tax_credit: Annotated[
        Optional[float], pydantic.Field(alias="taxMinusChildTaxCredit")
    ] = None
    r"""Tax minus child tax credit"""

    other_taxes_including_self_employment_tax: Annotated[
        Optional[float], pydantic.Field(alias="otherTaxesIncludingSelfEmploymentTax")
    ] = None
    r"""Other taxes including self-employment tax"""

    total_tax: Annotated[Optional[float], pydantic.Field(alias="totalTax")] = None
    r"""Total tax"""

    federal_income_tax_withheld_from_forms_w2_and1099_outdated: Annotated[
        Optional[float],
        pydantic.Field(alias="federalIncomeTaxWithheldFromFormsW2And1099Outdated"),
    ] = None
    r"""Federal income tax withheld from Forms W-2 and 1099 (outdated)"""

    federal_income_tax_group: Annotated[
        Optional[FederalIncomeTaxGroup], pydantic.Field(alias="federalIncomeTaxGroup")
    ] = None

    this_year_estimated_tax_payments_and_amount_applied_from_last_year_return: Annotated[
        Optional[float],
        pydantic.Field(
            alias="thisYearEstimatedTaxPaymentsAndAmountAppliedFromLastYearReturn"
        ),
    ] = None
    r"""This year estimated tax payments and amount applied from last year return"""

    earned_income_credit_group: Annotated[
        Optional[EarnedIncomeCreditGroup],
        pydantic.Field(alias="earnedIncomeCreditGroup"),
    ] = None

    additional_child_tax_credit_schedule8812: Annotated[
        Optional[float], pydantic.Field(alias="additionalChildTaxCreditSchedule8812")
    ] = None
    r"""Additional child tax credit"""

    american_opportunity_credit_from_form8863: Annotated[
        Optional[float], pydantic.Field(alias="americanOpportunityCreditFromForm8863")
    ] = None
    r"""American opportunity credit from Form 8863"""

    recovery_rebate_credit: Annotated[
        Optional[float], pydantic.Field(alias="recoveryRebateCredit")
    ] = None
    r"""Recovery rebate credit"""

    amount_from_schedule5: Annotated[
        Optional[float], pydantic.Field(alias="amountFromSchedule5")
    ] = None
    r"""Amount from Schedule 5"""

    amount_from_schedule3: Annotated[
        Optional[float], pydantic.Field(alias="amountFromSchedule3")
    ] = None
    r"""Amount from Schedule 3"""

    total_other_payments_and_refundable_credits: Annotated[
        Optional[float], pydantic.Field(alias="totalOtherPaymentsAndRefundableCredits")
    ] = None
    r"""Total other payments and refundable credits"""

    total_payments: Annotated[
        Optional[float], pydantic.Field(alias="totalPayments")
    ] = None
    r"""Total payments"""

    overpaid_amount: Annotated[
        Optional[float], pydantic.Field(alias="overpaidAmount")
    ] = None
    r"""Overpaid amount"""

    refund_group: Annotated[
        Optional[RefundGroup], pydantic.Field(alias="refundGroup")
    ] = None

    overpaid_amount_to_be_applied_to_next_year_estimated_tax: Annotated[
        Optional[float],
        pydantic.Field(alias="overpaidAmountToBeAppliedToNextYearEstimatedTax"),
    ] = None
    r"""Overpaid amount to be applied to next year estimated tax"""

    owed_amount: Annotated[Optional[float], pydantic.Field(alias="owedAmount")] = None
    r"""Owed amount"""

    estimated_tax_penalty: Annotated[
        Optional[float], pydantic.Field(alias="estimatedTaxPenalty")
    ] = None
    r"""Estimated tax penalty"""

    third_party_designee: Annotated[
        Optional[ThirdPartyDesignee], pydantic.Field(alias="thirdPartyDesignee")
    ] = None

    signature: Optional[Signature] = None

    spouses_signature: Annotated[
        Optional[SpousesSignature], pydantic.Field(alias="spousesSignature")
    ] = None

    preparer: Optional[Preparer] = None


USForm1040FieldsTypedDict = TypeAliasType(
    "USForm1040FieldsTypedDict",
    Union[USForm10402018to2022TypedDict, USForm10402022TypedDict],
)
r"""Fields extracted from a US Form 1040"""


USForm1040Fields = TypeAliasType(
    "USForm1040Fields", Union[USForm10402018to2022, USForm10402022]
)
r"""Fields extracted from a US Form 1040"""
