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

from . import commondata_pb2 as commondata__pb2


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

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

        Args:
            channel: A grpc.Channel.
        """
        self.query_db = channel.unary_unary(
                '/DBInterface/query_db',
                request_serializer=commondata__pb2.query_params.SerializeToString,
                response_deserializer=commondata__pb2.data_ret.FromString,
                )


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

    def query_db(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_DBInterfaceServicer_to_server(servicer, server):
    rpc_method_handlers = {
            'query_db': grpc.unary_unary_rpc_method_handler(
                    servicer.query_db,
                    request_deserializer=commondata__pb2.query_params.FromString,
                    response_serializer=commondata__pb2.data_ret.SerializeToString,
            ),
    }
    generic_handler = grpc.method_handlers_generic_handler(
            'DBInterface', rpc_method_handlers)
    server.add_generic_rpc_handlers((generic_handler,))


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

    @staticmethod
    def query_db(request,
            target,
            options=(),
            channel_credentials=None,
            call_credentials=None,
            compression=None,
            wait_for_ready=None,
            timeout=None,
            metadata=None):
        return grpc.experimental.unary_unary(request, target, '/DBInterface/query_db',
            commondata__pb2.query_params.SerializeToString,
            commondata__pb2.data_ret.FromString,
            options, channel_credentials,
            call_credentials, compression, wait_for_ready, timeout, metadata)


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

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

        Args:
            channel: A grpc.Channel.
        """
        self.run_func = channel.unary_unary(
                '/FuncInterface/run_func',
                request_serializer=commondata__pb2.func_params.SerializeToString,
                response_deserializer=commondata__pb2.func_ret.FromString,
                )


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

    def run_func(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_FuncInterfaceServicer_to_server(servicer, server):
    rpc_method_handlers = {
            'run_func': grpc.unary_unary_rpc_method_handler(
                    servicer.run_func,
                    request_deserializer=commondata__pb2.func_params.FromString,
                    response_serializer=commondata__pb2.func_ret.SerializeToString,
            ),
    }
    generic_handler = grpc.method_handlers_generic_handler(
            'FuncInterface', rpc_method_handlers)
    server.add_generic_rpc_handlers((generic_handler,))


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

    @staticmethod
    def run_func(request,
            target,
            options=(),
            channel_credentials=None,
            call_credentials=None,
            compression=None,
            wait_for_ready=None,
            timeout=None,
            metadata=None):
        return grpc.experimental.unary_unary(request, target, '/FuncInterface/run_func',
            commondata__pb2.func_params.SerializeToString,
            commondata__pb2.func_ret.FromString,
            options, channel_credentials,
            call_credentials, compression, wait_for_ready, timeout, metadata)
