# 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 Memberlist(object):
    _types = {
        "member_id": str,
        "member_type": str,
        "member_id_type": str,
    }

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

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


class MemberlistBuilder(object):
    def __init__(self) -> None:
        self._memberlist = Memberlist()

    def member_id(self, member_id: str) -> "MemberlistBuilder":
        self._memberlist.member_id = member_id
        return self

    def member_type(self, member_type: str) -> "MemberlistBuilder":
        self._memberlist.member_type = member_type
        return self

    def member_id_type(self, member_id_type: str) -> "MemberlistBuilder":
        self._memberlist.member_id_type = member_id_type
        return self

    def build(self) -> "Memberlist":
        return self._memberlist
