# 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 processing_pb2 as mtap_dot_api_dot_v1_dot_processing__pb2


class ProcessorStub(object):
    """A processor service is responsible for processing an event, adding results to
    the events service, and then optionally returning a custom result.
    """

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

        Args:
            channel: A grpc.Channel.
        """
        self.Process = channel.unary_unary(
                '/mtap.api.v1.Processor/Process',
                request_serializer=mtap_dot_api_dot_v1_dot_processing__pb2.ProcessRequest.SerializeToString,
                response_deserializer=mtap_dot_api_dot_v1_dot_processing__pb2.ProcessResponse.FromString,
                )
        self.GetInfo = channel.unary_unary(
                '/mtap.api.v1.Processor/GetInfo',
                request_serializer=mtap_dot_api_dot_v1_dot_processing__pb2.GetInfoRequest.SerializeToString,
                response_deserializer=mtap_dot_api_dot_v1_dot_processing__pb2.GetInfoResponse.FromString,
                )
        self.GetStats = channel.unary_unary(
                '/mtap.api.v1.Processor/GetStats',
                request_serializer=mtap_dot_api_dot_v1_dot_processing__pb2.GetStatsRequest.SerializeToString,
                response_deserializer=mtap_dot_api_dot_v1_dot_processing__pb2.GetStatsResponse.FromString,
                )


class ProcessorServicer(object):
    """A processor service is responsible for processing an event, adding results to
    the events service, and then optionally returning a custom result.
    """

    def Process(self, request, context):
        """Processes an event.
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')

    def GetInfo(self, request, context):
        """Gets information about the processor.
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')

    def GetStats(self, request, context):
        """Gets globally-aggregated statistics about the processor.
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')


def add_ProcessorServicer_to_server(servicer, server):
    rpc_method_handlers = {
            'Process': grpc.unary_unary_rpc_method_handler(
                    servicer.Process,
                    request_deserializer=mtap_dot_api_dot_v1_dot_processing__pb2.ProcessRequest.FromString,
                    response_serializer=mtap_dot_api_dot_v1_dot_processing__pb2.ProcessResponse.SerializeToString,
            ),
            'GetInfo': grpc.unary_unary_rpc_method_handler(
                    servicer.GetInfo,
                    request_deserializer=mtap_dot_api_dot_v1_dot_processing__pb2.GetInfoRequest.FromString,
                    response_serializer=mtap_dot_api_dot_v1_dot_processing__pb2.GetInfoResponse.SerializeToString,
            ),
            'GetStats': grpc.unary_unary_rpc_method_handler(
                    servicer.GetStats,
                    request_deserializer=mtap_dot_api_dot_v1_dot_processing__pb2.GetStatsRequest.FromString,
                    response_serializer=mtap_dot_api_dot_v1_dot_processing__pb2.GetStatsResponse.SerializeToString,
            ),
    }
    generic_handler = grpc.method_handlers_generic_handler(
            'mtap.api.v1.Processor', rpc_method_handlers)
    server.add_generic_rpc_handlers((generic_handler,))


 # This class is part of an EXPERIMENTAL API.
class Processor(object):
    """A processor service is responsible for processing an event, adding results to
    the events service, and then optionally returning a custom result.
    """

    @staticmethod
    def Process(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.Processor/Process',
            mtap_dot_api_dot_v1_dot_processing__pb2.ProcessRequest.SerializeToString,
            mtap_dot_api_dot_v1_dot_processing__pb2.ProcessResponse.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)

    @staticmethod
    def GetInfo(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.Processor/GetInfo',
            mtap_dot_api_dot_v1_dot_processing__pb2.GetInfoRequest.SerializeToString,
            mtap_dot_api_dot_v1_dot_processing__pb2.GetInfoResponse.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)

    @staticmethod
    def GetStats(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.Processor/GetStats',
            mtap_dot_api_dot_v1_dot_processing__pb2.GetStatsRequest.SerializeToString,
            mtap_dot_api_dot_v1_dot_processing__pb2.GetStatsResponse.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)
