# 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 .search_object_param import SearchObjectParam


class SearchApplicationObjectRequestBody(object):
    _types = {
        "q": str,
        "search_objects": List[SearchObjectParam],
        "page_token": str,
        "page_size": str,
        "metadata": str,
    }

    def __init__(self, d=None):
        self.q: Optional[str] = None
        self.search_objects: Optional[List[SearchObjectParam]] = None
        self.page_token: Optional[str] = None
        self.page_size: Optional[str] = None
        self.metadata: Optional[str] = None
        init(self, d, self._types)

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


class SearchApplicationObjectRequestBodyBuilder(object):
    def __init__(self) -> None:
        self._search_application_object_request_body = SearchApplicationObjectRequestBody()

    def q(self, q: str) -> "SearchApplicationObjectRequestBodyBuilder":
        self._search_application_object_request_body.q = q
        return self

    def search_objects(self, search_objects: List[SearchObjectParam]) -> "SearchApplicationObjectRequestBodyBuilder":
        self._search_application_object_request_body.search_objects = search_objects
        return self

    def page_token(self, page_token: str) -> "SearchApplicationObjectRequestBodyBuilder":
        self._search_application_object_request_body.page_token = page_token
        return self

    def page_size(self, page_size: str) -> "SearchApplicationObjectRequestBodyBuilder":
        self._search_application_object_request_body.page_size = page_size
        return self

    def metadata(self, metadata: str) -> "SearchApplicationObjectRequestBodyBuilder":
        self._search_application_object_request_body.metadata = metadata
        return self

    def build(self) -> "SearchApplicationObjectRequestBody":
        return self._search_application_object_request_body
