# 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 .i18n import I18n


class EntityInfo(object):
    _types = {
        "code": str,
        "name": I18n,
    }

    def __init__(self, d=None):
        self.code: Optional[str] = None
        self.name: Optional[I18n] = None
        init(self, d, self._types)

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


class EntityInfoBuilder(object):
    def __init__(self) -> None:
        self._entity_info = EntityInfo()

    def code(self, code: str) -> "EntityInfoBuilder":
        self._entity_info.code = code
        return self

    def name(self, name: I18n) -> "EntityInfoBuilder":
        self._entity_info.name = name
        return self

    def build(self) -> "EntityInfo":
        return self._entity_info
