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

from __future__ import annotations
from gusto_app_integration.types import BaseModel
from typing import List, Optional
from typing_extensions import NotRequired, TypedDict


class DefaultValueTypedDict(TypedDict):
    value: NotRequired[str]
    type: NotRequired[str]


class DefaultValue(BaseModel):
    value: Optional[str] = None

    type: Optional[str] = None


class EmployeeDeductionTypedDict(TypedDict):
    r"""The amount to be deducted, per pay period, from the employee's pay."""

    required: NotRequired[bool]
    editable: NotRequired[bool]
    default_value: NotRequired[DefaultValueTypedDict]
    choices: NotRequired[List[str]]


class EmployeeDeduction(BaseModel):
    r"""The amount to be deducted, per pay period, from the employee's pay."""

    required: Optional[bool] = None

    editable: Optional[bool] = None

    default_value: Optional[DefaultValue] = None

    choices: Optional[List[str]] = None


class BenefitTypeRequirementsDefaultValueTypedDict(TypedDict):
    value: NotRequired[str]
    type: NotRequired[str]


class BenefitTypeRequirementsDefaultValue(BaseModel):
    value: Optional[str] = None

    type: Optional[str] = None


class BenefitTypeRequirementsContributionTypedDict(TypedDict):
    r"""An object representing the type and value of the company contribution."""

    required: NotRequired[bool]
    editable: NotRequired[bool]
    default_value: NotRequired[BenefitTypeRequirementsDefaultValueTypedDict]
    choices: NotRequired[List[str]]


class BenefitTypeRequirementsContribution(BaseModel):
    r"""An object representing the type and value of the company contribution."""

    required: Optional[bool] = None

    editable: Optional[bool] = None

    default_value: Optional[BenefitTypeRequirementsDefaultValue] = None

    choices: Optional[List[str]] = None


class BenefitTypeRequirementsDeductAsPercentageDefaultValueTypedDict(TypedDict):
    value: NotRequired[str]
    type: NotRequired[str]


class BenefitTypeRequirementsDeductAsPercentageDefaultValue(BaseModel):
    value: Optional[str] = None

    type: Optional[str] = None


class DeductAsPercentageTypedDict(TypedDict):
    r"""Whether the employee deduction amount should be treated as a percentage to be deducted from each payroll."""

    required: NotRequired[bool]
    editable: NotRequired[bool]
    default_value: NotRequired[
        BenefitTypeRequirementsDeductAsPercentageDefaultValueTypedDict
    ]
    choices: NotRequired[List[str]]


class DeductAsPercentage(BaseModel):
    r"""Whether the employee deduction amount should be treated as a percentage to be deducted from each payroll."""

    required: Optional[bool] = None

    editable: Optional[bool] = None

    default_value: Optional[BenefitTypeRequirementsDeductAsPercentageDefaultValue] = (
        None
    )

    choices: Optional[List[str]] = None


class BenefitTypeRequirementsCatchUpDefaultValueTypedDict(TypedDict):
    value: NotRequired[str]
    type: NotRequired[str]


class BenefitTypeRequirementsCatchUpDefaultValue(BaseModel):
    value: Optional[str] = None

    type: Optional[str] = None


class CatchUpTypedDict(TypedDict):
    r"""Whether the employee should use a benefit’s 'catch up' rate. Only Roth 401k and 401k benefits use this value for employees over 50."""

    required: NotRequired[bool]
    editable: NotRequired[bool]
    default_value: NotRequired[BenefitTypeRequirementsCatchUpDefaultValueTypedDict]
    choices: NotRequired[List[str]]


class CatchUp(BaseModel):
    r"""Whether the employee should use a benefit’s 'catch up' rate. Only Roth 401k and 401k benefits use this value for employees over 50."""

    required: Optional[bool] = None

    editable: Optional[bool] = None

    default_value: Optional[BenefitTypeRequirementsCatchUpDefaultValue] = None

    choices: Optional[List[str]] = None


