# 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 .i18n import I18n
from .enum import Enum
from .enum import Enum
from .signature_signatory_label import SignatureSignatoryLabel
from .enum import Enum
from .signature_template_setting import SignatureTemplateSetting
from .signature_template_region_info import SignatureTemplateRegionInfo
from .i18n import I18n


class SignatureTemplateBriefInfo(object):
    _types = {
        "id": str,
        "label": List[I18n],
        "category": Enum,
        "usage": Enum,
        "signatory_labels": List[SignatureSignatoryLabel],
        "active": bool,
        "create_by": str,
        "modify_by": str,
        "applicability": Enum,
        "creation_method": str,
        "version": str,
        "update_time": str,
        "create_time": str,
        "template_setting": SignatureTemplateSetting,
        "template_region_info": SignatureTemplateRegionInfo,
        "template_code": str,
        "template_desc": List[I18n],
    }

    def __init__(self, d=None):
        self.id: Optional[str] = None
        self.label: Optional[List[I18n]] = None
        self.category: Optional[Enum] = None
        self.usage: Optional[Enum] = None
        self.signatory_labels: Optional[List[SignatureSignatoryLabel]] = None
        self.active: Optional[bool] = None
        self.create_by: Optional[str] = None
        self.modify_by: Optional[str] = None
        self.applicability: Optional[Enum] = None
        self.creation_method: Optional[str] = None
        self.version: Optional[str] = None
        self.update_time: Optional[str] = None
        self.create_time: Optional[str] = None
        self.template_setting: Optional[SignatureTemplateSetting] = None
        self.template_region_info: Optional[SignatureTemplateRegionInfo] = None
        self.template_code: Optional[str] = None
        self.template_desc: Optional[List[I18n]] = None
        init(self, d, self._types)

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


class SignatureTemplateBriefInfoBuilder(object):
    def __init__(self) -> None:
        self._signature_template_brief_info = SignatureTemplateBriefInfo()

    def id(self, id: str) -> "SignatureTemplateBriefInfoBuilder":
        self._signature_template_brief_info.id = id
        return self

    def label(self, label: List[I18n]) -> "SignatureTemplateBriefInfoBuilder":
        self._signature_template_brief_info.label = label
        return self

    def category(self, category: Enum) -> "SignatureTemplateBriefInfoBuilder":
        self._signature_template_brief_info.category = category
        return self

    def usage(self, usage: Enum) -> "SignatureTemplateBriefInfoBuilder":
        self._signature_template_brief_info.usage = usage
        return self

    def signatory_labels(self, signatory_labels: List[SignatureSignatoryLabel]) -> "SignatureTemplateBriefInfoBuilder":
        self._signature_template_brief_info.signatory_labels = signatory_labels
        return self

    def active(self, active: bool) -> "SignatureTemplateBriefInfoBuilder":
        self._signature_template_brief_info.active = active
        return self

    def create_by(self, create_by: str) -> "SignatureTemplateBriefInfoBuilder":
        self._signature_template_brief_info.create_by = create_by
        return self

    def modify_by(self, modify_by: str) -> "SignatureTemplateBriefInfoBuilder":
        self._signature_template_brief_info.modify_by = modify_by
        return self

    def applicability(self, applicability: Enum) -> "SignatureTemplateBriefInfoBuilder":
        self._signature_template_brief_info.applicability = applicability
        return self

    def creation_method(self, creation_method: str) -> "SignatureTemplateBriefInfoBuilder":
        self._signature_template_brief_info.creation_method = creation_method
        return self

    def version(self, version: str) -> "SignatureTemplateBriefInfoBuilder":
        self._signature_template_brief_info.version = version
        return self

    def update_time(self, update_time: str) -> "SignatureTemplateBriefInfoBuilder":
        self._signature_template_brief_info.update_time = update_time
        return self

    def create_time(self, create_time: str) -> "SignatureTemplateBriefInfoBuilder":
        self._signature_template_brief_info.create_time = create_time
        return self

    def template_setting(self, template_setting: SignatureTemplateSetting) -> "SignatureTemplateBriefInfoBuilder":
        self._signature_template_brief_info.template_setting = template_setting
        return self

    def template_region_info(self,
                             template_region_info: SignatureTemplateRegionInfo) -> "SignatureTemplateBriefInfoBuilder":
        self._signature_template_brief_info.template_region_info = template_region_info
        return self

    def template_code(self, template_code: str) -> "SignatureTemplateBriefInfoBuilder":
        self._signature_template_brief_info.template_code = template_code
        return self

    def template_desc(self, template_desc: List[I18n]) -> "SignatureTemplateBriefInfoBuilder":
        self._signature_template_brief_info.template_desc = template_desc
        return self

    def build(self) -> "SignatureTemplateBriefInfo":
        return self._signature_template_brief_info
