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

from avikom.generic import logger_service_pb2 as avikom_dot_generic_dot_logger__service__pb2
from avikom.generic import result_pb2 as avikom_dot_generic_dot_result__pb2


class LoggerServiceStub(object):
    """
    This service receives debug messages and handles them. 
    Currently not in use.
    @author Alexander Neumann <alneuman@techfak.uni-bielefeld.de>
    """

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

        Args:
            channel: A grpc.Channel.
        """
        self.Log = channel.unary_unary(
                '/avikom.generic.LoggerService/Log',
                request_serializer=avikom_dot_generic_dot_logger__service__pb2.Message.SerializeToString,
                response_deserializer=avikom_dot_generic_dot_result__pb2.Result.FromString,
                )


class LoggerServiceServicer(object):
    """
    This service receives debug messages and handles them. 
    Currently not in use.
    @author Alexander Neumann <alneuman@techfak.uni-bielefeld.de>
    """

    def Log(self, request, context):
        """/ Logs a certain message and displays it in the console
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')


def add_LoggerServiceServicer_to_server(servicer, server):
    rpc_method_handlers = {
            'Log': grpc.unary_unary_rpc_method_handler(
                    servicer.Log,
                    request_deserializer=avikom_dot_generic_dot_logger__service__pb2.Message.FromString,
                    response_serializer=avikom_dot_generic_dot_result__pb2.Result.SerializeToString,
            ),
    }
    generic_handler = grpc.method_handlers_generic_handler(
            'avikom.generic.LoggerService', rpc_method_handlers)
    server.add_generic_rpc_handlers((generic_handler,))


 # This class is part of an EXPERIMENTAL API.
class LoggerService(object):
    """
    This service receives debug messages and handles them. 
    Currently not in use.
    @author Alexander Neumann <alneuman@techfak.uni-bielefeld.de>
    """

    @staticmethod
    def Log(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, '/avikom.generic.LoggerService/Log',
            avikom_dot_generic_dot_logger__service__pb2.Message.SerializeToString,
            avikom_dot_generic_dot_result__pb2.Result.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)
