"""
@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.mdb.kafka.v1.topic_pb2
import yandex.cloud.mdb.kafka.v1.topic_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 TopicServiceStub:
    """A set of methods for managing Kafka topics."""

    def __init__(self, channel: typing.Union[grpc.Channel, grpc.aio.Channel]) -> None: ...
    Get: grpc.UnaryUnaryMultiCallable[
        yandex.cloud.mdb.kafka.v1.topic_service_pb2.GetTopicRequest,
        yandex.cloud.mdb.kafka.v1.topic_pb2.Topic,
    ]
    """Returns the specified Kafka topic.

    To get the list of available Kafka topics, make a [List] request.
    """

    List: grpc.UnaryUnaryMultiCallable[
        yandex.cloud.mdb.kafka.v1.topic_service_pb2.ListTopicsRequest,
        yandex.cloud.mdb.kafka.v1.topic_service_pb2.ListTopicsResponse,
    ]
    """Retrieves the list of Kafka topics in the specified cluster."""

    Create: grpc.UnaryUnaryMultiCallable[
        yandex.cloud.mdb.kafka.v1.topic_service_pb2.CreateTopicRequest,
        yandex.cloud.operation.operation_pb2.Operation,
    ]
    """Creates a new Kafka topic in the specified cluster."""

    Update: grpc.UnaryUnaryMultiCallable[
        yandex.cloud.mdb.kafka.v1.topic_service_pb2.UpdateTopicRequest,
        yandex.cloud.operation.operation_pb2.Operation,
    ]
    """Updates the specified Kafka topic."""

    Delete: grpc.UnaryUnaryMultiCallable[
        yandex.cloud.mdb.kafka.v1.topic_service_pb2.DeleteTopicRequest,
        yandex.cloud.operation.operation_pb2.Operation,
    ]
    """Deletes the specified Kafka topic."""

class TopicServiceAsyncStub:
    """A set of methods for managing Kafka topics."""

    Get: grpc.aio.UnaryUnaryMultiCallable[
        yandex.cloud.mdb.kafka.v1.topic_service_pb2.GetTopicRequest,
        yandex.cloud.mdb.kafka.v1.topic_pb2.Topic,
    ]
    """Returns the specified Kafka topic.

    To get the list of available Kafka topics, make a [List] request.
    """

    List: grpc.aio.UnaryUnaryMultiCallable[
        yandex.cloud.mdb.kafka.v1.topic_service_pb2.ListTopicsRequest,
        yandex.cloud.mdb.kafka.v1.topic_service_pb2.ListTopicsResponse,
    ]
    """Retrieves the list of Kafka topics in the specified cluster."""

    Create: grpc.aio.UnaryUnaryMultiCallable[
        yandex.cloud.mdb.kafka.v1.topic_service_pb2.CreateTopicRequest,
        yandex.cloud.operation.operation_pb2.Operation,
    ]
    """Creates a new Kafka topic in the specified cluster."""

    Update: grpc.aio.UnaryUnaryMultiCallable[
        yandex.cloud.mdb.kafka.v1.topic_service_pb2.UpdateTopicRequest,
        yandex.cloud.operation.operation_pb2.Operation,
    ]
    """Updates the specified Kafka topic."""

    Delete: grpc.aio.UnaryUnaryMultiCallable[
        yandex.cloud.mdb.kafka.v1.topic_service_pb2.DeleteTopicRequest,
        yandex.cloud.operation.operation_pb2.Operation,
    ]
    """Deletes the specified Kafka topic."""

class TopicServiceServicer(metaclass=abc.ABCMeta):
    """A set of methods for managing Kafka topics."""

    @abc.abstractmethod
    def Get(
        self,
        request: yandex.cloud.mdb.kafka.v1.topic_service_pb2.GetTopicRequest,
        context: _ServicerContext,
    ) -> typing.Union[yandex.cloud.mdb.kafka.v1.topic_pb2.Topic, collections.abc.Awaitable[yandex.cloud.mdb.kafka.v1.topic_pb2.Topic]]:
        """Returns the specified Kafka topic.

        To get the list of available Kafka topics, make a [List] request.
        """

    @abc.abstractmethod
    def List(
        self,
        request: yandex.cloud.mdb.kafka.v1.topic_service_pb2.ListTopicsRequest,
        context: _ServicerContext,
    ) -> typing.Union[yandex.cloud.mdb.kafka.v1.topic_service_pb2.ListTopicsResponse, collections.abc.Awaitable[yandex.cloud.mdb.kafka.v1.topic_service_pb2.ListTopicsResponse]]:
        """Retrieves the list of Kafka topics in the specified cluster."""

    @abc.abstractmethod
    def Create(
        self,
        request: yandex.cloud.mdb.kafka.v1.topic_service_pb2.CreateTopicRequest,
        context: _ServicerContext,
    ) -> typing.Union[yandex.cloud.operation.operation_pb2.Operation, collections.abc.Awaitable[yandex.cloud.operation.operation_pb2.Operation]]:
        """Creates a new Kafka topic in the specified cluster."""

    @abc.abstractmethod
    def Update(
        self,
        request: yandex.cloud.mdb.kafka.v1.topic_service_pb2.UpdateTopicRequest,
        context: _ServicerContext,
    ) -> typing.Union[yandex.cloud.operation.operation_pb2.Operation, collections.abc.Awaitable[yandex.cloud.operation.operation_pb2.Operation]]:
        """Updates the specified Kafka topic."""

    @abc.abstractmethod
    def Delete(
        self,
        request: yandex.cloud.mdb.kafka.v1.topic_service_pb2.DeleteTopicRequest,
        context: _ServicerContext,
    ) -> typing.Union[yandex.cloud.operation.operation_pb2.Operation, collections.abc.Awaitable[yandex.cloud.operation.operation_pb2.Operation]]:
        """Deletes the specified Kafka topic."""

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