# 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 .text_run import TextRun
from .mention_user import MentionUser
from .mention_doc import MentionDoc
from .reminder import Reminder
from .inline_file import InlineFile
from .undefined_element import UndefinedElement
from .inline_block import InlineBlock
from .equation import Equation


class AgendaTitleElement(object):
    _types = {
        "text_run": TextRun,
        "mention_user": MentionUser,
        "mention_doc": MentionDoc,
        "reminder": Reminder,
        "file": InlineFile,
        "undefined": UndefinedElement,
        "inline_block": InlineBlock,
        "equation": Equation,
    }

    def __init__(self, d=None):
        self.text_run: Optional[TextRun] = None
        self.mention_user: Optional[MentionUser] = None
        self.mention_doc: Optional[MentionDoc] = None
        self.reminder: Optional[Reminder] = None
        self.file: Optional[InlineFile] = None
        self.undefined: Optional[UndefinedElement] = None
        self.inline_block: Optional[InlineBlock] = None
        self.equation: Optional[Equation] = None
        init(self, d, self._types)

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


class AgendaTitleElementBuilder(object):
    def __init__(self) -> None:
        self._agenda_title_element = AgendaTitleElement()

    def text_run(self, text_run: TextRun) -> "AgendaTitleElementBuilder":
        self._agenda_title_element.text_run = text_run
        return self

    def mention_user(self, mention_user: MentionUser) -> "AgendaTitleElementBuilder":
        self._agenda_title_element.mention_user = mention_user
        return self

    def mention_doc(self, mention_doc: MentionDoc) -> "AgendaTitleElementBuilder":
        self._agenda_title_element.mention_doc = mention_doc
        return self

    def reminder(self, reminder: Reminder) -> "AgendaTitleElementBuilder":
        self._agenda_title_element.reminder = reminder
        return self

    def file(self, file: InlineFile) -> "AgendaTitleElementBuilder":
        self._agenda_title_element.file = file
        return self

    def undefined(self, undefined: UndefinedElement) -> "AgendaTitleElementBuilder":
        self._agenda_title_element.undefined = undefined
        return self

    def inline_block(self, inline_block: InlineBlock) -> "AgendaTitleElementBuilder":
        self._agenda_title_element.inline_block = inline_block
        return self

    def equation(self, equation: Equation) -> "AgendaTitleElementBuilder":
        self._agenda_title_element.equation = equation
        return self

    def build(self) -> "AgendaTitleElement":
        return self._agenda_title_element
