@Generated(value="com.amazonaws:aws-java-sdk-code-generator") public class TranslateTextRequest extends AmazonWebServiceRequest implements Serializable, Cloneable
NOOP| Constructor and Description |
|---|
TranslateTextRequest() |
| Modifier and Type | Method and Description |
|---|---|
TranslateTextRequest |
clone() |
boolean |
equals(Object obj) |
TranslationSettings |
getSettings()
Settings to configure your translation output, including the option to set the formality level of the output text
and the option to mask profane words and phrases.
|
String |
getSourceLanguageCode()
The language code for the language of the source text.
|
String |
getTargetLanguageCode()
The language code requested for the language of the target text.
|
List<String> |
getTerminologyNames()
The name of a terminology list file to add to the translation job.
|
String |
getText()
The text to translate.
|
int |
hashCode() |
void |
setSettings(TranslationSettings settings)
Settings to configure your translation output, including the option to set the formality level of the output text
and the option to mask profane words and phrases.
|
void |
setSourceLanguageCode(String sourceLanguageCode)
The language code for the language of the source text.
|
void |
setTargetLanguageCode(String targetLanguageCode)
The language code requested for the language of the target text.
|
void |
setTerminologyNames(Collection<String> terminologyNames)
The name of a terminology list file to add to the translation job.
|
void |
setText(String text)
The text to translate.
|
String |
toString()
Returns a string representation of this object.
|
TranslateTextRequest |
withSettings(TranslationSettings settings)
Settings to configure your translation output, including the option to set the formality level of the output text
and the option to mask profane words and phrases.
|
TranslateTextRequest |
withSourceLanguageCode(String sourceLanguageCode)
The language code for the language of the source text.
|
TranslateTextRequest |
withTargetLanguageCode(String targetLanguageCode)
The language code requested for the language of the target text.
|
TranslateTextRequest |
withTerminologyNames(Collection<String> terminologyNames)
The name of a terminology list file to add to the translation job.
|
TranslateTextRequest |
withTerminologyNames(String... terminologyNames)
The name of a terminology list file to add to the translation job.
|
TranslateTextRequest |
withText(String text)
The text to translate.
|
addHandlerContext, copyBaseTo, getCloneRoot, getCloneSource, getCustomQueryParameters, getCustomRequestHeaders, getGeneralProgressListener, getHandlerContext, getReadLimit, getRequestClientOptions, getRequestCredentials, getRequestCredentialsProvider, getRequestMetricCollector, getSdkClientExecutionTimeout, getSdkRequestTimeout, putCustomQueryParameter, putCustomRequestHeader, setGeneralProgressListener, setRequestCredentials, setRequestCredentialsProvider, setRequestMetricCollector, setSdkClientExecutionTimeout, setSdkRequestTimeout, withGeneralProgressListener, withRequestCredentialsProvider, withRequestMetricCollector, withSdkClientExecutionTimeout, withSdkRequestTimeoutpublic void setText(String text)
The text to translate. The text string can be a maximum of 10,000 bytes long. Depending on your character set, this may be fewer than 10,000 characters.
text - The text to translate. The text string can be a maximum of 10,000 bytes long. Depending on your character
set, this may be fewer than 10,000 characters.public String getText()
The text to translate. The text string can be a maximum of 10,000 bytes long. Depending on your character set, this may be fewer than 10,000 characters.
public TranslateTextRequest withText(String text)
The text to translate. The text string can be a maximum of 10,000 bytes long. Depending on your character set, this may be fewer than 10,000 characters.
text - The text to translate. The text string can be a maximum of 10,000 bytes long. Depending on your character
set, this may be fewer than 10,000 characters.public List<String> getTerminologyNames()
The name of a terminology list file to add to the translation job. This file provides source terms and the desired translation for each term. A terminology list can contain a maximum of 256 terms. You can use one custom terminology resource in your translation request.
Use the ListTerminologies operation to get the available terminology lists.
For more information about custom terminology lists, see Custom terminology.
Use the ListTerminologies operation to get the available terminology lists.
For more information about custom terminology lists, see Custom terminology.
public void setTerminologyNames(Collection<String> terminologyNames)
The name of a terminology list file to add to the translation job. This file provides source terms and the desired translation for each term. A terminology list can contain a maximum of 256 terms. You can use one custom terminology resource in your translation request.
Use the ListTerminologies operation to get the available terminology lists.
For more information about custom terminology lists, see Custom terminology.
terminologyNames - The name of a terminology list file to add to the translation job. This file provides source terms and the
desired translation for each term. A terminology list can contain a maximum of 256 terms. You can use one
custom terminology resource in your translation request.
Use the ListTerminologies operation to get the available terminology lists.
For more information about custom terminology lists, see Custom terminology.
public TranslateTextRequest withTerminologyNames(String... terminologyNames)
The name of a terminology list file to add to the translation job. This file provides source terms and the desired translation for each term. A terminology list can contain a maximum of 256 terms. You can use one custom terminology resource in your translation request.
Use the ListTerminologies operation to get the available terminology lists.
For more information about custom terminology lists, see Custom terminology.
NOTE: This method appends the values to the existing list (if any). Use
setTerminologyNames(java.util.Collection) or withTerminologyNames(java.util.Collection) if you
want to override the existing values.
terminologyNames - The name of a terminology list file to add to the translation job. This file provides source terms and the
desired translation for each term. A terminology list can contain a maximum of 256 terms. You can use one
custom terminology resource in your translation request.
Use the ListTerminologies operation to get the available terminology lists.
For more information about custom terminology lists, see Custom terminology.
public TranslateTextRequest withTerminologyNames(Collection<String> terminologyNames)
The name of a terminology list file to add to the translation job. This file provides source terms and the desired translation for each term. A terminology list can contain a maximum of 256 terms. You can use one custom terminology resource in your translation request.
Use the ListTerminologies operation to get the available terminology lists.
For more information about custom terminology lists, see Custom terminology.
terminologyNames - The name of a terminology list file to add to the translation job. This file provides source terms and the
desired translation for each term. A terminology list can contain a maximum of 256 terms. You can use one
custom terminology resource in your translation request.
Use the ListTerminologies operation to get the available terminology lists.
For more information about custom terminology lists, see Custom terminology.
public void setSourceLanguageCode(String sourceLanguageCode)
The language code for the language of the source text. For a list of language codes, see Supported languages.
To have Amazon Translate determine the source language of your text, you can specify auto in the
SourceLanguageCode field. If you specify auto, Amazon Translate will call Amazon Comprehend to
determine the source language.
If you specify auto, you must send the TranslateText request in a region that supports
Amazon Comprehend. Otherwise, the request returns an error indicating that autodetect is not supported.
sourceLanguageCode - The language code for the language of the source text. For a list of language codes, see Supported languages.
To have Amazon Translate determine the source language of your text, you can specify auto in
the SourceLanguageCode field. If you specify auto, Amazon Translate will call Amazon Comprehend to
determine the source language.
If you specify auto, you must send the TranslateText request in a region that
supports Amazon Comprehend. Otherwise, the request returns an error indicating that autodetect is not
supported.
public String getSourceLanguageCode()
The language code for the language of the source text. For a list of language codes, see Supported languages.
To have Amazon Translate determine the source language of your text, you can specify auto in the
SourceLanguageCode field. If you specify auto, Amazon Translate will call Amazon Comprehend to
determine the source language.
If you specify auto, you must send the TranslateText request in a region that supports
Amazon Comprehend. Otherwise, the request returns an error indicating that autodetect is not supported.
To have Amazon Translate determine the source language of your text, you can specify auto in
the SourceLanguageCode field. If you specify auto, Amazon Translate will call
Amazon Comprehend
to determine the source language.
If you specify auto, you must send the TranslateText request in a region that
supports Amazon Comprehend. Otherwise, the request returns an error indicating that autodetect is not
supported.
public TranslateTextRequest withSourceLanguageCode(String sourceLanguageCode)
The language code for the language of the source text. For a list of language codes, see Supported languages.
To have Amazon Translate determine the source language of your text, you can specify auto in the
SourceLanguageCode field. If you specify auto, Amazon Translate will call Amazon Comprehend to
determine the source language.
If you specify auto, you must send the TranslateText request in a region that supports
Amazon Comprehend. Otherwise, the request returns an error indicating that autodetect is not supported.
sourceLanguageCode - The language code for the language of the source text. For a list of language codes, see Supported languages.
To have Amazon Translate determine the source language of your text, you can specify auto in
the SourceLanguageCode field. If you specify auto, Amazon Translate will call Amazon Comprehend to
determine the source language.
If you specify auto, you must send the TranslateText request in a region that
supports Amazon Comprehend. Otherwise, the request returns an error indicating that autodetect is not
supported.
public void setTargetLanguageCode(String targetLanguageCode)
The language code requested for the language of the target text. For a list of language codes, see Supported languages.
targetLanguageCode - The language code requested for the language of the target text. For a list of language codes, see Supported languages.public String getTargetLanguageCode()
The language code requested for the language of the target text. For a list of language codes, see Supported languages.
public TranslateTextRequest withTargetLanguageCode(String targetLanguageCode)
The language code requested for the language of the target text. For a list of language codes, see Supported languages.
targetLanguageCode - The language code requested for the language of the target text. For a list of language codes, see Supported languages.public void setSettings(TranslationSettings settings)
Settings to configure your translation output, including the option to set the formality level of the output text and the option to mask profane words and phrases.
settings - Settings to configure your translation output, including the option to set the formality level of the
output text and the option to mask profane words and phrases.public TranslationSettings getSettings()
Settings to configure your translation output, including the option to set the formality level of the output text and the option to mask profane words and phrases.
public TranslateTextRequest withSettings(TranslationSettings settings)
Settings to configure your translation output, including the option to set the formality level of the output text and the option to mask profane words and phrases.
settings - Settings to configure your translation output, including the option to set the formality level of the
output text and the option to mask profane words and phrases.public String toString()
toString in class ObjectObject.toString()public TranslateTextRequest clone()
clone in class AmazonWebServiceRequestCopyright © 2023. All rights reserved.