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

from pyconfr_2019.grpc_nlp.protos import TweetFeaturesService_pb2 as pyconfr__2019_dot_grpc__nlp_dot_protos_dot_TweetFeaturesService__pb2


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

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

    Args:
      channel: A grpc.Channel.
    """
    self.TopUsers = channel.unary_stream(
        '/pyconfr_2019.grpc_nlp.TweetFeaturesService/TopUsers',
        request_serializer=pyconfr__2019_dot_grpc__nlp_dot_protos_dot_TweetFeaturesService__pb2.TopUsersRequest.SerializeToString,
        response_deserializer=pyconfr__2019_dot_grpc__nlp_dot_protos_dot_TweetFeaturesService__pb2.TopUsersResponse.FromString,
        )
    self.ComputeGeneralSentimentOfUser = channel.unary_unary(
        '/pyconfr_2019.grpc_nlp.TweetFeaturesService/ComputeGeneralSentimentOfUser',
        request_serializer=pyconfr__2019_dot_grpc__nlp_dot_protos_dot_TweetFeaturesService__pb2.ComputeGeneralSentimentOfUserRequest.SerializeToString,
        response_deserializer=pyconfr__2019_dot_grpc__nlp_dot_protos_dot_TweetFeaturesService__pb2.ComputeGeneralSentimentOfUserResponse.FromString,
        )
    self.DetectLanguageFromTweetText = channel.unary_unary(
        '/pyconfr_2019.grpc_nlp.TweetFeaturesService/DetectLanguageFromTweetText',
        request_serializer=pyconfr__2019_dot_grpc__nlp_dot_protos_dot_TweetFeaturesService__pb2.DetectLanguageFromTweetTextRequest.SerializeToString,
        response_deserializer=pyconfr__2019_dot_grpc__nlp_dot_protos_dot_TweetFeaturesService__pb2.DetectLanguageFromTweetTextResponse.FromString,
        )


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

  def TopUsers(self, request, context):
    """Q: "qui sont les utilisateurs les plus présents sur une timeline Twitter ?"
    """
    context.set_code(grpc.StatusCode.UNIMPLEMENTED)
    context.set_details('Method not implemented!')
    raise NotImplementedError('Method not implemented!')

  def ComputeGeneralSentimentOfUser(self, request, context):
    """Q: "quel est le sentiment général des tweets (positif ou négatif) d’un utilisateur ?"
    """
    context.set_code(grpc.StatusCode.UNIMPLEMENTED)
    context.set_details('Method not implemented!')
    raise NotImplementedError('Method not implemented!')

  def DetectLanguageFromTweetText(self, request, context):
    """Q: "à partir du texte d’un tweet, est-il possible de deviner la langue dans lequel le tweet a été rédigé ?"
    """
    context.set_code(grpc.StatusCode.UNIMPLEMENTED)
    context.set_details('Method not implemented!')
    raise NotImplementedError('Method not implemented!')


def add_TweetFeaturesServiceServicer_to_server(servicer, server):
  rpc_method_handlers = {
      'TopUsers': grpc.unary_stream_rpc_method_handler(
          servicer.TopUsers,
          request_deserializer=pyconfr__2019_dot_grpc__nlp_dot_protos_dot_TweetFeaturesService__pb2.TopUsersRequest.FromString,
          response_serializer=pyconfr__2019_dot_grpc__nlp_dot_protos_dot_TweetFeaturesService__pb2.TopUsersResponse.SerializeToString,
      ),
      'ComputeGeneralSentimentOfUser': grpc.unary_unary_rpc_method_handler(
          servicer.ComputeGeneralSentimentOfUser,
          request_deserializer=pyconfr__2019_dot_grpc__nlp_dot_protos_dot_TweetFeaturesService__pb2.ComputeGeneralSentimentOfUserRequest.FromString,
          response_serializer=pyconfr__2019_dot_grpc__nlp_dot_protos_dot_TweetFeaturesService__pb2.ComputeGeneralSentimentOfUserResponse.SerializeToString,
      ),
      'DetectLanguageFromTweetText': grpc.unary_unary_rpc_method_handler(
          servicer.DetectLanguageFromTweetText,
          request_deserializer=pyconfr__2019_dot_grpc__nlp_dot_protos_dot_TweetFeaturesService__pb2.DetectLanguageFromTweetTextRequest.FromString,
          response_serializer=pyconfr__2019_dot_grpc__nlp_dot_protos_dot_TweetFeaturesService__pb2.DetectLanguageFromTweetTextResponse.SerializeToString,
      ),
  }
  generic_handler = grpc.method_handlers_generic_handler(
      'pyconfr_2019.grpc_nlp.TweetFeaturesService', rpc_method_handlers)
  server.add_generic_rpc_handlers((generic_handler,))
