# 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 Operator(object):
    _types = {
        "tenant_key": str,
        "user_id": str,
        "open_id": str,
        "union_id": str,
    }

    def __init__(self, d=None):
        self.tenant_key: Optional[str] = None
        self.user_id: Optional[str] = None
        self.open_id: Optional[str] = None
        self.union_id: Optional[str] = None
        init(self, d, self._types)

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


class OperatorBuilder(object):
    def __init__(self) -> None:
        self._operator = Operator()

    def tenant_key(self, tenant_key: str) -> "OperatorBuilder":
        self._operator.tenant_key = tenant_key
        return self

    def user_id(self, user_id: str) -> "OperatorBuilder":
        self._operator.user_id = user_id
        return self

    def open_id(self, open_id: str) -> "OperatorBuilder":
        self._operator.open_id = open_id
        return self

    def union_id(self, union_id: str) -> "OperatorBuilder":
        self._operator.union_id = union_id
        return self

    def build(self) -> "Operator":
        return self._operator
