# Code generated by Lark OpenAPI.

from typing import Optional

from lark_oapi.core.construct import init


class ReferEntity(object):
    _types = {
        "refer_token": str,
        "refer_type": str,
    }

    def __init__(self, d=None):
        self.refer_token: Optional[str] = None
        self.refer_type: Optional[str] = None
        init(self, d, self._types)

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


class ReferEntityBuilder(object):
    def __init__(self) -> None:
        self._refer_entity = ReferEntity()

    def refer_token(self, refer_token: str) -> "ReferEntityBuilder":
        self._refer_entity.refer_token = refer_token
        return self

    def refer_type(self, refer_type: str) -> "ReferEntityBuilder":
        self._refer_entity.refer_type = refer_type
        return self

    def build(self) -> "ReferEntity":
        return self._refer_entity
