target.apidocs.com.google.api.services.translate.v3.Translate.Projects.Locations.html Maven / Gradle / Ivy
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.
-
-
Nested Class Summary
Nested Classes
Modifier and Type
Class and Description
class
Translate.Projects.Locations.BatchTranslateDocument
class
Translate.Projects.Locations.BatchTranslateText
class
Translate.Projects.Locations.Datasets
The "datasets" collection of methods.
class
Translate.Projects.Locations.DetectLanguage
class
Translate.Projects.Locations.Get
class
Translate.Projects.Locations.GetSupportedLanguages
class
Translate.Projects.Locations.Glossaries
The "glossaries" collection of methods.
class
Translate.Projects.Locations.List
class
Translate.Projects.Locations.Models
The "models" collection of methods.
class
Translate.Projects.Locations.Operations
The "operations" collection of methods.
class
Translate.Projects.Locations.TranslateDocument
class
Translate.Projects.Locations.TranslateText
-
Constructor Summary
Constructors
Constructor and Description
Locations()
-
Method Summary
All Methods Instance Methods Concrete Methods
Modifier and Type
Method and Description
Translate.Projects.Locations.BatchTranslateDocument
batchTranslateDocument(String parent,
BatchTranslateDocumentRequest content)
Translates a large volume of document in asynchronous batch mode.
Translate.Projects.Locations.BatchTranslateText
batchTranslateText(String parent,
BatchTranslateTextRequest content)
Translates a large volume of text in asynchronous batch mode.
Translate.Projects.Locations.Datasets
datasets()
An accessor for creating requests from the Datasets collection.
Translate.Projects.Locations.DetectLanguage
detectLanguage(String parent,
DetectLanguageRequest content)
Detects the language of text within a request.
Translate.Projects.Locations.Get
get(String name)
Gets information about a location.
Translate.Projects.Locations.GetSupportedLanguages
getSupportedLanguages(String parent)
Returns a list of supported languages for translation.
Translate.Projects.Locations.Glossaries
glossaries()
An accessor for creating requests from the Glossaries collection.
Translate.Projects.Locations.List
list(String name)
Lists information about the supported locations for this service.
Translate.Projects.Locations.Models
models()
An accessor for creating requests from the Models collection.
Translate.Projects.Locations.Operations
operations()
An accessor for creating requests from the Operations collection.
Translate.Projects.Locations.TranslateDocument
translateDocument(String parent,
TranslateDocumentRequest content)
Translates documents in synchronous mode.
Translate.Projects.Locations.TranslateText
translateText(String parent,
TranslateTextRequest content)
Translates input text and returns translated text.
-
-
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