public final class Translation extends GenericJson
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
GenericData.FlagsAbstractMap.SimpleEntry<K,V>, AbstractMap.SimpleImmutableEntry<K,V>| Constructor and Description |
|---|
Translation() |
| Modifier and Type | Method and Description |
|---|---|
Translation |
clone() |
String |
getDetectedLanguageCode()
The BCP-47 language code of source text in the initial request, detected automatically, if no
source language was passed within the initial request.
|
TranslateTextGlossaryConfig |
getGlossaryConfig()
The `glossary_config` used for this translation.
|
String |
getModel()
Only present when `model` is present in the request.
|
String |
getTranslatedText()
Text translated into the target language.
|
Translation |
set(String fieldName,
Object value) |
Translation |
setDetectedLanguageCode(String detectedLanguageCode)
The BCP-47 language code of source text in the initial request, detected automatically, if no
source language was passed within the initial request.
|
Translation |
setGlossaryConfig(TranslateTextGlossaryConfig glossaryConfig)
The `glossary_config` used for this translation.
|
Translation |
setModel(String model)
Only present when `model` is present in the request.
|
Translation |
setTranslatedText(String translatedText)
Text translated into the target language.
|
getFactory, setFactory, toPrettyString, toStringentrySet, equals, get, getClassInfo, getUnknownKeys, hashCode, put, putAll, remove, setUnknownKeysclear, containsKey, containsValue, isEmpty, keySet, size, valuesfinalize, getClass, notify, notifyAll, wait, wait, waitcompute, computeIfAbsent, computeIfPresent, forEach, getOrDefault, merge, putIfAbsent, remove, replace, replace, replaceAllpublic String getDetectedLanguageCode()
null for nonepublic Translation setDetectedLanguageCode(String detectedLanguageCode)
detectedLanguageCode - detectedLanguageCode or null for nonepublic TranslateTextGlossaryConfig getGlossaryConfig()
null for nonepublic Translation setGlossaryConfig(TranslateTextGlossaryConfig glossaryConfig)
glossaryConfig - glossaryConfig or null for nonepublic String getModel()
null for nonepublic Translation setModel(String model)
model - model or null for nonepublic String getTranslatedText()
null for nonepublic Translation setTranslatedText(String translatedText)
translatedText - translatedText or null for nonepublic Translation set(String fieldName, Object value)
set in class GenericJsonpublic Translation clone()
clone in class GenericJsonCopyright © 2011–2021 Google. All rights reserved.