# 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 Group(object):
    _types = {
        "id": str,
        "name": str,
        "avatar_url": str,
    }

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

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


class GroupBuilder(object):
    def __init__(self) -> None:
        self._group = Group()

    def id(self, id: str) -> "GroupBuilder":
        self._group.id = id
        return self

    def name(self, name: str) -> "GroupBuilder":
        self._group.name = name
        return self

    def avatar_url(self, avatar_url: str) -> "GroupBuilder":
        self._group.avatar_url = avatar_url
        return self

    def build(self) -> "Group":
        return self._group
