# 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_account_helper_pb2 as mt5__term__api__account__helper__pb2


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

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

        Args:
            channel: A grpc.Channel.
        """
        self.AccountSummary = channel.unary_unary(
                '/mt5_term_api.AccountHelper/AccountSummary',
                request_serializer=mt5__term__api__account__helper__pb2.AccountSummaryRequest.SerializeToString,
                response_deserializer=mt5__term__api__account__helper__pb2.AccountSummaryReply.FromString,
                )
        self.OrderHistory = channel.unary_unary(
                '/mt5_term_api.AccountHelper/OrderHistory',
                request_serializer=mt5__term__api__account__helper__pb2.OrderHistoryRequest.SerializeToString,
                response_deserializer=mt5__term__api__account__helper__pb2.OrderHistoryReply.FromString,
                )
        self.OpenedOrders = channel.unary_unary(
                '/mt5_term_api.AccountHelper/OpenedOrders',
                request_serializer=mt5__term__api__account__helper__pb2.OpenedOrdersRequest.SerializeToString,
                response_deserializer=mt5__term__api__account__helper__pb2.OpenedOrdersReply.FromString,
                )
        self.OpenedOrdersTickets = channel.unary_unary(
                '/mt5_term_api.AccountHelper/OpenedOrdersTickets',
                request_serializer=mt5__term__api__account__helper__pb2.OpenedOrdersTicketsRequest.SerializeToString,
                response_deserializer=mt5__term__api__account__helper__pb2.OpenedOrdersTicketsReply.FromString,
                )
        self.SymbolParamsMany = channel.unary_unary(
                '/mt5_term_api.AccountHelper/SymbolParamsMany',
                request_serializer=mt5__term__api__account__helper__pb2.SymbolParamsManyRequest.SerializeToString,
                response_deserializer=mt5__term__api__account__helper__pb2.SymbolParamsManyReply.FromString,
                )
        self.TickValueWithSize = channel.unary_unary(
                '/mt5_term_api.AccountHelper/TickValueWithSize',
                request_serializer=mt5__term__api__account__helper__pb2.TickValueWithSizeRequest.SerializeToString,
                response_deserializer=mt5__term__api__account__helper__pb2.TickValueWithSizeReply.FromString,
                )
        self.PositionsHistory = channel.unary_unary(
                '/mt5_term_api.AccountHelper/PositionsHistory',
                request_serializer=mt5__term__api__account__helper__pb2.PositionsHistoryRequest.SerializeToString,
                response_deserializer=mt5__term__api__account__helper__pb2.PositionsHistoryReply.FromString,
                )


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

    def AccountSummary(self, request, context):
        """Some information about account
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')

    def OrderHistory(self, request, context):
        """Orders History
        [DefaultValues]
        {
        "pageNumber": "0",
        "itemsPerPage": "0",
        }  
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')

    def OpenedOrders(self, request, context):
        """Pending orders and opened positions
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')

    def OpenedOrdersTickets(self, request, context):
        """Just opened order tickets
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')

    def SymbolParamsMany(self, request, context):
        """Full information about symbol and his group for several symbols
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')

    def TickValueWithSize(self, request, context):
        """Tick value as array
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')

    def PositionsHistory(self, request, context):
        """History positions
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')


