# Code generated by Lark OpenAPI.

from typing import Optional

from lark_oapi.core.construct import init


class MemberResult(object):
    _types = {
        "member_id": str,
        "code": int,
    }

    def __init__(self, d=None):
        self.member_id: Optional[str] = None
        self.code: Optional[int] = None
        init(self, d, self._types)

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


class MemberResultBuilder(object):
    def __init__(self) -> None:
        self._member_result = MemberResult()

    def member_id(self, member_id: str) -> "MemberResultBuilder":
        self._member_result.member_id = member_id
        return self

    def code(self, code: int) -> "MemberResultBuilder":
        self._member_result.code = code
        return self

    def build(self) -> "MemberResult":
        return self._member_result
