from sqlalchemy import orm
from couchers.context import CouchersContext
"""
@generated by mypy-protobuf.  Do not edit manually!
isort:skip_file
"""

import abc
import collections.abc
import grpc
import grpc.aio
import search_pb2
import sys
import typing

if sys.version_info >= (3, 13):
    import typing as typing_extensions
else:
    import typing_extensions

_T = typing.TypeVar("_T")

class _MaybeAsyncIterator(collections.abc.AsyncIterator[_T], collections.abc.Iterator[_T], metaclass=abc.ABCMeta): ...

class _ServicerContext(grpc.ServicerContext, grpc.aio.ServicerContext):  # type: ignore[misc, type-arg]
    ...

GRPC_GENERATED_VERSION: str
GRPC_VERSION: str
class SearchServicer(metaclass=abc.ABCMeta):
    @abc.abstractmethod
    def Search(
        self,
        request: search_pb2.SearchReq,
        context: CouchersContext,
        session: orm.Session,
    ) -> typing.Union[search_pb2.SearchRes, collections.abc.Awaitable[search_pb2.SearchRes]]:
        """Search all content"""

    @abc.abstractmethod
    def UserSearch(
        self,
        request: search_pb2.UserSearchReq,
        context: CouchersContext,
        session: orm.Session,
    ) -> typing.Union[search_pb2.UserSearchRes, collections.abc.Awaitable[search_pb2.UserSearchRes]]:
        """Search for users in particular with extra filters, e.g. hosts"""

    @abc.abstractmethod
    def UserSearchV2(
        self,
        request: search_pb2.UserSearchReq,
        context: CouchersContext,
        session: orm.Session,
    ) -> typing.Union[search_pb2.UserSearchV2Res, collections.abc.Awaitable[search_pb2.UserSearchV2Res]]:
        """Search for users in particular with extra filters, e.g. hosts
        only returns used fields
        """

    @abc.abstractmethod
    def EventSearch(
        self,
        request: search_pb2.EventSearchReq,
        context: CouchersContext,
        session: orm.Session,
    ) -> typing.Union[search_pb2.EventSearchRes, collections.abc.Awaitable[search_pb2.EventSearchRes]]:
        """Search for events in particular with extra filters"""

def add_SearchServicer_to_server(servicer: SearchServicer, server: typing.Union[grpc.Server, grpc.aio.Server]) -> None: ...
