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

from robot_mind import robot_mind_pb2 as robot__mind_dot_robot__mind__pb2


class RobotSkillServiceStub(object):
  """技能基础接口，必须实现，在设备登陆之后， 将信息发送到 各个技能模块
  """

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

    Args:
      channel: A grpc.Channel.
    """
    self.EnableSkill = channel.unary_unary(
        '/robotmind.RobotSkillService/EnableSkill',
        request_serializer=robot__mind_dot_robot__mind__pb2.EnableSkillRequest.SerializeToString,
        response_deserializer=robot__mind_dot_robot__mind__pb2.EnableSkillResponse.FromString,
        )
    self.HandleAction = channel.unary_unary(
        '/robotmind.RobotSkillService/HandleAction',
        request_serializer=robot__mind_dot_robot__mind__pb2.ActionRequest.SerializeToString,
        response_deserializer=robot__mind_dot_robot__mind__pb2.ActionResponse.FromString,
        )


class RobotSkillServiceServicer(object):
  """技能基础接口，必须实现，在设备登陆之后， 将信息发送到 各个技能模块
  """

  def EnableSkill(self, request, context):
    """使能
    """
    context.set_code(grpc.StatusCode.UNIMPLEMENTED)
    context.set_details('Method not implemented!')
    raise NotImplementedError('Method not implemented!')

  def HandleAction(self, request, context):
    """让技能处理Action
    """
    context.set_code(grpc.StatusCode.UNIMPLEMENTED)
    context.set_details('Method not implemented!')
    raise NotImplementedError('Method not implemented!')


def add_RobotSkillServiceServicer_to_server(servicer, server):
  rpc_method_handlers = {
      'EnableSkill': grpc.unary_unary_rpc_method_handler(
          servicer.EnableSkill,
          request_deserializer=robot__mind_dot_robot__mind__pb2.EnableSkillRequest.FromString,
          response_serializer=robot__mind_dot_robot__mind__pb2.EnableSkillResponse.SerializeToString,
      ),
      'HandleAction': grpc.unary_unary_rpc_method_handler(
          servicer.HandleAction,
          request_deserializer=robot__mind_dot_robot__mind__pb2.ActionRequest.FromString,
          response_serializer=robot__mind_dot_robot__mind__pb2.ActionResponse.SerializeToString,
      ),
  }
  generic_handler = grpc.method_handlers_generic_handler(
      'robotmind.RobotSkillService', rpc_method_handlers)
  server.add_generic_rpc_handlers((generic_handler,))


class RobotMindServiceStub(object):
  """robot-mind
  """

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

    Args:
      channel: A grpc.Channel.
    """
    self.RegisterSkill = channel.unary_unary(
        '/robotmind.RobotMindService/RegisterSkill',
        request_serializer=robot__mind_dot_robot__mind__pb2.RegisterSkillRequest.SerializeToString,
        response_deserializer=robot__mind_dot_robot__mind__pb2.ActionResponse.FromString,
        )
    self.SendUnknownAction = channel.unary_unary(
        '/robotmind.RobotMindService/SendUnknownAction',
        request_serializer=robot__mind_dot_robot__mind__pb2.ActionRequest.SerializeToString,
        response_deserializer=robot__mind_dot_robot__mind__pb2.ActionResponse.FromString,
        )
    self.SendAction = channel.unary_unary(
        '/robotmind.RobotMindService/SendAction',
        request_serializer=robot__mind_dot_robot__mind__pb2.ActionRequest.SerializeToString,
        response_deserializer=robot__mind_dot_robot__mind__pb2.ActionResponse.FromString,
        )


class RobotMindServiceServicer(object):
  """robot-mind
  """

  def RegisterSkill(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 SendUnknownAction(self, request, context):
    """技能转发过来的无法处理的Action
    """
    context.set_code(grpc.StatusCode.UNIMPLEMENTED)
    context.set_details('Method not implemented!')
    raise NotImplementedError('Method not implemented!')

  def SendAction(self, request, context):
    """技能处理过的Action
    """
    context.set_code(grpc.StatusCode.UNIMPLEMENTED)
    context.set_details('Method not implemented!')
    raise NotImplementedError('Method not implemented!')


def add_RobotMindServiceServicer_to_server(servicer, server):
  rpc_method_handlers = {
      'RegisterSkill': grpc.unary_unary_rpc_method_handler(
          servicer.RegisterSkill,
          request_deserializer=robot__mind_dot_robot__mind__pb2.RegisterSkillRequest.FromString,
          response_serializer=robot__mind_dot_robot__mind__pb2.ActionResponse.SerializeToString,
      ),
      'SendUnknownAction': grpc.unary_unary_rpc_method_handler(
          servicer.SendUnknownAction,
          request_deserializer=robot__mind_dot_robot__mind__pb2.ActionRequest.FromString,
          response_serializer=robot__mind_dot_robot__mind__pb2.ActionResponse.SerializeToString,
      ),
      'SendAction': grpc.unary_unary_rpc_method_handler(
          servicer.SendAction,
          request_deserializer=robot__mind_dot_robot__mind__pb2.ActionRequest.FromString,
          response_serializer=robot__mind_dot_robot__mind__pb2.ActionResponse.SerializeToString,
      ),
  }
  generic_handler = grpc.method_handlers_generic_handler(
      'robotmind.RobotMindService', rpc_method_handlers)
  server.add_generic_rpc_handlers((generic_handler,))
