target.apidocs.com.google.api.services.translate.v3beta1.model.DocumentTranslation.html Maven / Gradle / Ivy
DocumentTranslation (Cloud Translation API v3beta1-rev20230210-2.0.0)
com.google.api.services.translate.v3beta1.model
Class DocumentTranslation
- java.lang.Object
-
- java.util.AbstractMap<String,Object>
-
- com.google.api.client.util.GenericData
-
- com.google.api.client.json.GenericJson
-
- com.google.api.services.translate.v3beta1.model.DocumentTranslation
-
public final class DocumentTranslation
extends com.google.api.client.json.GenericJson
A translated document message.
This is the Java data model class that specifies how to parse/serialize into the JSON that is
transmitted over HTTP when working with the Cloud Translation API. For a detailed explanation
see:
https://developers.google.com/api-client-library/java/google-http-java-client/json
- Author:
- Google, Inc.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class com.google.api.client.util.GenericData
com.google.api.client.util.GenericData.Flags
-
Nested classes/interfaces inherited from class java.util.AbstractMap
AbstractMap.SimpleEntry<K,V>, AbstractMap.SimpleImmutableEntry<K,V>
-
Constructor Summary
Constructors
Constructor and Description
DocumentTranslation()
-
Method Summary
All Methods Instance Methods Concrete Methods
Modifier and Type
Method and Description
DocumentTranslation
clone()
List<String>
getByteStreamOutputs()
The array of translated documents.
String
getDetectedLanguageCode()
The detected language for the input document.
String
getMimeType()
The translated document's mime type.
DocumentTranslation
set(String fieldName,
Object value)
DocumentTranslation
setByteStreamOutputs(List<String> byteStreamOutputs)
The array of translated documents.
DocumentTranslation
setDetectedLanguageCode(String detectedLanguageCode)
The detected language for the input document.
DocumentTranslation
setMimeType(String mimeType)
The translated document's mime type.
-
Methods inherited from class com.google.api.client.json.GenericJson
getFactory, setFactory, toPrettyString, toString
-
Methods inherited from class com.google.api.client.util.GenericData
entrySet, equals, get, getClassInfo, getUnknownKeys, hashCode, put, putAll, remove, setUnknownKeys
-
Methods inherited from class java.util.AbstractMap
clear, containsKey, containsValue, isEmpty, keySet, size, values
-
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface java.util.Map
compute, computeIfAbsent, computeIfPresent, forEach, getOrDefault, merge, putIfAbsent, remove, replace, replace, replaceAll
-
-
Method Detail
-
getByteStreamOutputs
public List<String> getByteStreamOutputs()
The array of translated documents. It is expected to be size 1 for now. We may produce multiple
translated documents in the future for other type of file formats.
- Returns:
- value or
null
for none
-
setByteStreamOutputs
public DocumentTranslation setByteStreamOutputs(List<String> byteStreamOutputs)
The array of translated documents. It is expected to be size 1 for now. We may produce multiple
translated documents in the future for other type of file formats.
- Parameters:
byteStreamOutputs
- byteStreamOutputs or null
for none
-
getDetectedLanguageCode
public String getDetectedLanguageCode()
The detected language for the input document. If the user did not provide the source language
for the input document, this field will have the language code automatically detected. If the
source language was passed, auto-detection of the language does not occur and this field is
empty.
- Returns:
- value or
null
for none
-
setDetectedLanguageCode
public DocumentTranslation setDetectedLanguageCode(String detectedLanguageCode)
The detected language for the input document. If the user did not provide the source language
for the input document, this field will have the language code automatically detected. If the
source language was passed, auto-detection of the language does not occur and this field is
empty.
- Parameters:
detectedLanguageCode
- detectedLanguageCode or null
for none
-
getMimeType
public String getMimeType()
The translated document's mime type.
- Returns:
- value or
null
for none
-
setMimeType
public DocumentTranslation setMimeType(String mimeType)
The translated document's mime type.
- Parameters:
mimeType
- mimeType or null
for none
-
set
public DocumentTranslation set(String fieldName,
Object value)
- Overrides:
set
in class com.google.api.client.json.GenericJson
-
clone
public DocumentTranslation clone()
- Overrides:
clone
in class com.google.api.client.json.GenericJson
Copyright © 2011–2023 Google. All rights reserved.