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

import bookkeeper.proto.storage_pb2 as storage__pb2


class MetaRangeServiceStub(object):
  """public service for other operations in range server
  """

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

    Args:
      channel: A grpc.Channel.
    """
    self.GetActiveRanges = channel.unary_unary(
        '/bookkeeper.proto.storage.MetaRangeService/GetActiveRanges',
        request_serializer=storage__pb2.GetActiveRangesRequest.SerializeToString,
        response_deserializer=storage__pb2.GetActiveRangesResponse.FromString,
        )


class MetaRangeServiceServicer(object):
  """public service for other operations in range server
  """

  def GetActiveRanges(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_MetaRangeServiceServicer_to_server(servicer, server):
  rpc_method_handlers = {
      'GetActiveRanges': grpc.unary_unary_rpc_method_handler(
          servicer.GetActiveRanges,
          request_deserializer=storage__pb2.GetActiveRangesRequest.FromString,
          response_serializer=storage__pb2.GetActiveRangesResponse.SerializeToString,
      ),
  }
  generic_handler = grpc.method_handlers_generic_handler(
      'bookkeeper.proto.storage.MetaRangeService', rpc_method_handlers)
  server.add_generic_rpc_handlers((generic_handler,))


class RootRangeServiceStub(object):
  """public service for metadata services
  """

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

    Args:
      channel: A grpc.Channel.
    """
    self.CreateNamespace = channel.unary_unary(
        '/bookkeeper.proto.storage.RootRangeService/CreateNamespace',
        request_serializer=storage__pb2.CreateNamespaceRequest.SerializeToString,
        response_deserializer=storage__pb2.CreateNamespaceResponse.FromString,
        )
    self.DeleteNamespace = channel.unary_unary(
        '/bookkeeper.proto.storage.RootRangeService/DeleteNamespace',
        request_serializer=storage__pb2.DeleteNamespaceRequest.SerializeToString,
        response_deserializer=storage__pb2.DeleteNamespaceResponse.FromString,
        )
    self.GetNamespace = channel.unary_unary(
        '/bookkeeper.proto.storage.RootRangeService/GetNamespace',
        request_serializer=storage__pb2.GetNamespaceRequest.SerializeToString,
        response_deserializer=storage__pb2.GetNamespaceResponse.FromString,
        )
    self.CreateStream = channel.unary_unary(
        '/bookkeeper.proto.storage.RootRangeService/CreateStream',
        request_serializer=storage__pb2.CreateStreamRequest.SerializeToString,
        response_deserializer=storage__pb2.CreateStreamResponse.FromString,
        )
    self.DeleteStream = channel.unary_unary(
        '/bookkeeper.proto.storage.RootRangeService/DeleteStream',
        request_serializer=storage__pb2.DeleteStreamRequest.SerializeToString,
        response_deserializer=storage__pb2.DeleteStreamResponse.FromString,
        )
    self.GetStream = channel.unary_unary(
        '/bookkeeper.proto.storage.RootRangeService/GetStream',
        request_serializer=storage__pb2.GetStreamRequest.SerializeToString,
        response_deserializer=storage__pb2.GetStreamResponse.FromString,
        )


class RootRangeServiceServicer(object):
  """public service for metadata services
  """

  def CreateNamespace(self, request, context):
    """
    Namespace Methods

    """
    context.set_code(grpc.StatusCode.UNIMPLEMENTED)
    context.set_details('Method not implemented!')
    raise NotImplementedError('Method not implemented!')

  def DeleteNamespace(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 GetNamespace(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 CreateStream(self, request, context):
    """
    Stream Methods

    """
    context.set_code(grpc.StatusCode.UNIMPLEMENTED)
    context.set_details('Method not implemented!')
    raise NotImplementedError('Method not implemented!')

  def DeleteStream(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 GetStream(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_RootRangeServiceServicer_to_server(servicer, server):
  rpc_method_handlers = {
      'CreateNamespace': grpc.unary_unary_rpc_method_handler(
          servicer.CreateNamespace,
          request_deserializer=storage__pb2.CreateNamespaceRequest.FromString,
          response_serializer=storage__pb2.CreateNamespaceResponse.SerializeToString,
      ),
      'DeleteNamespace': grpc.unary_unary_rpc_method_handler(
          servicer.DeleteNamespace,
          request_deserializer=storage__pb2.DeleteNamespaceRequest.FromString,
          response_serializer=storage__pb2.DeleteNamespaceResponse.SerializeToString,
      ),
      'GetNamespace': grpc.unary_unary_rpc_method_handler(
          servicer.GetNamespace,
          request_deserializer=storage__pb2.GetNamespaceRequest.FromString,
          response_serializer=storage__pb2.GetNamespaceResponse.SerializeToString,
      ),
      'CreateStream': grpc.unary_unary_rpc_method_handler(
          servicer.CreateStream,
          request_deserializer=storage__pb2.CreateStreamRequest.FromString,
          response_serializer=storage__pb2.CreateStreamResponse.SerializeToString,
      ),
      'DeleteStream': grpc.unary_unary_rpc_method_handler(
          servicer.DeleteStream,
          request_deserializer=storage__pb2.DeleteStreamRequest.FromString,
          response_serializer=storage__pb2.DeleteStreamResponse.SerializeToString,
      ),
      'GetStream': grpc.unary_unary_rpc_method_handler(
          servicer.GetStream,
          request_deserializer=storage__pb2.GetStreamRequest.FromString,
          response_serializer=storage__pb2.GetStreamResponse.SerializeToString,
      ),
  }
  generic_handler = grpc.method_handlers_generic_handler(
      'bookkeeper.proto.storage.RootRangeService', rpc_method_handlers)
  server.add_generic_rpc_handlers((generic_handler,))


class StorageContainerServiceStub(object):
  """A general range server service
  """

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

    Args:
      channel: A grpc.Channel.
    """
    self.GetStorageContainerEndpoint = channel.unary_unary(
        '/bookkeeper.proto.storage.StorageContainerService/GetStorageContainerEndpoint',
        request_serializer=storage__pb2.GetStorageContainerEndpointRequest.SerializeToString,
        response_deserializer=storage__pb2.GetStorageContainerEndpointResponse.FromString,
        )


class StorageContainerServiceServicer(object):
  """A general range server service
  """

  def GetStorageContainerEndpoint(self, request, context):
    """Get the storage container endpoints
    """
    context.set_code(grpc.StatusCode.UNIMPLEMENTED)
    context.set_details('Method not implemented!')
    raise NotImplementedError('Method not implemented!')


def add_StorageContainerServiceServicer_to_server(servicer, server):
  rpc_method_handlers = {
      'GetStorageContainerEndpoint': grpc.unary_unary_rpc_method_handler(
          servicer.GetStorageContainerEndpoint,
          request_deserializer=storage__pb2.GetStorageContainerEndpointRequest.FromString,
          response_serializer=storage__pb2.GetStorageContainerEndpointResponse.SerializeToString,
      ),
  }
  generic_handler = grpc.method_handlers_generic_handler(
      'bookkeeper.proto.storage.StorageContainerService', rpc_method_handlers)
  server.add_generic_rpc_handlers((generic_handler,))
