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

from avikom.generic import peer_pb2 as avikom_dot_generic_dot_peer__pb2
from avikom.generic import stream_request_pb2 as avikom_dot_generic_dot_stream__request__pb2
from google.protobuf import empty_pb2 as google_dot_protobuf_dot_empty__pb2


class StreamRequestServiceStub(object):
    """*

    @author Alexander Neumann <alneuman@techfak.uni-bielefeld.de>
    """

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

        Args:
            channel: A grpc.Channel.
        """
        self.InitStream = channel.unary_unary(
                '/avikom.generic.StreamRequestService/InitStream',
                request_serializer=avikom_dot_generic_dot_stream__request__pb2.StreamRequest.SerializeToString,
                response_deserializer=avikom_dot_generic_dot_peer__pb2.Peer.FromString,
                )
        self.CloseStream = channel.unary_unary(
                '/avikom.generic.StreamRequestService/CloseStream',
                request_serializer=avikom_dot_generic_dot_stream__request__pb2.StreamRequest.SerializeToString,
                response_deserializer=google_dot_protobuf_dot_empty__pb2.Empty.FromString,
                )


class StreamRequestServiceServicer(object):
    """*

    @author Alexander Neumann <alneuman@techfak.uni-bielefeld.de>
    """

    def InitStream(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 CloseStream(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_StreamRequestServiceServicer_to_server(servicer, server):
    rpc_method_handlers = {
            'InitStream': grpc.unary_unary_rpc_method_handler(
                    servicer.InitStream,
                    request_deserializer=avikom_dot_generic_dot_stream__request__pb2.StreamRequest.FromString,
                    response_serializer=avikom_dot_generic_dot_peer__pb2.Peer.SerializeToString,
            ),
            'CloseStream': grpc.unary_unary_rpc_method_handler(
                    servicer.CloseStream,
                    request_deserializer=avikom_dot_generic_dot_stream__request__pb2.StreamRequest.FromString,
                    response_serializer=google_dot_protobuf_dot_empty__pb2.Empty.SerializeToString,
            ),
    }
    generic_handler = grpc.method_handlers_generic_handler(
            'avikom.generic.StreamRequestService', rpc_method_handlers)
    server.add_generic_rpc_handlers((generic_handler,))


 # This class is part of an EXPERIMENTAL API.
class StreamRequestService(object):
    """*

    @author Alexander Neumann <alneuman@techfak.uni-bielefeld.de>
    """

    @staticmethod
    def InitStream(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, '/avikom.generic.StreamRequestService/InitStream',
            avikom_dot_generic_dot_stream__request__pb2.StreamRequest.SerializeToString,
            avikom_dot_generic_dot_peer__pb2.Peer.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)

    @staticmethod
    def CloseStream(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, '/avikom.generic.StreamRequestService/CloseStream',
            avikom_dot_generic_dot_stream__request__pb2.StreamRequest.SerializeToString,
            google_dot_protobuf_dot_empty__pb2.Empty.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)
