# Code generated by Lark OpenAPI.

from typing import Optional, List

from lark_oapi.core.construct import init
from .app_table_view_property_filter_info_condition import AppTableViewPropertyFilterInfoCondition


class AppTableViewPropertyFilterInfo(object):
    _types = {
        "conjunction": str,
        "conditions": List[AppTableViewPropertyFilterInfoCondition],
        "condition_omitted": bool,
    }

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

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


class AppTableViewPropertyFilterInfoBuilder(object):
    def __init__(self) -> None:
        self._app_table_view_property_filter_info = AppTableViewPropertyFilterInfo()

    def conjunction(self, conjunction: str) -> "AppTableViewPropertyFilterInfoBuilder":
        self._app_table_view_property_filter_info.conjunction = conjunction
        return self

    def conditions(self, conditions: List[
        AppTableViewPropertyFilterInfoCondition]) -> "AppTableViewPropertyFilterInfoBuilder":
        self._app_table_view_property_filter_info.conditions = conditions
        return self

    def condition_omitted(self, condition_omitted: bool) -> "AppTableViewPropertyFilterInfoBuilder":
        self._app_table_view_property_filter_info.condition_omitted = condition_omitted
        return self

    def build(self) -> "AppTableViewPropertyFilterInfo":
        return self._app_table_view_property_filter_info
