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

from avikom.math import vector3d_pb2 as avikom_dot_math_dot_vector3d__pb2
from avikom.tracking import location_service_pb2 as avikom_dot_tracking_dot_location__service__pb2


class LocationServiceStub(object):
    """*
    This services provides the scene location of an object either absolute to the scene's origin or relative to another entity (e.g. the user).
    @author: Alexander Neumann <alneuman@techfak.uni-bielefeld.de>
    """

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

        Args:
            channel: A grpc.Channel.
        """
        self.GetScenePosition = channel.unary_stream(
                '/avikom.tracking.LocationService/GetScenePosition',
                request_serializer=avikom_dot_tracking_dot_location__service__pb2.TargetRequest.SerializeToString,
                response_deserializer=avikom_dot_math_dot_vector3d__pb2.Vector3D.FromString,
                )
        self.GetRelativePosition = channel.unary_stream(
                '/avikom.tracking.LocationService/GetRelativePosition',
                request_serializer=avikom_dot_tracking_dot_location__service__pb2.TargetRequest.SerializeToString,
                response_deserializer=avikom_dot_math_dot_vector3d__pb2.Vector3D.FromString,
                )


class LocationServiceServicer(object):
    """*
    This services provides the scene location of an object either absolute to the scene's origin or relative to another entity (e.g. the user).
    @author: Alexander Neumann <alneuman@techfak.uni-bielefeld.de>
    """

    def GetScenePosition(self, request, context):
        """/ returns the absolute position of an object relative to the scenes origin
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')

    def GetRelativePosition(self, request, context):
        """/ returns the  position of an object relative to the object/entity mentioned in `TargetRequest`
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')


def add_LocationServiceServicer_to_server(servicer, server):
    rpc_method_handlers = {
            'GetScenePosition': grpc.unary_stream_rpc_method_handler(
                    servicer.GetScenePosition,
                    request_deserializer=avikom_dot_tracking_dot_location__service__pb2.TargetRequest.FromString,
                    response_serializer=avikom_dot_math_dot_vector3d__pb2.Vector3D.SerializeToString,
            ),
            'GetRelativePosition': grpc.unary_stream_rpc_method_handler(
                    servicer.GetRelativePosition,
                    request_deserializer=avikom_dot_tracking_dot_location__service__pb2.TargetRequest.FromString,
                    response_serializer=avikom_dot_math_dot_vector3d__pb2.Vector3D.SerializeToString,
            ),
    }
    generic_handler = grpc.method_handlers_generic_handler(
            'avikom.tracking.LocationService', rpc_method_handlers)
    server.add_generic_rpc_handlers((generic_handler,))


 # This class is part of an EXPERIMENTAL API.
class LocationService(object):
    """*
    This services provides the scene location of an object either absolute to the scene's origin or relative to another entity (e.g. the user).
    @author: Alexander Neumann <alneuman@techfak.uni-bielefeld.de>
    """

    @staticmethod
    def GetScenePosition(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, '/avikom.tracking.LocationService/GetScenePosition',
            avikom_dot_tracking_dot_location__service__pb2.TargetRequest.SerializeToString,
            avikom_dot_math_dot_vector3d__pb2.Vector3D.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)

    @staticmethod
    def GetRelativePosition(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, '/avikom.tracking.LocationService/GetRelativePosition',
            avikom_dot_tracking_dot_location__service__pb2.TargetRequest.SerializeToString,
            avikom_dot_math_dot_vector3d__pb2.Vector3D.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)
