Interface TranslationServiceGrpc.AsyncService (2.17.0)

public static interface TranslationServiceGrpc.AsyncService

Provides natural language translation operations.

Methods

batchTranslateDocument(BatchTranslateDocumentRequest request, StreamObserver<Operation> responseObserver)

public default 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 default 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>

createGlossary(CreateGlossaryRequest request, StreamObserver<Operation> responseObserver)

public default 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>

deleteGlossary(DeleteGlossaryRequest request, StreamObserver<Operation> responseObserver)

public default 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 default void detectLanguage(DetectLanguageRequest request, StreamObserver<DetectLanguageResponse> responseObserver)

Detects the language of text within a request.

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

getGlossary(GetGlossaryRequest request, StreamObserver<Glossary> responseObserver)

public default 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 default void getSupportedLanguages(GetSupportedLanguagesRequest request, StreamObserver<SupportedLanguages> responseObserver)

Returns a list of supported languages for translation.

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

listGlossaries(ListGlossariesRequest request, StreamObserver<ListGlossariesResponse> responseObserver)

public default 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 default 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 default void translateText(TranslateTextRequest request, StreamObserver<TranslateTextResponse> responseObserver)

Translates input text and returns translated text.

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