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

from __future__ import annotations
from .versionheader import VersionHeader
from gusto_embedded.types import BaseModel
from gusto_embedded.utils import (
    FieldMetadata,
    HeaderMetadata,
    PathParamMetadata,
    RequestMetadata,
)
import pydantic
from typing import Optional
from typing_extensions import Annotated, NotRequired, TypedDict


class PutV1EmployeesEmployeeIDI9AuthorizationEmployerSignRequestBodyTypedDict(
    TypedDict
):
    signature_text: str
    r"""The signature"""
    signer_title: str
    r"""The signer's job title"""
    agree: bool
    r"""Whether you agree to sign electronically"""
    signed_by_ip_address: NotRequired[str]
    r"""The IP address of the signatory who signed the form. Both IPv4 AND IPv6 are supported. You must provide the IP address with either this parameter OR you can leave out this parameter and set the IP address in the request header using the `x-gusto-client-ip` header instead."""
    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 PutV1EmployeesEmployeeIDI9AuthorizationEmployerSignRequestBody(BaseModel):
    signature_text: str
    r"""The signature"""

    signer_title: str
    r"""The signer's job title"""

    agree: bool
    r"""Whether you agree to sign electronically"""

    signed_by_ip_address: Optional[str] = None
    r"""The IP address of the signatory who signed the form. Both IPv4 AND IPv6 are supported. You must provide the IP address with either this parameter OR you can leave out this parameter and set the IP address in the request header using the `x-gusto-client-ip` header instead."""

    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"""


class PutV1EmployeesEmployeeIDI9AuthorizationEmployerSignRequestTypedDict(TypedDict):
    employee_id: str
    r"""The UUID of the employee"""
    request_body: (
        PutV1EmployeesEmployeeIDI9AuthorizationEmployerSignRequestBodyTypedDict
    )
    x_gusto_client_ip: NotRequired[str]
    r"""Optional header to supply the IP address. This can be used to supply the IP address for signature endpoints instead of the signed_by_ip_address parameter."""
    x_gusto_api_version: NotRequired[VersionHeader]
    r"""Determines the date-based API version associated with your API call. If none is provided, your application's [minimum API version](https://docs.gusto.com/embedded-payroll/docs/api-versioning#minimum-api-version) is used."""


class PutV1EmployeesEmployeeIDI9AuthorizationEmployerSignRequest(BaseModel):
    employee_id: Annotated[
        str, FieldMetadata(path=PathParamMetadata(style="simple", explode=False))
    ]
    r"""The UUID of the employee"""

    request_body: Annotated[
        PutV1EmployeesEmployeeIDI9AuthorizationEmployerSignRequestBody,
        FieldMetadata(request=RequestMetadata(media_type="application/json")),
    ]

    x_gusto_client_ip: Annotated[
        Optional[str],
        pydantic.Field(alias="x-gusto-client-ip"),
        FieldMetadata(header=HeaderMetadata(style="simple", explode=False)),
    ] = None
    r"""Optional header to supply the IP address. This can be used to supply the IP address for signature endpoints instead of the signed_by_ip_address parameter."""

    x_gusto_api_version: Annotated[
        Optional[VersionHeader],
        pydantic.Field(alias="X-Gusto-API-Version"),
        FieldMetadata(header=HeaderMetadata(style="simple", explode=False)),
    ] = VersionHeader.TWO_THOUSAND_AND_TWENTY_FOUR_04_01
    r"""Determines the date-based API version associated with your API call. If none is provided, your application's [minimum API version](https://docs.gusto.com/embedded-payroll/docs/api-versioning#minimum-api-version) is used."""
