# Code generated by Lark OpenAPI.

from typing import Optional

from lark_oapi.core.construct import init


class ApprovalCreateExternal(object):
    _types = {
        "biz_name": str,
        "biz_type": str,
        "create_link_mobile": str,
        "create_link_pc": str,
        "support_pc": bool,
        "support_mobile": bool,
        "support_batch_read": bool,
        "enable_mark_readed": bool,
        "enable_quick_operate": bool,
        "action_callback_url": str,
        "action_callback_token": str,
        "action_callback_key": str,
        "allow_batch_operate": bool,
        "exclude_efficiency_statistics": bool,
    }

    def __init__(self, d=None):
        self.biz_name: Optional[str] = None
        self.biz_type: Optional[str] = None
        self.create_link_mobile: Optional[str] = None
        self.create_link_pc: Optional[str] = None
        self.support_pc: Optional[bool] = None
        self.support_mobile: Optional[bool] = None
        self.support_batch_read: Optional[bool] = None
        self.enable_mark_readed: Optional[bool] = None
        self.enable_quick_operate: Optional[bool] = None
        self.action_callback_url: Optional[str] = None
        self.action_callback_token: Optional[str] = None
        self.action_callback_key: Optional[str] = None
        self.allow_batch_operate: Optional[bool] = None
        self.exclude_efficiency_statistics: Optional[bool] = None
        init(self, d, self._types)

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


class ApprovalCreateExternalBuilder(object):
    def __init__(self) -> None:
        self._approval_create_external = ApprovalCreateExternal()

    def biz_name(self, biz_name: str) -> "ApprovalCreateExternalBuilder":
        self._approval_create_external.biz_name = biz_name
        return self

    def biz_type(self, biz_type: str) -> "ApprovalCreateExternalBuilder":
        self._approval_create_external.biz_type = biz_type
        return self

    def create_link_mobile(self, create_link_mobile: str) -> "ApprovalCreateExternalBuilder":
        self._approval_create_external.create_link_mobile = create_link_mobile
        return self

    def create_link_pc(self, create_link_pc: str) -> "ApprovalCreateExternalBuilder":
        self._approval_create_external.create_link_pc = create_link_pc
        return self

    def support_pc(self, support_pc: bool) -> "ApprovalCreateExternalBuilder":
        self._approval_create_external.support_pc = support_pc
        return self

    def support_mobile(self, support_mobile: bool) -> "ApprovalCreateExternalBuilder":
        self._approval_create_external.support_mobile = support_mobile
        return self

    def support_batch_read(self, support_batch_read: bool) -> "ApprovalCreateExternalBuilder":
        self._approval_create_external.support_batch_read = support_batch_read
        return self

    def enable_mark_readed(self, enable_mark_readed: bool) -> "ApprovalCreateExternalBuilder":
        self._approval_create_external.enable_mark_readed = enable_mark_readed
        return self

    def enable_quick_operate(self, enable_quick_operate: bool) -> "ApprovalCreateExternalBuilder":
        self._approval_create_external.enable_quick_operate = enable_quick_operate
        return self

    def action_callback_url(self, action_callback_url: str) -> "ApprovalCreateExternalBuilder":
        self._approval_create_external.action_callback_url = action_callback_url
        return self

    def action_callback_token(self, action_callback_token: str) -> "ApprovalCreateExternalBuilder":
        self._approval_create_external.action_callback_token = action_callback_token
        return self

    def action_callback_key(self, action_callback_key: str) -> "ApprovalCreateExternalBuilder":
        self._approval_create_external.action_callback_key = action_callback_key
        return self

    def allow_batch_operate(self, allow_batch_operate: bool) -> "ApprovalCreateExternalBuilder":
        self._approval_create_external.allow_batch_operate = allow_batch_operate
        return self

    def exclude_efficiency_statistics(self, exclude_efficiency_statistics: bool) -> "ApprovalCreateExternalBuilder":
        self._approval_create_external.exclude_efficiency_statistics = exclude_efficiency_statistics
        return self

    def build(self) -> "ApprovalCreateExternal":
        return self._approval_create_external
