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

from avikom.tunnel import client_to_server_pb2 as avikom_dot_tunnel_dot_client__to__server__pb2
from avikom.tunnel import server_to_client_pb2 as avikom_dot_tunnel_dot_server__to__client__pb2


class MessageTunnelServiceStub(object):
    """*
    This services allows clients behind a firewall to offer their services in the AVIKOM network.
    @author Alexander Neumann <alneuman@techfak.uni-bielefeld.de>
    """

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

        Args:
            channel: A grpc.Channel.
        """
        self.RegisterTunneled = channel.stream_stream(
                '/avikom.tunnel.MessageTunnelService/RegisterTunneled',
                request_serializer=avikom_dot_tunnel_dot_client__to__server__pb2.ClientToServer.SerializeToString,
                response_deserializer=avikom_dot_tunnel_dot_server__to__client__pb2.ServerToClient.FromString,
                )


class MessageTunnelServiceServicer(object):
    """*
    This services allows clients behind a firewall to offer their services in the AVIKOM network.
    @author Alexander Neumann <alneuman@techfak.uni-bielefeld.de>
    """

    def RegisterTunneled(self, request_iterator, context):
        """/ Register a peer with a tunneled server connection.
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')


def add_MessageTunnelServiceServicer_to_server(servicer, server):
    rpc_method_handlers = {
            'RegisterTunneled': grpc.stream_stream_rpc_method_handler(
                    servicer.RegisterTunneled,
                    request_deserializer=avikom_dot_tunnel_dot_client__to__server__pb2.ClientToServer.FromString,
                    response_serializer=avikom_dot_tunnel_dot_server__to__client__pb2.ServerToClient.SerializeToString,
            ),
    }
    generic_handler = grpc.method_handlers_generic_handler(
            'avikom.tunnel.MessageTunnelService', rpc_method_handlers)
    server.add_generic_rpc_handlers((generic_handler,))


 # This class is part of an EXPERIMENTAL API.
class MessageTunnelService(object):
    """*
    This services allows clients behind a firewall to offer their services in the AVIKOM network.
    @author Alexander Neumann <alneuman@techfak.uni-bielefeld.de>
    """

    @staticmethod
    def RegisterTunneled(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, '/avikom.tunnel.MessageTunnelService/RegisterTunneled',
            avikom_dot_tunnel_dot_client__to__server__pb2.ClientToServer.SerializeToString,
            avikom_dot_tunnel_dot_server__to__client__pb2.ServerToClient.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)
