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

from google.protobuf import empty_pb2 as google_dot_protobuf_dot_empty__pb2
from rx.proto import daemon_pb2 as rx_dot_proto_dot_daemon__pb2
from rx.proto import rx_pb2 as rx_dot_proto_dot_rx__pb2


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

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

        Args:
            channel: A grpc.Channel.
        """
        self.ClosePort = channel.unary_unary(
                '/rx.daemon.PortForwardingService/ClosePort',
                request_serializer=rx_dot_proto_dot_daemon__pb2.OpenPortRequest.SerializeToString,
                response_deserializer=rx_dot_proto_dot_rx__pb2.GenericResponse.FromString,
                )
        self.GetPorts = channel.unary_unary(
                '/rx.daemon.PortForwardingService/GetPorts',
                request_serializer=google_dot_protobuf_dot_empty__pb2.Empty.SerializeToString,
                response_deserializer=rx_dot_proto_dot_daemon__pb2.GetPortsResponse.FromString,
                )
        self.OpenPort = channel.unary_unary(
                '/rx.daemon.PortForwardingService/OpenPort',
                request_serializer=rx_dot_proto_dot_daemon__pb2.OpenPortRequest.SerializeToString,
                response_deserializer=rx_dot_proto_dot_rx__pb2.GenericResponse.FromString,
                )


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

    def ClosePort(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 GetPorts(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 OpenPort(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_PortForwardingServiceServicer_to_server(servicer, server):
    rpc_method_handlers = {
            'ClosePort': grpc.unary_unary_rpc_method_handler(
                    servicer.ClosePort,
                    request_deserializer=rx_dot_proto_dot_daemon__pb2.OpenPortRequest.FromString,
                    response_serializer=rx_dot_proto_dot_rx__pb2.GenericResponse.SerializeToString,
            ),
            'GetPorts': grpc.unary_unary_rpc_method_handler(
                    servicer.GetPorts,
                    request_deserializer=google_dot_protobuf_dot_empty__pb2.Empty.FromString,
                    response_serializer=rx_dot_proto_dot_daemon__pb2.GetPortsResponse.SerializeToString,
            ),
            'OpenPort': grpc.unary_unary_rpc_method_handler(
                    servicer.OpenPort,
                    request_deserializer=rx_dot_proto_dot_daemon__pb2.OpenPortRequest.FromString,
                    response_serializer=rx_dot_proto_dot_rx__pb2.GenericResponse.SerializeToString,
            ),
    }
    generic_handler = grpc.method_handlers_generic_handler(
            'rx.daemon.PortForwardingService', rpc_method_handlers)
    server.add_generic_rpc_handlers((generic_handler,))


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

    @staticmethod
    def ClosePort(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, '/rx.daemon.PortForwardingService/ClosePort',
            rx_dot_proto_dot_daemon__pb2.OpenPortRequest.SerializeToString,
            rx_dot_proto_dot_rx__pb2.GenericResponse.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)

    @staticmethod
    def GetPorts(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, '/rx.daemon.PortForwardingService/GetPorts',
            google_dot_protobuf_dot_empty__pb2.Empty.SerializeToString,
            rx_dot_proto_dot_daemon__pb2.GetPortsResponse.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)

    @staticmethod
    def OpenPort(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, '/rx.daemon.PortForwardingService/OpenPort',
            rx_dot_proto_dot_daemon__pb2.OpenPortRequest.SerializeToString,
            rx_dot_proto_dot_rx__pb2.GenericResponse.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)
