# 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 TemplateInfo(object):
    _types = {
        "template_type": int,
        "publish_flag": int,
    }

    def __init__(self, d=None):
        self.template_type: Optional[int] = None
        self.publish_flag: Optional[int] = None
        init(self, d, self._types)

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


class TemplateInfoBuilder(object):
    def __init__(self) -> None:
        self._template_info = TemplateInfo()

    def template_type(self, template_type: int) -> "TemplateInfoBuilder":
        self._template_info.template_type = template_type
        return self

    def publish_flag(self, publish_flag: int) -> "TemplateInfoBuilder":
        self._template_info.publish_flag = publish_flag
        return self

    def build(self) -> "TemplateInfo":
        return self._template_info
