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

from nebius.api.nebius.common.v1alpha1 import operation_pb2 as nebius_dot_common_dot_v1alpha1_dot_operation__pb2
from nebius.api.nebius.msp.postgresql.v1alpha1 import backup_pb2 as nebius_dot_msp_dot_postgresql_dot_v1alpha1_dot_backup__pb2
from nebius.api.nebius.msp.postgresql.v1alpha1 import backup_service_pb2 as nebius_dot_msp_dot_postgresql_dot_v1alpha1_dot_backup__service__pb2


class BackupServiceStub(object):
    """A set of methods for managing PostgreSQL Cluster backups.
    """

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

        Args:
            channel: A grpc.Channel.
        """
        self.Get = channel.unary_unary(
                '/nebius.msp.postgresql.v1alpha1.BackupService/Get',
                request_serializer=nebius_dot_msp_dot_postgresql_dot_v1alpha1_dot_backup__service__pb2.GetBackupRequest.SerializeToString,
                response_deserializer=nebius_dot_msp_dot_postgresql_dot_v1alpha1_dot_backup__pb2.Backup.FromString,
                )
        self.List = channel.unary_unary(
                '/nebius.msp.postgresql.v1alpha1.BackupService/List',
                request_serializer=nebius_dot_msp_dot_postgresql_dot_v1alpha1_dot_backup__service__pb2.ListBackupsRequest.SerializeToString,
                response_deserializer=nebius_dot_msp_dot_postgresql_dot_v1alpha1_dot_backup__service__pb2.ListBackupsResponse.FromString,
                )
        self.ListByCluster = channel.unary_unary(
                '/nebius.msp.postgresql.v1alpha1.BackupService/ListByCluster',
                request_serializer=nebius_dot_msp_dot_postgresql_dot_v1alpha1_dot_backup__service__pb2.ListBackupsByClusterRequest.SerializeToString,
                response_deserializer=nebius_dot_msp_dot_postgresql_dot_v1alpha1_dot_backup__service__pb2.ListBackupsResponse.FromString,
                )
        self.Create = channel.unary_unary(
                '/nebius.msp.postgresql.v1alpha1.BackupService/Create',
                request_serializer=nebius_dot_msp_dot_postgresql_dot_v1alpha1_dot_backup__service__pb2.CreateBackupRequest.SerializeToString,
                response_deserializer=nebius_dot_common_dot_v1alpha1_dot_operation__pb2.Operation.FromString,
                )
        self.Delete = channel.unary_unary(
                '/nebius.msp.postgresql.v1alpha1.BackupService/Delete',
                request_serializer=nebius_dot_msp_dot_postgresql_dot_v1alpha1_dot_backup__service__pb2.DeleteBackupRequest.SerializeToString,
                response_deserializer=nebius_dot_common_dot_v1alpha1_dot_operation__pb2.Operation.FromString,
                )


class BackupServiceServicer(object):
    """A set of methods for managing PostgreSQL Cluster backups.
    """

    def Get(self, request, context):
        """Returns the specified PostgreSQL Cluster backup.
        To get the list of available PostgreSQL Cluster backups, make a [List] or [ListByCluster] request.
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')

    def List(self, request, context):
        """Retrieves the list of PostgreSQL Cluster backups by project.
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')

    def ListByCluster(self, request, context):
        """Retrieves the list of PostgreSQL Cluster backups by cluster.
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')

    def Create(self, request, context):
        """Creates a new on-demand backup.
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')

    def Delete(self, request, context):
        """Deletes an on-demand 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 = {
            'Get': grpc.unary_unary_rpc_method_handler(
                    servicer.Get,
                    request_deserializer=nebius_dot_msp_dot_postgresql_dot_v1alpha1_dot_backup__service__pb2.GetBackupRequest.FromString,
                    response_serializer=nebius_dot_msp_dot_postgresql_dot_v1alpha1_dot_backup__pb2.Backup.SerializeToString,
            ),
            'List': grpc.unary_unary_rpc_method_handler(
                    servicer.List,
                    request_deserializer=nebius_dot_msp_dot_postgresql_dot_v1alpha1_dot_backup__service__pb2.ListBackupsRequest.FromString,
                    response_serializer=nebius_dot_msp_dot_postgresql_dot_v1alpha1_dot_backup__service__pb2.ListBackupsResponse.SerializeToString,
            ),
            'ListByCluster': grpc.unary_unary_rpc_method_handler(
                    servicer.ListByCluster,
                    request_deserializer=nebius_dot_msp_dot_postgresql_dot_v1alpha1_dot_backup__service__pb2.ListBackupsByClusterRequest.FromString,
                    response_serializer=nebius_dot_msp_dot_postgresql_dot_v1alpha1_dot_backup__service__pb2.ListBackupsResponse.SerializeToString,
            ),
            'Create': grpc.unary_unary_rpc_method_handler(
                    servicer.Create,
                    request_deserializer=nebius_dot_msp_dot_postgresql_dot_v1alpha1_dot_backup__service__pb2.CreateBackupRequest.FromString,
                    response_serializer=nebius_dot_common_dot_v1alpha1_dot_operation__pb2.Operation.SerializeToString,
            ),
            'Delete': grpc.unary_unary_rpc_method_handler(
                    servicer.Delete,
                    request_deserializer=nebius_dot_msp_dot_postgresql_dot_v1alpha1_dot_backup__service__pb2.DeleteBackupRequest.FromString,
                    response_serializer=nebius_dot_common_dot_v1alpha1_dot_operation__pb2.Operation.SerializeToString,
            ),
    }
    generic_handler = grpc.method_handlers_generic_handler(
            'nebius.msp.postgresql.v1alpha1.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 PostgreSQL Cluster backups.
    """

    @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, '/nebius.msp.postgresql.v1alpha1.BackupService/Get',
            nebius_dot_msp_dot_postgresql_dot_v1alpha1_dot_backup__service__pb2.GetBackupRequest.SerializeToString,
            nebius_dot_msp_dot_postgresql_dot_v1alpha1_dot_backup__pb2.Backup.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)

    @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, '/nebius.msp.postgresql.v1alpha1.BackupService/List',
            nebius_dot_msp_dot_postgresql_dot_v1alpha1_dot_backup__service__pb2.ListBackupsRequest.SerializeToString,
            nebius_dot_msp_dot_postgresql_dot_v1alpha1_dot_backup__service__pb2.ListBackupsResponse.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)

    @staticmethod
    def ListByCluster(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, '/nebius.msp.postgresql.v1alpha1.BackupService/ListByCluster',
            nebius_dot_msp_dot_postgresql_dot_v1alpha1_dot_backup__service__pb2.ListBackupsByClusterRequest.SerializeToString,
            nebius_dot_msp_dot_postgresql_dot_v1alpha1_dot_backup__service__pb2.ListBackupsResponse.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)

    @staticmethod
    def Create(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, '/nebius.msp.postgresql.v1alpha1.BackupService/Create',
            nebius_dot_msp_dot_postgresql_dot_v1alpha1_dot_backup__service__pb2.CreateBackupRequest.SerializeToString,
            nebius_dot_common_dot_v1alpha1_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, '/nebius.msp.postgresql.v1alpha1.BackupService/Delete',
            nebius_dot_msp_dot_postgresql_dot_v1alpha1_dot_backup__service__pb2.DeleteBackupRequest.SerializeToString,
            nebius_dot_common_dot_v1alpha1_dot_operation__pb2.Operation.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)
