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

from . import mt5_term_api_subscriptions_pb2 as mt5__term__api__subscriptions__pb2


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

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

        Args:
            channel: A grpc.Channel.
        """
        self.OnSymbolTick = channel.unary_stream(
                '/mt5_term_api.SubscriptionService/OnSymbolTick',
                request_serializer=mt5__term__api__subscriptions__pb2.OnSymbolTickRequest.SerializeToString,
                response_deserializer=mt5__term__api__subscriptions__pb2.OnSymbolTickReply.FromString,
                )
        self.OnTrade = channel.unary_stream(
                '/mt5_term_api.SubscriptionService/OnTrade',
                request_serializer=mt5__term__api__subscriptions__pb2.OnTradeRequest.SerializeToString,
                response_deserializer=mt5__term__api__subscriptions__pb2.OnTradeReply.FromString,
                )
        self.OnPositionProfit = channel.unary_stream(
                '/mt5_term_api.SubscriptionService/OnPositionProfit',
                request_serializer=mt5__term__api__subscriptions__pb2.OnPositionProfitRequest.SerializeToString,
                response_deserializer=mt5__term__api__subscriptions__pb2.OnPositionProfitReply.FromString,
                )
        self.OnPositionsAndPendingOrdersTickets = channel.unary_stream(
                '/mt5_term_api.SubscriptionService/OnPositionsAndPendingOrdersTickets',
                request_serializer=mt5__term__api__subscriptions__pb2.OnPositionsAndPendingOrdersTicketsRequest.SerializeToString,
                response_deserializer=mt5__term__api__subscriptions__pb2.OnPositionsAndPendingOrdersTicketsReply.FromString,
                )
        self.OnTradeTransaction = channel.unary_stream(
                '/mt5_term_api.SubscriptionService/OnTradeTransaction',
                request_serializer=mt5__term__api__subscriptions__pb2.OnTradeTransactionRequest.SerializeToString,
                response_deserializer=mt5__term__api__subscriptions__pb2.OnTradeTransactionReply.FromString,
                )


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

    def OnSymbolTick(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 OnTrade(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 OnPositionProfit(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 OnPositionsAndPendingOrdersTickets(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 OnTradeTransaction(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_SubscriptionServiceServicer_to_server(servicer, server):
    rpc_method_handlers = {
            'OnSymbolTick': grpc.unary_stream_rpc_method_handler(
                    servicer.OnSymbolTick,
                    request_deserializer=mt5__term__api__subscriptions__pb2.OnSymbolTickRequest.FromString,
                    response_serializer=mt5__term__api__subscriptions__pb2.OnSymbolTickReply.SerializeToString,
            ),
            'OnTrade': grpc.unary_stream_rpc_method_handler(
                    servicer.OnTrade,
                    request_deserializer=mt5__term__api__subscriptions__pb2.OnTradeRequest.FromString,
                    response_serializer=mt5__term__api__subscriptions__pb2.OnTradeReply.SerializeToString,
            ),
            'OnPositionProfit': grpc.unary_stream_rpc_method_handler(
                    servicer.OnPositionProfit,
                    request_deserializer=mt5__term__api__subscriptions__pb2.OnPositionProfitRequest.FromString,
                    response_serializer=mt5__term__api__subscriptions__pb2.OnPositionProfitReply.SerializeToString,
            ),
            'OnPositionsAndPendingOrdersTickets': grpc.unary_stream_rpc_method_handler(
                    servicer.OnPositionsAndPendingOrdersTickets,
                    request_deserializer=mt5__term__api__subscriptions__pb2.OnPositionsAndPendingOrdersTicketsRequest.FromString,
                    response_serializer=mt5__term__api__subscriptions__pb2.OnPositionsAndPendingOrdersTicketsReply.SerializeToString,
            ),
            'OnTradeTransaction': grpc.unary_stream_rpc_method_handler(
                    servicer.OnTradeTransaction,
                    request_deserializer=mt5__term__api__subscriptions__pb2.OnTradeTransactionRequest.FromString,
                    response_serializer=mt5__term__api__subscriptions__pb2.OnTradeTransactionReply.SerializeToString,
            ),
    }
    generic_handler = grpc.method_handlers_generic_handler(
            'mt5_term_api.SubscriptionService', rpc_method_handlers)
    server.add_generic_rpc_handlers((generic_handler,))


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

    @staticmethod
    def OnSymbolTick(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, '/mt5_term_api.SubscriptionService/OnSymbolTick',
            mt5__term__api__subscriptions__pb2.OnSymbolTickRequest.SerializeToString,
            mt5__term__api__subscriptions__pb2.OnSymbolTickReply.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)

    @staticmethod
    def OnTrade(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, '/mt5_term_api.SubscriptionService/OnTrade',
            mt5__term__api__subscriptions__pb2.OnTradeRequest.SerializeToString,
            mt5__term__api__subscriptions__pb2.OnTradeReply.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)

    @staticmethod
    def OnPositionProfit(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, '/mt5_term_api.SubscriptionService/OnPositionProfit',
            mt5__term__api__subscriptions__pb2.OnPositionProfitRequest.SerializeToString,
            mt5__term__api__subscriptions__pb2.OnPositionProfitReply.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)

    @staticmethod
    def OnPositionsAndPendingOrdersTickets(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, '/mt5_term_api.SubscriptionService/OnPositionsAndPendingOrdersTickets',
            mt5__term__api__subscriptions__pb2.OnPositionsAndPendingOrdersTicketsRequest.SerializeToString,
            mt5__term__api__subscriptions__pb2.OnPositionsAndPendingOrdersTicketsReply.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)

    @staticmethod
    def OnTradeTransaction(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, '/mt5_term_api.SubscriptionService/OnTradeTransaction',
            mt5__term__api__subscriptions__pb2.OnTradeTransactionRequest.SerializeToString,
            mt5__term__api__subscriptions__pb2.OnTradeTransactionReply.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)
