# Code generated by Lark OpenAPI.

from typing import Optional

from lark_oapi.core.construct import init


class GroupEvent(object):
    _types = {
        "user_group_id": str,
        "name": str,
    }

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

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


class GroupEventBuilder(object):
    def __init__(self) -> None:
        self._group_event = GroupEvent()

    def user_group_id(self, user_group_id: str) -> "GroupEventBuilder":
        self._group_event.user_group_id = user_group_id
        return self

    def name(self, name: str) -> "GroupEventBuilder":
        self._group_event.name = name
        return self

    def build(self) -> "GroupEvent":
        return self._group_event
