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

import raft_pb2 as raft__pb2


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

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

    Args:
      channel: A grpc.Channel.
    """
    self.ping = channel.unary_unary(
        '/leaderProto.RAFT/ping',
        request_serializer=raft__pb2.Node.SerializeToString,
        response_deserializer=raft__pb2.BoolResponse.FromString,
        )
    self.setLeader = channel.unary_unary(
        '/leaderProto.RAFT/setLeader',
        request_serializer=raft__pb2.Node.SerializeToString,
        response_deserializer=raft__pb2.BoolResponse.FromString,
        )
    self.requestVote = channel.unary_unary(
        '/leaderProto.RAFT/requestVote',
        request_serializer=raft__pb2.Node.SerializeToString,
        response_deserializer=raft__pb2.BoolResponse.FromString,
        )
    self.getLeader = channel.unary_unary(
        '/leaderProto.RAFT/getLeader',
        request_serializer=raft__pb2.Node.SerializeToString,
        response_deserializer=raft__pb2.Node.FromString,
        )
    self.getClientStatus = channel.unary_unary(
        '/leaderProto.RAFT/getClientStatus',
        request_serializer=raft__pb2.Node.SerializeToString,
        response_deserializer=raft__pb2.ClientStatus.FromString,
        )
    self.getLeaderNode = channel.unary_unary(
        '/leaderProto.RAFT/getLeaderNode',
        request_serializer=raft__pb2.Node.SerializeToString,
        response_deserializer=raft__pb2.Node.FromString,
        )


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

  def ping(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 setLeader(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 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 getClientStatus(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 getLeaderNode(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_RAFTServicer_to_server(servicer, server):
  rpc_method_handlers = {
      'ping': grpc.unary_unary_rpc_method_handler(
          servicer.ping,
          request_deserializer=raft__pb2.Node.FromString,
          response_serializer=raft__pb2.BoolResponse.SerializeToString,
      ),
      'setLeader': grpc.unary_unary_rpc_method_handler(
          servicer.setLeader,
          request_deserializer=raft__pb2.Node.FromString,
          response_serializer=raft__pb2.BoolResponse.SerializeToString,
      ),
      'requestVote': grpc.unary_unary_rpc_method_handler(
          servicer.requestVote,
          request_deserializer=raft__pb2.Node.FromString,
          response_serializer=raft__pb2.BoolResponse.SerializeToString,
      ),
      'getLeader': grpc.unary_unary_rpc_method_handler(
          servicer.getLeader,
          request_deserializer=raft__pb2.Node.FromString,
          response_serializer=raft__pb2.Node.SerializeToString,
      ),
      'getClientStatus': grpc.unary_unary_rpc_method_handler(
          servicer.getClientStatus,
          request_deserializer=raft__pb2.Node.FromString,
          response_serializer=raft__pb2.ClientStatus.SerializeToString,
      ),
      'getLeaderNode': grpc.unary_unary_rpc_method_handler(
          servicer.getLeaderNode,
          request_deserializer=raft__pb2.Node.FromString,
          response_serializer=raft__pb2.Node.SerializeToString,
      ),
  }
  generic_handler = grpc.method_handlers_generic_handler(
      'leaderProto.RAFT', rpc_method_handlers)
  server.add_generic_rpc_handlers((generic_handler,))
