
# 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.octave.v1 import api_pb2 as octave_dot_v1_dot_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 octave/v1/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 OctaveServiceStub(object):
    """Missing associated documentation comment in .proto file."""

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

        Args:
            channel: A grpc.Channel.
        """
        self.SubscribeState = channel.unary_stream(
                '/quantummachines.octave.api.v1.OctaveService/SubscribeState',
                request_serializer=deterministic_serialize_wrapper(octave_dot_v1_dot_api__pb2.SubscribeStateRequest.SerializeToString),
                response_deserializer=octave_dot_v1_dot_api__pb2.SubscribeStateResponse.FromString,
                _registered_method=True)
        self.GetVersion = channel.unary_unary(
                '/quantummachines.octave.api.v1.OctaveService/GetVersion',
                request_serializer=deterministic_serialize_wrapper(octave_dot_v1_dot_api__pb2.GetVersionRequest.SerializeToString),
                response_deserializer=octave_dot_v1_dot_api__pb2.GetVersionResponse.FromString,
                _registered_method=True)
        self.Control = channel.unary_unary(
                '/quantummachines.octave.api.v1.OctaveService/Control',
                request_serializer=deterministic_serialize_wrapper(octave_dot_v1_dot_api__pb2.ControlRequest.SerializeToString),
                response_deserializer=octave_dot_v1_dot_api__pb2.ControlResponse.FromString,
                _registered_method=True)
        self.Update = channel.unary_unary(
                '/quantummachines.octave.api.v1.OctaveService/Update',
                request_serializer=deterministic_serialize_wrapper(octave_dot_v1_dot_api__pb2.UpdateRequest.SerializeToString),
                response_deserializer=octave_dot_v1_dot_api__pb2.UpdateResponse.FromString,
                _registered_method=True)
        self.Aquire = channel.unary_unary(
                '/quantummachines.octave.api.v1.OctaveService/Aquire',
                request_serializer=deterministic_serialize_wrapper(octave_dot_v1_dot_api__pb2.AquireRequest.SerializeToString),
                response_deserializer=octave_dot_v1_dot_api__pb2.AquireResponse.FromString,
                _registered_method=True)
        self.Identify = channel.unary_unary(
                '/quantummachines.octave.api.v1.OctaveService/Identify',
                request_serializer=deterministic_serialize_wrapper(octave_dot_v1_dot_api__pb2.IdentifyRequest.SerializeToString),
                response_deserializer=octave_dot_v1_dot_api__pb2.IdentifyResponse.FromString,
                _registered_method=True)
        self.Monitor = channel.unary_unary(
                '/quantummachines.octave.api.v1.OctaveService/Monitor',
                request_serializer=deterministic_serialize_wrapper(octave_dot_v1_dot_api__pb2.MonitorRequest.SerializeToString),
                response_deserializer=octave_dot_v1_dot_api__pb2.MonitorResponse.FromString,
                _registered_method=True)
        self.Explore = channel.unary_unary(
                '/quantummachines.octave.api.v1.OctaveService/Explore',
                request_serializer=deterministic_serialize_wrapper(octave_dot_v1_dot_api__pb2.ExploreRequest.SerializeToString),
                response_deserializer=octave_dot_v1_dot_api__pb2.ExploreResponse.FromString,
                _registered_method=True)
        self.Save = channel.unary_unary(
                '/quantummachines.octave.api.v1.OctaveService/Save',
                request_serializer=deterministic_serialize_wrapper(octave_dot_v1_dot_api__pb2.SaveRequest.SerializeToString),
                response_deserializer=octave_dot_v1_dot_api__pb2.SaveResponse.FromString,
                _registered_method=True)
        self.Recall = channel.unary_unary(
                '/quantummachines.octave.api.v1.OctaveService/Recall',
                request_serializer=deterministic_serialize_wrapper(octave_dot_v1_dot_api__pb2.RecallRequest.SerializeToString),
                response_deserializer=octave_dot_v1_dot_api__pb2.RecallResponse.FromString,
                _registered_method=True)
        self.List = channel.unary_unary(
                '/quantummachines.octave.api.v1.OctaveService/List',
                request_serializer=deterministic_serialize_wrapper(octave_dot_v1_dot_api__pb2.ListRequest.SerializeToString),
                response_deserializer=octave_dot_v1_dot_api__pb2.ListResponse.FromString,
                _registered_method=True)
        self.Reset = channel.unary_unary(
                '/quantummachines.octave.api.v1.OctaveService/Reset',
                request_serializer=deterministic_serialize_wrapper(octave_dot_v1_dot_api__pb2.ResetRequest.SerializeToString),
                response_deserializer=octave_dot_v1_dot_api__pb2.ResetResponse.FromString,
                _registered_method=True)
        self.Health = channel.stream_stream(
                '/quantummachines.octave.api.v1.OctaveService/Health',
                request_serializer=deterministic_serialize_wrapper(octave_dot_v1_dot_api__pb2.HealthRequest.SerializeToString),
                response_deserializer=octave_dot_v1_dot_api__pb2.HealthResponse.FromString,
                _registered_method=True)


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

    def SubscribeState(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 GetVersion(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 Control(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 Update(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 Aquire(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 Identify(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 Monitor(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 Explore(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 Save(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 Recall(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 List(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 Reset(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 Health(self, request_iterator, 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_OctaveServiceServicer_to_server(servicer, server):
    rpc_method_handlers = {
            'SubscribeState': grpc.unary_stream_rpc_method_handler(
                    servicer.SubscribeState,
                    request_deserializer=octave_dot_v1_dot_api__pb2.SubscribeStateRequest.FromString,
                    response_serializer=octave_dot_v1_dot_api__pb2.SubscribeStateResponse.SerializeToString,
            ),
            'GetVersion': grpc.unary_unary_rpc_method_handler(
                    servicer.GetVersion,
                    request_deserializer=octave_dot_v1_dot_api__pb2.GetVersionRequest.FromString,
                    response_serializer=octave_dot_v1_dot_api__pb2.GetVersionResponse.SerializeToString,
            ),
            'Control': grpc.unary_unary_rpc_method_handler(
                    servicer.Control,
                    request_deserializer=octave_dot_v1_dot_api__pb2.ControlRequest.FromString,
                    response_serializer=octave_dot_v1_dot_api__pb2.ControlResponse.SerializeToString,
            ),
            'Update': grpc.unary_unary_rpc_method_handler(
                    servicer.Update,
                    request_deserializer=octave_dot_v1_dot_api__pb2.UpdateRequest.FromString,
                    response_serializer=octave_dot_v1_dot_api__pb2.UpdateResponse.SerializeToString,
            ),
            'Aquire': grpc.unary_unary_rpc_method_handler(
                    servicer.Aquire,
                    request_deserializer=octave_dot_v1_dot_api__pb2.AquireRequest.FromString,
                    response_serializer=octave_dot_v1_dot_api__pb2.AquireResponse.SerializeToString,
            ),
            'Identify': grpc.unary_unary_rpc_method_handler(
                    servicer.Identify,
                    request_deserializer=octave_dot_v1_dot_api__pb2.IdentifyRequest.FromString,
                    response_serializer=octave_dot_v1_dot_api__pb2.IdentifyResponse.SerializeToString,
            ),
            'Monitor': grpc.unary_unary_rpc_method_handler(
                    servicer.Monitor,
                    request_deserializer=octave_dot_v1_dot_api__pb2.MonitorRequest.FromString,
                    response_serializer=octave_dot_v1_dot_api__pb2.MonitorResponse.SerializeToString,
            ),
            'Explore': grpc.unary_unary_rpc_method_handler(
                    servicer.Explore,
                    request_deserializer=octave_dot_v1_dot_api__pb2.ExploreRequest.FromString,
                    response_serializer=octave_dot_v1_dot_api__pb2.ExploreResponse.SerializeToString,
            ),
            'Save': grpc.unary_unary_rpc_method_handler(
                    servicer.Save,
                    request_deserializer=octave_dot_v1_dot_api__pb2.SaveRequest.FromString,
                    response_serializer=octave_dot_v1_dot_api__pb2.SaveResponse.SerializeToString,
            ),
            'Recall': grpc.unary_unary_rpc_method_handler(
                    servicer.Recall,
                    request_deserializer=octave_dot_v1_dot_api__pb2.RecallRequest.FromString,
                    response_serializer=octave_dot_v1_dot_api__pb2.RecallResponse.SerializeToString,
            ),
            'List': grpc.unary_unary_rpc_method_handler(
                    servicer.List,
                    request_deserializer=octave_dot_v1_dot_api__pb2.ListRequest.FromString,
                    response_serializer=octave_dot_v1_dot_api__pb2.ListResponse.SerializeToString,
            ),
            'Reset': grpc.unary_unary_rpc_method_handler(
                    servicer.Reset,
                    request_deserializer=octave_dot_v1_dot_api__pb2.ResetRequest.FromString,
                    response_serializer=octave_dot_v1_dot_api__pb2.ResetResponse.SerializeToString,
            ),
            'Health': grpc.stream_stream_rpc_method_handler(
                    servicer.Health,
                    request_deserializer=octave_dot_v1_dot_api__pb2.HealthRequest.FromString,
                    response_serializer=octave_dot_v1_dot_api__pb2.HealthResponse.SerializeToString,
            ),
    }
    generic_handler = grpc.method_handlers_generic_handler(
            'quantummachines.octave.api.v1.OctaveService', rpc_method_handlers)
    server.add_generic_rpc_handlers((generic_handler,))
    server.add_registered_method_handlers('quantummachines.octave.api.v1.OctaveService', rpc_method_handlers)


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

    @staticmethod
    def SubscribeState(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_stream(
            request,
            target,
            '/quantummachines.octave.api.v1.OctaveService/SubscribeState',
            octave_dot_v1_dot_api__pb2.SubscribeStateRequest.SerializeToString,
            octave_dot_v1_dot_api__pb2.SubscribeStateResponse.FromString,
            options,
            channel_credentials,
            insecure,
            call_credentials,
            compression,
            wait_for_ready,
            timeout,
            metadata,
            _registered_method=True)

    @staticmethod
    def GetVersion(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,
            '/quantummachines.octave.api.v1.OctaveService/GetVersion',
            octave_dot_v1_dot_api__pb2.GetVersionRequest.SerializeToString,
            octave_dot_v1_dot_api__pb2.GetVersionResponse.FromString,
            options,
            channel_credentials,
            insecure,
            call_credentials,
            compression,
            wait_for_ready,
            timeout,
            metadata,
            _registered_method=True)

    @staticmethod
    def Control(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,
            '/quantummachines.octave.api.v1.OctaveService/Control',
            octave_dot_v1_dot_api__pb2.ControlRequest.SerializeToString,
            octave_dot_v1_dot_api__pb2.ControlResponse.FromString,
            options,
            channel_credentials,
            insecure,
            call_credentials,
            compression,
            wait_for_ready,
            timeout,
            metadata,
            _registered_method=True)

    @staticmethod
    def Update(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,
            '/quantummachines.octave.api.v1.OctaveService/Update',
            octave_dot_v1_dot_api__pb2.UpdateRequest.SerializeToString,
            octave_dot_v1_dot_api__pb2.UpdateResponse.FromString,
            options,
            channel_credentials,
            insecure,
            call_credentials,
            compression,
            wait_for_ready,
            timeout,
            metadata,
            _registered_method=True)

    @staticmethod
    def Aquire(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,
            '/quantummachines.octave.api.v1.OctaveService/Aquire',
            octave_dot_v1_dot_api__pb2.AquireRequest.SerializeToString,
            octave_dot_v1_dot_api__pb2.AquireResponse.FromString,
            options,
            channel_credentials,
            insecure,
            call_credentials,
            compression,
            wait_for_ready,
            timeout,
            metadata,
            _registered_method=True)

    @staticmethod
    def Identify(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,
            '/quantummachines.octave.api.v1.OctaveService/Identify',
            octave_dot_v1_dot_api__pb2.IdentifyRequest.SerializeToString,
            octave_dot_v1_dot_api__pb2.IdentifyResponse.FromString,
            options,
            channel_credentials,
            insecure,
            call_credentials,
            compression,
            wait_for_ready,
            timeout,
            metadata,
            _registered_method=True)

    @staticmethod
    def Monitor(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,
            '/quantummachines.octave.api.v1.OctaveService/Monitor',
            octave_dot_v1_dot_api__pb2.MonitorRequest.SerializeToString,
            octave_dot_v1_dot_api__pb2.MonitorResponse.FromString,
            options,
            channel_credentials,
            insecure,
            call_credentials,
            compression,
            wait_for_ready,
            timeout,
            metadata,
            _registered_method=True)

    @staticmethod
    def Explore(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,
            '/quantummachines.octave.api.v1.OctaveService/Explore',
            octave_dot_v1_dot_api__pb2.ExploreRequest.SerializeToString,
            octave_dot_v1_dot_api__pb2.ExploreResponse.FromString,
            options,
            channel_credentials,
            insecure,
            call_credentials,
            compression,
            wait_for_ready,
            timeout,
            metadata,
            _registered_method=True)

    @staticmethod
    def Save(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,
            '/quantummachines.octave.api.v1.OctaveService/Save',
            octave_dot_v1_dot_api__pb2.SaveRequest.SerializeToString,
            octave_dot_v1_dot_api__pb2.SaveResponse.FromString,
            options,
            channel_credentials,
            insecure,
            call_credentials,
            compression,
            wait_for_ready,
            timeout,
            metadata,
            _registered_method=True)

    @staticmethod
    def Recall(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,
            '/quantummachines.octave.api.v1.OctaveService/Recall',
            octave_dot_v1_dot_api__pb2.RecallRequest.SerializeToString,
            octave_dot_v1_dot_api__pb2.RecallResponse.FromString,
            options,
            channel_credentials,
            insecure,
            call_credentials,
            compression,
            wait_for_ready,
            timeout,
            metadata,
            _registered_method=True)

    @staticmethod
    def List(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,
            '/quantummachines.octave.api.v1.OctaveService/List',
            octave_dot_v1_dot_api__pb2.ListRequest.SerializeToString,
            octave_dot_v1_dot_api__pb2.ListResponse.FromString,
            options,
            channel_credentials,
            insecure,
            call_credentials,
            compression,
            wait_for_ready,
            timeout,
            metadata,
            _registered_method=True)

    @staticmethod
    def Reset(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,
            '/quantummachines.octave.api.v1.OctaveService/Reset',
            octave_dot_v1_dot_api__pb2.ResetRequest.SerializeToString,
            octave_dot_v1_dot_api__pb2.ResetResponse.FromString,
            options,
            channel_credentials,
            insecure,
            call_credentials,
            compression,
            wait_for_ready,
            timeout,
            metadata,
            _registered_method=True)

    @staticmethod
    def Health(request_iterator,
            target,
            options=(),
            channel_credentials=None,
            call_credentials=None,
            insecure=False,
            compression=None,
            wait_for_ready=None,
            timeout=None,
            metadata=None):
        return grpc.experimental.stream_stream(
            request_iterator,
            target,
            '/quantummachines.octave.api.v1.OctaveService/Health',
            octave_dot_v1_dot_api__pb2.HealthRequest.SerializeToString,
            octave_dot_v1_dot_api__pb2.HealthResponse.FromString,
            options,
            channel_credentials,
            insecure,
            call_credentials,
            compression,
            wait_for_ready,
            timeout,
            metadata,
            _registered_method=True)
