# Code generated by Lark OpenAPI.

from typing import Optional, List

from lark_oapi.core.construct import init
from .chat_menu_top_level import ChatMenuTopLevel


class ChatMenuTree(object):
    _types = {
        "chat_menu_top_levels": List[ChatMenuTopLevel],
    }

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

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


class ChatMenuTreeBuilder(object):
    def __init__(self) -> None:
        self._chat_menu_tree = ChatMenuTree()

    def chat_menu_top_levels(self, chat_menu_top_levels: List[ChatMenuTopLevel]) -> "ChatMenuTreeBuilder":
        self._chat_menu_tree.chat_menu_top_levels = chat_menu_top_levels
        return self

    def build(self) -> "ChatMenuTree":
        return self._chat_menu_tree
