# 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 KaCardTemplate(object):
    _types = {
        "template_id": str,
        "template_name": str,
        "template_owner": str,
        "template_version_name": str,
        "status": str,
        "create_time": str,
        "update_time": str,
        "host_config": str,
        "template_versions": List[str],
        "bind_apps": List[str],
    }

    def __init__(self, d=None):
        self.template_id: Optional[str] = None
        self.template_name: Optional[str] = None
        self.template_owner: Optional[str] = None
        self.template_version_name: Optional[str] = None
        self.status: Optional[str] = None
        self.create_time: Optional[str] = None
        self.update_time: Optional[str] = None
        self.host_config: Optional[str] = None
        self.template_versions: Optional[List[str]] = None
        self.bind_apps: Optional[List[str]] = None
        init(self, d, self._types)

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


class KaCardTemplateBuilder(object):
    def __init__(self) -> None:
        self._ka_card_template = KaCardTemplate()

    def template_id(self, template_id: str) -> "KaCardTemplateBuilder":
        self._ka_card_template.template_id = template_id
        return self

    def template_name(self, template_name: str) -> "KaCardTemplateBuilder":
        self._ka_card_template.template_name = template_name
        return self

    def template_owner(self, template_owner: str) -> "KaCardTemplateBuilder":
        self._ka_card_template.template_owner = template_owner
        return self

    def template_version_name(self, template_version_name: str) -> "KaCardTemplateBuilder":
        self._ka_card_template.template_version_name = template_version_name
        return self

    def status(self, status: str) -> "KaCardTemplateBuilder":
        self._ka_card_template.status = status
        return self

    def create_time(self, create_time: str) -> "KaCardTemplateBuilder":
        self._ka_card_template.create_time = create_time
        return self

    def update_time(self, update_time: str) -> "KaCardTemplateBuilder":
        self._ka_card_template.update_time = update_time
        return self

    def host_config(self, host_config: str) -> "KaCardTemplateBuilder":
        self._ka_card_template.host_config = host_config
        return self

    def template_versions(self, template_versions: List[str]) -> "KaCardTemplateBuilder":
        self._ka_card_template.template_versions = template_versions
        return self

    def bind_apps(self, bind_apps: List[str]) -> "KaCardTemplateBuilder":
        self._ka_card_template.bind_apps = bind_apps
        return self

    def build(self) -> "KaCardTemplate":
        return self._ka_card_template
