Class TranslationServiceGrpc.TranslationServiceBlockingStub (2.43.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

adaptiveMtTranslate(AdaptiveMtTranslateRequest request)

public AdaptiveMtTranslateResponse adaptiveMtTranslate(AdaptiveMtTranslateRequest request)

Translate text using Adaptive MT.

Parameter
Name Description
request AdaptiveMtTranslateRequest
Returns
Type Description
AdaptiveMtTranslateResponse

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
Name Description
request BatchTranslateDocumentRequest
Returns
Type Description
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
Name Description
request BatchTranslateTextRequest
Returns
Type Description
Operation

build(Channel channel, CallOptions callOptions)

protected TranslationServiceGrpc.TranslationServiceBlockingStub build(Channel channel, CallOptions callOptions)
Parameters
Name Description
channel io.grpc.Channel
callOptions io.grpc.CallOptions
Returns
Type Description
TranslationServiceGrpc.TranslationServiceBlockingStub
Overrides
io.grpc.stub.AbstractStub.build(io.grpc.Channel,io.grpc.CallOptions)

createAdaptiveMtDataset(CreateAdaptiveMtDatasetRequest request)

public AdaptiveMtDataset createAdaptiveMtDataset(CreateAdaptiveMtDatasetRequest request)

Creates an Adaptive MT dataset.

Parameter
Name Description
request CreateAdaptiveMtDatasetRequest
Returns
Type Description
AdaptiveMtDataset

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
Name Description
request CreateGlossaryRequest
Returns
Type Description
Operation

deleteAdaptiveMtDataset(DeleteAdaptiveMtDatasetRequest request)

public Empty deleteAdaptiveMtDataset(DeleteAdaptiveMtDatasetRequest request)

Deletes an Adaptive MT dataset, including all its entries and associated metadata.

Parameter
Name Description
request DeleteAdaptiveMtDatasetRequest
Returns
Type Description
Empty

deleteAdaptiveMtFile(DeleteAdaptiveMtFileRequest request)

public Empty deleteAdaptiveMtFile(DeleteAdaptiveMtFileRequest request)

Deletes an AdaptiveMtFile along with its sentences.

Parameter
Name Description
request DeleteAdaptiveMtFileRequest
Returns
Type Description
Empty

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
Name Description
request DeleteGlossaryRequest
Returns
Type Description
Operation

detectLanguage(DetectLanguageRequest request)

public DetectLanguageResponse detectLanguage(DetectLanguageRequest request)

Detects the language of text within a request.

Parameter
Name Description
request DetectLanguageRequest
Returns
Type Description
DetectLanguageResponse

getAdaptiveMtDataset(GetAdaptiveMtDatasetRequest request)

public AdaptiveMtDataset getAdaptiveMtDataset(GetAdaptiveMtDatasetRequest request)

Gets the Adaptive MT dataset.

Parameter
Name Description
request GetAdaptiveMtDatasetRequest
Returns
Type Description
AdaptiveMtDataset

getAdaptiveMtFile(GetAdaptiveMtFileRequest request)

public AdaptiveMtFile getAdaptiveMtFile(GetAdaptiveMtFileRequest request)

Gets and AdaptiveMtFile

Parameter
Name Description
request GetAdaptiveMtFileRequest
Returns
Type Description
AdaptiveMtFile

getGlossary(GetGlossaryRequest request)

public Glossary getGlossary(GetGlossaryRequest request)

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

Parameter
Name Description
request GetGlossaryRequest
Returns
Type Description
Glossary

getSupportedLanguages(GetSupportedLanguagesRequest request)

public SupportedLanguages getSupportedLanguages(GetSupportedLanguagesRequest request)

Returns a list of supported languages for translation.

Parameter
Name Description
request GetSupportedLanguagesRequest
Returns
Type Description
SupportedLanguages

importAdaptiveMtFile(ImportAdaptiveMtFileRequest request)

public ImportAdaptiveMtFileResponse importAdaptiveMtFile(ImportAdaptiveMtFileRequest request)

Imports an AdaptiveMtFile and adds all of its sentences into the AdaptiveMtDataset.

Parameter
Name Description
request ImportAdaptiveMtFileRequest
Returns
Type Description
ImportAdaptiveMtFileResponse

listAdaptiveMtDatasets(ListAdaptiveMtDatasetsRequest request)

public ListAdaptiveMtDatasetsResponse listAdaptiveMtDatasets(ListAdaptiveMtDatasetsRequest request)

Lists all Adaptive MT datasets for which the caller has read permission.

Parameter
Name Description
request ListAdaptiveMtDatasetsRequest
Returns
Type Description
ListAdaptiveMtDatasetsResponse

listAdaptiveMtFiles(ListAdaptiveMtFilesRequest request)

public ListAdaptiveMtFilesResponse listAdaptiveMtFiles(ListAdaptiveMtFilesRequest request)

Lists all AdaptiveMtFiles associated to an AdaptiveMtDataset.

Parameter
Name Description
request ListAdaptiveMtFilesRequest
Returns
Type Description
ListAdaptiveMtFilesResponse

listAdaptiveMtSentences(ListAdaptiveMtSentencesRequest request)

public ListAdaptiveMtSentencesResponse listAdaptiveMtSentences(ListAdaptiveMtSentencesRequest request)

Lists all AdaptiveMtSentences under a given file/dataset.

Parameter
Name Description
request ListAdaptiveMtSentencesRequest
Returns
Type Description
ListAdaptiveMtSentencesResponse

listGlossaries(ListGlossariesRequest request)

public ListGlossariesResponse listGlossaries(ListGlossariesRequest request)

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

Parameter
Name Description
request ListGlossariesRequest
Returns
Type Description
ListGlossariesResponse

translateDocument(TranslateDocumentRequest request)

public TranslateDocumentResponse translateDocument(TranslateDocumentRequest request)

Translates documents in synchronous mode.

Parameter
Name Description
request TranslateDocumentRequest
Returns
Type Description
TranslateDocumentResponse

translateText(TranslateTextRequest request)

public TranslateTextResponse translateText(TranslateTextRequest request)

Translates input text and returns translated text.

Parameter
Name Description
request TranslateTextRequest
Returns
Type Description
TranslateTextResponse