"""
@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.connectionmanager.v1.connection_pb2
import yandex.cloud.connectionmanager.v1.connection_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 ConnectionServiceStub:
    """A set of methods for managing Connection resources."""

    def __init__(self, channel: typing.Union[grpc.Channel, grpc.aio.Channel]) -> None: ...
    Get: grpc.UnaryUnaryMultiCallable[
        yandex.cloud.connectionmanager.v1.connection_service_pb2.GetConnectionRequest,
        yandex.cloud.connectionmanager.v1.connection_pb2.Connection,
    ]
    """Returns connection."""

    ResolveCluster: grpc.UnaryUnaryMultiCallable[
        yandex.cloud.connectionmanager.v1.connection_service_pb2.ResolveClusterRequest,
        yandex.cloud.connectionmanager.v1.connection_pb2.Connection,
    ]
    """Returns the connection with the resolved cluster; that is,
    * for connections to the on-premise clusters is identical to the Get RPC;
    * for connections to the managed clusters, resolves the cluster topology
      and returns it in the `on_premise` field of the connection parameters.
    Requires `connection-manager.connections.resolveCluster` permission.
    """

    List: grpc.UnaryUnaryMultiCallable[
        yandex.cloud.connectionmanager.v1.connection_service_pb2.ListConnectionRequest,
        yandex.cloud.connectionmanager.v1.connection_service_pb2.ListConnectionResponse,
    ]
    """List connections in specified folder."""

    Create: grpc.UnaryUnaryMultiCallable[
        yandex.cloud.connectionmanager.v1.connection_service_pb2.CreateConnectionRequest,
        yandex.cloud.operation.operation_pb2.Operation,
    ]
    """Creates connection."""

    Update: grpc.UnaryUnaryMultiCallable[
        yandex.cloud.connectionmanager.v1.connection_service_pb2.UpdateConnectionRequest,
        yandex.cloud.operation.operation_pb2.Operation,
    ]
    """Updates specified connection."""

    Delete: grpc.UnaryUnaryMultiCallable[
        yandex.cloud.connectionmanager.v1.connection_service_pb2.DeleteConnectionRequest,
        yandex.cloud.operation.operation_pb2.Operation,
    ]
    """Delete specified connection."""

    ListOperations: grpc.UnaryUnaryMultiCallable[
        yandex.cloud.connectionmanager.v1.connection_service_pb2.ListOperationsRequest,
        yandex.cloud.connectionmanager.v1.connection_service_pb2.ListOperationsResponse,
    ]
    """Retrieves the list of Operation resources for the specified connection."""

class ConnectionServiceAsyncStub:
    """A set of methods for managing Connection resources."""

    Get: grpc.aio.UnaryUnaryMultiCallable[
        yandex.cloud.connectionmanager.v1.connection_service_pb2.GetConnectionRequest,
        yandex.cloud.connectionmanager.v1.connection_pb2.Connection,
    ]
    """Returns connection."""

    ResolveCluster: grpc.aio.UnaryUnaryMultiCallable[
        yandex.cloud.connectionmanager.v1.connection_service_pb2.ResolveClusterRequest,
        yandex.cloud.connectionmanager.v1.connection_pb2.Connection,
    ]
    """Returns the connection with the resolved cluster; that is,
    * for connections to the on-premise clusters is identical to the Get RPC;
    * for connections to the managed clusters, resolves the cluster topology
      and returns it in the `on_premise` field of the connection parameters.
    Requires `connection-manager.connections.resolveCluster` permission.
    """

    List: grpc.aio.UnaryUnaryMultiCallable[
        yandex.cloud.connectionmanager.v1.connection_service_pb2.ListConnectionRequest,
        yandex.cloud.connectionmanager.v1.connection_service_pb2.ListConnectionResponse,
    ]
    """List connections in specified folder."""

    Create: grpc.aio.UnaryUnaryMultiCallable[
        yandex.cloud.connectionmanager.v1.connection_service_pb2.CreateConnectionRequest,
        yandex.cloud.operation.operation_pb2.Operation,
    ]
    """Creates connection."""

    Update: grpc.aio.UnaryUnaryMultiCallable[
        yandex.cloud.connectionmanager.v1.connection_service_pb2.UpdateConnectionRequest,
        yandex.cloud.operation.operation_pb2.Operation,
    ]
    """Updates specified connection."""

    Delete: grpc.aio.UnaryUnaryMultiCallable[
        yandex.cloud.connectionmanager.v1.connection_service_pb2.DeleteConnectionRequest,
        yandex.cloud.operation.operation_pb2.Operation,
    ]
    """Delete specified connection."""

    ListOperations: grpc.aio.UnaryUnaryMultiCallable[
        yandex.cloud.connectionmanager.v1.connection_service_pb2.ListOperationsRequest,
        yandex.cloud.connectionmanager.v1.connection_service_pb2.ListOperationsResponse,
    ]
    """Retrieves the list of Operation resources for the specified connection."""

class ConnectionServiceServicer(metaclass=abc.ABCMeta):
    """A set of methods for managing Connection resources."""

    @abc.abstractmethod
    def Get(
        self,
        request: yandex.cloud.connectionmanager.v1.connection_service_pb2.GetConnectionRequest,
        context: _ServicerContext,
    ) -> typing.Union[yandex.cloud.connectionmanager.v1.connection_pb2.Connection, collections.abc.Awaitable[yandex.cloud.connectionmanager.v1.connection_pb2.Connection]]:
        """Returns connection."""

    @abc.abstractmethod
    def ResolveCluster(
        self,
        request: yandex.cloud.connectionmanager.v1.connection_service_pb2.ResolveClusterRequest,
        context: _ServicerContext,
    ) -> typing.Union[yandex.cloud.connectionmanager.v1.connection_pb2.Connection, collections.abc.Awaitable[yandex.cloud.connectionmanager.v1.connection_pb2.Connection]]:
        """Returns the connection with the resolved cluster; that is,
        * for connections to the on-premise clusters is identical to the Get RPC;
        * for connections to the managed clusters, resolves the cluster topology
          and returns it in the `on_premise` field of the connection parameters.
        Requires `connection-manager.connections.resolveCluster` permission.
        """

    @abc.abstractmethod
    def List(
        self,
        request: yandex.cloud.connectionmanager.v1.connection_service_pb2.ListConnectionRequest,
        context: _ServicerContext,
    ) -> typing.Union[yandex.cloud.connectionmanager.v1.connection_service_pb2.ListConnectionResponse, collections.abc.Awaitable[yandex.cloud.connectionmanager.v1.connection_service_pb2.ListConnectionResponse]]:
        """List connections in specified folder."""

    @abc.abstractmethod
    def Create(
        self,
        request: yandex.cloud.connectionmanager.v1.connection_service_pb2.CreateConnectionRequest,
        context: _ServicerContext,
    ) -> typing.Union[yandex.cloud.operation.operation_pb2.Operation, collections.abc.Awaitable[yandex.cloud.operation.operation_pb2.Operation]]:
        """Creates connection."""

    @abc.abstractmethod
    def Update(
        self,
        request: yandex.cloud.connectionmanager.v1.connection_service_pb2.UpdateConnectionRequest,
        context: _ServicerContext,
    ) -> typing.Union[yandex.cloud.operation.operation_pb2.Operation, collections.abc.Awaitable[yandex.cloud.operation.operation_pb2.Operation]]:
        """Updates specified connection."""

    @abc.abstractmethod
    def Delete(
        self,
        request: yandex.cloud.connectionmanager.v1.connection_service_pb2.DeleteConnectionRequest,
        context: _ServicerContext,
    ) -> typing.Union[yandex.cloud.operation.operation_pb2.Operation, collections.abc.Awaitable[yandex.cloud.operation.operation_pb2.Operation]]:
        """Delete specified connection."""

    @abc.abstractmethod
    def ListOperations(
        self,
        request: yandex.cloud.connectionmanager.v1.connection_service_pb2.ListOperationsRequest,
        context: _ServicerContext,
    ) -> typing.Union[yandex.cloud.connectionmanager.v1.connection_service_pb2.ListOperationsResponse, collections.abc.Awaitable[yandex.cloud.connectionmanager.v1.connection_service_pb2.ListOperationsResponse]]:
        """Retrieves the list of Operation resources for the specified connection."""

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