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

import abc
import collections.abc
import grpc
import grpc.aio
import sentry_protos.sentry.v1.taskworker_pb2
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 ConsumerServiceStub:
    def __init__(self, channel: typing.Union[grpc.Channel, grpc.aio.Channel]) -> None: ...
    GetTask: grpc.UnaryUnaryMultiCallable[
        sentry_protos.sentry.v1.taskworker_pb2.GetTaskRequest,
        sentry_protos.sentry.v1.taskworker_pb2.GetTaskResponse,
    ]
    """Fetch a new task activation to process."""

    SetTaskStatus: grpc.UnaryUnaryMultiCallable[
        sentry_protos.sentry.v1.taskworker_pb2.SetTaskStatusRequest,
        sentry_protos.sentry.v1.taskworker_pb2.SetTaskStatusResponse,
    ]
    """Update the state of a task with execution results."""

class ConsumerServiceAsyncStub:
    GetTask: grpc.aio.UnaryUnaryMultiCallable[
        sentry_protos.sentry.v1.taskworker_pb2.GetTaskRequest,
        sentry_protos.sentry.v1.taskworker_pb2.GetTaskResponse,
    ]
    """Fetch a new task activation to process."""

    SetTaskStatus: grpc.aio.UnaryUnaryMultiCallable[
        sentry_protos.sentry.v1.taskworker_pb2.SetTaskStatusRequest,
        sentry_protos.sentry.v1.taskworker_pb2.SetTaskStatusResponse,
    ]
    """Update the state of a task with execution results."""

class ConsumerServiceServicer(metaclass=abc.ABCMeta):
    @abc.abstractmethod
    def GetTask(
        self,
        request: sentry_protos.sentry.v1.taskworker_pb2.GetTaskRequest,
        context: _ServicerContext,
    ) -> typing.Union[sentry_protos.sentry.v1.taskworker_pb2.GetTaskResponse, collections.abc.Awaitable[sentry_protos.sentry.v1.taskworker_pb2.GetTaskResponse]]:
        """Fetch a new task activation to process."""

    @abc.abstractmethod
    def SetTaskStatus(
        self,
        request: sentry_protos.sentry.v1.taskworker_pb2.SetTaskStatusRequest,
        context: _ServicerContext,
    ) -> typing.Union[sentry_protos.sentry.v1.taskworker_pb2.SetTaskStatusResponse, collections.abc.Awaitable[sentry_protos.sentry.v1.taskworker_pb2.SetTaskStatusResponse]]:
        """Update the state of a task with execution results."""

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