# Generated by the gRPC Python protocol compiler plugin. DO NOT EDIT!
"""Client and server classes corresponding to protobuf-defined services."""
import grpc

from yandex.cloud.backup.v1 import backup_pb2 as yandex_dot_cloud_dot_backup_dot_v1_dot_backup__pb2
from yandex.cloud.backup.v1 import backup_service_pb2 as yandex_dot_cloud_dot_backup_dot_v1_dot_backup__service__pb2
from yandex.cloud.operation import operation_pb2 as yandex_dot_cloud_dot_operation_dot_operation__pb2


class BackupServiceStub(object):
    """A set of methods for managing [backups](/docs/backup/concepts/backup).
    """

    def __init__(self, channel):
        """Constructor.

        Args:
            channel: A grpc.Channel.
        """
        self.List = channel.unary_unary(
                '/yandex.cloud.backup.v1.BackupService/List',
                request_serializer=yandex_dot_cloud_dot_backup_dot_v1_dot_backup__service__pb2.ListBackupsRequest.SerializeToString,
                response_deserializer=yandex_dot_cloud_dot_backup_dot_v1_dot_backup__service__pb2.ListBackupsResponse.FromString,
                )
        self.ListArchives = channel.unary_unary(
                '/yandex.cloud.backup.v1.BackupService/ListArchives',
                request_serializer=yandex_dot_cloud_dot_backup_dot_v1_dot_backup__service__pb2.ListArchivesRequest.SerializeToString,
                response_deserializer=yandex_dot_cloud_dot_backup_dot_v1_dot_backup__service__pb2.ListArchivesResponse.FromString,
                )
        self.ListFiles = channel.unary_unary(
                '/yandex.cloud.backup.v1.BackupService/ListFiles',
                request_serializer=yandex_dot_cloud_dot_backup_dot_v1_dot_backup__service__pb2.ListFilesRequest.SerializeToString,
                response_deserializer=yandex_dot_cloud_dot_backup_dot_v1_dot_backup__service__pb2.ListFilesResponse.FromString,
                )
        self.Get = channel.unary_unary(
                '/yandex.cloud.backup.v1.BackupService/Get',
                request_serializer=yandex_dot_cloud_dot_backup_dot_v1_dot_backup__service__pb2.GetBackupRequest.SerializeToString,
                response_deserializer=yandex_dot_cloud_dot_backup_dot_v1_dot_backup__pb2.Backup.FromString,
                )
        self.StartRecovery = channel.unary_unary(
                '/yandex.cloud.backup.v1.BackupService/StartRecovery',
                request_serializer=yandex_dot_cloud_dot_backup_dot_v1_dot_backup__service__pb2.StartRecoveryRequest.SerializeToString,
                response_deserializer=yandex_dot_cloud_dot_operation_dot_operation__pb2.Operation.FromString,
                )
        self.StartFilesRecovery = channel.unary_unary(
                '/yandex.cloud.backup.v1.BackupService/StartFilesRecovery',
                request_serializer=yandex_dot_cloud_dot_backup_dot_v1_dot_backup__service__pb2.StartFilesRecoveryRequest.SerializeToString,
                response_deserializer=yandex_dot_cloud_dot_operation_dot_operation__pb2.Operation.FromString,
                )
        self.Delete = channel.unary_unary(
                '/yandex.cloud.backup.v1.BackupService/Delete',
                request_serializer=yandex_dot_cloud_dot_backup_dot_v1_dot_backup__service__pb2.DeleteBackupRequest.SerializeToString,
                response_deserializer=yandex_dot_cloud_dot_operation_dot_operation__pb2.Operation.FromString,
                )


