# 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_information_pb2 as mt5__term__api__account__information__pb2


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

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

        Args:
            channel: A grpc.Channel.
        """
        self.AccountInfoDouble = channel.unary_unary(
                '/mt5_term_api.AccountInformation/AccountInfoDouble',
                request_serializer=mt5__term__api__account__information__pb2.AccountInfoDoubleRequest.SerializeToString,
                response_deserializer=mt5__term__api__account__information__pb2.AccountInfoDoubleReply.FromString,
                )
        self.AccountInfoInteger = channel.unary_unary(
                '/mt5_term_api.AccountInformation/AccountInfoInteger',
                request_serializer=mt5__term__api__account__information__pb2.AccountInfoIntegerRequest.SerializeToString,
                response_deserializer=mt5__term__api__account__information__pb2.AccountInfoIntegerReply.FromString,
                )
        self.AccountInfoString = channel.unary_unary(
                '/mt5_term_api.AccountInformation/AccountInfoString',
                request_serializer=mt5__term__api__account__information__pb2.AccountInfoStringRequest.SerializeToString,
                response_deserializer=mt5__term__api__account__information__pb2.AccountInfoStringReply.FromString,
                )


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

    def AccountInfoDouble(self, request, context):
        """Returns the double value of the corresponding account property
        https://www.mql5.com/en/docs/account/accountinfodouble
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')

    def AccountInfoInteger(self, request, context):
        """Returns the value of the properties of the account
        https://www.mql5.com/en/docs/account/accountinfointeger
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')

    def AccountInfoString(self, request, context):
        """Returns the value of the appropriate account property
        https://www.mql5.com/en/docs/account/accountinfostring
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')


def add_AccountInformationServicer_to_server(servicer, server):
    rpc_method_handlers = {
            'AccountInfoDouble': grpc.unary_unary_rpc_method_handler(
                    servicer.AccountInfoDouble,
                    request_deserializer=mt5__term__api__account__information__pb2.AccountInfoDoubleRequest.FromString,
                    response_serializer=mt5__term__api__account__information__pb2.AccountInfoDoubleReply.SerializeToString,
            ),
            'AccountInfoInteger': grpc.unary_unary_rpc_method_handler(
                    servicer.AccountInfoInteger,
                    request_deserializer=mt5__term__api__account__information__pb2.AccountInfoIntegerRequest.FromString,
                    response_serializer=mt5__term__api__account__information__pb2.AccountInfoIntegerReply.SerializeToString,
            ),
            'AccountInfoString': grpc.unary_unary_rpc_method_handler(
                    servicer.AccountInfoString,
                    request_deserializer=mt5__term__api__account__information__pb2.AccountInfoStringRequest.FromString,
                    response_serializer=mt5__term__api__account__information__pb2.AccountInfoStringReply.SerializeToString,
            ),
    }
    generic_handler = grpc.method_handlers_generic_handler(
            'mt5_term_api.AccountInformation', rpc_method_handlers)
    server.add_generic_rpc_handlers((generic_handler,))


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

    @staticmethod
    def AccountInfoDouble(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.AccountInformation/AccountInfoDouble',
            mt5__term__api__account__information__pb2.AccountInfoDoubleRequest.SerializeToString,
            mt5__term__api__account__information__pb2.AccountInfoDoubleReply.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)

    @staticmethod
    def AccountInfoInteger(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.AccountInformation/AccountInfoInteger',
            mt5__term__api__account__information__pb2.AccountInfoIntegerRequest.SerializeToString,
            mt5__term__api__account__information__pb2.AccountInfoIntegerReply.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)

    @staticmethod
    def AccountInfoString(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.AccountInformation/AccountInfoString',
            mt5__term__api__account__information__pb2.AccountInfoStringRequest.SerializeToString,
            mt5__term__api__account__information__pb2.AccountInfoStringReply.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)
