Class TranslationServiceGrpc.TranslationServiceFutureStub (2.39.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
NameDescription
requestAdaptiveMtTranslateRequest
Returns
TypeDescription
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
NameDescription
requestBatchTranslateDocumentRequest
Returns
TypeDescription
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
NameDescription
requestBatchTranslateTextRequest
Returns
TypeDescription
com.google.common.util.concurrent.ListenableFuture<Operation>

build(Channel channel, CallOptions callOptions)

protected TranslationServiceGrpc.TranslationServiceFutureStub build(Channel channel, CallOptions callOptions)
Parameters
NameDescription
channelio.grpc.Channel
callOptionsio.grpc.CallOptions
Returns
TypeDescription
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
NameDescription
requestCreateAdaptiveMtDatasetRequest
Returns
TypeDescription
com.google.common.util.concurrent.ListenableFuture<AdaptiveMtDataset>

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
NameDescription
requestCreateGlossaryRequest
Returns
TypeDescription
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
NameDescription
requestDeleteAdaptiveMtDatasetRequest
Returns
TypeDescription
com.google.common.util.concurrent.ListenableFuture<Empty>

deleteAdaptiveMtFile(DeleteAdaptiveMtFileRequest request)

public ListenableFuture<Empty> deleteAdaptiveMtFile(DeleteAdaptiveMtFileRequest request)

Deletes an AdaptiveMtFile along with its sentences.

Parameter
NameDescription
requestDeleteAdaptiveMtFileRequest
Returns
TypeDescription
com.google.common.util.concurrent.ListenableFuture<Empty>

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
NameDescription
requestDeleteGlossaryRequest
Returns
TypeDescription
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
NameDescription
requestDetectLanguageRequest
Returns
TypeDescription
com.google.common.util.concurrent.ListenableFuture<DetectLanguageResponse>

getAdaptiveMtDataset(GetAdaptiveMtDatasetRequest request)

public ListenableFuture<AdaptiveMtDataset> getAdaptiveMtDataset(GetAdaptiveMtDatasetRequest request)

Gets the Adaptive MT dataset.

Parameter
NameDescription
requestGetAdaptiveMtDatasetRequest
Returns
TypeDescription
com.google.common.util.concurrent.ListenableFuture<AdaptiveMtDataset>

getAdaptiveMtFile(GetAdaptiveMtFileRequest request)

public ListenableFuture<AdaptiveMtFile> getAdaptiveMtFile(GetAdaptiveMtFileRequest request)

Gets and AdaptiveMtFile

Parameter
NameDescription
requestGetAdaptiveMtFileRequest
Returns
TypeDescription
com.google.common.util.concurrent.ListenableFuture<AdaptiveMtFile>

getGlossary(GetGlossaryRequest request)

public ListenableFuture<Glossary> getGlossary(GetGlossaryRequest request)

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

Parameter
NameDescription
requestGetGlossaryRequest
Returns
TypeDescription
com.google.common.util.concurrent.ListenableFuture<Glossary>

getSupportedLanguages(GetSupportedLanguagesRequest request)

public ListenableFuture<SupportedLanguages> getSupportedLanguages(GetSupportedLanguagesRequest request)

Returns a list of supported languages for translation.

Parameter
NameDescription
requestGetSupportedLanguagesRequest
Returns
TypeDescription
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
NameDescription
requestImportAdaptiveMtFileRequest
Returns
TypeDescription
com.google.common.util.concurrent.ListenableFuture<ImportAdaptiveMtFileResponse>

listAdaptiveMtDatasets(ListAdaptiveMtDatasetsRequest request)

public ListenableFuture<ListAdaptiveMtDatasetsResponse> listAdaptiveMtDatasets(ListAdaptiveMtDatasetsRequest request)

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

Parameter
NameDescription
requestListAdaptiveMtDatasetsRequest
Returns
TypeDescription
com.google.common.util.concurrent.ListenableFuture<ListAdaptiveMtDatasetsResponse>

listAdaptiveMtFiles(ListAdaptiveMtFilesRequest request)

public ListenableFuture<ListAdaptiveMtFilesResponse> listAdaptiveMtFiles(ListAdaptiveMtFilesRequest request)

Lists all AdaptiveMtFiles associated to an AdaptiveMtDataset.

Parameter
NameDescription
requestListAdaptiveMtFilesRequest
Returns
TypeDescription
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
NameDescription
requestListAdaptiveMtSentencesRequest
Returns
TypeDescription
com.google.common.util.concurrent.ListenableFuture<ListAdaptiveMtSentencesResponse>

listGlossaries(ListGlossariesRequest request)

public ListenableFuture<ListGlossariesResponse> listGlossaries(ListGlossariesRequest request)

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

Parameter
NameDescription
requestListGlossariesRequest
Returns
TypeDescription
com.google.common.util.concurrent.ListenableFuture<ListGlossariesResponse>

translateDocument(TranslateDocumentRequest request)

public ListenableFuture<TranslateDocumentResponse> translateDocument(TranslateDocumentRequest request)

Translates documents in synchronous mode.

Parameter
NameDescription
requestTranslateDocumentRequest
Returns
TypeDescription
com.google.common.util.concurrent.ListenableFuture<TranslateDocumentResponse>

translateText(TranslateTextRequest request)

public ListenableFuture<TranslateTextResponse> translateText(TranslateTextRequest request)

Translates input text and returns translated text.

Parameter
NameDescription
requestTranslateTextRequest
Returns
TypeDescription
com.google.common.util.concurrent.ListenableFuture<TranslateTextResponse>