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

from autopilotrpc import autopilot_pb2 as autopilotrpc_dot_autopilot__pb2


class AutopilotStub(object):
  """Autopilot is a service that can be used to get information about the current
  state of the daemon's autopilot agent, and also supply it with information
  that can be used when deciding where to open channels.
  """

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

    Args:
      channel: A grpc.Channel.
    """
    self.Status = channel.unary_unary(
        '/autopilotrpc.Autopilot/Status',
        request_serializer=autopilotrpc_dot_autopilot__pb2.StatusRequest.SerializeToString,
        response_deserializer=autopilotrpc_dot_autopilot__pb2.StatusResponse.FromString,
        )
    self.ModifyStatus = channel.unary_unary(
        '/autopilotrpc.Autopilot/ModifyStatus',
        request_serializer=autopilotrpc_dot_autopilot__pb2.ModifyStatusRequest.SerializeToString,
        response_deserializer=autopilotrpc_dot_autopilot__pb2.ModifyStatusResponse.FromString,
        )
    self.QueryScores = channel.unary_unary(
        '/autopilotrpc.Autopilot/QueryScores',
        request_serializer=autopilotrpc_dot_autopilot__pb2.QueryScoresRequest.SerializeToString,
        response_deserializer=autopilotrpc_dot_autopilot__pb2.QueryScoresResponse.FromString,
        )
    self.SetScores = channel.unary_unary(
        '/autopilotrpc.Autopilot/SetScores',
        request_serializer=autopilotrpc_dot_autopilot__pb2.SetScoresRequest.SerializeToString,
        response_deserializer=autopilotrpc_dot_autopilot__pb2.SetScoresResponse.FromString,
        )


class AutopilotServicer(object):
  """Autopilot is a service that can be used to get information about the current
  state of the daemon's autopilot agent, and also supply it with information
  that can be used when deciding where to open channels.
  """

  def Status(self, request, context):
    """*
    Status returns whether the daemon's autopilot agent is active.
    """
    context.set_code(grpc.StatusCode.UNIMPLEMENTED)
    context.set_details('Method not implemented!')
    raise NotImplementedError('Method not implemented!')

  def ModifyStatus(self, request, context):
    """*
    ModifyStatus is used to modify the status of the autopilot agent, like
    enabling or disabling it.
    """
    context.set_code(grpc.StatusCode.UNIMPLEMENTED)
    context.set_details('Method not implemented!')
    raise NotImplementedError('Method not implemented!')

  def QueryScores(self, request, context):
    """*
    QueryScores queries all available autopilot heuristics, in addition to any
    active combination of these heruristics, for the scores they would give to
    the given nodes.
    """
    context.set_code(grpc.StatusCode.UNIMPLEMENTED)
    context.set_details('Method not implemented!')
    raise NotImplementedError('Method not implemented!')

  def SetScores(self, request, context):
    """*
    SetScores attempts to set the scores used by the running autopilot agent,
    if the external scoring heuristic is enabled.
    """
    context.set_code(grpc.StatusCode.UNIMPLEMENTED)
    context.set_details('Method not implemented!')
    raise NotImplementedError('Method not implemented!')


def add_AutopilotServicer_to_server(servicer, server):
  rpc_method_handlers = {
      'Status': grpc.unary_unary_rpc_method_handler(
          servicer.Status,
          request_deserializer=autopilotrpc_dot_autopilot__pb2.StatusRequest.FromString,
          response_serializer=autopilotrpc_dot_autopilot__pb2.StatusResponse.SerializeToString,
      ),
      'ModifyStatus': grpc.unary_unary_rpc_method_handler(
          servicer.ModifyStatus,
          request_deserializer=autopilotrpc_dot_autopilot__pb2.ModifyStatusRequest.FromString,
          response_serializer=autopilotrpc_dot_autopilot__pb2.ModifyStatusResponse.SerializeToString,
      ),
      'QueryScores': grpc.unary_unary_rpc_method_handler(
          servicer.QueryScores,
          request_deserializer=autopilotrpc_dot_autopilot__pb2.QueryScoresRequest.FromString,
          response_serializer=autopilotrpc_dot_autopilot__pb2.QueryScoresResponse.SerializeToString,
      ),
      'SetScores': grpc.unary_unary_rpc_method_handler(
          servicer.SetScores,
          request_deserializer=autopilotrpc_dot_autopilot__pb2.SetScoresRequest.FromString,
          response_serializer=autopilotrpc_dot_autopilot__pb2.SetScoresResponse.SerializeToString,
      ),
  }
  generic_handler = grpc.method_handlers_generic_handler(
      'autopilotrpc.Autopilot', rpc_method_handlers)
  server.add_generic_rpc_handlers((generic_handler,))
