All Downloads are FREE. Search and download functionalities are using the official Maven repository.

target.apidocs.com.google.api.services.translate.v3.Translate.Projects.Locations.html Maven / Gradle / Ivy

There is a newer version: v3-rev20241218-2.0.0
Show newest version






Translate.Projects.Locations (Cloud Translation API v3-rev20230428-2.0.0)












com.google.api.services.translate.v3

Class Translate.Projects.Locations

  • java.lang.Object
    • com.google.api.services.translate.v3.Translate.Projects.Locations
  • Enclosing class:
    Translate.Projects


    public class Translate.Projects.Locations
    extends Object
    The "locations" collection of methods.
    • Constructor Detail

      • Locations

        public Locations()
    • Method Detail

      • batchTranslateDocument

        public Translate.Projects.Locations.BatchTranslateDocument batchTranslateDocument(String parent,
                                                                                          BatchTranslateDocumentRequest content)
                                                                                   throws IOException
        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. Create a request for the method "locations.batchTranslateDocument". This request holds the parameters needed by the translate server. After setting any optional parameters, call the AbstractGoogleClientRequest.execute() method to invoke the remote operation.
        Parameters:
        parent - Required. Location to make a regional call. Format: `projects/{project-number-or-id}/locations /{location-id}`. The `global` location is not supported for batch translation. Only AutoML Translation models or glossaries within the same region (have the same location-id) can be used, otherwise an INVALID_ARGUMENT (400) error is returned.
        content - the BatchTranslateDocumentRequest
        Returns:
        the request
        Throws:
        IOException
      • batchTranslateText

        public Translate.Projects.Locations.BatchTranslateText batchTranslateText(String parent,
                                                                                  BatchTranslateTextRequest content)
                                                                           throws IOException
        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. Create a request for the method "locations.batchTranslateText". This request holds the parameters needed by the translate server. After setting any optional parameters, call the AbstractGoogleClientRequest.execute() method to invoke the remote operation.
        Parameters:
        parent - Required. Location to make a call. Must refer to a caller's project. Format: `projects/{project- number-or-id}/locations/{location-id}`. The `global` location is not supported for batch translation. Only AutoML Translation models or glossaries within the same region (have the same location-id) can be used, otherwise an INVALID_ARGUMENT (400) error is returned.
        content - the BatchTranslateTextRequest
        Returns:
        the request
        Throws:
        IOException
      • detectLanguage

        public Translate.Projects.Locations.DetectLanguage detectLanguage(String parent,
                                                                          DetectLanguageRequest content)
                                                                   throws IOException
        Detects the language of text within a request. Create a request for the method "locations.detectLanguage". This request holds the parameters needed by the translate server. After setting any optional parameters, call the AbstractGoogleClientRequest.execute() method to invoke the remote operation.
        Parameters:
        parent - Required. Project or location to make a call. Must refer to a caller's project. Format: `projects /{project-number-or-id}/locations/{location-id}` or `projects/{project-number-or-id}`. For global calls, use `projects/{project-number-or-id}/locations/global` or `projects /{project-number-or-id}`. Only models within the same region (has same location-id) can be used. Otherwise an INVALID_ARGUMENT (400) error is returned.
        content - the DetectLanguageRequest
        Returns:
        the request
        Throws:
        IOException
      • get

        public Translate.Projects.Locations.Get get(String name)
                                             throws IOException
        Gets information about a location. Create a request for the method "locations.get". This request holds the parameters needed by the translate server. After setting any optional parameters, call the AbstractGoogleClientRequest.execute() method to invoke the remote operation.
        Parameters:
        name - Resource name for the location.
        Returns:
        the request
        Throws:
        IOException
      • getSupportedLanguages

        public Translate.Projects.Locations.GetSupportedLanguages getSupportedLanguages(String parent)
                                                                                 throws IOException
        Returns a list of supported languages for translation. Create a request for the method "locations.getSupportedLanguages". This request holds the parameters needed by the translate server. After setting any optional parameters, call the AbstractGoogleClientRequest.execute() method to invoke the remote operation.
        Parameters:
        parent - Required. Project or location to make a call. Must refer to a caller's project. Format: `projects /{project-number-or-id}` or `projects/{project-number-or-id}/locations/{location-id}`. For global calls, use `projects/{project-number-or-id}/locations/global` or `projects /{project-number-or-id}`. Non-global location is required for AutoML models. Only models within the same region (have same location-id) can be used, otherwise an INVALID_ARGUMENT (400) error is returned.
        Returns:
        the request
        Throws:
        IOException
      • list

        public Translate.Projects.Locations.List list(String name)
                                               throws IOException
        Lists information about the supported locations for this service. Create a request for the method "locations.list". This request holds the parameters needed by the translate server. After setting any optional parameters, call the AbstractGoogleClientRequest.execute() method to invoke the remote operation.
        Parameters:
        name - The resource that owns the locations collection, if applicable.
        Returns:
        the request
        Throws:
        IOException
      • translateDocument

        public Translate.Projects.Locations.TranslateDocument translateDocument(String parent,
                                                                                TranslateDocumentRequest content)
                                                                         throws IOException
        Translates documents in synchronous mode. Create a request for the method "locations.translateDocument". This request holds the parameters needed by the translate server. After setting any optional parameters, call the AbstractGoogleClientRequest.execute() method to invoke the remote operation.
        Parameters:
        parent - Required. Location to make a regional call. Format: `projects/{project-number-or-id}/locations /{location-id}`. For global calls, use `projects/{project-number-or-id}/locations/global` or `projects/{project-number-or-id}`. Non-global location is required for requests using AutoML models or custom glossaries. Models and glossaries must be within the same region (have the same location-id), otherwise an INVALID_ARGUMENT (400) error is returned.
        content - the TranslateDocumentRequest
        Returns:
        the request
        Throws:
        IOException
      • translateText

        public Translate.Projects.Locations.TranslateText translateText(String parent,
                                                                        TranslateTextRequest content)
                                                                 throws IOException
        Translates input text and returns translated text. Create a request for the method "locations.translateText". This request holds the parameters needed by the translate server. After setting any optional parameters, call the AbstractGoogleClientRequest.execute() method to invoke the remote operation.
        Parameters:
        parent - Required. Project or location to make a call. Must refer to a caller's project. Format: `projects /{project-number-or-id}` or `projects/{project-number-or-id}/locations/{location-id}`. For global calls, use `projects/{project-number-or-id}/locations/global` or `projects /{project-number-or-id}`. Non-global location is required for requests using AutoML models or custom glossaries. Models and glossaries must be within the same region (have same location-id), otherwise an INVALID_ARGUMENT (400) error is returned.
        content - the TranslateTextRequest
        Returns:
        the request
        Throws:
        IOException
      • datasets

        public Translate.Projects.Locations.Datasets datasets()
        An accessor for creating requests from the Datasets collection.

        The typical use is:

            Translate translate = new Translate(...);
            Translate.Datasets.List request = translate.datasets().list(parameters ...)
         
        Returns:
        the resource collection
      • glossaries

        public Translate.Projects.Locations.Glossaries glossaries()
        An accessor for creating requests from the Glossaries collection.

        The typical use is:

            Translate translate = new Translate(...);
            Translate.Glossaries.List request = translate.glossaries().list(parameters ...)
         
        Returns:
        the resource collection
      • models

        public Translate.Projects.Locations.Models models()
        An accessor for creating requests from the Models collection.

        The typical use is:

            Translate translate = new Translate(...);
            Translate.Models.List request = translate.models().list(parameters ...)
         
        Returns:
        the resource collection
      • operations

        public Translate.Projects.Locations.Operations operations()
        An accessor for creating requests from the Operations collection.

        The typical use is:

            Translate translate = new Translate(...);
            Translate.Operations.List request = translate.operations().list(parameters ...)
         
        Returns:
        the resource collection

Copyright © 2011–2023 Google. All rights reserved.





© 2015 - 2025 Weber Informatics LLC | Privacy Policy