"""
@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.access.access_pb2
import yandex.cloud.compute.v1.disk_pb2
import yandex.cloud.compute.v1.disk_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 DiskServiceStub:
    """A set of methods for managing Disk resources."""

    def __init__(self, channel: typing.Union[grpc.Channel, grpc.aio.Channel]) -> None: ...
    Get: grpc.UnaryUnaryMultiCallable[
        yandex.cloud.compute.v1.disk_service_pb2.GetDiskRequest,
        yandex.cloud.compute.v1.disk_pb2.Disk,
    ]
    """Returns the specified Disk resource.

    To get the list of available Disk resources, make a [List] request.
    """

    List: grpc.UnaryUnaryMultiCallable[
        yandex.cloud.compute.v1.disk_service_pb2.ListDisksRequest,
        yandex.cloud.compute.v1.disk_service_pb2.ListDisksResponse,
    ]
    """Retrieves the list of Disk resources in the specified folder."""

    Create: grpc.UnaryUnaryMultiCallable[
        yandex.cloud.compute.v1.disk_service_pb2.CreateDiskRequest,
        yandex.cloud.operation.operation_pb2.Operation,
    ]
    """Creates a disk in the specified folder.

    You can create an empty disk or restore it from a snapshot or an image.
    Method starts an asynchronous operation that can be cancelled while it is in progress.
    """

    Update: grpc.UnaryUnaryMultiCallable[
        yandex.cloud.compute.v1.disk_service_pb2.UpdateDiskRequest,
        yandex.cloud.operation.operation_pb2.Operation,
    ]
    """Updates the specified disk."""

    Delete: grpc.UnaryUnaryMultiCallable[
        yandex.cloud.compute.v1.disk_service_pb2.DeleteDiskRequest,
        yandex.cloud.operation.operation_pb2.Operation,
    ]
    """Deletes the specified disk.

    Deleting a disk removes its data permanently and is irreversible. However, deleting a disk does not delete
    any snapshots or images previously made from the disk. You must delete snapshots and images separately.

    It is not possible to delete a disk that is attached to an instance.
    """

    ListOperations: grpc.UnaryUnaryMultiCallable[
        yandex.cloud.compute.v1.disk_service_pb2.ListDiskOperationsRequest,
        yandex.cloud.compute.v1.disk_service_pb2.ListDiskOperationsResponse,
    ]
    """Lists operations for the specified disk."""

    Move: grpc.UnaryUnaryMultiCallable[
        yandex.cloud.compute.v1.disk_service_pb2.MoveDiskRequest,
        yandex.cloud.operation.operation_pb2.Operation,
    ]
    """Moves the specified disk to another folder of the same cloud."""

    Relocate: grpc.UnaryUnaryMultiCallable[
        yandex.cloud.compute.v1.disk_service_pb2.RelocateDiskRequest,
        yandex.cloud.operation.operation_pb2.Operation,
    ]
    """Moves the specified disk to another availability zone

    Disk must be detached from instances. To move attached
    disk use [InstanceService.Relocate] request.
    """

    ListSnapshotSchedules: grpc.UnaryUnaryMultiCallable[
        yandex.cloud.compute.v1.disk_service_pb2.ListDiskSnapshotSchedulesRequest,
        yandex.cloud.compute.v1.disk_service_pb2.ListDiskSnapshotSchedulesResponse,
    ]
    """Retrieves the list of snapshot schedules the specified disk is attached to."""

    ListAccessBindings: grpc.UnaryUnaryMultiCallable[
        yandex.cloud.access.access_pb2.ListAccessBindingsRequest,
        yandex.cloud.access.access_pb2.ListAccessBindingsResponse,
    ]
    """access

    Lists access bindings for the disk.
    """

    SetAccessBindings: grpc.UnaryUnaryMultiCallable[
        yandex.cloud.access.access_pb2.SetAccessBindingsRequest,
        yandex.cloud.operation.operation_pb2.Operation,
    ]
    """Sets access bindings for the disk."""

    UpdateAccessBindings: grpc.UnaryUnaryMultiCallable[
        yandex.cloud.access.access_pb2.UpdateAccessBindingsRequest,
        yandex.cloud.operation.operation_pb2.Operation,
    ]
    """Updates access bindings for the disk."""

class DiskServiceAsyncStub:
    """A set of methods for managing Disk resources."""

    Get: grpc.aio.UnaryUnaryMultiCallable[
        yandex.cloud.compute.v1.disk_service_pb2.GetDiskRequest,
        yandex.cloud.compute.v1.disk_pb2.Disk,
    ]
    """Returns the specified Disk resource.

    To get the list of available Disk resources, make a [List] request.
    """

    List: grpc.aio.UnaryUnaryMultiCallable[
        yandex.cloud.compute.v1.disk_service_pb2.ListDisksRequest,
        yandex.cloud.compute.v1.disk_service_pb2.ListDisksResponse,
    ]
    """Retrieves the list of Disk resources in the specified folder."""

    Create: grpc.aio.UnaryUnaryMultiCallable[
        yandex.cloud.compute.v1.disk_service_pb2.CreateDiskRequest,
        yandex.cloud.operation.operation_pb2.Operation,
    ]
    """Creates a disk in the specified folder.

    You can create an empty disk or restore it from a snapshot or an image.
    Method starts an asynchronous operation that can be cancelled while it is in progress.
    """

    Update: grpc.aio.UnaryUnaryMultiCallable[
        yandex.cloud.compute.v1.disk_service_pb2.UpdateDiskRequest,
        yandex.cloud.operation.operation_pb2.Operation,
    ]
    """Updates the specified disk."""

    Delete: grpc.aio.UnaryUnaryMultiCallable[
        yandex.cloud.compute.v1.disk_service_pb2.DeleteDiskRequest,
        yandex.cloud.operation.operation_pb2.Operation,
    ]
    """Deletes the specified disk.

    Deleting a disk removes its data permanently and is irreversible. However, deleting a disk does not delete
    any snapshots or images previously made from the disk. You must delete snapshots and images separately.

    It is not possible to delete a disk that is attached to an instance.
    """

    ListOperations: grpc.aio.UnaryUnaryMultiCallable[
        yandex.cloud.compute.v1.disk_service_pb2.ListDiskOperationsRequest,
        yandex.cloud.compute.v1.disk_service_pb2.ListDiskOperationsResponse,
    ]
    """Lists operations for the specified disk."""

    Move: grpc.aio.UnaryUnaryMultiCallable[
        yandex.cloud.compute.v1.disk_service_pb2.MoveDiskRequest,
        yandex.cloud.operation.operation_pb2.Operation,
    ]
    """Moves the specified disk to another folder of the same cloud."""

    Relocate: grpc.aio.UnaryUnaryMultiCallable[
        yandex.cloud.compute.v1.disk_service_pb2.RelocateDiskRequest,
        yandex.cloud.operation.operation_pb2.Operation,
    ]
    """Moves the specified disk to another availability zone

    Disk must be detached from instances. To move attached
    disk use [InstanceService.Relocate] request.
    """

    ListSnapshotSchedules: grpc.aio.UnaryUnaryMultiCallable[
        yandex.cloud.compute.v1.disk_service_pb2.ListDiskSnapshotSchedulesRequest,
        yandex.cloud.compute.v1.disk_service_pb2.ListDiskSnapshotSchedulesResponse,
    ]
    """Retrieves the list of snapshot schedules the specified disk is attached to."""

    ListAccessBindings: grpc.aio.UnaryUnaryMultiCallable[
        yandex.cloud.access.access_pb2.ListAccessBindingsRequest,
        yandex.cloud.access.access_pb2.ListAccessBindingsResponse,
    ]
    """access

    Lists access bindings for the disk.
    """

    SetAccessBindings: grpc.aio.UnaryUnaryMultiCallable[
        yandex.cloud.access.access_pb2.SetAccessBindingsRequest,
        yandex.cloud.operation.operation_pb2.Operation,
    ]
    """Sets access bindings for the disk."""

    UpdateAccessBindings: grpc.aio.UnaryUnaryMultiCallable[
        yandex.cloud.access.access_pb2.UpdateAccessBindingsRequest,
        yandex.cloud.operation.operation_pb2.Operation,
    ]
    """Updates access bindings for the disk."""

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

    @abc.abstractmethod
    def Get(
        self,
        request: yandex.cloud.compute.v1.disk_service_pb2.GetDiskRequest,
        context: _ServicerContext,
    ) -> typing.Union[yandex.cloud.compute.v1.disk_pb2.Disk, collections.abc.Awaitable[yandex.cloud.compute.v1.disk_pb2.Disk]]:
        """Returns the specified Disk resource.

        To get the list of available Disk resources, make a [List] request.
        """

    @abc.abstractmethod
    def List(
        self,
        request: yandex.cloud.compute.v1.disk_service_pb2.ListDisksRequest,
        context: _ServicerContext,
    ) -> typing.Union[yandex.cloud.compute.v1.disk_service_pb2.ListDisksResponse, collections.abc.Awaitable[yandex.cloud.compute.v1.disk_service_pb2.ListDisksResponse]]:
        """Retrieves the list of Disk resources in the specified folder."""

    @abc.abstractmethod
    def Create(
        self,
        request: yandex.cloud.compute.v1.disk_service_pb2.CreateDiskRequest,
        context: _ServicerContext,
    ) -> typing.Union[yandex.cloud.operation.operation_pb2.Operation, collections.abc.Awaitable[yandex.cloud.operation.operation_pb2.Operation]]:
        """Creates a disk in the specified folder.

        You can create an empty disk or restore it from a snapshot or an image.
        Method starts an asynchronous operation that can be cancelled while it is in progress.
        """

    @abc.abstractmethod
    def Update(
        self,
        request: yandex.cloud.compute.v1.disk_service_pb2.UpdateDiskRequest,
        context: _ServicerContext,
    ) -> typing.Union[yandex.cloud.operation.operation_pb2.Operation, collections.abc.Awaitable[yandex.cloud.operation.operation_pb2.Operation]]:
        """Updates the specified disk."""

    @abc.abstractmethod
    def Delete(
        self,
        request: yandex.cloud.compute.v1.disk_service_pb2.DeleteDiskRequest,
        context: _ServicerContext,
    ) -> typing.Union[yandex.cloud.operation.operation_pb2.Operation, collections.abc.Awaitable[yandex.cloud.operation.operation_pb2.Operation]]:
        """Deletes the specified disk.

        Deleting a disk removes its data permanently and is irreversible. However, deleting a disk does not delete
        any snapshots or images previously made from the disk. You must delete snapshots and images separately.

        It is not possible to delete a disk that is attached to an instance.
        """

    @abc.abstractmethod
    def ListOperations(
        self,
        request: yandex.cloud.compute.v1.disk_service_pb2.ListDiskOperationsRequest,
        context: _ServicerContext,
    ) -> typing.Union[yandex.cloud.compute.v1.disk_service_pb2.ListDiskOperationsResponse, collections.abc.Awaitable[yandex.cloud.compute.v1.disk_service_pb2.ListDiskOperationsResponse]]:
        """Lists operations for the specified disk."""

    @abc.abstractmethod
    def Move(
        self,
        request: yandex.cloud.compute.v1.disk_service_pb2.MoveDiskRequest,
        context: _ServicerContext,
    ) -> typing.Union[yandex.cloud.operation.operation_pb2.Operation, collections.abc.Awaitable[yandex.cloud.operation.operation_pb2.Operation]]:
        """Moves the specified disk to another folder of the same cloud."""

    @abc.abstractmethod
    def Relocate(
        self,
        request: yandex.cloud.compute.v1.disk_service_pb2.RelocateDiskRequest,
        context: _ServicerContext,
    ) -> typing.Union[yandex.cloud.operation.operation_pb2.Operation, collections.abc.Awaitable[yandex.cloud.operation.operation_pb2.Operation]]:
        """Moves the specified disk to another availability zone

        Disk must be detached from instances. To move attached
        disk use [InstanceService.Relocate] request.
        """

    @abc.abstractmethod
    def ListSnapshotSchedules(
        self,
        request: yandex.cloud.compute.v1.disk_service_pb2.ListDiskSnapshotSchedulesRequest,
        context: _ServicerContext,
    ) -> typing.Union[yandex.cloud.compute.v1.disk_service_pb2.ListDiskSnapshotSchedulesResponse, collections.abc.Awaitable[yandex.cloud.compute.v1.disk_service_pb2.ListDiskSnapshotSchedulesResponse]]:
        """Retrieves the list of snapshot schedules the specified disk is attached to."""

    @abc.abstractmethod
    def ListAccessBindings(
        self,
        request: yandex.cloud.access.access_pb2.ListAccessBindingsRequest,
        context: _ServicerContext,
    ) -> typing.Union[yandex.cloud.access.access_pb2.ListAccessBindingsResponse, collections.abc.Awaitable[yandex.cloud.access.access_pb2.ListAccessBindingsResponse]]:
        """access

        Lists access bindings for the disk.
        """

    @abc.abstractmethod
    def SetAccessBindings(
        self,
        request: yandex.cloud.access.access_pb2.SetAccessBindingsRequest,
        context: _ServicerContext,
    ) -> typing.Union[yandex.cloud.operation.operation_pb2.Operation, collections.abc.Awaitable[yandex.cloud.operation.operation_pb2.Operation]]:
        """Sets access bindings for the disk."""

    @abc.abstractmethod
    def UpdateAccessBindings(
        self,
        request: yandex.cloud.access.access_pb2.UpdateAccessBindingsRequest,
        context: _ServicerContext,
    ) -> typing.Union[yandex.cloud.operation.operation_pb2.Operation, collections.abc.Awaitable[yandex.cloud.operation.operation_pb2.Operation]]:
        """Updates access bindings for the disk."""

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