# 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 CardTemplate(object):
    _types = {
        "template_id": str,
        "template_name": str,
        "template_owner": str,
        "template_version_name": str,
        "schema_version": str,
        "status": str,
        "create_time": str,
        "update_time": 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.schema_version: Optional[str] = None
        self.status: Optional[str] = None
        self.create_time: Optional[str] = None
        self.update_time: Optional[str] = None
        init(self, d, self._types)

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


class CardTemplateBuilder(object):
    def __init__(self) -> None:
        self._card_template = CardTemplate()

    def template_id(self, template_id: str) -> "CardTemplateBuilder":
        self._card_template.template_id = template_id
        return self

    def template_name(self, template_name: str) -> "CardTemplateBuilder":
        self._card_template.template_name = template_name
        return self

    def template_owner(self, template_owner: str) -> "CardTemplateBuilder":
        self._card_template.template_owner = template_owner
        return self

    def template_version_name(self, template_version_name: str) -> "CardTemplateBuilder":
        self._card_template.template_version_name = template_version_name
        return self

    def schema_version(self, schema_version: str) -> "CardTemplateBuilder":
        self._card_template.schema_version = schema_version
        return self

    def status(self, status: str) -> "CardTemplateBuilder":
        self._card_template.status = status
        return self

    def create_time(self, create_time: str) -> "CardTemplateBuilder":
        self._card_template.create_time = create_time
        return self

    def update_time(self, update_time: str) -> "CardTemplateBuilder":
        self._card_template.update_time = update_time
        return self

    def build(self) -> "CardTemplate":
        return self._card_template
