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

ru.tinkoff.piapi.contract.v1.StopOrdersServiceGrpc 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**. отмена;</br> **3**. получение списка стоп-заявок.
 * 
*/ @javax.annotation.Generated( value = "by gRPC proto compiler (version 1.56.1)", comments = "Source: stoporders.proto") @io.grpc.stub.annotations.GrpcGenerated public final class StopOrdersServiceGrpc { private StopOrdersServiceGrpc() {} public static final String SERVICE_NAME = "tinkoff.public.invest.api.contract.v1.StopOrdersService"; // Static method descriptors that strictly reflect the proto. private static volatile io.grpc.MethodDescriptor getPostStopOrderMethod; @io.grpc.stub.annotations.RpcMethod( fullMethodName = SERVICE_NAME + '/' + "PostStopOrder", requestType = ru.tinkoff.piapi.contract.v1.PostStopOrderRequest.class, responseType = ru.tinkoff.piapi.contract.v1.PostStopOrderResponse.class, methodType = io.grpc.MethodDescriptor.MethodType.UNARY) public static io.grpc.MethodDescriptor getPostStopOrderMethod() { io.grpc.MethodDescriptor getPostStopOrderMethod; if ((getPostStopOrderMethod = StopOrdersServiceGrpc.getPostStopOrderMethod) == null) { synchronized (StopOrdersServiceGrpc.class) { if ((getPostStopOrderMethod = StopOrdersServiceGrpc.getPostStopOrderMethod) == null) { StopOrdersServiceGrpc.getPostStopOrderMethod = getPostStopOrderMethod = io.grpc.MethodDescriptor.newBuilder() .setType(io.grpc.MethodDescriptor.MethodType.UNARY) .setFullMethodName(generateFullMethodName(SERVICE_NAME, "PostStopOrder")) .setSampledToLocalTracing(true) .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( ru.tinkoff.piapi.contract.v1.PostStopOrderRequest.getDefaultInstance())) .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( ru.tinkoff.piapi.contract.v1.PostStopOrderResponse.getDefaultInstance())) .setSchemaDescriptor(new StopOrdersServiceMethodDescriptorSupplier("PostStopOrder")) .build(); } } } return getPostStopOrderMethod; } private static volatile io.grpc.MethodDescriptor getGetStopOrdersMethod; @io.grpc.stub.annotations.RpcMethod( fullMethodName = SERVICE_NAME + '/' + "GetStopOrders", requestType = ru.tinkoff.piapi.contract.v1.GetStopOrdersRequest.class, responseType = ru.tinkoff.piapi.contract.v1.GetStopOrdersResponse.class, methodType = io.grpc.MethodDescriptor.MethodType.UNARY) public static io.grpc.MethodDescriptor getGetStopOrdersMethod() { io.grpc.MethodDescriptor getGetStopOrdersMethod; if ((getGetStopOrdersMethod = StopOrdersServiceGrpc.getGetStopOrdersMethod) == null) { synchronized (StopOrdersServiceGrpc.class) { if ((getGetStopOrdersMethod = StopOrdersServiceGrpc.getGetStopOrdersMethod) == null) { StopOrdersServiceGrpc.getGetStopOrdersMethod = getGetStopOrdersMethod = io.grpc.MethodDescriptor.newBuilder() .setType(io.grpc.MethodDescriptor.MethodType.UNARY) .setFullMethodName(generateFullMethodName(SERVICE_NAME, "GetStopOrders")) .setSampledToLocalTracing(true) .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( ru.tinkoff.piapi.contract.v1.GetStopOrdersRequest.getDefaultInstance())) .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( ru.tinkoff.piapi.contract.v1.GetStopOrdersResponse.getDefaultInstance())) .setSchemaDescriptor(new StopOrdersServiceMethodDescriptorSupplier("GetStopOrders")) .build(); } } } return getGetStopOrdersMethod; } private static volatile io.grpc.MethodDescriptor getCancelStopOrderMethod; @io.grpc.stub.annotations.RpcMethod( fullMethodName = SERVICE_NAME + '/' + "CancelStopOrder", requestType = ru.tinkoff.piapi.contract.v1.CancelStopOrderRequest.class, responseType = ru.tinkoff.piapi.contract.v1.CancelStopOrderResponse.class, methodType = io.grpc.MethodDescriptor.MethodType.UNARY) public static io.grpc.MethodDescriptor getCancelStopOrderMethod() { io.grpc.MethodDescriptor getCancelStopOrderMethod; if ((getCancelStopOrderMethod = StopOrdersServiceGrpc.getCancelStopOrderMethod) == null) { synchronized (StopOrdersServiceGrpc.class) { if ((getCancelStopOrderMethod = StopOrdersServiceGrpc.getCancelStopOrderMethod) == null) { StopOrdersServiceGrpc.getCancelStopOrderMethod = getCancelStopOrderMethod = io.grpc.MethodDescriptor.newBuilder() .setType(io.grpc.MethodDescriptor.MethodType.UNARY) .setFullMethodName(generateFullMethodName(SERVICE_NAME, "CancelStopOrder")) .setSampledToLocalTracing(true) .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( ru.tinkoff.piapi.contract.v1.CancelStopOrderRequest.getDefaultInstance())) .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( ru.tinkoff.piapi.contract.v1.CancelStopOrderResponse.getDefaultInstance())) .setSchemaDescriptor(new StopOrdersServiceMethodDescriptorSupplier("CancelStopOrder")) .build(); } } } return getCancelStopOrderMethod; } /** * Creates a new async stub that supports all call types for the service */ public static StopOrdersServiceStub newStub(io.grpc.Channel channel) { io.grpc.stub.AbstractStub.StubFactory factory = new io.grpc.stub.AbstractStub.StubFactory() { @java.lang.Override public StopOrdersServiceStub newStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { return new StopOrdersServiceStub(channel, callOptions); } }; return StopOrdersServiceStub.newStub(factory, channel); } /** * Creates a new blocking-style stub that supports unary and streaming output calls on the service */ public static StopOrdersServiceBlockingStub newBlockingStub( io.grpc.Channel channel) { io.grpc.stub.AbstractStub.StubFactory factory = new io.grpc.stub.AbstractStub.StubFactory() { @java.lang.Override public StopOrdersServiceBlockingStub newStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { return new StopOrdersServiceBlockingStub(channel, callOptions); } }; return StopOrdersServiceBlockingStub.newStub(factory, channel); } /** * Creates a new ListenableFuture-style stub that supports unary calls on the service */ public static StopOrdersServiceFutureStub newFutureStub( io.grpc.Channel channel) { io.grpc.stub.AbstractStub.StubFactory factory = new io.grpc.stub.AbstractStub.StubFactory() { @java.lang.Override public StopOrdersServiceFutureStub newStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { return new StopOrdersServiceFutureStub(channel, callOptions); } }; return StopOrdersServiceFutureStub.newStub(factory, channel); } /** *
   * Сервис предназначен для работы со стоп-заявками:</br> **1**.
   *выставление;</br> **2**. отмена;</br> **3**. получение списка стоп-заявок.
   * 
*/ public interface AsyncService { /** *
     *Метод выставления стоп-заявки.
     * 
*/ default void postStopOrder(ru.tinkoff.piapi.contract.v1.PostStopOrderRequest request, io.grpc.stub.StreamObserver responseObserver) { io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getPostStopOrderMethod(), responseObserver); } /** *
     *Метод получения списка активных стоп заявок по счёту.
     * 
*/ default void getStopOrders(ru.tinkoff.piapi.contract.v1.GetStopOrdersRequest request, io.grpc.stub.StreamObserver responseObserver) { io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getGetStopOrdersMethod(), responseObserver); } /** *
     *Метод отмены стоп-заявки.
     * 
*/ default void cancelStopOrder(ru.tinkoff.piapi.contract.v1.CancelStopOrderRequest request, io.grpc.stub.StreamObserver responseObserver) { io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getCancelStopOrderMethod(), responseObserver); } } /** * Base class for the server implementation of the service StopOrdersService. *
   * Сервис предназначен для работы со стоп-заявками:</br> **1**.
   *выставление;</br> **2**. отмена;</br> **3**. получение списка стоп-заявок.
   * 
*/ public static abstract class StopOrdersServiceImplBase implements io.grpc.BindableService, AsyncService { @java.lang.Override public final io.grpc.ServerServiceDefinition bindService() { return StopOrdersServiceGrpc.bindService(this); } } /** * A stub to allow clients to do asynchronous rpc calls to service StopOrdersService. *
   * Сервис предназначен для работы со стоп-заявками:</br> **1**.
   *выставление;</br> **2**. отмена;</br> **3**. получение списка стоп-заявок.
   * 
*/ public static final class StopOrdersServiceStub extends io.grpc.stub.AbstractAsyncStub { private StopOrdersServiceStub( io.grpc.Channel channel, io.grpc.CallOptions callOptions) { super(channel, callOptions); } @java.lang.Override protected StopOrdersServiceStub build( io.grpc.Channel channel, io.grpc.CallOptions callOptions) { return new StopOrdersServiceStub(channel, callOptions); } /** *
     *Метод выставления стоп-заявки.
     * 
*/ public void postStopOrder(ru.tinkoff.piapi.contract.v1.PostStopOrderRequest request, io.grpc.stub.StreamObserver responseObserver) { io.grpc.stub.ClientCalls.asyncUnaryCall( getChannel().newCall(getPostStopOrderMethod(), getCallOptions()), request, responseObserver); } /** *
     *Метод получения списка активных стоп заявок по счёту.
     * 
*/ public void getStopOrders(ru.tinkoff.piapi.contract.v1.GetStopOrdersRequest request, io.grpc.stub.StreamObserver responseObserver) { io.grpc.stub.ClientCalls.asyncUnaryCall( getChannel().newCall(getGetStopOrdersMethod(), getCallOptions()), request, responseObserver); } /** *
     *Метод отмены стоп-заявки.
     * 
*/ public void cancelStopOrder(ru.tinkoff.piapi.contract.v1.CancelStopOrderRequest request, io.grpc.stub.StreamObserver responseObserver) { io.grpc.stub.ClientCalls.asyncUnaryCall( getChannel().newCall(getCancelStopOrderMethod(), getCallOptions()), request, responseObserver); } } /** * A stub to allow clients to do synchronous rpc calls to service StopOrdersService. *
   * Сервис предназначен для работы со стоп-заявками:</br> **1**.
   *выставление;</br> **2**. отмена;</br> **3**. получение списка стоп-заявок.
   * 
*/ public static final class StopOrdersServiceBlockingStub extends io.grpc.stub.AbstractBlockingStub { private StopOrdersServiceBlockingStub( io.grpc.Channel channel, io.grpc.CallOptions callOptions) { super(channel, callOptions); } @java.lang.Override protected StopOrdersServiceBlockingStub build( io.grpc.Channel channel, io.grpc.CallOptions callOptions) { return new StopOrdersServiceBlockingStub(channel, callOptions); } /** *
     *Метод выставления стоп-заявки.
     * 
*/ public ru.tinkoff.piapi.contract.v1.PostStopOrderResponse postStopOrder(ru.tinkoff.piapi.contract.v1.PostStopOrderRequest request) { return io.grpc.stub.ClientCalls.blockingUnaryCall( getChannel(), getPostStopOrderMethod(), getCallOptions(), request); } /** *
     *Метод получения списка активных стоп заявок по счёту.
     * 
*/ public ru.tinkoff.piapi.contract.v1.GetStopOrdersResponse getStopOrders(ru.tinkoff.piapi.contract.v1.GetStopOrdersRequest request) { return io.grpc.stub.ClientCalls.blockingUnaryCall( getChannel(), getGetStopOrdersMethod(), getCallOptions(), request); } /** *
     *Метод отмены стоп-заявки.
     * 
*/ public ru.tinkoff.piapi.contract.v1.CancelStopOrderResponse cancelStopOrder(ru.tinkoff.piapi.contract.v1.CancelStopOrderRequest request) { return io.grpc.stub.ClientCalls.blockingUnaryCall( getChannel(), getCancelStopOrderMethod(), getCallOptions(), request); } } /** * A stub to allow clients to do ListenableFuture-style rpc calls to service StopOrdersService. *
   * Сервис предназначен для работы со стоп-заявками:</br> **1**.
   *выставление;</br> **2**. отмена;</br> **3**. получение списка стоп-заявок.
   * 
*/ public static final class StopOrdersServiceFutureStub extends io.grpc.stub.AbstractFutureStub { private StopOrdersServiceFutureStub( io.grpc.Channel channel, io.grpc.CallOptions callOptions) { super(channel, callOptions); } @java.lang.Override protected StopOrdersServiceFutureStub build( io.grpc.Channel channel, io.grpc.CallOptions callOptions) { return new StopOrdersServiceFutureStub(channel, callOptions); } /** *
     *Метод выставления стоп-заявки.
     * 
*/ public com.google.common.util.concurrent.ListenableFuture postStopOrder( ru.tinkoff.piapi.contract.v1.PostStopOrderRequest request) { return io.grpc.stub.ClientCalls.futureUnaryCall( getChannel().newCall(getPostStopOrderMethod(), getCallOptions()), request); } /** *
     *Метод получения списка активных стоп заявок по счёту.
     * 
*/ public com.google.common.util.concurrent.ListenableFuture getStopOrders( ru.tinkoff.piapi.contract.v1.GetStopOrdersRequest request) { return io.grpc.stub.ClientCalls.futureUnaryCall( getChannel().newCall(getGetStopOrdersMethod(), getCallOptions()), request); } /** *
     *Метод отмены стоп-заявки.
     * 
*/ public com.google.common.util.concurrent.ListenableFuture cancelStopOrder( ru.tinkoff.piapi.contract.v1.CancelStopOrderRequest request) { return io.grpc.stub.ClientCalls.futureUnaryCall( getChannel().newCall(getCancelStopOrderMethod(), getCallOptions()), request); } } private static final int METHODID_POST_STOP_ORDER = 0; private static final int METHODID_GET_STOP_ORDERS = 1; private static final int METHODID_CANCEL_STOP_ORDER = 2; 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_POST_STOP_ORDER: serviceImpl.postStopOrder((ru.tinkoff.piapi.contract.v1.PostStopOrderRequest) request, (io.grpc.stub.StreamObserver) responseObserver); break; case METHODID_GET_STOP_ORDERS: serviceImpl.getStopOrders((ru.tinkoff.piapi.contract.v1.GetStopOrdersRequest) request, (io.grpc.stub.StreamObserver) responseObserver); break; case METHODID_CANCEL_STOP_ORDER: serviceImpl.cancelStopOrder((ru.tinkoff.piapi.contract.v1.CancelStopOrderRequest) 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( getPostStopOrderMethod(), io.grpc.stub.ServerCalls.asyncUnaryCall( new MethodHandlers< ru.tinkoff.piapi.contract.v1.PostStopOrderRequest, ru.tinkoff.piapi.contract.v1.PostStopOrderResponse>( service, METHODID_POST_STOP_ORDER))) .addMethod( getGetStopOrdersMethod(), io.grpc.stub.ServerCalls.asyncUnaryCall( new MethodHandlers< ru.tinkoff.piapi.contract.v1.GetStopOrdersRequest, ru.tinkoff.piapi.contract.v1.GetStopOrdersResponse>( service, METHODID_GET_STOP_ORDERS))) .addMethod( getCancelStopOrderMethod(), io.grpc.stub.ServerCalls.asyncUnaryCall( new MethodHandlers< ru.tinkoff.piapi.contract.v1.CancelStopOrderRequest, ru.tinkoff.piapi.contract.v1.CancelStopOrderResponse>( service, METHODID_CANCEL_STOP_ORDER))) .build(); } private static abstract class StopOrdersServiceBaseDescriptorSupplier implements io.grpc.protobuf.ProtoFileDescriptorSupplier, io.grpc.protobuf.ProtoServiceDescriptorSupplier { StopOrdersServiceBaseDescriptorSupplier() {} @java.lang.Override public com.google.protobuf.Descriptors.FileDescriptor getFileDescriptor() { return ru.tinkoff.piapi.contract.v1.Stoporders.getDescriptor(); } @java.lang.Override public com.google.protobuf.Descriptors.ServiceDescriptor getServiceDescriptor() { return getFileDescriptor().findServiceByName("StopOrdersService"); } } private static final class StopOrdersServiceFileDescriptorSupplier extends StopOrdersServiceBaseDescriptorSupplier { StopOrdersServiceFileDescriptorSupplier() {} } private static final class StopOrdersServiceMethodDescriptorSupplier extends StopOrdersServiceBaseDescriptorSupplier implements io.grpc.protobuf.ProtoMethodDescriptorSupplier { private final String methodName; StopOrdersServiceMethodDescriptorSupplier(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 (StopOrdersServiceGrpc.class) { result = serviceDescriptor; if (result == null) { serviceDescriptor = result = io.grpc.ServiceDescriptor.newBuilder(SERVICE_NAME) .setSchemaDescriptor(new StopOrdersServiceFileDescriptorSupplier()) .addMethod(getPostStopOrderMethod()) .addMethod(getGetStopOrdersMethod()) .addMethod(getCancelStopOrderMethod()) .build(); } } } return result; } }




© 2015 - 2024 Weber Informatics LLC | Privacy Policy