"""
@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.backup.v1.resource_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 ResourceServiceStub:
    """A set of methods for managing backup resources: [Compute Cloud instances](/docs/backup/concepts/vm-connection#os)."""

    def __init__(self, channel: typing.Union[grpc.Channel, grpc.aio.Channel]) -> None: ...
    List: grpc.UnaryUnaryMultiCallable[
        yandex.cloud.backup.v1.resource_service_pb2.ListResourcesRequest,
        yandex.cloud.backup.v1.resource_service_pb2.ListResourcesResponse,
    ]
    """List resources: Compute Cloud instances."""

    Get: grpc.UnaryUnaryMultiCallable[
        yandex.cloud.backup.v1.resource_service_pb2.GetResourceRequest,
        yandex.cloud.backup.v1.resource_service_pb2.GetResourceResponse,
    ]
    """Get specific Compute Cloud instance."""

    Delete: grpc.UnaryUnaryMultiCallable[
        yandex.cloud.backup.v1.resource_service_pb2.DeleteResourceRequest,
        yandex.cloud.operation.operation_pb2.Operation,
    ]
    """Delete specific Compute Cloud instance from Cloud Backup. It does not delete
    instance from Cloud Compute service.
    """

    ListTasks: grpc.UnaryUnaryMultiCallable[
        yandex.cloud.backup.v1.resource_service_pb2.ListTasksRequest,
        yandex.cloud.backup.v1.resource_service_pb2.ListTasksResponse,
    ]
    """List tasks of resources."""

    ListDirectory: grpc.UnaryUnaryMultiCallable[
        yandex.cloud.backup.v1.resource_service_pb2.ListDirectoryRequest,
        yandex.cloud.backup.v1.resource_service_pb2.ListDirectoryResponse,
    ]
    """ListDirectory returns all subdirectories found in requested directory identified
    by the id.
    """

    CreateDirectory: grpc.UnaryUnaryMultiCallable[
        yandex.cloud.backup.v1.resource_service_pb2.CreateDirectoryRequest,
        yandex.cloud.operation.operation_pb2.Operation,
    ]
    """CreateDirectory creates new directory by requested path."""

    ListOperations: grpc.UnaryUnaryMultiCallable[
        yandex.cloud.backup.v1.resource_service_pb2.ListResourceOperationsRequest,
        yandex.cloud.backup.v1.resource_service_pb2.ListResourceOperationsResponse,
    ]
    """ListOperations return all operations in backup service for given instance"""

    GetInstanceRegistrationToken: grpc.UnaryUnaryMultiCallable[
        yandex.cloud.backup.v1.resource_service_pb2.GetInstanceRegistrationTokenRequest,
        yandex.cloud.backup.v1.resource_service_pb2.GetInstanceRegistrationTokenResponse,
    ]
    """Get instance registration token to install backup agent withot SA attached to instance"""

class ResourceServiceAsyncStub:
    """A set of methods for managing backup resources: [Compute Cloud instances](/docs/backup/concepts/vm-connection#os)."""

    List: grpc.aio.UnaryUnaryMultiCallable[
        yandex.cloud.backup.v1.resource_service_pb2.ListResourcesRequest,
        yandex.cloud.backup.v1.resource_service_pb2.ListResourcesResponse,
    ]
    """List resources: Compute Cloud instances."""

    Get: grpc.aio.UnaryUnaryMultiCallable[
        yandex.cloud.backup.v1.resource_service_pb2.GetResourceRequest,
        yandex.cloud.backup.v1.resource_service_pb2.GetResourceResponse,
    ]
    """Get specific Compute Cloud instance."""

    Delete: grpc.aio.UnaryUnaryMultiCallable[
        yandex.cloud.backup.v1.resource_service_pb2.DeleteResourceRequest,
        yandex.cloud.operation.operation_pb2.Operation,
    ]
    """Delete specific Compute Cloud instance from Cloud Backup. It does not delete
    instance from Cloud Compute service.
    """

    ListTasks: grpc.aio.UnaryUnaryMultiCallable[
        yandex.cloud.backup.v1.resource_service_pb2.ListTasksRequest,
        yandex.cloud.backup.v1.resource_service_pb2.ListTasksResponse,
    ]
    """List tasks of resources."""

    ListDirectory: grpc.aio.UnaryUnaryMultiCallable[
        yandex.cloud.backup.v1.resource_service_pb2.ListDirectoryRequest,
        yandex.cloud.backup.v1.resource_service_pb2.ListDirectoryResponse,
    ]
    """ListDirectory returns all subdirectories found in requested directory identified
    by the id.
    """

    CreateDirectory: grpc.aio.UnaryUnaryMultiCallable[
        yandex.cloud.backup.v1.resource_service_pb2.CreateDirectoryRequest,
        yandex.cloud.operation.operation_pb2.Operation,
    ]
    """CreateDirectory creates new directory by requested path."""

    ListOperations: grpc.aio.UnaryUnaryMultiCallable[
        yandex.cloud.backup.v1.resource_service_pb2.ListResourceOperationsRequest,
        yandex.cloud.backup.v1.resource_service_pb2.ListResourceOperationsResponse,
    ]
    """ListOperations return all operations in backup service for given instance"""

    GetInstanceRegistrationToken: grpc.aio.UnaryUnaryMultiCallable[
        yandex.cloud.backup.v1.resource_service_pb2.GetInstanceRegistrationTokenRequest,
        yandex.cloud.backup.v1.resource_service_pb2.GetInstanceRegistrationTokenResponse,
    ]
    """Get instance registration token to install backup agent withot SA attached to instance"""

class ResourceServiceServicer(metaclass=abc.ABCMeta):
    """A set of methods for managing backup resources: [Compute Cloud instances](/docs/backup/concepts/vm-connection#os)."""

    @abc.abstractmethod
    def List(
        self,
        request: yandex.cloud.backup.v1.resource_service_pb2.ListResourcesRequest,
        context: _ServicerContext,
    ) -> typing.Union[yandex.cloud.backup.v1.resource_service_pb2.ListResourcesResponse, collections.abc.Awaitable[yandex.cloud.backup.v1.resource_service_pb2.ListResourcesResponse]]:
        """List resources: Compute Cloud instances."""

    @abc.abstractmethod
    def Get(
        self,
        request: yandex.cloud.backup.v1.resource_service_pb2.GetResourceRequest,
        context: _ServicerContext,
    ) -> typing.Union[yandex.cloud.backup.v1.resource_service_pb2.GetResourceResponse, collections.abc.Awaitable[yandex.cloud.backup.v1.resource_service_pb2.GetResourceResponse]]:
        """Get specific Compute Cloud instance."""

    @abc.abstractmethod
    def Delete(
        self,
        request: yandex.cloud.backup.v1.resource_service_pb2.DeleteResourceRequest,
        context: _ServicerContext,
    ) -> typing.Union[yandex.cloud.operation.operation_pb2.Operation, collections.abc.Awaitable[yandex.cloud.operation.operation_pb2.Operation]]:
        """Delete specific Compute Cloud instance from Cloud Backup. It does not delete
        instance from Cloud Compute service.
        """

    @abc.abstractmethod
    def ListTasks(
        self,
        request: yandex.cloud.backup.v1.resource_service_pb2.ListTasksRequest,
        context: _ServicerContext,
    ) -> typing.Union[yandex.cloud.backup.v1.resource_service_pb2.ListTasksResponse, collections.abc.Awaitable[yandex.cloud.backup.v1.resource_service_pb2.ListTasksResponse]]:
        """List tasks of resources."""

    @abc.abstractmethod
    def ListDirectory(
        self,
        request: yandex.cloud.backup.v1.resource_service_pb2.ListDirectoryRequest,
        context: _ServicerContext,
    ) -> typing.Union[yandex.cloud.backup.v1.resource_service_pb2.ListDirectoryResponse, collections.abc.Awaitable[yandex.cloud.backup.v1.resource_service_pb2.ListDirectoryResponse]]:
        """ListDirectory returns all subdirectories found in requested directory identified
        by the id.
        """

    @abc.abstractmethod
    def CreateDirectory(
        self,
        request: yandex.cloud.backup.v1.resource_service_pb2.CreateDirectoryRequest,
        context: _ServicerContext,
    ) -> typing.Union[yandex.cloud.operation.operation_pb2.Operation, collections.abc.Awaitable[yandex.cloud.operation.operation_pb2.Operation]]:
        """CreateDirectory creates new directory by requested path."""

    @abc.abstractmethod
    def ListOperations(
        self,
        request: yandex.cloud.backup.v1.resource_service_pb2.ListResourceOperationsRequest,
        context: _ServicerContext,
    ) -> typing.Union[yandex.cloud.backup.v1.resource_service_pb2.ListResourceOperationsResponse, collections.abc.Awaitable[yandex.cloud.backup.v1.resource_service_pb2.ListResourceOperationsResponse]]:
        """ListOperations return all operations in backup service for given instance"""

    @abc.abstractmethod
    def GetInstanceRegistrationToken(
        self,
        request: yandex.cloud.backup.v1.resource_service_pb2.GetInstanceRegistrationTokenRequest,
        context: _ServicerContext,
    ) -> typing.Union[yandex.cloud.backup.v1.resource_service_pb2.GetInstanceRegistrationTokenResponse, collections.abc.Awaitable[yandex.cloud.backup.v1.resource_service_pb2.GetInstanceRegistrationTokenResponse]]:
        """Get instance registration token to install backup agent withot SA attached to instance"""

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