# 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 ProcessExtra(object):
    _types = {
        "operator": str,
        "node_id": str,
        "approver_id": str,
        "extra_type": int,
        "approval_type": int,
        "extra_user_ids": List[str],
        "remark": str,
        "system_user": bool,
    }

    def __init__(self, d=None):
        self.operator: Optional[str] = None
        self.node_id: Optional[str] = None
        self.approver_id: Optional[str] = None
        self.extra_type: Optional[int] = None
        self.approval_type: Optional[int] = None
        self.extra_user_ids: Optional[List[str]] = None
        self.remark: Optional[str] = None
        self.system_user: Optional[bool] = None
        init(self, d, self._types)

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


class ProcessExtraBuilder(object):
    def __init__(self) -> None:
        self._process_extra = ProcessExtra()

    def operator(self, operator: str) -> "ProcessExtraBuilder":
        self._process_extra.operator = operator
        return self

    def node_id(self, node_id: str) -> "ProcessExtraBuilder":
        self._process_extra.node_id = node_id
        return self

    def approver_id(self, approver_id: str) -> "ProcessExtraBuilder":
        self._process_extra.approver_id = approver_id
        return self

    def extra_type(self, extra_type: int) -> "ProcessExtraBuilder":
        self._process_extra.extra_type = extra_type
        return self

    def approval_type(self, approval_type: int) -> "ProcessExtraBuilder":
        self._process_extra.approval_type = approval_type
        return self

    def extra_user_ids(self, extra_user_ids: List[str]) -> "ProcessExtraBuilder":
        self._process_extra.extra_user_ids = extra_user_ids
        return self

    def remark(self, remark: str) -> "ProcessExtraBuilder":
        self._process_extra.remark = remark
        return self

    def system_user(self, system_user: bool) -> "ProcessExtraBuilder":
        self._process_extra.system_user = system_user
        return self

    def build(self) -> "ProcessExtra":
        return self._process_extra
