Package com.google.cloud.translate.v3
Class TranslationServiceGrpc.TranslationServiceStub
- java.lang.Object
-
- io.grpc.stub.AbstractStub<S>
-
- io.grpc.stub.AbstractAsyncStub<TranslationServiceGrpc.TranslationServiceStub>
-
- com.google.cloud.translate.v3.TranslationServiceGrpc.TranslationServiceStub
-
- Enclosing class:
- TranslationServiceGrpc
public static final class TranslationServiceGrpc.TranslationServiceStub extends io.grpc.stub.AbstractAsyncStub<TranslationServiceGrpc.TranslationServiceStub>
A stub to allow clients to do asynchronous rpc calls to service TranslationService.Provides natural language translation operations.
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
batchTranslateDocument(BatchTranslateDocumentRequest request, io.grpc.stub.StreamObserver<com.google.longrunning.Operation> responseObserver)
Translates a large volume of document in asynchronous batch mode.void
batchTranslateText(BatchTranslateTextRequest request, io.grpc.stub.StreamObserver<com.google.longrunning.Operation> responseObserver)
Translates a large volume of text in asynchronous batch mode.protected TranslationServiceGrpc.TranslationServiceStub
build(io.grpc.Channel channel, io.grpc.CallOptions callOptions)
void
createGlossary(CreateGlossaryRequest request, io.grpc.stub.StreamObserver<com.google.longrunning.Operation> responseObserver)
Creates a glossary and returns the long-running operation.void
deleteGlossary(DeleteGlossaryRequest request, io.grpc.stub.StreamObserver<com.google.longrunning.Operation> responseObserver)
Deletes a glossary, or cancels glossary construction if the glossary isn't created yet.void
detectLanguage(DetectLanguageRequest request, io.grpc.stub.StreamObserver<DetectLanguageResponse> responseObserver)
Detects the language of text within a request.void
getGlossary(GetGlossaryRequest request, io.grpc.stub.StreamObserver<Glossary> responseObserver)
Gets a glossary.void
getSupportedLanguages(GetSupportedLanguagesRequest request, io.grpc.stub.StreamObserver<SupportedLanguages> responseObserver)
Returns a list of supported languages for translation.void
listGlossaries(ListGlossariesRequest request, io.grpc.stub.StreamObserver<ListGlossariesResponse> responseObserver)
Lists glossaries in a project.void
translateDocument(TranslateDocumentRequest request, io.grpc.stub.StreamObserver<TranslateDocumentResponse> responseObserver)
Translates documents in synchronous mode.void
translateText(TranslateTextRequest request, io.grpc.stub.StreamObserver<TranslateTextResponse> responseObserver)
Translates input text and returns translated text.
-
-
-
Method Detail
-
build
protected TranslationServiceGrpc.TranslationServiceStub build(io.grpc.Channel channel, io.grpc.CallOptions callOptions)
- Specified by:
build
in classio.grpc.stub.AbstractStub<TranslationServiceGrpc.TranslationServiceStub>
-
translateText
public void translateText(TranslateTextRequest request, io.grpc.stub.StreamObserver<TranslateTextResponse> responseObserver)
Translates input text and returns translated text.
-
detectLanguage
public void detectLanguage(DetectLanguageRequest request, io.grpc.stub.StreamObserver<DetectLanguageResponse> responseObserver)
Detects the language of text within a request.
-
getSupportedLanguages
public void getSupportedLanguages(GetSupportedLanguagesRequest request, io.grpc.stub.StreamObserver<SupportedLanguages> responseObserver)
Returns a list of supported languages for translation.
-
translateDocument
public void translateDocument(TranslateDocumentRequest request, io.grpc.stub.StreamObserver<TranslateDocumentResponse> responseObserver)
Translates documents in synchronous mode.
-
batchTranslateText
public void batchTranslateText(BatchTranslateTextRequest request, io.grpc.stub.StreamObserver<com.google.longrunning.Operation> responseObserver)
Translates a large volume of text in asynchronous batch mode. This function provides real-time output as the inputs are being processed. If caller cancels a request, the partial results (for an input file, it's all or nothing) may still be available on the specified output location. This call returns immediately and you can use google.longrunning.Operation.name to poll the status of the call.
-
batchTranslateDocument
public void batchTranslateDocument(BatchTranslateDocumentRequest request, io.grpc.stub.StreamObserver<com.google.longrunning.Operation> responseObserver)
Translates a large volume of document in asynchronous batch mode. This function provides real-time output as the inputs are being processed. If caller cancels a request, the partial results (for an input file, it's all or nothing) may still be available on the specified output location. This call returns immediately and you can use google.longrunning.Operation.name to poll the status of the call.
-
createGlossary
public void createGlossary(CreateGlossaryRequest request, io.grpc.stub.StreamObserver<com.google.longrunning.Operation> responseObserver)
Creates a glossary and returns the long-running operation. Returns NOT_FOUND, if the project doesn't exist.
-
listGlossaries
public void listGlossaries(ListGlossariesRequest request, io.grpc.stub.StreamObserver<ListGlossariesResponse> responseObserver)
Lists glossaries in a project. Returns NOT_FOUND, if the project doesn't exist.
-
getGlossary
public void getGlossary(GetGlossaryRequest request, io.grpc.stub.StreamObserver<Glossary> responseObserver)
Gets a glossary. Returns NOT_FOUND, if the glossary doesn't exist.
-
deleteGlossary
public void deleteGlossary(DeleteGlossaryRequest request, io.grpc.stub.StreamObserver<com.google.longrunning.Operation> responseObserver)
Deletes a glossary, or cancels glossary construction if the glossary isn't created yet. Returns NOT_FOUND, if the glossary doesn't exist.
-
-