# 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 . import metronomo_pb2 as metronomo__pb2

GRPC_GENERATED_VERSION = '1.66.0'
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 metronomo_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 MetronomoStub(object):
    """Missing associated documentation comment in .proto file."""

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

        Args:
            channel: A grpc.Channel.
        """
        self.Idn = channel.unary_unary(
                '/metronomo.Metronomo/Idn',
                request_serializer=metronomo__pb2.IdnArg.SerializeToString,
                response_deserializer=metronomo__pb2.IdnRet.FromString,
                _registered_method=True)
        self.Echo = channel.unary_unary(
                '/metronomo.Metronomo/Echo',
                request_serializer=metronomo__pb2.EchoArg.SerializeToString,
                response_deserializer=metronomo__pb2.EchoRet.FromString,
                _registered_method=True)
        self.Sleep = channel.unary_unary(
                '/metronomo.Metronomo/Sleep',
                request_serializer=metronomo__pb2.SleepArg.SerializeToString,
                response_deserializer=metronomo__pb2.SleepRet.FromString,
                _registered_method=True)
        self.ClkReset = channel.unary_unary(
                '/metronomo.Metronomo/ClkReset',
                request_serializer=metronomo__pb2.ClkResetArg.SerializeToString,
                response_deserializer=metronomo__pb2.ClkResetRet.FromString,
                _registered_method=True)
        self.ClkProgram = channel.unary_unary(
                '/metronomo.Metronomo/ClkProgram',
                request_serializer=metronomo__pb2.ClkProgramArg.SerializeToString,
                response_deserializer=metronomo__pb2.ClkProgramRet.FromString,
                _registered_method=True)
        self.ClkRef = channel.unary_unary(
                '/metronomo.Metronomo/ClkRef',
                request_serializer=metronomo__pb2.ClkRefArg.SerializeToString,
                response_deserializer=metronomo__pb2.ClkRefRet.FromString,
                _registered_method=True)
        self.ClkOutFreq = channel.unary_unary(
                '/metronomo.Metronomo/ClkOutFreq',
                request_serializer=metronomo__pb2.ClkOutFreqArg.SerializeToString,
                response_deserializer=metronomo__pb2.ClkOutFreqRet.FromString,
                _registered_method=True)
        self.WaitForLock = channel.unary_unary(
                '/metronomo.Metronomo/WaitForLock',
                request_serializer=metronomo__pb2.WaitForLockArg.SerializeToString,
                response_deserializer=metronomo__pb2.WaitForLockRet.FromString,
                _registered_method=True)
        self.IsLocked = channel.unary_unary(
                '/metronomo.Metronomo/IsLocked',
                request_serializer=metronomo__pb2.IsLockedArg.SerializeToString,
                response_deserializer=metronomo__pb2.IsLockedRet.FromString,
                _registered_method=True)
        self.SetSysrefMode = channel.unary_unary(
                '/metronomo.Metronomo/SetSysrefMode',
                request_serializer=metronomo__pb2.SetSysrefModeArg.SerializeToString,
                response_deserializer=metronomo__pb2.SetSysrefModeRet.FromString,
                _registered_method=True)
        self.SyncOut = channel.unary_unary(
                '/metronomo.Metronomo/SyncOut',
                request_serializer=metronomo__pb2.SyncOutArg.SerializeToString,
                response_deserializer=metronomo__pb2.SyncOutRet.FromString,
                _registered_method=True)
        self.TestFail = channel.unary_unary(
                '/metronomo.Metronomo/TestFail',
                request_serializer=metronomo__pb2.TestFailArg.SerializeToString,
                response_deserializer=metronomo__pb2.TestFailRet.FromString,
                _registered_method=True)


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

    def Idn(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 Echo(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 Sleep(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 ClkReset(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 ClkProgram(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 ClkRef(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 ClkOutFreq(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 WaitForLock(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 IsLocked(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 SetSysrefMode(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 SyncOut(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 TestFail(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_MetronomoServicer_to_server(servicer, server):
    rpc_method_handlers = {
            'Idn': grpc.unary_unary_rpc_method_handler(
                    servicer.Idn,
                    request_deserializer=metronomo__pb2.IdnArg.FromString,
                    response_serializer=metronomo__pb2.IdnRet.SerializeToString,
            ),
            'Echo': grpc.unary_unary_rpc_method_handler(
                    servicer.Echo,
                    request_deserializer=metronomo__pb2.EchoArg.FromString,
                    response_serializer=metronomo__pb2.EchoRet.SerializeToString,
            ),
            'Sleep': grpc.unary_unary_rpc_method_handler(
                    servicer.Sleep,
                    request_deserializer=metronomo__pb2.SleepArg.FromString,
                    response_serializer=metronomo__pb2.SleepRet.SerializeToString,
            ),
            'ClkReset': grpc.unary_unary_rpc_method_handler(
                    servicer.ClkReset,
                    request_deserializer=metronomo__pb2.ClkResetArg.FromString,
                    response_serializer=metronomo__pb2.ClkResetRet.SerializeToString,
            ),
            'ClkProgram': grpc.unary_unary_rpc_method_handler(
                    servicer.ClkProgram,
                    request_deserializer=metronomo__pb2.ClkProgramArg.FromString,
                    response_serializer=metronomo__pb2.ClkProgramRet.SerializeToString,
            ),
            'ClkRef': grpc.unary_unary_rpc_method_handler(
                    servicer.ClkRef,
                    request_deserializer=metronomo__pb2.ClkRefArg.FromString,
                    response_serializer=metronomo__pb2.ClkRefRet.SerializeToString,
            ),
            'ClkOutFreq': grpc.unary_unary_rpc_method_handler(
                    servicer.ClkOutFreq,
                    request_deserializer=metronomo__pb2.ClkOutFreqArg.FromString,
                    response_serializer=metronomo__pb2.ClkOutFreqRet.SerializeToString,
            ),
            'WaitForLock': grpc.unary_unary_rpc_method_handler(
                    servicer.WaitForLock,
                    request_deserializer=metronomo__pb2.WaitForLockArg.FromString,
                    response_serializer=metronomo__pb2.WaitForLockRet.SerializeToString,
            ),
            'IsLocked': grpc.unary_unary_rpc_method_handler(
                    servicer.IsLocked,
                    request_deserializer=metronomo__pb2.IsLockedArg.FromString,
                    response_serializer=metronomo__pb2.IsLockedRet.SerializeToString,
            ),
            'SetSysrefMode': grpc.unary_unary_rpc_method_handler(
                    servicer.SetSysrefMode,
                    request_deserializer=metronomo__pb2.SetSysrefModeArg.FromString,
                    response_serializer=metronomo__pb2.SetSysrefModeRet.SerializeToString,
            ),
            'SyncOut': grpc.unary_unary_rpc_method_handler(
                    servicer.SyncOut,
                    request_deserializer=metronomo__pb2.SyncOutArg.FromString,
                    response_serializer=metronomo__pb2.SyncOutRet.SerializeToString,
            ),
            'TestFail': grpc.unary_unary_rpc_method_handler(
                    servicer.TestFail,
                    request_deserializer=metronomo__pb2.TestFailArg.FromString,
                    response_serializer=metronomo__pb2.TestFailRet.SerializeToString,
            ),
    }
    generic_handler = grpc.method_handlers_generic_handler(
            'metronomo.Metronomo', rpc_method_handlers)
    server.add_generic_rpc_handlers((generic_handler,))
    server.add_registered_method_handlers('metronomo.Metronomo', rpc_method_handlers)


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

    @staticmethod
    def Idn(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,
            '/metronomo.Metronomo/Idn',
            metronomo__pb2.IdnArg.SerializeToString,
            metronomo__pb2.IdnRet.FromString,
            options,
            channel_credentials,
            insecure,
            call_credentials,
            compression,
            wait_for_ready,
            timeout,
            metadata,
            _registered_method=True)

    @staticmethod
    def Echo(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,
            '/metronomo.Metronomo/Echo',
            metronomo__pb2.EchoArg.SerializeToString,
            metronomo__pb2.EchoRet.FromString,
            options,
            channel_credentials,
            insecure,
            call_credentials,
            compression,
            wait_for_ready,
            timeout,
            metadata,
            _registered_method=True)

    @staticmethod
    def Sleep(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,
            '/metronomo.Metronomo/Sleep',
            metronomo__pb2.SleepArg.SerializeToString,
            metronomo__pb2.SleepRet.FromString,
            options,
            channel_credentials,
            insecure,
            call_credentials,
            compression,
            wait_for_ready,
            timeout,
            metadata,
            _registered_method=True)

    @staticmethod
    def ClkReset(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,
            '/metronomo.Metronomo/ClkReset',
            metronomo__pb2.ClkResetArg.SerializeToString,
            metronomo__pb2.ClkResetRet.FromString,
            options,
            channel_credentials,
            insecure,
            call_credentials,
            compression,
            wait_for_ready,
            timeout,
            metadata,
            _registered_method=True)

    @staticmethod
    def ClkProgram(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,
            '/metronomo.Metronomo/ClkProgram',
            metronomo__pb2.ClkProgramArg.SerializeToString,
            metronomo__pb2.ClkProgramRet.FromString,
            options,
            channel_credentials,
            insecure,
            call_credentials,
            compression,
            wait_for_ready,
            timeout,
            metadata,
            _registered_method=True)

    @staticmethod
    def ClkRef(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,
            '/metronomo.Metronomo/ClkRef',
            metronomo__pb2.ClkRefArg.SerializeToString,
            metronomo__pb2.ClkRefRet.FromString,
            options,
            channel_credentials,
            insecure,
            call_credentials,
            compression,
            wait_for_ready,
            timeout,
            metadata,
            _registered_method=True)

    @staticmethod
    def ClkOutFreq(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,
            '/metronomo.Metronomo/ClkOutFreq',
            metronomo__pb2.ClkOutFreqArg.SerializeToString,
            metronomo__pb2.ClkOutFreqRet.FromString,
            options,
            channel_credentials,
            insecure,
            call_credentials,
            compression,
            wait_for_ready,
            timeout,
            metadata,
            _registered_method=True)

    @staticmethod
    def WaitForLock(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,
            '/metronomo.Metronomo/WaitForLock',
            metronomo__pb2.WaitForLockArg.SerializeToString,
            metronomo__pb2.WaitForLockRet.FromString,
            options,
            channel_credentials,
            insecure,
            call_credentials,
            compression,
            wait_for_ready,
            timeout,
            metadata,
            _registered_method=True)

    @staticmethod
    def IsLocked(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,
            '/metronomo.Metronomo/IsLocked',
            metronomo__pb2.IsLockedArg.SerializeToString,
            metronomo__pb2.IsLockedRet.FromString,
            options,
            channel_credentials,
            insecure,
            call_credentials,
            compression,
            wait_for_ready,
            timeout,
            metadata,
            _registered_method=True)

    @staticmethod
    def SetSysrefMode(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,
            '/metronomo.Metronomo/SetSysrefMode',
            metronomo__pb2.SetSysrefModeArg.SerializeToString,
            metronomo__pb2.SetSysrefModeRet.FromString,
            options,
            channel_credentials,
            insecure,
            call_credentials,
            compression,
            wait_for_ready,
            timeout,
            metadata,
            _registered_method=True)

    @staticmethod
    def SyncOut(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,
            '/metronomo.Metronomo/SyncOut',
            metronomo__pb2.SyncOutArg.SerializeToString,
            metronomo__pb2.SyncOutRet.FromString,
            options,
            channel_credentials,
            insecure,
            call_credentials,
            compression,
            wait_for_ready,
            timeout,
            metadata,
            _registered_method=True)

    @staticmethod
    def TestFail(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,
            '/metronomo.Metronomo/TestFail',
            metronomo__pb2.TestFailArg.SerializeToString,
            metronomo__pb2.TestFailRet.FromString,
            options,
            channel_credentials,
            insecure,
            call_credentials,
            compression,
            wait_for_ready,
            timeout,
            metadata,
            _registered_method=True)
