# 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 BatchFreebusyRequestBody(object):
    _types = {
        "time_min": str,
        "time_max": str,
        "user_ids": List[str],
        "include_external_calendar": bool,
        "only_busy": bool,
        "need_rsvp_status": bool,
    }

    def __init__(self, d=None):
        self.time_min: Optional[str] = None
        self.time_max: Optional[str] = None
        self.user_ids: Optional[List[str]] = None
        self.include_external_calendar: Optional[bool] = None
        self.only_busy: Optional[bool] = None
        self.need_rsvp_status: Optional[bool] = None
        init(self, d, self._types)

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


class BatchFreebusyRequestBodyBuilder(object):
    def __init__(self) -> None:
        self._batch_freebusy_request_body = BatchFreebusyRequestBody()

    def time_min(self, time_min: str) -> "BatchFreebusyRequestBodyBuilder":
        self._batch_freebusy_request_body.time_min = time_min
        return self

    def time_max(self, time_max: str) -> "BatchFreebusyRequestBodyBuilder":
        self._batch_freebusy_request_body.time_max = time_max
        return self

    def user_ids(self, user_ids: List[str]) -> "BatchFreebusyRequestBodyBuilder":
        self._batch_freebusy_request_body.user_ids = user_ids
        return self

    def include_external_calendar(self, include_external_calendar: bool) -> "BatchFreebusyRequestBodyBuilder":
        self._batch_freebusy_request_body.include_external_calendar = include_external_calendar
        return self

    def only_busy(self, only_busy: bool) -> "BatchFreebusyRequestBodyBuilder":
        self._batch_freebusy_request_body.only_busy = only_busy
        return self

    def need_rsvp_status(self, need_rsvp_status: bool) -> "BatchFreebusyRequestBodyBuilder":
        self._batch_freebusy_request_body.need_rsvp_status = need_rsvp_status
        return self

    def build(self) -> "BatchFreebusyRequestBody":
        return self._batch_freebusy_request_body
