# 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 result_pb2 as avikom_dot_generic_dot_result__pb2
from avikom.headset import rasa_message_pb2 as avikom_dot_headset_dot_rasa__message__pb2
from avikom.headset import rasa_service_pb2 as avikom_dot_headset_dot_rasa__service__pb2


class RasaServiceStub(object):
    """*
    This service manages the user input provided through speech and text.
    @author Lars Schalkwijk <lars.schalkwijk@fh-bielefeld.de>
    """

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

        Args:
            channel: A grpc.Channel.
        """
        self.SetIntent = channel.unary_unary(
                '/avikom.headset.RasaService/SetIntent',
                request_serializer=avikom_dot_headset_dot_rasa__message__pb2.RasaMessage.SerializeToString,
                response_deserializer=avikom_dot_generic_dot_result__pb2.Result.FromString,
                )
        self.GetIntents = channel.unary_unary(
                '/avikom.headset.RasaService/GetIntents',
                request_serializer=avikom_dot_headset_dot_rasa__service__pb2.RasaQuery.SerializeToString,
                response_deserializer=avikom_dot_headset_dot_rasa__service__pb2.RasaResult.FromString,
                )


class RasaServiceServicer(object):
    """*
    This service manages the user input provided through speech and text.
    @author Lars Schalkwijk <lars.schalkwijk@fh-bielefeld.de>
    """

    def SetIntent(self, request, context):
        """/ tries to use the provided information to resolve a task step 
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')

    def GetIntents(self, request, context):
        """/ returns all intents that can be used to resolve the current task step
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')


def add_RasaServiceServicer_to_server(servicer, server):
    rpc_method_handlers = {
            'SetIntent': grpc.unary_unary_rpc_method_handler(
                    servicer.SetIntent,
                    request_deserializer=avikom_dot_headset_dot_rasa__message__pb2.RasaMessage.FromString,
                    response_serializer=avikom_dot_generic_dot_result__pb2.Result.SerializeToString,
            ),
            'GetIntents': grpc.unary_unary_rpc_method_handler(
                    servicer.GetIntents,
                    request_deserializer=avikom_dot_headset_dot_rasa__service__pb2.RasaQuery.FromString,
                    response_serializer=avikom_dot_headset_dot_rasa__service__pb2.RasaResult.SerializeToString,
            ),
    }
    generic_handler = grpc.method_handlers_generic_handler(
            'avikom.headset.RasaService', rpc_method_handlers)
    server.add_generic_rpc_handlers((generic_handler,))


 # This class is part of an EXPERIMENTAL API.
class RasaService(object):
    """*
    This service manages the user input provided through speech and text.
    @author Lars Schalkwijk <lars.schalkwijk@fh-bielefeld.de>
    """

    @staticmethod
    def SetIntent(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.headset.RasaService/SetIntent',
            avikom_dot_headset_dot_rasa__message__pb2.RasaMessage.SerializeToString,
            avikom_dot_generic_dot_result__pb2.Result.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)

    @staticmethod
    def GetIntents(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.headset.RasaService/GetIntents',
            avikom_dot_headset_dot_rasa__service__pb2.RasaQuery.SerializeToString,
            avikom_dot_headset_dot_rasa__service__pb2.RasaResult.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)
