# 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 .app_table_field_property_type_ui_property import AppTableFieldPropertyTypeUiProperty


class AppTableFieldPropertyType(object):
    _types = {
        "data_type": int,
        "ui_property": AppTableFieldPropertyTypeUiProperty,
        "ui_type": str,
    }

    def __init__(self, d=None):
        self.data_type: Optional[int] = None
        self.ui_property: Optional[AppTableFieldPropertyTypeUiProperty] = None
        self.ui_type: Optional[str] = None
        init(self, d, self._types)

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


class AppTableFieldPropertyTypeBuilder(object):
    def __init__(self) -> None:
        self._app_table_field_property_type = AppTableFieldPropertyType()

    def data_type(self, data_type: int) -> "AppTableFieldPropertyTypeBuilder":
        self._app_table_field_property_type.data_type = data_type
        return self

    def ui_property(self, ui_property: AppTableFieldPropertyTypeUiProperty) -> "AppTableFieldPropertyTypeBuilder":
        self._app_table_field_property_type.ui_property = ui_property
        return self

    def ui_type(self, ui_type: str) -> "AppTableFieldPropertyTypeBuilder":
        self._app_table_field_property_type.ui_type = ui_type
        return self

    def build(self) -> "AppTableFieldPropertyType":
        return self._app_table_field_property_type
