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

import morai_sensor_pb2 as morai__sensor__pb2
import morai_type_pb2 as morai__type__pb2


class MoraiSensorStub(object):
    """*
    Sensor 관련 서비스
    """

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

        Args:
            channel: A grpc.Channel.
        """
        self.AddSensor = channel.unary_unary(
                '/morai_sim_api.MoraiSensor/AddSensor',
                request_serializer=morai__sensor__pb2.SensorSettingList.SerializeToString,
                response_deserializer=morai__sensor__pb2.SensorResponseList.FromString,
                )
        self.RemoveSensor = channel.unary_unary(
                '/morai_sim_api.MoraiSensor/RemoveSensor',
                request_serializer=morai__sensor__pb2.RemoveSensorList.SerializeToString,
                response_deserializer=morai__sensor__pb2.SensorResponseList.FromString,
                )
        self.SetGroundTruthSensor = channel.unary_unary(
                '/morai_sim_api.MoraiSensor/SetGroundTruthSensor',
                request_serializer=morai__sensor__pb2.SetGroundTruthSensorList.SerializeToString,
                response_deserializer=morai__type__pb2.Result.FromString,
                )
        self.GetGroundTruthData = channel.unary_unary(
                '/morai_sim_api.MoraiSensor/GetGroundTruthData',
                request_serializer=morai__sensor__pb2.TargetSensorList.SerializeToString,
                response_deserializer=morai__sensor__pb2.GroundTruthList.FromString,
                )
        self.SaveSensorData = channel.unary_unary(
                '/morai_sim_api.MoraiSensor/SaveSensorData',
                request_serializer=morai__sensor__pb2.SaveSensor.SerializeToString,
                response_deserializer=morai__type__pb2.Result.FromString,
                )
        self.LoadSensorFile = channel.unary_unary(
                '/morai_sim_api.MoraiSensor/LoadSensorFile',
                request_serializer=morai__type__pb2.StringValue.SerializeToString,
                response_deserializer=morai__type__pb2.Result.FromString,
                )


class MoraiSensorServicer(object):
    """*
    Sensor 관련 서비스
    """

    def AddSensor(self, request, context):
        """차량에 센서 장착
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')

    def RemoveSensor(self, request, context):
        """차량에 부착한 센서 제거
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')

    def SetGroundTruthSensor(self, request, context):
        """GT 센서 설정
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')

    def GetGroundTruthData(self, request, context):
        """GT 데이터 가져오기
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')

    def SaveSensorData(self, request, context):
        """센서 데이터 저장 요청
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')

    def LoadSensorFile(self, request, context):
        """센서 설정 파일 로드
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')


def add_MoraiSensorServicer_to_server(servicer, server):
    rpc_method_handlers = {
            'AddSensor': grpc.unary_unary_rpc_method_handler(
                    servicer.AddSensor,
                    request_deserializer=morai__sensor__pb2.SensorSettingList.FromString,
                    response_serializer=morai__sensor__pb2.SensorResponseList.SerializeToString,
            ),
            'RemoveSensor': grpc.unary_unary_rpc_method_handler(
                    servicer.RemoveSensor,
                    request_deserializer=morai__sensor__pb2.RemoveSensorList.FromString,
                    response_serializer=morai__sensor__pb2.SensorResponseList.SerializeToString,
            ),
            'SetGroundTruthSensor': grpc.unary_unary_rpc_method_handler(
                    servicer.SetGroundTruthSensor,
                    request_deserializer=morai__sensor__pb2.SetGroundTruthSensorList.FromString,
                    response_serializer=morai__type__pb2.Result.SerializeToString,
            ),
            'GetGroundTruthData': grpc.unary_unary_rpc_method_handler(
                    servicer.GetGroundTruthData,
                    request_deserializer=morai__sensor__pb2.TargetSensorList.FromString,
                    response_serializer=morai__sensor__pb2.GroundTruthList.SerializeToString,
            ),
            'SaveSensorData': grpc.unary_unary_rpc_method_handler(
                    servicer.SaveSensorData,
                    request_deserializer=morai__sensor__pb2.SaveSensor.FromString,
                    response_serializer=morai__type__pb2.Result.SerializeToString,
            ),
            'LoadSensorFile': grpc.unary_unary_rpc_method_handler(
                    servicer.LoadSensorFile,
                    request_deserializer=morai__type__pb2.StringValue.FromString,
                    response_serializer=morai__type__pb2.Result.SerializeToString,
            ),
    }
    generic_handler = grpc.method_handlers_generic_handler(
            'morai_sim_api.MoraiSensor', rpc_method_handlers)
    server.add_generic_rpc_handlers((generic_handler,))


 # This class is part of an EXPERIMENTAL API.
class MoraiSensor(object):
    """*
    Sensor 관련 서비스
    """

    @staticmethod
    def AddSensor(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, '/morai_sim_api.MoraiSensor/AddSensor',
            morai__sensor__pb2.SensorSettingList.SerializeToString,
            morai__sensor__pb2.SensorResponseList.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)

    @staticmethod
    def RemoveSensor(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, '/morai_sim_api.MoraiSensor/RemoveSensor',
            morai__sensor__pb2.RemoveSensorList.SerializeToString,
            morai__sensor__pb2.SensorResponseList.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)

    @staticmethod
    def SetGroundTruthSensor(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, '/morai_sim_api.MoraiSensor/SetGroundTruthSensor',
            morai__sensor__pb2.SetGroundTruthSensorList.SerializeToString,
            morai__type__pb2.Result.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)

    @staticmethod
    def GetGroundTruthData(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, '/morai_sim_api.MoraiSensor/GetGroundTruthData',
            morai__sensor__pb2.TargetSensorList.SerializeToString,
            morai__sensor__pb2.GroundTruthList.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)

    @staticmethod
    def SaveSensorData(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, '/morai_sim_api.MoraiSensor/SaveSensorData',
            morai__sensor__pb2.SaveSensor.SerializeToString,
            morai__type__pb2.Result.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)

    @staticmethod
    def LoadSensorFile(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, '/morai_sim_api.MoraiSensor/LoadSensorFile',
            morai__type__pb2.StringValue.SerializeToString,
            morai__type__pb2.Result.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)
