public class TranslateTextRequest extends AmazonWebServiceRequest implements java.io.Serializable
Translates input text from the source language to the target language. For a list of available languages and language codes, see what-is-languages.
Constructor and Description |
---|
TranslateTextRequest() |
Modifier and Type | Method and Description |
---|---|
boolean |
equals(java.lang.Object obj) |
java.lang.String |
getSourceLanguageCode()
The language code for the language of the source text.
|
java.lang.String |
getTargetLanguageCode()
The language code requested for the language of the target text.
|
java.util.List<java.lang.String> |
getTerminologyNames()
The name of the terminology list file to be used in the TranslateText
request.
|
java.lang.String |
getText()
The text to translate.
|
int |
hashCode() |
void |
setSourceLanguageCode(java.lang.String sourceLanguageCode)
The language code for the language of the source text.
|
void |
setTargetLanguageCode(java.lang.String targetLanguageCode)
The language code requested for the language of the target text.
|
void |
setTerminologyNames(java.util.Collection<java.lang.String> terminologyNames)
The name of the terminology list file to be used in the TranslateText
request.
|
void |
setText(java.lang.String text)
The text to translate.
|
java.lang.String |
toString()
Returns a string representation of this object; useful for testing and
debugging.
|
TranslateTextRequest |
withSourceLanguageCode(java.lang.String sourceLanguageCode)
The language code for the language of the source text.
|
TranslateTextRequest |
withTargetLanguageCode(java.lang.String targetLanguageCode)
The language code requested for the language of the target text.
|
TranslateTextRequest |
withTerminologyNames(java.util.Collection<java.lang.String> terminologyNames)
The name of the terminology list file to be used in the TranslateText
request.
|
TranslateTextRequest |
withTerminologyNames(java.lang.String... terminologyNames)
The name of the terminology list file to be used in the TranslateText
request.
|
TranslateTextRequest |
withText(java.lang.String text)
The text to translate.
|
clone, getCloneRoot, getCloneSource, getGeneralProgressListener, getRequestClientOptions, getRequestCredentials, getRequestMetricCollector, setGeneralProgressListener, setRequestCredentials, setRequestMetricCollector, withGeneralProgressListener, withRequestMetricCollector
public java.lang.String getText()
The text to translate. The text string can be a maximum of 5,000 bytes long. Depending on your character set, this may be fewer than 5,000 characters.
Constraints:
Length: 1 - 5000
Pattern: [\P{M}\p{M}]{1,5000}
The text to translate. The text string can be a maximum of 5,000 bytes long. Depending on your character set, this may be fewer than 5,000 characters.
public void setText(java.lang.String text)
The text to translate. The text string can be a maximum of 5,000 bytes long. Depending on your character set, this may be fewer than 5,000 characters.
Constraints:
Length: 1 - 5000
Pattern: [\P{M}\p{M}]{1,5000}
text
- The text to translate. The text string can be a maximum of 5,000 bytes long. Depending on your character set, this may be fewer than 5,000 characters.
public TranslateTextRequest withText(java.lang.String text)
The text to translate. The text string can be a maximum of 5,000 bytes long. Depending on your character set, this may be fewer than 5,000 characters.
Returns a reference to this object so that method calls can be chained together.
Constraints:
Length: 1 - 5000
Pattern: [\P{M}\p{M}]{1,5000}
text
- The text to translate. The text string can be a maximum of 5,000 bytes long. Depending on your character set, this may be fewer than 5,000 characters.
public java.util.List<java.lang.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.
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 setTerminologyNames(java.util.Collection<java.lang.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(java.lang.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.
Returns a reference to this object so that method calls can be chained together.
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(java.util.Collection<java.lang.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.
Returns a reference to this object so that method calls can be chained together.
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 java.lang.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 what-is-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.
Constraints:
Length: 2 - 5
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 what-is-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.
public void setSourceLanguageCode(java.lang.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 what-is-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.
Constraints:
Length: 2 - 5
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 what-is-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.
public TranslateTextRequest withSourceLanguageCode(java.lang.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 what-is-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.
Returns a reference to this object so that method calls can be chained together.
Constraints:
Length: 2 - 5
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 what-is-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.
public java.lang.String getTargetLanguageCode()
The language code requested for the language of the target text. The language must be a language supported by Amazon Translate.
Constraints:
Length: 2 - 5
The language code requested for the language of the target text. The language must be a language supported by Amazon Translate.
public void setTargetLanguageCode(java.lang.String targetLanguageCode)
The language code requested for the language of the target text. The language must be a language supported by Amazon Translate.
Constraints:
Length: 2 - 5
targetLanguageCode
- The language code requested for the language of the target text. The language must be a language supported by Amazon Translate.
public TranslateTextRequest withTargetLanguageCode(java.lang.String targetLanguageCode)
The language code requested for the language of the target text. The language must be a language supported by Amazon Translate.
Returns a reference to this object so that method calls can be chained together.
Constraints:
Length: 2 - 5
targetLanguageCode
- The language code requested for the language of the target text. The language must be a language supported by Amazon Translate.
public java.lang.String toString()
toString
in class java.lang.Object
Object.toString()
public int hashCode()
hashCode
in class java.lang.Object
public boolean equals(java.lang.Object obj)
equals
in class java.lang.Object
Copyright © 2018 Amazon Web Services, Inc. All Rights Reserved.