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

import abc
import collections.abc
import grpc
import grpc.aio
import typing
import yandex.cloud.ai.stt.v2.stt_service_pb2
import yandex.cloud.operation.operation_pb2

_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 SttServiceStub:
    def __init__(self, channel: typing.Union[grpc.Channel, grpc.aio.Channel]) -> None: ...
    LongRunningRecognize: grpc.UnaryUnaryMultiCallable[
        yandex.cloud.ai.stt.v2.stt_service_pb2.LongRunningRecognitionRequest,
        yandex.cloud.operation.operation_pb2.Operation,
    ]

    StreamingRecognize: grpc.StreamStreamMultiCallable[
        yandex.cloud.ai.stt.v2.stt_service_pb2.StreamingRecognitionRequest,
        yandex.cloud.ai.stt.v2.stt_service_pb2.StreamingRecognitionResponse,
    ]

class SttServiceAsyncStub:
    LongRunningRecognize: grpc.aio.UnaryUnaryMultiCallable[
        yandex.cloud.ai.stt.v2.stt_service_pb2.LongRunningRecognitionRequest,
        yandex.cloud.operation.operation_pb2.Operation,
    ]

    StreamingRecognize: grpc.aio.StreamStreamMultiCallable[
        yandex.cloud.ai.stt.v2.stt_service_pb2.StreamingRecognitionRequest,
        yandex.cloud.ai.stt.v2.stt_service_pb2.StreamingRecognitionResponse,
    ]

class SttServiceServicer(metaclass=abc.ABCMeta):
    @abc.abstractmethod
    def LongRunningRecognize(
        self,
        request: yandex.cloud.ai.stt.v2.stt_service_pb2.LongRunningRecognitionRequest,
        context: _ServicerContext,
    ) -> typing.Union[yandex.cloud.operation.operation_pb2.Operation, collections.abc.Awaitable[yandex.cloud.operation.operation_pb2.Operation]]: ...

    @abc.abstractmethod
    def StreamingRecognize(
        self,
        request_iterator: _MaybeAsyncIterator[yandex.cloud.ai.stt.v2.stt_service_pb2.StreamingRecognitionRequest],
        context: _ServicerContext,
    ) -> typing.Union[collections.abc.Iterator[yandex.cloud.ai.stt.v2.stt_service_pb2.StreamingRecognitionResponse], collections.abc.AsyncIterator[yandex.cloud.ai.stt.v2.stt_service_pb2.StreamingRecognitionResponse]]: ...

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