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


class AccountCoOwnerNameTypedDict(TypedDict):
    account_co_owner_name: NotRequired[str]
    r"""The name of the joint account holder"""


class AccountCoOwnerName(BaseModel):
    account_co_owner_name: Annotated[
        Optional[str], pydantic.Field(alias="accountCoOwnerName")
    ] = None
    r"""The name of the joint account holder"""


class BankStatementFieldsTypedDict(TypedDict):
    r"""Fields extracted from a bank statement"""

    bank_name: NotRequired[str]
    r"""The name of the bank"""
    account_number: NotRequired[str]
    r"""The bank account number"""
    account_owner_name: NotRequired[str]
    r"""The account holder name"""
    account_owner_address: NotRequired[str]
    r"""The account holder address"""
    account_co_owner_name: NotRequired[List[AccountCoOwnerNameTypedDict]]
    currency: NotRequired[str]
    r"""The currency of the account"""
    date_of_bank_statement: NotRequired[date]
    r"""The bank statement date"""
    ending_balance_of_the_period: NotRequired[float]
    r"""The balance at the end of the reporting period"""
    ending_balance_date: NotRequired[date]
    r"""The date of the end of the reporting period"""


class BankStatementFields(BaseModel):
    r"""Fields extracted from a bank statement"""

    bank_name: Annotated[Optional[str], pydantic.Field(alias="bankName")] = None
    r"""The name of the bank"""

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

    account_owner_name: Annotated[
        Optional[str], pydantic.Field(alias="accountOwnerName")
    ] = None
    r"""The account holder name"""

    account_owner_address: Annotated[
        Optional[str], pydantic.Field(alias="accountOwnerAddress")
    ] = None
    r"""The account holder address"""

    account_co_owner_name: Annotated[
        Optional[List[AccountCoOwnerName]], pydantic.Field(alias="accountCoOwnerName")
    ] = None

    currency: Optional[str] = None
    r"""The currency of the account"""

    date_of_bank_statement: Annotated[
        Optional[date], pydantic.Field(alias="dateOfBankStatement")
    ] = None
    r"""The bank statement date"""

    ending_balance_of_the_period: Annotated[
        Optional[float], pydantic.Field(alias="endingBalanceOfThePeriod")
    ] = None
    r"""The balance at the end of the reporting period"""

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