
# Wrapper to enforce deterministic serialization
def deterministic_serialize_wrapper(orig_serialize_func):
    def wrapped(msg):
        return orig_serialize_func(msg, deterministic=True)
    return wrapped

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

from qm.grpc.qm.grpc.v2 import qm_api_pb2 as qm_dot_grpc_dot_v2_dot_qm__api__pb2

GRPC_GENERATED_VERSION = '1.68.1'
GRPC_VERSION = grpc.__version__
_version_not_supported = False

try:
    from grpc._utilities import first_version_is_lower
    _version_not_supported = first_version_is_lower(GRPC_VERSION, GRPC_GENERATED_VERSION)
except ImportError:
    _version_not_supported = True

if _version_not_supported:
    raise RuntimeError(
        f'The grpc package installed is at version {GRPC_VERSION},'
        + f' but the generated code in qm/grpc/v2/qm_api_pb2_grpc.py depends on'
        + f' grpcio>={GRPC_GENERATED_VERSION}.'
        + f' Please upgrade your grpc module to grpcio>={GRPC_GENERATED_VERSION}'
        + f' or downgrade your generated code using grpcio-tools<={GRPC_VERSION}.'
    )


class QmServiceStub(object):
    """Missing associated documentation comment in .proto file."""

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

        Args:
            channel: A grpc.Channel.
        """
        self.UpdateConfig = channel.unary_unary(
                '/qm.grpc.v2.QmService/UpdateConfig',
                request_serializer=deterministic_serialize_wrapper(qm_dot_grpc_dot_v2_dot_qm__api__pb2.UpdateConfigRequest.SerializeToString),
                response_deserializer=qm_dot_grpc_dot_v2_dot_qm__api__pb2.UpdateConfigResponse.FromString,
                _registered_method=True)
        self.GetConfig = channel.unary_unary(
                '/qm.grpc.v2.QmService/GetConfig',
                request_serializer=deterministic_serialize_wrapper(qm_dot_grpc_dot_v2_dot_qm__api__pb2.QmServiceGetConfigRequest.SerializeToString),
                response_deserializer=qm_dot_grpc_dot_v2_dot_qm__api__pb2.QmServiceGetConfigResponse.FromString,
                _registered_method=True)
        self.Compile = channel.unary_unary(
                '/qm.grpc.v2.QmService/Compile',
                request_serializer=deterministic_serialize_wrapper(qm_dot_grpc_dot_v2_dot_qm__api__pb2.QmServiceCompileRequest.SerializeToString),
                response_deserializer=qm_dot_grpc_dot_v2_dot_qm__api__pb2.CompileResponse.FromString,
                _registered_method=True)
        self.Close = channel.unary_unary(
                '/qm.grpc.v2.QmService/Close',
                request_serializer=deterministic_serialize_wrapper(qm_dot_grpc_dot_v2_dot_qm__api__pb2.QmServiceCloseRequest.SerializeToString),
                response_deserializer=qm_dot_grpc_dot_v2_dot_qm__api__pb2.QmServiceCloseResponse.FromString,
                _registered_method=True)
        self.AddToQueue = channel.unary_unary(
                '/qm.grpc.v2.QmService/AddToQueue',
                request_serializer=deterministic_serialize_wrapper(qm_dot_grpc_dot_v2_dot_qm__api__pb2.QmServiceAddToQueueRequest.SerializeToString),
                response_deserializer=qm_dot_grpc_dot_v2_dot_qm__api__pb2.AddToQueueResponse.FromString,
                _registered_method=True)
        self.AddCompiledToQueue = channel.unary_unary(
                '/qm.grpc.v2.QmService/AddCompiledToQueue',
                request_serializer=deterministic_serialize_wrapper(qm_dot_grpc_dot_v2_dot_qm__api__pb2.QmServiceAddCompiledToQueueRequest.SerializeToString),
                response_deserializer=qm_dot_grpc_dot_v2_dot_qm__api__pb2.AddCompiledToQueueResponse.FromString,
                _registered_method=True)
        self.GetJobs = channel.unary_unary(
                '/qm.grpc.v2.QmService/GetJobs',
                request_serializer=deterministic_serialize_wrapper(qm_dot_grpc_dot_v2_dot_qm__api__pb2.QmServiceGetJobsRequest.SerializeToString),
                response_deserializer=qm_dot_grpc_dot_v2_dot_qm__api__pb2.QmServiceGetJobsResponse.FromString,
                _registered_method=True)
        self.RemoveJobs = channel.unary_unary(
                '/qm.grpc.v2.QmService/RemoveJobs',
                request_serializer=deterministic_serialize_wrapper(qm_dot_grpc_dot_v2_dot_qm__api__pb2.RemoveJobsRequest.SerializeToString),
                response_deserializer=qm_dot_grpc_dot_v2_dot_qm__api__pb2.RemoveJobsResponse.FromString,
                _registered_method=True)
        self.Simulate = channel.unary_unary(
                '/qm.grpc.v2.QmService/Simulate',
                request_serializer=deterministic_serialize_wrapper(qm_dot_grpc_dot_v2_dot_qm__api__pb2.QmServiceSimulateRequest.SerializeToString),
                response_deserializer=qm_dot_grpc_dot_v2_dot_qm__api__pb2.QmServiceSimulateResponse.FromString,
                _registered_method=True)
        self.ResetDigitalFilters = channel.unary_unary(
                '/qm.grpc.v2.QmService/ResetDigitalFilters',
                request_serializer=deterministic_serialize_wrapper(qm_dot_grpc_dot_v2_dot_qm__api__pb2.ResetDigitalFiltersRequest.SerializeToString),
                response_deserializer=qm_dot_grpc_dot_v2_dot_qm__api__pb2.ResetDigitalFiltersResponse.FromString,
                _registered_method=True)


class QmServiceServicer(object):
    """Missing associated documentation comment in .proto file."""

    def UpdateConfig(self, request, context):
        """Missing associated documentation comment in .proto file."""
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')

    def GetConfig(self, request, context):
        """Missing associated documentation comment in .proto file."""
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')

    def Compile(self, request, context):
        """Missing associated documentation comment in .proto file."""
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')

    def Close(self, request, context):
        """Missing associated documentation comment in .proto file."""
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')

    def AddToQueue(self, request, context):
        """Missing associated documentation comment in .proto file."""
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')

    def AddCompiledToQueue(self, request, context):
        """Missing associated documentation comment in .proto file."""
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')

    def GetJobs(self, request, context):
        """Missing associated documentation comment in .proto file."""
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')

    def RemoveJobs(self, request, context):
        """Missing associated documentation comment in .proto file."""
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')

    def Simulate(self, request, context):
        """Missing associated documentation comment in .proto file."""
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')

    def ResetDigitalFilters(self, request, context):
        """Missing associated documentation comment in .proto file."""
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')


def add_QmServiceServicer_to_server(servicer, server):
    rpc_method_handlers = {
            'UpdateConfig': grpc.unary_unary_rpc_method_handler(
                    servicer.UpdateConfig,
                    request_deserializer=qm_dot_grpc_dot_v2_dot_qm__api__pb2.UpdateConfigRequest.FromString,
                    response_serializer=qm_dot_grpc_dot_v2_dot_qm__api__pb2.UpdateConfigResponse.SerializeToString,
            ),
            'GetConfig': grpc.unary_unary_rpc_method_handler(
                    servicer.GetConfig,
                    request_deserializer=qm_dot_grpc_dot_v2_dot_qm__api__pb2.QmServiceGetConfigRequest.FromString,
                    response_serializer=qm_dot_grpc_dot_v2_dot_qm__api__pb2.QmServiceGetConfigResponse.SerializeToString,
            ),
            'Compile': grpc.unary_unary_rpc_method_handler(
                    servicer.Compile,
                    request_deserializer=qm_dot_grpc_dot_v2_dot_qm__api__pb2.QmServiceCompileRequest.FromString,
                    response_serializer=qm_dot_grpc_dot_v2_dot_qm__api__pb2.CompileResponse.SerializeToString,
            ),
            'Close': grpc.unary_unary_rpc_method_handler(
                    servicer.Close,
                    request_deserializer=qm_dot_grpc_dot_v2_dot_qm__api__pb2.QmServiceCloseRequest.FromString,
                    response_serializer=qm_dot_grpc_dot_v2_dot_qm__api__pb2.QmServiceCloseResponse.SerializeToString,
            ),
            'AddToQueue': grpc.unary_unary_rpc_method_handler(
                    servicer.AddToQueue,
                    request_deserializer=qm_dot_grpc_dot_v2_dot_qm__api__pb2.QmServiceAddToQueueRequest.FromString,
                    response_serializer=qm_dot_grpc_dot_v2_dot_qm__api__pb2.AddToQueueResponse.SerializeToString,
            ),
            'AddCompiledToQueue': grpc.unary_unary_rpc_method_handler(
                    servicer.AddCompiledToQueue,
                    request_deserializer=qm_dot_grpc_dot_v2_dot_qm__api__pb2.QmServiceAddCompiledToQueueRequest.FromString,
                    response_serializer=qm_dot_grpc_dot_v2_dot_qm__api__pb2.AddCompiledToQueueResponse.SerializeToString,
            ),
            'GetJobs': grpc.unary_unary_rpc_method_handler(
                    servicer.GetJobs,
                    request_deserializer=qm_dot_grpc_dot_v2_dot_qm__api__pb2.QmServiceGetJobsRequest.FromString,
                    response_serializer=qm_dot_grpc_dot_v2_dot_qm__api__pb2.QmServiceGetJobsResponse.SerializeToString,
            ),
            'RemoveJobs': grpc.unary_unary_rpc_method_handler(
                    servicer.RemoveJobs,
                    request_deserializer=qm_dot_grpc_dot_v2_dot_qm__api__pb2.RemoveJobsRequest.FromString,
                    response_serializer=qm_dot_grpc_dot_v2_dot_qm__api__pb2.RemoveJobsResponse.SerializeToString,
            ),
            'Simulate': grpc.unary_unary_rpc_method_handler(
                    servicer.Simulate,
                    request_deserializer=qm_dot_grpc_dot_v2_dot_qm__api__pb2.QmServiceSimulateRequest.FromString,
                    response_serializer=qm_dot_grpc_dot_v2_dot_qm__api__pb2.QmServiceSimulateResponse.SerializeToString,
            ),
            'ResetDigitalFilters': grpc.unary_unary_rpc_method_handler(
                    servicer.ResetDigitalFilters,
                    request_deserializer=qm_dot_grpc_dot_v2_dot_qm__api__pb2.ResetDigitalFiltersRequest.FromString,
                    response_serializer=qm_dot_grpc_dot_v2_dot_qm__api__pb2.ResetDigitalFiltersResponse.SerializeToString,
            ),
    }
    generic_handler = grpc.method_handlers_generic_handler(
            'qm.grpc.v2.QmService', rpc_method_handlers)
    server.add_generic_rpc_handlers((generic_handler,))
    server.add_registered_method_handlers('qm.grpc.v2.QmService', rpc_method_handlers)


 # This class is part of an EXPERIMENTAL API.
class QmService(object):
    """Missing associated documentation comment in .proto file."""

    @staticmethod
    def UpdateConfig(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,
            '/qm.grpc.v2.QmService/UpdateConfig',
            qm_dot_grpc_dot_v2_dot_qm__api__pb2.UpdateConfigRequest.SerializeToString,
            qm_dot_grpc_dot_v2_dot_qm__api__pb2.UpdateConfigResponse.FromString,
            options,
            channel_credentials,
            insecure,
            call_credentials,
            compression,
            wait_for_ready,
            timeout,
            metadata,
            _registered_method=True)

    @staticmethod
    def GetConfig(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,
            '/qm.grpc.v2.QmService/GetConfig',
            qm_dot_grpc_dot_v2_dot_qm__api__pb2.QmServiceGetConfigRequest.SerializeToString,
            qm_dot_grpc_dot_v2_dot_qm__api__pb2.QmServiceGetConfigResponse.FromString,
            options,
            channel_credentials,
            insecure,
            call_credentials,
            compression,
            wait_for_ready,
            timeout,
            metadata,
            _registered_method=True)

    @staticmethod
    def Compile(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,
            '/qm.grpc.v2.QmService/Compile',
            qm_dot_grpc_dot_v2_dot_qm__api__pb2.QmServiceCompileRequest.SerializeToString,
            qm_dot_grpc_dot_v2_dot_qm__api__pb2.CompileResponse.FromString,
            options,
            channel_credentials,
            insecure,
            call_credentials,
            compression,
            wait_for_ready,
            timeout,
            metadata,
            _registered_method=True)

    @staticmethod
    def Close(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,
            '/qm.grpc.v2.QmService/Close',
            qm_dot_grpc_dot_v2_dot_qm__api__pb2.QmServiceCloseRequest.SerializeToString,
            qm_dot_grpc_dot_v2_dot_qm__api__pb2.QmServiceCloseResponse.FromString,
            options,
            channel_credentials,
            insecure,
            call_credentials,
            compression,
            wait_for_ready,
            timeout,
            metadata,
            _registered_method=True)

    @staticmethod
    def AddToQueue(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,
            '/qm.grpc.v2.QmService/AddToQueue',
            qm_dot_grpc_dot_v2_dot_qm__api__pb2.QmServiceAddToQueueRequest.SerializeToString,
            qm_dot_grpc_dot_v2_dot_qm__api__pb2.AddToQueueResponse.FromString,
            options,
            channel_credentials,
            insecure,
            call_credentials,
            compression,
            wait_for_ready,
            timeout,
            metadata,
            _registered_method=True)

    @staticmethod
    def AddCompiledToQueue(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,
            '/qm.grpc.v2.QmService/AddCompiledToQueue',
            qm_dot_grpc_dot_v2_dot_qm__api__pb2.QmServiceAddCompiledToQueueRequest.SerializeToString,
            qm_dot_grpc_dot_v2_dot_qm__api__pb2.AddCompiledToQueueResponse.FromString,
            options,
            channel_credentials,
            insecure,
            call_credentials,
            compression,
            wait_for_ready,
            timeout,
            metadata,
            _registered_method=True)

    @staticmethod
    def GetJobs(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,
            '/qm.grpc.v2.QmService/GetJobs',
            qm_dot_grpc_dot_v2_dot_qm__api__pb2.QmServiceGetJobsRequest.SerializeToString,
            qm_dot_grpc_dot_v2_dot_qm__api__pb2.QmServiceGetJobsResponse.FromString,
            options,
            channel_credentials,
            insecure,
            call_credentials,
            compression,
            wait_for_ready,
            timeout,
            metadata,
            _registered_method=True)

    @staticmethod
    def RemoveJobs(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,
            '/qm.grpc.v2.QmService/RemoveJobs',
            qm_dot_grpc_dot_v2_dot_qm__api__pb2.RemoveJobsRequest.SerializeToString,
            qm_dot_grpc_dot_v2_dot_qm__api__pb2.RemoveJobsResponse.FromString,
            options,
            channel_credentials,
            insecure,
            call_credentials,
            compression,
            wait_for_ready,
            timeout,
            metadata,
            _registered_method=True)

    @staticmethod
    def Simulate(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,
            '/qm.grpc.v2.QmService/Simulate',
            qm_dot_grpc_dot_v2_dot_qm__api__pb2.QmServiceSimulateRequest.SerializeToString,
            qm_dot_grpc_dot_v2_dot_qm__api__pb2.QmServiceSimulateResponse.FromString,
            options,
            channel_credentials,
            insecure,
            call_credentials,
            compression,
            wait_for_ready,
            timeout,
            metadata,
            _registered_method=True)

    @staticmethod
    def ResetDigitalFilters(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,
            '/qm.grpc.v2.QmService/ResetDigitalFilters',
            qm_dot_grpc_dot_v2_dot_qm__api__pb2.ResetDigitalFiltersRequest.SerializeToString,
            qm_dot_grpc_dot_v2_dot_qm__api__pb2.ResetDigitalFiltersResponse.FromString,
            options,
            channel_credentials,
            insecure,
            call_credentials,
            compression,
            wait_for_ready,
            timeout,
            metadata,
            _registered_method=True)
