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

import datastore_pb2 as datastore__pb2


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

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

    Args:
      channel: A grpc.Channel.
    """
    self.startReplication = channel.unary_stream(
        '/Datastore/startReplication',
        request_serializer=datastore__pb2.Request.SerializeToString,
        response_deserializer=datastore__pb2.ResponseStream.FromString,
        )
    self.putData = channel.unary_unary(
        '/Datastore/putData',
        request_serializer=datastore__pb2.PutRequest.SerializeToString,
        response_deserializer=datastore__pb2.GetPutResponse.FromString,
        )
    self.getData = channel.unary_unary(
        '/Datastore/getData',
        request_serializer=datastore__pb2.GetRequest.SerializeToString,
        response_deserializer=datastore__pb2.GetPutResponse.FromString,
        )


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

  def startReplication(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 putData(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 getData(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_DatastoreServicer_to_server(servicer, server):
  rpc_method_handlers = {
      'startReplication': grpc.unary_stream_rpc_method_handler(
          servicer.startReplication,
          request_deserializer=datastore__pb2.Request.FromString,
          response_serializer=datastore__pb2.ResponseStream.SerializeToString,
      ),
      'putData': grpc.unary_unary_rpc_method_handler(
          servicer.putData,
          request_deserializer=datastore__pb2.PutRequest.FromString,
          response_serializer=datastore__pb2.GetPutResponse.SerializeToString,
      ),
      'getData': grpc.unary_unary_rpc_method_handler(
          servicer.getData,
          request_deserializer=datastore__pb2.GetRequest.FromString,
          response_serializer=datastore__pb2.GetPutResponse.SerializeToString,
      ),
  }
  generic_handler = grpc.method_handlers_generic_handler(
      'Datastore', rpc_method_handlers)
  server.add_generic_rpc_handlers((generic_handler,))
