# Code generated by Lark OpenAPI.

from typing import Optional

from lark_oapi.core.construct import init
from .find_condition import FindCondition


class Find(object):
    _types = {
        "find_condition": FindCondition,
        "find": str,
    }

    def __init__(self, d=None):
        self.find_condition: Optional[FindCondition] = None
        self.find: Optional[str] = None
        init(self, d, self._types)

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


class FindBuilder(object):
    def __init__(self) -> None:
        self._find = Find()

    def find_condition(self, find_condition: FindCondition) -> "FindBuilder":
        self._find.find_condition = find_condition
        return self

    def find(self, find: str) -> "FindBuilder":
        self._find.find = find
        return self

    def build(self) -> "Find":
        return self._find
