# Code generated by Lark OpenAPI.

from typing import Optional

from lark_oapi.core.construct import init
from .app_table_view_property import AppTableViewProperty


class PatchAppTableViewRequestBody(object):
    _types = {
        "view_name": str,
        "property": AppTableViewProperty,
    }

    def __init__(self, d=None):
        self.view_name: Optional[str] = None
        self.property: Optional[AppTableViewProperty] = None
        init(self, d, self._types)

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


class PatchAppTableViewRequestBodyBuilder(object):
    def __init__(self) -> None:
        self._patch_app_table_view_request_body = PatchAppTableViewRequestBody()

    def view_name(self, view_name: str) -> "PatchAppTableViewRequestBodyBuilder":
        self._patch_app_table_view_request_body.view_name = view_name
        return self

    def property(self, property: AppTableViewProperty) -> "PatchAppTableViewRequestBodyBuilder":
        self._patch_app_table_view_request_body.property = property
        return self

    def build(self) -> "PatchAppTableViewRequestBody":
        return self._patch_app_table_view_request_body
