"""
@generated by mypy-protobuf.  Do not edit manually!
isort:skip_file
"""

import abc
import clappform.proto.clappform.data.v1.aggregate_pb2
import collections.abc
import grpc
import grpc.aio
import typing

_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]
    ...

class AggregateManagementStub:
    """The AggregateManagement service provides methods for retrieving data
    from a database collection based on a supplied query.
    """

    def __init__(self, channel: typing.Union[grpc.Channel, grpc.aio.Channel]) -> None: ...
    AggregateStream: grpc.UnaryStreamMultiCallable[
        clappform.proto.clappform.data.v1.aggregate_pb2.AggregateStreamRequest,
        clappform.proto.clappform.data.v1.aggregate_pb2.AggregateResponse,
    ]
    """Retrieves data from a database collection based on a supplied query
    and returns a stream of aggregate responses.
    """

    AggregateUnary: grpc.UnaryUnaryMultiCallable[
        clappform.proto.clappform.data.v1.aggregate_pb2.AggregateUnaryRequest,
        clappform.proto.clappform.data.v1.aggregate_pb2.AggregateResponse,
    ]
    """Retrieves data from a database collection based on a supplied query
    and returns a single aggregate response.
    """

class AggregateManagementAsyncStub:
    """The AggregateManagement service provides methods for retrieving data
    from a database collection based on a supplied query.
    """

    AggregateStream: grpc.aio.UnaryStreamMultiCallable[
        clappform.proto.clappform.data.v1.aggregate_pb2.AggregateStreamRequest,
        clappform.proto.clappform.data.v1.aggregate_pb2.AggregateResponse,
    ]
    """Retrieves data from a database collection based on a supplied query
    and returns a stream of aggregate responses.
    """

    AggregateUnary: grpc.aio.UnaryUnaryMultiCallable[
        clappform.proto.clappform.data.v1.aggregate_pb2.AggregateUnaryRequest,
        clappform.proto.clappform.data.v1.aggregate_pb2.AggregateResponse,
    ]
    """Retrieves data from a database collection based on a supplied query
    and returns a single aggregate response.
    """

class AggregateManagementServicer(metaclass=abc.ABCMeta):
    """The AggregateManagement service provides methods for retrieving data
    from a database collection based on a supplied query.
    """

    @abc.abstractmethod
    def AggregateStream(
        self,
        request: clappform.proto.clappform.data.v1.aggregate_pb2.AggregateStreamRequest,
        context: _ServicerContext,
    ) -> typing.Union[collections.abc.Iterator[clappform.proto.clappform.data.v1.aggregate_pb2.AggregateResponse], collections.abc.AsyncIterator[clappform.proto.clappform.data.v1.aggregate_pb2.AggregateResponse]]:
        """Retrieves data from a database collection based on a supplied query
        and returns a stream of aggregate responses.
        """

    @abc.abstractmethod
    def AggregateUnary(
        self,
        request: clappform.proto.clappform.data.v1.aggregate_pb2.AggregateUnaryRequest,
        context: _ServicerContext,
    ) -> typing.Union[clappform.proto.clappform.data.v1.aggregate_pb2.AggregateResponse, collections.abc.Awaitable[clappform.proto.clappform.data.v1.aggregate_pb2.AggregateResponse]]:
        """Retrieves data from a database collection based on a supplied query
        and returns a single aggregate response.
        """

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