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

import types_pb2 as types__pb2


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

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

        Args:
            channel: A grpc.Channel.
        """
        self.GetMessages = channel.unary_unary(
                '/BlackboardHandler/GetMessages',
                request_serializer=types__pb2.GetMessagesRequest.SerializeToString,
                response_deserializer=types__pb2.MessageStack.FromString,
                )
        self.SendMessage = channel.unary_unary(
                '/BlackboardHandler/SendMessage',
                request_serializer=types__pb2.Message.SerializeToString,
                response_deserializer=types__pb2.Ack.FromString,
                )
        self.OpenMessageStream = channel.stream_stream(
                '/BlackboardHandler/OpenMessageStream',
                request_serializer=types__pb2.Message.SerializeToString,
                response_deserializer=types__pb2.Message.FromString,
                )


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

    def GetMessages(self, request, context):
        """Push/pull API 
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')

    def SendMessage(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 OpenMessageStream(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_BlackboardHandlerServicer_to_server(servicer, server):
    rpc_method_handlers = {
            'GetMessages': grpc.unary_unary_rpc_method_handler(
                    servicer.GetMessages,
                    request_deserializer=types__pb2.GetMessagesRequest.FromString,
                    response_serializer=types__pb2.MessageStack.SerializeToString,
            ),
            'SendMessage': grpc.unary_unary_rpc_method_handler(
                    servicer.SendMessage,
                    request_deserializer=types__pb2.Message.FromString,
                    response_serializer=types__pb2.Ack.SerializeToString,
            ),
            'OpenMessageStream': grpc.stream_stream_rpc_method_handler(
                    servicer.OpenMessageStream,
                    request_deserializer=types__pb2.Message.FromString,
                    response_serializer=types__pb2.Message.SerializeToString,
            ),
    }
    generic_handler = grpc.method_handlers_generic_handler(
            'BlackboardHandler', rpc_method_handlers)
    server.add_generic_rpc_handlers((generic_handler,))


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

    @staticmethod
    def GetMessages(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, '/BlackboardHandler/GetMessages',
            types__pb2.GetMessagesRequest.SerializeToString,
            types__pb2.MessageStack.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)

    @staticmethod
    def SendMessage(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, '/BlackboardHandler/SendMessage',
            types__pb2.Message.SerializeToString,
            types__pb2.Ack.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)

    @staticmethod
    def OpenMessageStream(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, '/BlackboardHandler/OpenMessageStream',
            types__pb2.Message.SerializeToString,
            types__pb2.Message.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)
