# 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 comms_pb2 as comms__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 comms_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 GetSetRunStub(object):
    """the GetSetRun service provides the fundamental driver functionality for Setting 
    values, getting them, and running commands.
    """

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

        Args:
            channel: A grpc.Channel.
        """
        self.Get = channel.unary_unary(
                '/bos.GetSetRun/Get',
                request_serializer=comms__pb2.GetRequest.SerializeToString,
                response_deserializer=comms__pb2.GetResponse.FromString,
                _registered_method=True)
        self.Set = channel.unary_unary(
                '/bos.GetSetRun/Set',
                request_serializer=comms__pb2.SetRequest.SerializeToString,
                response_deserializer=comms__pb2.SetResponse.FromString,
                _registered_method=True)


class GetSetRunServicer(object):
    """the GetSetRun service provides the fundamental driver functionality for Setting 
    values, getting them, and running commands.
    """

    def Get(self, request, context):
        """rpc for getting a value from a driver
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')

    def Set(self, request, context):
        """rpc for setting a value on a driver
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')


def add_GetSetRunServicer_to_server(servicer, server):
    rpc_method_handlers = {
            'Get': grpc.unary_unary_rpc_method_handler(
                    servicer.Get,
                    request_deserializer=comms__pb2.GetRequest.FromString,
                    response_serializer=comms__pb2.GetResponse.SerializeToString,
            ),
            'Set': grpc.unary_unary_rpc_method_handler(
                    servicer.Set,
                    request_deserializer=comms__pb2.SetRequest.FromString,
                    response_serializer=comms__pb2.SetResponse.SerializeToString,
            ),
    }
    generic_handler = grpc.method_handlers_generic_handler(
            'bos.GetSetRun', rpc_method_handlers)
    server.add_generic_rpc_handlers((generic_handler,))
    server.add_registered_method_handlers('bos.GetSetRun', rpc_method_handlers)


 # This class is part of an EXPERIMENTAL API.
class GetSetRun(object):
    """the GetSetRun service provides the fundamental driver functionality for Setting 
    values, getting them, and running commands.
    """

    @staticmethod
    def Get(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,
            '/bos.GetSetRun/Get',
            comms__pb2.GetRequest.SerializeToString,
            comms__pb2.GetResponse.FromString,
            options,
            channel_credentials,
            insecure,
            call_credentials,
            compression,
            wait_for_ready,
            timeout,
            metadata,
            _registered_method=True)

    @staticmethod
    def Set(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,
            '/bos.GetSetRun/Set',
            comms__pb2.SetRequest.SerializeToString,
            comms__pb2.SetResponse.FromString,
            options,
            channel_credentials,
            insecure,
            call_credentials,
            compression,
            wait_for_ready,
            timeout,
            metadata,
            _registered_method=True)


class SysmodStub(object):
    """the PointId (pid) service takes classes, names, or regexes
    """

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

        Args:
            channel: A grpc.Channel.
        """
        self.NameToPoint = channel.unary_unary(
                '/bos.Sysmod/NameToPoint',
                request_serializer=comms__pb2.GetRequest.SerializeToString,
                response_deserializer=comms__pb2.QueryResponse.FromString,
                _registered_method=True)
        self.PointToName = channel.unary_unary(
                '/bos.Sysmod/PointToName',
                request_serializer=comms__pb2.GetRequest.SerializeToString,
                response_deserializer=comms__pb2.QueryResponse.FromString,
                _registered_method=True)
        self.TypeToPoint = channel.unary_unary(
                '/bos.Sysmod/TypeToPoint',
                request_serializer=comms__pb2.GetRequest.SerializeToString,
                response_deserializer=comms__pb2.QueryResponse.FromString,
                _registered_method=True)
        self.LocationToPoint = channel.unary_unary(
                '/bos.Sysmod/LocationToPoint',
                request_serializer=comms__pb2.GetRequest.SerializeToString,
                response_deserializer=comms__pb2.QueryResponse.FromString,
                _registered_method=True)
        self.QueryPoints = channel.unary_unary(
                '/bos.Sysmod/QueryPoints',
                request_serializer=comms__pb2.PointQueryRequest.SerializeToString,
                response_deserializer=comms__pb2.QueryResponse.FromString,
                _registered_method=True)
        self.GetDriverXref = channel.unary_unary(
                '/bos.Sysmod/GetDriverXref',
                request_serializer=comms__pb2.GetRequest.SerializeToString,
                response_deserializer=comms__pb2.QueryResponse.FromString,
                _registered_method=True)


