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

import raftnode_pb2 as raftnode__pb2


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

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

    Args:
      channel: A grpc.Channel.
    """
    self.noop = channel.unary_unary(
        '/raftnode.raftnode/noop',
        request_serializer=raftnode__pb2.Null.SerializeToString,
        response_deserializer=raftnode__pb2.Null.FromString,
        )
    self.isLeader = channel.unary_unary(
        '/raftnode.raftnode/isLeader',
        request_serializer=raftnode__pb2.isLeaderRequest.SerializeToString,
        response_deserializer=raftnode__pb2.isLeaderResponse.FromString,
        )
    self.getLeader = channel.unary_unary(
        '/raftnode.raftnode/getLeader',
        request_serializer=raftnode__pb2.Null.SerializeToString,
        response_deserializer=raftnode__pb2.getLeaderResponse.FromString,
        )
    self.putValue = channel.unary_unary(
        '/raftnode.raftnode/putValue',
        request_serializer=raftnode__pb2.putValueRequest.SerializeToString,
        response_deserializer=raftnode__pb2.putValueResponse.FromString,
        )
    self.getValue = channel.unary_unary(
        '/raftnode.raftnode/getValue',
        request_serializer=raftnode__pb2.getValueRequest.SerializeToString,
        response_deserializer=raftnode__pb2.getValueResponse.FromString,
        )
    self.requestVote = channel.unary_unary(
        '/raftnode.raftnode/requestVote',
        request_serializer=raftnode__pb2.requestVoteRequest.SerializeToString,
        response_deserializer=raftnode__pb2.requestVoteResponse.FromString,
        )
    self.appendEntries = channel.unary_unary(
        '/raftnode.raftnode/appendEntries',
        request_serializer=raftnode__pb2.appendEntriesRequest.SerializeToString,
        response_deserializer=raftnode__pb2.appendEntriesResponse.FromString,
        )
    self.setCM = channel.unary_unary(
        '/raftnode.raftnode/setCM',
        request_serializer=raftnode__pb2.setCMRequest.SerializeToString,
        response_deserializer=raftnode__pb2.setCMResponse.FromString,
        )
    self.getStatus = channel.unary_unary(
        '/raftnode.raftnode/getStatus',
        request_serializer=raftnode__pb2.Null.SerializeToString,
        response_deserializer=raftnode__pb2.getStatusResponse.FromString,
        )
    self.getTimestamp = channel.unary_unary(
        '/raftnode.raftnode/getTimestamp',
        request_serializer=raftnode__pb2.Null.SerializeToString,
        response_deserializer=raftnode__pb2.getTimestampResponse.FromString,
        )
    self.getAppendEntryLatency = channel.unary_unary(
        '/raftnode.raftnode/getAppendEntryLatency',
        request_serializer=raftnode__pb2.getAppendEntryLatencyRequest.SerializeToString,
        response_deserializer=raftnode__pb2.getAppendEntryLatencyResponse.FromString,
        )
    self.resetServer = channel.unary_unary(
        '/raftnode.raftnode/resetServer',
        request_serializer=raftnode__pb2.Null.SerializeToString,
        response_deserializer=raftnode__pb2.Null.FromString,
        )
    self.restartServer = channel.unary_unary(
        '/raftnode.raftnode/restartServer',
        request_serializer=raftnode__pb2.restartServerRequest.SerializeToString,
        response_deserializer=raftnode__pb2.Null.FromString,
        )
    self.updateConfig = channel.unary_unary(
        '/raftnode.raftnode/updateConfig',
        request_serializer=raftnode__pb2.updateConfigRequest.SerializeToString,
        response_deserializer=raftnode__pb2.updateConfigResponse.FromString,
        )


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

  def noop(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 isLeader(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 getLeader(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 putValue(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 getValue(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 requestVote(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 appendEntries(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 setCM(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 getStatus(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 getTimestamp(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 getAppendEntryLatency(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 resetServer(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 restartServer(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 updateConfig(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_raftnodeServicer_to_server(servicer, server):
  rpc_method_handlers = {
      'noop': grpc.unary_unary_rpc_method_handler(
          servicer.noop,
          request_deserializer=raftnode__pb2.Null.FromString,
          response_serializer=raftnode__pb2.Null.SerializeToString,
      ),
      'isLeader': grpc.unary_unary_rpc_method_handler(
          servicer.isLeader,
          request_deserializer=raftnode__pb2.isLeaderRequest.FromString,
          response_serializer=raftnode__pb2.isLeaderResponse.SerializeToString,
      ),
      'getLeader': grpc.unary_unary_rpc_method_handler(
          servicer.getLeader,
          request_deserializer=raftnode__pb2.Null.FromString,
          response_serializer=raftnode__pb2.getLeaderResponse.SerializeToString,
      ),
      'putValue': grpc.unary_unary_rpc_method_handler(
          servicer.putValue,
          request_deserializer=raftnode__pb2.putValueRequest.FromString,
          response_serializer=raftnode__pb2.putValueResponse.SerializeToString,
      ),
      'getValue': grpc.unary_unary_rpc_method_handler(
          servicer.getValue,
          request_deserializer=raftnode__pb2.getValueRequest.FromString,
          response_serializer=raftnode__pb2.getValueResponse.SerializeToString,
      ),
      'requestVote': grpc.unary_unary_rpc_method_handler(
          servicer.requestVote,
          request_deserializer=raftnode__pb2.requestVoteRequest.FromString,
          response_serializer=raftnode__pb2.requestVoteResponse.SerializeToString,
      ),
      'appendEntries': grpc.unary_unary_rpc_method_handler(
          servicer.appendEntries,
          request_deserializer=raftnode__pb2.appendEntriesRequest.FromString,
          response_serializer=raftnode__pb2.appendEntriesResponse.SerializeToString,
      ),
      'setCM': grpc.unary_unary_rpc_method_handler(
          servicer.setCM,
          request_deserializer=raftnode__pb2.setCMRequest.FromString,
          response_serializer=raftnode__pb2.setCMResponse.SerializeToString,
      ),
      'getStatus': grpc.unary_unary_rpc_method_handler(
          servicer.getStatus,
          request_deserializer=raftnode__pb2.Null.FromString,
          response_serializer=raftnode__pb2.getStatusResponse.SerializeToString,
      ),
      'getTimestamp': grpc.unary_unary_rpc_method_handler(
          servicer.getTimestamp,
          request_deserializer=raftnode__pb2.Null.FromString,
          response_serializer=raftnode__pb2.getTimestampResponse.SerializeToString,
      ),
      'getAppendEntryLatency': grpc.unary_unary_rpc_method_handler(
          servicer.getAppendEntryLatency,
          request_deserializer=raftnode__pb2.getAppendEntryLatencyRequest.FromString,
          response_serializer=raftnode__pb2.getAppendEntryLatencyResponse.SerializeToString,
      ),
      'resetServer': grpc.unary_unary_rpc_method_handler(
          servicer.resetServer,
          request_deserializer=raftnode__pb2.Null.FromString,
          response_serializer=raftnode__pb2.Null.SerializeToString,
      ),
      'restartServer': grpc.unary_unary_rpc_method_handler(
          servicer.restartServer,
          request_deserializer=raftnode__pb2.restartServerRequest.FromString,
          response_serializer=raftnode__pb2.Null.SerializeToString,
      ),
      'updateConfig': grpc.unary_unary_rpc_method_handler(
          servicer.updateConfig,
          request_deserializer=raftnode__pb2.updateConfigRequest.FromString,
          response_serializer=raftnode__pb2.updateConfigResponse.SerializeToString,
      ),
  }
  generic_handler = grpc.method_handlers_generic_handler(
      'raftnode.raftnode', rpc_method_handlers)
  server.add_generic_rpc_handlers((generic_handler,))
