# 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 .enum_field import EnumField


class Enums(object):
    _types = {
        "enum_apiname": str,
        "enum_items": List[EnumField],
    }

    def __init__(self, d=None):
        self.enum_apiname: Optional[str] = None
        self.enum_items: Optional[List[EnumField]] = None
        init(self, d, self._types)

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


class EnumsBuilder(object):
    def __init__(self) -> None:
        self._enums = Enums()

    def enum_apiname(self, enum_apiname: str) -> "EnumsBuilder":
        self._enums.enum_apiname = enum_apiname
        return self

    def enum_items(self, enum_items: List[EnumField]) -> "EnumsBuilder":
        self._enums.enum_items = enum_items
        return self

    def build(self) -> "Enums":
        return self._enums
