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

from dv_pyclient.grpc import dataSources_pb2 as dv__pyclient_dot_grpc_dot_dataSources__pb2


class RemoteDataSourceStub(object):
  """The RemoteDataSource service definition.
  """

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

    Args:
      channel: A grpc.Channel.
    """
    self.ListDataSources = channel.unary_unary(
        '/com.datavorelabs.common.protos.RemoteDataSource/ListDataSources',
        request_serializer=dv__pyclient_dot_grpc_dot_dataSources__pb2.ListDataSourcesRequest.SerializeToString,
        response_deserializer=dv__pyclient_dot_grpc_dot_dataSources__pb2.ListDataSourcesReply.FromString,
        )
    self.dataSourceUniques = channel.unary_stream(
        '/com.datavorelabs.common.protos.RemoteDataSource/dataSourceUniques',
        request_serializer=dv__pyclient_dot_grpc_dot_dataSources__pb2.DataSourceUniquesRequest.SerializeToString,
        response_deserializer=dv__pyclient_dot_grpc_dot_dataSources__pb2.DataRecordsReply.FromString,
        )
    self.sampleDataSourceMeta = channel.unary_unary(
        '/com.datavorelabs.common.protos.RemoteDataSource/sampleDataSourceMeta',
        request_serializer=dv__pyclient_dot_grpc_dot_dataSources__pb2.DataSourceMetaRequest.SerializeToString,
        response_deserializer=dv__pyclient_dot_grpc_dot_dataSources__pb2.DataSourceMetaReply.FromString,
        )
    self.dataSourceQuery = channel.unary_stream(
        '/com.datavorelabs.common.protos.RemoteDataSource/dataSourceQuery',
        request_serializer=dv__pyclient_dot_grpc_dot_dataSources__pb2.DataSourceQueryRequest.SerializeToString,
        response_deserializer=dv__pyclient_dot_grpc_dot_dataSources__pb2.DataRecordsReply.FromString,
        )


class RemoteDataSourceServicer(object):
  """The RemoteDataSource service definition.
  """

  def ListDataSources(self, request, context):
    """Return a list of dataSources this remote service has
    """
    context.set_code(grpc.StatusCode.UNIMPLEMENTED)
    context.set_details('Method not implemented!')
    raise NotImplementedError('Method not implemented!')

  def dataSourceUniques(self, request, context):
    """Return unique records for indexing into search
    """
    context.set_code(grpc.StatusCode.UNIMPLEMENTED)
    context.set_details('Method not implemented!')
    raise NotImplementedError('Method not implemented!')

  def sampleDataSourceMeta(self, request, context):
    """Returns the meta needed to read the dataRecords as lines
    """
    context.set_code(grpc.StatusCode.UNIMPLEMENTED)
    context.set_details('Method not implemented!')
    raise NotImplementedError('Method not implemented!')

  def dataSourceQuery(self, request, context):
    """Sends a list of lines to retrieve, and gets the dataRecords back
    """
    context.set_code(grpc.StatusCode.UNIMPLEMENTED)
    context.set_details('Method not implemented!')
    raise NotImplementedError('Method not implemented!')


def add_RemoteDataSourceServicer_to_server(servicer, server):
  rpc_method_handlers = {
      'ListDataSources': grpc.unary_unary_rpc_method_handler(
          servicer.ListDataSources,
          request_deserializer=dv__pyclient_dot_grpc_dot_dataSources__pb2.ListDataSourcesRequest.FromString,
          response_serializer=dv__pyclient_dot_grpc_dot_dataSources__pb2.ListDataSourcesReply.SerializeToString,
      ),
      'dataSourceUniques': grpc.unary_stream_rpc_method_handler(
          servicer.dataSourceUniques,
          request_deserializer=dv__pyclient_dot_grpc_dot_dataSources__pb2.DataSourceUniquesRequest.FromString,
          response_serializer=dv__pyclient_dot_grpc_dot_dataSources__pb2.DataRecordsReply.SerializeToString,
      ),
      'sampleDataSourceMeta': grpc.unary_unary_rpc_method_handler(
          servicer.sampleDataSourceMeta,
          request_deserializer=dv__pyclient_dot_grpc_dot_dataSources__pb2.DataSourceMetaRequest.FromString,
          response_serializer=dv__pyclient_dot_grpc_dot_dataSources__pb2.DataSourceMetaReply.SerializeToString,
      ),
      'dataSourceQuery': grpc.unary_stream_rpc_method_handler(
          servicer.dataSourceQuery,
          request_deserializer=dv__pyclient_dot_grpc_dot_dataSources__pb2.DataSourceQueryRequest.FromString,
          response_serializer=dv__pyclient_dot_grpc_dot_dataSources__pb2.DataRecordsReply.SerializeToString,
      ),
  }
  generic_handler = grpc.method_handlers_generic_handler(
      'com.datavorelabs.common.protos.RemoteDataSource', rpc_method_handlers)
  server.add_generic_rpc_handlers((generic_handler,))
