target.apidocs.com.google.api.services.translate.v3.Translate.Projects.html Maven / Gradle / Ivy
Translate.Projects (Cloud Translation API v3-rev20230428-2.0.0)
com.google.api.services.translate.v3
Class Translate.Projects
- java.lang.Object
-
- com.google.api.services.translate.v3.Translate.Projects
-
-
Nested Class Summary
Nested Classes
Modifier and Type
Class and Description
class
Translate.Projects.DetectLanguage
class
Translate.Projects.GetSupportedLanguages
class
Translate.Projects.Locations
The "locations" collection of methods.
class
Translate.Projects.TranslateText
-
Constructor Summary
Constructors
Constructor and Description
Projects()
-
Method Summary
All Methods Instance Methods Concrete Methods
Modifier and Type
Method and Description
Translate.Projects.DetectLanguage
detectLanguage(String parent,
DetectLanguageRequest content)
Detects the language of text within a request.
Translate.Projects.GetSupportedLanguages
getSupportedLanguages(String parent)
Returns a list of supported languages for translation.
Translate.Projects.Locations
locations()
An accessor for creating requests from the Locations collection.
Translate.Projects.TranslateText
translateText(String parent,
TranslateTextRequest content)
Translates input text and returns translated text.
-
-
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 - 2025 Weber Informatics LLC | Privacy Policy