| 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 and Description |
|---|
Projects() |
| 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.
|
public Translate.Projects.DetectLanguage detectLanguage(String parent, DetectLanguageRequest content) throws IOException
AbstractGoogleClientRequest.execute() method to invoke the remote operation.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 DetectLanguageRequestIOExceptionpublic Translate.Projects.GetSupportedLanguages getSupportedLanguages(String parent) throws IOException
AbstractGoogleClientRequest.execute() method to invoke the remote
operation.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.IOExceptionpublic Translate.Projects.TranslateText translateText(String parent, TranslateTextRequest content) throws IOException
AbstractGoogleClientRequest.execute() method to invoke the remote operation.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 TranslateTextRequestIOExceptionpublic Translate.Projects.Locations locations()
The typical use is:
Translate translate = new Translate(...);Translate.Locations.List request = translate.locations().list(parameters ...)
Copyright © 2011–2021 Google. All rights reserved.