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

import admin_pb2 as admin__pb2


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

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

    Args:
      channel: A grpc.Channel.
    """
    self.agent_online = channel.unary_unary(
        '/Admin/agent_online',
        request_serializer=admin__pb2.AgentRequest.SerializeToString,
        response_deserializer=admin__pb2.CommReply.FromString,
        )
    self.agent_offline = channel.unary_unary(
        '/Admin/agent_offline',
        request_serializer=admin__pb2.AgentRequest.SerializeToString,
        response_deserializer=admin__pb2.CommReply.FromString,
        )
    self.agent_started_admm = channel.unary_unary(
        '/Admin/agent_started_admm',
        request_serializer=admin__pb2.AgentRequest.SerializeToString,
        response_deserializer=admin__pb2.CommReply.FromString,
        )
    self.agent_finished_admm = channel.unary_unary(
        '/Admin/agent_finished_admm',
        request_serializer=admin__pb2.ADMMResults.SerializeToString,
        response_deserializer=admin__pb2.CommReply.FromString,
        )
    self.agent_measurements = channel.unary_unary(
        '/Admin/agent_measurements',
        request_serializer=admin__pb2.Measurements.SerializeToString,
        response_deserializer=admin__pb2.CommReply.FromString,
        )
    self.agent_general_use_message = channel.unary_unary(
        '/Admin/agent_general_use_message',
        request_serializer=admin__pb2.GenericMessage.SerializeToString,
        response_deserializer=admin__pb2.CommReply.FromString,
        )


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

  def agent_online(self, request, context):
    """method that the agent calls when it gets online
    """
    context.set_code(grpc.StatusCode.UNIMPLEMENTED)
    context.set_details('Method not implemented!')
    raise NotImplementedError('Method not implemented!')

  def agent_offline(self, request, context):
    """method that the agent calls when it gets offline
    """
    context.set_code(grpc.StatusCode.UNIMPLEMENTED)
    context.set_details('Method not implemented!')
    raise NotImplementedError('Method not implemented!')

  def agent_started_admm(self, request, context):
    """method that the agent calls when it starts the admm algorithm
    """
    context.set_code(grpc.StatusCode.UNIMPLEMENTED)
    context.set_details('Method not implemented!')
    raise NotImplementedError('Method not implemented!')

  def agent_finished_admm(self, request, context):
    """method that the agent calls when it finishes the admm algorithm
    """
    context.set_code(grpc.StatusCode.UNIMPLEMENTED)
    context.set_details('Method not implemented!')
    raise NotImplementedError('Method not implemented!')

  def agent_measurements(self, request, context):
    """method that the agent calls periodically to send its state to the administrator
    """
    context.set_code(grpc.StatusCode.UNIMPLEMENTED)
    context.set_details('Method not implemented!')
    raise NotImplementedError('Method not implemented!')

  def agent_general_use_message(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_AdminServicer_to_server(servicer, server):
  rpc_method_handlers = {
      'agent_online': grpc.unary_unary_rpc_method_handler(
          servicer.agent_online,
          request_deserializer=admin__pb2.AgentRequest.FromString,
          response_serializer=admin__pb2.CommReply.SerializeToString,
      ),
      'agent_offline': grpc.unary_unary_rpc_method_handler(
          servicer.agent_offline,
          request_deserializer=admin__pb2.AgentRequest.FromString,
          response_serializer=admin__pb2.CommReply.SerializeToString,
      ),
      'agent_started_admm': grpc.unary_unary_rpc_method_handler(
          servicer.agent_started_admm,
          request_deserializer=admin__pb2.AgentRequest.FromString,
          response_serializer=admin__pb2.CommReply.SerializeToString,
      ),
      'agent_finished_admm': grpc.unary_unary_rpc_method_handler(
          servicer.agent_finished_admm,
          request_deserializer=admin__pb2.ADMMResults.FromString,
          response_serializer=admin__pb2.CommReply.SerializeToString,
      ),
      'agent_measurements': grpc.unary_unary_rpc_method_handler(
          servicer.agent_measurements,
          request_deserializer=admin__pb2.Measurements.FromString,
          response_serializer=admin__pb2.CommReply.SerializeToString,
      ),
      'agent_general_use_message': grpc.unary_unary_rpc_method_handler(
          servicer.agent_general_use_message,
          request_deserializer=admin__pb2.GenericMessage.FromString,
          response_serializer=admin__pb2.CommReply.SerializeToString,
      ),
  }
  generic_handler = grpc.method_handlers_generic_handler(
      'Admin', rpc_method_handlers)
  server.add_generic_rpc_handlers((generic_handler,))
