Class TranslationServiceGrpc.TranslationServiceFutureStub (2.48.0)

public static final class TranslationServiceGrpc.TranslationServiceFutureStub extends AbstractFutureStub<TranslationServiceGrpc.TranslationServiceFutureStub>

A stub to allow clients to do ListenableFuture-style rpc calls to service TranslationService.

Provides natural language translation operations.

Inheritance

java.lang.Object > io.grpc.stub.AbstractStub > io.grpc.stub.AbstractFutureStub > TranslationServiceGrpc.TranslationServiceFutureStub

Methods

adaptiveMtTranslate(AdaptiveMtTranslateRequest request)

public ListenableFuture<AdaptiveMtTranslateResponse> adaptiveMtTranslate(AdaptiveMtTranslateRequest request)

Translate text using Adaptive MT.

Parameter
Name Description
request AdaptiveMtTranslateRequest
Returns
Type Description
com.google.common.util.concurrent.ListenableFuture<AdaptiveMtTranslateResponse>

batchTranslateDocument(BatchTranslateDocumentRequest request)

public ListenableFuture<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
com.google.common.util.concurrent.ListenableFuture<Operation>

batchTranslateText(BatchTranslateTextRequest request)

public ListenableFuture<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
com.google.common.util.concurrent.ListenableFuture<Operation>

build(Channel channel, CallOptions callOptions)

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

createAdaptiveMtDataset(CreateAdaptiveMtDatasetRequest request)

public ListenableFuture<AdaptiveMtDataset> createAdaptiveMtDataset(CreateAdaptiveMtDatasetRequest request)

Creates an Adaptive MT dataset.

Parameter
Name Description
request CreateAdaptiveMtDatasetRequest
Returns
Type Description
com.google.common.util.concurrent.ListenableFuture<AdaptiveMtDataset>

createDataset(CreateDatasetRequest request)

public ListenableFuture<Operation> createDataset(CreateDatasetRequest request)

Creates a Dataset.

Parameter
Name Description
request CreateDatasetRequest
Returns
Type Description
com.google.common.util.concurrent.ListenableFuture<Operation>

createGlossary(CreateGlossaryRequest request)

public ListenableFuture<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
com.google.common.util.concurrent.ListenableFuture<Operation>

createGlossaryEntry(CreateGlossaryEntryRequest request)

public ListenableFuture<GlossaryEntry> createGlossaryEntry(CreateGlossaryEntryRequest request)

Creates a glossary entry.

Parameter
Name Description
request CreateGlossaryEntryRequest
Returns
Type Description
com.google.common.util.concurrent.ListenableFuture<GlossaryEntry>

createModel(CreateModelRequest request)

public ListenableFuture<Operation> createModel(CreateModelRequest request)

Creates a Model.

Parameter
Name Description
request CreateModelRequest
Returns
Type Description
com.google.common.util.concurrent.ListenableFuture<Operation>

deleteAdaptiveMtDataset(DeleteAdaptiveMtDatasetRequest request)

public ListenableFuture<Empty> deleteAdaptiveMtDataset(DeleteAdaptiveMtDatasetRequest request)

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

Parameter
Name Description
request DeleteAdaptiveMtDatasetRequest
Returns
Type Description
com.google.common.util.concurrent.ListenableFuture<Empty>

deleteAdaptiveMtFile(DeleteAdaptiveMtFileRequest request)

public ListenableFuture<Empty> deleteAdaptiveMtFile(DeleteAdaptiveMtFileRequest request)

Deletes an AdaptiveMtFile along with its sentences.

Parameter
Name Description
request DeleteAdaptiveMtFileRequest
Returns
Type Description
com.google.common.util.concurrent.ListenableFuture<Empty>

deleteDataset(DeleteDatasetRequest request)

public ListenableFuture<Operation> deleteDataset(DeleteDatasetRequest request)

Deletes a dataset and all of its contents.

Parameter
Name Description
request DeleteDatasetRequest
Returns
Type Description
com.google.common.util.concurrent.ListenableFuture<Operation>

deleteGlossary(DeleteGlossaryRequest request)

public ListenableFuture<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
com.google.common.util.concurrent.ListenableFuture<Operation>

deleteGlossaryEntry(DeleteGlossaryEntryRequest request)

public ListenableFuture<Empty> deleteGlossaryEntry(DeleteGlossaryEntryRequest request)

Deletes a single entry from the glossary

