# Code generated by Lark OpenAPI.

from typing import Optional, List

from lark_oapi.core.construct import init
from .user_calendar import UserCalendar


class PrimaryCalendarResponseBody(object):
    _types = {
        "calendars": List[UserCalendar],
    }

    def __init__(self, d=None):
        self.calendars: Optional[List[UserCalendar]] = None
        init(self, d, self._types)

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


class PrimaryCalendarResponseBodyBuilder(object):
    def __init__(self) -> None:
        self._primary_calendar_response_body = PrimaryCalendarResponseBody()

    def calendars(self, calendars: List[UserCalendar]) -> "PrimaryCalendarResponseBodyBuilder":
        self._primary_calendar_response_body.calendars = calendars
        return self

    def build(self) -> "PrimaryCalendarResponseBody":
        return self._primary_calendar_response_body
