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


class EnumField(object):
    _types = {
        "api_name": str,
        "name": List[I18n],
        "description": List[I18n],
        "enum_api_name": str,
        "order": int,
        "status": int,
    }

    def __init__(self, d=None):
        self.api_name: Optional[str] = None
        self.name: Optional[List[I18n]] = None
        self.description: Optional[List[I18n]] = None
        self.enum_api_name: Optional[str] = None
        self.order: Optional[int] = None
        self.status: Optional[int] = None
        init(self, d, self._types)

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


class EnumFieldBuilder(object):
    def __init__(self) -> None:
        self._enum_field = EnumField()

    def api_name(self, api_name: str) -> "EnumFieldBuilder":
        self._enum_field.api_name = api_name
        return self

    def name(self, name: List[I18n]) -> "EnumFieldBuilder":
        self._enum_field.name = name
        return self

    def description(self, description: List[I18n]) -> "EnumFieldBuilder":
        self._enum_field.description = description
        return self

    def enum_api_name(self, enum_api_name: str) -> "EnumFieldBuilder":
        self._enum_field.enum_api_name = enum_api_name
        return self

    def order(self, order: int) -> "EnumFieldBuilder":
        self._enum_field.order = order
        return self

    def status(self, status: int) -> "EnumFieldBuilder":
        self._enum_field.status = status
        return self

    def build(self) -> "EnumField":
        return self._enum_field
