"""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 FederalTaxClassification(str, Enum, metaclass=utils.OpenEnumMeta):
    r"""Federal tax classification."""

    FEDERAL_TAX_CLASSIFICATION_UNSPECIFIED = "FEDERAL_TAX_CLASSIFICATION_UNSPECIFIED"
    INDIV_SOLEPROP_OR_SINGLEMEMBERLLC = "INDIV_SOLEPROP_OR_SINGLEMEMBERLLC"
    PARTNERSHIP = "PARTNERSHIP"
    C_CORPORATION = "C_CORPORATION"
    S_CORPORATION = "S_CORPORATION"
    TRUST_ESTATE = "TRUST_ESTATE"
    LLC_TAXED_AS_C_CORP = "LLC_TAXED_AS_C_CORP"
    LLC_TAXED_AS_S_CORP = "LLC_TAXED_AS_S_CORP"
    LLC_TAXED_AS_PARTNERSHIP = "LLC_TAXED_AS_PARTNERSHIP"
    OTHER = "OTHER"


class IrsFormType(str, Enum, metaclass=utils.OpenEnumMeta):
    r"""IRS form type."""

    IRS_FORM_TYPE_UNSPECIFIED = "IRS_FORM_TYPE_UNSPECIFIED"
    W_9 = "W_9"


class UsTinStatus(str, Enum, metaclass=utils.OpenEnumMeta):
    r"""United States Individual Taxpayer Identification Number (ITIN) status."""

    US_TIN_STATUS_UNSPECIFIED = "US_TIN_STATUS_UNSPECIFIED"
    PASSING = "PASSING"
    FAILING = "FAILING"


class TaxProfileCreateTypedDict(TypedDict):
    r"""Tax Profile pertaining to the Legal Entity or Natural Person."""

    federal_tax_classification: FederalTaxClassification
    r"""Federal tax classification."""
    irs_form_type: IrsFormType
    r"""IRS form type."""
    legal_tax_region_code: str
    r"""Legal tax region must be \"US\" if provided W-9, otherwise must be a non-US country."""
    us_tin_status: UsTinStatus
    r"""United States Individual Taxpayer Identification Number (ITIN) status."""


class TaxProfileCreate(BaseModel):
    r"""Tax Profile pertaining to the Legal Entity or Natural Person."""

    federal_tax_classification: Annotated[
        FederalTaxClassification, PlainValidator(validate_open_enum(False))
    ]
    r"""Federal tax classification."""

    irs_form_type: Annotated[IrsFormType, PlainValidator(validate_open_enum(False))]
    r"""IRS form type."""

    legal_tax_region_code: str
    r"""Legal tax region must be \"US\" if provided W-9, otherwise must be a non-US country."""

    us_tin_status: Annotated[UsTinStatus, PlainValidator(validate_open_enum(False))]
    r"""United States Individual Taxpayer Identification Number (ITIN) status."""