class SysmodServicer(object):
    """the PointId (pid) service takes classes, names, or regexes
    """

    def NameToPoint(self, request, context):
        """Key are the point names. Response is POINT_ID or POINT_ID_LIST
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')

    def PointToName(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 TypeToPoint(self, request, context):
        """Key are the class. Response is POINT_ID or POINT_ID_LIST
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')

    def LocationToPoint(self, request, context):
        """Key is the location. Response is POINT_ID or POINT_ID_LIST
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')

    def QueryPoints(self, request, context):
        """Takes a set of query params. Response is POINT_ID or POINT_ID_LIST
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')

    def GetDriverXref(self, request, context):
        """Takes a bos:Point. Returns the bos:xref of the corresponding driver 
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')


def add_SysmodServicer_to_server(servicer, server):
    rpc_method_handlers = {
            'NameToPoint': grpc.unary_unary_rpc_method_handler(
                    servicer.NameToPoint,
                    request_deserializer=comms__pb2.GetRequest.FromString,
                    response_serializer=comms__pb2.QueryResponse.SerializeToString,
            ),
            'PointToName': grpc.unary_unary_rpc_method_handler(
                    servicer.PointToName,
                    request_deserializer=comms__pb2.GetRequest.FromString,
                    response_serializer=comms__pb2.QueryResponse.SerializeToString,
            ),
            'TypeToPoint': grpc.unary_unary_rpc_method_handler(
                    servicer.TypeToPoint,
                    request_deserializer=comms__pb2.GetRequest.FromString,
                    response_serializer=comms__pb2.QueryResponse.SerializeToString,
            ),
            'LocationToPoint': grpc.unary_unary_rpc_method_handler(
                    servicer.LocationToPoint,
                    request_deserializer=comms__pb2.GetRequest.FromString,
                    response_serializer=comms__pb2.QueryResponse.SerializeToString,
            ),
            'QueryPoints': grpc.unary_unary_rpc_method_handler(
                    servicer.QueryPoints,
                    request_deserializer=comms__pb2.PointQueryRequest.FromString,
                    response_serializer=comms__pb2.QueryResponse.SerializeToString,
            ),
            'GetDriverXref': grpc.unary_unary_rpc_method_handler(
                    servicer.GetDriverXref,
                    request_deserializer=comms__pb2.GetRequest.FromString,
                    response_serializer=comms__pb2.QueryResponse.SerializeToString,
            ),
    }
    generic_handler = grpc.method_handlers_generic_handler(
            'bos.Sysmod', rpc_method_handlers)
    server.add_generic_rpc_handlers((generic_handler,))
    server.add_registered_method_handlers('bos.Sysmod', rpc_method_handlers)


 # This class is part of an EXPERIMENTAL API.
class Sysmod(object):
    """the PointId (pid) service takes classes, names, or regexes
    """

    @staticmethod
    def NameToPoint(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,
            '/bos.Sysmod/NameToPoint',
            comms__pb2.GetRequest.SerializeToString,
            comms__pb2.QueryResponse.FromString,
            options,
            channel_credentials,
            insecure,
            call_credentials,
            compression,
            wait_for_ready,
            timeout,
            metadata,
            _registered_method=True)

    @staticmethod
    def PointToName(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,
            '/bos.Sysmod/PointToName',
            comms__pb2.GetRequest.SerializeToString,
            comms__pb2.QueryResponse.FromString,
            options,
            channel_credentials,
            insecure,
            call_credentials,
            compression,
            wait_for_ready,
            timeout,
            metadata,
            _registered_method=True)

    @staticmethod
    def TypeToPoint(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,
            '/bos.Sysmod/TypeToPoint',
            comms__pb2.GetRequest.SerializeToString,
            comms__pb2.QueryResponse.FromString,
            options,
            channel_credentials,
            insecure,
            call_credentials,
            compression,
            wait_for_ready,
            timeout,
            metadata,
            _registered_method=True)

    @staticmethod
    def LocationToPoint(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,
            '/bos.Sysmod/LocationToPoint',
            comms__pb2.GetRequest.SerializeToString,
            comms__pb2.QueryResponse.FromString,
            options,
            channel_credentials,
            insecure,
            call_credentials,
            compression,
            wait_for_ready,
            timeout,
            metadata,
            _registered_method=True)

    @staticmethod
    def QueryPoints(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,
            '/bos.Sysmod/QueryPoints',
            comms__pb2.PointQueryRequest.SerializeToString,
            comms__pb2.QueryResponse.FromString,
            options,
            channel_credentials,
            insecure,
            call_credentials,
            compression,
            wait_for_ready,
            timeout,
            metadata,
            _registered_method=True)

    @staticmethod
    def GetDriverXref(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,
            '/bos.Sysmod/GetDriverXref',
            comms__pb2.GetRequest.SerializeToString,
            comms__pb2.QueryResponse.FromString,
            options,
            channel_credentials,
            insecure,
            call_credentials,
            compression,
            wait_for_ready,
            timeout,
            metadata,
            _registered_method=True)


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

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

        Args:
            channel: A grpc.Channel.
        """
        self.Ping = channel.unary_unary(
                '/bos.HealthCheck/Ping',
                request_serializer=comms__pb2.Empty.SerializeToString,
                response_deserializer=comms__pb2.Empty.FromString,
                _registered_method=True)


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

    def Ping(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_HealthCheckServicer_to_server(servicer, server):
    rpc_method_handlers = {
            'Ping': grpc.unary_unary_rpc_method_handler(
                    servicer.Ping,
                    request_deserializer=comms__pb2.Empty.FromString,
                    response_serializer=comms__pb2.Empty.SerializeToString,
            ),
    }
    generic_handler = grpc.method_handlers_generic_handler(
            'bos.HealthCheck', rpc_method_handlers)
    server.add_generic_rpc_handlers((generic_handler,))
    server.add_registered_method_handlers('bos.HealthCheck', rpc_method_handlers)


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

    @staticmethod
    def Ping(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,
            '/bos.HealthCheck/Ping',
            comms__pb2.Empty.SerializeToString,
            comms__pb2.Empty.FromString,
            options,
            channel_credentials,
            insecure,
            call_credentials,
            compression,
            wait_for_ready,
            timeout,
            metadata,
            _registered_method=True)
