# 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_filter_info import AppTableFieldPropertyFilterInfo


class AppTableFieldPropertyLookupFilter(object):
    _types = {
        "target_table": str,
        "filter_info": AppTableFieldPropertyFilterInfo,
    }

    def __init__(self, d=None):
        self.target_table: Optional[str] = None
        self.filter_info: Optional[AppTableFieldPropertyFilterInfo] = None
        init(self, d, self._types)

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


class AppTableFieldPropertyLookupFilterBuilder(object):
    def __init__(self) -> None:
        self._app_table_field_property_lookup_filter = AppTableFieldPropertyLookupFilter()

    def target_table(self, target_table: str) -> "AppTableFieldPropertyLookupFilterBuilder":
        self._app_table_field_property_lookup_filter.target_table = target_table
        return self

    def filter_info(self, filter_info: AppTableFieldPropertyFilterInfo) -> "AppTableFieldPropertyLookupFilterBuilder":
        self._app_table_field_property_lookup_filter.filter_info = filter_info
        return self

    def build(self) -> "AppTableFieldPropertyLookupFilter":
        return self._app_table_field_property_lookup_filter
