# 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 split_procedure_result_pb2 as avikom_dot_assistance_dot_split__procedure__result__pb2
from avikom.assistance import step_proficiency_pb2 as avikom_dot_assistance_dot_step__proficiency__pb2
from avikom.assistance import step_proficiency_storage_service_pb2 as avikom_dot_assistance_dot_step__proficiency__storage__service__pb2
from avikom.generic import result_pb2 as avikom_dot_generic_dot_result__pb2


class StepProficiencyStorageServiceStub(object):
    """
    Stores the required step proficiencies for users and their split procedure results.
    If no record exists for user_id, Get/SetStepProficiency should generate and/or work with
    default data and information retrieved from task step stereotypes. Thus there should always be
    a valid return value and/or generated entry to work with. Furthermore,
    assistance_decay should be 'fuzzy' to follow ideas presented in https://www.mdpi.com/2078-2489/12/1/17. 
    @author Alexander Neumann <alneuman@techfak.uni-bielefeld.de>
    """

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

        Args:
            channel: A grpc.Channel.
        """
        self.GetStepProficiency = channel.unary_unary(
                '/avikom.assistance.StepProficiencyStorageService/GetStepProficiency',
                request_serializer=avikom_dot_assistance_dot_step__proficiency__storage__service__pb2.StepProficiencyQuery.SerializeToString,
                response_deserializer=avikom_dot_assistance_dot_step__proficiency__pb2.StepProficiency.FromString,
                )
        self.SetStepProficiency = channel.unary_unary(
                '/avikom.assistance.StepProficiencyStorageService/SetStepProficiency',
                request_serializer=avikom_dot_assistance_dot_step__proficiency__pb2.StepProficiency.SerializeToString,
                response_deserializer=avikom_dot_generic_dot_result__pb2.Result.FromString,
                )
        self.GetSplitProcedureResult = channel.unary_unary(
                '/avikom.assistance.StepProficiencyStorageService/GetSplitProcedureResult',
                request_serializer=avikom_dot_assistance_dot_step__proficiency__storage__service__pb2.StepProficiencyQuery.SerializeToString,
                response_deserializer=avikom_dot_assistance_dot_split__procedure__result__pb2.SplitProcedureResult.FromString,
                )
        self.SetSplitProcedureResult = channel.unary_unary(
                '/avikom.assistance.StepProficiencyStorageService/SetSplitProcedureResult',
                request_serializer=avikom_dot_assistance_dot_split__procedure__result__pb2.SplitProcedureResult.SerializeToString,
                response_deserializer=avikom_dot_generic_dot_result__pb2.Result.FromString,
                )


class StepProficiencyStorageServiceServicer(object):
    """
    Stores the required step proficiencies for users and their split procedure results.
    If no record exists for user_id, Get/SetStepProficiency should generate and/or work with
    default data and information retrieved from task step stereotypes. Thus there should always be
    a valid return value and/or generated entry to work with. Furthermore,
    assistance_decay should be 'fuzzy' to follow ideas presented in https://www.mdpi.com/2078-2489/12/1/17. 
    @author Alexander Neumann <alneuman@techfak.uni-bielefeld.de>
    """

    def GetStepProficiency(self, request, context):
        """/ returns step proficiency for a user with `user_id` and the task step named `target_name` 
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')

    def SetStepProficiency(self, request, context):
        """/ updates or creates the step proficiency for a user with `user_id` for the task step named `target_name`
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')

    def GetSplitProcedureResult(self, request, context):
        """/ returns the split procedure results for a user with `user_id` for the task named `target_name`  
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')

    def SetSplitProcedureResult(self, request, context):
        """/ creates or updates split procedure results for a user with `user_id` for the task named `target_name`  
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')


def add_StepProficiencyStorageServiceServicer_to_server(servicer, server):
    rpc_method_handlers = {
            'GetStepProficiency': grpc.unary_unary_rpc_method_handler(
                    servicer.GetStepProficiency,
                    request_deserializer=avikom_dot_assistance_dot_step__proficiency__storage__service__pb2.StepProficiencyQuery.FromString,
                    response_serializer=avikom_dot_assistance_dot_step__proficiency__pb2.StepProficiency.SerializeToString,
            ),
            'SetStepProficiency': grpc.unary_unary_rpc_method_handler(
                    servicer.SetStepProficiency,
                    request_deserializer=avikom_dot_assistance_dot_step__proficiency__pb2.StepProficiency.FromString,
                    response_serializer=avikom_dot_generic_dot_result__pb2.Result.SerializeToString,
            ),
            'GetSplitProcedureResult': grpc.unary_unary_rpc_method_handler(
                    servicer.GetSplitProcedureResult,
                    request_deserializer=avikom_dot_assistance_dot_step__proficiency__storage__service__pb2.StepProficiencyQuery.FromString,
                    response_serializer=avikom_dot_assistance_dot_split__procedure__result__pb2.SplitProcedureResult.SerializeToString,
            ),
            'SetSplitProcedureResult': grpc.unary_unary_rpc_method_handler(
                    servicer.SetSplitProcedureResult,
                    request_deserializer=avikom_dot_assistance_dot_split__procedure__result__pb2.SplitProcedureResult.FromString,
                    response_serializer=avikom_dot_generic_dot_result__pb2.Result.SerializeToString,
            ),
    }
    generic_handler = grpc.method_handlers_generic_handler(
            'avikom.assistance.StepProficiencyStorageService', rpc_method_handlers)
    server.add_generic_rpc_handlers((generic_handler,))


 # This class is part of an EXPERIMENTAL API.
class StepProficiencyStorageService(object):
    """
    Stores the required step proficiencies for users and their split procedure results.
    If no record exists for user_id, Get/SetStepProficiency should generate and/or work with
    default data and information retrieved from task step stereotypes. Thus there should always be
    a valid return value and/or generated entry to work with. Furthermore,
    assistance_decay should be 'fuzzy' to follow ideas presented in https://www.mdpi.com/2078-2489/12/1/17. 
    @author Alexander Neumann <alneuman@techfak.uni-bielefeld.de>
    """

    @staticmethod
    def GetStepProficiency(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.StepProficiencyStorageService/GetStepProficiency',
            avikom_dot_assistance_dot_step__proficiency__storage__service__pb2.StepProficiencyQuery.SerializeToString,
            avikom_dot_assistance_dot_step__proficiency__pb2.StepProficiency.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)

    @staticmethod
    def SetStepProficiency(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.StepProficiencyStorageService/SetStepProficiency',
            avikom_dot_assistance_dot_step__proficiency__pb2.StepProficiency.SerializeToString,
            avikom_dot_generic_dot_result__pb2.Result.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)

    @staticmethod
    def GetSplitProcedureResult(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.StepProficiencyStorageService/GetSplitProcedureResult',
            avikom_dot_assistance_dot_step__proficiency__storage__service__pb2.StepProficiencyQuery.SerializeToString,
            avikom_dot_assistance_dot_split__procedure__result__pb2.SplitProcedureResult.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)

    @staticmethod
    def SetSplitProcedureResult(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.StepProficiencyStorageService/SetSplitProcedureResult',
            avikom_dot_assistance_dot_split__procedure__result__pb2.SplitProcedureResult.SerializeToString,
            avikom_dot_generic_dot_result__pb2.Result.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)
