# Code generated by Lark OpenAPI.

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


class WorkCalendarLeaveResponseBody(object):
    _types = {
        "work_calendars": List[WorkCalendarDetail],
        "count": int,
    }

    def __init__(self, d=None):
        self.work_calendars: Optional[List[WorkCalendarDetail]] = None
        self.count: Optional[int] = None
        init(self, d, self._types)

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


class WorkCalendarLeaveResponseBodyBuilder(object):
    def __init__(self) -> None:
        self._work_calendar_leave_response_body = WorkCalendarLeaveResponseBody()

    def work_calendars(self, work_calendars: List[WorkCalendarDetail]) -> "WorkCalendarLeaveResponseBodyBuilder":
        self._work_calendar_leave_response_body.work_calendars = work_calendars
        return self

    def count(self, count: int) -> "WorkCalendarLeaveResponseBodyBuilder":
        self._work_calendar_leave_response_body.count = count
        return self

    def build(self) -> "WorkCalendarLeaveResponseBody":
        return self._work_calendar_leave_response_body
