# Generated by the gRPC Python protocol compiler plugin. DO NOT EDIT!
import grpc

from yandex.cloud.mdb.redis.v1alpha import backup_pb2 as yandex_dot_cloud_dot_mdb_dot_redis_dot_v1alpha_dot_backup__pb2
from yandex.cloud.mdb.redis.v1alpha import backup_service_pb2 as yandex_dot_cloud_dot_mdb_dot_redis_dot_v1alpha_dot_backup__service__pb2


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

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

    Args:
      channel: A grpc.Channel.
    """
    self.Get = channel.unary_unary(
        '/yandex.cloud.mdb.redis.v1alpha.BackupService/Get',
        request_serializer=yandex_dot_cloud_dot_mdb_dot_redis_dot_v1alpha_dot_backup__service__pb2.GetBackupRequest.SerializeToString,
        response_deserializer=yandex_dot_cloud_dot_mdb_dot_redis_dot_v1alpha_dot_backup__pb2.Backup.FromString,
        )
    self.List = channel.unary_unary(
        '/yandex.cloud.mdb.redis.v1alpha.BackupService/List',
        request_serializer=yandex_dot_cloud_dot_mdb_dot_redis_dot_v1alpha_dot_backup__service__pb2.ListBackupsRequest.SerializeToString,
        response_deserializer=yandex_dot_cloud_dot_mdb_dot_redis_dot_v1alpha_dot_backup__service__pb2.ListBackupsResponse.FromString,
        )


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

  def Get(self, request, context):
    """Returns the specified Redis backup.

    To get the list of available Redis backups, make a [List] 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 Redis backups available for the specified folder.
    """
    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=yandex_dot_cloud_dot_mdb_dot_redis_dot_v1alpha_dot_backup__service__pb2.GetBackupRequest.FromString,
          response_serializer=yandex_dot_cloud_dot_mdb_dot_redis_dot_v1alpha_dot_backup__pb2.Backup.SerializeToString,
      ),
      'List': grpc.unary_unary_rpc_method_handler(
          servicer.List,
          request_deserializer=yandex_dot_cloud_dot_mdb_dot_redis_dot_v1alpha_dot_backup__service__pb2.ListBackupsRequest.FromString,
          response_serializer=yandex_dot_cloud_dot_mdb_dot_redis_dot_v1alpha_dot_backup__service__pb2.ListBackupsResponse.SerializeToString,
      ),
  }
  generic_handler = grpc.method_handlers_generic_handler(
      'yandex.cloud.mdb.redis.v1alpha.BackupService', rpc_method_handlers)
  server.add_generic_rpc_handlers((generic_handler,))
