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

from . import storage_pb2 as storage__pb2


class StorageServiceStub(object):
  # missing associated documentation comment in .proto file
  pass

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

    Args:
      channel: A grpc.Channel.
    """
    self.ListDirectories = channel.unary_stream(
        '/gitaly.StorageService/ListDirectories',
        request_serializer=storage__pb2.ListDirectoriesRequest.SerializeToString,
        response_deserializer=storage__pb2.ListDirectoriesResponse.FromString,
        )
    self.DeleteAllRepositories = channel.unary_unary(
        '/gitaly.StorageService/DeleteAllRepositories',
        request_serializer=storage__pb2.DeleteAllRepositoriesRequest.SerializeToString,
        response_deserializer=storage__pb2.DeleteAllRepositoriesResponse.FromString,
        )


class StorageServiceServicer(object):
  # missing associated documentation comment in .proto file
  pass

  def ListDirectories(self, request, context):
    # missing associated documentation comment in .proto file
    pass
    context.set_code(grpc.StatusCode.UNIMPLEMENTED)
    context.set_details('Method not implemented!')
    raise NotImplementedError('Method not implemented!')

  def DeleteAllRepositories(self, request, context):
    # missing associated documentation comment in .proto file
    pass
    context.set_code(grpc.StatusCode.UNIMPLEMENTED)
    context.set_details('Method not implemented!')
    raise NotImplementedError('Method not implemented!')


def add_StorageServiceServicer_to_server(servicer, server):
  rpc_method_handlers = {
      'ListDirectories': grpc.unary_stream_rpc_method_handler(
          servicer.ListDirectories,
          request_deserializer=storage__pb2.ListDirectoriesRequest.FromString,
          response_serializer=storage__pb2.ListDirectoriesResponse.SerializeToString,
      ),
      'DeleteAllRepositories': grpc.unary_unary_rpc_method_handler(
          servicer.DeleteAllRepositories,
          request_deserializer=storage__pb2.DeleteAllRepositoriesRequest.FromString,
          response_serializer=storage__pb2.DeleteAllRepositoriesResponse.SerializeToString,
      ),
  }
  generic_handler = grpc.method_handlers_generic_handler(
      'gitaly.StorageService', rpc_method_handlers)
  server.add_generic_rpc_handlers((generic_handler,))
