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

import ocellus_dataflow_service_pb2 as ocellus__dataflow__service__pb2


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

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

        Args:
            channel: A grpc.Channel.
        """
        self.BindAsync = channel.unary_stream(
                '/ocellus.OcellusDataflowService/BindAsync',
                request_serializer=ocellus__dataflow__service__pb2.BindMessage.SerializeToString,
                response_deserializer=ocellus__dataflow__service__pb2.DataflowStreamingEvent.FromString,
                )
        self.BindSync = channel.stream_stream(
                '/ocellus.OcellusDataflowService/BindSync',
                request_serializer=ocellus__dataflow__service__pb2.BindMessage.SerializeToString,
                response_deserializer=ocellus__dataflow__service__pb2.DataflowStreamingEvent.FromString,
                )


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

    def BindAsync(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 BindSync(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_OcellusDataflowServiceServicer_to_server(servicer, server):
    rpc_method_handlers = {
            'BindAsync': grpc.unary_stream_rpc_method_handler(
                    servicer.BindAsync,
                    request_deserializer=ocellus__dataflow__service__pb2.BindMessage.FromString,
                    response_serializer=ocellus__dataflow__service__pb2.DataflowStreamingEvent.SerializeToString,
            ),
            'BindSync': grpc.stream_stream_rpc_method_handler(
                    servicer.BindSync,
                    request_deserializer=ocellus__dataflow__service__pb2.BindMessage.FromString,
                    response_serializer=ocellus__dataflow__service__pb2.DataflowStreamingEvent.SerializeToString,
            ),
    }
    generic_handler = grpc.method_handlers_generic_handler(
            'ocellus.OcellusDataflowService', rpc_method_handlers)
    server.add_generic_rpc_handlers((generic_handler,))


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

    @staticmethod
    def BindAsync(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, '/ocellus.OcellusDataflowService/BindAsync',
            ocellus__dataflow__service__pb2.BindMessage.SerializeToString,
            ocellus__dataflow__service__pb2.DataflowStreamingEvent.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)

    @staticmethod
    def BindSync(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, '/ocellus.OcellusDataflowService/BindSync',
            ocellus__dataflow__service__pb2.BindMessage.SerializeToString,
            ocellus__dataflow__service__pb2.DataflowStreamingEvent.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)
