# Code generated by Lark OpenAPI.

from typing import Any, Optional, Union, Dict, List, Set, IO, Callable, Type
from lark_oapi.core.model import BaseRequest
from lark_oapi.core.enum import HttpMethod, AccessTokenType
from .calendar_date_by_date_filter import CalendarDateByDateFilter


class WorkCalendarDateLeaveRequest(BaseRequest):
    def __init__(self) -> None:
        super().__init__()
        self.request_body: Optional[CalendarDateByDateFilter] = None

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


class WorkCalendarDateLeaveRequestBuilder(object):

    def __init__(self) -> None:
        work_calendar_date_leave_request = WorkCalendarDateLeaveRequest()
        work_calendar_date_leave_request.http_method = HttpMethod.POST
        work_calendar_date_leave_request.uri = "/open-apis/corehr/v1/leaves/work_calendar_date"
        work_calendar_date_leave_request.token_types = {AccessTokenType.TENANT, AccessTokenType.USER}
        self._work_calendar_date_leave_request: WorkCalendarDateLeaveRequest = work_calendar_date_leave_request

    def request_body(self, request_body: CalendarDateByDateFilter) -> "WorkCalendarDateLeaveRequestBuilder":
        self._work_calendar_date_leave_request.request_body = request_body
        self._work_calendar_date_leave_request.body = request_body
        return self

    def build(self) -> WorkCalendarDateLeaveRequest:
        return self._work_calendar_date_leave_request
