@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()
Creates a shallow clone of this object for all fields except the handler context.
|
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 the terminology list file to be used in the TranslateText request.
|
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 the terminology list file to be used in the TranslateText request.
|
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 the terminology list file to be used in the TranslateText request.
|
TranslateTextRequest |
withTerminologyNames(String... terminologyNames)
The name of the terminology list file to be used in the TranslateText request.
|
TranslateTextRequest |
withText(String text)
The text to translate.
|
addHandlerContext, 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, withSdkRequestTimeout
public 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 the terminology list file to be used in the TranslateText request. You can use 1 terminology list at
most in a TranslateText
request. Terminology lists can contain a maximum of 256 terms.
TranslateText
request. Terminology lists can contain a maximum of 256
terms.public void setTerminologyNames(Collection<String> terminologyNames)
The name of the terminology list file to be used in the TranslateText request. You can use 1 terminology list at
most in a TranslateText
request. Terminology lists can contain a maximum of 256 terms.
terminologyNames
- The name of the terminology list file to be used in the TranslateText request. You can use 1 terminology
list at most in a TranslateText
request. Terminology lists can contain a maximum of 256
terms.public TranslateTextRequest withTerminologyNames(String... terminologyNames)
The name of the terminology list file to be used in the TranslateText request. You can use 1 terminology list at
most in a TranslateText
request. Terminology lists can contain a maximum of 256 terms.
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 the terminology list file to be used in the TranslateText request. You can use 1 terminology
list at most in a TranslateText
request. Terminology lists can contain a maximum of 256
terms.public TranslateTextRequest withTerminologyNames(Collection<String> terminologyNames)
The name of the terminology list file to be used in the TranslateText request. You can use 1 terminology list at
most in a TranslateText
request. Terminology lists can contain a maximum of 256 terms.
terminologyNames
- The name of the terminology list file to be used in the TranslateText request. You can use 1 terminology
list at most in a TranslateText
request. Terminology lists can contain a maximum of 256
terms.public void setSourceLanguageCode(String sourceLanguageCode)
The language code for the language of the source text. The language must be a language supported by Amazon Translate. 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. The language must be a language supported by Amazon
Translate. 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. The language must be a language supported by Amazon Translate. 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. The language must be a language supported by Amazon Translate. 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. The language must be a language supported by Amazon
Translate. 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. The language must be a language supported by Amazon Translate.
targetLanguageCode
- The language code requested for the language of the target text. The language must be a language supported
by Amazon Translate.public String getTargetLanguageCode()
The language code requested for the language of the target text. The language must be a language supported by Amazon Translate.
public TranslateTextRequest withTargetLanguageCode(String targetLanguageCode)
The language code requested for the language of the target text. The language must be a language supported by Amazon Translate.
targetLanguageCode
- The language code requested for the language of the target text. The language must be a language supported
by Amazon Translate.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 Object
Object.toString()
public TranslateTextRequest clone()
AmazonWebServiceRequest
clone
in class AmazonWebServiceRequest
Object.clone()