# 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 MessageLink(object):
    _types = {
        "token": str,
        "token_url": str,
    }

    def __init__(self, d=None):
        self.token: Optional[str] = None
        self.token_url: Optional[str] = None
        init(self, d, self._types)

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


class MessageLinkBuilder(object):
    def __init__(self) -> None:
        self._message_link = MessageLink()

    def token(self, token: str) -> "MessageLinkBuilder":
        self._message_link.token = token
        return self

    def token_url(self, token_url: str) -> "MessageLinkBuilder":
        self._message_link.token_url = token_url
        return self

    def build(self) -> "MessageLink":
        return self._message_link
