# 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 AppTableFormPatchedField(object):
    _types = {
        "pre_field_id": str,
        "title": str,
        "description": str,
        "required": bool,
        "visible": bool,
    }

    def __init__(self, d=None):
        self.pre_field_id: Optional[str] = None
        self.title: Optional[str] = None
        self.description: Optional[str] = None
        self.required: Optional[bool] = None
        self.visible: Optional[bool] = None
        init(self, d, self._types)

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


class AppTableFormPatchedFieldBuilder(object):
    def __init__(self) -> None:
        self._app_table_form_patched_field = AppTableFormPatchedField()

    def pre_field_id(self, pre_field_id: str) -> "AppTableFormPatchedFieldBuilder":
        self._app_table_form_patched_field.pre_field_id = pre_field_id
        return self

    def title(self, title: str) -> "AppTableFormPatchedFieldBuilder":
        self._app_table_form_patched_field.title = title
        return self

    def description(self, description: str) -> "AppTableFormPatchedFieldBuilder":
        self._app_table_form_patched_field.description = description
        return self

    def required(self, required: bool) -> "AppTableFormPatchedFieldBuilder":
        self._app_table_form_patched_field.required = required
        return self

    def visible(self, visible: bool) -> "AppTableFormPatchedFieldBuilder":
        self._app_table_form_patched_field.visible = visible
        return self

    def build(self) -> "AppTableFormPatchedField":
        return self._app_table_form_patched_field
