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

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







Translate.Projects (Cloud Translation API v3beta1-rev20230210-2.0.0)












com.google.api.services.translate.v3beta1

Class Translate.Projects

  • Enclosing class:
    Translate


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

      • Projects

        public Projects()
    • Method Detail

      • detectLanguage

        public Translate.Projects.DetectLanguage detectLanguage(String parent,
                                                                DetectLanguageRequest content)
                                                         throws IOException
        Detects the language of text within a request. Create a request for the method "projects.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
      • getSupportedLanguages

        public Translate.Projects.GetSupportedLanguages getSupportedLanguages(String parent)
                                                                       throws IOException
        Returns a list of supported languages for translation. Create a request for the method "projects.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
      • translateText

        public Translate.Projects.TranslateText translateText(String parent,
                                                              TranslateTextRequest content)
                                                       throws IOException
        Translates input text and returns translated text. Create a request for the method "projects.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
      • locations

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

        The typical use is:

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

Copyright © 2011–2023 Google. All rights reserved.





© 2015 - 2024 Weber Informatics LLC | Privacy Policy