from __future__ import annotations

from collections.abc import Mapping
from typing import Any, TypeVar

from attrs import define as _attrs_define
from attrs import field as _attrs_field

from ..types import UNSET, Unset

T = TypeVar("T", bound="TypesTransactionFloats")


@_attrs_define
class TypesTransactionFloats:
    """
    Attributes:
        ee_pre_tax (float | Unset): Employee Contributions
        ee_roth (float | Unset):
        er_match (float | Unset): Employer Contributions
        er_non_elective (float | Unset):
        er_qaca_match (float | Unset):
        er_safe_harbor_match (float | Unset):
        er_safe_harbor_non_elective (float | Unset):
        gross_minus_exclusions (float | Unset): Gross pay minus exclusions
        gross_pay (float | Unset):
        hours_worked (float | Unset):
        hpi_compensation (float | Unset):
        prevailing_wage (float | Unset):
        statutory_compensation (float | Unset):
    """

    ee_pre_tax: float | Unset = UNSET
    ee_roth: float | Unset = UNSET
    er_match: float | Unset = UNSET
    er_non_elective: float | Unset = UNSET
    er_qaca_match: float | Unset = UNSET
    er_safe_harbor_match: float | Unset = UNSET
    er_safe_harbor_non_elective: float | Unset = UNSET
    gross_minus_exclusions: float | Unset = UNSET
    gross_pay: float | Unset = UNSET
    hours_worked: float | Unset = UNSET
    hpi_compensation: float | Unset = UNSET
    prevailing_wage: float | Unset = UNSET
    statutory_compensation: float | Unset = UNSET
    additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict)

    def to_dict(self) -> dict[str, Any]:
        ee_pre_tax = self.ee_pre_tax

        ee_roth = self.ee_roth

        er_match = self.er_match

        er_non_elective = self.er_non_elective

        er_qaca_match = self.er_qaca_match

        er_safe_harbor_match = self.er_safe_harbor_match

        er_safe_harbor_non_elective = self.er_safe_harbor_non_elective

        gross_minus_exclusions = self.gross_minus_exclusions

        gross_pay = self.gross_pay

        hours_worked = self.hours_worked

        hpi_compensation = self.hpi_compensation

        prevailing_wage = self.prevailing_wage

        statutory_compensation = self.statutory_compensation

        field_dict: dict[str, Any] = {}
        field_dict.update(self.additional_properties)
        field_dict.update({})
        if ee_pre_tax is not UNSET:
            field_dict["ee_pre_tax"] = ee_pre_tax
        if ee_roth is not UNSET:
            field_dict["ee_roth"] = ee_roth
        if er_match is not UNSET:
            field_dict["er_match"] = er_match
        if er_non_elective is not UNSET:
            field_dict["er_non_elective"] = er_non_elective
        if er_qaca_match is not UNSET:
            field_dict["er_qaca_match"] = er_qaca_match
        if er_safe_harbor_match is not UNSET:
            field_dict["er_safe_harbor_match"] = er_safe_harbor_match
        if er_safe_harbor_non_elective is not UNSET:
            field_dict["er_safe_harbor_non_elective"] = er_safe_harbor_non_elective
        if gross_minus_exclusions is not UNSET:
            field_dict["gross_minus_exclusions"] = gross_minus_exclusions
        if gross_pay is not UNSET:
            field_dict["gross_pay"] = gross_pay
        if hours_worked is not UNSET:
            field_dict["hours_worked"] = hours_worked
        if hpi_compensation is not UNSET:
            field_dict["hpi_compensation"] = hpi_compensation
        if prevailing_wage is not UNSET:
            field_dict["prevailing_wage"] = prevailing_wage
        if statutory_compensation is not UNSET:
            field_dict["statutory_compensation"] = statutory_compensation

        return field_dict

    @classmethod
    def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T:
        d = dict(src_dict)
        ee_pre_tax = d.pop("ee_pre_tax", UNSET)

        ee_roth = d.pop("ee_roth", UNSET)

        er_match = d.pop("er_match", UNSET)

        er_non_elective = d.pop("er_non_elective", UNSET)

        er_qaca_match = d.pop("er_qaca_match", UNSET)

        er_safe_harbor_match = d.pop("er_safe_harbor_match", UNSET)

        er_safe_harbor_non_elective = d.pop("er_safe_harbor_non_elective", UNSET)

        gross_minus_exclusions = d.pop("gross_minus_exclusions", UNSET)

        gross_pay = d.pop("gross_pay", UNSET)

        hours_worked = d.pop("hours_worked", UNSET)

        hpi_compensation = d.pop("hpi_compensation", UNSET)

        prevailing_wage = d.pop("prevailing_wage", UNSET)

        statutory_compensation = d.pop("statutory_compensation", UNSET)

        types_transaction_floats = cls(
            ee_pre_tax=ee_pre_tax,
            ee_roth=ee_roth,
            er_match=er_match,
            er_non_elective=er_non_elective,
            er_qaca_match=er_qaca_match,
            er_safe_harbor_match=er_safe_harbor_match,
            er_safe_harbor_non_elective=er_safe_harbor_non_elective,
            gross_minus_exclusions=gross_minus_exclusions,
            gross_pay=gross_pay,
            hours_worked=hours_worked,
            hpi_compensation=hpi_compensation,
            prevailing_wage=prevailing_wage,
            statutory_compensation=statutory_compensation,
        )

        types_transaction_floats.additional_properties = d
        return types_transaction_floats

    @property
    def additional_keys(self) -> list[str]:
        return list(self.additional_properties.keys())

    def __getitem__(self, key: str) -> Any:
        return self.additional_properties[key]

    def __setitem__(self, key: str, value: Any) -> None:
        self.additional_properties[key] = value

    def __delitem__(self, key: str) -> None:
        del self.additional_properties[key]

    def __contains__(self, key: str) -> bool:
        return key in self.additional_properties
