# Code generated by Lark OpenAPI.

from typing import Any, Optional, Union, Dict, List, Set, IO, Callable, Type
from lark_oapi.core.construct import init


class LeaveRequestDetail(object):
    _types = {
        "leave_request_id": str,
        "leave_date": str,
        "leave_duration": str,
        "leave_duration_unit": int,
        "paid_type": int,
    }

    def __init__(self, d=None):
        self.leave_request_id: Optional[str] = None
        self.leave_date: Optional[str] = None
        self.leave_duration: Optional[str] = None
        self.leave_duration_unit: Optional[int] = None
        self.paid_type: Optional[int] = None
        init(self, d, self._types)

    @staticmethod
    def builder() -> "LeaveRequestDetailBuilder":
        return LeaveRequestDetailBuilder()


class LeaveRequestDetailBuilder(object):
    def __init__(self) -> None:
        self._leave_request_detail = LeaveRequestDetail()

    def leave_request_id(self, leave_request_id: str) -> "LeaveRequestDetailBuilder":
        self._leave_request_detail.leave_request_id = leave_request_id
        return self

    def leave_date(self, leave_date: str) -> "LeaveRequestDetailBuilder":
        self._leave_request_detail.leave_date = leave_date
        return self

    def leave_duration(self, leave_duration: str) -> "LeaveRequestDetailBuilder":
        self._leave_request_detail.leave_duration = leave_duration
        return self

    def leave_duration_unit(self, leave_duration_unit: int) -> "LeaveRequestDetailBuilder":
        self._leave_request_detail.leave_duration_unit = leave_duration_unit
        return self

    def paid_type(self, paid_type: int) -> "LeaveRequestDetailBuilder":
        self._leave_request_detail.paid_type = paid_type
        return self

    def build(self) -> "LeaveRequestDetail":
        return self._leave_request_detail
