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

from . import tunnel_iface_pb2 as grpc__stubs_dot_tunnel__iface__pb2

GRPC_GENERATED_VERSION = '1.65.1'
GRPC_VERSION = grpc.__version__
EXPECTED_ERROR_RELEASE = '1.66.0'
SCHEDULED_RELEASE_DATE = 'August 6, 2024'
_version_not_supported = False

try:
    from grpc._utilities import first_version_is_lower
    _version_not_supported = first_version_is_lower(GRPC_VERSION, GRPC_GENERATED_VERSION)
except ImportError:
    _version_not_supported = True

if _version_not_supported:
    warnings.warn(
        f'The grpc package installed is at version {GRPC_VERSION},'
        + f' but the generated code in grpc_stubs/tunnel_iface_pb2_grpc.py depends on'
        + f' grpcio>={GRPC_GENERATED_VERSION}.'
        + f' Please upgrade your grpc module to grpcio>={GRPC_GENERATED_VERSION}'
        + f' or downgrade your generated code using grpcio-tools<={GRPC_VERSION}.'
        + f' This warning will become an error in {EXPECTED_ERROR_RELEASE},'
        + f' scheduled for release on {SCHEDULED_RELEASE_DATE}.',
        RuntimeWarning
    )


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

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

        Args:
            channel: A grpc.Channel.
        """
        self.TestComms = channel.unary_unary(
                '/tunnel_iface.TunnelInterface/TestComms',
                request_serializer=grpc__stubs_dot_tunnel__iface__pb2.TestCommsRequest.SerializeToString,
                response_deserializer=grpc__stubs_dot_tunnel__iface__pb2.TestCommsResponse.FromString,
                _registered_method=True)
        self.OpenTunnel = channel.unary_unary(
                '/tunnel_iface.TunnelInterface/OpenTunnel',
                request_serializer=grpc__stubs_dot_tunnel__iface__pb2.OpenTunnelRequest.SerializeToString,
                response_deserializer=grpc__stubs_dot_tunnel__iface__pb2.OpenTunnelResponse.FromString,
                _registered_method=True)
        self.CloseTunnel = channel.unary_unary(
                '/tunnel_iface.TunnelInterface/CloseTunnel',
                request_serializer=grpc__stubs_dot_tunnel__iface__pb2.CloseTunnelRequest.SerializeToString,
                response_deserializer=grpc__stubs_dot_tunnel__iface__pb2.CloseTunnelResponse.FromString,
                _registered_method=True)
        self.CloseAllTunnels = channel.unary_unary(
                '/tunnel_iface.TunnelInterface/CloseAllTunnels',
                request_serializer=grpc__stubs_dot_tunnel__iface__pb2.CloseAllTunnelsRequest.SerializeToString,
                response_deserializer=grpc__stubs_dot_tunnel__iface__pb2.CloseAllTunnelsResponse.FromString,
                _registered_method=True)
        self.GetTunnel = channel.unary_unary(
                '/tunnel_iface.TunnelInterface/GetTunnel',
                request_serializer=grpc__stubs_dot_tunnel__iface__pb2.GetTunnelRequest.SerializeToString,
                response_deserializer=grpc__stubs_dot_tunnel__iface__pb2.GetTunnelResponse.FromString,
                _registered_method=True)
        self.SyncTunnels = channel.unary_unary(
                '/tunnel_iface.TunnelInterface/SyncTunnels',
                request_serializer=grpc__stubs_dot_tunnel__iface__pb2.SyncTunnelsRequest.SerializeToString,
                response_deserializer=grpc__stubs_dot_tunnel__iface__pb2.SyncTunnelsResponse.FromString,
                _registered_method=True)
        self.ListTunnels = channel.unary_unary(
                '/tunnel_iface.TunnelInterface/ListTunnels',
                request_serializer=grpc__stubs_dot_tunnel__iface__pb2.ListTunnelsRequest.SerializeToString,
                response_deserializer=grpc__stubs_dot_tunnel__iface__pb2.ListTunnelsResponse.FromString,
                _registered_method=True)


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

    def TestComms(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 OpenTunnel(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 CloseTunnel(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 CloseAllTunnels(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 GetTunnel(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 SyncTunnels(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 ListTunnels(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_TunnelInterfaceServicer_to_server(servicer, server):
    rpc_method_handlers = {
            'TestComms': grpc.unary_unary_rpc_method_handler(
                    servicer.TestComms,
                    request_deserializer=grpc__stubs_dot_tunnel__iface__pb2.TestCommsRequest.FromString,
                    response_serializer=grpc__stubs_dot_tunnel__iface__pb2.TestCommsResponse.SerializeToString,
            ),
            'OpenTunnel': grpc.unary_unary_rpc_method_handler(
                    servicer.OpenTunnel,
                    request_deserializer=grpc__stubs_dot_tunnel__iface__pb2.OpenTunnelRequest.FromString,
                    response_serializer=grpc__stubs_dot_tunnel__iface__pb2.OpenTunnelResponse.SerializeToString,
            ),
            'CloseTunnel': grpc.unary_unary_rpc_method_handler(
                    servicer.CloseTunnel,
                    request_deserializer=grpc__stubs_dot_tunnel__iface__pb2.CloseTunnelRequest.FromString,
                    response_serializer=grpc__stubs_dot_tunnel__iface__pb2.CloseTunnelResponse.SerializeToString,
            ),
            'CloseAllTunnels': grpc.unary_unary_rpc_method_handler(
                    servicer.CloseAllTunnels,
                    request_deserializer=grpc__stubs_dot_tunnel__iface__pb2.CloseAllTunnelsRequest.FromString,
                    response_serializer=grpc__stubs_dot_tunnel__iface__pb2.CloseAllTunnelsResponse.SerializeToString,
            ),
            'GetTunnel': grpc.unary_unary_rpc_method_handler(
                    servicer.GetTunnel,
                    request_deserializer=grpc__stubs_dot_tunnel__iface__pb2.GetTunnelRequest.FromString,
                    response_serializer=grpc__stubs_dot_tunnel__iface__pb2.GetTunnelResponse.SerializeToString,
            ),
            'SyncTunnels': grpc.unary_unary_rpc_method_handler(
                    servicer.SyncTunnels,
                    request_deserializer=grpc__stubs_dot_tunnel__iface__pb2.SyncTunnelsRequest.FromString,
                    response_serializer=grpc__stubs_dot_tunnel__iface__pb2.SyncTunnelsResponse.SerializeToString,
            ),
            'ListTunnels': grpc.unary_unary_rpc_method_handler(
                    servicer.ListTunnels,
                    request_deserializer=grpc__stubs_dot_tunnel__iface__pb2.ListTunnelsRequest.FromString,
                    response_serializer=grpc__stubs_dot_tunnel__iface__pb2.ListTunnelsResponse.SerializeToString,
            ),
    }
    generic_handler = grpc.method_handlers_generic_handler(
            'tunnel_iface.TunnelInterface', rpc_method_handlers)
    server.add_generic_rpc_handlers((generic_handler,))
    server.add_registered_method_handlers('tunnel_iface.TunnelInterface', rpc_method_handlers)


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

    @staticmethod
    def TestComms(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,
            '/tunnel_iface.TunnelInterface/TestComms',
            grpc__stubs_dot_tunnel__iface__pb2.TestCommsRequest.SerializeToString,
            grpc__stubs_dot_tunnel__iface__pb2.TestCommsResponse.FromString,
            options,
            channel_credentials,
            insecure,
            call_credentials,
            compression,
            wait_for_ready,
            timeout,
            metadata,
            _registered_method=True)

    @staticmethod
    def OpenTunnel(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,
            '/tunnel_iface.TunnelInterface/OpenTunnel',
            grpc__stubs_dot_tunnel__iface__pb2.OpenTunnelRequest.SerializeToString,
            grpc__stubs_dot_tunnel__iface__pb2.OpenTunnelResponse.FromString,
            options,
            channel_credentials,
            insecure,
            call_credentials,
            compression,
            wait_for_ready,
            timeout,
            metadata,
            _registered_method=True)

    @staticmethod
    def CloseTunnel(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,
            '/tunnel_iface.TunnelInterface/CloseTunnel',
            grpc__stubs_dot_tunnel__iface__pb2.CloseTunnelRequest.SerializeToString,
            grpc__stubs_dot_tunnel__iface__pb2.CloseTunnelResponse.FromString,
            options,
            channel_credentials,
            insecure,
            call_credentials,
            compression,
            wait_for_ready,
            timeout,
            metadata,
            _registered_method=True)

    @staticmethod
    def CloseAllTunnels(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,
            '/tunnel_iface.TunnelInterface/CloseAllTunnels',
            grpc__stubs_dot_tunnel__iface__pb2.CloseAllTunnelsRequest.SerializeToString,
            grpc__stubs_dot_tunnel__iface__pb2.CloseAllTunnelsResponse.FromString,
            options,
            channel_credentials,
            insecure,
            call_credentials,
            compression,
            wait_for_ready,
            timeout,
            metadata,
            _registered_method=True)

    @staticmethod
    def GetTunnel(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,
            '/tunnel_iface.TunnelInterface/GetTunnel',
            grpc__stubs_dot_tunnel__iface__pb2.GetTunnelRequest.SerializeToString,
            grpc__stubs_dot_tunnel__iface__pb2.GetTunnelResponse.FromString,
            options,
            channel_credentials,
            insecure,
            call_credentials,
            compression,
            wait_for_ready,
            timeout,
            metadata,
            _registered_method=True)

    @staticmethod
    def SyncTunnels(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,
            '/tunnel_iface.TunnelInterface/SyncTunnels',
            grpc__stubs_dot_tunnel__iface__pb2.SyncTunnelsRequest.SerializeToString,
            grpc__stubs_dot_tunnel__iface__pb2.SyncTunnelsResponse.FromString,
            options,
            channel_credentials,
            insecure,
            call_credentials,
            compression,
            wait_for_ready,
            timeout,
            metadata,
            _registered_method=True)

    @staticmethod
    def ListTunnels(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,
            '/tunnel_iface.TunnelInterface/ListTunnels',
            grpc__stubs_dot_tunnel__iface__pb2.ListTunnelsRequest.SerializeToString,
            grpc__stubs_dot_tunnel__iface__pb2.ListTunnelsResponse.FromString,
            options,
            channel_credentials,
            insecure,
            call_credentials,
            compression,
            wait_for_ready,
            timeout,
            metadata,
            _registered_method=True)
