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

from . import request_pb2 as request__pb2
from . import textsummary_pb2 as textsummary__pb2
from . import topicmining_pb2 as topicmining__pb2


class TextMiningStub(object):
  """The service definition
  """

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

    Args:
      channel: A grpc.Channel.
    """
    self.GenerateTopics = channel.stream_stream(
        '/grpc_protos.textmining.TextMining/GenerateTopics',
        request_serializer=request__pb2.Request.SerializeToString,
        response_deserializer=topicmining__pb2.Topics.FromString,
        )
    self.GenerateTextSummary = channel.stream_stream(
        '/grpc_protos.textmining.TextMining/GenerateTextSummary',
        request_serializer=request__pb2.Request.SerializeToString,
        response_deserializer=textsummary__pb2.Summary.FromString,
        )


class TextMiningServicer(object):
  """The service definition
  """

  def GenerateTopics(self, request_iterator, context):
    """Sends a request to get topics from a file
    """
    context.set_code(grpc.StatusCode.UNIMPLEMENTED)
    context.set_details('Method not implemented!')
    raise NotImplementedError('Method not implemented!')

  def GenerateTextSummary(self, request_iterator, context):
    """Requests a summary of the text from a file
    """
    context.set_code(grpc.StatusCode.UNIMPLEMENTED)
    context.set_details('Method not implemented!')
    raise NotImplementedError('Method not implemented!')


def add_TextMiningServicer_to_server(servicer, server):
  rpc_method_handlers = {
      'GenerateTopics': grpc.stream_stream_rpc_method_handler(
          servicer.GenerateTopics,
          request_deserializer=request__pb2.Request.FromString,
          response_serializer=topicmining__pb2.Topics.SerializeToString,
      ),
      'GenerateTextSummary': grpc.stream_stream_rpc_method_handler(
          servicer.GenerateTextSummary,
          request_deserializer=request__pb2.Request.FromString,
          response_serializer=textsummary__pb2.Summary.SerializeToString,
      ),
  }
  generic_handler = grpc.method_handlers_generic_handler(
      'grpc_protos.textmining.TextMining', rpc_method_handlers)
  server.add_generic_rpc_handlers((generic_handler,))
