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

import chat_pb2 as chat__pb2


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

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

    Args:
      channel: A grpc.Channel.
    """
    self.SendMessage = channel.unary_unary(
        '/grpc.Chat/SendMessage',
        request_serializer=chat__pb2.Msg.SerializeToString,
        response_deserializer=chat__pb2.Empty.FromString,
        )
    self.Channel = channel.unary_stream(
        '/grpc.Chat/Channel',
        request_serializer=chat__pb2.Empty.SerializeToString,
        response_deserializer=chat__pb2.Msg.FromString,
        )


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

  def SendMessage(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 Channel(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_ChatServicer_to_server(servicer, server):
  rpc_method_handlers = {
      'SendMessage': grpc.unary_unary_rpc_method_handler(
          servicer.SendMessage,
          request_deserializer=chat__pb2.Msg.FromString,
          response_serializer=chat__pb2.Empty.SerializeToString,
      ),
      'Channel': grpc.unary_stream_rpc_method_handler(
          servicer.Channel,
          request_deserializer=chat__pb2.Empty.FromString,
          response_serializer=chat__pb2.Msg.SerializeToString,
      ),
  }
  generic_handler = grpc.method_handlers_generic_handler(
      'grpc.Chat', rpc_method_handlers)
  server.add_generic_rpc_handlers((generic_handler,))


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

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

    Args:
      channel: A grpc.Channel.
    """
    self.GetUsersList = channel.unary_unary(
        '/grpc.User/GetUsersList',
        request_serializer=chat__pb2.Empty.SerializeToString,
        response_deserializer=chat__pb2.UserList.FromString,
        )
    self.Leave = channel.unary_unary(
        '/grpc.User/Leave',
        request_serializer=chat__pb2.UserID.SerializeToString,
        response_deserializer=chat__pb2.Empty.FromString,
        )
    self.JoinServer = channel.unary_unary(
        '/grpc.User/JoinServer',
        request_serializer=chat__pb2.UserID.SerializeToString,
        response_deserializer=chat__pb2.JoinResponse.FromString,
        )


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

  def GetUsersList(self, request, context):
    """Lista de usuarios 
    """
    context.set_code(grpc.StatusCode.UNIMPLEMENTED)
    context.set_details('Method not implemented!')
    raise NotImplementedError('Method not implemented!')

  def Leave(self, request, context):
    """desconecta al usuario 
    """
    context.set_code(grpc.StatusCode.UNIMPLEMENTED)
    context.set_details('Method not implemented!')
    raise NotImplementedError('Method not implemented!')

  def JoinServer(self, request, context):
    """conexion al server 
    """
    context.set_code(grpc.StatusCode.UNIMPLEMENTED)
    context.set_details('Method not implemented!')
    raise NotImplementedError('Method not implemented!')


def add_UserServicer_to_server(servicer, server):
  rpc_method_handlers = {
      'GetUsersList': grpc.unary_unary_rpc_method_handler(
          servicer.GetUsersList,
          request_deserializer=chat__pb2.Empty.FromString,
          response_serializer=chat__pb2.UserList.SerializeToString,
      ),
      'Leave': grpc.unary_unary_rpc_method_handler(
          servicer.Leave,
          request_deserializer=chat__pb2.UserID.FromString,
          response_serializer=chat__pb2.Empty.SerializeToString,
      ),
      'JoinServer': grpc.unary_unary_rpc_method_handler(
          servicer.JoinServer,
          request_deserializer=chat__pb2.UserID.FromString,
          response_serializer=chat__pb2.JoinResponse.SerializeToString,
      ),
  }
  generic_handler = grpc.method_handlers_generic_handler(
      'grpc.User', rpc_method_handlers)
  server.add_generic_rpc_handlers((generic_handler,))


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

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

    Args:
      channel: A grpc.Channel.
    """
    self.GetMessages = channel.unary_unary(
        '/grpc.Message/GetMessages',
        request_serializer=chat__pb2.UserID.SerializeToString,
        response_deserializer=chat__pb2.UserMsgList.FromString,
        )
    self.SaveUserMessage = channel.unary_unary(
        '/grpc.Message/SaveUserMessage',
        request_serializer=chat__pb2.Msg.SerializeToString,
        response_deserializer=chat__pb2.Empty.FromString,
        )


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

  def GetMessages(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 SaveUserMessage(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_MessageServicer_to_server(servicer, server):
  rpc_method_handlers = {
      'GetMessages': grpc.unary_unary_rpc_method_handler(
          servicer.GetMessages,
          request_deserializer=chat__pb2.UserID.FromString,
          response_serializer=chat__pb2.UserMsgList.SerializeToString,
      ),
      'SaveUserMessage': grpc.unary_unary_rpc_method_handler(
          servicer.SaveUserMessage,
          request_deserializer=chat__pb2.Msg.FromString,
          response_serializer=chat__pb2.Empty.SerializeToString,
      ),
  }
  generic_handler = grpc.method_handlers_generic_handler(
      'grpc.Message', rpc_method_handlers)
  server.add_generic_rpc_handlers((generic_handler,))
