# Copyright 2024 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
#     http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

# 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 google.protobuf import empty_pb2 as google_dot_protobuf_dot_empty__pb2
from py_lab_hal.proto import py_lab_hal_pb2 as py__lab__hal_dot_proto_dot_py__lab__hal__pb2

GRPC_GENERATED_VERSION = '1.64.1'
GRPC_VERSION = grpc.__version__
EXPECTED_ERROR_RELEASE = '1.65.0'
SCHEDULED_RELEASE_DATE = 'June 25, 2024'
_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:
    warnings.warn(
        f'The grpc package installed is at version {GRPC_VERSION},'
        + f' but the generated code in py_lab_hal/proto/py_lab_hal_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}.'
        + f' This warning will become an error in {EXPECTED_ERROR_RELEASE},'
        + f' scheduled for release on {SCHEDULED_RELEASE_DATE}.',
        RuntimeWarning
    )


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

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

        Args:
            channel: A grpc.Channel.
        """
        self.BasicSystem = channel.unary_unary(
                '/BasicSystem/BasicSystem',
                request_serializer=py__lab__hal_dot_proto_dot_py__lab__hal__pb2.SystemRequest.SerializeToString,
                response_deserializer=py__lab__hal_dot_proto_dot_py__lab__hal__pb2.SystemResponse.FromString,
                _registered_method=True)


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

    def BasicSystem(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_BasicSystemServicer_to_server(servicer, server):
    rpc_method_handlers = {
            'BasicSystem': grpc.unary_unary_rpc_method_handler(
                    servicer.BasicSystem,
                    request_deserializer=py__lab__hal_dot_proto_dot_py__lab__hal__pb2.SystemRequest.FromString,
                    response_serializer=py__lab__hal_dot_proto_dot_py__lab__hal__pb2.SystemResponse.SerializeToString,
            ),
    }
    generic_handler = grpc.method_handlers_generic_handler(
            'BasicSystem', rpc_method_handlers)
    server.add_generic_rpc_handlers((generic_handler,))
    server.add_registered_method_handlers('BasicSystem', rpc_method_handlers)


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

    @staticmethod
    def BasicSystem(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,
            '/BasicSystem/BasicSystem',
            py__lab__hal_dot_proto_dot_py__lab__hal__pb2.SystemRequest.SerializeToString,
            py__lab__hal_dot_proto_dot_py__lab__hal__pb2.SystemResponse.FromString,
            options,
            channel_credentials,
            insecure,
            call_credentials,
            compression,
            wait_for_ready,
            timeout,
            metadata,
            _registered_method=True)


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

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

        Args:
            channel: A grpc.Channel.
        """
        self.Init = channel.unary_unary(
                '/Instrument/Init',
                request_serializer=py__lab__hal_dot_proto_dot_py__lab__hal__pb2.InstRequest.SerializeToString,
                response_deserializer=py__lab__hal_dot_proto_dot_py__lab__hal__pb2.InstResponse.FromString,
                _registered_method=True)
        self.Close = channel.unary_unary(
                '/Instrument/Close',
                request_serializer=py__lab__hal_dot_proto_dot_py__lab__hal__pb2.CloseRequest.SerializeToString,
                response_deserializer=py__lab__hal_dot_proto_dot_py__lab__hal__pb2.CloseResponse.FromString,
                _registered_method=True)
        self.Send = channel.unary_unary(
                '/Instrument/Send',
                request_serializer=py__lab__hal_dot_proto_dot_py__lab__hal__pb2.SendRequest.SerializeToString,
                response_deserializer=google_dot_protobuf_dot_empty__pb2.Empty.FromString,
                _registered_method=True)
        self.Recv = channel.unary_unary(
                '/Instrument/Recv',
                request_serializer=py__lab__hal_dot_proto_dot_py__lab__hal__pb2.RecvRequest.SerializeToString,
                response_deserializer=py__lab__hal_dot_proto_dot_py__lab__hal__pb2.RecvResponse.FromString,
                _registered_method=True)
        self.Query = channel.unary_unary(
                '/Instrument/Query',
                request_serializer=py__lab__hal_dot_proto_dot_py__lab__hal__pb2.SendRequest.SerializeToString,
                response_deserializer=py__lab__hal_dot_proto_dot_py__lab__hal__pb2.RecvResponse.FromString,
                _registered_method=True)
        self.SendData = channel.unary_unary(
                '/Instrument/SendData',
                request_serializer=py__lab__hal_dot_proto_dot_py__lab__hal__pb2.SendDataRequest.SerializeToString,
                response_deserializer=google_dot_protobuf_dot_empty__pb2.Empty.FromString,
                _registered_method=True)
        self.RecvData = channel.unary_unary(
                '/Instrument/RecvData',
                request_serializer=py__lab__hal_dot_proto_dot_py__lab__hal__pb2.RecvRequest.SerializeToString,
                response_deserializer=py__lab__hal_dot_proto_dot_py__lab__hal__pb2.RecvDataResponse.FromString,
                _registered_method=True)
        self.QueryData = channel.unary_unary(
                '/Instrument/QueryData',
                request_serializer=py__lab__hal_dot_proto_dot_py__lab__hal__pb2.SendDataRequest.SerializeToString,
                response_deserializer=py__lab__hal_dot_proto_dot_py__lab__hal__pb2.RecvDataResponse.FromString,
                _registered_method=True)


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

    def Init(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 Send(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 Recv(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 Query(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 SendData(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 RecvData(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 QueryData(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_InstrumentServicer_to_server(servicer, server):
    rpc_method_handlers = {
            'Init': grpc.unary_unary_rpc_method_handler(
                    servicer.Init,
                    request_deserializer=py__lab__hal_dot_proto_dot_py__lab__hal__pb2.InstRequest.FromString,
                    response_serializer=py__lab__hal_dot_proto_dot_py__lab__hal__pb2.InstResponse.SerializeToString,
            ),
            'Close': grpc.unary_unary_rpc_method_handler(
                    servicer.Close,
                    request_deserializer=py__lab__hal_dot_proto_dot_py__lab__hal__pb2.CloseRequest.FromString,
                    response_serializer=py__lab__hal_dot_proto_dot_py__lab__hal__pb2.CloseResponse.SerializeToString,
            ),
            'Send': grpc.unary_unary_rpc_method_handler(
                    servicer.Send,
                    request_deserializer=py__lab__hal_dot_proto_dot_py__lab__hal__pb2.SendRequest.FromString,
                    response_serializer=google_dot_protobuf_dot_empty__pb2.Empty.SerializeToString,
            ),
            'Recv': grpc.unary_unary_rpc_method_handler(
                    servicer.Recv,
                    request_deserializer=py__lab__hal_dot_proto_dot_py__lab__hal__pb2.RecvRequest.FromString,
                    response_serializer=py__lab__hal_dot_proto_dot_py__lab__hal__pb2.RecvResponse.SerializeToString,
            ),
            'Query': grpc.unary_unary_rpc_method_handler(
                    servicer.Query,
                    request_deserializer=py__lab__hal_dot_proto_dot_py__lab__hal__pb2.SendRequest.FromString,
                    response_serializer=py__lab__hal_dot_proto_dot_py__lab__hal__pb2.RecvResponse.SerializeToString,
            ),
            'SendData': grpc.unary_unary_rpc_method_handler(
                    servicer.SendData,
                    request_deserializer=py__lab__hal_dot_proto_dot_py__lab__hal__pb2.SendDataRequest.FromString,
                    response_serializer=google_dot_protobuf_dot_empty__pb2.Empty.SerializeToString,
            ),
            'RecvData': grpc.unary_unary_rpc_method_handler(
                    servicer.RecvData,
                    request_deserializer=py__lab__hal_dot_proto_dot_py__lab__hal__pb2.RecvRequest.FromString,
                    response_serializer=py__lab__hal_dot_proto_dot_py__lab__hal__pb2.RecvDataResponse.SerializeToString,
            ),
            'QueryData': grpc.unary_unary_rpc_method_handler(
                    servicer.QueryData,
                    request_deserializer=py__lab__hal_dot_proto_dot_py__lab__hal__pb2.SendDataRequest.FromString,
                    response_serializer=py__lab__hal_dot_proto_dot_py__lab__hal__pb2.RecvDataResponse.SerializeToString,
            ),
    }
    generic_handler = grpc.method_handlers_generic_handler(
            'Instrument', rpc_method_handlers)
    server.add_generic_rpc_handlers((generic_handler,))
    server.add_registered_method_handlers('Instrument', rpc_method_handlers)


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

    @staticmethod
    def Init(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,
            '/Instrument/Init',
            py__lab__hal_dot_proto_dot_py__lab__hal__pb2.InstRequest.SerializeToString,
            py__lab__hal_dot_proto_dot_py__lab__hal__pb2.InstResponse.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,
            '/Instrument/Close',
            py__lab__hal_dot_proto_dot_py__lab__hal__pb2.CloseRequest.SerializeToString,
            py__lab__hal_dot_proto_dot_py__lab__hal__pb2.CloseResponse.FromString,
            options,
            channel_credentials,
            insecure,
            call_credentials,
            compression,
            wait_for_ready,
            timeout,
            metadata,
            _registered_method=True)

    @staticmethod
    def Send(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,
            '/Instrument/Send',
            py__lab__hal_dot_proto_dot_py__lab__hal__pb2.SendRequest.SerializeToString,
            google_dot_protobuf_dot_empty__pb2.Empty.FromString,
            options,
            channel_credentials,
            insecure,
            call_credentials,
            compression,
            wait_for_ready,
            timeout,
            metadata,
            _registered_method=True)

    @staticmethod
    def Recv(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,
            '/Instrument/Recv',
            py__lab__hal_dot_proto_dot_py__lab__hal__pb2.RecvRequest.SerializeToString,
            py__lab__hal_dot_proto_dot_py__lab__hal__pb2.RecvResponse.FromString,
            options,
            channel_credentials,
            insecure,
            call_credentials,
            compression,
            wait_for_ready,
            timeout,
            metadata,
            _registered_method=True)

    @staticmethod
    def Query(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,
            '/Instrument/Query',
            py__lab__hal_dot_proto_dot_py__lab__hal__pb2.SendRequest.SerializeToString,
            py__lab__hal_dot_proto_dot_py__lab__hal__pb2.RecvResponse.FromString,
            options,
            channel_credentials,
            insecure,
            call_credentials,
            compression,
            wait_for_ready,
            timeout,
            metadata,
            _registered_method=True)

    @staticmethod
    def SendData(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,
            '/Instrument/SendData',
            py__lab__hal_dot_proto_dot_py__lab__hal__pb2.SendDataRequest.SerializeToString,
            google_dot_protobuf_dot_empty__pb2.Empty.FromString,
            options,
            channel_credentials,
            insecure,
            call_credentials,
            compression,
            wait_for_ready,
            timeout,
            metadata,
            _registered_method=True)

    @staticmethod
    def RecvData(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,
            '/Instrument/RecvData',
            py__lab__hal_dot_proto_dot_py__lab__hal__pb2.RecvRequest.SerializeToString,
            py__lab__hal_dot_proto_dot_py__lab__hal__pb2.RecvDataResponse.FromString,
            options,
            channel_credentials,
            insecure,
            call_credentials,
            compression,
            wait_for_ready,
            timeout,
            metadata,
            _registered_method=True)

    @staticmethod
    def QueryData(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,
            '/Instrument/QueryData',
            py__lab__hal_dot_proto_dot_py__lab__hal__pb2.SendDataRequest.SerializeToString,
            py__lab__hal_dot_proto_dot_py__lab__hal__pb2.RecvDataResponse.FromString,
            options,
            channel_credentials,
            insecure,
            call_credentials,
            compression,
            wait_for_ready,
            timeout,
            metadata,
            _registered_method=True)
