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

from . import rook_pb2 as rook__pb2

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

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

    Args:
      channel: A grpc.Channel.
    """
    self.ping = channel.unary_unary(
        '/AgentManagementService/ping',
        request_serializer=rook__pb2.PingMessage.SerializeToString,
        response_deserializer=rook__pb2.PingMessage.FromString,
        )
    self.new_rook_notification = channel.unary_stream(
        '/AgentManagementService/new_rook_notification',
        request_serializer=rook__pb2.RookInformation.SerializeToString,
        response_deserializer=rook__pb2.RookCommand.FromString,
        )
    self.send_rule_status_update = channel.unary_unary(
        '/AgentManagementService/send_rule_status_update',
        request_serializer=rook__pb2.RuleStatusUpdate.SerializeToString,
        response_deserializer=rook__pb2.RpcReturnCode.FromString,
        )
    self.send_messages = channel.unary_unary(
        '/AgentManagementService/send_messages',
        request_serializer=rook__pb2.RookMessages.SerializeToString,
        response_deserializer=rook__pb2.RpcReturnCode.FromString,
        )


class AgentManagementServiceServicer(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 new_rook_notification(self, request, context):
    """Notify agent of a new Rook waking up. Returns a list of initial augs to add
    """
    context.set_code(grpc.StatusCode.UNIMPLEMENTED)
    context.set_details('Method not implemented!')
    raise NotImplementedError('Method not implemented!')

  def send_rule_status_update(self, request, context):
    """Notify agent of a rule processed successfully (or not..)
    """
    context.set_code(grpc.StatusCode.UNIMPLEMENTED)
    context.set_details('Method not implemented!')
    raise NotImplementedError('Method not implemented!')

  def send_messages(self, request, context):
    """Send output messages from Rook to Aug
    """
    context.set_code(grpc.StatusCode.UNIMPLEMENTED)
    context.set_details('Method not implemented!')
    raise NotImplementedError('Method not implemented!')


def add_AgentManagementServiceServicer_to_server(servicer, server):
  rpc_method_handlers = {
      'ping': grpc.unary_unary_rpc_method_handler(
          servicer.ping,
          request_deserializer=rook__pb2.PingMessage.FromString,
          response_serializer=rook__pb2.PingMessage.SerializeToString,
      ),
      'new_rook_notification': grpc.unary_stream_rpc_method_handler(
          servicer.new_rook_notification,
          request_deserializer=rook__pb2.RookInformation.FromString,
          response_serializer=rook__pb2.RookCommand.SerializeToString,
      ),
      'send_rule_status_update': grpc.unary_unary_rpc_method_handler(
          servicer.send_rule_status_update,
          request_deserializer=rook__pb2.RuleStatusUpdate.FromString,
          response_serializer=rook__pb2.RpcReturnCode.SerializeToString,
      ),
      'send_messages': grpc.unary_unary_rpc_method_handler(
          servicer.send_messages,
          request_deserializer=rook__pb2.RookMessages.FromString,
          response_serializer=rook__pb2.RpcReturnCode.SerializeToString,
      ),
  }
  generic_handler = grpc.method_handlers_generic_handler(
      'AgentManagementService', rpc_method_handlers)
  server.add_generic_rpc_handlers((generic_handler,))