def add_AccountHelperServicer_to_server(servicer, server):
    rpc_method_handlers = {
            'AccountSummary': grpc.unary_unary_rpc_method_handler(
                    servicer.AccountSummary,
                    request_deserializer=mt5__term__api__account__helper__pb2.AccountSummaryRequest.FromString,
                    response_serializer=mt5__term__api__account__helper__pb2.AccountSummaryReply.SerializeToString,
            ),
            'OrderHistory': grpc.unary_unary_rpc_method_handler(
                    servicer.OrderHistory,
                    request_deserializer=mt5__term__api__account__helper__pb2.OrderHistoryRequest.FromString,
                    response_serializer=mt5__term__api__account__helper__pb2.OrderHistoryReply.SerializeToString,
            ),
            'OpenedOrders': grpc.unary_unary_rpc_method_handler(
                    servicer.OpenedOrders,
                    request_deserializer=mt5__term__api__account__helper__pb2.OpenedOrdersRequest.FromString,
                    response_serializer=mt5__term__api__account__helper__pb2.OpenedOrdersReply.SerializeToString,
            ),
            'OpenedOrdersTickets': grpc.unary_unary_rpc_method_handler(
                    servicer.OpenedOrdersTickets,
                    request_deserializer=mt5__term__api__account__helper__pb2.OpenedOrdersTicketsRequest.FromString,
                    response_serializer=mt5__term__api__account__helper__pb2.OpenedOrdersTicketsReply.SerializeToString,
            ),
            'SymbolParamsMany': grpc.unary_unary_rpc_method_handler(
                    servicer.SymbolParamsMany,
                    request_deserializer=mt5__term__api__account__helper__pb2.SymbolParamsManyRequest.FromString,
                    response_serializer=mt5__term__api__account__helper__pb2.SymbolParamsManyReply.SerializeToString,
            ),
            'TickValueWithSize': grpc.unary_unary_rpc_method_handler(
                    servicer.TickValueWithSize,
                    request_deserializer=mt5__term__api__account__helper__pb2.TickValueWithSizeRequest.FromString,
                    response_serializer=mt5__term__api__account__helper__pb2.TickValueWithSizeReply.SerializeToString,
            ),
            'PositionsHistory': grpc.unary_unary_rpc_method_handler(
                    servicer.PositionsHistory,
                    request_deserializer=mt5__term__api__account__helper__pb2.PositionsHistoryRequest.FromString,
                    response_serializer=mt5__term__api__account__helper__pb2.PositionsHistoryReply.SerializeToString,
            ),
    }
    generic_handler = grpc.method_handlers_generic_handler(
            'mt5_term_api.AccountHelper', rpc_method_handlers)
    server.add_generic_rpc_handlers((generic_handler,))


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

    @staticmethod
    def AccountSummary(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, '/mt5_term_api.AccountHelper/AccountSummary',
            mt5__term__api__account__helper__pb2.AccountSummaryRequest.SerializeToString,
            mt5__term__api__account__helper__pb2.AccountSummaryReply.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)

    @staticmethod
    def OrderHistory(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, '/mt5_term_api.AccountHelper/OrderHistory',
            mt5__term__api__account__helper__pb2.OrderHistoryRequest.SerializeToString,
            mt5__term__api__account__helper__pb2.OrderHistoryReply.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)

    @staticmethod
    def OpenedOrders(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, '/mt5_term_api.AccountHelper/OpenedOrders',
            mt5__term__api__account__helper__pb2.OpenedOrdersRequest.SerializeToString,
            mt5__term__api__account__helper__pb2.OpenedOrdersReply.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)

    @staticmethod
    def OpenedOrdersTickets(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, '/mt5_term_api.AccountHelper/OpenedOrdersTickets',
            mt5__term__api__account__helper__pb2.OpenedOrdersTicketsRequest.SerializeToString,
            mt5__term__api__account__helper__pb2.OpenedOrdersTicketsReply.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)

    @staticmethod
    def SymbolParamsMany(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, '/mt5_term_api.AccountHelper/SymbolParamsMany',
            mt5__term__api__account__helper__pb2.SymbolParamsManyRequest.SerializeToString,
            mt5__term__api__account__helper__pb2.SymbolParamsManyReply.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)

    @staticmethod
    def TickValueWithSize(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, '/mt5_term_api.AccountHelper/TickValueWithSize',
            mt5__term__api__account__helper__pb2.TickValueWithSizeRequest.SerializeToString,
            mt5__term__api__account__helper__pb2.TickValueWithSizeReply.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)

    @staticmethod
    def PositionsHistory(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, '/mt5_term_api.AccountHelper/PositionsHistory',
            mt5__term__api__account__helper__pb2.PositionsHistoryRequest.SerializeToString,
            mt5__term__api__account__helper__pb2.PositionsHistoryReply.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)