class BenefitTypeRequirementsLimitOptionDefaultValueTypedDict(TypedDict):
    value: NotRequired[str]
    type: NotRequired[str]


class BenefitTypeRequirementsLimitOptionDefaultValue(BaseModel):
    value: Optional[str] = None

    type: Optional[str] = None


class LimitOptionTypedDict(TypedDict):
    r"""Some benefits require additional information to determine their limit. For example, for an HSA benefit, the limit option should be either 'Family' or 'Individual'. For a Dependent Care FSA benefit, the limit option should be either 'Joint Filing or Single' or 'Married and Filing Separately'."""

    required: NotRequired[bool]
    editable: NotRequired[bool]
    default_value: NotRequired[BenefitTypeRequirementsLimitOptionDefaultValueTypedDict]
    choices: NotRequired[List[str]]


class LimitOption(BaseModel):
    r"""Some benefits require additional information to determine their limit. For example, for an HSA benefit, the limit option should be either 'Family' or 'Individual'. For a Dependent Care FSA benefit, the limit option should be either 'Joint Filing or Single' or 'Married and Filing Separately'."""

    required: Optional[bool] = None

    editable: Optional[bool] = None

    default_value: Optional[BenefitTypeRequirementsLimitOptionDefaultValue] = None

    choices: Optional[List[str]] = None


class BenefitTypeRequirementsCompanyContributionAnnualMaximumDefaultValueTypedDict(
    TypedDict
):
    value: NotRequired[str]
    type: NotRequired[str]


class BenefitTypeRequirementsCompanyContributionAnnualMaximumDefaultValue(BaseModel):
    value: Optional[str] = None

    type: Optional[str] = None


class CompanyContributionAnnualMaximumTypedDict(TypedDict):
    r"""The maximum company contribution amount per year. A null value signifies no limit."""

    required: NotRequired[bool]
    editable: NotRequired[bool]
    default_value: NotRequired[
        BenefitTypeRequirementsCompanyContributionAnnualMaximumDefaultValueTypedDict
    ]
    choices: NotRequired[List[str]]


class CompanyContributionAnnualMaximum(BaseModel):
    r"""The maximum company contribution amount per year. A null value signifies no limit."""

    required: Optional[bool] = None

    editable: Optional[bool] = None

    default_value: Optional[
        BenefitTypeRequirementsCompanyContributionAnnualMaximumDefaultValue
    ] = None

    choices: Optional[List[str]] = None


class BenefitTypeRequirementsCoverageSalaryMultiplierDefaultValueTypedDict(TypedDict):
    value: NotRequired[str]
    type: NotRequired[str]


class BenefitTypeRequirementsCoverageSalaryMultiplierDefaultValue(BaseModel):
    value: Optional[str] = None

    type: Optional[str] = None


class CoverageSalaryMultiplierTypedDict(TypedDict):
    r"""The coverage amount as a multiple of the employee's salary. Only applicable for Group Term Life benefits. Note: cannot be set if coverage amount is also set."""

    required: NotRequired[bool]
    editable: NotRequired[bool]
    default_value: NotRequired[
        BenefitTypeRequirementsCoverageSalaryMultiplierDefaultValueTypedDict
    ]
    choices: NotRequired[List[str]]


class CoverageSalaryMultiplier(BaseModel):
    r"""The coverage amount as a multiple of the employee's salary. Only applicable for Group Term Life benefits. Note: cannot be set if coverage amount is also set."""

    required: Optional[bool] = None

    editable: Optional[bool] = None

    default_value: Optional[
        BenefitTypeRequirementsCoverageSalaryMultiplierDefaultValue
    ] = None

    choices: Optional[List[str]] = None


class BenefitTypeRequirementsCoverageAmountDefaultValueTypedDict(TypedDict):
    value: NotRequired[str]
    type: NotRequired[str]


class BenefitTypeRequirementsCoverageAmountDefaultValue(BaseModel):
    value: Optional[str] = None

    type: Optional[str] = None


