# 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_condition import AppTableFieldPropertyFilterInfoCondition


class AppTableFieldPropertyFilterInfo(object):
    _types = {
        "conjunction": str,
        "conditions": List[AppTableFieldPropertyFilterInfoCondition],
    }

    def __init__(self, d=None):
        self.conjunction: Optional[str] = None
        self.conditions: Optional[List[AppTableFieldPropertyFilterInfoCondition]] = None
        init(self, d, self._types)

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


class AppTableFieldPropertyFilterInfoBuilder(object):
    def __init__(self) -> None:
        self._app_table_field_property_filter_info = AppTableFieldPropertyFilterInfo()

    def conjunction(self, conjunction: str) -> "AppTableFieldPropertyFilterInfoBuilder":
        self._app_table_field_property_filter_info.conjunction = conjunction
        return self

    def conditions(self, conditions: List[
        AppTableFieldPropertyFilterInfoCondition]) -> "AppTableFieldPropertyFilterInfoBuilder":
        self._app_table_field_property_filter_info.conditions = conditions
        return self

    def build(self) -> "AppTableFieldPropertyFilterInfo":
        return self._app_table_field_property_filter_info
