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

import session_service_pb2 as session__service__pb2


class SessionServiceStub(object):
    """
    The SessionService manages a telerobotic session. In its current implementation
    it manages a single controller connecting to a single robot. In the future, a
    session may additionally include medical devices, user interfaces, and other
    items neccessary to achieve telerobotics. 
    """

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

        Args:
            channel: A grpc.Channel.
        """
        self.Create = channel.unary_unary(
                '/dopltechnologies.protos.SessionService/Create',
                request_serializer=session__service__pb2.CreateSessionRequest.SerializeToString,
                response_deserializer=session__service__pb2.CreateSessionResponse.FromString,
                )
        self.Get = channel.unary_unary(
                '/dopltechnologies.protos.SessionService/Get',
                request_serializer=session__service__pb2.GetSessionRequest.SerializeToString,
                response_deserializer=session__service__pb2.GetSessionResponse.FromString,
                )
        self.List = channel.unary_stream(
                '/dopltechnologies.protos.SessionService/List',
                request_serializer=session__service__pb2.ListSessionsRequest.SerializeToString,
                response_deserializer=session__service__pb2.ListSessionsResponse.FromString,
                )
        self.Delete = channel.unary_unary(
                '/dopltechnologies.protos.SessionService/Delete',
                request_serializer=session__service__pb2.DeleteSessionRequest.SerializeToString,
                response_deserializer=session__service__pb2.DeleteSessionResponse.FromString,
                )
        self.WaitFor = channel.unary_stream(
                '/dopltechnologies.protos.SessionService/WaitFor',
                request_serializer=session__service__pb2.WaitForSessionRequest.SerializeToString,
                response_deserializer=session__service__pb2.WaitForSessionResponse.FromString,
                )
        self.ListWaiting = channel.unary_stream(
                '/dopltechnologies.protos.SessionService/ListWaiting',
                request_serializer=session__service__pb2.ListWaitingSessionRequest.SerializeToString,
                response_deserializer=session__service__pb2.ListWaitingSessionResponse.FromString,
                )
        self.Join = channel.unary_stream(
                '/dopltechnologies.protos.SessionService/Join',
                request_serializer=session__service__pb2.JoinSessionRequest.SerializeToString,
                response_deserializer=session__service__pb2.JoinSessionResponse.FromString,
                )


class SessionServiceServicer(object):
    """
    The SessionService manages a telerobotic session. In its current implementation
    it manages a single controller connecting to a single robot. In the future, a
    session may additionally include medical devices, user interfaces, and other
    items neccessary to achieve telerobotics. 
    """

    def Create(self, request, context):
        """Creates a session, causing each Statusing device to recieve the other
        device's address
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')

    def Get(self, request, context):
        """Get information about a single session
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')

    def List(self, request, context):
        """List sessions
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')

    def Delete(self, request, context):
        """Deletes a session
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')

    def WaitFor(self, request, context):
        """Connects a client waiting for a session
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')

    def ListWaiting(self, request, context):
        """ListWaiting lists waiting clients
        TODO: Rethink design. This seems odd
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')

    def Join(self, request, context):
        """Streams messages between the client and server indicating the session's status
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')


def add_SessionServiceServicer_to_server(servicer, server):
    rpc_method_handlers = {
            'Create': grpc.unary_unary_rpc_method_handler(
                    servicer.Create,
                    request_deserializer=session__service__pb2.CreateSessionRequest.FromString,
                    response_serializer=session__service__pb2.CreateSessionResponse.SerializeToString,
            ),
            'Get': grpc.unary_unary_rpc_method_handler(
                    servicer.Get,
                    request_deserializer=session__service__pb2.GetSessionRequest.FromString,
                    response_serializer=session__service__pb2.GetSessionResponse.SerializeToString,
            ),
            'List': grpc.unary_stream_rpc_method_handler(
                    servicer.List,
                    request_deserializer=session__service__pb2.ListSessionsRequest.FromString,
                    response_serializer=session__service__pb2.ListSessionsResponse.SerializeToString,
            ),
            'Delete': grpc.unary_unary_rpc_method_handler(
                    servicer.Delete,
                    request_deserializer=session__service__pb2.DeleteSessionRequest.FromString,
                    response_serializer=session__service__pb2.DeleteSessionResponse.SerializeToString,
            ),
            'WaitFor': grpc.unary_stream_rpc_method_handler(
                    servicer.WaitFor,
                    request_deserializer=session__service__pb2.WaitForSessionRequest.FromString,
                    response_serializer=session__service__pb2.WaitForSessionResponse.SerializeToString,
            ),
            'ListWaiting': grpc.unary_stream_rpc_method_handler(
                    servicer.ListWaiting,
                    request_deserializer=session__service__pb2.ListWaitingSessionRequest.FromString,
                    response_serializer=session__service__pb2.ListWaitingSessionResponse.SerializeToString,
            ),
            'Join': grpc.unary_stream_rpc_method_handler(
                    servicer.Join,
                    request_deserializer=session__service__pb2.JoinSessionRequest.FromString,
                    response_serializer=session__service__pb2.JoinSessionResponse.SerializeToString,
            ),
    }
    generic_handler = grpc.method_handlers_generic_handler(
            'dopltechnologies.protos.SessionService', rpc_method_handlers)
    server.add_generic_rpc_handlers((generic_handler,))


 # This class is part of an EXPERIMENTAL API.
class SessionService(object):
    """
    The SessionService manages a telerobotic session. In its current implementation
    it manages a single controller connecting to a single robot. In the future, a
    session may additionally include medical devices, user interfaces, and other
    items neccessary to achieve telerobotics. 
    """

    @staticmethod
    def Create(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, '/dopltechnologies.protos.SessionService/Create',
            session__service__pb2.CreateSessionRequest.SerializeToString,
            session__service__pb2.CreateSessionResponse.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)

    @staticmethod
    def Get(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, '/dopltechnologies.protos.SessionService/Get',
            session__service__pb2.GetSessionRequest.SerializeToString,
            session__service__pb2.GetSessionResponse.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)

    @staticmethod
    def List(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, '/dopltechnologies.protos.SessionService/List',
            session__service__pb2.ListSessionsRequest.SerializeToString,
            session__service__pb2.ListSessionsResponse.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)

    @staticmethod
    def Delete(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, '/dopltechnologies.protos.SessionService/Delete',
            session__service__pb2.DeleteSessionRequest.SerializeToString,
            session__service__pb2.DeleteSessionResponse.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)

    @staticmethod
    def WaitFor(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, '/dopltechnologies.protos.SessionService/WaitFor',
            session__service__pb2.WaitForSessionRequest.SerializeToString,
            session__service__pb2.WaitForSessionResponse.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)

    @staticmethod
    def ListWaiting(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, '/dopltechnologies.protos.SessionService/ListWaiting',
            session__service__pb2.ListWaitingSessionRequest.SerializeToString,
            session__service__pb2.ListWaitingSessionResponse.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)

    @staticmethod
    def Join(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, '/dopltechnologies.protos.SessionService/Join',
            session__service__pb2.JoinSessionRequest.SerializeToString,
            session__service__pb2.JoinSessionResponse.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)
