# 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 CalendarFreebusy(object):
    _types = {
        "start_time": str,
        "end_time": str,
        "calendar_id": str,
    }

    def __init__(self, d=None):
        self.start_time: Optional[str] = None
        self.end_time: Optional[str] = None
        self.calendar_id: Optional[str] = None
        init(self, d, self._types)

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


class CalendarFreebusyBuilder(object):
    def __init__(self) -> None:
        self._calendar_freebusy = CalendarFreebusy()

    def start_time(self, start_time: str) -> "CalendarFreebusyBuilder":
        self._calendar_freebusy.start_time = start_time
        return self

    def end_time(self, end_time: str) -> "CalendarFreebusyBuilder":
        self._calendar_freebusy.end_time = end_time
        return self

    def calendar_id(self, calendar_id: str) -> "CalendarFreebusyBuilder":
        self._calendar_freebusy.calendar_id = calendar_id
        return self

    def build(self) -> "CalendarFreebusy":
        return self._calendar_freebusy
