Class TranslationServiceGrpc.TranslationServiceBlockingV2Stub
java.lang.Object
io.grpc.stub.AbstractStub<S>
io.grpc.stub.AbstractBlockingStub<TranslationServiceGrpc.TranslationServiceBlockingV2Stub>
com.google.cloud.translate.v3beta1.TranslationServiceGrpc.TranslationServiceBlockingV2Stub
- Enclosing class:
- TranslationServiceGrpc
public static final class TranslationServiceGrpc.TranslationServiceBlockingV2Stub
extends io.grpc.stub.AbstractBlockingStub<TranslationServiceGrpc.TranslationServiceBlockingV2Stub>
A stub to allow clients to do synchronous rpc calls to service TranslationService.
Provides natural language translation operations.
-
Nested Class Summary
Nested classes/interfaces inherited from class io.grpc.stub.AbstractStub
io.grpc.stub.AbstractStub.StubFactory<T extends io.grpc.stub.AbstractStub<T>> -
Method Summary
Modifier and TypeMethodDescriptionTranslates a large volume of document in asynchronous batch mode.Translates a large volume of text in asynchronous batch mode.build(io.grpc.Channel channel, io.grpc.CallOptions callOptions) createGlossary(CreateGlossaryRequest request) Creates a glossary and returns the long-running operation.deleteGlossary(DeleteGlossaryRequest request) Deletes a glossary, or cancels glossary construction if the glossary isn't created yet.detectLanguage(DetectLanguageRequest request) Detects the language of text within a request.getGlossary(GetGlossaryRequest request) Gets a glossary.Returns a list of supported languages for translation.listGlossaries(ListGlossariesRequest request) Lists glossaries in a project.refineText(RefineTextRequest request) Refines the input translated text to improve the quality.Translates documents in synchronous mode.translateText(TranslateTextRequest request) Translates input text and returns translated text.Methods inherited from class io.grpc.stub.AbstractBlockingStub
newStub, newStubMethods inherited from class io.grpc.stub.AbstractStub
getCallOptions, getChannel, withCallCredentials, withChannel, withCompression, withDeadline, withDeadlineAfter, withDeadlineAfter, withExecutor, withInterceptors, withMaxInboundMessageSize, withMaxOutboundMessageSize, withOnReadyThreshold, withOption, withWaitForReady
-
Method Details
-
build
protected TranslationServiceGrpc.TranslationServiceBlockingV2Stub build(io.grpc.Channel channel, io.grpc.CallOptions callOptions) - Specified by:
buildin classio.grpc.stub.AbstractStub<TranslationServiceGrpc.TranslationServiceBlockingV2Stub>
-
translateText
public TranslateTextResponse translateText(TranslateTextRequest request) throws io.grpc.StatusException Translates input text and returns translated text.
- Throws:
io.grpc.StatusException
-
detectLanguage
public DetectLanguageResponse detectLanguage(DetectLanguageRequest request) throws io.grpc.StatusException Detects the language of text within a request.
- Throws:
io.grpc.StatusException
-
getSupportedLanguages
public SupportedLanguages getSupportedLanguages(GetSupportedLanguagesRequest request) throws io.grpc.StatusException Returns a list of supported languages for translation.
- Throws:
io.grpc.StatusException
-
translateDocument
public TranslateDocumentResponse translateDocument(TranslateDocumentRequest request) throws io.grpc.StatusException Translates documents in synchronous mode.
- Throws:
io.grpc.StatusException
-
batchTranslateText
public Operation batchTranslateText(BatchTranslateTextRequest request) throws io.grpc.StatusException 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.
- Throws:
io.grpc.StatusException
-
batchTranslateDocument
public Operation batchTranslateDocument(BatchTranslateDocumentRequest request) throws io.grpc.StatusException 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.
- Throws:
io.grpc.StatusException
-
createGlossary
Creates a glossary and returns the long-running operation. Returns NOT_FOUND, if the project doesn't exist.
- Throws:
io.grpc.StatusException
-
listGlossaries
public ListGlossariesResponse listGlossaries(ListGlossariesRequest request) throws io.grpc.StatusException Lists glossaries in a project. Returns NOT_FOUND, if the project doesn't exist.
- Throws:
io.grpc.StatusException
-
getGlossary
Gets a glossary. Returns NOT_FOUND, if the glossary doesn't exist.
- Throws:
io.grpc.StatusException
-
deleteGlossary
Deletes a glossary, or cancels glossary construction if the glossary isn't created yet. Returns NOT_FOUND, if the glossary doesn't exist.
- Throws:
io.grpc.StatusException
-
refineText
Refines the input translated text to improve the quality.
- Throws:
io.grpc.StatusException
-