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

from . import contacts_pb2 as contacts__pb2
from . import miscellaneous_pb2 as miscellaneous__pb2


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

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

    Args:
      channel: A grpc.Channel.
    """
    self.ImportContacts = channel.unary_unary(
        '/dialog.Contacts/ImportContacts',
        request_serializer=contacts__pb2.RequestImportContacts.SerializeToString,
        response_deserializer=contacts__pb2.ResponseImportContacts.FromString,
        )
    self.DeferredImportContacts = channel.unary_unary(
        '/dialog.Contacts/DeferredImportContacts',
        request_serializer=contacts__pb2.RequestDeferredImportContacts.SerializeToString,
        response_deserializer=contacts__pb2.ResponseDeferredImportContacts.FromString,
        )
    self.GetContacts = channel.unary_unary(
        '/dialog.Contacts/GetContacts',
        request_serializer=contacts__pb2.RequestGetContacts.SerializeToString,
        response_deserializer=contacts__pb2.ResponseGetContacts.FromString,
        )
    self.RemoveContact = channel.unary_unary(
        '/dialog.Contacts/RemoveContact',
        request_serializer=contacts__pb2.RequestRemoveContact.SerializeToString,
        response_deserializer=miscellaneous__pb2.ResponseSeq.FromString,
        )
    self.AddContact = channel.unary_unary(
        '/dialog.Contacts/AddContact',
        request_serializer=contacts__pb2.RequestAddContact.SerializeToString,
        response_deserializer=miscellaneous__pb2.ResponseSeq.FromString,
        )
    self.SearchContacts = channel.unary_unary(
        '/dialog.Contacts/SearchContacts',
        request_serializer=contacts__pb2.RequestSearchContacts.SerializeToString,
        response_deserializer=contacts__pb2.ResponseSearchContacts.FromString,
        )


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

  def ImportContacts(self, request, context):
    """/ Import contacts and wait while query is not finished
    """
    context.set_code(grpc.StatusCode.UNIMPLEMENTED)
    context.set_details('Method not implemented!')
    raise NotImplementedError('Method not implemented!')

  def DeferredImportContacts(self, request, context):
    """/ Same as above, but without waiting response
    """
    context.set_code(grpc.StatusCode.UNIMPLEMENTED)
    context.set_details('Method not implemented!')
    raise NotImplementedError('Method not implemented!')

  def GetContacts(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 RemoveContact(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 AddContact(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 SearchContacts(self, request, context):
    """/ Search contacts by query string
    """
    context.set_code(grpc.StatusCode.UNIMPLEMENTED)
    context.set_details('Method not implemented!')
    raise NotImplementedError('Method not implemented!')


def add_ContactsServicer_to_server(servicer, server):
  rpc_method_handlers = {
      'ImportContacts': grpc.unary_unary_rpc_method_handler(
          servicer.ImportContacts,
          request_deserializer=contacts__pb2.RequestImportContacts.FromString,
          response_serializer=contacts__pb2.ResponseImportContacts.SerializeToString,
      ),
      'DeferredImportContacts': grpc.unary_unary_rpc_method_handler(
          servicer.DeferredImportContacts,
          request_deserializer=contacts__pb2.RequestDeferredImportContacts.FromString,
          response_serializer=contacts__pb2.ResponseDeferredImportContacts.SerializeToString,
      ),
      'GetContacts': grpc.unary_unary_rpc_method_handler(
          servicer.GetContacts,
          request_deserializer=contacts__pb2.RequestGetContacts.FromString,
          response_serializer=contacts__pb2.ResponseGetContacts.SerializeToString,
      ),
      'RemoveContact': grpc.unary_unary_rpc_method_handler(
          servicer.RemoveContact,
          request_deserializer=contacts__pb2.RequestRemoveContact.FromString,
          response_serializer=miscellaneous__pb2.ResponseSeq.SerializeToString,
      ),
      'AddContact': grpc.unary_unary_rpc_method_handler(
          servicer.AddContact,
          request_deserializer=contacts__pb2.RequestAddContact.FromString,
          response_serializer=miscellaneous__pb2.ResponseSeq.SerializeToString,
      ),
      'SearchContacts': grpc.unary_unary_rpc_method_handler(
          servicer.SearchContacts,
          request_deserializer=contacts__pb2.RequestSearchContacts.FromString,
          response_serializer=contacts__pb2.ResponseSearchContacts.SerializeToString,
      ),
  }
  generic_handler = grpc.method_handlers_generic_handler(
      'dialog.Contacts', rpc_method_handlers)
  server.add_generic_rpc_handlers((generic_handler,))