class CoverageAmountTypedDict(TypedDict):
    r"""The amount that the employee is insured for. Note: company contribution cannot be present if coverage amount is set."""

    required: NotRequired[bool]
    editable: NotRequired[bool]
    default_value: NotRequired[
        BenefitTypeRequirementsCoverageAmountDefaultValueTypedDict
    ]
    choices: NotRequired[List[str]]


class CoverageAmount(BaseModel):
    r"""The amount that the employee is insured for. Note: company contribution cannot be present if coverage amount is set."""

    required: Optional[bool] = None

    editable: Optional[bool] = None

    default_value: Optional[BenefitTypeRequirementsCoverageAmountDefaultValue] = None

    choices: Optional[List[str]] = None


class BenefitTypeRequirementsTypedDict(TypedDict):
    r"""Benefit type requirements response"""

    employee_deduction: NotRequired[EmployeeDeductionTypedDict]
    r"""The amount to be deducted, per pay period, from the employee's pay."""
    contribution: NotRequired[BenefitTypeRequirementsContributionTypedDict]
    r"""An object representing the type and value of the company contribution."""
    deduct_as_percentage: NotRequired[DeductAsPercentageTypedDict]
    r"""Whether the employee deduction amount should be treated as a percentage to be deducted from each payroll."""
    catch_up: NotRequired[CatchUpTypedDict]
    r"""Whether the employee should use a benefit’s 'catch up' rate. Only Roth 401k and 401k benefits use this value for employees over 50."""
    limit_option: NotRequired[LimitOptionTypedDict]
    r"""Some benefits require additional information to determine their limit. For example, for an HSA benefit, the limit option should be either 'Family' or 'Individual'. For a Dependent Care FSA benefit, the limit option should be either 'Joint Filing or Single' or 'Married and Filing Separately'."""
    company_contribution_annual_maximum: NotRequired[
        CompanyContributionAnnualMaximumTypedDict
    ]
    r"""The maximum company contribution amount per year. A null value signifies no limit."""
    coverage_salary_multiplier: NotRequired[CoverageSalaryMultiplierTypedDict]
    r"""The coverage amount as a multiple of the employee's salary. Only applicable for Group Term Life benefits. Note: cannot be set if coverage amount is also set."""
    coverage_amount: NotRequired[CoverageAmountTypedDict]
    r"""The amount that the employee is insured for. Note: company contribution cannot be present if coverage amount is set."""


class BenefitTypeRequirements(BaseModel):
    r"""Benefit type requirements response"""

    employee_deduction: Optional[EmployeeDeduction] = None
    r"""The amount to be deducted, per pay period, from the employee's pay."""

    contribution: Optional[BenefitTypeRequirementsContribution] = None
    r"""An object representing the type and value of the company contribution."""

    deduct_as_percentage: Optional[DeductAsPercentage] = None
    r"""Whether the employee deduction amount should be treated as a percentage to be deducted from each payroll."""

    catch_up: Optional[CatchUp] = None
    r"""Whether the employee should use a benefit’s 'catch up' rate. Only Roth 401k and 401k benefits use this value for employees over 50."""

    limit_option: Optional[LimitOption] = None
    r"""Some benefits require additional information to determine their limit. For example, for an HSA benefit, the limit option should be either 'Family' or 'Individual'. For a Dependent Care FSA benefit, the limit option should be either 'Joint Filing or Single' or 'Married and Filing Separately'."""

    company_contribution_annual_maximum: Optional[CompanyContributionAnnualMaximum] = (
        None
    )
    r"""The maximum company contribution amount per year. A null value signifies no limit."""

    coverage_salary_multiplier: Optional[CoverageSalaryMultiplier] = None
    r"""The coverage amount as a multiple of the employee's salary. Only applicable for Group Term Life benefits. Note: cannot be set if coverage amount is also set."""

    coverage_amount: Optional[CoverageAmount] = None
    r"""The amount that the employee is insured for. Note: company contribution cannot be present if coverage amount is set."""