Parameter
Name Description
request DeleteGlossaryEntryRequest
Returns
Type Description
com.google.common.util.concurrent.ListenableFuture<Empty>

deleteModel(DeleteModelRequest request)

public ListenableFuture<Operation> deleteModel(DeleteModelRequest request)

Deletes a model.

Parameter
Name Description
request DeleteModelRequest
Returns
Type Description
com.google.common.util.concurrent.ListenableFuture<Operation>

detectLanguage(DetectLanguageRequest request)

public ListenableFuture<DetectLanguageResponse> detectLanguage(DetectLanguageRequest request)

Detects the language of text within a request.

Parameter
Name Description
request DetectLanguageRequest
Returns
Type Description
com.google.common.util.concurrent.ListenableFuture<DetectLanguageResponse>

exportData(ExportDataRequest request)

public ListenableFuture<Operation> exportData(ExportDataRequest request)

Exports dataset's data to the provided output location.

Parameter
Name Description
request ExportDataRequest
Returns
Type Description
com.google.common.util.concurrent.ListenableFuture<Operation>

getAdaptiveMtDataset(GetAdaptiveMtDatasetRequest request)

public ListenableFuture<AdaptiveMtDataset> getAdaptiveMtDataset(GetAdaptiveMtDatasetRequest request)

Gets the Adaptive MT dataset.

Parameter
Name Description
request GetAdaptiveMtDatasetRequest
Returns
Type Description
com.google.common.util.concurrent.ListenableFuture<AdaptiveMtDataset>

getAdaptiveMtFile(GetAdaptiveMtFileRequest request)

public ListenableFuture<AdaptiveMtFile> getAdaptiveMtFile(GetAdaptiveMtFileRequest request)

Gets and AdaptiveMtFile

Parameter
Name Description
request GetAdaptiveMtFileRequest
Returns
Type Description
com.google.common.util.concurrent.ListenableFuture<AdaptiveMtFile>

getDataset(GetDatasetRequest request)

public ListenableFuture<Dataset> getDataset(GetDatasetRequest request)

Gets a Dataset.

Parameter
Name Description
request GetDatasetRequest
Returns
Type Description
com.google.common.util.concurrent.ListenableFuture<Dataset>

getGlossary(GetGlossaryRequest request)

public ListenableFuture<Glossary> getGlossary(GetGlossaryRequest request)

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

Parameter
Name Description
request GetGlossaryRequest
Returns
Type Description
com.google.common.util.concurrent.ListenableFuture<Glossary>

getGlossaryEntry(GetGlossaryEntryRequest request)

public ListenableFuture<GlossaryEntry> getGlossaryEntry(GetGlossaryEntryRequest request)

Gets a single glossary entry by the given id.

Parameter
Name Description
request GetGlossaryEntryRequest
Returns
Type Description
com.google.common.util.concurrent.ListenableFuture<GlossaryEntry>

getModel(GetModelRequest request)

public ListenableFuture<Model> getModel(GetModelRequest request)

Gets a model.

Parameter
Name Description
request GetModelRequest
Returns
Type Description
com.google.common.util.concurrent.ListenableFuture<Model>

getSupportedLanguages(GetSupportedLanguagesRequest request)

public ListenableFuture<SupportedLanguages> getSupportedLanguages(GetSupportedLanguagesRequest request)

Returns a list of supported languages for translation.

Parameter
Name Description
request GetSupportedLanguagesRequest
Returns
Type Description
com.google.common.util.concurrent.ListenableFuture<SupportedLanguages>

importAdaptiveMtFile(ImportAdaptiveMtFileRequest request)

public ListenableFuture<ImportAdaptiveMtFileResponse> importAdaptiveMtFile(ImportAdaptiveMtFileRequest request)

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

Parameter
Name Description
request ImportAdaptiveMtFileRequest
Returns
Type Description
com.google.common.util.concurrent.ListenableFuture<ImportAdaptiveMtFileResponse>

importData(ImportDataRequest request)

public ListenableFuture<Operation> importData(ImportDataRequest request)

Import sentence pairs into translation Dataset.

Parameter
Name Description
request ImportDataRequest
Returns
Type Description
com.google.common.util.concurrent.ListenableFuture<Operation>

listAdaptiveMtDatasets(ListAdaptiveMtDatasetsRequest request)

public ListenableFuture<ListAdaptiveMtDatasetsResponse> listAdaptiveMtDatasets(ListAdaptiveMtDatasetsRequest request)

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

