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

from __future__ import annotations
from .postaladdressupdate import PostalAddressUpdate, PostalAddressUpdateTypedDict
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 Optional
from typing_extensions import Annotated, NotRequired, TypedDict


class EmploymentUpdateEmploymentStatus(str, Enum, metaclass=utils.OpenEnumMeta):
    r"""Classifies in what capacity (or if) the underlying natural person holds a job"""

    STATUS_UNSPECIFIED = "STATUS_UNSPECIFIED"
    EMPLOYED = "EMPLOYED"
    SELF_EMPLOYED = "SELF_EMPLOYED"
    UNEMPLOYED = "UNEMPLOYED"
    RETIRED = "RETIRED"
    STUDENT = "STUDENT"


class EmploymentUpdateTypedDict(TypedDict):
    r"""Object containing information pertaining to a investor's current employer including the name, address, and duration of employment."""

    employer: NotRequired[str]
    r"""The business name of an investor's employer."""
    employer_address: NotRequired[PostalAddressUpdateTypedDict]
    r"""Represents a postal address, e.g. for postal delivery or payments addresses. Given a postal address, a postal service can deliver items to a premise, P.O. Box or similar. It is not intended to model geographical locations (roads, towns, mountains).

    In typical usage an address would be created via user input or from importing existing data, depending on the type of process.

    Advice on address input / editing: - Use an i18n-ready address widget such as  https://github.com/google/libaddressinput) - Users should not be presented with UI elements for input or editing of  fields outside countries where that field is used.

    For more guidance on how to use this schema, please see: https://support.google.com/business/answer/6397478
    """
    employment_status: NotRequired[EmploymentUpdateEmploymentStatus]
    r"""Classifies in what capacity (or if) the underlying natural person holds a job"""
    occupation: NotRequired[str]
    r"""The nature of work performed at an investor's place of employment."""
    start_year: NotRequired[int]
    r"""The start year of employment related to a person's stated employer Must be from birth year to current year, or 0 to clear start year value"""


class EmploymentUpdate(BaseModel):
    r"""Object containing information pertaining to a investor's current employer including the name, address, and duration of employment."""

    employer: Optional[str] = None
    r"""The business name of an investor's employer."""

    employer_address: Optional[PostalAddressUpdate] = None
    r"""Represents a postal address, e.g. for postal delivery or payments addresses. Given a postal address, a postal service can deliver items to a premise, P.O. Box or similar. It is not intended to model geographical locations (roads, towns, mountains).

    In typical usage an address would be created via user input or from importing existing data, depending on the type of process.

    Advice on address input / editing: - Use an i18n-ready address widget such as  https://github.com/google/libaddressinput) - Users should not be presented with UI elements for input or editing of  fields outside countries where that field is used.

    For more guidance on how to use this schema, please see: https://support.google.com/business/answer/6397478
    """

    employment_status: Annotated[
        Optional[EmploymentUpdateEmploymentStatus],
        PlainValidator(validate_open_enum(False)),
    ] = None
    r"""Classifies in what capacity (or if) the underlying natural person holds a job"""

    occupation: Optional[str] = None
    r"""The nature of work performed at an investor's place of employment."""

    start_year: Optional[int] = None
    r"""The start year of employment related to a person's stated employer Must be from birth year to current year, or 0 to clear start year value"""
