Class TranslationServiceGrpc.TranslationServiceStub (2.39.0)

public static final class TranslationServiceGrpc.TranslationServiceStub extends AbstractAsyncStub<TranslationServiceGrpc.TranslationServiceStub>

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

Provides natural language translation operations.

Inheritance

java.lang.Object > io.grpc.stub.AbstractStub > io.grpc.stub.AbstractAsyncStub > TranslationServiceGrpc.TranslationServiceStub

Methods

adaptiveMtTranslate(AdaptiveMtTranslateRequest request, StreamObserver<AdaptiveMtTranslateResponse> responseObserver)

public void adaptiveMtTranslate(AdaptiveMtTranslateRequest request, StreamObserver<AdaptiveMtTranslateResponse> responseObserver)

Translate text using Adaptive MT.

Parameters
NameDescription
requestAdaptiveMtTranslateRequest
responseObserverio.grpc.stub.StreamObserver<AdaptiveMtTranslateResponse>

batchTranslateDocument(BatchTranslateDocumentRequest request, StreamObserver<Operation> responseObserver)

public void batchTranslateDocument(BatchTranslateDocumentRequest request, StreamObserver<Operation> responseObserver)

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.

Parameters
NameDescription
requestBatchTranslateDocumentRequest
responseObserverio.grpc.stub.StreamObserver<Operation>

batchTranslateText(BatchTranslateTextRequest request, StreamObserver<Operation> responseObserver)

public void batchTranslateText(BatchTranslateTextRequest request, StreamObserver<Operation> responseObserver)

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.

Parameters
NameDescription
requestBatchTranslateTextRequest
responseObserverio.grpc.stub.StreamObserver<Operation>

build(Channel channel, CallOptions callOptions)

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

createAdaptiveMtDataset(CreateAdaptiveMtDatasetRequest request, StreamObserver<AdaptiveMtDataset> responseObserver)

public void createAdaptiveMtDataset(CreateAdaptiveMtDatasetRequest request, StreamObserver<AdaptiveMtDataset> responseObserver)

Creates an Adaptive MT dataset.

Parameters
NameDescription
requestCreateAdaptiveMtDatasetRequest
responseObserverio.grpc.stub.StreamObserver<AdaptiveMtDataset>

createGlossary(CreateGlossaryRequest request, StreamObserver<Operation> responseObserver)

public void createGlossary(CreateGlossaryRequest request, StreamObserver<Operation> responseObserver)

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

Parameters
NameDescription
requestCreateGlossaryRequest
responseObserverio.grpc.stub.StreamObserver<Operation>

deleteAdaptiveMtDataset(DeleteAdaptiveMtDatasetRequest request, StreamObserver<Empty> responseObserver)

public void deleteAdaptiveMtDataset(DeleteAdaptiveMtDatasetRequest request, StreamObserver<Empty> responseObserver)

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

Parameters
NameDescription
requestDeleteAdaptiveMtDatasetRequest
responseObserverio.grpc.stub.StreamObserver<Empty>

deleteAdaptiveMtFile(DeleteAdaptiveMtFileRequest request, StreamObserver<Empty> responseObserver)

public void deleteAdaptiveMtFile(DeleteAdaptiveMtFileRequest request, StreamObserver<Empty> responseObserver)

Deletes an AdaptiveMtFile along with its sentences.

Parameters
NameDescription
requestDeleteAdaptiveMtFileRequest
responseObserverio.grpc.stub.StreamObserver<Empty>

deleteGlossary(DeleteGlossaryRequest request, StreamObserver<Operation> responseObserver)

public void deleteGlossary(DeleteGlossaryRequest request, StreamObserver<Operation> responseObserver)

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

Parameters
NameDescription
requestDeleteGlossaryRequest
responseObserverio.grpc.stub.StreamObserver<Operation>

detectLanguage(DetectLanguageRequest request, StreamObserver<DetectLanguageResponse> responseObserver)

public void detectLanguage(DetectLanguageRequest request, StreamObserver<DetectLanguageResponse> responseObserver)

Detects the language of text within a request.

Parameters
NameDescription
requestDetectLanguageRequest
responseObserverio.grpc.stub.StreamObserver<DetectLanguageResponse>

getAdaptiveMtDataset(GetAdaptiveMtDatasetRequest request, StreamObserver<AdaptiveMtDataset> responseObserver)

public void getAdaptiveMtDataset(GetAdaptiveMtDatasetRequest request, StreamObserver<AdaptiveMtDataset> responseObserver)

Gets the Adaptive MT dataset.

Parameters
NameDescription
requestGetAdaptiveMtDatasetRequest
responseObserverio.grpc.stub.StreamObserver<AdaptiveMtDataset>

