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

from t2iapi import basic_requests_pb2 as t2iapi_dot_basic__requests__pb2
from t2iapi import basic_responses_pb2 as t2iapi_dot_basic__responses__pb2
from t2iapi.metric import metric_requests_pb2 as t2iapi_dot_metric_dot_metric__requests__pb2
from t2iapi.metric import metric_responses_pb2 as t2iapi_dot_metric_dot_metric__responses__pb2


class MetricServiceStub(object):
    """
    Service to handle metric manipulations.
    """

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

        Args:
            channel: A grpc.Channel.
        """
        self.SetMetricQualityValidity = channel.unary_unary(
                '/t2iapi.metric.MetricService/SetMetricQualityValidity',
                request_serializer=t2iapi_dot_metric_dot_metric__requests__pb2.SetMetricQualityValidityRequest.SerializeToString,
                response_deserializer=t2iapi_dot_basic__responses__pb2.BasicResponse.FromString,
                )
        self.SetNoValue = channel.unary_unary(
                '/t2iapi.metric.MetricService/SetNoValue',
                request_serializer=t2iapi_dot_basic__requests__pb2.BasicHandleRequest.SerializeToString,
                response_deserializer=t2iapi_dot_basic__responses__pb2.BasicResponse.FromString,
                )
        self.SetActivationStateAndUserConfirmableValue = channel.unary_unary(
                '/t2iapi.metric.MetricService/SetActivationStateAndUserConfirmableValue',
                request_serializer=t2iapi_dot_metric_dot_metric__requests__pb2.SetActivationStateAndUserConfirmableValueRequest.SerializeToString,
                response_deserializer=t2iapi_dot_basic__responses__pb2.BasicResponse.FromString,
                )
        self.SetInvalidValue = channel.unary_unary(
                '/t2iapi.metric.MetricService/SetInvalidValue',
                request_serializer=t2iapi_dot_basic__requests__pb2.BasicHandleRequest.SerializeToString,
                response_deserializer=t2iapi_dot_basic__responses__pb2.BasicResponse.FromString,
                )
        self.CalibrateMetric = channel.unary_unary(
                '/t2iapi.metric.MetricService/CalibrateMetric',
                request_serializer=t2iapi_dot_basic__requests__pb2.BasicHandleRequest.SerializeToString,
                response_deserializer=t2iapi_dot_metric_dot_metric__responses__pb2.CalibrateMetricResponse.FromString,
                )
        self.SetMetricValuesWithQualityMode = channel.unary_unary(
                '/t2iapi.metric.MetricService/SetMetricValuesWithQualityMode',
                request_serializer=t2iapi_dot_metric_dot_metric__requests__pb2.SetMetricValuesWithQualityModeRequest.SerializeToString,
                response_deserializer=t2iapi_dot_basic__responses__pb2.BasicResponse.FromString,
                )
        self.SetMetricValuesInRange = channel.unary_unary(
                '/t2iapi.metric.MetricService/SetMetricValuesInRange',
                request_serializer=t2iapi_dot_metric_dot_metric__requests__pb2.SetMetricValuesInRangeRequest.SerializeToString,
                response_deserializer=t2iapi_dot_basic__responses__pb2.BasicResponse.FromString,
                )
        self.ChangeOperationModeStatus = channel.unary_unary(
                '/t2iapi.metric.MetricService/ChangeOperationModeStatus',
                request_serializer=t2iapi_dot_metric_dot_metric__requests__pb2.ChangeOperationModeStatusRequest.SerializeToString,
                response_deserializer=t2iapi_dot_basic__responses__pb2.BasicResponse.FromString,
                )
        self.SetMetricStatus = channel.unary_unary(
                '/t2iapi.metric.MetricService/SetMetricStatus',
                request_serializer=t2iapi_dot_metric_dot_metric__requests__pb2.SetMetricStatusRequest.SerializeToString,
                response_deserializer=t2iapi_dot_basic__responses__pb2.BasicResponse.FromString,
                )
        self.IsComputerControlled = channel.unary_unary(
                '/t2iapi.metric.MetricService/IsComputerControlled',
                request_serializer=t2iapi_dot_basic__requests__pb2.BasicHandleRequest.SerializeToString,
                response_deserializer=t2iapi_dot_metric_dot_metric__responses__pb2.IsComputerControlledResponse.FromString,
                )


class MetricServiceServicer(object):
    """
    Service to handle metric manipulations.
    """

    def SetMetricQualityValidity(self, request, context):
        """
        Set the MetricQuality/@Validity of the metric with the given handle to the given validity value.
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')

    def SetNoValue(self, request, context):
        """
        Set no metric values for the provided metric handle.
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')

    def SetActivationStateAndUserConfirmableValue(self, request, context):
        """
        For the metric with the provided handle do the following:
        - set the @ActivationState to the provided value
        - set the pm:MetricValue/@Value resp. @Samples and confirm the value via the device ui
        Ensure that the @ActivationState remains set for as long as the confirmable value is set.
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')

    def SetInvalidValue(self, request, context):
        """
        Set the metric value for the provided handle to an invalid value.
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')

    def CalibrateMetric(self, request, context):
        """
        Calibrate the metric for the provided handle and return the calibration values.
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')

    def SetMetricValuesWithQualityMode(self, request, context):
        """
        Provide metric values with a specific MetricQuality/@Mode for the metric with the given handle.
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')

    def SetMetricValuesInRange(self, request, context):
        """
        Set metric values within a given range. If no limit value is defined, random but valid metric values shall be set.
        If a limit is defined, it shall not be violated by metric values.
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')

    def ChangeOperationModeStatus(self, request, context):
        """
        Change the status of an operation mode.

        An operation mode represents a specific behaviour of a device that can be enabled, paused or disabled,
        typically by the user.
        BICEPS does not provide a model element out of the box that can be used for such a mode, thus the operation mode
        is represented by a pm:EnumStringMetricDescriptor, as described by MPKP draft.
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')

    def SetMetricStatus(self, request, context):
        """
        Set the provided measurement, calculation or setting status for the metric of the provided handle. This is not the
        AbstractMetricState/@ActivationState, but the internal state of the device.
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')

    def IsComputerControlled(self, request, context):
        """
        Requests if the given metric handle is a computer-controlled metric.

        A computer-controlled metric is a metric with @MetricCategory ∈ { Set, Preset } which is automatically
        adapted by the device under test, e.g. for an FiO2 closed-loop within a device.
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')


def add_MetricServiceServicer_to_server(servicer, server):
    rpc_method_handlers = {
            'SetMetricQualityValidity': grpc.unary_unary_rpc_method_handler(
                    servicer.SetMetricQualityValidity,
                    request_deserializer=t2iapi_dot_metric_dot_metric__requests__pb2.SetMetricQualityValidityRequest.FromString,
                    response_serializer=t2iapi_dot_basic__responses__pb2.BasicResponse.SerializeToString,
            ),
            'SetNoValue': grpc.unary_unary_rpc_method_handler(
                    servicer.SetNoValue,
                    request_deserializer=t2iapi_dot_basic__requests__pb2.BasicHandleRequest.FromString,
                    response_serializer=t2iapi_dot_basic__responses__pb2.BasicResponse.SerializeToString,
            ),
            'SetActivationStateAndUserConfirmableValue': grpc.unary_unary_rpc_method_handler(
                    servicer.SetActivationStateAndUserConfirmableValue,
                    request_deserializer=t2iapi_dot_metric_dot_metric__requests__pb2.SetActivationStateAndUserConfirmableValueRequest.FromString,
                    response_serializer=t2iapi_dot_basic__responses__pb2.BasicResponse.SerializeToString,
            ),
            'SetInvalidValue': grpc.unary_unary_rpc_method_handler(
                    servicer.SetInvalidValue,
                    request_deserializer=t2iapi_dot_basic__requests__pb2.BasicHandleRequest.FromString,
                    response_serializer=t2iapi_dot_basic__responses__pb2.BasicResponse.SerializeToString,
            ),
            'CalibrateMetric': grpc.unary_unary_rpc_method_handler(
                    servicer.CalibrateMetric,
                    request_deserializer=t2iapi_dot_basic__requests__pb2.BasicHandleRequest.FromString,
                    response_serializer=t2iapi_dot_metric_dot_metric__responses__pb2.CalibrateMetricResponse.SerializeToString,
            ),
            'SetMetricValuesWithQualityMode': grpc.unary_unary_rpc_method_handler(
                    servicer.SetMetricValuesWithQualityMode,
                    request_deserializer=t2iapi_dot_metric_dot_metric__requests__pb2.SetMetricValuesWithQualityModeRequest.FromString,
                    response_serializer=t2iapi_dot_basic__responses__pb2.BasicResponse.SerializeToString,
            ),
            'SetMetricValuesInRange': grpc.unary_unary_rpc_method_handler(
                    servicer.SetMetricValuesInRange,
                    request_deserializer=t2iapi_dot_metric_dot_metric__requests__pb2.SetMetricValuesInRangeRequest.FromString,
                    response_serializer=t2iapi_dot_basic__responses__pb2.BasicResponse.SerializeToString,
            ),
            'ChangeOperationModeStatus': grpc.unary_unary_rpc_method_handler(
                    servicer.ChangeOperationModeStatus,
                    request_deserializer=t2iapi_dot_metric_dot_metric__requests__pb2.ChangeOperationModeStatusRequest.FromString,
                    response_serializer=t2iapi_dot_basic__responses__pb2.BasicResponse.SerializeToString,
            ),
            'SetMetricStatus': grpc.unary_unary_rpc_method_handler(
                    servicer.SetMetricStatus,
                    request_deserializer=t2iapi_dot_metric_dot_metric__requests__pb2.SetMetricStatusRequest.FromString,
                    response_serializer=t2iapi_dot_basic__responses__pb2.BasicResponse.SerializeToString,
            ),
            'IsComputerControlled': grpc.unary_unary_rpc_method_handler(
                    servicer.IsComputerControlled,
                    request_deserializer=t2iapi_dot_basic__requests__pb2.BasicHandleRequest.FromString,
                    response_serializer=t2iapi_dot_metric_dot_metric__responses__pb2.IsComputerControlledResponse.SerializeToString,
            ),
    }
    generic_handler = grpc.method_handlers_generic_handler(
            't2iapi.metric.MetricService', rpc_method_handlers)
    server.add_generic_rpc_handlers((generic_handler,))


 # This class is part of an EXPERIMENTAL API.
class MetricService(object):
    """
    Service to handle metric manipulations.
    """

    @staticmethod
    def SetMetricQualityValidity(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, '/t2iapi.metric.MetricService/SetMetricQualityValidity',
            t2iapi_dot_metric_dot_metric__requests__pb2.SetMetricQualityValidityRequest.SerializeToString,
            t2iapi_dot_basic__responses__pb2.BasicResponse.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)

    @staticmethod
    def SetNoValue(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, '/t2iapi.metric.MetricService/SetNoValue',
            t2iapi_dot_basic__requests__pb2.BasicHandleRequest.SerializeToString,
            t2iapi_dot_basic__responses__pb2.BasicResponse.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)

    @staticmethod
    def SetActivationStateAndUserConfirmableValue(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, '/t2iapi.metric.MetricService/SetActivationStateAndUserConfirmableValue',
            t2iapi_dot_metric_dot_metric__requests__pb2.SetActivationStateAndUserConfirmableValueRequest.SerializeToString,
            t2iapi_dot_basic__responses__pb2.BasicResponse.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)

    @staticmethod
    def SetInvalidValue(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, '/t2iapi.metric.MetricService/SetInvalidValue',
            t2iapi_dot_basic__requests__pb2.BasicHandleRequest.SerializeToString,
            t2iapi_dot_basic__responses__pb2.BasicResponse.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)

    @staticmethod
    def CalibrateMetric(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, '/t2iapi.metric.MetricService/CalibrateMetric',
            t2iapi_dot_basic__requests__pb2.BasicHandleRequest.SerializeToString,
            t2iapi_dot_metric_dot_metric__responses__pb2.CalibrateMetricResponse.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)

    @staticmethod
    def SetMetricValuesWithQualityMode(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, '/t2iapi.metric.MetricService/SetMetricValuesWithQualityMode',
            t2iapi_dot_metric_dot_metric__requests__pb2.SetMetricValuesWithQualityModeRequest.SerializeToString,
            t2iapi_dot_basic__responses__pb2.BasicResponse.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)

    @staticmethod
    def SetMetricValuesInRange(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, '/t2iapi.metric.MetricService/SetMetricValuesInRange',
            t2iapi_dot_metric_dot_metric__requests__pb2.SetMetricValuesInRangeRequest.SerializeToString,
            t2iapi_dot_basic__responses__pb2.BasicResponse.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)

    @staticmethod
    def ChangeOperationModeStatus(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, '/t2iapi.metric.MetricService/ChangeOperationModeStatus',
            t2iapi_dot_metric_dot_metric__requests__pb2.ChangeOperationModeStatusRequest.SerializeToString,
            t2iapi_dot_basic__responses__pb2.BasicResponse.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)

    @staticmethod
    def SetMetricStatus(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, '/t2iapi.metric.MetricService/SetMetricStatus',
            t2iapi_dot_metric_dot_metric__requests__pb2.SetMetricStatusRequest.SerializeToString,
            t2iapi_dot_basic__responses__pb2.BasicResponse.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)

    @staticmethod
    def IsComputerControlled(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, '/t2iapi.metric.MetricService/IsComputerControlled',
            t2iapi_dot_basic__requests__pb2.BasicHandleRequest.SerializeToString,
            t2iapi_dot_metric_dot_metric__responses__pb2.IsComputerControlledResponse.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)
