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

from __future__ import annotations
from ascend_sdk import utils
from ascend_sdk.types import BaseModel
from ascend_sdk.utils import validate_open_enum
from enum import Enum
from pydantic.functional_validators import PlainValidator
from typing_extensions import Annotated, TypedDict


class DocumentType(str, Enum, metaclass=utils.OpenEnumMeta):
    r"""Describes the contents of a document and how it is used; Required for all account documents"""

    ACCOUNT_DOCUMENT_TYPE_UNSPECIFIED = "ACCOUNT_DOCUMENT_TYPE_UNSPECIFIED"
    CERTIFICATE_OF_APPOINTMENT = "CERTIFICATE_OF_APPOINTMENT"
    FDIC_SWEEP_PROGRAM_AGREEMENT = "FDIC_SWEEP_PROGRAM_AGREEMENT"
    FPSL_MASTER_SERVICES_LOAN_AGREEMENT = "FPSL_MASTER_SERVICES_LOAN_AGREEMENT"
    TRANSFER_ON_DEATH_BENEFICIARY_DESIGNATION = (
        "TRANSFER_ON_DEATH_BENEFICIARY_DESIGNATION"
    )
    CHANGE_OF_ADDRESS = "CHANGE_OF_ADDRESS"
    NEW_ACCOUNT_FORM = "NEW_ACCOUNT_FORM"
    LETTER_3210 = "LETTER_3210"
    IRA_APPL_FORM = "IRA_APPL_FORM"
    RIA_IRA_APPL_FORM = "RIA_IRA_APPL_FORM"
    IRA_DEPOSIT_FORM = "IRA_DEPOSIT_FORM"
    RIA_IRA_DEPOSIT_FORM = "RIA_IRA_DEPOSIT_FORM"
    IRA_DIST_FORM = "IRA_DIST_FORM"
    RIA_IRA_DIST_FORM = "RIA_IRA_DIST_FORM"
    ROTH_APPL_FORM = "ROTH_APPL_FORM"
    RIA_ROTH_APPL_FORM = "RIA_ROTH_APPL_FORM"
    ROTH_DIST_FORM = "ROTH_DIST_FORM"
    RIA_ROTH_DIST_FORM = "RIA_ROTH_DIST_FORM"
    SIMPLE_CONT_TRANSM = "SIMPLE_CONT_TRANSM"
    ESA_APPL_FORM = "ESA_APPL_FORM"
    ESA_WTHDR_STATEMENT = "ESA_WTHDR_STATEMENT"
    DIR_CONV_FORM = "DIR_CONV_FORM"
    MRGN_OPTA_AGREEMENT = "MRGN_OPTA_AGREEMENT"
    IRA_BENE_FORM = "IRA_BENE_FORM"
    IRA_JRNL_FORM = "IRA_JRNL_FORM"
    SEP_EMPL_PLAN_DOC = "SEP_EMPL_PLAN_DOC"
    SIMPLE_ADOPT_AGREEMENT = "SIMPLE_ADOPT_AGREEMENT"
    SIMPLE_APPL_FORM = "SIMPLE_APPL_FORM"
    DEATH_CERTIFICATION = "DEATH_CERTIFICATION"
    ACH_AGREEMENT = "ACH_AGREEMENT"
    APEX_SELECT_APPLICATION = "APEX_SELECT_APPLICATION"
    ASA_DIRECT_DEPOSIT = "ASA_DIRECT_DEPOSIT"
    BANKING_MISC = "BANKING_MISC"
    ACC_TRANSFER_FORM = "ACC_TRANSFER_FORM"
    ADDRESS_VERIFICATION_NOTICE = "ADDRESS_VERIFICATION_NOTICE"
    AFFIDAVIT_OF_DOMICILE = "AFFIDAVIT_OF_DOMICILE"
    APEX_SIMPLE_DIRECT_DEPOSIT = "APEX_SIMPLE_DIRECT_DEPOSIT"
    TRANSFER_FORM = "TRANSFER_FORM"
    JOURNAL_REQUEST_FORM = "JOURNAL_REQUEST_FORM"
    CHECK = "CHECK"
    CHECK_REQUEST_FORM = "CHECK_REQUEST_FORM"
    CORP_AGREEMENT_CASH = "CORP_AGREEMENT_CASH"
    CORP_AGREEMENT_MARGINS_OPTIONS = "CORP_AGREEMENT_MARGINS_OPTIONS"
    CORP_RESOLUTION = "CORP_RESOLUTION"
    COURT_DOCUMENT = "COURT_DOCUMENT"
    COURT_ORDER = "COURT_ORDER"
    DEPOSIT_SECURITIES_REQUEST_FORM = "DEPOSIT_SECURITIES_REQUEST_FORM"
    DIGITAL_SIGNATURE = "DIGITAL_SIGNATURE"
    DIRECT_CONVERSION_REQUEST = "DIRECT_CONVERSION_REQUEST"
    DISTRIBUTION_FORM = "DISTRIBUTION_FORM"
    DOCUMENT_IRS = "DOCUMENT_IRS"
    DOMESTIC_WIRE = "DOMESTIC_WIRE"
    DWAC_REQUEST_FORM = "DWAC_REQUEST_FORM"
    DWRE = "DWRE"
    ENTITY_DUE_DILIGENCE_QUESTIONNAIRE = "ENTITY_DUE_DILIGENCE_QUESTIONNAIRE"
    ENTITY_UPDATE_FORM = "ENTITY_UPDATE_FORM"
    ESCHEAT_FORM = "ESCHEAT_FORM"
    ESCHEATMENT_DUE_DILIGENCE_LETTER = "ESCHEATMENT_DUE_DILIGENCE_LETTER"
    E_SIGNATURE_MARGIN = "E_SIGNATURE_MARGIN"
    E_SIGNATURE = "E_SIGNATURE"
    E_SIGNATURE_OPTION = "E_SIGNATURE_OPTION"
    FOREIGN_ACCOUNT_DUE_DILIGENCE_QUESTIONNAIRE = (
        "FOREIGN_ACCOUNT_DUE_DILIGENCE_QUESTIONNAIRE"
    )
    FOREIGN_BANK_CERTIFICATION_DISCLOSURE = "FOREIGN_BANK_CERTIFICATION_DISCLOSURE"
    FOREIGN_ENTITY_DECLARATION_FORM = "FOREIGN_ENTITY_DECLARATION_FORM"
    FOREIGN_FIN_INST_DUE_DILIGENCE_QUESTIONNAIRE = (
        "FOREIGN_FIN_INST_DUE_DILIGENCE_QUESTIONNAIRE"
    )
    FORM_144 = "FORM_144"
    FREE_DELIVERY_FORM = "FREE_DELIVERY_FORM"
    FULL_TRADING_AUTHORIZATION = "FULL_TRADING_AUTHORIZATION"
    INTERNATIONAL_WIRE_REQUEST_FORM = "INTERNATIONAL_WIRE_REQUEST_FORM"
    IRA_LIMITED_MARGIN = "IRA_LIMITED_MARGIN"
    IRREVOCABLE_STOCK_BOND_POWER = "IRREVOCABLE_STOCK_BOND_POWER"
    JOINT_ACC_AGREEMENT_ENTIRETY = "JOINT_ACC_AGREEMENT_ENTIRETY"
    JOINT_ACC_AGREEMENT_RIGHTS_OF_SURVIVORSHIP = (
        "JOINT_ACC_AGREEMENT_RIGHTS_OF_SURVIVORSHIP"
    )
    JOINT_ACC_AGREEMENT_COMMUNITY_PROPERTY = "JOINT_ACC_AGREEMENT_COMMUNITY_PROPERTY"
    JOINT_ACC_AGREEMENT_TENANTS_IN_COMMON = "JOINT_ACC_AGREEMENT_TENANTS_IN_COMMON"
    JOINT_TEFRA_W8 = "JOINT_TEFRA_W8"
    LEGAL_OPINION = "LEGAL_OPINION"
    LETTER_OF_AUTHORITY = "LETTER_OF_AUTHORITY"
    LETTERS_OF_TESTAMENTARY_CERT_APPOINTMENT = (
        "LETTERS_OF_TESTAMENTARY_CERT_APPOINTMENT"
    )
    LIMITED_LIABILITY_COMPANY_AGREEMENT = "LIMITED_LIABILITY_COMPANY_AGREEMENT"
    LIMITED_PURPOSE_MARGIN = "LIMITED_PURPOSE_MARGIN"
    MAIL_AUTHORIZATION = "MAIL_AUTHORIZATION"
    MARGIN_AGREEMENT = "MARGIN_AGREEMENT"
    MSLA = "MSLA"
    MASTER_SUBACC_ADD_ACC_REQUEST = "MASTER_SUBACC_ADD_ACC_REQUEST"
    MASTER_SUBACC_ADD_ACC_REQUEST_W_CORR_ATTESTATION = (
        "MASTER_SUBACC_ADD_ACC_REQUEST_W_CORR_ATTESTATION"
    )
    MISC_GENERAL = "MISC_GENERAL"
    NEW_ACCOUNT_APPLICATION_ENTITY = "NEW_ACCOUNT_APPLICATION_ENTITY"
    NON_CORPORATE_ASSOCIATION = "NON_CORPORATE_ASSOCIATION"
    PARTNERSHIP_AGREEMENT = "PARTNERSHIP_AGREEMENT"
    PATTERN_DAY_TRADER_FORM = "PATTERN_DAY_TRADER_FORM"
    POWER_OF_ATTORNEY_DURABLE = "POWER_OF_ATTORNEY_DURABLE"
    POWER_OF_ATTORNEY_GENERAL = "POWER_OF_ATTORNEY_GENERAL"
    REGISTERED_ADVISORY_AUTHORITY_FORM = "REGISTERED_ADVISORY_AUTHORITY_FORM"
    RMD = "RMD"
    RISK_DISCLOSURE = "RISK_DISCLOSURE"
    RULE_145_SELLERS_LETTER = "RULE_145_SELLERS_LETTER"
    RULE_701_LETTER = "RULE_701_LETTER"
    SAME_NAME_LOA = "SAME_NAME_LOA"
    SECURITIES_BASED_LENDING_AGREEMENT = "SECURITIES_BASED_LENDING_AGREEMENT"
    SEP_CONTRIBUTION_AGREEMENT = "SEP_CONTRIBUTION_AGREEMENT"
    SEP_EMPLOYER_PLAN_DOCUMENTATION = "SEP_EMPLOYER_PLAN_DOCUMENTATION"
    SIGNATURE_CARD = "SIGNATURE_CARD"
    SIMPLE_FORM_5304 = "SIMPLE_FORM_5304"
    SIMPLIFIED_EMPLOYEE_PENSION = "SIMPLIFIED_EMPLOYEE_PENSION"
    CERTIFICATE_SOLE_PROPRIETORSHIP = "CERTIFICATE_SOLE_PROPRIETORSHIP"
    TRANSFER_ON_DEATH = "TRANSFER_ON_DEATH"
    TRUST_AGREEMENT = "TRUST_AGREEMENT"
    TAX_W8_BEN = "TAX_W8_BEN"
    TAX_W8_BEN_JOINT_ACCOUNT_HOLDER = "TAX_W8_BEN_JOINT_ACCOUNT_HOLDER"
    TAX_W8_ECI = "TAX_W8_ECI"
    TAX_W8_EXP = "TAX_W8_EXP"
    TAX_W8_IMY = "TAX_W8_IMY"
    TAX_W9 = "TAX_W9"
    WILL_COPY = "WILL_COPY"
    WIRE_REQUEST_FORM = "WIRE_REQUEST_FORM"
    WORTHLESS_SECURITIES = "WORTHLESS_SECURITIES"
    CHANGE_OF_ADDRESS_REQUEST = "CHANGE_OF_ADDRESS_REQUEST"
    OPTIONS_AGREEMENT = "OPTIONS_AGREEMENT"


class AccountDocumentUploadRequestCreateTypedDict(TypedDict):
    r"""Account document to be uploaded;"""

    account_id: str
    r"""Identifies the account relevant to the document; Required for all account documents"""
    correspondent_id: str
    r"""Identifies the correspondent relevant to the document; Required for all account documents"""
    document_type: DocumentType
    r"""Describes the contents of a document and how it is used; Required for all account documents"""


class AccountDocumentUploadRequestCreate(BaseModel):
    r"""Account document to be uploaded;"""

    account_id: str
    r"""Identifies the account relevant to the document; Required for all account documents"""

    correspondent_id: str
    r"""Identifies the correspondent relevant to the document; Required for all account documents"""

    document_type: Annotated[DocumentType, PlainValidator(validate_open_enum(False))]
    r"""Describes the contents of a document and how it is used; Required for all account documents"""
