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

from t_tech.invest.grpc import users_pb2 as t__tech_dot_invest_dot_grpc_dot_users__pb2


class UsersServiceStub(object):
    """С помощью сервиса можно получить: <br/> 1.
    список счетов пользователя; <br/> 2. маржинальные показатели по счeту.
    """

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

        Args:
            channel: A grpc.Channel.
        """
        self.GetAccounts = channel.unary_unary(
                '/tinkoff.public.invest.api.contract.v1.UsersService/GetAccounts',
                request_serializer=t__tech_dot_invest_dot_grpc_dot_users__pb2.GetAccountsRequest.SerializeToString,
                response_deserializer=t__tech_dot_invest_dot_grpc_dot_users__pb2.GetAccountsResponse.FromString,
                )
        self.GetMarginAttributes = channel.unary_unary(
                '/tinkoff.public.invest.api.contract.v1.UsersService/GetMarginAttributes',
                request_serializer=t__tech_dot_invest_dot_grpc_dot_users__pb2.GetMarginAttributesRequest.SerializeToString,
                response_deserializer=t__tech_dot_invest_dot_grpc_dot_users__pb2.GetMarginAttributesResponse.FromString,
                )
        self.GetUserTariff = channel.unary_unary(
                '/tinkoff.public.invest.api.contract.v1.UsersService/GetUserTariff',
                request_serializer=t__tech_dot_invest_dot_grpc_dot_users__pb2.GetUserTariffRequest.SerializeToString,
                response_deserializer=t__tech_dot_invest_dot_grpc_dot_users__pb2.GetUserTariffResponse.FromString,
                )
        self.GetInfo = channel.unary_unary(
                '/tinkoff.public.invest.api.contract.v1.UsersService/GetInfo',
                request_serializer=t__tech_dot_invest_dot_grpc_dot_users__pb2.GetInfoRequest.SerializeToString,
                response_deserializer=t__tech_dot_invest_dot_grpc_dot_users__pb2.GetInfoResponse.FromString,
                )
        self.GetBankAccounts = channel.unary_unary(
                '/tinkoff.public.invest.api.contract.v1.UsersService/GetBankAccounts',
                request_serializer=t__tech_dot_invest_dot_grpc_dot_users__pb2.GetBankAccountsRequest.SerializeToString,
                response_deserializer=t__tech_dot_invest_dot_grpc_dot_users__pb2.GetBankAccountsResponse.FromString,
                )
        self.CurrencyTransfer = channel.unary_unary(
                '/tinkoff.public.invest.api.contract.v1.UsersService/CurrencyTransfer',
                request_serializer=t__tech_dot_invest_dot_grpc_dot_users__pb2.CurrencyTransferRequest.SerializeToString,
                response_deserializer=t__tech_dot_invest_dot_grpc_dot_users__pb2.CurrencyTransferResponse.FromString,
                )
        self.PayIn = channel.unary_unary(
                '/tinkoff.public.invest.api.contract.v1.UsersService/PayIn',
                request_serializer=t__tech_dot_invest_dot_grpc_dot_users__pb2.PayInRequest.SerializeToString,
                response_deserializer=t__tech_dot_invest_dot_grpc_dot_users__pb2.PayInResponse.FromString,
                )
        self.GetAccountValues = channel.unary_unary(
                '/tinkoff.public.invest.api.contract.v1.UsersService/GetAccountValues',
                request_serializer=t__tech_dot_invest_dot_grpc_dot_users__pb2.GetAccountValuesRequest.SerializeToString,
                response_deserializer=t__tech_dot_invest_dot_grpc_dot_users__pb2.GetAccountValuesResponse.FromString,
                )


class UsersServiceServicer(object):
    """С помощью сервиса можно получить: <br/> 1.
    список счетов пользователя; <br/> 2. маржинальные показатели по счeту.
    """

    def GetAccounts(self, request, context):
        """GetAccounts — счета пользователя
        Получить список счетов.
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')

    def GetMarginAttributes(self, request, context):
        """GetMarginAttributes — маржинальные показатели по счeту
        Метод позволяет получить маржинальные показатели и ликвидность по заданному счeту.
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')

    def GetUserTariff(self, request, context):
        """GetUserTariff — тариф пользователя
        Получить информацию о текущих лимитах на подклчение, согласно текущему тарифу пользователя.
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')

    def GetInfo(self, request, context):
        """GetInfo — информация о пользователе
        Получить информацию о пользователе: тариф, признак квалификации, пройденные тесты и др.
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')

    def GetBankAccounts(self, request, context):
        """GetBankAccounts — банковские счета пользователя
        Получить список счетов пользователя, в том числе и банковских.
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')

    def CurrencyTransfer(self, request, context):
        """CurrencyTransfer — перевод денежных средств между счетами
        Перевести денежные средства между брокерскими счетами
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')

    def PayIn(self, request, context):
        """PayIn — пополнение брокерского счета
        Пополнить брокерский счёт с банковского
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')

    def GetAccountValues(self, request, context):
        """GetAccountValues — дополнительные показатели счетов
        Метод предназначен для получения дополнительных показателей счетов
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')


def add_UsersServiceServicer_to_server(servicer, server):
    rpc_method_handlers = {
            'GetAccounts': grpc.unary_unary_rpc_method_handler(
                    servicer.GetAccounts,
                    request_deserializer=t__tech_dot_invest_dot_grpc_dot_users__pb2.GetAccountsRequest.FromString,
                    response_serializer=t__tech_dot_invest_dot_grpc_dot_users__pb2.GetAccountsResponse.SerializeToString,
            ),
            'GetMarginAttributes': grpc.unary_unary_rpc_method_handler(
                    servicer.GetMarginAttributes,
                    request_deserializer=t__tech_dot_invest_dot_grpc_dot_users__pb2.GetMarginAttributesRequest.FromString,
                    response_serializer=t__tech_dot_invest_dot_grpc_dot_users__pb2.GetMarginAttributesResponse.SerializeToString,
            ),
            'GetUserTariff': grpc.unary_unary_rpc_method_handler(
                    servicer.GetUserTariff,
                    request_deserializer=t__tech_dot_invest_dot_grpc_dot_users__pb2.GetUserTariffRequest.FromString,
                    response_serializer=t__tech_dot_invest_dot_grpc_dot_users__pb2.GetUserTariffResponse.SerializeToString,
            ),
            'GetInfo': grpc.unary_unary_rpc_method_handler(
                    servicer.GetInfo,
                    request_deserializer=t__tech_dot_invest_dot_grpc_dot_users__pb2.GetInfoRequest.FromString,
                    response_serializer=t__tech_dot_invest_dot_grpc_dot_users__pb2.GetInfoResponse.SerializeToString,
            ),
            'GetBankAccounts': grpc.unary_unary_rpc_method_handler(
                    servicer.GetBankAccounts,
                    request_deserializer=t__tech_dot_invest_dot_grpc_dot_users__pb2.GetBankAccountsRequest.FromString,
                    response_serializer=t__tech_dot_invest_dot_grpc_dot_users__pb2.GetBankAccountsResponse.SerializeToString,
            ),
            'CurrencyTransfer': grpc.unary_unary_rpc_method_handler(
                    servicer.CurrencyTransfer,
                    request_deserializer=t__tech_dot_invest_dot_grpc_dot_users__pb2.CurrencyTransferRequest.FromString,
                    response_serializer=t__tech_dot_invest_dot_grpc_dot_users__pb2.CurrencyTransferResponse.SerializeToString,
            ),
            'PayIn': grpc.unary_unary_rpc_method_handler(
                    servicer.PayIn,
                    request_deserializer=t__tech_dot_invest_dot_grpc_dot_users__pb2.PayInRequest.FromString,
                    response_serializer=t__tech_dot_invest_dot_grpc_dot_users__pb2.PayInResponse.SerializeToString,
            ),
            'GetAccountValues': grpc.unary_unary_rpc_method_handler(
                    servicer.GetAccountValues,
                    request_deserializer=t__tech_dot_invest_dot_grpc_dot_users__pb2.GetAccountValuesRequest.FromString,
                    response_serializer=t__tech_dot_invest_dot_grpc_dot_users__pb2.GetAccountValuesResponse.SerializeToString,
            ),
    }
    generic_handler = grpc.method_handlers_generic_handler(
            'tinkoff.public.invest.api.contract.v1.UsersService', rpc_method_handlers)
    server.add_generic_rpc_handlers((generic_handler,))


 # This class is part of an EXPERIMENTAL API.
class UsersService(object):
    """С помощью сервиса можно получить: <br/> 1.
    список счетов пользователя; <br/> 2. маржинальные показатели по счeту.
    """

    @staticmethod
    def GetAccounts(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, '/tinkoff.public.invest.api.contract.v1.UsersService/GetAccounts',
            t__tech_dot_invest_dot_grpc_dot_users__pb2.GetAccountsRequest.SerializeToString,
            t__tech_dot_invest_dot_grpc_dot_users__pb2.GetAccountsResponse.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)

    @staticmethod
    def GetMarginAttributes(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, '/tinkoff.public.invest.api.contract.v1.UsersService/GetMarginAttributes',
            t__tech_dot_invest_dot_grpc_dot_users__pb2.GetMarginAttributesRequest.SerializeToString,
            t__tech_dot_invest_dot_grpc_dot_users__pb2.GetMarginAttributesResponse.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)

    @staticmethod
    def GetUserTariff(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, '/tinkoff.public.invest.api.contract.v1.UsersService/GetUserTariff',
            t__tech_dot_invest_dot_grpc_dot_users__pb2.GetUserTariffRequest.SerializeToString,
            t__tech_dot_invest_dot_grpc_dot_users__pb2.GetUserTariffResponse.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)

    @staticmethod
    def GetInfo(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, '/tinkoff.public.invest.api.contract.v1.UsersService/GetInfo',
            t__tech_dot_invest_dot_grpc_dot_users__pb2.GetInfoRequest.SerializeToString,
            t__tech_dot_invest_dot_grpc_dot_users__pb2.GetInfoResponse.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)

    @staticmethod
    def GetBankAccounts(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, '/tinkoff.public.invest.api.contract.v1.UsersService/GetBankAccounts',
            t__tech_dot_invest_dot_grpc_dot_users__pb2.GetBankAccountsRequest.SerializeToString,
            t__tech_dot_invest_dot_grpc_dot_users__pb2.GetBankAccountsResponse.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)

    @staticmethod
    def CurrencyTransfer(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, '/tinkoff.public.invest.api.contract.v1.UsersService/CurrencyTransfer',
            t__tech_dot_invest_dot_grpc_dot_users__pb2.CurrencyTransferRequest.SerializeToString,
            t__tech_dot_invest_dot_grpc_dot_users__pb2.CurrencyTransferResponse.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)

    @staticmethod
    def PayIn(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, '/tinkoff.public.invest.api.contract.v1.UsersService/PayIn',
            t__tech_dot_invest_dot_grpc_dot_users__pb2.PayInRequest.SerializeToString,
            t__tech_dot_invest_dot_grpc_dot_users__pb2.PayInResponse.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)

    @staticmethod
    def GetAccountValues(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, '/tinkoff.public.invest.api.contract.v1.UsersService/GetAccountValues',
            t__tech_dot_invest_dot_grpc_dot_users__pb2.GetAccountValuesRequest.SerializeToString,
            t__tech_dot_invest_dot_grpc_dot_users__pb2.GetAccountValuesResponse.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)
