Class TranslationServiceGrpc.TranslationServiceBlockingStub (2.28.0)

public static final class TranslationServiceGrpc.TranslationServiceBlockingStub extends AbstractBlockingStub<TranslationServiceGrpc.TranslationServiceBlockingStub>

A stub to allow clients to do synchronous rpc calls to service TranslationService.

Provides natural language translation operations.

Inheritance

java.lang.Object > io.grpc.stub.AbstractStub > io.grpc.stub.AbstractBlockingStub > TranslationServiceGrpc.TranslationServiceBlockingStub

Methods

batchTranslateDocument(BatchTranslateDocumentRequest request)

public Operation batchTranslateDocument(BatchTranslateDocumentRequest request)

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.

Parameter
NameDescription
requestBatchTranslateDocumentRequest
Returns
TypeDescription
Operation

batchTranslateText(BatchTranslateTextRequest request)

public Operation batchTranslateText(BatchTranslateTextRequest request)

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.

Parameter
NameDescription
requestBatchTranslateTextRequest
Returns
TypeDescription
Operation

build(Channel channel, CallOptions callOptions)

protected TranslationServiceGrpc.TranslationServiceBlockingStub build(Channel channel, CallOptions callOptions)
Parameters
NameDescription
channelio.grpc.Channel
callOptionsio.grpc.CallOptions
Returns
TypeDescription
TranslationServiceGrpc.TranslationServiceBlockingStub
Overrides
io.grpc.stub.AbstractStub.build(io.grpc.Channel,io.grpc.CallOptions)

createGlossary(CreateGlossaryRequest request)

public Operation createGlossary(CreateGlossaryRequest request)

Creates a glossary and returns the long-running operation. Returns NOT_FOUND, if the project doesn't exist.

Parameter
NameDescription
requestCreateGlossaryRequest
Returns
TypeDescription
Operation

deleteGlossary(DeleteGlossaryRequest request)

public Operation deleteGlossary(DeleteGlossaryRequest request)

Deletes a glossary, or cancels glossary construction if the glossary isn't created yet. Returns NOT_FOUND, if the glossary doesn't exist.

Parameter
NameDescription
requestDeleteGlossaryRequest
Returns
TypeDescription
Operation

detectLanguage(DetectLanguageRequest request)

public DetectLanguageResponse detectLanguage(DetectLanguageRequest request)

Detects the language of text within a request.

Parameter
NameDescription
requestDetectLanguageRequest
Returns
TypeDescription
DetectLanguageResponse

getGlossary(GetGlossaryRequest request)

public Glossary getGlossary(GetGlossaryRequest request)

Gets a glossary. Returns NOT_FOUND, if the glossary doesn't exist.

Parameter
NameDescription
requestGetGlossaryRequest
Returns
TypeDescription
Glossary

getSupportedLanguages(GetSupportedLanguagesRequest request)

public SupportedLanguages getSupportedLanguages(GetSupportedLanguagesRequest request)

Returns a list of supported languages for translation.

Parameter
NameDescription
requestGetSupportedLanguagesRequest
Returns
TypeDescription
SupportedLanguages

listGlossaries(ListGlossariesRequest request)

public ListGlossariesResponse listGlossaries(ListGlossariesRequest request)

Lists glossaries in a project. Returns NOT_FOUND, if the project doesn't exist.

Parameter
NameDescription
requestListGlossariesRequest
Returns
TypeDescription
ListGlossariesResponse

translateDocument(TranslateDocumentRequest request)

public TranslateDocumentResponse translateDocument(TranslateDocumentRequest request)

Translates documents in synchronous mode.

Parameter
NameDescription
requestTranslateDocumentRequest
Returns
TypeDescription
TranslateDocumentResponse

translateText(TranslateTextRequest request)

public TranslateTextResponse translateText(TranslateTextRequest request)

Translates input text and returns translated text.

Parameter
NameDescription
requestTranslateTextRequest
Returns
TypeDescription
TranslateTextResponse