Parameter
Name Description
request ListAdaptiveMtDatasetsRequest
Returns
Type Description
com.google.common.util.concurrent.ListenableFuture<ListAdaptiveMtDatasetsResponse>

listAdaptiveMtFiles(ListAdaptiveMtFilesRequest request)

public ListenableFuture<ListAdaptiveMtFilesResponse> listAdaptiveMtFiles(ListAdaptiveMtFilesRequest request)

Lists all AdaptiveMtFiles associated to an AdaptiveMtDataset.

Parameter
Name Description
request ListAdaptiveMtFilesRequest
Returns
Type Description
com.google.common.util.concurrent.ListenableFuture<ListAdaptiveMtFilesResponse>

listAdaptiveMtSentences(ListAdaptiveMtSentencesRequest request)

public ListenableFuture<ListAdaptiveMtSentencesResponse> listAdaptiveMtSentences(ListAdaptiveMtSentencesRequest request)

Lists all AdaptiveMtSentences under a given file/dataset.

Parameter
Name Description
request ListAdaptiveMtSentencesRequest
Returns
Type Description
com.google.common.util.concurrent.ListenableFuture<ListAdaptiveMtSentencesResponse>

listDatasets(ListDatasetsRequest request)

public ListenableFuture<ListDatasetsResponse> listDatasets(ListDatasetsRequest request)

Lists datasets.

Parameter
Name Description
request ListDatasetsRequest
Returns
Type Description
com.google.common.util.concurrent.ListenableFuture<ListDatasetsResponse>

listExamples(ListExamplesRequest request)

public ListenableFuture<ListExamplesResponse> listExamples(ListExamplesRequest request)

Lists sentence pairs in the dataset.

Parameter
Name Description
request ListExamplesRequest
Returns
Type Description
com.google.common.util.concurrent.ListenableFuture<ListExamplesResponse>

listGlossaries(ListGlossariesRequest request)

public ListenableFuture<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
com.google.common.util.concurrent.ListenableFuture<ListGlossariesResponse>

listGlossaryEntries(ListGlossaryEntriesRequest request)

public ListenableFuture<ListGlossaryEntriesResponse> listGlossaryEntries(ListGlossaryEntriesRequest request)

List the entries for the glossary.

Parameter
Name Description
request ListGlossaryEntriesRequest
Returns
Type Description
com.google.common.util.concurrent.ListenableFuture<ListGlossaryEntriesResponse>

listModels(ListModelsRequest request)

public ListenableFuture<ListModelsResponse> listModels(ListModelsRequest request)

Lists models.

Parameter
Name Description
request ListModelsRequest
Returns
Type Description
com.google.common.util.concurrent.ListenableFuture<ListModelsResponse>

romanizeText(RomanizeTextRequest request)

public ListenableFuture<RomanizeTextResponse> romanizeText(RomanizeTextRequest request)

Romanize input text written in non-Latin scripts to Latin text.

Parameter
Name Description
request RomanizeTextRequest
Returns
Type Description
com.google.common.util.concurrent.ListenableFuture<RomanizeTextResponse>

translateDocument(TranslateDocumentRequest request)

public ListenableFuture<TranslateDocumentResponse> translateDocument(TranslateDocumentRequest request)

Translates documents in synchronous mode.

Parameter
Name Description
request TranslateDocumentRequest
Returns
Type Description
com.google.common.util.concurrent.ListenableFuture<TranslateDocumentResponse>

translateText(TranslateTextRequest request)

public ListenableFuture<TranslateTextResponse> translateText(TranslateTextRequest request)

Translates input text and returns translated text.

Parameter
Name Description
request TranslateTextRequest
Returns
Type Description
com.google.common.util.concurrent.ListenableFuture<TranslateTextResponse>

updateGlossary(UpdateGlossaryRequest request)

public ListenableFuture<Operation> updateGlossary(UpdateGlossaryRequest request)

Updates a glossary. A LRO is used since the update can be async if the glossary's entry file is updated.

Parameter
Name Description
request UpdateGlossaryRequest
Returns
Type Description
com.google.common.util.concurrent.ListenableFuture<Operation>

updateGlossaryEntry(UpdateGlossaryEntryRequest request)

public ListenableFuture<GlossaryEntry> updateGlossaryEntry(UpdateGlossaryEntryRequest request)

Updates a glossary entry.

Parameter
Name Description
request UpdateGlossaryEntryRequest
Returns
Type Description
com.google.common.util.concurrent.ListenableFuture<GlossaryEntry>