# Code generated by Lark OpenAPI.

from typing import Any, Optional, Union, Dict, List, Set, IO, Callable, Type
from lark_oapi.core.construct import init
from .enum import Enum
from .signature_human_info import SignatureHumanInfo
from .signature_template_id_with_system_and_custom_field import SignatureTemplateIdWithSystemAndCustomField


class SignatureFolder(object):
    _types = {
        "biz_type": Enum,
        "owner_info": SignatureHumanInfo,
        "signature_template_fields": List[SignatureTemplateIdWithSystemAndCustomField],
        "unique_key": int,
        "biz_process_id": str,
    }

    def __init__(self, d=None):
        self.biz_type: Optional[Enum] = None
        self.owner_info: Optional[SignatureHumanInfo] = None
        self.signature_template_fields: Optional[List[SignatureTemplateIdWithSystemAndCustomField]] = None
        self.unique_key: Optional[int] = None
        self.biz_process_id: Optional[str] = None
        init(self, d, self._types)

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


class SignatureFolderBuilder(object):
    def __init__(self) -> None:
        self._signature_folder = SignatureFolder()

    def biz_type(self, biz_type: Enum) -> "SignatureFolderBuilder":
        self._signature_folder.biz_type = biz_type
        return self

    def owner_info(self, owner_info: SignatureHumanInfo) -> "SignatureFolderBuilder":
        self._signature_folder.owner_info = owner_info
        return self

    def signature_template_fields(self, signature_template_fields: List[
        SignatureTemplateIdWithSystemAndCustomField]) -> "SignatureFolderBuilder":
        self._signature_folder.signature_template_fields = signature_template_fields
        return self

    def unique_key(self, unique_key: int) -> "SignatureFolderBuilder":
        self._signature_folder.unique_key = unique_key
        return self

    def biz_process_id(self, biz_process_id: str) -> "SignatureFolderBuilder":
        self._signature_folder.biz_process_id = biz_process_id
        return self

    def build(self) -> "SignatureFolder":
        return self._signature_folder
