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

from minknow.rpc import device_pb2 as minknow_dot_rpc_dot_device__pb2


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

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

    Args:
      channel: A grpc.Channel.
    """
    self.get_device_info = channel.unary_unary(
        '/ont.rpc.device.DeviceService/get_device_info',
        request_serializer=minknow_dot_rpc_dot_device__pb2.GetDeviceInfoRequest.SerializeToString,
        response_deserializer=minknow_dot_rpc_dot_device__pb2.GetDeviceInfoResponse.FromString,
        )
    self.get_device_state = channel.unary_unary(
        '/ont.rpc.device.DeviceService/get_device_state',
        request_serializer=minknow_dot_rpc_dot_device__pb2.GetDeviceStateRequest.SerializeToString,
        response_deserializer=minknow_dot_rpc_dot_device__pb2.GetDeviceStateResponse.FromString,
        )
    self.stream_device_state = channel.unary_stream(
        '/ont.rpc.device.DeviceService/stream_device_state',
        request_serializer=minknow_dot_rpc_dot_device__pb2.StreamDeviceStateRequest.SerializeToString,
        response_deserializer=minknow_dot_rpc_dot_device__pb2.GetDeviceStateResponse.FromString,
        )
    self.get_flow_cell_info = channel.unary_unary(
        '/ont.rpc.device.DeviceService/get_flow_cell_info',
        request_serializer=minknow_dot_rpc_dot_device__pb2.GetFlowCellInfoRequest.SerializeToString,
        response_deserializer=minknow_dot_rpc_dot_device__pb2.GetFlowCellInfoResponse.FromString,
        )
    self.stream_flow_cell_info = channel.unary_stream(
        '/ont.rpc.device.DeviceService/stream_flow_cell_info',
        request_serializer=minknow_dot_rpc_dot_device__pb2.StreamFlowCellInfoRequest.SerializeToString,
        response_deserializer=minknow_dot_rpc_dot_device__pb2.GetFlowCellInfoResponse.FromString,
        )
    self.set_user_specified_flow_cell_id = channel.unary_unary(
        '/ont.rpc.device.DeviceService/set_user_specified_flow_cell_id',
        request_serializer=minknow_dot_rpc_dot_device__pb2.SetUserSpecifiedFlowCellIdRequest.SerializeToString,
        response_deserializer=minknow_dot_rpc_dot_device__pb2.SetUserSpecifiedFlowCellIdResponse.FromString,
        )
    self.set_user_specified_product_code = channel.unary_unary(
        '/ont.rpc.device.DeviceService/set_user_specified_product_code',
        request_serializer=minknow_dot_rpc_dot_device__pb2.SetUserSpecifiedProductCodeRequest.SerializeToString,
        response_deserializer=minknow_dot_rpc_dot_device__pb2.SetUserSpecifiedProductCodeResponse.FromString,
        )
    self.get_channels_layout = channel.unary_unary(
        '/ont.rpc.device.DeviceService/get_channels_layout',
        request_serializer=minknow_dot_rpc_dot_device__pb2.GetChannelsLayoutRequest.SerializeToString,
        response_deserializer=minknow_dot_rpc_dot_device__pb2.GetChannelsLayoutResponse.FromString,
        )


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

  def get_device_info(self, request, context):
    """Get information about the device this MinKNOW instance was started for.

    In normal circumstances (ie: when using the manager service), a new MinKNOW instance
    is started for each available device. This call provides information about this device.

    The information returned by this call will not change (providing the MinKNOW instance
    was started by the manager service).
    """
    context.set_code(grpc.StatusCode.UNIMPLEMENTED)
    context.set_details('Method not implemented!')
    raise NotImplementedError('Method not implemented!')

  def get_device_state(self, request, context):
    """Get information about the current device state.

    Information in this call may change as the device is used with MinKNOW, for example,
    by unplugging or plugging in the device.
    Since 1.12
    """
    context.set_code(grpc.StatusCode.UNIMPLEMENTED)
    context.set_details('Method not implemented!')
    raise NotImplementedError('Method not implemented!')

  def stream_device_state(self, request, context):
    """Streaming version of get_device_state

    Since 1.13
    """
    context.set_code(grpc.StatusCode.UNIMPLEMENTED)
    context.set_details('Method not implemented!')
    raise NotImplementedError('Method not implemented!')

  def get_flow_cell_info(self, request, context):
    """Get information about the flow cell (if any).

    This provides information about the flow_cell attached to the device (described by
    get_device_info()), if any.
    """
    context.set_code(grpc.StatusCode.UNIMPLEMENTED)
    context.set_details('Method not implemented!')
    raise NotImplementedError('Method not implemented!')

  def stream_flow_cell_info(self, request, context):
    """Streaming version of get_flow_cell_info

    Since 1.13
    """
    context.set_code(grpc.StatusCode.UNIMPLEMENTED)
    context.set_details('Method not implemented!')
    raise NotImplementedError('Method not implemented!')

  def set_user_specified_flow_cell_id(self, request, context):
    """Set the user specified flow cell id.

    This changes the user specified flow cell id.
    MinKNOW will use this id in place of the id read from the eeprom, if no eeprom data
    is available.

    This data is reset when the flow cell is disconnected.

    Since 1.12
    """
    context.set_code(grpc.StatusCode.UNIMPLEMENTED)
    context.set_details('Method not implemented!')
    raise NotImplementedError('Method not implemented!')

  def set_user_specified_product_code(self, request, context):
    """Set the user specified product code.

    This changes the user specified product code.

    MinKNOW does not use the product code, it is intended for use in MinKNOW's clients.

    This data is reset when the flow cell is disconnected.

    Since 1.12
    """
    context.set_code(grpc.StatusCode.UNIMPLEMENTED)
    context.set_details('Method not implemented!')
    raise NotImplementedError('Method not implemented!')

  def get_channels_layout(self, request, context):
    """Get information about the channel layout

    Since 1.14
    """
    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 = {
      'get_device_info': grpc.unary_unary_rpc_method_handler(
          servicer.get_device_info,
          request_deserializer=minknow_dot_rpc_dot_device__pb2.GetDeviceInfoRequest.FromString,
          response_serializer=minknow_dot_rpc_dot_device__pb2.GetDeviceInfoResponse.SerializeToString,
      ),
      'get_device_state': grpc.unary_unary_rpc_method_handler(
          servicer.get_device_state,
          request_deserializer=minknow_dot_rpc_dot_device__pb2.GetDeviceStateRequest.FromString,
          response_serializer=minknow_dot_rpc_dot_device__pb2.GetDeviceStateResponse.SerializeToString,
      ),
      'stream_device_state': grpc.unary_stream_rpc_method_handler(
          servicer.stream_device_state,
          request_deserializer=minknow_dot_rpc_dot_device__pb2.StreamDeviceStateRequest.FromString,
          response_serializer=minknow_dot_rpc_dot_device__pb2.GetDeviceStateResponse.SerializeToString,
      ),
      'get_flow_cell_info': grpc.unary_unary_rpc_method_handler(
          servicer.get_flow_cell_info,
          request_deserializer=minknow_dot_rpc_dot_device__pb2.GetFlowCellInfoRequest.FromString,
          response_serializer=minknow_dot_rpc_dot_device__pb2.GetFlowCellInfoResponse.SerializeToString,
      ),
      'stream_flow_cell_info': grpc.unary_stream_rpc_method_handler(
          servicer.stream_flow_cell_info,
          request_deserializer=minknow_dot_rpc_dot_device__pb2.StreamFlowCellInfoRequest.FromString,
          response_serializer=minknow_dot_rpc_dot_device__pb2.GetFlowCellInfoResponse.SerializeToString,
      ),
      'set_user_specified_flow_cell_id': grpc.unary_unary_rpc_method_handler(
          servicer.set_user_specified_flow_cell_id,
          request_deserializer=minknow_dot_rpc_dot_device__pb2.SetUserSpecifiedFlowCellIdRequest.FromString,
          response_serializer=minknow_dot_rpc_dot_device__pb2.SetUserSpecifiedFlowCellIdResponse.SerializeToString,
      ),
      'set_user_specified_product_code': grpc.unary_unary_rpc_method_handler(
          servicer.set_user_specified_product_code,
          request_deserializer=minknow_dot_rpc_dot_device__pb2.SetUserSpecifiedProductCodeRequest.FromString,
          response_serializer=minknow_dot_rpc_dot_device__pb2.SetUserSpecifiedProductCodeResponse.SerializeToString,
      ),
      'get_channels_layout': grpc.unary_unary_rpc_method_handler(
          servicer.get_channels_layout,
          request_deserializer=minknow_dot_rpc_dot_device__pb2.GetChannelsLayoutRequest.FromString,
          response_serializer=minknow_dot_rpc_dot_device__pb2.GetChannelsLayoutResponse.SerializeToString,
      ),
  }
  generic_handler = grpc.method_handlers_generic_handler(
      'ont.rpc.device.DeviceService', rpc_method_handlers)
  server.add_generic_rpc_handlers((generic_handler,))
