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

from __future__ import annotations
from kombo.types import BaseModel, UNSET_SENTINEL
from pydantic import model_serializer
from typing import Optional
from typing_extensions import NotRequired, TypedDict


class DeleteHrisAbsencesAbsenceIDRequestBodyAdpworkforcenowTypedDict(TypedDict):
    r"""Fields specific to ADP Workforce Now."""

    employment_id: NotRequired[str]
    r"""[Required] The employment ID of the employee that the absence will be deleted from."""


class DeleteHrisAbsencesAbsenceIDRequestBodyAdpworkforcenow(BaseModel):
    r"""Fields specific to ADP Workforce Now."""

    employment_id: Optional[str] = None
    r"""[Required] The employment ID of the employee that the absence will be deleted from."""

    @model_serializer(mode="wrap")
    def serialize_model(self, handler):
        optional_fields = set(["employment_id"])
        serialized = handler(self)
        m = {}

        for n, f in type(self).model_fields.items():
            k = f.alias or n
            val = serialized.get(k, serialized.get(n))

            if val != UNSET_SENTINEL:
                if val is not None or k not in optional_fields:
                    m[k] = val

        return m


class DeleteHrisAbsencesAbsenceIDRequestBodyRemoteFieldsTypedDict(TypedDict):
    r"""Additional fields that we will pass through to specific HRIS systems."""

    adpworkforcenow: NotRequired[
        DeleteHrisAbsencesAbsenceIDRequestBodyAdpworkforcenowTypedDict
    ]
    r"""Fields specific to ADP Workforce Now."""


class DeleteHrisAbsencesAbsenceIDRequestBodyRemoteFields(BaseModel):
    r"""Additional fields that we will pass through to specific HRIS systems."""

    adpworkforcenow: Optional[DeleteHrisAbsencesAbsenceIDRequestBodyAdpworkforcenow] = (
        None
    )
    r"""Fields specific to ADP Workforce Now."""

    @model_serializer(mode="wrap")
    def serialize_model(self, handler):
        optional_fields = set(["adpworkforcenow"])
        serialized = handler(self)
        m = {}

        for n, f in type(self).model_fields.items():
            k = f.alias or n
            val = serialized.get(k, serialized.get(n))

            if val != UNSET_SENTINEL:
                if val is not None or k not in optional_fields:
                    m[k] = val

        return m


class DeleteHrisAbsencesAbsenceIDRequestBodyTypedDict(TypedDict):
    remote_fields: NotRequired[
        DeleteHrisAbsencesAbsenceIDRequestBodyRemoteFieldsTypedDict
    ]
    r"""Additional fields that we will pass through to specific HRIS systems."""


class DeleteHrisAbsencesAbsenceIDRequestBody(BaseModel):
    remote_fields: Optional[DeleteHrisAbsencesAbsenceIDRequestBodyRemoteFields] = None
    r"""Additional fields that we will pass through to specific HRIS systems."""

    @model_serializer(mode="wrap")
    def serialize_model(self, handler):
        optional_fields = set(["remote_fields"])
        serialized = handler(self)
        m = {}

        for n, f in type(self).model_fields.items():
            k = f.alias or n
            val = serialized.get(k, serialized.get(n))

            if val != UNSET_SENTINEL:
                if val is not None or k not in optional_fields:
                    m[k] = val

        return m
