# 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 LinParserNode_pb2 as LinParserNode__pb2


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

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

        Args:
            channel: A grpc.Channel.
        """
        self.AddDbfile = channel.unary_unary(
                '/LinParserNode.LinParserNode/AddDbfile',
                request_serializer=Common__pb2.file_path.SerializeToString,
                response_deserializer=Common__pb2.result.FromString,
                )
        self.SetChannelConfig = channel.unary_unary(
                '/LinParserNode.LinParserNode/SetChannelConfig',
                request_serializer=LinParserNode__pb2.lin_channel_config.SerializeToString,
                response_deserializer=Common__pb2.result.FromString,
                )
        self.SetNodeSimulation = channel.unary_unary(
                '/LinParserNode.LinParserNode/SetNodeSimulation',
                request_serializer=LinParserNode__pb2.lin_node_config.SerializeToString,
                response_deserializer=Common__pb2.result.FromString,
                )
        self.SetFrameSimulation = channel.unary_unary(
                '/LinParserNode.LinParserNode/SetFrameSimulation',
                request_serializer=LinParserNode__pb2.lin_frame_config.SerializeToString,
                response_deserializer=Common__pb2.result.FromString,
                )
        self.Clear = channel.unary_unary(
                '/LinParserNode.LinParserNode/Clear',
                request_serializer=Common__pb2.empty.SerializeToString,
                response_deserializer=Common__pb2.result.FromString,
                )
        self.ClearSubscribe = channel.unary_unary(
                '/LinParserNode.LinParserNode/ClearSubscribe',
                request_serializer=Common__pb2.empty.SerializeToString,
                response_deserializer=Common__pb2.result.FromString,
                )
        self.ClearDbfile = channel.unary_unary(
                '/LinParserNode.LinParserNode/ClearDbfile',
                request_serializer=Common__pb2.empty.SerializeToString,
                response_deserializer=Common__pb2.result.FromString,
                )
        self.GetStatus = channel.unary_unary(
                '/LinParserNode.LinParserNode/GetStatus',
                request_serializer=Common__pb2.empty.SerializeToString,
                response_deserializer=LinParserNode__pb2.lin_parser_status.FromString,
                )
        self.GetLdfJsonTree = channel.unary_unary(
                '/LinParserNode.LinParserNode/GetLdfJsonTree',
                request_serializer=Common__pb2.empty.SerializeToString,
                response_deserializer=LinParserNode__pb2.lin_ldf_json.FromString,
                )


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

    def AddDbfile(self, request, context):
        """添加一个 DB 文件
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')

    def SetChannelConfig(self, request, context):
        """配置某个channel
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')

    def SetNodeSimulation(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 SetFrameSimulation(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 Clear(self, request, context):
        """清空所有配置
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')

    def ClearSubscribe(self, request, context):
        """清除所有订阅
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')

    def ClearDbfile(self, request, context):
        """清空所有dbfile
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')

    def GetStatus(self, request, context):
        """获取状态
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')

    def GetLdfJsonTree(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_LinParserNodeServicer_to_server(servicer, server):
    rpc_method_handlers = {
            'AddDbfile': grpc.unary_unary_rpc_method_handler(
                    servicer.AddDbfile,
                    request_deserializer=Common__pb2.file_path.FromString,
                    response_serializer=Common__pb2.result.SerializeToString,
            ),
            'SetChannelConfig': grpc.unary_unary_rpc_method_handler(
                    servicer.SetChannelConfig,
                    request_deserializer=LinParserNode__pb2.lin_channel_config.FromString,
                    response_serializer=Common__pb2.result.SerializeToString,
            ),
            'SetNodeSimulation': grpc.unary_unary_rpc_method_handler(
                    servicer.SetNodeSimulation,
                    request_deserializer=LinParserNode__pb2.lin_node_config.FromString,
                    response_serializer=Common__pb2.result.SerializeToString,
            ),
            'SetFrameSimulation': grpc.unary_unary_rpc_method_handler(
                    servicer.SetFrameSimulation,
                    request_deserializer=LinParserNode__pb2.lin_frame_config.FromString,
                    response_serializer=Common__pb2.result.SerializeToString,
            ),
            'Clear': grpc.unary_unary_rpc_method_handler(
                    servicer.Clear,
                    request_deserializer=Common__pb2.empty.FromString,
                    response_serializer=Common__pb2.result.SerializeToString,
            ),
            'ClearSubscribe': grpc.unary_unary_rpc_method_handler(
                    servicer.ClearSubscribe,
                    request_deserializer=Common__pb2.empty.FromString,
                    response_serializer=Common__pb2.result.SerializeToString,
            ),
            'ClearDbfile': grpc.unary_unary_rpc_method_handler(
                    servicer.ClearDbfile,
                    request_deserializer=Common__pb2.empty.FromString,
                    response_serializer=Common__pb2.result.SerializeToString,
            ),
            'GetStatus': grpc.unary_unary_rpc_method_handler(
                    servicer.GetStatus,
                    request_deserializer=Common__pb2.empty.FromString,
                    response_serializer=LinParserNode__pb2.lin_parser_status.SerializeToString,
            ),
            'GetLdfJsonTree': grpc.unary_unary_rpc_method_handler(
                    servicer.GetLdfJsonTree,
                    request_deserializer=Common__pb2.empty.FromString,
                    response_serializer=LinParserNode__pb2.lin_ldf_json.SerializeToString,
            ),
    }
    generic_handler = grpc.method_handlers_generic_handler(
            'LinParserNode.LinParserNode', rpc_method_handlers)
    server.add_generic_rpc_handlers((generic_handler,))


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

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

    @staticmethod
    def SetChannelConfig(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, '/LinParserNode.LinParserNode/SetChannelConfig',
            LinParserNode__pb2.lin_channel_config.SerializeToString,
            Common__pb2.result.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)

    @staticmethod
    def SetNodeSimulation(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, '/LinParserNode.LinParserNode/SetNodeSimulation',
            LinParserNode__pb2.lin_node_config.SerializeToString,
            Common__pb2.result.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)

    @staticmethod
    def SetFrameSimulation(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, '/LinParserNode.LinParserNode/SetFrameSimulation',
            LinParserNode__pb2.lin_frame_config.SerializeToString,
            Common__pb2.result.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)

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

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

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

    @staticmethod
    def GetStatus(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, '/LinParserNode.LinParserNode/GetStatus',
            Common__pb2.empty.SerializeToString,
            LinParserNode__pb2.lin_parser_status.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)

    @staticmethod
    def GetLdfJsonTree(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, '/LinParserNode.LinParserNode/GetLdfJsonTree',
            Common__pb2.empty.SerializeToString,
            LinParserNode__pb2.lin_ldf_json.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)
