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

from . import miscellaneous_pb2 as miscellaneous__pb2
from . import users_pb2 as users__pb2


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

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

    Args:
      channel: A grpc.Channel.
    """
    self.EditUserLocalName = channel.unary_unary(
        '/dialog.Users/EditUserLocalName',
        request_serializer=users__pb2.RequestEditUserLocalName.SerializeToString,
        response_deserializer=miscellaneous__pb2.ResponseSeq.FromString,
        )
    self.LoadFullUsers = channel.unary_unary(
        '/dialog.Users/LoadFullUsers',
        request_serializer=users__pb2.RequestLoadFullUsers.SerializeToString,
        response_deserializer=users__pb2.ResponseLoadFullUsers.FromString,
        )


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

  def EditUserLocalName(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 LoadFullUsers(self, request, context):
    """/ Deprecated
    """
    context.set_code(grpc.StatusCode.UNIMPLEMENTED)
    context.set_details('Method not implemented!')
    raise NotImplementedError('Method not implemented!')


def add_UsersServicer_to_server(servicer, server):
  rpc_method_handlers = {
      'EditUserLocalName': grpc.unary_unary_rpc_method_handler(
          servicer.EditUserLocalName,
          request_deserializer=users__pb2.RequestEditUserLocalName.FromString,
          response_serializer=miscellaneous__pb2.ResponseSeq.SerializeToString,
      ),
      'LoadFullUsers': grpc.unary_unary_rpc_method_handler(
          servicer.LoadFullUsers,
          request_deserializer=users__pb2.RequestLoadFullUsers.FromString,
          response_serializer=users__pb2.ResponseLoadFullUsers.SerializeToString,
      ),
  }
  generic_handler = grpc.method_handlers_generic_handler(
      'dialog.Users', rpc_method_handlers)
  server.add_generic_rpc_handlers((generic_handler,))
