# 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 MentionEntity(object):
    _types = {
        "offset": int,
        "user_id": str,
    }

    def __init__(self, d=None):
        self.offset: Optional[int] = None
        self.user_id: Optional[str] = None
        init(self, d, self._types)

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


class MentionEntityBuilder(object):
    def __init__(self) -> None:
        self._mention_entity = MentionEntity()

    def offset(self, offset: int) -> "MentionEntityBuilder":
        self._mention_entity.offset = offset
        return self

    def user_id(self, user_id: str) -> "MentionEntityBuilder":
        self._mention_entity.user_id = user_id
        return self

    def build(self) -> "MentionEntity":
        return self._mention_entity
