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

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

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


class UserBuilder(object):
    def __init__(self) -> None:
        self._user = User()

    def name(self, name: str) -> "UserBuilder":
        self._user.name = name
        return self

    def avatar(self, avatar: str) -> "UserBuilder":
        self._user.avatar = avatar
        return self

    def id(self, id: str) -> "UserBuilder":
        self._user.id = id
        return self

    def build(self) -> "User":
        return self._user
