# Generated by the gRPC Python protocol compiler plugin. DO NOT EDIT!
"""Client and server classes corresponding to protobuf-defined services."""
import grpc

from google.protobuf import empty_pb2 as google_dot_protobuf_dot_empty__pb2
from . import miscellaneous_pb2 as miscellaneous__pb2
from . import sequence_and_updates_pb2 as sequence__and__updates__pb2


class SequenceAndUpdatesStub(object):
    """Missing associated documentation comment in .proto file."""

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

        Args:
            channel: A grpc.Channel.
        """
        self.GetState = channel.unary_unary(
                '/dialog.SequenceAndUpdates/GetState',
                request_serializer=sequence__and__updates__pb2.RequestGetState.SerializeToString,
                response_deserializer=miscellaneous__pb2.ResponseSeq.FromString,
                )
        self.GetDifference = channel.unary_unary(
                '/dialog.SequenceAndUpdates/GetDifference',
                request_serializer=sequence__and__updates__pb2.RequestGetDifference.SerializeToString,
                response_deserializer=sequence__and__updates__pb2.ResponseGetDifference.FromString,
                )
        self.GetDialogsDifference = channel.unary_unary(
                '/dialog.SequenceAndUpdates/GetDialogsDifference',
                request_serializer=sequence__and__updates__pb2.RequestGetDialogsDifference.SerializeToString,
                response_deserializer=sequence__and__updates__pb2.ResponseGetDialogsDifference.FromString,
                )
        self.GetReferencedEntitites = channel.unary_unary(
                '/dialog.SequenceAndUpdates/GetReferencedEntitites',
                request_serializer=sequence__and__updates__pb2.RequestGetReferencedEntitites.SerializeToString,
                response_deserializer=sequence__and__updates__pb2.ResponseGetReferencedEntitites.FromString,
                )
        self.GetPartialPeerInfo = channel.unary_unary(
                '/dialog.SequenceAndUpdates/GetPartialPeerInfo',
                request_serializer=sequence__and__updates__pb2.RequestGetPartialPeerInfo.SerializeToString,
                response_deserializer=sequence__and__updates__pb2.ResponseGetPartialPeerInfo.FromString,
                )
        self.SubscribeToOnline = channel.unary_unary(
                '/dialog.SequenceAndUpdates/SubscribeToOnline',
                request_serializer=sequence__and__updates__pb2.RequestSubscribeToOnline.SerializeToString,
                response_deserializer=miscellaneous__pb2.ResponseVoid.FromString,
                )
        self.SubscribeFromOnline = channel.unary_unary(
                '/dialog.SequenceAndUpdates/SubscribeFromOnline',
                request_serializer=sequence__and__updates__pb2.RequestSubscribeFromOnline.SerializeToString,
                response_deserializer=miscellaneous__pb2.ResponseVoid.FromString,
                )
        self.SubscribeToGroupOnline = channel.unary_unary(
                '/dialog.SequenceAndUpdates/SubscribeToGroupOnline',
                request_serializer=sequence__and__updates__pb2.RequestSubscribeToGroupOnline.SerializeToString,
                response_deserializer=miscellaneous__pb2.ResponseVoid.FromString,
                )
        self.SubscribeFromGroupOnline = channel.unary_unary(
                '/dialog.SequenceAndUpdates/SubscribeFromGroupOnline',
                request_serializer=sequence__and__updates__pb2.RequestSubscribeFromGroupOnline.SerializeToString,
                response_deserializer=miscellaneous__pb2.ResponseVoid.FromString,
                )
        self.SeqUpdates = channel.unary_stream(
                '/dialog.SequenceAndUpdates/SeqUpdates',
                request_serializer=google_dot_protobuf_dot_empty__pb2.Empty.SerializeToString,
                response_deserializer=sequence__and__updates__pb2.SeqUpdateBox.FromString,
                )
        self.WeakUpdates = channel.stream_stream(
                '/dialog.SequenceAndUpdates/WeakUpdates',
                request_serializer=sequence__and__updates__pb2.WeakUpdateCommand.SerializeToString,
                response_deserializer=sequence__and__updates__pb2.WeakUpdateBox.FromString,
                )


class SequenceAndUpdatesServicer(object):
    """Missing associated documentation comment in .proto file."""

    def GetState(self, request, context):
        """/ Get last seq number
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')

    def GetDifference(self, request, context):
        """/ Get all update that happens after given seq number
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')

    def GetDialogsDifference(self, request, context):
        """/ Load all dialogs that changed after given date
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')

    def GetReferencedEntitites(self, request, context):
        """/ Load some required entities
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')

    def GetPartialPeerInfo(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 SubscribeToOnline(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 SubscribeFromOnline(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 SubscribeToGroupOnline(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 SubscribeFromGroupOnline(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 SeqUpdates(self, request, context):
        """/ Get stream of the user's updates
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')

    def WeakUpdates(self, request_iterator, 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 add_SequenceAndUpdatesServicer_to_server(servicer, server):
    rpc_method_handlers = {
            'GetState': grpc.unary_unary_rpc_method_handler(
                    servicer.GetState,
                    request_deserializer=sequence__and__updates__pb2.RequestGetState.FromString,
                    response_serializer=miscellaneous__pb2.ResponseSeq.SerializeToString,
            ),
            'GetDifference': grpc.unary_unary_rpc_method_handler(
                    servicer.GetDifference,
                    request_deserializer=sequence__and__updates__pb2.RequestGetDifference.FromString,
                    response_serializer=sequence__and__updates__pb2.ResponseGetDifference.SerializeToString,
            ),
            'GetDialogsDifference': grpc.unary_unary_rpc_method_handler(
                    servicer.GetDialogsDifference,
                    request_deserializer=sequence__and__updates__pb2.RequestGetDialogsDifference.FromString,
                    response_serializer=sequence__and__updates__pb2.ResponseGetDialogsDifference.SerializeToString,
            ),
            'GetReferencedEntitites': grpc.unary_unary_rpc_method_handler(
                    servicer.GetReferencedEntitites,
                    request_deserializer=sequence__and__updates__pb2.RequestGetReferencedEntitites.FromString,
                    response_serializer=sequence__and__updates__pb2.ResponseGetReferencedEntitites.SerializeToString,
            ),
            'GetPartialPeerInfo': grpc.unary_unary_rpc_method_handler(
                    servicer.GetPartialPeerInfo,
                    request_deserializer=sequence__and__updates__pb2.RequestGetPartialPeerInfo.FromString,
                    response_serializer=sequence__and__updates__pb2.ResponseGetPartialPeerInfo.SerializeToString,
            ),
            'SubscribeToOnline': grpc.unary_unary_rpc_method_handler(
                    servicer.SubscribeToOnline,
                    request_deserializer=sequence__and__updates__pb2.RequestSubscribeToOnline.FromString,
                    response_serializer=miscellaneous__pb2.ResponseVoid.SerializeToString,
            ),
            'SubscribeFromOnline': grpc.unary_unary_rpc_method_handler(
                    servicer.SubscribeFromOnline,
                    request_deserializer=sequence__and__updates__pb2.RequestSubscribeFromOnline.FromString,
                    response_serializer=miscellaneous__pb2.ResponseVoid.SerializeToString,
            ),
            'SubscribeToGroupOnline': grpc.unary_unary_rpc_method_handler(
                    servicer.SubscribeToGroupOnline,
                    request_deserializer=sequence__and__updates__pb2.RequestSubscribeToGroupOnline.FromString,
                    response_serializer=miscellaneous__pb2.ResponseVoid.SerializeToString,
            ),
            'SubscribeFromGroupOnline': grpc.unary_unary_rpc_method_handler(
                    servicer.SubscribeFromGroupOnline,
                    request_deserializer=sequence__and__updates__pb2.RequestSubscribeFromGroupOnline.FromString,
                    response_serializer=miscellaneous__pb2.ResponseVoid.SerializeToString,
            ),
            'SeqUpdates': grpc.unary_stream_rpc_method_handler(
                    servicer.SeqUpdates,
                    request_deserializer=google_dot_protobuf_dot_empty__pb2.Empty.FromString,
                    response_serializer=sequence__and__updates__pb2.SeqUpdateBox.SerializeToString,
            ),
            'WeakUpdates': grpc.stream_stream_rpc_method_handler(
                    servicer.WeakUpdates,
                    request_deserializer=sequence__and__updates__pb2.WeakUpdateCommand.FromString,
                    response_serializer=sequence__and__updates__pb2.WeakUpdateBox.SerializeToString,
            ),
    }
    generic_handler = grpc.method_handlers_generic_handler(
            'dialog.SequenceAndUpdates', rpc_method_handlers)
    server.add_generic_rpc_handlers((generic_handler,))


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

    @staticmethod
    def GetState(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.SequenceAndUpdates/GetState',
            sequence__and__updates__pb2.RequestGetState.SerializeToString,
            miscellaneous__pb2.ResponseSeq.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)

    @staticmethod
    def GetDifference(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.SequenceAndUpdates/GetDifference',
            sequence__and__updates__pb2.RequestGetDifference.SerializeToString,
            sequence__and__updates__pb2.ResponseGetDifference.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)

    @staticmethod
    def GetDialogsDifference(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.SequenceAndUpdates/GetDialogsDifference',
            sequence__and__updates__pb2.RequestGetDialogsDifference.SerializeToString,
            sequence__and__updates__pb2.ResponseGetDialogsDifference.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)

    @staticmethod
    def GetReferencedEntitites(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.SequenceAndUpdates/GetReferencedEntitites',
            sequence__and__updates__pb2.RequestGetReferencedEntitites.SerializeToString,
            sequence__and__updates__pb2.ResponseGetReferencedEntitites.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)

    @staticmethod
    def GetPartialPeerInfo(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.SequenceAndUpdates/GetPartialPeerInfo',
            sequence__and__updates__pb2.RequestGetPartialPeerInfo.SerializeToString,
            sequence__and__updates__pb2.ResponseGetPartialPeerInfo.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)

    @staticmethod
    def SubscribeToOnline(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.SequenceAndUpdates/SubscribeToOnline',
            sequence__and__updates__pb2.RequestSubscribeToOnline.SerializeToString,
            miscellaneous__pb2.ResponseVoid.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)

    @staticmethod
    def SubscribeFromOnline(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.SequenceAndUpdates/SubscribeFromOnline',
            sequence__and__updates__pb2.RequestSubscribeFromOnline.SerializeToString,
            miscellaneous__pb2.ResponseVoid.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)

    @staticmethod
    def SubscribeToGroupOnline(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.SequenceAndUpdates/SubscribeToGroupOnline',
            sequence__and__updates__pb2.RequestSubscribeToGroupOnline.SerializeToString,
            miscellaneous__pb2.ResponseVoid.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)

    @staticmethod
    def SubscribeFromGroupOnline(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.SequenceAndUpdates/SubscribeFromGroupOnline',
            sequence__and__updates__pb2.RequestSubscribeFromGroupOnline.SerializeToString,
            miscellaneous__pb2.ResponseVoid.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)

    @staticmethod
    def SeqUpdates(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_stream(request, target, '/dialog.SequenceAndUpdates/SeqUpdates',
            google_dot_protobuf_dot_empty__pb2.Empty.SerializeToString,
            sequence__and__updates__pb2.SeqUpdateBox.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)

    @staticmethod
    def WeakUpdates(request_iterator,
            target,
            options=(),
            channel_credentials=None,
            call_credentials=None,
            insecure=False,
            compression=None,
            wait_for_ready=None,
            timeout=None,
            metadata=None):
        return grpc.experimental.stream_stream(request_iterator, target, '/dialog.SequenceAndUpdates/WeakUpdates',
            sequence__and__updates__pb2.WeakUpdateCommand.SerializeToString,
            sequence__and__updates__pb2.WeakUpdateBox.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)
