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.
 
  • Method Details

    • build

      protected TranslationServiceGrpc.TranslationServiceBlockingV2Stub build(io.grpc.Channel channel, io.grpc.CallOptions callOptions)
      Specified by:
      build in class io.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

      public Operation createGlossary(CreateGlossaryRequest request) throws io.grpc.StatusException
       Creates a glossary and returns the long-running operation. Returns
       NOT_FOUND, if the project doesn't exist.
       
      Throws:
      io.grpc.StatusException
    • updateGlossary

      public Operation updateGlossary(UpdateGlossaryRequest request) throws io.grpc.StatusException
       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

      public Glossary getGlossary(GetGlossaryRequest request) throws io.grpc.StatusException
       Gets a glossary. Returns NOT_FOUND, if the glossary doesn't
       exist.
       
      Throws:
      io.grpc.StatusException
    • deleteGlossary

      public Operation deleteGlossary(DeleteGlossaryRequest request) throws io.grpc.StatusException
       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

      public Operation createDataset(CreateDatasetRequest request) throws io.grpc.StatusException
       Creates a Dataset.
       
      Throws:
      io.grpc.StatusException
    • getDataset

      public Dataset getDataset(GetDatasetRequest request) throws io.grpc.StatusException
       Gets a Dataset.
       
      Throws:
      io.grpc.StatusException
    • listDatasets

      public ListDatasetsResponse listDatasets(ListDatasetsRequest request) throws io.grpc.StatusException
       Lists datasets.
       
      Throws:
      io.grpc.StatusException
    • deleteDataset

      public Operation deleteDataset(DeleteDatasetRequest request) throws io.grpc.StatusException
       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

      public Operation importData(ImportDataRequest request) throws io.grpc.StatusException
       Import sentence pairs into translation Dataset.
       
      Throws:
      io.grpc.StatusException
    • exportData

      public Operation exportData(ExportDataRequest request) throws io.grpc.StatusException
       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

      public Operation createModel(CreateModelRequest request) throws io.grpc.StatusException
       Creates a Model.
       
      Throws:
      io.grpc.StatusException
    • listModels

      public ListModelsResponse listModels(ListModelsRequest request) throws io.grpc.StatusException
       Lists models.
       
      Throws:
      io.grpc.StatusException
    • getModel

      public Model getModel(GetModelRequest request) throws io.grpc.StatusException
       Gets a model.
       
      Throws:
      io.grpc.StatusException
    • deleteModel

      public Operation deleteModel(DeleteModelRequest request) throws io.grpc.StatusException
       Deletes a model.
       
      Throws:
      io.grpc.StatusException