Class TranslationServiceGrpc.TranslationServiceStub

java.lang.Object
io.grpc.stub.AbstractStub<S>
io.grpc.stub.AbstractAsyncStub<TranslationServiceGrpc.TranslationServiceStub>
com.google.cloud.translate.v3.TranslationServiceGrpc.TranslationServiceStub
Enclosing class:
TranslationServiceGrpc

public static final class TranslationServiceGrpc.TranslationServiceStub extends io.grpc.stub.AbstractAsyncStub<TranslationServiceGrpc.TranslationServiceStub>
A stub to allow clients to do asynchronous rpc calls to service TranslationService.
 Provides natural language translation operations.
 
  • Method Details

    • build

      protected TranslationServiceGrpc.TranslationServiceStub build(io.grpc.Channel channel, io.grpc.CallOptions callOptions)
      Specified by:
      build in class io.grpc.stub.AbstractStub<TranslationServiceGrpc.TranslationServiceStub>
    • translateText

      public void translateText(TranslateTextRequest request, io.grpc.stub.StreamObserver<TranslateTextResponse> responseObserver)
       Translates input text and returns translated text.
       
    • romanizeText

      public void romanizeText(RomanizeTextRequest request, io.grpc.stub.StreamObserver<RomanizeTextResponse> responseObserver)
       Romanize input text written in non-Latin scripts to Latin text.
       
    • detectLanguage

      public void detectLanguage(DetectLanguageRequest request, io.grpc.stub.StreamObserver<DetectLanguageResponse> responseObserver)
       Detects the language of text within a request.
       
    • getSupportedLanguages

      public void getSupportedLanguages(GetSupportedLanguagesRequest request, io.grpc.stub.StreamObserver<SupportedLanguages> responseObserver)
       Returns a list of supported languages for translation.
       
    • translateDocument

      public void translateDocument(TranslateDocumentRequest request, io.grpc.stub.StreamObserver<TranslateDocumentResponse> responseObserver)
       Translates documents in synchronous mode.
       
    • batchTranslateText

      public void batchTranslateText(BatchTranslateTextRequest request, io.grpc.stub.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.
       
    • batchTranslateDocument

      public void batchTranslateDocument(BatchTranslateDocumentRequest request, io.grpc.stub.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.
       
    • createGlossary

      public void createGlossary(CreateGlossaryRequest request, io.grpc.stub.StreamObserver<Operation> responseObserver)
       Creates a glossary and returns the long-running operation. Returns
       NOT_FOUND, if the project doesn't exist.
       
    • updateGlossary

      public void updateGlossary(UpdateGlossaryRequest request, io.grpc.stub.StreamObserver<Operation> responseObserver)
       Updates a glossary. A LRO is used since the update can be async if the
       glossary's entry file is updated.
       
    • listGlossaries

      public void listGlossaries(ListGlossariesRequest request, io.grpc.stub.StreamObserver<ListGlossariesResponse> responseObserver)
       Lists glossaries in a project. Returns NOT_FOUND, if the project doesn't
       exist.
       
    • getGlossary

      public void getGlossary(GetGlossaryRequest request, io.grpc.stub.StreamObserver<Glossary> responseObserver)
       Gets a glossary. Returns NOT_FOUND, if the glossary doesn't
       exist.
       
    • deleteGlossary

      public void deleteGlossary(DeleteGlossaryRequest request, io.grpc.stub.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.
       
    • getGlossaryEntry

      public void getGlossaryEntry(GetGlossaryEntryRequest request, io.grpc.stub.StreamObserver<GlossaryEntry> responseObserver)
       Gets a single glossary entry by the given id.
       
    • listGlossaryEntries

      public void listGlossaryEntries(ListGlossaryEntriesRequest request, io.grpc.stub.StreamObserver<ListGlossaryEntriesResponse> responseObserver)
       List the entries for the glossary.
       
    • createGlossaryEntry

      public void createGlossaryEntry(CreateGlossaryEntryRequest request, io.grpc.stub.StreamObserver<GlossaryEntry> responseObserver)
       Creates a glossary entry.
       
    • updateGlossaryEntry

      public void updateGlossaryEntry(UpdateGlossaryEntryRequest request, io.grpc.stub.StreamObserver<GlossaryEntry> responseObserver)
       Updates a glossary entry.
       
    • deleteGlossaryEntry

      public void deleteGlossaryEntry(DeleteGlossaryEntryRequest request, io.grpc.stub.StreamObserver<com.google.protobuf.Empty> responseObserver)
       Deletes a single entry from the glossary
       
    • createDataset

      public void createDataset(CreateDatasetRequest request, io.grpc.stub.StreamObserver<Operation> responseObserver)
       Creates a Dataset.
       
    • getDataset

      public void getDataset(GetDatasetRequest request, io.grpc.stub.StreamObserver<Dataset> responseObserver)
       Gets a Dataset.
       
    • listDatasets

      public void listDatasets(ListDatasetsRequest request, io.grpc.stub.StreamObserver<ListDatasetsResponse> responseObserver)
       Lists datasets.
       
    • deleteDataset

      public void deleteDataset(DeleteDatasetRequest request, io.grpc.stub.StreamObserver<Operation> responseObserver)
       Deletes a dataset and all of its contents.
       
    • createAdaptiveMtDataset

      public void createAdaptiveMtDataset(CreateAdaptiveMtDatasetRequest request, io.grpc.stub.StreamObserver<AdaptiveMtDataset> responseObserver)
       Creates an Adaptive MT dataset.
       
    • deleteAdaptiveMtDataset

      public void deleteAdaptiveMtDataset(DeleteAdaptiveMtDatasetRequest request, io.grpc.stub.StreamObserver<com.google.protobuf.Empty> responseObserver)
       Deletes an Adaptive MT dataset, including all its entries and associated
       metadata.
       
    • getAdaptiveMtDataset

      public void getAdaptiveMtDataset(GetAdaptiveMtDatasetRequest request, io.grpc.stub.StreamObserver<AdaptiveMtDataset> responseObserver)
       Gets the Adaptive MT dataset.
       
    • listAdaptiveMtDatasets

      public void listAdaptiveMtDatasets(ListAdaptiveMtDatasetsRequest request, io.grpc.stub.StreamObserver<ListAdaptiveMtDatasetsResponse> responseObserver)
       Lists all Adaptive MT datasets for which the caller has read permission.
       
    • adaptiveMtTranslate

      public void adaptiveMtTranslate(AdaptiveMtTranslateRequest request, io.grpc.stub.StreamObserver<AdaptiveMtTranslateResponse> responseObserver)
       Translate text using Adaptive MT.
       
    • getAdaptiveMtFile

      public void getAdaptiveMtFile(GetAdaptiveMtFileRequest request, io.grpc.stub.StreamObserver<AdaptiveMtFile> responseObserver)
       Gets and AdaptiveMtFile
       
    • deleteAdaptiveMtFile

      public void deleteAdaptiveMtFile(DeleteAdaptiveMtFileRequest request, io.grpc.stub.StreamObserver<com.google.protobuf.Empty> responseObserver)
       Deletes an AdaptiveMtFile along with its sentences.
       
    • importAdaptiveMtFile

      public void importAdaptiveMtFile(ImportAdaptiveMtFileRequest request, io.grpc.stub.StreamObserver<ImportAdaptiveMtFileResponse> responseObserver)
       Imports an AdaptiveMtFile and adds all of its sentences into the
       AdaptiveMtDataset.
       
    • listAdaptiveMtFiles

      public void listAdaptiveMtFiles(ListAdaptiveMtFilesRequest request, io.grpc.stub.StreamObserver<ListAdaptiveMtFilesResponse> responseObserver)
       Lists all AdaptiveMtFiles associated to an AdaptiveMtDataset.
       
    • listAdaptiveMtSentences

      public void listAdaptiveMtSentences(ListAdaptiveMtSentencesRequest request, io.grpc.stub.StreamObserver<ListAdaptiveMtSentencesResponse> responseObserver)
       Lists all AdaptiveMtSentences under a given file/dataset.
       
    • importData

      public void importData(ImportDataRequest request, io.grpc.stub.StreamObserver<Operation> responseObserver)
       Import sentence pairs into translation Dataset.
       
    • exportData

      public void exportData(ExportDataRequest request, io.grpc.stub.StreamObserver<Operation> responseObserver)
       Exports dataset's data to the provided output location.
       
    • listExamples

      public void listExamples(ListExamplesRequest request, io.grpc.stub.StreamObserver<ListExamplesResponse> responseObserver)
       Lists sentence pairs in the dataset.
       
    • createModel

      public void createModel(CreateModelRequest request, io.grpc.stub.StreamObserver<Operation> responseObserver)
       Creates a Model.
       
    • listModels

      public void listModels(ListModelsRequest request, io.grpc.stub.StreamObserver<ListModelsResponse> responseObserver)
       Lists models.
       
    • getModel

      public void getModel(GetModelRequest request, io.grpc.stub.StreamObserver<Model> responseObserver)
       Gets a model.
       
    • deleteModel

      public void deleteModel(DeleteModelRequest request, io.grpc.stub.StreamObserver<Operation> responseObserver)
       Deletes a model.