getAdaptiveMtFile(GetAdaptiveMtFileRequest request, StreamObserver<AdaptiveMtFile> responseObserver)

public void getAdaptiveMtFile(GetAdaptiveMtFileRequest request, StreamObserver<AdaptiveMtFile> responseObserver)

Gets and AdaptiveMtFile

Parameters
NameDescription
requestGetAdaptiveMtFileRequest
responseObserverio.grpc.stub.StreamObserver<AdaptiveMtFile>

getGlossary(GetGlossaryRequest request, StreamObserver<Glossary> responseObserver)

public void getGlossary(GetGlossaryRequest request, StreamObserver<Glossary> responseObserver)

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

Parameters
NameDescription
requestGetGlossaryRequest
responseObserverio.grpc.stub.StreamObserver<Glossary>

getSupportedLanguages(GetSupportedLanguagesRequest request, StreamObserver<SupportedLanguages> responseObserver)

public void getSupportedLanguages(GetSupportedLanguagesRequest request, StreamObserver<SupportedLanguages> responseObserver)

Returns a list of supported languages for translation.

Parameters
NameDescription
requestGetSupportedLanguagesRequest
responseObserverio.grpc.stub.StreamObserver<SupportedLanguages>

importAdaptiveMtFile(ImportAdaptiveMtFileRequest request, StreamObserver<ImportAdaptiveMtFileResponse> responseObserver)

public void importAdaptiveMtFile(ImportAdaptiveMtFileRequest request, StreamObserver<ImportAdaptiveMtFileResponse> responseObserver)

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

Parameters
NameDescription
requestImportAdaptiveMtFileRequest
responseObserverio.grpc.stub.StreamObserver<ImportAdaptiveMtFileResponse>

listAdaptiveMtDatasets(ListAdaptiveMtDatasetsRequest request, StreamObserver<ListAdaptiveMtDatasetsResponse> responseObserver)

public void listAdaptiveMtDatasets(ListAdaptiveMtDatasetsRequest request, StreamObserver<ListAdaptiveMtDatasetsResponse> responseObserver)

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

Parameters
NameDescription
requestListAdaptiveMtDatasetsRequest
responseObserverio.grpc.stub.StreamObserver<ListAdaptiveMtDatasetsResponse>

listAdaptiveMtFiles(ListAdaptiveMtFilesRequest request, StreamObserver<ListAdaptiveMtFilesResponse> responseObserver)

public void listAdaptiveMtFiles(ListAdaptiveMtFilesRequest request, StreamObserver<ListAdaptiveMtFilesResponse> responseObserver)

Lists all AdaptiveMtFiles associated to an AdaptiveMtDataset.

Parameters
NameDescription
requestListAdaptiveMtFilesRequest
responseObserverio.grpc.stub.StreamObserver<ListAdaptiveMtFilesResponse>

listAdaptiveMtSentences(ListAdaptiveMtSentencesRequest request, StreamObserver<ListAdaptiveMtSentencesResponse> responseObserver)

public void listAdaptiveMtSentences(ListAdaptiveMtSentencesRequest request, StreamObserver<ListAdaptiveMtSentencesResponse> responseObserver)

Lists all AdaptiveMtSentences under a given file/dataset.

Parameters
NameDescription
requestListAdaptiveMtSentencesRequest
responseObserverio.grpc.stub.StreamObserver<ListAdaptiveMtSentencesResponse>

listGlossaries(ListGlossariesRequest request, StreamObserver<ListGlossariesResponse> responseObserver)

public void listGlossaries(ListGlossariesRequest request, StreamObserver<ListGlossariesResponse> responseObserver)

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

Parameters
NameDescription
requestListGlossariesRequest
responseObserverio.grpc.stub.StreamObserver<ListGlossariesResponse>

translateDocument(TranslateDocumentRequest request, StreamObserver<TranslateDocumentResponse> responseObserver)

public void translateDocument(TranslateDocumentRequest request, StreamObserver<TranslateDocumentResponse> responseObserver)

Translates documents in synchronous mode.

Parameters
NameDescription
requestTranslateDocumentRequest
responseObserverio.grpc.stub.StreamObserver<TranslateDocumentResponse>

translateText(TranslateTextRequest request, StreamObserver<TranslateTextResponse> responseObserver)

public void translateText(TranslateTextRequest request, StreamObserver<TranslateTextResponse> responseObserver)

Translates input text and returns translated text.

Parameters
NameDescription
requestTranslateTextRequest
responseObserverio.grpc.stub.StreamObserver<TranslateTextResponse>