# Generated by the gRPC Python protocol compiler plugin. DO NOT EDIT!
"""Client and server classes corresponding to protobuf-defined services."""
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."""

    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."""

    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."""
        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."""
        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."""
        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,))


 # This class is part of an EXPERIMENTAL API.
class Contacts(object):
    """Missing associated documentation comment in .proto file."""

    @staticmethod
    def ImportContacts(request,
            target,
            options=(),
            channel_credentials=None,
            call_credentials=None,
            insecure=False,
            compression=None,
            wait_for_ready=None,
            timeout=None,
            metadata=None):
        return grpc.experimental.unary_unary(request, target, '/dialog.Contacts/ImportContacts',
            contacts__pb2.RequestImportContacts.SerializeToString,
            contacts__pb2.ResponseImportContacts.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)

    @staticmethod
    def DeferredImportContacts(request,
            target,
            options=(),
            channel_credentials=None,
            call_credentials=None,
            insecure=False,
            compression=None,
            wait_for_ready=None,
            timeout=None,
            metadata=None):
        return grpc.experimental.unary_unary(request, target, '/dialog.Contacts/DeferredImportContacts',
            contacts__pb2.RequestDeferredImportContacts.SerializeToString,
            contacts__pb2.ResponseDeferredImportContacts.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)

    @staticmethod
    def GetContacts(request,
            target,
            options=(),
            channel_credentials=None,
            call_credentials=None,
            insecure=False,
            compression=None,
            wait_for_ready=None,
            timeout=None,
            metadata=None):
        return grpc.experimental.unary_unary(request, target, '/dialog.Contacts/GetContacts',
            contacts__pb2.RequestGetContacts.SerializeToString,
            contacts__pb2.ResponseGetContacts.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)

    @staticmethod
    def RemoveContact(request,
            target,
            options=(),
            channel_credentials=None,
            call_credentials=None,
            insecure=False,
            compression=None,
            wait_for_ready=None,
            timeout=None,
            metadata=None):
        return grpc.experimental.unary_unary(request, target, '/dialog.Contacts/RemoveContact',
            contacts__pb2.RequestRemoveContact.SerializeToString,
            miscellaneous__pb2.ResponseSeq.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)

    @staticmethod
    def AddContact(request,
            target,
            options=(),
            channel_credentials=None,
            call_credentials=None,
            insecure=False,
            compression=None,
            wait_for_ready=None,
            timeout=None,
            metadata=None):
        return grpc.experimental.unary_unary(request, target, '/dialog.Contacts/AddContact',
            contacts__pb2.RequestAddContact.SerializeToString,
            miscellaneous__pb2.ResponseSeq.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)

    @staticmethod
    def SearchContacts(request,
            target,
            options=(),
            channel_credentials=None,
            call_credentials=None,
            insecure=False,
            compression=None,
            wait_for_ready=None,
            timeout=None,
            metadata=None):
        return grpc.experimental.unary_unary(request, target, '/dialog.Contacts/SearchContacts',
            contacts__pb2.RequestSearchContacts.SerializeToString,
            contacts__pb2.ResponseSearchContacts.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)
