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

from __future__ import annotations
from enum import Enum
from gusto_embedded.types import BaseModel
from typing import Optional
from typing_extensions import NotRequired, TypedDict


class AuthorizationStatus(str, Enum):
    r"""The employee's authorization status"""

    CITIZEN = "citizen"
    NONCITIZEN = "noncitizen"
    PERMANENT_RESIDENT = "permanent_resident"
    ALIEN = "alien"


class I9AuthorizationDocumentType(str, Enum):
    r"""The document's document type"""

    USCIS_ALIEN_REGISTRATION_NUMBER = "uscis_alien_registration_number"
    FORM_I94 = "form_i94"
    FOREIGN_PASSPORT = "foreign_passport"


class I9AuthorizationTypedDict(TypedDict):
    r"""An employee's I-9 authorization"""

    uuid: str
    r"""The UUID of the I-9 authorization"""
    version: str
    r"""The current version of the object. See the [versioning guide](https://docs.gusto.com/embedded-payroll/docs/idempotency) for information on how to use this field."""
    authorization_status: AuthorizationStatus
    r"""The employee's authorization status"""
    employer_signed: bool
    r"""Whether the employer has signed the Form I-9"""
    employee_signed: bool
    r"""Whether the employee has signed the Form I-9"""
    form_uuid: NotRequired[str]
    r"""The UUID of the Form associated with this I-9 authorization. Use this with \"Employee Forms\" API endpoints."""
    document_type: NotRequired[I9AuthorizationDocumentType]
    r"""The document's document type"""
    has_document_number: NotRequired[bool]
    r"""Whether or not a `document_number` exists for this document."""
    expiration_date: NotRequired[str]
    r"""The document's expiration date"""
    country: NotRequired[str]
    r"""The document's country of issuance"""
    additional_info: NotRequired[str]
    r"""Any additional notes"""
    alt_procedure: NotRequired[bool]
    r"""Whether an alternative procedure authorized by DHS to examine documents was used"""


class I9Authorization(BaseModel):
    r"""An employee's I-9 authorization"""

    uuid: str
    r"""The UUID of the I-9 authorization"""

    version: str
    r"""The current version of the object. See the [versioning guide](https://docs.gusto.com/embedded-payroll/docs/idempotency) for information on how to use this field."""

    authorization_status: AuthorizationStatus
    r"""The employee's authorization status"""

    employer_signed: bool
    r"""Whether the employer has signed the Form I-9"""

    employee_signed: bool
    r"""Whether the employee has signed the Form I-9"""

    form_uuid: Optional[str] = None
    r"""The UUID of the Form associated with this I-9 authorization. Use this with \"Employee Forms\" API endpoints."""

    document_type: Optional[I9AuthorizationDocumentType] = None
    r"""The document's document type"""

    has_document_number: Optional[bool] = None
    r"""Whether or not a `document_number` exists for this document."""

    expiration_date: Optional[str] = None
    r"""The document's expiration date"""

    country: Optional[str] = None
    r"""The document's country of issuance"""

    additional_info: Optional[str] = None
    r"""Any additional notes"""

    alt_procedure: Optional[bool] = None
    r"""Whether an alternative procedure authorized by DHS to examine documents was used"""