class BackupServiceServicer(object):
    """A set of methods for managing [backups](/docs/backup/concepts/backup).
    """

    def List(self, request, context):
        """List backups using filters.
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')

    def ListArchives(self, request, context):
        """List archives that holds backups for specified folder or
        specified [Compute Cloud instance](/docs/backup/concepts/vm-connection#os).
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')

    def ListFiles(self, request, context):
        """ListFiles of the backup.
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')

    def Get(self, request, context):
        """Get backup by its id.
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')

    def StartRecovery(self, request, context):
        """Start recovery process of specified backup to specific Compute Cloud instance.

        For details, see [Restoring a VM from a backup](/docs/backup/operations/backup-vm/recover).
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')

    def StartFilesRecovery(self, request, context):
        """StartFilesRecovery runs recovery process of selected files to specific Compute Cloud instance.
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')

    def Delete(self, request, context):
        """Delete specific backup.
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')


def add_BackupServiceServicer_to_server(servicer, server):
    rpc_method_handlers = {
            'List': grpc.unary_unary_rpc_method_handler(
                    servicer.List,
                    request_deserializer=yandex_dot_cloud_dot_backup_dot_v1_dot_backup__service__pb2.ListBackupsRequest.FromString,
                    response_serializer=yandex_dot_cloud_dot_backup_dot_v1_dot_backup__service__pb2.ListBackupsResponse.SerializeToString,
            ),
            'ListArchives': grpc.unary_unary_rpc_method_handler(
                    servicer.ListArchives,
                    request_deserializer=yandex_dot_cloud_dot_backup_dot_v1_dot_backup__service__pb2.ListArchivesRequest.FromString,
                    response_serializer=yandex_dot_cloud_dot_backup_dot_v1_dot_backup__service__pb2.ListArchivesResponse.SerializeToString,
            ),
            'ListFiles': grpc.unary_unary_rpc_method_handler(
                    servicer.ListFiles,
                    request_deserializer=yandex_dot_cloud_dot_backup_dot_v1_dot_backup__service__pb2.ListFilesRequest.FromString,
                    response_serializer=yandex_dot_cloud_dot_backup_dot_v1_dot_backup__service__pb2.ListFilesResponse.SerializeToString,
            ),
            'Get': grpc.unary_unary_rpc_method_handler(
                    servicer.Get,
                    request_deserializer=yandex_dot_cloud_dot_backup_dot_v1_dot_backup__service__pb2.GetBackupRequest.FromString,
                    response_serializer=yandex_dot_cloud_dot_backup_dot_v1_dot_backup__pb2.Backup.SerializeToString,
            ),
            'StartRecovery': grpc.unary_unary_rpc_method_handler(
                    servicer.StartRecovery,
                    request_deserializer=yandex_dot_cloud_dot_backup_dot_v1_dot_backup__service__pb2.StartRecoveryRequest.FromString,
                    response_serializer=yandex_dot_cloud_dot_operation_dot_operation__pb2.Operation.SerializeToString,
            ),
            'StartFilesRecovery': grpc.unary_unary_rpc_method_handler(
                    servicer.StartFilesRecovery,
                    request_deserializer=yandex_dot_cloud_dot_backup_dot_v1_dot_backup__service__pb2.StartFilesRecoveryRequest.FromString,
                    response_serializer=yandex_dot_cloud_dot_operation_dot_operation__pb2.Operation.SerializeToString,
            ),
            'Delete': grpc.unary_unary_rpc_method_handler(
                    servicer.Delete,
                    request_deserializer=yandex_dot_cloud_dot_backup_dot_v1_dot_backup__service__pb2.DeleteBackupRequest.FromString,
                    response_serializer=yandex_dot_cloud_dot_operation_dot_operation__pb2.Operation.SerializeToString,
            ),
    }
    generic_handler = grpc.method_handlers_generic_handler(
            'yandex.cloud.backup.v1.BackupService', rpc_method_handlers)
    server.add_generic_rpc_handlers((generic_handler,))


 # This class is part of an EXPERIMENTAL API.
class BackupService(object):
    """A set of methods for managing [backups](/docs/backup/concepts/backup).
    """

    @staticmethod
    def List(request,
            target,
            options=(),
            channel_credentials=None,
            call_credentials=None,
            insecure=False,
            compression=None,
            wait_for_ready=None,
            timeout=None,
            metadata=None):
        return grpc.experimental.unary_unary(request, target, '/yandex.cloud.backup.v1.BackupService/List',
            yandex_dot_cloud_dot_backup_dot_v1_dot_backup__service__pb2.ListBackupsRequest.SerializeToString,
            yandex_dot_cloud_dot_backup_dot_v1_dot_backup__service__pb2.ListBackupsResponse.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)

    @staticmethod
    def ListArchives(request,
            target,
            options=(),
            channel_credentials=None,
            call_credentials=None,
            insecure=False,
            compression=None,
            wait_for_ready=None,
            timeout=None,
            metadata=None):
        return grpc.experimental.unary_unary(request, target, '/yandex.cloud.backup.v1.BackupService/ListArchives',
            yandex_dot_cloud_dot_backup_dot_v1_dot_backup__service__pb2.ListArchivesRequest.SerializeToString,
            yandex_dot_cloud_dot_backup_dot_v1_dot_backup__service__pb2.ListArchivesResponse.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)

    @staticmethod
    def ListFiles(request,
            target,
            options=(),
            channel_credentials=None,
            call_credentials=None,
            insecure=False,
            compression=None,
            wait_for_ready=None,
            timeout=None,
            metadata=None):
        return grpc.experimental.unary_unary(request, target, '/yandex.cloud.backup.v1.BackupService/ListFiles',
            yandex_dot_cloud_dot_backup_dot_v1_dot_backup__service__pb2.ListFilesRequest.SerializeToString,
            yandex_dot_cloud_dot_backup_dot_v1_dot_backup__service__pb2.ListFilesResponse.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)

    @staticmethod
    def Get(request,
            target,
            options=(),
            channel_credentials=None,
            call_credentials=None,
            insecure=False,
            compression=None,
            wait_for_ready=None,
            timeout=None,
            metadata=None):
        return grpc.experimental.unary_unary(request, target, '/yandex.cloud.backup.v1.BackupService/Get',
            yandex_dot_cloud_dot_backup_dot_v1_dot_backup__service__pb2.GetBackupRequest.SerializeToString,
            yandex_dot_cloud_dot_backup_dot_v1_dot_backup__pb2.Backup.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)

    @staticmethod
    def StartRecovery(request,
            target,
            options=(),
            channel_credentials=None,
            call_credentials=None,
            insecure=False,
            compression=None,
            wait_for_ready=None,
            timeout=None,
            metadata=None):
        return grpc.experimental.unary_unary(request, target, '/yandex.cloud.backup.v1.BackupService/StartRecovery',
            yandex_dot_cloud_dot_backup_dot_v1_dot_backup__service__pb2.StartRecoveryRequest.SerializeToString,
            yandex_dot_cloud_dot_operation_dot_operation__pb2.Operation.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)

    @staticmethod
    def StartFilesRecovery(request,
            target,
            options=(),
            channel_credentials=None,
            call_credentials=None,
            insecure=False,
            compression=None,
            wait_for_ready=None,
            timeout=None,
            metadata=None):
        return grpc.experimental.unary_unary(request, target, '/yandex.cloud.backup.v1.BackupService/StartFilesRecovery',
            yandex_dot_cloud_dot_backup_dot_v1_dot_backup__service__pb2.StartFilesRecoveryRequest.SerializeToString,
            yandex_dot_cloud_dot_operation_dot_operation__pb2.Operation.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)

    @staticmethod
    def Delete(request,
            target,
            options=(),
            channel_credentials=None,
            call_credentials=None,
            insecure=False,
            compression=None,
            wait_for_ready=None,
            timeout=None,
            metadata=None):
        return grpc.experimental.unary_unary(request, target, '/yandex.cloud.backup.v1.BackupService/Delete',
            yandex_dot_cloud_dot_backup_dot_v1_dot_backup__service__pb2.DeleteBackupRequest.SerializeToString,
            yandex_dot_cloud_dot_operation_dot_operation__pb2.Operation.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)
