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

from avikom.assistance import scene_pb2 as avikom_dot_assistance_dot_scene__pb2
from avikom.assistance import task_pb2 as avikom_dot_assistance_dot_task__pb2
from avikom.generic import result_pb2 as avikom_dot_generic_dot_result__pb2
from google.protobuf import empty_pb2 as google_dot_protobuf_dot_empty__pb2


class SceneConsumerServiceStub(object):
    """*
    A scene consumer gets a copy of the currently set scene. It's also possible
    to only update the task of the current scene to enable 'side-tracking' when
    necessary.
    @author Alexander Neumann <alneuman@techfak.uni-bielefeld.de>
    """

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

        Args:
            channel: A grpc.Channel.
        """
        self.SetScene = channel.unary_unary(
                '/avikom.assistance.SceneConsumerService/SetScene',
                request_serializer=avikom_dot_assistance_dot_scene__pb2.Scene.SerializeToString,
                response_deserializer=avikom_dot_generic_dot_result__pb2.Result.FromString,
                )
        self.GetScene = channel.unary_unary(
                '/avikom.assistance.SceneConsumerService/GetScene',
                request_serializer=google_dot_protobuf_dot_empty__pb2.Empty.SerializeToString,
                response_deserializer=avikom_dot_assistance_dot_scene__pb2.Scene.FromString,
                )
        self.SetTask = channel.unary_unary(
                '/avikom.assistance.SceneConsumerService/SetTask',
                request_serializer=avikom_dot_assistance_dot_task__pb2.Task.SerializeToString,
                response_deserializer=avikom_dot_generic_dot_result__pb2.Result.FromString,
                )


class SceneConsumerServiceServicer(object):
    """*
    A scene consumer gets a copy of the currently set scene. It's also possible
    to only update the task of the current scene to enable 'side-tracking' when
    necessary.
    @author Alexander Neumann <alneuman@techfak.uni-bielefeld.de>
    """

    def SetScene(self, request, context):
        """/ Sets the context of the task to be conducted. May or may not be considered by the consumer.
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')

    def GetScene(self, request, context):
        """/ Returns the currently set scene.
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')

    def SetTask(self, request, context):
        """/ Sets the task that is currently conducted. May or may not be considered by the consumer.
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')


def add_SceneConsumerServiceServicer_to_server(servicer, server):
    rpc_method_handlers = {
            'SetScene': grpc.unary_unary_rpc_method_handler(
                    servicer.SetScene,
                    request_deserializer=avikom_dot_assistance_dot_scene__pb2.Scene.FromString,
                    response_serializer=avikom_dot_generic_dot_result__pb2.Result.SerializeToString,
            ),
            'GetScene': grpc.unary_unary_rpc_method_handler(
                    servicer.GetScene,
                    request_deserializer=google_dot_protobuf_dot_empty__pb2.Empty.FromString,
                    response_serializer=avikom_dot_assistance_dot_scene__pb2.Scene.SerializeToString,
            ),
            'SetTask': grpc.unary_unary_rpc_method_handler(
                    servicer.SetTask,
                    request_deserializer=avikom_dot_assistance_dot_task__pb2.Task.FromString,
                    response_serializer=avikom_dot_generic_dot_result__pb2.Result.SerializeToString,
            ),
    }
    generic_handler = grpc.method_handlers_generic_handler(
            'avikom.assistance.SceneConsumerService', rpc_method_handlers)
    server.add_generic_rpc_handlers((generic_handler,))


 # This class is part of an EXPERIMENTAL API.
class SceneConsumerService(object):
    """*
    A scene consumer gets a copy of the currently set scene. It's also possible
    to only update the task of the current scene to enable 'side-tracking' when
    necessary.
    @author Alexander Neumann <alneuman@techfak.uni-bielefeld.de>
    """

    @staticmethod
    def SetScene(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.assistance.SceneConsumerService/SetScene',
            avikom_dot_assistance_dot_scene__pb2.Scene.SerializeToString,
            avikom_dot_generic_dot_result__pb2.Result.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)

    @staticmethod
    def GetScene(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.assistance.SceneConsumerService/GetScene',
            google_dot_protobuf_dot_empty__pb2.Empty.SerializeToString,
            avikom_dot_assistance_dot_scene__pb2.Scene.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)

    @staticmethod
    def SetTask(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.assistance.SceneConsumerService/SetTask',
            avikom_dot_assistance_dot_task__pb2.Task.SerializeToString,
            avikom_dot_generic_dot_result__pb2.Result.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)
