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

import muscle_manager_protocol_pb2 as muscle__manager__protocol__pb2


class MuscleManagerStub(object):
  """The MUSCLE Manager Protocol
  """

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

    Args:
      channel: A grpc.Channel.
    """
    self.SubmitLogMessage = channel.unary_unary(
        '/muscle_manager_protocol.MuscleManager/SubmitLogMessage',
        request_serializer=muscle__manager__protocol__pb2.LogMessage.SerializeToString,
        response_deserializer=muscle__manager__protocol__pb2.LogResult.FromString,
        )
    self.SubmitProfileEvents = channel.unary_unary(
        '/muscle_manager_protocol.MuscleManager/SubmitProfileEvents',
        request_serializer=muscle__manager__protocol__pb2.Profile.SerializeToString,
        response_deserializer=muscle__manager__protocol__pb2.ProfileResult.FromString,
        )
    self.RequestSettings = channel.unary_unary(
        '/muscle_manager_protocol.MuscleManager/RequestSettings',
        request_serializer=muscle__manager__protocol__pb2.SettingsRequest.SerializeToString,
        response_deserializer=muscle__manager__protocol__pb2.SettingsResult.FromString,
        )
    self.RegisterInstance = channel.unary_unary(
        '/muscle_manager_protocol.MuscleManager/RegisterInstance',
        request_serializer=muscle__manager__protocol__pb2.RegistrationRequest.SerializeToString,
        response_deserializer=muscle__manager__protocol__pb2.RegistrationResult.FromString,
        )
    self.RequestPeers = channel.unary_unary(
        '/muscle_manager_protocol.MuscleManager/RequestPeers',
        request_serializer=muscle__manager__protocol__pb2.PeerRequest.SerializeToString,
        response_deserializer=muscle__manager__protocol__pb2.PeerResult.FromString,
        )
    self.DeregisterInstance = channel.unary_unary(
        '/muscle_manager_protocol.MuscleManager/DeregisterInstance',
        request_serializer=muscle__manager__protocol__pb2.DeregistrationRequest.SerializeToString,
        response_deserializer=muscle__manager__protocol__pb2.DeregistrationResult.FromString,
        )


class MuscleManagerServicer(object):
  """The MUSCLE Manager Protocol
  """

  def SubmitLogMessage(self, request, context):
    """Sends a logged message to the Manager
    """
    context.set_code(grpc.StatusCode.UNIMPLEMENTED)
    context.set_details('Method not implemented!')
    raise NotImplementedError('Method not implemented!')

  def SubmitProfileEvents(self, request, context):
    """Sends a batch of profiling events to the Manager
    """
    context.set_code(grpc.StatusCode.UNIMPLEMENTED)
    context.set_details('Method not implemented!')
    raise NotImplementedError('Method not implemented!')

  def RequestSettings(self, request, context):
    """Requests the global base settings
    """
    context.set_code(grpc.StatusCode.UNIMPLEMENTED)
    context.set_details('Method not implemented!')
    raise NotImplementedError('Method not implemented!')

  def RegisterInstance(self, request, context):
    """Registers a newly started kernel instance
    """
    context.set_code(grpc.StatusCode.UNIMPLEMENTED)
    context.set_details('Method not implemented!')
    raise NotImplementedError('Method not implemented!')

  def RequestPeers(self, request, context):
    """Requests information about peers
    """
    context.set_code(grpc.StatusCode.UNIMPLEMENTED)
    context.set_details('Method not implemented!')
    raise NotImplementedError('Method not implemented!')

  def DeregisterInstance(self, request, context):
    """Deregisters an instance on shutdown
    """
    context.set_code(grpc.StatusCode.UNIMPLEMENTED)
    context.set_details('Method not implemented!')
    raise NotImplementedError('Method not implemented!')


def add_MuscleManagerServicer_to_server(servicer, server):
  rpc_method_handlers = {
      'SubmitLogMessage': grpc.unary_unary_rpc_method_handler(
          servicer.SubmitLogMessage,
          request_deserializer=muscle__manager__protocol__pb2.LogMessage.FromString,
          response_serializer=muscle__manager__protocol__pb2.LogResult.SerializeToString,
      ),
      'SubmitProfileEvents': grpc.unary_unary_rpc_method_handler(
          servicer.SubmitProfileEvents,
          request_deserializer=muscle__manager__protocol__pb2.Profile.FromString,
          response_serializer=muscle__manager__protocol__pb2.ProfileResult.SerializeToString,
      ),
      'RequestSettings': grpc.unary_unary_rpc_method_handler(
          servicer.RequestSettings,
          request_deserializer=muscle__manager__protocol__pb2.SettingsRequest.FromString,
          response_serializer=muscle__manager__protocol__pb2.SettingsResult.SerializeToString,
      ),
      'RegisterInstance': grpc.unary_unary_rpc_method_handler(
          servicer.RegisterInstance,
          request_deserializer=muscle__manager__protocol__pb2.RegistrationRequest.FromString,
          response_serializer=muscle__manager__protocol__pb2.RegistrationResult.SerializeToString,
      ),
      'RequestPeers': grpc.unary_unary_rpc_method_handler(
          servicer.RequestPeers,
          request_deserializer=muscle__manager__protocol__pb2.PeerRequest.FromString,
          response_serializer=muscle__manager__protocol__pb2.PeerResult.SerializeToString,
      ),
      'DeregisterInstance': grpc.unary_unary_rpc_method_handler(
          servicer.DeregisterInstance,
          request_deserializer=muscle__manager__protocol__pb2.DeregistrationRequest.FromString,
          response_serializer=muscle__manager__protocol__pb2.DeregistrationResult.SerializeToString,
      ),
  }
  generic_handler = grpc.method_handlers_generic_handler(
      'muscle_manager_protocol.MuscleManager', rpc_method_handlers)
  server.add_generic_rpc_handlers((generic_handler,))
