Package com.google.cloud.translate.v3
Class TranslationServiceGrpc.TranslationServiceBlockingV2Stub
java.lang.Object
io.grpc.stub.AbstractStub<S>
io.grpc.stub.AbstractBlockingStub<TranslationServiceGrpc.TranslationServiceBlockingV2Stub>
com.google.cloud.translate.v3.TranslationServiceGrpc.TranslationServiceBlockingV2Stub
- Enclosing class:
- TranslationServiceGrpc
public static final class TranslationServiceGrpc.TranslationServiceBlockingV2Stub
extends io.grpc.stub.AbstractBlockingStub<TranslationServiceGrpc.TranslationServiceBlockingV2Stub>
A stub to allow clients to do synchronous rpc calls to service TranslationService.
Provides natural language translation operations.
-
Nested Class Summary
Nested classes/interfaces inherited from class io.grpc.stub.AbstractStub
io.grpc.stub.AbstractStub.StubFactory<T extends io.grpc.stub.AbstractStub<T>> -
Method Summary
Modifier and TypeMethodDescriptionTranslate text using Adaptive MT.Translates a large volume of document in asynchronous batch mode.Translates a large volume of text in asynchronous batch mode.build(io.grpc.Channel channel, io.grpc.CallOptions callOptions) Creates an Adaptive MT dataset.createDataset(CreateDatasetRequest request) Creates a Dataset.createGlossary(CreateGlossaryRequest request) Creates a glossary and returns the long-running operation.Creates a glossary entry.createModel(CreateModelRequest request) Creates a Model.com.google.protobuf.EmptyDeletes an Adaptive MT dataset, including all its entries and associated metadata.com.google.protobuf.EmptyDeletes an AdaptiveMtFile along with its sentences.deleteDataset(DeleteDatasetRequest request) Deletes a dataset and all of its contents.deleteGlossary(DeleteGlossaryRequest request) Deletes a glossary, or cancels glossary construction if the glossary isn't created yet.com.google.protobuf.EmptyDeletes a single entry from the glossarydeleteModel(DeleteModelRequest request) Deletes a model.detectLanguage(DetectLanguageRequest request) Detects the language of text within a request.exportData(ExportDataRequest request) Exports dataset's data to the provided output location.Gets the Adaptive MT dataset.Gets and AdaptiveMtFilegetDataset(GetDatasetRequest request) Gets a Dataset.getGlossary(GetGlossaryRequest request) Gets a glossary.getGlossaryEntry(GetGlossaryEntryRequest request) Gets a single glossary entry by the given id.getModel(GetModelRequest request) Gets a model.Returns a list of supported languages for translation.Imports an AdaptiveMtFile and adds all of its sentences into the AdaptiveMtDataset.importData(ImportDataRequest request) Import sentence pairs into translation Dataset.Lists all Adaptive MT datasets for which the caller has read permission.Lists all AdaptiveMtFiles associated to an AdaptiveMtDataset.Lists all AdaptiveMtSentences under a given file/dataset.listDatasets(ListDatasetsRequest request) Lists datasets.listExamples(ListExamplesRequest request) Lists sentence pairs in the dataset.listGlossaries(ListGlossariesRequest request) Lists glossaries in a project.List the entries for the glossary.listModels(ListModelsRequest request) Lists models.romanizeText(RomanizeTextRequest request) Romanize input text written in non-Latin scripts to Latin text.Translates documents in synchronous mode.translateText(TranslateTextRequest request) Translates input text and returns translated text.updateGlossary(UpdateGlossaryRequest request) Updates a glossary.Updates a glossary entry.Methods inherited from class io.grpc.stub.AbstractBlockingStub
newStub, newStubMethods inherited from class io.grpc.stub.AbstractStub
getCallOptions, getChannel, withCallCredentials, withChannel, withCompression, withDeadline, withDeadlineAfter, withDeadlineAfter, withExecutor, withInterceptors, withMaxInboundMessageSize, withMaxOutboundMessageSize, withOnReadyThreshold, withOption, withWaitForReady
-
Method Details
-
build
protected TranslationServiceGrpc.TranslationServiceBlockingV2Stub build(io.grpc.Channel channel, io.grpc.CallOptions callOptions) - Specified by:
buildin classio.grpc.stub.AbstractStub<TranslationServiceGrpc.TranslationServiceBlockingV2Stub>
-
translateText
public TranslateTextResponse translateText(TranslateTextRequest request) throws io.grpc.StatusException Translates input text and returns translated text.
- Throws:
io.grpc.StatusException
-
romanizeText
public RomanizeTextResponse romanizeText(RomanizeTextRequest request) throws io.grpc.StatusException Romanize input text written in non-Latin scripts to Latin text.
- Throws:
io.grpc.StatusException
-
detectLanguage
public DetectLanguageResponse detectLanguage(DetectLanguageRequest request) throws io.grpc.StatusException Detects the language of text within a request.
- Throws:
io.grpc.StatusException
-
getSupportedLanguages
public SupportedLanguages getSupportedLanguages(GetSupportedLanguagesRequest request) throws io.grpc.StatusException Returns a list of supported languages for translation.
- Throws:
io.grpc.StatusException
-
translateDocument
public TranslateDocumentResponse translateDocument(TranslateDocumentRequest request) throws io.grpc.StatusException Translates documents in synchronous mode.
- Throws:
io.grpc.StatusException
-
batchTranslateText
public Operation batchTranslateText(BatchTranslateTextRequest request) throws io.grpc.StatusException 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.
- Throws:
io.grpc.StatusException
-
batchTranslateDocument
public Operation batchTranslateDocument(BatchTranslateDocumentRequest request) throws io.grpc.StatusException 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.
- Throws:
io.grpc.StatusException
-
createGlossary
Creates a glossary and returns the long-running operation. Returns NOT_FOUND, if the project doesn't exist.
- Throws:
io.grpc.StatusException
-
updateGlossary
Updates a glossary. A LRO is used since the update can be async if the glossary's entry file is updated.
- Throws:
io.grpc.StatusException
-
listGlossaries
public ListGlossariesResponse listGlossaries(ListGlossariesRequest request) throws io.grpc.StatusException Lists glossaries in a project. Returns NOT_FOUND, if the project doesn't exist.
- Throws:
io.grpc.StatusException
-
getGlossary
Gets a glossary. Returns NOT_FOUND, if the glossary doesn't exist.
- Throws:
io.grpc.StatusException
-
deleteGlossary
Deletes a glossary, or cancels glossary construction if the glossary isn't created yet. Returns NOT_FOUND, if the glossary doesn't exist.
- Throws:
io.grpc.StatusException
-
getGlossaryEntry
public GlossaryEntry getGlossaryEntry(GetGlossaryEntryRequest request) throws io.grpc.StatusException Gets a single glossary entry by the given id.
- Throws:
io.grpc.StatusException
-
listGlossaryEntries
public ListGlossaryEntriesResponse listGlossaryEntries(ListGlossaryEntriesRequest request) throws io.grpc.StatusException List the entries for the glossary.
- Throws:
io.grpc.StatusException
-
createGlossaryEntry
public GlossaryEntry createGlossaryEntry(CreateGlossaryEntryRequest request) throws io.grpc.StatusException Creates a glossary entry.
- Throws:
io.grpc.StatusException
-
updateGlossaryEntry
public GlossaryEntry updateGlossaryEntry(UpdateGlossaryEntryRequest request) throws io.grpc.StatusException Updates a glossary entry.
- Throws:
io.grpc.StatusException
-
deleteGlossaryEntry
public com.google.protobuf.Empty deleteGlossaryEntry(DeleteGlossaryEntryRequest request) throws io.grpc.StatusException Deletes a single entry from the glossary
- Throws:
io.grpc.StatusException
-
createDataset
Creates a Dataset.
- Throws:
io.grpc.StatusException
-
getDataset
Gets a Dataset.
- Throws:
io.grpc.StatusException
-
listDatasets
public ListDatasetsResponse listDatasets(ListDatasetsRequest request) throws io.grpc.StatusException Lists datasets.
- Throws:
io.grpc.StatusException
-
deleteDataset
Deletes a dataset and all of its contents.
- Throws:
io.grpc.StatusException
-
createAdaptiveMtDataset
public AdaptiveMtDataset createAdaptiveMtDataset(CreateAdaptiveMtDatasetRequest request) throws io.grpc.StatusException Creates an Adaptive MT dataset.
- Throws:
io.grpc.StatusException
-
deleteAdaptiveMtDataset
public com.google.protobuf.Empty deleteAdaptiveMtDataset(DeleteAdaptiveMtDatasetRequest request) throws io.grpc.StatusException Deletes an Adaptive MT dataset, including all its entries and associated metadata.
- Throws:
io.grpc.StatusException
-
getAdaptiveMtDataset
public AdaptiveMtDataset getAdaptiveMtDataset(GetAdaptiveMtDatasetRequest request) throws io.grpc.StatusException Gets the Adaptive MT dataset.
- Throws:
io.grpc.StatusException
-
listAdaptiveMtDatasets
public ListAdaptiveMtDatasetsResponse listAdaptiveMtDatasets(ListAdaptiveMtDatasetsRequest request) throws io.grpc.StatusException Lists all Adaptive MT datasets for which the caller has read permission.
- Throws:
io.grpc.StatusException
-
adaptiveMtTranslate
public AdaptiveMtTranslateResponse adaptiveMtTranslate(AdaptiveMtTranslateRequest request) throws io.grpc.StatusException Translate text using Adaptive MT.
- Throws:
io.grpc.StatusException
-
getAdaptiveMtFile
public AdaptiveMtFile getAdaptiveMtFile(GetAdaptiveMtFileRequest request) throws io.grpc.StatusException Gets and AdaptiveMtFile
- Throws:
io.grpc.StatusException
-
deleteAdaptiveMtFile
public com.google.protobuf.Empty deleteAdaptiveMtFile(DeleteAdaptiveMtFileRequest request) throws io.grpc.StatusException Deletes an AdaptiveMtFile along with its sentences.
- Throws:
io.grpc.StatusException
-
importAdaptiveMtFile
public ImportAdaptiveMtFileResponse importAdaptiveMtFile(ImportAdaptiveMtFileRequest request) throws io.grpc.StatusException Imports an AdaptiveMtFile and adds all of its sentences into the AdaptiveMtDataset.
- Throws:
io.grpc.StatusException
-
listAdaptiveMtFiles
public ListAdaptiveMtFilesResponse listAdaptiveMtFiles(ListAdaptiveMtFilesRequest request) throws io.grpc.StatusException Lists all AdaptiveMtFiles associated to an AdaptiveMtDataset.
- Throws:
io.grpc.StatusException
-
listAdaptiveMtSentences
public ListAdaptiveMtSentencesResponse listAdaptiveMtSentences(ListAdaptiveMtSentencesRequest request) throws io.grpc.StatusException Lists all AdaptiveMtSentences under a given file/dataset.
- Throws:
io.grpc.StatusException
-
importData
Import sentence pairs into translation Dataset.
- Throws:
io.grpc.StatusException
-
exportData
Exports dataset's data to the provided output location.
- Throws:
io.grpc.StatusException
-
listExamples
public ListExamplesResponse listExamples(ListExamplesRequest request) throws io.grpc.StatusException Lists sentence pairs in the dataset.
- Throws:
io.grpc.StatusException
-
createModel
Creates a Model.
- Throws:
io.grpc.StatusException
-
listModels
Lists models.
- Throws:
io.grpc.StatusException
-
getModel
Gets a model.
- Throws:
io.grpc.StatusException
-
deleteModel
Deletes a model.
- Throws:
io.grpc.StatusException
-