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

from __future__ import annotations
from .versionheader import VersionHeader
from enum import Enum
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 PostCompaniesCompanyUUIDSuspensionsReconcileTaxMethod(str, Enum):
    r"""How Gusto will handle taxes already collected."""

    PAY_TAXES = "pay_taxes"
    REFUND_TAXES = "refund_taxes"


class Reason(str, Enum):
    r"""Explanation for why the company is suspending their account.

    > 🚧 FEIN or entity type changes require Customer Support
    >
    > If a company is switching FEIN or changing their entity type, this change must be performed by Gusto Customer Support and cannot be performed via the API at this time.
    """

    SWITCHING_PROVIDER = "switching_provider"
    SHUTTING_DOWN = "shutting_down"
    ACQUIRED = "acquired"
    NO_MORE_EMPLOYEES = "no_more_employees"
    CHANGING_EIN_OR_ENTITY_TYPE = "changing_ein_or_entity_type"


class LeavingFor(str, Enum):
    r"""Which competitor the company is joining instead. Required if `reason` is `'switching_provider'`."""

    APD = "apd"
    ADP_TOTAL_SOURCE = "adp_total_source"
    ACCOUNTANT = "accountant"
    BAMBOO_HR = "bamboo_hr"
    BANK_OR_FINANCIAL_INSTITUTION = "bank_or_financial_institution"
    CHECK = "check"
    INSPERITY = "insperity"
    INTUIT_OR_QUICKBOOKS = "intuit_or_quickbooks"
    JUSTWORKS = "justworks"
    MANUAL = "manual"
    NAMELY = "namely"
    ONPAY = "onpay"
    OTHER = "other"
    PATRIOT = "patriot"
    PAYCOM = "paycom"
    PAYLOCITY = "paylocity"
    RIPPLING = "rippling"
    SQUARE = "square"
    SUREPAYROLL = "surepayroll"
    TRINET = "trinet"
    ZENEFITS = "zenefits"


class PostCompaniesCompanyUUIDSuspensionsRequestBodyTypedDict(TypedDict):
    file_quarterly_forms: bool
    r"""Should Gusto file quarterly tax forms on behalf of the company? The correct answer can depend on why the company is suspending their account, and how taxes are being reconciled."""
    file_yearly_forms: bool
    r"""Should Gusto file yearly tax forms on behalf of the company? The correct answer can depend on why the company is suspending their account, and how taxes are being reconciled."""
    reconcile_tax_method: PostCompaniesCompanyUUIDSuspensionsReconcileTaxMethod
    r"""How Gusto will handle taxes already collected."""
    reason: Reason
    r"""Explanation for why the company is suspending their account.

    > 🚧 FEIN or entity type changes require Customer Support
    >
    > If a company is switching FEIN or changing their entity type, this change must be performed by Gusto Customer Support and cannot be performed via the API at this time.
    """
    comments: NotRequired[str]
    r"""User-supplied comments describing why they are suspending their account."""
    leaving_for: NotRequired[LeavingFor]
    r"""Which competitor the company is joining instead. Required if `reason` is `'switching_provider'`."""


class PostCompaniesCompanyUUIDSuspensionsRequestBody(BaseModel):
    file_quarterly_forms: bool
    r"""Should Gusto file quarterly tax forms on behalf of the company? The correct answer can depend on why the company is suspending their account, and how taxes are being reconciled."""

    file_yearly_forms: bool
    r"""Should Gusto file yearly tax forms on behalf of the company? The correct answer can depend on why the company is suspending their account, and how taxes are being reconciled."""

    reconcile_tax_method: PostCompaniesCompanyUUIDSuspensionsReconcileTaxMethod
    r"""How Gusto will handle taxes already collected."""

    reason: Reason
    r"""Explanation for why the company is suspending their account.

    > 🚧 FEIN or entity type changes require Customer Support
    >
    > If a company is switching FEIN or changing their entity type, this change must be performed by Gusto Customer Support and cannot be performed via the API at this time.
    """

    comments: Optional[str] = None
    r"""User-supplied comments describing why they are suspending their account."""

    leaving_for: Optional[LeavingFor] = None
    r"""Which competitor the company is joining instead. Required if `reason` is `'switching_provider'`."""


class PostCompaniesCompanyUUIDSuspensionsRequestTypedDict(TypedDict):
    company_uuid: str
    r"""The UUID of the company"""
    request_body: PostCompaniesCompanyUUIDSuspensionsRequestBodyTypedDict
    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 PostCompaniesCompanyUUIDSuspensionsRequest(BaseModel):
    company_uuid: Annotated[
        str, FieldMetadata(path=PathParamMetadata(style="simple", explode=False))
    ]
    r"""The UUID of the company"""

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

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