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

from grebble_flow.transport.generated.sdk.v1 import processor_pb2 as grebble__flow_dot_transport_dot_generated_dot_sdk_dot_v1_dot_processor__pb2


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

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

        Args:
            channel: A grpc.Channel.
        """
        self.InitProcessors = channel.unary_unary(
                '/grebbleFlow.sdk.v1.ProcessorService/InitProcessors',
                request_serializer=grebble__flow_dot_transport_dot_generated_dot_sdk_dot_v1_dot_processor__pb2.InitProcessorsReq.SerializeToString,
                response_deserializer=grebble__flow_dot_transport_dot_generated_dot_sdk_dot_v1_dot_processor__pb2.InitProcessorsRes.FromString,
                )
        self.OnTrigger = channel.unary_stream(
                '/grebbleFlow.sdk.v1.ProcessorService/OnTrigger',
                request_serializer=grebble__flow_dot_transport_dot_generated_dot_sdk_dot_v1_dot_processor__pb2.OnTriggerReq.SerializeToString,
                response_deserializer=grebble__flow_dot_transport_dot_generated_dot_sdk_dot_v1_dot_processor__pb2.OnTriggerRes.FromString,
                )


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

    def InitProcessors(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 OnTrigger(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_ProcessorServiceServicer_to_server(servicer, server):
    rpc_method_handlers = {
            'InitProcessors': grpc.unary_unary_rpc_method_handler(
                    servicer.InitProcessors,
                    request_deserializer=grebble__flow_dot_transport_dot_generated_dot_sdk_dot_v1_dot_processor__pb2.InitProcessorsReq.FromString,
                    response_serializer=grebble__flow_dot_transport_dot_generated_dot_sdk_dot_v1_dot_processor__pb2.InitProcessorsRes.SerializeToString,
            ),
            'OnTrigger': grpc.unary_stream_rpc_method_handler(
                    servicer.OnTrigger,
                    request_deserializer=grebble__flow_dot_transport_dot_generated_dot_sdk_dot_v1_dot_processor__pb2.OnTriggerReq.FromString,
                    response_serializer=grebble__flow_dot_transport_dot_generated_dot_sdk_dot_v1_dot_processor__pb2.OnTriggerRes.SerializeToString,
            ),
    }
    generic_handler = grpc.method_handlers_generic_handler(
            'grebbleFlow.sdk.v1.ProcessorService', rpc_method_handlers)
    server.add_generic_rpc_handlers((generic_handler,))


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

    @staticmethod
    def InitProcessors(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, '/grebbleFlow.sdk.v1.ProcessorService/InitProcessors',
            grebble__flow_dot_transport_dot_generated_dot_sdk_dot_v1_dot_processor__pb2.InitProcessorsReq.SerializeToString,
            grebble__flow_dot_transport_dot_generated_dot_sdk_dot_v1_dot_processor__pb2.InitProcessorsRes.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)

    @staticmethod
    def OnTrigger(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, '/grebbleFlow.sdk.v1.ProcessorService/OnTrigger',
            grebble__flow_dot_transport_dot_generated_dot_sdk_dot_v1_dot_processor__pb2.OnTriggerReq.SerializeToString,
            grebble__flow_dot_transport_dot_generated_dot_sdk_dot_v1_dot_processor__pb2.OnTriggerRes.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)
