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

import context_pb2 as context__pb2


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

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

    Args:
      channel: A grpc.Channel.
    """
    self.AddDevice = channel.unary_unary(
        '/device.DeviceService/AddDevice',
        request_serializer=context__pb2.Device.SerializeToString,
        response_deserializer=context__pb2.DeviceId.FromString,
        )
    self.ConfigureDevice = channel.unary_unary(
        '/device.DeviceService/ConfigureDevice',
        request_serializer=context__pb2.DeviceConfig.SerializeToString,
        response_deserializer=context__pb2.DeviceId.FromString,
        )
    self.DeleteDevice = channel.unary_unary(
        '/device.DeviceService/DeleteDevice',
        request_serializer=context__pb2.DeviceId.SerializeToString,
        response_deserializer=context__pb2.Empty.FromString,
        )


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

  def AddDevice(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 ConfigureDevice(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 DeleteDevice(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_DeviceServiceServicer_to_server(servicer, server):
  rpc_method_handlers = {
      'AddDevice': grpc.unary_unary_rpc_method_handler(
          servicer.AddDevice,
          request_deserializer=context__pb2.Device.FromString,
          response_serializer=context__pb2.DeviceId.SerializeToString,
      ),
      'ConfigureDevice': grpc.unary_unary_rpc_method_handler(
          servicer.ConfigureDevice,
          request_deserializer=context__pb2.DeviceConfig.FromString,
          response_serializer=context__pb2.DeviceId.SerializeToString,
      ),
      'DeleteDevice': grpc.unary_unary_rpc_method_handler(
          servicer.DeleteDevice,
          request_deserializer=context__pb2.DeviceId.FromString,
          response_serializer=context__pb2.Empty.SerializeToString,
      ),
  }
  generic_handler = grpc.method_handlers_generic_handler(
      'device.DeviceService', rpc_method_handlers)
  server.add_generic_rpc_handlers((generic_handler,))
