All Downloads are FREE. Search and download functionalities are using the official Maven repository.

ru.tinkoff.piapi.contract.v1.UsersServiceGrpc Maven / Gradle / Ivy

There is a newer version: 1.25
Show newest version
package ru.tinkoff.piapi.contract.v1;

import static io.grpc.MethodDescriptor.generateFullMethodName;

/**
 * 
 *Сервис предназначен для получения: </br> **1**.
 *списка счетов пользователя; </br> **2**. маржинальных показателей по счёту.
 * 
*/ @javax.annotation.Generated( value = "by gRPC proto compiler (version 1.56.1)", comments = "Source: users.proto") @io.grpc.stub.annotations.GrpcGenerated public final class UsersServiceGrpc { private UsersServiceGrpc() {} public static final String SERVICE_NAME = "tinkoff.public.invest.api.contract.v1.UsersService"; // Static method descriptors that strictly reflect the proto. private static volatile io.grpc.MethodDescriptor getGetAccountsMethod; @io.grpc.stub.annotations.RpcMethod( fullMethodName = SERVICE_NAME + '/' + "GetAccounts", requestType = ru.tinkoff.piapi.contract.v1.GetAccountsRequest.class, responseType = ru.tinkoff.piapi.contract.v1.GetAccountsResponse.class, methodType = io.grpc.MethodDescriptor.MethodType.UNARY) public static io.grpc.MethodDescriptor getGetAccountsMethod() { io.grpc.MethodDescriptor getGetAccountsMethod; if ((getGetAccountsMethod = UsersServiceGrpc.getGetAccountsMethod) == null) { synchronized (UsersServiceGrpc.class) { if ((getGetAccountsMethod = UsersServiceGrpc.getGetAccountsMethod) == null) { UsersServiceGrpc.getGetAccountsMethod = getGetAccountsMethod = io.grpc.MethodDescriptor.newBuilder() .setType(io.grpc.MethodDescriptor.MethodType.UNARY) .setFullMethodName(generateFullMethodName(SERVICE_NAME, "GetAccounts")) .setSampledToLocalTracing(true) .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( ru.tinkoff.piapi.contract.v1.GetAccountsRequest.getDefaultInstance())) .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( ru.tinkoff.piapi.contract.v1.GetAccountsResponse.getDefaultInstance())) .setSchemaDescriptor(new UsersServiceMethodDescriptorSupplier("GetAccounts")) .build(); } } } return getGetAccountsMethod; } private static volatile io.grpc.MethodDescriptor getGetMarginAttributesMethod; @io.grpc.stub.annotations.RpcMethod( fullMethodName = SERVICE_NAME + '/' + "GetMarginAttributes", requestType = ru.tinkoff.piapi.contract.v1.GetMarginAttributesRequest.class, responseType = ru.tinkoff.piapi.contract.v1.GetMarginAttributesResponse.class, methodType = io.grpc.MethodDescriptor.MethodType.UNARY) public static io.grpc.MethodDescriptor getGetMarginAttributesMethod() { io.grpc.MethodDescriptor getGetMarginAttributesMethod; if ((getGetMarginAttributesMethod = UsersServiceGrpc.getGetMarginAttributesMethod) == null) { synchronized (UsersServiceGrpc.class) { if ((getGetMarginAttributesMethod = UsersServiceGrpc.getGetMarginAttributesMethod) == null) { UsersServiceGrpc.getGetMarginAttributesMethod = getGetMarginAttributesMethod = io.grpc.MethodDescriptor.newBuilder() .setType(io.grpc.MethodDescriptor.MethodType.UNARY) .setFullMethodName(generateFullMethodName(SERVICE_NAME, "GetMarginAttributes")) .setSampledToLocalTracing(true) .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( ru.tinkoff.piapi.contract.v1.GetMarginAttributesRequest.getDefaultInstance())) .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( ru.tinkoff.piapi.contract.v1.GetMarginAttributesResponse.getDefaultInstance())) .setSchemaDescriptor(new UsersServiceMethodDescriptorSupplier("GetMarginAttributes")) .build(); } } } return getGetMarginAttributesMethod; } private static volatile io.grpc.MethodDescriptor getGetUserTariffMethod; @io.grpc.stub.annotations.RpcMethod( fullMethodName = SERVICE_NAME + '/' + "GetUserTariff", requestType = ru.tinkoff.piapi.contract.v1.GetUserTariffRequest.class, responseType = ru.tinkoff.piapi.contract.v1.GetUserTariffResponse.class, methodType = io.grpc.MethodDescriptor.MethodType.UNARY) public static io.grpc.MethodDescriptor getGetUserTariffMethod() { io.grpc.MethodDescriptor getGetUserTariffMethod; if ((getGetUserTariffMethod = UsersServiceGrpc.getGetUserTariffMethod) == null) { synchronized (UsersServiceGrpc.class) { if ((getGetUserTariffMethod = UsersServiceGrpc.getGetUserTariffMethod) == null) { UsersServiceGrpc.getGetUserTariffMethod = getGetUserTariffMethod = io.grpc.MethodDescriptor.newBuilder() .setType(io.grpc.MethodDescriptor.MethodType.UNARY) .setFullMethodName(generateFullMethodName(SERVICE_NAME, "GetUserTariff")) .setSampledToLocalTracing(true) .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( ru.tinkoff.piapi.contract.v1.GetUserTariffRequest.getDefaultInstance())) .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( ru.tinkoff.piapi.contract.v1.GetUserTariffResponse.getDefaultInstance())) .setSchemaDescriptor(new UsersServiceMethodDescriptorSupplier("GetUserTariff")) .build(); } } } return getGetUserTariffMethod; } private static volatile io.grpc.MethodDescriptor getGetInfoMethod; @io.grpc.stub.annotations.RpcMethod( fullMethodName = SERVICE_NAME + '/' + "GetInfo", requestType = ru.tinkoff.piapi.contract.v1.GetInfoRequest.class, responseType = ru.tinkoff.piapi.contract.v1.GetInfoResponse.class, methodType = io.grpc.MethodDescriptor.MethodType.UNARY) public static io.grpc.MethodDescriptor getGetInfoMethod() { io.grpc.MethodDescriptor getGetInfoMethod; if ((getGetInfoMethod = UsersServiceGrpc.getGetInfoMethod) == null) { synchronized (UsersServiceGrpc.class) { if ((getGetInfoMethod = UsersServiceGrpc.getGetInfoMethod) == null) { UsersServiceGrpc.getGetInfoMethod = getGetInfoMethod = io.grpc.MethodDescriptor.newBuilder() .setType(io.grpc.MethodDescriptor.MethodType.UNARY) .setFullMethodName(generateFullMethodName(SERVICE_NAME, "GetInfo")) .setSampledToLocalTracing(true) .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( ru.tinkoff.piapi.contract.v1.GetInfoRequest.getDefaultInstance())) .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( ru.tinkoff.piapi.contract.v1.GetInfoResponse.getDefaultInstance())) .setSchemaDescriptor(new UsersServiceMethodDescriptorSupplier("GetInfo")) .build(); } } } return getGetInfoMethod; } /** * Creates a new async stub that supports all call types for the service */ public static UsersServiceStub newStub(io.grpc.Channel channel) { io.grpc.stub.AbstractStub.StubFactory factory = new io.grpc.stub.AbstractStub.StubFactory() { @java.lang.Override public UsersServiceStub newStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { return new UsersServiceStub(channel, callOptions); } }; return UsersServiceStub.newStub(factory, channel); } /** * Creates a new blocking-style stub that supports unary and streaming output calls on the service */ public static UsersServiceBlockingStub newBlockingStub( io.grpc.Channel channel) { io.grpc.stub.AbstractStub.StubFactory factory = new io.grpc.stub.AbstractStub.StubFactory() { @java.lang.Override public UsersServiceBlockingStub newStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { return new UsersServiceBlockingStub(channel, callOptions); } }; return UsersServiceBlockingStub.newStub(factory, channel); } /** * Creates a new ListenableFuture-style stub that supports unary calls on the service */ public static UsersServiceFutureStub newFutureStub( io.grpc.Channel channel) { io.grpc.stub.AbstractStub.StubFactory factory = new io.grpc.stub.AbstractStub.StubFactory() { @java.lang.Override public UsersServiceFutureStub newStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { return new UsersServiceFutureStub(channel, callOptions); } }; return UsersServiceFutureStub.newStub(factory, channel); } /** *
   *Сервис предназначен для получения: </br> **1**.
   *списка счетов пользователя; </br> **2**. маржинальных показателей по счёту.
   * 
*/ public interface AsyncService { /** *
     *Метод получения счетов пользователя.
     * 
*/ default void getAccounts(ru.tinkoff.piapi.contract.v1.GetAccountsRequest request, io.grpc.stub.StreamObserver responseObserver) { io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getGetAccountsMethod(), responseObserver); } /** *
     *Расчёт маржинальных показателей по счёту.
     * 
*/ default void getMarginAttributes(ru.tinkoff.piapi.contract.v1.GetMarginAttributesRequest request, io.grpc.stub.StreamObserver responseObserver) { io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getGetMarginAttributesMethod(), responseObserver); } /** *
     *Запрос тарифа пользователя.
     * 
*/ default void getUserTariff(ru.tinkoff.piapi.contract.v1.GetUserTariffRequest request, io.grpc.stub.StreamObserver responseObserver) { io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getGetUserTariffMethod(), responseObserver); } /** *
     *Метод получения информации о пользователе.
     * 
*/ default void getInfo(ru.tinkoff.piapi.contract.v1.GetInfoRequest request, io.grpc.stub.StreamObserver responseObserver) { io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getGetInfoMethod(), responseObserver); } } /** * Base class for the server implementation of the service UsersService. *
   *Сервис предназначен для получения: </br> **1**.
   *списка счетов пользователя; </br> **2**. маржинальных показателей по счёту.
   * 
*/ public static abstract class UsersServiceImplBase implements io.grpc.BindableService, AsyncService { @java.lang.Override public final io.grpc.ServerServiceDefinition bindService() { return UsersServiceGrpc.bindService(this); } } /** * A stub to allow clients to do asynchronous rpc calls to service UsersService. *
   *Сервис предназначен для получения: </br> **1**.
   *списка счетов пользователя; </br> **2**. маржинальных показателей по счёту.
   * 
*/ public static final class UsersServiceStub extends io.grpc.stub.AbstractAsyncStub { private UsersServiceStub( io.grpc.Channel channel, io.grpc.CallOptions callOptions) { super(channel, callOptions); } @java.lang.Override protected UsersServiceStub build( io.grpc.Channel channel, io.grpc.CallOptions callOptions) { return new UsersServiceStub(channel, callOptions); } /** *
     *Метод получения счетов пользователя.
     * 
*/ public void getAccounts(ru.tinkoff.piapi.contract.v1.GetAccountsRequest request, io.grpc.stub.StreamObserver responseObserver) { io.grpc.stub.ClientCalls.asyncUnaryCall( getChannel().newCall(getGetAccountsMethod(), getCallOptions()), request, responseObserver); } /** *
     *Расчёт маржинальных показателей по счёту.
     * 
*/ public void getMarginAttributes(ru.tinkoff.piapi.contract.v1.GetMarginAttributesRequest request, io.grpc.stub.StreamObserver responseObserver) { io.grpc.stub.ClientCalls.asyncUnaryCall( getChannel().newCall(getGetMarginAttributesMethod(), getCallOptions()), request, responseObserver); } /** *
     *Запрос тарифа пользователя.
     * 
*/ public void getUserTariff(ru.tinkoff.piapi.contract.v1.GetUserTariffRequest request, io.grpc.stub.StreamObserver responseObserver) { io.grpc.stub.ClientCalls.asyncUnaryCall( getChannel().newCall(getGetUserTariffMethod(), getCallOptions()), request, responseObserver); } /** *
     *Метод получения информации о пользователе.
     * 
*/ public void getInfo(ru.tinkoff.piapi.contract.v1.GetInfoRequest request, io.grpc.stub.StreamObserver responseObserver) { io.grpc.stub.ClientCalls.asyncUnaryCall( getChannel().newCall(getGetInfoMethod(), getCallOptions()), request, responseObserver); } } /** * A stub to allow clients to do synchronous rpc calls to service UsersService. *
   *Сервис предназначен для получения: </br> **1**.
   *списка счетов пользователя; </br> **2**. маржинальных показателей по счёту.
   * 
*/ public static final class UsersServiceBlockingStub extends io.grpc.stub.AbstractBlockingStub { private UsersServiceBlockingStub( io.grpc.Channel channel, io.grpc.CallOptions callOptions) { super(channel, callOptions); } @java.lang.Override protected UsersServiceBlockingStub build( io.grpc.Channel channel, io.grpc.CallOptions callOptions) { return new UsersServiceBlockingStub(channel, callOptions); } /** *
     *Метод получения счетов пользователя.
     * 
*/ public ru.tinkoff.piapi.contract.v1.GetAccountsResponse getAccounts(ru.tinkoff.piapi.contract.v1.GetAccountsRequest request) { return io.grpc.stub.ClientCalls.blockingUnaryCall( getChannel(), getGetAccountsMethod(), getCallOptions(), request); } /** *
     *Расчёт маржинальных показателей по счёту.
     * 
*/ public ru.tinkoff.piapi.contract.v1.GetMarginAttributesResponse getMarginAttributes(ru.tinkoff.piapi.contract.v1.GetMarginAttributesRequest request) { return io.grpc.stub.ClientCalls.blockingUnaryCall( getChannel(), getGetMarginAttributesMethod(), getCallOptions(), request); } /** *
     *Запрос тарифа пользователя.
     * 
*/ public ru.tinkoff.piapi.contract.v1.GetUserTariffResponse getUserTariff(ru.tinkoff.piapi.contract.v1.GetUserTariffRequest request) { return io.grpc.stub.ClientCalls.blockingUnaryCall( getChannel(), getGetUserTariffMethod(), getCallOptions(), request); } /** *
     *Метод получения информации о пользователе.
     * 
*/ public ru.tinkoff.piapi.contract.v1.GetInfoResponse getInfo(ru.tinkoff.piapi.contract.v1.GetInfoRequest request) { return io.grpc.stub.ClientCalls.blockingUnaryCall( getChannel(), getGetInfoMethod(), getCallOptions(), request); } } /** * A stub to allow clients to do ListenableFuture-style rpc calls to service UsersService. *
   *Сервис предназначен для получения: </br> **1**.
   *списка счетов пользователя; </br> **2**. маржинальных показателей по счёту.
   * 
*/ public static final class UsersServiceFutureStub extends io.grpc.stub.AbstractFutureStub { private UsersServiceFutureStub( io.grpc.Channel channel, io.grpc.CallOptions callOptions) { super(channel, callOptions); } @java.lang.Override protected UsersServiceFutureStub build( io.grpc.Channel channel, io.grpc.CallOptions callOptions) { return new UsersServiceFutureStub(channel, callOptions); } /** *
     *Метод получения счетов пользователя.
     * 
*/ public com.google.common.util.concurrent.ListenableFuture getAccounts( ru.tinkoff.piapi.contract.v1.GetAccountsRequest request) { return io.grpc.stub.ClientCalls.futureUnaryCall( getChannel().newCall(getGetAccountsMethod(), getCallOptions()), request); } /** *
     *Расчёт маржинальных показателей по счёту.
     * 
*/ public com.google.common.util.concurrent.ListenableFuture getMarginAttributes( ru.tinkoff.piapi.contract.v1.GetMarginAttributesRequest request) { return io.grpc.stub.ClientCalls.futureUnaryCall( getChannel().newCall(getGetMarginAttributesMethod(), getCallOptions()), request); } /** *
     *Запрос тарифа пользователя.
     * 
*/ public com.google.common.util.concurrent.ListenableFuture getUserTariff( ru.tinkoff.piapi.contract.v1.GetUserTariffRequest request) { return io.grpc.stub.ClientCalls.futureUnaryCall( getChannel().newCall(getGetUserTariffMethod(), getCallOptions()), request); } /** *
     *Метод получения информации о пользователе.
     * 
*/ public com.google.common.util.concurrent.ListenableFuture getInfo( ru.tinkoff.piapi.contract.v1.GetInfoRequest request) { return io.grpc.stub.ClientCalls.futureUnaryCall( getChannel().newCall(getGetInfoMethod(), getCallOptions()), request); } } private static final int METHODID_GET_ACCOUNTS = 0; private static final int METHODID_GET_MARGIN_ATTRIBUTES = 1; private static final int METHODID_GET_USER_TARIFF = 2; private static final int METHODID_GET_INFO = 3; private static final class MethodHandlers implements io.grpc.stub.ServerCalls.UnaryMethod, io.grpc.stub.ServerCalls.ServerStreamingMethod, io.grpc.stub.ServerCalls.ClientStreamingMethod, io.grpc.stub.ServerCalls.BidiStreamingMethod { private final AsyncService serviceImpl; private final int methodId; MethodHandlers(AsyncService serviceImpl, int methodId) { this.serviceImpl = serviceImpl; this.methodId = methodId; } @java.lang.Override @java.lang.SuppressWarnings("unchecked") public void invoke(Req request, io.grpc.stub.StreamObserver responseObserver) { switch (methodId) { case METHODID_GET_ACCOUNTS: serviceImpl.getAccounts((ru.tinkoff.piapi.contract.v1.GetAccountsRequest) request, (io.grpc.stub.StreamObserver) responseObserver); break; case METHODID_GET_MARGIN_ATTRIBUTES: serviceImpl.getMarginAttributes((ru.tinkoff.piapi.contract.v1.GetMarginAttributesRequest) request, (io.grpc.stub.StreamObserver) responseObserver); break; case METHODID_GET_USER_TARIFF: serviceImpl.getUserTariff((ru.tinkoff.piapi.contract.v1.GetUserTariffRequest) request, (io.grpc.stub.StreamObserver) responseObserver); break; case METHODID_GET_INFO: serviceImpl.getInfo((ru.tinkoff.piapi.contract.v1.GetInfoRequest) request, (io.grpc.stub.StreamObserver) responseObserver); break; default: throw new AssertionError(); } } @java.lang.Override @java.lang.SuppressWarnings("unchecked") public io.grpc.stub.StreamObserver invoke( io.grpc.stub.StreamObserver responseObserver) { switch (methodId) { default: throw new AssertionError(); } } } public static final io.grpc.ServerServiceDefinition bindService(AsyncService service) { return io.grpc.ServerServiceDefinition.builder(getServiceDescriptor()) .addMethod( getGetAccountsMethod(), io.grpc.stub.ServerCalls.asyncUnaryCall( new MethodHandlers< ru.tinkoff.piapi.contract.v1.GetAccountsRequest, ru.tinkoff.piapi.contract.v1.GetAccountsResponse>( service, METHODID_GET_ACCOUNTS))) .addMethod( getGetMarginAttributesMethod(), io.grpc.stub.ServerCalls.asyncUnaryCall( new MethodHandlers< ru.tinkoff.piapi.contract.v1.GetMarginAttributesRequest, ru.tinkoff.piapi.contract.v1.GetMarginAttributesResponse>( service, METHODID_GET_MARGIN_ATTRIBUTES))) .addMethod( getGetUserTariffMethod(), io.grpc.stub.ServerCalls.asyncUnaryCall( new MethodHandlers< ru.tinkoff.piapi.contract.v1.GetUserTariffRequest, ru.tinkoff.piapi.contract.v1.GetUserTariffResponse>( service, METHODID_GET_USER_TARIFF))) .addMethod( getGetInfoMethod(), io.grpc.stub.ServerCalls.asyncUnaryCall( new MethodHandlers< ru.tinkoff.piapi.contract.v1.GetInfoRequest, ru.tinkoff.piapi.contract.v1.GetInfoResponse>( service, METHODID_GET_INFO))) .build(); } private static abstract class UsersServiceBaseDescriptorSupplier implements io.grpc.protobuf.ProtoFileDescriptorSupplier, io.grpc.protobuf.ProtoServiceDescriptorSupplier { UsersServiceBaseDescriptorSupplier() {} @java.lang.Override public com.google.protobuf.Descriptors.FileDescriptor getFileDescriptor() { return ru.tinkoff.piapi.contract.v1.Users.getDescriptor(); } @java.lang.Override public com.google.protobuf.Descriptors.ServiceDescriptor getServiceDescriptor() { return getFileDescriptor().findServiceByName("UsersService"); } } private static final class UsersServiceFileDescriptorSupplier extends UsersServiceBaseDescriptorSupplier { UsersServiceFileDescriptorSupplier() {} } private static final class UsersServiceMethodDescriptorSupplier extends UsersServiceBaseDescriptorSupplier implements io.grpc.protobuf.ProtoMethodDescriptorSupplier { private final String methodName; UsersServiceMethodDescriptorSupplier(String methodName) { this.methodName = methodName; } @java.lang.Override public com.google.protobuf.Descriptors.MethodDescriptor getMethodDescriptor() { return getServiceDescriptor().findMethodByName(methodName); } } private static volatile io.grpc.ServiceDescriptor serviceDescriptor; public static io.grpc.ServiceDescriptor getServiceDescriptor() { io.grpc.ServiceDescriptor result = serviceDescriptor; if (result == null) { synchronized (UsersServiceGrpc.class) { result = serviceDescriptor; if (result == null) { serviceDescriptor = result = io.grpc.ServiceDescriptor.newBuilder(SERVICE_NAME) .setSchemaDescriptor(new UsersServiceFileDescriptorSupplier()) .addMethod(getGetAccountsMethod()) .addMethod(getGetMarginAttributesMethod()) .addMethod(getGetUserTariffMethod()) .addMethod(getGetInfoMethod()) .build(); } } } return result; } }




© 2015 - 2024 Weber Informatics LLC | Privacy Policy