# 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 engine_pb2 as engine__pb2

GRPC_GENERATED_VERSION = '1.78.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},'
        + ' but the generated code in engine_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 EngineServiceStub(object):
    """Missing associated documentation comment in .proto file."""

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

        Args:
            channel: A grpc.Channel.
        """
        self.PlaceOrder = channel.unary_unary(
                '/engine.EngineService/PlaceOrder',
                request_serializer=engine__pb2.OrderRequest.SerializeToString,
                response_deserializer=engine__pb2.OrderResponse.FromString,
                _registered_method=True)
        self.CancelOrder = channel.unary_unary(
                '/engine.EngineService/CancelOrder',
                request_serializer=engine__pb2.CancelRequest.SerializeToString,
                response_deserializer=engine__pb2.CancelResponse.FromString,
                _registered_method=True)
        self.GetPositions = channel.unary_unary(
                '/engine.EngineService/GetPositions',
                request_serializer=engine__pb2.PositionsRequest.SerializeToString,
                response_deserializer=engine__pb2.PositionsResponse.FromString,
                _registered_method=True)
        self.GetAccount = channel.unary_unary(
                '/engine.EngineService/GetAccount',
                request_serializer=engine__pb2.AccountRequest.SerializeToString,
                response_deserializer=engine__pb2.AccountResponse.FromString,
                _registered_method=True)
        self.GetOrder = channel.unary_unary(
                '/engine.EngineService/GetOrder',
                request_serializer=engine__pb2.GetOrderRequest.SerializeToString,
                response_deserializer=engine__pb2.OrderResponse.FromString,
                _registered_method=True)
        self.GetEngineStatus = channel.unary_unary(
                '/engine.EngineService/GetEngineStatus',
                request_serializer=engine__pb2.StatusRequest.SerializeToString,
                response_deserializer=engine__pb2.StatusResponse.FromString,
                _registered_method=True)
        self.ConfigureCredentials = channel.unary_unary(
                '/engine.EngineService/ConfigureCredentials',
                request_serializer=engine__pb2.CredentialsConfig.SerializeToString,
                response_deserializer=engine__pb2.ConfigResponse.FromString,
                _registered_method=True)
        self.UpdateConfig = channel.unary_unary(
                '/engine.EngineService/UpdateConfig',
                request_serializer=engine__pb2.ConfigUpdate.SerializeToString,
                response_deserializer=engine__pb2.ConfigResponse.FromString,
                _registered_method=True)
        self.StreamMarketData = channel.unary_stream(
                '/engine.EngineService/StreamMarketData',
                request_serializer=engine__pb2.SubscribeRequest.SerializeToString,
                response_deserializer=engine__pb2.MarketDataUpdate.FromString,
                _registered_method=True)
        self.StreamOrderUpdates = channel.unary_stream(
                '/engine.EngineService/StreamOrderUpdates',
                request_serializer=engine__pb2.OrderSubscribeRequest.SerializeToString,
                response_deserializer=engine__pb2.OrderUpdate.FromString,
                _registered_method=True)
        self.DeployStrategy = channel.unary_unary(
                '/engine.EngineService/DeployStrategy',
                request_serializer=engine__pb2.DeployStrategyRequest.SerializeToString,
                response_deserializer=engine__pb2.DeployStrategyResponse.FromString,
                _registered_method=True)
        self.StopStrategy = channel.unary_unary(
                '/engine.EngineService/StopStrategy',
                request_serializer=engine__pb2.StopStrategyRequest.SerializeToString,
                response_deserializer=engine__pb2.ConfigResponse.FromString,
                _registered_method=True)
        self.ListExecutors = channel.unary_unary(
                '/engine.EngineService/ListExecutors',
                request_serializer=engine__pb2.ListExecutorsRequest.SerializeToString,
                response_deserializer=engine__pb2.ListExecutorsResponse.FromString,
                _registered_method=True)
        self.GetExecutorStatus = channel.unary_unary(
                '/engine.EngineService/GetExecutorStatus',
                request_serializer=engine__pb2.GetExecutorStatusRequest.SerializeToString,
                response_deserializer=engine__pb2.ExecutorInfo.FromString,
                _registered_method=True)


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

    def PlaceOrder(self, request, context):
        """--- Existing RPCs ---
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')

    def CancelOrder(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 GetPositions(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 GetAccount(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 GetOrder(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 GetEngineStatus(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 ConfigureCredentials(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 UpdateConfig(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 StreamMarketData(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 StreamOrderUpdates(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 DeployStrategy(self, request, context):
        """--- Multi-tenant executor management ---
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')

    def StopStrategy(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 ListExecutors(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 GetExecutorStatus(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_EngineServiceServicer_to_server(servicer, server):
    rpc_method_handlers = {
            'PlaceOrder': grpc.unary_unary_rpc_method_handler(
                    servicer.PlaceOrder,
                    request_deserializer=engine__pb2.OrderRequest.FromString,
                    response_serializer=engine__pb2.OrderResponse.SerializeToString,
            ),
            'CancelOrder': grpc.unary_unary_rpc_method_handler(
                    servicer.CancelOrder,
                    request_deserializer=engine__pb2.CancelRequest.FromString,
                    response_serializer=engine__pb2.CancelResponse.SerializeToString,
            ),
            'GetPositions': grpc.unary_unary_rpc_method_handler(
                    servicer.GetPositions,
                    request_deserializer=engine__pb2.PositionsRequest.FromString,
                    response_serializer=engine__pb2.PositionsResponse.SerializeToString,
            ),
            'GetAccount': grpc.unary_unary_rpc_method_handler(
                    servicer.GetAccount,
                    request_deserializer=engine__pb2.AccountRequest.FromString,
                    response_serializer=engine__pb2.AccountResponse.SerializeToString,
            ),
            'GetOrder': grpc.unary_unary_rpc_method_handler(
                    servicer.GetOrder,
                    request_deserializer=engine__pb2.GetOrderRequest.FromString,
                    response_serializer=engine__pb2.OrderResponse.SerializeToString,
            ),
            'GetEngineStatus': grpc.unary_unary_rpc_method_handler(
                    servicer.GetEngineStatus,
                    request_deserializer=engine__pb2.StatusRequest.FromString,
                    response_serializer=engine__pb2.StatusResponse.SerializeToString,
            ),
            'ConfigureCredentials': grpc.unary_unary_rpc_method_handler(
                    servicer.ConfigureCredentials,
                    request_deserializer=engine__pb2.CredentialsConfig.FromString,
                    response_serializer=engine__pb2.ConfigResponse.SerializeToString,
            ),
            'UpdateConfig': grpc.unary_unary_rpc_method_handler(
                    servicer.UpdateConfig,
                    request_deserializer=engine__pb2.ConfigUpdate.FromString,
                    response_serializer=engine__pb2.ConfigResponse.SerializeToString,
            ),
            'StreamMarketData': grpc.unary_stream_rpc_method_handler(
                    servicer.StreamMarketData,
                    request_deserializer=engine__pb2.SubscribeRequest.FromString,
                    response_serializer=engine__pb2.MarketDataUpdate.SerializeToString,
            ),
            'StreamOrderUpdates': grpc.unary_stream_rpc_method_handler(
                    servicer.StreamOrderUpdates,
                    request_deserializer=engine__pb2.OrderSubscribeRequest.FromString,
                    response_serializer=engine__pb2.OrderUpdate.SerializeToString,
            ),
            'DeployStrategy': grpc.unary_unary_rpc_method_handler(
                    servicer.DeployStrategy,
                    request_deserializer=engine__pb2.DeployStrategyRequest.FromString,
                    response_serializer=engine__pb2.DeployStrategyResponse.SerializeToString,
            ),
            'StopStrategy': grpc.unary_unary_rpc_method_handler(
                    servicer.StopStrategy,
                    request_deserializer=engine__pb2.StopStrategyRequest.FromString,
                    response_serializer=engine__pb2.ConfigResponse.SerializeToString,
            ),
            'ListExecutors': grpc.unary_unary_rpc_method_handler(
                    servicer.ListExecutors,
                    request_deserializer=engine__pb2.ListExecutorsRequest.FromString,
                    response_serializer=engine__pb2.ListExecutorsResponse.SerializeToString,
            ),
            'GetExecutorStatus': grpc.unary_unary_rpc_method_handler(
                    servicer.GetExecutorStatus,
                    request_deserializer=engine__pb2.GetExecutorStatusRequest.FromString,
                    response_serializer=engine__pb2.ExecutorInfo.SerializeToString,
            ),
    }
    generic_handler = grpc.method_handlers_generic_handler(
            'engine.EngineService', rpc_method_handlers)
    server.add_generic_rpc_handlers((generic_handler,))
    server.add_registered_method_handlers('engine.EngineService', rpc_method_handlers)


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

    @staticmethod
    def PlaceOrder(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,
            '/engine.EngineService/PlaceOrder',
            engine__pb2.OrderRequest.SerializeToString,
            engine__pb2.OrderResponse.FromString,
            options,
            channel_credentials,
            insecure,
            call_credentials,
            compression,
            wait_for_ready,
            timeout,
            metadata,
            _registered_method=True)

    @staticmethod
    def CancelOrder(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,
            '/engine.EngineService/CancelOrder',
            engine__pb2.CancelRequest.SerializeToString,
            engine__pb2.CancelResponse.FromString,
            options,
            channel_credentials,
            insecure,
            call_credentials,
            compression,
            wait_for_ready,
            timeout,
            metadata,
            _registered_method=True)

    @staticmethod
    def GetPositions(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,
            '/engine.EngineService/GetPositions',
            engine__pb2.PositionsRequest.SerializeToString,
            engine__pb2.PositionsResponse.FromString,
            options,
            channel_credentials,
            insecure,
            call_credentials,
            compression,
            wait_for_ready,
            timeout,
            metadata,
            _registered_method=True)

    @staticmethod
    def GetAccount(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,
            '/engine.EngineService/GetAccount',
            engine__pb2.AccountRequest.SerializeToString,
            engine__pb2.AccountResponse.FromString,
            options,
            channel_credentials,
            insecure,
            call_credentials,
            compression,
            wait_for_ready,
            timeout,
            metadata,
            _registered_method=True)

    @staticmethod
    def GetOrder(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,
            '/engine.EngineService/GetOrder',
            engine__pb2.GetOrderRequest.SerializeToString,
            engine__pb2.OrderResponse.FromString,
            options,
            channel_credentials,
            insecure,
            call_credentials,
            compression,
            wait_for_ready,
            timeout,
            metadata,
            _registered_method=True)

    @staticmethod
    def GetEngineStatus(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,
            '/engine.EngineService/GetEngineStatus',
            engine__pb2.StatusRequest.SerializeToString,
            engine__pb2.StatusResponse.FromString,
            options,
            channel_credentials,
            insecure,
            call_credentials,
            compression,
            wait_for_ready,
            timeout,
            metadata,
            _registered_method=True)

    @staticmethod
    def ConfigureCredentials(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,
            '/engine.EngineService/ConfigureCredentials',
            engine__pb2.CredentialsConfig.SerializeToString,
            engine__pb2.ConfigResponse.FromString,
            options,
            channel_credentials,
            insecure,
            call_credentials,
            compression,
            wait_for_ready,
            timeout,
            metadata,
            _registered_method=True)

    @staticmethod
    def UpdateConfig(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,
            '/engine.EngineService/UpdateConfig',
            engine__pb2.ConfigUpdate.SerializeToString,
            engine__pb2.ConfigResponse.FromString,
            options,
            channel_credentials,
            insecure,
            call_credentials,
            compression,
            wait_for_ready,
            timeout,
            metadata,
            _registered_method=True)

    @staticmethod
    def StreamMarketData(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,
            '/engine.EngineService/StreamMarketData',
            engine__pb2.SubscribeRequest.SerializeToString,
            engine__pb2.MarketDataUpdate.FromString,
            options,
            channel_credentials,
            insecure,
            call_credentials,
            compression,
            wait_for_ready,
            timeout,
            metadata,
            _registered_method=True)

    @staticmethod
    def StreamOrderUpdates(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,
            '/engine.EngineService/StreamOrderUpdates',
            engine__pb2.OrderSubscribeRequest.SerializeToString,
            engine__pb2.OrderUpdate.FromString,
            options,
            channel_credentials,
            insecure,
            call_credentials,
            compression,
            wait_for_ready,
            timeout,
            metadata,
            _registered_method=True)

    @staticmethod
    def DeployStrategy(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,
            '/engine.EngineService/DeployStrategy',
            engine__pb2.DeployStrategyRequest.SerializeToString,
            engine__pb2.DeployStrategyResponse.FromString,
            options,
            channel_credentials,
            insecure,
            call_credentials,
            compression,
            wait_for_ready,
            timeout,
            metadata,
            _registered_method=True)

    @staticmethod
    def StopStrategy(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,
            '/engine.EngineService/StopStrategy',
            engine__pb2.StopStrategyRequest.SerializeToString,
            engine__pb2.ConfigResponse.FromString,
            options,
            channel_credentials,
            insecure,
            call_credentials,
            compression,
            wait_for_ready,
            timeout,
            metadata,
            _registered_method=True)

    @staticmethod
    def ListExecutors(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,
            '/engine.EngineService/ListExecutors',
            engine__pb2.ListExecutorsRequest.SerializeToString,
            engine__pb2.ListExecutorsResponse.FromString,
            options,
            channel_credentials,
            insecure,
            call_credentials,
            compression,
            wait_for_ready,
            timeout,
            metadata,
            _registered_method=True)

    @staticmethod
    def GetExecutorStatus(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,
            '/engine.EngineService/GetExecutorStatus',
            engine__pb2.GetExecutorStatusRequest.SerializeToString,
            engine__pb2.ExecutorInfo.FromString,
            options,
            channel_credentials,
            insecure,
            call_credentials,
            compression,
            wait_for_ready,
            timeout,
            metadata,
            _registered_method=True)
