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

from avikom.assistance import runtime_step_list_pb2 as avikom_dot_assistance_dot_runtime__step__list__pb2
from avikom.assistance import runtime_step_state_change_pb2 as avikom_dot_assistance_dot_runtime__step__state__change__pb2
from avikom.generic import peer_pb2 as avikom_dot_generic_dot_peer__pb2
from avikom.generic import result_pb2 as avikom_dot_generic_dot_result__pb2
from google.protobuf import empty_pb2 as google_dot_protobuf_dot_empty__pb2


class RuntimeStepConsumerServiceStub(object):
    """*
    A runtime step consumer is interested in runtime step information. If scene and task information are
    required, peers should provide `SceneConsumerProvider` as well.
    @author Alexander Neumann <alneuman@techfak.uni-bielefeld.de>
    """

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

        Args:
            channel: A grpc.Channel.
        """
        self.SetRuntimeSteps = channel.unary_unary(
                '/avikom.assistance.RuntimeStepConsumerService/SetRuntimeSteps',
                request_serializer=avikom_dot_assistance_dot_runtime__step__list__pb2.RuntimeStepList.SerializeToString,
                response_deserializer=avikom_dot_generic_dot_result__pb2.Result.FromString,
                )
        self.UpdateRuntimeStep = channel.unary_unary(
                '/avikom.assistance.RuntimeStepConsumerService/UpdateRuntimeStep',
                request_serializer=avikom_dot_assistance_dot_runtime__step__state__change__pb2.RuntimeStepStateChange.SerializeToString,
                response_deserializer=google_dot_protobuf_dot_empty__pb2.Empty.FromString,
                )
        self.SetPeers = channel.unary_unary(
                '/avikom.assistance.RuntimeStepConsumerService/SetPeers',
                request_serializer=avikom_dot_generic_dot_peer__pb2.PeerList.SerializeToString,
                response_deserializer=avikom_dot_generic_dot_result__pb2.Result.FromString,
                )


class RuntimeStepConsumerServiceServicer(object):
    """*
    A runtime step consumer is interested in runtime step information. If scene and task information are
    required, peers should provide `SceneConsumerProvider` as well.
    @author Alexander Neumann <alneuman@techfak.uni-bielefeld.de>
    """

    def SetRuntimeSteps(self, request, context):
        """/ Updates the currently eligible task steps.
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')

    def UpdateRuntimeStep(self, request, context):
        """/ When a `RuntimeTaskStep` changes its state, consumers will be informed via this call.
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')

    def SetPeers(self, request, context):
        """/ When peer information changes while a step is conducted, this method should be used to inform consumers. 
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')


def add_RuntimeStepConsumerServiceServicer_to_server(servicer, server):
    rpc_method_handlers = {
            'SetRuntimeSteps': grpc.unary_unary_rpc_method_handler(
                    servicer.SetRuntimeSteps,
                    request_deserializer=avikom_dot_assistance_dot_runtime__step__list__pb2.RuntimeStepList.FromString,
                    response_serializer=avikom_dot_generic_dot_result__pb2.Result.SerializeToString,
            ),
            'UpdateRuntimeStep': grpc.unary_unary_rpc_method_handler(
                    servicer.UpdateRuntimeStep,
                    request_deserializer=avikom_dot_assistance_dot_runtime__step__state__change__pb2.RuntimeStepStateChange.FromString,
                    response_serializer=google_dot_protobuf_dot_empty__pb2.Empty.SerializeToString,
            ),
            'SetPeers': grpc.unary_unary_rpc_method_handler(
                    servicer.SetPeers,
                    request_deserializer=avikom_dot_generic_dot_peer__pb2.PeerList.FromString,
                    response_serializer=avikom_dot_generic_dot_result__pb2.Result.SerializeToString,
            ),
    }
    generic_handler = grpc.method_handlers_generic_handler(
            'avikom.assistance.RuntimeStepConsumerService', rpc_method_handlers)
    server.add_generic_rpc_handlers((generic_handler,))


 # This class is part of an EXPERIMENTAL API.
class RuntimeStepConsumerService(object):
    """*
    A runtime step consumer is interested in runtime step information. If scene and task information are
    required, peers should provide `SceneConsumerProvider` as well.
    @author Alexander Neumann <alneuman@techfak.uni-bielefeld.de>
    """

    @staticmethod
    def SetRuntimeSteps(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.assistance.RuntimeStepConsumerService/SetRuntimeSteps',
            avikom_dot_assistance_dot_runtime__step__list__pb2.RuntimeStepList.SerializeToString,
            avikom_dot_generic_dot_result__pb2.Result.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)

    @staticmethod
    def UpdateRuntimeStep(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.assistance.RuntimeStepConsumerService/UpdateRuntimeStep',
            avikom_dot_assistance_dot_runtime__step__state__change__pb2.RuntimeStepStateChange.SerializeToString,
            google_dot_protobuf_dot_empty__pb2.Empty.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)

    @staticmethod
    def SetPeers(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.assistance.RuntimeStepConsumerService/SetPeers',
            avikom_dot_generic_dot_peer__pb2.PeerList.SerializeToString,
            avikom_dot_generic_dot_result__pb2.Result.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)
