# 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 KaCardTemplateVariable(object):
    _types = {
        "variable_type": str,
        "name": str,
        "description": str,
        "config": str,
    }

    def __init__(self, d=None):
        self.variable_type: Optional[str] = None
        self.name: Optional[str] = None
        self.description: Optional[str] = None
        self.config: Optional[str] = None
        init(self, d, self._types)

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


class KaCardTemplateVariableBuilder(object):
    def __init__(self) -> None:
        self._ka_card_template_variable = KaCardTemplateVariable()

    def variable_type(self, variable_type: str) -> "KaCardTemplateVariableBuilder":
        self._ka_card_template_variable.variable_type = variable_type
        return self

    def name(self, name: str) -> "KaCardTemplateVariableBuilder":
        self._ka_card_template_variable.name = name
        return self

    def description(self, description: str) -> "KaCardTemplateVariableBuilder":
        self._ka_card_template_variable.description = description
        return self

    def config(self, config: str) -> "KaCardTemplateVariableBuilder":
        self._ka_card_template_variable.config = config
        return self

    def build(self) -> "KaCardTemplateVariable":
        return self._ka_card_template_variable
