# 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 CommentReaction(object):
    _types = {
        "reaction_key": str,
        "count": int,
        "ahead_users": List[int],
    }

    def __init__(self, d=None):
        self.reaction_key: Optional[str] = None
        self.count: Optional[int] = None
        self.ahead_users: Optional[List[int]] = None
        init(self, d, self._types)

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


class CommentReactionBuilder(object):
    def __init__(self) -> None:
        self._comment_reaction = CommentReaction()

    def reaction_key(self, reaction_key: str) -> "CommentReactionBuilder":
        self._comment_reaction.reaction_key = reaction_key
        return self

    def count(self, count: int) -> "CommentReactionBuilder":
        self._comment_reaction.count = count
        return self

    def ahead_users(self, ahead_users: List[int]) -> "CommentReactionBuilder":
        self._comment_reaction.ahead_users = ahead_users
        return self

    def build(self) -> "CommentReaction":
        return self._comment_reaction
