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

from mtap.api.v1 import events_pb2 as mtap_dot_api_dot_v1_dot_events__pb2


class EventsStub(object):
    """The events service, which stores Events (the top level discrete processing
    objects a mapping of strings to Documents and strings to strings metadata),
    Documents (a text string and a mapping of strings to LabelIndices), and
    LabelIndices (collections of objects which mark locations in text having
    some meaning).
    """

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

        Args:
            channel: A grpc.Channel.
        """
        self.GetEventsInstanceId = channel.unary_unary(
                '/mtap.api.v1.Events/GetEventsInstanceId',
                request_serializer=mtap_dot_api_dot_v1_dot_events__pb2.GetEventsInstanceIdRequest.SerializeToString,
                response_deserializer=mtap_dot_api_dot_v1_dot_events__pb2.GetEventsInstanceIdResponse.FromString,
                )
        self.OpenEvent = channel.unary_unary(
                '/mtap.api.v1.Events/OpenEvent',
                request_serializer=mtap_dot_api_dot_v1_dot_events__pb2.OpenEventRequest.SerializeToString,
                response_deserializer=mtap_dot_api_dot_v1_dot_events__pb2.OpenEventResponse.FromString,
                )
        self.CloseEvent = channel.unary_unary(
                '/mtap.api.v1.Events/CloseEvent',
                request_serializer=mtap_dot_api_dot_v1_dot_events__pb2.CloseEventRequest.SerializeToString,
                response_deserializer=mtap_dot_api_dot_v1_dot_events__pb2.CloseEventResponse.FromString,
                )
        self.GetAllMetadata = channel.unary_unary(
                '/mtap.api.v1.Events/GetAllMetadata',
                request_serializer=mtap_dot_api_dot_v1_dot_events__pb2.GetAllMetadataRequest.SerializeToString,
                response_deserializer=mtap_dot_api_dot_v1_dot_events__pb2.GetAllMetadataResponse.FromString,
                )
        self.AddMetadata = channel.unary_unary(
                '/mtap.api.v1.Events/AddMetadata',
                request_serializer=mtap_dot_api_dot_v1_dot_events__pb2.AddMetadataRequest.SerializeToString,
                response_deserializer=mtap_dot_api_dot_v1_dot_events__pb2.AddMetadataResponse.FromString,
                )
        self.AddDocument = channel.unary_unary(
                '/mtap.api.v1.Events/AddDocument',
                request_serializer=mtap_dot_api_dot_v1_dot_events__pb2.AddDocumentRequest.SerializeToString,
                response_deserializer=mtap_dot_api_dot_v1_dot_events__pb2.AddDocumentResponse.FromString,
                )
        self.GetAllDocumentNames = channel.unary_unary(
                '/mtap.api.v1.Events/GetAllDocumentNames',
                request_serializer=mtap_dot_api_dot_v1_dot_events__pb2.GetAllDocumentNamesRequest.SerializeToString,
                response_deserializer=mtap_dot_api_dot_v1_dot_events__pb2.GetAllDocumentNamesResponse.FromString,
                )
        self.GetDocumentText = channel.unary_unary(
                '/mtap.api.v1.Events/GetDocumentText',
                request_serializer=mtap_dot_api_dot_v1_dot_events__pb2.GetDocumentTextRequest.SerializeToString,
                response_deserializer=mtap_dot_api_dot_v1_dot_events__pb2.GetDocumentTextResponse.FromString,
                )
        self.GetLabelIndicesInfo = channel.unary_unary(
                '/mtap.api.v1.Events/GetLabelIndicesInfo',
                request_serializer=mtap_dot_api_dot_v1_dot_events__pb2.GetLabelIndicesInfoRequest.SerializeToString,
                response_deserializer=mtap_dot_api_dot_v1_dot_events__pb2.GetLabelIndicesInfoResponse.FromString,
                )
        self.AddLabels = channel.unary_unary(
                '/mtap.api.v1.Events/AddLabels',
                request_serializer=mtap_dot_api_dot_v1_dot_events__pb2.AddLabelsRequest.SerializeToString,
                response_deserializer=mtap_dot_api_dot_v1_dot_events__pb2.AddLabelsResponse.FromString,
                )
        self.GetLabels = channel.unary_unary(
                '/mtap.api.v1.Events/GetLabels',
                request_serializer=mtap_dot_api_dot_v1_dot_events__pb2.GetLabelsRequest.SerializeToString,
                response_deserializer=mtap_dot_api_dot_v1_dot_events__pb2.GetLabelsResponse.FromString,
                )
        self.GetAllBinaryDataNames = channel.unary_unary(
                '/mtap.api.v1.Events/GetAllBinaryDataNames',
                request_serializer=mtap_dot_api_dot_v1_dot_events__pb2.GetAllBinaryDataNamesRequest.SerializeToString,
                response_deserializer=mtap_dot_api_dot_v1_dot_events__pb2.GetAllBinaryDataNamesResponse.FromString,
                )
        self.AddBinaryData = channel.unary_unary(
                '/mtap.api.v1.Events/AddBinaryData',
                request_serializer=mtap_dot_api_dot_v1_dot_events__pb2.AddBinaryDataRequest.SerializeToString,
                response_deserializer=mtap_dot_api_dot_v1_dot_events__pb2.AddBinaryDataResponse.FromString,
                )
        self.GetBinaryData = channel.unary_unary(
                '/mtap.api.v1.Events/GetBinaryData',
                request_serializer=mtap_dot_api_dot_v1_dot_events__pb2.GetBinaryDataRequest.SerializeToString,
                response_deserializer=mtap_dot_api_dot_v1_dot_events__pb2.GetBinaryDataResponse.FromString,
                )


class EventsServicer(object):
    """The events service, which stores Events (the top level discrete processing
    objects a mapping of strings to Documents and strings to strings metadata),
    Documents (a text string and a mapping of strings to LabelIndices), and
    LabelIndices (collections of objects which mark locations in text having
    some meaning).
    """

    def GetEventsInstanceId(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 OpenEvent(self, request, context):
        """Acquires a lease for an event, which will prevent this service
        from deleting the event while the lease is still valid. Can be used to
        either create new events or return existing events.
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')

    def CloseEvent(self, request, context):
        """Cedes a lease for an event, allowing this service to delete the
        event if no active leases remain.
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')

    def GetAllMetadata(self, request, context):
        """Endpoint to get all metadata associated with an event.
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')

    def AddMetadata(self, request, context):
        """Adds a new metadata entry to an event.
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')

    def AddDocument(self, request, context):
        """Adds a new document to an event.
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')

    def GetAllDocumentNames(self, request, context):
        """Returns the names keys of all documents that are stored on an event.
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')

    def GetDocumentText(self, request, context):
        """Returns the text of a document.
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')

    def GetLabelIndicesInfo(self, request, context):
        """Returns the names keys of all label indices that are stored on a document.
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')

    def AddLabels(self, request, context):
        """Adds a single label index to the document.
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')

    def GetLabels(self, request, context):
        """Gets all of the labels for a single label index.
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')

    def GetAllBinaryDataNames(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 AddBinaryData(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 GetBinaryData(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_EventsServicer_to_server(servicer, server):
    rpc_method_handlers = {
            'GetEventsInstanceId': grpc.unary_unary_rpc_method_handler(
                    servicer.GetEventsInstanceId,
                    request_deserializer=mtap_dot_api_dot_v1_dot_events__pb2.GetEventsInstanceIdRequest.FromString,
                    response_serializer=mtap_dot_api_dot_v1_dot_events__pb2.GetEventsInstanceIdResponse.SerializeToString,
            ),
            'OpenEvent': grpc.unary_unary_rpc_method_handler(
                    servicer.OpenEvent,
                    request_deserializer=mtap_dot_api_dot_v1_dot_events__pb2.OpenEventRequest.FromString,
                    response_serializer=mtap_dot_api_dot_v1_dot_events__pb2.OpenEventResponse.SerializeToString,
            ),
            'CloseEvent': grpc.unary_unary_rpc_method_handler(
                    servicer.CloseEvent,
                    request_deserializer=mtap_dot_api_dot_v1_dot_events__pb2.CloseEventRequest.FromString,
                    response_serializer=mtap_dot_api_dot_v1_dot_events__pb2.CloseEventResponse.SerializeToString,
            ),
            'GetAllMetadata': grpc.unary_unary_rpc_method_handler(
                    servicer.GetAllMetadata,
                    request_deserializer=mtap_dot_api_dot_v1_dot_events__pb2.GetAllMetadataRequest.FromString,
                    response_serializer=mtap_dot_api_dot_v1_dot_events__pb2.GetAllMetadataResponse.SerializeToString,
            ),
            'AddMetadata': grpc.unary_unary_rpc_method_handler(
                    servicer.AddMetadata,
                    request_deserializer=mtap_dot_api_dot_v1_dot_events__pb2.AddMetadataRequest.FromString,
                    response_serializer=mtap_dot_api_dot_v1_dot_events__pb2.AddMetadataResponse.SerializeToString,
            ),
            'AddDocument': grpc.unary_unary_rpc_method_handler(
                    servicer.AddDocument,
                    request_deserializer=mtap_dot_api_dot_v1_dot_events__pb2.AddDocumentRequest.FromString,
                    response_serializer=mtap_dot_api_dot_v1_dot_events__pb2.AddDocumentResponse.SerializeToString,
            ),
            'GetAllDocumentNames': grpc.unary_unary_rpc_method_handler(
                    servicer.GetAllDocumentNames,
                    request_deserializer=mtap_dot_api_dot_v1_dot_events__pb2.GetAllDocumentNamesRequest.FromString,
                    response_serializer=mtap_dot_api_dot_v1_dot_events__pb2.GetAllDocumentNamesResponse.SerializeToString,
            ),
            'GetDocumentText': grpc.unary_unary_rpc_method_handler(
                    servicer.GetDocumentText,
                    request_deserializer=mtap_dot_api_dot_v1_dot_events__pb2.GetDocumentTextRequest.FromString,
                    response_serializer=mtap_dot_api_dot_v1_dot_events__pb2.GetDocumentTextResponse.SerializeToString,
            ),
            'GetLabelIndicesInfo': grpc.unary_unary_rpc_method_handler(
                    servicer.GetLabelIndicesInfo,
                    request_deserializer=mtap_dot_api_dot_v1_dot_events__pb2.GetLabelIndicesInfoRequest.FromString,
                    response_serializer=mtap_dot_api_dot_v1_dot_events__pb2.GetLabelIndicesInfoResponse.SerializeToString,
            ),
            'AddLabels': grpc.unary_unary_rpc_method_handler(
                    servicer.AddLabels,
                    request_deserializer=mtap_dot_api_dot_v1_dot_events__pb2.AddLabelsRequest.FromString,
                    response_serializer=mtap_dot_api_dot_v1_dot_events__pb2.AddLabelsResponse.SerializeToString,
            ),
            'GetLabels': grpc.unary_unary_rpc_method_handler(
                    servicer.GetLabels,
                    request_deserializer=mtap_dot_api_dot_v1_dot_events__pb2.GetLabelsRequest.FromString,
                    response_serializer=mtap_dot_api_dot_v1_dot_events__pb2.GetLabelsResponse.SerializeToString,
            ),
            'GetAllBinaryDataNames': grpc.unary_unary_rpc_method_handler(
                    servicer.GetAllBinaryDataNames,
                    request_deserializer=mtap_dot_api_dot_v1_dot_events__pb2.GetAllBinaryDataNamesRequest.FromString,
                    response_serializer=mtap_dot_api_dot_v1_dot_events__pb2.GetAllBinaryDataNamesResponse.SerializeToString,
            ),
            'AddBinaryData': grpc.unary_unary_rpc_method_handler(
                    servicer.AddBinaryData,
                    request_deserializer=mtap_dot_api_dot_v1_dot_events__pb2.AddBinaryDataRequest.FromString,
                    response_serializer=mtap_dot_api_dot_v1_dot_events__pb2.AddBinaryDataResponse.SerializeToString,
            ),
            'GetBinaryData': grpc.unary_unary_rpc_method_handler(
                    servicer.GetBinaryData,
                    request_deserializer=mtap_dot_api_dot_v1_dot_events__pb2.GetBinaryDataRequest.FromString,
                    response_serializer=mtap_dot_api_dot_v1_dot_events__pb2.GetBinaryDataResponse.SerializeToString,
            ),
    }
    generic_handler = grpc.method_handlers_generic_handler(
            'mtap.api.v1.Events', rpc_method_handlers)
    server.add_generic_rpc_handlers((generic_handler,))


 # This class is part of an EXPERIMENTAL API.
class Events(object):
    """The events service, which stores Events (the top level discrete processing
    objects a mapping of strings to Documents and strings to strings metadata),
    Documents (a text string and a mapping of strings to LabelIndices), and
    LabelIndices (collections of objects which mark locations in text having
    some meaning).
    """

    @staticmethod
    def GetEventsInstanceId(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, '/mtap.api.v1.Events/GetEventsInstanceId',
            mtap_dot_api_dot_v1_dot_events__pb2.GetEventsInstanceIdRequest.SerializeToString,
            mtap_dot_api_dot_v1_dot_events__pb2.GetEventsInstanceIdResponse.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)

    @staticmethod
    def OpenEvent(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, '/mtap.api.v1.Events/OpenEvent',
            mtap_dot_api_dot_v1_dot_events__pb2.OpenEventRequest.SerializeToString,
            mtap_dot_api_dot_v1_dot_events__pb2.OpenEventResponse.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)

    @staticmethod
    def CloseEvent(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, '/mtap.api.v1.Events/CloseEvent',
            mtap_dot_api_dot_v1_dot_events__pb2.CloseEventRequest.SerializeToString,
            mtap_dot_api_dot_v1_dot_events__pb2.CloseEventResponse.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)

    @staticmethod
    def GetAllMetadata(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, '/mtap.api.v1.Events/GetAllMetadata',
            mtap_dot_api_dot_v1_dot_events__pb2.GetAllMetadataRequest.SerializeToString,
            mtap_dot_api_dot_v1_dot_events__pb2.GetAllMetadataResponse.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)

    @staticmethod
    def AddMetadata(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, '/mtap.api.v1.Events/AddMetadata',
            mtap_dot_api_dot_v1_dot_events__pb2.AddMetadataRequest.SerializeToString,
            mtap_dot_api_dot_v1_dot_events__pb2.AddMetadataResponse.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)

    @staticmethod
    def AddDocument(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, '/mtap.api.v1.Events/AddDocument',
            mtap_dot_api_dot_v1_dot_events__pb2.AddDocumentRequest.SerializeToString,
            mtap_dot_api_dot_v1_dot_events__pb2.AddDocumentResponse.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)

    @staticmethod
    def GetAllDocumentNames(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, '/mtap.api.v1.Events/GetAllDocumentNames',
            mtap_dot_api_dot_v1_dot_events__pb2.GetAllDocumentNamesRequest.SerializeToString,
            mtap_dot_api_dot_v1_dot_events__pb2.GetAllDocumentNamesResponse.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)

    @staticmethod
    def GetDocumentText(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, '/mtap.api.v1.Events/GetDocumentText',
            mtap_dot_api_dot_v1_dot_events__pb2.GetDocumentTextRequest.SerializeToString,
            mtap_dot_api_dot_v1_dot_events__pb2.GetDocumentTextResponse.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)

    @staticmethod
    def GetLabelIndicesInfo(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, '/mtap.api.v1.Events/GetLabelIndicesInfo',
            mtap_dot_api_dot_v1_dot_events__pb2.GetLabelIndicesInfoRequest.SerializeToString,
            mtap_dot_api_dot_v1_dot_events__pb2.GetLabelIndicesInfoResponse.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)

    @staticmethod
    def AddLabels(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, '/mtap.api.v1.Events/AddLabels',
            mtap_dot_api_dot_v1_dot_events__pb2.AddLabelsRequest.SerializeToString,
            mtap_dot_api_dot_v1_dot_events__pb2.AddLabelsResponse.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)

    @staticmethod
    def GetLabels(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, '/mtap.api.v1.Events/GetLabels',
            mtap_dot_api_dot_v1_dot_events__pb2.GetLabelsRequest.SerializeToString,
            mtap_dot_api_dot_v1_dot_events__pb2.GetLabelsResponse.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)

    @staticmethod
    def GetAllBinaryDataNames(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, '/mtap.api.v1.Events/GetAllBinaryDataNames',
            mtap_dot_api_dot_v1_dot_events__pb2.GetAllBinaryDataNamesRequest.SerializeToString,
            mtap_dot_api_dot_v1_dot_events__pb2.GetAllBinaryDataNamesResponse.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)

    @staticmethod
    def AddBinaryData(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, '/mtap.api.v1.Events/AddBinaryData',
            mtap_dot_api_dot_v1_dot_events__pb2.AddBinaryDataRequest.SerializeToString,
            mtap_dot_api_dot_v1_dot_events__pb2.AddBinaryDataResponse.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)

    @staticmethod
    def GetBinaryData(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, '/mtap.api.v1.Events/GetBinaryData',
            mtap_dot_api_dot_v1_dot_events__pb2.GetBinaryDataRequest.SerializeToString,
            mtap_dot_api_dot_v1_dot_events__pb2.GetBinaryDataResponse.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)
