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

from . import receiver_pb2 as contracts_dot_rabbitmq_dot_receiver__pb2


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

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

        Args:
            channel: A grpc.Channel.
        """
        self.AcknowledgeMessage = channel.unary_unary(
                '/receiver.Receiver/AcknowledgeMessage',
                request_serializer=contracts_dot_rabbitmq_dot_receiver__pb2.MessageId.SerializeToString,
                response_deserializer=contracts_dot_rabbitmq_dot_receiver__pb2.ActionStatus.FromString,
                )
        self.RejectMessage = channel.unary_unary(
                '/receiver.Receiver/RejectMessage',
                request_serializer=contracts_dot_rabbitmq_dot_receiver__pb2.Reject.SerializeToString,
                response_deserializer=contracts_dot_rabbitmq_dot_receiver__pb2.ActionStatus.FromString,
                )
        self.Receive = channel.unary_stream(
                '/receiver.Receiver/Receive',
                request_serializer=contracts_dot_rabbitmq_dot_receiver__pb2.ReceiverArgs.SerializeToString,
                response_deserializer=contracts_dot_rabbitmq_dot_receiver__pb2.ReceiverResponse.FromString,
                )


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

    def AcknowledgeMessage(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 RejectMessage(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 Receive(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_ReceiverServicer_to_server(servicer, server):
    rpc_method_handlers = {
            'AcknowledgeMessage': grpc.unary_unary_rpc_method_handler(
                    servicer.AcknowledgeMessage,
                    request_deserializer=contracts_dot_rabbitmq_dot_receiver__pb2.MessageId.FromString,
                    response_serializer=contracts_dot_rabbitmq_dot_receiver__pb2.ActionStatus.SerializeToString,
            ),
            'RejectMessage': grpc.unary_unary_rpc_method_handler(
                    servicer.RejectMessage,
                    request_deserializer=contracts_dot_rabbitmq_dot_receiver__pb2.Reject.FromString,
                    response_serializer=contracts_dot_rabbitmq_dot_receiver__pb2.ActionStatus.SerializeToString,
            ),
            'Receive': grpc.unary_stream_rpc_method_handler(
                    servicer.Receive,
                    request_deserializer=contracts_dot_rabbitmq_dot_receiver__pb2.ReceiverArgs.FromString,
                    response_serializer=contracts_dot_rabbitmq_dot_receiver__pb2.ReceiverResponse.SerializeToString,
            ),
    }
    generic_handler = grpc.method_handlers_generic_handler(
            'receiver.Receiver', rpc_method_handlers)
    server.add_generic_rpc_handlers((generic_handler,))


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

    @staticmethod
    def AcknowledgeMessage(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, '/receiver.Receiver/AcknowledgeMessage',
            contracts_dot_rabbitmq_dot_receiver__pb2.MessageId.SerializeToString,
            contracts_dot_rabbitmq_dot_receiver__pb2.ActionStatus.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)

    @staticmethod
    def RejectMessage(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, '/receiver.Receiver/RejectMessage',
            contracts_dot_rabbitmq_dot_receiver__pb2.Reject.SerializeToString,
            contracts_dot_rabbitmq_dot_receiver__pb2.ActionStatus.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)

    @staticmethod
    def Receive(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, '/receiver.Receiver/Receive',
            contracts_dot_rabbitmq_dot_receiver__pb2.ReceiverArgs.SerializeToString,
            contracts_dot_rabbitmq_dot_receiver__pb2.ReceiverResponse.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)
