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

from . import Common_pb2 as Common__pb2
from . import ConfigNode_pb2 as ConfigNode__pb2


class ConfigNodeStub(object):
    """Missing associated documentation comment in .proto file."""

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

        Args:
            channel: A grpc.Channel.
        """
        self.getHardwareInfo = channel.unary_unary(
                '/ConfigNode.ConfigNode/getHardwareInfo',
                request_serializer=ConfigNode__pb2.hardware_type.SerializeToString,
                response_deserializer=ConfigNode__pb2.hardware_infos.FromString,
                )
        self.sendCanArxml = channel.unary_unary(
                '/ConfigNode.ConfigNode/sendCanArxml',
                request_serializer=ConfigNode__pb2.db_path.SerializeToString,
                response_deserializer=ConfigNode__pb2.can_cluster.FromString,
                )
        self.sendCanConfig = channel.unary_unary(
                '/ConfigNode.ConfigNode/sendCanConfig',
                request_serializer=ConfigNode__pb2.can_config_info.SerializeToString,
                response_deserializer=Common__pb2.result.FromString,
                )
        self.sendLinConfig = channel.unary_unary(
                '/ConfigNode.ConfigNode/sendLinConfig',
                request_serializer=ConfigNode__pb2.lin_config_info.SerializeToString,
                response_deserializer=Common__pb2.result.FromString,
                )
        self.sendEthConfig = channel.unary_unary(
                '/ConfigNode.ConfigNode/sendEthConfig',
                request_serializer=ConfigNode__pb2.eth_config_info.SerializeToString,
                response_deserializer=Common__pb2.result.FromString,
                )


class ConfigNodeServicer(object):
    """Missing associated documentation comment in .proto file."""

    def getHardwareInfo(self, request, context):
        """Missing associated documentation comment in .proto file."""
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')

    def sendCanArxml(self, request, context):
        """Missing associated documentation comment in .proto file."""
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')

    def sendCanConfig(self, request, context):
        """Missing associated documentation comment in .proto file."""
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')

    def sendLinConfig(self, request, context):
        """Missing associated documentation comment in .proto file."""
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')

    def sendEthConfig(self, request, context):
        """Missing associated documentation comment in .proto file."""
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')


def add_ConfigNodeServicer_to_server(servicer, server):
    rpc_method_handlers = {
            'getHardwareInfo': grpc.unary_unary_rpc_method_handler(
                    servicer.getHardwareInfo,
                    request_deserializer=ConfigNode__pb2.hardware_type.FromString,
                    response_serializer=ConfigNode__pb2.hardware_infos.SerializeToString,
            ),
            'sendCanArxml': grpc.unary_unary_rpc_method_handler(
                    servicer.sendCanArxml,
                    request_deserializer=ConfigNode__pb2.db_path.FromString,
                    response_serializer=ConfigNode__pb2.can_cluster.SerializeToString,
            ),
            'sendCanConfig': grpc.unary_unary_rpc_method_handler(
                    servicer.sendCanConfig,
                    request_deserializer=ConfigNode__pb2.can_config_info.FromString,
                    response_serializer=Common__pb2.result.SerializeToString,
            ),
            'sendLinConfig': grpc.unary_unary_rpc_method_handler(
                    servicer.sendLinConfig,
                    request_deserializer=ConfigNode__pb2.lin_config_info.FromString,
                    response_serializer=Common__pb2.result.SerializeToString,
            ),
            'sendEthConfig': grpc.unary_unary_rpc_method_handler(
                    servicer.sendEthConfig,
                    request_deserializer=ConfigNode__pb2.eth_config_info.FromString,
                    response_serializer=Common__pb2.result.SerializeToString,
            ),
    }
    generic_handler = grpc.method_handlers_generic_handler(
            'ConfigNode.ConfigNode', rpc_method_handlers)
    server.add_generic_rpc_handlers((generic_handler,))


 # This class is part of an EXPERIMENTAL API.
class ConfigNode(object):
    """Missing associated documentation comment in .proto file."""

    @staticmethod
    def getHardwareInfo(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, '/ConfigNode.ConfigNode/getHardwareInfo',
            ConfigNode__pb2.hardware_type.SerializeToString,
            ConfigNode__pb2.hardware_infos.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)

    @staticmethod
    def sendCanArxml(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, '/ConfigNode.ConfigNode/sendCanArxml',
            ConfigNode__pb2.db_path.SerializeToString,
            ConfigNode__pb2.can_cluster.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)

    @staticmethod
    def sendCanConfig(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, '/ConfigNode.ConfigNode/sendCanConfig',
            ConfigNode__pb2.can_config_info.SerializeToString,
            Common__pb2.result.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)

    @staticmethod
    def sendLinConfig(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, '/ConfigNode.ConfigNode/sendLinConfig',
            ConfigNode__pb2.lin_config_info.SerializeToString,
            Common__pb2.result.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)

    @staticmethod
    def sendEthConfig(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, '/ConfigNode.ConfigNode/sendEthConfig',
            ConfigNode__pb2.eth_config_info.SerializeToString,
            Common__pb2.result.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)
