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

from avikom.generic import result_pb2 as avikom_dot_generic_dot_result__pb2
from avikom.unity import scene_config_pb2 as avikom_dot_unity_dot_scene__config__pb2
from avikom.unity import scene_config_storage_service_pb2 as avikom_dot_unity_dot_scene__config__storage__service__pb2
from avikom.unity import task_config_pb2 as avikom_dot_unity_dot_task__config__pb2


class SceneConfigStorageServiceStub(object):
    """*
    This services provides and receives scene configurations and task-specific configurations.
    Scene and task configurations 'stack' and must not ne contradicting.
    There is always just one config for a scene and a task.
    @author: Alexander Neumann <alneuman@techfak.uni-bielefeld.de>
    """

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

        Args:
            channel: A grpc.Channel.
        """
        self.AddSceneConfig = channel.unary_unary(
                '/avikom.unity.SceneConfigStorageService/AddSceneConfig',
                request_serializer=avikom_dot_unity_dot_scene__config__pb2.SceneConfig.SerializeToString,
                response_deserializer=avikom_dot_generic_dot_result__pb2.Result.FromString,
                )
        self.GetSceneConfig = channel.unary_unary(
                '/avikom.unity.SceneConfigStorageService/GetSceneConfig',
                request_serializer=avikom_dot_unity_dot_scene__config__storage__service__pb2.SceneConfigQuery.SerializeToString,
                response_deserializer=avikom_dot_unity_dot_scene__config__pb2.SceneConfig.FromString,
                )
        self.UpdateSceneConfig = channel.unary_unary(
                '/avikom.unity.SceneConfigStorageService/UpdateSceneConfig',
                request_serializer=avikom_dot_unity_dot_scene__config__pb2.SceneConfig.SerializeToString,
                response_deserializer=avikom_dot_generic_dot_result__pb2.Result.FromString,
                )
        self.AddTaskConfig = channel.unary_unary(
                '/avikom.unity.SceneConfigStorageService/AddTaskConfig',
                request_serializer=avikom_dot_unity_dot_task__config__pb2.TaskConfig.SerializeToString,
                response_deserializer=avikom_dot_generic_dot_result__pb2.Result.FromString,
                )
        self.GetTaskConfig = channel.unary_unary(
                '/avikom.unity.SceneConfigStorageService/GetTaskConfig',
                request_serializer=avikom_dot_unity_dot_scene__config__storage__service__pb2.TaskConfigQuery.SerializeToString,
                response_deserializer=avikom_dot_unity_dot_task__config__pb2.TaskConfig.FromString,
                )
        self.UpdateTaskConfig = channel.unary_unary(
                '/avikom.unity.SceneConfigStorageService/UpdateTaskConfig',
                request_serializer=avikom_dot_unity_dot_task__config__pb2.TaskConfig.SerializeToString,
                response_deserializer=avikom_dot_generic_dot_result__pb2.Result.FromString,
                )


class SceneConfigStorageServiceServicer(object):
    """*
    This services provides and receives scene configurations and task-specific configurations.
    Scene and task configurations 'stack' and must not ne contradicting.
    There is always just one config for a scene and a task.
    @author: Alexander Neumann <alneuman@techfak.uni-bielefeld.de>
    """

    def AddSceneConfig(self, request, context):
        """/ adds a scene configuration for an EXISTING scene to the storage; raises exceptions when the scene config already exists
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')

    def GetSceneConfig(self, request, context):
        """/ returns a scene configuration to a given `scene_name`
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')

    def UpdateSceneConfig(self, request, context):
        """/ updates an existing scene configuration; raises an exception if it does not exist
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')

    def AddTaskConfig(self, request, context):
        """/ adds a task configuration for an EXISTING task to the storage; raises exceptions when the task config already exists
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')

    def GetTaskConfig(self, request, context):
        """/ returns a task configuration to a given `task_name`
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')

    def UpdateTaskConfig(self, request, context):
        """/ updates an existing task configuration; raises an exception if it does not exist
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')


def add_SceneConfigStorageServiceServicer_to_server(servicer, server):
    rpc_method_handlers = {
            'AddSceneConfig': grpc.unary_unary_rpc_method_handler(
                    servicer.AddSceneConfig,
                    request_deserializer=avikom_dot_unity_dot_scene__config__pb2.SceneConfig.FromString,
                    response_serializer=avikom_dot_generic_dot_result__pb2.Result.SerializeToString,
            ),
            'GetSceneConfig': grpc.unary_unary_rpc_method_handler(
                    servicer.GetSceneConfig,
                    request_deserializer=avikom_dot_unity_dot_scene__config__storage__service__pb2.SceneConfigQuery.FromString,
                    response_serializer=avikom_dot_unity_dot_scene__config__pb2.SceneConfig.SerializeToString,
            ),
            'UpdateSceneConfig': grpc.unary_unary_rpc_method_handler(
                    servicer.UpdateSceneConfig,
                    request_deserializer=avikom_dot_unity_dot_scene__config__pb2.SceneConfig.FromString,
                    response_serializer=avikom_dot_generic_dot_result__pb2.Result.SerializeToString,
            ),
            'AddTaskConfig': grpc.unary_unary_rpc_method_handler(
                    servicer.AddTaskConfig,
                    request_deserializer=avikom_dot_unity_dot_task__config__pb2.TaskConfig.FromString,
                    response_serializer=avikom_dot_generic_dot_result__pb2.Result.SerializeToString,
            ),
            'GetTaskConfig': grpc.unary_unary_rpc_method_handler(
                    servicer.GetTaskConfig,
                    request_deserializer=avikom_dot_unity_dot_scene__config__storage__service__pb2.TaskConfigQuery.FromString,
                    response_serializer=avikom_dot_unity_dot_task__config__pb2.TaskConfig.SerializeToString,
            ),
            'UpdateTaskConfig': grpc.unary_unary_rpc_method_handler(
                    servicer.UpdateTaskConfig,
                    request_deserializer=avikom_dot_unity_dot_task__config__pb2.TaskConfig.FromString,
                    response_serializer=avikom_dot_generic_dot_result__pb2.Result.SerializeToString,
            ),
    }
    generic_handler = grpc.method_handlers_generic_handler(
            'avikom.unity.SceneConfigStorageService', rpc_method_handlers)
    server.add_generic_rpc_handlers((generic_handler,))


 # This class is part of an EXPERIMENTAL API.
class SceneConfigStorageService(object):
    """*
    This services provides and receives scene configurations and task-specific configurations.
    Scene and task configurations 'stack' and must not ne contradicting.
    There is always just one config for a scene and a task.
    @author: Alexander Neumann <alneuman@techfak.uni-bielefeld.de>
    """

    @staticmethod
    def AddSceneConfig(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.unity.SceneConfigStorageService/AddSceneConfig',
            avikom_dot_unity_dot_scene__config__pb2.SceneConfig.SerializeToString,
            avikom_dot_generic_dot_result__pb2.Result.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)

    @staticmethod
    def GetSceneConfig(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.unity.SceneConfigStorageService/GetSceneConfig',
            avikom_dot_unity_dot_scene__config__storage__service__pb2.SceneConfigQuery.SerializeToString,
            avikom_dot_unity_dot_scene__config__pb2.SceneConfig.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)

    @staticmethod
    def UpdateSceneConfig(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.unity.SceneConfigStorageService/UpdateSceneConfig',
            avikom_dot_unity_dot_scene__config__pb2.SceneConfig.SerializeToString,
            avikom_dot_generic_dot_result__pb2.Result.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)

    @staticmethod
    def AddTaskConfig(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.unity.SceneConfigStorageService/AddTaskConfig',
            avikom_dot_unity_dot_task__config__pb2.TaskConfig.SerializeToString,
            avikom_dot_generic_dot_result__pb2.Result.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)

    @staticmethod
    def GetTaskConfig(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.unity.SceneConfigStorageService/GetTaskConfig',
            avikom_dot_unity_dot_scene__config__storage__service__pb2.TaskConfigQuery.SerializeToString,
            avikom_dot_unity_dot_task__config__pb2.TaskConfig.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)

    @staticmethod
    def UpdateTaskConfig(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.unity.SceneConfigStorageService/UpdateTaskConfig',
            avikom_dot_unity_dot_task__config__pb2.TaskConfig.SerializeToString,
            avikom_dot_generic_dot_result__pb2.Result.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)
