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

from . import smq_pb2 as smq__pb2

GRPC_GENERATED_VERSION = '1.71.0'
GRPC_VERSION = grpc.__version__
_version_not_supported = False

try:
    from grpc._utilities import first_version_is_lower
    _version_not_supported = first_version_is_lower(GRPC_VERSION, GRPC_GENERATED_VERSION)
except ImportError:
    _version_not_supported = True

if _version_not_supported:
    raise RuntimeError(
        f'The grpc package installed is at version {GRPC_VERSION},'
        + f' but the generated code in smq_pb2_grpc.py depends on'
        + f' grpcio>={GRPC_GENERATED_VERSION}.'
        + f' Please upgrade your grpc module to grpcio>={GRPC_GENERATED_VERSION}'
        + f' or downgrade your generated code using grpcio-tools<={GRPC_VERSION}.'
    )


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

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

        Args:
            channel: A grpc.Channel.
        """
        self.Connect = channel.unary_unary(
                '/smq.SuhaibMessageQueue/Connect',
                request_serializer=smq__pb2.ConnectRequest.SerializeToString,
                response_deserializer=smq__pb2.ConnectResponse.FromString,
                _registered_method=True)
        self.GetLatestOffset = channel.unary_unary(
                '/smq.SuhaibMessageQueue/GetLatestOffset',
                request_serializer=smq__pb2.GetLatestOffsetRequest.SerializeToString,
                response_deserializer=smq__pb2.GetLatestOffsetResponse.FromString,
                _registered_method=True)
        self.GetEarliestOffset = channel.unary_unary(
                '/smq.SuhaibMessageQueue/GetEarliestOffset',
                request_serializer=smq__pb2.GetEarliestOffsetRequest.SerializeToString,
                response_deserializer=smq__pb2.GetEarliestOffsetResponse.FromString,
                _registered_method=True)
        self.CreateTopic = channel.unary_unary(
                '/smq.SuhaibMessageQueue/CreateTopic',
                request_serializer=smq__pb2.CreateTopicRequest.SerializeToString,
                response_deserializer=smq__pb2.CreateTopicResponse.FromString,
                _registered_method=True)
        self.Produce = channel.unary_unary(
                '/smq.SuhaibMessageQueue/Produce',
                request_serializer=smq__pb2.ProduceRequest.SerializeToString,
                response_deserializer=smq__pb2.ProduceResponse.FromString,
                _registered_method=True)
        self.Consume = channel.unary_unary(
                '/smq.SuhaibMessageQueue/Consume',
                request_serializer=smq__pb2.ConsumeRequest.SerializeToString,
                response_deserializer=smq__pb2.ConsumeResponse.FromString,
                _registered_method=True)
        self.StreamProduce = channel.stream_unary(
                '/smq.SuhaibMessageQueue/StreamProduce',
                request_serializer=smq__pb2.ProduceRequest.SerializeToString,
                response_deserializer=smq__pb2.ProduceResponse.FromString,
                _registered_method=True)
        self.StreamConsume = channel.unary_stream(
                '/smq.SuhaibMessageQueue/StreamConsume',
                request_serializer=smq__pb2.ConsumeRequest.SerializeToString,
                response_deserializer=smq__pb2.ConsumeResponse.FromString,
                _registered_method=True)
        self.DeleteUntilOffset = channel.unary_unary(
                '/smq.SuhaibMessageQueue/DeleteUntilOffset',
                request_serializer=smq__pb2.DeleteUntilOffsetRequest.SerializeToString,
                response_deserializer=smq__pb2.DeleteUntilOffsetResponse.FromString,
                _registered_method=True)
        self.BulkRetrieve = channel.unary_unary(
                '/smq.SuhaibMessageQueue/BulkRetrieve',
                request_serializer=smq__pb2.BulkRetrieveRequest.SerializeToString,
                response_deserializer=smq__pb2.BulkRetrieveResponse.FromString,
                _registered_method=True)


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

    def Connect(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 GetLatestOffset(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 GetEarliestOffset(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 CreateTopic(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 Produce(self, request, context):
        """Single message versions
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')

    def Consume(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 StreamProduce(self, request_iterator, context):
        """Stream versions
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')

    def StreamConsume(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 DeleteUntilOffset(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 BulkRetrieve(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 add_SuhaibMessageQueueServicer_to_server(servicer, server):
    rpc_method_handlers = {
            'Connect': grpc.unary_unary_rpc_method_handler(
                    servicer.Connect,
                    request_deserializer=smq__pb2.ConnectRequest.FromString,
                    response_serializer=smq__pb2.ConnectResponse.SerializeToString,
            ),
            'GetLatestOffset': grpc.unary_unary_rpc_method_handler(
                    servicer.GetLatestOffset,
                    request_deserializer=smq__pb2.GetLatestOffsetRequest.FromString,
                    response_serializer=smq__pb2.GetLatestOffsetResponse.SerializeToString,
            ),
            'GetEarliestOffset': grpc.unary_unary_rpc_method_handler(
                    servicer.GetEarliestOffset,
                    request_deserializer=smq__pb2.GetEarliestOffsetRequest.FromString,
                    response_serializer=smq__pb2.GetEarliestOffsetResponse.SerializeToString,
            ),
            'CreateTopic': grpc.unary_unary_rpc_method_handler(
                    servicer.CreateTopic,
                    request_deserializer=smq__pb2.CreateTopicRequest.FromString,
                    response_serializer=smq__pb2.CreateTopicResponse.SerializeToString,
            ),
            'Produce': grpc.unary_unary_rpc_method_handler(
                    servicer.Produce,
                    request_deserializer=smq__pb2.ProduceRequest.FromString,
                    response_serializer=smq__pb2.ProduceResponse.SerializeToString,
            ),
            'Consume': grpc.unary_unary_rpc_method_handler(
                    servicer.Consume,
                    request_deserializer=smq__pb2.ConsumeRequest.FromString,
                    response_serializer=smq__pb2.ConsumeResponse.SerializeToString,
            ),
            'StreamProduce': grpc.stream_unary_rpc_method_handler(
                    servicer.StreamProduce,
                    request_deserializer=smq__pb2.ProduceRequest.FromString,
                    response_serializer=smq__pb2.ProduceResponse.SerializeToString,
            ),
            'StreamConsume': grpc.unary_stream_rpc_method_handler(
                    servicer.StreamConsume,
                    request_deserializer=smq__pb2.ConsumeRequest.FromString,
                    response_serializer=smq__pb2.ConsumeResponse.SerializeToString,
            ),
            'DeleteUntilOffset': grpc.unary_unary_rpc_method_handler(
                    servicer.DeleteUntilOffset,
                    request_deserializer=smq__pb2.DeleteUntilOffsetRequest.FromString,
                    response_serializer=smq__pb2.DeleteUntilOffsetResponse.SerializeToString,
            ),
            'BulkRetrieve': grpc.unary_unary_rpc_method_handler(
                    servicer.BulkRetrieve,
                    request_deserializer=smq__pb2.BulkRetrieveRequest.FromString,
                    response_serializer=smq__pb2.BulkRetrieveResponse.SerializeToString,
            ),
    }
    generic_handler = grpc.method_handlers_generic_handler(
            'smq.SuhaibMessageQueue', rpc_method_handlers)
    server.add_generic_rpc_handlers((generic_handler,))
    server.add_registered_method_handlers('smq.SuhaibMessageQueue', rpc_method_handlers)


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

    @staticmethod
    def Connect(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,
            '/smq.SuhaibMessageQueue/Connect',
            smq__pb2.ConnectRequest.SerializeToString,
            smq__pb2.ConnectResponse.FromString,
            options,
            channel_credentials,
            insecure,
            call_credentials,
            compression,
            wait_for_ready,
            timeout,
            metadata,
            _registered_method=True)

    @staticmethod
    def GetLatestOffset(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,
            '/smq.SuhaibMessageQueue/GetLatestOffset',
            smq__pb2.GetLatestOffsetRequest.SerializeToString,
            smq__pb2.GetLatestOffsetResponse.FromString,
            options,
            channel_credentials,
            insecure,
            call_credentials,
            compression,
            wait_for_ready,
            timeout,
            metadata,
            _registered_method=True)

    @staticmethod
    def GetEarliestOffset(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,
            '/smq.SuhaibMessageQueue/GetEarliestOffset',
            smq__pb2.GetEarliestOffsetRequest.SerializeToString,
            smq__pb2.GetEarliestOffsetResponse.FromString,
            options,
            channel_credentials,
            insecure,
            call_credentials,
            compression,
            wait_for_ready,
            timeout,
            metadata,
            _registered_method=True)

    @staticmethod
    def CreateTopic(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,
            '/smq.SuhaibMessageQueue/CreateTopic',
            smq__pb2.CreateTopicRequest.SerializeToString,
            smq__pb2.CreateTopicResponse.FromString,
            options,
            channel_credentials,
            insecure,
            call_credentials,
            compression,
            wait_for_ready,
            timeout,
            metadata,
            _registered_method=True)

    @staticmethod
    def Produce(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,
            '/smq.SuhaibMessageQueue/Produce',
            smq__pb2.ProduceRequest.SerializeToString,
            smq__pb2.ProduceResponse.FromString,
            options,
            channel_credentials,
            insecure,
            call_credentials,
            compression,
            wait_for_ready,
            timeout,
            metadata,
            _registered_method=True)

    @staticmethod
    def Consume(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,
            '/smq.SuhaibMessageQueue/Consume',
            smq__pb2.ConsumeRequest.SerializeToString,
            smq__pb2.ConsumeResponse.FromString,
            options,
            channel_credentials,
            insecure,
            call_credentials,
            compression,
            wait_for_ready,
            timeout,
            metadata,
            _registered_method=True)

    @staticmethod
    def StreamProduce(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_unary(
            request_iterator,
            target,
            '/smq.SuhaibMessageQueue/StreamProduce',
            smq__pb2.ProduceRequest.SerializeToString,
            smq__pb2.ProduceResponse.FromString,
            options,
            channel_credentials,
            insecure,
            call_credentials,
            compression,
            wait_for_ready,
            timeout,
            metadata,
            _registered_method=True)

    @staticmethod
    def StreamConsume(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,
            '/smq.SuhaibMessageQueue/StreamConsume',
            smq__pb2.ConsumeRequest.SerializeToString,
            smq__pb2.ConsumeResponse.FromString,
            options,
            channel_credentials,
            insecure,
            call_credentials,
            compression,
            wait_for_ready,
            timeout,
            metadata,
            _registered_method=True)

    @staticmethod
    def DeleteUntilOffset(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,
            '/smq.SuhaibMessageQueue/DeleteUntilOffset',
            smq__pb2.DeleteUntilOffsetRequest.SerializeToString,
            smq__pb2.DeleteUntilOffsetResponse.FromString,
            options,
            channel_credentials,
            insecure,
            call_credentials,
            compression,
            wait_for_ready,
            timeout,
            metadata,
            _registered_method=True)

    @staticmethod
    def BulkRetrieve(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,
            '/smq.SuhaibMessageQueue/BulkRetrieve',
            smq__pb2.BulkRetrieveRequest.SerializeToString,
            smq__pb2.BulkRetrieveResponse.FromString,
            options,
            channel_credentials,
            insecure,
            call_credentials,
            compression,
            wait_for_ready,
            timeout,
            metadata,
            _registered_method=True)
