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


class PersonIdentificationUpdateType(str, Enum, metaclass=utils.OpenEnumMeta):
    r"""Tax id type (e.g. ssn)"""

    ID_TYPE_UNSPECIFIED = "ID_TYPE_UNSPECIFIED"
    SSN = "SSN"
    ITIN = "ITIN"


class PersonIdentificationUpdateTypedDict(TypedDict):
    r"""stores various identification types"""

    administrative_area: NotRequired[str]
    r"""Administrative area that issued the identification For example, this can be a state, a province, an oblast, or a prefecture."""
    document_reference_ids: NotRequired[List[str]]
    r"""One or more UUIDs from the documents api of the image(s) of the document that relates to the identification for the person investigation."""
    region_code: NotRequired[str]
    r"""Country that issued identification Two character region code, complies with https://cldr.unicode.org/index"""
    type: NotRequired[PersonIdentificationUpdateType]
    r"""Tax id type (e.g. ssn)"""
    value: NotRequired[str]
    r"""Tax id value"""


class PersonIdentificationUpdate(BaseModel):
    r"""stores various identification types"""

    administrative_area: Optional[str] = None
    r"""Administrative area that issued the identification For example, this can be a state, a province, an oblast, or a prefecture."""

    document_reference_ids: Optional[List[str]] = None
    r"""One or more UUIDs from the documents api of the image(s) of the document that relates to the identification for the person investigation."""

    region_code: Optional[str] = None
    r"""Country that issued identification Two character region code, complies with https://cldr.unicode.org/index"""

    type: Annotated[
        Optional[PersonIdentificationUpdateType],
        PlainValidator(validate_open_enum(False)),
    ] = None
    r"""Tax id type (e.g. ssn)"""

    value: Optional[str] = None
    r"""Tax id value"""
