public static final class TranslationServiceGrpc.TranslationServiceStub extends AbstractAsyncStub<TranslationServiceGrpc.TranslationServiceStub>
Provides natural language translation operations.
AbstractStub.StubFactory<T extends AbstractStub<T>>
Modifier and Type | Method and Description |
---|---|
void |
batchTranslateDocument(BatchTranslateDocumentRequest request,
StreamObserver<Operation> responseObserver)
Translates a large volume of document in asynchronous batch mode.
|
void |
batchTranslateText(BatchTranslateTextRequest request,
StreamObserver<Operation> responseObserver)
Translates a large volume of text in asynchronous batch mode.
|
protected TranslationServiceGrpc.TranslationServiceStub |
build(Channel channel,
CallOptions callOptions) |
void |
createGlossary(CreateGlossaryRequest request,
StreamObserver<Operation> responseObserver)
Creates a glossary and returns the long-running operation.
|
void |
deleteGlossary(DeleteGlossaryRequest request,
StreamObserver<Operation> responseObserver)
Deletes a glossary, or cancels glossary construction
if the glossary isn't created yet.
|
void |
detectLanguage(DetectLanguageRequest request,
StreamObserver<DetectLanguageResponse> responseObserver)
Detects the language of text within a request.
|
void |
getGlossary(GetGlossaryRequest request,
StreamObserver<Glossary> responseObserver)
Gets a glossary.
|
void |
getSupportedLanguages(GetSupportedLanguagesRequest request,
StreamObserver<SupportedLanguages> responseObserver)
Returns a list of supported languages for translation.
|
void |
listGlossaries(ListGlossariesRequest request,
StreamObserver<ListGlossariesResponse> responseObserver)
Lists glossaries in a project.
|
void |
translateDocument(TranslateDocumentRequest request,
StreamObserver<TranslateDocumentResponse> responseObserver)
Translates documents in synchronous mode.
|
void |
translateText(TranslateTextRequest request,
StreamObserver<TranslateTextResponse> responseObserver)
Translates input text and returns translated text.
|
newStub, newStub
getCallOptions, getChannel, withCallCredentials, withChannel, withCompression, withDeadline, withDeadlineAfter, withExecutor, withInterceptors, withMaxInboundMessageSize, withMaxOutboundMessageSize, withOption, withWaitForReady
protected TranslationServiceGrpc.TranslationServiceStub build(Channel channel, CallOptions callOptions)
build
in class AbstractStub<TranslationServiceGrpc.TranslationServiceStub>
public void translateText(TranslateTextRequest request, StreamObserver<TranslateTextResponse> responseObserver)
Translates input text and returns translated text.
public void detectLanguage(DetectLanguageRequest request, StreamObserver<DetectLanguageResponse> responseObserver)
Detects the language of text within a request.
public void getSupportedLanguages(GetSupportedLanguagesRequest request, StreamObserver<SupportedLanguages> responseObserver)
Returns a list of supported languages for translation.
public void translateDocument(TranslateDocumentRequest request, StreamObserver<TranslateDocumentResponse> responseObserver)
Translates documents in synchronous mode.
public void batchTranslateText(BatchTranslateTextRequest request, StreamObserver<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.
public void batchTranslateDocument(BatchTranslateDocumentRequest request, StreamObserver<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.
public void createGlossary(CreateGlossaryRequest request, StreamObserver<Operation> responseObserver)
Creates a glossary and returns the long-running operation. Returns NOT_FOUND, if the project doesn't exist.
public void listGlossaries(ListGlossariesRequest request, StreamObserver<ListGlossariesResponse> responseObserver)
Lists glossaries in a project. Returns NOT_FOUND, if the project doesn't exist.
public void getGlossary(GetGlossaryRequest request, StreamObserver<Glossary> responseObserver)
Gets a glossary. Returns NOT_FOUND, if the glossary doesn't exist.
public void deleteGlossary(DeleteGlossaryRequest request, StreamObserver<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.
Copyright © 2022 Google LLC. All rights reserved.