"""
@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.serverless.functions.v1.network_service_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 NetworkServiceStub:
    """A set of methods for managing VPC networks connected to serverless resources."""

    def __init__(self, channel: typing.Union[grpc.Channel, grpc.aio.Channel]) -> None: ...
    GetUsed: grpc.UnaryUnaryMultiCallable[
        yandex.cloud.serverless.functions.v1.network_service_pb2.GetUsedNetworkRequest,
        yandex.cloud.serverless.functions.v1.network_service_pb2.UsedNetwork,
    ]
    """Returns the specified network used in serverless resources."""

    ListUsed: grpc.UnaryUnaryMultiCallable[
        yandex.cloud.serverless.functions.v1.network_service_pb2.ListUsedNetworksRequest,
        yandex.cloud.serverless.functions.v1.network_service_pb2.ListUsedNetworksResponse,
    ]
    """Retrieves the list of networks in the specified scope that are used in serverless resources."""

    ListConnectedResources: grpc.UnaryUnaryMultiCallable[
        yandex.cloud.serverless.functions.v1.network_service_pb2.ListConnectedResourcesRequest,
        yandex.cloud.serverless.functions.v1.network_service_pb2.ListConnectedResourcesResponse,
    ]
    """Retrieves the list of serverless resources connected to any network from the specified scope."""

    TriggerUsedCleanup: grpc.UnaryUnaryMultiCallable[
        yandex.cloud.serverless.functions.v1.network_service_pb2.TriggerUsedNetworkCleanupRequest,
        yandex.cloud.serverless.functions.v1.network_service_pb2.TriggerUsedNetworkCleanupResponse,
    ]
    """Forces obsolete used network to start cleanup process as soon as possible.
    Invocation does not wait for start or end of the cleanup process.
    Second invocation with the same network does nothing until network is completely cleaned-up.
    """

class NetworkServiceAsyncStub:
    """A set of methods for managing VPC networks connected to serverless resources."""

    GetUsed: grpc.aio.UnaryUnaryMultiCallable[
        yandex.cloud.serverless.functions.v1.network_service_pb2.GetUsedNetworkRequest,
        yandex.cloud.serverless.functions.v1.network_service_pb2.UsedNetwork,
    ]
    """Returns the specified network used in serverless resources."""

    ListUsed: grpc.aio.UnaryUnaryMultiCallable[
        yandex.cloud.serverless.functions.v1.network_service_pb2.ListUsedNetworksRequest,
        yandex.cloud.serverless.functions.v1.network_service_pb2.ListUsedNetworksResponse,
    ]
    """Retrieves the list of networks in the specified scope that are used in serverless resources."""

    ListConnectedResources: grpc.aio.UnaryUnaryMultiCallable[
        yandex.cloud.serverless.functions.v1.network_service_pb2.ListConnectedResourcesRequest,
        yandex.cloud.serverless.functions.v1.network_service_pb2.ListConnectedResourcesResponse,
    ]
    """Retrieves the list of serverless resources connected to any network from the specified scope."""

    TriggerUsedCleanup: grpc.aio.UnaryUnaryMultiCallable[
        yandex.cloud.serverless.functions.v1.network_service_pb2.TriggerUsedNetworkCleanupRequest,
        yandex.cloud.serverless.functions.v1.network_service_pb2.TriggerUsedNetworkCleanupResponse,
    ]
    """Forces obsolete used network to start cleanup process as soon as possible.
    Invocation does not wait for start or end of the cleanup process.
    Second invocation with the same network does nothing until network is completely cleaned-up.
    """

class NetworkServiceServicer(metaclass=abc.ABCMeta):
    """A set of methods for managing VPC networks connected to serverless resources."""

    @abc.abstractmethod
    def GetUsed(
        self,
        request: yandex.cloud.serverless.functions.v1.network_service_pb2.GetUsedNetworkRequest,
        context: _ServicerContext,
    ) -> typing.Union[yandex.cloud.serverless.functions.v1.network_service_pb2.UsedNetwork, collections.abc.Awaitable[yandex.cloud.serverless.functions.v1.network_service_pb2.UsedNetwork]]:
        """Returns the specified network used in serverless resources."""

    @abc.abstractmethod
    def ListUsed(
        self,
        request: yandex.cloud.serverless.functions.v1.network_service_pb2.ListUsedNetworksRequest,
        context: _ServicerContext,
    ) -> typing.Union[yandex.cloud.serverless.functions.v1.network_service_pb2.ListUsedNetworksResponse, collections.abc.Awaitable[yandex.cloud.serverless.functions.v1.network_service_pb2.ListUsedNetworksResponse]]:
        """Retrieves the list of networks in the specified scope that are used in serverless resources."""

    @abc.abstractmethod
    def ListConnectedResources(
        self,
        request: yandex.cloud.serverless.functions.v1.network_service_pb2.ListConnectedResourcesRequest,
        context: _ServicerContext,
    ) -> typing.Union[yandex.cloud.serverless.functions.v1.network_service_pb2.ListConnectedResourcesResponse, collections.abc.Awaitable[yandex.cloud.serverless.functions.v1.network_service_pb2.ListConnectedResourcesResponse]]:
        """Retrieves the list of serverless resources connected to any network from the specified scope."""

    @abc.abstractmethod
    def TriggerUsedCleanup(
        self,
        request: yandex.cloud.serverless.functions.v1.network_service_pb2.TriggerUsedNetworkCleanupRequest,
        context: _ServicerContext,
    ) -> typing.Union[yandex.cloud.serverless.functions.v1.network_service_pb2.TriggerUsedNetworkCleanupResponse, collections.abc.Awaitable[yandex.cloud.serverless.functions.v1.network_service_pb2.TriggerUsedNetworkCleanupResponse]]:
        """Forces obsolete used network to start cleanup process as soon as possible.
        Invocation does not wait for start or end of the cleanup process.
        Second invocation with the same network does nothing until network is completely cleaned-up.
        """

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