# 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 asset_bundle_pb2 as avikom_dot_unity_dot_asset__bundle__pb2
from avikom.unity import game_object_pb2 as avikom_dot_unity_dot_game__object__pb2
from avikom.unity import game_object_service_pb2 as avikom_dot_unity_dot_game__object__service__pb2


class GameObjectServiceStub(object):
    """*
    Provides an interface to add virtual objects to the current scene.
    @author: Alexander Neumann <alneuman@techfak.uni-bielefeld.de>
    """

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

        Args:
            channel: A grpc.Channel.
        """
        self.Add = channel.unary_unary(
                '/avikom.unity.GameObjectService/Add',
                request_serializer=avikom_dot_unity_dot_game__object__pb2.GameObject.SerializeToString,
                response_deserializer=avikom_dot_generic_dot_result__pb2.Result.FromString,
                )
        self.Set = channel.unary_unary(
                '/avikom.unity.GameObjectService/Set',
                request_serializer=avikom_dot_unity_dot_game__object__pb2.GameObject.SerializeToString,
                response_deserializer=avikom_dot_generic_dot_result__pb2.Result.FromString,
                )
        self.Get = channel.unary_unary(
                '/avikom.unity.GameObjectService/Get',
                request_serializer=avikom_dot_unity_dot_game__object__service__pb2.GameObjectQuery.SerializeToString,
                response_deserializer=avikom_dot_unity_dot_game__object__pb2.GameObject.FromString,
                )
        self.AddBundle = channel.stream_unary(
                '/avikom.unity.GameObjectService/AddBundle',
                request_serializer=avikom_dot_unity_dot_asset__bundle__pb2.AssetBundle.SerializeToString,
                response_deserializer=avikom_dot_generic_dot_result__pb2.Result.FromString,
                )


class GameObjectServiceServicer(object):
    """*
    Provides an interface to add virtual objects to the current scene.
    @author: Alexander Neumann <alneuman@techfak.uni-bielefeld.de>
    """

    def Add(self, request, context):
        """/ adds an object to the scene
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')

    def Set(self, request, context):
        """/ updates properties if a previously added object
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')

    def Get(self, request, context):
        """/ returns current properties of a scene object
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')

    def AddBundle(self, request_iterator, context):
        """/ uploads a bundle of assets that can be used for the creation of new objects
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')


def add_GameObjectServiceServicer_to_server(servicer, server):
    rpc_method_handlers = {
            'Add': grpc.unary_unary_rpc_method_handler(
                    servicer.Add,
                    request_deserializer=avikom_dot_unity_dot_game__object__pb2.GameObject.FromString,
                    response_serializer=avikom_dot_generic_dot_result__pb2.Result.SerializeToString,
            ),
            'Set': grpc.unary_unary_rpc_method_handler(
                    servicer.Set,
                    request_deserializer=avikom_dot_unity_dot_game__object__pb2.GameObject.FromString,
                    response_serializer=avikom_dot_generic_dot_result__pb2.Result.SerializeToString,
            ),
            'Get': grpc.unary_unary_rpc_method_handler(
                    servicer.Get,
                    request_deserializer=avikom_dot_unity_dot_game__object__service__pb2.GameObjectQuery.FromString,
                    response_serializer=avikom_dot_unity_dot_game__object__pb2.GameObject.SerializeToString,
            ),
            'AddBundle': grpc.stream_unary_rpc_method_handler(
                    servicer.AddBundle,
                    request_deserializer=avikom_dot_unity_dot_asset__bundle__pb2.AssetBundle.FromString,
                    response_serializer=avikom_dot_generic_dot_result__pb2.Result.SerializeToString,
            ),
    }
    generic_handler = grpc.method_handlers_generic_handler(
            'avikom.unity.GameObjectService', rpc_method_handlers)
    server.add_generic_rpc_handlers((generic_handler,))


 # This class is part of an EXPERIMENTAL API.
class GameObjectService(object):
    """*
    Provides an interface to add virtual objects to the current scene.
    @author: Alexander Neumann <alneuman@techfak.uni-bielefeld.de>
    """

    @staticmethod
    def Add(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.GameObjectService/Add',
            avikom_dot_unity_dot_game__object__pb2.GameObject.SerializeToString,
            avikom_dot_generic_dot_result__pb2.Result.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)

    @staticmethod
    def Set(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.GameObjectService/Set',
            avikom_dot_unity_dot_game__object__pb2.GameObject.SerializeToString,
            avikom_dot_generic_dot_result__pb2.Result.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, '/avikom.unity.GameObjectService/Get',
            avikom_dot_unity_dot_game__object__service__pb2.GameObjectQuery.SerializeToString,
            avikom_dot_unity_dot_game__object__pb2.GameObject.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)

    @staticmethod
    def AddBundle(request_iterator,
            target,
            options=(),
            channel_credentials=None,
            call_credentials=None,
            insecure=False,
            compression=None,
            wait_for_ready=None,
            timeout=None,
            metadata=None):
        return grpc.experimental.stream_unary(request_iterator, target, '/avikom.unity.GameObjectService/AddBundle',
            avikom_dot_unity_dot_asset__bundle__pb2.AssetBundle.SerializeToString,
            avikom_dot_generic_dot_result__pb2.Result.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)
