# 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 .ka_card_template_variable import KaCardTemplateVariable


class KaCardTemplateOld(object):
    _types = {
        "template_id": str,
        "name": str,
        "biz_ext": str,
        "lock_status": int,
        "status": int,
        "mock_data": str,
        "content": str,
        "draft_content": str,
        "create_time": str,
        "update_time": str,
        "creator_id": str,
        "variables": List[KaCardTemplateVariable],
    }

    def __init__(self, d=None):
        self.template_id: Optional[str] = None
        self.name: Optional[str] = None
        self.biz_ext: Optional[str] = None
        self.lock_status: Optional[int] = None
        self.status: Optional[int] = None
        self.mock_data: Optional[str] = None
        self.content: Optional[str] = None
        self.draft_content: Optional[str] = None
        self.create_time: Optional[str] = None
        self.update_time: Optional[str] = None
        self.creator_id: Optional[str] = None
        self.variables: Optional[List[KaCardTemplateVariable]] = None
        init(self, d, self._types)

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


class KaCardTemplateOldBuilder(object):
    def __init__(self) -> None:
        self._ka_card_template_old = KaCardTemplateOld()

    def template_id(self, template_id: str) -> "KaCardTemplateOldBuilder":
        self._ka_card_template_old.template_id = template_id
        return self

    def name(self, name: str) -> "KaCardTemplateOldBuilder":
        self._ka_card_template_old.name = name
        return self

    def biz_ext(self, biz_ext: str) -> "KaCardTemplateOldBuilder":
        self._ka_card_template_old.biz_ext = biz_ext
        return self

    def lock_status(self, lock_status: int) -> "KaCardTemplateOldBuilder":
        self._ka_card_template_old.lock_status = lock_status
        return self

    def status(self, status: int) -> "KaCardTemplateOldBuilder":
        self._ka_card_template_old.status = status
        return self

    def mock_data(self, mock_data: str) -> "KaCardTemplateOldBuilder":
        self._ka_card_template_old.mock_data = mock_data
        return self

    def content(self, content: str) -> "KaCardTemplateOldBuilder":
        self._ka_card_template_old.content = content
        return self

    def draft_content(self, draft_content: str) -> "KaCardTemplateOldBuilder":
        self._ka_card_template_old.draft_content = draft_content
        return self

    def create_time(self, create_time: str) -> "KaCardTemplateOldBuilder":
        self._ka_card_template_old.create_time = create_time
        return self

    def update_time(self, update_time: str) -> "KaCardTemplateOldBuilder":
        self._ka_card_template_old.update_time = update_time
        return self

    def creator_id(self, creator_id: str) -> "KaCardTemplateOldBuilder":
        self._ka_card_template_old.creator_id = creator_id
        return self

    def variables(self, variables: List[KaCardTemplateVariable]) -> "KaCardTemplateOldBuilder":
        self._ka_card_template_old.variables = variables
        return self

    def build(self) -> "KaCardTemplateOld":
        return self._ka_card_template_old
