# 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 ObjectField(object):
    _types = {
        "id": int,
        "api_name": str,
        "type": str,
        "label": Dict[str, str],
    }

    def __init__(self, d=None):
        self.id: Optional[int] = None
        self.api_name: Optional[str] = None
        self.type: Optional[str] = None
        self.label: Optional[Dict[str, str]] = None
        init(self, d, self._types)

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


class ObjectFieldBuilder(object):
    def __init__(self) -> None:
        self._object_field = ObjectField()

    def id(self, id: int) -> "ObjectFieldBuilder":
        self._object_field.id = id
        return self

    def api_name(self, api_name: str) -> "ObjectFieldBuilder":
        self._object_field.api_name = api_name
        return self

    def type(self, type: str) -> "ObjectFieldBuilder":
        self._object_field.type = type
        return self

    def label(self, label: Dict[str, str]) -> "ObjectFieldBuilder":
        self._object_field.label = label
        return self

    def build(self) -> "ObjectField":
        return self._object_field
