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

import imu_service_pb2 as imu__service__pb2
import orchestrator_service_pb2 as orchestrator__service__pb2

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

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

        Args:
            channel: A grpc.Channel.
        """
        self.HealthCheck = channel.unary_unary(
                '/orchestrator_service.OrchestratorService/HealthCheck',
                request_serializer=orchestrator__service__pb2.HealthCheckRequest.SerializeToString,
                response_deserializer=orchestrator__service__pb2.HealthCheckResponse.FromString,
                _registered_method=True)
        self.OrchestratorStatus = channel.unary_unary(
                '/orchestrator_service.OrchestratorService/OrchestratorStatus',
                request_serializer=orchestrator__service__pb2.OrchestratorStatusRequest.SerializeToString,
                response_deserializer=orchestrator__service__pb2.OrchestratorStatusResponse.FromString,
                _registered_method=True)
        self.ReceiveIMUData = channel.unary_unary(
                '/orchestrator_service.OrchestratorService/ReceiveIMUData',
                request_serializer=imu__service__pb2.IMUPayload.SerializeToString,
                response_deserializer=imu__service__pb2.IMUPayloadResponse.FromString,
                _registered_method=True)


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

    def HealthCheck(self, request, context):
        """HealthCheck is used to check the health of the orchestrator service.
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')

    def OrchestratorStatus(self, request, context):
        """OrchestratorStatus is used to send orchestrator status updates.
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')

    def ReceiveIMUData(self, request, context):
        """Receive data from sensors.
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')


def add_OrchestratorServiceServicer_to_server(servicer, server):
    rpc_method_handlers = {
            'HealthCheck': grpc.unary_unary_rpc_method_handler(
                    servicer.HealthCheck,
                    request_deserializer=orchestrator__service__pb2.HealthCheckRequest.FromString,
                    response_serializer=orchestrator__service__pb2.HealthCheckResponse.SerializeToString,
            ),
            'OrchestratorStatus': grpc.unary_unary_rpc_method_handler(
                    servicer.OrchestratorStatus,
                    request_deserializer=orchestrator__service__pb2.OrchestratorStatusRequest.FromString,
                    response_serializer=orchestrator__service__pb2.OrchestratorStatusResponse.SerializeToString,
            ),
            'ReceiveIMUData': grpc.unary_unary_rpc_method_handler(
                    servicer.ReceiveIMUData,
                    request_deserializer=imu__service__pb2.IMUPayload.FromString,
                    response_serializer=imu__service__pb2.IMUPayloadResponse.SerializeToString,
            ),
    }
    generic_handler = grpc.method_handlers_generic_handler(
            'orchestrator_service.OrchestratorService', rpc_method_handlers)
    server.add_generic_rpc_handlers((generic_handler,))
    server.add_registered_method_handlers('orchestrator_service.OrchestratorService', rpc_method_handlers)


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

    @staticmethod
    def HealthCheck(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,
            '/orchestrator_service.OrchestratorService/HealthCheck',
            orchestrator__service__pb2.HealthCheckRequest.SerializeToString,
            orchestrator__service__pb2.HealthCheckResponse.FromString,
            options,
            channel_credentials,
            insecure,
            call_credentials,
            compression,
            wait_for_ready,
            timeout,
            metadata,
            _registered_method=True)

    @staticmethod
    def OrchestratorStatus(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,
            '/orchestrator_service.OrchestratorService/OrchestratorStatus',
            orchestrator__service__pb2.OrchestratorStatusRequest.SerializeToString,
            orchestrator__service__pb2.OrchestratorStatusResponse.FromString,
            options,
            channel_credentials,
            insecure,
            call_credentials,
            compression,
            wait_for_ready,
            timeout,
            metadata,
            _registered_method=True)

    @staticmethod
    def ReceiveIMUData(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,
            '/orchestrator_service.OrchestratorService/ReceiveIMUData',
            imu__service__pb2.IMUPayload.SerializeToString,
            imu__service__pb2.IMUPayloadResponse.FromString,
            options,
            channel_credentials,
            insecure,
            call_credentials,
            compression,
            wait_for_ready,
            timeout,
            metadata,
            _registered_method=True)
