# Code generated by Lark OpenAPI.

from typing import Optional

from lark_oapi.core.construct import init
from .user_custom_attr_value import UserCustomAttrValue


class UserCustomAttr(object):
    _types = {
        "type": str,
        "id": str,
        "value": UserCustomAttrValue,
    }

    def __init__(self, d=None):
        self.type: Optional[str] = None
        self.id: Optional[str] = None
        self.value: Optional[UserCustomAttrValue] = None
        init(self, d, self._types)

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


class UserCustomAttrBuilder(object):
    def __init__(self) -> None:
        self._user_custom_attr = UserCustomAttr()

    def type(self, type: str) -> "UserCustomAttrBuilder":
        self._user_custom_attr.type = type
        return self

    def id(self, id: str) -> "UserCustomAttrBuilder":
        self._user_custom_attr.id = id
        return self

    def value(self, value: UserCustomAttrValue) -> "UserCustomAttrBuilder":
        self._user_custom_attr.value = value
        return self

    def build(self) -> "UserCustomAttr":
        return self._user_custom_attr
