/* * Copyright 2018-2023 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file except in compliance with * the License. A copy of the License is located at * * http://aws.amazon.com/apache2.0 * * or in the "license" file accompanying this file. This file is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR * CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions * and limitations under the License. */ package com.amazonaws.services.translate.model; import java.io.Serializable; import javax.annotation.Generated; import com.amazonaws.AmazonWebServiceRequest; /** * * @see AWS API * Documentation */ @Generated("com.amazonaws:aws-java-sdk-code-generator") public class TranslateDocumentRequest extends com.amazonaws.AmazonWebServiceRequest implements Serializable, Cloneable { /** *
* The content and content type for the document to be translated. The document size must not exceed 100 KB. *
*/ private Document document; /** ** 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. *
*/ private java.util.List
* The language code for the language of the source text. Do not use auto
, because
* TranslateDocument
does not support language auto-detection. For a list of supported language codes,
* see Supported languages.
*
* The language code requested for the translated document. For a list of supported language codes, see Supported languages. *
*/ private String targetLanguageCode; private TranslationSettings settings; /** ** The content and content type for the document to be translated. The document size must not exceed 100 KB. *
* * @param document * The content and content type for the document to be translated. The document size must not exceed 100 KB. */ public void setDocument(Document document) { this.document = document; } /** ** The content and content type for the document to be translated. The document size must not exceed 100 KB. *
* * @return The content and content type for the document to be translated. The document size must not exceed 100 KB. */ public Document getDocument() { return this.document; } /** ** The content and content type for the document to be translated. The document size must not exceed 100 KB. *
* * @param document * The content and content type for the document to be translated. The document size must not exceed 100 KB. * @return Returns a reference to this object so that method calls can be chained together. */ public TranslateDocumentRequest withDocument(Document document) { setDocument(document); return this; } /** ** 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. *
* * @return 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 java.util.List
* 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(java.util.Collection
* 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
* {@link #setTerminologyNames(java.util.Collection)} or {@link #withTerminologyNames(java.util.Collection)} if you
* want to override the existing values.
*
* Use the ListTerminologies operation to get the available terminology lists. *
*
* For more information about custom terminology lists, see Custom terminology.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public TranslateDocumentRequest withTerminologyNames(String... terminologyNames) {
if (this.terminologyNames == null) {
setTerminologyNames(new java.util.ArrayList
* 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.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public TranslateDocumentRequest withTerminologyNames(java.util.Collection
* The language code for the language of the source text. Do not use
* The language code for the language of the source text. Do not use
* The language code for the language of the source text. Do not use
* The language code requested for the translated document. For a list of supported language codes, see Supported languages.
*
* The language code requested for the translated document. For a list of supported language codes, see Supported languages.
*
* The language code requested for the translated document. For a list of supported language codes, see Supported languages.
* auto
, because
* TranslateDocument
does not support language auto-detection. For a list of supported language codes,
* see Supported languages.
* auto
, because
* TranslateDocument
does not support language auto-detection. For a list of supported language
* codes, see Supported
* languages.
*/
public void setSourceLanguageCode(String sourceLanguageCode) {
this.sourceLanguageCode = sourceLanguageCode;
}
/**
* auto
, because
* TranslateDocument
does not support language auto-detection. For a list of supported language codes,
* see Supported languages.
* auto
, because
* TranslateDocument
does not support language auto-detection. For a list of supported language
* codes, see Supported
* languages.
*/
public String getSourceLanguageCode() {
return this.sourceLanguageCode;
}
/**
* auto
, because
* TranslateDocument
does not support language auto-detection. For a list of supported language codes,
* see Supported languages.
* auto
, because
* TranslateDocument
does not support language auto-detection. For a list of supported language
* codes, see Supported
* languages.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public TranslateDocumentRequest withSourceLanguageCode(String sourceLanguageCode) {
setSourceLanguageCode(sourceLanguageCode);
return this;
}
/**
*