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

yandex.cloud.api.ai.stt.v3.AsyncRecognizerGrpc Maven / Gradle / Ivy

package yandex.cloud.api.ai.stt.v3;

import static io.grpc.MethodDescriptor.generateFullMethodName;

/**
 * 
 * A set of methods for async voice recognition.
 * 
*/ @javax.annotation.Generated( value = "by gRPC proto compiler (version 1.43.2)", comments = "Source: yandex/cloud/ai/stt/v3/stt_service.proto") @io.grpc.stub.annotations.GrpcGenerated public final class AsyncRecognizerGrpc { private AsyncRecognizerGrpc() {} public static final String SERVICE_NAME = "speechkit.stt.v3.AsyncRecognizer"; // Static method descriptors that strictly reflect the proto. private static volatile io.grpc.MethodDescriptor getRecognizeFileMethod; @io.grpc.stub.annotations.RpcMethod( fullMethodName = SERVICE_NAME + '/' + "RecognizeFile", requestType = yandex.cloud.api.ai.stt.v3.Stt.RecognizeFileRequest.class, responseType = yandex.cloud.api.operation.OperationOuterClass.Operation.class, methodType = io.grpc.MethodDescriptor.MethodType.UNARY) public static io.grpc.MethodDescriptor getRecognizeFileMethod() { io.grpc.MethodDescriptor getRecognizeFileMethod; if ((getRecognizeFileMethod = AsyncRecognizerGrpc.getRecognizeFileMethod) == null) { synchronized (AsyncRecognizerGrpc.class) { if ((getRecognizeFileMethod = AsyncRecognizerGrpc.getRecognizeFileMethod) == null) { AsyncRecognizerGrpc.getRecognizeFileMethod = getRecognizeFileMethod = io.grpc.MethodDescriptor.newBuilder() .setType(io.grpc.MethodDescriptor.MethodType.UNARY) .setFullMethodName(generateFullMethodName(SERVICE_NAME, "RecognizeFile")) .setSampledToLocalTracing(true) .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( yandex.cloud.api.ai.stt.v3.Stt.RecognizeFileRequest.getDefaultInstance())) .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( yandex.cloud.api.operation.OperationOuterClass.Operation.getDefaultInstance())) .setSchemaDescriptor(new AsyncRecognizerMethodDescriptorSupplier("RecognizeFile")) .build(); } } } return getRecognizeFileMethod; } private static volatile io.grpc.MethodDescriptor getGetRecognitionMethod; @io.grpc.stub.annotations.RpcMethod( fullMethodName = SERVICE_NAME + '/' + "GetRecognition", requestType = yandex.cloud.api.ai.stt.v3.SttService.GetRecognitionRequest.class, responseType = yandex.cloud.api.ai.stt.v3.Stt.StreamingResponse.class, methodType = io.grpc.MethodDescriptor.MethodType.SERVER_STREAMING) public static io.grpc.MethodDescriptor getGetRecognitionMethod() { io.grpc.MethodDescriptor getGetRecognitionMethod; if ((getGetRecognitionMethod = AsyncRecognizerGrpc.getGetRecognitionMethod) == null) { synchronized (AsyncRecognizerGrpc.class) { if ((getGetRecognitionMethod = AsyncRecognizerGrpc.getGetRecognitionMethod) == null) { AsyncRecognizerGrpc.getGetRecognitionMethod = getGetRecognitionMethod = io.grpc.MethodDescriptor.newBuilder() .setType(io.grpc.MethodDescriptor.MethodType.SERVER_STREAMING) .setFullMethodName(generateFullMethodName(SERVICE_NAME, "GetRecognition")) .setSampledToLocalTracing(true) .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( yandex.cloud.api.ai.stt.v3.SttService.GetRecognitionRequest.getDefaultInstance())) .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( yandex.cloud.api.ai.stt.v3.Stt.StreamingResponse.getDefaultInstance())) .setSchemaDescriptor(new AsyncRecognizerMethodDescriptorSupplier("GetRecognition")) .build(); } } } return getGetRecognitionMethod; } /** * Creates a new async stub that supports all call types for the service */ public static AsyncRecognizerStub newStub(io.grpc.Channel channel) { io.grpc.stub.AbstractStub.StubFactory factory = new io.grpc.stub.AbstractStub.StubFactory() { @java.lang.Override public AsyncRecognizerStub newStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { return new AsyncRecognizerStub(channel, callOptions); } }; return AsyncRecognizerStub.newStub(factory, channel); } /** * Creates a new blocking-style stub that supports unary and streaming output calls on the service */ public static AsyncRecognizerBlockingStub newBlockingStub( io.grpc.Channel channel) { io.grpc.stub.AbstractStub.StubFactory factory = new io.grpc.stub.AbstractStub.StubFactory() { @java.lang.Override public AsyncRecognizerBlockingStub newStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { return new AsyncRecognizerBlockingStub(channel, callOptions); } }; return AsyncRecognizerBlockingStub.newStub(factory, channel); } /** * Creates a new ListenableFuture-style stub that supports unary calls on the service */ public static AsyncRecognizerFutureStub newFutureStub( io.grpc.Channel channel) { io.grpc.stub.AbstractStub.StubFactory factory = new io.grpc.stub.AbstractStub.StubFactory() { @java.lang.Override public AsyncRecognizerFutureStub newStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { return new AsyncRecognizerFutureStub(channel, callOptions); } }; return AsyncRecognizerFutureStub.newStub(factory, channel); } /** *
   * A set of methods for async voice recognition.
   * 
*/ public static abstract class AsyncRecognizerImplBase implements io.grpc.BindableService { /** */ public void recognizeFile(yandex.cloud.api.ai.stt.v3.Stt.RecognizeFileRequest request, io.grpc.stub.StreamObserver responseObserver) { io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getRecognizeFileMethod(), responseObserver); } /** */ public void getRecognition(yandex.cloud.api.ai.stt.v3.SttService.GetRecognitionRequest request, io.grpc.stub.StreamObserver responseObserver) { io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getGetRecognitionMethod(), responseObserver); } @java.lang.Override public final io.grpc.ServerServiceDefinition bindService() { return io.grpc.ServerServiceDefinition.builder(getServiceDescriptor()) .addMethod( getRecognizeFileMethod(), io.grpc.stub.ServerCalls.asyncUnaryCall( new MethodHandlers< yandex.cloud.api.ai.stt.v3.Stt.RecognizeFileRequest, yandex.cloud.api.operation.OperationOuterClass.Operation>( this, METHODID_RECOGNIZE_FILE))) .addMethod( getGetRecognitionMethod(), io.grpc.stub.ServerCalls.asyncServerStreamingCall( new MethodHandlers< yandex.cloud.api.ai.stt.v3.SttService.GetRecognitionRequest, yandex.cloud.api.ai.stt.v3.Stt.StreamingResponse>( this, METHODID_GET_RECOGNITION))) .build(); } } /** *
   * A set of methods for async voice recognition.
   * 
*/ public static final class AsyncRecognizerStub extends io.grpc.stub.AbstractAsyncStub { private AsyncRecognizerStub( io.grpc.Channel channel, io.grpc.CallOptions callOptions) { super(channel, callOptions); } @java.lang.Override protected AsyncRecognizerStub build( io.grpc.Channel channel, io.grpc.CallOptions callOptions) { return new AsyncRecognizerStub(channel, callOptions); } /** */ public void recognizeFile(yandex.cloud.api.ai.stt.v3.Stt.RecognizeFileRequest request, io.grpc.stub.StreamObserver responseObserver) { io.grpc.stub.ClientCalls.asyncUnaryCall( getChannel().newCall(getRecognizeFileMethod(), getCallOptions()), request, responseObserver); } /** */ public void getRecognition(yandex.cloud.api.ai.stt.v3.SttService.GetRecognitionRequest request, io.grpc.stub.StreamObserver responseObserver) { io.grpc.stub.ClientCalls.asyncServerStreamingCall( getChannel().newCall(getGetRecognitionMethod(), getCallOptions()), request, responseObserver); } } /** *
   * A set of methods for async voice recognition.
   * 
*/ public static final class AsyncRecognizerBlockingStub extends io.grpc.stub.AbstractBlockingStub { private AsyncRecognizerBlockingStub( io.grpc.Channel channel, io.grpc.CallOptions callOptions) { super(channel, callOptions); } @java.lang.Override protected AsyncRecognizerBlockingStub build( io.grpc.Channel channel, io.grpc.CallOptions callOptions) { return new AsyncRecognizerBlockingStub(channel, callOptions); } /** */ public yandex.cloud.api.operation.OperationOuterClass.Operation recognizeFile(yandex.cloud.api.ai.stt.v3.Stt.RecognizeFileRequest request) { return io.grpc.stub.ClientCalls.blockingUnaryCall( getChannel(), getRecognizeFileMethod(), getCallOptions(), request); } /** */ public java.util.Iterator getRecognition( yandex.cloud.api.ai.stt.v3.SttService.GetRecognitionRequest request) { return io.grpc.stub.ClientCalls.blockingServerStreamingCall( getChannel(), getGetRecognitionMethod(), getCallOptions(), request); } } /** *
   * A set of methods for async voice recognition.
   * 
*/ public static final class AsyncRecognizerFutureStub extends io.grpc.stub.AbstractFutureStub { private AsyncRecognizerFutureStub( io.grpc.Channel channel, io.grpc.CallOptions callOptions) { super(channel, callOptions); } @java.lang.Override protected AsyncRecognizerFutureStub build( io.grpc.Channel channel, io.grpc.CallOptions callOptions) { return new AsyncRecognizerFutureStub(channel, callOptions); } /** */ public com.google.common.util.concurrent.ListenableFuture recognizeFile( yandex.cloud.api.ai.stt.v3.Stt.RecognizeFileRequest request) { return io.grpc.stub.ClientCalls.futureUnaryCall( getChannel().newCall(getRecognizeFileMethod(), getCallOptions()), request); } } private static final int METHODID_RECOGNIZE_FILE = 0; private static final int METHODID_GET_RECOGNITION = 1; 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 AsyncRecognizerImplBase serviceImpl; private final int methodId; MethodHandlers(AsyncRecognizerImplBase 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_RECOGNIZE_FILE: serviceImpl.recognizeFile((yandex.cloud.api.ai.stt.v3.Stt.RecognizeFileRequest) request, (io.grpc.stub.StreamObserver) responseObserver); break; case METHODID_GET_RECOGNITION: serviceImpl.getRecognition((yandex.cloud.api.ai.stt.v3.SttService.GetRecognitionRequest) 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(); } } } private static abstract class AsyncRecognizerBaseDescriptorSupplier implements io.grpc.protobuf.ProtoFileDescriptorSupplier, io.grpc.protobuf.ProtoServiceDescriptorSupplier { AsyncRecognizerBaseDescriptorSupplier() {} @java.lang.Override public com.google.protobuf.Descriptors.FileDescriptor getFileDescriptor() { return yandex.cloud.api.ai.stt.v3.SttService.getDescriptor(); } @java.lang.Override public com.google.protobuf.Descriptors.ServiceDescriptor getServiceDescriptor() { return getFileDescriptor().findServiceByName("AsyncRecognizer"); } } private static final class AsyncRecognizerFileDescriptorSupplier extends AsyncRecognizerBaseDescriptorSupplier { AsyncRecognizerFileDescriptorSupplier() {} } private static final class AsyncRecognizerMethodDescriptorSupplier extends AsyncRecognizerBaseDescriptorSupplier implements io.grpc.protobuf.ProtoMethodDescriptorSupplier { private final String methodName; AsyncRecognizerMethodDescriptorSupplier(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 (AsyncRecognizerGrpc.class) { result = serviceDescriptor; if (result == null) { serviceDescriptor = result = io.grpc.ServiceDescriptor.newBuilder(SERVICE_NAME) .setSchemaDescriptor(new AsyncRecognizerFileDescriptorSupplier()) .addMethod(getRecognizeFileMethod()) .addMethod(getGetRecognitionMethod()) .build(); } } } return result; } }




© 2015 - 2025 Weber Informatics LLC | Privacy Policy